@camstack/addon-post-analysis 1.2.623 → 1.2.625
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{clip-model-registry-C58fyELd.mjs → clip-model-registry-BmPWAiiw.mjs} +195 -124
- package/dist/{clip-model-registry-KKT83z9U.js → clip-model-registry-Bz5VWLtO.js} +195 -124
- package/dist/embedding-encoder/index.js +1 -1
- package/dist/embedding-encoder/index.mjs +1 -1
- package/dist/pipeline-analytics/_stub.js +2 -2
- package/dist/pipeline-analytics/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-_ahOxwNA.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-u9k_8R7t.mjs} +3 -3
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-yap5surJ.mjs +26 -0
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Dh58k_r9.mjs +26 -0
- package/dist/pipeline-analytics/{hostInit-CdRVx4vF.mjs → hostInit-Bx3x53tR.mjs} +3 -3
- package/dist/pipeline-analytics/index.js +206 -222
- package/dist/pipeline-analytics/index.mjs +206 -222
- package/dist/pipeline-analytics/remoteEntry.js +1 -1
- package/package.json +1 -1
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-V5-s2hmZ.mjs +0 -26
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-B1HZu0i3.mjs +0 -26
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_clip_model_registry = require("../clip-model-registry-
|
|
5
|
+
const require_clip_model_registry = require("../clip-model-registry-Bz5VWLtO.js");
|
|
6
6
|
let node_fs = require("node:fs");
|
|
7
7
|
node_fs = require_clip_model_registry.__toESM(node_fs, 1);
|
|
8
8
|
let node_path = require("node:path");
|
|
@@ -26036,6 +26036,83 @@ function deriveConsumableBand(input) {
|
|
|
26036
26036
|
return value <= input.thresholdPercent ? "low" : "normal";
|
|
26037
26037
|
}
|
|
26038
26038
|
//#endregion
|
|
26039
|
+
//#region src/notification-center/alerts/tank-band.ts
|
|
26040
|
+
/**
|
|
26041
|
+
* A TANK reduced to the only thing worth storing: its band (D642).
|
|
26042
|
+
*
|
|
26043
|
+
* A tank is a `supply` or `waste` item of a device's `consumables` slice
|
|
26044
|
+
* (D915 — before it, the four vacuum tanks lived on `vacuum-control`): a
|
|
26045
|
+
* vacuum's clean water, dirty water, detergent and dust bin, a dishwasher's
|
|
26046
|
+
* salt and rinse aid. `consumable-routing.ts` narrows the item's status to the
|
|
26047
|
+
* band vocabulary below. The operator asked for them to notify like
|
|
26048
|
+
* consumables: a supply running low, a waste tank full.
|
|
26049
|
+
*
|
|
26050
|
+
* ## The verdict is the provider's
|
|
26051
|
+
*
|
|
26052
|
+
* A tank's `status` is the device's own sensor (`ok` | `low` | `full`),
|
|
26053
|
+
* and it is the ONLY thing judged. The hub has no threshold for a tank level:
|
|
26054
|
+
* the rule for thresholds is that they belong to whoever generates the event,
|
|
26055
|
+
* and a tank that says `low` has already decided. A tank that reports only a
|
|
26056
|
+
* `level` is therefore not judged at all (`null`) rather than judged against a
|
|
26057
|
+
* number the hub would have to invent.
|
|
26058
|
+
*
|
|
26059
|
+
* ## `null` is the third answer, and it is not `normal`
|
|
26060
|
+
*
|
|
26061
|
+
* An unknown status says nothing — it neither opens nor closes an episode, for
|
|
26062
|
+
* the reason `battery-band.ts` gives: a reading nobody took is not evidence
|
|
26063
|
+
* that anything changed.
|
|
26064
|
+
*
|
|
26065
|
+
* Pure. No clock, no I/O.
|
|
26066
|
+
*/
|
|
26067
|
+
/**
|
|
26068
|
+
* The tanks with a sentence of their own (`system.device-tank-*.body.<key>`),
|
|
26069
|
+
* by their item key — the four a vacuum reports. Any other tank (salt, rinse
|
|
26070
|
+
* aid, …) is worded by its label (`body.item`).
|
|
26071
|
+
*/
|
|
26072
|
+
var NC_TANK_KEYS = [
|
|
26073
|
+
"cleanWater",
|
|
26074
|
+
"dirtyWater",
|
|
26075
|
+
"detergent",
|
|
26076
|
+
"dustBin"
|
|
26077
|
+
];
|
|
26078
|
+
function isNamedTankKey(key) {
|
|
26079
|
+
return NC_TANK_KEYS.some((k) => k === key);
|
|
26080
|
+
}
|
|
26081
|
+
/**
|
|
26082
|
+
* How long a tank change must HOLD before it counts (D642 review M2).
|
|
26083
|
+
*
|
|
26084
|
+
* A float switch sloshing at the edge of `low` / `full` flips its status back
|
|
26085
|
+
* and forth while the robot moves; each flip is a durable transition, and
|
|
26086
|
+
* without a hold each one is a raise and a recovery on the operator's phone.
|
|
26087
|
+
* One minute is two reload ticks: long enough to outlast a slosh, short enough
|
|
26088
|
+
* that a genuinely full dust bin is said within a minute and a half.
|
|
26089
|
+
*/
|
|
26090
|
+
var NC_TANK_HOLD_MS = 6e4;
|
|
26091
|
+
function deriveTankBand(reading) {
|
|
26092
|
+
switch (reading.status) {
|
|
26093
|
+
case "low": return "low";
|
|
26094
|
+
case "full": return "full";
|
|
26095
|
+
case "ok": return "normal";
|
|
26096
|
+
case null: return null;
|
|
26097
|
+
}
|
|
26098
|
+
}
|
|
26099
|
+
/** `tank:<deviceId>:<key>` — the subject of one tank's episode. */
|
|
26100
|
+
function tankSubject(deviceId, key) {
|
|
26101
|
+
return `tank:${String(deviceId)}:${key}`;
|
|
26102
|
+
}
|
|
26103
|
+
/** The parts of a tank subject, or `null` when it is not one. */
|
|
26104
|
+
function parseTankSubject(subject) {
|
|
26105
|
+
const match = /^tank:(\d+):(.+)$/.exec(subject);
|
|
26106
|
+
if (match === null) return null;
|
|
26107
|
+
const deviceId = Number(match[1]);
|
|
26108
|
+
const key = match[2];
|
|
26109
|
+
if (!Number.isSafeInteger(deviceId) || key === void 0) return null;
|
|
26110
|
+
return {
|
|
26111
|
+
deviceId,
|
|
26112
|
+
key
|
|
26113
|
+
};
|
|
26114
|
+
}
|
|
26115
|
+
//#endregion
|
|
26039
26116
|
//#region src/notification-center/device-directory.ts
|
|
26040
26117
|
/**
|
|
26041
26118
|
* WHO a device id is — the mirrored directory the system-event intake reads.
|
|
@@ -28398,26 +28475,28 @@ function incomingFromConsumableBand(input) {
|
|
|
28398
28475
|
});
|
|
28399
28476
|
}
|
|
28400
28477
|
/**
|
|
28401
|
-
* A
|
|
28478
|
+
* A TANK band, as a system-event subject (D642, D915).
|
|
28402
28479
|
*
|
|
28403
28480
|
* Built like {@link incomingFromConsumableBand}: `tank:<deviceId>:<tank>` is
|
|
28404
28481
|
* one subject per tank (the dust bin's alert must not cancel the clean water's),
|
|
28405
|
-
* and the recovery keeps it.
|
|
28406
|
-
* language — the params are frozen before the
|
|
28407
|
-
* name cannot be a param; `tank` carries the
|
|
28408
|
-
* template.
|
|
28482
|
+
* and the recovery keeps it. For the four named vacuum tanks the BODY VARIANT
|
|
28483
|
+
* names the tank in the reader's language — the params are frozen before the
|
|
28484
|
+
* language is known, so the tank's name cannot be a param; `tank` carries the
|
|
28485
|
+
* stable token for a custom template. Any other tank (a dishwasher's salt, …)
|
|
28486
|
+
* is worded by the provider's label through `body.item`.
|
|
28409
28487
|
*/
|
|
28410
28488
|
function incomingFromTankBand(input) {
|
|
28411
28489
|
const kind = input.band === "low" ? "device-tank-low" : input.band === "full" ? "device-tank-full" : "device-tank-normal";
|
|
28412
28490
|
return systemSubject({
|
|
28413
28491
|
facts: input.facts,
|
|
28414
28492
|
kind,
|
|
28415
|
-
subject:
|
|
28493
|
+
subject: tankSubject(input.deviceId, input.tank),
|
|
28416
28494
|
titleKey: `system.${kind}.title`,
|
|
28417
|
-
bodyKey: `system.${kind}.body.${input.tank}`,
|
|
28495
|
+
bodyKey: isNamedTankKey(input.tank) ? `system.${kind}.body.${input.tank}` : `system.${kind}.body.item`,
|
|
28418
28496
|
textParams: {
|
|
28419
28497
|
...deviceTextParams(input.deviceId, input.identity),
|
|
28420
|
-
tank: input.tank
|
|
28498
|
+
tank: input.tank,
|
|
28499
|
+
item: input.label ?? input.tank
|
|
28421
28500
|
},
|
|
28422
28501
|
deviceId: input.deviceId,
|
|
28423
28502
|
...input.identity !== void 0 ? { deviceType: input.identity.type } : {}
|
|
@@ -29302,91 +29381,6 @@ function deliveryForKind(kind) {
|
|
|
29302
29381
|
return kind;
|
|
29303
29382
|
}
|
|
29304
29383
|
//#endregion
|
|
29305
|
-
//#region src/notification-center/alerts/tank-band.ts
|
|
29306
|
-
/**
|
|
29307
|
-
* A vacuum TANK reduced to the only thing worth storing: its band (D642).
|
|
29308
|
-
*
|
|
29309
|
-
* The `vacuum-control` slice carries four tanks — clean water, dirty water,
|
|
29310
|
-
* detergent, dust bin — each `null` when the hardware has none, else
|
|
29311
|
-
* `{ level, status }`. The operator asked for them to notify like consumables:
|
|
29312
|
-
* clean water / detergent running low, dirty water / dust bin full.
|
|
29313
|
-
*
|
|
29314
|
-
* ## The verdict is the provider's
|
|
29315
|
-
*
|
|
29316
|
-
* A tank's `status` is the device's own float switch (`ok` | `low` | `full`),
|
|
29317
|
-
* and it is the ONLY thing judged. The hub has no threshold for a tank level:
|
|
29318
|
-
* the rule for thresholds is that they belong to whoever generates the event,
|
|
29319
|
-
* and a tank that says `low` has already decided. A tank that reports only a
|
|
29320
|
-
* `level` is therefore not judged at all (`null`) rather than judged against a
|
|
29321
|
-
* number the hub would have to invent.
|
|
29322
|
-
*
|
|
29323
|
-
* ## `null` is the third answer, and it is not `normal`
|
|
29324
|
-
*
|
|
29325
|
-
* An unknown status says nothing — it neither opens nor closes an episode, for
|
|
29326
|
-
* the reason `battery-band.ts` gives: a reading nobody took is not evidence
|
|
29327
|
-
* that anything changed.
|
|
29328
|
-
*
|
|
29329
|
-
* Pure. No clock, no I/O.
|
|
29330
|
-
*/
|
|
29331
|
-
/** The four tanks `vacuum-control` names, by their slice field. */
|
|
29332
|
-
var NC_TANK_KEYS = [
|
|
29333
|
-
"cleanWater",
|
|
29334
|
-
"dirtyWater",
|
|
29335
|
-
"detergent",
|
|
29336
|
-
"dustBin"
|
|
29337
|
-
];
|
|
29338
|
-
/**
|
|
29339
|
-
* How long a tank change must HOLD before it counts (D642 review M2).
|
|
29340
|
-
*
|
|
29341
|
-
* A float switch sloshing at the edge of `low` / `full` flips its status back
|
|
29342
|
-
* and forth while the robot moves; each flip is a durable transition, and
|
|
29343
|
-
* without a hold each one is a raise and a recovery on the operator's phone.
|
|
29344
|
-
* One minute is two reload ticks: long enough to outlast a slosh, short enough
|
|
29345
|
-
* that a genuinely full dust bin is said within a minute and a half.
|
|
29346
|
-
*/
|
|
29347
|
-
var NC_TANK_HOLD_MS = 6e4;
|
|
29348
|
-
function deriveTankBand(reading) {
|
|
29349
|
-
switch (reading.status) {
|
|
29350
|
-
case "low": return "low";
|
|
29351
|
-
case "full": return "full";
|
|
29352
|
-
case "ok": return "normal";
|
|
29353
|
-
case null: return null;
|
|
29354
|
-
}
|
|
29355
|
-
}
|
|
29356
|
-
function isRecord$2(value) {
|
|
29357
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
29358
|
-
}
|
|
29359
|
-
function tankStatusOf(value) {
|
|
29360
|
-
return value === "ok" || value === "low" || value === "full" ? value : null;
|
|
29361
|
-
}
|
|
29362
|
-
/**
|
|
29363
|
-
* A `device.state-changed` payload carrying a `vacuum-control` slice, reduced
|
|
29364
|
-
* to its tanks. `null` for any other cap. A tank the hardware does not have
|
|
29365
|
-
* (`null`) is skipped; a malformed field reads as unknown, never as a
|
|
29366
|
-
* fabricated verdict (D393: absent is not zero).
|
|
29367
|
-
*/
|
|
29368
|
-
function vacuumTanksOf(data) {
|
|
29369
|
-
if (data["capName"] !== "vacuum-control") return null;
|
|
29370
|
-
const deviceId = data["deviceId"];
|
|
29371
|
-
const slice = data["slice"];
|
|
29372
|
-
if (typeof deviceId !== "number" || !isRecord$2(slice)) return null;
|
|
29373
|
-
const tanks = [];
|
|
29374
|
-
for (const key of NC_TANK_KEYS) {
|
|
29375
|
-
const raw = slice[key];
|
|
29376
|
-
if (!isRecord$2(raw)) continue;
|
|
29377
|
-
const level = raw["level"];
|
|
29378
|
-
tanks.push({
|
|
29379
|
-
key,
|
|
29380
|
-
level: typeof level === "number" && Number.isFinite(level) ? level : null,
|
|
29381
|
-
status: tankStatusOf(raw["status"])
|
|
29382
|
-
});
|
|
29383
|
-
}
|
|
29384
|
-
return tanks.length === 0 ? null : {
|
|
29385
|
-
deviceId,
|
|
29386
|
-
tanks
|
|
29387
|
-
};
|
|
29388
|
-
}
|
|
29389
|
-
//#endregion
|
|
29390
29384
|
//#region src/notification-center/alerts/open-alert.ts
|
|
29391
29385
|
/**
|
|
29392
29386
|
* The raise of an episode whose reading has not arrived since the restart —
|
|
@@ -29424,13 +29418,13 @@ function unmeasuredEpisode(input) {
|
|
|
29424
29418
|
thresholdPercent: parts.thresholdPercent,
|
|
29425
29419
|
identity
|
|
29426
29420
|
});
|
|
29427
|
-
const tank =
|
|
29428
|
-
if (tank ===
|
|
29421
|
+
const tank = parseTankSubject(input.subject);
|
|
29422
|
+
if (tank === null || tank.deviceId !== deviceId) return null;
|
|
29429
29423
|
return incomingFromTankBand({
|
|
29430
29424
|
facts,
|
|
29431
29425
|
deviceId,
|
|
29432
29426
|
band: input.detail === "full" ? "full" : "low",
|
|
29433
|
-
tank,
|
|
29427
|
+
tank: tank.key,
|
|
29434
29428
|
identity
|
|
29435
29429
|
});
|
|
29436
29430
|
}
|
|
@@ -29507,7 +29501,7 @@ function deriveBatteryBand(input) {
|
|
|
29507
29501
|
* slice that already arrives on `device.state-changed`;
|
|
29508
29502
|
* - **consumable band** — `consumable@<threshold>:<deviceId>:<key>`, one
|
|
29509
29503
|
* episode per item per threshold a RULE asks for (D642);
|
|
29510
|
-
* - **tank band** — `tank:<deviceId>:<tank>`, a vacuum's tanks, judged on the
|
|
29504
|
+
* - **tank band** — `tank:<deviceId>:<tank>`, a supply / waste item (a vacuum's tanks, a dishwasher's salt), judged on the
|
|
29511
29505
|
* provider's own verdict (D642);
|
|
29512
29506
|
* - **the reminder tick** — the operator's "how often do you say it again".
|
|
29513
29507
|
*
|
|
@@ -29658,7 +29652,8 @@ var NcDeviceAlerts = class {
|
|
|
29658
29652
|
for (const thresholdPercent of thresholds) this.judgeConsumable(deviceId, item, thresholdPercent, settings);
|
|
29659
29653
|
}
|
|
29660
29654
|
/**
|
|
29661
|
-
* ONE
|
|
29655
|
+
* ONE tank — a `supply` / `waste` item of a device's `consumables` slice
|
|
29656
|
+
* (D642; read from `consumables` since D915, `consumable-routing.ts`).
|
|
29662
29657
|
*
|
|
29663
29658
|
* The provider's verdict is the band (`tank-band.ts`); an unknown status
|
|
29664
29659
|
* leaves everything untouched, an open episode included.
|
|
@@ -29666,7 +29661,7 @@ var NcDeviceAlerts = class {
|
|
|
29666
29661
|
observeTank(deviceId, tank) {
|
|
29667
29662
|
const band = deriveTankBand(tank);
|
|
29668
29663
|
if (band === null) return;
|
|
29669
|
-
const subject =
|
|
29664
|
+
const subject = tankSubject(deviceId, tank.key);
|
|
29670
29665
|
this.lastTank.set(subject, {
|
|
29671
29666
|
deviceId,
|
|
29672
29667
|
tank
|
|
@@ -29677,6 +29672,7 @@ var NcDeviceAlerts = class {
|
|
|
29677
29672
|
deviceId,
|
|
29678
29673
|
band: alerting ? band : "normal",
|
|
29679
29674
|
tank: tank.key,
|
|
29675
|
+
...tank.label !== void 0 ? { label: tank.label } : {},
|
|
29680
29676
|
identity: this.deps.lookup(deviceId)
|
|
29681
29677
|
}), band === "normal" ? void 0 : band);
|
|
29682
29678
|
}
|
|
@@ -29949,6 +29945,7 @@ var NcDeviceAlerts = class {
|
|
|
29949
29945
|
deviceId: tank.deviceId,
|
|
29950
29946
|
band: tankBand,
|
|
29951
29947
|
tank: tank.tank.key,
|
|
29948
|
+
...tank.tank.label !== void 0 ? { label: tank.tank.label } : {},
|
|
29952
29949
|
identity: this.deps.lookup(tank.deviceId)
|
|
29953
29950
|
});
|
|
29954
29951
|
const battery = this.lastReading.get(subject);
|
|
@@ -30084,6 +30081,107 @@ function tagsOf(subject) {
|
|
|
30084
30081
|
return deviceId !== void 0 ? { tags: { deviceId } } : {};
|
|
30085
30082
|
}
|
|
30086
30083
|
//#endregion
|
|
30084
|
+
//#region src/notification-center/alerts/consumable-routing.ts
|
|
30085
|
+
function wearStatus(status) {
|
|
30086
|
+
switch (status) {
|
|
30087
|
+
case "replace":
|
|
30088
|
+
case "low":
|
|
30089
|
+
case "empty": return "replace";
|
|
30090
|
+
case "ok": return "ok";
|
|
30091
|
+
default: return null;
|
|
30092
|
+
}
|
|
30093
|
+
}
|
|
30094
|
+
function supplyStatus(status) {
|
|
30095
|
+
switch (status) {
|
|
30096
|
+
case "low":
|
|
30097
|
+
case "empty":
|
|
30098
|
+
case "replace": return "low";
|
|
30099
|
+
case "ok":
|
|
30100
|
+
case "full": return "ok";
|
|
30101
|
+
default: return null;
|
|
30102
|
+
}
|
|
30103
|
+
}
|
|
30104
|
+
function wasteStatus(status) {
|
|
30105
|
+
switch (status) {
|
|
30106
|
+
case "full":
|
|
30107
|
+
case "replace": return "full";
|
|
30108
|
+
case "ok":
|
|
30109
|
+
case "low":
|
|
30110
|
+
case "empty": return "ok";
|
|
30111
|
+
default: return null;
|
|
30112
|
+
}
|
|
30113
|
+
}
|
|
30114
|
+
/** Which family judges this item, and the reading that family reads. */
|
|
30115
|
+
function routeConsumableItem(raw) {
|
|
30116
|
+
const { key, label, level } = raw;
|
|
30117
|
+
if (raw.kind === "supply" || raw.kind === "waste") return {
|
|
30118
|
+
family: "tank",
|
|
30119
|
+
tank: {
|
|
30120
|
+
key,
|
|
30121
|
+
label,
|
|
30122
|
+
level,
|
|
30123
|
+
status: raw.kind === "supply" ? supplyStatus(raw.status) : wasteStatus(raw.status)
|
|
30124
|
+
}
|
|
30125
|
+
};
|
|
30126
|
+
return {
|
|
30127
|
+
family: "consumable",
|
|
30128
|
+
item: {
|
|
30129
|
+
key,
|
|
30130
|
+
label,
|
|
30131
|
+
level,
|
|
30132
|
+
status: wearStatus(raw.status)
|
|
30133
|
+
}
|
|
30134
|
+
};
|
|
30135
|
+
}
|
|
30136
|
+
function isRecord$2(value) {
|
|
30137
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
30138
|
+
}
|
|
30139
|
+
/**
|
|
30140
|
+
* A `device.state-changed` carrying a `consumables` slice, routed by family;
|
|
30141
|
+
* `null` for any other event, a malformed slice or an empty list.
|
|
30142
|
+
*
|
|
30143
|
+
* An item is kept only when it carries a usable `key` — the subject is built
|
|
30144
|
+
* from it. `level` and `status` are each optional; an item with NEITHER is
|
|
30145
|
+
* still returned, because deciding that it has told us nothing belongs to the
|
|
30146
|
+
* band derivation and not to a parser (D393: absent is not zero).
|
|
30147
|
+
*/
|
|
30148
|
+
function consumablesSliceOf(event) {
|
|
30149
|
+
if (event.category !== "device.state-changed") return null;
|
|
30150
|
+
const data = event.data;
|
|
30151
|
+
if (data["capName"] !== "consumables") return null;
|
|
30152
|
+
const deviceId = data["deviceId"];
|
|
30153
|
+
const slice = data["slice"];
|
|
30154
|
+
if (typeof deviceId !== "number" || !isRecord$2(slice)) return null;
|
|
30155
|
+
const rawItems = slice["items"];
|
|
30156
|
+
if (!Array.isArray(rawItems)) return null;
|
|
30157
|
+
const consumables = [];
|
|
30158
|
+
const tanks = [];
|
|
30159
|
+
for (const entry of rawItems) {
|
|
30160
|
+
if (!isRecord$2(entry)) continue;
|
|
30161
|
+
const key = entry["key"];
|
|
30162
|
+
if (typeof key !== "string" || key.length === 0) continue;
|
|
30163
|
+
const label = entry["label"];
|
|
30164
|
+
const level = entry["level"];
|
|
30165
|
+
const status = entry["status"];
|
|
30166
|
+
const kind = entry["kind"];
|
|
30167
|
+
const routed = routeConsumableItem({
|
|
30168
|
+
key,
|
|
30169
|
+
label: typeof label === "string" && label.length > 0 ? label : key,
|
|
30170
|
+
level: typeof level === "number" && Number.isFinite(level) ? level : null,
|
|
30171
|
+
status: typeof status === "string" ? status : null,
|
|
30172
|
+
kind: typeof kind === "string" ? kind : void 0
|
|
30173
|
+
});
|
|
30174
|
+
if (routed.family === "tank") tanks.push(routed.tank);
|
|
30175
|
+
else consumables.push(routed.item);
|
|
30176
|
+
}
|
|
30177
|
+
if (consumables.length === 0 && tanks.length === 0) return null;
|
|
30178
|
+
return {
|
|
30179
|
+
deviceId,
|
|
30180
|
+
consumables,
|
|
30181
|
+
tanks
|
|
30182
|
+
};
|
|
30183
|
+
}
|
|
30184
|
+
//#endregion
|
|
30087
30185
|
//#region src/notification-center/device-removal.ts
|
|
30088
30186
|
/** The kinds whose rows can be about a device. */
|
|
30089
30187
|
var NC_DEVICE_ROW_KINDS = [
|
|
@@ -30874,6 +30972,9 @@ var en_default = {
|
|
|
30874
30972
|
"system.device-tank-low.body.dustBin": "The dust bin on {{deviceName}} is running low",
|
|
30875
30973
|
"system.device-tank-full.body.dustBin": "The dust bin on {{deviceName}} is full",
|
|
30876
30974
|
"system.device-tank-normal.body.dustBin": "The dust bin on {{deviceName}} is OK again",
|
|
30975
|
+
"system.device-tank-low.body.item": "{{item}} on {{deviceName}} is running low",
|
|
30976
|
+
"system.device-tank-full.body.item": "{{item}} on {{deviceName}} is full",
|
|
30977
|
+
"system.device-tank-normal.body.item": "{{item}} on {{deviceName}} is OK again",
|
|
30877
30978
|
"system.camera-online.title": "Device online",
|
|
30878
30979
|
"system.camera-online.body": "Device {{deviceName}} is online",
|
|
30879
30980
|
"system.camera-offline.title": "Device offline",
|
|
@@ -31275,6 +31376,9 @@ var it_default = {
|
|
|
31275
31376
|
"system.device-tank-low.body.dustBin": "Il contenitore della polvere di {{deviceName}} è quasi vuoto",
|
|
31276
31377
|
"system.device-tank-full.body.dustBin": "Il contenitore della polvere di {{deviceName}} è pieno",
|
|
31277
31378
|
"system.device-tank-normal.body.dustBin": "Il contenitore della polvere di {{deviceName}} è di nuovo a posto",
|
|
31379
|
+
"system.device-tank-low.body.item": "{{item}} di {{deviceName}} sta finendo",
|
|
31380
|
+
"system.device-tank-full.body.item": "{{item}} di {{deviceName}} è pieno",
|
|
31381
|
+
"system.device-tank-normal.body.item": "{{item}} di {{deviceName}} è di nuovo a posto",
|
|
31278
31382
|
"system.camera-online.title": "Dispositivo online",
|
|
31279
31383
|
"system.camera-online.body": "Il dispositivo {{deviceName}} è online",
|
|
31280
31384
|
"system.camera-offline.title": "Dispositivo offline",
|
|
@@ -54223,52 +54327,6 @@ function batterySliceOf(event) {
|
|
|
54223
54327
|
};
|
|
54224
54328
|
}
|
|
54225
54329
|
/**
|
|
54226
|
-
* A `device.state-changed` carrying a CONSUMABLES slice, reduced to the items
|
|
54227
|
-
* the band derivation reads.
|
|
54228
|
-
*
|
|
54229
|
-
* Same tap as the battery's: `DeviceStateChanged` is already subscribed, so
|
|
54230
|
-
* every `consumables` write already arrives here and was simply dropped. No
|
|
54231
|
-
* new bus category and no producer change.
|
|
54232
|
-
*
|
|
54233
|
-
* An item is kept only when it carries a usable `key` — the subject is built
|
|
54234
|
-
* from it, and an item with no key could not be told apart from its sibling.
|
|
54235
|
-
* `level` and `status` are each optional; an item with NEITHER is still
|
|
54236
|
-
* returned, because deciding that it has told us nothing belongs to
|
|
54237
|
-
* `deriveConsumableBand` and not to a parser (D393: absent is not zero, and
|
|
54238
|
-
* the parser is not the place that judges).
|
|
54239
|
-
*/
|
|
54240
|
-
function consumablesSliceOf(event) {
|
|
54241
|
-
if (event.category !== "device.state-changed") return null;
|
|
54242
|
-
const data = event.data;
|
|
54243
|
-
if (data["capName"] !== "consumables") return null;
|
|
54244
|
-
const deviceId = data["deviceId"];
|
|
54245
|
-
const slice = data["slice"];
|
|
54246
|
-
if (typeof deviceId !== "number") return null;
|
|
54247
|
-
if (typeof slice !== "object" || slice === null || Array.isArray(slice)) return null;
|
|
54248
|
-
const rawItems = slice["items"];
|
|
54249
|
-
if (!Array.isArray(rawItems)) return null;
|
|
54250
|
-
const items = [];
|
|
54251
|
-
for (const entry of rawItems) {
|
|
54252
|
-
if (typeof entry !== "object" || entry === null || Array.isArray(entry)) continue;
|
|
54253
|
-
const row = entry;
|
|
54254
|
-
const key = row["key"];
|
|
54255
|
-
if (typeof key !== "string" || key.length === 0) continue;
|
|
54256
|
-
const level = row["level"];
|
|
54257
|
-
const status = row["status"];
|
|
54258
|
-
const label = row["label"];
|
|
54259
|
-
items.push({
|
|
54260
|
-
key,
|
|
54261
|
-
label: typeof label === "string" && label.length > 0 ? label : key,
|
|
54262
|
-
level: typeof level === "number" ? level : null,
|
|
54263
|
-
status: status === "ok" || status === "replace" ? status : null
|
|
54264
|
-
});
|
|
54265
|
-
}
|
|
54266
|
-
return items.length === 0 ? null : {
|
|
54267
|
-
deviceId,
|
|
54268
|
-
items
|
|
54269
|
-
};
|
|
54270
|
-
}
|
|
54271
|
-
/**
|
|
54272
54330
|
* What `getAlarmConfig` answers on a node with no panel.
|
|
54273
54331
|
*
|
|
54274
54332
|
* The DEFAULTS, not zeroes: paired with `deviceId: null` this tells a client
|
|
@@ -57194,12 +57252,8 @@ var NotificationCenter = class {
|
|
|
57194
57252
|
}
|
|
57195
57253
|
const consumables = consumablesSliceOf(event);
|
|
57196
57254
|
if (consumables !== null) {
|
|
57197
|
-
for (const item of consumables.
|
|
57198
|
-
|
|
57199
|
-
}
|
|
57200
|
-
const tanks = event.category === "device.state-changed" ? vacuumTanksOf(event.data) : null;
|
|
57201
|
-
if (tanks !== null) {
|
|
57202
|
-
for (const tank of tanks.tanks) this.deviceAlerts.observeTank(tanks.deviceId, tank);
|
|
57255
|
+
for (const item of consumables.consumables) this.deviceAlerts.observeConsumable(consumables.deviceId, item);
|
|
57256
|
+
for (const tank of consumables.tanks) this.deviceAlerts.observeTank(consumables.deviceId, tank);
|
|
57203
57257
|
return;
|
|
57204
57258
|
}
|
|
57205
57259
|
const lookup = this.deviceDirectory.lookup();
|
|
@@ -107226,24 +107280,6 @@ Object.freeze({
|
|
|
107226
107280
|
"path": "powerState",
|
|
107227
107281
|
"valueType": "string"
|
|
107228
107282
|
},
|
|
107229
|
-
{
|
|
107230
|
-
"path": "saltLevel",
|
|
107231
|
-
"valueType": "enum",
|
|
107232
|
-
"enumValues": [
|
|
107233
|
-
"ok",
|
|
107234
|
-
"low",
|
|
107235
|
-
"empty"
|
|
107236
|
-
]
|
|
107237
|
-
},
|
|
107238
|
-
{
|
|
107239
|
-
"path": "rinseAidLevel",
|
|
107240
|
-
"valueType": "enum",
|
|
107241
|
-
"enumValues": [
|
|
107242
|
-
"ok",
|
|
107243
|
-
"low",
|
|
107244
|
-
"empty"
|
|
107245
|
-
]
|
|
107246
|
-
},
|
|
107247
107283
|
{
|
|
107248
107284
|
"path": "filterCleaningDue",
|
|
107249
107285
|
"valueType": "boolean"
|
|
@@ -108269,58 +108305,6 @@ Object.freeze({
|
|
|
108269
108305
|
"path": "fanSpeed",
|
|
108270
108306
|
"valueType": "string"
|
|
108271
108307
|
},
|
|
108272
|
-
{
|
|
108273
|
-
"path": "cleanWater.level",
|
|
108274
|
-
"valueType": "number"
|
|
108275
|
-
},
|
|
108276
|
-
{
|
|
108277
|
-
"path": "cleanWater.status",
|
|
108278
|
-
"valueType": "enum",
|
|
108279
|
-
"enumValues": [
|
|
108280
|
-
"ok",
|
|
108281
|
-
"low",
|
|
108282
|
-
"full"
|
|
108283
|
-
]
|
|
108284
|
-
},
|
|
108285
|
-
{
|
|
108286
|
-
"path": "dirtyWater.level",
|
|
108287
|
-
"valueType": "number"
|
|
108288
|
-
},
|
|
108289
|
-
{
|
|
108290
|
-
"path": "dirtyWater.status",
|
|
108291
|
-
"valueType": "enum",
|
|
108292
|
-
"enumValues": [
|
|
108293
|
-
"ok",
|
|
108294
|
-
"low",
|
|
108295
|
-
"full"
|
|
108296
|
-
]
|
|
108297
|
-
},
|
|
108298
|
-
{
|
|
108299
|
-
"path": "detergent.level",
|
|
108300
|
-
"valueType": "number"
|
|
108301
|
-
},
|
|
108302
|
-
{
|
|
108303
|
-
"path": "detergent.status",
|
|
108304
|
-
"valueType": "enum",
|
|
108305
|
-
"enumValues": [
|
|
108306
|
-
"ok",
|
|
108307
|
-
"low",
|
|
108308
|
-
"full"
|
|
108309
|
-
]
|
|
108310
|
-
},
|
|
108311
|
-
{
|
|
108312
|
-
"path": "dustBin.level",
|
|
108313
|
-
"valueType": "number"
|
|
108314
|
-
},
|
|
108315
|
-
{
|
|
108316
|
-
"path": "dustBin.status",
|
|
108317
|
-
"valueType": "enum",
|
|
108318
|
-
"enumValues": [
|
|
108319
|
-
"ok",
|
|
108320
|
-
"low",
|
|
108321
|
-
"full"
|
|
108322
|
-
]
|
|
108323
|
-
},
|
|
108324
108308
|
{
|
|
108325
108309
|
"path": "progressPercent",
|
|
108326
108310
|
"valueType": "number"
|