@matter-server/dashboard 1.1.0 → 1.1.1-alpha.0-20260619-cc792b0
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/web/js/{attribute-write-dialog-CqqdRniU.js → attribute-write-dialog-BdRJhTUT.js} +1 -1
- package/dist/web/js/{command-invoke-dialog-BuvBOrdC.js → command-invoke-dialog-K7sWqmT7.js} +1 -1
- package/dist/web/js/{commission-node-dialog-nVZp3go0.js → commission-node-dialog-CIrtUBMI.js} +5 -5
- package/dist/web/js/{commission-node-existing-Cx3Ahk2t.js → commission-node-existing-BXWP_p4z.js} +2 -2
- package/dist/web/js/{commission-node-thread-CI8mWWPs.js → commission-node-thread-tiAZFQm-.js} +2 -2
- package/dist/web/js/{commission-node-wifi-lUX4LK2R.js → commission-node-wifi-COPgEzct.js} +2 -2
- package/dist/web/js/{dialog-box-bAdbnf-T.js → dialog-box-BPrL7aG8.js} +1 -1
- package/dist/web/js/{fire_event-tWhqPfdz.js → fire_event-CvJGy-iy.js} +1 -1
- package/dist/web/js/main.js +2 -3
- package/dist/web/js/{matter-dashboard-app-CONA_608.js → matter-dashboard-app-BKEbeuif.js} +243 -411
- package/dist/web/js/{node-acl-add-dialog-DlR-sF-b.js → node-acl-add-dialog-BCWHD3Ke.js} +3 -5
- package/dist/web/js/{node-binding-dialog-DhnX_86M.js → node-binding-dialog-B18O4ASU.js} +3 -5
- package/dist/web/js/{node-label-dialog-T3nPG-Qy.js → node-label-dialog-CR9VtPvB.js} +1 -1
- package/dist/web/js/{settings-dialog-DrHzJtsi.js → settings-dialog-CutA2TKp.js} +5 -9
- package/package.json +4 -4
|
@@ -122,7 +122,6 @@ let e$c = class e extends Event {
|
|
|
122
122
|
};
|
|
123
123
|
let i$8 = class i extends s$4 {
|
|
124
124
|
constructor(s, e, i) {
|
|
125
|
-
var _this$host$addControl, _this$host;
|
|
126
125
|
super(void 0 !== e.context ? e.initialValue : i), this.onContextRequest = t => {
|
|
127
126
|
if (t.context !== this.context) return;
|
|
128
127
|
const s = t.contextTarget ?? t.composedPath()[0];
|
|
@@ -135,7 +134,7 @@ let i$8 = class i extends s$4 {
|
|
|
135
134
|
consumerHost: i
|
|
136
135
|
}] of this.subscriptions) e.has(s) || (e.add(s), i.dispatchEvent(new s$6(this.context, i, s, true)));
|
|
137
136
|
s.stopPropagation();
|
|
138
|
-
}, this.host = s, void 0 !== e.context ? this.context = e.context : this.context = e, this.attachListeners(),
|
|
137
|
+
}, this.host = s, void 0 !== e.context ? this.context = e.context : this.context = e, this.attachListeners(), this.host.addController?.(this);
|
|
139
138
|
}
|
|
140
139
|
attachListeners() {
|
|
141
140
|
this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
|
|
@@ -194,7 +193,7 @@ function e$b({
|
|
|
194
193
|
s = {
|
|
195
194
|
...o,
|
|
196
195
|
set(e) {
|
|
197
|
-
r.get(this).setValue(e), t
|
|
196
|
+
r.get(this).setValue(e), t?.call(this, e);
|
|
198
197
|
}
|
|
199
198
|
};
|
|
200
199
|
}
|
|
@@ -374,8 +373,8 @@ let y$1 = class y extends HTMLElement {
|
|
|
374
373
|
return {
|
|
375
374
|
get: e,
|
|
376
375
|
set(s) {
|
|
377
|
-
const h = e
|
|
378
|
-
r
|
|
376
|
+
const h = e?.call(this);
|
|
377
|
+
r?.call(this, s), this.requestUpdate(t, h, i);
|
|
379
378
|
},
|
|
380
379
|
configurable: true,
|
|
381
380
|
enumerable: true
|
|
@@ -424,16 +423,13 @@ let y$1 = class y extends HTMLElement {
|
|
|
424
423
|
super(), this._$Ep = void 0, this.isUpdatePending = false, this.hasUpdated = false, this._$Em = null, this._$Ev();
|
|
425
424
|
}
|
|
426
425
|
_$Ev() {
|
|
427
|
-
|
|
428
|
-
this._$ES = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$E_(), this.requestUpdate(), (_this$constructor$l = this.constructor.l) === null || _this$constructor$l === void 0 ? void 0 : _this$constructor$l.forEach(t => t(this));
|
|
426
|
+
this._$ES = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(t => t(this));
|
|
429
427
|
}
|
|
430
428
|
addController(t) {
|
|
431
|
-
|
|
432
|
-
(this._$EO ?? (this._$EO = new Set())).add(t), void 0 !== this.renderRoot && this.isConnected && ((_t$hostConnected = t.hostConnected) === null || _t$hostConnected === void 0 ? void 0 : _t$hostConnected.call(t));
|
|
429
|
+
(this._$EO ?? (this._$EO = new Set())).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
|
|
433
430
|
}
|
|
434
431
|
removeController(t) {
|
|
435
|
-
|
|
436
|
-
(_this$_$EO = this._$EO) === null || _this$_$EO === void 0 || _this$_$EO.delete(t);
|
|
432
|
+
this._$EO?.delete(t);
|
|
437
433
|
}
|
|
438
434
|
_$E_() {
|
|
439
435
|
const t = new Map(),
|
|
@@ -446,19 +442,11 @@ let y$1 = class y extends HTMLElement {
|
|
|
446
442
|
return S$1(t, this.constructor.elementStyles), t;
|
|
447
443
|
}
|
|
448
444
|
connectedCallback() {
|
|
449
|
-
|
|
450
|
-
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(true), (_this$_$EO2 = this._$EO) === null || _this$_$EO2 === void 0 ? void 0 : _this$_$EO2.forEach(t => {
|
|
451
|
-
var _t$hostConnected2;
|
|
452
|
-
return (_t$hostConnected2 = t.hostConnected) === null || _t$hostConnected2 === void 0 ? void 0 : _t$hostConnected2.call(t);
|
|
453
|
-
});
|
|
445
|
+
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(true), this._$EO?.forEach(t => t.hostConnected?.());
|
|
454
446
|
}
|
|
455
447
|
enableUpdating(t) {}
|
|
456
448
|
disconnectedCallback() {
|
|
457
|
-
|
|
458
|
-
(_this$_$EO3 = this._$EO) === null || _this$_$EO3 === void 0 || _this$_$EO3.forEach(t => {
|
|
459
|
-
var _t$hostDisconnected;
|
|
460
|
-
return (_t$hostDisconnected = t.hostDisconnected) === null || _t$hostDisconnected === void 0 ? void 0 : _t$hostDisconnected.call(t);
|
|
461
|
-
});
|
|
449
|
+
this._$EO?.forEach(t => t.hostDisconnected?.());
|
|
462
450
|
}
|
|
463
451
|
attributeChangedCallback(t, s, i) {
|
|
464
452
|
this._$AK(t, i);
|
|
@@ -467,8 +455,7 @@ let y$1 = class y extends HTMLElement {
|
|
|
467
455
|
const i = this.constructor.elementProperties.get(t),
|
|
468
456
|
e = this.constructor._$Eu(t, i);
|
|
469
457
|
if (void 0 !== e && true === i.reflect) {
|
|
470
|
-
|
|
471
|
-
const h = (void 0 !== ((_i$converter = i.converter) === null || _i$converter === void 0 ? void 0 : _i$converter.toAttribute) ? i.converter : u$2).toAttribute(s, i.type);
|
|
458
|
+
const h = (void 0 !== i.converter?.toAttribute ? i.converter : u$2).toAttribute(s, i.type);
|
|
472
459
|
this._$Em = t, null == h ? this.removeAttribute(e) : this.setAttribute(e, h), this._$Em = null;
|
|
473
460
|
}
|
|
474
461
|
}
|
|
@@ -476,21 +463,19 @@ let y$1 = class y extends HTMLElement {
|
|
|
476
463
|
const i = this.constructor,
|
|
477
464
|
e = i._$Eh.get(t);
|
|
478
465
|
if (void 0 !== e && this._$Em !== e) {
|
|
479
|
-
var _t$converter, _this$_$Ej;
|
|
480
466
|
const t = i.getPropertyOptions(e),
|
|
481
467
|
h = "function" == typeof t.converter ? {
|
|
482
468
|
fromAttribute: t.converter
|
|
483
|
-
} : void 0 !==
|
|
469
|
+
} : void 0 !== t.converter?.fromAttribute ? t.converter : u$2;
|
|
484
470
|
this._$Em = e;
|
|
485
471
|
const r = h.fromAttribute(s, t.type);
|
|
486
|
-
this[e] = r ??
|
|
472
|
+
this[e] = r ?? this._$Ej?.get(e) ?? r, this._$Em = null;
|
|
487
473
|
}
|
|
488
474
|
}
|
|
489
475
|
requestUpdate(t, s, i, e = false, h) {
|
|
490
476
|
if (void 0 !== t) {
|
|
491
|
-
var _this$_$Ej2;
|
|
492
477
|
const r = this.constructor;
|
|
493
|
-
if (false === e && (h = this[t]), i ?? (i = r.getPropertyOptions(t)), !((i.hasChanged ?? f$2)(h, s) || i.useDefault && i.reflect && h ===
|
|
478
|
+
if (false === e && (h = this[t]), i ?? (i = r.getPropertyOptions(t)), !((i.hasChanged ?? f$2)(h, s) || i.useDefault && i.reflect && h === this._$Ej?.get(t) && !this.hasAttribute(r._$Eu(t, i)))) return;
|
|
494
479
|
this.C(t, s, i);
|
|
495
480
|
}
|
|
496
481
|
false === this.isUpdatePending && (this._$ES = this._$EP());
|
|
@@ -534,11 +519,7 @@ let y$1 = class y extends HTMLElement {
|
|
|
534
519
|
let t = false;
|
|
535
520
|
const s = this._$AL;
|
|
536
521
|
try {
|
|
537
|
-
|
|
538
|
-
t = this.shouldUpdate(s), t ? (this.willUpdate(s), (_this$_$EO4 = this._$EO) !== null && _this$_$EO4 !== void 0 && _this$_$EO4.forEach(t => {
|
|
539
|
-
var _t$hostUpdate;
|
|
540
|
-
return (_t$hostUpdate = t.hostUpdate) === null || _t$hostUpdate === void 0 ? void 0 : _t$hostUpdate.call(t);
|
|
541
|
-
}), this.update(s)) : this._$EM();
|
|
522
|
+
t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach(t => t.hostUpdate?.()), this.update(s)) : this._$EM();
|
|
542
523
|
} catch (s) {
|
|
543
524
|
throw t = false, this._$EM(), s;
|
|
544
525
|
}
|
|
@@ -546,11 +527,7 @@ let y$1 = class y extends HTMLElement {
|
|
|
546
527
|
}
|
|
547
528
|
willUpdate(t) {}
|
|
548
529
|
_$AE(t) {
|
|
549
|
-
|
|
550
|
-
(_this$_$EO5 = this._$EO) !== null && _this$_$EO5 !== void 0 && _this$_$EO5.forEach(t => {
|
|
551
|
-
var _t$hostUpdated;
|
|
552
|
-
return (_t$hostUpdated = t.hostUpdated) === null || _t$hostUpdated === void 0 ? void 0 : _t$hostUpdated.call(t);
|
|
553
|
-
}), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t)), this.updated(t);
|
|
530
|
+
this._$EO?.forEach(t => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t)), this.updated(t);
|
|
554
531
|
}
|
|
555
532
|
_$EM() {
|
|
556
533
|
this._$AL = new Map(), this.isUpdatePending = false;
|
|
@@ -572,7 +549,7 @@ let y$1 = class y extends HTMLElement {
|
|
|
572
549
|
};
|
|
573
550
|
y$1.elementStyles = [], y$1.shadowRootOptions = {
|
|
574
551
|
mode: "open"
|
|
575
|
-
}, y$1[d$1("elementProperties")] = new Map(), y$1[d$1("finalized")] = new Map(), p$2
|
|
552
|
+
}, y$1[d$1("elementProperties")] = new Map(), y$1[d$1("finalized")] = new Map(), p$2?.({
|
|
576
553
|
ReactiveElement: y$1
|
|
577
554
|
}), (a$2.reactiveElementVersions ?? (a$2.reactiveElementVersions = [])).push("2.1.2");
|
|
578
555
|
|
|
@@ -595,7 +572,7 @@ const t$2 = globalThis,
|
|
|
595
572
|
c$2 = () => l$2.createComment(""),
|
|
596
573
|
a$1 = t => null === t || "object" != typeof t && "function" != typeof t,
|
|
597
574
|
u$1 = Array.isArray,
|
|
598
|
-
d = t => u$1(t) || "function" == typeof
|
|
575
|
+
d = t => u$1(t) || "function" == typeof t?.[Symbol.iterator],
|
|
599
576
|
f$1 = "[ \t\n\f\r]",
|
|
600
577
|
v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
601
578
|
_ = /-->/g,
|
|
@@ -701,11 +678,10 @@ class S {
|
|
|
701
678
|
}
|
|
702
679
|
}
|
|
703
680
|
function M(t, i, s = t, e) {
|
|
704
|
-
var _s$_$Co, _h, _h2, _h2$_$AO;
|
|
705
681
|
if (i === E) return i;
|
|
706
|
-
let h = void 0 !== e ?
|
|
682
|
+
let h = void 0 !== e ? s._$Co?.[e] : s._$Cl;
|
|
707
683
|
const o = a$1(i) ? void 0 : i._$litDirective$;
|
|
708
|
-
return
|
|
684
|
+
return h?.constructor !== o && (h?._$AO?.(false), void 0 === o ? h = void 0 : (h = new o(t), h._$AT(t, s, e)), void 0 !== e ? (s._$Co ?? (s._$Co = []))[e] = h : s._$Cl = h), void 0 !== h && (i = M(t, h._$AS(t, i.values), h, e)), i;
|
|
709
685
|
}
|
|
710
686
|
class R {
|
|
711
687
|
constructor(t, i) {
|
|
@@ -724,19 +700,18 @@ class R {
|
|
|
724
700
|
},
|
|
725
701
|
parts: s
|
|
726
702
|
} = this._$AD,
|
|
727
|
-
e = (
|
|
703
|
+
e = (t?.creationScope ?? l$2).importNode(i, true);
|
|
728
704
|
P.currentNode = e;
|
|
729
705
|
let h = P.nextNode(),
|
|
730
706
|
o = 0,
|
|
731
707
|
n = 0,
|
|
732
708
|
r = s[0];
|
|
733
709
|
for (; void 0 !== r;) {
|
|
734
|
-
var _r;
|
|
735
710
|
if (o === r.index) {
|
|
736
711
|
let i;
|
|
737
712
|
2 === r.type ? i = new k(h, h.nextSibling, this, t) : 1 === r.type ? i = new r.ctor(h, r.name, r.strings, this, t) : 6 === r.type && (i = new Z(h, this, t)), this._$AV.push(i), r = s[++n];
|
|
738
713
|
}
|
|
739
|
-
o !==
|
|
714
|
+
o !== r?.index && (h = P.nextNode(), o++);
|
|
740
715
|
}
|
|
741
716
|
return P.currentNode = l$2, e;
|
|
742
717
|
}
|
|
@@ -747,17 +722,15 @@ class R {
|
|
|
747
722
|
}
|
|
748
723
|
class k {
|
|
749
724
|
get _$AU() {
|
|
750
|
-
|
|
751
|
-
return ((_this$_$AM = this._$AM) === null || _this$_$AM === void 0 ? void 0 : _this$_$AM._$AU) ?? this._$Cv;
|
|
725
|
+
return this._$AM?._$AU ?? this._$Cv;
|
|
752
726
|
}
|
|
753
727
|
constructor(t, i, s, e) {
|
|
754
|
-
this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cv =
|
|
728
|
+
this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cv = e?.isConnected ?? true;
|
|
755
729
|
}
|
|
756
730
|
get parentNode() {
|
|
757
|
-
var _t;
|
|
758
731
|
let t = this._$AA.parentNode;
|
|
759
732
|
const i = this._$AM;
|
|
760
|
-
return void 0 !== i && 11 ===
|
|
733
|
+
return void 0 !== i && 11 === t?.nodeType && (t = i.parentNode), t;
|
|
761
734
|
}
|
|
762
735
|
get startNode() {
|
|
763
736
|
return this._$AA;
|
|
@@ -778,13 +751,12 @@ class k {
|
|
|
778
751
|
this._$AH !== A && a$1(this._$AH) ? this._$AA.nextSibling.data = t : this.T(l$2.createTextNode(t)), this._$AH = t;
|
|
779
752
|
}
|
|
780
753
|
$(t) {
|
|
781
|
-
var _this$_$AH;
|
|
782
754
|
const {
|
|
783
755
|
values: i,
|
|
784
756
|
_$litType$: s
|
|
785
757
|
} = t,
|
|
786
758
|
e = "number" == typeof s ? this._$AC(t) : (void 0 === s.el && (s.el = S.createElement(V(s.h, s.h[0]), this.options)), s);
|
|
787
|
-
if (
|
|
759
|
+
if (this._$AH?._$AD === e) this._$AH.p(i);else {
|
|
788
760
|
const t = new R(e, this),
|
|
789
761
|
s = t.u(this.options);
|
|
790
762
|
t.p(i), this.T(s), this._$AH = t;
|
|
@@ -803,15 +775,13 @@ class k {
|
|
|
803
775
|
e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
|
|
804
776
|
}
|
|
805
777
|
_$AR(t = this._$AA.nextSibling, s) {
|
|
806
|
-
for (
|
|
807
|
-
var _this$_$AP;
|
|
778
|
+
for (this._$AP?.(false, true, s); t !== this._$AB;) {
|
|
808
779
|
const s = i$5(t).nextSibling;
|
|
809
780
|
i$5(t).remove(), t = s;
|
|
810
781
|
}
|
|
811
782
|
}
|
|
812
783
|
setConnected(t) {
|
|
813
|
-
|
|
814
|
-
void 0 === this._$AM && (this._$Cv = t, (_this$_$AP2 = this._$AP) === null || _this$_$AP2 === void 0 ? void 0 : _this$_$AP2.call(this, t));
|
|
784
|
+
void 0 === this._$AM && (this._$Cv = t, this._$AP?.(t));
|
|
815
785
|
}
|
|
816
786
|
}
|
|
817
787
|
class H {
|
|
@@ -866,8 +836,7 @@ class z extends H {
|
|
|
866
836
|
e && this.element.removeEventListener(this.name, this, s), h && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
867
837
|
}
|
|
868
838
|
handleEvent(t) {
|
|
869
|
-
|
|
870
|
-
"function" == typeof this._$AH ? this._$AH.call(((_this$options = this.options) === null || _this$options === void 0 ? void 0 : _this$options.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
839
|
+
"function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
|
|
871
840
|
}
|
|
872
841
|
}
|
|
873
842
|
class Z {
|
|
@@ -882,18 +851,17 @@ class Z {
|
|
|
882
851
|
}
|
|
883
852
|
}
|
|
884
853
|
const B = t$2.litHtmlPolyfillSupport;
|
|
885
|
-
B
|
|
854
|
+
B?.(S, k), (t$2.litHtmlVersions ?? (t$2.litHtmlVersions = [])).push("3.3.3");
|
|
886
855
|
const D = (t, i, s) => {
|
|
887
|
-
const e =
|
|
856
|
+
const e = s?.renderBefore ?? i;
|
|
888
857
|
let h = e._$litPart$;
|
|
889
858
|
if (void 0 === h) {
|
|
890
|
-
const t =
|
|
859
|
+
const t = s?.renderBefore ?? null;
|
|
891
860
|
e._$litPart$ = h = new k(i.insertBefore(c$2(), t), t, void 0, s ?? {});
|
|
892
861
|
}
|
|
893
862
|
return h._$AI(t), h;
|
|
894
863
|
};
|
|
895
864
|
|
|
896
|
-
var _s$litElementHydrateS;
|
|
897
865
|
/**
|
|
898
866
|
* @license
|
|
899
867
|
* Copyright 2017 Google LLC
|
|
@@ -916,22 +884,20 @@ let i$4 = class i extends y$1 {
|
|
|
916
884
|
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = D(r, this.renderRoot, this.renderOptions);
|
|
917
885
|
}
|
|
918
886
|
connectedCallback() {
|
|
919
|
-
|
|
920
|
-
super.connectedCallback(), (_this$_$Do = this._$Do) === null || _this$_$Do === void 0 ? void 0 : _this$_$Do.setConnected(true);
|
|
887
|
+
super.connectedCallback(), this._$Do?.setConnected(true);
|
|
921
888
|
}
|
|
922
889
|
disconnectedCallback() {
|
|
923
|
-
|
|
924
|
-
super.disconnectedCallback(), (_this$_$Do2 = this._$Do) === null || _this$_$Do2 === void 0 ? void 0 : _this$_$Do2.setConnected(false);
|
|
890
|
+
super.disconnectedCallback(), this._$Do?.setConnected(false);
|
|
925
891
|
}
|
|
926
892
|
render() {
|
|
927
893
|
return E;
|
|
928
894
|
}
|
|
929
895
|
};
|
|
930
|
-
i$4._$litElement$ = true, i$4["finalized"] = true,
|
|
896
|
+
i$4._$litElement$ = true, i$4["finalized"] = true, s$1.litElementHydrateSupport?.({
|
|
931
897
|
LitElement: i$4
|
|
932
898
|
});
|
|
933
899
|
const o$7 = s$1.litElementPolyfillSupport;
|
|
934
|
-
o$7
|
|
900
|
+
o$7?.({
|
|
935
901
|
LitElement: i$4
|
|
936
902
|
});
|
|
937
903
|
(s$1.litElementVersions ?? (s$1.litElementVersions = [])).push("4.2.2");
|
|
@@ -1024,10 +990,7 @@ const e$7 = (e, t, c) => (c.configurable = true, c.enumerable = true, Reflect.de
|
|
|
1024
990
|
*/
|
|
1025
991
|
function e$6(e, r) {
|
|
1026
992
|
return (n, s, i) => {
|
|
1027
|
-
const o = t =>
|
|
1028
|
-
var _t$renderRoot;
|
|
1029
|
-
return ((_t$renderRoot = t.renderRoot) === null || _t$renderRoot === void 0 ? void 0 : _t$renderRoot.querySelector(e)) ?? null;
|
|
1030
|
-
};
|
|
993
|
+
const o = t => t.renderRoot?.querySelector(e) ?? null;
|
|
1031
994
|
return e$7(n, s, {
|
|
1032
995
|
get() {
|
|
1033
996
|
return o(this);
|
|
@@ -1064,9 +1027,8 @@ function o$5(o) {
|
|
|
1064
1027
|
c = "slot" + (r ? `[name=${r}]` : ":not([name])");
|
|
1065
1028
|
return e$7(e, n, {
|
|
1066
1029
|
get() {
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
e = (t === null || t === void 0 ? void 0 : t.assignedElements(o)) ?? [];
|
|
1030
|
+
const t = this.renderRoot?.querySelector(c),
|
|
1031
|
+
e = t?.assignedElements(o) ?? [];
|
|
1070
1032
|
return void 0 === s ? e : e.filter(t => t.matches(s));
|
|
1071
1033
|
}
|
|
1072
1034
|
});
|
|
@@ -1086,9 +1048,8 @@ function n$4(n) {
|
|
|
1086
1048
|
s = "slot" + (e ? `[name=${e}]` : ":not([name])");
|
|
1087
1049
|
return e$7(o, r, {
|
|
1088
1050
|
get() {
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
return (t === null || t === void 0 ? void 0 : t.assignedNodes(n)) ?? [];
|
|
1051
|
+
const t = this.renderRoot?.querySelector(s);
|
|
1052
|
+
return t?.assignedNodes(n) ?? [];
|
|
1092
1053
|
}
|
|
1093
1054
|
});
|
|
1094
1055
|
};
|
|
@@ -1205,10 +1166,9 @@ let FOR_ATTRIBUTE_OBSERVER;
|
|
|
1205
1166
|
*/
|
|
1206
1167
|
FOR_ATTRIBUTE_OBSERVER = new MutationObserver(records => {
|
|
1207
1168
|
for (const record of records) {
|
|
1208
|
-
var _record$target$ATTACH;
|
|
1209
1169
|
// When a control's `for` attribute changes, inform its
|
|
1210
1170
|
// `AttachableController` to update to a new control.
|
|
1211
|
-
|
|
1171
|
+
record.target[ATTACHABLE_CONTROLLER]?.hostConnected();
|
|
1212
1172
|
}
|
|
1213
1173
|
});
|
|
1214
1174
|
}
|
|
@@ -1269,13 +1229,12 @@ class AttachableController {
|
|
|
1269
1229
|
* logic whenever the control changes.
|
|
1270
1230
|
*/
|
|
1271
1231
|
constructor(host, onControlChange) {
|
|
1272
|
-
var _FOR_ATTRIBUTE_OBSERV;
|
|
1273
1232
|
this.host = host;
|
|
1274
1233
|
this.onControlChange = onControlChange;
|
|
1275
1234
|
this.currentControl = null;
|
|
1276
1235
|
host.addController(this);
|
|
1277
1236
|
host[ATTACHABLE_CONTROLLER] = this;
|
|
1278
|
-
|
|
1237
|
+
FOR_ATTRIBUTE_OBSERVER?.observe(host, {
|
|
1279
1238
|
attributeFilter: ['for']
|
|
1280
1239
|
});
|
|
1281
1240
|
}
|
|
@@ -1361,7 +1320,6 @@ class FocusRing extends i$4 {
|
|
|
1361
1320
|
}
|
|
1362
1321
|
/** @private */
|
|
1363
1322
|
handleEvent(event) {
|
|
1364
|
-
var _this$control;
|
|
1365
1323
|
if (event[HANDLED_BY_FOCUS_RING]) {
|
|
1366
1324
|
// This ensures the focus ring does not activate when multiple focus rings
|
|
1367
1325
|
// are used within a single component.
|
|
@@ -1371,7 +1329,7 @@ class FocusRing extends i$4 {
|
|
|
1371
1329
|
default:
|
|
1372
1330
|
return;
|
|
1373
1331
|
case 'focusin':
|
|
1374
|
-
this.visible =
|
|
1332
|
+
this.visible = this.control?.matches(':focus-visible') ?? false;
|
|
1375
1333
|
break;
|
|
1376
1334
|
case 'focusout':
|
|
1377
1335
|
case 'pointerdown':
|
|
@@ -1382,8 +1340,8 @@ class FocusRing extends i$4 {
|
|
|
1382
1340
|
}
|
|
1383
1341
|
onControlChange(prev, next) {
|
|
1384
1342
|
for (const event of EVENTS$1) {
|
|
1385
|
-
prev
|
|
1386
|
-
next
|
|
1343
|
+
prev?.removeEventListener(event, this);
|
|
1344
|
+
next?.addEventListener(event, this);
|
|
1387
1345
|
}
|
|
1388
1346
|
}
|
|
1389
1347
|
update(changed) {
|
|
@@ -1466,8 +1424,7 @@ let i$3 = class i {
|
|
|
1466
1424
|
*/
|
|
1467
1425
|
const e$3 = e$4(class extends i$3 {
|
|
1468
1426
|
constructor(t$1) {
|
|
1469
|
-
|
|
1470
|
-
if (super(t$1), t$1.type !== t.ATTRIBUTE || "class" !== t$1.name || ((_t$strings = t$1.strings) === null || _t$strings === void 0 ? void 0 : _t$strings.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
1427
|
+
if (super(t$1), t$1.type !== t.ATTRIBUTE || "class" !== t$1.name || t$1.strings?.length > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
1471
1428
|
}
|
|
1472
1429
|
render(t) {
|
|
1473
1430
|
return " " + Object.keys(t).filter(s => t[s]).join(" ") + " ";
|
|
@@ -1475,18 +1432,14 @@ const e$3 = e$4(class extends i$3 {
|
|
|
1475
1432
|
update(s, [i]) {
|
|
1476
1433
|
if (void 0 === this.st) {
|
|
1477
1434
|
this.st = new Set(), void 0 !== s.strings && (this.nt = new Set(s.strings.join(" ").split(/\s/).filter(t => "" !== t)));
|
|
1478
|
-
for (const t in i)
|
|
1479
|
-
var _this$nt;
|
|
1480
|
-
i[t] && !((_this$nt = this.nt) !== null && _this$nt !== void 0 && _this$nt.has(t)) && this.st.add(t);
|
|
1481
|
-
}
|
|
1435
|
+
for (const t in i) i[t] && !this.nt?.has(t) && this.st.add(t);
|
|
1482
1436
|
return this.render(i);
|
|
1483
1437
|
}
|
|
1484
1438
|
const r = s.element.classList;
|
|
1485
1439
|
for (const t of this.st) t in i || (r.remove(t), this.st.delete(t));
|
|
1486
1440
|
for (const t in i) {
|
|
1487
|
-
var _this$nt2;
|
|
1488
1441
|
const s = !!i[t];
|
|
1489
|
-
s === this.st.has(t) ||
|
|
1442
|
+
s === this.st.has(t) || this.nt?.has(t) || (s ? (r.add(t), this.st.add(t)) : (r.remove(t), this.st.delete(t)));
|
|
1490
1443
|
}
|
|
1491
1444
|
return E;
|
|
1492
1445
|
}
|
|
@@ -1546,9 +1499,8 @@ function createAnimationSignal() {
|
|
|
1546
1499
|
let animationAbortController = null;
|
|
1547
1500
|
return {
|
|
1548
1501
|
start() {
|
|
1549
|
-
var _animationAbortContro;
|
|
1550
1502
|
// Tell the previous animation to cancel.
|
|
1551
|
-
|
|
1503
|
+
animationAbortController?.abort();
|
|
1552
1504
|
// Set up a new AbortController for the current animation.
|
|
1553
1505
|
animationAbortController = new AbortController();
|
|
1554
1506
|
// Provide the AbortSignal so that the caller can check aborted status
|
|
@@ -1849,12 +1801,11 @@ class Ripple extends i$4 {
|
|
|
1849
1801
|
};
|
|
1850
1802
|
}
|
|
1851
1803
|
startPressAnimation(positionEvent) {
|
|
1852
|
-
var _this$growAnimation;
|
|
1853
1804
|
if (!this.mdRoot) {
|
|
1854
1805
|
return;
|
|
1855
1806
|
}
|
|
1856
1807
|
this.pressed = true;
|
|
1857
|
-
|
|
1808
|
+
this.growAnimation?.cancel();
|
|
1858
1809
|
this.determineRippleSize();
|
|
1859
1810
|
const {
|
|
1860
1811
|
startPoint,
|
|
@@ -1880,9 +1831,9 @@ class Ripple extends i$4 {
|
|
|
1880
1831
|
this.state = State.INACTIVE;
|
|
1881
1832
|
const animation = this.growAnimation;
|
|
1882
1833
|
let pressAnimationPlayState = Infinity;
|
|
1883
|
-
if (typeof
|
|
1834
|
+
if (typeof animation?.currentTime === 'number') {
|
|
1884
1835
|
pressAnimationPlayState = animation.currentTime;
|
|
1885
|
-
} else if (animation
|
|
1836
|
+
} else if (animation?.currentTime) {
|
|
1886
1837
|
pressAnimationPlayState = animation.currentTime.to('ms').value;
|
|
1887
1838
|
}
|
|
1888
1839
|
if (pressAnimationPlayState >= MINIMUM_PRESS_MS) {
|
|
@@ -1928,7 +1879,7 @@ class Ripple extends i$4 {
|
|
|
1928
1879
|
}
|
|
1929
1880
|
/** @private */
|
|
1930
1881
|
async handleEvent(event) {
|
|
1931
|
-
if (FORCED_COLORS
|
|
1882
|
+
if (FORCED_COLORS?.matches) {
|
|
1932
1883
|
// Skip event logic since the ripple is `display: none`.
|
|
1933
1884
|
return;
|
|
1934
1885
|
}
|
|
@@ -1958,8 +1909,8 @@ class Ripple extends i$4 {
|
|
|
1958
1909
|
}
|
|
1959
1910
|
onControlChange(prev, next) {
|
|
1960
1911
|
for (const event of EVENTS) {
|
|
1961
|
-
prev
|
|
1962
|
-
next
|
|
1912
|
+
prev?.removeEventListener(event, this);
|
|
1913
|
+
next?.addEventListener(event, this);
|
|
1963
1914
|
}
|
|
1964
1915
|
}
|
|
1965
1916
|
}
|
|
@@ -2502,22 +2453,19 @@ class Button extends buttonBaseClass {
|
|
|
2502
2453
|
}
|
|
2503
2454
|
}
|
|
2504
2455
|
focus() {
|
|
2505
|
-
|
|
2506
|
-
(_this$buttonElement = this.buttonElement) === null || _this$buttonElement === void 0 || _this$buttonElement.focus();
|
|
2456
|
+
this.buttonElement?.focus();
|
|
2507
2457
|
}
|
|
2508
2458
|
blur() {
|
|
2509
|
-
|
|
2510
|
-
(_this$buttonElement2 = this.buttonElement) === null || _this$buttonElement2 === void 0 || _this$buttonElement2.blur();
|
|
2459
|
+
this.buttonElement?.blur();
|
|
2511
2460
|
}
|
|
2512
2461
|
render() {
|
|
2513
|
-
var _this$renderElevation;
|
|
2514
2462
|
const isRippleDisabled = this.disabled || this.softDisabled;
|
|
2515
2463
|
const buttonOrLink = this.href ? this.renderLink() : this.renderButton();
|
|
2516
2464
|
// TODO(b/310046938): due to a limitation in focus ring/ripple, we can't use
|
|
2517
2465
|
// the same ID for different elements, so we change the ID instead.
|
|
2518
2466
|
const buttonId = this.href ? 'link' : 'button';
|
|
2519
2467
|
return b`
|
|
2520
|
-
${
|
|
2468
|
+
${this.renderElevationOrOutline?.()}
|
|
2521
2469
|
<div class="background"></div>
|
|
2522
2470
|
<md-focus-ring part="focus-ring" for=${buttonId}></md-focus-ring>
|
|
2523
2471
|
<md-ripple
|
|
@@ -2776,7 +2724,7 @@ MdDivider = __decorate([t$1('md-divider')], MdDivider);
|
|
|
2776
2724
|
*/
|
|
2777
2725
|
const a = Symbol.for(""),
|
|
2778
2726
|
o$4 = t => {
|
|
2779
|
-
if (
|
|
2727
|
+
if (t?.r === a) return t?._$litStatic$;
|
|
2780
2728
|
},
|
|
2781
2729
|
i$2 = (t, ...r) => ({
|
|
2782
2730
|
_$litStatic$: r.reduce((r, e, a) => r + (t => {
|
|
@@ -3695,12 +3643,11 @@ function slotHasContent(slot) {
|
|
|
3695
3643
|
for (const node of slot.assignedNodes({
|
|
3696
3644
|
flatten: true
|
|
3697
3645
|
})) {
|
|
3698
|
-
var _node$textContent;
|
|
3699
3646
|
// Assume there's content if there's an element slotted in
|
|
3700
3647
|
const isElement = node.nodeType === Node.ELEMENT_NODE;
|
|
3701
3648
|
// If there's only text nodes for the default slot, check if there's
|
|
3702
3649
|
// non-whitespace.
|
|
3703
|
-
const isTextWithContent = node.nodeType === Node.TEXT_NODE &&
|
|
3650
|
+
const isTextWithContent = node.nodeType === Node.TEXT_NODE && node.textContent?.match(/\S/);
|
|
3704
3651
|
if (isElement || isTextWithContent) {
|
|
3705
3652
|
return true;
|
|
3706
3653
|
}
|
|
@@ -3940,10 +3887,9 @@ class ListItemEl extends listItemBaseClass {
|
|
|
3940
3887
|
this.dispatchEvent(createRequestActivationEvent());
|
|
3941
3888
|
}
|
|
3942
3889
|
focus() {
|
|
3943
|
-
var _this$listItemRoot;
|
|
3944
3890
|
// TODO(b/300334509): needed for some cases where delegatesFocus doesn't
|
|
3945
3891
|
// work programmatically like in FF and select-option
|
|
3946
|
-
|
|
3892
|
+
this.listItemRoot?.focus();
|
|
3947
3893
|
}
|
|
3948
3894
|
click() {
|
|
3949
3895
|
if (!this.listItemRoot) {
|
|
@@ -4039,11 +3985,10 @@ MdListItem = __decorate([t$1('md-list-item')], MdListItem);
|
|
|
4039
3985
|
* SPDX-License-Identifier: Apache-2.0
|
|
4040
3986
|
*/
|
|
4041
3987
|
const showSettingsDialog = async section => {
|
|
4042
|
-
|
|
4043
|
-
await import('./settings-dialog-DrHzJtsi.js');
|
|
3988
|
+
await import('./settings-dialog-CutA2TKp.js');
|
|
4044
3989
|
const dialog = document.createElement("settings-dialog");
|
|
4045
3990
|
if (section) dialog.scrollToSection = section;
|
|
4046
|
-
|
|
3991
|
+
document.querySelector("matter-dashboard-app")?.renderRoot.appendChild(dialog);
|
|
4047
3992
|
};
|
|
4048
3993
|
|
|
4049
3994
|
var showSettingsDialog$1 = /*#__PURE__*/Object.freeze({
|
|
@@ -4161,10 +4106,9 @@ let DashboardHeader = class extends i$4 {
|
|
|
4161
4106
|
});
|
|
4162
4107
|
}
|
|
4163
4108
|
disconnectedCallback() {
|
|
4164
|
-
var _this$_unsubscribeThe, _this$_unsubscribeDev;
|
|
4165
4109
|
super.disconnectedCallback();
|
|
4166
|
-
|
|
4167
|
-
|
|
4110
|
+
this._unsubscribeTheme?.();
|
|
4111
|
+
this._unsubscribeDevMode?.();
|
|
4168
4112
|
}
|
|
4169
4113
|
_goBack() {
|
|
4170
4114
|
if (this.backButton) {
|
|
@@ -4233,7 +4177,6 @@ let DashboardHeader = class extends i$4 {
|
|
|
4233
4177
|
`;
|
|
4234
4178
|
}
|
|
4235
4179
|
render() {
|
|
4236
|
-
var _this$actions;
|
|
4237
4180
|
return b`
|
|
4238
4181
|
<div class="header">
|
|
4239
4182
|
<!-- optional back button -->
|
|
@@ -4247,7 +4190,7 @@ let DashboardHeader = class extends i$4 {
|
|
|
4247
4190
|
<div class="title">${this.title ?? ""}</div>
|
|
4248
4191
|
${this._renderNavTabs()}
|
|
4249
4192
|
<div class="actions">
|
|
4250
|
-
${
|
|
4193
|
+
${this.actions?.map(action => {
|
|
4251
4194
|
return b`
|
|
4252
4195
|
<md-icon-button @click=${action.action} .title=${action.label}>
|
|
4253
4196
|
<ha-svg-icon .path=${action.icon}></ha-svg-icon>
|
|
@@ -21796,7 +21739,7 @@ const clusters = {
|
|
|
21796
21739
|
* SPDX-License-Identifier: Apache-2.0
|
|
21797
21740
|
*/
|
|
21798
21741
|
const showDialogBox = async (type, dialogParams) => {
|
|
21799
|
-
await import('./dialog-box-
|
|
21742
|
+
await import('./dialog-box-BPrL7aG8.js');
|
|
21800
21743
|
return new Promise(resolve => {
|
|
21801
21744
|
const dialog = document.createElement("dialog-box");
|
|
21802
21745
|
dialog.params = dialogParams;
|
|
@@ -21814,8 +21757,7 @@ const showPromptDialog = dialogParams => showDialogBox("prompt", dialogParams);
|
|
|
21814
21757
|
* SPDX-License-Identifier: Apache-2.0
|
|
21815
21758
|
*/
|
|
21816
21759
|
const showAttributeWriteDialog = async options => {
|
|
21817
|
-
|
|
21818
|
-
await import('./attribute-write-dialog-CqqdRniU.js');
|
|
21760
|
+
await import('./attribute-write-dialog-BdRJhTUT.js');
|
|
21819
21761
|
const dialog = document.createElement("attribute-write-dialog");
|
|
21820
21762
|
dialog.client = options.client;
|
|
21821
21763
|
dialog.nodeId = options.nodeId;
|
|
@@ -21824,7 +21766,7 @@ const showAttributeWriteDialog = async options => {
|
|
|
21824
21766
|
dialog.attributeId = options.attributeId;
|
|
21825
21767
|
dialog.label = options.label;
|
|
21826
21768
|
dialog.currentValue = options.currentValue;
|
|
21827
|
-
|
|
21769
|
+
document.querySelector("matter-dashboard-app")?.renderRoot.appendChild(dialog);
|
|
21828
21770
|
};
|
|
21829
21771
|
|
|
21830
21772
|
/**
|
|
@@ -21833,8 +21775,7 @@ const showAttributeWriteDialog = async options => {
|
|
|
21833
21775
|
* SPDX-License-Identifier: Apache-2.0
|
|
21834
21776
|
*/
|
|
21835
21777
|
const showCommandInvokeDialog = async options => {
|
|
21836
|
-
|
|
21837
|
-
await import('./command-invoke-dialog-BuvBOrdC.js');
|
|
21778
|
+
await import('./command-invoke-dialog-K7sWqmT7.js');
|
|
21838
21779
|
const dialog = document.createElement("command-invoke-dialog");
|
|
21839
21780
|
dialog.client = options.client;
|
|
21840
21781
|
dialog.nodeId = options.nodeId;
|
|
@@ -21842,7 +21783,7 @@ const showCommandInvokeDialog = async options => {
|
|
|
21842
21783
|
dialog.clusterId = options.clusterId;
|
|
21843
21784
|
dialog.commandId = options.commandId;
|
|
21844
21785
|
dialog.commandName = options.commandName;
|
|
21845
|
-
|
|
21786
|
+
document.querySelector("matter-dashboard-app")?.renderRoot.appendChild(dialog);
|
|
21846
21787
|
};
|
|
21847
21788
|
|
|
21848
21789
|
/**
|
|
@@ -22006,12 +21947,11 @@ MdTextButton = __decorate([t$1('md-text-button')], MdTextButton);
|
|
|
22006
21947
|
* SPDX-License-Identifier: Apache-2.0
|
|
22007
21948
|
*/
|
|
22008
21949
|
const showNodeLabelDialog = async (client, node) => {
|
|
22009
|
-
|
|
22010
|
-
await import('./node-label-dialog-T3nPG-Qy.js');
|
|
21950
|
+
await import('./node-label-dialog-CR9VtPvB.js');
|
|
22011
21951
|
const dialog = document.createElement("node-label-dialog");
|
|
22012
21952
|
dialog.client = client;
|
|
22013
21953
|
dialog.node = node;
|
|
22014
|
-
|
|
21954
|
+
document.querySelector("matter-dashboard-app")?.renderRoot.appendChild(dialog);
|
|
22015
21955
|
};
|
|
22016
21956
|
|
|
22017
21957
|
/**
|
|
@@ -22122,10 +22062,9 @@ class Field extends i$4 {
|
|
|
22122
22062
|
super.update(props);
|
|
22123
22063
|
}
|
|
22124
22064
|
render() {
|
|
22125
|
-
var _this$renderOutline, _this$renderBackgroun, _this$renderStateLaye, _this$renderIndicator;
|
|
22126
22065
|
const floatingLabel = this.renderLabel(/*isFloating*/true);
|
|
22127
22066
|
const restingLabel = this.renderLabel(/*isFloating*/false);
|
|
22128
|
-
const outline =
|
|
22067
|
+
const outline = this.renderOutline?.(floatingLabel);
|
|
22129
22068
|
const classes = {
|
|
22130
22069
|
'disabled': this.disabled,
|
|
22131
22070
|
'disable-transitions': this.disableTransitions,
|
|
@@ -22141,9 +22080,9 @@ class Field extends i$4 {
|
|
|
22141
22080
|
return b`
|
|
22142
22081
|
<div class="field ${e$3(classes)}">
|
|
22143
22082
|
<div class="container-overflow">
|
|
22144
|
-
${
|
|
22083
|
+
${this.renderBackground?.()}
|
|
22145
22084
|
<slot name="container"></slot>
|
|
22146
|
-
${
|
|
22085
|
+
${this.renderStateLayer?.()} ${this.renderIndicator?.()} ${outline}
|
|
22147
22086
|
<div class="container">
|
|
22148
22087
|
<div class="start">
|
|
22149
22088
|
<slot name="start"></slot>
|
|
@@ -22245,7 +22184,6 @@ class Field extends i$4 {
|
|
|
22245
22184
|
wasFocused,
|
|
22246
22185
|
wasPopulated
|
|
22247
22186
|
}) {
|
|
22248
|
-
var _this$labelAnimation, _this$floatingLabelEl, _this$labelAnimation2;
|
|
22249
22187
|
if (!this.label) {
|
|
22250
22188
|
return;
|
|
22251
22189
|
}
|
|
@@ -22257,7 +22195,7 @@ class Field extends i$4 {
|
|
|
22257
22195
|
return;
|
|
22258
22196
|
}
|
|
22259
22197
|
this.isAnimating = true;
|
|
22260
|
-
|
|
22198
|
+
this.labelAnimation?.cancel();
|
|
22261
22199
|
// Only one label is visible at a time for clearer text rendering.
|
|
22262
22200
|
// The floating label is visible and used during animation. At the end of
|
|
22263
22201
|
// the animation, it will either remain visible (if floating) or hide and
|
|
@@ -22270,11 +22208,11 @@ class Field extends i$4 {
|
|
|
22270
22208
|
// Re-calculating the animation each time will prevent any visual glitches
|
|
22271
22209
|
// from appearing.
|
|
22272
22210
|
// TODO(b/241113345): use animation tokens
|
|
22273
|
-
this.labelAnimation =
|
|
22211
|
+
this.labelAnimation = this.floatingLabelEl?.animate(this.getLabelKeyframes(), {
|
|
22274
22212
|
duration: 150,
|
|
22275
22213
|
easing: EASING.STANDARD
|
|
22276
22214
|
});
|
|
22277
|
-
|
|
22215
|
+
this.labelAnimation?.addEventListener('finish', () => {
|
|
22278
22216
|
// At the end of the animation, update the visible label.
|
|
22279
22217
|
this.isAnimating = false;
|
|
22280
22218
|
});
|
|
@@ -22460,8 +22398,7 @@ const n$2 = "important",
|
|
|
22460
22398
|
i$1 = " !" + n$2,
|
|
22461
22399
|
o$2 = e$4(class extends i$3 {
|
|
22462
22400
|
constructor(t$1) {
|
|
22463
|
-
|
|
22464
|
-
if (super(t$1), t$1.type !== t.ATTRIBUTE || "style" !== t$1.name || ((_t$strings = t$1.strings) === null || _t$strings === void 0 ? void 0 : _t$strings.length) > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
|
|
22401
|
+
if (super(t$1), t$1.type !== t.ATTRIBUTE || "style" !== t$1.name || t$1.strings?.length > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
|
|
22465
22402
|
}
|
|
22466
22403
|
render(t) {
|
|
22467
22404
|
return Object.keys(t).reduce((e, r) => {
|
|
@@ -22992,7 +22929,7 @@ class SurfacePositionController {
|
|
|
22992
22929
|
const surfaceEl = this.getProperties().surfaceEl;
|
|
22993
22930
|
// The following type casts are required due to differing TS types in Google
|
|
22994
22931
|
// and open source.
|
|
22995
|
-
if (surfaceEl
|
|
22932
|
+
if (surfaceEl?.popover && surfaceEl?.isConnected) {
|
|
22996
22933
|
surfaceEl.hidePopover();
|
|
22997
22934
|
}
|
|
22998
22935
|
}
|
|
@@ -23260,8 +23197,7 @@ function getFocusedElement(activeDoc = document) {
|
|
|
23260
23197
|
let activeEl = activeDoc.activeElement;
|
|
23261
23198
|
// Check for activeElement in the case that an element with a shadow root host
|
|
23262
23199
|
// is currently focused.
|
|
23263
|
-
while (activeEl &&
|
|
23264
|
-
var _activeEl;
|
|
23200
|
+
while (activeEl && activeEl?.shadowRoot?.activeElement) {
|
|
23265
23201
|
activeEl = activeEl.shadowRoot.activeElement;
|
|
23266
23202
|
}
|
|
23267
23203
|
return activeEl;
|
|
@@ -23631,8 +23567,7 @@ class Menu extends i$4 {
|
|
|
23631
23567
|
this.beforeClose = async () => {
|
|
23632
23568
|
this.open = false;
|
|
23633
23569
|
if (!this.skipRestoreFocus) {
|
|
23634
|
-
|
|
23635
|
-
(_this$lastFocusedElem = this.lastFocusedElement) === null || _this$lastFocusedElem === void 0 || (_this$lastFocusedElem2 = _this$lastFocusedElem.focus) === null || _this$lastFocusedElem2 === void 0 || _this$lastFocusedElem2.call(_this$lastFocusedElem);
|
|
23570
|
+
this.lastFocusedElement?.focus?.();
|
|
23636
23571
|
}
|
|
23637
23572
|
if (!this.quick) {
|
|
23638
23573
|
await this.animateClose();
|
|
@@ -24046,8 +23981,7 @@ class Menu extends i$4 {
|
|
|
24046
23981
|
this.open = false;
|
|
24047
23982
|
const maybeSubmenu = this.slotItems;
|
|
24048
23983
|
maybeSubmenu.forEach(item => {
|
|
24049
|
-
|
|
24050
|
-
(_item$close = item.close) === null || _item$close === void 0 || _item$close.call(item);
|
|
23984
|
+
item.close?.();
|
|
24051
23985
|
});
|
|
24052
23986
|
}
|
|
24053
23987
|
show() {
|
|
@@ -24674,7 +24608,7 @@ function mixinOnReportValidity(base) {
|
|
|
24674
24608
|
// our invalid listeners are added lazily after other listeners, we can
|
|
24675
24609
|
// reliably read `defaultPrevented` synchronously without worrying
|
|
24676
24610
|
// about waiting for another listener that could cancel it.
|
|
24677
|
-
const wasCanceled = invalidEvent
|
|
24611
|
+
const wasCanceled = invalidEvent?.defaultPrevented;
|
|
24678
24612
|
if (wasCanceled) {
|
|
24679
24613
|
return;
|
|
24680
24614
|
}
|
|
@@ -24682,7 +24616,7 @@ function mixinOnReportValidity(base) {
|
|
|
24682
24616
|
// If an implementation calls invalidEvent.preventDefault() to stop the
|
|
24683
24617
|
// platform popup from displaying, focusing is also prevented, so we need
|
|
24684
24618
|
// to manually focus.
|
|
24685
|
-
const implementationCanceledFocus = !wasCanceled &&
|
|
24619
|
+
const implementationCanceledFocus = !wasCanceled && invalidEvent?.defaultPrevented;
|
|
24686
24620
|
if (!implementationCanceledFocus) {
|
|
24687
24621
|
return;
|
|
24688
24622
|
}
|
|
@@ -24751,9 +24685,8 @@ function addFormReportValidListener(control, form, onControlValid, cleanup) {
|
|
|
24751
24685
|
signal: cleanup
|
|
24752
24686
|
});
|
|
24753
24687
|
validateHooks.addEventListener('after', () => {
|
|
24754
|
-
var _cleanupInvalidListen;
|
|
24755
24688
|
isNextSubmitFromHook = false;
|
|
24756
|
-
|
|
24689
|
+
cleanupInvalidListener?.abort();
|
|
24757
24690
|
if (controlFiredInvalid) {
|
|
24758
24691
|
return;
|
|
24759
24692
|
}
|
|
@@ -25024,9 +24957,8 @@ class Select extends selectBaseClass {
|
|
|
25024
24957
|
this.select(value);
|
|
25025
24958
|
}
|
|
25026
24959
|
get options() {
|
|
25027
|
-
var _this$menu;
|
|
25028
24960
|
// NOTE: this does a DOM query.
|
|
25029
|
-
return
|
|
24961
|
+
return this.menu?.items ?? [];
|
|
25030
24962
|
}
|
|
25031
24963
|
/**
|
|
25032
24964
|
* The index of the currently selected option.
|
|
@@ -25197,13 +25129,12 @@ class Select extends selectBaseClass {
|
|
|
25197
25129
|
}
|
|
25198
25130
|
[(_a = VALUE, onReportValidity)](invalidEvent) {
|
|
25199
25131
|
// Prevent default pop-up behavior.
|
|
25200
|
-
invalidEvent
|
|
25132
|
+
invalidEvent?.preventDefault();
|
|
25201
25133
|
const prevMessage = this.getErrorText();
|
|
25202
25134
|
this.nativeError = !!invalidEvent;
|
|
25203
25135
|
this.nativeErrorText = this.validationMessage;
|
|
25204
25136
|
if (prevMessage === this.getErrorText()) {
|
|
25205
|
-
|
|
25206
|
-
(_this$field = this.field) === null || _this$field === void 0 || _this$field.reannounceError();
|
|
25137
|
+
this.field?.reannounceError();
|
|
25207
25138
|
}
|
|
25208
25139
|
}
|
|
25209
25140
|
update(changed) {
|
|
@@ -25234,8 +25165,7 @@ class Select extends selectBaseClass {
|
|
|
25234
25165
|
`;
|
|
25235
25166
|
}
|
|
25236
25167
|
async firstUpdated(changed) {
|
|
25237
|
-
|
|
25238
|
-
await ((_this$menu2 = this.menu) === null || _this$menu2 === void 0 ? void 0 : _this$menu2.updateComplete);
|
|
25168
|
+
await this.menu?.updateComplete;
|
|
25239
25169
|
// If this has been handled on update already due to SSR, try again.
|
|
25240
25170
|
if (!this.lastSelectedOptionRecords.length) {
|
|
25241
25171
|
this.initUserSelection();
|
|
@@ -25397,7 +25327,6 @@ class Select extends selectBaseClass {
|
|
|
25397
25327
|
// Handles typing ahead when the menu is closed by delegating the event to
|
|
25398
25328
|
// the underlying menu's typeaheadController
|
|
25399
25329
|
if (isPrintableKey) {
|
|
25400
|
-
var _this$labelEl, _this$labelEl$setAttr;
|
|
25401
25330
|
typeaheadController.onKeydown(event);
|
|
25402
25331
|
event.preventDefault();
|
|
25403
25332
|
const {
|
|
@@ -25406,7 +25335,7 @@ class Select extends selectBaseClass {
|
|
|
25406
25335
|
if (!lastActiveRecord) {
|
|
25407
25336
|
return;
|
|
25408
25337
|
}
|
|
25409
|
-
|
|
25338
|
+
this.labelEl?.setAttribute?.('aria-live', 'polite');
|
|
25410
25339
|
const hasChanged = this.selectItem(lastActiveRecord[TYPEAHEAD_RECORD.ITEM]);
|
|
25411
25340
|
if (hasChanged) {
|
|
25412
25341
|
this.dispatchInteractionEvents();
|
|
@@ -25448,8 +25377,7 @@ class Select extends selectBaseClass {
|
|
|
25448
25377
|
return this.lastSelectedOptionRecords;
|
|
25449
25378
|
}
|
|
25450
25379
|
async getUpdateComplete() {
|
|
25451
|
-
|
|
25452
|
-
await ((_this$menu3 = this.menu) === null || _this$menu3 === void 0 ? void 0 : _this$menu3.updateComplete);
|
|
25380
|
+
await this.menu?.updateComplete;
|
|
25453
25381
|
return super.getUpdateComplete();
|
|
25454
25382
|
}
|
|
25455
25383
|
/**
|
|
@@ -25483,8 +25411,7 @@ class Select extends selectBaseClass {
|
|
|
25483
25411
|
* active items.
|
|
25484
25412
|
*/
|
|
25485
25413
|
async handleOpening(e) {
|
|
25486
|
-
|
|
25487
|
-
(_this$labelEl2 = this.labelEl) === null || _this$labelEl2 === void 0 || (_this$labelEl2$remove = _this$labelEl2.removeAttribute) === null || _this$labelEl2$remove === void 0 || _this$labelEl2$remove.call(_this$labelEl2, 'aria-live');
|
|
25414
|
+
this.labelEl?.removeAttribute?.('aria-live');
|
|
25488
25415
|
this.redispatchEvent(e);
|
|
25489
25416
|
// FocusState.NONE means we want to handle focus ourselves and focus the
|
|
25490
25417
|
// last selected item.
|
|
@@ -25492,7 +25419,7 @@ class Select extends selectBaseClass {
|
|
|
25492
25419
|
return;
|
|
25493
25420
|
}
|
|
25494
25421
|
const items = this.menu.items;
|
|
25495
|
-
const activeItem =
|
|
25422
|
+
const activeItem = getActiveItem(items)?.item;
|
|
25496
25423
|
let [selectedItem] = this.lastSelectedOptionRecords[0] ?? [null];
|
|
25497
25424
|
// This is true if the user keys through the list but clicks out of the menu
|
|
25498
25425
|
// thus no close-menu event is fired by an item and we can't clean up in
|
|
@@ -25621,8 +25548,7 @@ class Select extends selectBaseClass {
|
|
|
25621
25548
|
this.value = state;
|
|
25622
25549
|
}
|
|
25623
25550
|
click() {
|
|
25624
|
-
|
|
25625
|
-
(_this$field2 = this.field) === null || _this$field2 === void 0 || _this$field2.click();
|
|
25551
|
+
this.field?.click();
|
|
25626
25552
|
}
|
|
25627
25553
|
[createValidator]() {
|
|
25628
25554
|
return new SelectValidator(() => this);
|
|
@@ -26166,10 +26092,9 @@ class SelectOptionEl extends selectOptionBaseClass {
|
|
|
26166
26092
|
`;
|
|
26167
26093
|
}
|
|
26168
26094
|
focus() {
|
|
26169
|
-
var _this$listItemRoot;
|
|
26170
26095
|
// TODO(b/300334509): needed for some cases where delegatesFocus doesn't
|
|
26171
26096
|
// work programmatically like in FF and select-option
|
|
26172
|
-
|
|
26097
|
+
this.listItemRoot?.focus();
|
|
26173
26098
|
}
|
|
26174
26099
|
}
|
|
26175
26100
|
/** @nocollapse */
|
|
@@ -26263,19 +26188,15 @@ const r$1 = o => void 0 === o.strings,
|
|
|
26263
26188
|
const s = (i, t) => {
|
|
26264
26189
|
const e = i._$AN;
|
|
26265
26190
|
if (void 0 === e) return false;
|
|
26266
|
-
for (const i of e)
|
|
26267
|
-
var _i$_$AO;
|
|
26268
|
-
(_i$_$AO = i._$AO) !== null && _i$_$AO !== void 0 && _i$_$AO.call(i, t, false), s(i, t);
|
|
26269
|
-
}
|
|
26191
|
+
for (const i of e) i._$AO?.(t, false), s(i, t);
|
|
26270
26192
|
return true;
|
|
26271
26193
|
},
|
|
26272
26194
|
o$1 = i => {
|
|
26273
26195
|
let t, e;
|
|
26274
26196
|
do {
|
|
26275
|
-
var _e;
|
|
26276
26197
|
if (void 0 === (t = i._$AM)) break;
|
|
26277
26198
|
e = t._$AN, e.delete(i), i = t;
|
|
26278
|
-
} while (0 ===
|
|
26199
|
+
} while (0 === e?.size);
|
|
26279
26200
|
},
|
|
26280
26201
|
r = i => {
|
|
26281
26202
|
for (let t; t = i._$AM; i = t) {
|
|
@@ -26305,8 +26226,7 @@ class f extends i$3 {
|
|
|
26305
26226
|
super._$AT(i, t, e), r(this), this.isConnected = i._$AU;
|
|
26306
26227
|
}
|
|
26307
26228
|
_$AO(i, t = true) {
|
|
26308
|
-
|
|
26309
|
-
i !== this.isConnected && (this.isConnected = i, i ? (_this$reconnected = this.reconnected) === null || _this$reconnected === void 0 ? void 0 : _this$reconnected.call(this) : (_this$disconnected = this.disconnected) === null || _this$disconnected === void 0 ? void 0 : _this$disconnected.call(this)), t && (s(this, i), o$1(this));
|
|
26229
|
+
i !== this.isConnected && (this.isConnected = i, i ? this.reconnected?.() : this.disconnected?.()), t && (s(this, i), o$1(this));
|
|
26310
26230
|
}
|
|
26311
26231
|
setValue(t) {
|
|
26312
26232
|
if (r$1(this._$Ct)) this._$Ct._$AI(t, this);else {
|
|
@@ -26331,9 +26251,8 @@ const o = new WeakMap(),
|
|
|
26331
26251
|
return A;
|
|
26332
26252
|
}
|
|
26333
26253
|
update(i, [s]) {
|
|
26334
|
-
var _i$options;
|
|
26335
26254
|
const e = s !== this.G;
|
|
26336
|
-
return e && this.rt(void 0), (e || this.lt !== this.ct) && (this.G = s, this.ht =
|
|
26255
|
+
return e && this.rt(void 0), (e || this.lt !== this.ct) && (this.G = s, this.ht = i.options?.host, this.rt(this.ct = i.element)), A;
|
|
26337
26256
|
}
|
|
26338
26257
|
rt(t) {
|
|
26339
26258
|
if (void 0 !== this.G) if (this.isConnected || (t = void 0), "function" == typeof this.G) {
|
|
@@ -26343,8 +26262,7 @@ const o = new WeakMap(),
|
|
|
26343
26262
|
} else this.G.value = t;
|
|
26344
26263
|
}
|
|
26345
26264
|
get lt() {
|
|
26346
|
-
|
|
26347
|
-
return "function" == typeof this.G ? (_o$get = o.get(this.ht ?? globalThis)) === null || _o$get === void 0 ? void 0 : _o$get.get(this.G) : (_this$G = this.G) === null || _this$G === void 0 ? void 0 : _this$G.value;
|
|
26265
|
+
return "function" == typeof this.G ? o.get(this.ht ?? globalThis)?.get(this.G) : this.G?.value;
|
|
26348
26266
|
}
|
|
26349
26267
|
disconnected() {
|
|
26350
26268
|
this.lt === this.ct && this.rt(void 0);
|
|
@@ -26512,8 +26430,7 @@ let WebRtcStreamView = class extends i$4 {
|
|
|
26512
26430
|
return this._videoStreamId;
|
|
26513
26431
|
}
|
|
26514
26432
|
get muted() {
|
|
26515
|
-
|
|
26516
|
-
return ((_this$_video = this._video) === null || _this$_video === void 0 ? void 0 : _this$_video.muted) ?? true;
|
|
26433
|
+
return this._video?.muted ?? true;
|
|
26517
26434
|
}
|
|
26518
26435
|
setMuted(muted) {
|
|
26519
26436
|
if (this._video) this._video.muted = muted;
|
|
@@ -26557,7 +26474,6 @@ let WebRtcStreamView = class extends i$4 {
|
|
|
26557
26474
|
this._endReceivedFromPeer = false;
|
|
26558
26475
|
this._preSessionQueue = [];
|
|
26559
26476
|
try {
|
|
26560
|
-
var _pc$localDescription;
|
|
26561
26477
|
const pc = new RTCPeerConnection({
|
|
26562
26478
|
iceServers: []
|
|
26563
26479
|
});
|
|
@@ -26684,7 +26600,7 @@ let WebRtcStreamView = class extends i$4 {
|
|
|
26684
26600
|
const offer = await pc.createOffer();
|
|
26685
26601
|
await pc.setLocalDescription(offer);
|
|
26686
26602
|
this._unsubscribe = this.client.addWebRtcCallbackListener(data => void this._onWebRtcCallback(data));
|
|
26687
|
-
const sdp =
|
|
26603
|
+
const sdp = pc.localDescription?.sdp;
|
|
26688
26604
|
if (!sdp) {
|
|
26689
26605
|
throw new Error("Failed to create local SDP offer");
|
|
26690
26606
|
}
|
|
@@ -26734,31 +26650,28 @@ let WebRtcStreamView = class extends i$4 {
|
|
|
26734
26650
|
const initiatedEnd = sessionId !== null && !this._endReceivedFromPeer;
|
|
26735
26651
|
if (initiatedEnd) {
|
|
26736
26652
|
try {
|
|
26737
|
-
|
|
26738
|
-
await ((_this$client = this.client) === null || _this$client === void 0 ? void 0 : _this$client.deviceCommand(this.nodeId, this.endpointId, WEBRTC_TRANSPORT_PROVIDER_CLUSTER_ID, "EndSession", {
|
|
26653
|
+
await this.client?.deviceCommand(this.nodeId, this.endpointId, WEBRTC_TRANSPORT_PROVIDER_CLUSTER_ID, "EndSession", {
|
|
26739
26654
|
webRtcSessionId: sessionId,
|
|
26740
26655
|
reason: END_REASON_USER_HANGUP
|
|
26741
|
-
})
|
|
26656
|
+
});
|
|
26742
26657
|
} catch (err) {
|
|
26743
26658
|
console.warn("EndSession failed during stop", err);
|
|
26744
26659
|
}
|
|
26745
26660
|
}
|
|
26746
26661
|
if (this._videoStreamId !== null && this._videoStreamOwned) {
|
|
26747
26662
|
try {
|
|
26748
|
-
|
|
26749
|
-
await ((_this$client2 = this.client) === null || _this$client2 === void 0 ? void 0 : _this$client2.deviceCommand(this.nodeId, this.endpointId, CAMERA_AV_STREAM_MANAGEMENT_CLUSTER_ID, "VideoStreamDeallocate", {
|
|
26663
|
+
await this.client?.deviceCommand(this.nodeId, this.endpointId, CAMERA_AV_STREAM_MANAGEMENT_CLUSTER_ID, "VideoStreamDeallocate", {
|
|
26750
26664
|
videoStreamId: this._videoStreamId
|
|
26751
|
-
})
|
|
26665
|
+
});
|
|
26752
26666
|
} catch (err) {
|
|
26753
26667
|
console.warn("VideoStreamDeallocate failed during stop", err);
|
|
26754
26668
|
}
|
|
26755
26669
|
}
|
|
26756
26670
|
if (this._audioStreamId !== null && this._audioStreamOwned) {
|
|
26757
26671
|
try {
|
|
26758
|
-
|
|
26759
|
-
await ((_this$client3 = this.client) === null || _this$client3 === void 0 ? void 0 : _this$client3.deviceCommand(this.nodeId, this.endpointId, CAMERA_AV_STREAM_MANAGEMENT_CLUSTER_ID, "AudioStreamDeallocate", {
|
|
26672
|
+
await this.client?.deviceCommand(this.nodeId, this.endpointId, CAMERA_AV_STREAM_MANAGEMENT_CLUSTER_ID, "AudioStreamDeallocate", {
|
|
26760
26673
|
audioStreamId: this._audioStreamId
|
|
26761
|
-
})
|
|
26674
|
+
});
|
|
26762
26675
|
} catch (err) {
|
|
26763
26676
|
console.warn("AudioStreamDeallocate failed during stop", err);
|
|
26764
26677
|
}
|
|
@@ -26804,9 +26717,8 @@ let WebRtcStreamView = class extends i$4 {
|
|
|
26804
26717
|
};
|
|
26805
26718
|
}
|
|
26806
26719
|
_readAvsmFeatures() {
|
|
26807
|
-
|
|
26808
|
-
const
|
|
26809
|
-
const raw = node === null || node === void 0 ? void 0 : node.attributes[`${this.endpointId}/${CAMERA_AV_STREAM_MANAGEMENT_CLUSTER_ID}/${AVSM_FEATURE_MAP_ATTR_ID}`];
|
|
26720
|
+
const node = this.client?.nodes[String(this.nodeId)];
|
|
26721
|
+
const raw = node?.attributes[`${this.endpointId}/${CAMERA_AV_STREAM_MANAGEMENT_CLUSTER_ID}/${AVSM_FEATURE_MAP_ATTR_ID}`];
|
|
26810
26722
|
const bits = typeof raw === "number" ? raw : 0;
|
|
26811
26723
|
return {
|
|
26812
26724
|
wmark: (bits & AVSM_FEAT_WMARK) !== 0,
|
|
@@ -26822,10 +26734,9 @@ let WebRtcStreamView = class extends i$4 {
|
|
|
26822
26734
|
this._snapshotStreamOwned = false;
|
|
26823
26735
|
if (!wasOwned) return;
|
|
26824
26736
|
try {
|
|
26825
|
-
|
|
26826
|
-
await ((_this$client5 = this.client) === null || _this$client5 === void 0 ? void 0 : _this$client5.deviceCommand(this.nodeId, this.endpointId, CAMERA_AV_STREAM_MANAGEMENT_CLUSTER_ID, "SnapshotStreamDeallocate", {
|
|
26737
|
+
await this.client?.deviceCommand(this.nodeId, this.endpointId, CAMERA_AV_STREAM_MANAGEMENT_CLUSTER_ID, "SnapshotStreamDeallocate", {
|
|
26827
26738
|
snapshotStreamId: id
|
|
26828
|
-
})
|
|
26739
|
+
});
|
|
26829
26740
|
} catch (e) {
|
|
26830
26741
|
console.warn("SnapshotStreamDeallocate failed (continuing):", e);
|
|
26831
26742
|
}
|
|
@@ -26837,9 +26748,8 @@ let WebRtcStreamView = class extends i$4 {
|
|
|
26837
26748
|
* duplicates when a server's reuse logic is buggy or matching is too strict.
|
|
26838
26749
|
*/
|
|
26839
26750
|
_findMatchingVideoStream(want) {
|
|
26840
|
-
|
|
26841
|
-
const
|
|
26842
|
-
const list = node === null || node === void 0 ? void 0 : node.attributes[`${this.endpointId}/${CAMERA_AV_STREAM_MANAGEMENT_CLUSTER_ID}/15`];
|
|
26751
|
+
const node = this.client?.nodes[String(this.nodeId)];
|
|
26752
|
+
const list = node?.attributes[`${this.endpointId}/${CAMERA_AV_STREAM_MANAGEMENT_CLUSTER_ID}/15`];
|
|
26843
26753
|
if (!Array.isArray(list)) return null;
|
|
26844
26754
|
for (const item of list) {
|
|
26845
26755
|
const obj = asObject(item);
|
|
@@ -26870,9 +26780,8 @@ let WebRtcStreamView = class extends i$4 {
|
|
|
26870
26780
|
return null;
|
|
26871
26781
|
}
|
|
26872
26782
|
_findMatchingAudioStream(want) {
|
|
26873
|
-
|
|
26874
|
-
const
|
|
26875
|
-
const list = node === null || node === void 0 ? void 0 : node.attributes[`${this.endpointId}/${CAMERA_AV_STREAM_MANAGEMENT_CLUSTER_ID}/16`];
|
|
26783
|
+
const node = this.client?.nodes[String(this.nodeId)];
|
|
26784
|
+
const list = node?.attributes[`${this.endpointId}/${CAMERA_AV_STREAM_MANAGEMENT_CLUSTER_ID}/16`];
|
|
26876
26785
|
if (!Array.isArray(list)) return null;
|
|
26877
26786
|
for (const item of list) {
|
|
26878
26787
|
const obj = asObject(item);
|
|
@@ -26888,9 +26797,8 @@ let WebRtcStreamView = class extends i$4 {
|
|
|
26888
26797
|
return null;
|
|
26889
26798
|
}
|
|
26890
26799
|
_findMatchingSnapshotStream(want) {
|
|
26891
|
-
|
|
26892
|
-
const
|
|
26893
|
-
const list = node === null || node === void 0 ? void 0 : node.attributes[`${this.endpointId}/${CAMERA_AV_STREAM_MANAGEMENT_CLUSTER_ID}/17`];
|
|
26800
|
+
const node = this.client?.nodes[String(this.nodeId)];
|
|
26801
|
+
const list = node?.attributes[`${this.endpointId}/${CAMERA_AV_STREAM_MANAGEMENT_CLUSTER_ID}/17`];
|
|
26894
26802
|
if (!Array.isArray(list)) return null;
|
|
26895
26803
|
for (const item of list) {
|
|
26896
26804
|
const obj = asObject(item);
|
|
@@ -26930,7 +26838,7 @@ let WebRtcStreamView = class extends i$4 {
|
|
|
26930
26838
|
if (this._snapshotStreamId !== null) return this._snapshotStreamId;
|
|
26931
26839
|
if (!this.client) throw new Error("Matter client not available");
|
|
26932
26840
|
const node = this.client.nodes[String(this.nodeId)];
|
|
26933
|
-
const capsRaw = node
|
|
26841
|
+
const capsRaw = node?.attributes[`${this.endpointId}/${CAMERA_AV_STREAM_MANAGEMENT_CLUSTER_ID}/10`];
|
|
26934
26842
|
const cap = Array.isArray(capsRaw) && capsRaw.length > 0 ? parseSnapshotCapabilitiesFromList(capsRaw) : SNAPSHOT_DEFAULTS;
|
|
26935
26843
|
const targetResolution = this.snapshotResolution ?? cap.resolution;
|
|
26936
26844
|
const avsmFeatures = this._readAvsmFeatures();
|
|
@@ -27377,9 +27285,8 @@ let AvsumPtzStrip = class extends i$4 {
|
|
|
27377
27285
|
}
|
|
27378
27286
|
}
|
|
27379
27287
|
disconnectedCallback() {
|
|
27380
|
-
var _this$_unsubscribeNod;
|
|
27381
27288
|
super.disconnectedCallback();
|
|
27382
|
-
|
|
27289
|
+
this._unsubscribeNodes?.();
|
|
27383
27290
|
if (this._toastTimer) {
|
|
27384
27291
|
clearTimeout(this._toastTimer);
|
|
27385
27292
|
this._toastTimer = void 0;
|
|
@@ -27721,13 +27628,12 @@ let CameraOverlay = class extends i$4 {
|
|
|
27721
27628
|
this._streamViewRef = e$1();
|
|
27722
27629
|
}
|
|
27723
27630
|
get _snapshotSupported() {
|
|
27724
|
-
|
|
27725
|
-
const
|
|
27726
|
-
const accepted = node === null || node === void 0 ? void 0 : node.attributes[`${this.endpointId}/1361/65529`];
|
|
27631
|
+
const node = this.client?.nodes[String(this.nodeId)];
|
|
27632
|
+
const accepted = node?.attributes[`${this.endpointId}/1361/65529`];
|
|
27727
27633
|
if (!Array.isArray(accepted) || !accepted.includes(12)) return false;
|
|
27728
|
-
const featureMap = node
|
|
27634
|
+
const featureMap = node?.attributes[`${this.endpointId}/1361/65532`];
|
|
27729
27635
|
if (typeof featureMap === "number" && (featureMap & 4) !== 0) return true;
|
|
27730
|
-
const caps = node
|
|
27636
|
+
const caps = node?.attributes[`${this.endpointId}/1361/10`];
|
|
27731
27637
|
return Array.isArray(caps) && caps.length > 0;
|
|
27732
27638
|
}
|
|
27733
27639
|
firstUpdated() {
|
|
@@ -27771,8 +27677,7 @@ let CameraOverlay = class extends i$4 {
|
|
|
27771
27677
|
};
|
|
27772
27678
|
}
|
|
27773
27679
|
_readCachedAvsmAttribute(attributeId) {
|
|
27774
|
-
|
|
27775
|
-
const node = (_this$client2 = this.client) === null || _this$client2 === void 0 ? void 0 : _this$client2.nodes[String(this.nodeId)];
|
|
27680
|
+
const node = this.client?.nodes[String(this.nodeId)];
|
|
27776
27681
|
if (!node) return void 0;
|
|
27777
27682
|
return node.attributes[`${this.endpointId}/${CAMERA_AV_STREAM_MANAGEMENT_CLUSTER_ID}/${attributeId}`];
|
|
27778
27683
|
}
|
|
@@ -27781,8 +27686,7 @@ let CameraOverlay = class extends i$4 {
|
|
|
27781
27686
|
if (Array.isArray(rdtRaw) && rdtRaw.length > 0) {
|
|
27782
27687
|
const seen = /* @__PURE__ */new Map();
|
|
27783
27688
|
for (const item of rdtRaw) {
|
|
27784
|
-
|
|
27785
|
-
const resObj = (_asObject = asObject(item)) === null || _asObject === void 0 ? void 0 : _asObject["resolution"];
|
|
27689
|
+
const resObj = asObject(item)?.["resolution"];
|
|
27786
27690
|
const res = asObject(resObj);
|
|
27787
27691
|
if (!res) continue;
|
|
27788
27692
|
const w = pickNumber(res, "width");
|
|
@@ -27811,8 +27715,7 @@ let CameraOverlay = class extends i$4 {
|
|
|
27811
27715
|
return HA_DEFAULT_RESOLUTIONS;
|
|
27812
27716
|
}
|
|
27813
27717
|
_getSensorSize() {
|
|
27814
|
-
|
|
27815
|
-
const node = (_this$client3 = this.client) === null || _this$client3 === void 0 ? void 0 : _this$client3.nodes[String(this.nodeId)];
|
|
27718
|
+
const node = this.client?.nodes[String(this.nodeId)];
|
|
27816
27719
|
if (!node) return null;
|
|
27817
27720
|
const raw = node.attributes[`${this.endpointId}/1361/7`];
|
|
27818
27721
|
const obj = asObject(raw);
|
|
@@ -27826,9 +27729,8 @@ let CameraOverlay = class extends i$4 {
|
|
|
27826
27729
|
};
|
|
27827
27730
|
}
|
|
27828
27731
|
_avsmFeatures() {
|
|
27829
|
-
|
|
27830
|
-
const
|
|
27831
|
-
const raw = node === null || node === void 0 ? void 0 : node.attributes[`${this.endpointId}/${CAMERA_AV_STREAM_MANAGEMENT_CLUSTER_ID}/${AVSM_FEATURE_MAP_ATTR_ID}`];
|
|
27732
|
+
const node = this.client?.nodes[String(this.nodeId)];
|
|
27733
|
+
const raw = node?.attributes[`${this.endpointId}/${CAMERA_AV_STREAM_MANAGEMENT_CLUSTER_ID}/${AVSM_FEATURE_MAP_ATTR_ID}`];
|
|
27832
27734
|
const bits = typeof raw === "number" ? raw : 0;
|
|
27833
27735
|
return {
|
|
27834
27736
|
wmark: (bits & AVSM_FEAT_WMARK) !== 0,
|
|
@@ -27836,8 +27738,7 @@ let CameraOverlay = class extends i$4 {
|
|
|
27836
27738
|
};
|
|
27837
27739
|
}
|
|
27838
27740
|
_avsumPresent() {
|
|
27839
|
-
|
|
27840
|
-
const node = (_this$client5 = this.client) === null || _this$client5 === void 0 ? void 0 : _this$client5.nodes[String(this.nodeId)];
|
|
27741
|
+
const node = this.client?.nodes[String(this.nodeId)];
|
|
27841
27742
|
if (!node) return false;
|
|
27842
27743
|
return hasAvsumOnEndpoint(node, this.endpointId);
|
|
27843
27744
|
}
|
|
@@ -27855,10 +27756,9 @@ let CameraOverlay = class extends i$4 {
|
|
|
27855
27756
|
this.remove();
|
|
27856
27757
|
}
|
|
27857
27758
|
_onStreamState(ev) {
|
|
27858
|
-
var _this$_streamViewRef$;
|
|
27859
27759
|
this._state = ev.detail.state;
|
|
27860
27760
|
this._errorMessage = ev.detail.errorMessage;
|
|
27861
|
-
this._activeVideoStreamId = ev.detail.state === "streaming" ?
|
|
27761
|
+
this._activeVideoStreamId = ev.detail.state === "streaming" ? this._streamViewRef.value?.videoStreamId ?? null : null;
|
|
27862
27762
|
}
|
|
27863
27763
|
_start() {
|
|
27864
27764
|
const view = this._streamViewRef.value;
|
|
@@ -28436,10 +28336,10 @@ const THREAD_ROLE_BADGES = {
|
|
|
28436
28336
|
};
|
|
28437
28337
|
const UTILITY_TYPES = /* @__PURE__ */new Set([DeviceTypes.ROOT_NODE, DeviceTypes.POWER_SOURCE, DeviceTypes.OTA_REQUESTOR, DeviceTypes.OTA_PROVIDER, DeviceTypes.BRIDGED_NODE, DeviceTypes.ELECTRICAL_SENSOR, DeviceTypes.DEVICE_ENERGY_MANAGEMENT, DeviceTypes.SECONDARY_NETWORK_INTERFACE, DeviceTypes.JOINT_FABRIC_ADMINISTRATOR]);
|
|
28438
28338
|
function extractDeviceType(entry) {
|
|
28439
|
-
return
|
|
28339
|
+
return entry?.["0"] ?? entry?.deviceType;
|
|
28440
28340
|
}
|
|
28441
28341
|
function selectBestDeviceType(deviceTypeList) {
|
|
28442
|
-
if (!
|
|
28342
|
+
if (!deviceTypeList?.length) return void 0;
|
|
28443
28343
|
let firstFound;
|
|
28444
28344
|
for (const entry of deviceTypeList) {
|
|
28445
28345
|
const deviceType = extractDeviceType(entry);
|
|
@@ -29214,16 +29114,15 @@ function isProtectedAdmin(entry, controllerNodeId) {
|
|
|
29214
29114
|
* SPDX-License-Identifier: Apache-2.0
|
|
29215
29115
|
*/
|
|
29216
29116
|
function toApiAcl$1(e) {
|
|
29217
|
-
var _e$targets;
|
|
29218
29117
|
return {
|
|
29219
29118
|
privilege: e.privilege,
|
|
29220
29119
|
auth_mode: e.authMode,
|
|
29221
29120
|
subjects: e.subjects ?? null,
|
|
29222
|
-
targets:
|
|
29121
|
+
targets: e.targets?.map(t => ({
|
|
29223
29122
|
cluster: t.cluster ?? null,
|
|
29224
29123
|
endpoint: t.endpoint ?? null,
|
|
29225
29124
|
device_type: t.deviceType ?? null
|
|
29226
|
-
}))
|
|
29125
|
+
})) ?? null
|
|
29227
29126
|
};
|
|
29228
29127
|
}
|
|
29229
29128
|
async function freshOurAcl$1(client, nodeId) {
|
|
@@ -29267,11 +29166,10 @@ async function downgradeToOperate(client, nodeId, keys) {
|
|
|
29267
29166
|
* SPDX-License-Identifier: Apache-2.0
|
|
29268
29167
|
*/
|
|
29269
29168
|
const showNodeAclAddDialog = async node => {
|
|
29270
|
-
|
|
29271
|
-
await import('./node-acl-add-dialog-DlR-sF-b.js');
|
|
29169
|
+
await import('./node-acl-add-dialog-BCWHD3Ke.js');
|
|
29272
29170
|
const dialog = document.createElement("node-acl-add-dialog");
|
|
29273
29171
|
dialog.node = node;
|
|
29274
|
-
|
|
29172
|
+
document.querySelector("matter-dashboard-app")?.renderRoot.appendChild(dialog);
|
|
29275
29173
|
};
|
|
29276
29174
|
|
|
29277
29175
|
var _staticBlock$1;
|
|
@@ -29420,10 +29318,7 @@ function targetAclCapacityForBinding(targetNode, sourceNodeId) {
|
|
|
29420
29318
|
const entries = entriesForFabric(readAclEntries(targetNode), fabricIndex);
|
|
29421
29319
|
const targetsMaxRaw = targetNode.attributes["0/31/3"];
|
|
29422
29320
|
const targetsMax = typeof targetsMaxRaw === "number" && targetsMaxRaw > 0 ? targetsMaxRaw : Number.MAX_SAFE_INTEGER;
|
|
29423
|
-
const reusable = entries.some(e =>
|
|
29424
|
-
var _e$targets;
|
|
29425
|
-
return e.authMode === AuthMode.Case && e.privilege >= Privilege.Operate && subjectsInclude(e, sourceNodeId) && (isWholeNode(e) || (((_e$targets = e.targets) === null || _e$targets === void 0 ? void 0 : _e$targets.length) ?? 0) < targetsMax);
|
|
29426
|
-
});
|
|
29321
|
+
const reusable = entries.some(e => e.authMode === AuthMode.Case && e.privilege >= Privilege.Operate && subjectsInclude(e, sourceNodeId) && (isWholeNode(e) || (e.targets?.length ?? 0) < targetsMax));
|
|
29427
29322
|
if (reusable) return {
|
|
29428
29323
|
canAdd: true
|
|
29429
29324
|
};
|
|
@@ -29475,9 +29370,8 @@ let AccessControlClusterCommands = class extends BaseClusterCommands {
|
|
|
29475
29370
|
void this._ensureLoaded();
|
|
29476
29371
|
}
|
|
29477
29372
|
disconnectedCallback() {
|
|
29478
|
-
var _this$_unsubscribe;
|
|
29479
29373
|
super.disconnectedCallback();
|
|
29480
|
-
|
|
29374
|
+
this._unsubscribe?.();
|
|
29481
29375
|
}
|
|
29482
29376
|
/** The acl attribute is fabric-scoped and may be absent from the cache until read. Load it on open. */
|
|
29483
29377
|
async _ensureLoaded() {
|
|
@@ -29495,16 +29389,14 @@ let AccessControlClusterCommands = class extends BaseClusterCommands {
|
|
|
29495
29389
|
}
|
|
29496
29390
|
}
|
|
29497
29391
|
get _controllerNodeId() {
|
|
29498
|
-
|
|
29499
|
-
return (_this$client$serverIn = this.client.serverInfo) === null || _this$client$serverIn === void 0 ? void 0 : _this$client$serverIn.controller_node_id;
|
|
29392
|
+
return this.client.serverInfo?.controller_node_id;
|
|
29500
29393
|
}
|
|
29501
29394
|
_entries() {
|
|
29502
29395
|
return entriesForFabric(readAclEntries(this.node), nodeFabricIndex(this.node));
|
|
29503
29396
|
}
|
|
29504
29397
|
_clusterName(id) {
|
|
29505
|
-
var _clusters$id;
|
|
29506
29398
|
if (id == null) return "all clusters";
|
|
29507
|
-
return `${
|
|
29399
|
+
return `${clusters[id]?.label ?? "Cluster"} (0x${id.toString(16).padStart(2, "0").toUpperCase()})`;
|
|
29508
29400
|
}
|
|
29509
29401
|
_privilegeClass(p) {
|
|
29510
29402
|
return `pv pv-${p}`;
|
|
@@ -29825,9 +29717,8 @@ let AvsumClusterCommands = class extends BaseClusterCommands {
|
|
|
29825
29717
|
}
|
|
29826
29718
|
}
|
|
29827
29719
|
disconnectedCallback() {
|
|
29828
|
-
var _this$_unsubscribeNod;
|
|
29829
29720
|
super.disconnectedCallback();
|
|
29830
|
-
|
|
29721
|
+
this._unsubscribeNodes?.();
|
|
29831
29722
|
if (this._toastTimer) {
|
|
29832
29723
|
clearTimeout(this._toastTimer);
|
|
29833
29724
|
this._toastTimer = void 0;
|
|
@@ -31040,12 +30931,11 @@ class TextField extends textFieldBaseClass {
|
|
|
31040
30931
|
return this.error ? this.errorText : this.nativeErrorText;
|
|
31041
30932
|
}
|
|
31042
30933
|
handleFocusChange() {
|
|
31043
|
-
var _this$inputOrTextarea;
|
|
31044
30934
|
// When calling focus() or reportValidity() during change, it's possible
|
|
31045
30935
|
// for blur to be called after the new focus event. Rather than set
|
|
31046
30936
|
// `this.focused` to true/false on focus/blur, we always set it to whether
|
|
31047
30937
|
// or not the input itself is focused.
|
|
31048
|
-
this.focused =
|
|
30938
|
+
this.focused = this.inputOrTextarea?.matches(':focus') ?? false;
|
|
31049
30939
|
}
|
|
31050
30940
|
handleInput(event) {
|
|
31051
30941
|
this.dirty = true;
|
|
@@ -31107,13 +30997,12 @@ class TextField extends textFieldBaseClass {
|
|
|
31107
30997
|
}
|
|
31108
30998
|
[onReportValidity](invalidEvent) {
|
|
31109
30999
|
// Prevent default pop-up behavior.
|
|
31110
|
-
invalidEvent
|
|
31000
|
+
invalidEvent?.preventDefault();
|
|
31111
31001
|
const prevMessage = this.getErrorText();
|
|
31112
31002
|
this.nativeError = !!invalidEvent;
|
|
31113
31003
|
this.nativeErrorText = this.validationMessage;
|
|
31114
31004
|
if (prevMessage === this.getErrorText()) {
|
|
31115
|
-
|
|
31116
|
-
(_this$field = this.field) === null || _this$field === void 0 || _this$field.reannounceError();
|
|
31005
|
+
this.field?.reannounceError();
|
|
31117
31006
|
}
|
|
31118
31007
|
}
|
|
31119
31008
|
}
|
|
@@ -31403,16 +31292,15 @@ function toBindingTarget(e) {
|
|
|
31403
31292
|
};
|
|
31404
31293
|
}
|
|
31405
31294
|
function toApiAcl(e) {
|
|
31406
|
-
var _e$targets;
|
|
31407
31295
|
return {
|
|
31408
31296
|
privilege: e.privilege,
|
|
31409
31297
|
auth_mode: e.authMode,
|
|
31410
31298
|
subjects: e.subjects ?? null,
|
|
31411
|
-
targets:
|
|
31299
|
+
targets: e.targets?.map(t => ({
|
|
31412
31300
|
cluster: t.cluster ?? null,
|
|
31413
31301
|
endpoint: t.endpoint ?? null,
|
|
31414
31302
|
device_type: t.deviceType ?? null
|
|
31415
|
-
}))
|
|
31303
|
+
})) ?? null
|
|
31416
31304
|
};
|
|
31417
31305
|
}
|
|
31418
31306
|
function requireFabricIndex(res, nodeId) {
|
|
@@ -31437,8 +31325,7 @@ function hasTarget(e, endpoint, cluster) {
|
|
|
31437
31325
|
return (e.targets ?? []).some(t => t.endpoint === endpoint && t.cluster === cluster);
|
|
31438
31326
|
}
|
|
31439
31327
|
function aclTargetsMax(client, nodeId) {
|
|
31440
|
-
|
|
31441
|
-
const raw = (_client$nodes$nodeIdK = client.nodes[nodeIdKey(nodeId)]) === null || _client$nodes$nodeIdK === void 0 ? void 0 : _client$nodes$nodeIdK.attributes["0/31/3"];
|
|
31328
|
+
const raw = client.nodes[nodeIdKey(nodeId)]?.attributes["0/31/3"];
|
|
31442
31329
|
return typeof raw === "number" && raw > 0 ? raw : Number.MAX_SAFE_INTEGER;
|
|
31443
31330
|
}
|
|
31444
31331
|
async function ensureBindingAcl(client, sourceNodeId, targetNodeId, targetEndpoint, cluster) {
|
|
@@ -31446,10 +31333,7 @@ async function ensureBindingAcl(client, sourceNodeId, targetNodeId, targetEndpoi
|
|
|
31446
31333
|
const alreadyGranted = acl.some(e => e.authMode === AuthMode.Case && e.privilege >= Privilege.Operate && subjectsInclude(e, sourceNodeId) && entryMatchesTarget(e, targetEndpoint, cluster));
|
|
31447
31334
|
if (alreadyGranted) return;
|
|
31448
31335
|
const targetsMax = aclTargetsMax(client, targetNodeId);
|
|
31449
|
-
const reusable = acl.find(e =>
|
|
31450
|
-
var _e$targets2;
|
|
31451
|
-
return e.authMode === AuthMode.Case && e.privilege >= Privilege.Operate && subjectsInclude(e, sourceNodeId) && (isWholeNode(e) || hasTarget(e, targetEndpoint, cluster) || (((_e$targets2 = e.targets) === null || _e$targets2 === void 0 ? void 0 : _e$targets2.length) ?? 0) < targetsMax);
|
|
31452
|
-
});
|
|
31336
|
+
const reusable = acl.find(e => e.authMode === AuthMode.Case && e.privilege >= Privilege.Operate && subjectsInclude(e, sourceNodeId) && (isWholeNode(e) || hasTarget(e, targetEndpoint, cluster) || (e.targets?.length ?? 0) < targetsMax));
|
|
31453
31337
|
if (reusable) {
|
|
31454
31338
|
if (!isWholeNode(reusable) && !hasTarget(reusable, targetEndpoint, cluster)) {
|
|
31455
31339
|
reusable.targets = reusable.targets ?? [];
|
|
@@ -31530,12 +31414,11 @@ async function deleteBindingAtIndex(client, sourceNode, sourceEndpoint, index) {
|
|
|
31530
31414
|
* SPDX-License-Identifier: Apache-2.0
|
|
31531
31415
|
*/
|
|
31532
31416
|
const showNodeBindingDialog = async (node, endpoint) => {
|
|
31533
|
-
|
|
31534
|
-
await import('./node-binding-dialog-DhnX_86M.js');
|
|
31417
|
+
await import('./node-binding-dialog-B18O4ASU.js');
|
|
31535
31418
|
const dialog = document.createElement("node-binding-dialog");
|
|
31536
31419
|
dialog.node = node;
|
|
31537
31420
|
dialog.endpoint = endpoint;
|
|
31538
|
-
|
|
31421
|
+
document.querySelector("matter-dashboard-app")?.renderRoot.appendChild(dialog);
|
|
31539
31422
|
};
|
|
31540
31423
|
|
|
31541
31424
|
var __defProp$e = Object.defineProperty;
|
|
@@ -31561,9 +31444,8 @@ let BindingClusterCommands = class extends BaseClusterCommands {
|
|
|
31561
31444
|
void this._ensureLoaded();
|
|
31562
31445
|
}
|
|
31563
31446
|
disconnectedCallback() {
|
|
31564
|
-
var _this$_unsubscribe;
|
|
31565
31447
|
super.disconnectedCallback();
|
|
31566
|
-
|
|
31448
|
+
this._unsubscribe?.();
|
|
31567
31449
|
}
|
|
31568
31450
|
/** Read the (fabric-scoped) binding attribute and each target's ACL into the cache on open. */
|
|
31569
31451
|
async _ensureLoaded() {
|
|
@@ -31576,7 +31458,7 @@ let BindingClusterCommands = class extends BaseClusterCommands {
|
|
|
31576
31458
|
const targets = new Set(readBindings(this.node, this.endpoint).map(b => b.node != null ? nodeIdKey(b.node) : void 0).filter(k => k !== void 0));
|
|
31577
31459
|
await Promise.all([...targets].map(k => {
|
|
31578
31460
|
const target = this.client.nodes[k];
|
|
31579
|
-
return target
|
|
31461
|
+
return target?.available ? this._readInto(target.node_id, ["0/31/0", "0/62/5"]) : void 0;
|
|
31580
31462
|
}));
|
|
31581
31463
|
this.requestUpdate();
|
|
31582
31464
|
} catch (err) {
|
|
@@ -31590,9 +31472,8 @@ let BindingClusterCommands = class extends BaseClusterCommands {
|
|
|
31590
31472
|
if (node) for (const [k, v] of Object.entries(res)) node.attributes[k] = v;
|
|
31591
31473
|
}
|
|
31592
31474
|
_clusterName(id) {
|
|
31593
|
-
var _clusters$id;
|
|
31594
31475
|
if (id == null) return "All clusters";
|
|
31595
|
-
return `${
|
|
31476
|
+
return `${clusters[id]?.label ?? "Cluster"} (0x${id.toString(16).padStart(2, "0").toUpperCase()})`;
|
|
31596
31477
|
}
|
|
31597
31478
|
_targetNode(nodeId) {
|
|
31598
31479
|
if (nodeId == null) return void 0;
|
|
@@ -32257,14 +32138,12 @@ let ChimeClusterCommands = class extends BaseClusterCommands {
|
|
|
32257
32138
|
}
|
|
32258
32139
|
}
|
|
32259
32140
|
disconnectedCallback() {
|
|
32260
|
-
var _this$_unsubscribeNod, _this$_unsubscribeEve;
|
|
32261
32141
|
super.disconnectedCallback();
|
|
32262
|
-
|
|
32263
|
-
|
|
32142
|
+
this._unsubscribeNodes?.();
|
|
32143
|
+
this._unsubscribeEvents?.();
|
|
32264
32144
|
this._lastPlayed = null;
|
|
32265
32145
|
}
|
|
32266
32146
|
render() {
|
|
32267
|
-
var _sounds$find;
|
|
32268
32147
|
if (!this.node || this.cluster !== CHIME_CLUSTER_ID) return A;
|
|
32269
32148
|
const sounds = readSounds(this.node, this.endpoint);
|
|
32270
32149
|
const selected = readSelected(this.node, this.endpoint);
|
|
@@ -32273,7 +32152,7 @@ let ChimeClusterCommands = class extends BaseClusterCommands {
|
|
|
32273
32152
|
const showPerRowPlay = revision >= 2;
|
|
32274
32153
|
const showLastPlayed = revision >= 2 && this._lastPlayed !== null;
|
|
32275
32154
|
const playLocked = Date.now() < this._playDisabledUntil;
|
|
32276
|
-
const lastSoundName = showLastPlayed ?
|
|
32155
|
+
const lastSoundName = showLastPlayed ? sounds.find(s => s.chimeId === this._lastPlayed.chimeId)?.name ?? `#${this._lastPlayed.chimeId}` : null;
|
|
32277
32156
|
return b`
|
|
32278
32157
|
<details class="command-panel" open>
|
|
32279
32158
|
<summary>Chime</summary>
|
|
@@ -32630,12 +32509,10 @@ let MatterClusterView = class extends i$4 {
|
|
|
32630
32509
|
});
|
|
32631
32510
|
}
|
|
32632
32511
|
disconnectedCallback() {
|
|
32633
|
-
var _this$_unsubscribeDev;
|
|
32634
32512
|
super.disconnectedCallback();
|
|
32635
|
-
|
|
32513
|
+
this._unsubscribeDev?.();
|
|
32636
32514
|
}
|
|
32637
32515
|
render() {
|
|
32638
|
-
var _clusters$this$cluste, _clusters$this$cluste2;
|
|
32639
32516
|
if (!this.node || this.endpoint == void 0 || this.cluster == void 0) {
|
|
32640
32517
|
return b`
|
|
32641
32518
|
<dashboard-header title="Not found" backButton="#"></dashboard-header>
|
|
@@ -32648,7 +32525,7 @@ let MatterClusterView = class extends i$4 {
|
|
|
32648
32525
|
}
|
|
32649
32526
|
const fabricIndex = getEffectiveFabricIndex(this.client.serverInfo.fabric_index, isTestNodeId(this.node.node_id));
|
|
32650
32527
|
const nodeHex = formatNodeAddress(fabricIndex, this.node.node_id);
|
|
32651
|
-
const clusterName =
|
|
32528
|
+
const clusterName = clusters[this.cluster]?.label ?? "Custom/Unknown Cluster";
|
|
32652
32529
|
return b`
|
|
32653
32530
|
<dashboard-header
|
|
32654
32531
|
.title=${`Node ${this.node.node_id} ${nodeHex} | Endpoint ${this.endpoint} | Cluster ${this.cluster} (${clusterName})`}
|
|
@@ -32672,45 +32549,41 @@ let MatterClusterView = class extends i$4 {
|
|
|
32672
32549
|
<md-list-item>
|
|
32673
32550
|
<div slot="headline">
|
|
32674
32551
|
<b
|
|
32675
|
-
>Attributes of ${
|
|
32552
|
+
>Attributes of ${clusters[this.cluster]?.label ?? "Custom/Unknown Cluster"} Cluster on
|
|
32676
32553
|
Endpoint ${this.endpoint}</b
|
|
32677
32554
|
>
|
|
32678
32555
|
</div>
|
|
32679
32556
|
<div slot="supporting-text">ClusterId ${this.cluster} (${formatHex(this.cluster)})</div>
|
|
32680
32557
|
</md-list-item>
|
|
32681
32558
|
<md-divider></md-divider>
|
|
32682
|
-
${clusterAttributes(this.node.attributes, this.endpoint, this.cluster).map((attribute, index) =>
|
|
32683
|
-
var _clusters$this$cluste3, _clusters$this$cluste4;
|
|
32684
|
-
return b`
|
|
32559
|
+
${clusterAttributes(this.node.attributes, this.endpoint, this.cluster).map((attribute, index) => b`
|
|
32685
32560
|
<md-list-item class=${index % 2 === 1 ? "alternate-row" : ""}>
|
|
32686
32561
|
<div slot="headline">
|
|
32687
|
-
${
|
|
32562
|
+
${clusters[this.cluster]?.attributes[attribute.key]?.label ?? "Custom/Unknown Attribute"}
|
|
32688
32563
|
</div>
|
|
32689
32564
|
<div slot="supporting-text">
|
|
32690
32565
|
AttributeId: ${attribute.key} (${formatHex(attribute.key)}) - Value type:
|
|
32691
|
-
${
|
|
32566
|
+
${clusters[this.cluster]?.attributes[attribute.key]?.type ?? "unknown"}
|
|
32692
32567
|
</div>
|
|
32693
32568
|
<div slot="end" class="row-end">
|
|
32694
32569
|
${this._devMode ? this._renderAttributeDevActions(attribute.key, attribute.value) : A}
|
|
32695
32570
|
${toBigIntAwareJson(attribute.value).length > 30 ? b`<md-outlined-button
|
|
32696
32571
|
@click=${() => {
|
|
32697
|
-
|
|
32698
|
-
|
|
32572
|
+
this._showAttributeValue(attribute.value);
|
|
32573
|
+
}}
|
|
32699
32574
|
>
|
|
32700
32575
|
Show value
|
|
32701
32576
|
</md-outlined-button>` : b`<code>${toBigIntAwareJson(attribute.value)}</code>`}
|
|
32702
32577
|
</div>
|
|
32703
32578
|
</md-list-item>
|
|
32704
|
-
|
|
32705
|
-
})}
|
|
32579
|
+
`)}
|
|
32706
32580
|
</md-list>
|
|
32707
32581
|
</div>
|
|
32708
32582
|
`;
|
|
32709
32583
|
}
|
|
32710
32584
|
_renderAttributeDevActions(attributeId, currentValue) {
|
|
32711
|
-
|
|
32712
|
-
const
|
|
32713
|
-
const online = ((_this$node = this.node) === null || _this$node === void 0 ? void 0 : _this$node.available) === true;
|
|
32585
|
+
const meta = clusters[this.cluster]?.attributes[attributeId];
|
|
32586
|
+
const online = this.node?.available === true;
|
|
32714
32587
|
const state2 = this._refreshState[attributeId] ?? "idle";
|
|
32715
32588
|
const refreshClasses = `dev-action refresh refresh-${state2}`;
|
|
32716
32589
|
return b`
|
|
@@ -32724,7 +32597,7 @@ let MatterClusterView = class extends i$4 {
|
|
|
32724
32597
|
>
|
|
32725
32598
|
<ha-svg-icon .path=${mdiRefresh}></ha-svg-icon>
|
|
32726
32599
|
</md-outlined-icon-button>
|
|
32727
|
-
${meta
|
|
32600
|
+
${meta?.writable ? b`
|
|
32728
32601
|
<md-outlined-icon-button
|
|
32729
32602
|
class="dev-action pencil"
|
|
32730
32603
|
title="Write attribute…"
|
|
@@ -32744,10 +32617,7 @@ let MatterClusterView = class extends i$4 {
|
|
|
32744
32617
|
const endpoint = this.endpoint;
|
|
32745
32618
|
const cluster = this.cluster;
|
|
32746
32619
|
const path = `${endpoint}/${cluster}/${attributeId}`;
|
|
32747
|
-
const isSameContext = () =>
|
|
32748
|
-
var _this$node2;
|
|
32749
|
-
return this.isConnected && ((_this$node2 = this.node) === null || _this$node2 === void 0 ? void 0 : _this$node2.node_id) === nodeId && this.endpoint === endpoint && this.cluster === cluster;
|
|
32750
|
-
};
|
|
32620
|
+
const isSameContext = () => this.isConnected && this.node?.node_id === nodeId && this.endpoint === endpoint && this.cluster === cluster;
|
|
32751
32621
|
this._refreshState = {
|
|
32752
32622
|
...this._refreshState,
|
|
32753
32623
|
[attributeId]: "loading"
|
|
@@ -32798,12 +32668,11 @@ let MatterClusterView = class extends i$4 {
|
|
|
32798
32668
|
});
|
|
32799
32669
|
}
|
|
32800
32670
|
_renderDevCommandsPanel() {
|
|
32801
|
-
var _this$node3, _this$node4;
|
|
32802
32671
|
const clusterMeta = this.cluster !== void 0 ? clusters[this.cluster] : void 0;
|
|
32803
|
-
const rawAcceptedList =
|
|
32672
|
+
const rawAcceptedList = this.node?.attributes[`${this.endpoint}/${this.cluster}/${ACCEPTED_COMMAND_LIST_ATTR}`];
|
|
32804
32673
|
const acceptedList = Array.isArray(rawAcceptedList) ? rawAcceptedList : [];
|
|
32805
|
-
const commands = acceptedList.map(id => clusterMeta
|
|
32806
|
-
const online =
|
|
32674
|
+
const commands = acceptedList.map(id => clusterMeta?.commands[id]).filter(cmd => cmd !== void 0).sort((a, b) => a.id - b.id);
|
|
32675
|
+
const online = this.node?.available === true;
|
|
32807
32676
|
return b`
|
|
32808
32677
|
<div class="container">
|
|
32809
32678
|
<details class="dev-commands-panel">
|
|
@@ -32859,10 +32728,9 @@ let MatterClusterView = class extends i$4 {
|
|
|
32859
32728
|
});
|
|
32860
32729
|
}
|
|
32861
32730
|
_renderClusterCommands() {
|
|
32862
|
-
var _this$node5;
|
|
32863
32731
|
if (this.cluster === void 0) return b``;
|
|
32864
32732
|
const RENDER_WHEN_OFFLINE = /* @__PURE__ */new Set([30, 31]);
|
|
32865
|
-
if (!
|
|
32733
|
+
if (!this.node?.available && !RENDER_WHEN_OFFLINE.has(this.cluster)) return b``;
|
|
32866
32734
|
const tagName = getClusterCommandsTag(this.cluster);
|
|
32867
32735
|
if (!tagName) return b``;
|
|
32868
32736
|
const componentHtml = `<${tagName}></${tagName}>`;
|
|
@@ -32874,12 +32742,11 @@ let MatterClusterView = class extends i$4 {
|
|
|
32874
32742
|
`;
|
|
32875
32743
|
}
|
|
32876
32744
|
updated(changedProperties) {
|
|
32877
|
-
var _this$shadowRoot;
|
|
32878
32745
|
super.updated(changedProperties);
|
|
32879
32746
|
if (changedProperties.has("cluster") || changedProperties.has("endpoint")) {
|
|
32880
32747
|
this._refreshState = {};
|
|
32881
32748
|
}
|
|
32882
|
-
const container =
|
|
32749
|
+
const container = this.shadowRoot?.getElementById("cluster-commands-container");
|
|
32883
32750
|
if (container && this.node && this.endpoint !== void 0 && this.cluster !== void 0) {
|
|
32884
32751
|
const commandsElement = container.firstElementChild;
|
|
32885
32752
|
if (commandsElement instanceof BaseClusterCommands) {
|
|
@@ -33170,7 +33037,6 @@ let MatterEndpointView = class extends i$4 {
|
|
|
33170
33037
|
this._tick = 0;
|
|
33171
33038
|
}
|
|
33172
33039
|
render() {
|
|
33173
|
-
var _this$node;
|
|
33174
33040
|
if (!this.node || this.endpoint == void 0) {
|
|
33175
33041
|
return b`
|
|
33176
33042
|
<dashboard-header title="Not found" backButton="#"></dashboard-header>
|
|
@@ -33217,14 +33083,13 @@ let MatterEndpointView = class extends i$4 {
|
|
|
33217
33083
|
}).join(" / ")}
|
|
33218
33084
|
</div>
|
|
33219
33085
|
</md-list-item>
|
|
33220
|
-
${i([
|
|
33221
|
-
var _clusters$cluster;
|
|
33086
|
+
${i([this.node?.attributes.length], () => getUniqueClusters(this.node, this.endpoint).map(cluster => {
|
|
33222
33087
|
return b`
|
|
33223
33088
|
<md-list-item
|
|
33224
33089
|
type="link"
|
|
33225
33090
|
href=${`#node/${this.node.node_id}/${this.endpoint}/${cluster}`}
|
|
33226
33091
|
>
|
|
33227
|
-
<div slot="headline">${
|
|
33092
|
+
<div slot="headline">${clusters[cluster]?.label ?? "Custom/Unknown Cluster"}</div>
|
|
33228
33093
|
<div slot="supporting-text">ClusterId ${cluster} (${formatHex(cluster)})</div>
|
|
33229
33094
|
<ha-svg-icon slot="end" .path=${mdiChevronRight}></ha-svg-icon>
|
|
33230
33095
|
</md-list-item>
|
|
@@ -33648,7 +33513,7 @@ function findUnknownDevices(nodes, extAddrMap, rloc16Map, borderRouters) {
|
|
|
33648
33513
|
}
|
|
33649
33514
|
const out = new Array();
|
|
33650
33515
|
for (const agg of aggregates.values()) {
|
|
33651
|
-
const br = borderRouters
|
|
33516
|
+
const br = borderRouters?.get(agg.extAddressHex);
|
|
33652
33517
|
if (br !== void 0) {
|
|
33653
33518
|
out.push({
|
|
33654
33519
|
kind: "br",
|
|
@@ -33905,7 +33770,7 @@ function buildThreadEdgePairs(nodes, extAddrMap, rloc16Map, unknownDevices) {
|
|
|
33905
33770
|
signalLevel: getSignalLevel(neighbor),
|
|
33906
33771
|
lqi: neighbor.lqi,
|
|
33907
33772
|
rssi: neighbor.avgRssi ?? neighbor.lastRssi,
|
|
33908
|
-
pathCost: routeEntry
|
|
33773
|
+
pathCost: routeEntry?.pathCost,
|
|
33909
33774
|
bidirectionalLqi
|
|
33910
33775
|
};
|
|
33911
33776
|
if (isFromA) {
|
|
@@ -33963,7 +33828,7 @@ function buildThreadEdgePairs(nodes, extAddrMap, rloc16Map, unknownDevices) {
|
|
|
33963
33828
|
function getNodeConnectionsFromPairs(nodeId, edgePairs, nodes, filters) {
|
|
33964
33829
|
const connections = [];
|
|
33965
33830
|
const hiddenNodeIds = /* @__PURE__ */new Set();
|
|
33966
|
-
if (filters
|
|
33831
|
+
if (filters?.hideOfflineNodes) {
|
|
33967
33832
|
for (const node of Object.values(nodes)) {
|
|
33968
33833
|
if (node.available === false) {
|
|
33969
33834
|
hiddenNodeIds.add(String(node.node_id));
|
|
@@ -34708,7 +34573,6 @@ class Dialog extends dialogBaseClass {
|
|
|
34708
34573
|
* `opened` event was fired.
|
|
34709
34574
|
*/
|
|
34710
34575
|
async show() {
|
|
34711
|
-
var _this$querySelector;
|
|
34712
34576
|
this.isOpening = true;
|
|
34713
34577
|
// Dialogs can be opened before being attached to the DOM, so we need to
|
|
34714
34578
|
// wait until we're connected before calling `showModal()`.
|
|
@@ -34738,7 +34602,7 @@ class Dialog extends dialogBaseClass {
|
|
|
34738
34602
|
// Native modal dialogs ignore autofocus and instead force focus to the
|
|
34739
34603
|
// first focusable child. Override this behavior if there is a child with
|
|
34740
34604
|
// an autofocus attribute.
|
|
34741
|
-
|
|
34605
|
+
this.querySelector('[autofocus]')?.focus();
|
|
34742
34606
|
await this.animateDialog(this.getOpenAnimation());
|
|
34743
34607
|
this.dispatchEvent(new Event('opened'));
|
|
34744
34608
|
this.isOpening = false;
|
|
@@ -34912,12 +34776,11 @@ class Dialog extends dialogBaseClass {
|
|
|
34912
34776
|
this.close();
|
|
34913
34777
|
}
|
|
34914
34778
|
handleClose() {
|
|
34915
|
-
var _this$dialog;
|
|
34916
34779
|
if (!this.escapePressedWithoutCancel) {
|
|
34917
34780
|
return;
|
|
34918
34781
|
}
|
|
34919
34782
|
this.escapePressedWithoutCancel = false;
|
|
34920
|
-
|
|
34783
|
+
this.dialog?.dispatchEvent(new Event('cancel', {
|
|
34921
34784
|
cancelable: true
|
|
34922
34785
|
}));
|
|
34923
34786
|
}
|
|
@@ -34935,12 +34798,11 @@ class Dialog extends dialogBaseClass {
|
|
|
34935
34798
|
});
|
|
34936
34799
|
}
|
|
34937
34800
|
async animateDialog(animation) {
|
|
34938
|
-
var _this$cancelAnimation;
|
|
34939
34801
|
// Always cancel the previous animations. Animations can include `fill`
|
|
34940
34802
|
// modes that need to be cleared when `quick` is toggled. If not, content
|
|
34941
34803
|
// that faded out will remain hidden when a `quick` dialog re-opens after
|
|
34942
34804
|
// previously opening and closing without `quick`.
|
|
34943
|
-
|
|
34805
|
+
this.cancelAnimations?.abort();
|
|
34944
34806
|
this.cancelAnimations = new AbortController();
|
|
34945
34807
|
if (this.quick) {
|
|
34946
34808
|
return;
|
|
@@ -35011,10 +34873,9 @@ class Dialog extends dialogBaseClass {
|
|
|
35011
34873
|
handleFocusTrapFocus(event) {
|
|
35012
34874
|
const [firstFocusableChild, lastFocusableChild] = this.getFirstAndLastFocusableChildren();
|
|
35013
34875
|
if (!firstFocusableChild || !lastFocusableChild) {
|
|
35014
|
-
var _this$dialog2;
|
|
35015
34876
|
// When a dialog does not have focusable children, the dialog itself
|
|
35016
34877
|
// receives focus.
|
|
35017
|
-
|
|
34878
|
+
this.dialog?.focus();
|
|
35018
34879
|
return;
|
|
35019
34880
|
}
|
|
35020
34881
|
// To determine which child to focus, we need to know which focus trap
|
|
@@ -35104,7 +34965,6 @@ __decorate([r$3()], Dialog.prototype, "hasHeadline", void 0);
|
|
|
35104
34965
|
__decorate([r$3()], Dialog.prototype, "hasActions", void 0);
|
|
35105
34966
|
__decorate([r$3()], Dialog.prototype, "hasIcon", void 0);
|
|
35106
34967
|
function isFocusable(element) {
|
|
35107
|
-
var _element$shadowRoot;
|
|
35108
34968
|
// Check if the element is a known built-in focusable element:
|
|
35109
34969
|
// - <a> and <area> with `href` attributes.
|
|
35110
34970
|
// - Form controls that are not disabled.
|
|
@@ -35126,7 +34986,7 @@ function isFocusable(element) {
|
|
|
35126
34986
|
if (!element.matches(notDisabled)) {
|
|
35127
34987
|
return false;
|
|
35128
34988
|
}
|
|
35129
|
-
return
|
|
34989
|
+
return element.shadowRoot?.delegatesFocus ?? false;
|
|
35130
34990
|
}
|
|
35131
34991
|
|
|
35132
34992
|
/**
|
|
@@ -35201,9 +35061,8 @@ let UpdateConnectionsDialog = class extends i$4 {
|
|
|
35201
35061
|
this._hasClosedEvent = false;
|
|
35202
35062
|
}
|
|
35203
35063
|
firstUpdated() {
|
|
35204
|
-
|
|
35205
|
-
|
|
35206
|
-
dialog === null || dialog === void 0 || dialog.show();
|
|
35064
|
+
const dialog = this.shadowRoot?.querySelector("md-dialog");
|
|
35065
|
+
dialog?.show();
|
|
35207
35066
|
}
|
|
35208
35067
|
disconnectedCallback() {
|
|
35209
35068
|
super.disconnectedCallback();
|
|
@@ -35279,11 +35138,10 @@ let UpdateConnectionsDialog = class extends i$4 {
|
|
|
35279
35138
|
}
|
|
35280
35139
|
}
|
|
35281
35140
|
_closeDialog() {
|
|
35282
|
-
var _this$shadowRoot2;
|
|
35283
35141
|
if (this._hasClosedEvent) return;
|
|
35284
35142
|
this._hasClosedEvent = true;
|
|
35285
|
-
const dialog =
|
|
35286
|
-
dialog
|
|
35143
|
+
const dialog = this.shadowRoot?.querySelector("md-dialog");
|
|
35144
|
+
dialog?.close();
|
|
35287
35145
|
this.dispatchEvent(new CustomEvent("dialog-closed", {
|
|
35288
35146
|
bubbles: true,
|
|
35289
35147
|
composed: true
|
|
@@ -35504,15 +35362,14 @@ let NetworkDetails = class extends i$4 {
|
|
|
35504
35362
|
* Returns format like "@1:7b" for node ID 123.
|
|
35505
35363
|
*/
|
|
35506
35364
|
_formatNodeIdHex(nodeId) {
|
|
35507
|
-
var _this$client;
|
|
35508
35365
|
const node = this.nodes[String(nodeId)];
|
|
35509
35366
|
const isTestNode = node ? isTestNodeId(node.node_id) : false;
|
|
35510
|
-
const fabricIndex = getEffectiveFabricIndex(
|
|
35367
|
+
const fabricIndex = getEffectiveFabricIndex(this.client?.serverInfo?.fabric_index, isTestNode);
|
|
35511
35368
|
return formatNodeAddressFromAny(fabricIndex, nodeId);
|
|
35512
35369
|
}
|
|
35513
35370
|
_getExternalDeviceLabel(conn) {
|
|
35514
35371
|
const device = this.unknownDevices.get(String(conn.connectedNodeId));
|
|
35515
|
-
if (
|
|
35372
|
+
if (device?.kind === "br" && device.hostname) {
|
|
35516
35373
|
return b`${stripMdnsHostname(device.hostname)}`;
|
|
35517
35374
|
}
|
|
35518
35375
|
return b`External: <span class="mono">${conn.extAddressHex}</span>`;
|
|
@@ -36072,9 +35929,8 @@ let NetworkDetails = class extends i$4 {
|
|
|
36072
35929
|
if (networkType === "thread") {
|
|
36073
35930
|
const connections = getNodeConnectionsFromPairs(nodeId, this.threadEdgePairs, this.nodes);
|
|
36074
35931
|
return connections.filter(conn => {
|
|
36075
|
-
var _conn$connectedNode;
|
|
36076
35932
|
if (conn.isUnknown) return false;
|
|
36077
|
-
return
|
|
35933
|
+
return conn.connectedNode?.available === true;
|
|
36078
35934
|
}).map(conn => String(conn.connectedNodeId));
|
|
36079
35935
|
}
|
|
36080
35936
|
return [];
|
|
@@ -36090,7 +35946,7 @@ let NetworkDetails = class extends i$4 {
|
|
|
36090
35946
|
if (!device) return [];
|
|
36091
35947
|
return device.seenBy.filter(nodeId => {
|
|
36092
35948
|
const node = this.nodes[nodeId.toString()];
|
|
36093
|
-
return
|
|
35949
|
+
return node?.available === true;
|
|
36094
35950
|
});
|
|
36095
35951
|
}
|
|
36096
35952
|
/**
|
|
@@ -36147,11 +36003,10 @@ let NetworkDetails = class extends i$4 {
|
|
|
36147
36003
|
<h4>Connected Nodes</h4>
|
|
36148
36004
|
<div class="connected-nodes-list">
|
|
36149
36005
|
${ap.connectedNodes.toSorted((a, b) => {
|
|
36150
|
-
var _getWiFiDiagnostics, _getWiFiDiagnostics2;
|
|
36151
36006
|
const nodeA = this.nodes[a.toString()];
|
|
36152
36007
|
const nodeB = this.nodes[b.toString()];
|
|
36153
|
-
const rssiA = nodeA ?
|
|
36154
|
-
const rssiB = nodeB ?
|
|
36008
|
+
const rssiA = nodeA ? getWiFiDiagnostics(nodeA)?.rssi ?? -Infinity : -Infinity;
|
|
36009
|
+
const rssiB = nodeB ? getWiFiDiagnostics(nodeB)?.rssi ?? -Infinity : -Infinity;
|
|
36155
36010
|
return rssiB - rssiA;
|
|
36156
36011
|
}).map(nodeId => {
|
|
36157
36012
|
const node = this.nodes[nodeId.toString()];
|
|
@@ -39454,7 +39309,7 @@ var STRICT_METHOD=arrayMethodIsStrict('sort');var STABLE_SORT=!fails(function(){
|
|
|
39454
39309
|
if(V8)return V8<70;if(FF&&FF>3)return;if(IE_OR_EDGE)return true;if(WEBKIT)return WEBKIT<603;var result='';var code,chr,value,index;// generate an array with more 512 elements (Chakra and old V8 fails only in this case)
|
|
39455
39310
|
for(code=65;code<76;code++){chr=String.fromCharCode(code);switch(code){case 66:case 69:case 70:case 72:value=3;break;case 68:case 71:value=4;break;default:value=2;}for(index=0;index<47;index++){test.push({k:chr+index,v:value});}}test.sort(function(a,b){return b.v-a.v;});for(index=0;index<test.length;index++){chr=test[index].k.charAt(0);if(result.charAt(result.length-1)!==chr)result+=chr;}return result!=='DGBEFHACIJK';});var FORCED=FAILS_ON_UNDEFINED||!FAILS_ON_NULL||!STRICT_METHOD||!STABLE_SORT;var getSortCompare=function(comparefn){return function(x,y){if(y===undefined)return -1;if(x===undefined)return 1;if(comparefn!==undefined)return +comparefn(x,y)||0;return toString(x)>toString(y)?1:-1;};};// `Array.prototype.sort` method
|
|
39456
39311
|
// https://tc39.es/ecma262/#sec-array.prototype.sort
|
|
39457
|
-
$({target:'Array',proto:true,forced:FORCED},{sort:function sort(comparefn){if(comparefn!==undefined)aCallable(comparefn);var array=toObject(this);if(STABLE_SORT)return comparefn===undefined?nativeSort(array):nativeSort(array,comparefn);var items=[];var arrayLength=lengthOfArrayLike(array);var itemsLength,index;for(index=0;index<arrayLength;index++){if(index in array)push(items,array[index]);}internalSort(items,getSortCompare(comparefn));itemsLength=lengthOfArrayLike(items);index=0;while(index<itemsLength)array[index]=items[index++];while(index<arrayLength)deletePropertyOrThrow(array,index++);return array;}});return es_array_sort;}var sort$3;var hasRequiredSort$3;function requireSort$3(){if(hasRequiredSort$3)return sort$3;hasRequiredSort$3=1;requireEs_array_sort();var getBuiltInPrototypeMethod=/*@__PURE__*/requireGetBuiltInPrototypeMethod();sort$3=getBuiltInPrototypeMethod('Array','sort');return sort$3;}var sort$2;var hasRequiredSort$2;function requireSort$2(){if(hasRequiredSort$2)return sort$2;hasRequiredSort$2=1;var isPrototypeOf=/*@__PURE__*/requireObjectIsPrototypeOf();var method=/*@__PURE__*/requireSort$3();var ArrayPrototype=Array.prototype;sort$2=function(it){var own=it.sort;return it===ArrayPrototype||isPrototypeOf(ArrayPrototype,it)&&own===ArrayPrototype.sort?method:own;};return sort$2;}var sort$1;var hasRequiredSort$1;function requireSort$1(){if(hasRequiredSort$1)return sort$1;hasRequiredSort$1=1;var parent=/*@__PURE__*/requireSort$2();sort$1=parent;return sort$1;}var sort;var hasRequiredSort;function requireSort(){if(hasRequiredSort)return sort;hasRequiredSort=1;sort=/*@__PURE__*/requireSort$1();return sort;}var sortExports=requireSort();var _sortInstanceProperty=/*@__PURE__*/getDefaultExportFromCjs(sortExports);var keys$3;var hasRequiredKeys$3;function requireKeys$3(){if(hasRequiredKeys$3)return keys$3;hasRequiredKeys$3=1;requireEs_array_iterator();var getBuiltInPrototypeMethod=/*@__PURE__*/requireGetBuiltInPrototypeMethod();keys$3=getBuiltInPrototypeMethod('Array','keys');return keys$3;}var keys$2;var hasRequiredKeys$2;function requireKeys$2(){if(hasRequiredKeys$2)return keys$2;hasRequiredKeys$2=1;var parent=/*@__PURE__*/requireKeys$3();keys$2=parent;return keys$2;}var keys$1;var hasRequiredKeys$1;function requireKeys$1(){if(hasRequiredKeys$1)return keys$1;hasRequiredKeys$1=1;requireWeb_domCollections_iterator();var classof=/*@__PURE__*/requireClassof();var hasOwn=/*@__PURE__*/requireHasOwnProperty();var isPrototypeOf=/*@__PURE__*/requireObjectIsPrototypeOf();var method=/*@__PURE__*/requireKeys$2();var ArrayPrototype=Array.prototype;var DOMIterables={DOMTokenList:true,NodeList:true};keys$1=function(it){var own=it.keys;return it===ArrayPrototype||isPrototypeOf(ArrayPrototype,it)&&own===ArrayPrototype.keys||hasOwn(DOMIterables,classof(it))?method:own;};return keys$1;}var keys;var hasRequiredKeys;function requireKeys(){if(hasRequiredKeys)return keys;hasRequiredKeys=1;keys=/*@__PURE__*/requireKeys$1();return keys;}var keysExports=requireKeys();var _keysInstanceProperty=/*@__PURE__*/getDefaultExportFromCjs(keysExports);var values$3;var hasRequiredValues$3;function requireValues$3(){if(hasRequiredValues$3)return values$3;hasRequiredValues$3=1;requireEs_array_iterator();var getBuiltInPrototypeMethod=/*@__PURE__*/requireGetBuiltInPrototypeMethod();values$3=getBuiltInPrototypeMethod('Array','values');return values$3;}var values$2;var hasRequiredValues$2;function requireValues$2(){if(hasRequiredValues$2)return values$2;hasRequiredValues$2=1;var parent=/*@__PURE__*/requireValues$3();values$2=parent;return values$2;}var values$1;var hasRequiredValues$1;function requireValues$1(){if(hasRequiredValues$1)return values$1;hasRequiredValues$1=1;requireWeb_domCollections_iterator();var classof=/*@__PURE__*/requireClassof();var hasOwn=/*@__PURE__*/requireHasOwnProperty();var isPrototypeOf=/*@__PURE__*/requireObjectIsPrototypeOf();var method=/*@__PURE__*/requireValues$2();var ArrayPrototype=Array.prototype;var DOMIterables={DOMTokenList:true,NodeList:true};values$1=function(it){var own=it.values;return it===ArrayPrototype||isPrototypeOf(ArrayPrototype,it)&&own===ArrayPrototype.values||hasOwn(DOMIterables,classof(it))?method:own;};return values$1;}var values;var hasRequiredValues;function requireValues(){if(hasRequiredValues)return values;hasRequiredValues=1;values=/*@__PURE__*/requireValues$1();return values;}var valuesExports=requireValues();var _valuesInstanceProperty=/*@__PURE__*/getDefaultExportFromCjs(valuesExports);var entries$3;var hasRequiredEntries$3;function requireEntries$3(){if(hasRequiredEntries$3)return entries$3;hasRequiredEntries$3=1;requireEs_array_iterator();var getBuiltInPrototypeMethod=/*@__PURE__*/requireGetBuiltInPrototypeMethod();entries$3=getBuiltInPrototypeMethod('Array','entries');return entries$3;}var entries$2;var hasRequiredEntries$2;function requireEntries$2(){if(hasRequiredEntries$2)return entries$2;hasRequiredEntries$2=1;var parent=/*@__PURE__*/requireEntries$3();entries$2=parent;return entries$2;}var entries$1;var hasRequiredEntries$1;function requireEntries$1(){if(hasRequiredEntries$1)return entries$1;hasRequiredEntries$1=1;requireWeb_domCollections_iterator();var classof=/*@__PURE__*/requireClassof();var hasOwn=/*@__PURE__*/requireHasOwnProperty();var isPrototypeOf=/*@__PURE__*/requireObjectIsPrototypeOf();var method=/*@__PURE__*/requireEntries$2();var ArrayPrototype=Array.prototype;var DOMIterables={DOMTokenList:true,NodeList:true};entries$1=function(it){var own=it.entries;return it===ArrayPrototype||isPrototypeOf(ArrayPrototype,it)&&own===ArrayPrototype.entries||hasOwn(DOMIterables,classof(it))?method:own;};return entries$1;}var entries;var hasRequiredEntries;function requireEntries(){if(hasRequiredEntries)return entries;hasRequiredEntries=1;entries=/*@__PURE__*/requireEntries$1();return entries;}var entriesExports=requireEntries();var _entriesInstanceProperty=/*@__PURE__*/getDefaultExportFromCjs(entriesExports);var defineProperty;var hasRequiredDefineProperty;function requireDefineProperty(){if(hasRequiredDefineProperty)return defineProperty;hasRequiredDefineProperty=1;defineProperty=/*@__PURE__*/requireDefineProperty$4();return defineProperty;}var definePropertyExports=requireDefineProperty();var _Object$defineProperty=/*@__PURE__*/getDefaultExportFromCjs(definePropertyExports);const byteToHex=[];for(let i=0;i<256;++i){byteToHex.push((i+0x100).toString(16).slice(1));}function unsafeStringify(arr,offset=0){return (byteToHex[arr[offset+0]]+byteToHex[arr[offset+1]]+byteToHex[arr[offset+2]]+byteToHex[arr[offset+3]]+'-'+byteToHex[arr[offset+4]]+byteToHex[arr[offset+5]]+'-'+byteToHex[arr[offset+6]]+byteToHex[arr[offset+7]]+'-'+byteToHex[arr[offset+8]]+byteToHex[arr[offset+9]]+'-'+byteToHex[arr[offset+10]]+byteToHex[arr[offset+11]]+byteToHex[arr[offset+12]]+byteToHex[arr[offset+13]]+byteToHex[arr[offset+14]]+byteToHex[arr[offset+15]]).toLowerCase();}const rnds8=new Uint8Array(16);function rng(){return crypto.getRandomValues(rnds8);}function v4(options,buf,offset){if(crypto.randomUUID){return crypto.randomUUID();}return _v4(options);}function _v4(options,buf,offset){
|
|
39312
|
+
$({target:'Array',proto:true,forced:FORCED},{sort:function sort(comparefn){if(comparefn!==undefined)aCallable(comparefn);var array=toObject(this);if(STABLE_SORT)return comparefn===undefined?nativeSort(array):nativeSort(array,comparefn);var items=[];var arrayLength=lengthOfArrayLike(array);var itemsLength,index;for(index=0;index<arrayLength;index++){if(index in array)push(items,array[index]);}internalSort(items,getSortCompare(comparefn));itemsLength=lengthOfArrayLike(items);index=0;while(index<itemsLength)array[index]=items[index++];while(index<arrayLength)deletePropertyOrThrow(array,index++);return array;}});return es_array_sort;}var sort$3;var hasRequiredSort$3;function requireSort$3(){if(hasRequiredSort$3)return sort$3;hasRequiredSort$3=1;requireEs_array_sort();var getBuiltInPrototypeMethod=/*@__PURE__*/requireGetBuiltInPrototypeMethod();sort$3=getBuiltInPrototypeMethod('Array','sort');return sort$3;}var sort$2;var hasRequiredSort$2;function requireSort$2(){if(hasRequiredSort$2)return sort$2;hasRequiredSort$2=1;var isPrototypeOf=/*@__PURE__*/requireObjectIsPrototypeOf();var method=/*@__PURE__*/requireSort$3();var ArrayPrototype=Array.prototype;sort$2=function(it){var own=it.sort;return it===ArrayPrototype||isPrototypeOf(ArrayPrototype,it)&&own===ArrayPrototype.sort?method:own;};return sort$2;}var sort$1;var hasRequiredSort$1;function requireSort$1(){if(hasRequiredSort$1)return sort$1;hasRequiredSort$1=1;var parent=/*@__PURE__*/requireSort$2();sort$1=parent;return sort$1;}var sort;var hasRequiredSort;function requireSort(){if(hasRequiredSort)return sort;hasRequiredSort=1;sort=/*@__PURE__*/requireSort$1();return sort;}var sortExports=requireSort();var _sortInstanceProperty=/*@__PURE__*/getDefaultExportFromCjs(sortExports);var keys$3;var hasRequiredKeys$3;function requireKeys$3(){if(hasRequiredKeys$3)return keys$3;hasRequiredKeys$3=1;requireEs_array_iterator();var getBuiltInPrototypeMethod=/*@__PURE__*/requireGetBuiltInPrototypeMethod();keys$3=getBuiltInPrototypeMethod('Array','keys');return keys$3;}var keys$2;var hasRequiredKeys$2;function requireKeys$2(){if(hasRequiredKeys$2)return keys$2;hasRequiredKeys$2=1;var parent=/*@__PURE__*/requireKeys$3();keys$2=parent;return keys$2;}var keys$1;var hasRequiredKeys$1;function requireKeys$1(){if(hasRequiredKeys$1)return keys$1;hasRequiredKeys$1=1;requireWeb_domCollections_iterator();var classof=/*@__PURE__*/requireClassof();var hasOwn=/*@__PURE__*/requireHasOwnProperty();var isPrototypeOf=/*@__PURE__*/requireObjectIsPrototypeOf();var method=/*@__PURE__*/requireKeys$2();var ArrayPrototype=Array.prototype;var DOMIterables={DOMTokenList:true,NodeList:true};keys$1=function(it){var own=it.keys;return it===ArrayPrototype||isPrototypeOf(ArrayPrototype,it)&&own===ArrayPrototype.keys||hasOwn(DOMIterables,classof(it))?method:own;};return keys$1;}var keys;var hasRequiredKeys;function requireKeys(){if(hasRequiredKeys)return keys;hasRequiredKeys=1;keys=/*@__PURE__*/requireKeys$1();return keys;}var keysExports=requireKeys();var _keysInstanceProperty=/*@__PURE__*/getDefaultExportFromCjs(keysExports);var values$3;var hasRequiredValues$3;function requireValues$3(){if(hasRequiredValues$3)return values$3;hasRequiredValues$3=1;requireEs_array_iterator();var getBuiltInPrototypeMethod=/*@__PURE__*/requireGetBuiltInPrototypeMethod();values$3=getBuiltInPrototypeMethod('Array','values');return values$3;}var values$2;var hasRequiredValues$2;function requireValues$2(){if(hasRequiredValues$2)return values$2;hasRequiredValues$2=1;var parent=/*@__PURE__*/requireValues$3();values$2=parent;return values$2;}var values$1;var hasRequiredValues$1;function requireValues$1(){if(hasRequiredValues$1)return values$1;hasRequiredValues$1=1;requireWeb_domCollections_iterator();var classof=/*@__PURE__*/requireClassof();var hasOwn=/*@__PURE__*/requireHasOwnProperty();var isPrototypeOf=/*@__PURE__*/requireObjectIsPrototypeOf();var method=/*@__PURE__*/requireValues$2();var ArrayPrototype=Array.prototype;var DOMIterables={DOMTokenList:true,NodeList:true};values$1=function(it){var own=it.values;return it===ArrayPrototype||isPrototypeOf(ArrayPrototype,it)&&own===ArrayPrototype.values||hasOwn(DOMIterables,classof(it))?method:own;};return values$1;}var values;var hasRequiredValues;function requireValues(){if(hasRequiredValues)return values;hasRequiredValues=1;values=/*@__PURE__*/requireValues$1();return values;}var valuesExports=requireValues();var _valuesInstanceProperty=/*@__PURE__*/getDefaultExportFromCjs(valuesExports);var entries$3;var hasRequiredEntries$3;function requireEntries$3(){if(hasRequiredEntries$3)return entries$3;hasRequiredEntries$3=1;requireEs_array_iterator();var getBuiltInPrototypeMethod=/*@__PURE__*/requireGetBuiltInPrototypeMethod();entries$3=getBuiltInPrototypeMethod('Array','entries');return entries$3;}var entries$2;var hasRequiredEntries$2;function requireEntries$2(){if(hasRequiredEntries$2)return entries$2;hasRequiredEntries$2=1;var parent=/*@__PURE__*/requireEntries$3();entries$2=parent;return entries$2;}var entries$1;var hasRequiredEntries$1;function requireEntries$1(){if(hasRequiredEntries$1)return entries$1;hasRequiredEntries$1=1;requireWeb_domCollections_iterator();var classof=/*@__PURE__*/requireClassof();var hasOwn=/*@__PURE__*/requireHasOwnProperty();var isPrototypeOf=/*@__PURE__*/requireObjectIsPrototypeOf();var method=/*@__PURE__*/requireEntries$2();var ArrayPrototype=Array.prototype;var DOMIterables={DOMTokenList:true,NodeList:true};entries$1=function(it){var own=it.entries;return it===ArrayPrototype||isPrototypeOf(ArrayPrototype,it)&&own===ArrayPrototype.entries||hasOwn(DOMIterables,classof(it))?method:own;};return entries$1;}var entries;var hasRequiredEntries;function requireEntries(){if(hasRequiredEntries)return entries;hasRequiredEntries=1;entries=/*@__PURE__*/requireEntries$1();return entries;}var entriesExports=requireEntries();var _entriesInstanceProperty=/*@__PURE__*/getDefaultExportFromCjs(entriesExports);var defineProperty;var hasRequiredDefineProperty;function requireDefineProperty(){if(hasRequiredDefineProperty)return defineProperty;hasRequiredDefineProperty=1;defineProperty=/*@__PURE__*/requireDefineProperty$4();return defineProperty;}var definePropertyExports=requireDefineProperty();var _Object$defineProperty=/*@__PURE__*/getDefaultExportFromCjs(definePropertyExports);const byteToHex=[];for(let i=0;i<256;++i){byteToHex.push((i+0x100).toString(16).slice(1));}function unsafeStringify(arr,offset=0){return (byteToHex[arr[offset+0]]+byteToHex[arr[offset+1]]+byteToHex[arr[offset+2]]+byteToHex[arr[offset+3]]+'-'+byteToHex[arr[offset+4]]+byteToHex[arr[offset+5]]+'-'+byteToHex[arr[offset+6]]+byteToHex[arr[offset+7]]+'-'+byteToHex[arr[offset+8]]+byteToHex[arr[offset+9]]+'-'+byteToHex[arr[offset+10]]+byteToHex[arr[offset+11]]+byteToHex[arr[offset+12]]+byteToHex[arr[offset+13]]+byteToHex[arr[offset+14]]+byteToHex[arr[offset+15]]).toLowerCase();}const rnds8=new Uint8Array(16);function rng(){return crypto.getRandomValues(rnds8);}function v4(options,buf,offset){if(crypto.randomUUID){return crypto.randomUUID();}return _v4(options);}function _v4(options,buf,offset){options=options||{};const rnds=options.random??options.rng?.()??rng();if(rnds.length<16){throw new Error('Random bytes length must be >= 16');}rnds[6]=rnds[6]&0x0f|0x40;rnds[8]=rnds[8]&0x3f|0x80;return unsafeStringify(rnds);}function ownKeys$4(e,r){var t=_Object$keys(e);if(_Object$getOwnPropertySymbols){var o=_Object$getOwnPropertySymbols(e);r&&(o=_filterInstanceProperty(o).call(o,function(r){return _Object$getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread$4(e){for(var r=1;r<arguments.length;r++){var _context21,_context22;var t=null!=arguments[r]?arguments[r]:{};r%2?_forEachInstanceProperty(_context21=ownKeys$4(Object(t),true)).call(_context21,function(r){_defineProperty(e,r,t[r]);}):_Object$getOwnPropertyDescriptors?_Object$defineProperties(e,_Object$getOwnPropertyDescriptors(t)):_forEachInstanceProperty(_context22=ownKeys$4(Object(t))).call(_context22,function(r){_Object$defineProperty(e,r,_Object$getOwnPropertyDescriptor(t,r));});}return e;}/**
|
|
39458
39313
|
* Determine whether a value can be used as an id.
|
|
39459
39314
|
* @param value - Input value of unknown type.
|
|
39460
39315
|
* @returns True if the value is valid id, false otherwise.
|
|
@@ -44582,8 +44437,7 @@ class BaseNetworkGraph extends i$4 {
|
|
|
44582
44437
|
* This handles the case where empty state was rendered initially.
|
|
44583
44438
|
*/
|
|
44584
44439
|
_tryAttachContainer() {
|
|
44585
|
-
|
|
44586
|
-
const container = (_this$shadowRoot = this.shadowRoot) === null || _this$shadowRoot === void 0 ? void 0 : _this$shadowRoot.querySelector(".graph-container");
|
|
44440
|
+
const container = this.shadowRoot?.querySelector(".graph-container");
|
|
44587
44441
|
if (container) {
|
|
44588
44442
|
this._container = container;
|
|
44589
44443
|
this._resizeObserver = new ResizeObserver(entries => {
|
|
@@ -44610,8 +44464,7 @@ class BaseNetworkGraph extends i$4 {
|
|
|
44610
44464
|
}, 100);
|
|
44611
44465
|
}
|
|
44612
44466
|
firstUpdated() {
|
|
44613
|
-
|
|
44614
|
-
this._container = (_this$shadowRoot2 = this.shadowRoot) === null || _this$shadowRoot2 === void 0 ? void 0 : _this$shadowRoot2.querySelector(".graph-container");
|
|
44467
|
+
this._container = this.shadowRoot?.querySelector(".graph-container");
|
|
44615
44468
|
if (this._container) {
|
|
44616
44469
|
this._resizeObserver = new ResizeObserver(entries => {
|
|
44617
44470
|
const entry = entries[0];
|
|
@@ -44650,17 +44503,16 @@ class BaseNetworkGraph extends i$4 {
|
|
|
44650
44503
|
});
|
|
44651
44504
|
}
|
|
44652
44505
|
disconnectedCallback() {
|
|
44653
|
-
var _this$_resizeObserver, _this$_themeUnsubscri, _this$_nodesDataSet, _this$_edgesDataSet, _this$_network;
|
|
44654
44506
|
super.disconnectedCallback();
|
|
44655
|
-
|
|
44656
|
-
|
|
44507
|
+
this._resizeObserver?.disconnect();
|
|
44508
|
+
this._themeUnsubscribe?.();
|
|
44657
44509
|
this._cancelAutoFreezeTimer();
|
|
44658
44510
|
if (this._updateDebounceTimer) {
|
|
44659
44511
|
clearTimeout(this._updateDebounceTimer);
|
|
44660
44512
|
}
|
|
44661
|
-
|
|
44662
|
-
|
|
44663
|
-
|
|
44513
|
+
this._nodesDataSet?.clear();
|
|
44514
|
+
this._edgesDataSet?.clear();
|
|
44515
|
+
this._network?.destroy();
|
|
44664
44516
|
this._network = void 0;
|
|
44665
44517
|
this._nodesDataSet = void 0;
|
|
44666
44518
|
this._edgesDataSet = void 0;
|
|
@@ -44722,8 +44574,7 @@ class BaseNetworkGraph extends i$4 {
|
|
|
44722
44574
|
});
|
|
44723
44575
|
this._network.on("stabilizationIterationsDone", () => {
|
|
44724
44576
|
if (!this._initialFitDone) {
|
|
44725
|
-
|
|
44726
|
-
(_this$_network2 = this._network) === null || _this$_network2 === void 0 || _this$_network2.fit({
|
|
44577
|
+
this._network?.fit({
|
|
44727
44578
|
animation: {
|
|
44728
44579
|
duration: 500,
|
|
44729
44580
|
easingFunction: "easeInOutQuad"
|
|
@@ -44745,8 +44596,7 @@ class BaseNetworkGraph extends i$4 {
|
|
|
44745
44596
|
* Fits all nodes into view.
|
|
44746
44597
|
*/
|
|
44747
44598
|
fit() {
|
|
44748
|
-
|
|
44749
|
-
(_this$_network3 = this._network) === null || _this$_network3 === void 0 || _this$_network3.fit({
|
|
44599
|
+
this._network?.fit({
|
|
44750
44600
|
animation: {
|
|
44751
44601
|
duration: 300,
|
|
44752
44602
|
easingFunction: "easeInOutQuad"
|
|
@@ -44794,13 +44644,12 @@ class BaseNetworkGraph extends i$4 {
|
|
|
44794
44644
|
* @param isManual If true, cancels any pending auto-freeze (user manually toggled)
|
|
44795
44645
|
*/
|
|
44796
44646
|
setPhysicsEnabled(enabled, isManual = true) {
|
|
44797
|
-
var _this$_network4;
|
|
44798
44647
|
if (isManual) {
|
|
44799
44648
|
this._cancelAutoFreezeTimer();
|
|
44800
44649
|
this._autoFreezeApplied = true;
|
|
44801
44650
|
}
|
|
44802
44651
|
this._physicsEnabled = enabled;
|
|
44803
|
-
|
|
44652
|
+
this._network?.setOptions({
|
|
44804
44653
|
physics: {
|
|
44805
44654
|
enabled
|
|
44806
44655
|
}
|
|
@@ -44883,8 +44732,8 @@ class BaseNetworkGraph extends i$4 {
|
|
|
44883
44732
|
const edgeId = String(edge.id);
|
|
44884
44733
|
if (!this._originalEdgeColors.has(edgeId)) {
|
|
44885
44734
|
const colorObj = edge.color;
|
|
44886
|
-
const color =
|
|
44887
|
-
const highlight =
|
|
44735
|
+
const color = colorObj?.color ?? getCssVar("--graph-node-fallback", "#999999");
|
|
44736
|
+
const highlight = colorObj?.highlight ?? color;
|
|
44888
44737
|
this._originalEdgeColors.set(edgeId, {
|
|
44889
44738
|
color,
|
|
44890
44739
|
highlight
|
|
@@ -45184,8 +45033,8 @@ let ThreadGraph = class extends BaseNetworkGraph {
|
|
|
45184
45033
|
${device.networkName}` : "";
|
|
45185
45034
|
const label = `${top}${suffix}`;
|
|
45186
45035
|
const decodedState = decodeMeshcopStateBitmap(device.stateBitmapHex);
|
|
45187
|
-
const isLeader =
|
|
45188
|
-
const isPrimaryBbr =
|
|
45036
|
+
const isLeader = decodedState?.threadRoleValue === 3;
|
|
45037
|
+
const isPrimaryBbr = decodedState?.bbr === true && decodedState.bbrFunction === "primary";
|
|
45189
45038
|
graphNodes.push({
|
|
45190
45039
|
id: device.id,
|
|
45191
45040
|
label,
|
|
@@ -45222,7 +45071,7 @@ ${device.networkName}` : "";
|
|
|
45222
45071
|
const isToUnknown = toId.startsWith("unknown_") || toId.startsWith("br_");
|
|
45223
45072
|
const fromNode = this.nodes[fromId];
|
|
45224
45073
|
const toNode = this.nodes[toId];
|
|
45225
|
-
const hasOfflineEndpoint =
|
|
45074
|
+
const hasOfflineEndpoint = fromNode?.available === false || toNode?.available === false;
|
|
45226
45075
|
let filterHidden = false;
|
|
45227
45076
|
if (hiddenNodeIds.has(fromId) || hiddenNodeIds.has(toId)) {
|
|
45228
45077
|
filterHidden = true;
|
|
@@ -45368,11 +45217,11 @@ ${device.networkName}` : "";
|
|
|
45368
45217
|
connectedNodeIds.add(remoteId);
|
|
45369
45218
|
if (reportingId !== nodeIdStr) {
|
|
45370
45219
|
const pairEdges = edge.pairKey ? edgesByPair.get(edge.pairKey) : void 0;
|
|
45371
|
-
const swapCandidate = pairEdges
|
|
45220
|
+
const swapCandidate = pairEdges?.find(e => {
|
|
45372
45221
|
const rid = String(e.reportingNodeId ?? e.from);
|
|
45373
45222
|
if (rid !== nodeIdStr) return false;
|
|
45374
45223
|
const bs = this._edgeBaseState.get(e.id);
|
|
45375
|
-
return
|
|
45224
|
+
return bs?.hiddenReason === "dedup";
|
|
45376
45225
|
});
|
|
45377
45226
|
if (swapCandidate) {
|
|
45378
45227
|
const swapBaseState = this._edgeBaseState.get(swapCandidate.id);
|
|
@@ -45487,10 +45336,10 @@ ${device.networkName}` : "";
|
|
|
45487
45336
|
return;
|
|
45488
45337
|
}
|
|
45489
45338
|
const external = this._unknownDevicesMapCache.get(nodeId);
|
|
45490
|
-
if (
|
|
45339
|
+
if (external?.kind === "br") {
|
|
45491
45340
|
const decodedState = decodeMeshcopStateBitmap(external.stateBitmapHex);
|
|
45492
|
-
const isLeader =
|
|
45493
|
-
const isPrimaryBbr =
|
|
45341
|
+
const isLeader = decodedState?.threadRoleValue === 3;
|
|
45342
|
+
const isPrimaryBbr = decodedState?.bbr === true && decodedState.bbrFunction === "primary";
|
|
45494
45343
|
this._nodesDataSet.update({
|
|
45495
45344
|
id: nodeId,
|
|
45496
45345
|
image: createBorderRouterIconDataUrl(isHighlighted, isLeader, isPrimaryBbr)
|
|
@@ -45498,7 +45347,7 @@ ${device.networkName}` : "";
|
|
|
45498
45347
|
} else if (nodeId.startsWith("unknown_") || nodeId.startsWith("br_")) {
|
|
45499
45348
|
this._nodesDataSet.update({
|
|
45500
45349
|
id: nodeId,
|
|
45501
|
-
image: createUnknownDeviceIconDataUrl(
|
|
45350
|
+
image: createUnknownDeviceIconDataUrl(external?.isRouter ?? false, isHighlighted)
|
|
45502
45351
|
});
|
|
45503
45352
|
}
|
|
45504
45353
|
}
|
|
@@ -45835,7 +45684,7 @@ let MatterNetworkView = class extends i$4 {
|
|
|
45835
45684
|
*/
|
|
45836
45685
|
_selectNodeWhenReady(nodeId, retries = 10) {
|
|
45837
45686
|
const graph = this.networkType === "thread" ? this._threadGraph : this._wifiGraph;
|
|
45838
|
-
if (graph
|
|
45687
|
+
if (graph?.isReady()) {
|
|
45839
45688
|
graph.selectNode(nodeId);
|
|
45840
45689
|
} else if (retries > 0) {
|
|
45841
45690
|
this._selectRetryTimer = setTimeout(() => this._selectNodeWhenReady(nodeId, retries - 1), 100);
|
|
@@ -45847,49 +45696,39 @@ let MatterNetworkView = class extends i$4 {
|
|
|
45847
45696
|
_handleDetailsClose() {
|
|
45848
45697
|
this._selectedNodeId = null;
|
|
45849
45698
|
if (this.networkType === "thread") {
|
|
45850
|
-
|
|
45851
|
-
(_this$_threadGraph = this._threadGraph) === null || _this$_threadGraph === void 0 || _this$_threadGraph.deselectAll();
|
|
45699
|
+
this._threadGraph?.deselectAll();
|
|
45852
45700
|
} else {
|
|
45853
|
-
|
|
45854
|
-
(_this$_wifiGraph = this._wifiGraph) === null || _this$_wifiGraph === void 0 || _this$_wifiGraph.deselectAll();
|
|
45701
|
+
this._wifiGraph?.deselectAll();
|
|
45855
45702
|
}
|
|
45856
45703
|
}
|
|
45857
45704
|
_handleSelectNode(event) {
|
|
45858
45705
|
const nodeId = event.detail.nodeId;
|
|
45859
45706
|
this._selectedNodeId = nodeId;
|
|
45860
45707
|
if (this.networkType === "thread") {
|
|
45861
|
-
|
|
45862
|
-
(_this$_threadGraph2 = this._threadGraph) === null || _this$_threadGraph2 === void 0 || _this$_threadGraph2.selectNode(nodeId);
|
|
45708
|
+
this._threadGraph?.selectNode(nodeId);
|
|
45863
45709
|
} else {
|
|
45864
|
-
|
|
45865
|
-
(_this$_wifiGraph2 = this._wifiGraph) === null || _this$_wifiGraph2 === void 0 || _this$_wifiGraph2.selectNode(nodeId);
|
|
45710
|
+
this._wifiGraph?.selectNode(nodeId);
|
|
45866
45711
|
}
|
|
45867
45712
|
}
|
|
45868
45713
|
_handleFitToScreen() {
|
|
45869
45714
|
if (this.networkType === "thread") {
|
|
45870
|
-
|
|
45871
|
-
(_this$_threadGraph3 = this._threadGraph) === null || _this$_threadGraph3 === void 0 || _this$_threadGraph3.fit();
|
|
45715
|
+
this._threadGraph?.fit();
|
|
45872
45716
|
} else {
|
|
45873
|
-
|
|
45874
|
-
(_this$_wifiGraph3 = this._wifiGraph) === null || _this$_wifiGraph3 === void 0 || _this$_wifiGraph3.fit();
|
|
45717
|
+
this._wifiGraph?.fit();
|
|
45875
45718
|
}
|
|
45876
45719
|
}
|
|
45877
45720
|
_handleZoomIn() {
|
|
45878
45721
|
if (this.networkType === "thread") {
|
|
45879
|
-
|
|
45880
|
-
(_this$_threadGraph4 = this._threadGraph) === null || _this$_threadGraph4 === void 0 || _this$_threadGraph4.zoomIn();
|
|
45722
|
+
this._threadGraph?.zoomIn();
|
|
45881
45723
|
} else {
|
|
45882
|
-
|
|
45883
|
-
(_this$_wifiGraph4 = this._wifiGraph) === null || _this$_wifiGraph4 === void 0 || _this$_wifiGraph4.zoomIn();
|
|
45724
|
+
this._wifiGraph?.zoomIn();
|
|
45884
45725
|
}
|
|
45885
45726
|
}
|
|
45886
45727
|
_handleZoomOut() {
|
|
45887
45728
|
if (this.networkType === "thread") {
|
|
45888
|
-
|
|
45889
|
-
(_this$_threadGraph5 = this._threadGraph) === null || _this$_threadGraph5 === void 0 || _this$_threadGraph5.zoomOut();
|
|
45729
|
+
this._threadGraph?.zoomOut();
|
|
45890
45730
|
} else {
|
|
45891
|
-
|
|
45892
|
-
(_this$_wifiGraph5 = this._wifiGraph) === null || _this$_wifiGraph5 === void 0 || _this$_wifiGraph5.zoomOut();
|
|
45731
|
+
this._wifiGraph?.zoomOut();
|
|
45893
45732
|
}
|
|
45894
45733
|
}
|
|
45895
45734
|
_handleToggleHideMenu() {
|
|
@@ -45902,17 +45741,15 @@ let MatterNetworkView = class extends i$4 {
|
|
|
45902
45741
|
return HIDE_OPTIONS.some(option => this[option.key]);
|
|
45903
45742
|
}
|
|
45904
45743
|
_handleTogglePhysics() {
|
|
45905
|
-
var _this$_threadGraph6, _this$_wifiGraph6;
|
|
45906
45744
|
const newState = !this._physicsEnabled;
|
|
45907
45745
|
this._physicsEnabled = newState;
|
|
45908
|
-
|
|
45909
|
-
|
|
45746
|
+
this._threadGraph?.setPhysicsEnabled(newState);
|
|
45747
|
+
this._wifiGraph?.setPhysicsEnabled(newState);
|
|
45910
45748
|
}
|
|
45911
45749
|
_handlePhysicsChanged(event) {
|
|
45912
|
-
var _this$_threadGraph7, _this$_wifiGraph7;
|
|
45913
45750
|
this._physicsEnabled = event.detail.enabled;
|
|
45914
|
-
|
|
45915
|
-
|
|
45751
|
+
this._threadGraph?.setPhysicsEnabled(event.detail.enabled);
|
|
45752
|
+
this._wifiGraph?.setPhysicsEnabled(event.detail.enabled);
|
|
45916
45753
|
}
|
|
45917
45754
|
_handleThreadAddressSearchInput(event) {
|
|
45918
45755
|
this._threadAddressSearch = event.target.value;
|
|
@@ -45929,7 +45766,7 @@ let MatterNetworkView = class extends i$4 {
|
|
|
45929
45766
|
}
|
|
45930
45767
|
_searchThreadAddressWhenReady(searchValue, retries = 10) {
|
|
45931
45768
|
const graph = this._threadGraph;
|
|
45932
|
-
if (!
|
|
45769
|
+
if (!graph?.isReady()) {
|
|
45933
45770
|
if (retries > 0) {
|
|
45934
45771
|
this._selectRetryTimer = setTimeout(() => this._searchThreadAddressWhenReady(searchValue, retries - 1), 100);
|
|
45935
45772
|
} else {
|
|
@@ -46056,11 +45893,10 @@ let MatterNetworkView = class extends i$4 {
|
|
|
46056
45893
|
`;
|
|
46057
45894
|
}
|
|
46058
45895
|
render() {
|
|
46059
|
-
var _this$_threadGraph8, _this$_wifiGraph8, _this$_threadGraph9;
|
|
46060
45896
|
const showSidebar = this._selectedNodeId !== null;
|
|
46061
|
-
const unknownDevices =
|
|
46062
|
-
const wifiAccessPoints =
|
|
46063
|
-
const threadEdgePairs =
|
|
45897
|
+
const unknownDevices = this._threadGraph?.unknownDevicesMap ?? /* @__PURE__ */new Map();
|
|
45898
|
+
const wifiAccessPoints = this._wifiGraph?.wifiAccessPointsMap ?? /* @__PURE__ */new Map();
|
|
45899
|
+
const threadEdgePairs = this._threadGraph?.edgePairs ?? /* @__PURE__ */new Map();
|
|
46064
45900
|
return b`
|
|
46065
45901
|
<dashboard-header
|
|
46066
45902
|
title="Open Home Foundation Matter Server"
|
|
@@ -46419,7 +46255,6 @@ let MatterNodeView = class extends i$4 {
|
|
|
46419
46255
|
this._tick = 0;
|
|
46420
46256
|
}
|
|
46421
46257
|
render() {
|
|
46422
|
-
var _this$node;
|
|
46423
46258
|
if (!this.node) {
|
|
46424
46259
|
return b`
|
|
46425
46260
|
<dashboard-header title="Node not found" backButton="#"></dashboard-header>
|
|
@@ -46462,7 +46297,7 @@ let MatterNodeView = class extends i$4 {
|
|
|
46462
46297
|
<b>Endpoints</b>
|
|
46463
46298
|
</div>
|
|
46464
46299
|
</md-list-item>
|
|
46465
|
-
${i([this.node,
|
|
46300
|
+
${i([this.node, this.node?.attributes], () => getUniqueEndpoints(this.node).map(endPointId => {
|
|
46466
46301
|
return b`
|
|
46467
46302
|
<md-list-item type="link" href=${`#node/${this.node.node_id}/${endPointId}`}>
|
|
46468
46303
|
<ha-svg-icon
|
|
@@ -46606,10 +46441,9 @@ MatterNodeView = __decorateClass$3([t$1("matter-node-view")], MatterNodeView);
|
|
|
46606
46441
|
* SPDX-License-Identifier: Apache-2.0
|
|
46607
46442
|
*/
|
|
46608
46443
|
const showCommissionNodeDialog = async () => {
|
|
46609
|
-
|
|
46610
|
-
await import('./commission-node-dialog-nVZp3go0.js');
|
|
46444
|
+
await import('./commission-node-dialog-CIrtUBMI.js');
|
|
46611
46445
|
const dialog = document.createElement("commission-node-dialog");
|
|
46612
|
-
|
|
46446
|
+
document.querySelector("matter-dashboard-app")?.renderRoot.appendChild(dialog);
|
|
46613
46447
|
};
|
|
46614
46448
|
|
|
46615
46449
|
var __defProp$2 = Object.defineProperty;
|
|
@@ -46632,8 +46466,7 @@ let ServerDetails = class extends i$4 {
|
|
|
46632
46466
|
reader.readAsText(selectedFile, "UTF-8");
|
|
46633
46467
|
reader.onload = async () => {
|
|
46634
46468
|
try {
|
|
46635
|
-
|
|
46636
|
-
await ((_this$client = this.client) === null || _this$client === void 0 ? void 0 : _this$client.importTestNode(((_reader$result = reader.result) === null || _reader$result === void 0 ? void 0 : _reader$result.toString()) ?? ""));
|
|
46469
|
+
await this.client?.importTestNode(reader.result?.toString() ?? "");
|
|
46637
46470
|
} catch (err) {
|
|
46638
46471
|
showAlertDialog({
|
|
46639
46472
|
title: "Failed to import test node",
|
|
@@ -46992,8 +46825,7 @@ let MatterDashboardApp = class extends i$4 {
|
|
|
46992
46825
|
* Get device counts for Thread and WiFi networks.
|
|
46993
46826
|
*/
|
|
46994
46827
|
_getDeviceCounts() {
|
|
46995
|
-
|
|
46996
|
-
if (!((_this$client = this.client) !== null && _this$client !== void 0 && _this$client.nodes)) {
|
|
46828
|
+
if (!this.client?.nodes) {
|
|
46997
46829
|
return {
|
|
46998
46830
|
hasThreadDevices: false,
|
|
46999
46831
|
hasWifiDevices: false
|