@camstack/addon-import-alexa 0.2.155 → 0.2.156
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/CHANGELOG.md +6 -0
- package/dist/{MotionZonesSettings-BAg3ARov.mjs → MotionZonesSettings-Dyw_F0Ju.mjs} +2 -2
- package/dist/{PrivacyMaskSettings-C0cYJFNC.mjs → PrivacyMaskSettings-C9KxtiCR.mjs} +4 -4
- package/dist/{SceneMonitorEditor-BL8xJKp6.mjs → SceneMonitorEditor-DjpiE85o.mjs} +3 -3
- package/dist/_stub.js +494 -524
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_import_alexa_page-DIPd9Gv5.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_import_alexa_page-CUA1yb0b.mjs} +3 -3
- package/dist/_virtual_mf___mfe_internal__addon_import_alexa_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-AHN4fFeN.mjs +26 -0
- package/dist/addon-import-alexa.css +1 -1
- package/dist/addon.js +32 -7
- package/dist/addon.mjs +32 -7
- package/dist/{hostInit-M4qqEmdk.mjs → hostInit-CNFwYsQP.mjs} +2 -2
- package/dist/{player-overlays-COWyo9kN.mjs → player-overlays-CCqJsHN5.mjs} +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-CLpz8rKp.mjs → responsive-B5IteB4F.mjs} +1 -1
- package/dist/{scene-monitor-copy-ciy3zaiU.mjs → scene-monitor-copy-BerJ-ceE.mjs} +1 -1
- package/dist/{square-YnF15tkM.mjs → square-DSKSvnQQ.mjs} +1 -1
- package/dist/{trash-2-dnzK3zvI.mjs → trash-2-BRgPXKlX.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_import_alexa_page__remoteEntry_js-FpscgjXK.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_import_alexa_page__remoteEntry_js-DIl5ZN8E.mjs} +1 -1
- package/package.json +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_import_alexa_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BU5ExEvB.mjs +0 -26
package/dist/_stub.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { S as e, _ as t, a as n, b as r, d as i, f as a, g as o, h as s, i as c, l, m as u, n as d, p as f, t as p, u as m, v as h, y as g } from "./_virtual_mf___mfe_internal__addon_import_alexa_page__loadShare__react__loadShare__.js-DwXXYAlk.mjs";
|
|
2
2
|
import { n as _, r as v, t as y } from "./_virtual_mf___mfe_internal__addon_import_alexa_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-CUiVYNMY.mjs";
|
|
3
3
|
import { n as b, r as x } from "./ui-text-B5YO4hoJ.mjs";
|
|
4
|
-
import { C as S, S as C, T as w, _ as T, a as ee, b as te, d as ne, f as re, g as ie, h as ae, i as oe, l as se, m as ce, n as le, o as E, p as ue, r as de, s as fe, t as pe, u as me, v as he, w as D, x as ge, y as _e } from "./_virtual_mf___mfe_internal__addon_import_alexa_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-
|
|
5
|
-
import { a as ve, c as ye, d as be, f as xe, h as O, i as Se, m as Ce, n as we, o as Te, r as Ee, t as De, u as Oe } from "./responsive-
|
|
6
|
-
import { d as ke, f as Ae, u as je } from "./scene-monitor-copy-
|
|
7
|
-
import { r as Me } from "./player-overlays-
|
|
8
|
-
import { r as Ne, t as Pe } from "./square-
|
|
9
|
-
import "./trash-2-
|
|
4
|
+
import { C as S, S as C, T as w, _ as T, a as ee, b as te, d as ne, f as re, g as ie, h as ae, i as oe, l as se, m as ce, n as le, o as E, p as ue, r as de, s as fe, t as pe, u as me, v as he, w as D, x as ge, y as _e } from "./_virtual_mf___mfe_internal__addon_import_alexa_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-AHN4fFeN.mjs";
|
|
5
|
+
import { a as ve, c as ye, d as be, f as xe, h as O, i as Se, m as Ce, n as we, o as Te, r as Ee, t as De, u as Oe } from "./responsive-B5IteB4F.mjs";
|
|
6
|
+
import { d as ke, f as Ae, u as je } from "./scene-monitor-copy-BerJ-ceE.mjs";
|
|
7
|
+
import { r as Me } from "./player-overlays-CCqJsHN5.mjs";
|
|
8
|
+
import { r as Ne, t as Pe } from "./square-DSKSvnQQ.mjs";
|
|
9
|
+
import "./trash-2-BRgPXKlX.mjs";
|
|
10
10
|
import { t as Fe } from "./_virtual_mf___mfe_internal__addon_import_alexa_page__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.js-B3qxfxBT.mjs";
|
|
11
11
|
import "./_virtual_mf___mfe_internal__addon_import_alexa_page__loadShare__react_mf_2_dom__loadShare__.js-CIPmAyPi.mjs";
|
|
12
12
|
import "./_virtual_mf___mfe_internal__addon_import_alexa_page__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-Bct5qZia.mjs";
|
|
13
|
-
import "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_import_alexa_page__remoteEntry_js-
|
|
13
|
+
import "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_import_alexa_page__remoteEntry_js-DIl5ZN8E.mjs";
|
|
14
14
|
import "./_virtual_mf___mfe_internal__addon_import_alexa_page__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-tXm1x5EZ.mjs";
|
|
15
15
|
import "./_virtual_mf___mfe_internal__addon_import_alexa_page__loadShare___mf_0_trpc_mf_1_client__loadShare__.js-BHqOw8oh.mjs";
|
|
16
16
|
import "./_virtual_mf___mfe_internal__addon_import_alexa_page__loadShare___mf_0_camstack_mf_1_sdk__loadShare__.js-BmoaT3cr.mjs";
|
|
@@ -28924,7 +28924,7 @@ function M_({ className: e, ...t }) {
|
|
|
28924
28924
|
}
|
|
28925
28925
|
//#endregion
|
|
28926
28926
|
//#region ../../node_modules/qrcode.react/lib/esm/index.js
|
|
28927
|
-
e(), e(), e(), e(), e(), e(), e(), n(() => import("./MotionZonesSettings-
|
|
28927
|
+
e(), e(), e(), e(), e(), e(), e(), n(() => import("./MotionZonesSettings-Dyw_F0Ju.mjs").then((e) => ({ default: e.MotionZonesSettings }))), n(() => import("./PrivacyMaskSettings-C9KxtiCR.mjs").then((e) => ({ default: e.PrivacyMaskSettings }))), e(), e();
|
|
28928
28928
|
var N_ = Object.defineProperty, P_ = Object.getOwnPropertySymbols, F_ = Object.prototype.hasOwnProperty, I_ = Object.prototype.propertyIsEnumerable, L_ = (e, t, n) => t in e ? N_(e, t, {
|
|
28929
28929
|
enumerable: !0,
|
|
28930
28930
|
configurable: !0,
|
|
@@ -32550,7 +32550,7 @@ function px(e) {
|
|
|
32550
32550
|
return t !== void 0 && lx(t, n) ? {
|
|
32551
32551
|
kind: "value",
|
|
32552
32552
|
slice: n
|
|
32553
|
-
} : e.addonId ===
|
|
32553
|
+
} : e.addonId === se && e.snapshotStatus === "success" ? { kind: "quiet" } : { kind: "awaiting" };
|
|
32554
32554
|
}
|
|
32555
32555
|
//#endregion
|
|
32556
32556
|
//#region ../ui-library/src/composites/device-controls/sensor-hero-card.tsx
|
|
@@ -35219,21 +35219,11 @@ function FS({ trpc: e, deviceId: t, deviceName: n }) {
|
|
|
35219
35219
|
//#region ../ui-library/src/composites/device-controls/pet-feeder-panel.tsx
|
|
35220
35220
|
e();
|
|
35221
35221
|
var IS = 20, LS = 9, RS = "#f59e0b", zS = "#ef4444";
|
|
35222
|
-
function BS(e
|
|
35223
|
-
let n = ue({
|
|
35224
|
-
value: t,
|
|
35225
|
-
quantity: "duration"
|
|
35226
|
-
});
|
|
35227
|
-
return e("uiLibrary.petFeeder.desiccant", "{{text}}{{unit}} desiccant", {
|
|
35228
|
-
text: n.text,
|
|
35229
|
-
unit: n.unit
|
|
35230
|
-
});
|
|
35231
|
-
}
|
|
35232
|
-
function VS(e) {
|
|
35222
|
+
function BS(e) {
|
|
35233
35223
|
return Math.min(de, Math.max(oe, e));
|
|
35234
35224
|
}
|
|
35235
|
-
var
|
|
35236
|
-
function
|
|
35225
|
+
var VS = "\n@keyframes pf-eat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(2px)} }\n@keyframes pf-pulse { 0%,100%{opacity:.55} 50%{opacity:1} }\n@media (prefers-reduced-motion: reduce) {\n .pf-eat, .pf-pulse { animation: none !important; }\n}\n";
|
|
35226
|
+
function HS({ trpc: e, deviceId: t, layout: n, optimistic: r }) {
|
|
35237
35227
|
let i = x(), { cap: a, slice: o, available: s } = Z({
|
|
35238
35228
|
trpc: e,
|
|
35239
35229
|
deviceId: t,
|
|
@@ -35256,17 +35246,10 @@ function US({ trpc: e, deviceId: t, layout: n, optimistic: r }) {
|
|
|
35256
35246
|
}),
|
|
35257
35247
|
/* @__PURE__ */ v("span", {
|
|
35258
35248
|
className: N("inline-flex items-center gap-1 text-xs tabular-nums font-medium", c.lowFood ? "text-destructive" : "text-foreground"),
|
|
35259
|
-
children: [
|
|
35260
|
-
|
|
35261
|
-
|
|
35262
|
-
|
|
35263
|
-
}),
|
|
35264
|
-
c.foodLevel ?? "—",
|
|
35265
|
-
/* @__PURE__ */ _("span", {
|
|
35266
|
-
className: "text-foreground-subtle",
|
|
35267
|
-
children: "g"
|
|
35268
|
-
})
|
|
35269
|
-
]
|
|
35249
|
+
children: [/* @__PURE__ */ _(xn, {
|
|
35250
|
+
className: "h-3.5 w-3.5",
|
|
35251
|
+
"aria-hidden": !0
|
|
35252
|
+
}), c.bowlFood ?? "—"]
|
|
35270
35253
|
}),
|
|
35271
35254
|
c.batteryPower !== null && /* @__PURE__ */ v("span", {
|
|
35272
35255
|
className: "inline-flex items-center gap-0.5 text-xs tabular-nums text-foreground-subtle",
|
|
@@ -35295,18 +35278,18 @@ function US({ trpc: e, deviceId: t, layout: n, optimistic: r }) {
|
|
|
35295
35278
|
]
|
|
35296
35279
|
});
|
|
35297
35280
|
let w = (e) => {
|
|
35298
|
-
y || c.feeding || (l({ feeding: !0 }), a.feed({ grams:
|
|
35281
|
+
y || c.feeding || (l({ feeding: !0 }), a.feed({ grams: BS(e) }));
|
|
35299
35282
|
};
|
|
35300
35283
|
return /* @__PURE__ */ v("div", {
|
|
35301
35284
|
className: "relative flex flex-col items-stretch gap-3 overflow-hidden rounded-lg border border-border bg-surface p-4",
|
|
35302
35285
|
children: [
|
|
35303
|
-
/* @__PURE__ */ _("style", { children:
|
|
35286
|
+
/* @__PURE__ */ _("style", { children: VS }),
|
|
35304
35287
|
/* @__PURE__ */ v("div", {
|
|
35305
35288
|
className: "flex items-center gap-4 rounded-lg border border-border/50 bg-surface-subtle/40 p-3",
|
|
35306
|
-
children: [/* @__PURE__ */ _(
|
|
35307
|
-
grams: c.
|
|
35289
|
+
children: [/* @__PURE__ */ _(GS, {
|
|
35290
|
+
grams: c.bowlFood,
|
|
35308
35291
|
low: c.lowFood,
|
|
35309
|
-
eating: c.
|
|
35292
|
+
eating: c.eating
|
|
35310
35293
|
}), /* @__PURE__ */ v("div", {
|
|
35311
35294
|
className: "flex min-w-0 flex-1 flex-col gap-1.5",
|
|
35312
35295
|
children: [/* @__PURE__ */ v("div", {
|
|
@@ -35314,22 +35297,18 @@ function US({ trpc: e, deviceId: t, layout: n, optimistic: r }) {
|
|
|
35314
35297
|
children: [/* @__PURE__ */ _("span", {
|
|
35315
35298
|
className: "text-3xl font-bold leading-none tabular-nums",
|
|
35316
35299
|
style: { color: c.lowFood ? zS : RS },
|
|
35317
|
-
children: c.
|
|
35300
|
+
children: c.bowlFood ?? "—"
|
|
35318
35301
|
}), /* @__PURE__ */ _("span", {
|
|
35319
35302
|
className: "text-sm text-foreground-subtle",
|
|
35320
|
-
children: i("uiLibrary.petFeeder.inBowl", "
|
|
35303
|
+
children: i("uiLibrary.petFeeder.inBowl", "in bowl")
|
|
35321
35304
|
})]
|
|
35322
35305
|
}), /* @__PURE__ */ v("div", {
|
|
35323
35306
|
className: "flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-foreground-subtle",
|
|
35324
35307
|
children: [
|
|
35325
|
-
c.batteryPower !== null && /* @__PURE__ */ _(
|
|
35308
|
+
c.batteryPower !== null && /* @__PURE__ */ _(WS, {
|
|
35326
35309
|
icon: /* @__PURE__ */ _(Ve, { className: "h-3.5 w-3.5" }),
|
|
35327
35310
|
label: `${c.batteryPower}%`
|
|
35328
35311
|
}),
|
|
35329
|
-
c.desiccantLeftDays !== null && /* @__PURE__ */ _(GS, {
|
|
35330
|
-
icon: /* @__PURE__ */ _(kn, { className: "h-3.5 w-3.5" }),
|
|
35331
|
-
label: BS(i, c.desiccantLeftDays)
|
|
35332
|
-
}),
|
|
35333
35312
|
C && /* @__PURE__ */ v("span", {
|
|
35334
35313
|
className: "inline-flex items-center gap-1 font-medium text-amber-500",
|
|
35335
35314
|
children: [/* @__PURE__ */ _(He, {
|
|
@@ -35379,24 +35358,24 @@ function US({ trpc: e, deviceId: t, layout: n, optimistic: r }) {
|
|
|
35379
35358
|
}),
|
|
35380
35359
|
c.isDualHopper ? /* @__PURE__ */ v("div", {
|
|
35381
35360
|
className: "grid grid-cols-2 gap-2",
|
|
35382
|
-
children: [/* @__PURE__ */ _(
|
|
35361
|
+
children: [/* @__PURE__ */ _(KS, {
|
|
35383
35362
|
label: i("uiLibrary.petFeeder.hopper1", "Hopper 1"),
|
|
35384
35363
|
grams: f,
|
|
35385
35364
|
busy: y || c.feeding,
|
|
35386
35365
|
onGrams: p,
|
|
35387
35366
|
onFeed: () => {
|
|
35388
|
-
y || c.feeding || (l({ feeding: !0 }), a.feed({ hopper1:
|
|
35367
|
+
y || c.feeding || (l({ feeding: !0 }), a.feed({ hopper1: BS(f) }));
|
|
35389
35368
|
}
|
|
35390
|
-
}), /* @__PURE__ */ _(
|
|
35369
|
+
}), /* @__PURE__ */ _(KS, {
|
|
35391
35370
|
label: i("uiLibrary.petFeeder.hopper2", "Hopper 2"),
|
|
35392
35371
|
grams: m,
|
|
35393
35372
|
busy: y || c.feeding,
|
|
35394
35373
|
onGrams: g,
|
|
35395
35374
|
onFeed: () => {
|
|
35396
|
-
y || c.feeding || (l({ feeding: !0 }), a.feed({ hopper2:
|
|
35375
|
+
y || c.feeding || (l({ feeding: !0 }), a.feed({ hopper2: BS(m) }));
|
|
35397
35376
|
}
|
|
35398
35377
|
})]
|
|
35399
|
-
}) : /* @__PURE__ */ _(
|
|
35378
|
+
}) : /* @__PURE__ */ _(KS, {
|
|
35400
35379
|
label: i("uiLibrary.petFeeder.manualFeed", "Manual feed"),
|
|
35401
35380
|
grams: u,
|
|
35402
35381
|
busy: y || c.feeding,
|
|
@@ -35404,27 +35383,18 @@ function US({ trpc: e, deviceId: t, layout: n, optimistic: r }) {
|
|
|
35404
35383
|
onFeed: () => w(u)
|
|
35405
35384
|
}),
|
|
35406
35385
|
/* @__PURE__ */ v("div", {
|
|
35407
|
-
className: "grid
|
|
35408
|
-
children: [
|
|
35409
|
-
/* @__PURE__ */ _(
|
|
35410
|
-
|
|
35411
|
-
|
|
35412
|
-
|
|
35413
|
-
|
|
35414
|
-
}),
|
|
35415
|
-
|
|
35416
|
-
|
|
35417
|
-
|
|
35418
|
-
|
|
35419
|
-
onClick: () => void a.resetDesiccant({})
|
|
35420
|
-
}),
|
|
35421
|
-
/* @__PURE__ */ _(YS, {
|
|
35422
|
-
icon: /* @__PURE__ */ _(xn, { className: "h-4 w-4" }),
|
|
35423
|
-
label: i("uiLibrary.petFeeder.markRefilled", "Mark refilled"),
|
|
35424
|
-
busy: y,
|
|
35425
|
-
onClick: () => void a.markFoodReplenished({})
|
|
35426
|
-
})
|
|
35427
|
-
]
|
|
35386
|
+
className: "grid auto-cols-fr grid-flow-col gap-2",
|
|
35387
|
+
children: [/* @__PURE__ */ _(JS, {
|
|
35388
|
+
icon: /* @__PURE__ */ _(Wt, { className: "h-4 w-4" }),
|
|
35389
|
+
label: i("uiLibrary.petFeeder.callPet", "Call pet"),
|
|
35390
|
+
busy: y,
|
|
35391
|
+
onClick: () => void a.callPet({})
|
|
35392
|
+
}), c.supportsMarkRefilled && /* @__PURE__ */ _(JS, {
|
|
35393
|
+
icon: /* @__PURE__ */ _(xn, { className: "h-4 w-4" }),
|
|
35394
|
+
label: i("uiLibrary.petFeeder.markRefilled", "Mark refilled"),
|
|
35395
|
+
busy: y,
|
|
35396
|
+
onClick: () => void a.markFoodReplenished({})
|
|
35397
|
+
})]
|
|
35428
35398
|
}),
|
|
35429
35399
|
c.feeding && /* @__PURE__ */ v("button", {
|
|
35430
35400
|
type: "button",
|
|
@@ -35438,12 +35408,12 @@ function US({ trpc: e, deviceId: t, layout: n, optimistic: r }) {
|
|
|
35438
35408
|
"aria-hidden": !0
|
|
35439
35409
|
}), i("uiLibrary.petFeeder.cancelFeed", "Cancel feed")]
|
|
35440
35410
|
}),
|
|
35441
|
-
/* @__PURE__ */ _(
|
|
35411
|
+
/* @__PURE__ */ _(US, {
|
|
35442
35412
|
label: i("uiLibrary.petFeeder.settings", "Settings"),
|
|
35443
35413
|
children: /* @__PURE__ */ v("div", {
|
|
35444
35414
|
className: "grid grid-cols-3 gap-2",
|
|
35445
35415
|
children: [
|
|
35446
|
-
/* @__PURE__ */ _(
|
|
35416
|
+
/* @__PURE__ */ _(YS, {
|
|
35447
35417
|
icon: /* @__PURE__ */ _(At, { className: "h-4 w-4" }),
|
|
35448
35418
|
label: i("uiLibrary.petFeeder.childLock", "Child lock"),
|
|
35449
35419
|
on: c.childLock,
|
|
@@ -35452,7 +35422,7 @@ function US({ trpc: e, deviceId: t, layout: n, optimistic: r }) {
|
|
|
35452
35422
|
l({ childLock: e }), a.setChildLock({ on: e });
|
|
35453
35423
|
}
|
|
35454
35424
|
}),
|
|
35455
|
-
/* @__PURE__ */ _(
|
|
35425
|
+
/* @__PURE__ */ _(YS, {
|
|
35456
35426
|
icon: /* @__PURE__ */ _(Tt, { className: "h-4 w-4" }),
|
|
35457
35427
|
label: i("uiLibrary.petFeeder.light", "Light"),
|
|
35458
35428
|
on: c.indicatorLight,
|
|
@@ -35461,7 +35431,7 @@ function US({ trpc: e, deviceId: t, layout: n, optimistic: r }) {
|
|
|
35461
35431
|
l({ indicatorLight: e }), a.setIndicatorLight({ on: e });
|
|
35462
35432
|
}
|
|
35463
35433
|
}),
|
|
35464
|
-
/* @__PURE__ */ _(
|
|
35434
|
+
/* @__PURE__ */ _(YS, {
|
|
35465
35435
|
icon: /* @__PURE__ */ _(Ue, { className: "h-4 w-4" }),
|
|
35466
35436
|
label: i("uiLibrary.petFeeder.feedSound", "Feed sound"),
|
|
35467
35437
|
on: c.feedSound,
|
|
@@ -35473,7 +35443,7 @@ function US({ trpc: e, deviceId: t, layout: n, optimistic: r }) {
|
|
|
35473
35443
|
]
|
|
35474
35444
|
})
|
|
35475
35445
|
}),
|
|
35476
|
-
/* @__PURE__ */ _(
|
|
35446
|
+
/* @__PURE__ */ _(US, {
|
|
35477
35447
|
label: i("uiLibrary.petFeeder.volume", "Volume"),
|
|
35478
35448
|
children: /* @__PURE__ */ v("div", {
|
|
35479
35449
|
className: "flex items-center gap-3",
|
|
@@ -35482,7 +35452,7 @@ function US({ trpc: e, deviceId: t, layout: n, optimistic: r }) {
|
|
|
35482
35452
|
className: "h-4 w-4 shrink-0 text-foreground-subtle",
|
|
35483
35453
|
"aria-hidden": !0
|
|
35484
35454
|
}),
|
|
35485
|
-
/* @__PURE__ */ _(
|
|
35455
|
+
/* @__PURE__ */ _(qS, {
|
|
35486
35456
|
label: i("uiLibrary.petFeeder.decreaseVolume", "Decrease volume"),
|
|
35487
35457
|
symbol: "−",
|
|
35488
35458
|
disabled: y || c.volume <= 0,
|
|
@@ -35495,7 +35465,7 @@ function US({ trpc: e, deviceId: t, layout: n, optimistic: r }) {
|
|
|
35495
35465
|
className: "w-6 text-center text-lg font-semibold tabular-nums text-foreground",
|
|
35496
35466
|
children: c.volume
|
|
35497
35467
|
}),
|
|
35498
|
-
/* @__PURE__ */ _(
|
|
35468
|
+
/* @__PURE__ */ _(qS, {
|
|
35499
35469
|
label: i("uiLibrary.petFeeder.increaseVolume", "Increase volume"),
|
|
35500
35470
|
symbol: "+",
|
|
35501
35471
|
disabled: y || c.volume >= LS,
|
|
@@ -35510,7 +35480,7 @@ function US({ trpc: e, deviceId: t, layout: n, optimistic: r }) {
|
|
|
35510
35480
|
]
|
|
35511
35481
|
});
|
|
35512
35482
|
}
|
|
35513
|
-
function
|
|
35483
|
+
function US({ label: e, children: t }) {
|
|
35514
35484
|
return /* @__PURE__ */ v("div", {
|
|
35515
35485
|
className: "flex flex-col gap-1",
|
|
35516
35486
|
children: [/* @__PURE__ */ _("span", {
|
|
@@ -35519,7 +35489,7 @@ function WS({ label: e, children: t }) {
|
|
|
35519
35489
|
}), t]
|
|
35520
35490
|
});
|
|
35521
35491
|
}
|
|
35522
|
-
function
|
|
35492
|
+
function WS({ icon: e, label: t }) {
|
|
35523
35493
|
return /* @__PURE__ */ v("span", {
|
|
35524
35494
|
className: "inline-flex items-center gap-1 tabular-nums",
|
|
35525
35495
|
children: [/* @__PURE__ */ _("span", {
|
|
@@ -35528,14 +35498,14 @@ function GS({ icon: e, label: t }) {
|
|
|
35528
35498
|
}), t]
|
|
35529
35499
|
});
|
|
35530
35500
|
}
|
|
35531
|
-
function
|
|
35501
|
+
function GS({ grams: e, low: t, eating: n }) {
|
|
35532
35502
|
let r = x(), i = Math.min(1, Math.max(0, (e ?? 0) / de)), a = t ? zS : RS, o = 52 - i * 24;
|
|
35533
35503
|
return /* @__PURE__ */ v("svg", {
|
|
35534
35504
|
width: 72,
|
|
35535
35505
|
height: 72,
|
|
35536
35506
|
viewBox: "0 0 72 72",
|
|
35537
35507
|
role: "img",
|
|
35538
|
-
"aria-label": e === null ? r("uiLibrary.petFeeder.levelUnknown", "Food level unknown") : r("uiLibrary.petFeeder.gramsInBowl", "{{grams}}
|
|
35508
|
+
"aria-label": e === null ? r("uiLibrary.petFeeder.levelUnknown", "Food level unknown") : r("uiLibrary.petFeeder.gramsInBowl", "{{grams}} in bowl", { grams: e }),
|
|
35539
35509
|
className: "shrink-0",
|
|
35540
35510
|
children: [
|
|
35541
35511
|
/* @__PURE__ */ _("defs", { children: /* @__PURE__ */ _("clipPath", {
|
|
@@ -35580,7 +35550,7 @@ function KS({ grams: e, low: t, eating: n }) {
|
|
|
35580
35550
|
]
|
|
35581
35551
|
});
|
|
35582
35552
|
}
|
|
35583
|
-
function
|
|
35553
|
+
function KS({ label: e, grams: t, busy: n, onGrams: r, onFeed: i }) {
|
|
35584
35554
|
let a = x();
|
|
35585
35555
|
return /* @__PURE__ */ v("div", {
|
|
35586
35556
|
className: "flex flex-col gap-1",
|
|
@@ -35592,11 +35562,11 @@ function qS({ label: e, grams: t, busy: n, onGrams: r, onFeed: i }) {
|
|
|
35592
35562
|
children: [/* @__PURE__ */ v("div", {
|
|
35593
35563
|
className: "flex items-center gap-1 rounded-lg border border-border/60 bg-surface-subtle px-1 py-1",
|
|
35594
35564
|
children: [
|
|
35595
|
-
/* @__PURE__ */ _(
|
|
35565
|
+
/* @__PURE__ */ _(qS, {
|
|
35596
35566
|
label: a("uiLibrary.petFeeder.decreasePortion", "Decrease {{label}} portion", { label: e }),
|
|
35597
35567
|
symbol: "−",
|
|
35598
35568
|
disabled: n || t <= oe,
|
|
35599
|
-
onClick: () => r(
|
|
35569
|
+
onClick: () => r(BS(t - 1))
|
|
35600
35570
|
}),
|
|
35601
35571
|
/* @__PURE__ */ v("span", {
|
|
35602
35572
|
className: "w-12 text-center text-sm font-semibold tabular-nums text-foreground",
|
|
@@ -35605,11 +35575,11 @@ function qS({ label: e, grams: t, busy: n, onGrams: r, onFeed: i }) {
|
|
|
35605
35575
|
children: "g"
|
|
35606
35576
|
})]
|
|
35607
35577
|
}),
|
|
35608
|
-
/* @__PURE__ */ _(
|
|
35578
|
+
/* @__PURE__ */ _(qS, {
|
|
35609
35579
|
label: a("uiLibrary.petFeeder.increasePortion", "Increase {{label}} portion", { label: e }),
|
|
35610
35580
|
symbol: "+",
|
|
35611
35581
|
disabled: n || t >= de,
|
|
35612
|
-
onClick: () => r(
|
|
35582
|
+
onClick: () => r(BS(t + 1))
|
|
35613
35583
|
})
|
|
35614
35584
|
]
|
|
35615
35585
|
}), /* @__PURE__ */ v("button", {
|
|
@@ -35625,7 +35595,7 @@ function qS({ label: e, grams: t, busy: n, onGrams: r, onFeed: i }) {
|
|
|
35625
35595
|
})]
|
|
35626
35596
|
});
|
|
35627
35597
|
}
|
|
35628
|
-
function
|
|
35598
|
+
function qS({ label: e, symbol: t, disabled: n, onClick: r }) {
|
|
35629
35599
|
return /* @__PURE__ */ _("button", {
|
|
35630
35600
|
type: "button",
|
|
35631
35601
|
"aria-label": e,
|
|
@@ -35635,7 +35605,7 @@ function JS({ label: e, symbol: t, disabled: n, onClick: r }) {
|
|
|
35635
35605
|
children: t
|
|
35636
35606
|
});
|
|
35637
35607
|
}
|
|
35638
|
-
function
|
|
35608
|
+
function JS({ icon: e, label: t, busy: n, onClick: r }) {
|
|
35639
35609
|
return /* @__PURE__ */ v("button", {
|
|
35640
35610
|
type: "button",
|
|
35641
35611
|
disabled: n,
|
|
@@ -35644,7 +35614,7 @@ function YS({ icon: e, label: t, busy: n, onClick: r }) {
|
|
|
35644
35614
|
children: [e, t]
|
|
35645
35615
|
});
|
|
35646
35616
|
}
|
|
35647
|
-
function
|
|
35617
|
+
function YS({ icon: e, label: t, on: n, busy: r, onToggle: i }) {
|
|
35648
35618
|
return /* @__PURE__ */ v("button", {
|
|
35649
35619
|
type: "button",
|
|
35650
35620
|
"aria-label": t,
|
|
@@ -35657,8 +35627,8 @@ function XS({ icon: e, label: t, on: n, busy: r, onToggle: i }) {
|
|
|
35657
35627
|
children: [e, t]
|
|
35658
35628
|
});
|
|
35659
35629
|
}
|
|
35660
|
-
function
|
|
35661
|
-
return /* @__PURE__ */ _(
|
|
35630
|
+
function XS({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
35631
|
+
return /* @__PURE__ */ _(HS, {
|
|
35662
35632
|
trpc: e,
|
|
35663
35633
|
deviceId: t,
|
|
35664
35634
|
features: n,
|
|
@@ -35666,8 +35636,8 @@ function ZS({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
35666
35636
|
optimistic: r
|
|
35667
35637
|
});
|
|
35668
35638
|
}
|
|
35669
|
-
function
|
|
35670
|
-
return /* @__PURE__ */ _(
|
|
35639
|
+
function ZS({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
35640
|
+
return /* @__PURE__ */ _(HS, {
|
|
35671
35641
|
trpc: e,
|
|
35672
35642
|
deviceId: t,
|
|
35673
35643
|
features: n,
|
|
@@ -35677,7 +35647,7 @@ function QS({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
35677
35647
|
}
|
|
35678
35648
|
//#endregion
|
|
35679
35649
|
//#region ../ui-library/src/composites/device-controls/dishwasher-control.tsx
|
|
35680
|
-
function
|
|
35650
|
+
function QS(e, t = b) {
|
|
35681
35651
|
switch (e) {
|
|
35682
35652
|
case "Run": return {
|
|
35683
35653
|
label: t("uiLibrary.dishwasher.op.run", "Running"),
|
|
@@ -35721,7 +35691,7 @@ function $S(e, t = b) {
|
|
|
35721
35691
|
};
|
|
35722
35692
|
}
|
|
35723
35693
|
}
|
|
35724
|
-
function
|
|
35694
|
+
function $S(e, t = b) {
|
|
35725
35695
|
switch (e.availability) {
|
|
35726
35696
|
case "offline": return {
|
|
35727
35697
|
label: t("uiLibrary.dishwasher.offline", "Offline"),
|
|
@@ -35731,20 +35701,20 @@ function eC(e, t = b) {
|
|
|
35731
35701
|
label: t("uiLibrary.dishwasher.descriptionMissing", "Waiting for the appliance profile"),
|
|
35732
35702
|
tone: "text-warning"
|
|
35733
35703
|
};
|
|
35734
|
-
case "available": return
|
|
35704
|
+
case "available": return QS(e.operationState, t);
|
|
35735
35705
|
}
|
|
35736
35706
|
}
|
|
35737
|
-
function
|
|
35707
|
+
function eC(e) {
|
|
35738
35708
|
return (e.split(".").pop() ?? e).replace(/([a-z0-9])([A-Z])/g, "$1 $2");
|
|
35739
35709
|
}
|
|
35740
|
-
function
|
|
35710
|
+
function tC(e) {
|
|
35741
35711
|
let t = (e.split(".").pop() ?? e).toLowerCase();
|
|
35742
35712
|
return t.includes("salt") || t.includes("rinse");
|
|
35743
35713
|
}
|
|
35744
|
-
function
|
|
35745
|
-
return e.filter((e) => !
|
|
35714
|
+
function nC(e) {
|
|
35715
|
+
return e.filter((e) => !tC(e));
|
|
35746
35716
|
}
|
|
35747
|
-
function
|
|
35717
|
+
function rC(e, t = b) {
|
|
35748
35718
|
if (e < 60) return t("uiLibrary.dishwasher.durationSeconds", "{{n}} s", { n: e });
|
|
35749
35719
|
let n = Math.round(e / 60);
|
|
35750
35720
|
if (n < 60) return t("uiLibrary.dishwasher.durationMinutes", "{{n}} min", { n });
|
|
@@ -35754,7 +35724,7 @@ function iC(e, t = b) {
|
|
|
35754
35724
|
m: i
|
|
35755
35725
|
});
|
|
35756
35726
|
}
|
|
35757
|
-
function
|
|
35727
|
+
function iC(e, t) {
|
|
35758
35728
|
return Z({
|
|
35759
35729
|
trpc: e,
|
|
35760
35730
|
deviceId: t,
|
|
@@ -35762,7 +35732,7 @@ function aC(e, t) {
|
|
|
35762
35732
|
slice: (e) => e.state.dishwasher
|
|
35763
35733
|
});
|
|
35764
35734
|
}
|
|
35765
|
-
function
|
|
35735
|
+
function aC({ label: e, busy: t, active: n, onClick: r, children: i }) {
|
|
35766
35736
|
return /* @__PURE__ */ _("button", {
|
|
35767
35737
|
type: "button",
|
|
35768
35738
|
"aria-label": e,
|
|
@@ -35775,7 +35745,7 @@ function oC({ label: e, busy: t, active: n, onClick: r, children: i }) {
|
|
|
35775
35745
|
children: i
|
|
35776
35746
|
});
|
|
35777
35747
|
}
|
|
35778
|
-
function
|
|
35748
|
+
function oC({ running: e, progressPercent: t }) {
|
|
35779
35749
|
let n = t == null ? e ? 40 : 0 : Math.max(0, Math.min(100, t));
|
|
35780
35750
|
return /* @__PURE__ */ v("div", {
|
|
35781
35751
|
"aria-hidden": "true",
|
|
@@ -35789,10 +35759,10 @@ function sC({ running: e, progressPercent: t }) {
|
|
|
35789
35759
|
})]
|
|
35790
35760
|
});
|
|
35791
35761
|
}
|
|
35792
|
-
function
|
|
35793
|
-
let r = x(), { cap: i, slice: a, available: o } =
|
|
35762
|
+
function sC({ trpc: e, deviceId: t, layout: n }) {
|
|
35763
|
+
let r = x(), { cap: i, slice: a, available: o } = iC(e, t);
|
|
35794
35764
|
if (i === void 0 || a === void 0) return null;
|
|
35795
|
-
let s = a, c = s.availability === "available", l = !o || !c, u = s.childLock === !0, d =
|
|
35765
|
+
let s = a, c = s.availability === "available", l = !o || !c, u = s.childLock === !0, d = $S(s, r), f = s.operationState === "Run", p = s.operationState === "Pause", m = s.remoteStartAllowed === !0 && s.selectedProgram !== null, h = (e) => {
|
|
35796
35766
|
l || e();
|
|
35797
35767
|
};
|
|
35798
35768
|
if (n === "compact") return /* @__PURE__ */ v("div", {
|
|
@@ -35811,20 +35781,20 @@ function cC({ trpc: e, deviceId: t, layout: n }) {
|
|
|
35811
35781
|
s.program != null && /* @__PURE__ */ _("span", {
|
|
35812
35782
|
className: "text-xs text-foreground-subtle truncate max-w-[7rem]",
|
|
35813
35783
|
title: s.program,
|
|
35814
|
-
children:
|
|
35784
|
+
children: eC(s.program)
|
|
35815
35785
|
}),
|
|
35816
35786
|
s.remainingSeconds != null && /* @__PURE__ */ v("span", {
|
|
35817
35787
|
className: "inline-flex items-center gap-0.5 text-xs text-foreground-subtle tabular-nums shrink-0",
|
|
35818
|
-
children: [/* @__PURE__ */ _(gn, { className: "h-3 w-3" }),
|
|
35788
|
+
children: [/* @__PURE__ */ _(gn, { className: "h-3 w-3" }), rC(s.remainingSeconds, r)]
|
|
35819
35789
|
}),
|
|
35820
|
-
/* @__PURE__ */ _(
|
|
35790
|
+
/* @__PURE__ */ _(aC, {
|
|
35821
35791
|
label: r("uiLibrary.dishwasher.start", "Start"),
|
|
35822
35792
|
busy: l || !m,
|
|
35823
35793
|
active: f,
|
|
35824
35794
|
onClick: () => h(() => i.start({})),
|
|
35825
35795
|
children: /* @__PURE__ */ _(Kt, { className: "h-3 w-3" })
|
|
35826
35796
|
}),
|
|
35827
|
-
/* @__PURE__ */ _(
|
|
35797
|
+
/* @__PURE__ */ _(aC, {
|
|
35828
35798
|
label: p ? r("uiLibrary.dishwasher.resume", "Resume") : r("uiLibrary.dishwasher.pause", "Pause"),
|
|
35829
35799
|
busy: l || !(f || p),
|
|
35830
35800
|
active: p,
|
|
@@ -35839,7 +35809,7 @@ function cC({ trpc: e, deviceId: t, layout: n }) {
|
|
|
35839
35809
|
children: [
|
|
35840
35810
|
/* @__PURE__ */ v("div", {
|
|
35841
35811
|
className: "flex items-start gap-4",
|
|
35842
|
-
children: [/* @__PURE__ */ _(
|
|
35812
|
+
children: [/* @__PURE__ */ _(oC, {
|
|
35843
35813
|
running: f,
|
|
35844
35814
|
progressPercent: s.progressPercent
|
|
35845
35815
|
}), /* @__PURE__ */ v("div", {
|
|
@@ -35858,15 +35828,15 @@ function cC({ trpc: e, deviceId: t, layout: n }) {
|
|
|
35858
35828
|
s.program != null && /* @__PURE__ */ _("span", {
|
|
35859
35829
|
className: "text-sm text-foreground-subtle",
|
|
35860
35830
|
title: s.program,
|
|
35861
|
-
children:
|
|
35831
|
+
children: eC(s.program)
|
|
35862
35832
|
}),
|
|
35863
35833
|
s.remainingSeconds != null && /* @__PURE__ */ v("span", {
|
|
35864
35834
|
className: "inline-flex items-center gap-1 text-sm text-foreground-subtle tabular-nums",
|
|
35865
|
-
children: [/* @__PURE__ */ _(gn, { className: "h-3.5 w-3.5" }), r("uiLibrary.dishwasher.remaining", "{{time}} left", { time:
|
|
35835
|
+
children: [/* @__PURE__ */ _(gn, { className: "h-3.5 w-3.5" }), r("uiLibrary.dishwasher.remaining", "{{time}} left", { time: rC(s.remainingSeconds, r) })]
|
|
35866
35836
|
}),
|
|
35867
35837
|
s.delayedStartSeconds != null && s.delayedStartSeconds > 0 && /* @__PURE__ */ _("span", {
|
|
35868
35838
|
className: "text-xs text-foreground-subtle tabular-nums",
|
|
35869
|
-
children: r("uiLibrary.dishwasher.startsIn", "Starts in {{time}}", { time:
|
|
35839
|
+
children: r("uiLibrary.dishwasher.startsIn", "Starts in {{time}}", { time: rC(s.delayedStartSeconds, r) })
|
|
35870
35840
|
}),
|
|
35871
35841
|
s.progressPercent != null && /* @__PURE__ */ v("div", {
|
|
35872
35842
|
className: "flex items-center gap-2",
|
|
@@ -35886,41 +35856,41 @@ function cC({ trpc: e, deviceId: t, layout: n }) {
|
|
|
35886
35856
|
children: [s.doorOpen === !0 && /* @__PURE__ */ v("span", {
|
|
35887
35857
|
className: "inline-flex items-center gap-1 text-xs text-warning",
|
|
35888
35858
|
children: [/* @__PURE__ */ _(lt, { className: "h-3.5 w-3.5" }), r("uiLibrary.dishwasher.doorOpen", "Door open")]
|
|
35889
|
-
}),
|
|
35859
|
+
}), nC(s.activeEvents).map((e) => /* @__PURE__ */ _("span", {
|
|
35890
35860
|
className: "text-xs text-warning",
|
|
35891
35861
|
title: e,
|
|
35892
|
-
children:
|
|
35862
|
+
children: eC(e)
|
|
35893
35863
|
}, e))]
|
|
35894
35864
|
}),
|
|
35895
35865
|
s.operationState === "Error" && /* @__PURE__ */ v("div", {
|
|
35896
35866
|
className: "inline-flex items-center gap-1 text-xs text-danger",
|
|
35897
|
-
children: [/* @__PURE__ */ _(yn, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ _("span", { children: s.errorLabel == null ? s.errorCode == null ? r("uiLibrary.dishwasher.op.error", "Error") : r("uiLibrary.dishwasher.errorCode", "Error {{code}}", { code: s.errorCode }) :
|
|
35867
|
+
children: [/* @__PURE__ */ _(yn, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ _("span", { children: s.errorLabel == null ? s.errorCode == null ? r("uiLibrary.dishwasher.op.error", "Error") : r("uiLibrary.dishwasher.errorCode", "Error {{code}}", { code: s.errorCode }) : eC(s.errorLabel) })]
|
|
35898
35868
|
}),
|
|
35899
35869
|
/* @__PURE__ */ v("div", {
|
|
35900
35870
|
className: "flex flex-wrap items-center gap-2",
|
|
35901
35871
|
children: [
|
|
35902
|
-
/* @__PURE__ */ _(
|
|
35872
|
+
/* @__PURE__ */ _(aC, {
|
|
35903
35873
|
label: r("uiLibrary.dishwasher.start", "Start"),
|
|
35904
35874
|
busy: l || !m,
|
|
35905
35875
|
active: f,
|
|
35906
35876
|
onClick: () => h(() => i.start({})),
|
|
35907
35877
|
children: /* @__PURE__ */ _(Kt, { className: "h-4 w-4" })
|
|
35908
35878
|
}),
|
|
35909
|
-
/* @__PURE__ */ _(
|
|
35879
|
+
/* @__PURE__ */ _(aC, {
|
|
35910
35880
|
label: p ? r("uiLibrary.dishwasher.resume", "Resume") : r("uiLibrary.dishwasher.pause", "Pause"),
|
|
35911
35881
|
busy: l || !(f || p),
|
|
35912
35882
|
active: p,
|
|
35913
35883
|
onClick: () => h(() => p ? i.resume({}) : i.pause({})),
|
|
35914
35884
|
children: /* @__PURE__ */ _(Ut, { className: "h-4 w-4" })
|
|
35915
35885
|
}),
|
|
35916
|
-
/* @__PURE__ */ _(
|
|
35886
|
+
/* @__PURE__ */ _(aC, {
|
|
35917
35887
|
label: r("uiLibrary.dishwasher.stop", "Stop"),
|
|
35918
35888
|
busy: l || !(f || p),
|
|
35919
35889
|
active: !1,
|
|
35920
35890
|
onClick: () => h(() => i.stop({})),
|
|
35921
35891
|
children: /* @__PURE__ */ _(Pe, { className: "h-3.5 w-3.5" })
|
|
35922
35892
|
}),
|
|
35923
|
-
/* @__PURE__ */ _(
|
|
35893
|
+
/* @__PURE__ */ _(aC, {
|
|
35924
35894
|
label: r("uiLibrary.dishwasher.power", "Power"),
|
|
35925
35895
|
busy: l || s.powerOn === null,
|
|
35926
35896
|
active: s.powerOn === !0,
|
|
@@ -35957,49 +35927,49 @@ function cC({ trpc: e, deviceId: t, layout: n }) {
|
|
|
35957
35927
|
children: "—"
|
|
35958
35928
|
}), g.map((e) => /* @__PURE__ */ _("option", {
|
|
35959
35929
|
value: e,
|
|
35960
|
-
children:
|
|
35930
|
+
children: eC(e)
|
|
35961
35931
|
}, e))]
|
|
35962
35932
|
})]
|
|
35963
35933
|
}),
|
|
35964
35934
|
/* @__PURE__ */ v("div", {
|
|
35965
35935
|
className: "flex flex-wrap gap-4 text-xs",
|
|
35966
35936
|
children: [
|
|
35967
|
-
/* @__PURE__ */ _(
|
|
35937
|
+
/* @__PURE__ */ _(cC, {
|
|
35968
35938
|
label: r("uiLibrary.dishwasher.halfLoad", "Half load"),
|
|
35969
35939
|
checked: s.halfLoad,
|
|
35970
35940
|
shown: c,
|
|
35971
35941
|
busy: l || u,
|
|
35972
35942
|
onChange: (e) => void i.setHalfLoad({ on: e })
|
|
35973
35943
|
}),
|
|
35974
|
-
/* @__PURE__ */ _(
|
|
35944
|
+
/* @__PURE__ */ _(cC, {
|
|
35975
35945
|
label: r("uiLibrary.dishwasher.hygienePlus", "Hygiene plus"),
|
|
35976
35946
|
checked: s.hygienePlus,
|
|
35977
35947
|
shown: c,
|
|
35978
35948
|
busy: l || u,
|
|
35979
35949
|
onChange: (e) => void i.setHygienePlus({ on: e })
|
|
35980
35950
|
}),
|
|
35981
|
-
/* @__PURE__ */ _(
|
|
35951
|
+
/* @__PURE__ */ _(cC, {
|
|
35982
35952
|
label: r("uiLibrary.dishwasher.extraDry", "Extra dry"),
|
|
35983
35953
|
checked: s.extraDry,
|
|
35984
35954
|
shown: c,
|
|
35985
35955
|
busy: l || u,
|
|
35986
35956
|
onChange: (e) => void i.setExtraDry({ on: e })
|
|
35987
35957
|
}),
|
|
35988
|
-
/* @__PURE__ */ _(
|
|
35958
|
+
/* @__PURE__ */ _(cC, {
|
|
35989
35959
|
label: r("uiLibrary.dishwasher.intensiveZone", "Intensive zone"),
|
|
35990
35960
|
checked: s.intensiveZone,
|
|
35991
35961
|
shown: c,
|
|
35992
35962
|
busy: l || u,
|
|
35993
35963
|
onChange: (e) => void i.setIntensiveZone({ on: e })
|
|
35994
35964
|
}),
|
|
35995
|
-
/* @__PURE__ */ _(
|
|
35965
|
+
/* @__PURE__ */ _(cC, {
|
|
35996
35966
|
label: r("uiLibrary.dishwasher.varioSpeedPlus", "VarioSpeed+"),
|
|
35997
35967
|
checked: s.varioSpeedPlus,
|
|
35998
35968
|
shown: c,
|
|
35999
35969
|
busy: l || u,
|
|
36000
35970
|
onChange: (e) => void i.setVarioSpeedPlus({ on: e })
|
|
36001
35971
|
}),
|
|
36002
|
-
/* @__PURE__ */ _(
|
|
35972
|
+
/* @__PURE__ */ _(cC, {
|
|
36003
35973
|
label: r("uiLibrary.dishwasher.childLock", "Child lock"),
|
|
36004
35974
|
checked: s.childLock,
|
|
36005
35975
|
shown: c,
|
|
@@ -36011,7 +35981,7 @@ function cC({ trpc: e, deviceId: t, layout: n }) {
|
|
|
36011
35981
|
]
|
|
36012
35982
|
});
|
|
36013
35983
|
}
|
|
36014
|
-
function
|
|
35984
|
+
function cC({ label: e, checked: t, shown: n, busy: r, onChange: i }) {
|
|
36015
35985
|
let a = x();
|
|
36016
35986
|
return t === null && n ? null : /* @__PURE__ */ v("label", {
|
|
36017
35987
|
className: "inline-flex items-center gap-2 cursor-pointer",
|
|
@@ -36037,24 +36007,24 @@ function lC({ label: e, checked: t, shown: n, busy: r, onChange: i }) {
|
|
|
36037
36007
|
]
|
|
36038
36008
|
});
|
|
36039
36009
|
}
|
|
36040
|
-
function
|
|
36041
|
-
return /* @__PURE__ */ _(
|
|
36010
|
+
function lC(e) {
|
|
36011
|
+
return /* @__PURE__ */ _(sC, {
|
|
36042
36012
|
...e,
|
|
36043
36013
|
layout: "compact"
|
|
36044
36014
|
});
|
|
36045
36015
|
}
|
|
36046
|
-
function
|
|
36047
|
-
return /* @__PURE__ */ _(
|
|
36016
|
+
function uC(e) {
|
|
36017
|
+
return /* @__PURE__ */ _(sC, {
|
|
36048
36018
|
...e,
|
|
36049
36019
|
layout: "full"
|
|
36050
36020
|
});
|
|
36051
36021
|
}
|
|
36052
36022
|
//#endregion
|
|
36053
36023
|
//#region ../ui-library/src/composites/device-controls/heating-valve-readout.tsx
|
|
36054
|
-
function
|
|
36024
|
+
function dC(e) {
|
|
36055
36025
|
return e === null ? "—" : `${e}%`;
|
|
36056
36026
|
}
|
|
36057
|
-
function
|
|
36027
|
+
function fC({ trpc: e, deviceId: t, layout: n }) {
|
|
36058
36028
|
let r = x(), { cap: i, slice: a } = Z({
|
|
36059
36029
|
trpc: e,
|
|
36060
36030
|
deviceId: t,
|
|
@@ -36062,7 +36032,7 @@ function pC({ trpc: e, deviceId: t, layout: n }) {
|
|
|
36062
36032
|
slice: (e) => e.state.heatingValve
|
|
36063
36033
|
});
|
|
36064
36034
|
if (i === void 0 || a === void 0) return null;
|
|
36065
|
-
let o = r("uiLibrary.heatingValveReadout.valve", "Valve"), s =
|
|
36035
|
+
let o = r("uiLibrary.heatingValveReadout.valve", "Valve"), s = dC(a.position);
|
|
36066
36036
|
return n === "compact" ? /* @__PURE__ */ _("span", {
|
|
36067
36037
|
className: "inline-flex items-center text-xs tabular-nums text-foreground-subtle",
|
|
36068
36038
|
"aria-label": `${o} ${s}`,
|
|
@@ -36078,27 +36048,27 @@ function pC({ trpc: e, deviceId: t, layout: n }) {
|
|
|
36078
36048
|
//#endregion
|
|
36079
36049
|
//#region ../ui-library/src/composites/device-controls/ac-panel.tsx
|
|
36080
36050
|
e();
|
|
36081
|
-
var
|
|
36051
|
+
var pC = new Set([
|
|
36082
36052
|
"cool",
|
|
36083
36053
|
"heat_cool",
|
|
36084
36054
|
"dry",
|
|
36085
36055
|
"fan_only"
|
|
36086
36056
|
]);
|
|
36087
|
-
function
|
|
36088
|
-
return e.some((e) =>
|
|
36057
|
+
function mC(e) {
|
|
36058
|
+
return e.some((e) => pC.has(e));
|
|
36089
36059
|
}
|
|
36090
|
-
function
|
|
36060
|
+
function hC(e) {
|
|
36091
36061
|
let t = e.minTemp, n = e.maxTemp;
|
|
36092
36062
|
return typeof t != "number" || typeof n != "number" || !Number.isFinite(t) || !Number.isFinite(n) || n <= t ? null : {
|
|
36093
36063
|
min: t,
|
|
36094
36064
|
max: n
|
|
36095
36065
|
};
|
|
36096
36066
|
}
|
|
36097
|
-
function
|
|
36067
|
+
function gC(e, t, n) {
|
|
36098
36068
|
let r = ob(n), i = Math.min(1, Math.max(0, e)), a = t.min + i * (t.max - t.min), o = Math.round((a - t.min) / r), s = t.min + o * r, c = Math.round(s * 1e3) / 1e3;
|
|
36099
36069
|
return Math.min(t.max, Math.max(t.min, c));
|
|
36100
36070
|
}
|
|
36101
|
-
function
|
|
36071
|
+
function _C(e, t) {
|
|
36102
36072
|
switch (t) {
|
|
36103
36073
|
case "cool": return e("uiLibrary.acPanel.modeCool", "Cool");
|
|
36104
36074
|
case "heat": return e("uiLibrary.acPanel.modeHeat", "Heat");
|
|
@@ -36109,7 +36079,7 @@ function vC(e, t) {
|
|
|
36109
36079
|
case "off": return e("uiLibrary.acPanel.modeOff", "Off");
|
|
36110
36080
|
}
|
|
36111
36081
|
}
|
|
36112
|
-
var
|
|
36082
|
+
var vC = {
|
|
36113
36083
|
cool: ln,
|
|
36114
36084
|
heat: gt,
|
|
36115
36085
|
auto: un,
|
|
@@ -36117,7 +36087,7 @@ var yC = {
|
|
|
36117
36087
|
fan_only: mt,
|
|
36118
36088
|
dry: ft,
|
|
36119
36089
|
off: Jt
|
|
36120
|
-
},
|
|
36090
|
+
}, yC = {
|
|
36121
36091
|
heat: "#f59e0b",
|
|
36122
36092
|
cool: "#60a5fa",
|
|
36123
36093
|
auto: "#c084fc",
|
|
@@ -36126,11 +36096,11 @@ var yC = {
|
|
|
36126
36096
|
dry: "#22d3ee",
|
|
36127
36097
|
off: "#a1a1aa"
|
|
36128
36098
|
};
|
|
36129
|
-
function
|
|
36099
|
+
function bC(e) {
|
|
36130
36100
|
let t = e.replace(/_/g, " ");
|
|
36131
36101
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
36132
36102
|
}
|
|
36133
|
-
function
|
|
36103
|
+
function xC(e) {
|
|
36134
36104
|
switch (e) {
|
|
36135
36105
|
case "turbo": return Mn;
|
|
36136
36106
|
case "quiet": return ht;
|
|
@@ -36141,7 +36111,7 @@ function SC(e) {
|
|
|
36141
36111
|
default: return un;
|
|
36142
36112
|
}
|
|
36143
36113
|
}
|
|
36144
|
-
function
|
|
36114
|
+
function SC(e) {
|
|
36145
36115
|
switch (e) {
|
|
36146
36116
|
case "high": return 1;
|
|
36147
36117
|
case "medium_high": return 1.3;
|
|
@@ -36151,8 +36121,8 @@ function CC(e) {
|
|
|
36151
36121
|
default: return 1.8;
|
|
36152
36122
|
}
|
|
36153
36123
|
}
|
|
36154
|
-
var
|
|
36155
|
-
function
|
|
36124
|
+
var CC = "\n@keyframes acv-fall { 0%{transform:translateY(-1.75rem);opacity:0} 18%{opacity:.7} 82%{opacity:.7} 100%{transform:translateY(7.5rem);opacity:0} }\n@keyframes acv-rise { 0%{transform:translateY(7.5rem);opacity:0} 18%{opacity:.7} 82%{opacity:.7} 100%{transform:translateY(-1.75rem);opacity:0} }\n@keyframes acv-sway { 0%,100%{transform:translateX(-9%)} 50%{transform:translateX(9%)} }\n@keyframes acv-swing-h { 0%,100%{transform:translateX(-22%)} 50%{transform:translateX(22%)} }\n@keyframes acv-swing-v { 0%,100%{transform:translateY(-22%)} 50%{transform:translateY(22%)} }\n@keyframes acv-spin { to { transform:rotate(360deg) } }\n@keyframes acv-glow { 0%,100%{opacity:.35;transform:scale(1)} 50%{opacity:.6;transform:scale(1.06)} }\n@media (prefers-reduced-motion: reduce) {\n .acv-streak, .acv-fan, .acv-sway-wrap, .acv-glow, .acv-swing { animation: none !important; }\n}\n";
|
|
36125
|
+
function wC({ trpc: e, deviceId: t, layout: n, optimistic: r }) {
|
|
36156
36126
|
let i = x(), { cap: a, slice: o, available: s } = Z({
|
|
36157
36127
|
trpc: e,
|
|
36158
36128
|
deviceId: t,
|
|
@@ -36221,23 +36191,23 @@ function TC({ trpc: e, deviceId: t, layout: n, optimistic: r }) {
|
|
|
36221
36191
|
className: N("bg-transparent px-0.5 text-xs text-foreground-subtle hover:text-foreground cursor-pointer", u && "opacity-40 cursor-not-allowed"),
|
|
36222
36192
|
children: c.availableModes.map((e) => /* @__PURE__ */ _("option", {
|
|
36223
36193
|
value: e,
|
|
36224
|
-
children:
|
|
36194
|
+
children: _C(i, e)
|
|
36225
36195
|
}, e))
|
|
36226
36196
|
})
|
|
36227
36197
|
]
|
|
36228
36198
|
});
|
|
36229
|
-
let d =
|
|
36199
|
+
let d = yC[c.mode], f = c.mode !== "off", p = !mC(c.availableModes), m = hC(c), h = xC(c.preset), g = c.preset === "turbo", b = Math.max(.55, SC(c.fanMode) * (g ? .6 : 1)), S = c.swingVertical !== null, C = c.swingHorizontal !== null, w = f && (c.swingVertical === !0 || c.swingHorizontal === !0);
|
|
36230
36200
|
return /* @__PURE__ */ v("div", {
|
|
36231
36201
|
"data-mode": c.mode,
|
|
36232
36202
|
className: N("relative flex flex-col items-stretch gap-2.5 overflow-hidden rounded-lg border p-3 transition-colors", cb[c.mode]),
|
|
36233
36203
|
children: [
|
|
36234
|
-
/* @__PURE__ */ _("style", { children:
|
|
36204
|
+
/* @__PURE__ */ _("style", { children: CC }),
|
|
36235
36205
|
/* @__PURE__ */ v("div", {
|
|
36236
36206
|
className: "relative z-10 flex flex-col items-center justify-center gap-1 overflow-hidden rounded-lg border border-border/50 bg-surface/30 px-3 py-3",
|
|
36237
36207
|
children: [
|
|
36238
36208
|
/* @__PURE__ */ _("div", {
|
|
36239
36209
|
className: "pointer-events-none absolute inset-0 opacity-60",
|
|
36240
|
-
children: p && !f ? /* @__PURE__ */ _(
|
|
36210
|
+
children: p && !f ? /* @__PURE__ */ _(jC, {}) : /* @__PURE__ */ _(AC, {
|
|
36241
36211
|
mode: c.mode,
|
|
36242
36212
|
accent: d,
|
|
36243
36213
|
periodSec: b,
|
|
@@ -36258,12 +36228,12 @@ function TC({ trpc: e, deviceId: t, layout: n, optimistic: r }) {
|
|
|
36258
36228
|
className: "relative z-10 flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wide",
|
|
36259
36229
|
style: { color: d },
|
|
36260
36230
|
children: [
|
|
36261
|
-
/* @__PURE__ */ _(
|
|
36231
|
+
/* @__PURE__ */ _(EC, {
|
|
36262
36232
|
mode: c.mode,
|
|
36263
36233
|
heatingOnly: p,
|
|
36264
36234
|
className: "h-3.5 w-3.5"
|
|
36265
36235
|
}),
|
|
36266
|
-
|
|
36236
|
+
_C(i, c.mode),
|
|
36267
36237
|
c.currentTemp !== null && /* @__PURE__ */ _("span", {
|
|
36268
36238
|
className: "normal-case text-foreground-subtle",
|
|
36269
36239
|
children: i("uiLibrary.acPanel.now", "· {{temp}}° now", { temp: c.currentTemp })
|
|
@@ -36290,7 +36260,7 @@ function TC({ trpc: e, deviceId: t, layout: n, optimistic: r }) {
|
|
|
36290
36260
|
}) : /* @__PURE__ */ v(y, { children: [/* @__PURE__ */ v("div", {
|
|
36291
36261
|
className: "relative z-10 flex items-center gap-3",
|
|
36292
36262
|
children: [
|
|
36293
|
-
/* @__PURE__ */ _(
|
|
36263
|
+
/* @__PURE__ */ _(OC, {
|
|
36294
36264
|
label: i("uiLibrary.acPanel.decrease", "Decrease target"),
|
|
36295
36265
|
symbol: "−",
|
|
36296
36266
|
disabled: u,
|
|
@@ -36311,7 +36281,7 @@ function TC({ trpc: e, deviceId: t, layout: n, optimistic: r }) {
|
|
|
36311
36281
|
children: "°"
|
|
36312
36282
|
})]
|
|
36313
36283
|
}),
|
|
36314
|
-
/* @__PURE__ */ _(
|
|
36284
|
+
/* @__PURE__ */ _(OC, {
|
|
36315
36285
|
label: i("uiLibrary.acPanel.increase", "Increase target"),
|
|
36316
36286
|
symbol: "+",
|
|
36317
36287
|
disabled: u,
|
|
@@ -36324,7 +36294,7 @@ function TC({ trpc: e, deviceId: t, layout: n, optimistic: r }) {
|
|
|
36324
36294
|
]
|
|
36325
36295
|
}), m !== null && /* @__PURE__ */ _("div", {
|
|
36326
36296
|
className: "relative z-10 w-full px-1",
|
|
36327
|
-
children: /* @__PURE__ */ _(
|
|
36297
|
+
children: /* @__PURE__ */ _(kC, {
|
|
36328
36298
|
value: c.target,
|
|
36329
36299
|
min: m.min,
|
|
36330
36300
|
max: m.max,
|
|
@@ -36345,12 +36315,12 @@ function TC({ trpc: e, deviceId: t, layout: n, optimistic: r }) {
|
|
|
36345
36315
|
/* @__PURE__ */ v("div", {
|
|
36346
36316
|
className: "relative z-10 grid grid-cols-3 gap-2",
|
|
36347
36317
|
children: [
|
|
36348
|
-
/* @__PURE__ */ _(
|
|
36318
|
+
/* @__PURE__ */ _(DC, {
|
|
36349
36319
|
label: i("uiLibrary.acPanel.mode", "Mode"),
|
|
36350
36320
|
icon: /* @__PURE__ */ _("span", {
|
|
36351
36321
|
style: { color: d },
|
|
36352
36322
|
className: "flex",
|
|
36353
|
-
children: /* @__PURE__ */ _(
|
|
36323
|
+
children: /* @__PURE__ */ _(EC, {
|
|
36354
36324
|
mode: c.mode,
|
|
36355
36325
|
heatingOnly: p,
|
|
36356
36326
|
className: "h-4 w-4"
|
|
@@ -36359,7 +36329,7 @@ function TC({ trpc: e, deviceId: t, layout: n, optimistic: r }) {
|
|
|
36359
36329
|
value: c.mode,
|
|
36360
36330
|
options: c.availableModes.map((e) => ({
|
|
36361
36331
|
value: e,
|
|
36362
|
-
label:
|
|
36332
|
+
label: _C(i, e)
|
|
36363
36333
|
})),
|
|
36364
36334
|
disabled: u,
|
|
36365
36335
|
onChange: (e) => {
|
|
@@ -36367,26 +36337,26 @@ function TC({ trpc: e, deviceId: t, layout: n, optimistic: r }) {
|
|
|
36367
36337
|
t && (l({ mode: t }), a.setMode({ mode: t }));
|
|
36368
36338
|
}
|
|
36369
36339
|
}),
|
|
36370
|
-
c.availableFanModes.length > 0 && /* @__PURE__ */ _(
|
|
36340
|
+
c.availableFanModes.length > 0 && /* @__PURE__ */ _(DC, {
|
|
36371
36341
|
label: i("uiLibrary.acPanel.fan", "Fan"),
|
|
36372
36342
|
icon: /* @__PURE__ */ _(kn, { className: "h-4 w-4 text-sky-500" }),
|
|
36373
36343
|
value: c.fanMode,
|
|
36374
36344
|
options: c.availableFanModes.map((e) => ({
|
|
36375
36345
|
value: e,
|
|
36376
|
-
label:
|
|
36346
|
+
label: bC(e)
|
|
36377
36347
|
})),
|
|
36378
36348
|
disabled: u,
|
|
36379
36349
|
onChange: (e) => {
|
|
36380
36350
|
l({ fanMode: e }), a.setFanMode({ fanMode: e });
|
|
36381
36351
|
}
|
|
36382
36352
|
}),
|
|
36383
|
-
c.availablePresets.length > 0 && /* @__PURE__ */ _(
|
|
36353
|
+
c.availablePresets.length > 0 && /* @__PURE__ */ _(DC, {
|
|
36384
36354
|
label: i("uiLibrary.acPanel.preset", "Preset"),
|
|
36385
36355
|
icon: /* @__PURE__ */ _(h, { className: "h-4 w-4 text-emerald-500" }),
|
|
36386
36356
|
value: c.preset,
|
|
36387
36357
|
options: c.availablePresets.map((e) => ({
|
|
36388
36358
|
value: e,
|
|
36389
|
-
label:
|
|
36359
|
+
label: bC(e)
|
|
36390
36360
|
})),
|
|
36391
36361
|
disabled: u,
|
|
36392
36362
|
onChange: (e) => {
|
|
@@ -36395,18 +36365,18 @@ function TC({ trpc: e, deviceId: t, layout: n, optimistic: r }) {
|
|
|
36395
36365
|
})
|
|
36396
36366
|
]
|
|
36397
36367
|
}),
|
|
36398
|
-
(S || C) && /* @__PURE__ */ _(
|
|
36368
|
+
(S || C) && /* @__PURE__ */ _(TC, {
|
|
36399
36369
|
label: i("uiLibrary.acPanel.swing", "Swing"),
|
|
36400
36370
|
children: /* @__PURE__ */ v("div", {
|
|
36401
36371
|
className: "grid grid-cols-2 gap-1",
|
|
36402
|
-
children: [S && /* @__PURE__ */ _(
|
|
36372
|
+
children: [S && /* @__PURE__ */ _(NC, {
|
|
36403
36373
|
axis: "vertical",
|
|
36404
36374
|
on: c.swingVertical ?? !1,
|
|
36405
36375
|
busy: u,
|
|
36406
36376
|
onToggle: (e) => {
|
|
36407
36377
|
l({ swingVertical: e }), a.setSwingVertical({ on: e });
|
|
36408
36378
|
}
|
|
36409
|
-
}), C && /* @__PURE__ */ _(
|
|
36379
|
+
}), C && /* @__PURE__ */ _(NC, {
|
|
36410
36380
|
axis: "horizontal",
|
|
36411
36381
|
on: c.swingHorizontal ?? !1,
|
|
36412
36382
|
busy: u,
|
|
@@ -36419,7 +36389,7 @@ function TC({ trpc: e, deviceId: t, layout: n, optimistic: r }) {
|
|
|
36419
36389
|
]
|
|
36420
36390
|
});
|
|
36421
36391
|
}
|
|
36422
|
-
function
|
|
36392
|
+
function TC({ label: e, children: t }) {
|
|
36423
36393
|
return /* @__PURE__ */ v("div", {
|
|
36424
36394
|
className: "relative z-10 flex flex-col gap-1",
|
|
36425
36395
|
children: [/* @__PURE__ */ _("span", {
|
|
@@ -36428,13 +36398,13 @@ function EC({ label: e, children: t }) {
|
|
|
36428
36398
|
}), t]
|
|
36429
36399
|
});
|
|
36430
36400
|
}
|
|
36431
|
-
function
|
|
36432
|
-
return /* @__PURE__ */ _(t && e === "heat" ? xt :
|
|
36401
|
+
function EC({ mode: e, heatingOnly: t = !1, className: n }) {
|
|
36402
|
+
return /* @__PURE__ */ _(t && e === "heat" ? xt : vC[e], {
|
|
36433
36403
|
className: n,
|
|
36434
36404
|
"aria-hidden": !0
|
|
36435
36405
|
});
|
|
36436
36406
|
}
|
|
36437
|
-
function
|
|
36407
|
+
function DC({ label: e, icon: t, value: n, options: r, disabled: i, onChange: a }) {
|
|
36438
36408
|
return /* @__PURE__ */ v("div", {
|
|
36439
36409
|
className: "flex min-w-0 flex-col gap-1",
|
|
36440
36410
|
children: [/* @__PURE__ */ _("span", {
|
|
@@ -36465,7 +36435,7 @@ function OC({ label: e, icon: t, value: n, options: r, disabled: i, onChange: a
|
|
|
36465
36435
|
})]
|
|
36466
36436
|
});
|
|
36467
36437
|
}
|
|
36468
|
-
function
|
|
36438
|
+
function OC({ label: e, symbol: t, disabled: n, onClick: r }) {
|
|
36469
36439
|
return /* @__PURE__ */ _("button", {
|
|
36470
36440
|
type: "button",
|
|
36471
36441
|
"aria-label": e,
|
|
@@ -36475,12 +36445,12 @@ function kC({ label: e, symbol: t, disabled: n, onClick: r }) {
|
|
|
36475
36445
|
children: t
|
|
36476
36446
|
});
|
|
36477
36447
|
}
|
|
36478
|
-
function
|
|
36448
|
+
function kC({ value: e, min: n, max: r, step: i, accent: a, disabled: o, label: s, onPreview: c, onCommit: l }) {
|
|
36479
36449
|
let u = t(null), d = t(!1), [f, p] = h(null), m = f ?? e, g = `${Math.min(1, Math.max(0, (m - n) / (r - n))) * 100}%`, y = (t) => {
|
|
36480
36450
|
let a = u.current;
|
|
36481
36451
|
if (a === null) return e;
|
|
36482
36452
|
let o = a.getBoundingClientRect();
|
|
36483
|
-
return o.width <= 0 ? e :
|
|
36453
|
+
return o.width <= 0 ? e : gC((t - o.left) / o.width, {
|
|
36484
36454
|
min: n,
|
|
36485
36455
|
max: r
|
|
36486
36456
|
}, i);
|
|
@@ -36548,7 +36518,7 @@ function AC({ value: e, min: n, max: r, step: i, accent: a, disabled: o, label:
|
|
|
36548
36518
|
})]
|
|
36549
36519
|
});
|
|
36550
36520
|
}
|
|
36551
|
-
function
|
|
36521
|
+
function AC({ mode: e, accent: t, periodSec: n, swaying: r, forceRising: i = !1 }) {
|
|
36552
36522
|
let a = [
|
|
36553
36523
|
0,
|
|
36554
36524
|
1,
|
|
@@ -36565,7 +36535,7 @@ function jC({ mode: e, accent: t, periodSec: n, swaying: r, forceRising: i = !1
|
|
|
36565
36535
|
children: a.map((e) => /* @__PURE__ */ _("span", { className: "h-8 w-1 rounded-full bg-foreground-subtle opacity-40" }, e))
|
|
36566
36536
|
}) : e === "fan_only" ? /* @__PURE__ */ _("div", {
|
|
36567
36537
|
className: "flex h-full items-center justify-center",
|
|
36568
|
-
children: /* @__PURE__ */ _(
|
|
36538
|
+
children: /* @__PURE__ */ _(MC, {
|
|
36569
36539
|
color: t,
|
|
36570
36540
|
periodSec: Math.max(.5, n * .7),
|
|
36571
36541
|
size: 56
|
|
@@ -36592,7 +36562,7 @@ function jC({ mode: e, accent: t, periodSec: n, swaying: r, forceRising: i = !1
|
|
|
36592
36562
|
})
|
|
36593
36563
|
});
|
|
36594
36564
|
}
|
|
36595
|
-
function
|
|
36565
|
+
function jC() {
|
|
36596
36566
|
return /* @__PURE__ */ _("div", {
|
|
36597
36567
|
"data-testid": "climate-radiator",
|
|
36598
36568
|
"aria-hidden": !0,
|
|
@@ -36608,7 +36578,7 @@ function MC() {
|
|
|
36608
36578
|
].map((e) => /* @__PURE__ */ _("span", { className: "h-10 w-1.5 rounded-t-full bg-foreground-subtle" }, e))
|
|
36609
36579
|
});
|
|
36610
36580
|
}
|
|
36611
|
-
function
|
|
36581
|
+
function MC({ color: e, periodSec: t, size: n }) {
|
|
36612
36582
|
return /* @__PURE__ */ v("svg", {
|
|
36613
36583
|
width: n,
|
|
36614
36584
|
height: n,
|
|
@@ -36636,7 +36606,7 @@ function NC({ color: e, periodSec: t, size: n }) {
|
|
|
36636
36606
|
})]
|
|
36637
36607
|
});
|
|
36638
36608
|
}
|
|
36639
|
-
function
|
|
36609
|
+
function NC({ axis: e, on: t, busy: n, onToggle: r }) {
|
|
36640
36610
|
let i = x(), a = e === "vertical" ? i("uiLibrary.acPanel.vertical", "Vertical") : i("uiLibrary.acPanel.horizontal", "Horizontal"), o = e === "vertical" ? zt : Rt, s = e === "vertical" ? "acv-swing-v" : "acv-swing-h";
|
|
36641
36611
|
return /* @__PURE__ */ v("button", {
|
|
36642
36612
|
type: "button",
|
|
@@ -36656,48 +36626,48 @@ function PC({ axis: e, on: t, busy: n, onToggle: r }) {
|
|
|
36656
36626
|
}
|
|
36657
36627
|
//#endregion
|
|
36658
36628
|
//#region ../ui-library/src/composites/device-controls/thermostat-hero-card.tsx
|
|
36659
|
-
var
|
|
36660
|
-
function
|
|
36629
|
+
var PC = 5, FC = 35;
|
|
36630
|
+
function IC(e, t, n) {
|
|
36661
36631
|
return n <= t ? 0 : Math.min(1, Math.max(0, (e - t) / (n - t)));
|
|
36662
36632
|
}
|
|
36663
|
-
function
|
|
36633
|
+
function LC(e, t, n) {
|
|
36664
36634
|
return Math.round(t + e * (n - t));
|
|
36665
36635
|
}
|
|
36666
|
-
var
|
|
36667
|
-
function
|
|
36668
|
-
let t =
|
|
36669
|
-
let t = e.band.from *
|
|
36636
|
+
var RC = 176, zC = 76, BC = 2 * Math.PI * zC, VC = 270 / 360 * BC, HC = RC / 2 - zC - 10;
|
|
36637
|
+
function UC(e) {
|
|
36638
|
+
let t = RC / 2, n = RC / 2, r = BC - VC, i = e.mode === "band" ? (() => {
|
|
36639
|
+
let t = e.band.from * VC, n = Math.max(0, (e.band.to - e.band.from) * VC);
|
|
36670
36640
|
return {
|
|
36671
|
-
dasharray: `${n} ${
|
|
36641
|
+
dasharray: `${n} ${BC - n}`,
|
|
36672
36642
|
dashoffset: -t
|
|
36673
36643
|
};
|
|
36674
36644
|
})() : (() => {
|
|
36675
|
-
let t = e.fraction *
|
|
36645
|
+
let t = e.fraction * VC;
|
|
36676
36646
|
return {
|
|
36677
|
-
dasharray: `${t} ${
|
|
36647
|
+
dasharray: `${t} ${BC - t}`,
|
|
36678
36648
|
dashoffset: void 0
|
|
36679
36649
|
};
|
|
36680
36650
|
})();
|
|
36681
36651
|
return /* @__PURE__ */ v("svg", {
|
|
36682
|
-
width:
|
|
36683
|
-
height:
|
|
36684
|
-
viewBox: `0 0 ${
|
|
36652
|
+
width: RC,
|
|
36653
|
+
height: RC,
|
|
36654
|
+
viewBox: `0 0 ${RC} ${RC}`,
|
|
36685
36655
|
"aria-hidden": "true",
|
|
36686
36656
|
className: "absolute inset-0",
|
|
36687
36657
|
style: { transform: "rotate(135deg)" },
|
|
36688
36658
|
children: [/* @__PURE__ */ _("circle", {
|
|
36689
36659
|
cx: t,
|
|
36690
36660
|
cy: n,
|
|
36691
|
-
r:
|
|
36661
|
+
r: zC,
|
|
36692
36662
|
fill: "none",
|
|
36693
36663
|
stroke: "var(--color-border)",
|
|
36694
36664
|
strokeWidth: 12,
|
|
36695
|
-
strokeDasharray: `${
|
|
36665
|
+
strokeDasharray: `${VC} ${r}`,
|
|
36696
36666
|
strokeLinecap: "round"
|
|
36697
36667
|
}), /* @__PURE__ */ _("circle", {
|
|
36698
36668
|
cx: t,
|
|
36699
36669
|
cy: n,
|
|
36700
|
-
r:
|
|
36670
|
+
r: zC,
|
|
36701
36671
|
fill: "none",
|
|
36702
36672
|
stroke: e.color,
|
|
36703
36673
|
strokeWidth: 12,
|
|
@@ -36707,7 +36677,7 @@ function WC(e) {
|
|
|
36707
36677
|
})]
|
|
36708
36678
|
});
|
|
36709
36679
|
}
|
|
36710
|
-
var
|
|
36680
|
+
var WC = {
|
|
36711
36681
|
heat: "#f59e0b",
|
|
36712
36682
|
cool: "#60a5fa",
|
|
36713
36683
|
auto: "#c084fc",
|
|
@@ -36716,7 +36686,7 @@ var GC = {
|
|
|
36716
36686
|
dry: "#22d3ee",
|
|
36717
36687
|
off: "#d4d4d8"
|
|
36718
36688
|
};
|
|
36719
|
-
function
|
|
36689
|
+
function GC({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
36720
36690
|
let i = x(), a = Z({
|
|
36721
36691
|
trpc: e,
|
|
36722
36692
|
deviceId: t,
|
|
@@ -36731,14 +36701,14 @@ function KC({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
36731
36701
|
if (!l && !u) return null;
|
|
36732
36702
|
if (!l && u) return /* @__PURE__ */ _("div", {
|
|
36733
36703
|
className: "flex flex-col items-stretch gap-3 rounded-lg border border-border bg-surface p-4",
|
|
36734
|
-
children: /* @__PURE__ */ _(
|
|
36704
|
+
children: /* @__PURE__ */ _(fC, {
|
|
36735
36705
|
trpc: e,
|
|
36736
36706
|
deviceId: t,
|
|
36737
36707
|
layout: "full"
|
|
36738
36708
|
})
|
|
36739
36709
|
});
|
|
36740
36710
|
if (a.cap === void 0 || s === void 0) return null;
|
|
36741
|
-
let d = a.cap, f = !a.available, p =
|
|
36711
|
+
let d = a.cap, f = !a.available, p = WC[s.mode], m = s.mode === "heat_cool" || s.targetLow !== null && s.targetHigh !== null, h = PC, g = FC, b = !m && s.target !== null ? IC(s.target, h, g) : 0, S = m && s.targetLow !== null ? IC(s.targetLow, h, g) : 0, C = m && s.targetHigh !== null ? IC(s.targetHigh, h, g) : 0;
|
|
36742
36712
|
return /* @__PURE__ */ v("div", {
|
|
36743
36713
|
"data-mode": s.mode,
|
|
36744
36714
|
className: N("flex flex-col items-stretch gap-4 rounded-lg border border-border bg-surface p-4 transition-colors", cb[s.mode]),
|
|
@@ -36748,18 +36718,18 @@ function KC({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
36748
36718
|
children: [/* @__PURE__ */ v("div", {
|
|
36749
36719
|
className: "relative",
|
|
36750
36720
|
style: {
|
|
36751
|
-
width:
|
|
36752
|
-
height:
|
|
36721
|
+
width: RC,
|
|
36722
|
+
height: RC
|
|
36753
36723
|
},
|
|
36754
36724
|
children: [
|
|
36755
|
-
m ? /* @__PURE__ */ _(
|
|
36725
|
+
m ? /* @__PURE__ */ _(UC, {
|
|
36756
36726
|
mode: "band",
|
|
36757
36727
|
band: {
|
|
36758
36728
|
from: S,
|
|
36759
36729
|
to: C
|
|
36760
36730
|
},
|
|
36761
36731
|
color: p
|
|
36762
|
-
}) : /* @__PURE__ */ _(
|
|
36732
|
+
}) : /* @__PURE__ */ _(UC, {
|
|
36763
36733
|
mode: "fill",
|
|
36764
36734
|
fraction: b,
|
|
36765
36735
|
color: p
|
|
@@ -36769,10 +36739,10 @@ function KC({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
36769
36739
|
children: /* @__PURE__ */ _(Hy, {
|
|
36770
36740
|
fraction: S,
|
|
36771
36741
|
color: p,
|
|
36772
|
-
knobTopPx:
|
|
36742
|
+
knobTopPx: HC,
|
|
36773
36743
|
onDragFraction: (e) => {
|
|
36774
36744
|
if (f || s.targetHigh === null) return;
|
|
36775
|
-
let t = Math.min(
|
|
36745
|
+
let t = Math.min(LC(e, h, g), s.targetHigh);
|
|
36776
36746
|
c({ targetLow: t }), d.setTargetRange({
|
|
36777
36747
|
targetLow: t,
|
|
36778
36748
|
targetHigh: s.targetHigh
|
|
@@ -36784,10 +36754,10 @@ function KC({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
36784
36754
|
children: /* @__PURE__ */ _(Hy, {
|
|
36785
36755
|
fraction: C,
|
|
36786
36756
|
color: p,
|
|
36787
|
-
knobTopPx:
|
|
36757
|
+
knobTopPx: HC,
|
|
36788
36758
|
onDragFraction: (e) => {
|
|
36789
36759
|
if (f || s.targetLow === null) return;
|
|
36790
|
-
let t = Math.max(
|
|
36760
|
+
let t = Math.max(LC(e, h, g), s.targetLow);
|
|
36791
36761
|
c({ targetHigh: t }), d.setTargetRange({
|
|
36792
36762
|
targetLow: s.targetLow,
|
|
36793
36763
|
targetHigh: t
|
|
@@ -36799,10 +36769,10 @@ function KC({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
36799
36769
|
children: /* @__PURE__ */ _(Hy, {
|
|
36800
36770
|
fraction: b,
|
|
36801
36771
|
color: p,
|
|
36802
|
-
knobTopPx:
|
|
36772
|
+
knobTopPx: HC,
|
|
36803
36773
|
onDragFraction: (e) => {
|
|
36804
36774
|
if (f) return;
|
|
36805
|
-
let t =
|
|
36775
|
+
let t = LC(e, h, g);
|
|
36806
36776
|
c({ target: t }), d.setTarget({ target: t });
|
|
36807
36777
|
}
|
|
36808
36778
|
})
|
|
@@ -36848,7 +36818,7 @@ function KC({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
36848
36818
|
})
|
|
36849
36819
|
})]
|
|
36850
36820
|
}),
|
|
36851
|
-
u ? /* @__PURE__ */ _(
|
|
36821
|
+
u ? /* @__PURE__ */ _(fC, {
|
|
36852
36822
|
trpc: e,
|
|
36853
36823
|
deviceId: t,
|
|
36854
36824
|
layout: "full"
|
|
@@ -36873,13 +36843,13 @@ function KC({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
36873
36843
|
}
|
|
36874
36844
|
//#endregion
|
|
36875
36845
|
//#region ../ui-library/src/composites/device-controls/lock-hero-card.tsx
|
|
36876
|
-
function
|
|
36846
|
+
function KC(e) {
|
|
36877
36847
|
return e === "locked" || e === "locking";
|
|
36878
36848
|
}
|
|
36879
|
-
function
|
|
36849
|
+
function qC(e) {
|
|
36880
36850
|
return e === "jammed";
|
|
36881
36851
|
}
|
|
36882
|
-
var
|
|
36852
|
+
var JC = {
|
|
36883
36853
|
locked: {
|
|
36884
36854
|
colorClass: "border-success/30 bg-success/10 text-success",
|
|
36885
36855
|
icon: "locked"
|
|
@@ -36901,8 +36871,8 @@ var YC = {
|
|
|
36901
36871
|
icon: "locked"
|
|
36902
36872
|
}
|
|
36903
36873
|
};
|
|
36904
|
-
function
|
|
36905
|
-
let t =
|
|
36874
|
+
function YC({ state: e }) {
|
|
36875
|
+
let t = JC[e];
|
|
36906
36876
|
return /* @__PURE__ */ _("div", {
|
|
36907
36877
|
"data-testid": "lock-glyph",
|
|
36908
36878
|
"data-state": e,
|
|
@@ -36916,13 +36886,13 @@ function XC({ state: e }) {
|
|
|
36916
36886
|
})
|
|
36917
36887
|
});
|
|
36918
36888
|
}
|
|
36919
|
-
function
|
|
36889
|
+
function XC({ state: e }) {
|
|
36920
36890
|
return /* @__PURE__ */ _("span", {
|
|
36921
|
-
className: N("text-sm font-medium capitalize",
|
|
36891
|
+
className: N("text-sm font-medium capitalize", qC(e) ? "text-danger" : "text-foreground-muted"),
|
|
36922
36892
|
children: e
|
|
36923
36893
|
});
|
|
36924
36894
|
}
|
|
36925
|
-
function
|
|
36895
|
+
function ZC({ busy: e, onOpen: t }) {
|
|
36926
36896
|
let n = x();
|
|
36927
36897
|
return /* @__PURE__ */ v("button", {
|
|
36928
36898
|
type: "button",
|
|
@@ -36939,15 +36909,15 @@ function QC({ busy: e, onOpen: t }) {
|
|
|
36939
36909
|
}), n("uiLibrary.lockHeroCard.open", "Open")]
|
|
36940
36910
|
});
|
|
36941
36911
|
}
|
|
36942
|
-
function
|
|
36912
|
+
function QC({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
36943
36913
|
let { cap: i, slice: a, available: o } = Z({
|
|
36944
36914
|
trpc: e,
|
|
36945
36915
|
deviceId: t,
|
|
36946
36916
|
cap: (e) => e.lockControl,
|
|
36947
36917
|
slice: (e) => e.state.lockControl
|
|
36948
36918
|
}), { display: s, applyOptimistic: c } = $(a, { enabled: r ?? !0 });
|
|
36949
|
-
if (i === void 0 || s === void 0 || !(s.state in
|
|
36950
|
-
let l =
|
|
36919
|
+
if (i === void 0 || s === void 0 || !(s.state in JC)) return null;
|
|
36920
|
+
let l = KC(s.state), u = qC(s.state) || !o, d = n?.includes(C.LockOpen) === !0, f = () => {
|
|
36951
36921
|
u || (l ? (c({ state: "unlocking" }), i.unlock({})) : (c({ state: "locking" }), i.lock({})));
|
|
36952
36922
|
}, p = () => {
|
|
36953
36923
|
u || i.open({});
|
|
@@ -36957,7 +36927,7 @@ function $C({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
36957
36927
|
children: [
|
|
36958
36928
|
/* @__PURE__ */ v("div", {
|
|
36959
36929
|
className: "flex flex-col items-center gap-2",
|
|
36960
|
-
children: [/* @__PURE__ */ _(
|
|
36930
|
+
children: [/* @__PURE__ */ _(YC, { state: s.state }), /* @__PURE__ */ _(XC, { state: s.state })]
|
|
36961
36931
|
}),
|
|
36962
36932
|
/* @__PURE__ */ _("div", {
|
|
36963
36933
|
className: N(u && "pointer-events-none opacity-40"),
|
|
@@ -36969,7 +36939,7 @@ function $C({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
36969
36939
|
}),
|
|
36970
36940
|
d && /* @__PURE__ */ _("div", {
|
|
36971
36941
|
className: "flex justify-center",
|
|
36972
|
-
children: /* @__PURE__ */ _(
|
|
36942
|
+
children: /* @__PURE__ */ _(ZC, {
|
|
36973
36943
|
busy: u,
|
|
36974
36944
|
onOpen: p
|
|
36975
36945
|
})
|
|
@@ -36979,15 +36949,15 @@ function $C({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
36979
36949
|
}
|
|
36980
36950
|
//#endregion
|
|
36981
36951
|
//#region ../ui-library/src/composites/device-controls/light-hero-card.tsx
|
|
36982
|
-
var
|
|
36983
|
-
function
|
|
36952
|
+
var $C = 500, ew = 150, tw = "linear-gradient(90deg, #9ec9ff, #ffffff, #ffb24d)";
|
|
36953
|
+
function nw(e, t, n) {
|
|
36984
36954
|
return n <= t ? 0 : Math.min(1, Math.max(0, (e - t) / (n - t)));
|
|
36985
36955
|
}
|
|
36986
|
-
function
|
|
36987
|
-
return
|
|
36956
|
+
function rw(e) {
|
|
36957
|
+
return nw(e, ew, $C);
|
|
36988
36958
|
}
|
|
36989
|
-
var
|
|
36990
|
-
function
|
|
36959
|
+
var iw = "#f4b740", aw = "#d4d4d8";
|
|
36960
|
+
function ow({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
36991
36961
|
let i = x(), a = Z({
|
|
36992
36962
|
trpc: e,
|
|
36993
36963
|
deviceId: t,
|
|
@@ -37005,7 +36975,7 @@ function sw({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
37005
36975
|
slice: (e) => e.state.color
|
|
37006
36976
|
}), c = $(a.slice, { enabled: r ?? !0 }), l = $(o.slice, { enabled: r ?? !0 }), u = $(s.slice, { enabled: r ?? !0 });
|
|
37007
36977
|
if (a.cap === void 0 || c.display === void 0) return null;
|
|
37008
|
-
let d = c.display.on === !0, f = !a.available, p = l.display?.percentage ?? 0, m = !o.available, h = d ? p / 100 : 0, g = d ?
|
|
36978
|
+
let d = c.display.on === !0, f = !a.available, p = l.display?.percentage ?? 0, m = !o.available, h = d ? p / 100 : 0, g = d ? iw : aw, y = (n?.includes(C.LightColorMired) ?? !1) && s.cap !== void 0, b = u.display?.mireds, S = !s.available;
|
|
37009
36979
|
return /* @__PURE__ */ v("div", {
|
|
37010
36980
|
className: "flex flex-col items-stretch gap-4 rounded-lg border border-border bg-surface p-4",
|
|
37011
36981
|
children: [
|
|
@@ -37084,11 +37054,11 @@ function sw({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
37084
37054
|
/* @__PURE__ */ _("input", {
|
|
37085
37055
|
"aria-label": i("uiLibrary.lightHeroCard.colourTemperature", "Colour temperature"),
|
|
37086
37056
|
type: "range",
|
|
37087
|
-
min:
|
|
37088
|
-
max:
|
|
37057
|
+
min: ew,
|
|
37058
|
+
max: $C,
|
|
37089
37059
|
step: 1,
|
|
37090
37060
|
className: "w-full",
|
|
37091
|
-
value: b ??
|
|
37061
|
+
value: b ?? $C,
|
|
37092
37062
|
disabled: S || !d,
|
|
37093
37063
|
onChange: (e) => {
|
|
37094
37064
|
let t = Number(e.target.value);
|
|
@@ -37104,8 +37074,8 @@ function sw({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
37104
37074
|
/* @__PURE__ */ _("div", {
|
|
37105
37075
|
className: "pointer-events-none mt-1",
|
|
37106
37076
|
children: /* @__PURE__ */ _(Uy, {
|
|
37107
|
-
fraction: b === void 0 ? .5 :
|
|
37108
|
-
color:
|
|
37077
|
+
fraction: b === void 0 ? .5 : rw(b),
|
|
37078
|
+
color: tw
|
|
37109
37079
|
})
|
|
37110
37080
|
})
|
|
37111
37081
|
]
|
|
@@ -37116,8 +37086,8 @@ function sw({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
37116
37086
|
}
|
|
37117
37087
|
//#endregion
|
|
37118
37088
|
//#region ../ui-library/src/composites/device-controls/fan-hero-card.tsx
|
|
37119
|
-
var
|
|
37120
|
-
function
|
|
37089
|
+
var sw = "#3aa6a0", cw = "#d4d4d8";
|
|
37090
|
+
function lw({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
37121
37091
|
let i = x(), a = Z({
|
|
37122
37092
|
trpc: e,
|
|
37123
37093
|
deviceId: t,
|
|
@@ -37130,7 +37100,7 @@ function uw({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
37130
37100
|
slice: (e) => e.state.fanControl
|
|
37131
37101
|
}), s = $(a.slice, { enabled: r ?? !0 }), c = $(o.slice, { enabled: r ?? !0 });
|
|
37132
37102
|
if (a.cap === void 0 || s.display === void 0) return null;
|
|
37133
|
-
let l = s.display.on === !0, u = !a.available, d = c.display?.percentage ?? 0, f = !o.available, p = l ? d / 100 : 0, m = l ?
|
|
37103
|
+
let l = s.display.on === !0, u = !a.available, d = c.display?.percentage ?? 0, f = !o.available, p = l ? d / 100 : 0, m = l ? sw : cw, h = n?.includes(C.FanSpeed) ?? !1, g = (n?.includes(C.FanOscillating) ?? !1) && o.cap !== void 0, y = c.display?.availablePresets ?? [], b = (n?.includes(C.FanPreset) ?? !1) && o.cap !== void 0 && y.length > 0, S = c.display?.preset ?? "", w = c.display?.oscillating === !0, T = () => {
|
|
37134
37104
|
if (u) return;
|
|
37135
37105
|
let e = !l;
|
|
37136
37106
|
s.applyOptimistic({ on: e }), a.cap?.setState({ on: e });
|
|
@@ -37229,7 +37199,7 @@ function uw({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
37229
37199
|
}
|
|
37230
37200
|
//#endregion
|
|
37231
37201
|
//#region ../ui-library/src/composites/device-controls/switch-hero-card.tsx
|
|
37232
|
-
function
|
|
37202
|
+
function uw({ trpc: e, deviceId: t, optimistic: n }) {
|
|
37233
37203
|
let r = x(), { cap: i, slice: a, available: o } = Z({
|
|
37234
37204
|
trpc: e,
|
|
37235
37205
|
deviceId: t,
|
|
@@ -37268,18 +37238,18 @@ function dw({ trpc: e, deviceId: t, optimistic: n }) {
|
|
|
37268
37238
|
}
|
|
37269
37239
|
//#endregion
|
|
37270
37240
|
//#region ../ui-library/src/composites/device-controls/media-player-hero-card.tsx
|
|
37271
|
-
function
|
|
37241
|
+
function dw(e) {
|
|
37272
37242
|
return e === "playing" || e === "buffering" ? "pause" : "play";
|
|
37273
37243
|
}
|
|
37274
|
-
function
|
|
37244
|
+
function fw(e, t) {
|
|
37275
37245
|
return e === null || t === null || t <= 0 ? 0 : Math.min(1, Math.max(0, e / t));
|
|
37276
37246
|
}
|
|
37277
|
-
function
|
|
37247
|
+
function pw(e) {
|
|
37278
37248
|
if (e === null) return "--:--";
|
|
37279
37249
|
let t = Math.floor(e / 1e3);
|
|
37280
37250
|
return `${Math.floor(t / 60)}:${(t % 60).toString().padStart(2, "0")}`;
|
|
37281
37251
|
}
|
|
37282
|
-
function
|
|
37252
|
+
function mw({ title: e, subtitle: t }) {
|
|
37283
37253
|
let n = x();
|
|
37284
37254
|
return /* @__PURE__ */ v("div", {
|
|
37285
37255
|
className: "flex flex-col items-center gap-1 text-center",
|
|
@@ -37299,7 +37269,7 @@ function hw({ title: e, subtitle: t }) {
|
|
|
37299
37269
|
]
|
|
37300
37270
|
});
|
|
37301
37271
|
}
|
|
37302
|
-
function
|
|
37272
|
+
function hw({ label: e, busy: t, onPress: n, children: r, primary: i }) {
|
|
37303
37273
|
return /* @__PURE__ */ _("button", {
|
|
37304
37274
|
type: "button",
|
|
37305
37275
|
"aria-label": e,
|
|
@@ -37312,7 +37282,7 @@ function gw({ label: e, busy: t, onPress: n, children: r, primary: i }) {
|
|
|
37312
37282
|
children: r
|
|
37313
37283
|
});
|
|
37314
37284
|
}
|
|
37315
|
-
function
|
|
37285
|
+
function gw({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
37316
37286
|
let i = x(), { cap: a, slice: o, available: s } = Z({
|
|
37317
37287
|
trpc: e,
|
|
37318
37288
|
deviceId: t,
|
|
@@ -37320,13 +37290,13 @@ function _w({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
37320
37290
|
slice: (e) => e.state.mediaPlayer
|
|
37321
37291
|
}), { display: c, applyOptimistic: l } = $(o, { enabled: r ?? !0 });
|
|
37322
37292
|
if (a === void 0 || c === void 0) return null;
|
|
37323
|
-
let u = !s, d =
|
|
37293
|
+
let u = !s, d = dw(c.state), f = (n?.includes(C.MediaPlayerSeek) ?? !1) && c.durationMs !== null && c.durationMs > 0, p = n?.includes(C.MediaPlayerNext) ?? !1, m = n?.includes(C.MediaPlayerPrevious) ?? !1, h = (n?.includes(C.MediaPlayerVolume) ?? !1) && c.volumeLevel !== null, g = () => {
|
|
37324
37294
|
u || (d === "play" ? (l({ state: "playing" }), a.play({})) : (l({ state: "paused" }), a.pause({})));
|
|
37325
|
-
}, y = c.currentMedia?.artist ?? c.currentMedia?.album ?? null, b =
|
|
37295
|
+
}, y = c.currentMedia?.artist ?? c.currentMedia?.album ?? null, b = fw(c.positionMs, c.durationMs), S = c.volumeLevel ?? 0;
|
|
37326
37296
|
return /* @__PURE__ */ v("div", {
|
|
37327
37297
|
className: "flex flex-col items-stretch gap-4 rounded-lg border border-border bg-surface p-6",
|
|
37328
37298
|
children: [
|
|
37329
|
-
/* @__PURE__ */ _(
|
|
37299
|
+
/* @__PURE__ */ _(mw, {
|
|
37330
37300
|
title: c.currentMedia?.title ?? null,
|
|
37331
37301
|
subtitle: y
|
|
37332
37302
|
}),
|
|
@@ -37362,13 +37332,13 @@ function _w({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
37362
37332
|
]
|
|
37363
37333
|
}), /* @__PURE__ */ v("div", {
|
|
37364
37334
|
className: "flex justify-between text-[11px] tabular-nums text-foreground-subtle",
|
|
37365
|
-
children: [/* @__PURE__ */ _("span", { children:
|
|
37335
|
+
children: [/* @__PURE__ */ _("span", { children: pw(c.positionMs) }), /* @__PURE__ */ _("span", { children: pw(c.durationMs) })]
|
|
37366
37336
|
})]
|
|
37367
37337
|
}),
|
|
37368
37338
|
/* @__PURE__ */ v("div", {
|
|
37369
37339
|
className: "flex items-center justify-center gap-4",
|
|
37370
37340
|
children: [
|
|
37371
|
-
m && /* @__PURE__ */ _(
|
|
37341
|
+
m && /* @__PURE__ */ _(hw, {
|
|
37372
37342
|
label: i("uiLibrary.mediaPlayerHero.previous", "Previous"),
|
|
37373
37343
|
busy: u,
|
|
37374
37344
|
onPress: () => void a.previous({}),
|
|
@@ -37377,7 +37347,7 @@ function _w({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
37377
37347
|
"aria-hidden": "true"
|
|
37378
37348
|
})
|
|
37379
37349
|
}),
|
|
37380
|
-
/* @__PURE__ */ _(
|
|
37350
|
+
/* @__PURE__ */ _(hw, {
|
|
37381
37351
|
label: d === "play" ? i("uiLibrary.mediaPlayerHero.play", "Play") : i("uiLibrary.mediaPlayerHero.pause", "Pause"),
|
|
37382
37352
|
busy: u,
|
|
37383
37353
|
onPress: g,
|
|
@@ -37387,7 +37357,7 @@ function _w({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
37387
37357
|
"aria-hidden": "true"
|
|
37388
37358
|
})
|
|
37389
37359
|
}),
|
|
37390
|
-
p && /* @__PURE__ */ _(
|
|
37360
|
+
p && /* @__PURE__ */ _(hw, {
|
|
37391
37361
|
label: i("uiLibrary.mediaPlayerHero.next", "Next"),
|
|
37392
37362
|
busy: u,
|
|
37393
37363
|
onPress: () => void a.next({}),
|
|
@@ -37461,7 +37431,7 @@ function _w({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
37461
37431
|
//#endregion
|
|
37462
37432
|
//#region ../ui-library/src/composites/device-controls/alarm-hero-card.tsx
|
|
37463
37433
|
e();
|
|
37464
|
-
var
|
|
37434
|
+
var _w = {
|
|
37465
37435
|
disarmed: {
|
|
37466
37436
|
colorClass: "border-border bg-surface-subtle text-foreground-subtle",
|
|
37467
37437
|
icon: "disarmed"
|
|
@@ -37503,7 +37473,7 @@ var vw = {
|
|
|
37503
37473
|
icon: "triggered"
|
|
37504
37474
|
}
|
|
37505
37475
|
};
|
|
37506
|
-
function
|
|
37476
|
+
function vw(e, t) {
|
|
37507
37477
|
switch (e) {
|
|
37508
37478
|
case "home": return t("uiLibrary.alarmHeroCard.modeHome", "Home");
|
|
37509
37479
|
case "away": return t("uiLibrary.alarmHeroCard.modeAway", "Away");
|
|
@@ -37512,7 +37482,7 @@ function yw(e, t) {
|
|
|
37512
37482
|
case "custom_bypass": return t("uiLibrary.alarmHeroCard.modeBypass", "Bypass");
|
|
37513
37483
|
}
|
|
37514
37484
|
}
|
|
37515
|
-
function
|
|
37485
|
+
function yw(e, t) {
|
|
37516
37486
|
switch (e) {
|
|
37517
37487
|
case "disarmed": return t("uiLibrary.alarmHeroCard.stateDisarmed", "Disarmed");
|
|
37518
37488
|
case "armed_home": return t("uiLibrary.alarmHeroCard.stateArmedHome", "Armed Home");
|
|
@@ -37526,19 +37496,19 @@ function bw(e, t) {
|
|
|
37526
37496
|
case "triggered": return t("uiLibrary.alarmHeroCard.stateTriggered", "Triggered");
|
|
37527
37497
|
}
|
|
37528
37498
|
}
|
|
37529
|
-
function
|
|
37499
|
+
function bw(e) {
|
|
37530
37500
|
return e.startsWith("armed_");
|
|
37531
37501
|
}
|
|
37532
|
-
function
|
|
37502
|
+
function xw(e) {
|
|
37533
37503
|
return e === "arming" || e === "disarming";
|
|
37534
37504
|
}
|
|
37535
|
-
function
|
|
37505
|
+
function Sw({ icon: e, sizeClass: t = "h-8 w-8" }) {
|
|
37536
37506
|
return _(e === "disarmed" ? tn : e === "triggered" ? $t : e === "pending" ? nn : en, {
|
|
37537
37507
|
className: t,
|
|
37538
37508
|
"aria-hidden": "true"
|
|
37539
37509
|
});
|
|
37540
37510
|
}
|
|
37541
|
-
function
|
|
37511
|
+
function Cw({ label: e, active: t, busy: n, onSelect: r }) {
|
|
37542
37512
|
return /* @__PURE__ */ _("button", {
|
|
37543
37513
|
type: "button",
|
|
37544
37514
|
"aria-label": e,
|
|
@@ -37551,27 +37521,27 @@ function ww({ label: e, active: t, busy: n, onSelect: r }) {
|
|
|
37551
37521
|
children: e
|
|
37552
37522
|
});
|
|
37553
37523
|
}
|
|
37554
|
-
function
|
|
37555
|
-
let a = x(), o =
|
|
37524
|
+
function ww({ state: e, availableModes: t, busy: n, onDisarm: r, onArm: i }) {
|
|
37525
|
+
let a = x(), o = bw(e), s = xw(e);
|
|
37556
37526
|
return /* @__PURE__ */ v("div", {
|
|
37557
37527
|
className: N("flex min-w-0 items-stretch gap-1 rounded-lg border border-border bg-surface-subtle p-1"),
|
|
37558
|
-
children: [/* @__PURE__ */ _(
|
|
37528
|
+
children: [/* @__PURE__ */ _(Cw, {
|
|
37559
37529
|
label: a("uiLibrary.alarmHeroCard.disarm", "Disarm"),
|
|
37560
37530
|
active: !o && !s,
|
|
37561
37531
|
busy: n,
|
|
37562
37532
|
onSelect: r
|
|
37563
|
-
}), t.map((t) => /* @__PURE__ */ _(
|
|
37564
|
-
label:
|
|
37533
|
+
}), t.map((t) => /* @__PURE__ */ _(Cw, {
|
|
37534
|
+
label: vw(t, a),
|
|
37565
37535
|
active: !s && e === `armed_${t}`,
|
|
37566
37536
|
busy: n,
|
|
37567
37537
|
onSelect: () => i(t)
|
|
37568
37538
|
}, t))]
|
|
37569
37539
|
});
|
|
37570
37540
|
}
|
|
37571
|
-
function
|
|
37541
|
+
function Tw(e) {
|
|
37572
37542
|
return e instanceof Error ? e.message : String(e);
|
|
37573
37543
|
}
|
|
37574
|
-
function
|
|
37544
|
+
function Ew(e, n, r) {
|
|
37575
37545
|
let { cap: a, slice: o, available: s } = Z({
|
|
37576
37546
|
trpc: e,
|
|
37577
37547
|
deviceId: n,
|
|
@@ -37590,33 +37560,33 @@ function Dw(e, n, r) {
|
|
|
37590
37560
|
if (a === void 0 || g) return;
|
|
37591
37561
|
let e = ++m.current;
|
|
37592
37562
|
l({ state: "disarming" }), a.disarm({}).catch((t) => {
|
|
37593
|
-
m.current === e && (u(), f(
|
|
37563
|
+
m.current === e && (u(), f(Tw(t)));
|
|
37594
37564
|
});
|
|
37595
37565
|
},
|
|
37596
37566
|
handleArm: (e) => {
|
|
37597
37567
|
if (a === void 0 || g) return;
|
|
37598
37568
|
let t = ++m.current;
|
|
37599
37569
|
l({ state: "arming" }), a.arm({ mode: e }).catch((e) => {
|
|
37600
|
-
m.current === t && (u(), f(
|
|
37570
|
+
m.current === t && (u(), f(Tw(e)));
|
|
37601
37571
|
});
|
|
37602
37572
|
},
|
|
37603
37573
|
error: d,
|
|
37604
37574
|
clearError: p
|
|
37605
37575
|
};
|
|
37606
37576
|
}
|
|
37607
|
-
function
|
|
37608
|
-
let r = x(), { display: i, capPresent: a, busy: o, handleDisarm: s, handleArm: c, error: l } =
|
|
37577
|
+
function Dw({ trpc: e, deviceId: t, optimistic: n }) {
|
|
37578
|
+
let r = x(), { display: i, capPresent: a, busy: o, handleDisarm: s, handleArm: c, error: l } = Ew(e, t, n);
|
|
37609
37579
|
if (!a || i === void 0) return null;
|
|
37610
|
-
let u =
|
|
37580
|
+
let u = _w[i.state], d = bw(i.state) ? i.state.replace("armed_", "") : "";
|
|
37611
37581
|
return /* @__PURE__ */ v("div", {
|
|
37612
37582
|
className: "flex min-w-0 items-center gap-2",
|
|
37613
37583
|
children: [
|
|
37614
37584
|
/* @__PURE__ */ v("span", {
|
|
37615
|
-
className: N("inline-flex shrink-0 items-center gap-1 rounded-md border px-1.5 py-0.5 text-[11px] font-medium whitespace-nowrap", u.colorClass,
|
|
37616
|
-
children: [/* @__PURE__ */ _(
|
|
37585
|
+
className: N("inline-flex shrink-0 items-center gap-1 rounded-md border px-1.5 py-0.5 text-[11px] font-medium whitespace-nowrap", u.colorClass, xw(i.state) && "animate-pulse"),
|
|
37586
|
+
children: [/* @__PURE__ */ _(Sw, {
|
|
37617
37587
|
icon: u.icon,
|
|
37618
37588
|
sizeClass: "h-3 w-3"
|
|
37619
|
-
}),
|
|
37589
|
+
}), yw(i.state, r)]
|
|
37620
37590
|
}),
|
|
37621
37591
|
/* @__PURE__ */ v("select", {
|
|
37622
37592
|
"aria-label": r("uiLibrary.alarmHeroCard.alarmMode", "Alarm mode"),
|
|
@@ -37634,7 +37604,7 @@ function Ow({ trpc: e, deviceId: t, optimistic: n }) {
|
|
|
37634
37604
|
children: r("uiLibrary.alarmHeroCard.disarm", "Disarm")
|
|
37635
37605
|
}), i.availableModes.map((e) => /* @__PURE__ */ _("option", {
|
|
37636
37606
|
value: e,
|
|
37637
|
-
children:
|
|
37607
|
+
children: vw(e, r)
|
|
37638
37608
|
}, e))]
|
|
37639
37609
|
}),
|
|
37640
37610
|
l !== null && /* @__PURE__ */ _("span", {
|
|
@@ -37650,10 +37620,10 @@ function Ow({ trpc: e, deviceId: t, optimistic: n }) {
|
|
|
37650
37620
|
]
|
|
37651
37621
|
});
|
|
37652
37622
|
}
|
|
37653
|
-
function
|
|
37654
|
-
let r = x(), { display: i, capPresent: a, busy: o, handleDisarm: s, handleArm: c, error: l, clearError: u } =
|
|
37623
|
+
function Ow({ trpc: e, deviceId: t, optimistic: n }) {
|
|
37624
|
+
let r = x(), { display: i, capPresent: a, busy: o, handleDisarm: s, handleArm: c, error: l, clearError: u } = Ew(e, t, n);
|
|
37655
37625
|
if (!a || i === void 0) return null;
|
|
37656
|
-
let d =
|
|
37626
|
+
let d = _w[i.state];
|
|
37657
37627
|
return /* @__PURE__ */ v("div", {
|
|
37658
37628
|
className: "flex flex-col items-stretch gap-4 rounded-lg border border-border bg-surface p-6",
|
|
37659
37629
|
children: [
|
|
@@ -37662,14 +37632,14 @@ function kw({ trpc: e, deviceId: t, optimistic: n }) {
|
|
|
37662
37632
|
children: [/* @__PURE__ */ _("div", {
|
|
37663
37633
|
"data-testid": "alarm-state",
|
|
37664
37634
|
"data-state": i.state,
|
|
37665
|
-
className: N("flex h-16 w-16 items-center justify-center rounded-full border-2", d.colorClass,
|
|
37666
|
-
children: /* @__PURE__ */ _(
|
|
37635
|
+
className: N("flex h-16 w-16 items-center justify-center rounded-full border-2", d.colorClass, xw(i.state) && "animate-pulse"),
|
|
37636
|
+
children: /* @__PURE__ */ _(Sw, { icon: d.icon })
|
|
37667
37637
|
}), /* @__PURE__ */ _("span", {
|
|
37668
37638
|
className: N("text-sm font-medium", d.colorClass, "border-0 bg-transparent"),
|
|
37669
|
-
children:
|
|
37639
|
+
children: yw(i.state, r)
|
|
37670
37640
|
})]
|
|
37671
37641
|
}),
|
|
37672
|
-
/* @__PURE__ */ _(
|
|
37642
|
+
/* @__PURE__ */ _(ww, {
|
|
37673
37643
|
state: i.state,
|
|
37674
37644
|
availableModes: i.availableModes,
|
|
37675
37645
|
busy: o,
|
|
@@ -37695,20 +37665,20 @@ function kw({ trpc: e, deviceId: t, optimistic: n }) {
|
|
|
37695
37665
|
}
|
|
37696
37666
|
//#endregion
|
|
37697
37667
|
//#region ../ui-library/src/composites/device-controls/script-automation-controls.tsx
|
|
37698
|
-
function
|
|
37668
|
+
function kw(e, t, n = b) {
|
|
37699
37669
|
if (e <= 0) return null;
|
|
37700
37670
|
let r = Math.max(0, Math.round((t - e) / 1e3));
|
|
37701
37671
|
return r < 60 ? n("uiLibrary.scriptAutomationControls.justNow", "just now") : r < 3600 ? n("uiLibrary.scriptAutomationControls.minAgo", "{{count}} min ago", { count: Math.floor(r / 60) }) : r < 86400 ? n("uiLibrary.scriptAutomationControls.hAgo", "{{count}} h ago", { count: Math.floor(r / 3600) }) : new Date(e).toLocaleDateString();
|
|
37702
37672
|
}
|
|
37703
|
-
function
|
|
37704
|
-
let n = x(), r =
|
|
37673
|
+
function Aw({ atMs: e, neverLabel: t }) {
|
|
37674
|
+
let n = x(), r = kw(e, Date.now(), n);
|
|
37705
37675
|
return /* @__PURE__ */ _("span", {
|
|
37706
37676
|
className: "text-xs text-foreground-subtle",
|
|
37707
37677
|
"data-testid": "last-run",
|
|
37708
37678
|
children: r === null ? t : r
|
|
37709
37679
|
});
|
|
37710
37680
|
}
|
|
37711
|
-
function
|
|
37681
|
+
function jw({ error: e }) {
|
|
37712
37682
|
return e === null || e === "" ? null : /* @__PURE__ */ v("span", {
|
|
37713
37683
|
className: "inline-flex items-center gap-1 text-xs text-danger",
|
|
37714
37684
|
title: e,
|
|
@@ -37722,7 +37692,7 @@ function Mw({ error: e }) {
|
|
|
37722
37692
|
})]
|
|
37723
37693
|
});
|
|
37724
37694
|
}
|
|
37725
|
-
function
|
|
37695
|
+
function Mw(e, t, n) {
|
|
37726
37696
|
let { cap: r, slice: i, available: a } = Z({
|
|
37727
37697
|
trpc: e,
|
|
37728
37698
|
deviceId: t,
|
|
@@ -37742,7 +37712,7 @@ function Nw(e, t, n) {
|
|
|
37742
37712
|
}
|
|
37743
37713
|
};
|
|
37744
37714
|
}
|
|
37745
|
-
function
|
|
37715
|
+
function Nw({ running: e, busy: t, large: n, onRun: r, onStop: i }) {
|
|
37746
37716
|
let a = x(), o = e ? a("uiLibrary.scriptAutomationControls.stop", "Stop") : a("uiLibrary.scriptAutomationControls.run", "Run");
|
|
37747
37717
|
return /* @__PURE__ */ v("button", {
|
|
37748
37718
|
type: "button",
|
|
@@ -37761,24 +37731,24 @@ function Pw({ running: e, busy: t, large: n, onRun: r, onStop: i }) {
|
|
|
37761
37731
|
}), /* @__PURE__ */ _("span", { children: o })]
|
|
37762
37732
|
});
|
|
37763
37733
|
}
|
|
37764
|
-
function
|
|
37765
|
-
let r = x(), { display: i, capPresent: a, busy: o, running: s, run: c, stop: l } =
|
|
37734
|
+
function Pw({ trpc: e, deviceId: t, optimistic: n }) {
|
|
37735
|
+
let r = x(), { display: i, capPresent: a, busy: o, running: s, run: c, stop: l } = Mw(e, t, n);
|
|
37766
37736
|
return !a || i === void 0 ? null : /* @__PURE__ */ v("div", {
|
|
37767
37737
|
className: "flex min-w-0 items-center gap-2",
|
|
37768
|
-
children: [/* @__PURE__ */ _(
|
|
37738
|
+
children: [/* @__PURE__ */ _(Nw, {
|
|
37769
37739
|
running: s,
|
|
37770
37740
|
busy: o,
|
|
37771
37741
|
large: !1,
|
|
37772
37742
|
onRun: c,
|
|
37773
37743
|
onStop: l
|
|
37774
|
-
}), /* @__PURE__ */ _(
|
|
37744
|
+
}), /* @__PURE__ */ _(Aw, {
|
|
37775
37745
|
atMs: i.lastRunAt,
|
|
37776
37746
|
neverLabel: r("uiLibrary.scriptAutomationControls.neverRun", "never run")
|
|
37777
37747
|
})]
|
|
37778
37748
|
});
|
|
37779
37749
|
}
|
|
37780
|
-
function
|
|
37781
|
-
let r = x(), { display: i, capPresent: a, busy: o, running: s, run: c, stop: l } =
|
|
37750
|
+
function Fw({ trpc: e, deviceId: t, optimistic: n }) {
|
|
37751
|
+
let r = x(), { display: i, capPresent: a, busy: o, running: s, run: c, stop: l } = Mw(e, t, n);
|
|
37782
37752
|
return !a || i === void 0 ? null : /* @__PURE__ */ v("div", {
|
|
37783
37753
|
className: "flex flex-col items-stretch gap-4 rounded-lg border border-border bg-surface p-6",
|
|
37784
37754
|
children: [/* @__PURE__ */ v("div", {
|
|
@@ -37797,15 +37767,15 @@ function Iw({ trpc: e, deviceId: t, optimistic: n }) {
|
|
|
37797
37767
|
className: "text-sm font-medium",
|
|
37798
37768
|
children: s ? r("uiLibrary.scriptAutomationControls.running", "Running") : r("uiLibrary.scriptAutomationControls.idle", "Idle")
|
|
37799
37769
|
}),
|
|
37800
|
-
/* @__PURE__ */ _(
|
|
37770
|
+
/* @__PURE__ */ _(Aw, {
|
|
37801
37771
|
atMs: i.lastRunAt,
|
|
37802
37772
|
neverLabel: r("uiLibrary.scriptAutomationControls.neverRun", "never run")
|
|
37803
37773
|
}),
|
|
37804
|
-
/* @__PURE__ */ _(
|
|
37774
|
+
/* @__PURE__ */ _(jw, { error: i.lastError })
|
|
37805
37775
|
]
|
|
37806
37776
|
}), /* @__PURE__ */ _("div", {
|
|
37807
37777
|
className: "flex justify-center",
|
|
37808
|
-
children: /* @__PURE__ */ _(
|
|
37778
|
+
children: /* @__PURE__ */ _(Nw, {
|
|
37809
37779
|
running: s,
|
|
37810
37780
|
busy: o,
|
|
37811
37781
|
large: !0,
|
|
@@ -37815,7 +37785,7 @@ function Iw({ trpc: e, deviceId: t, optimistic: n }) {
|
|
|
37815
37785
|
})]
|
|
37816
37786
|
});
|
|
37817
37787
|
}
|
|
37818
|
-
function
|
|
37788
|
+
function Iw(e, t, n) {
|
|
37819
37789
|
let { cap: r, slice: i, available: a } = Z({
|
|
37820
37790
|
trpc: e,
|
|
37821
37791
|
deviceId: t,
|
|
@@ -37834,7 +37804,7 @@ function Lw(e, t, n) {
|
|
|
37834
37804
|
}
|
|
37835
37805
|
};
|
|
37836
37806
|
}
|
|
37837
|
-
function
|
|
37807
|
+
function Lw({ enabled: e, busy: t, onToggle: n }) {
|
|
37838
37808
|
let r = x();
|
|
37839
37809
|
return /* @__PURE__ */ _("button", {
|
|
37840
37810
|
type: "button",
|
|
@@ -37850,7 +37820,7 @@ function Rw({ enabled: e, busy: t, onToggle: n }) {
|
|
|
37850
37820
|
children: e ? r("uiLibrary.scriptAutomationControls.enabled", "Enabled") : r("uiLibrary.scriptAutomationControls.disabled", "Disabled")
|
|
37851
37821
|
});
|
|
37852
37822
|
}
|
|
37853
|
-
function
|
|
37823
|
+
function Rw({ busy: e, large: t, onTrigger: n }) {
|
|
37854
37824
|
let r = x();
|
|
37855
37825
|
return /* @__PURE__ */ v("button", {
|
|
37856
37826
|
type: "button",
|
|
@@ -37868,23 +37838,23 @@ function zw({ busy: e, large: t, onTrigger: n }) {
|
|
|
37868
37838
|
}), /* @__PURE__ */ _("span", { children: r("uiLibrary.scriptAutomationControls.trigger", "Trigger") })]
|
|
37869
37839
|
});
|
|
37870
37840
|
}
|
|
37871
|
-
function
|
|
37872
|
-
let { display: r, capPresent: i, busy: a, setEnabled: o, trigger: s } =
|
|
37841
|
+
function zw({ trpc: e, deviceId: t, optimistic: n }) {
|
|
37842
|
+
let { display: r, capPresent: i, busy: a, setEnabled: o, trigger: s } = Iw(e, t, n);
|
|
37873
37843
|
return !i || r === void 0 ? null : /* @__PURE__ */ v("div", {
|
|
37874
37844
|
className: "flex min-w-0 items-center gap-2",
|
|
37875
|
-
children: [/* @__PURE__ */ _(
|
|
37845
|
+
children: [/* @__PURE__ */ _(Lw, {
|
|
37876
37846
|
enabled: r.enabled,
|
|
37877
37847
|
busy: a,
|
|
37878
37848
|
onToggle: o
|
|
37879
|
-
}), /* @__PURE__ */ _(
|
|
37849
|
+
}), /* @__PURE__ */ _(Rw, {
|
|
37880
37850
|
busy: a,
|
|
37881
37851
|
large: !1,
|
|
37882
37852
|
onTrigger: s
|
|
37883
37853
|
})]
|
|
37884
37854
|
});
|
|
37885
37855
|
}
|
|
37886
|
-
function
|
|
37887
|
-
let r = x(), { display: i, capPresent: a, busy: o, setEnabled: s, trigger: c } =
|
|
37856
|
+
function Bw({ trpc: e, deviceId: t, optimistic: n }) {
|
|
37857
|
+
let r = x(), { display: i, capPresent: a, busy: o, setEnabled: s, trigger: c } = Iw(e, t, n);
|
|
37888
37858
|
return !a || i === void 0 ? null : /* @__PURE__ */ v("div", {
|
|
37889
37859
|
className: "flex flex-col items-stretch gap-4 rounded-lg border border-border bg-surface p-6",
|
|
37890
37860
|
children: [/* @__PURE__ */ v("div", {
|
|
@@ -37903,19 +37873,19 @@ function Vw({ trpc: e, deviceId: t, optimistic: n }) {
|
|
|
37903
37873
|
className: "text-sm font-medium",
|
|
37904
37874
|
children: i.enabled ? r("uiLibrary.scriptAutomationControls.enabled", "Enabled") : r("uiLibrary.scriptAutomationControls.disabled", "Disabled")
|
|
37905
37875
|
}),
|
|
37906
|
-
/* @__PURE__ */ _(
|
|
37876
|
+
/* @__PURE__ */ _(Aw, {
|
|
37907
37877
|
atMs: i.lastTriggeredAt,
|
|
37908
37878
|
neverLabel: r("uiLibrary.scriptAutomationControls.neverTriggered", "never triggered")
|
|
37909
37879
|
}),
|
|
37910
|
-
/* @__PURE__ */ _(
|
|
37880
|
+
/* @__PURE__ */ _(jw, { error: i.lastError })
|
|
37911
37881
|
]
|
|
37912
37882
|
}), /* @__PURE__ */ v("div", {
|
|
37913
37883
|
className: "flex items-center justify-center gap-3",
|
|
37914
|
-
children: [/* @__PURE__ */ _(
|
|
37884
|
+
children: [/* @__PURE__ */ _(Lw, {
|
|
37915
37885
|
enabled: i.enabled,
|
|
37916
37886
|
busy: o,
|
|
37917
37887
|
onToggle: s
|
|
37918
|
-
}), /* @__PURE__ */ _(
|
|
37888
|
+
}), /* @__PURE__ */ _(Rw, {
|
|
37919
37889
|
busy: o,
|
|
37920
37890
|
large: !0,
|
|
37921
37891
|
onTrigger: c
|
|
@@ -37925,13 +37895,13 @@ function Vw({ trpc: e, deviceId: t, optimistic: n }) {
|
|
|
37925
37895
|
}
|
|
37926
37896
|
//#endregion
|
|
37927
37897
|
//#region ../ui-library/src/composites/device-controls/panel-controls.tsx
|
|
37928
|
-
function
|
|
37898
|
+
function Vw({ children: e }) {
|
|
37929
37899
|
return /* @__PURE__ */ _("div", {
|
|
37930
37900
|
className: "flex flex-col items-stretch gap-3 rounded-lg border border-border bg-surface p-4",
|
|
37931
37901
|
children: e
|
|
37932
37902
|
});
|
|
37933
37903
|
}
|
|
37934
|
-
function
|
|
37904
|
+
function Hw(e, t) {
|
|
37935
37905
|
let { cap: n } = Z({
|
|
37936
37906
|
trpc: e,
|
|
37937
37907
|
deviceId: t,
|
|
@@ -37940,8 +37910,8 @@ function Uw(e, t) {
|
|
|
37940
37910
|
});
|
|
37941
37911
|
return n !== void 0;
|
|
37942
37912
|
}
|
|
37943
|
-
function
|
|
37944
|
-
return
|
|
37913
|
+
function Uw({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
37914
|
+
return Hw(e, t) ? /* @__PURE__ */ _(rb, {
|
|
37945
37915
|
trpc: e,
|
|
37946
37916
|
deviceId: t,
|
|
37947
37917
|
features: n,
|
|
@@ -37949,7 +37919,7 @@ function Ww({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
37949
37919
|
optimistic: r
|
|
37950
37920
|
}) : null;
|
|
37951
37921
|
}
|
|
37952
|
-
function
|
|
37922
|
+
function Ww(e, t) {
|
|
37953
37923
|
let { cap: n } = Z({
|
|
37954
37924
|
trpc: e,
|
|
37955
37925
|
deviceId: t,
|
|
@@ -37958,8 +37928,8 @@ function Gw(e, t) {
|
|
|
37958
37928
|
});
|
|
37959
37929
|
return n !== void 0;
|
|
37960
37930
|
}
|
|
37961
|
-
function
|
|
37962
|
-
return
|
|
37931
|
+
function Gw({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
37932
|
+
return Ww(e, t) ? /* @__PURE__ */ _(nb, {
|
|
37963
37933
|
trpc: e,
|
|
37964
37934
|
deviceId: t,
|
|
37965
37935
|
features: n,
|
|
@@ -37967,8 +37937,8 @@ function Kw({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
37967
37937
|
optimistic: r
|
|
37968
37938
|
}) : null;
|
|
37969
37939
|
}
|
|
37970
|
-
function
|
|
37971
|
-
return
|
|
37940
|
+
function Kw({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
37941
|
+
return Hw(e, t) ? /* @__PURE__ */ v("div", {
|
|
37972
37942
|
className: "inline-flex items-center gap-2",
|
|
37973
37943
|
children: [/* @__PURE__ */ _(rb, {
|
|
37974
37944
|
trpc: e,
|
|
@@ -37985,7 +37955,7 @@ function qw({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
37985
37955
|
})]
|
|
37986
37956
|
}) : null;
|
|
37987
37957
|
}
|
|
37988
|
-
function
|
|
37958
|
+
function qw(e, t) {
|
|
37989
37959
|
let { cap: n } = Z({
|
|
37990
37960
|
trpc: e,
|
|
37991
37961
|
deviceId: t,
|
|
@@ -37994,8 +37964,8 @@ function Jw(e, t) {
|
|
|
37994
37964
|
});
|
|
37995
37965
|
return n !== void 0;
|
|
37996
37966
|
}
|
|
37997
|
-
function
|
|
37998
|
-
return
|
|
37967
|
+
function Jw({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
37968
|
+
return qw(e, t) ? /* @__PURE__ */ v("div", {
|
|
37999
37969
|
className: "inline-flex items-center gap-2",
|
|
38000
37970
|
children: [/* @__PURE__ */ _(rb, {
|
|
38001
37971
|
trpc: e,
|
|
@@ -38012,7 +37982,7 @@ function Yw({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
38012
37982
|
})]
|
|
38013
37983
|
}) : null;
|
|
38014
37984
|
}
|
|
38015
|
-
function
|
|
37985
|
+
function Yw(e, t) {
|
|
38016
37986
|
let { cap: n } = Z({
|
|
38017
37987
|
trpc: e,
|
|
38018
37988
|
deviceId: t,
|
|
@@ -38021,7 +37991,7 @@ function Xw(e, t) {
|
|
|
38021
37991
|
});
|
|
38022
37992
|
return n !== void 0;
|
|
38023
37993
|
}
|
|
38024
|
-
function
|
|
37994
|
+
function Xw(e, t) {
|
|
38025
37995
|
let { cap: n } = Z({
|
|
38026
37996
|
trpc: e,
|
|
38027
37997
|
deviceId: t,
|
|
@@ -38030,8 +38000,8 @@ function Zw(e, t) {
|
|
|
38030
38000
|
});
|
|
38031
38001
|
return n !== void 0;
|
|
38032
38002
|
}
|
|
38033
|
-
function
|
|
38034
|
-
let i =
|
|
38003
|
+
function Zw({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
38004
|
+
let i = Yw(e, t), a = Xw(e, t);
|
|
38035
38005
|
return !i && !a ? null : /* @__PURE__ */ v("span", {
|
|
38036
38006
|
className: "inline-flex items-center gap-2",
|
|
38037
38007
|
children: [i ? /* @__PURE__ */ _(db, {
|
|
@@ -38040,15 +38010,15 @@ function Qw({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
38040
38010
|
features: n,
|
|
38041
38011
|
layout: "compact",
|
|
38042
38012
|
optimistic: r
|
|
38043
|
-
}) : null, a ? /* @__PURE__ */ _(
|
|
38013
|
+
}) : null, a ? /* @__PURE__ */ _(fC, {
|
|
38044
38014
|
trpc: e,
|
|
38045
38015
|
deviceId: t,
|
|
38046
38016
|
layout: "compact"
|
|
38047
38017
|
}) : null]
|
|
38048
38018
|
});
|
|
38049
38019
|
}
|
|
38050
|
-
function
|
|
38051
|
-
return
|
|
38020
|
+
function Qw({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
38021
|
+
return Yw(e, t) ? /* @__PURE__ */ _(wC, {
|
|
38052
38022
|
trpc: e,
|
|
38053
38023
|
deviceId: t,
|
|
38054
38024
|
features: n,
|
|
@@ -38056,8 +38026,8 @@ function $w({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
38056
38026
|
optimistic: r
|
|
38057
38027
|
}) : null;
|
|
38058
38028
|
}
|
|
38059
|
-
function
|
|
38060
|
-
return
|
|
38029
|
+
function $w({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
38030
|
+
return Yw(e, t) ? /* @__PURE__ */ _(wC, {
|
|
38061
38031
|
trpc: e,
|
|
38062
38032
|
deviceId: t,
|
|
38063
38033
|
features: n,
|
|
@@ -38065,7 +38035,7 @@ function eT({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
38065
38035
|
optimistic: r
|
|
38066
38036
|
}) : null;
|
|
38067
38037
|
}
|
|
38068
|
-
function
|
|
38038
|
+
function eT(e, t) {
|
|
38069
38039
|
let { cap: n } = Z({
|
|
38070
38040
|
trpc: e,
|
|
38071
38041
|
deviceId: t,
|
|
@@ -38074,8 +38044,8 @@ function tT(e, t) {
|
|
|
38074
38044
|
});
|
|
38075
38045
|
return n !== void 0;
|
|
38076
38046
|
}
|
|
38077
|
-
function
|
|
38078
|
-
return
|
|
38047
|
+
function tT({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
38048
|
+
return eT(e, t) ? /* @__PURE__ */ _(vb, {
|
|
38079
38049
|
trpc: e,
|
|
38080
38050
|
deviceId: t,
|
|
38081
38051
|
features: n,
|
|
@@ -38083,7 +38053,7 @@ function nT({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
38083
38053
|
optimistic: r
|
|
38084
38054
|
}) : null;
|
|
38085
38055
|
}
|
|
38086
|
-
function
|
|
38056
|
+
function nT(e, t) {
|
|
38087
38057
|
let { cap: n } = Z({
|
|
38088
38058
|
trpc: e,
|
|
38089
38059
|
deviceId: t,
|
|
@@ -38092,8 +38062,8 @@ function rT(e, t) {
|
|
|
38092
38062
|
});
|
|
38093
38063
|
return n !== void 0;
|
|
38094
38064
|
}
|
|
38095
|
-
function
|
|
38096
|
-
return
|
|
38065
|
+
function rT({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
38066
|
+
return nT(e, t) ? /* @__PURE__ */ _(Ib, {
|
|
38097
38067
|
trpc: e,
|
|
38098
38068
|
deviceId: t,
|
|
38099
38069
|
features: n,
|
|
@@ -38101,8 +38071,8 @@ function iT({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
38101
38071
|
optimistic: r
|
|
38102
38072
|
}) : null;
|
|
38103
38073
|
}
|
|
38104
|
-
function
|
|
38105
|
-
return
|
|
38074
|
+
function iT({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
38075
|
+
return nT(e, t) ? /* @__PURE__ */ _(Vw, { children: /* @__PURE__ */ _(Ib, {
|
|
38106
38076
|
trpc: e,
|
|
38107
38077
|
deviceId: t,
|
|
38108
38078
|
features: n,
|
|
@@ -38112,7 +38082,7 @@ function aT({ trpc: e, deviceId: t, features: n, optimistic: r }) {
|
|
|
38112
38082
|
}
|
|
38113
38083
|
//#endregion
|
|
38114
38084
|
//#region ../ui-library/src/composites/device-controls/control-registry.tsx
|
|
38115
|
-
var
|
|
38085
|
+
var aT = {
|
|
38116
38086
|
cover: {
|
|
38117
38087
|
InlineControl: Zb,
|
|
38118
38088
|
HeroCard: nx
|
|
@@ -38130,28 +38100,28 @@ var oT = {
|
|
|
38130
38100
|
HeroCard: gS
|
|
38131
38101
|
},
|
|
38132
38102
|
switch: {
|
|
38133
|
-
InlineControl:
|
|
38134
|
-
HeroCard:
|
|
38103
|
+
InlineControl: Uw,
|
|
38104
|
+
HeroCard: uw
|
|
38135
38105
|
},
|
|
38136
38106
|
light: {
|
|
38137
|
-
InlineControl:
|
|
38138
|
-
HeroCard:
|
|
38107
|
+
InlineControl: Kw,
|
|
38108
|
+
HeroCard: ow
|
|
38139
38109
|
},
|
|
38140
38110
|
fan: {
|
|
38141
|
-
InlineControl:
|
|
38142
|
-
HeroCard:
|
|
38111
|
+
InlineControl: Jw,
|
|
38112
|
+
HeroCard: lw
|
|
38143
38113
|
},
|
|
38144
38114
|
sensor: {
|
|
38145
38115
|
InlineControl: ox,
|
|
38146
38116
|
HeroCard: Sx
|
|
38147
38117
|
},
|
|
38148
38118
|
thermostat: {
|
|
38149
|
-
InlineControl:
|
|
38150
|
-
HeroCard:
|
|
38119
|
+
InlineControl: Zw,
|
|
38120
|
+
HeroCard: GC
|
|
38151
38121
|
},
|
|
38152
38122
|
climate: {
|
|
38153
|
-
InlineControl:
|
|
38154
|
-
HeroCard:
|
|
38123
|
+
InlineControl: Qw,
|
|
38124
|
+
HeroCard: $w
|
|
38155
38125
|
},
|
|
38156
38126
|
button: {
|
|
38157
38127
|
InlineControl: Zy,
|
|
@@ -38162,20 +38132,20 @@ var oT = {
|
|
|
38162
38132
|
HeroCard: Ex
|
|
38163
38133
|
},
|
|
38164
38134
|
lock: {
|
|
38165
|
-
InlineControl:
|
|
38166
|
-
HeroCard:
|
|
38135
|
+
InlineControl: Gw,
|
|
38136
|
+
HeroCard: QC
|
|
38167
38137
|
},
|
|
38168
38138
|
"media-player": {
|
|
38169
|
-
InlineControl:
|
|
38170
|
-
HeroCard:
|
|
38139
|
+
InlineControl: tT,
|
|
38140
|
+
HeroCard: gw
|
|
38171
38141
|
},
|
|
38172
38142
|
alarm: {
|
|
38173
|
-
InlineControl:
|
|
38174
|
-
HeroCard:
|
|
38143
|
+
InlineControl: Dw,
|
|
38144
|
+
HeroCard: Ow
|
|
38175
38145
|
},
|
|
38176
38146
|
control: {
|
|
38177
|
-
InlineControl:
|
|
38178
|
-
HeroCard:
|
|
38147
|
+
InlineControl: rT,
|
|
38148
|
+
HeroCard: iT
|
|
38179
38149
|
},
|
|
38180
38150
|
weather: {
|
|
38181
38151
|
InlineControl: SS,
|
|
@@ -38194,33 +38164,33 @@ var oT = {
|
|
|
38194
38164
|
HeroCard: FS
|
|
38195
38165
|
},
|
|
38196
38166
|
"pet-feeder": {
|
|
38197
|
-
InlineControl:
|
|
38198
|
-
HeroCard:
|
|
38167
|
+
InlineControl: XS,
|
|
38168
|
+
HeroCard: ZS
|
|
38199
38169
|
},
|
|
38200
38170
|
dishwasher: {
|
|
38201
|
-
InlineControl:
|
|
38202
|
-
HeroCard:
|
|
38171
|
+
InlineControl: lC,
|
|
38172
|
+
HeroCard: uC
|
|
38203
38173
|
},
|
|
38204
38174
|
script: {
|
|
38205
|
-
InlineControl:
|
|
38206
|
-
HeroCard:
|
|
38175
|
+
InlineControl: Pw,
|
|
38176
|
+
HeroCard: Fw
|
|
38207
38177
|
},
|
|
38208
38178
|
automation: {
|
|
38209
|
-
InlineControl:
|
|
38210
|
-
HeroCard:
|
|
38179
|
+
InlineControl: zw,
|
|
38180
|
+
HeroCard: Bw
|
|
38211
38181
|
},
|
|
38212
38182
|
dummy: {
|
|
38213
38183
|
InlineControl: rx,
|
|
38214
38184
|
HeroCard: ix
|
|
38215
38185
|
}
|
|
38216
38186
|
};
|
|
38217
|
-
Object.fromEntries(Object.values(D).map((e) => [e,
|
|
38187
|
+
Object.fromEntries(Object.values(D).map((e) => [e, aT[ge[e]]])), D.Cover, D.Valve, D.Thermostat, D.Climate, D.Control, D.Button, D.MediaPlayer, D.AlarmPanel, D.Lock, D.Vacuum, D.LawnMower, D.Humidifier, D.Switch, D.Siren, D.Light, D.Fan, D.WaterHeater, D.Sensor, D.Presence, D.EventEmitter, D.Notifier, D.Script, D.Automation, D.Camera, D.Hub, D.Update, D.Generic, D.Weather, D.Container, D.Image, D.PetFeeder, D.Dishwasher, D.Washer, D.Dryer, new Set(Object.values(D));
|
|
38218
38188
|
//#endregion
|
|
38219
38189
|
//#region ../ui-library/src/lib/format-last-seen.ts
|
|
38220
|
-
var
|
|
38190
|
+
var oT = 1e3;
|
|
38221
38191
|
//#endregion
|
|
38222
38192
|
//#region ../ui-library/src/composites/device-selector-picker.tsx
|
|
38223
|
-
24 * (60 *
|
|
38193
|
+
24 * (60 * oT * 60), 30 * oT, e(), e(), e(), e(), e(), d(null), e(), new Set([D.Sensor, D.Presence]), e(), d({}), e(), e(), Object.freeze([]), e(), e(), e(), Ce("camstack:device-quick-detail", null), e(), e(), e(), e(), e(), e(), e(), e(), e(), G({
|
|
38224
38194
|
id: H(),
|
|
38225
38195
|
stableId: B(),
|
|
38226
38196
|
addonId: B(),
|
|
@@ -38235,10 +38205,10 @@ var sT = 1e3;
|
|
|
38235
38205
|
}), e();
|
|
38236
38206
|
//#endregion
|
|
38237
38207
|
//#region ../ui-library/src/composites/pipeline-matrix-shared.tsx
|
|
38238
|
-
function
|
|
38208
|
+
function sT(e) {
|
|
38239
38209
|
return e.deviceKey === void 0 ? e.agentNodeId : `${e.agentNodeId}::${e.deviceKey}`;
|
|
38240
38210
|
}
|
|
38241
|
-
function
|
|
38211
|
+
function cT(e) {
|
|
38242
38212
|
let t = [];
|
|
38243
38213
|
for (let n of e) {
|
|
38244
38214
|
let e = t[t.length - 1];
|
|
@@ -38258,7 +38228,7 @@ function lT(e) {
|
|
|
38258
38228
|
}
|
|
38259
38229
|
return t;
|
|
38260
38230
|
}
|
|
38261
|
-
function
|
|
38231
|
+
function lT(e) {
|
|
38262
38232
|
let t = [], n = (e, r) => {
|
|
38263
38233
|
for (let i of e) t.push({
|
|
38264
38234
|
node: i,
|
|
@@ -38267,10 +38237,10 @@ function uT(e) {
|
|
|
38267
38237
|
};
|
|
38268
38238
|
return n(e, 0), t;
|
|
38269
38239
|
}
|
|
38270
|
-
function
|
|
38240
|
+
function uT(e, t, n, r = 208, i = t) {
|
|
38271
38241
|
return e <= 0 ? !1 : t <= 1 ? e < n + r * i : e < n + r * 2;
|
|
38272
38242
|
}
|
|
38273
|
-
var
|
|
38243
|
+
var dT = {
|
|
38274
38244
|
detector: {
|
|
38275
38245
|
labelKey: "uiLibrary.pipelineMatrix.slotDetector",
|
|
38276
38246
|
labelFallback: "detector",
|
|
@@ -38297,20 +38267,20 @@ var fT = {
|
|
|
38297
38267
|
className: "text-pink-500"
|
|
38298
38268
|
}
|
|
38299
38269
|
};
|
|
38300
|
-
function
|
|
38301
|
-
let t = x(), n =
|
|
38270
|
+
function fT({ slot: e }) {
|
|
38271
|
+
let t = x(), n = dT[e] ?? dT.classifier;
|
|
38302
38272
|
return /* @__PURE__ */ _("span", {
|
|
38303
38273
|
className: N("text-[9px] font-semibold uppercase tracking-widest leading-none", n.className),
|
|
38304
38274
|
children: t(n.labelKey, n.labelFallback)
|
|
38305
38275
|
});
|
|
38306
38276
|
}
|
|
38307
|
-
var
|
|
38308
|
-
function
|
|
38277
|
+
var pT = "inline-flex items-center rounded bg-muted px-1.5 py-px text-[9px] font-medium text-foreground-subtle";
|
|
38278
|
+
function mT({ inputs: e, outputs: t }) {
|
|
38309
38279
|
return e.length === 0 && t.length === 0 ? null : /* @__PURE__ */ v("span", {
|
|
38310
38280
|
className: "inline-flex items-center gap-1 flex-wrap",
|
|
38311
38281
|
children: [
|
|
38312
38282
|
e.map((e) => /* @__PURE__ */ _("span", {
|
|
38313
|
-
className: N(
|
|
38283
|
+
className: N(pT, "bg-blue-500/10 text-blue-500"),
|
|
38314
38284
|
children: e
|
|
38315
38285
|
}, `in-${e}`)),
|
|
38316
38286
|
e.length > 0 && t.length > 0 && /* @__PURE__ */ _("span", {
|
|
@@ -38318,13 +38288,13 @@ function hT({ inputs: e, outputs: t }) {
|
|
|
38318
38288
|
children: "→"
|
|
38319
38289
|
}),
|
|
38320
38290
|
t.map((e) => /* @__PURE__ */ _("span", {
|
|
38321
|
-
className: N(
|
|
38291
|
+
className: N(pT, "bg-emerald-500/10 text-emerald-500"),
|
|
38322
38292
|
children: e
|
|
38323
38293
|
}, `out-${e}`))
|
|
38324
38294
|
]
|
|
38325
38295
|
});
|
|
38326
38296
|
}
|
|
38327
|
-
function
|
|
38297
|
+
function hT({ column: e }) {
|
|
38328
38298
|
let t = x(), n = e.deviceLabel ?? e.deviceKey;
|
|
38329
38299
|
return /* @__PURE__ */ v(y, { children: [
|
|
38330
38300
|
(n !== void 0 || e.disabled === !0) && /* @__PURE__ */ v("div", {
|
|
@@ -38348,7 +38318,7 @@ function gT({ column: e }) {
|
|
|
38348
38318
|
})
|
|
38349
38319
|
] });
|
|
38350
38320
|
}
|
|
38351
|
-
function
|
|
38321
|
+
function gT({ group: e }) {
|
|
38352
38322
|
let t = e.columns[0]?.nodeLabel ?? e.agentNodeId;
|
|
38353
38323
|
return /* @__PURE__ */ v("div", {
|
|
38354
38324
|
role: "columnheader",
|
|
@@ -38362,27 +38332,27 @@ function _T({ group: e }) {
|
|
|
38362
38332
|
children: e.columns.map((e, t) => /* @__PURE__ */ _("div", {
|
|
38363
38333
|
className: N("min-w-0 flex-1 px-3 py-1", t > 0 && "border-l border-border/50", e.disabled === !0 && "opacity-70"),
|
|
38364
38334
|
title: `${e.deviceLabel ?? e.deviceKey} · ${e.engineLabel}${e.detail ? ` · ${e.detail}` : ""}`,
|
|
38365
|
-
children: /* @__PURE__ */ _(
|
|
38366
|
-
},
|
|
38335
|
+
children: /* @__PURE__ */ _(hT, { column: e })
|
|
38336
|
+
}, sT(e)))
|
|
38367
38337
|
})]
|
|
38368
38338
|
});
|
|
38369
38339
|
}
|
|
38370
|
-
function
|
|
38340
|
+
function _T({ node: e }) {
|
|
38371
38341
|
return /* @__PURE__ */ v("div", {
|
|
38372
38342
|
className: "flex flex-col gap-1 min-w-0 flex-1",
|
|
38373
|
-
children: [/* @__PURE__ */ _(
|
|
38343
|
+
children: [/* @__PURE__ */ _(fT, { slot: e.slot }), /* @__PURE__ */ v("div", {
|
|
38374
38344
|
className: "flex items-center gap-2 flex-wrap",
|
|
38375
38345
|
children: [/* @__PURE__ */ _("span", {
|
|
38376
38346
|
className: "font-semibold truncate",
|
|
38377
38347
|
children: e.addonName
|
|
38378
|
-
}), /* @__PURE__ */ _(
|
|
38348
|
+
}), /* @__PURE__ */ _(mT, {
|
|
38379
38349
|
inputs: e.inputClasses,
|
|
38380
38350
|
outputs: e.outputClasses
|
|
38381
38351
|
})]
|
|
38382
38352
|
})]
|
|
38383
38353
|
});
|
|
38384
38354
|
}
|
|
38385
|
-
function
|
|
38355
|
+
function vT(e, t) {
|
|
38386
38356
|
return t.kind === "enabled" ? /* @__PURE__ */ v("span", {
|
|
38387
38357
|
className: "flex min-w-0 items-center gap-1",
|
|
38388
38358
|
title: t.overridden ? e("uiLibrary.pipelineMatrix.override", "override") : void 0,
|
|
@@ -38448,14 +38418,14 @@ function yT(e, t) {
|
|
|
38448
38418
|
})]
|
|
38449
38419
|
});
|
|
38450
38420
|
}
|
|
38451
|
-
function
|
|
38421
|
+
function yT(e, t, n) {
|
|
38452
38422
|
return N("text-left text-xs hover:bg-muted/40", e.kind === "enabled" && "bg-emerald-500/5", e.kind === "skip" && "bg-amber-500/5", e.kind === "na" && "bg-muted/30", t && "ring-2 ring-primary ring-inset", n);
|
|
38453
38423
|
}
|
|
38454
38424
|
//#endregion
|
|
38455
38425
|
//#region ../ui-library/src/composites/device-step-matrix.tsx
|
|
38456
38426
|
e();
|
|
38457
|
-
var
|
|
38458
|
-
function
|
|
38427
|
+
var bT = 18, xT = bT * 16, ST = 11;
|
|
38428
|
+
function CT(e, t, n, r) {
|
|
38459
38429
|
let i = (e, t) => ({
|
|
38460
38430
|
r: Math.max(0, Math.min(n - 1, e)),
|
|
38461
38431
|
c: Math.max(0, Math.min(r - 1, t))
|
|
@@ -38472,7 +38442,7 @@ function wT(e, t, n, r) {
|
|
|
38472
38442
|
default: return null;
|
|
38473
38443
|
}
|
|
38474
38444
|
}
|
|
38475
|
-
function
|
|
38445
|
+
function wT({ node: e, depth: t, r: n, tabbable: r, selected: i, badge: a, onClick: o, sticky: s }) {
|
|
38476
38446
|
return /* @__PURE__ */ _("div", {
|
|
38477
38447
|
role: "rowheader",
|
|
38478
38448
|
className: N("min-w-0 border-b border-border bg-surface", s && "sticky left-0 z-10"),
|
|
@@ -38487,11 +38457,11 @@ function TT({ node: e, depth: t, r: n, tabbable: r, selected: i, badge: a, onCli
|
|
|
38487
38457
|
onClick: o ? (e) => o(e.detail === 0) : void 0,
|
|
38488
38458
|
className: N("flex h-full w-full min-w-0 items-start gap-2 px-3 py-2 text-left text-xs outline-none", "hover:bg-muted/40 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary", i && "bg-primary/10 shadow-[inset_3px_0_0_var(--color-primary)]"),
|
|
38489
38459
|
style: { paddingLeft: `${12 + t * 14}px` },
|
|
38490
|
-
children: [/* @__PURE__ */ _(
|
|
38460
|
+
children: [/* @__PURE__ */ _(_T, { node: e }), a]
|
|
38491
38461
|
})
|
|
38492
38462
|
});
|
|
38493
38463
|
}
|
|
38494
|
-
function
|
|
38464
|
+
function TT({ nodes: e, selected: t, onSelect: n }) {
|
|
38495
38465
|
let r = x();
|
|
38496
38466
|
return /* @__PURE__ */ v("div", {
|
|
38497
38467
|
className: "flex flex-wrap items-center gap-1.5",
|
|
@@ -38521,8 +38491,8 @@ function ET({ nodes: e, selected: t, onSelect: n }) {
|
|
|
38521
38491
|
]
|
|
38522
38492
|
});
|
|
38523
38493
|
}
|
|
38524
|
-
var
|
|
38525
|
-
let y = x(), b = o(() =>
|
|
38494
|
+
var ET = c(function({ tree: e, agents: n, getCellState: r, onCellClick: a, onStepClick: c, stepBadge: l, selectedCell: d, single: f, reserveRightPx: p, label: m }, g) {
|
|
38495
|
+
let y = x(), b = o(() => lT(e), [e]), S = o(() => cT(n), [n]), C = t(null), w = f ? ST : bT, T = `${w}rem repeat(${n.length}, 13rem)`, ee = n.length + 1, [te, ne] = h(!0);
|
|
38526
38496
|
s(() => {
|
|
38527
38497
|
let e = C.current;
|
|
38528
38498
|
if (!e || p <= 0) {
|
|
@@ -38539,7 +38509,7 @@ var DT = c(function({ tree: e, agents: n, getCellState: r, onCellClick: a, onSte
|
|
|
38539
38509
|
if (d === null) return null;
|
|
38540
38510
|
let e = b.findIndex((e) => e.node.addonId === d.addonId);
|
|
38541
38511
|
if (e < 0) return null;
|
|
38542
|
-
let t = n.findIndex((e) =>
|
|
38512
|
+
let t = n.findIndex((e) => sT(e) === sT(d));
|
|
38543
38513
|
return {
|
|
38544
38514
|
r: e,
|
|
38545
38515
|
c: t < 0 ? 0 : t + 1
|
|
@@ -38564,7 +38534,7 @@ var DT = c(function({ tree: e, agents: n, getCellState: r, onCellClick: a, onSte
|
|
|
38564
38534
|
return u(g, () => ({ focusCell: (e, t) => {
|
|
38565
38535
|
let r = b.findIndex((t) => t.node.addonId === e);
|
|
38566
38536
|
if (r < 0) return;
|
|
38567
|
-
let i = t === null ? -1 : n.findIndex((e) =>
|
|
38537
|
+
let i = t === null ? -1 : n.findIndex((e) => sT(e) === t), a = i < 0 ? 0 : i + 1;
|
|
38568
38538
|
ae({
|
|
38569
38539
|
r,
|
|
38570
38540
|
c: a
|
|
@@ -38598,7 +38568,7 @@ var DT = c(function({ tree: e, agents: n, getCellState: r, onCellClick: a, onSte
|
|
|
38598
38568
|
let t = {
|
|
38599
38569
|
r: Number(e.target.dataset.r),
|
|
38600
38570
|
c: Number(e.target.dataset.c)
|
|
38601
|
-
}, n =
|
|
38571
|
+
}, n = CT(e.key, t, b.length, ee);
|
|
38602
38572
|
n !== null && (e.preventDefault(), ae(n), se(n.r, n.c));
|
|
38603
38573
|
},
|
|
38604
38574
|
children: [/* @__PURE__ */ v("div", {
|
|
@@ -38608,18 +38578,18 @@ var DT = c(function({ tree: e, agents: n, getCellState: r, onCellClick: a, onSte
|
|
|
38608
38578
|
role: "columnheader",
|
|
38609
38579
|
className: N("top-0 z-20 border-b border-border bg-muted/60 px-3 py-2 text-[10px] uppercase tracking-widest text-foreground-subtle", te ? "sticky left-0" : "sticky"),
|
|
38610
38580
|
children: y("uiLibrary.deviceStepMatrix.step", "Step")
|
|
38611
|
-
}), S.map((e) => e.grouped ? /* @__PURE__ */ _(
|
|
38581
|
+
}), S.map((e) => e.grouped ? /* @__PURE__ */ _(gT, { group: e }, e.agentNodeId) : e.columns.map((e) => /* @__PURE__ */ v("div", {
|
|
38612
38582
|
role: "columnheader",
|
|
38613
38583
|
className: N("sticky top-0 z-10 min-w-0 border-b border-l border-border bg-muted/60 px-3 py-2", e.disabled === !0 && "opacity-70"),
|
|
38614
38584
|
children: [/* @__PURE__ */ _("div", {
|
|
38615
38585
|
className: "truncate text-xs font-semibold text-foreground",
|
|
38616
38586
|
children: e.nodeLabel ?? e.agentNodeId
|
|
38617
|
-
}), /* @__PURE__ */ _(
|
|
38618
|
-
},
|
|
38587
|
+
}), /* @__PURE__ */ _(hT, { column: e })]
|
|
38588
|
+
}, sT(e))))]
|
|
38619
38589
|
}), b.map(({ node: e, depth: t }, i) => /* @__PURE__ */ v("div", {
|
|
38620
38590
|
role: "row",
|
|
38621
38591
|
className: "contents",
|
|
38622
|
-
children: [/* @__PURE__ */ _(
|
|
38592
|
+
children: [/* @__PURE__ */ _(wT, {
|
|
38623
38593
|
node: e,
|
|
38624
38594
|
depth: t,
|
|
38625
38595
|
r: i,
|
|
@@ -38629,7 +38599,7 @@ var DT = c(function({ tree: e, agents: n, getCellState: r, onCellClick: a, onSte
|
|
|
38629
38599
|
onClick: c ? (t) => c(e.addonId, t) : void 0,
|
|
38630
38600
|
sticky: te
|
|
38631
38601
|
}), n.map((t, n) => {
|
|
38632
|
-
let o = r(e.addonId, t), s = d !== null && d.addonId === e.addonId &&
|
|
38602
|
+
let o = r(e.addonId, t), s = d !== null && d.addonId === e.addonId && sT(d) === sT(t), c = o.kind === "enabled" || o.kind === "skip";
|
|
38633
38603
|
return /* @__PURE__ */ _("div", {
|
|
38634
38604
|
role: "gridcell",
|
|
38635
38605
|
className: "min-w-0 border-b border-l border-border",
|
|
@@ -38638,17 +38608,17 @@ var DT = c(function({ tree: e, agents: n, getCellState: r, onCellClick: a, onSte
|
|
|
38638
38608
|
"data-r": i,
|
|
38639
38609
|
"data-c": n + 1,
|
|
38640
38610
|
"data-step": e.addonId,
|
|
38641
|
-
"data-col":
|
|
38611
|
+
"data-col": sT(t),
|
|
38642
38612
|
tabIndex: oe.r === i && oe.c === n + 1 ? 0 : -1,
|
|
38643
38613
|
"aria-disabled": !c,
|
|
38644
38614
|
"aria-selected": s,
|
|
38645
38615
|
onClick: (n) => {
|
|
38646
38616
|
c && a(e.addonId, t, n.detail === 0);
|
|
38647
38617
|
},
|
|
38648
|
-
className:
|
|
38649
|
-
children:
|
|
38618
|
+
className: yT(o, s, N("h-full w-full min-w-0 overflow-hidden px-3 py-2 outline-none", "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary", !c && "cursor-default hover:bg-transparent", t.disabled === !0 && "opacity-70")),
|
|
38619
|
+
children: vT(y, o)
|
|
38650
38620
|
})
|
|
38651
|
-
},
|
|
38621
|
+
}, sT(t));
|
|
38652
38622
|
})]
|
|
38653
38623
|
}, e.addonId))]
|
|
38654
38624
|
}), p > 0 && /* @__PURE__ */ _("div", {
|
|
@@ -38671,7 +38641,7 @@ c(function({ tree: e, agents: n, getCellState: r, onCellClick: a, selectedCell:
|
|
|
38671
38641
|
let n = typeof ResizeObserver < "u" ? new ResizeObserver(t) : null;
|
|
38672
38642
|
return n?.observe(e), () => n?.disconnect();
|
|
38673
38643
|
}, []);
|
|
38674
|
-
let S = o(() =>
|
|
38644
|
+
let S = o(() => cT(n), [n]), C = uT(b, S.length, xT, 208, n.length), w = o(() => S.length === 0 ? null : S.find((e) => e.agentNodeId === l) ?? S[0] ?? null, [S, l]), T = c?.agentNodeId;
|
|
38675
38645
|
i(() => {
|
|
38676
38646
|
C && T !== void 0 && T !== l && u(T);
|
|
38677
38647
|
}, [
|
|
@@ -38684,11 +38654,11 @@ c(function({ tree: e, agents: n, getCellState: r, onCellClick: a, selectedCell:
|
|
|
38684
38654
|
return /* @__PURE__ */ v("div", {
|
|
38685
38655
|
ref: y,
|
|
38686
38656
|
className: "w-full space-y-2",
|
|
38687
|
-
children: [C && w && S.length > 1 && /* @__PURE__ */ _(
|
|
38657
|
+
children: [C && w && S.length > 1 && /* @__PURE__ */ _(TT, {
|
|
38688
38658
|
nodes: S,
|
|
38689
38659
|
selected: w.agentNodeId,
|
|
38690
38660
|
onSelect: u
|
|
38691
|
-
}), /* @__PURE__ */ _(
|
|
38661
|
+
}), /* @__PURE__ */ _(ET, {
|
|
38692
38662
|
ref: g,
|
|
38693
38663
|
tree: e,
|
|
38694
38664
|
agents: ee,
|
|
@@ -38705,7 +38675,7 @@ c(function({ tree: e, agents: n, getCellState: r, onCellClick: a, selectedCell:
|
|
|
38705
38675
|
}), e(), e(), e(), e(), e(), e(), e(), e(), e(), e(), e(), e(), e(), N(we, "min-w-0 max-w-full gap-1.5 py-1 pl-1 pr-2.5 text-xs font-normal", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40"), N(De, "font-medium"), e(), e(), e(), e(), e(), e();
|
|
38706
38676
|
//#endregion
|
|
38707
38677
|
//#region ../ui-library/src/composites/status-badge.tsx
|
|
38708
|
-
var
|
|
38678
|
+
var DT = {
|
|
38709
38679
|
online: {
|
|
38710
38680
|
colorClass: "bg-success",
|
|
38711
38681
|
labelKey: "uiLibrary.statusBadge.online",
|
|
@@ -38757,8 +38727,8 @@ var OT = {
|
|
|
38757
38727
|
labelFallback: "Disabled"
|
|
38758
38728
|
}
|
|
38759
38729
|
};
|
|
38760
|
-
function
|
|
38761
|
-
let o = x(), s =
|
|
38730
|
+
function OT({ status: e, label: t, showDot: n = !0, showLabel: r = !0, size: i = "sm", className: a }) {
|
|
38731
|
+
let o = x(), s = DT[e];
|
|
38762
38732
|
return /* @__PURE__ */ v("span", {
|
|
38763
38733
|
className: N("inline-flex items-center gap-1.5", i === "sm" ? "text-xs" : "text-sm", a),
|
|
38764
38734
|
children: [n && /* @__PURE__ */ _("span", {
|
|
@@ -38773,7 +38743,7 @@ function kT({ status: e, label: t, showDot: n = !0, showLabel: r = !0, size: i =
|
|
|
38773
38743
|
//#endregion
|
|
38774
38744
|
//#region ../ui-library/src/composites/step-inspector/step-inspector-panel.tsx
|
|
38775
38745
|
e(), e();
|
|
38776
|
-
function
|
|
38746
|
+
function kT({ dirtyCount: e, saving: t, status: n, error: r, onSave: i, onDiscard: a, scope: o }) {
|
|
38777
38747
|
let s = x(), c = e > 0, l = t ? s("uiLibrary.stepInspector.saving", "Saving…") : c ? s("uiLibrary.stepInspector.unsaved", {
|
|
38778
38748
|
one: "{{count}} unsaved change",
|
|
38779
38749
|
other: "{{count}} unsaved changes"
|
|
@@ -38849,23 +38819,23 @@ c(function({ title: e, subtitle: t, headerActions: n, headerExtra: r, leading: i
|
|
|
38849
38819
|
className: "min-h-0 flex-1 overflow-y-auto overscroll-contain px-4 py-3",
|
|
38850
38820
|
children: s
|
|
38851
38821
|
}),
|
|
38852
|
-
a !== void 0 && /* @__PURE__ */ _(
|
|
38822
|
+
a !== void 0 && /* @__PURE__ */ _(kT, { ...a })
|
|
38853
38823
|
]
|
|
38854
38824
|
});
|
|
38855
38825
|
}), e(), e(), e(), e(), e(), e(), e(), e(), e(), e();
|
|
38856
38826
|
//#endregion
|
|
38857
38827
|
//#region ../ui-library/src/composites/device-history/history-window.ts
|
|
38858
|
-
var
|
|
38828
|
+
var AT = [
|
|
38859
38829
|
"24h",
|
|
38860
38830
|
"7d",
|
|
38861
38831
|
"30d",
|
|
38862
38832
|
"1y",
|
|
38863
38833
|
"custom"
|
|
38864
|
-
],
|
|
38834
|
+
], jT = 24 * 36e5;
|
|
38865
38835
|
//#endregion
|
|
38866
38836
|
//#region ../ui-library/src/composites/device-history/HistoryChart.tsx
|
|
38867
|
-
7 *
|
|
38868
|
-
var
|
|
38837
|
+
7 * jT, 30 * jT, 365 * jT, e();
|
|
38838
|
+
var MT = G({
|
|
38869
38839
|
subject: Yu("kind", [G({
|
|
38870
38840
|
kind: q("device"),
|
|
38871
38841
|
deviceId: H().int()
|
|
@@ -38875,52 +38845,52 @@ var NT = G({
|
|
|
38875
38845
|
})]),
|
|
38876
38846
|
key: B().min(1),
|
|
38877
38847
|
scope: B()
|
|
38878
|
-
}),
|
|
38848
|
+
}), NT = K(AT), PT = G({
|
|
38879
38849
|
id: B().min(1),
|
|
38880
38850
|
name: B().min(1).max(80),
|
|
38881
|
-
window:
|
|
38882
|
-
selection: W(
|
|
38851
|
+
window: NT,
|
|
38852
|
+
selection: W(MT).max(24)
|
|
38883
38853
|
});
|
|
38884
38854
|
//#endregion
|
|
38885
38855
|
//#region ../ui-library/src/hooks/use-event-invalidation.ts
|
|
38886
38856
|
G({
|
|
38887
38857
|
version: q(1),
|
|
38888
|
-
panels: W(
|
|
38858
|
+
panels: W(PT).max(50),
|
|
38889
38859
|
hidden: $u(B(), W(B()).max(200))
|
|
38890
38860
|
}), e(), e(), e(), e(), Ce("camstack:zone-editing", null), e(), e(), e(), e();
|
|
38891
38861
|
//#endregion
|
|
38892
38862
|
//#region ../ui-library/src/i18n/addon-i18n.ts
|
|
38893
|
-
var
|
|
38894
|
-
function
|
|
38863
|
+
var FT = "en", IT = /* @__PURE__ */ new Map(), LT = /* @__PURE__ */ new Set(), RT = 0;
|
|
38864
|
+
function zT(e) {
|
|
38895
38865
|
let t = (e ?? "").trim().toLowerCase().split(/[-_]/)[0] ?? "";
|
|
38896
|
-
return t === "" ?
|
|
38866
|
+
return t === "" ? FT : t;
|
|
38897
38867
|
}
|
|
38898
|
-
function
|
|
38868
|
+
function BT() {
|
|
38899
38869
|
if (typeof document < "u") {
|
|
38900
38870
|
let e = document.documentElement.lang;
|
|
38901
|
-
if (e.trim() !== "") return
|
|
38871
|
+
if (e.trim() !== "") return zT(e);
|
|
38902
38872
|
}
|
|
38903
|
-
return typeof navigator < "u" && typeof navigator.language == "string" ?
|
|
38873
|
+
return typeof navigator < "u" && typeof navigator.language == "string" ? zT(navigator.language) : FT;
|
|
38904
38874
|
}
|
|
38905
|
-
function
|
|
38906
|
-
let r =
|
|
38907
|
-
i.set(r, n),
|
|
38908
|
-
for (let e of
|
|
38875
|
+
function VT(e, t, n) {
|
|
38876
|
+
let r = zT(t), i = IT.get(e) ?? /* @__PURE__ */ new Map();
|
|
38877
|
+
i.set(r, n), IT.set(e, i), RT += 1;
|
|
38878
|
+
for (let e of LT) e();
|
|
38909
38879
|
}
|
|
38910
|
-
function
|
|
38911
|
-
|
|
38880
|
+
function HT(e) {
|
|
38881
|
+
LT.add(e);
|
|
38912
38882
|
let t = null;
|
|
38913
38883
|
return typeof document < "u" && typeof MutationObserver < "u" && (t = new MutationObserver(e), t.observe(document.documentElement, {
|
|
38914
38884
|
attributes: !0,
|
|
38915
38885
|
attributeFilter: ["lang"]
|
|
38916
38886
|
})), () => {
|
|
38917
|
-
|
|
38887
|
+
LT.delete(e), t?.disconnect();
|
|
38918
38888
|
};
|
|
38919
38889
|
}
|
|
38920
|
-
function
|
|
38921
|
-
return `${
|
|
38890
|
+
function UT() {
|
|
38891
|
+
return `${BT()}#${RT}`;
|
|
38922
38892
|
}
|
|
38923
|
-
function
|
|
38893
|
+
function WT(e, t) {
|
|
38924
38894
|
let n = e;
|
|
38925
38895
|
for (let e of t) {
|
|
38926
38896
|
if (n === void 0 || typeof n == "string") return;
|
|
@@ -38928,46 +38898,46 @@ function GT(e, t) {
|
|
|
38928
38898
|
}
|
|
38929
38899
|
return typeof n == "string" ? n : void 0;
|
|
38930
38900
|
}
|
|
38931
|
-
function
|
|
38901
|
+
function GT(e, t) {
|
|
38932
38902
|
try {
|
|
38933
38903
|
return new Intl.PluralRules(e).select(t);
|
|
38934
38904
|
} catch {
|
|
38935
38905
|
return "other";
|
|
38936
38906
|
}
|
|
38937
38907
|
}
|
|
38938
|
-
function
|
|
38939
|
-
let i =
|
|
38908
|
+
function KT(e, t, n, r) {
|
|
38909
|
+
let i = IT.get(e)?.get(t);
|
|
38940
38910
|
if (i === void 0) return;
|
|
38941
38911
|
let a = n.split(".");
|
|
38942
38912
|
if (r !== void 0) {
|
|
38943
|
-
let e = a[a.length - 1] ?? n, o = a.slice(0, -1), s =
|
|
38913
|
+
let e = a[a.length - 1] ?? n, o = a.slice(0, -1), s = WT(i, [...o, `${e}_${GT(t, r)}`]);
|
|
38944
38914
|
if (s !== void 0) return s;
|
|
38945
|
-
let c =
|
|
38915
|
+
let c = WT(i, [...o, `${e}_other`]);
|
|
38946
38916
|
if (c !== void 0) return c;
|
|
38947
38917
|
}
|
|
38948
|
-
return
|
|
38918
|
+
return WT(i, a);
|
|
38949
38919
|
}
|
|
38950
|
-
var
|
|
38951
|
-
function
|
|
38952
|
-
return t === void 0 ? e : e.replace(
|
|
38920
|
+
var qT = /\{\{\s*([\w.]+)\s*\}\}/g;
|
|
38921
|
+
function JT(e, t) {
|
|
38922
|
+
return t === void 0 ? e : e.replace(qT, (e, n) => {
|
|
38953
38923
|
let r = t[n];
|
|
38954
38924
|
return r === void 0 ? e : String(r);
|
|
38955
38925
|
});
|
|
38956
38926
|
}
|
|
38957
|
-
function
|
|
38927
|
+
function YT(e, t, n, r) {
|
|
38958
38928
|
let i = r?.count, a = typeof i == "number" ? i : void 0;
|
|
38959
|
-
return
|
|
38929
|
+
return JT(KT(e, t, n, a) ?? KT(e, FT, n, a) ?? n, r);
|
|
38960
38930
|
}
|
|
38961
38931
|
//#endregion
|
|
38962
38932
|
//#region ../ui-library/src/i18n/use-addon-t.tsx
|
|
38963
38933
|
e();
|
|
38964
|
-
function
|
|
38965
|
-
return g(
|
|
38934
|
+
function XT() {
|
|
38935
|
+
return g(HT, UT, UT);
|
|
38966
38936
|
}
|
|
38967
|
-
function
|
|
38968
|
-
let n =
|
|
38937
|
+
function ZT(e, t) {
|
|
38938
|
+
let n = XT(), r = n.slice(0, n.indexOf("#")), i = t === void 0 ? r : zT(t);
|
|
38969
38939
|
return {
|
|
38970
|
-
t: l((t, n) =>
|
|
38940
|
+
t: l((t, n) => YT(e, i, t, n), [
|
|
38971
38941
|
e,
|
|
38972
38942
|
i,
|
|
38973
38943
|
n
|
|
@@ -38975,29 +38945,29 @@ function QT(e, t) {
|
|
|
38975
38945
|
lang: i
|
|
38976
38946
|
};
|
|
38977
38947
|
}
|
|
38978
|
-
var
|
|
38979
|
-
function
|
|
38948
|
+
var QT = /<(\/?)([A-Za-z][\w-]*)(\s*\/)?>/g;
|
|
38949
|
+
function $T(e, t, n, r) {
|
|
38980
38950
|
let i = e[t];
|
|
38981
38951
|
return i === void 0 ? /* @__PURE__ */ _(a, { children: n }, r) : p(i, { key: r }, ...n);
|
|
38982
38952
|
}
|
|
38983
|
-
function
|
|
38953
|
+
function eE(e, t, n) {
|
|
38984
38954
|
let r = {
|
|
38985
38955
|
name: "",
|
|
38986
38956
|
children: []
|
|
38987
38957
|
}, i = [r], a = 0, o = 0, s = () => i[i.length - 1] ?? r, c = (e) => {
|
|
38988
|
-
e !== "" && s().children.push(
|
|
38958
|
+
e !== "" && s().children.push(JT(e, n));
|
|
38989
38959
|
};
|
|
38990
|
-
for (let n of e.matchAll(
|
|
38960
|
+
for (let n of e.matchAll(QT)) {
|
|
38991
38961
|
c(e.slice(a, n.index)), a = n.index + n[0].length;
|
|
38992
38962
|
let r = n[1] === "/", l = n[2] ?? "";
|
|
38993
|
-
if (o += 1, n[3] !== void 0) s().children.push(
|
|
38963
|
+
if (o += 1, n[3] !== void 0) s().children.push($T(t, l, [], `k${o}`));
|
|
38994
38964
|
else if (!r) i.push({
|
|
38995
38965
|
name: l,
|
|
38996
38966
|
children: []
|
|
38997
38967
|
});
|
|
38998
38968
|
else if (i.length > 1 && s().name === l) {
|
|
38999
38969
|
let e = i.pop();
|
|
39000
|
-
e && s().children.push(
|
|
38970
|
+
e && s().children.push($T(t, l, e.children, `k${o}`));
|
|
39001
38971
|
}
|
|
39002
38972
|
}
|
|
39003
38973
|
for (c(e.slice(a)); i.length > 1;) {
|
|
@@ -39006,22 +38976,22 @@ function tE(e, t, n) {
|
|
|
39006
38976
|
}
|
|
39007
38977
|
return r.children;
|
|
39008
38978
|
}
|
|
39009
|
-
function
|
|
39010
|
-
for (let [n, r] of Object.entries(t))
|
|
38979
|
+
function tE(e, t) {
|
|
38980
|
+
for (let [n, r] of Object.entries(t)) VT(e, n, r);
|
|
39011
38981
|
return {
|
|
39012
38982
|
ns: e,
|
|
39013
|
-
useT: (t) =>
|
|
38983
|
+
useT: (t) => ZT(e, t),
|
|
39014
38984
|
Trans: (t) => {
|
|
39015
|
-
let { t: n } =
|
|
39016
|
-
return /* @__PURE__ */ _(y, { children:
|
|
38985
|
+
let { t: n } = ZT(e), r = t.values?.count;
|
|
38986
|
+
return /* @__PURE__ */ _(y, { children: eE(n(t.i18nKey, typeof r == "number" ? { count: r } : void 0), t.components ?? {}, t.values) });
|
|
39017
38987
|
},
|
|
39018
|
-
translate: (t, n) =>
|
|
38988
|
+
translate: (t, n) => YT(e, BT(), t, n)
|
|
39019
38989
|
};
|
|
39020
38990
|
}
|
|
39021
|
-
e(), n(() => import("./MaskShapeCanvas-B6q5RDLi.mjs").then((e) => ({ default: e.MaskShapeCanvas }))), n(() => import("./MotionZonesSettings-
|
|
38991
|
+
e(), n(() => import("./MaskShapeCanvas-B6q5RDLi.mjs").then((e) => ({ default: e.MaskShapeCanvas }))), n(() => import("./MotionZonesSettings-Dyw_F0Ju.mjs").then((e) => ({ default: e.MotionZonesSettings }))), n(() => import("./SceneMonitorEditor-DjpiE85o.mjs").then((e) => ({ default: e.SceneMonitorEditor }))), n(() => import("./PrivacyMaskSettings-C9KxtiCR.mjs").then((e) => ({ default: e.PrivacyMaskSettings })));
|
|
39022
38992
|
//#endregion
|
|
39023
38993
|
//#region src/i18n/index.ts
|
|
39024
|
-
var { useT:
|
|
38994
|
+
var { useT: nE, Trans: rE, translate: iE } = tE("import-alexa", {
|
|
39025
38995
|
en: {
|
|
39026
38996
|
page: {
|
|
39027
38997
|
title: "Speak on Echo",
|
|
@@ -39103,14 +39073,14 @@ var { useT: rE, Trans: iE, translate: aE } = nE("import-alexa", {
|
|
|
39103
39073
|
});
|
|
39104
39074
|
//#endregion
|
|
39105
39075
|
//#region src/speak-setup-view.tsx
|
|
39106
|
-
function
|
|
39076
|
+
function aE(e) {
|
|
39107
39077
|
return e === "announce" ? "announce" : "speak";
|
|
39108
39078
|
}
|
|
39109
|
-
function
|
|
39079
|
+
function oE(e) {
|
|
39110
39080
|
return e === "ready" ? "online" : e === "failed" ? "error" : "idle";
|
|
39111
39081
|
}
|
|
39112
|
-
function
|
|
39113
|
-
let { t } =
|
|
39082
|
+
function sE(e) {
|
|
39083
|
+
let { t } = nE(), n = e.brokers.find((t) => t.id === e.brokerId) ?? e.brokers[0], r = {
|
|
39114
39084
|
ready: t("state.ready"),
|
|
39115
39085
|
starting: t("state.starting"),
|
|
39116
39086
|
"broker-not-signed-in": t("state.notSignedIn"),
|
|
@@ -39171,8 +39141,8 @@ function cE(e) {
|
|
|
39171
39141
|
className: "text-sm text-foreground",
|
|
39172
39142
|
children: n.name
|
|
39173
39143
|
}),
|
|
39174
|
-
/* @__PURE__ */ _(
|
|
39175
|
-
status:
|
|
39144
|
+
/* @__PURE__ */ _(OT, {
|
|
39145
|
+
status: oE(n.state),
|
|
39176
39146
|
label: r[n.state],
|
|
39177
39147
|
size: "sm"
|
|
39178
39148
|
}),
|
|
@@ -39211,11 +39181,11 @@ function cE(e) {
|
|
|
39211
39181
|
children: [n.room, n.kind === "group" ? t("devices.group") : n.family].filter((e) => e !== void 0 && e.length > 0).join(" · ")
|
|
39212
39182
|
})]
|
|
39213
39183
|
}),
|
|
39214
|
-
/* @__PURE__ */ _(
|
|
39184
|
+
/* @__PURE__ */ _(OT, {
|
|
39215
39185
|
status: n.online ? "online" : "offline",
|
|
39216
39186
|
size: "sm"
|
|
39217
39187
|
}),
|
|
39218
|
-
n.dnd ? /* @__PURE__ */ _(
|
|
39188
|
+
n.dnd ? /* @__PURE__ */ _(OT, {
|
|
39219
39189
|
status: "idle",
|
|
39220
39190
|
label: t("devices.dnd"),
|
|
39221
39191
|
size: "sm"
|
|
@@ -39237,7 +39207,7 @@ function cE(e) {
|
|
|
39237
39207
|
value: "announce",
|
|
39238
39208
|
label: t("devices.modeAnnounce")
|
|
39239
39209
|
}],
|
|
39240
|
-
onChange: (t) => e.onMode(
|
|
39210
|
+
onChange: (t) => e.onMode(aE(t.target.value))
|
|
39241
39211
|
}),
|
|
39242
39212
|
/* @__PURE__ */ _(ov, {
|
|
39243
39213
|
htmlFor: "alexa-volume",
|
|
@@ -39277,7 +39247,7 @@ function cE(e) {
|
|
|
39277
39247
|
}
|
|
39278
39248
|
//#endregion
|
|
39279
39249
|
//#region src/speak/setup-sample.ts
|
|
39280
|
-
var
|
|
39250
|
+
var cE = [
|
|
39281
39251
|
{
|
|
39282
39252
|
id: "echo-kitchen",
|
|
39283
39253
|
name: "Kitchen",
|
|
@@ -39306,29 +39276,29 @@ var lE = [
|
|
|
39306
39276
|
dnd: !1,
|
|
39307
39277
|
deviceType: "A3S5BH2HU6VAYF"
|
|
39308
39278
|
}
|
|
39309
|
-
],
|
|
39279
|
+
], lE = {
|
|
39310
39280
|
loggedIn: !0,
|
|
39311
39281
|
ageSec: 90,
|
|
39312
39282
|
lastSuccessAt: 1
|
|
39313
|
-
},
|
|
39283
|
+
}, uE = {
|
|
39314
39284
|
loggedIn: !1,
|
|
39315
39285
|
ageSec: 0,
|
|
39316
39286
|
lastSuccessAt: null
|
|
39317
39287
|
};
|
|
39318
|
-
function
|
|
39288
|
+
function dE(e) {
|
|
39319
39289
|
let t = {
|
|
39320
39290
|
id: "alexa_001",
|
|
39321
39291
|
name: "Home",
|
|
39322
39292
|
state: "ready",
|
|
39323
|
-
devices: [...
|
|
39324
|
-
session:
|
|
39293
|
+
devices: [...cE],
|
|
39294
|
+
session: lE
|
|
39325
39295
|
};
|
|
39326
39296
|
return e === "waiting" ? {
|
|
39327
39297
|
brokers: [{
|
|
39328
39298
|
...t,
|
|
39329
39299
|
state: "broker-not-signed-in",
|
|
39330
39300
|
devices: [],
|
|
39331
|
-
session:
|
|
39301
|
+
session: uE
|
|
39332
39302
|
}],
|
|
39333
39303
|
unassignedTargets: 0,
|
|
39334
39304
|
notice: ""
|
|
@@ -39337,7 +39307,7 @@ function fE(e) {
|
|
|
39337
39307
|
...t,
|
|
39338
39308
|
id: "alexa_002",
|
|
39339
39309
|
name: "Office",
|
|
39340
|
-
devices: [
|
|
39310
|
+
devices: [cE[0]]
|
|
39341
39311
|
}].map((e) => ({
|
|
39342
39312
|
...e,
|
|
39343
39313
|
devices: [...e.devices]
|
|
@@ -39365,14 +39335,14 @@ function fE(e) {
|
|
|
39365
39335
|
notice: ""
|
|
39366
39336
|
};
|
|
39367
39337
|
}
|
|
39368
|
-
function
|
|
39338
|
+
function fE() {
|
|
39369
39339
|
if (typeof window > "u") return null;
|
|
39370
39340
|
let e = new URLSearchParams(window.location.search).get("ui-shots-step");
|
|
39371
39341
|
return e === "ready" || e === "accounts" || e === "waiting" || e === "legacy" ? e : null;
|
|
39372
39342
|
}
|
|
39373
39343
|
//#endregion
|
|
39374
39344
|
//#region src/speak/worker-protocol.ts
|
|
39375
|
-
var
|
|
39345
|
+
var pE = G({
|
|
39376
39346
|
id: B().min(1),
|
|
39377
39347
|
name: B(),
|
|
39378
39348
|
family: B(),
|
|
@@ -39383,7 +39353,7 @@ var mE = G({
|
|
|
39383
39353
|
room: B().optional()
|
|
39384
39354
|
});
|
|
39385
39355
|
K(["ok", "failed"]);
|
|
39386
|
-
var
|
|
39356
|
+
var mE = G({
|
|
39387
39357
|
loggedIn: U(),
|
|
39388
39358
|
ageSec: H().int().nonnegative(),
|
|
39389
39359
|
lastSuccessAt: H().int().nullable()
|
|
@@ -39403,19 +39373,19 @@ G({
|
|
|
39403
39373
|
})]);
|
|
39404
39374
|
//#endregion
|
|
39405
39375
|
//#region src/speak/actions.ts
|
|
39406
|
-
var
|
|
39376
|
+
var hE = K([
|
|
39407
39377
|
"starting",
|
|
39408
39378
|
"ready",
|
|
39409
39379
|
"broker-not-signed-in",
|
|
39410
39380
|
"failed"
|
|
39411
|
-
]),
|
|
39381
|
+
]), gE = G({
|
|
39412
39382
|
brokers: W(G({
|
|
39413
39383
|
id: B(),
|
|
39414
39384
|
name: B(),
|
|
39415
|
-
state:
|
|
39385
|
+
state: hE,
|
|
39416
39386
|
error: B().optional(),
|
|
39417
|
-
devices: W(
|
|
39418
|
-
session:
|
|
39387
|
+
devices: W(pE),
|
|
39388
|
+
session: mE
|
|
39419
39389
|
})),
|
|
39420
39390
|
unassignedTargets: H().int().nonnegative(),
|
|
39421
39391
|
notice: K([
|
|
@@ -39427,11 +39397,11 @@ var gE = K([
|
|
|
39427
39397
|
//#endregion
|
|
39428
39398
|
//#region src/page.tsx
|
|
39429
39399
|
ne({
|
|
39430
|
-
speakStatus:
|
|
39400
|
+
speakStatus: me(G({}), gE, {
|
|
39431
39401
|
kind: "mutation",
|
|
39432
39402
|
auth: "admin"
|
|
39433
39403
|
}),
|
|
39434
|
-
sendTest:
|
|
39404
|
+
sendTest: me(G({
|
|
39435
39405
|
brokerId: B().min(1),
|
|
39436
39406
|
echoIds: W(B().min(1)).min(1),
|
|
39437
39407
|
mode: K(["speak", "announce"]),
|
|
@@ -39446,9 +39416,9 @@ ne({
|
|
|
39446
39416
|
auth: "admin"
|
|
39447
39417
|
})
|
|
39448
39418
|
}), e();
|
|
39449
|
-
var
|
|
39450
|
-
function
|
|
39451
|
-
function
|
|
39419
|
+
var _E = "import-alexa";
|
|
39420
|
+
function vE() {}
|
|
39421
|
+
function yE(e, t, n = {}) {
|
|
39452
39422
|
return {
|
|
39453
39423
|
brokers: e.brokers,
|
|
39454
39424
|
brokerId: e.brokers[0]?.id ?? "",
|
|
@@ -39460,24 +39430,24 @@ function bE(e, t, n = {}) {
|
|
|
39460
39430
|
phrase: t,
|
|
39461
39431
|
busy: !1,
|
|
39462
39432
|
error: null,
|
|
39463
|
-
onBroker:
|
|
39464
|
-
onToggle:
|
|
39465
|
-
onMode:
|
|
39466
|
-
onVolume:
|
|
39467
|
-
onPhrase:
|
|
39468
|
-
onSendTest:
|
|
39433
|
+
onBroker: vE,
|
|
39434
|
+
onToggle: vE,
|
|
39435
|
+
onMode: vE,
|
|
39436
|
+
onVolume: vE,
|
|
39437
|
+
onPhrase: vE,
|
|
39438
|
+
onSendTest: vE,
|
|
39469
39439
|
...n
|
|
39470
39440
|
};
|
|
39471
39441
|
}
|
|
39472
|
-
function
|
|
39473
|
-
let { t } =
|
|
39474
|
-
return /* @__PURE__ */ _(
|
|
39442
|
+
function bE({ step: e }) {
|
|
39443
|
+
let { t } = nE();
|
|
39444
|
+
return /* @__PURE__ */ _(sE, { ...yE(dE(e), t("devices.phraseDefault")) });
|
|
39475
39445
|
}
|
|
39476
|
-
function
|
|
39446
|
+
function xE(e, t) {
|
|
39477
39447
|
return Number.isFinite(e) ? Math.min(100, Math.max(0, Math.round(e))) : t;
|
|
39478
39448
|
}
|
|
39479
|
-
function
|
|
39480
|
-
let { t: e } =
|
|
39449
|
+
function SE() {
|
|
39450
|
+
let { t: e } = nE(), t = Mi(), [n, r] = h({
|
|
39481
39451
|
status: {
|
|
39482
39452
|
brokers: [],
|
|
39483
39453
|
unassignedTargets: 0,
|
|
@@ -39493,7 +39463,7 @@ function CE() {
|
|
|
39493
39463
|
async function a(e, n) {
|
|
39494
39464
|
try {
|
|
39495
39465
|
return await t.mutateAsync({
|
|
39496
|
-
addonId:
|
|
39466
|
+
addonId: _E,
|
|
39497
39467
|
action: e,
|
|
39498
39468
|
input: n
|
|
39499
39469
|
});
|
|
@@ -39506,7 +39476,7 @@ function CE() {
|
|
|
39506
39476
|
}
|
|
39507
39477
|
}
|
|
39508
39478
|
async function o() {
|
|
39509
|
-
let e =
|
|
39479
|
+
let e = gE.safeParse(await a("speakStatus", {}));
|
|
39510
39480
|
e.success && r((t) => ({
|
|
39511
39481
|
...t,
|
|
39512
39482
|
status: e.data,
|
|
@@ -39516,7 +39486,7 @@ function CE() {
|
|
|
39516
39486
|
}
|
|
39517
39487
|
return i(() => {
|
|
39518
39488
|
o();
|
|
39519
|
-
}, []), /* @__PURE__ */ _(
|
|
39489
|
+
}, []), /* @__PURE__ */ _(sE, { ...yE(n.status, n.phrase, {
|
|
39520
39490
|
brokerId: n.brokerId,
|
|
39521
39491
|
selected: n.selected,
|
|
39522
39492
|
mode: n.mode,
|
|
@@ -39541,7 +39511,7 @@ function CE() {
|
|
|
39541
39511
|
})),
|
|
39542
39512
|
onVolume: (e) => r((t) => ({
|
|
39543
39513
|
...t,
|
|
39544
|
-
volume:
|
|
39514
|
+
volume: xE(e, t.volume)
|
|
39545
39515
|
})),
|
|
39546
39516
|
onPhrase: (e) => r((t) => ({
|
|
39547
39517
|
...t,
|
|
@@ -39558,9 +39528,9 @@ function CE() {
|
|
|
39558
39528
|
}
|
|
39559
39529
|
}) });
|
|
39560
39530
|
}
|
|
39561
|
-
function
|
|
39562
|
-
let t =
|
|
39563
|
-
return t === null ? /* @__PURE__ */ _(
|
|
39531
|
+
function CE(e) {
|
|
39532
|
+
let t = fE();
|
|
39533
|
+
return t === null ? /* @__PURE__ */ _(SE, {}) : /* @__PURE__ */ _(bE, { step: t });
|
|
39564
39534
|
}
|
|
39565
39535
|
//#endregion
|
|
39566
|
-
export {
|
|
39536
|
+
export { CE as default };
|