@camstack/addon-benchmark 1.2.130 → 1.2.131
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/_stub.js +914 -891
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_benchmark_page-DD7LwE-8.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_benchmark_page-CaAxGvee.mjs} +2 -2
- package/dist/{hostInit-Dafc9ta5.mjs → hostInit-BSaVnGwK.mjs} +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_benchmark_page__remoteEntry_js-gG6O20vq.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_benchmark_page__remoteEntry_js-Cs5KGEhS.mjs} +1 -1
- package/package.json +1 -1
package/dist/_stub.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "./virtualExposes-erbhyesj.mjs";
|
|
2
|
-
import { a as e, i as t, o as n, r } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_benchmark_page__remoteEntry_js-
|
|
2
|
+
import { a as e, i as t, o as n, r } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_benchmark_page__remoteEntry_js-Cs5KGEhS.mjs";
|
|
3
3
|
import { _ as i, b as a, c as o, d as s, f as c, g as l, h as u, i as d, l as f, m as p, n as m, p as h, r as g, t as _, u as v, v as y, x as b, y as x } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react__loadShare__.js-GeuxDuzQ.mjs";
|
|
4
4
|
import { a as S, c as C, i as w, n as T, o as E, r as D, s as O } from "./responsive-CT_560tF.mjs";
|
|
5
|
-
import { c as k, d as ee, f as
|
|
6
|
-
import { a as
|
|
7
|
-
import { n as
|
|
8
|
-
import { t as
|
|
5
|
+
import { c as k, d as ee, f as A, l as te, s as ne, u as j } from "./scene-monitor-copy-BT6N1GH3.mjs";
|
|
6
|
+
import { a as re, i as M, n as N, o as P, r as F } from "./player-overlays-Cpb-b-H9.mjs";
|
|
7
|
+
import { n as I, r as L, t as R } from "./square-CTAf6jcB.mjs";
|
|
8
|
+
import { t as z } from "./grid-2x2-B15Skho8.mjs";
|
|
9
9
|
import { t as ie } from "./trash-2-gzG8wmmP.mjs";
|
|
10
10
|
import { n as B, t as ae } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.js-Bh7FS7ML.mjs";
|
|
11
11
|
import { i as oe, n as V, r as H, t as U } from "./_virtual_mf___mfe_internal__addon_benchmark_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-SOU_VnTj.mjs";
|
|
@@ -3088,14 +3088,14 @@ var gi = (e, t) => {
|
|
|
3088
3088
|
"baseline",
|
|
3089
3089
|
"center-safe",
|
|
3090
3090
|
"end-safe"
|
|
3091
|
-
],
|
|
3091
|
+
], A = () => [
|
|
3092
3092
|
"start",
|
|
3093
3093
|
"end",
|
|
3094
3094
|
"center",
|
|
3095
3095
|
"stretch",
|
|
3096
3096
|
"center-safe",
|
|
3097
3097
|
"end-safe"
|
|
3098
|
-
],
|
|
3098
|
+
], te = () => ["auto", ...w()], ne = () => [
|
|
3099
3099
|
ia,
|
|
3100
3100
|
"auto",
|
|
3101
3101
|
"full",
|
|
@@ -3109,7 +3109,7 @@ var gi = (e, t) => {
|
|
|
3109
3109
|
"max",
|
|
3110
3110
|
"fit",
|
|
3111
3111
|
...w()
|
|
3112
|
-
],
|
|
3112
|
+
], j = () => [
|
|
3113
3113
|
ia,
|
|
3114
3114
|
"screen",
|
|
3115
3115
|
"full",
|
|
@@ -3120,7 +3120,7 @@ var gi = (e, t) => {
|
|
|
3120
3120
|
"max",
|
|
3121
3121
|
"fit",
|
|
3122
3122
|
...w()
|
|
3123
|
-
],
|
|
3123
|
+
], re = () => [
|
|
3124
3124
|
ia,
|
|
3125
3125
|
"screen",
|
|
3126
3126
|
"full",
|
|
@@ -3132,45 +3132,45 @@ var gi = (e, t) => {
|
|
|
3132
3132
|
"max",
|
|
3133
3133
|
"fit",
|
|
3134
3134
|
...w()
|
|
3135
|
-
],
|
|
3135
|
+
], M = () => [
|
|
3136
3136
|
e,
|
|
3137
3137
|
X,
|
|
3138
3138
|
Y
|
|
3139
|
-
],
|
|
3139
|
+
], N = () => [
|
|
3140
3140
|
...b(),
|
|
3141
3141
|
Ea,
|
|
3142
3142
|
xa,
|
|
3143
3143
|
{ position: [X, Y] }
|
|
3144
|
-
],
|
|
3144
|
+
], P = () => ["no-repeat", { repeat: [
|
|
3145
3145
|
"",
|
|
3146
3146
|
"x",
|
|
3147
3147
|
"y",
|
|
3148
3148
|
"space",
|
|
3149
3149
|
"round"
|
|
3150
|
-
] }],
|
|
3150
|
+
] }], F = () => [
|
|
3151
3151
|
"auto",
|
|
3152
3152
|
"cover",
|
|
3153
3153
|
"contain",
|
|
3154
3154
|
Da,
|
|
3155
3155
|
ga,
|
|
3156
3156
|
{ size: [X, Y] }
|
|
3157
|
-
],
|
|
3157
|
+
], I = () => [
|
|
3158
3158
|
sa,
|
|
3159
3159
|
wa,
|
|
3160
3160
|
_a
|
|
3161
|
-
],
|
|
3161
|
+
], L = () => [
|
|
3162
3162
|
"",
|
|
3163
3163
|
"none",
|
|
3164
3164
|
"full",
|
|
3165
3165
|
l,
|
|
3166
3166
|
X,
|
|
3167
3167
|
Y
|
|
3168
|
-
],
|
|
3168
|
+
], R = () => [
|
|
3169
3169
|
"",
|
|
3170
3170
|
aa,
|
|
3171
3171
|
wa,
|
|
3172
3172
|
_a
|
|
3173
|
-
],
|
|
3173
|
+
], z = () => [
|
|
3174
3174
|
"solid",
|
|
3175
3175
|
"dashed",
|
|
3176
3176
|
"dotted",
|
|
@@ -3475,18 +3475,18 @@ var gi = (e, t) => {
|
|
|
3475
3475
|
"gap-x": [{ "gap-x": w() }],
|
|
3476
3476
|
"gap-y": [{ "gap-y": w() }],
|
|
3477
3477
|
"justify-content": [{ justify: [...ee(), "normal"] }],
|
|
3478
|
-
"justify-items": [{ "justify-items": [...
|
|
3479
|
-
"justify-self": [{ "justify-self": ["auto", ...
|
|
3478
|
+
"justify-items": [{ "justify-items": [...A(), "normal"] }],
|
|
3479
|
+
"justify-self": [{ "justify-self": ["auto", ...A()] }],
|
|
3480
3480
|
"align-content": [{ content: ["normal", ...ee()] }],
|
|
3481
|
-
"align-items": [{ items: [...
|
|
3481
|
+
"align-items": [{ items: [...A(), { baseline: ["", "last"] }] }],
|
|
3482
3482
|
"align-self": [{ self: [
|
|
3483
3483
|
"auto",
|
|
3484
|
-
...
|
|
3484
|
+
...A(),
|
|
3485
3485
|
{ baseline: ["", "last"] }
|
|
3486
3486
|
] }],
|
|
3487
3487
|
"place-content": [{ "place-content": ee() }],
|
|
3488
|
-
"place-items": [{ "place-items": [...
|
|
3489
|
-
"place-self": [{ "place-self": ["auto", ...
|
|
3488
|
+
"place-items": [{ "place-items": [...A(), "baseline"] }],
|
|
3489
|
+
"place-self": [{ "place-self": ["auto", ...A()] }],
|
|
3490
3490
|
p: [{ p: w() }],
|
|
3491
3491
|
px: [{ px: w() }],
|
|
3492
3492
|
py: [{ py: w() }],
|
|
@@ -3498,38 +3498,38 @@ var gi = (e, t) => {
|
|
|
3498
3498
|
pr: [{ pr: w() }],
|
|
3499
3499
|
pb: [{ pb: w() }],
|
|
3500
3500
|
pl: [{ pl: w() }],
|
|
3501
|
-
m: [{ m:
|
|
3502
|
-
mx: [{ mx:
|
|
3503
|
-
my: [{ my:
|
|
3504
|
-
ms: [{ ms:
|
|
3505
|
-
me: [{ me:
|
|
3506
|
-
mbs: [{ mbs:
|
|
3507
|
-
mbe: [{ mbe:
|
|
3508
|
-
mt: [{ mt:
|
|
3509
|
-
mr: [{ mr:
|
|
3510
|
-
mb: [{ mb:
|
|
3511
|
-
ml: [{ ml:
|
|
3501
|
+
m: [{ m: te() }],
|
|
3502
|
+
mx: [{ mx: te() }],
|
|
3503
|
+
my: [{ my: te() }],
|
|
3504
|
+
ms: [{ ms: te() }],
|
|
3505
|
+
me: [{ me: te() }],
|
|
3506
|
+
mbs: [{ mbs: te() }],
|
|
3507
|
+
mbe: [{ mbe: te() }],
|
|
3508
|
+
mt: [{ mt: te() }],
|
|
3509
|
+
mr: [{ mr: te() }],
|
|
3510
|
+
mb: [{ mb: te() }],
|
|
3511
|
+
ml: [{ ml: te() }],
|
|
3512
3512
|
"space-x": [{ "space-x": w() }],
|
|
3513
3513
|
"space-x-reverse": ["space-x-reverse"],
|
|
3514
3514
|
"space-y": [{ "space-y": w() }],
|
|
3515
3515
|
"space-y-reverse": ["space-y-reverse"],
|
|
3516
|
-
size: [{ size:
|
|
3517
|
-
"inline-size": [{ inline: ["auto", ...
|
|
3518
|
-
"min-inline-size": [{ "min-inline": ["auto", ...
|
|
3519
|
-
"max-inline-size": [{ "max-inline": ["none", ...
|
|
3520
|
-
"block-size": [{ block: ["auto", ...
|
|
3521
|
-
"min-block-size": [{ "min-block": ["auto", ...
|
|
3522
|
-
"max-block-size": [{ "max-block": ["none", ...
|
|
3516
|
+
size: [{ size: ne() }],
|
|
3517
|
+
"inline-size": [{ inline: ["auto", ...j()] }],
|
|
3518
|
+
"min-inline-size": [{ "min-inline": ["auto", ...j()] }],
|
|
3519
|
+
"max-inline-size": [{ "max-inline": ["none", ...j()] }],
|
|
3520
|
+
"block-size": [{ block: ["auto", ...re()] }],
|
|
3521
|
+
"min-block-size": [{ "min-block": ["auto", ...re()] }],
|
|
3522
|
+
"max-block-size": [{ "max-block": ["none", ...re()] }],
|
|
3523
3523
|
w: [{ w: [
|
|
3524
3524
|
s,
|
|
3525
3525
|
"screen",
|
|
3526
|
-
...
|
|
3526
|
+
...ne()
|
|
3527
3527
|
] }],
|
|
3528
3528
|
"min-w": [{ "min-w": [
|
|
3529
3529
|
s,
|
|
3530
3530
|
"screen",
|
|
3531
3531
|
"none",
|
|
3532
|
-
...
|
|
3532
|
+
...ne()
|
|
3533
3533
|
] }],
|
|
3534
3534
|
"max-w": [{ "max-w": [
|
|
3535
3535
|
s,
|
|
@@ -3537,23 +3537,23 @@ var gi = (e, t) => {
|
|
|
3537
3537
|
"none",
|
|
3538
3538
|
"prose",
|
|
3539
3539
|
{ screen: [o] },
|
|
3540
|
-
...
|
|
3540
|
+
...ne()
|
|
3541
3541
|
] }],
|
|
3542
3542
|
h: [{ h: [
|
|
3543
3543
|
"screen",
|
|
3544
3544
|
"lh",
|
|
3545
|
-
...
|
|
3545
|
+
...ne()
|
|
3546
3546
|
] }],
|
|
3547
3547
|
"min-h": [{ "min-h": [
|
|
3548
3548
|
"screen",
|
|
3549
3549
|
"lh",
|
|
3550
3550
|
"none",
|
|
3551
|
-
...
|
|
3551
|
+
...ne()
|
|
3552
3552
|
] }],
|
|
3553
3553
|
"max-h": [{ "max-h": [
|
|
3554
3554
|
"screen",
|
|
3555
3555
|
"lh",
|
|
3556
|
-
...
|
|
3556
|
+
...ne()
|
|
3557
3557
|
] }],
|
|
3558
3558
|
"font-size": [{ text: [
|
|
3559
3559
|
"base",
|
|
@@ -3626,15 +3626,15 @@ var gi = (e, t) => {
|
|
|
3626
3626
|
"start",
|
|
3627
3627
|
"end"
|
|
3628
3628
|
] }],
|
|
3629
|
-
"placeholder-color": [{ placeholder:
|
|
3630
|
-
"text-color": [{ text:
|
|
3629
|
+
"placeholder-color": [{ placeholder: M() }],
|
|
3630
|
+
"text-color": [{ text: M() }],
|
|
3631
3631
|
"text-decoration": [
|
|
3632
3632
|
"underline",
|
|
3633
3633
|
"overline",
|
|
3634
3634
|
"line-through",
|
|
3635
3635
|
"no-underline"
|
|
3636
3636
|
],
|
|
3637
|
-
"text-decoration-style": [{ decoration: [...
|
|
3637
|
+
"text-decoration-style": [{ decoration: [...z(), "wavy"] }],
|
|
3638
3638
|
"text-decoration-thickness": [{ decoration: [
|
|
3639
3639
|
aa,
|
|
3640
3640
|
"from-font",
|
|
@@ -3642,7 +3642,7 @@ var gi = (e, t) => {
|
|
|
3642
3642
|
X,
|
|
3643
3643
|
_a
|
|
3644
3644
|
] }],
|
|
3645
|
-
"text-decoration-color": [{ decoration:
|
|
3645
|
+
"text-decoration-color": [{ decoration: M() }],
|
|
3646
3646
|
"underline-offset": [{ "underline-offset": [
|
|
3647
3647
|
aa,
|
|
3648
3648
|
"auto",
|
|
@@ -3729,9 +3729,9 @@ var gi = (e, t) => {
|
|
|
3729
3729
|
"padding",
|
|
3730
3730
|
"content"
|
|
3731
3731
|
] }],
|
|
3732
|
-
"bg-position": [{ bg:
|
|
3733
|
-
"bg-repeat": [{ bg:
|
|
3734
|
-
"bg-size": [{ bg:
|
|
3732
|
+
"bg-position": [{ bg: N() }],
|
|
3733
|
+
"bg-repeat": [{ bg: P() }],
|
|
3734
|
+
"bg-size": [{ bg: F() }],
|
|
3735
3735
|
"bg-image": [{ bg: [
|
|
3736
3736
|
"none",
|
|
3737
3737
|
{
|
|
@@ -3764,67 +3764,67 @@ var gi = (e, t) => {
|
|
|
3764
3764
|
Oa,
|
|
3765
3765
|
Sa
|
|
3766
3766
|
] }],
|
|
3767
|
-
"bg-color": [{ bg:
|
|
3768
|
-
"gradient-from-pos": [{ from:
|
|
3769
|
-
"gradient-via-pos": [{ via:
|
|
3770
|
-
"gradient-to-pos": [{ to:
|
|
3771
|
-
"gradient-from": [{ from:
|
|
3772
|
-
"gradient-via": [{ via:
|
|
3773
|
-
"gradient-to": [{ to:
|
|
3774
|
-
rounded: [{ rounded:
|
|
3775
|
-
"rounded-s": [{ "rounded-s":
|
|
3776
|
-
"rounded-e": [{ "rounded-e":
|
|
3777
|
-
"rounded-t": [{ "rounded-t":
|
|
3778
|
-
"rounded-r": [{ "rounded-r":
|
|
3779
|
-
"rounded-b": [{ "rounded-b":
|
|
3780
|
-
"rounded-l": [{ "rounded-l":
|
|
3781
|
-
"rounded-ss": [{ "rounded-ss":
|
|
3782
|
-
"rounded-se": [{ "rounded-se":
|
|
3783
|
-
"rounded-ee": [{ "rounded-ee":
|
|
3784
|
-
"rounded-es": [{ "rounded-es":
|
|
3785
|
-
"rounded-tl": [{ "rounded-tl":
|
|
3786
|
-
"rounded-tr": [{ "rounded-tr":
|
|
3787
|
-
"rounded-br": [{ "rounded-br":
|
|
3788
|
-
"rounded-bl": [{ "rounded-bl":
|
|
3789
|
-
"border-w": [{ border:
|
|
3790
|
-
"border-w-x": [{ "border-x":
|
|
3791
|
-
"border-w-y": [{ "border-y":
|
|
3792
|
-
"border-w-s": [{ "border-s":
|
|
3793
|
-
"border-w-e": [{ "border-e":
|
|
3794
|
-
"border-w-bs": [{ "border-bs":
|
|
3795
|
-
"border-w-be": [{ "border-be":
|
|
3796
|
-
"border-w-t": [{ "border-t":
|
|
3797
|
-
"border-w-r": [{ "border-r":
|
|
3798
|
-
"border-w-b": [{ "border-b":
|
|
3799
|
-
"border-w-l": [{ "border-l":
|
|
3800
|
-
"divide-x": [{ "divide-x":
|
|
3767
|
+
"bg-color": [{ bg: M() }],
|
|
3768
|
+
"gradient-from-pos": [{ from: I() }],
|
|
3769
|
+
"gradient-via-pos": [{ via: I() }],
|
|
3770
|
+
"gradient-to-pos": [{ to: I() }],
|
|
3771
|
+
"gradient-from": [{ from: M() }],
|
|
3772
|
+
"gradient-via": [{ via: M() }],
|
|
3773
|
+
"gradient-to": [{ to: M() }],
|
|
3774
|
+
rounded: [{ rounded: L() }],
|
|
3775
|
+
"rounded-s": [{ "rounded-s": L() }],
|
|
3776
|
+
"rounded-e": [{ "rounded-e": L() }],
|
|
3777
|
+
"rounded-t": [{ "rounded-t": L() }],
|
|
3778
|
+
"rounded-r": [{ "rounded-r": L() }],
|
|
3779
|
+
"rounded-b": [{ "rounded-b": L() }],
|
|
3780
|
+
"rounded-l": [{ "rounded-l": L() }],
|
|
3781
|
+
"rounded-ss": [{ "rounded-ss": L() }],
|
|
3782
|
+
"rounded-se": [{ "rounded-se": L() }],
|
|
3783
|
+
"rounded-ee": [{ "rounded-ee": L() }],
|
|
3784
|
+
"rounded-es": [{ "rounded-es": L() }],
|
|
3785
|
+
"rounded-tl": [{ "rounded-tl": L() }],
|
|
3786
|
+
"rounded-tr": [{ "rounded-tr": L() }],
|
|
3787
|
+
"rounded-br": [{ "rounded-br": L() }],
|
|
3788
|
+
"rounded-bl": [{ "rounded-bl": L() }],
|
|
3789
|
+
"border-w": [{ border: R() }],
|
|
3790
|
+
"border-w-x": [{ "border-x": R() }],
|
|
3791
|
+
"border-w-y": [{ "border-y": R() }],
|
|
3792
|
+
"border-w-s": [{ "border-s": R() }],
|
|
3793
|
+
"border-w-e": [{ "border-e": R() }],
|
|
3794
|
+
"border-w-bs": [{ "border-bs": R() }],
|
|
3795
|
+
"border-w-be": [{ "border-be": R() }],
|
|
3796
|
+
"border-w-t": [{ "border-t": R() }],
|
|
3797
|
+
"border-w-r": [{ "border-r": R() }],
|
|
3798
|
+
"border-w-b": [{ "border-b": R() }],
|
|
3799
|
+
"border-w-l": [{ "border-l": R() }],
|
|
3800
|
+
"divide-x": [{ "divide-x": R() }],
|
|
3801
3801
|
"divide-x-reverse": ["divide-x-reverse"],
|
|
3802
|
-
"divide-y": [{ "divide-y":
|
|
3802
|
+
"divide-y": [{ "divide-y": R() }],
|
|
3803
3803
|
"divide-y-reverse": ["divide-y-reverse"],
|
|
3804
3804
|
"border-style": [{ border: [
|
|
3805
|
-
...
|
|
3805
|
+
...z(),
|
|
3806
3806
|
"hidden",
|
|
3807
3807
|
"none"
|
|
3808
3808
|
] }],
|
|
3809
3809
|
"divide-style": [{ divide: [
|
|
3810
|
-
...
|
|
3810
|
+
...z(),
|
|
3811
3811
|
"hidden",
|
|
3812
3812
|
"none"
|
|
3813
3813
|
] }],
|
|
3814
|
-
"border-color": [{ border:
|
|
3815
|
-
"border-color-x": [{ "border-x":
|
|
3816
|
-
"border-color-y": [{ "border-y":
|
|
3817
|
-
"border-color-s": [{ "border-s":
|
|
3818
|
-
"border-color-e": [{ "border-e":
|
|
3819
|
-
"border-color-bs": [{ "border-bs":
|
|
3820
|
-
"border-color-be": [{ "border-be":
|
|
3821
|
-
"border-color-t": [{ "border-t":
|
|
3822
|
-
"border-color-r": [{ "border-r":
|
|
3823
|
-
"border-color-b": [{ "border-b":
|
|
3824
|
-
"border-color-l": [{ "border-l":
|
|
3825
|
-
"divide-color": [{ divide:
|
|
3814
|
+
"border-color": [{ border: M() }],
|
|
3815
|
+
"border-color-x": [{ "border-x": M() }],
|
|
3816
|
+
"border-color-y": [{ "border-y": M() }],
|
|
3817
|
+
"border-color-s": [{ "border-s": M() }],
|
|
3818
|
+
"border-color-e": [{ "border-e": M() }],
|
|
3819
|
+
"border-color-bs": [{ "border-bs": M() }],
|
|
3820
|
+
"border-color-be": [{ "border-be": M() }],
|
|
3821
|
+
"border-color-t": [{ "border-t": M() }],
|
|
3822
|
+
"border-color-r": [{ "border-r": M() }],
|
|
3823
|
+
"border-color-b": [{ "border-b": M() }],
|
|
3824
|
+
"border-color-l": [{ "border-l": M() }],
|
|
3825
|
+
"divide-color": [{ divide: M() }],
|
|
3826
3826
|
"outline-style": [{ outline: [
|
|
3827
|
-
...
|
|
3827
|
+
...z(),
|
|
3828
3828
|
"none",
|
|
3829
3829
|
"hidden"
|
|
3830
3830
|
] }],
|
|
@@ -3839,7 +3839,7 @@ var gi = (e, t) => {
|
|
|
3839
3839
|
wa,
|
|
3840
3840
|
_a
|
|
3841
3841
|
] }],
|
|
3842
|
-
"outline-color": [{ outline:
|
|
3842
|
+
"outline-color": [{ outline: M() }],
|
|
3843
3843
|
shadow: [{ shadow: [
|
|
3844
3844
|
"",
|
|
3845
3845
|
"none",
|
|
@@ -3847,28 +3847,28 @@ var gi = (e, t) => {
|
|
|
3847
3847
|
ka,
|
|
3848
3848
|
Ca
|
|
3849
3849
|
] }],
|
|
3850
|
-
"shadow-color": [{ shadow:
|
|
3850
|
+
"shadow-color": [{ shadow: M() }],
|
|
3851
3851
|
"inset-shadow": [{ "inset-shadow": [
|
|
3852
3852
|
"none",
|
|
3853
3853
|
d,
|
|
3854
3854
|
ka,
|
|
3855
3855
|
Ca
|
|
3856
3856
|
] }],
|
|
3857
|
-
"inset-shadow-color": [{ "inset-shadow":
|
|
3858
|
-
"ring-w": [{ ring:
|
|
3857
|
+
"inset-shadow-color": [{ "inset-shadow": M() }],
|
|
3858
|
+
"ring-w": [{ ring: R() }],
|
|
3859
3859
|
"ring-w-inset": ["ring-inset"],
|
|
3860
|
-
"ring-color": [{ ring:
|
|
3860
|
+
"ring-color": [{ ring: M() }],
|
|
3861
3861
|
"ring-offset-w": [{ "ring-offset": [aa, _a] }],
|
|
3862
|
-
"ring-offset-color": [{ "ring-offset":
|
|
3863
|
-
"inset-ring-w": [{ "inset-ring":
|
|
3864
|
-
"inset-ring-color": [{ "inset-ring":
|
|
3862
|
+
"ring-offset-color": [{ "ring-offset": M() }],
|
|
3863
|
+
"inset-ring-w": [{ "inset-ring": R() }],
|
|
3864
|
+
"inset-ring-color": [{ "inset-ring": M() }],
|
|
3865
3865
|
"text-shadow": [{ "text-shadow": [
|
|
3866
3866
|
"none",
|
|
3867
3867
|
f,
|
|
3868
3868
|
ka,
|
|
3869
3869
|
Ca
|
|
3870
3870
|
] }],
|
|
3871
|
-
"text-shadow-color": [{ "text-shadow":
|
|
3871
|
+
"text-shadow-color": [{ "text-shadow": M() }],
|
|
3872
3872
|
opacity: [{ opacity: [
|
|
3873
3873
|
aa,
|
|
3874
3874
|
X,
|
|
@@ -3897,37 +3897,37 @@ var gi = (e, t) => {
|
|
|
3897
3897
|
"mask-image-linear-pos": [{ "mask-linear": [aa] }],
|
|
3898
3898
|
"mask-image-linear-from-pos": [{ "mask-linear-from": B() }],
|
|
3899
3899
|
"mask-image-linear-to-pos": [{ "mask-linear-to": B() }],
|
|
3900
|
-
"mask-image-linear-from-color": [{ "mask-linear-from":
|
|
3901
|
-
"mask-image-linear-to-color": [{ "mask-linear-to":
|
|
3900
|
+
"mask-image-linear-from-color": [{ "mask-linear-from": M() }],
|
|
3901
|
+
"mask-image-linear-to-color": [{ "mask-linear-to": M() }],
|
|
3902
3902
|
"mask-image-t-from-pos": [{ "mask-t-from": B() }],
|
|
3903
3903
|
"mask-image-t-to-pos": [{ "mask-t-to": B() }],
|
|
3904
|
-
"mask-image-t-from-color": [{ "mask-t-from":
|
|
3905
|
-
"mask-image-t-to-color": [{ "mask-t-to":
|
|
3904
|
+
"mask-image-t-from-color": [{ "mask-t-from": M() }],
|
|
3905
|
+
"mask-image-t-to-color": [{ "mask-t-to": M() }],
|
|
3906
3906
|
"mask-image-r-from-pos": [{ "mask-r-from": B() }],
|
|
3907
3907
|
"mask-image-r-to-pos": [{ "mask-r-to": B() }],
|
|
3908
|
-
"mask-image-r-from-color": [{ "mask-r-from":
|
|
3909
|
-
"mask-image-r-to-color": [{ "mask-r-to":
|
|
3908
|
+
"mask-image-r-from-color": [{ "mask-r-from": M() }],
|
|
3909
|
+
"mask-image-r-to-color": [{ "mask-r-to": M() }],
|
|
3910
3910
|
"mask-image-b-from-pos": [{ "mask-b-from": B() }],
|
|
3911
3911
|
"mask-image-b-to-pos": [{ "mask-b-to": B() }],
|
|
3912
|
-
"mask-image-b-from-color": [{ "mask-b-from":
|
|
3913
|
-
"mask-image-b-to-color": [{ "mask-b-to":
|
|
3912
|
+
"mask-image-b-from-color": [{ "mask-b-from": M() }],
|
|
3913
|
+
"mask-image-b-to-color": [{ "mask-b-to": M() }],
|
|
3914
3914
|
"mask-image-l-from-pos": [{ "mask-l-from": B() }],
|
|
3915
3915
|
"mask-image-l-to-pos": [{ "mask-l-to": B() }],
|
|
3916
|
-
"mask-image-l-from-color": [{ "mask-l-from":
|
|
3917
|
-
"mask-image-l-to-color": [{ "mask-l-to":
|
|
3916
|
+
"mask-image-l-from-color": [{ "mask-l-from": M() }],
|
|
3917
|
+
"mask-image-l-to-color": [{ "mask-l-to": M() }],
|
|
3918
3918
|
"mask-image-x-from-pos": [{ "mask-x-from": B() }],
|
|
3919
3919
|
"mask-image-x-to-pos": [{ "mask-x-to": B() }],
|
|
3920
|
-
"mask-image-x-from-color": [{ "mask-x-from":
|
|
3921
|
-
"mask-image-x-to-color": [{ "mask-x-to":
|
|
3920
|
+
"mask-image-x-from-color": [{ "mask-x-from": M() }],
|
|
3921
|
+
"mask-image-x-to-color": [{ "mask-x-to": M() }],
|
|
3922
3922
|
"mask-image-y-from-pos": [{ "mask-y-from": B() }],
|
|
3923
3923
|
"mask-image-y-to-pos": [{ "mask-y-to": B() }],
|
|
3924
|
-
"mask-image-y-from-color": [{ "mask-y-from":
|
|
3925
|
-
"mask-image-y-to-color": [{ "mask-y-to":
|
|
3924
|
+
"mask-image-y-from-color": [{ "mask-y-from": M() }],
|
|
3925
|
+
"mask-image-y-to-color": [{ "mask-y-to": M() }],
|
|
3926
3926
|
"mask-image-radial": [{ "mask-radial": [X, Y] }],
|
|
3927
3927
|
"mask-image-radial-from-pos": [{ "mask-radial-from": B() }],
|
|
3928
3928
|
"mask-image-radial-to-pos": [{ "mask-radial-to": B() }],
|
|
3929
|
-
"mask-image-radial-from-color": [{ "mask-radial-from":
|
|
3930
|
-
"mask-image-radial-to-color": [{ "mask-radial-to":
|
|
3929
|
+
"mask-image-radial-from-color": [{ "mask-radial-from": M() }],
|
|
3930
|
+
"mask-image-radial-to-color": [{ "mask-radial-to": M() }],
|
|
3931
3931
|
"mask-image-radial-shape": [{ "mask-radial": ["circle", "ellipse"] }],
|
|
3932
3932
|
"mask-image-radial-size": [{ "mask-radial": [{
|
|
3933
3933
|
closest: ["side", "corner"],
|
|
@@ -3937,8 +3937,8 @@ var gi = (e, t) => {
|
|
|
3937
3937
|
"mask-image-conic-pos": [{ "mask-conic": [aa] }],
|
|
3938
3938
|
"mask-image-conic-from-pos": [{ "mask-conic-from": B() }],
|
|
3939
3939
|
"mask-image-conic-to-pos": [{ "mask-conic-to": B() }],
|
|
3940
|
-
"mask-image-conic-from-color": [{ "mask-conic-from":
|
|
3941
|
-
"mask-image-conic-to-color": [{ "mask-conic-to":
|
|
3940
|
+
"mask-image-conic-from-color": [{ "mask-conic-from": M() }],
|
|
3941
|
+
"mask-image-conic-to-color": [{ "mask-conic-to": M() }],
|
|
3942
3942
|
"mask-mode": [{ mask: [
|
|
3943
3943
|
"alpha",
|
|
3944
3944
|
"luminance",
|
|
@@ -3952,9 +3952,9 @@ var gi = (e, t) => {
|
|
|
3952
3952
|
"stroke",
|
|
3953
3953
|
"view"
|
|
3954
3954
|
] }],
|
|
3955
|
-
"mask-position": [{ mask:
|
|
3956
|
-
"mask-repeat": [{ mask:
|
|
3957
|
-
"mask-size": [{ mask:
|
|
3955
|
+
"mask-position": [{ mask: N() }],
|
|
3956
|
+
"mask-repeat": [{ mask: P() }],
|
|
3957
|
+
"mask-size": [{ mask: F() }],
|
|
3958
3958
|
"mask-type": [{ "mask-type": ["alpha", "luminance"] }],
|
|
3959
3959
|
"mask-image": [{ mask: [
|
|
3960
3960
|
"none",
|
|
@@ -3985,7 +3985,7 @@ var gi = (e, t) => {
|
|
|
3985
3985
|
ka,
|
|
3986
3986
|
Ca
|
|
3987
3987
|
] }],
|
|
3988
|
-
"drop-shadow-color": [{ "drop-shadow":
|
|
3988
|
+
"drop-shadow-color": [{ "drop-shadow": M() }],
|
|
3989
3989
|
grayscale: [{ grayscale: [
|
|
3990
3990
|
"",
|
|
3991
3991
|
aa,
|
|
@@ -4145,9 +4145,9 @@ var gi = (e, t) => {
|
|
|
4145
4145
|
X,
|
|
4146
4146
|
Y
|
|
4147
4147
|
] }],
|
|
4148
|
-
accent: [{ accent:
|
|
4148
|
+
accent: [{ accent: M() }],
|
|
4149
4149
|
appearance: [{ appearance: ["none", "auto"] }],
|
|
4150
|
-
"caret-color": [{ caret:
|
|
4150
|
+
"caret-color": [{ caret: M() }],
|
|
4151
4151
|
"color-scheme": [{ scheme: [
|
|
4152
4152
|
"normal",
|
|
4153
4153
|
"dark",
|
|
@@ -4205,8 +4205,8 @@ var gi = (e, t) => {
|
|
|
4205
4205
|
"x"
|
|
4206
4206
|
] }],
|
|
4207
4207
|
"scroll-behavior": [{ scroll: ["auto", "smooth"] }],
|
|
4208
|
-
"scrollbar-thumb-color": [{ "scrollbar-thumb":
|
|
4209
|
-
"scrollbar-track-color": [{ "scrollbar-track":
|
|
4208
|
+
"scrollbar-thumb-color": [{ "scrollbar-thumb": M() }],
|
|
4209
|
+
"scrollbar-track-color": [{ "scrollbar-track": M() }],
|
|
4210
4210
|
"scrollbar-gutter": [{ "scrollbar-gutter": [
|
|
4211
4211
|
"auto",
|
|
4212
4212
|
"stable",
|
|
@@ -4283,14 +4283,14 @@ var gi = (e, t) => {
|
|
|
4283
4283
|
X,
|
|
4284
4284
|
Y
|
|
4285
4285
|
] }],
|
|
4286
|
-
fill: [{ fill: ["none", ...
|
|
4286
|
+
fill: [{ fill: ["none", ...M()] }],
|
|
4287
4287
|
"stroke-w": [{ stroke: [
|
|
4288
4288
|
aa,
|
|
4289
4289
|
wa,
|
|
4290
4290
|
_a,
|
|
4291
4291
|
va
|
|
4292
4292
|
] }],
|
|
4293
|
-
stroke: [{ stroke: ["none", ...
|
|
4293
|
+
stroke: [{ stroke: ["none", ...M()] }],
|
|
4294
4294
|
"forced-color-adjust": [{ "forced-color-adjust": ["auto", "none"] }]
|
|
4295
4295
|
},
|
|
4296
4296
|
conflictingClassGroups: {
|
|
@@ -4692,7 +4692,7 @@ function po({ label: e, values: t, chosen: n, onChange: r }) {
|
|
|
4692
4692
|
className: "truncate",
|
|
4693
4693
|
children: i
|
|
4694
4694
|
}),
|
|
4695
|
-
/* @__PURE__ */ V(
|
|
4695
|
+
/* @__PURE__ */ V(P, { className: "h-3 w-3 shrink-0 text-foreground-subtle" })
|
|
4696
4696
|
]
|
|
4697
4697
|
}), /* @__PURE__ */ H(Ka, {
|
|
4698
4698
|
className: "max-h-56 overflow-y-auto",
|
|
@@ -4773,27 +4773,27 @@ function go({ field: e, value: t, onChange: n, disabled: r, translationFn: i })
|
|
|
4773
4773
|
O,
|
|
4774
4774
|
o,
|
|
4775
4775
|
e.suggestLocation
|
|
4776
|
-
]), ee = h(() => [...k.suggested, ...k.others], [k]),
|
|
4776
|
+
]), ee = h(() => [...k.suggested, ...k.others], [k]), A = (t) => {
|
|
4777
4777
|
if (!_) if (g.includes(t)) n(g.filter((e) => e !== t));
|
|
4778
4778
|
else {
|
|
4779
4779
|
if (e.maxItems !== void 0 && g.length >= e.maxItems) return;
|
|
4780
4780
|
n([...g, t]);
|
|
4781
4781
|
}
|
|
4782
|
-
},
|
|
4782
|
+
}, te = (e) => {
|
|
4783
4783
|
if (e.key === "ArrowDown") e.preventDefault(), S(!0), w((e) => ee.length === 0 ? 0 : (e + 1) % ee.length);
|
|
4784
4784
|
else if (e.key === "ArrowUp") e.preventDefault(), S(!0), w((e) => ee.length === 0 ? 0 : (e - 1 + ee.length) % ee.length);
|
|
4785
4785
|
else if (e.key === "Enter") {
|
|
4786
4786
|
e.preventDefault();
|
|
4787
4787
|
let t = ee[C];
|
|
4788
|
-
t &&
|
|
4788
|
+
t && A(t.value);
|
|
4789
4789
|
} else e.key === "Escape" ? S(!1) : e.key === "Backspace" && y === "" && g.length > 0 && n(g.slice(0, -1));
|
|
4790
|
-
},
|
|
4790
|
+
}, ne = Bu(e.label, i), j = Bu(e.description, i);
|
|
4791
4791
|
return /* @__PURE__ */ H("div", {
|
|
4792
4792
|
className: "min-w-0",
|
|
4793
4793
|
children: [
|
|
4794
|
-
|
|
4794
|
+
ne !== void 0 && ne !== "" && /* @__PURE__ */ V("label", {
|
|
4795
4795
|
className: oo,
|
|
4796
|
-
children:
|
|
4796
|
+
children: ne
|
|
4797
4797
|
}),
|
|
4798
4798
|
D.length > 0 && /* @__PURE__ */ V("div", {
|
|
4799
4799
|
className: "flex flex-wrap gap-1 mb-1.5",
|
|
@@ -4806,7 +4806,7 @@ function go({ field: e, value: t, onChange: n, disabled: r, translationFn: i })
|
|
|
4806
4806
|
type: "button",
|
|
4807
4807
|
className: "shrink-0 hover:text-danger",
|
|
4808
4808
|
"aria-label": `Remove ${e.label}`,
|
|
4809
|
-
onClick: () =>
|
|
4809
|
+
onClick: () => A(e.value),
|
|
4810
4810
|
children: /* @__PURE__ */ V(Vr, { className: "h-2.5 w-2.5" })
|
|
4811
4811
|
})]
|
|
4812
4812
|
}, e.value))
|
|
@@ -4853,9 +4853,9 @@ function go({ field: e, value: t, onChange: n, disabled: r, translationFn: i })
|
|
|
4853
4853
|
onBlur: () => {
|
|
4854
4854
|
E.current = setTimeout(() => S(!1), 120);
|
|
4855
4855
|
},
|
|
4856
|
-
onKeyDown:
|
|
4856
|
+
onKeyDown: te
|
|
4857
4857
|
}),
|
|
4858
|
-
/* @__PURE__ */ V(
|
|
4858
|
+
/* @__PURE__ */ V(P, {
|
|
4859
4859
|
className: "h-3.5 w-3.5 shrink-0 cursor-pointer text-foreground-subtle",
|
|
4860
4860
|
onMouseDown: (e) => {
|
|
4861
4861
|
e.preventDefault(), E.current && clearTimeout(E.current), S((e) => !e), T.current?.focus();
|
|
@@ -4889,7 +4889,7 @@ function go({ field: e, value: t, onChange: n, disabled: r, translationFn: i })
|
|
|
4889
4889
|
i ? "opacity-40 cursor-not-allowed" : "cursor-pointer"
|
|
4890
4890
|
].join(" "),
|
|
4891
4891
|
onMouseEnter: () => w(n),
|
|
4892
|
-
onClick: () =>
|
|
4892
|
+
onClick: () => A(t.value),
|
|
4893
4893
|
children: [/* @__PURE__ */ V("span", {
|
|
4894
4894
|
className: ["flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded border", r ? "border-primary bg-primary text-white" : "border-border"].join(" "),
|
|
4895
4895
|
children: r && /* @__PURE__ */ V(mt, { className: "h-2.5 w-2.5" })
|
|
@@ -4906,9 +4906,9 @@ function go({ field: e, value: t, onChange: n, disabled: r, translationFn: i })
|
|
|
4906
4906
|
})] }, t.value);
|
|
4907
4907
|
})
|
|
4908
4908
|
}),
|
|
4909
|
-
|
|
4909
|
+
j && /* @__PURE__ */ V("p", {
|
|
4910
4910
|
className: so,
|
|
4911
|
-
children:
|
|
4911
|
+
children: j
|
|
4912
4912
|
})
|
|
4913
4913
|
]
|
|
4914
4914
|
});
|
|
@@ -5113,7 +5113,7 @@ async function Uo(t, r, i) {
|
|
|
5113
5113
|
if (s) return s;
|
|
5114
5114
|
zo.has(t) || (Fo(), n([{
|
|
5115
5115
|
name: t,
|
|
5116
|
-
entry:
|
|
5116
|
+
entry: te(i),
|
|
5117
5117
|
type: "module"
|
|
5118
5118
|
}], { force: !1 }), zo.add(t));
|
|
5119
5119
|
let c = e(`${t}/${r.startsWith("./") ? r.slice(2) : r}`).then((e) => {
|
|
@@ -5233,14 +5233,14 @@ function Zo({ deviceId: e }) {
|
|
|
5233
5233
|
});
|
|
5234
5234
|
}, [t, u]);
|
|
5235
5235
|
let f = /* @__PURE__ */ V(It, { className: "h-3.5 w-3.5 text-foreground-subtle" });
|
|
5236
|
-
return n && !t ? /* @__PURE__ */ V(
|
|
5236
|
+
return n && !t ? /* @__PURE__ */ V(M, {
|
|
5237
5237
|
title: "Autotrack",
|
|
5238
5238
|
icon: f,
|
|
5239
5239
|
children: /* @__PURE__ */ H("div", {
|
|
5240
5240
|
className: "flex items-center gap-2 text-[10.5px] text-foreground-subtle",
|
|
5241
5241
|
children: [/* @__PURE__ */ V(gn, { className: "h-3 w-3 animate-spin" }), "Loading autotrack…"]
|
|
5242
5242
|
})
|
|
5243
|
-
}) : /* @__PURE__ */ H(
|
|
5243
|
+
}) : /* @__PURE__ */ H(M, {
|
|
5244
5244
|
title: "Autotrack",
|
|
5245
5245
|
icon: f,
|
|
5246
5246
|
headerRight: /* @__PURE__ */ H("button", {
|
|
@@ -5569,25 +5569,25 @@ function vs({ deviceId: e }) {
|
|
|
5569
5569
|
}
|
|
5570
5570
|
return 16 / 9;
|
|
5571
5571
|
}, [r]);
|
|
5572
|
-
if (r === void 0) return /* @__PURE__ */ V(
|
|
5572
|
+
if (r === void 0) return /* @__PURE__ */ V(M, {
|
|
5573
5573
|
title: "Grid layout",
|
|
5574
|
-
icon: /* @__PURE__ */ V(
|
|
5574
|
+
icon: /* @__PURE__ */ V(z, { className: "h-3.5 w-3.5" }),
|
|
5575
5575
|
children: /* @__PURE__ */ H("div", {
|
|
5576
5576
|
className: "flex items-center gap-2 text-[10.5px] text-foreground-subtle",
|
|
5577
5577
|
children: [/* @__PURE__ */ V(gn, { className: "h-3 w-3 animate-spin" }), " Loading the layout…"]
|
|
5578
5578
|
})
|
|
5579
5579
|
});
|
|
5580
|
-
if (r === "unreadable") return /* @__PURE__ */ V(
|
|
5580
|
+
if (r === "unreadable") return /* @__PURE__ */ V(M, {
|
|
5581
5581
|
title: "Grid layout",
|
|
5582
|
-
icon: /* @__PURE__ */ V(
|
|
5582
|
+
icon: /* @__PURE__ */ V(z, { className: "h-3.5 w-3.5" }),
|
|
5583
5583
|
children: /* @__PURE__ */ H("div", {
|
|
5584
5584
|
className: "flex items-center gap-2 text-[10.5px] text-danger",
|
|
5585
5585
|
children: [/* @__PURE__ */ V(yt, { className: "h-3 w-3" }), "The Camera Grids addon did not answer, so this layout is unknown — not empty."]
|
|
5586
5586
|
})
|
|
5587
5587
|
});
|
|
5588
|
-
if (r === null || a === null) return /* @__PURE__ */ V(
|
|
5588
|
+
if (r === null || a === null) return /* @__PURE__ */ V(M, {
|
|
5589
5589
|
title: "Grid layout",
|
|
5590
|
-
icon: /* @__PURE__ */ V(
|
|
5590
|
+
icon: /* @__PURE__ */ V(z, { className: "h-3.5 w-3.5" }),
|
|
5591
5591
|
children: /* @__PURE__ */ V("div", {
|
|
5592
5592
|
className: "text-[10.5px] text-foreground-subtle",
|
|
5593
5593
|
children: "This camera is not a grid."
|
|
@@ -5600,9 +5600,9 @@ function vs({ deviceId: e }) {
|
|
|
5600
5600
|
let n = (e.clientX - g.startX) / t.width, r = (e.clientY - g.startY) / t.height;
|
|
5601
5601
|
S(g.index, { cell: _s(g, n, r) });
|
|
5602
5602
|
};
|
|
5603
|
-
return /* @__PURE__ */ V(
|
|
5603
|
+
return /* @__PURE__ */ V(M, {
|
|
5604
5604
|
title: "Grid layout",
|
|
5605
|
-
icon: /* @__PURE__ */ V(
|
|
5605
|
+
icon: /* @__PURE__ */ V(z, { className: "h-3.5 w-3.5" }),
|
|
5606
5606
|
headerRight: /* @__PURE__ */ H("div", {
|
|
5607
5607
|
className: "flex items-center gap-1",
|
|
5608
5608
|
children: [/* @__PURE__ */ H("button", {
|
|
@@ -5775,7 +5775,7 @@ function ys({ offers: e, cameras: t, onToggle: n }) {
|
|
|
5775
5775
|
});
|
|
5776
5776
|
}
|
|
5777
5777
|
function bs({ cell: e, selected: t, onSelect: n, onDragStart: r }) {
|
|
5778
|
-
let { src: i } =
|
|
5778
|
+
let { src: i } = ne(e.deviceId, { width: 640 }), a = `${String(100 / e.source.width)}% ${String(100 / e.source.height)}%`, o = e.source.width >= 1 && e.source.height >= 1 ? "center" : `${String(e.source.x / Math.max(1e-6, 1 - e.source.width) * 100)}% ${String(e.source.y / Math.max(1e-6, 1 - e.source.height) * 100)}%`;
|
|
5779
5779
|
return /* @__PURE__ */ V("div", {
|
|
5780
5780
|
role: "presentation",
|
|
5781
5781
|
onPointerDown: (e) => {
|
|
@@ -5866,7 +5866,7 @@ function xs({ cell: e, index: t, cameras: n, onChange: r, onRemove: i }) {
|
|
|
5866
5866
|
});
|
|
5867
5867
|
}
|
|
5868
5868
|
function Ss({ deviceId: e, source: t, onChange: n }) {
|
|
5869
|
-
let { src: r } =
|
|
5869
|
+
let { src: r } = ne(e, { width: 640 }), [i, a] = l(null), [o, s] = l(null), c = (e) => {
|
|
5870
5870
|
if (i === null) return;
|
|
5871
5871
|
let t = e.currentTarget.getBoundingClientRect();
|
|
5872
5872
|
t.width === 0 || t.height === 0 || n(_s({
|
|
@@ -6102,7 +6102,7 @@ function As({ deviceId: e }) {
|
|
|
6102
6102
|
}
|
|
6103
6103
|
}
|
|
6104
6104
|
}, [r]), d = i?.items ?? [];
|
|
6105
|
-
return /* @__PURE__ */ V(
|
|
6105
|
+
return /* @__PURE__ */ V(M, {
|
|
6106
6106
|
title: "Consumables",
|
|
6107
6107
|
icon: /* @__PURE__ */ V(en, { className: "h-3.5 w-3.5 text-foreground-subtle" }),
|
|
6108
6108
|
bodyClassName: "p-3 overflow-y-auto",
|
|
@@ -6201,7 +6201,7 @@ function Ps(e, t, n) {
|
|
|
6201
6201
|
let E = o((e) => x(async () => i?.runAction({ actionId: e })), [i, x]), O = o((e) => x(async () => i?.playSound({ soundId: e })), [i, x]), k = o((e) => x(async () => i?.setLightOn({ on: e })), [i, x]), ee = o((e, t) => x(async () => i?.setLightMode(t === void 0 ? { mode: e } : {
|
|
6202
6202
|
mode: e,
|
|
6203
6203
|
level: t
|
|
6204
|
-
})), [i, x]),
|
|
6204
|
+
})), [i, x]), A = o((e) => x(async () => i?.setLightLevel({ level: e })), [i, x]);
|
|
6205
6205
|
return {
|
|
6206
6206
|
features: s,
|
|
6207
6207
|
actions: d,
|
|
@@ -6212,7 +6212,7 @@ function Ps(e, t, n) {
|
|
|
6212
6212
|
playSound: O,
|
|
6213
6213
|
setLightOn: k,
|
|
6214
6214
|
setLightMode: ee,
|
|
6215
|
-
setLightLevel:
|
|
6215
|
+
setLightLevel: A,
|
|
6216
6216
|
busy: p,
|
|
6217
6217
|
error: h,
|
|
6218
6218
|
driving: _
|
|
@@ -6244,7 +6244,7 @@ var Ls = [
|
|
|
6244
6244
|
{
|
|
6245
6245
|
direction: "left",
|
|
6246
6246
|
label: "Turn left",
|
|
6247
|
-
Icon:
|
|
6247
|
+
Icon: j
|
|
6248
6248
|
},
|
|
6249
6249
|
{
|
|
6250
6250
|
direction: "forward",
|
|
@@ -6291,7 +6291,7 @@ function Vs({ deviceId: e }) {
|
|
|
6291
6291
|
}
|
|
6292
6292
|
r.runAction(e.id);
|
|
6293
6293
|
};
|
|
6294
|
-
return /* @__PURE__ */ H(
|
|
6294
|
+
return /* @__PURE__ */ H(M, {
|
|
6295
6295
|
title: "Navigation",
|
|
6296
6296
|
icon: /* @__PURE__ */ V(Nn, { className: "h-3.5 w-3.5 text-foreground-subtle" }),
|
|
6297
6297
|
bodyClassName: "p-3 flex flex-col gap-3 overflow-y-auto",
|
|
@@ -6767,22 +6767,22 @@ function Ks({ direction: e, icon: t, disabled: n, className: r, variant: i, onMo
|
|
|
6767
6767
|
});
|
|
6768
6768
|
}
|
|
6769
6769
|
function qs({ controls: e, mode: t = "overlay", showPresets: n, showZoom: r = !0, showHome: i = !0, className: a }) {
|
|
6770
|
-
let { move: s, startContinuous: d, stopContinuous: f, zoom: p, goHome: m, homePreset: h, goToPreset: g, savePreset: _, updatePreset: y, deletePreset: b, presets: x, options: S, busy: C, error: w } = e, T = wo(), [E, D] = l(!1), [O, k] = l(""), ee = u(null),
|
|
6770
|
+
let { move: s, startContinuous: d, stopContinuous: f, zoom: p, goHome: m, homePreset: h, goToPreset: g, savePreset: _, updatePreset: y, deletePreset: b, presets: x, options: S, busy: C, error: w } = e, T = wo(), [E, D] = l(!1), [O, k] = l(""), ee = u(null), A = u(null), [te, ne] = l(null), j = t === "panel", re = r && (S?.hasZoom ?? !0), M = S?.supportsPresets ?? x.length > 0, N = (n ?? M) && M, F = j && (S?.supportsPresets ?? !1), I = S?.maxPresets !== void 0 && x.length >= S.maxPresets, L = o(async () => {
|
|
6771
6771
|
let e = O.trim();
|
|
6772
|
-
!e || C ||
|
|
6772
|
+
!e || C || I || await _(e) !== void 0 && k("");
|
|
6773
6773
|
}, [
|
|
6774
6774
|
O,
|
|
6775
6775
|
C,
|
|
6776
|
-
|
|
6776
|
+
I,
|
|
6777
6777
|
_
|
|
6778
|
-
]),
|
|
6778
|
+
]), R = o(async (e, t) => {
|
|
6779
6779
|
await T({
|
|
6780
6780
|
title: "Delete preset",
|
|
6781
6781
|
message: `Delete PTZ preset "${t}"? This removes it from the camera.`,
|
|
6782
6782
|
confirmLabel: "Delete",
|
|
6783
6783
|
variant: "danger"
|
|
6784
6784
|
}) && await b(e);
|
|
6785
|
-
}, [T, b]),
|
|
6785
|
+
}, [T, b]), z = o(async (e, t) => {
|
|
6786
6786
|
await T({
|
|
6787
6787
|
title: "Update preset",
|
|
6788
6788
|
message: `Overwrite preset "${t}" with the camera's current position?`,
|
|
@@ -6791,12 +6791,12 @@ function qs({ controls: e, mode: t = "overlay", showPresets: n, showZoom: r = !0
|
|
|
6791
6791
|
}, [T, y]);
|
|
6792
6792
|
c(() => {
|
|
6793
6793
|
if (!E) {
|
|
6794
|
-
|
|
6794
|
+
ne(null);
|
|
6795
6795
|
return;
|
|
6796
6796
|
}
|
|
6797
6797
|
let e = () => {
|
|
6798
6798
|
let e = ee.current?.getBoundingClientRect();
|
|
6799
|
-
e &&
|
|
6799
|
+
e && ne({
|
|
6800
6800
|
top: e.bottom + 4,
|
|
6801
6801
|
right: window.innerWidth - e.right
|
|
6802
6802
|
});
|
|
@@ -6808,7 +6808,7 @@ function qs({ controls: e, mode: t = "overlay", showPresets: n, showZoom: r = !0
|
|
|
6808
6808
|
if (!E) return;
|
|
6809
6809
|
let e = (e) => {
|
|
6810
6810
|
let t = e.target;
|
|
6811
|
-
|
|
6811
|
+
A.current?.contains(t) || ee.current?.contains(t) || D(!1);
|
|
6812
6812
|
}, t = (e) => {
|
|
6813
6813
|
e.key === "Escape" && D(!1);
|
|
6814
6814
|
};
|
|
@@ -6816,21 +6816,21 @@ function qs({ controls: e, mode: t = "overlay", showPresets: n, showZoom: r = !0
|
|
|
6816
6816
|
document.removeEventListener("mousedown", e), document.removeEventListener("keydown", t);
|
|
6817
6817
|
};
|
|
6818
6818
|
}, [E]);
|
|
6819
|
-
let ie =
|
|
6819
|
+
let ie = j ? "flex flex-col items-stretch gap-2 w-full h-full p-3" : "pointer-events-auto absolute top-3 right-3 z-10 flex flex-col items-end gap-2", B = Z(j ? "flex items-center gap-3 rounded-lg p-2" : "flex items-center gap-2 rounded-lg border border-white/30 bg-zinc-900/90 backdrop-blur-md p-2 shadow-lg shadow-black/40", C && "ring-1 ring-primary/40"), ae = j ? "h-9 w-9" : "h-7 w-7", oe = j ? "h-4 w-4" : "h-3.5 w-3.5", se = j ? "text-foreground hover:bg-surface-hover" : "text-white hover:bg-white/15", le = j ? "h-12 w-px bg-border mx-1" : "h-12 w-px bg-white/15 mx-1";
|
|
6820
6820
|
return /* @__PURE__ */ H("div", {
|
|
6821
6821
|
className: Z(ie, a),
|
|
6822
6822
|
children: [w && /* @__PURE__ */ H("div", {
|
|
6823
6823
|
className: "rounded bg-danger/90 px-2 py-1 text-[10px] font-medium text-white shadow-lg max-w-[200px] self-center",
|
|
6824
6824
|
children: ["PTZ: ", w]
|
|
6825
6825
|
}), /* @__PURE__ */ H("div", {
|
|
6826
|
-
className: Z(B,
|
|
6826
|
+
className: Z(B, j && "justify-center"),
|
|
6827
6827
|
children: [
|
|
6828
6828
|
/* @__PURE__ */ H("div", {
|
|
6829
6829
|
className: "grid grid-cols-3 gap-0.5",
|
|
6830
6830
|
children: [
|
|
6831
6831
|
/* @__PURE__ */ V("span", {
|
|
6832
6832
|
"aria-hidden": !0,
|
|
6833
|
-
className:
|
|
6833
|
+
className: j ? "h-9 w-9" : "h-7 w-7"
|
|
6834
6834
|
}),
|
|
6835
6835
|
/* @__PURE__ */ V(Ks, {
|
|
6836
6836
|
direction: "up",
|
|
@@ -6842,7 +6842,7 @@ function qs({ controls: e, mode: t = "overlay", showPresets: n, showZoom: r = !0
|
|
|
6842
6842
|
}),
|
|
6843
6843
|
/* @__PURE__ */ V("span", {
|
|
6844
6844
|
"aria-hidden": !0,
|
|
6845
|
-
className:
|
|
6845
|
+
className: j ? "h-9 w-9" : "h-7 w-7"
|
|
6846
6846
|
}),
|
|
6847
6847
|
/* @__PURE__ */ V(Ks, {
|
|
6848
6848
|
direction: "left",
|
|
@@ -6854,7 +6854,7 @@ function qs({ controls: e, mode: t = "overlay", showPresets: n, showZoom: r = !0
|
|
|
6854
6854
|
}),
|
|
6855
6855
|
/* @__PURE__ */ V("span", {
|
|
6856
6856
|
"aria-hidden": !0,
|
|
6857
|
-
className:
|
|
6857
|
+
className: j ? "h-9 w-9" : "h-7 w-7"
|
|
6858
6858
|
}),
|
|
6859
6859
|
/* @__PURE__ */ V(Ks, {
|
|
6860
6860
|
direction: "right",
|
|
@@ -6866,7 +6866,7 @@ function qs({ controls: e, mode: t = "overlay", showPresets: n, showZoom: r = !0
|
|
|
6866
6866
|
}),
|
|
6867
6867
|
/* @__PURE__ */ V("span", {
|
|
6868
6868
|
"aria-hidden": !0,
|
|
6869
|
-
className:
|
|
6869
|
+
className: j ? "h-9 w-9" : "h-7 w-7"
|
|
6870
6870
|
}),
|
|
6871
6871
|
/* @__PURE__ */ V(Ks, {
|
|
6872
6872
|
direction: "down",
|
|
@@ -6878,14 +6878,14 @@ function qs({ controls: e, mode: t = "overlay", showPresets: n, showZoom: r = !0
|
|
|
6878
6878
|
}),
|
|
6879
6879
|
/* @__PURE__ */ V("span", {
|
|
6880
6880
|
"aria-hidden": !0,
|
|
6881
|
-
className:
|
|
6881
|
+
className: j ? "h-9 w-9" : "h-7 w-7"
|
|
6882
6882
|
})
|
|
6883
6883
|
]
|
|
6884
6884
|
}),
|
|
6885
|
-
(
|
|
6885
|
+
(re || i) && /* @__PURE__ */ V("div", { className: le }),
|
|
6886
6886
|
/* @__PURE__ */ H("div", {
|
|
6887
6887
|
className: "flex flex-col gap-0.5",
|
|
6888
|
-
children: [
|
|
6888
|
+
children: [re && /* @__PURE__ */ H(U, { children: [/* @__PURE__ */ V("button", {
|
|
6889
6889
|
type: "button",
|
|
6890
6890
|
onClick: () => p("in"),
|
|
6891
6891
|
disabled: C,
|
|
@@ -6908,58 +6908,58 @@ function qs({ controls: e, mode: t = "overlay", showPresets: n, showZoom: r = !0
|
|
|
6908
6908
|
children: /* @__PURE__ */ V(sn, { className: oe })
|
|
6909
6909
|
})]
|
|
6910
6910
|
}),
|
|
6911
|
-
|
|
6911
|
+
N && /* @__PURE__ */ H("div", {
|
|
6912
6912
|
className: "relative",
|
|
6913
6913
|
children: [/* @__PURE__ */ H("button", {
|
|
6914
6914
|
ref: ee,
|
|
6915
6915
|
type: "button",
|
|
6916
6916
|
onClick: () => D((e) => !e),
|
|
6917
6917
|
disabled: C,
|
|
6918
|
-
className: Z("flex items-center gap-1 rounded px-2 text-[10px] disabled:opacity-40",
|
|
6918
|
+
className: Z("flex items-center gap-1 rounded px-2 text-[10px] disabled:opacity-40", j ? "h-9 text-foreground hover:bg-surface-hover" : "h-7 text-white hover:bg-white/15"),
|
|
6919
6919
|
title: "Presets",
|
|
6920
|
-
children: ["Presets", /* @__PURE__ */ V(
|
|
6921
|
-
}), E &&
|
|
6922
|
-
ref:
|
|
6920
|
+
children: ["Presets", /* @__PURE__ */ V(P, { className: Z("h-3 w-3 transition-transform", E && "rotate-180") })]
|
|
6921
|
+
}), E && te && ce(/* @__PURE__ */ H("div", {
|
|
6922
|
+
ref: A,
|
|
6923
6923
|
style: {
|
|
6924
6924
|
position: "fixed",
|
|
6925
|
-
top:
|
|
6926
|
-
right:
|
|
6925
|
+
top: te.top,
|
|
6926
|
+
right: te.right,
|
|
6927
6927
|
zIndex: 60
|
|
6928
6928
|
},
|
|
6929
|
-
className: Z("rounded-lg shadow-xl py-1",
|
|
6929
|
+
className: Z("rounded-lg shadow-xl py-1", F ? "min-w-[220px]" : "min-w-[140px]", j ? "bg-surface border border-border" : "border border-white/30 bg-zinc-900/95 backdrop-blur-md"),
|
|
6930
6930
|
children: [
|
|
6931
6931
|
x.length === 0 && /* @__PURE__ */ V("div", {
|
|
6932
|
-
className: Z("px-3 py-1.5 text-[10px]",
|
|
6932
|
+
className: Z("px-3 py-1.5 text-[10px]", j ? "text-foreground-subtle" : "text-white/60"),
|
|
6933
6933
|
children: "No presets yet"
|
|
6934
6934
|
}),
|
|
6935
6935
|
x.map((e) => /* @__PURE__ */ H("div", {
|
|
6936
|
-
className: Z("group flex items-center",
|
|
6936
|
+
className: Z("group flex items-center", j ? "hover:bg-surface-hover" : "hover:bg-white/15"),
|
|
6937
6937
|
children: [/* @__PURE__ */ V("button", {
|
|
6938
6938
|
type: "button",
|
|
6939
6939
|
onClick: () => {
|
|
6940
6940
|
g(e.id), D(!1);
|
|
6941
6941
|
},
|
|
6942
6942
|
disabled: C,
|
|
6943
|
-
className: Z("flex-1 px-3 py-1.5 text-left text-[10px] disabled:opacity-40",
|
|
6943
|
+
className: Z("flex-1 px-3 py-1.5 text-left text-[10px] disabled:opacity-40", j ? "text-foreground" : "text-white"),
|
|
6944
6944
|
children: e.name || e.id
|
|
6945
|
-
}),
|
|
6945
|
+
}), F && e.writable && /* @__PURE__ */ H(U, { children: [/* @__PURE__ */ V("button", {
|
|
6946
6946
|
type: "button",
|
|
6947
|
-
onClick: () => void
|
|
6947
|
+
onClick: () => void z(e.id, e.name || e.id),
|
|
6948
6948
|
disabled: C,
|
|
6949
6949
|
title: `Overwrite "${e.name || e.id}" with current position`,
|
|
6950
6950
|
className: Z("flex h-5 w-5 shrink-0 items-center justify-center rounded", "text-foreground-subtle hover:bg-primary/15 hover:text-primary disabled:opacity-40"),
|
|
6951
6951
|
children: /* @__PURE__ */ V(It, { className: "h-3 w-3" })
|
|
6952
6952
|
}), /* @__PURE__ */ V("button", {
|
|
6953
6953
|
type: "button",
|
|
6954
|
-
onClick: () => void
|
|
6954
|
+
onClick: () => void R(e.id, e.name || e.id),
|
|
6955
6955
|
disabled: C,
|
|
6956
6956
|
title: `Delete preset ${e.name || e.id}`,
|
|
6957
6957
|
className: Z("mr-1 flex h-5 w-5 shrink-0 items-center justify-center rounded", "text-foreground-subtle hover:bg-danger/15 hover:text-danger disabled:opacity-40"),
|
|
6958
6958
|
children: /* @__PURE__ */ V(Vr, { className: "h-3 w-3" })
|
|
6959
6959
|
})] })]
|
|
6960
6960
|
}, e.id)),
|
|
6961
|
-
|
|
6962
|
-
x.length > 0 && /* @__PURE__ */ V("div", { className: Z("my-1 h-px",
|
|
6961
|
+
F && /* @__PURE__ */ H(U, { children: [
|
|
6962
|
+
x.length > 0 && /* @__PURE__ */ V("div", { className: Z("my-1 h-px", j ? "bg-border" : "bg-white/15") }),
|
|
6963
6963
|
/* @__PURE__ */ H("div", {
|
|
6964
6964
|
className: "flex items-center gap-1 px-2 py-1",
|
|
6965
6965
|
children: [/* @__PURE__ */ V("input", {
|
|
@@ -6967,23 +6967,23 @@ function qs({ controls: e, mode: t = "overlay", showPresets: n, showZoom: r = !0
|
|
|
6967
6967
|
value: O,
|
|
6968
6968
|
onChange: (e) => k(e.target.value),
|
|
6969
6969
|
onKeyDown: (e) => {
|
|
6970
|
-
e.key === "Enter" &&
|
|
6970
|
+
e.key === "Enter" && L();
|
|
6971
6971
|
},
|
|
6972
|
-
disabled: C ||
|
|
6972
|
+
disabled: C || I,
|
|
6973
6973
|
placeholder: "New preset name",
|
|
6974
6974
|
maxLength: 64,
|
|
6975
|
-
className: Z("min-w-0 flex-1 rounded border px-2 py-1 text-[11px]", "focus:outline-none focus:ring-1 focus:ring-primary/50 disabled:opacity-40",
|
|
6975
|
+
className: Z("min-w-0 flex-1 rounded border px-2 py-1 text-[11px]", "focus:outline-none focus:ring-1 focus:ring-primary/50 disabled:opacity-40", j ? "border-border bg-surface text-foreground placeholder:text-foreground-subtle" : "border-white/30 bg-zinc-800 text-white placeholder:text-white/40")
|
|
6976
6976
|
}), /* @__PURE__ */ V("button", {
|
|
6977
6977
|
type: "button",
|
|
6978
|
-
onClick: () => void
|
|
6979
|
-
disabled: C ||
|
|
6980
|
-
title:
|
|
6978
|
+
onClick: () => void L(),
|
|
6979
|
+
disabled: C || I || O.trim().length === 0,
|
|
6980
|
+
title: I ? `Camera preset limit reached (${S?.maxPresets})` : "Save current position as a new preset",
|
|
6981
6981
|
className: Z("flex h-7 w-7 shrink-0 items-center justify-center rounded", "bg-primary/15 text-primary hover:bg-primary/25 disabled:opacity-40"),
|
|
6982
6982
|
children: /* @__PURE__ */ V(Hn, { className: "h-3.5 w-3.5" })
|
|
6983
6983
|
})]
|
|
6984
6984
|
}),
|
|
6985
|
-
|
|
6986
|
-
className: Z("block px-2 pb-1 text-[10px]",
|
|
6985
|
+
I && /* @__PURE__ */ H("span", {
|
|
6986
|
+
className: Z("block px-2 pb-1 text-[10px]", j ? "text-foreground-subtle" : "text-white/60"),
|
|
6987
6987
|
children: [
|
|
6988
6988
|
"Preset limit reached (",
|
|
6989
6989
|
S?.maxPresets,
|
|
@@ -7055,7 +7055,7 @@ function Ys({ deviceId: e }) {
|
|
|
7055
7055
|
]
|
|
7056
7056
|
});
|
|
7057
7057
|
let i = r.options?.hasAutofocus === !0;
|
|
7058
|
-
return /* @__PURE__ */ H(
|
|
7058
|
+
return /* @__PURE__ */ H(M, {
|
|
7059
7059
|
title: "PTZ",
|
|
7060
7060
|
icon: /* @__PURE__ */ V(jn, { className: "h-3.5 w-3.5 text-foreground-subtle" }),
|
|
7061
7061
|
bodyClassName: "p-3 flex flex-col overflow-y-auto",
|
|
@@ -8184,7 +8184,7 @@ function Zc({ day: e, onDayChange: t, view: n, dayBounds: r, onViewChange: i })
|
|
|
8184
8184
|
title: "Later (pan forward)",
|
|
8185
8185
|
"aria-label": "Pan later",
|
|
8186
8186
|
className: "rounded p-1 text-foreground-subtle transition-colors hover:bg-background/60 hover:text-foreground disabled:cursor-not-allowed disabled:opacity-40",
|
|
8187
|
-
children: /* @__PURE__ */ V(
|
|
8187
|
+
children: /* @__PURE__ */ V(re, { size: 14 })
|
|
8188
8188
|
}),
|
|
8189
8189
|
/* @__PURE__ */ V("span", {
|
|
8190
8190
|
className: "mx-0.5 h-3 w-px bg-border",
|
|
@@ -8260,36 +8260,36 @@ function ol({ deviceId: e }) {
|
|
|
8260
8260
|
}
|
|
8261
8261
|
}), [g]), T = u(_);
|
|
8262
8262
|
T.current = _;
|
|
8263
|
-
let { state: D, beginScrub: O, updateScrub: k, endScrub: ee, seek:
|
|
8263
|
+
let { state: D, beginScrub: O, updateScrub: k, endScrub: ee, seek: A, setPlayhead: te, reset: ne } = Cc(w, o(() => T.current === "live", []));
|
|
8264
8264
|
v(() => {
|
|
8265
|
-
y !== null &&
|
|
8266
|
-
}, [y,
|
|
8267
|
-
(!m.channelOpen || _ === "live") &&
|
|
8265
|
+
y !== null && te(y);
|
|
8266
|
+
}, [y, te]), v(() => {
|
|
8267
|
+
(!m.channelOpen || _ === "live") && ne();
|
|
8268
8268
|
}, [
|
|
8269
8269
|
m.channelOpen,
|
|
8270
8270
|
_,
|
|
8271
|
-
|
|
8271
|
+
ne
|
|
8272
8272
|
]);
|
|
8273
|
-
let
|
|
8274
|
-
g({ t: "goLive" }),
|
|
8275
|
-
}, [g,
|
|
8273
|
+
let j = o(() => {
|
|
8274
|
+
g({ t: "goLive" }), ne();
|
|
8275
|
+
}, [g, ne]), re = o(() => {
|
|
8276
8276
|
g({
|
|
8277
8277
|
t: "setRate",
|
|
8278
8278
|
rate: +(T.current === "paused")
|
|
8279
8279
|
});
|
|
8280
|
-
}, [g]), [
|
|
8281
|
-
|
|
8280
|
+
}, [g]), [M, N] = l(() => new Set($c)), P = o((e) => {
|
|
8281
|
+
N((t) => {
|
|
8282
8282
|
let n = new Set(t);
|
|
8283
8283
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
8284
8284
|
});
|
|
8285
|
-
}, []), [
|
|
8286
|
-
|
|
8285
|
+
}, []), [F, I] = l(el), L = o(() => {
|
|
8286
|
+
I((e) => e + el);
|
|
8287
8287
|
}, []);
|
|
8288
8288
|
v(() => {
|
|
8289
|
-
|
|
8289
|
+
I(el);
|
|
8290
8290
|
}, [r]);
|
|
8291
|
-
let [
|
|
8292
|
-
|
|
8291
|
+
let [R, z] = l(() => /* @__PURE__ */ new Date()), [ie, B] = l(() => Pc(/* @__PURE__ */ new Date(), Date.now())), ae = h(() => Pc(R, Date.now()), [R]), oe = o((e) => {
|
|
8292
|
+
z(e), B(Pc(e, Date.now())), i(null);
|
|
8293
8293
|
}, []), U = o((e) => {
|
|
8294
8294
|
B(e), i(null);
|
|
8295
8295
|
}, []), se = u(null), ce = o((e) => {
|
|
@@ -8315,38 +8315,38 @@ function ol({ deviceId: e }) {
|
|
|
8315
8315
|
deviceId: e,
|
|
8316
8316
|
since: ge,
|
|
8317
8317
|
until: _e,
|
|
8318
|
-
limit:
|
|
8318
|
+
limit: F,
|
|
8319
8319
|
projection: "slim"
|
|
8320
|
-
}, { enabled: he &&
|
|
8320
|
+
}, { enabled: he && M.has("object") }), ye = ti({
|
|
8321
8321
|
deviceId: e,
|
|
8322
8322
|
since: ge,
|
|
8323
8323
|
until: _e,
|
|
8324
|
-
limit:
|
|
8324
|
+
limit: F,
|
|
8325
8325
|
projection: "slim"
|
|
8326
|
-
}, { enabled: he &&
|
|
8326
|
+
}, { enabled: he && M.has("motion") }), G = ri({
|
|
8327
8327
|
deviceId: e,
|
|
8328
8328
|
since: ge,
|
|
8329
8329
|
until: _e,
|
|
8330
|
-
limit:
|
|
8330
|
+
limit: F,
|
|
8331
8331
|
projection: "slim"
|
|
8332
|
-
}, { enabled: he &&
|
|
8332
|
+
}, { enabled: he && M.has("audio") }), be = h(() => {
|
|
8333
8333
|
if (!W) return [];
|
|
8334
8334
|
let e = [];
|
|
8335
|
-
if (
|
|
8335
|
+
if (M.has("object")) for (let t of ve.data ?? []) e.push({
|
|
8336
8336
|
id: String(t.id),
|
|
8337
8337
|
timestamp: t.timestamp,
|
|
8338
8338
|
kind: "object",
|
|
8339
8339
|
label: t.label ?? t.className,
|
|
8340
8340
|
mediaUrl: t.mediaUrl
|
|
8341
8341
|
});
|
|
8342
|
-
if (
|
|
8342
|
+
if (M.has("motion")) for (let t of ye.data ?? []) e.push({
|
|
8343
8343
|
id: String(t.id),
|
|
8344
8344
|
timestamp: t.timestamp,
|
|
8345
8345
|
kind: "motion",
|
|
8346
8346
|
label: `Motion (${t.regionCount})`,
|
|
8347
8347
|
mediaUrl: t.mediaUrl
|
|
8348
8348
|
});
|
|
8349
|
-
if (
|
|
8349
|
+
if (M.has("audio")) for (let t of G.data ?? []) e.push({
|
|
8350
8350
|
id: String(t.id),
|
|
8351
8351
|
timestamp: t.timestamp,
|
|
8352
8352
|
kind: "audio",
|
|
@@ -8356,16 +8356,16 @@ function ol({ deviceId: e }) {
|
|
|
8356
8356
|
return e.toSorted((e, t) => t.timestamp - e.timestamp);
|
|
8357
8357
|
}, [
|
|
8358
8358
|
W,
|
|
8359
|
-
|
|
8359
|
+
M,
|
|
8360
8360
|
ve.data,
|
|
8361
8361
|
ye.data,
|
|
8362
8362
|
G.data
|
|
8363
|
-
]), xe = h(() => !!(
|
|
8364
|
-
|
|
8363
|
+
]), xe = h(() => !!(M.has("object") && (ve.data?.length ?? 0) === F || M.has("motion") && (ye.data?.length ?? 0) === F || M.has("audio") && (G.data?.length ?? 0) === F), [
|
|
8364
|
+
M,
|
|
8365
8365
|
ve.data,
|
|
8366
8366
|
ye.data,
|
|
8367
8367
|
G.data,
|
|
8368
|
-
|
|
8368
|
+
F
|
|
8369
8369
|
]), Se = o(async (r, i, a, o, c) => {
|
|
8370
8370
|
d(r), p(null);
|
|
8371
8371
|
try {
|
|
@@ -8391,7 +8391,7 @@ function ol({ deviceId: e }) {
|
|
|
8391
8391
|
let t = Mc(e, pe);
|
|
8392
8392
|
if (!t) return;
|
|
8393
8393
|
if (C.current) {
|
|
8394
|
-
|
|
8394
|
+
A(t.fromMs, "timeline");
|
|
8395
8395
|
return;
|
|
8396
8396
|
}
|
|
8397
8397
|
let n = `Recording · ${new Date(t.fromMs).toLocaleString(void 0, {
|
|
@@ -8404,7 +8404,7 @@ function ol({ deviceId: e }) {
|
|
|
8404
8404
|
}, [
|
|
8405
8405
|
pe,
|
|
8406
8406
|
Se,
|
|
8407
|
-
|
|
8407
|
+
A
|
|
8408
8408
|
]), we = o(() => {
|
|
8409
8409
|
O("timeline");
|
|
8410
8410
|
}, [O]), Te = o((e) => {
|
|
@@ -8413,7 +8413,7 @@ function ol({ deviceId: e }) {
|
|
|
8413
8413
|
ee(Mc(e, pe)?.fromMs ?? e, "timeline");
|
|
8414
8414
|
}, [pe, ee]), De = o((e) => {
|
|
8415
8415
|
if (C.current) {
|
|
8416
|
-
|
|
8416
|
+
A(e.timestamp - nl, "timeline");
|
|
8417
8417
|
return;
|
|
8418
8418
|
}
|
|
8419
8419
|
let t = `${e.label} · ${new Date(e.timestamp).toLocaleTimeString(void 0, {
|
|
@@ -8421,7 +8421,7 @@ function ol({ deviceId: e }) {
|
|
|
8421
8421
|
minute: "2-digit"
|
|
8422
8422
|
})}`;
|
|
8423
8423
|
Se(`${e.kind}:${e.id}`, e.timestamp - nl, e.timestamp + rl, t, e.timestamp);
|
|
8424
|
-
}, [Se,
|
|
8424
|
+
}, [Se, A]), Oe = o((e) => {
|
|
8425
8425
|
i((t) => t === e ? null : e);
|
|
8426
8426
|
}, []), ke = ue.isLoading, Ae = de.isLoading, je = (ve.isLoading || ye.isLoading || G.isLoading) && he, Me = h(() => Bc(ie.fromMs, ie.toMs, 5), [ie.fromMs, ie.toMs]), Ne = S ? D.scrubbing ? D.scrubEpoch : D.playheadEpoch : a, Pe = S && (_ === "playing" || _ === "paused");
|
|
8427
8427
|
return /* @__PURE__ */ H("div", {
|
|
@@ -8436,7 +8436,7 @@ function ol({ deviceId: e }) {
|
|
|
8436
8436
|
message: f
|
|
8437
8437
|
}) : null,
|
|
8438
8438
|
/* @__PURE__ */ V(Zc, {
|
|
8439
|
-
day:
|
|
8439
|
+
day: R,
|
|
8440
8440
|
onDayChange: oe,
|
|
8441
8441
|
view: ie,
|
|
8442
8442
|
dayBounds: ae,
|
|
@@ -8458,7 +8458,7 @@ function ol({ deviceId: e }) {
|
|
|
8458
8458
|
Pe ? /* @__PURE__ */ H("button", {
|
|
8459
8459
|
type: "button",
|
|
8460
8460
|
"data-testid": "frame-push-rate-toggle",
|
|
8461
|
-
onClick:
|
|
8461
|
+
onClick: re,
|
|
8462
8462
|
className: "inline-flex items-center gap-1 rounded px-1.5 py-0.5 font-medium text-foreground-subtle transition-colors hover:bg-surface-hover hover:text-foreground",
|
|
8463
8463
|
title: _ === "paused" ? "Resume playback" : "Pause playback",
|
|
8464
8464
|
children: [V(_ === "paused" ? Vn : In, { className: "h-3 w-3" }), _ === "paused" ? "Resume" : "Pause"]
|
|
@@ -8466,7 +8466,7 @@ function ol({ deviceId: e }) {
|
|
|
8466
8466
|
S && _ !== "live" ? /* @__PURE__ */ H("button", {
|
|
8467
8467
|
type: "button",
|
|
8468
8468
|
"data-testid": "frame-push-go-live",
|
|
8469
|
-
onClick:
|
|
8469
|
+
onClick: j,
|
|
8470
8470
|
className: "inline-flex items-center gap-1 rounded bg-danger/10 px-1.5 py-0.5 font-medium text-danger transition-colors hover:bg-danger/20",
|
|
8471
8471
|
title: "Return to the live stream",
|
|
8472
8472
|
children: [/* @__PURE__ */ V(Gn, { className: "h-3 w-3" }), "Go live"]
|
|
@@ -8535,10 +8535,10 @@ function ol({ deviceId: e }) {
|
|
|
8535
8535
|
loading: je,
|
|
8536
8536
|
busyKey: c,
|
|
8537
8537
|
onPlay: De,
|
|
8538
|
-
enabledKinds:
|
|
8539
|
-
onToggleKind:
|
|
8538
|
+
enabledKinds: M,
|
|
8539
|
+
onToggleKind: P,
|
|
8540
8540
|
hasMore: xe,
|
|
8541
|
-
onLoadMore:
|
|
8541
|
+
onLoadMore: L
|
|
8542
8542
|
}) : /* @__PURE__ */ V("p", {
|
|
8543
8543
|
className: "text-[11px] text-foreground-subtle",
|
|
8544
8544
|
children: S ? "Click or drag the coverage bar to play from any point (frames play in the main player above), or click a density bar to browse that window’s events." : "Click the coverage bar to play from any point, or a density bar to browse that window’s events."
|
|
@@ -8577,7 +8577,7 @@ function ll({ deviceId: e }) {
|
|
|
8577
8577
|
}), _ = n.data ? _e.safeParse(n.data) : null, v = _?.success ? _.data : null, y = r.data ? ge.safeParse(r.data) : null, b = y?.success ? y.data : null, x = g.data?.ranges ?? [], S = x.reduce((e, t) => e + Math.max(0, t.endMs - t.startMs), 0), C = v?.enabled === !0 && v.activeMode === "continuous";
|
|
8578
8578
|
return /* @__PURE__ */ H("div", {
|
|
8579
8579
|
className: "space-y-3",
|
|
8580
|
-
children: [/* @__PURE__ */ V(
|
|
8580
|
+
children: [/* @__PURE__ */ V(M, {
|
|
8581
8581
|
title: "Settings",
|
|
8582
8582
|
icon: /* @__PURE__ */ V(er, { className: "h-3.5 w-3.5 text-foreground-subtle" }),
|
|
8583
8583
|
children: b ? /* @__PURE__ */ V(fc, {
|
|
@@ -8594,7 +8594,7 @@ function ll({ deviceId: e }) {
|
|
|
8594
8594
|
className: "px-1 py-2 text-xs text-foreground-subtle",
|
|
8595
8595
|
children: "Loading settings…"
|
|
8596
8596
|
})
|
|
8597
|
-
}), /* @__PURE__ */ V(
|
|
8597
|
+
}), /* @__PURE__ */ V(M, {
|
|
8598
8598
|
title: "Recording",
|
|
8599
8599
|
icon: /* @__PURE__ */ V(qt, { className: "h-3.5 w-3.5 text-foreground-subtle" }),
|
|
8600
8600
|
headerRight: /* @__PURE__ */ H("span", {
|
|
@@ -8617,18 +8617,18 @@ function ll({ deviceId: e }) {
|
|
|
8617
8617
|
/* @__PURE__ */ H("div", {
|
|
8618
8618
|
className: "grid grid-cols-1 gap-2 sm:grid-cols-3",
|
|
8619
8619
|
children: [
|
|
8620
|
-
/* @__PURE__ */ V(
|
|
8620
|
+
/* @__PURE__ */ V(F, {
|
|
8621
8621
|
label: "Status",
|
|
8622
8622
|
icon: /* @__PURE__ */ V(St, { className: `h-3.5 w-3.5 ${C ? "text-emerald-500" : ""}` }),
|
|
8623
8623
|
footer: v?.nodeId ? `node: ${v.nodeId}` : void 0,
|
|
8624
8624
|
children: n.isLoading ? "…" : C ? "Recording (continuous)" : "Idle"
|
|
8625
8625
|
}),
|
|
8626
|
-
/* @__PURE__ */ V(
|
|
8626
|
+
/* @__PURE__ */ V(F, {
|
|
8627
8627
|
label: "Storage",
|
|
8628
8628
|
icon: /* @__PURE__ */ V(an, { className: "h-3.5 w-3.5" }),
|
|
8629
8629
|
children: v ? Oc(v.storageBytes) : "—"
|
|
8630
8630
|
}),
|
|
8631
|
-
/* @__PURE__ */ V(
|
|
8631
|
+
/* @__PURE__ */ V(F, {
|
|
8632
8632
|
label: "Recorded (24h)",
|
|
8633
8633
|
icon: /* @__PURE__ */ V(Tt, { className: "h-3.5 w-3.5" }),
|
|
8634
8634
|
footer: `${x.length} segment range${x.length === 1 ? "" : "s"}`,
|
|
@@ -9982,7 +9982,7 @@ function iu({ field: e, value: t, onChange: n, disabled: r, translationFn: i })
|
|
|
9982
9982
|
className: "absolute right-2 top-1/2 -translate-y-1/2 text-foreground-subtle hover:text-foreground",
|
|
9983
9983
|
tabIndex: -1,
|
|
9984
9984
|
onClick: () => o((e) => !e),
|
|
9985
|
-
children: V(a ?
|
|
9985
|
+
children: V(a ? L : Wt, { className: "h-3.5 w-3.5" })
|
|
9986
9986
|
})]
|
|
9987
9987
|
})
|
|
9988
9988
|
});
|
|
@@ -11409,7 +11409,7 @@ function Ku({ trpc: e, addonId: t, nodeId: n, title: r, disabled: i, onAfterChan
|
|
|
11409
11409
|
f,
|
|
11410
11410
|
JSON.stringify(T)
|
|
11411
11411
|
]);
|
|
11412
|
-
let k = h(() => Wu(p), [p]), ee = h(() => p ? Gu(p) : null, [p]),
|
|
11412
|
+
let k = h(() => Wu(p), [p]), ee = h(() => p ? Gu(p) : null, [p]), A = async (r) => {
|
|
11413
11413
|
if (f === "override") {
|
|
11414
11414
|
let e = D ?? k, t = {};
|
|
11415
11415
|
for (let n of Object.keys(r)) r[n] !== e[n] && (t[n] = r[n]);
|
|
@@ -11467,16 +11467,16 @@ function Ku({ trpc: e, addonId: t, nodeId: n, title: r, disabled: i, onAfterChan
|
|
|
11467
11467
|
"."
|
|
11468
11468
|
]
|
|
11469
11469
|
});
|
|
11470
|
-
let
|
|
11470
|
+
let te = f === "override" ? {
|
|
11471
11471
|
...k,
|
|
11472
11472
|
...T
|
|
11473
|
-
} : k,
|
|
11473
|
+
} : k, ne = /* @__PURE__ */ H(U, { children: [f === "override" ? /* @__PURE__ */ V("div", {
|
|
11474
11474
|
className: "mb-2 text-[11px] text-foreground-subtle",
|
|
11475
11475
|
children: "Benchmark override — applies to this run only. The addon's saved settings are not changed."
|
|
11476
11476
|
}) : null, /* @__PURE__ */ V(Hu, {
|
|
11477
11477
|
schema: ee,
|
|
11478
|
-
values:
|
|
11479
|
-
onChange:
|
|
11478
|
+
values: te,
|
|
11479
|
+
onChange: A,
|
|
11480
11480
|
disabled: i === !0 || x
|
|
11481
11481
|
})] });
|
|
11482
11482
|
return s === !0 ? /* @__PURE__ */ H("section", {
|
|
@@ -11499,7 +11499,7 @@ function Ku({ trpc: e, addonId: t, nodeId: n, title: r, disabled: i, onAfterChan
|
|
|
11499
11499
|
]
|
|
11500
11500
|
}), C ? /* @__PURE__ */ V("div", {
|
|
11501
11501
|
className: "border-t border-border px-4 py-3",
|
|
11502
|
-
children:
|
|
11502
|
+
children: ne
|
|
11503
11503
|
}) : null]
|
|
11504
11504
|
}) : r ? /* @__PURE__ */ H("section", {
|
|
11505
11505
|
className: "rounded-lg border border-border bg-surface overflow-hidden",
|
|
@@ -11511,9 +11511,9 @@ function Ku({ trpc: e, addonId: t, nodeId: n, title: r, disabled: i, onAfterChan
|
|
|
11511
11511
|
})
|
|
11512
11512
|
}), /* @__PURE__ */ V("div", {
|
|
11513
11513
|
className: "px-4 py-3",
|
|
11514
|
-
children:
|
|
11514
|
+
children: ne
|
|
11515
11515
|
})]
|
|
11516
|
-
}) : /* @__PURE__ */ V("div", { children:
|
|
11516
|
+
}) : /* @__PURE__ */ V("div", { children: ne });
|
|
11517
11517
|
}
|
|
11518
11518
|
//#endregion
|
|
11519
11519
|
//#region ../ui-library/src/primitives/collapsible-card.tsx
|
|
@@ -11530,7 +11530,7 @@ function qu({ expanded: e, onExpandedChange: t, header: n, children: r, dimmed:
|
|
|
11530
11530
|
},
|
|
11531
11531
|
children: [!a && /* @__PURE__ */ V("span", {
|
|
11532
11532
|
className: "text-foreground-subtle shrink-0",
|
|
11533
|
-
children: V(e ?
|
|
11533
|
+
children: V(e ? P : re, { className: "h-4 w-4" })
|
|
11534
11534
|
}), n]
|
|
11535
11535
|
}), e && r && /* @__PURE__ */ V("div", {
|
|
11536
11536
|
className: "border-t border-border px-3 py-3",
|
|
@@ -12285,7 +12285,7 @@ var wd = g(({ className: e, options: t, disabled: n, ...r }, i) => /* @__PURE__
|
|
|
12285
12285
|
}, e.value))
|
|
12286
12286
|
}), /* @__PURE__ */ V("div", {
|
|
12287
12287
|
className: Z("absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none text-foreground-muted", n === !0 ? "opacity-50" : ""),
|
|
12288
|
-
children: /* @__PURE__ */ V(
|
|
12288
|
+
children: /* @__PURE__ */ V(P, { className: "h-3.5 w-3.5" })
|
|
12289
12289
|
})]
|
|
12290
12290
|
}));
|
|
12291
12291
|
//#endregion
|
|
@@ -13387,90 +13387,90 @@ function Vf(e, t, n, r) {
|
|
|
13387
13387
|
return r ? Zd(i) : i;
|
|
13388
13388
|
}
|
|
13389
13389
|
var Hf = 8e3;
|
|
13390
|
-
function Uf({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i = !0, showControls: a = !0, showStats: s = !1,
|
|
13391
|
-
let
|
|
13392
|
-
|
|
13393
|
-
let
|
|
13394
|
-
|
|
13395
|
-
let
|
|
13396
|
-
|
|
13397
|
-
let
|
|
13398
|
-
let r =
|
|
13390
|
+
function Uf({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i = !0, showControls: a = !0, showStats: s = !1, onDebugStats: c, onPlaybackStats: d, onClientNetworkSample: f, onConnectTiming: p, className: m = "", onStateChange: h, onError: g, onReconnectAttempt: _, overlay: y, createSession: b, sendAnswer: x, handleOffer: S, getIceServers: C, addIceCandidate: w, getIceCandidates: T, closeSession: E, getSessionState: D, getSessionDebug: O, reoffer: k, posterUrl: ee, hintsOverride: A, onAdaptiveHints: te, reconnectSignal: ne, onControlChannel: j, onVideoElement: re }) {
|
|
13391
|
+
let M = u(null), N = u(null), P = u(null), F = u(/* @__PURE__ */ new Set()), I = u(null), L = u(null), R = u(0), z = u(!0), ie = u(j);
|
|
13392
|
+
ie.current = j;
|
|
13393
|
+
let B = u(re);
|
|
13394
|
+
B.current = re, v(() => (B.current?.(M.current), () => B.current?.(null)), []);
|
|
13395
|
+
let ae = u(te);
|
|
13396
|
+
ae.current = te;
|
|
13397
|
+
let oe = u(null), U = o((e, t, n) => {
|
|
13398
|
+
let r = ae.current;
|
|
13399
13399
|
if (!r) return;
|
|
13400
13400
|
let i = {
|
|
13401
13401
|
phase: e,
|
|
13402
13402
|
probeOrigin: n,
|
|
13403
13403
|
...t
|
|
13404
13404
|
}, a = tf(i);
|
|
13405
|
-
a !==
|
|
13406
|
-
}, []),
|
|
13407
|
-
|
|
13408
|
-
let [
|
|
13409
|
-
(
|
|
13410
|
-
let
|
|
13411
|
-
|
|
13412
|
-
let
|
|
13413
|
-
let e =
|
|
13405
|
+
a !== oe.current && (oe.current = a, r(i));
|
|
13406
|
+
}, []), se = u(null), ce = u(null), le = u(0), ue = u(!1), de = u(!1), fe = u(async () => {}), [pe, me] = l("idle"), [W, he] = l(""), [ge, _e] = l(i), ve = u(ge);
|
|
13407
|
+
ve.current = ge;
|
|
13408
|
+
let [ye, G] = l(!1), [be, xe] = l(!1), Se = Pf(), [Ce, we] = l(!0), Te = u(null), Ee = u(!1);
|
|
13409
|
+
(x || b) && (Ee.current = !0);
|
|
13410
|
+
let De = Ee.current, Oe = u(!1);
|
|
13411
|
+
S && (Oe.current = !0);
|
|
13412
|
+
let ke = Oe.current, [Ae, je] = l(!1), Me = u(null), [Ne, Pe] = l(null), [Fe, Ie] = l(!1), Le = o(() => {
|
|
13413
|
+
let e = M.current;
|
|
13414
13414
|
if (!(!e || e.readyState < 2 || !e.videoWidth || !e.videoHeight)) try {
|
|
13415
13415
|
let t = document.createElement("canvas");
|
|
13416
13416
|
t.width = e.videoWidth, t.height = e.videoHeight;
|
|
13417
13417
|
let n = t.getContext("2d");
|
|
13418
13418
|
if (!n || (n.drawImage(e, 0, 0), Ff(n, t.width, t.height))) return;
|
|
13419
|
-
|
|
13419
|
+
Me.current = t.toDataURL("image/jpeg", .6);
|
|
13420
13420
|
} catch {}
|
|
13421
|
-
}, []),
|
|
13422
|
-
|
|
13423
|
-
}, [
|
|
13424
|
-
if (
|
|
13425
|
-
for (let e of
|
|
13426
|
-
|
|
13421
|
+
}, []), Re = o((e) => {
|
|
13422
|
+
me(e), e === "playing" && je(!0), h?.(e);
|
|
13423
|
+
}, [h]), ze = o(() => {
|
|
13424
|
+
if (I.current?.abort(), I.current = null, L.current &&= (clearTimeout(L.current), null), ce.current &&= (clearTimeout(ce.current), null), se.current = null, de.current = !1, le.current = 0, P.current &&= (P.current.close(), null), E && F.current.size > 0) {
|
|
13425
|
+
for (let e of F.current) E(e).catch(() => {});
|
|
13426
|
+
F.current.clear();
|
|
13427
13427
|
}
|
|
13428
|
-
}, [
|
|
13429
|
-
|
|
13430
|
-
}, []),
|
|
13431
|
-
if (!
|
|
13432
|
-
|
|
13428
|
+
}, [E]), K = o(() => {
|
|
13429
|
+
I.current?.abort(), I.current = null, L.current &&= (clearTimeout(L.current), null), ce.current &&= (clearTimeout(ce.current), null), se.current = null, de.current = !1, le.current = 0;
|
|
13430
|
+
}, []), Be = 1e3, Ve = o((e) => {
|
|
13431
|
+
if (!D || !k) return;
|
|
13432
|
+
ce.current &&= (clearTimeout(ce.current), null);
|
|
13433
13433
|
let t = async () => {
|
|
13434
|
-
if (z.current &&
|
|
13435
|
-
if (!
|
|
13436
|
-
let { pendingRenegotiation: t } = await
|
|
13437
|
-
if (z.current &&
|
|
13438
|
-
|
|
13434
|
+
if (z.current && se.current === e) {
|
|
13435
|
+
if (!de.current) try {
|
|
13436
|
+
let { pendingRenegotiation: t } = await D(e);
|
|
13437
|
+
if (z.current && se.current === e && t && t.epoch > le.current && !de.current) {
|
|
13438
|
+
le.current = t.epoch, await fe.current(e, t.target);
|
|
13439
13439
|
return;
|
|
13440
13440
|
}
|
|
13441
13441
|
} catch {}
|
|
13442
|
-
!z.current ||
|
|
13442
|
+
!z.current || se.current !== e || (ce.current = setTimeout(() => {
|
|
13443
13443
|
t();
|
|
13444
|
-
},
|
|
13444
|
+
}, Be));
|
|
13445
13445
|
}
|
|
13446
13446
|
};
|
|
13447
|
-
|
|
13447
|
+
ce.current = setTimeout(() => {
|
|
13448
13448
|
t();
|
|
13449
|
-
},
|
|
13450
|
-
}, [
|
|
13451
|
-
if (!z.current || !
|
|
13452
|
-
let r = t ?
|
|
13453
|
-
t ?
|
|
13449
|
+
}, Be);
|
|
13450
|
+
}, [D, k]), q = o(async (t = !1, n = t) => {
|
|
13451
|
+
if (!z.current || !b || !x) return;
|
|
13452
|
+
let r = t ? P.current : null, i = t ? new Set(F.current) : null;
|
|
13453
|
+
t ? K() : ze(), Re("connecting");
|
|
13454
13454
|
let a = new AbortController();
|
|
13455
|
-
|
|
13455
|
+
I.current = a;
|
|
13456
13456
|
try {
|
|
13457
|
-
let o = n ? void 0 : Bf(e), s = Vf(If(
|
|
13458
|
-
|
|
13459
|
-
let { sessionId: c, sdpOffer: l, iceServers: u } = await
|
|
13460
|
-
if (
|
|
13461
|
-
e === void 0 || !Qd(e) || !z.current || a.signal.aborted ||
|
|
13457
|
+
let o = n ? void 0 : Bf(e), s = Vf(If(N.current), A, n ? await Bf(e) : void 0, !n);
|
|
13458
|
+
U(n ? "probe-climb" : "cold-start", s, zf(e));
|
|
13459
|
+
let { sessionId: c, sdpOffer: l, iceServers: u } = await b(s);
|
|
13460
|
+
if (F.current.add(c), o !== void 0 && o.then((e) => {
|
|
13461
|
+
e === void 0 || !Qd(e) || !z.current || a.signal.aborted || ue.current || (ue.current = !0, q(!0, !0));
|
|
13462
13462
|
}), !z.current || a.signal.aborted) {
|
|
13463
|
-
|
|
13463
|
+
E?.(c).catch(() => {}), F.current.delete(c);
|
|
13464
13464
|
return;
|
|
13465
13465
|
}
|
|
13466
13466
|
let d = new RTCPeerConnection({ iceServers: [...u ?? [], { urls: "stun:stun.l.google.com:19302" }] });
|
|
13467
|
-
t || (
|
|
13467
|
+
t || (P.current = d);
|
|
13468
13468
|
let f = new MediaStream(), p = !1, m = () => {
|
|
13469
13469
|
if (!(p || !z.current)) {
|
|
13470
|
-
if (p = !0,
|
|
13470
|
+
if (p = !0, P.current = d, M.current && (M.current.srcObject = f, Nf(M.current, ve.current), M.current.play().catch(() => {})), r && r !== d) try {
|
|
13471
13471
|
r.close();
|
|
13472
13472
|
} catch {}
|
|
13473
|
-
if (i) for (let e of i)
|
|
13473
|
+
if (i) for (let e of i) F.current.delete(e), E?.(e).catch(() => {});
|
|
13474
13474
|
}
|
|
13475
13475
|
};
|
|
13476
13476
|
d.ontrack = (e) => {
|
|
@@ -13478,16 +13478,16 @@ function Uf({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
13478
13478
|
m();
|
|
13479
13479
|
return;
|
|
13480
13480
|
}
|
|
13481
|
-
|
|
13481
|
+
M.current && (M.current.srcObject = f, Nf(M.current, ve.current), M.current.play().catch(() => {}));
|
|
13482
13482
|
}, d.oniceconnectionstatechange = () => {
|
|
13483
13483
|
if (!z.current) return;
|
|
13484
13484
|
let e = d.iceConnectionState;
|
|
13485
|
-
if (console.debug("[WebRTC] ICE state:", e), e === "connected" || e === "completed") R.current = 0, t && m(),
|
|
13485
|
+
if (console.debug("[WebRTC] ICE state:", e), e === "connected" || e === "completed") R.current = 0, t && m(), Re("playing"), M.current?.paused && (console.debug("[WebRTC] video was paused at ICE connected — calling play()"), M.current.play().catch(() => {}));
|
|
13486
13486
|
else if (e === "failed" || e === "disconnected" || e === "closed") {
|
|
13487
13487
|
if (t && !p) try {
|
|
13488
13488
|
d.close();
|
|
13489
13489
|
} catch {}
|
|
13490
|
-
|
|
13490
|
+
Re("disconnected"), Je();
|
|
13491
13491
|
}
|
|
13492
13492
|
}, d.onicecandidateerror = (e) => {
|
|
13493
13493
|
console.debug("[WebRTC] ICE candidate error:", e);
|
|
@@ -13501,44 +13501,44 @@ function Uf({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
13501
13501
|
console.debug("[WebRTC] Sending answer to server", {
|
|
13502
13502
|
localCandidates: g,
|
|
13503
13503
|
sessionId: c.slice(0, 8)
|
|
13504
|
-
}), await
|
|
13504
|
+
}), await x(c, d.localDescription?.sdp ?? ""), console.debug("[WebRTC] Answer sent successfully");
|
|
13505
13505
|
let _ = d, v = () => {
|
|
13506
13506
|
let e = _.connectionState;
|
|
13507
13507
|
if (e === "closed" || e === "failed") return;
|
|
13508
|
-
let t =
|
|
13508
|
+
let t = M.current;
|
|
13509
13509
|
t && t.readyState === 0 && console.log(`[WebRTC] no video data yet (ice=${_.iceConnectionState})`);
|
|
13510
13510
|
};
|
|
13511
13511
|
setTimeout(v, 3e3), setTimeout(v, 8e3);
|
|
13512
13512
|
} catch (e) {
|
|
13513
13513
|
if (!z.current) return;
|
|
13514
13514
|
let t = e instanceof Error ? e.message : String(e);
|
|
13515
|
-
|
|
13515
|
+
he(t), Re("error"), g?.(t), Je();
|
|
13516
13516
|
}
|
|
13517
13517
|
}, [
|
|
13518
13518
|
e,
|
|
13519
13519
|
t,
|
|
13520
|
-
y,
|
|
13521
13520
|
b,
|
|
13522
|
-
|
|
13521
|
+
x,
|
|
13523
13522
|
ze,
|
|
13524
|
-
|
|
13525
|
-
|
|
13526
|
-
|
|
13527
|
-
|
|
13528
|
-
|
|
13529
|
-
|
|
13523
|
+
K,
|
|
13524
|
+
E,
|
|
13525
|
+
Re,
|
|
13526
|
+
g,
|
|
13527
|
+
A,
|
|
13528
|
+
U
|
|
13529
|
+
]), He = o(async () => {
|
|
13530
13530
|
if (z.current) {
|
|
13531
|
-
|
|
13531
|
+
ze(), Re("connecting");
|
|
13532
13532
|
try {
|
|
13533
13533
|
let n = new RTCPeerConnection({ iceServers: [{ urls: "stun:stun.l.google.com:19302" }] });
|
|
13534
|
-
|
|
13534
|
+
P.current = n, n.addTransceiver("video", { direction: "recvonly" }), n.addTransceiver("audio", { direction: "recvonly" });
|
|
13535
13535
|
let r = new MediaStream();
|
|
13536
13536
|
n.ontrack = (e) => {
|
|
13537
|
-
r.addTrack(e.track),
|
|
13537
|
+
r.addTrack(e.track), M.current && (M.current.srcObject = r, Nf(M.current, ve.current), M.current.play().catch(() => {}));
|
|
13538
13538
|
}, n.oniceconnectionstatechange = () => {
|
|
13539
13539
|
if (!z.current) return;
|
|
13540
13540
|
let e = n.iceConnectionState;
|
|
13541
|
-
e === "connected" || e === "completed" ? (R.current = 0,
|
|
13541
|
+
e === "connected" || e === "completed" ? (R.current = 0, Re("playing"), M.current?.paused && M.current.play().catch(() => {})) : (e === "failed" || e === "disconnected" || e === "closed") && (Re("disconnected"), Je());
|
|
13542
13542
|
};
|
|
13543
13543
|
let i = await n.createOffer();
|
|
13544
13544
|
if (await n.setLocalDescription(i), await Gf(n), !z.current) return;
|
|
@@ -13556,41 +13556,41 @@ function Uf({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
13556
13556
|
} catch (e) {
|
|
13557
13557
|
if (!z.current) return;
|
|
13558
13558
|
let t = e instanceof Error ? e.message : String(e);
|
|
13559
|
-
|
|
13559
|
+
he(t), Re("error"), g?.(t), Je();
|
|
13560
13560
|
}
|
|
13561
13561
|
}
|
|
13562
13562
|
}, [
|
|
13563
13563
|
e,
|
|
13564
13564
|
t,
|
|
13565
|
+
ze,
|
|
13565
13566
|
Re,
|
|
13566
|
-
|
|
13567
|
-
|
|
13568
|
-
|
|
13569
|
-
|
|
13570
|
-
|
|
13571
|
-
n ? ze() : Re(), Le("connecting");
|
|
13567
|
+
g
|
|
13568
|
+
]), Ue = o(async (n = !1, r = n) => {
|
|
13569
|
+
if (!z.current || !S) return;
|
|
13570
|
+
let i = n ? P.current : null, a = n ? new Set(F.current) : null;
|
|
13571
|
+
n ? K() : ze(), Re("connecting");
|
|
13572
13572
|
let o = new AbortController();
|
|
13573
|
-
|
|
13573
|
+
I.current = o;
|
|
13574
13574
|
let s = performance.now(), c = () => Math.round(performance.now() - s), l = {};
|
|
13575
13575
|
try {
|
|
13576
|
-
let s = r ? void 0 : Bf(e), u = await
|
|
13576
|
+
let s = r ? void 0 : Bf(e), u = await C?.();
|
|
13577
13577
|
if (l.iceServersMs = c(), !z.current || o.signal.aborted) return;
|
|
13578
13578
|
let d = new RTCPeerConnection({ iceServers: [...u ?? [], { urls: "stun:stun.l.google.com:19302" }] });
|
|
13579
|
-
n || (
|
|
13580
|
-
let
|
|
13579
|
+
n || (P.current = d);
|
|
13580
|
+
let f = new MediaStream(), m = !1, h = () => {
|
|
13581
13581
|
if (!(m || !z.current)) {
|
|
13582
|
-
if (m = !0,
|
|
13582
|
+
if (m = !0, P.current = d, M.current && (M.current.srcObject = f, Nf(M.current, ve.current), M.current.play().catch(() => {})), i && i !== d) try {
|
|
13583
13583
|
i.close();
|
|
13584
13584
|
} catch {}
|
|
13585
|
-
if (a) for (let e of a)
|
|
13585
|
+
if (a) for (let e of a) F.current.delete(e), E?.(e).catch(() => {});
|
|
13586
13586
|
}
|
|
13587
13587
|
};
|
|
13588
13588
|
d.ontrack = (e) => {
|
|
13589
|
-
if (l.firstTrackMs === void 0 && (l.firstTrackMs = c()), console.debug("[WebRTC] ontrack (client-offer)", e.track.kind, e.track.readyState),
|
|
13589
|
+
if (l.firstTrackMs === void 0 && (l.firstTrackMs = c()), console.debug("[WebRTC] ontrack (client-offer)", e.track.kind, e.track.readyState), f.addTrack(e.track), n) {
|
|
13590
13590
|
h();
|
|
13591
13591
|
return;
|
|
13592
13592
|
}
|
|
13593
|
-
|
|
13593
|
+
M.current && (M.current.srcObject = f, Nf(M.current, ve.current), M.current.play().catch(() => {}));
|
|
13594
13594
|
};
|
|
13595
13595
|
let g = !1;
|
|
13596
13596
|
d.oniceconnectionstatechange = () => {
|
|
@@ -13601,59 +13601,59 @@ function Uf({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
13601
13601
|
g = !0, l.iceConnectedMs = c(), console.info("[WebRTC timing] client-offer connected", {
|
|
13602
13602
|
streamKey: t,
|
|
13603
13603
|
...l
|
|
13604
|
-
}),
|
|
13605
|
-
let e =
|
|
13604
|
+
}), p?.({ ...l });
|
|
13605
|
+
let e = M.current;
|
|
13606
13606
|
e && "requestVideoFrameCallback" in e && (e.requestVideoFrameCallback(() => {
|
|
13607
13607
|
l.firstFrameMs = c(), console.info("[WebRTC timing] first decoded frame", {
|
|
13608
13608
|
streamKey: t,
|
|
13609
13609
|
firstFrameMs: l.firstFrameMs
|
|
13610
|
-
}),
|
|
13610
|
+
}), p?.({ ...l });
|
|
13611
13611
|
}), setTimeout(() => {
|
|
13612
13612
|
z.current && l.firstFrameMs === void 0 && (console.warn("[WebRTC timing] NO decoded frame (stalled)", {
|
|
13613
13613
|
streamKey: t,
|
|
13614
13614
|
sinceIceConnectedMs: c() - (l.iceConnectedMs ?? 0),
|
|
13615
13615
|
iceConnectedMs: l.iceConnectedMs,
|
|
13616
13616
|
firstTrackMs: l.firstTrackMs
|
|
13617
|
-
}),
|
|
13617
|
+
}), qe.current("no decoded frame after connect"), Je());
|
|
13618
13618
|
}, Hf));
|
|
13619
13619
|
}
|
|
13620
|
-
R.current = 0, n && h(),
|
|
13620
|
+
R.current = 0, n && h(), Re("playing"), M.current?.paused && M.current.play().catch(() => {});
|
|
13621
13621
|
} else if (e === "failed" || e === "disconnected" || e === "closed") {
|
|
13622
13622
|
if (n && !m) try {
|
|
13623
13623
|
d.close();
|
|
13624
13624
|
} catch {}
|
|
13625
|
-
|
|
13625
|
+
Re("disconnected"), Je();
|
|
13626
13626
|
}
|
|
13627
13627
|
};
|
|
13628
13628
|
let _ = null, v = [];
|
|
13629
13629
|
if (d.onicecandidate = (e) => {
|
|
13630
13630
|
if (!e.candidate) return;
|
|
13631
13631
|
let t = e.candidate.toJSON();
|
|
13632
|
-
_ &&
|
|
13633
|
-
}, d.addTransceiver("video", { direction: "recvonly" }), d.addTransceiver("audio", { direction: "recvonly" }),
|
|
13632
|
+
_ && w ? w(_, t).catch(() => {}) : v.push(t);
|
|
13633
|
+
}, d.addTransceiver("video", { direction: "recvonly" }), d.addTransceiver("audio", { direction: "recvonly" }), ie.current) {
|
|
13634
13634
|
let e = d.createDataChannel("camstack-control");
|
|
13635
|
-
|
|
13635
|
+
ie.current(e);
|
|
13636
13636
|
}
|
|
13637
13637
|
let y = await d.createOffer();
|
|
13638
13638
|
if (l.offerCreatedMs = c(), await d.setLocalDescription(y), l.localSetMs = c(), !z.current || o.signal.aborted) return;
|
|
13639
|
-
let b = r ? await Bf(e) : void 0,
|
|
13640
|
-
|
|
13641
|
-
let D = c(), { sessionId: O, sdpAnswer: k } = await
|
|
13642
|
-
if (l.signalingRttMs = c() - D, _ = O,
|
|
13643
|
-
e === void 0 || !Qd(e) || !z.current || o.signal.aborted ||
|
|
13644
|
-
}),
|
|
13645
|
-
|
|
13639
|
+
let b = r ? await Bf(e) : void 0, x = Vf(If(N.current), A, b, !r);
|
|
13640
|
+
U(r ? "probe-climb" : "cold-start", x, zf(e));
|
|
13641
|
+
let D = c(), { sessionId: O, sdpAnswer: k } = await S(d.localDescription?.sdp ?? y.sdp ?? "", void 0, x);
|
|
13642
|
+
if (l.signalingRttMs = c() - D, _ = O, F.current.add(O), s !== void 0 && s.then((e) => {
|
|
13643
|
+
e === void 0 || !Qd(e) || !z.current || o.signal.aborted || ue.current || (ue.current = !0, Ue(!0, !0));
|
|
13644
|
+
}), se.current = O, !z.current || o.signal.aborted) {
|
|
13645
|
+
E?.(O).catch(() => {}), F.current.delete(O);
|
|
13646
13646
|
return;
|
|
13647
13647
|
}
|
|
13648
|
-
if (
|
|
13648
|
+
if (w) for (let e of v) w(O, e).catch(() => {});
|
|
13649
13649
|
if (v.length = 0, await d.setRemoteDescription({
|
|
13650
13650
|
type: "answer",
|
|
13651
13651
|
sdp: k
|
|
13652
|
-
}), l.answerSetMs = c(), console.debug("[WebRTC] Client-offer answer set (trickle)", { sessionId: O.slice(0, 8) }),
|
|
13652
|
+
}), l.answerSetMs = c(), console.debug("[WebRTC] Client-offer answer set (trickle)", { sessionId: O.slice(0, 8) }), T) {
|
|
13653
13653
|
let e = /* @__PURE__ */ new Set(), t = Date.now(), n = async () => {
|
|
13654
13654
|
if (!(!z.current || o.signal.aborted) && !(d.connectionState === "closed" || d.signalingState === "closed")) {
|
|
13655
13655
|
try {
|
|
13656
|
-
let { candidates: n, done: r } = await
|
|
13656
|
+
let { candidates: n, done: r } = await T(O);
|
|
13657
13657
|
for (let t of n) {
|
|
13658
13658
|
let n = t.candidate ?? "";
|
|
13659
13659
|
n && !e.has(n) && (e.add(n), d.addIceCandidate(new RTCIceCandidate(t)).catch(() => {}));
|
|
@@ -13668,34 +13668,34 @@ function Uf({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
13668
13668
|
};
|
|
13669
13669
|
n();
|
|
13670
13670
|
}
|
|
13671
|
-
|
|
13671
|
+
Ve(O);
|
|
13672
13672
|
} catch (e) {
|
|
13673
13673
|
if (!z.current) return;
|
|
13674
13674
|
let t = e instanceof Error ? e.message : String(e);
|
|
13675
|
-
|
|
13675
|
+
he(t), Re("error"), g?.(t), Je();
|
|
13676
13676
|
}
|
|
13677
13677
|
}, [
|
|
13678
13678
|
e,
|
|
13679
|
-
x,
|
|
13680
13679
|
S,
|
|
13681
13680
|
C,
|
|
13682
13681
|
w,
|
|
13683
13682
|
T,
|
|
13684
|
-
|
|
13683
|
+
E,
|
|
13685
13684
|
ze,
|
|
13686
|
-
|
|
13687
|
-
|
|
13688
|
-
|
|
13689
|
-
|
|
13690
|
-
|
|
13685
|
+
K,
|
|
13686
|
+
Re,
|
|
13687
|
+
g,
|
|
13688
|
+
Ve,
|
|
13689
|
+
A,
|
|
13690
|
+
U
|
|
13691
13691
|
]);
|
|
13692
|
-
|
|
13693
|
-
let r =
|
|
13692
|
+
fe.current = o(async (t, n) => {
|
|
13693
|
+
let r = k;
|
|
13694
13694
|
if (!z.current || !r) return;
|
|
13695
|
-
let i =
|
|
13696
|
-
|
|
13695
|
+
let i = P.current;
|
|
13696
|
+
de.current = !0;
|
|
13697
13697
|
try {
|
|
13698
|
-
let a = await
|
|
13698
|
+
let a = await C?.();
|
|
13699
13699
|
if (!z.current) return;
|
|
13700
13700
|
let o = new RTCPeerConnection({ iceServers: [...a ?? [], { urls: "stun:stun.l.google.com:19302" }] }), s = new MediaStream(), c = !1, l = !1, u = null, d, f, p = () => {
|
|
13701
13701
|
f !== void 0 && (clearTimeout(f), f = void 0);
|
|
@@ -13713,7 +13713,7 @@ function Uf({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
13713
13713
|
p();
|
|
13714
13714
|
return;
|
|
13715
13715
|
}
|
|
13716
|
-
c = !0,
|
|
13716
|
+
c = !0, P.current = o, M.current && (M.current.srcObject = s, M.current.play().catch(() => {})), i && i !== o && i.close(), p();
|
|
13717
13717
|
}
|
|
13718
13718
|
let h = () => {
|
|
13719
13719
|
if (l || c || !z.current) return;
|
|
@@ -13722,23 +13722,23 @@ function Uf({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
13722
13722
|
return;
|
|
13723
13723
|
}
|
|
13724
13724
|
let e = document.createElement("video");
|
|
13725
|
-
e.muted = !0, e.playsInline = !0, e.autoplay = !0, e.style.cssText = "position:absolute;left:-9999px;top:0;width:1px;height:1px;opacity:0;pointer-events:none;", e.srcObject = s, u = e, (
|
|
13725
|
+
e.muted = !0, e.playsInline = !0, e.autoplay = !0, e.style.cssText = "position:absolute;left:-9999px;top:0;width:1px;height:1px;opacity:0;pointer-events:none;", e.srcObject = s, u = e, (N.current ?? document.body).appendChild(e), e.play().catch(() => {}), typeof e.requestVideoFrameCallback == "function" && (d = e.requestVideoFrameCallback(() => m())), e.addEventListener("loadeddata", m, { once: !0 }), f = setTimeout(() => m(), 1800);
|
|
13726
13726
|
};
|
|
13727
13727
|
o.ontrack = (e) => {
|
|
13728
13728
|
console.debug("[WebRTC] ontrack (reoffer)", e.track.kind, e.track.readyState), s.addTrack(e.track), h();
|
|
13729
13729
|
}, o.oniceconnectionstatechange = () => {
|
|
13730
13730
|
if (!z.current) return;
|
|
13731
13731
|
let e = o.iceConnectionState;
|
|
13732
|
-
console.debug("[WebRTC] ICE state (reoffer):", e), e === "connected" || e === "completed" ? (R.current = 0, h(),
|
|
13732
|
+
console.debug("[WebRTC] ICE state (reoffer):", e), e === "connected" || e === "completed" ? (R.current = 0, h(), Re("playing"), M.current?.paused && M.current.play().catch(() => {})) : (e === "failed" || e === "closed") && (p(), !c && e === "failed" && o.close(), Re("disconnected"), Je());
|
|
13733
13733
|
};
|
|
13734
13734
|
let g = null, _ = [];
|
|
13735
13735
|
if (o.onicecandidate = (e) => {
|
|
13736
13736
|
if (!e.candidate) return;
|
|
13737
13737
|
let t = e.candidate.toJSON();
|
|
13738
|
-
g &&
|
|
13739
|
-
}, o.addTransceiver("video", { direction: "recvonly" }), o.addTransceiver("audio", { direction: "recvonly" }),
|
|
13738
|
+
g && w ? w(g, t).catch(() => {}) : _.push(t);
|
|
13739
|
+
}, o.addTransceiver("video", { direction: "recvonly" }), o.addTransceiver("audio", { direction: "recvonly" }), ie.current) {
|
|
13740
13740
|
let e = o.createDataChannel("camstack-control");
|
|
13741
|
-
|
|
13741
|
+
ie.current(e);
|
|
13742
13742
|
}
|
|
13743
13743
|
let v = await o.createOffer();
|
|
13744
13744
|
if (await o.setLocalDescription(v), !z.current) {
|
|
@@ -13746,25 +13746,25 @@ function Uf({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
13746
13746
|
return;
|
|
13747
13747
|
}
|
|
13748
13748
|
let y = await Bf(e), b = {
|
|
13749
|
-
...If(
|
|
13749
|
+
...If(N.current),
|
|
13750
13750
|
...y === void 0 ? {} : { downlinkMbps: y },
|
|
13751
|
-
...
|
|
13751
|
+
...A
|
|
13752
13752
|
};
|
|
13753
|
-
|
|
13754
|
-
let { sessionId: x, sdpAnswer:
|
|
13753
|
+
U("renegotiate", b, zf(e));
|
|
13754
|
+
let { sessionId: x, sdpAnswer: S } = await r(t, o.localDescription?.sdp ?? v.sdp ?? "", n, b);
|
|
13755
13755
|
if (!z.current) {
|
|
13756
13756
|
o.close();
|
|
13757
13757
|
return;
|
|
13758
13758
|
}
|
|
13759
|
-
if (g = x,
|
|
13759
|
+
if (g = x, F.current.add(x), se.current = x, w) for (let e of _) w(x, e).catch(() => {});
|
|
13760
13760
|
if (_.length = 0, await o.setRemoteDescription({
|
|
13761
13761
|
type: "answer",
|
|
13762
|
-
sdp:
|
|
13763
|
-
}),
|
|
13762
|
+
sdp: S
|
|
13763
|
+
}), T) {
|
|
13764
13764
|
let e = /* @__PURE__ */ new Set(), t = Date.now(), n = async () => {
|
|
13765
13765
|
if (z.current && !(o.connectionState === "closed" || o.signalingState === "closed")) {
|
|
13766
13766
|
try {
|
|
13767
|
-
let { candidates: n, done: r } = await
|
|
13767
|
+
let { candidates: n, done: r } = await T(x);
|
|
13768
13768
|
for (let t of n) {
|
|
13769
13769
|
let n = t.candidate ?? "";
|
|
13770
13770
|
n && !e.has(n) && (e.add(n), o.addIceCandidate(new RTCIceCandidate(t)).catch(() => {}));
|
|
@@ -13779,114 +13779,114 @@ function Uf({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
13779
13779
|
};
|
|
13780
13780
|
n();
|
|
13781
13781
|
}
|
|
13782
|
-
|
|
13782
|
+
Ve(x);
|
|
13783
13783
|
} catch (e) {
|
|
13784
|
-
console.debug("[WebRTC] reoffer failed; keeping last frame, re-arming poll", e instanceof Error ? e.message : String(e)),
|
|
13784
|
+
console.debug("[WebRTC] reoffer failed; keeping last frame, re-arming poll", e instanceof Error ? e.message : String(e)), Ve(t);
|
|
13785
13785
|
} finally {
|
|
13786
|
-
|
|
13786
|
+
de.current = !1;
|
|
13787
13787
|
}
|
|
13788
13788
|
}, [
|
|
13789
13789
|
e,
|
|
13790
|
-
|
|
13791
|
-
S,
|
|
13790
|
+
k,
|
|
13792
13791
|
C,
|
|
13793
13792
|
w,
|
|
13794
|
-
|
|
13795
|
-
|
|
13796
|
-
|
|
13797
|
-
|
|
13793
|
+
T,
|
|
13794
|
+
Re,
|
|
13795
|
+
Ve,
|
|
13796
|
+
A,
|
|
13797
|
+
U
|
|
13798
13798
|
]);
|
|
13799
|
-
let
|
|
13800
|
-
|
|
13801
|
-
let
|
|
13802
|
-
|
|
13799
|
+
let We = ke ? Ue : De ? q : He, Ge = u(() => {}), Ke = u(_);
|
|
13800
|
+
Ke.current = _;
|
|
13801
|
+
let qe = u(() => {});
|
|
13802
|
+
qe.current = (e) => {
|
|
13803
13803
|
console.warn("[WebRTC] hard error", {
|
|
13804
13804
|
streamKey: t,
|
|
13805
13805
|
msg: e
|
|
13806
|
-
}),
|
|
13807
|
-
},
|
|
13808
|
-
let
|
|
13806
|
+
}), he(e), g?.(e), Re("error");
|
|
13807
|
+
}, Ge.current = We;
|
|
13808
|
+
let Je = o(() => {
|
|
13809
13809
|
if (!z.current) return;
|
|
13810
13810
|
let e = R.current, t = qd(e);
|
|
13811
|
-
if (
|
|
13812
|
-
|
|
13811
|
+
if (Ke.current?.(t), t.kind === "exhausted") {
|
|
13812
|
+
qe.current(`reconnect attempts exhausted (${t.attempts})`);
|
|
13813
13813
|
return;
|
|
13814
13814
|
}
|
|
13815
13815
|
R.current += 1, L.current = setTimeout(() => {
|
|
13816
|
-
z.current &&
|
|
13816
|
+
z.current && Ge.current();
|
|
13817
13817
|
}, t.delayMs);
|
|
13818
13818
|
}, []);
|
|
13819
|
-
v(() => (z.current = !0, R.current = 0, r &&
|
|
13820
|
-
z.current = !1,
|
|
13819
|
+
v(() => (z.current = !0, R.current = 0, r && We(), () => {
|
|
13820
|
+
z.current = !1, ze();
|
|
13821
13821
|
}), []);
|
|
13822
|
-
let
|
|
13822
|
+
let Ye = u(!1);
|
|
13823
13823
|
v(() => {
|
|
13824
13824
|
if (r) {
|
|
13825
|
-
if (
|
|
13826
|
-
if (!
|
|
13827
|
-
} else if (
|
|
13828
|
-
if (!
|
|
13825
|
+
if (ke) {
|
|
13826
|
+
if (!S) return;
|
|
13827
|
+
} else if (De) {
|
|
13828
|
+
if (!b || !x) return;
|
|
13829
13829
|
} else return;
|
|
13830
|
-
|
|
13830
|
+
Ye.current || P.current || (Ye.current = !0, We());
|
|
13831
13831
|
}
|
|
13832
13832
|
}, [
|
|
13833
13833
|
r,
|
|
13834
|
-
|
|
13835
|
-
|
|
13836
|
-
|
|
13837
|
-
y,
|
|
13834
|
+
ke,
|
|
13835
|
+
De,
|
|
13836
|
+
S,
|
|
13838
13837
|
b,
|
|
13839
|
-
|
|
13838
|
+
x,
|
|
13839
|
+
We
|
|
13840
13840
|
]);
|
|
13841
|
-
let
|
|
13842
|
-
R.current = 0,
|
|
13843
|
-
},
|
|
13844
|
-
if (R.current = 0,
|
|
13845
|
-
|
|
13841
|
+
let Xe = () => {
|
|
13842
|
+
R.current = 0, We();
|
|
13843
|
+
}, Ze = () => {
|
|
13844
|
+
if (R.current = 0, P.current && ke) {
|
|
13845
|
+
Ue(!0);
|
|
13846
13846
|
return;
|
|
13847
13847
|
}
|
|
13848
|
-
if (
|
|
13849
|
-
|
|
13848
|
+
if (P.current && De) {
|
|
13849
|
+
q(!0);
|
|
13850
13850
|
return;
|
|
13851
13851
|
}
|
|
13852
|
-
|
|
13853
|
-
},
|
|
13852
|
+
We();
|
|
13853
|
+
}, Qe = u(e), $e = u(t);
|
|
13854
13854
|
v(() => {
|
|
13855
|
-
let n =
|
|
13856
|
-
if (
|
|
13857
|
-
if (R.current = 0,
|
|
13858
|
-
|
|
13855
|
+
let n = Qe.current !== e, r = $e.current !== t;
|
|
13856
|
+
if (Qe.current = e, $e.current = t, !(!n && !r) && z.current) {
|
|
13857
|
+
if (R.current = 0, ue.current = !1, n) {
|
|
13858
|
+
ze(), We();
|
|
13859
13859
|
return;
|
|
13860
13860
|
}
|
|
13861
|
-
|
|
13861
|
+
Ze();
|
|
13862
13862
|
}
|
|
13863
13863
|
}, [e, t]);
|
|
13864
|
-
let
|
|
13864
|
+
let et = u(ne);
|
|
13865
13865
|
v(() => {
|
|
13866
|
-
|
|
13867
|
-
}, [
|
|
13868
|
-
let
|
|
13869
|
-
if (
|
|
13870
|
-
let e = !
|
|
13871
|
-
Nf(
|
|
13866
|
+
et.current !== ne && (et.current = ne, z.current && Ze());
|
|
13867
|
+
}, [ne]);
|
|
13868
|
+
let tt = () => {
|
|
13869
|
+
if (M.current) {
|
|
13870
|
+
let e = !M.current.muted;
|
|
13871
|
+
Nf(M.current, e), _e(e);
|
|
13872
13872
|
}
|
|
13873
|
-
},
|
|
13874
|
-
if (
|
|
13873
|
+
}, nt = async () => {
|
|
13874
|
+
if (N.current) try {
|
|
13875
13875
|
if (document.fullscreenElement) {
|
|
13876
13876
|
await document.exitFullscreen();
|
|
13877
13877
|
return;
|
|
13878
13878
|
}
|
|
13879
|
-
if (
|
|
13880
|
-
await
|
|
13879
|
+
if (N.current.requestFullscreen) {
|
|
13880
|
+
await N.current.requestFullscreen();
|
|
13881
13881
|
return;
|
|
13882
13882
|
}
|
|
13883
|
-
let e =
|
|
13883
|
+
let e = M.current;
|
|
13884
13884
|
e?.webkitEnterFullscreen && e.webkitEnterFullscreen();
|
|
13885
13885
|
} catch (e) {
|
|
13886
13886
|
console.warn(`Fullscreen toggle failed: ${e instanceof Error ? e.message : e}`);
|
|
13887
13887
|
}
|
|
13888
|
-
},
|
|
13889
|
-
let e =
|
|
13888
|
+
}, rt = async () => {
|
|
13889
|
+
let e = M.current;
|
|
13890
13890
|
if (e) try {
|
|
13891
13891
|
if (typeof e.webkitSetPresentationMode == "function") {
|
|
13892
13892
|
e.webkitSetPresentationMode(e.webkitPresentationMode === "picture-in-picture" ? "inline" : "picture-in-picture");
|
|
@@ -13896,39 +13896,39 @@ function Uf({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
13896
13896
|
} catch (e) {
|
|
13897
13897
|
console.warn(`PiP toggle failed: ${e instanceof Error ? e.message : String(e)}`);
|
|
13898
13898
|
}
|
|
13899
|
-
},
|
|
13900
|
-
if (!
|
|
13899
|
+
}, it = () => {
|
|
13900
|
+
if (!M.current) return;
|
|
13901
13901
|
let e = document.createElement("canvas");
|
|
13902
|
-
e.width =
|
|
13902
|
+
e.width = M.current.videoWidth || 1280, e.height = M.current.videoHeight || 720;
|
|
13903
13903
|
let n = e.getContext("2d");
|
|
13904
13904
|
if (!n) return;
|
|
13905
|
-
n.drawImage(
|
|
13905
|
+
n.drawImage(M.current, 0, 0);
|
|
13906
13906
|
let r = document.createElement("a");
|
|
13907
13907
|
r.download = `${t.replace(/[/:]/g, "-")}-${Date.now()}.jpg`, r.href = e.toDataURL("image/jpeg", .92), r.click();
|
|
13908
13908
|
};
|
|
13909
13909
|
v(() => {
|
|
13910
|
-
let e = () =>
|
|
13910
|
+
let e = () => G(!!document.fullscreenElement);
|
|
13911
13911
|
document.addEventListener("fullscreenchange", e);
|
|
13912
|
-
let t =
|
|
13912
|
+
let t = M.current;
|
|
13913
13913
|
return t?.addEventListener("webkitbeginfullscreen", e), t?.addEventListener("webkitendfullscreen", e), () => {
|
|
13914
13914
|
document.removeEventListener("fullscreenchange", e), t?.removeEventListener("webkitbeginfullscreen", e), t?.removeEventListener("webkitendfullscreen", e);
|
|
13915
13915
|
};
|
|
13916
13916
|
}, []), v(() => {
|
|
13917
|
-
let e =
|
|
13918
|
-
|
|
13917
|
+
let e = M.current, t = typeof document < "u" && document.pictureInPictureEnabled === !0, n = e !== null && typeof e.webkitSetPresentationMode == "function";
|
|
13918
|
+
xe(t || n);
|
|
13919
13919
|
}, []);
|
|
13920
|
-
let [
|
|
13920
|
+
let [at, ot] = l(null), [st, ct] = l(null), [lt, ut] = l(null), [dt, ft] = l(() => Date.now()), pt = s || c !== void 0;
|
|
13921
13921
|
v(() => {
|
|
13922
13922
|
if (!s) return;
|
|
13923
|
-
let e = setInterval(() =>
|
|
13923
|
+
let e = setInterval(() => ft(Date.now()), 500);
|
|
13924
13924
|
return () => clearInterval(e);
|
|
13925
13925
|
}, [s]), v(() => {
|
|
13926
|
-
if (!
|
|
13927
|
-
|
|
13926
|
+
if (!pt) {
|
|
13927
|
+
ot(null);
|
|
13928
13928
|
return;
|
|
13929
13929
|
}
|
|
13930
13930
|
let e = { current: null }, t = !1, n = async () => {
|
|
13931
|
-
let n =
|
|
13931
|
+
let n = P.current;
|
|
13932
13932
|
if (n) try {
|
|
13933
13933
|
let r = await n.getStats();
|
|
13934
13934
|
if (t) return;
|
|
@@ -13939,7 +13939,7 @@ function Uf({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
13939
13939
|
iceConnectionState: n.iceConnectionState,
|
|
13940
13940
|
dtlsState: n.connectionState
|
|
13941
13941
|
});
|
|
13942
|
-
e.current = i,
|
|
13942
|
+
e.current = i, ot(i);
|
|
13943
13943
|
} catch {}
|
|
13944
13944
|
};
|
|
13945
13945
|
n();
|
|
@@ -13949,24 +13949,24 @@ function Uf({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
13949
13949
|
return () => {
|
|
13950
13950
|
t = !0, clearInterval(r);
|
|
13951
13951
|
};
|
|
13952
|
-
}, [
|
|
13953
|
-
if (!
|
|
13954
|
-
|
|
13952
|
+
}, [pt]), v(() => {
|
|
13953
|
+
if (!pt || !O) {
|
|
13954
|
+
ct(null), ut(null);
|
|
13955
13955
|
return;
|
|
13956
13956
|
}
|
|
13957
13957
|
let e = !1, t = async () => {
|
|
13958
|
-
let t =
|
|
13958
|
+
let t = se.current;
|
|
13959
13959
|
if (t === null) {
|
|
13960
|
-
|
|
13960
|
+
ut("no session id on this player yet — nothing to ask the server about");
|
|
13961
13961
|
return;
|
|
13962
13962
|
}
|
|
13963
13963
|
try {
|
|
13964
|
-
let n = await
|
|
13964
|
+
let n = await O(t);
|
|
13965
13965
|
if (e) return;
|
|
13966
|
-
|
|
13966
|
+
ct(n), ut(null);
|
|
13967
13967
|
} catch (t) {
|
|
13968
13968
|
if (e) return;
|
|
13969
|
-
|
|
13969
|
+
ut(t instanceof Error ? t.message : String(t));
|
|
13970
13970
|
}
|
|
13971
13971
|
};
|
|
13972
13972
|
t();
|
|
@@ -13976,68 +13976,91 @@ function Uf({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
13976
13976
|
return () => {
|
|
13977
13977
|
e = !0, clearInterval(n);
|
|
13978
13978
|
};
|
|
13979
|
-
}, [
|
|
13980
|
-
let
|
|
13979
|
+
}, [pt, O]);
|
|
13980
|
+
let mt = u(c);
|
|
13981
|
+
mt.current = c, v(() => {
|
|
13982
|
+
if (c === void 0) return;
|
|
13983
|
+
let e = () => {
|
|
13984
|
+
mt.current?.({
|
|
13985
|
+
at: Date.now(),
|
|
13986
|
+
sessionId: se.current,
|
|
13987
|
+
stats: ht.current,
|
|
13988
|
+
server: gt.current,
|
|
13989
|
+
serverError: _t.current,
|
|
13990
|
+
serverWired: O !== void 0
|
|
13991
|
+
});
|
|
13992
|
+
};
|
|
13993
|
+
e();
|
|
13994
|
+
let t = setInterval(e, 1e3);
|
|
13995
|
+
return () => clearInterval(t);
|
|
13996
|
+
}, [c === void 0, O]);
|
|
13997
|
+
let ht = u(null);
|
|
13998
|
+
ht.current = at;
|
|
13999
|
+
let gt = u(null);
|
|
14000
|
+
gt.current = st;
|
|
14001
|
+
let _t = u(null);
|
|
14002
|
+
_t.current = lt;
|
|
14003
|
+
let vt = u(null);
|
|
13981
14004
|
v(() => {
|
|
13982
|
-
if (!
|
|
13983
|
-
|
|
14005
|
+
if (!f) {
|
|
14006
|
+
vt.current = null;
|
|
13984
14007
|
return;
|
|
13985
14008
|
}
|
|
13986
14009
|
let e = async () => {
|
|
13987
|
-
let e =
|
|
14010
|
+
let e = P.current;
|
|
13988
14011
|
if (e) try {
|
|
13989
14012
|
let t = await e.getStats(), n = 0, r = 0, i = 0, a = 0, o = 0, s = 0;
|
|
13990
14013
|
t.forEach((e) => {
|
|
13991
14014
|
let t = e;
|
|
13992
14015
|
t.type === "inbound-rtp" && (t.kind ?? t.mediaType) === "video" ? (n = t.packetsLost ?? 0, r = t.packetsReceived ?? 0, i = t.bytesReceived ?? 0, a = t.timestamp, o = t.jitter ?? 0) : t.type === "candidate-pair" && t.nominated && typeof t.currentRoundTripTime == "number" && (s = t.currentRoundTripTime);
|
|
13993
14016
|
});
|
|
13994
|
-
let c =
|
|
13995
|
-
if (
|
|
14017
|
+
let c = vt.current;
|
|
14018
|
+
if (vt.current = {
|
|
13996
14019
|
lost: n,
|
|
13997
14020
|
recv: r,
|
|
13998
14021
|
bytes: i,
|
|
13999
14022
|
ts: a
|
|
14000
14023
|
}, !c || a <= c.ts) return;
|
|
14001
|
-
let l = Math.max(0, n - c.lost), u = l + Math.max(0, r - c.recv),
|
|
14002
|
-
|
|
14024
|
+
let l = Math.max(0, n - c.lost), u = l + Math.max(0, r - c.recv), d = u > 0 ? Math.min(100, l / u * 100) : 0, p = Math.max(0, Math.round((i - c.bytes) * 8 / (a - c.ts)));
|
|
14025
|
+
f({
|
|
14003
14026
|
rttMs: Math.round(s * 1e3),
|
|
14004
14027
|
jitterMs: Math.round(o * 1e3),
|
|
14005
14028
|
estimatedBandwidthKbps: p,
|
|
14006
|
-
packetLossPercent:
|
|
14029
|
+
packetLossPercent: d
|
|
14007
14030
|
});
|
|
14008
14031
|
} catch {}
|
|
14009
14032
|
}, t = setInterval(() => {
|
|
14010
14033
|
e();
|
|
14011
14034
|
}, 2e3);
|
|
14012
14035
|
return () => clearInterval(t);
|
|
14013
|
-
}, [
|
|
14014
|
-
let
|
|
14036
|
+
}, [f]);
|
|
14037
|
+
let yt = u(null);
|
|
14015
14038
|
v(() => {
|
|
14016
|
-
if (!
|
|
14017
|
-
|
|
14039
|
+
if (!d) {
|
|
14040
|
+
yt.current = null;
|
|
14018
14041
|
return;
|
|
14019
14042
|
}
|
|
14020
14043
|
let e = async () => {
|
|
14021
|
-
let e =
|
|
14044
|
+
let e = P.current, t = M.current;
|
|
14022
14045
|
if (e) try {
|
|
14023
|
-
let n = await e.getStats(), r = 0, i = 0, a = 0, o = 0, s = 0,
|
|
14046
|
+
let n = await e.getStats(), r = 0, i = 0, a = 0, o = 0, s = 0, c = 0, l = 0, u = 0;
|
|
14024
14047
|
n.forEach((e) => {
|
|
14025
14048
|
let t = e;
|
|
14026
|
-
t.type === "inbound-rtp" && (t.kind ?? t.mediaType) === "video" && (r = t.framesReceived ?? 0, i = t.framesDecoded ?? 0, a = t.framesDropped ?? 0, o = t.framesPerSecond ?? 0, s = t.freezeCount ?? 0,
|
|
14049
|
+
t.type === "inbound-rtp" && (t.kind ?? t.mediaType) === "video" && (r = t.framesReceived ?? 0, i = t.framesDecoded ?? 0, a = t.framesDropped ?? 0, o = t.framesPerSecond ?? 0, s = t.freezeCount ?? 0, c = t.totalFreezesDuration ?? 0, l = t.jitterBufferDelay ?? 0, u = t.jitterBufferEmittedCount ?? 0);
|
|
14027
14050
|
});
|
|
14028
|
-
let f = t?.currentTime ?? 0, p = Date.now(), m =
|
|
14029
|
-
m &&
|
|
14051
|
+
let f = t?.currentTime ?? 0, p = Date.now(), m = yt.current, h = u > 0 ? Math.round(l / u * 1e3) : 0;
|
|
14052
|
+
m && d({
|
|
14030
14053
|
dRecv: r - m.recv,
|
|
14031
14054
|
dDec: i - m.dec,
|
|
14032
14055
|
dDrop: a - m.drop,
|
|
14033
14056
|
fps: Math.round(o),
|
|
14034
14057
|
dFreeze: s - m.freeze,
|
|
14035
|
-
freezeTotalMs: Math.round(
|
|
14058
|
+
freezeTotalMs: Math.round(c * 1e3),
|
|
14036
14059
|
avgJitterMs: h,
|
|
14037
14060
|
dCtMs: Math.round((f - m.ct) * 1e3),
|
|
14038
14061
|
dtMs: p - m.ts,
|
|
14039
14062
|
readyState: t?.readyState ?? -1
|
|
14040
|
-
}),
|
|
14063
|
+
}), yt.current = {
|
|
14041
14064
|
recv: r,
|
|
14042
14065
|
dec: i,
|
|
14043
14066
|
drop: a,
|
|
@@ -14052,77 +14075,77 @@ function Uf({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
14052
14075
|
e();
|
|
14053
14076
|
}, 5e3);
|
|
14054
14077
|
return () => clearInterval(t);
|
|
14055
|
-
}, [
|
|
14056
|
-
|
|
14057
|
-
let e =
|
|
14078
|
+
}, [d]), v(() => {
|
|
14079
|
+
_e(i);
|
|
14080
|
+
let e = M.current;
|
|
14058
14081
|
e && (Nf(e, i), i || e.play().catch(() => {}));
|
|
14059
14082
|
}, [i]);
|
|
14060
|
-
let
|
|
14061
|
-
|
|
14062
|
-
},
|
|
14063
|
-
|
|
14083
|
+
let bt = () => {
|
|
14084
|
+
Se || (we(!0), Te.current && clearTimeout(Te.current), Te.current = setTimeout(() => we(!1), 3e3));
|
|
14085
|
+
}, xt = () => {
|
|
14086
|
+
we((e) => !e), Te.current && clearTimeout(Te.current);
|
|
14064
14087
|
};
|
|
14065
14088
|
v(() => {
|
|
14066
|
-
if (
|
|
14067
|
-
|
|
14068
|
-
let e = setInterval(
|
|
14089
|
+
if (pe === "playing") {
|
|
14090
|
+
Le();
|
|
14091
|
+
let e = setInterval(Le, 2e3);
|
|
14069
14092
|
return () => clearInterval(e);
|
|
14070
14093
|
}
|
|
14071
|
-
|
|
14094
|
+
Ae && Me.current && Pe(Me.current);
|
|
14072
14095
|
}, [
|
|
14073
|
-
|
|
14074
|
-
|
|
14075
|
-
|
|
14096
|
+
pe,
|
|
14097
|
+
Ae,
|
|
14098
|
+
Le
|
|
14076
14099
|
]), v(() => {
|
|
14077
|
-
if (
|
|
14078
|
-
|
|
14100
|
+
if (pe !== "playing") {
|
|
14101
|
+
Ie(!1);
|
|
14079
14102
|
return;
|
|
14080
14103
|
}
|
|
14081
|
-
let e =
|
|
14104
|
+
let e = M.current;
|
|
14082
14105
|
if (!e) return;
|
|
14083
14106
|
let t = !1, n = () => {
|
|
14084
|
-
t ||
|
|
14107
|
+
t || Ie(!0);
|
|
14085
14108
|
}, r;
|
|
14086
14109
|
typeof e.requestVideoFrameCallback == "function" && (r = e.requestVideoFrameCallback(() => n())), e.addEventListener("loadeddata", n, { once: !0 });
|
|
14087
14110
|
let i = setTimeout(n, 12e3);
|
|
14088
14111
|
return () => {
|
|
14089
14112
|
t = !0, clearTimeout(i), r !== void 0 && typeof e.cancelVideoFrameCallback == "function" && e.cancelVideoFrameCallback(r), e.removeEventListener("loadeddata", n);
|
|
14090
14113
|
};
|
|
14091
|
-
}, [
|
|
14092
|
-
let
|
|
14114
|
+
}, [pe]);
|
|
14115
|
+
let St = Ae && Ne ? Ne : ee ?? null, Ct = !Fe && St !== null;
|
|
14093
14116
|
return /* @__PURE__ */ H("div", {
|
|
14094
|
-
ref:
|
|
14095
|
-
className: `relative isolate bg-black overflow-hidden group ${
|
|
14096
|
-
onMouseMove:
|
|
14097
|
-
onMouseEnter:
|
|
14098
|
-
onTouchStart:
|
|
14117
|
+
ref: N,
|
|
14118
|
+
className: `relative isolate bg-black overflow-hidden group ${m}`,
|
|
14119
|
+
onMouseMove: bt,
|
|
14120
|
+
onMouseEnter: bt,
|
|
14121
|
+
onTouchStart: xt,
|
|
14099
14122
|
children: [
|
|
14100
14123
|
/* @__PURE__ */ V("video", {
|
|
14101
|
-
ref:
|
|
14124
|
+
ref: M,
|
|
14102
14125
|
autoPlay: r,
|
|
14103
|
-
muted:
|
|
14126
|
+
muted: ge,
|
|
14104
14127
|
playsInline: !0,
|
|
14105
14128
|
className: "w-full h-full object-contain relative z-0"
|
|
14106
14129
|
}),
|
|
14107
|
-
|
|
14108
|
-
src:
|
|
14130
|
+
Ct && St && /* @__PURE__ */ V("img", {
|
|
14131
|
+
src: St,
|
|
14109
14132
|
alt: "",
|
|
14110
14133
|
className: "absolute inset-0 w-full h-full object-contain z-[5] transform-gpu pointer-events-none"
|
|
14111
14134
|
}),
|
|
14112
|
-
n &&
|
|
14135
|
+
n && pe === "playing" && /* @__PURE__ */ V("div", {
|
|
14113
14136
|
className: "absolute top-2 left-2 z-10 transform-gpu px-2 py-0.5 rounded bg-black/60 text-[10px] text-white font-medium",
|
|
14114
14137
|
children: n
|
|
14115
14138
|
}),
|
|
14116
14139
|
s && /* @__PURE__ */ V(Mf, {
|
|
14117
|
-
stats:
|
|
14118
|
-
server:
|
|
14119
|
-
serverError:
|
|
14120
|
-
serverWired:
|
|
14121
|
-
now:
|
|
14122
|
-
sessionId:
|
|
14140
|
+
stats: at,
|
|
14141
|
+
server: st,
|
|
14142
|
+
serverError: lt,
|
|
14143
|
+
serverWired: O !== void 0,
|
|
14144
|
+
now: dt,
|
|
14145
|
+
sessionId: se.current
|
|
14123
14146
|
}),
|
|
14124
|
-
|
|
14125
|
-
a && !
|
|
14147
|
+
y,
|
|
14148
|
+
a && !St && pe === "connecting" && /* @__PURE__ */ H("div", {
|
|
14126
14149
|
className: "absolute inset-0 z-10 transform-gpu flex flex-col items-center justify-center bg-black/70 gap-2",
|
|
14127
14150
|
children: [/* @__PURE__ */ V("svg", {
|
|
14128
14151
|
className: "h-6 w-6 text-white/60 animate-spin",
|
|
@@ -14144,7 +14167,7 @@ function Uf({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
14144
14167
|
children: "Connecting…"
|
|
14145
14168
|
})]
|
|
14146
14169
|
}),
|
|
14147
|
-
a && !
|
|
14170
|
+
a && !St && (pe === "error" || pe === "disconnected") && /* @__PURE__ */ H("div", {
|
|
14148
14171
|
className: "absolute inset-0 z-10 transform-gpu flex flex-col items-center justify-center bg-black/70 gap-2",
|
|
14149
14172
|
children: [
|
|
14150
14173
|
/* @__PURE__ */ V("svg", {
|
|
@@ -14160,16 +14183,16 @@ function Uf({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
14160
14183
|
}),
|
|
14161
14184
|
/* @__PURE__ */ V("span", {
|
|
14162
14185
|
className: "text-xs text-red-400 text-center px-4",
|
|
14163
|
-
children:
|
|
14186
|
+
children: pe === "error" ? W || "Connection failed" : "Disconnected"
|
|
14164
14187
|
}),
|
|
14165
14188
|
/* @__PURE__ */ V("button", {
|
|
14166
|
-
onClick:
|
|
14189
|
+
onClick: Xe,
|
|
14167
14190
|
className: "mt-1 inline-flex items-center gap-1.5 rounded px-3 py-1 text-xs bg-white/10 text-white hover:bg-white/20 transition-colors",
|
|
14168
14191
|
children: "Reconnect"
|
|
14169
14192
|
})
|
|
14170
14193
|
]
|
|
14171
14194
|
}),
|
|
14172
|
-
a &&
|
|
14195
|
+
a && St && (pe === "connecting" || pe === "disconnected") && /* @__PURE__ */ V("div", {
|
|
14173
14196
|
className: "absolute top-2 left-2 z-10 transform-gpu flex h-6 w-6 items-center justify-center rounded-full bg-black/55",
|
|
14174
14197
|
children: /* @__PURE__ */ V("svg", {
|
|
14175
14198
|
className: "h-3.5 w-3.5 text-white/90 animate-spin",
|
|
@@ -14188,9 +14211,9 @@ function Uf({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
14188
14211
|
})
|
|
14189
14212
|
})
|
|
14190
14213
|
}),
|
|
14191
|
-
a &&
|
|
14192
|
-
onClick:
|
|
14193
|
-
title:
|
|
14214
|
+
a && St && pe === "error" && /* @__PURE__ */ V("button", {
|
|
14215
|
+
onClick: Xe,
|
|
14216
|
+
title: W || "Reconnect",
|
|
14194
14217
|
className: "absolute top-2 left-2 z-10 transform-gpu flex h-6 w-6 items-center justify-center rounded-full bg-black/55 text-white/90 hover:bg-black/75 transition-colors",
|
|
14195
14218
|
children: /* @__PURE__ */ H("svg", {
|
|
14196
14219
|
className: "h-3.5 w-3.5",
|
|
@@ -14203,14 +14226,14 @@ function Uf({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
14203
14226
|
children: [/* @__PURE__ */ V("path", { d: "M23 4v6h-6M1 20v-6h6" }), /* @__PURE__ */ V("path", { d: "M3.51 9a9 9 0 0114.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0020.49 15" })]
|
|
14204
14227
|
})
|
|
14205
14228
|
}),
|
|
14206
|
-
a &&
|
|
14207
|
-
className: `absolute bottom-0 inset-x-0 z-20 transform-gpu flex items-center justify-between px-3 py-1.5 bg-gradient-to-t from-black/80 to-transparent transition-opacity duration-200 ${
|
|
14229
|
+
a && pe !== "idle" && pe !== "error" && /* @__PURE__ */ H("div", {
|
|
14230
|
+
className: `absolute bottom-0 inset-x-0 z-20 transform-gpu flex items-center justify-between px-3 py-1.5 bg-gradient-to-t from-black/80 to-transparent transition-opacity duration-200 ${Se || Ce ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none"}`,
|
|
14208
14231
|
children: [/* @__PURE__ */ V("div", {
|
|
14209
14232
|
className: "flex items-center gap-1",
|
|
14210
14233
|
children: /* @__PURE__ */ V(Wf, {
|
|
14211
|
-
onClick:
|
|
14212
|
-
title:
|
|
14213
|
-
children:
|
|
14234
|
+
onClick: tt,
|
|
14235
|
+
title: ge ? "Unmute" : "Mute",
|
|
14236
|
+
children: ge ? /* @__PURE__ */ H("svg", {
|
|
14214
14237
|
className: "h-3.5 w-3.5",
|
|
14215
14238
|
viewBox: "0 0 24 24",
|
|
14216
14239
|
fill: "none",
|
|
@@ -14246,7 +14269,7 @@ function Uf({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
14246
14269
|
className: "flex items-center gap-1",
|
|
14247
14270
|
children: [
|
|
14248
14271
|
/* @__PURE__ */ V(Wf, {
|
|
14249
|
-
onClick:
|
|
14272
|
+
onClick: it,
|
|
14250
14273
|
title: "Take snapshot",
|
|
14251
14274
|
children: /* @__PURE__ */ H("svg", {
|
|
14252
14275
|
className: "h-3.5 w-3.5",
|
|
@@ -14262,8 +14285,8 @@ function Uf({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
14262
14285
|
})]
|
|
14263
14286
|
})
|
|
14264
14287
|
}),
|
|
14265
|
-
|
|
14266
|
-
onClick:
|
|
14288
|
+
be && /* @__PURE__ */ V(Wf, {
|
|
14289
|
+
onClick: rt,
|
|
14267
14290
|
title: "Picture-in-Picture",
|
|
14268
14291
|
children: /* @__PURE__ */ H("svg", {
|
|
14269
14292
|
className: "h-3.5 w-3.5",
|
|
@@ -14283,9 +14306,9 @@ function Uf({ serverUrl: e, streamKey: t, label: n, autoPlay: r = !0, muted: i =
|
|
|
14283
14306
|
})
|
|
14284
14307
|
}),
|
|
14285
14308
|
/* @__PURE__ */ V(Wf, {
|
|
14286
|
-
onClick:
|
|
14287
|
-
title:
|
|
14288
|
-
children:
|
|
14309
|
+
onClick: nt,
|
|
14310
|
+
title: ye ? "Exit fullscreen" : "Fullscreen",
|
|
14311
|
+
children: ye ? /* @__PURE__ */ V("svg", {
|
|
14289
14312
|
className: "h-3.5 w-3.5",
|
|
14290
14313
|
viewBox: "0 0 24 24",
|
|
14291
14314
|
fill: "none",
|
|
@@ -15476,26 +15499,26 @@ function Nm(e, t) {
|
|
|
15476
15499
|
return t ? (Am[e] ?? 0) >= (Am[t] ?? 0) : !0;
|
|
15477
15500
|
}
|
|
15478
15501
|
function Pm({ agentId: e, addonId: t, deviceId: n, containerDeviceId: r, integrationId: i, requestId: a, level: s, maxHeight: d = "max-h-96", showScope: f = !1, showDeviceChip: p = !1, showFilters: m = !0, limit: g = 100, liveBuffer: _, onClose: y, className: b }) {
|
|
15479
|
-
let [x, S] = l(""), [C, w] = l(""), [T, E] = l(s ?? "info"), D = e, O = t ?? (x || void 0), k = n ?? (C ? Number(C) : void 0), ee = i,
|
|
15502
|
+
let [x, S] = l(""), [C, w] = l(""), [T, E] = l(s ?? "info"), D = e, O = t ?? (x || void 0), k = n ?? (C ? Number(C) : void 0), ee = i, A = a, te = h(() => {
|
|
15480
15503
|
let e = {};
|
|
15481
|
-
return D && (e.agentId = D), O && (e.addonId = O), r !== void 0 && Number.isFinite(r) ? e.containerDeviceId = r : k !== void 0 && Number.isFinite(k) && (e.deviceId = k), ee && (e.integrationId = ee),
|
|
15504
|
+
return D && (e.agentId = D), O && (e.addonId = O), r !== void 0 && Number.isFinite(r) ? e.containerDeviceId = r : k !== void 0 && Number.isFinite(k) && (e.deviceId = k), ee && (e.integrationId = ee), A && (e.requestId = A), Object.keys(e).length > 0 ? e : void 0;
|
|
15482
15505
|
}, [
|
|
15483
15506
|
D,
|
|
15484
15507
|
O,
|
|
15485
15508
|
k,
|
|
15486
15509
|
r,
|
|
15487
15510
|
ee,
|
|
15488
|
-
|
|
15489
|
-
]),
|
|
15511
|
+
A
|
|
15512
|
+
]), ne = Em(Mm), j = _ ?? ne, M = j.entries, [N, F] = l(0), [I, L] = l(!0), R = u(!1), [z, B] = l(!1), [ae, oe] = l(!1), [U, se] = l(/* @__PURE__ */ new Set()), [ce, le] = l(""), ue = u(null), de = `${D ?? ""}:${O ?? ""}:${String(k ?? "")}:${String(r ?? "")}:${ee ?? ""}:${A ?? ""}`, fe = u(de);
|
|
15490
15513
|
v(() => {
|
|
15491
|
-
fe.current !== de && (fe.current = de,
|
|
15492
|
-
}, [de,
|
|
15514
|
+
fe.current !== de && (fe.current = de, j.reset(), F(0), se(/* @__PURE__ */ new Set()), B(!1));
|
|
15515
|
+
}, [de, j]);
|
|
15493
15516
|
let { data: pe, isLoading: me } = J.logs.query.useQuery({
|
|
15494
|
-
...
|
|
15517
|
+
...te ? { tags: te } : {},
|
|
15495
15518
|
limit: g
|
|
15496
15519
|
}, { staleTime: 3e4 });
|
|
15497
|
-
J.logs.subscribe.useSubscription(
|
|
15498
|
-
|
|
15520
|
+
J.logs.subscribe.useSubscription(te ? { tags: te } : {}, { onData: (e) => {
|
|
15521
|
+
j.append(e);
|
|
15499
15522
|
} });
|
|
15500
15523
|
let W = h(() => {
|
|
15501
15524
|
let e = (pe ?? []).map((e) => ({
|
|
@@ -15507,8 +15530,8 @@ function Pm({ agentId: e, addonId: t, deviceId: n, containerDeviceId: r, integra
|
|
|
15507
15530
|
meta: e.meta
|
|
15508
15531
|
})), t = /* @__PURE__ */ new Map();
|
|
15509
15532
|
for (let n of e) t.set(`${n.timestamp}|${n.level}|${n.scope ?? ""}|${n.message}`, n);
|
|
15510
|
-
for (let e of
|
|
15511
|
-
let n = [...t.values()].toSorted((e, t) => new Date(e.timestamp).getTime() - new Date(t.timestamp).getTime()), r = (
|
|
15533
|
+
for (let e of M) t.set(`${e.timestamp}|${e.level}|${e.scope ?? ""}|${e.message}`, e);
|
|
15534
|
+
let n = [...t.values()].toSorted((e, t) => new Date(e.timestamp).getTime() - new Date(t.timestamp).getTime()), r = (N > 0 ? n.filter((e) => new Date(e.timestamp).getTime() > N) : n).filter((e) => Nm(e.level, T)), i = ce.trim().toLowerCase();
|
|
15512
15535
|
return i ? r.filter((e) => {
|
|
15513
15536
|
if (e.message.toLowerCase().includes(i) || e.scope && e.scope.toLowerCase().includes(i)) return !0;
|
|
15514
15537
|
if (e.tags) {
|
|
@@ -15521,38 +15544,38 @@ function Pm({ agentId: e, addonId: t, deviceId: n, containerDeviceId: r, integra
|
|
|
15521
15544
|
}) : r;
|
|
15522
15545
|
}, [
|
|
15523
15546
|
pe,
|
|
15524
|
-
|
|
15547
|
+
M,
|
|
15525
15548
|
T,
|
|
15526
|
-
|
|
15549
|
+
N,
|
|
15527
15550
|
ce
|
|
15528
15551
|
]), he = o((e) => {
|
|
15529
15552
|
let t = ue.current;
|
|
15530
|
-
t && (
|
|
15553
|
+
t && (R.current = !0, t.scrollTo({
|
|
15531
15554
|
top: t.scrollHeight,
|
|
15532
15555
|
...e ? { behavior: e } : {}
|
|
15533
15556
|
}));
|
|
15534
15557
|
}, []), [ge, _e] = l(!1), ve = u(W.length);
|
|
15535
15558
|
c(() => {
|
|
15536
15559
|
let e = W.length > ve.current;
|
|
15537
|
-
ve.current = W.length, e && (
|
|
15560
|
+
ve.current = W.length, e && (I ? he() : _e(!0));
|
|
15538
15561
|
}, [
|
|
15539
15562
|
W.length,
|
|
15540
|
-
|
|
15563
|
+
I,
|
|
15541
15564
|
he
|
|
15542
15565
|
]), v(() => {
|
|
15543
|
-
|
|
15544
|
-
}, [
|
|
15566
|
+
I && ge && _e(!1);
|
|
15567
|
+
}, [I, ge]);
|
|
15545
15568
|
let ye = o(() => {
|
|
15546
|
-
|
|
15569
|
+
L(!0), he("smooth");
|
|
15547
15570
|
}, [he]), G = o(() => {
|
|
15548
|
-
if (
|
|
15549
|
-
|
|
15571
|
+
if (R.current) {
|
|
15572
|
+
R.current = !1;
|
|
15550
15573
|
return;
|
|
15551
15574
|
}
|
|
15552
15575
|
let e = ue.current;
|
|
15553
15576
|
if (!e) return;
|
|
15554
15577
|
let t = Dm(e, 40);
|
|
15555
|
-
|
|
15578
|
+
L((e) => e === t ? e : t);
|
|
15556
15579
|
}, []), be = h(() => W.filter((e) => e.tags && Object.keys(e.tags).length > 0 || e.meta && Object.keys(e.meta).length > 0).map((e) => `${e.timestamp}|${e.level}|${e.scope ?? ""}|${e.message}`), [W]), xe = o(() => {
|
|
15557
15580
|
B((e) => (e && se(/* @__PURE__ */ new Set()), !e));
|
|
15558
15581
|
}, []), Se = o(() => {
|
|
@@ -15564,11 +15587,11 @@ function Pm({ agentId: e, addonId: t, deviceId: n, containerDeviceId: r, integra
|
|
|
15564
15587
|
oe(!0), setTimeout(() => oe(!1), 1500);
|
|
15565
15588
|
});
|
|
15566
15589
|
}, [W]), Ce = J.logs.clear.useMutation(), we = o(() => {
|
|
15567
|
-
|
|
15590
|
+
F(Date.now()), j.reset(), Ce.mutate(te ? { tags: te } : {});
|
|
15568
15591
|
}, [
|
|
15569
|
-
|
|
15592
|
+
j,
|
|
15570
15593
|
Ce,
|
|
15571
|
-
|
|
15594
|
+
te
|
|
15572
15595
|
]), Te = o((e) => {
|
|
15573
15596
|
se((t) => {
|
|
15574
15597
|
let n = new Set(t);
|
|
@@ -15616,16 +15639,16 @@ function Pm({ agentId: e, addonId: t, deviceId: n, containerDeviceId: r, integra
|
|
|
15616
15639
|
}),
|
|
15617
15640
|
/* @__PURE__ */ V(Rm, {
|
|
15618
15641
|
icon: Ge,
|
|
15619
|
-
label:
|
|
15620
|
-
active:
|
|
15642
|
+
label: I ? "Following" : "Paused",
|
|
15643
|
+
active: I,
|
|
15621
15644
|
onClick: () => {
|
|
15622
|
-
|
|
15645
|
+
I ? L(!1) : ye();
|
|
15623
15646
|
}
|
|
15624
15647
|
}),
|
|
15625
15648
|
/* @__PURE__ */ V(Rm, {
|
|
15626
|
-
icon:
|
|
15627
|
-
label:
|
|
15628
|
-
active:
|
|
15649
|
+
icon: z ? _t : vt,
|
|
15650
|
+
label: z ? "Collapse" : "Expand",
|
|
15651
|
+
active: z,
|
|
15629
15652
|
onClick: xe,
|
|
15630
15653
|
disabled: be.length === 0
|
|
15631
15654
|
}),
|
|
@@ -15656,11 +15679,11 @@ function Pm({ agentId: e, addonId: t, deviceId: n, containerDeviceId: r, integra
|
|
|
15656
15679
|
children: /* @__PURE__ */ V(Vr, { className: "h-2.5 w-2.5" })
|
|
15657
15680
|
})]
|
|
15658
15681
|
}),
|
|
15659
|
-
|
|
15682
|
+
M.length > 0 && /* @__PURE__ */ H("span", {
|
|
15660
15683
|
className: "text-[9px] text-emerald-400 font-medium",
|
|
15661
15684
|
children: [
|
|
15662
15685
|
"+",
|
|
15663
|
-
|
|
15686
|
+
M.length,
|
|
15664
15687
|
" live"
|
|
15665
15688
|
]
|
|
15666
15689
|
})
|
|
@@ -15703,7 +15726,7 @@ function Pm({ agentId: e, addonId: t, deviceId: n, containerDeviceId: r, integra
|
|
|
15703
15726
|
}),
|
|
15704
15727
|
/* @__PURE__ */ H("div", {
|
|
15705
15728
|
className: "relative flex-1 min-h-0 flex flex-col",
|
|
15706
|
-
children: [!
|
|
15729
|
+
children: [!I && ge && /* @__PURE__ */ H("button", {
|
|
15707
15730
|
type: "button",
|
|
15708
15731
|
onClick: ye,
|
|
15709
15732
|
className: "absolute bottom-2 left-1/2 -translate-x-1/2 z-10 inline-flex items-center gap-1 px-2 py-1 rounded-full border border-primary/40 bg-primary/15 text-primary text-[10px] font-medium shadow-md backdrop-blur-sm hover:bg-primary/25 transition-colors",
|
|
@@ -15725,7 +15748,7 @@ function Pm({ agentId: e, addonId: t, deviceId: n, containerDeviceId: r, integra
|
|
|
15725
15748
|
W.length > 0 && /* @__PURE__ */ V("table", {
|
|
15726
15749
|
className: "w-full",
|
|
15727
15750
|
children: /* @__PURE__ */ V("tbody", { children: W.map((e) => {
|
|
15728
|
-
let t = km[e.level] ?? km.info, n = t.icon, r = ke(e), i =
|
|
15751
|
+
let t = km[e.level] ?? km.info, n = t.icon, r = ke(e), i = z || U.has(r), a = e.tags && Object.keys(e.tags).length > 0, o = e.meta && Object.keys(e.meta).length > 0, s = a || o;
|
|
15729
15752
|
return /* @__PURE__ */ H("tr", {
|
|
15730
15753
|
className: Z("hover:bg-surface-hover/30 border-b border-border/30", s && "cursor-pointer"),
|
|
15731
15754
|
onClick: s ? () => Te(r) : void 0,
|
|
@@ -15747,7 +15770,7 @@ function Pm({ agentId: e, addonId: t, deviceId: n, containerDeviceId: r, integra
|
|
|
15747
15770
|
className: "px-2 py-1 text-foreground break-all",
|
|
15748
15771
|
children: /* @__PURE__ */ H("div", {
|
|
15749
15772
|
className: "flex items-start gap-1",
|
|
15750
|
-
children: [s && V(i ?
|
|
15773
|
+
children: [s && V(i ? P : re, { className: "h-3 w-3 text-foreground-subtle shrink-0 mt-0.5" }), /* @__PURE__ */ H("div", {
|
|
15751
15774
|
className: "flex-1 min-w-0",
|
|
15752
15775
|
children: [
|
|
15753
15776
|
p && e.tags?.deviceId !== void 0 && /* @__PURE__ */ V(Fm, {
|
|
@@ -15883,7 +15906,7 @@ var Bm = {
|
|
|
15883
15906
|
label: "Updated"
|
|
15884
15907
|
},
|
|
15885
15908
|
[G.AddonStopped]: {
|
|
15886
|
-
icon:
|
|
15909
|
+
icon: R,
|
|
15887
15910
|
color: "bg-foreground-subtle/10 text-foreground-subtle border-border",
|
|
15888
15911
|
label: "Stopped"
|
|
15889
15912
|
},
|
|
@@ -15948,7 +15971,7 @@ var Bm = {
|
|
|
15948
15971
|
label: "Provider Det"
|
|
15949
15972
|
},
|
|
15950
15973
|
[G.PipelineAudioInferenceResult]: {
|
|
15951
|
-
icon:
|
|
15974
|
+
icon: I,
|
|
15952
15975
|
color: "bg-pink-500/15 text-pink-400 border-pink-500/30",
|
|
15953
15976
|
label: "Audio"
|
|
15954
15977
|
},
|
|
@@ -15958,7 +15981,7 @@ var Bm = {
|
|
|
15958
15981
|
label: "Agent Online"
|
|
15959
15982
|
},
|
|
15960
15983
|
[G.AgentOffline]: {
|
|
15961
|
-
icon:
|
|
15984
|
+
icon: R,
|
|
15962
15985
|
color: "bg-red-500/15 text-red-400 border-red-500/30",
|
|
15963
15986
|
label: "Agent Offline"
|
|
15964
15987
|
},
|
|
@@ -16080,19 +16103,19 @@ function Ym({ agentId: e, addonId: t, deviceId: n, defaultCategories: r, categor
|
|
|
16080
16103
|
v(() => {
|
|
16081
16104
|
S.current !== y && (S.current = y, x(new Set(_)));
|
|
16082
16105
|
}, [y, _]);
|
|
16083
|
-
let C = Em(Jm), w = p ?? C, T = w.entries, [E, D] = l(!0), [O, k] = l(/* @__PURE__ */ new Set()), [ee,
|
|
16106
|
+
let C = Em(Jm), w = p ?? C, T = w.entries, [E, D] = l(!0), [O, k] = l(/* @__PURE__ */ new Set()), [ee, A] = l(""), [te, ne] = l(!1), [M, N] = l(""), [F, I] = l(0), L = u(null), R = u(null), z = `${e ?? ""}:${t ?? ""}:${String(n ?? "")}:${a ?? ""}`, B = u(z);
|
|
16084
16107
|
v(() => {
|
|
16085
|
-
B.current !==
|
|
16086
|
-
}, [
|
|
16087
|
-
if (!
|
|
16108
|
+
B.current !== z && (B.current = z, w.reset(), k(/* @__PURE__ */ new Set()), I(0));
|
|
16109
|
+
}, [z, w]), v(() => {
|
|
16110
|
+
if (!te) return;
|
|
16088
16111
|
let e = (e) => {
|
|
16089
|
-
let t =
|
|
16090
|
-
t && e.target instanceof Node && !t.contains(e.target) &&
|
|
16112
|
+
let t = R.current;
|
|
16113
|
+
t && e.target instanceof Node && !t.contains(e.target) && ne(!1);
|
|
16091
16114
|
};
|
|
16092
16115
|
return document.addEventListener("mousedown", e), () => {
|
|
16093
16116
|
document.removeEventListener("mousedown", e);
|
|
16094
16117
|
};
|
|
16095
|
-
}, [
|
|
16118
|
+
}, [te]);
|
|
16096
16119
|
let ae = h(() => {
|
|
16097
16120
|
let r = {};
|
|
16098
16121
|
return e && (r.agentId = e), t && (r.addonId = t), n !== void 0 && (r.deviceId = n), a && (r.category = a), r;
|
|
@@ -16123,7 +16146,7 @@ function Ym({ agentId: e, addonId: t, deviceId: n, defaultCategories: r, categor
|
|
|
16123
16146
|
} });
|
|
16124
16147
|
let de = u(T.length);
|
|
16125
16148
|
v(() => {
|
|
16126
|
-
let e =
|
|
16149
|
+
let e = L.current;
|
|
16127
16150
|
if (!e) {
|
|
16128
16151
|
de.current = T.length;
|
|
16129
16152
|
return;
|
|
@@ -16142,7 +16165,7 @@ function Ym({ agentId: e, addonId: t, deviceId: n, defaultCategories: r, categor
|
|
|
16142
16165
|
for (let t of se ?? []) e.set(t.id, t);
|
|
16143
16166
|
for (let t of T) e.set(t.id, t);
|
|
16144
16167
|
let t = [...e.values()].filter((e) => b.has(e.category)).filter(qm);
|
|
16145
|
-
|
|
16168
|
+
F > 0 && (t = t.filter((e) => new Date(e.timestamp).getTime() > F));
|
|
16146
16169
|
let n = ee.trim().toLowerCase();
|
|
16147
16170
|
return n && (t = t.filter((e) => {
|
|
16148
16171
|
if (e.category.toLowerCase().includes(n) || Vm(e.category, e.data).label.toLowerCase().includes(n)) return !0;
|
|
@@ -16161,7 +16184,7 @@ function Ym({ agentId: e, addonId: t, deviceId: n, defaultCategories: r, categor
|
|
|
16161
16184
|
T,
|
|
16162
16185
|
b,
|
|
16163
16186
|
ee,
|
|
16164
|
-
|
|
16187
|
+
F
|
|
16165
16188
|
]), pe = o((e) => {
|
|
16166
16189
|
k((t) => {
|
|
16167
16190
|
let n = new Set(t);
|
|
@@ -16173,9 +16196,9 @@ function Ym({ agentId: e, addonId: t, deviceId: n, defaultCategories: r, categor
|
|
|
16173
16196
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
16174
16197
|
});
|
|
16175
16198
|
}, []), W = o(() => {
|
|
16176
|
-
x(new Set(_)),
|
|
16199
|
+
x(new Set(_)), A(""), I(0);
|
|
16177
16200
|
}, [_]), he = o(() => {
|
|
16178
|
-
|
|
16201
|
+
I(Date.now()), w.reset();
|
|
16179
16202
|
}, [w]), [ge, _e] = l(!1), [ve, ye] = l(null), G = o((e) => {
|
|
16180
16203
|
let t = new Date(e.timestamp).toISOString(), n = Km(e.category, e.data) ?? "", r = n ? ` ${n}` : "";
|
|
16181
16204
|
return `${t} [${e.category}]${r} data=${JSON.stringify(e.data)}`;
|
|
@@ -16193,9 +16216,9 @@ function Ym({ agentId: e, addonId: t, deviceId: n, defaultCategories: r, categor
|
|
|
16193
16216
|
}, []), Ce = o(() => {
|
|
16194
16217
|
x(/* @__PURE__ */ new Set());
|
|
16195
16218
|
}, []), we = h(() => {
|
|
16196
|
-
let e =
|
|
16219
|
+
let e = M.trim().toLowerCase();
|
|
16197
16220
|
return e ? Hm.filter((t) => t.toLowerCase().includes(e)) : Hm;
|
|
16198
|
-
}, [
|
|
16221
|
+
}, [M]), Te = Hm.length, Ee = b.size, De = Ee === Te, Oe = De ? "All" : `${Ee}/${Te}`;
|
|
16199
16222
|
return /* @__PURE__ */ H("div", {
|
|
16200
16223
|
className: Z("h-full min-h-0 flex flex-col", g),
|
|
16201
16224
|
onClick: (e) => e.stopPropagation(),
|
|
@@ -16227,7 +16250,7 @@ function Ym({ agentId: e, addonId: t, deviceId: n, defaultCategories: r, categor
|
|
|
16227
16250
|
/* @__PURE__ */ H("button", {
|
|
16228
16251
|
type: "button",
|
|
16229
16252
|
onClick: () => {
|
|
16230
|
-
D((e) => !e), !E &&
|
|
16253
|
+
D((e) => !e), !E && L.current && L.current.scrollTo({
|
|
16231
16254
|
top: 0,
|
|
16232
16255
|
behavior: "smooth"
|
|
16233
16256
|
});
|
|
@@ -16237,10 +16260,10 @@ function Ym({ agentId: e, addonId: t, deviceId: n, defaultCategories: r, categor
|
|
|
16237
16260
|
}),
|
|
16238
16261
|
d && /* @__PURE__ */ H("div", {
|
|
16239
16262
|
className: "relative",
|
|
16240
|
-
ref:
|
|
16263
|
+
ref: R,
|
|
16241
16264
|
children: [/* @__PURE__ */ H("button", {
|
|
16242
16265
|
type: "button",
|
|
16243
|
-
onClick: () =>
|
|
16266
|
+
onClick: () => ne((e) => !e),
|
|
16244
16267
|
className: Z("inline-flex items-center gap-1 text-[9px] px-1.5 py-0.5 rounded border transition-colors", De ? "border-border text-foreground-subtle hover:text-foreground" : "border-violet-500/30 bg-violet-500/10 text-violet-400"),
|
|
16245
16268
|
title: "Pick events to track",
|
|
16246
16269
|
children: [
|
|
@@ -16249,9 +16272,9 @@ function Ym({ agentId: e, addonId: t, deviceId: n, defaultCategories: r, categor
|
|
|
16249
16272
|
Oe,
|
|
16250
16273
|
")"
|
|
16251
16274
|
]
|
|
16252
|
-
}),
|
|
16253
|
-
search:
|
|
16254
|
-
onSearchChange:
|
|
16275
|
+
}), te && /* @__PURE__ */ V(Xm, {
|
|
16276
|
+
search: M,
|
|
16277
|
+
onSearchChange: N,
|
|
16255
16278
|
categories: we,
|
|
16256
16279
|
active: b,
|
|
16257
16280
|
onToggle: me,
|
|
@@ -16265,7 +16288,7 @@ function Ym({ agentId: e, addonId: t, deviceId: n, defaultCategories: r, categor
|
|
|
16265
16288
|
onClick: W,
|
|
16266
16289
|
className: "inline-flex items-center gap-1 text-[9px] px-1.5 py-0.5 rounded border border-border text-foreground-subtle hover:text-foreground transition-colors",
|
|
16267
16290
|
title: "Reset filters to defaults",
|
|
16268
|
-
children: [/* @__PURE__ */ V(
|
|
16291
|
+
children: [/* @__PURE__ */ V(j, { className: "h-2.5 w-2.5" }), "Reset"]
|
|
16269
16292
|
}),
|
|
16270
16293
|
/* @__PURE__ */ H("button", {
|
|
16271
16294
|
type: "button",
|
|
@@ -16287,12 +16310,12 @@ function Ym({ agentId: e, addonId: t, deviceId: n, defaultCategories: r, categor
|
|
|
16287
16310
|
children: [/* @__PURE__ */ V("input", {
|
|
16288
16311
|
type: "text",
|
|
16289
16312
|
value: ee,
|
|
16290
|
-
onChange: (e) =>
|
|
16313
|
+
onChange: (e) => A(e.target.value),
|
|
16291
16314
|
placeholder: "Search…",
|
|
16292
16315
|
className: "w-32 pl-1.5 pr-5 py-0.5 rounded border border-border bg-background text-foreground text-[10px] focus:outline-none focus:border-primary/50"
|
|
16293
16316
|
}), ee && /* @__PURE__ */ V("button", {
|
|
16294
16317
|
type: "button",
|
|
16295
|
-
onClick: () =>
|
|
16318
|
+
onClick: () => A(""),
|
|
16296
16319
|
className: "absolute right-1 top-1/2 -translate-y-1/2 text-foreground-subtle hover:text-foreground",
|
|
16297
16320
|
title: "Clear search",
|
|
16298
16321
|
children: /* @__PURE__ */ V(Vr, { className: "h-2.5 w-2.5" })
|
|
@@ -16314,7 +16337,7 @@ function Ym({ agentId: e, addonId: t, deviceId: n, defaultCategories: r, categor
|
|
|
16314
16337
|
children: /* @__PURE__ */ V(Vr, { className: "h-3.5 w-3.5" })
|
|
16315
16338
|
})]
|
|
16316
16339
|
}), /* @__PURE__ */ H("div", {
|
|
16317
|
-
ref:
|
|
16340
|
+
ref: L,
|
|
16318
16341
|
className: Z("flex-1 min-h-0 overflow-auto text-[10px]", s),
|
|
16319
16342
|
children: [
|
|
16320
16343
|
ce && /* @__PURE__ */ H("div", {
|
|
@@ -16347,7 +16370,7 @@ function Ym({ agentId: e, addonId: t, deviceId: n, defaultCategories: r, categor
|
|
|
16347
16370
|
/* @__PURE__ */ H("div", {
|
|
16348
16371
|
className: "flex items-center gap-1.5",
|
|
16349
16372
|
children: [
|
|
16350
|
-
V(i ?
|
|
16373
|
+
V(i ? P : re, { className: "h-3 w-3 text-foreground-subtle shrink-0" }),
|
|
16351
16374
|
/* @__PURE__ */ H("span", {
|
|
16352
16375
|
className: Z("inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[9px] font-medium", t.color),
|
|
16353
16376
|
children: [/* @__PURE__ */ V(n, { className: "h-2.5 w-2.5" }), t.label]
|
|
@@ -16837,7 +16860,7 @@ function bh({ trpc: e, deviceId: t, layout: n, optimistic: r, features: i }) {
|
|
|
16837
16860
|
m(!1);
|
|
16838
16861
|
}
|
|
16839
16862
|
}
|
|
16840
|
-
}, O = _ ? "Unlock" : "Lock", k = d === "open" ? "Open door?" : "Unlock device?", ee = d === "open" ? "This will release the latch and open the door." : "This will unlock the device.",
|
|
16863
|
+
}, O = _ ? "Unlock" : "Lock", k = d === "open" ? "Open door?" : "Unlock device?", ee = d === "open" ? "This will release the latch and open the door." : "This will unlock the device.", A = d === "open" ? "Confirm open" : "Confirm unlock", te = V(d === "open" ? zt : _n, { className: "h-4 w-4 text-amber-400" });
|
|
16841
16864
|
return /* @__PURE__ */ H("div", {
|
|
16842
16865
|
className: Z("inline-flex items-center", n === "full" ? "gap-2" : "gap-1"),
|
|
16843
16866
|
children: [
|
|
@@ -16874,7 +16897,7 @@ function bh({ trpc: e, deviceId: t, layout: n, optimistic: r, features: i }) {
|
|
|
16874
16897
|
children: [
|
|
16875
16898
|
/* @__PURE__ */ H(Md, { children: [/* @__PURE__ */ H(Pd, {
|
|
16876
16899
|
className: "flex items-center gap-2",
|
|
16877
|
-
children: [
|
|
16900
|
+
children: [te, k]
|
|
16878
16901
|
}), /* @__PURE__ */ V(Fd, { children: ee })] }),
|
|
16879
16902
|
h !== null && /* @__PURE__ */ V("div", {
|
|
16880
16903
|
className: "mt-2 px-3 py-2 rounded border border-danger/40 bg-danger/10 text-xs text-danger",
|
|
@@ -16891,12 +16914,12 @@ function bh({ trpc: e, deviceId: t, layout: n, optimistic: r, features: i }) {
|
|
|
16891
16914
|
type: "button",
|
|
16892
16915
|
variant: "danger",
|
|
16893
16916
|
size: "sm",
|
|
16894
|
-
"aria-label":
|
|
16917
|
+
"aria-label": A,
|
|
16895
16918
|
disabled: p,
|
|
16896
16919
|
onClick: () => {
|
|
16897
16920
|
D();
|
|
16898
16921
|
},
|
|
16899
|
-
children: [p && /* @__PURE__ */ V(gn, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
16922
|
+
children: [p && /* @__PURE__ */ V(gn, { className: "h-3.5 w-3.5 animate-spin" }), A]
|
|
16900
16923
|
})] })
|
|
16901
16924
|
]
|
|
16902
16925
|
})
|
|
@@ -18041,14 +18064,14 @@ function dg({ trpc: e, deviceId: t, optimistic: n }) {
|
|
|
18041
18064
|
busy: l,
|
|
18042
18065
|
variant: c.stop,
|
|
18043
18066
|
onClick: () => u(r?.stop, { state: "stopped" }),
|
|
18044
|
-
children: /* @__PURE__ */ V(
|
|
18067
|
+
children: /* @__PURE__ */ V(R, { className: "h-3 w-3" })
|
|
18045
18068
|
}),
|
|
18046
18069
|
/* @__PURE__ */ V(ug, {
|
|
18047
18070
|
label: "Close",
|
|
18048
18071
|
busy: l,
|
|
18049
18072
|
variant: c.down,
|
|
18050
18073
|
onClick: () => u(r?.close, { state: "closing" }),
|
|
18051
|
-
children: /* @__PURE__ */ V(
|
|
18074
|
+
children: /* @__PURE__ */ V(P, { className: "h-3.5 w-3.5" })
|
|
18052
18075
|
}),
|
|
18053
18076
|
o !== void 0 && o.position !== null && /* @__PURE__ */ H("span", {
|
|
18054
18077
|
className: "tabular-nums text-xs text-foreground-subtle ml-1",
|
|
@@ -18231,14 +18254,14 @@ function gg({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
18231
18254
|
busy: l,
|
|
18232
18255
|
variant: f.stop,
|
|
18233
18256
|
onClick: () => g(i?.stop, { state: "stopped" }),
|
|
18234
|
-
children: /* @__PURE__ */ V(
|
|
18257
|
+
children: /* @__PURE__ */ V(R, { className: "h-4 w-4" })
|
|
18235
18258
|
}),
|
|
18236
18259
|
/* @__PURE__ */ V(fg, {
|
|
18237
18260
|
label: "Close",
|
|
18238
18261
|
busy: l,
|
|
18239
18262
|
variant: f.down,
|
|
18240
18263
|
onClick: () => g(i?.close, { state: "closing" }),
|
|
18241
|
-
children: /* @__PURE__ */ V(
|
|
18264
|
+
children: /* @__PURE__ */ V(P, { className: "h-5 w-5" })
|
|
18242
18265
|
})
|
|
18243
18266
|
]
|
|
18244
18267
|
})
|
|
@@ -19045,7 +19068,7 @@ function Jg({ trpc: e, deviceId: t }) {
|
|
|
19045
19068
|
busy: a,
|
|
19046
19069
|
active: !1,
|
|
19047
19070
|
onClick: () => l(n.stop),
|
|
19048
|
-
children: /* @__PURE__ */ V(
|
|
19071
|
+
children: /* @__PURE__ */ V(R, { className: "h-4 w-4" })
|
|
19049
19072
|
}),
|
|
19050
19073
|
/* @__PURE__ */ V(qg, {
|
|
19051
19074
|
label: "Return to base",
|
|
@@ -19600,14 +19623,14 @@ function f_({ trpc: e, deviceId: t, optimistic: n }) {
|
|
|
19600
19623
|
busy: c,
|
|
19601
19624
|
variant: l.stop,
|
|
19602
19625
|
onClick: () => u(r.stop, { state: "stopped" }),
|
|
19603
|
-
children: /* @__PURE__ */ V(
|
|
19626
|
+
children: /* @__PURE__ */ V(R, { className: "h-3 w-3" })
|
|
19604
19627
|
}),
|
|
19605
19628
|
/* @__PURE__ */ V(d_, {
|
|
19606
19629
|
label: "Close",
|
|
19607
19630
|
busy: c,
|
|
19608
19631
|
variant: l.down,
|
|
19609
19632
|
onClick: () => u(r.close, { state: "closing" }),
|
|
19610
|
-
children: /* @__PURE__ */ V(
|
|
19633
|
+
children: /* @__PURE__ */ V(P, { className: "h-3.5 w-3.5" })
|
|
19611
19634
|
}),
|
|
19612
19635
|
o !== void 0 && o.position !== null && /* @__PURE__ */ H("span", {
|
|
19613
19636
|
className: "tabular-nums text-xs text-foreground-subtle ml-1",
|
|
@@ -19864,14 +19887,14 @@ function __({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
19864
19887
|
busy: l,
|
|
19865
19888
|
variant: d.stop,
|
|
19866
19889
|
onClick: () => h(i.stop, { state: "stopped" }),
|
|
19867
|
-
children: /* @__PURE__ */ V(
|
|
19890
|
+
children: /* @__PURE__ */ V(R, { className: "h-4 w-4" })
|
|
19868
19891
|
}),
|
|
19869
19892
|
/* @__PURE__ */ V(g_, {
|
|
19870
19893
|
label: "Close",
|
|
19871
19894
|
busy: l,
|
|
19872
19895
|
variant: d.down,
|
|
19873
19896
|
onClick: () => h(i.close, { state: "closing" }),
|
|
19874
|
-
children: /* @__PURE__ */ V(
|
|
19897
|
+
children: /* @__PURE__ */ V(P, { className: "h-5 w-5" })
|
|
19875
19898
|
})
|
|
19876
19899
|
]
|
|
19877
19900
|
})
|
|
@@ -20992,7 +21015,7 @@ function W_({ url: e, alt: t, open: n, onOpenChange: r }) {
|
|
|
20992
21015
|
label: "Reset zoom",
|
|
20993
21016
|
disabled: i === 1,
|
|
20994
21017
|
onClick: u,
|
|
20995
|
-
children: /* @__PURE__ */ V(
|
|
21018
|
+
children: /* @__PURE__ */ V(j, { className: "h-4 w-4" })
|
|
20996
21019
|
}),
|
|
20997
21020
|
/* @__PURE__ */ V(G_, {
|
|
20998
21021
|
label: "Close",
|
|
@@ -21898,7 +21921,7 @@ function Sv({ label: e, icon: t, value: n, options: r, disabled: i, onChange: a
|
|
|
21898
21921
|
children: e.label
|
|
21899
21922
|
}, e.value))
|
|
21900
21923
|
}),
|
|
21901
|
-
/* @__PURE__ */ V(
|
|
21924
|
+
/* @__PURE__ */ V(P, { className: "h-3 w-3 shrink-0 text-foreground-subtle" })
|
|
21902
21925
|
]
|
|
21903
21926
|
})]
|
|
21904
21927
|
});
|
|
@@ -26499,7 +26522,7 @@ b(), b();
|
|
|
26499
26522
|
//#region ../ui-library/src/composites/device-meta.ts
|
|
26500
26523
|
var TE = {
|
|
26501
26524
|
[q.Camera]: {
|
|
26502
|
-
icon:
|
|
26525
|
+
icon: A,
|
|
26503
26526
|
label: "Camera"
|
|
26504
26527
|
},
|
|
26505
26528
|
[q.Hub]: {
|
|
@@ -26652,7 +26675,7 @@ var TE = {
|
|
|
26652
26675
|
label: "Night vision"
|
|
26653
26676
|
},
|
|
26654
26677
|
[K.PrivacyMask]: {
|
|
26655
|
-
icon:
|
|
26678
|
+
icon: L,
|
|
26656
26679
|
label: "Privacy mask"
|
|
26657
26680
|
},
|
|
26658
26681
|
[K.Doorbell]: {
|
|
@@ -27111,15 +27134,15 @@ function VE({ schema: e, steps: t, onChange: n, templates: r, selectedTemplateId
|
|
|
27111
27134
|
let e = window.prompt("Template name:");
|
|
27112
27135
|
e?.trim() && o(e.trim(), t);
|
|
27113
27136
|
}
|
|
27114
|
-
function
|
|
27137
|
+
function A() {
|
|
27115
27138
|
if (!i) return;
|
|
27116
27139
|
let e = r.find((e) => e.id === i);
|
|
27117
27140
|
e && window.confirm(`Delete template "${e.name}"?`) && c(i);
|
|
27118
27141
|
}
|
|
27119
|
-
function
|
|
27120
|
-
n(t.map((t) => t.addonId === e.addonId ?
|
|
27142
|
+
function te(e) {
|
|
27143
|
+
n(t.map((t) => t.addonId === e.addonId ? ne(e) : t));
|
|
27121
27144
|
}
|
|
27122
|
-
function
|
|
27145
|
+
function ne(e) {
|
|
27123
27146
|
let t = e.children.some((e) => e.enabled || e.children.some((e) => e.enabled));
|
|
27124
27147
|
return {
|
|
27125
27148
|
...e,
|
|
@@ -27133,25 +27156,25 @@ function VE({ schema: e, steps: t, onChange: n, templates: r, selectedTemplateId
|
|
|
27133
27156
|
})
|
|
27134
27157
|
};
|
|
27135
27158
|
}
|
|
27136
|
-
function
|
|
27159
|
+
function j(e, r) {
|
|
27137
27160
|
let i = zE(r);
|
|
27138
27161
|
n(t.map((t) => t.addonId === e ? {
|
|
27139
27162
|
...t,
|
|
27140
27163
|
children: [...t.children, i]
|
|
27141
27164
|
} : t));
|
|
27142
27165
|
}
|
|
27143
|
-
function
|
|
27166
|
+
function re(e) {
|
|
27144
27167
|
let t = /* @__PURE__ */ new Set();
|
|
27145
27168
|
for (let n of e) {
|
|
27146
27169
|
t.add(n.addonId);
|
|
27147
27170
|
for (let e of n.children) t.add(e.addonId);
|
|
27148
|
-
let e =
|
|
27171
|
+
let e = re(n.children);
|
|
27149
27172
|
for (let n of e) t.add(n);
|
|
27150
27173
|
}
|
|
27151
27174
|
return t;
|
|
27152
27175
|
}
|
|
27153
|
-
let
|
|
27154
|
-
function
|
|
27176
|
+
let M = re(t);
|
|
27177
|
+
function N(t) {
|
|
27155
27178
|
let n = w.get(t.addonId);
|
|
27156
27179
|
if (!n) return [];
|
|
27157
27180
|
let r = e.slots.find((e) => e.id === n.slot)?.parentSlot == null, i = n.childSlots, a = new Set(t.children.map((e) => e.addonId)), o = [];
|
|
@@ -27162,21 +27185,21 @@ function VE({ schema: e, steps: t, onChange: n, templates: r, selectedTemplateId
|
|
|
27162
27185
|
}
|
|
27163
27186
|
return o;
|
|
27164
27187
|
}
|
|
27165
|
-
function
|
|
27188
|
+
function P(e) {
|
|
27166
27189
|
let r = p ? {
|
|
27167
27190
|
...e,
|
|
27168
27191
|
children: e.children.filter((e) => e.enabled).map((e) => ({
|
|
27169
27192
|
...e,
|
|
27170
27193
|
children: e.children.filter((e) => e.enabled)
|
|
27171
27194
|
}))
|
|
27172
|
-
} : e, i = p ? [] :
|
|
27195
|
+
} : e, i = p ? [] : N(r);
|
|
27173
27196
|
return /* @__PURE__ */ H("div", {
|
|
27174
27197
|
className: "space-y-1.5",
|
|
27175
27198
|
children: [/* @__PURE__ */ V(ed, {
|
|
27176
27199
|
step: r,
|
|
27177
27200
|
schema: w.get(r.addonId) ?? null,
|
|
27178
27201
|
allSchemas: w,
|
|
27179
|
-
onChange:
|
|
27202
|
+
onChange: te,
|
|
27180
27203
|
onDelete: u ? void 0 : (e) => n(t.filter((t) => t.addonId !== e)),
|
|
27181
27204
|
readOnly: u,
|
|
27182
27205
|
...S(r.addonId)
|
|
@@ -27188,7 +27211,7 @@ function VE({ schema: e, steps: t, onChange: n, templates: r, selectedTemplateId
|
|
|
27188
27211
|
children: "Slot: Cropper / Classifier"
|
|
27189
27212
|
}),
|
|
27190
27213
|
r.children.map((e) => {
|
|
27191
|
-
let t =
|
|
27214
|
+
let t = N(e);
|
|
27192
27215
|
return /* @__PURE__ */ H("div", {
|
|
27193
27216
|
className: "space-y-1.5",
|
|
27194
27217
|
children: [/* @__PURE__ */ V(ed, {
|
|
@@ -27197,13 +27220,13 @@ function VE({ schema: e, steps: t, onChange: n, templates: r, selectedTemplateId
|
|
|
27197
27220
|
allSchemas: w,
|
|
27198
27221
|
depth: 1,
|
|
27199
27222
|
onChange: (e) => {
|
|
27200
|
-
|
|
27223
|
+
te({
|
|
27201
27224
|
...r,
|
|
27202
27225
|
children: r.children.map((t) => t.addonId === e.addonId ? e : t)
|
|
27203
27226
|
});
|
|
27204
27227
|
},
|
|
27205
27228
|
onDelete: u ? void 0 : (e) => {
|
|
27206
|
-
|
|
27229
|
+
te({
|
|
27207
27230
|
...r,
|
|
27208
27231
|
children: r.children.filter((t) => t.addonId !== e)
|
|
27209
27232
|
});
|
|
@@ -27223,7 +27246,7 @@ function VE({ schema: e, steps: t, onChange: n, templates: r, selectedTemplateId
|
|
|
27223
27246
|
allSchemas: w,
|
|
27224
27247
|
depth: 2,
|
|
27225
27248
|
onChange: (t) => {
|
|
27226
|
-
|
|
27249
|
+
te({
|
|
27227
27250
|
...r,
|
|
27228
27251
|
children: r.children.map((n) => n.addonId === e.addonId ? {
|
|
27229
27252
|
...n,
|
|
@@ -27232,7 +27255,7 @@ function VE({ schema: e, steps: t, onChange: n, templates: r, selectedTemplateId
|
|
|
27232
27255
|
});
|
|
27233
27256
|
},
|
|
27234
27257
|
onDelete: u ? void 0 : (t) => {
|
|
27235
|
-
|
|
27258
|
+
te({
|
|
27236
27259
|
...r,
|
|
27237
27260
|
children: r.children.map((n) => n.addonId === e.addonId ? {
|
|
27238
27261
|
...n,
|
|
@@ -27247,7 +27270,7 @@ function VE({ schema: e, steps: t, onChange: n, templates: r, selectedTemplateId
|
|
|
27247
27270
|
addon: t,
|
|
27248
27271
|
onClick: () => {
|
|
27249
27272
|
let n = zE(t);
|
|
27250
|
-
|
|
27273
|
+
te({
|
|
27251
27274
|
...r,
|
|
27252
27275
|
children: r.children.map((t) => t.addonId === e.addonId ? {
|
|
27253
27276
|
...t,
|
|
@@ -27262,13 +27285,13 @@ function VE({ schema: e, steps: t, onChange: n, templates: r, selectedTemplateId
|
|
|
27262
27285
|
}),
|
|
27263
27286
|
!u && i.map((e) => /* @__PURE__ */ V(BE, {
|
|
27264
27287
|
addon: e,
|
|
27265
|
-
onClick: () =>
|
|
27288
|
+
onClick: () => j(r.addonId, e)
|
|
27266
27289
|
}, e.id))
|
|
27267
27290
|
]
|
|
27268
27291
|
})]
|
|
27269
27292
|
}, r.addonId);
|
|
27270
27293
|
}
|
|
27271
|
-
let
|
|
27294
|
+
let F = e.slots.filter((e) => e.parentSlot === null).toSorted((e, t) => e.priority - t.priority);
|
|
27272
27295
|
return /* @__PURE__ */ H("div", {
|
|
27273
27296
|
className: "space-y-4",
|
|
27274
27297
|
children: [
|
|
@@ -27308,7 +27331,7 @@ function VE({ schema: e, steps: t, onChange: n, templates: r, selectedTemplateId
|
|
|
27308
27331
|
children: /* @__PURE__ */ V(Nt, { className: "h-4 w-4" })
|
|
27309
27332
|
}),
|
|
27310
27333
|
/* @__PURE__ */ V("button", {
|
|
27311
|
-
onClick:
|
|
27334
|
+
onClick: A,
|
|
27312
27335
|
disabled: !i || u,
|
|
27313
27336
|
title: "Delete",
|
|
27314
27337
|
className: Z("p-2 rounded-lg border border-border transition-colors", i && !u ? "text-foreground-subtle hover:text-danger" : "text-foreground-subtle/30 cursor-not-allowed"),
|
|
@@ -27331,8 +27354,8 @@ function VE({ schema: e, steps: t, onChange: n, templates: r, selectedTemplateId
|
|
|
27331
27354
|
})]
|
|
27332
27355
|
}), T.map((e, t) => /* @__PURE__ */ H("div", { children: ["• ", e] }, t))]
|
|
27333
27356
|
}),
|
|
27334
|
-
|
|
27335
|
-
let r = t.filter((t) => t.slot === e.id && !C.has(t.addonId)), i = p ? r.filter((e) => e.enabled) : r, a = p ? [] : e.addons.filter((e) => !
|
|
27357
|
+
F.map((e) => {
|
|
27358
|
+
let r = t.filter((t) => t.slot === e.id && !C.has(t.addonId)), i = p ? r.filter((e) => e.enabled) : r, a = p ? [] : e.addons.filter((e) => !M.has(e.id) && !C.has(e.id)), o = /* @__PURE__ */ new Map(), s = [];
|
|
27336
27359
|
for (let e of i) e.group ? (o.has(e.group) || o.set(e.group, []), o.get(e.group).push(e)) : s.push(e);
|
|
27337
27360
|
return /* @__PURE__ */ H("div", {
|
|
27338
27361
|
className: "space-y-2",
|
|
@@ -27341,13 +27364,13 @@ function VE({ schema: e, steps: t, onChange: n, templates: r, selectedTemplateId
|
|
|
27341
27364
|
className: "text-[10px] font-semibold uppercase tracking-widest text-foreground-subtle/50",
|
|
27342
27365
|
children: ["Slot: ", e.label]
|
|
27343
27366
|
}),
|
|
27344
|
-
s.map((e) =>
|
|
27367
|
+
s.map((e) => P(e)),
|
|
27345
27368
|
[...o.entries()].map(([e, t]) => /* @__PURE__ */ H("div", {
|
|
27346
27369
|
className: "space-y-2 rounded-lg border border-border/40 p-2",
|
|
27347
27370
|
children: [/* @__PURE__ */ V("span", {
|
|
27348
27371
|
className: "text-[10px] font-semibold uppercase tracking-widest text-foreground-subtle/50 px-1",
|
|
27349
27372
|
children: e
|
|
27350
|
-
}), t.map((e) =>
|
|
27373
|
+
}), t.map((e) => P(e))]
|
|
27351
27374
|
}, e)),
|
|
27352
27375
|
!u && a.map((e) => /* @__PURE__ */ V(BE, {
|
|
27353
27376
|
addon: e,
|
|
@@ -27592,8 +27615,8 @@ function $E({ className: e }) {
|
|
|
27592
27615
|
]
|
|
27593
27616
|
});
|
|
27594
27617
|
}
|
|
27595
|
-
function eD({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, getIceServers: i, addIceCandidate: a, getIceCandidates: s, closeSession: c, getSessionState: d, getSessionDebug: f, playbackUrl: p, playbackAuthToken: m, onExitPlayback: g, posterUrl: _, streams: y, activeStreamId: b, onStreamChange: x, deviceName: S, phase: C, pipelineMetrics: w, detections: T, stationaryObjects: E, defaultShowDetections: D = !0, defaultShowMotion: O = !1, streamStats: k, autoPlay: ee = !1, showPlayStop:
|
|
27596
|
-
let se =
|
|
27618
|
+
function eD({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, getIceServers: i, addIceCandidate: a, getIceCandidates: s, closeSession: c, getSessionState: d, getSessionDebug: f, playbackUrl: p, playbackAuthToken: m, onExitPlayback: g, posterUrl: _, streams: y, activeStreamId: b, onStreamChange: x, deviceName: S, phase: C, pipelineMetrics: w, detections: T, stationaryObjects: E, defaultShowDetections: D = !0, defaultShowMotion: O = !1, streamStats: k, autoPlay: ee = !1, showPlayStop: A = !1, snapshotSrc: te, snapshotLoading: ne = !1, onRefreshSnapshot: j, showStreamStats: re = !1, children: M, extraOverlay: P, ptzAvailable: F = !1, ptzShown: I = !1, ptzOverlay: L, onPtzToggle: R, intercomAvailable: z = !1, intercomShown: ie = !1, onIntercomToggle: B, chromeless: ae = !1, className: oe }) {
|
|
27619
|
+
let se = N(), ce = gc(), [le, ue] = l(ee), [de, fe] = l(D), [pe, me] = l(!0), [W, he] = l(!0), [ge, _e] = l(O), [ve, ye] = l(null), [G, be] = l([]), [xe, Se] = l(-1), [Ce, we] = l(!1), Te = u(null);
|
|
27597
27620
|
v(() => {
|
|
27598
27621
|
if (!Ce) return;
|
|
27599
27622
|
function e(e) {
|
|
@@ -27610,7 +27633,7 @@ function eD({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, get
|
|
|
27610
27633
|
inputFps: Oe.inputFps,
|
|
27611
27634
|
bitrateKbps: Oe.bitrateKbps ?? 0
|
|
27612
27635
|
}, Ae = (e) => {
|
|
27613
|
-
ye(e), x?.(e), le &&
|
|
27636
|
+
ye(e), x?.(e), le && A && (ue(!1), setTimeout(() => ue(!0), 50));
|
|
27614
27637
|
}, je = h(() => {
|
|
27615
27638
|
let e = Oe?.target;
|
|
27616
27639
|
if (!(!e || !t)) return (n) => t(e, n);
|
|
@@ -27619,7 +27642,7 @@ function eD({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, get
|
|
|
27619
27642
|
if (!(!e || !r)) return (t, n) => r(e, t, n);
|
|
27620
27643
|
}, [r, Oe]), Ne = h(() => {
|
|
27621
27644
|
if (r) return (e, t, n) => r(n, t, e);
|
|
27622
|
-
}, [r]), Pe = y, Fe = () => ue(!0), Ie = () => ue(!1), Le = w?.phase ?? C, Re = Le === "active", ze = !!T, K = ze && (de || ge), Be =
|
|
27645
|
+
}, [r]), Pe = y, Fe = () => ue(!0), Ie = () => ue(!1), Le = w?.phase ?? C, Re = Le === "active", ze = !!T, K = ze && (de || ge), Be = F && I && !!L, Ve = !!p, q = Ve || (A ? le : !0);
|
|
27623
27646
|
return /* @__PURE__ */ H("div", {
|
|
27624
27647
|
className: `overflow-hidden ${ae ? "" : "rounded-xl border border-border bg-surface"} ${oe ?? ""}`,
|
|
27625
27648
|
children: [
|
|
@@ -27687,7 +27710,7 @@ function eD({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, get
|
|
|
27687
27710
|
}), /* @__PURE__ */ H("div", {
|
|
27688
27711
|
className: "flex items-center gap-1.5 shrink-0 ml-auto",
|
|
27689
27712
|
children: [
|
|
27690
|
-
|
|
27713
|
+
z && !Ve && /* @__PURE__ */ H("button", {
|
|
27691
27714
|
"data-testid": "stream-intercom-toggle",
|
|
27692
27715
|
"data-intercom-shown": ie ? "true" : "false",
|
|
27693
27716
|
onClick: B,
|
|
@@ -27714,7 +27737,7 @@ function eD({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, get
|
|
|
27714
27737
|
})]
|
|
27715
27738
|
}, e.id);
|
|
27716
27739
|
}),
|
|
27717
|
-
|
|
27740
|
+
A && /* @__PURE__ */ H("button", {
|
|
27718
27741
|
"data-testid": "stream-play-toggle",
|
|
27719
27742
|
"data-stream-playing": q ? "true" : "false",
|
|
27720
27743
|
"data-vod": Ve ? "true" : "false",
|
|
@@ -27726,18 +27749,18 @@ function eD({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, get
|
|
|
27726
27749
|
children: Ve ? "Live" : q ? "Stop" : "Play"
|
|
27727
27750
|
})]
|
|
27728
27751
|
}),
|
|
27729
|
-
|
|
27752
|
+
j && !Ve && /* @__PURE__ */ H("button", {
|
|
27730
27753
|
"data-testid": "stream-snapshot-refresh",
|
|
27731
|
-
onClick:
|
|
27732
|
-
disabled:
|
|
27754
|
+
onClick: j,
|
|
27755
|
+
disabled: ne,
|
|
27733
27756
|
className: "inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs font-medium text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors disabled:opacity-50",
|
|
27734
27757
|
title: "Force snapshot refresh",
|
|
27735
|
-
children: [/* @__PURE__ */ V(QE, { className: `h-3 w-3 ${
|
|
27758
|
+
children: [/* @__PURE__ */ V(QE, { className: `h-3 w-3 ${ne ? "animate-spin" : ""}` }), /* @__PURE__ */ V("span", {
|
|
27736
27759
|
className: "hidden xl:inline",
|
|
27737
27760
|
children: "Snapshot"
|
|
27738
27761
|
})]
|
|
27739
27762
|
}),
|
|
27740
|
-
(ze ||
|
|
27763
|
+
(ze || F || w || Le || k || ke && ke.inputFps > 0) && /* @__PURE__ */ H("div", {
|
|
27741
27764
|
ref: Te,
|
|
27742
27765
|
className: "relative",
|
|
27743
27766
|
children: [/* @__PURE__ */ V("button", {
|
|
@@ -27748,7 +27771,7 @@ function eD({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, get
|
|
|
27748
27771
|
}), Ce && /* @__PURE__ */ H("div", {
|
|
27749
27772
|
className: "absolute right-0 top-full mt-1 z-30 min-w-[200px] rounded-lg border border-border bg-surface shadow-xl py-1.5",
|
|
27750
27773
|
children: [
|
|
27751
|
-
|
|
27774
|
+
re && k && /* @__PURE__ */ H("div", {
|
|
27752
27775
|
className: "px-3 py-1.5 text-[10px] text-foreground-subtle border-b border-border-subtle",
|
|
27753
27776
|
children: [
|
|
27754
27777
|
/* @__PURE__ */ H("div", {
|
|
@@ -27774,7 +27797,7 @@ function eD({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, get
|
|
|
27774
27797
|
})
|
|
27775
27798
|
]
|
|
27776
27799
|
}),
|
|
27777
|
-
!
|
|
27800
|
+
!re && ke && ke.inputFps > 0 && /* @__PURE__ */ H("div", {
|
|
27778
27801
|
className: "px-3 py-1.5 text-[10px] text-foreground-subtle border-b border-border-subtle",
|
|
27779
27802
|
children: [/* @__PURE__ */ H("div", {
|
|
27780
27803
|
className: "flex justify-between gap-3",
|
|
@@ -27837,11 +27860,11 @@ function eD({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, get
|
|
|
27837
27860
|
onClick: () => _e((e) => !e)
|
|
27838
27861
|
})
|
|
27839
27862
|
] }),
|
|
27840
|
-
|
|
27863
|
+
F && /* @__PURE__ */ V(XE, {
|
|
27841
27864
|
label: "PTZ controls",
|
|
27842
|
-
active:
|
|
27865
|
+
active: I,
|
|
27843
27866
|
onClick: () => {
|
|
27844
|
-
|
|
27867
|
+
R?.(), we(!1);
|
|
27845
27868
|
}
|
|
27846
27869
|
})
|
|
27847
27870
|
]
|
|
@@ -27858,7 +27881,7 @@ function eD({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, get
|
|
|
27858
27881
|
onQualityOptions: Ee,
|
|
27859
27882
|
selectedLevel: xe,
|
|
27860
27883
|
..._ ? { posterUrl: _ } : {}
|
|
27861
|
-
}),
|
|
27884
|
+
}), P || Be ? /* @__PURE__ */ H(U, { children: [P, Be && L] }) : null]
|
|
27862
27885
|
}) : q && e ? /* @__PURE__ */ V("div", {
|
|
27863
27886
|
className: "aspect-video relative",
|
|
27864
27887
|
children: /* @__PURE__ */ V(Uf, {
|
|
@@ -27878,7 +27901,7 @@ function eD({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, get
|
|
|
27878
27901
|
closeSession: c,
|
|
27879
27902
|
...ce.bindControlChannel ? { onControlChannel: ce.bindControlChannel } : {},
|
|
27880
27903
|
..._ ? { posterUrl: _ } : {},
|
|
27881
|
-
overlay: K ||
|
|
27904
|
+
overlay: K || P || Be ? /* @__PURE__ */ H(U, { children: [
|
|
27882
27905
|
K && /* @__PURE__ */ V(ap, {
|
|
27883
27906
|
detections: T,
|
|
27884
27907
|
showPhaseIndicator: !1,
|
|
@@ -27889,19 +27912,19 @@ function eD({ serverUrl: e, createSession: t, sendAnswer: n, handleOffer: r, get
|
|
|
27889
27912
|
showStationary: W,
|
|
27890
27913
|
...E === void 0 ? {} : { stationaryObjects: E }
|
|
27891
27914
|
}),
|
|
27892
|
-
|
|
27893
|
-
Be &&
|
|
27915
|
+
P,
|
|
27916
|
+
Be && L
|
|
27894
27917
|
] }) : void 0
|
|
27895
27918
|
})
|
|
27896
27919
|
}) : /* @__PURE__ */ V(tD, {
|
|
27897
|
-
src:
|
|
27898
|
-
isLoading:
|
|
27920
|
+
src: te ?? null,
|
|
27921
|
+
isLoading: ne,
|
|
27899
27922
|
onPlay: Fe,
|
|
27900
|
-
onRetry:
|
|
27901
|
-
extraOverlay:
|
|
27902
|
-
suppressPlayHover: !!
|
|
27923
|
+
onRetry: j,
|
|
27924
|
+
extraOverlay: P || Be ? /* @__PURE__ */ H(U, { children: [P, Be && L] }) : null,
|
|
27925
|
+
suppressPlayHover: !!P || Be
|
|
27903
27926
|
}),
|
|
27904
|
-
|
|
27927
|
+
M
|
|
27905
27928
|
]
|
|
27906
27929
|
});
|
|
27907
27930
|
}
|
|
@@ -28406,11 +28429,11 @@ function bD({ trpc: e, nodeId: t }) {
|
|
|
28406
28429
|
} catch (e) {
|
|
28407
28430
|
console.warn("[benchmark:audio] Failed to load audio:", e), c(null);
|
|
28408
28431
|
}
|
|
28409
|
-
}, [e, t]),
|
|
28432
|
+
}, [e, t]), A = async (e) => {
|
|
28410
28433
|
a(e), g(null), p(""), await ee(e);
|
|
28411
|
-
},
|
|
28434
|
+
}, te = (e, t) => {
|
|
28412
28435
|
p(`Upload is not supported for audio: runAudioTest has no payload field for an uploaded file, so "${t}" cannot be classified. Pick a reference WAV above.`), c(yD(e));
|
|
28413
|
-
},
|
|
28436
|
+
}, ne = async () => {
|
|
28414
28437
|
d(!0), p(""), g(null);
|
|
28415
28438
|
try {
|
|
28416
28439
|
let n = await e.pipelineExecutor.runAudioTest.mutate({ ..._D({
|
|
@@ -28426,13 +28449,13 @@ function bD({ trpc: e, nodeId: t }) {
|
|
|
28426
28449
|
d(!1);
|
|
28427
28450
|
}
|
|
28428
28451
|
};
|
|
28429
|
-
function
|
|
28452
|
+
function j(e, t) {
|
|
28430
28453
|
T((n) => ({
|
|
28431
28454
|
...n,
|
|
28432
28455
|
[e]: t
|
|
28433
28456
|
}));
|
|
28434
28457
|
}
|
|
28435
|
-
function
|
|
28458
|
+
function re(e) {
|
|
28436
28459
|
if (e.type === "slider") {
|
|
28437
28460
|
let t = w[e.key], n = typeof e.default == "number" ? e.default : e.min, r = typeof t == "number" ? t : n;
|
|
28438
28461
|
return /* @__PURE__ */ H("div", { children: [
|
|
@@ -28453,7 +28476,7 @@ function bD({ trpc: e, nodeId: t }) {
|
|
|
28453
28476
|
max: e.max,
|
|
28454
28477
|
step: e.step ?? .05,
|
|
28455
28478
|
value: r,
|
|
28456
|
-
onChange: (t) =>
|
|
28479
|
+
onChange: (t) => j(e.key, Number(t.target.value)),
|
|
28457
28480
|
className: "w-full"
|
|
28458
28481
|
})
|
|
28459
28482
|
] }, e.key);
|
|
@@ -28478,7 +28501,7 @@ function bD({ trpc: e, nodeId: t }) {
|
|
|
28478
28501
|
max: a,
|
|
28479
28502
|
step: o,
|
|
28480
28503
|
value: r,
|
|
28481
|
-
onChange: (t) =>
|
|
28504
|
+
onChange: (t) => j(e.key, Number(t.target.value)),
|
|
28482
28505
|
className: "w-full"
|
|
28483
28506
|
})
|
|
28484
28507
|
] }, e.key);
|
|
@@ -28486,7 +28509,7 @@ function bD({ trpc: e, nodeId: t }) {
|
|
|
28486
28509
|
if (e.type === "multiselect") {
|
|
28487
28510
|
let t = w[e.key], n = Array.isArray(t) ? t : Array.isArray(e.default) ? e.default : [], r = (t) => {
|
|
28488
28511
|
let r = n.includes(t) ? n.filter((e) => e !== t) : [...n, t];
|
|
28489
|
-
|
|
28512
|
+
j(e.key, r);
|
|
28490
28513
|
};
|
|
28491
28514
|
return /* @__PURE__ */ H("div", { children: [
|
|
28492
28515
|
/* @__PURE__ */ V("label", {
|
|
@@ -28515,7 +28538,7 @@ function bD({ trpc: e, nodeId: t }) {
|
|
|
28515
28538
|
children: e.label
|
|
28516
28539
|
}), /* @__PURE__ */ V("select", {
|
|
28517
28540
|
value: n,
|
|
28518
|
-
onChange: (t) =>
|
|
28541
|
+
onChange: (t) => j(e.key, t.target.value),
|
|
28519
28542
|
className: "w-full rounded-lg border border-border bg-surface px-3 py-2 text-xs text-foreground focus:outline-none focus:border-primary/50",
|
|
28520
28543
|
children: e.options.map((e) => /* @__PURE__ */ V("option", {
|
|
28521
28544
|
value: e.value,
|
|
@@ -28529,7 +28552,7 @@ function bD({ trpc: e, nodeId: t }) {
|
|
|
28529
28552
|
className: "text-sm text-foreground-subtle animate-pulse py-8 text-center",
|
|
28530
28553
|
children: "Loading audio pipeline..."
|
|
28531
28554
|
});
|
|
28532
|
-
let
|
|
28555
|
+
let M = m?.frame, N = M?.detections ?? [], { alternateTopN: P, inferenceMs: F, totalMs: I } = vD(M);
|
|
28533
28556
|
return /* @__PURE__ */ H("div", {
|
|
28534
28557
|
className: "space-y-4",
|
|
28535
28558
|
children: [
|
|
@@ -28540,9 +28563,9 @@ function bD({ trpc: e, nodeId: t }) {
|
|
|
28540
28563
|
})),
|
|
28541
28564
|
selectedFilename: i,
|
|
28542
28565
|
onSelect: (e) => {
|
|
28543
|
-
|
|
28566
|
+
A(e);
|
|
28544
28567
|
},
|
|
28545
|
-
onUpload: (e, t) =>
|
|
28568
|
+
onUpload: (e, t) => te(e, t),
|
|
28546
28569
|
accept: ".wav,audio/wav",
|
|
28547
28570
|
uploadLabel: "Upload WAV (preview only)"
|
|
28548
28571
|
}),
|
|
@@ -28573,12 +28596,12 @@ function bD({ trpc: e, nodeId: t }) {
|
|
|
28573
28596
|
children: [/* @__PURE__ */ V("h3", {
|
|
28574
28597
|
className: "text-xs font-medium text-foreground",
|
|
28575
28598
|
children: "Waveform"
|
|
28576
|
-
}),
|
|
28599
|
+
}), N.length > 0 && /* @__PURE__ */ H("span", {
|
|
28577
28600
|
className: "text-[10px] text-foreground-subtle",
|
|
28578
28601
|
children: [
|
|
28579
|
-
|
|
28602
|
+
N.length,
|
|
28580
28603
|
" detection",
|
|
28581
|
-
|
|
28604
|
+
N.length === 1 ? "" : "s"
|
|
28582
28605
|
]
|
|
28583
28606
|
})]
|
|
28584
28607
|
}), /* @__PURE__ */ V("div", {
|
|
@@ -28593,8 +28616,8 @@ function bD({ trpc: e, nodeId: t }) {
|
|
|
28593
28616
|
})
|
|
28594
28617
|
})]
|
|
28595
28618
|
}),
|
|
28596
|
-
m?.success &&
|
|
28597
|
-
let e =
|
|
28619
|
+
m?.success && N.length > 0 && (() => {
|
|
28620
|
+
let e = N[0], t = e.debug?.originalClass;
|
|
28598
28621
|
return /* @__PURE__ */ H("div", {
|
|
28599
28622
|
className: "rounded-xl border border-primary/30 bg-primary/5 px-3 py-2 flex items-center justify-between",
|
|
28600
28623
|
children: [/* @__PURE__ */ H("div", {
|
|
@@ -28621,13 +28644,13 @@ function bD({ trpc: e, nodeId: t }) {
|
|
|
28621
28644
|
children: [(e.score * 100).toFixed(1), "%"]
|
|
28622
28645
|
})
|
|
28623
28646
|
]
|
|
28624
|
-
}),
|
|
28647
|
+
}), F != null && /* @__PURE__ */ H("span", {
|
|
28625
28648
|
className: "text-[10px] font-mono text-foreground-subtle",
|
|
28626
|
-
children: [
|
|
28649
|
+
children: [F.toFixed(1), "ms"]
|
|
28627
28650
|
})]
|
|
28628
28651
|
});
|
|
28629
28652
|
})(),
|
|
28630
|
-
m?.success &&
|
|
28653
|
+
m?.success && I != null && /* @__PURE__ */ H("div", {
|
|
28631
28654
|
className: "rounded-xl border border-border bg-surface overflow-hidden",
|
|
28632
28655
|
children: [/* @__PURE__ */ V("div", {
|
|
28633
28656
|
className: "px-3 py-2 border-b border-border",
|
|
@@ -28638,7 +28661,7 @@ function bD({ trpc: e, nodeId: t }) {
|
|
|
28638
28661
|
}), /* @__PURE__ */ H("div", {
|
|
28639
28662
|
className: "px-3 py-2 space-y-1.5",
|
|
28640
28663
|
children: [
|
|
28641
|
-
|
|
28664
|
+
F != null && /* @__PURE__ */ H("div", {
|
|
28642
28665
|
className: "flex items-center justify-between text-xs",
|
|
28643
28666
|
children: [/* @__PURE__ */ H("span", {
|
|
28644
28667
|
className: "text-foreground-subtle",
|
|
@@ -28649,7 +28672,7 @@ function bD({ trpc: e, nodeId: t }) {
|
|
|
28649
28672
|
]
|
|
28650
28673
|
}), /* @__PURE__ */ H("span", {
|
|
28651
28674
|
className: "font-mono text-foreground",
|
|
28652
|
-
children: [
|
|
28675
|
+
children: [F.toFixed(1), "ms"]
|
|
28653
28676
|
})]
|
|
28654
28677
|
}),
|
|
28655
28678
|
/* @__PURE__ */ H("div", {
|
|
@@ -28659,17 +28682,17 @@ function bD({ trpc: e, nodeId: t }) {
|
|
|
28659
28682
|
children: "Total (load + inference)"
|
|
28660
28683
|
}), /* @__PURE__ */ H("span", {
|
|
28661
28684
|
className: "font-mono text-foreground",
|
|
28662
|
-
children: [
|
|
28685
|
+
children: [I, "ms"]
|
|
28663
28686
|
})]
|
|
28664
28687
|
}),
|
|
28665
|
-
|
|
28688
|
+
F != null && I > 0 && /* @__PURE__ */ H("div", {
|
|
28666
28689
|
className: "flex items-center justify-between text-xs",
|
|
28667
28690
|
children: [/* @__PURE__ */ V("span", {
|
|
28668
28691
|
className: "text-foreground-subtle",
|
|
28669
28692
|
children: "Overhead"
|
|
28670
28693
|
}), /* @__PURE__ */ H("span", {
|
|
28671
28694
|
className: "font-mono text-foreground",
|
|
28672
|
-
children: [(
|
|
28695
|
+
children: [(I - F).toFixed(1), "ms"]
|
|
28673
28696
|
})]
|
|
28674
28697
|
})
|
|
28675
28698
|
]
|
|
@@ -28685,9 +28708,9 @@ function bD({ trpc: e, nodeId: t }) {
|
|
|
28685
28708
|
}), /* @__PURE__ */ H("span", {
|
|
28686
28709
|
className: "text-[10px] text-foreground-subtle",
|
|
28687
28710
|
children: [
|
|
28688
|
-
|
|
28711
|
+
P.length,
|
|
28689
28712
|
" label",
|
|
28690
|
-
|
|
28713
|
+
P.length === 1 ? "" : "s"
|
|
28691
28714
|
]
|
|
28692
28715
|
})]
|
|
28693
28716
|
}), /* @__PURE__ */ V("div", {
|
|
@@ -28695,10 +28718,10 @@ function bD({ trpc: e, nodeId: t }) {
|
|
|
28695
28718
|
children: u ? /* @__PURE__ */ V("div", {
|
|
28696
28719
|
className: "text-[10px] text-foreground-subtle animate-pulse py-2 text-center",
|
|
28697
28720
|
children: "Classifying..."
|
|
28698
|
-
}) :
|
|
28721
|
+
}) : P.length > 0 ? /* @__PURE__ */ V("div", {
|
|
28699
28722
|
className: "space-y-1",
|
|
28700
|
-
children:
|
|
28701
|
-
let n =
|
|
28723
|
+
children: P.slice(0, 50).map((e, t) => {
|
|
28724
|
+
let n = N.some((t) => t.macroClass === e.label);
|
|
28702
28725
|
return /* @__PURE__ */ H("div", {
|
|
28703
28726
|
className: "flex items-center justify-between text-[11px]",
|
|
28704
28727
|
children: [/* @__PURE__ */ H("div", {
|
|
@@ -28765,7 +28788,7 @@ function bD({ trpc: e, nodeId: t }) {
|
|
|
28765
28788
|
})
|
|
28766
28789
|
}), /* @__PURE__ */ V("div", {
|
|
28767
28790
|
className: "p-3 space-y-3",
|
|
28768
|
-
children: k.map(
|
|
28791
|
+
children: k.map(re)
|
|
28769
28792
|
})]
|
|
28770
28793
|
}),
|
|
28771
28794
|
b && /* @__PURE__ */ H("div", {
|
|
@@ -28813,7 +28836,7 @@ function bD({ trpc: e, nodeId: t }) {
|
|
|
28813
28836
|
})]
|
|
28814
28837
|
}),
|
|
28815
28838
|
/* @__PURE__ */ V("button", {
|
|
28816
|
-
onClick:
|
|
28839
|
+
onClick: ne,
|
|
28817
28840
|
disabled: u || !i,
|
|
28818
28841
|
className: `w-full px-4 py-2.5 text-sm font-medium rounded-lg transition-colors sticky bottom-4 ${u ? "bg-primary text-primary-foreground animate-pulse" : "bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50"}`,
|
|
28819
28842
|
children: u ? "Classifying..." : "Classify Audio"
|
|
@@ -29654,7 +29677,7 @@ function lO({ label: e, hint: t, value: n, min: r, max: i, step: a, disabled: o,
|
|
|
29654
29677
|
});
|
|
29655
29678
|
}
|
|
29656
29679
|
function uO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
29657
|
-
let [r, i] = l([]), [a, s] = l(""), [c, d] = l(null), [f, p] = l(null), [m, g] = l(null), [_, y] = l(null), [b, x] = l(wD), [S, C] = l(null), [w, T] = l(null), [E, D] = l(null), [O, k] = l(!1), [ee,
|
|
29680
|
+
let [r, i] = l([]), [a, s] = l(""), [c, d] = l(null), [f, p] = l(null), [m, g] = l(null), [_, y] = l(null), [b, x] = l(wD), [S, C] = l(null), [w, T] = l(null), [E, D] = l(null), [O, k] = l(!1), [ee, A] = l(!1), [te, ne] = l(""), [j, re] = l([]), [M, N] = l([]), P = u(null), F = u(null), I = o((e) => {
|
|
29658
29681
|
x((t) => ({
|
|
29659
29682
|
...t,
|
|
29660
29683
|
...e
|
|
@@ -29664,16 +29687,16 @@ function uO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
29664
29687
|
e.pipelineExecutor.listReferenceImages.query().then((e) => {
|
|
29665
29688
|
i(e), e.length > 0 && e[0] && s(e[0].filename);
|
|
29666
29689
|
}).catch((e) => {
|
|
29667
|
-
|
|
29690
|
+
ne(e instanceof Error ? e.message : String(e));
|
|
29668
29691
|
});
|
|
29669
29692
|
}, [e]), v(() => {
|
|
29670
29693
|
a && e.pipelineExecutor.getReferenceImage.query({ filename: a }).then((e) => {
|
|
29671
29694
|
e && d(e.base64);
|
|
29672
29695
|
}).catch((e) => {
|
|
29673
|
-
|
|
29696
|
+
ne(e instanceof Error ? e.message : String(e));
|
|
29674
29697
|
});
|
|
29675
29698
|
}, [e, a]);
|
|
29676
|
-
let
|
|
29699
|
+
let L = o(async () => {
|
|
29677
29700
|
try {
|
|
29678
29701
|
let t = GD(await e.addons.custom.mutate({
|
|
29679
29702
|
addonId: cO,
|
|
@@ -29682,18 +29705,18 @@ function uO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
29682
29705
|
}));
|
|
29683
29706
|
return t && C(t), t;
|
|
29684
29707
|
} catch (e) {
|
|
29685
|
-
return
|
|
29708
|
+
return ne(e instanceof Error ? e.message : String(e)), null;
|
|
29686
29709
|
}
|
|
29687
29710
|
}, [e]);
|
|
29688
29711
|
v(() => {
|
|
29689
29712
|
(async () => {
|
|
29690
|
-
let e = await
|
|
29691
|
-
t && (
|
|
29713
|
+
let e = await L(), t = e?.runs.find((e) => e.state === "running");
|
|
29714
|
+
t && (P.current = t.sessionId, T(t.sessionId), D(t), N((n) => [...n, `adopted in-flight ramp ${t.sessionId} on ${e?.nodeId ?? "this node"}`]));
|
|
29692
29715
|
})();
|
|
29693
|
-
}, [
|
|
29694
|
-
let
|
|
29695
|
-
let t =
|
|
29696
|
-
t && (
|
|
29716
|
+
}, [L]);
|
|
29717
|
+
let R = o(() => {
|
|
29718
|
+
let t = F.current;
|
|
29719
|
+
t && (F.current = null, e.addons.custom.mutate({
|
|
29697
29720
|
addonId: cO,
|
|
29698
29721
|
action: "releaseBenchFrame",
|
|
29699
29722
|
input: { frameId: t }
|
|
@@ -29710,9 +29733,9 @@ function uO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
29710
29733
|
});
|
|
29711
29734
|
if (t) return;
|
|
29712
29735
|
let r = WD(n);
|
|
29713
|
-
r && D(r), r && r.state !== "running" && (
|
|
29736
|
+
r && D(r), r && r.state !== "running" && (P.current = null, R(), L());
|
|
29714
29737
|
} catch (e) {
|
|
29715
|
-
t ||
|
|
29738
|
+
t || ne(e instanceof Error ? e.message : String(e));
|
|
29716
29739
|
}
|
|
29717
29740
|
};
|
|
29718
29741
|
n();
|
|
@@ -29723,8 +29746,8 @@ function uO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
29723
29746
|
}, [
|
|
29724
29747
|
e,
|
|
29725
29748
|
w,
|
|
29726
|
-
|
|
29727
|
-
|
|
29749
|
+
L,
|
|
29750
|
+
R
|
|
29728
29751
|
]), v(() => {
|
|
29729
29752
|
let t = null;
|
|
29730
29753
|
try {
|
|
@@ -29732,10 +29755,10 @@ function uO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
29732
29755
|
onData: (e) => {
|
|
29733
29756
|
let t = { ...typeof e.data == "object" && e.data !== null ? e.data : e };
|
|
29734
29757
|
if (t.step !== "capacity-ramp") return;
|
|
29735
|
-
let n =
|
|
29758
|
+
let n = P.current;
|
|
29736
29759
|
if (!n || t.sessionId !== n) return;
|
|
29737
29760
|
let r = t.message;
|
|
29738
|
-
typeof r == "string" &&
|
|
29761
|
+
typeof r == "string" && N((e) => [...e, r]);
|
|
29739
29762
|
},
|
|
29740
29763
|
onError: (e) => {
|
|
29741
29764
|
console.warn("[benchmark:capacity] progress subscription error:", e);
|
|
@@ -29749,22 +29772,22 @@ function uO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
29749
29772
|
t?.();
|
|
29750
29773
|
};
|
|
29751
29774
|
}, [e]);
|
|
29752
|
-
let
|
|
29753
|
-
if (
|
|
29754
|
-
|
|
29775
|
+
let z = S?.nodeId ?? null, ie = z !== null && z !== t, B = E?.state === "running", ae = h(() => OD(b.rampText), [b.rampText]), oe = h(() => _ ? AD(SD(_.steps)) : null, [_]), se = oe?.steps ?? [], ce = E?.result ?? null, le = ce ? QD(ce) : null, ue = ce ? KD(ce) : [], de = $D(E), fe = ae.ramp.length > 0 ? Math.round(ae.ramp.length * (b.settleSec + b.measureSec) / 60) : 0, pe = async () => {
|
|
29776
|
+
if (ne(""), re([]), N([]), D(null), !c) {
|
|
29777
|
+
re(["No reference image loaded — the ramp needs a frame to pin."]);
|
|
29755
29778
|
return;
|
|
29756
29779
|
}
|
|
29757
29780
|
if (!_) {
|
|
29758
|
-
|
|
29781
|
+
re(["Pick a camera. The ramp runs the tree that camera really runs; there is no free-form mode here on purpose."]);
|
|
29759
29782
|
return;
|
|
29760
29783
|
}
|
|
29761
|
-
let n = await
|
|
29784
|
+
let n = await L() ?? S;
|
|
29762
29785
|
if (!n) {
|
|
29763
|
-
|
|
29786
|
+
re(["Could not read the runner — cannot confirm which node would be measured."]);
|
|
29764
29787
|
return;
|
|
29765
29788
|
}
|
|
29766
29789
|
if (oe && oe.missingModelFor.length > 0) {
|
|
29767
|
-
|
|
29790
|
+
re([`resolvePipeline left the model to the node for: ${oe.missingModelFor.join(", ")}. The ramp needs an explicit model per root step and this page will not invent one — pin the model on that (node, device) first.`]);
|
|
29768
29791
|
return;
|
|
29769
29792
|
}
|
|
29770
29793
|
let r = `cap-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`, i = jD({
|
|
@@ -29777,7 +29800,7 @@ function uO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
29777
29800
|
form: b
|
|
29778
29801
|
});
|
|
29779
29802
|
if (!i.ok) {
|
|
29780
|
-
|
|
29803
|
+
re(i.issues);
|
|
29781
29804
|
return;
|
|
29782
29805
|
}
|
|
29783
29806
|
k(!0);
|
|
@@ -29791,7 +29814,7 @@ function uO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
29791
29814
|
}
|
|
29792
29815
|
}), a = { ...typeof i == "object" && i ? i : {} }, o = typeof a.frameId == "string" ? a.frameId : "";
|
|
29793
29816
|
if (!o) throw Error("cacheBenchFrame returned no frameId");
|
|
29794
|
-
|
|
29817
|
+
F.current = o;
|
|
29795
29818
|
let s = jD({
|
|
29796
29819
|
frameId: o,
|
|
29797
29820
|
sessionId: r,
|
|
@@ -29802,35 +29825,35 @@ function uO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
29802
29825
|
form: b
|
|
29803
29826
|
});
|
|
29804
29827
|
if (!s.ok) {
|
|
29805
|
-
|
|
29828
|
+
re(s.issues), R();
|
|
29806
29829
|
return;
|
|
29807
29830
|
}
|
|
29808
29831
|
await e.addons.custom.mutate({
|
|
29809
29832
|
addonId: cO,
|
|
29810
29833
|
action: "runCapacityRamp",
|
|
29811
29834
|
input: { ...s.input }
|
|
29812
|
-
}),
|
|
29835
|
+
}), P.current = r, T(r), D({
|
|
29813
29836
|
sessionId: r,
|
|
29814
29837
|
state: "running"
|
|
29815
29838
|
});
|
|
29816
29839
|
} catch (e) {
|
|
29817
|
-
|
|
29840
|
+
ne(e instanceof Error ? e.message : String(e)), R();
|
|
29818
29841
|
} finally {
|
|
29819
29842
|
k(!1);
|
|
29820
29843
|
}
|
|
29821
29844
|
}, me = async () => {
|
|
29822
29845
|
if (w) {
|
|
29823
|
-
|
|
29846
|
+
A(!0);
|
|
29824
29847
|
try {
|
|
29825
29848
|
await e.addons.custom.mutate({
|
|
29826
29849
|
addonId: cO,
|
|
29827
29850
|
action: "abortCapacityRamp",
|
|
29828
29851
|
input: { sessionId: w }
|
|
29829
|
-
}),
|
|
29852
|
+
}), N((e) => [...e, "abort requested — the current step drains, then stops"]);
|
|
29830
29853
|
} catch (e) {
|
|
29831
|
-
|
|
29854
|
+
ne(e instanceof Error ? e.message : String(e));
|
|
29832
29855
|
} finally {
|
|
29833
|
-
|
|
29856
|
+
A(!1);
|
|
29834
29857
|
}
|
|
29835
29858
|
}
|
|
29836
29859
|
}, W = O || B;
|
|
@@ -29852,7 +29875,7 @@ function uO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
29852
29875
|
" ",
|
|
29853
29876
|
/* @__PURE__ */ V("span", {
|
|
29854
29877
|
className: "font-mono text-primary",
|
|
29855
|
-
children:
|
|
29878
|
+
children: z ?? "unknown"
|
|
29856
29879
|
}),
|
|
29857
29880
|
" — the ramp driver is node-local and ",
|
|
29858
29881
|
/* @__PURE__ */ V("code", { children: "addons.custom" }),
|
|
@@ -29899,7 +29922,7 @@ function uO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
29899
29922
|
" but this action reaches the runner on ",
|
|
29900
29923
|
/* @__PURE__ */ V("span", {
|
|
29901
29924
|
className: "font-mono",
|
|
29902
|
-
children:
|
|
29925
|
+
children: z
|
|
29903
29926
|
}),
|
|
29904
29927
|
". The run is refused — switch the node selector back, or start the ramp on that node’s runner."
|
|
29905
29928
|
]
|
|
@@ -29979,7 +30002,7 @@ function uO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
29979
30002
|
type: "text",
|
|
29980
30003
|
value: b.rampText,
|
|
29981
30004
|
disabled: W,
|
|
29982
|
-
onChange: (e) =>
|
|
30005
|
+
onChange: (e) => I({ rampText: e.target.value }),
|
|
29983
30006
|
className: "mt-1 w-full px-2 py-2 sm:py-1 text-sm font-mono bg-background border border-border rounded"
|
|
29984
30007
|
}),
|
|
29985
30008
|
ae.issues.length > 0 && /* @__PURE__ */ V("span", {
|
|
@@ -29998,7 +30021,7 @@ function uO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
29998
30021
|
min: 1,
|
|
29999
30022
|
max: 30,
|
|
30000
30023
|
disabled: W,
|
|
30001
|
-
onChange: (e) =>
|
|
30024
|
+
onChange: (e) => I({ fpsPerCamera: e })
|
|
30002
30025
|
}),
|
|
30003
30026
|
/* @__PURE__ */ V(lO, {
|
|
30004
30027
|
label: "frame size (px)",
|
|
@@ -30008,7 +30031,7 @@ function uO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
30008
30031
|
max: 2048,
|
|
30009
30032
|
step: 32,
|
|
30010
30033
|
disabled: W,
|
|
30011
|
-
onChange: (e) =>
|
|
30034
|
+
onChange: (e) => I({ targetSize: e })
|
|
30012
30035
|
}),
|
|
30013
30036
|
/* @__PURE__ */ V(lO, {
|
|
30014
30037
|
label: "settle (s)",
|
|
@@ -30017,7 +30040,7 @@ function uO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
30017
30040
|
min: 0,
|
|
30018
30041
|
max: 300,
|
|
30019
30042
|
disabled: W,
|
|
30020
|
-
onChange: (e) =>
|
|
30043
|
+
onChange: (e) => I({ settleSec: e })
|
|
30021
30044
|
}),
|
|
30022
30045
|
/* @__PURE__ */ V(lO, {
|
|
30023
30046
|
label: "measure (s)",
|
|
@@ -30026,7 +30049,7 @@ function uO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
30026
30049
|
min: 5,
|
|
30027
30050
|
max: 600,
|
|
30028
30051
|
disabled: W,
|
|
30029
|
-
onChange: (e) =>
|
|
30052
|
+
onChange: (e) => I({ measureSec: e })
|
|
30030
30053
|
}),
|
|
30031
30054
|
/* @__PURE__ */ V(lO, {
|
|
30032
30055
|
label: "warmup calls",
|
|
@@ -30035,7 +30058,7 @@ function uO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
30035
30058
|
min: 0,
|
|
30036
30059
|
max: 50,
|
|
30037
30060
|
disabled: W,
|
|
30038
|
-
onChange: (e) =>
|
|
30061
|
+
onChange: (e) => I({ warmupCalls: e })
|
|
30039
30062
|
}),
|
|
30040
30063
|
/* @__PURE__ */ V(lO, {
|
|
30041
30064
|
label: "drop SLO (%)",
|
|
@@ -30044,7 +30067,7 @@ function uO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
30044
30067
|
max: 100,
|
|
30045
30068
|
step: .1,
|
|
30046
30069
|
disabled: W,
|
|
30047
|
-
onChange: (e) =>
|
|
30070
|
+
onChange: (e) => I({ dropRatioMaxPct: e })
|
|
30048
30071
|
}),
|
|
30049
30072
|
/* @__PURE__ */ V(lO, {
|
|
30050
30073
|
label: "e2e p95 SLO (ms)",
|
|
@@ -30052,7 +30075,7 @@ function uO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
30052
30075
|
min: 1,
|
|
30053
30076
|
max: 1e4,
|
|
30054
30077
|
disabled: W,
|
|
30055
|
-
onChange: (e) =>
|
|
30078
|
+
onChange: (e) => I({ e2eP95MsMax: e })
|
|
30056
30079
|
}),
|
|
30057
30080
|
/* @__PURE__ */ V(lO, {
|
|
30058
30081
|
label: "stalls SLO",
|
|
@@ -30061,7 +30084,7 @@ function uO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
30061
30084
|
min: 0,
|
|
30062
30085
|
max: 1e3,
|
|
30063
30086
|
disabled: W,
|
|
30064
|
-
onChange: (e) =>
|
|
30087
|
+
onChange: (e) => I({ stallsMax: e })
|
|
30065
30088
|
})
|
|
30066
30089
|
]
|
|
30067
30090
|
}),
|
|
@@ -30073,7 +30096,7 @@ function uO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
30073
30096
|
type: "checkbox",
|
|
30074
30097
|
checked: b.stopOnFirstFail,
|
|
30075
30098
|
disabled: W,
|
|
30076
|
-
onChange: (e) =>
|
|
30099
|
+
onChange: (e) => I({ stopOnFirstFail: e.target.checked })
|
|
30077
30100
|
}), /* @__PURE__ */ V("span", {
|
|
30078
30101
|
className: "text-foreground-subtle",
|
|
30079
30102
|
children: "stop at the first failing step"
|
|
@@ -30084,7 +30107,7 @@ function uO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
30084
30107
|
type: "checkbox",
|
|
30085
30108
|
checked: b.allowActiveCameras,
|
|
30086
30109
|
disabled: W,
|
|
30087
|
-
onChange: (e) =>
|
|
30110
|
+
onChange: (e) => I({ allowActiveCameras: e.target.checked })
|
|
30088
30111
|
}), /* @__PURE__ */ V("span", {
|
|
30089
30112
|
className: "text-foreground-subtle",
|
|
30090
30113
|
children: "allow active cameras (result is contaminated and says so)"
|
|
@@ -30120,21 +30143,21 @@ function uO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
30120
30143
|
})
|
|
30121
30144
|
]
|
|
30122
30145
|
}),
|
|
30123
|
-
|
|
30146
|
+
j.length > 0 && /* @__PURE__ */ V("div", {
|
|
30124
30147
|
className: "rounded-md bg-danger/10 border border-danger/20 px-3 py-2 text-xs text-danger space-y-1",
|
|
30125
|
-
children:
|
|
30148
|
+
children: j.map((e) => /* @__PURE__ */ V("div", { children: e }, e))
|
|
30126
30149
|
}),
|
|
30127
|
-
|
|
30150
|
+
te && /* @__PURE__ */ V("div", {
|
|
30128
30151
|
className: "rounded-md bg-danger/10 border border-danger/20 px-3 py-2 text-xs text-danger",
|
|
30129
|
-
children:
|
|
30152
|
+
children: te
|
|
30130
30153
|
}),
|
|
30131
30154
|
E?.state === "failed" && E.error && /* @__PURE__ */ H("div", {
|
|
30132
30155
|
className: "rounded-md bg-danger/10 border border-danger/20 px-3 py-2 text-xs text-danger",
|
|
30133
30156
|
children: ["ramp failed: ", E.error]
|
|
30134
30157
|
}),
|
|
30135
|
-
|
|
30158
|
+
M.length > 0 && /* @__PURE__ */ V("div", {
|
|
30136
30159
|
className: "rounded-md border border-border bg-background p-2 space-y-0.5",
|
|
30137
|
-
children:
|
|
30160
|
+
children: M.map((e, t) => /* @__PURE__ */ V("div", {
|
|
30138
30161
|
className: "text-[11px] font-mono text-foreground-subtle",
|
|
30139
30162
|
children: e
|
|
30140
30163
|
}, `${e}-${t}`))
|
|
@@ -30299,7 +30322,7 @@ function dO(e, t) {
|
|
|
30299
30322
|
}
|
|
30300
30323
|
}
|
|
30301
30324
|
function fO({ trpc: e, nodeId: t }) {
|
|
30302
|
-
let [n, r] = l([]), [i, a] = l(""), [o, s] = l(3), [c, d] = l(25), [f, p] = l("jpeg"), [m, h] = l("duration"), [g, _] = l(60), [y, b] = l(1e3), [x, S] = l(15), [C, w] = l(2e3), [T, E] = l(5), [D, O] = l(20), [k] = l("decoder-nodeav"), [ee,
|
|
30325
|
+
let [n, r] = l([]), [i, a] = l(""), [o, s] = l(3), [c, d] = l(25), [f, p] = l("jpeg"), [m, h] = l("duration"), [g, _] = l(60), [y, b] = l(1e3), [x, S] = l(15), [C, w] = l(2e3), [T, E] = l(5), [D, O] = l(20), [k] = l("decoder-nodeav"), [ee, A] = l(""), [te, ne] = l(""), [j] = l(0), [re, M] = l(null), [N, P] = l(!1), [F, I] = l(""), [L, R] = l(null), [z, ie] = l("idle"), [B, ae] = l(null), [oe, U] = l(!0), se = u(null);
|
|
30303
30326
|
return v(() => {
|
|
30304
30327
|
e.addons.custom.mutate({
|
|
30305
30328
|
addonId: "benchmark",
|
|
@@ -30317,15 +30340,15 @@ function fO({ trpc: e, nodeId: t }) {
|
|
|
30317
30340
|
nodeId: t
|
|
30318
30341
|
}).then((e) => {
|
|
30319
30342
|
let t = e;
|
|
30320
|
-
|
|
30343
|
+
A(String(dO(t, "hwaccel") ?? "")), ne(String(dO(t, "probedBestHwaccel") ?? ""));
|
|
30321
30344
|
}).catch((e) => {
|
|
30322
|
-
console.warn("[benchmark:decoder] addon-settings fetch failed:", e),
|
|
30345
|
+
console.warn("[benchmark:decoder] addon-settings fetch failed:", e), A(""), ne("");
|
|
30323
30346
|
});
|
|
30324
30347
|
}, [
|
|
30325
30348
|
e,
|
|
30326
30349
|
t,
|
|
30327
30350
|
k,
|
|
30328
|
-
|
|
30351
|
+
j
|
|
30329
30352
|
]), v(() => {
|
|
30330
30353
|
let t = null;
|
|
30331
30354
|
try {
|
|
@@ -30337,7 +30360,7 @@ function fO({ trpc: e, nodeId: t }) {
|
|
|
30337
30360
|
if (!n || t.sessionId !== n) return;
|
|
30338
30361
|
typeof t.phase == "string" && ie(t.phase);
|
|
30339
30362
|
let r = t.sample;
|
|
30340
|
-
r && typeof r == "object" &&
|
|
30363
|
+
r && typeof r == "object" && R(r);
|
|
30341
30364
|
},
|
|
30342
30365
|
onError: (e) => {
|
|
30343
30366
|
console.warn("[benchmark:decoder] progress subscription error:", e);
|
|
@@ -30355,9 +30378,9 @@ function fO({ trpc: e, nodeId: t }) {
|
|
|
30355
30378
|
children: "Loading fixtures..."
|
|
30356
30379
|
}) : /* @__PURE__ */ H("div", {
|
|
30357
30380
|
className: "space-y-4",
|
|
30358
|
-
children: [
|
|
30381
|
+
children: [F && /* @__PURE__ */ V("div", {
|
|
30359
30382
|
className: "rounded-md bg-danger/10 border border-danger/20 px-3 py-2 text-xs text-danger",
|
|
30360
|
-
children:
|
|
30383
|
+
children: F
|
|
30361
30384
|
}), /* @__PURE__ */ H("div", {
|
|
30362
30385
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
30363
30386
|
children: [/* @__PURE__ */ H("div", {
|
|
@@ -30368,13 +30391,13 @@ function fO({ trpc: e, nodeId: t }) {
|
|
|
30368
30391
|
addonId: k,
|
|
30369
30392
|
nodeId: t,
|
|
30370
30393
|
title: `Decoder addon · ${k}`,
|
|
30371
|
-
disabled:
|
|
30372
|
-
refreshToken:
|
|
30394
|
+
disabled: N,
|
|
30395
|
+
refreshToken: j,
|
|
30373
30396
|
collapsible: !0,
|
|
30374
30397
|
mode: "override",
|
|
30375
30398
|
onOverrideChange: (e) => {
|
|
30376
30399
|
let t = e.hwaccel;
|
|
30377
|
-
|
|
30400
|
+
M(typeof t == "string" && t.length > 0 ? t : null);
|
|
30378
30401
|
}
|
|
30379
30402
|
}),
|
|
30380
30403
|
/* @__PURE__ */ H("div", {
|
|
@@ -30384,7 +30407,7 @@ function fO({ trpc: e, nodeId: t }) {
|
|
|
30384
30407
|
" ",
|
|
30385
30408
|
/* @__PURE__ */ V("span", {
|
|
30386
30409
|
className: "font-mono text-foreground",
|
|
30387
|
-
children:
|
|
30410
|
+
children: re || ee || te || "none"
|
|
30388
30411
|
}),
|
|
30389
30412
|
" ",
|
|
30390
30413
|
"for this run."
|
|
@@ -30406,7 +30429,7 @@ function fO({ trpc: e, nodeId: t }) {
|
|
|
30406
30429
|
className: "mt-1 w-full px-2 py-2 sm:py-1 text-sm bg-background border border-border rounded",
|
|
30407
30430
|
value: i,
|
|
30408
30431
|
onChange: (e) => a(e.target.value),
|
|
30409
|
-
disabled:
|
|
30432
|
+
disabled: N,
|
|
30410
30433
|
children: n.map((e) => /* @__PURE__ */ H("option", {
|
|
30411
30434
|
value: e.filename,
|
|
30412
30435
|
children: [
|
|
@@ -30437,7 +30460,7 @@ function fO({ trpc: e, nodeId: t }) {
|
|
|
30437
30460
|
className: "mt-1 w-full px-2 py-2 sm:py-1 text-sm bg-background border border-border rounded",
|
|
30438
30461
|
value: o,
|
|
30439
30462
|
onChange: (e) => s(Number(e.target.value)),
|
|
30440
|
-
disabled:
|
|
30463
|
+
disabled: N
|
|
30441
30464
|
})]
|
|
30442
30465
|
}),
|
|
30443
30466
|
/* @__PURE__ */ H("label", {
|
|
@@ -30452,7 +30475,7 @@ function fO({ trpc: e, nodeId: t }) {
|
|
|
30452
30475
|
className: "mt-1 w-full px-2 py-2 sm:py-1 text-sm bg-background border border-border rounded",
|
|
30453
30476
|
value: c,
|
|
30454
30477
|
onChange: (e) => d(Number(e.target.value)),
|
|
30455
|
-
disabled:
|
|
30478
|
+
disabled: N
|
|
30456
30479
|
})]
|
|
30457
30480
|
}),
|
|
30458
30481
|
/* @__PURE__ */ H("label", {
|
|
@@ -30464,7 +30487,7 @@ function fO({ trpc: e, nodeId: t }) {
|
|
|
30464
30487
|
className: "mt-1 w-full px-2 py-2 sm:py-1 text-sm bg-background border border-border rounded",
|
|
30465
30488
|
value: f,
|
|
30466
30489
|
onChange: (e) => p(e.target.value),
|
|
30467
|
-
disabled:
|
|
30490
|
+
disabled: N,
|
|
30468
30491
|
children: [/* @__PURE__ */ V("option", {
|
|
30469
30492
|
value: "jpeg",
|
|
30470
30493
|
children: "jpeg"
|
|
@@ -30483,7 +30506,7 @@ function fO({ trpc: e, nodeId: t }) {
|
|
|
30483
30506
|
className: "mt-1 w-full px-2 py-2 sm:py-1 text-sm bg-background border border-border rounded",
|
|
30484
30507
|
value: m,
|
|
30485
30508
|
onChange: (e) => h(e.target.value),
|
|
30486
|
-
disabled:
|
|
30509
|
+
disabled: N,
|
|
30487
30510
|
children: [/* @__PURE__ */ V("option", {
|
|
30488
30511
|
value: "duration",
|
|
30489
30512
|
children: "duration"
|
|
@@ -30505,7 +30528,7 @@ function fO({ trpc: e, nodeId: t }) {
|
|
|
30505
30528
|
className: "mt-1 w-full px-2 py-2 sm:py-1 text-sm bg-background border border-border rounded",
|
|
30506
30529
|
value: g,
|
|
30507
30530
|
onChange: (e) => _(Number(e.target.value)),
|
|
30508
|
-
disabled:
|
|
30531
|
+
disabled: N
|
|
30509
30532
|
})]
|
|
30510
30533
|
}) : /* @__PURE__ */ H("label", {
|
|
30511
30534
|
className: "block text-xs",
|
|
@@ -30519,7 +30542,7 @@ function fO({ trpc: e, nodeId: t }) {
|
|
|
30519
30542
|
className: "mt-1 w-full px-2 py-2 sm:py-1 text-sm bg-background border border-border rounded",
|
|
30520
30543
|
value: y,
|
|
30521
30544
|
onChange: (e) => b(Number(e.target.value)),
|
|
30522
|
-
disabled:
|
|
30545
|
+
disabled: N
|
|
30523
30546
|
})]
|
|
30524
30547
|
}),
|
|
30525
30548
|
/* @__PURE__ */ H("label", {
|
|
@@ -30533,7 +30556,7 @@ function fO({ trpc: e, nodeId: t }) {
|
|
|
30533
30556
|
className: "mt-1 w-full px-2 py-2 sm:py-1 text-sm bg-background border border-border rounded",
|
|
30534
30557
|
value: x,
|
|
30535
30558
|
onChange: (e) => S(Number(e.target.value)),
|
|
30536
|
-
disabled:
|
|
30559
|
+
disabled: N
|
|
30537
30560
|
})]
|
|
30538
30561
|
}),
|
|
30539
30562
|
/* @__PURE__ */ H("label", {
|
|
@@ -30547,7 +30570,7 @@ function fO({ trpc: e, nodeId: t }) {
|
|
|
30547
30570
|
className: "mt-1 w-full px-2 py-2 sm:py-1 text-sm bg-background border border-border rounded",
|
|
30548
30571
|
value: C,
|
|
30549
30572
|
onChange: (e) => w(Number(e.target.value)),
|
|
30550
|
-
disabled:
|
|
30573
|
+
disabled: N
|
|
30551
30574
|
})]
|
|
30552
30575
|
}),
|
|
30553
30576
|
/* @__PURE__ */ H("label", {
|
|
@@ -30562,7 +30585,7 @@ function fO({ trpc: e, nodeId: t }) {
|
|
|
30562
30585
|
className: "mt-1 w-full px-2 py-2 sm:py-1 text-sm bg-background border border-border rounded",
|
|
30563
30586
|
value: T,
|
|
30564
30587
|
onChange: (e) => E(Number(e.target.value)),
|
|
30565
|
-
disabled:
|
|
30588
|
+
disabled: N
|
|
30566
30589
|
})]
|
|
30567
30590
|
}),
|
|
30568
30591
|
/* @__PURE__ */ H("label", {
|
|
@@ -30577,7 +30600,7 @@ function fO({ trpc: e, nodeId: t }) {
|
|
|
30577
30600
|
className: "mt-1 w-full px-2 py-2 sm:py-1 text-sm bg-background border border-border rounded",
|
|
30578
30601
|
value: D,
|
|
30579
30602
|
onChange: (e) => O(Number(e.target.value)),
|
|
30580
|
-
disabled:
|
|
30603
|
+
disabled: N
|
|
30581
30604
|
})]
|
|
30582
30605
|
})
|
|
30583
30606
|
]
|
|
@@ -30587,10 +30610,10 @@ function fO({ trpc: e, nodeId: t }) {
|
|
|
30587
30610
|
children: [/* @__PURE__ */ V("button", {
|
|
30588
30611
|
type: "button",
|
|
30589
30612
|
onClick: async () => {
|
|
30590
|
-
|
|
30613
|
+
I(""), ae(null), R(null), ie("init");
|
|
30591
30614
|
let r = `decoder-${Date.now()}-${Math.random().toString(36).slice(2, 10)}`;
|
|
30592
|
-
se.current = r,
|
|
30593
|
-
let a =
|
|
30615
|
+
se.current = r, P(!0);
|
|
30616
|
+
let a = re || ee || te || "none", s = {
|
|
30594
30617
|
sessionId: r,
|
|
30595
30618
|
nodeId: t,
|
|
30596
30619
|
cameras: o,
|
|
@@ -30647,15 +30670,15 @@ function fO({ trpc: e, nodeId: t }) {
|
|
|
30647
30670
|
});
|
|
30648
30671
|
}
|
|
30649
30672
|
} catch (e) {
|
|
30650
|
-
|
|
30673
|
+
I(e instanceof Error ? e.message : String(e));
|
|
30651
30674
|
} finally {
|
|
30652
|
-
se.current = null,
|
|
30675
|
+
se.current = null, P(!1);
|
|
30653
30676
|
}
|
|
30654
30677
|
},
|
|
30655
|
-
disabled:
|
|
30678
|
+
disabled: N || !i,
|
|
30656
30679
|
className: "flex-1 px-3 py-2.5 sm:py-1.5 text-sm bg-primary text-primary-foreground rounded disabled:opacity-50",
|
|
30657
|
-
children:
|
|
30658
|
-
}),
|
|
30680
|
+
children: N ? "Running…" : "Run Test"
|
|
30681
|
+
}), N && /* @__PURE__ */ V("button", {
|
|
30659
30682
|
type: "button",
|
|
30660
30683
|
onClick: async () => {
|
|
30661
30684
|
let t = se.current;
|
|
@@ -30689,36 +30712,36 @@ function fO({ trpc: e, nodeId: t }) {
|
|
|
30689
30712
|
className: "text-xs text-foreground-subtle",
|
|
30690
30713
|
children: ["Phase: ", /* @__PURE__ */ V("span", {
|
|
30691
30714
|
className: "font-mono",
|
|
30692
|
-
children:
|
|
30715
|
+
children: z
|
|
30693
30716
|
})]
|
|
30694
30717
|
}),
|
|
30695
|
-
|
|
30718
|
+
L ? /* @__PURE__ */ H("div", {
|
|
30696
30719
|
className: "grid grid-cols-2 gap-x-3 gap-y-1 text-xs font-mono",
|
|
30697
30720
|
children: [
|
|
30698
30721
|
/* @__PURE__ */ H("div", { children: [
|
|
30699
30722
|
"t: ",
|
|
30700
|
-
|
|
30723
|
+
L.tSec.toFixed(1),
|
|
30701
30724
|
"s"
|
|
30702
30725
|
] }),
|
|
30703
|
-
/* @__PURE__ */ H("div", { children: ["frames: ",
|
|
30726
|
+
/* @__PURE__ */ H("div", { children: ["frames: ", L.framesTotal] }),
|
|
30704
30727
|
/* @__PURE__ */ H("div", { children: [
|
|
30705
30728
|
"rss: ",
|
|
30706
|
-
|
|
30729
|
+
L.rssMB.toFixed(1),
|
|
30707
30730
|
" MB"
|
|
30708
30731
|
] }),
|
|
30709
30732
|
/* @__PURE__ */ H("div", { children: [
|
|
30710
30733
|
"heap: ",
|
|
30711
|
-
|
|
30734
|
+
L.heapMB.toFixed(1),
|
|
30712
30735
|
" MB"
|
|
30713
30736
|
] }),
|
|
30714
30737
|
/* @__PURE__ */ H("div", { children: [
|
|
30715
30738
|
"external: ",
|
|
30716
|
-
|
|
30739
|
+
L.externalMB.toFixed(1),
|
|
30717
30740
|
" MB"
|
|
30718
30741
|
] }),
|
|
30719
30742
|
/* @__PURE__ */ H("div", { children: [
|
|
30720
30743
|
"cpu: ",
|
|
30721
|
-
|
|
30744
|
+
L.cpuPct.toFixed(0),
|
|
30722
30745
|
"%"
|
|
30723
30746
|
] })
|
|
30724
30747
|
]
|
|
@@ -31354,14 +31377,14 @@ function kO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
31354
31377
|
let [r, i] = l(null), [a, s] = l([]), [c, d] = l(null), [f, p] = l([]), [m, h] = l(""), [g, _] = l(null), [y, b] = l(""), [x, S] = l(null), [C, w] = l({
|
|
31355
31378
|
w: 640,
|
|
31356
31379
|
h: 480
|
|
31357
|
-
}), [T, E] = l([]), [D, O] = l(null), [k, ee] = l(null), [
|
|
31380
|
+
}), [T, E] = l([]), [D, O] = l(null), [k, ee] = l(null), [A, te] = l(null), [ne, j] = l(!1), [re, M] = l(""), [N, P] = l(null), [F, I] = l(!0), [L, R] = l([]), [z, ie] = l(200), [B, ae] = l(4), [oe, U] = l(1), [se, ce] = l(!1), [le, ue] = l(null), [de, fe] = l(null), [pe, me] = l(null), [W, he] = l(null), ge = u(null), [_e, ve] = l(/* @__PURE__ */ new Set()), ye = o((e, t) => {
|
|
31358
31381
|
ve((n) => {
|
|
31359
31382
|
let r = new Set(n);
|
|
31360
31383
|
return t ? r.delete(e) : r.add(e), r;
|
|
31361
31384
|
});
|
|
31362
31385
|
}, []);
|
|
31363
31386
|
v(() => {
|
|
31364
|
-
|
|
31387
|
+
P(null), M(""), R([]);
|
|
31365
31388
|
}, [t]), v(() => {
|
|
31366
31389
|
let t = null;
|
|
31367
31390
|
try {
|
|
@@ -31375,9 +31398,9 @@ function kO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
31375
31398
|
} else if (r !== n) return;
|
|
31376
31399
|
if (t.message) {
|
|
31377
31400
|
let e = String(t.message);
|
|
31378
|
-
|
|
31401
|
+
R((t) => [...t, e]), i && t.benchProgress && (ue(e), he({
|
|
31379
31402
|
iter: Math.ceil(t.runs / Math.max(1, B)),
|
|
31380
|
-
total:
|
|
31403
|
+
total: z,
|
|
31381
31404
|
runs: t.runs,
|
|
31382
31405
|
meanMs: t.meanMs,
|
|
31383
31406
|
inferMeanMs: t.inferMeanMs,
|
|
@@ -31422,9 +31445,9 @@ function kO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
31422
31445
|
});
|
|
31423
31446
|
}, [e]), v(() => {
|
|
31424
31447
|
Promise.all([e.pipelineExecutor.getSchema.query({ nodeId: t }), e.pipelineOrchestrator.listTemplates.query()]).then(([e, t]) => {
|
|
31425
|
-
i(e), s(t.map((t) => DO(t, e))), E(TO(e)),
|
|
31448
|
+
i(e), s(t.map((t) => DO(t, e))), E(TO(e)), I(!1);
|
|
31426
31449
|
}).catch((e) => {
|
|
31427
|
-
console.error("[benchmark:image] Failed to load pipeline data:", e),
|
|
31450
|
+
console.error("[benchmark:image] Failed to load pipeline data:", e), I(!1);
|
|
31428
31451
|
});
|
|
31429
31452
|
}, [e, t]);
|
|
31430
31453
|
let G = (e) => {
|
|
@@ -31435,20 +31458,20 @@ function kO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
31435
31458
|
h: t.naturalHeight
|
|
31436
31459
|
})), t.src = e;
|
|
31437
31460
|
}, be = async (t) => {
|
|
31438
|
-
h(t),
|
|
31461
|
+
h(t), P(null);
|
|
31439
31462
|
try {
|
|
31440
31463
|
let n = await e.pipelineExecutor.getReferenceImage.query({ filename: t });
|
|
31441
31464
|
n && (_(n.base64), G(`data:image/jpeg;base64,${n.base64}`));
|
|
31442
31465
|
} catch (e) {
|
|
31443
31466
|
console.warn("[benchmark:image] Failed to load image:", e);
|
|
31444
31467
|
}
|
|
31445
|
-
}, xe =
|
|
31446
|
-
|
|
31468
|
+
}, xe = A ? SD(A.steps) : T.map((e) => OO(e)), Se = async () => {
|
|
31469
|
+
j(!0), M(""), P(null), R([]);
|
|
31447
31470
|
let n = `ui-${Date.now()}-${Math.random().toString(36).slice(2, 10)}`;
|
|
31448
31471
|
ge.current = n;
|
|
31449
31472
|
try {
|
|
31450
31473
|
if (!g) {
|
|
31451
|
-
|
|
31474
|
+
M("No image loaded");
|
|
31452
31475
|
return;
|
|
31453
31476
|
}
|
|
31454
31477
|
let r = await e.addons.custom.mutate({
|
|
@@ -31462,18 +31485,18 @@ function kO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
31462
31485
|
...k ? { deviceKey: k } : {}
|
|
31463
31486
|
}) }
|
|
31464
31487
|
});
|
|
31465
|
-
console.log("[benchmark] runPipelineTest OUTPUT:", JSON.stringify(r, null, 2)),
|
|
31488
|
+
console.log("[benchmark] runPipelineTest OUTPUT:", JSON.stringify(r, null, 2)), P(r);
|
|
31466
31489
|
} catch (e) {
|
|
31467
|
-
console.error("[benchmark] runPipelineTest ERROR:", e),
|
|
31490
|
+
console.error("[benchmark] runPipelineTest ERROR:", e), M(e instanceof Error ? e.message : String(e));
|
|
31468
31491
|
} finally {
|
|
31469
|
-
ge.current = null,
|
|
31492
|
+
ge.current = null, j(!1);
|
|
31470
31493
|
}
|
|
31471
31494
|
}, Ce = async (n) => {
|
|
31472
31495
|
if (!g) {
|
|
31473
|
-
|
|
31496
|
+
M("No image loaded");
|
|
31474
31497
|
return;
|
|
31475
31498
|
}
|
|
31476
|
-
|
|
31499
|
+
M(""), ce(!0), fe(n), ue("caching frame…"), he(null), me(null);
|
|
31477
31500
|
let r = `synth-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
|
|
31478
31501
|
ge.current = r;
|
|
31479
31502
|
let i = null;
|
|
@@ -31485,7 +31508,7 @@ function kO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
31485
31508
|
imageBase64: g,
|
|
31486
31509
|
ttlSeconds: 600
|
|
31487
31510
|
}
|
|
31488
|
-
})).frameId, ue(`running synthetic bench — ${B} workers × ${
|
|
31511
|
+
})).frameId, ue(`running synthetic bench — ${B} workers × ${z} iters`);
|
|
31489
31512
|
let a = performance.now(), o = await e.addons.custom.mutate({
|
|
31490
31513
|
addonId: "pipeline-runner",
|
|
31491
31514
|
action: "runSyntheticBench",
|
|
@@ -31493,7 +31516,7 @@ function kO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
31493
31516
|
frameId: i,
|
|
31494
31517
|
steps: xe,
|
|
31495
31518
|
parallel: B,
|
|
31496
|
-
iterations:
|
|
31519
|
+
iterations: z,
|
|
31497
31520
|
warmup: oe,
|
|
31498
31521
|
sessionId: r,
|
|
31499
31522
|
nodeId: t,
|
|
@@ -31505,8 +31528,8 @@ function kO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
31505
31528
|
...o,
|
|
31506
31529
|
clientWallMs: s.toFixed(0)
|
|
31507
31530
|
}), he({
|
|
31508
|
-
iter:
|
|
31509
|
-
total:
|
|
31531
|
+
iter: z,
|
|
31532
|
+
total: z,
|
|
31510
31533
|
runs: o.runs,
|
|
31511
31534
|
meanMs: o.callMs.mean,
|
|
31512
31535
|
inferMeanMs: o.inferMs,
|
|
@@ -31522,14 +31545,14 @@ function kO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
31522
31545
|
avgDetections: o.avgDetections
|
|
31523
31546
|
}), ue(`synthetic — ${o.fps.toFixed(1)} fps · ${o.detectionsPerSec.toFixed(1)} det/s · call ${o.callMs.mean.toFixed(1)}ms p95 ${o.callMs.p95.toFixed(1)}ms · batch ${o.batchSizeMean.toFixed(2)}`), me(await wO((t) => e.addons.custom.mutate({ ...t }), {
|
|
31524
31547
|
steps: xe,
|
|
31525
|
-
iterations:
|
|
31548
|
+
iterations: z,
|
|
31526
31549
|
warmup: oe,
|
|
31527
31550
|
parallel: B,
|
|
31528
31551
|
...m ? { referenceImage: m } : {},
|
|
31529
31552
|
result: o
|
|
31530
31553
|
}));
|
|
31531
31554
|
} catch (e) {
|
|
31532
|
-
|
|
31555
|
+
M(e instanceof Error ? e.message : String(e)), ue(null);
|
|
31533
31556
|
} finally {
|
|
31534
31557
|
ce(!1), i && e.addons.custom.mutate({
|
|
31535
31558
|
addonId: "pipeline-runner",
|
|
@@ -31538,13 +31561,13 @@ function kO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
31538
31561
|
}).catch(() => void 0);
|
|
31539
31562
|
}
|
|
31540
31563
|
};
|
|
31541
|
-
if (
|
|
31564
|
+
if (F) return /* @__PURE__ */ V("div", {
|
|
31542
31565
|
className: "text-sm text-foreground-subtle animate-pulse py-8 text-center",
|
|
31543
31566
|
children: "Loading..."
|
|
31544
31567
|
});
|
|
31545
|
-
let we = C.w, Te = C.h, Ee =
|
|
31568
|
+
let we = C.w, Te = C.h, Ee = N?.detections ? [...N.detections] : [], De = /* @__PURE__ */ new Set();
|
|
31546
31569
|
for (let e of Ee) e.kind === "first-level" && _e.has(e.id) && De.add(e.id);
|
|
31547
|
-
let Oe = Ee.filter((e) => !(_e.has(e.id) || e.kind === "detail" && e.parentId && De.has(e.parentId))), ke = {}, Ae =
|
|
31570
|
+
let Oe = Ee.filter((e) => !(_e.has(e.id) || e.kind === "detail" && e.parentId && De.has(e.parentId))), ke = {}, Ae = N?.debug?.stepTimings ?? [];
|
|
31548
31571
|
for (let e of Ae) ke[`${e.source}${e.modelId ? ` (${e.modelId})` : ""}`] = e.ms;
|
|
31549
31572
|
return /* @__PURE__ */ H("div", {
|
|
31550
31573
|
className: "space-y-4",
|
|
@@ -31557,8 +31580,8 @@ function kO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
31557
31580
|
onDeviceKeyChange: ee,
|
|
31558
31581
|
selectedDeviceId: D,
|
|
31559
31582
|
onSelectCamera: O,
|
|
31560
|
-
onResolved:
|
|
31561
|
-
disabled:
|
|
31583
|
+
onResolved: te,
|
|
31584
|
+
disabled: ne || se
|
|
31562
31585
|
}),
|
|
31563
31586
|
/* @__PURE__ */ V(FE, {
|
|
31564
31587
|
images: f,
|
|
@@ -31566,12 +31589,12 @@ function kO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
31566
31589
|
uploadedName: y,
|
|
31567
31590
|
onSelect: be,
|
|
31568
31591
|
onUpload: (e, t, n) => {
|
|
31569
|
-
_(e), b(t), h(""), G(n),
|
|
31592
|
+
_(e), b(t), h(""), G(n), P(null);
|
|
31570
31593
|
}
|
|
31571
31594
|
}),
|
|
31572
|
-
|
|
31595
|
+
re && /* @__PURE__ */ V("div", {
|
|
31573
31596
|
className: "rounded-md bg-danger/10 border border-danger/20 px-3 py-2 text-xs text-danger",
|
|
31574
|
-
children:
|
|
31597
|
+
children: re
|
|
31575
31598
|
}),
|
|
31576
31599
|
/* @__PURE__ */ H("div", {
|
|
31577
31600
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
@@ -31580,9 +31603,9 @@ function kO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
31580
31603
|
children: [
|
|
31581
31604
|
/* @__PURE__ */ V("button", {
|
|
31582
31605
|
onClick: Se,
|
|
31583
|
-
disabled: !
|
|
31584
|
-
className: `w-full px-4 py-2.5 text-sm font-medium rounded-lg transition-colors ${
|
|
31585
|
-
children:
|
|
31606
|
+
disabled: !ne && !m && !g,
|
|
31607
|
+
className: `w-full px-4 py-2.5 text-sm font-medium rounded-lg transition-colors ${ne ? "bg-primary text-primary-foreground animate-pulse" : "bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50"}`,
|
|
31608
|
+
children: ne ? L.length > 0 ? L[L.length - 1] : "Processing..." : "Run Pipeline"
|
|
31586
31609
|
}),
|
|
31587
31610
|
/* @__PURE__ */ H("div", {
|
|
31588
31611
|
className: "rounded-md border border-border bg-surface p-2 space-y-2",
|
|
@@ -31604,7 +31627,7 @@ function kO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
31604
31627
|
min: 1,
|
|
31605
31628
|
max: 1e3,
|
|
31606
31629
|
className: "mt-1 w-full px-2 py-2 sm:py-1 text-sm bg-background border border-border rounded",
|
|
31607
|
-
value:
|
|
31630
|
+
value: z,
|
|
31608
31631
|
onChange: (e) => ie(Number(e.target.value)),
|
|
31609
31632
|
disabled: se
|
|
31610
31633
|
})]
|
|
@@ -31685,7 +31708,7 @@ function kO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
31685
31708
|
t,
|
|
31686
31709
|
" · ",
|
|
31687
31710
|
k ?? "node default pool",
|
|
31688
|
-
|
|
31711
|
+
A ? ` · camera #${A.deviceId} (resolved tree)` : " · custom tree"
|
|
31689
31712
|
]
|
|
31690
31713
|
})
|
|
31691
31714
|
]
|
|
@@ -31808,7 +31831,7 @@ function kO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
31808
31831
|
detections: Oe,
|
|
31809
31832
|
placeholder: "Select an image above"
|
|
31810
31833
|
}),
|
|
31811
|
-
|
|
31834
|
+
N && Oe.length > 0 && /* @__PURE__ */ H("div", {
|
|
31812
31835
|
className: "text-xs text-foreground-subtle",
|
|
31813
31836
|
children: [
|
|
31814
31837
|
Oe.length,
|
|
@@ -31820,24 +31843,24 @@ function kO({ trpc: e, nodeId: t, onNodeChange: n }) {
|
|
|
31820
31843
|
Te
|
|
31821
31844
|
]
|
|
31822
31845
|
}),
|
|
31823
|
-
|
|
31846
|
+
L.length > 0 && /* @__PURE__ */ V("div", {
|
|
31824
31847
|
className: "rounded-md border border-border bg-surface p-3 space-y-1 text-xs text-foreground-subtle",
|
|
31825
|
-
children:
|
|
31848
|
+
children: L.map((e, t) => /* @__PURE__ */ H("div", {
|
|
31826
31849
|
className: "flex items-center gap-2",
|
|
31827
|
-
children: [/* @__PURE__ */ V("span", { className: `h-1.5 w-1.5 rounded-full shrink-0 ${t ===
|
|
31850
|
+
children: [/* @__PURE__ */ V("span", { className: `h-1.5 w-1.5 rounded-full shrink-0 ${t === L.length - 1 ? "bg-primary animate-pulse" : "bg-foreground-subtle/30"}` }), e]
|
|
31828
31851
|
}, t))
|
|
31829
31852
|
}),
|
|
31830
31853
|
Object.keys(ke).length > 0 && /* @__PURE__ */ V(UE, {
|
|
31831
31854
|
timings: ke,
|
|
31832
|
-
totalMs:
|
|
31855
|
+
totalMs: N?.debug?.totalInferenceMs
|
|
31833
31856
|
}),
|
|
31834
|
-
|
|
31857
|
+
N && /* @__PURE__ */ V(dp, {
|
|
31835
31858
|
detections: Ee,
|
|
31836
31859
|
hiddenKeys: _e,
|
|
31837
31860
|
onToggleVisibility: ye
|
|
31838
31861
|
}),
|
|
31839
31862
|
/* @__PURE__ */ V(HE, {
|
|
31840
|
-
data:
|
|
31863
|
+
data: N,
|
|
31841
31864
|
label: "Pipeline Response"
|
|
31842
31865
|
})
|
|
31843
31866
|
]
|
|
@@ -33095,7 +33118,7 @@ function ZO(e) {
|
|
|
33095
33118
|
return t;
|
|
33096
33119
|
}
|
|
33097
33120
|
function QO({ trpc: e }) {
|
|
33098
|
-
let [t, n] = l([]), [r, i] = l(""), [a, s] = l(null), [c, u] = l(""), [d, f] = l([]), [p, m] = l(/* @__PURE__ */ new Set()), [g, _] = l({}), [y, b] = l({}), [x, S] = l({}), [C, w] = l({}), [T, E] = l({}), [D, O] = l(15), [k, ee] = l(4), [
|
|
33121
|
+
let [t, n] = l([]), [r, i] = l(""), [a, s] = l(null), [c, u] = l(""), [d, f] = l([]), [p, m] = l(/* @__PURE__ */ new Set()), [g, _] = l({}), [y, b] = l({}), [x, S] = l({}), [C, w] = l({}), [T, E] = l({}), [D, O] = l(15), [k, ee] = l(4), [A, te] = l(2), [ne, j] = l(640), [re, M] = l(!1), [N, P] = l(null), [F, I] = l(null), [L, R] = l(""), [z, ie] = l(null);
|
|
33099
33122
|
v(() => {
|
|
33100
33123
|
e.pipelineExecutor.listReferenceImages.query().then((e) => {
|
|
33101
33124
|
n(e), e.length > 0 && e[0] && (i(e[0].filename), u(e[0].filename));
|
|
@@ -33165,30 +33188,30 @@ function QO({ trpc: e }) {
|
|
|
33165
33188
|
r >= 0 && (s(e.slice(r + 1)), i(""), u(`upload: ${t.name}`));
|
|
33166
33189
|
}, n.readAsDataURL(t);
|
|
33167
33190
|
}, []), U = h(() => d.filter((e) => p.has(e.id)), [d, p]), se = o(async () => {
|
|
33168
|
-
if (
|
|
33169
|
-
|
|
33191
|
+
if (N) {
|
|
33192
|
+
I("stopping…");
|
|
33170
33193
|
try {
|
|
33171
33194
|
await e.addons.custom.mutate({
|
|
33172
33195
|
addonId: "benchmark",
|
|
33173
33196
|
action: "abortSustainedThroughput",
|
|
33174
|
-
input: { sessionId:
|
|
33197
|
+
input: { sessionId: N }
|
|
33175
33198
|
});
|
|
33176
33199
|
} catch (e) {
|
|
33177
33200
|
console.warn("[benchmark:sustained] abort failed", e);
|
|
33178
33201
|
}
|
|
33179
33202
|
}
|
|
33180
|
-
}, [e,
|
|
33203
|
+
}, [e, N]), ce = o(async () => {
|
|
33181
33204
|
if (!a) {
|
|
33182
|
-
|
|
33205
|
+
R("No frame loaded");
|
|
33183
33206
|
return;
|
|
33184
33207
|
}
|
|
33185
33208
|
if (U.length === 0) {
|
|
33186
|
-
|
|
33209
|
+
R("Select at least one node");
|
|
33187
33210
|
return;
|
|
33188
33211
|
}
|
|
33189
|
-
|
|
33212
|
+
R(""), ie(null), M(!0);
|
|
33190
33213
|
let t = `sustain-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
|
|
33191
|
-
|
|
33214
|
+
P(t), I("pinning frame…");
|
|
33192
33215
|
let n = null;
|
|
33193
33216
|
try {
|
|
33194
33217
|
n = (await e.addons.custom.mutate({
|
|
@@ -33228,23 +33251,23 @@ function QO({ trpc: e }) {
|
|
|
33228
33251
|
};
|
|
33229
33252
|
});
|
|
33230
33253
|
});
|
|
33231
|
-
|
|
33254
|
+
I(`running ${D}s · batch ${k} · concurrency ${A} · ${r.length} node(s)`), ie(await e.addons.custom.mutate({
|
|
33232
33255
|
addonId: "benchmark",
|
|
33233
33256
|
action: "runSustainedThroughput",
|
|
33234
33257
|
input: {
|
|
33235
33258
|
frameId: n,
|
|
33236
33259
|
durationSec: D,
|
|
33237
33260
|
batchSize: k,
|
|
33238
|
-
concurrency:
|
|
33239
|
-
targetSize:
|
|
33261
|
+
concurrency: A,
|
|
33262
|
+
targetSize: ne,
|
|
33240
33263
|
sessionId: t,
|
|
33241
33264
|
nodes: r
|
|
33242
33265
|
}
|
|
33243
|
-
})),
|
|
33266
|
+
})), I(null);
|
|
33244
33267
|
} catch (e) {
|
|
33245
|
-
|
|
33268
|
+
R(e instanceof Error ? e.message : String(e)), I(null);
|
|
33246
33269
|
} finally {
|
|
33247
|
-
|
|
33270
|
+
M(!1), P(null), n && e.addons.custom.mutate({
|
|
33248
33271
|
addonId: "benchmark",
|
|
33249
33272
|
action: "releaseBenchFrame",
|
|
33250
33273
|
input: { frameId: n }
|
|
@@ -33261,8 +33284,8 @@ function QO({ trpc: e }) {
|
|
|
33261
33284
|
C,
|
|
33262
33285
|
D,
|
|
33263
33286
|
k,
|
|
33264
|
-
|
|
33265
|
-
|
|
33287
|
+
A,
|
|
33288
|
+
ne
|
|
33266
33289
|
]), le = "w-24 px-2 py-1.5 text-sm rounded-md border border-border bg-surface text-foreground", ue = "rounded-lg border border-border bg-surface p-4 space-y-3";
|
|
33267
33290
|
return /* @__PURE__ */ H("div", {
|
|
33268
33291
|
className: "space-y-4",
|
|
@@ -33357,8 +33380,8 @@ function QO({ trpc: e }) {
|
|
|
33357
33380
|
type: "number",
|
|
33358
33381
|
min: 1,
|
|
33359
33382
|
max: 64,
|
|
33360
|
-
value:
|
|
33361
|
-
onChange: (e) =>
|
|
33383
|
+
value: A,
|
|
33384
|
+
onChange: (e) => te(Math.max(1, Number(e.target.value) || 1)),
|
|
33362
33385
|
className: le
|
|
33363
33386
|
})]
|
|
33364
33387
|
}),
|
|
@@ -33372,8 +33395,8 @@ function QO({ trpc: e }) {
|
|
|
33372
33395
|
min: 64,
|
|
33373
33396
|
max: 2048,
|
|
33374
33397
|
step: 32,
|
|
33375
|
-
value:
|
|
33376
|
-
onChange: (e) =>
|
|
33398
|
+
value: ne,
|
|
33399
|
+
onChange: (e) => j(Math.max(64, Number(e.target.value) || 640)),
|
|
33377
33400
|
className: le
|
|
33378
33401
|
})]
|
|
33379
33402
|
})
|
|
@@ -33463,38 +33486,38 @@ function QO({ trpc: e }) {
|
|
|
33463
33486
|
children: [
|
|
33464
33487
|
/* @__PURE__ */ V("button", {
|
|
33465
33488
|
onClick: ce,
|
|
33466
|
-
disabled:
|
|
33489
|
+
disabled: re,
|
|
33467
33490
|
className: "px-4 py-2 text-sm rounded-md bg-primary text-white disabled:opacity-50",
|
|
33468
|
-
children:
|
|
33491
|
+
children: re ? "Running…" : "Start"
|
|
33469
33492
|
}),
|
|
33470
33493
|
/* @__PURE__ */ V("button", {
|
|
33471
33494
|
onClick: se,
|
|
33472
|
-
disabled: !
|
|
33495
|
+
disabled: !re,
|
|
33473
33496
|
className: "px-4 py-2 text-sm rounded-md border border-border text-foreground disabled:opacity-50",
|
|
33474
33497
|
children: "Stop"
|
|
33475
33498
|
}),
|
|
33476
|
-
|
|
33499
|
+
F && /* @__PURE__ */ V("span", {
|
|
33477
33500
|
className: "text-xs text-foreground-subtle",
|
|
33478
|
-
children:
|
|
33501
|
+
children: F
|
|
33479
33502
|
}),
|
|
33480
|
-
|
|
33503
|
+
L && /* @__PURE__ */ V("span", {
|
|
33481
33504
|
className: "text-xs text-red-500",
|
|
33482
|
-
children:
|
|
33505
|
+
children: L
|
|
33483
33506
|
})
|
|
33484
33507
|
]
|
|
33485
33508
|
}),
|
|
33486
|
-
|
|
33509
|
+
z && /* @__PURE__ */ H("div", {
|
|
33487
33510
|
className: ue,
|
|
33488
33511
|
children: [/* @__PURE__ */ H("h3", {
|
|
33489
33512
|
className: "text-sm font-semibold text-foreground",
|
|
33490
33513
|
children: [
|
|
33491
33514
|
"Results — ",
|
|
33492
|
-
|
|
33515
|
+
z.durationSec,
|
|
33493
33516
|
"s · batch ",
|
|
33494
|
-
|
|
33517
|
+
z.batchSize,
|
|
33495
33518
|
" · concurrency",
|
|
33496
33519
|
" ",
|
|
33497
|
-
|
|
33520
|
+
z.concurrency
|
|
33498
33521
|
]
|
|
33499
33522
|
}), /* @__PURE__ */ V("div", {
|
|
33500
33523
|
className: "overflow-x-auto",
|
|
@@ -33540,7 +33563,7 @@ function QO({ trpc: e }) {
|
|
|
33540
33563
|
children: "errors"
|
|
33541
33564
|
})
|
|
33542
33565
|
]
|
|
33543
|
-
}) }), /* @__PURE__ */ V("tbody", { children:
|
|
33566
|
+
}) }), /* @__PURE__ */ V("tbody", { children: z.perNode.map((e, t) => /* @__PURE__ */ H("tr", {
|
|
33544
33567
|
className: "border-b border-border/50",
|
|
33545
33568
|
children: [
|
|
33546
33569
|
/* @__PURE__ */ H("td", {
|
|
@@ -33793,7 +33816,7 @@ function ck({ trpc: e }) {
|
|
|
33793
33816
|
} finally {
|
|
33794
33817
|
m(!1);
|
|
33795
33818
|
}
|
|
33796
|
-
}, [E, a]),
|
|
33819
|
+
}, [E, a]), A = o(async () => {
|
|
33797
33820
|
m(!0), x([]);
|
|
33798
33821
|
let e = [];
|
|
33799
33822
|
for (let t of T) {
|
|
@@ -33942,7 +33965,7 @@ function ck({ trpc: e }) {
|
|
|
33942
33965
|
}),
|
|
33943
33966
|
/* @__PURE__ */ V(uk, {
|
|
33944
33967
|
label: "Test each endpoint",
|
|
33945
|
-
onClick: () => void
|
|
33968
|
+
onClick: () => void A(),
|
|
33946
33969
|
disabled: p || T.length === 0,
|
|
33947
33970
|
running: p
|
|
33948
33971
|
})
|