@camstack/addon-provider-homematic 1.2.205 → 1.2.207

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.
Files changed (18) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/_stub.js +658 -658
  3. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_page-BBYiqZ5h.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_page-6DzqqZ3i.mjs} +4 -4
  4. package/dist/_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DR952fPS.mjs +26 -0
  5. package/dist/addon-provider-homematic.css +1 -1
  6. package/dist/addon.js +1483 -159
  7. package/dist/addon.mjs +1483 -159
  8. package/dist/{hostInit-nT-RhOBP.mjs → hostInit-CZgDBnHg.mjs} +3 -3
  9. package/dist/remoteEntry.js +1 -1
  10. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-BI01xl_h.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-ZgMsVU2w.mjs} +1 -1
  11. package/dist/widgets/_stub.js +138 -138
  12. package/dist/widgets/{_virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_widgets-B0ssCAy7.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_widgets-CtPGHIKn.mjs} +2 -2
  13. package/dist/widgets/_virtual_mf___mfe_internal__addon_provider_homematic_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-7hqlX2gW.mjs +26 -0
  14. package/dist/widgets/{hostInit-phYEFIYx.mjs → hostInit-Cy3RS8VW.mjs} +2 -2
  15. package/dist/widgets/remoteEntry.js +1 -1
  16. package/package.json +3 -3
  17. package/dist/_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Civ5HlCQ.mjs +0 -26
  18. package/dist/widgets/_virtual_mf___mfe_internal__addon_provider_homematic_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-De1hiEmR.mjs +0 -26
package/dist/_stub.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./virtualExposes-v5SsyBZj.mjs";
2
- import "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-BI01xl_h.mjs";
3
- import { C as e, S as t, _ as n, a as r, b as i, c as a, d as o, f as s, g as c, h as l, i as u, l as d, m as f, n as p, o as m, p as h, r as g, s as _, t as v, u as y, v as b, x, y as S } from "./_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Civ5HlCQ.mjs";
2
+ import "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-ZgMsVU2w.mjs";
3
+ import { C as e, S as t, _ as n, a as r, b as i, c as a, d as o, f as s, g as c, h as l, i as u, l as d, m as f, n as p, o as m, p as h, r as g, s as _, t as v, u as y, v as b, x, y as S } from "./_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DR952fPS.mjs";
4
4
  import { a as C, i as w, n as ee, o as te, r as ne, s as T, t as re } from "./_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare__react__loadShare__.js-iX7UoD9E.mjs";
5
5
  import { n as E, r as D, t as ie } from "./_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-D_jZoh_U.mjs";
6
6
  //#region ../../node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
@@ -3840,7 +3840,7 @@ K({
3840
3840
  });
3841
3841
  //#endregion
3842
3842
  //#region src/i18n/index.ts
3843
- var { useT: X, Trans: Us, translate: Ws } = e("provider-homematic", {
3843
+ var { useT: X, Trans: Us, translate: Ws } = v("provider-homematic", {
3844
3844
  en: {
3845
3845
  common: { loading: "Loading…" },
3846
3846
  write: { failedTitle: "The CCU refused the change" },
@@ -4597,15 +4597,15 @@ function qs(e, t) {
4597
4597
  return t;
4598
4598
  }
4599
4599
  function Js(e) {
4600
- let { param: t, edit: n, onEdit: r } = e, { t: i } = X(), a = t.unit === null ? t.parameter : `${t.parameter} (${t.unit})`, c = t.min !== null && t.max !== null ? i("config.range", {
4600
+ let { param: t, edit: n, onEdit: r } = e, { t: i } = X(), a = t.unit === null ? t.parameter : `${t.parameter} (${t.unit})`, o = t.min !== null && t.max !== null ? i("config.range", {
4601
4601
  min: t.min,
4602
4602
  max: t.max
4603
4603
  }) : void 0;
4604
4604
  if (t.type === "BOOL") {
4605
4605
  let e = typeof n == "boolean" ? n : t.value === !0;
4606
- return /* @__PURE__ */ E(o, {
4606
+ return /* @__PURE__ */ E(s, {
4607
4607
  label: a,
4608
- children: /* @__PURE__ */ E(v, {
4608
+ children: /* @__PURE__ */ E(p, {
4609
4609
  checked: e,
4610
4610
  disabled: !t.writable,
4611
4611
  onChange: () => r(!e)
@@ -4614,9 +4614,9 @@ function Js(e) {
4614
4614
  }
4615
4615
  if (t.type === "ENUM" && t.valueList !== null) {
4616
4616
  let e = typeof n == "string" ? n : typeof t.value == "string" ? t.value : "";
4617
- return /* @__PURE__ */ E(o, {
4617
+ return /* @__PURE__ */ E(s, {
4618
4618
  label: a,
4619
- children: /* @__PURE__ */ E(b, {
4619
+ children: /* @__PURE__ */ E(S, {
4620
4620
  value: e,
4621
4621
  disabled: !t.writable,
4622
4622
  onChange: (e) => r(e.target.value),
@@ -4630,13 +4630,13 @@ function Js(e) {
4630
4630
  })
4631
4631
  });
4632
4632
  }
4633
- let l = t.type === "INTEGER" || t.type === "FLOAT", u = typeof n == "string" ? n : t.value === null ? "" : String(t.value);
4634
- return /* @__PURE__ */ E(o, {
4633
+ let c = t.type === "INTEGER" || t.type === "FLOAT", l = typeof n == "string" ? n : t.value === null ? "" : String(t.value);
4634
+ return /* @__PURE__ */ E(s, {
4635
4635
  label: a,
4636
- ...c === void 0 ? {} : { description: c },
4637
- children: /* @__PURE__ */ E(s, {
4638
- type: l ? "number" : "text",
4639
- value: u,
4636
+ ...o === void 0 ? {} : { description: o },
4637
+ children: /* @__PURE__ */ E(h, {
4638
+ type: c ? "number" : "text",
4639
+ value: l,
4640
4640
  disabled: !t.writable,
4641
4641
  ...t.min === null ? {} : { min: t.min },
4642
4642
  ...t.max === null ? {} : { max: t.max },
@@ -4691,7 +4691,7 @@ function Q(e, t, n, r, i = {}) {
4691
4691
  //#endregion
4692
4692
  //#region src/ui/use-ccu-write.ts
4693
4693
  function Zs(e) {
4694
- let t = g(), n = p(), { t: r } = X();
4694
+ let t = u(), n = g(), { t: r } = X();
4695
4695
  return ne(async (i) => {
4696
4696
  if (!await t({
4697
4697
  title: i.title,
@@ -4720,97 +4720,97 @@ function Zs(e) {
4720
4720
  }
4721
4721
  //#endregion
4722
4722
  //#region src/ui/ChannelConfigDialog.tsx
4723
- function Qs(e) {
4724
- let { trpc: n, integrationId: r, device: i, onClose: a } = e, { t: s } = X(), c = Zs(n), l = Q(n, "getCcuDeviceConfig", C(() => ({
4723
+ function Qs(t) {
4724
+ let { trpc: n, integrationId: r, device: i, onClose: a } = t, { t: c } = X(), l = Zs(n), u = Q(n, "getCcuDeviceConfig", C(() => ({
4725
4725
  integrationId: r,
4726
4726
  address: i.address
4727
- }), [r, i.address]), Ss), [u, d] = T(null), [f, p] = T({}), [m, g] = T(!1), _ = l.data?.channels ?? [], v = _.find((e) => e.channel === u) ?? _[0], x = C(() => {
4727
+ }), [r, i.address]), Ss), [d, p] = T(null), [m, h] = T({}), [g, _] = T(!1), v = u.data?.channels ?? [], y = v.find((e) => e.channel === d) ?? v[0], b = C(() => {
4728
4728
  let e = {};
4729
- for (let t of v?.params ?? []) {
4730
- let n = f[`${v?.channel}/${t.parameter}`];
4729
+ for (let t of y?.params ?? []) {
4730
+ let n = m[`${y?.channel}/${t.parameter}`];
4731
4731
  if (n === void 0) continue;
4732
4732
  let r = qs(t, n);
4733
4733
  r !== void 0 && r !== t.value && (e[t.parameter] = r);
4734
4734
  }
4735
4735
  return e;
4736
- }, [v, f]), S = Object.keys(x).length, w = async () => {
4737
- if (v !== void 0) {
4738
- g(!0);
4736
+ }, [y, m]), x = Object.keys(b).length, w = async () => {
4737
+ if (y !== void 0) {
4738
+ _(!0);
4739
4739
  try {
4740
- await c({
4740
+ await l({
4741
4741
  action: "setCcuChannelConfig",
4742
4742
  input: {
4743
4743
  integrationId: r,
4744
- channel: v.channel,
4745
- values: x
4744
+ channel: y.channel,
4745
+ values: b
4746
4746
  },
4747
4747
  schema: Y,
4748
- title: s("config.confirmTitle"),
4749
- message: s("config.confirmMessage", {
4750
- channel: v.channel,
4751
- count: S,
4752
- names: Object.keys(x).join(", ")
4748
+ title: c("config.confirmTitle"),
4749
+ message: c("config.confirmMessage", {
4750
+ channel: y.channel,
4751
+ count: x,
4752
+ names: Object.keys(b).join(", ")
4753
4753
  }),
4754
- confirmLabel: s("config.confirmLabel"),
4754
+ confirmLabel: c("config.confirmLabel"),
4755
4755
  variant: "warning"
4756
- }) !== null && (p({}), l.reload());
4756
+ }) !== null && (h({}), u.reload());
4757
4757
  } finally {
4758
- g(!1);
4758
+ _(!1);
4759
4759
  }
4760
4760
  }
4761
4761
  };
4762
- return /* @__PURE__ */ E(h, {
4762
+ return /* @__PURE__ */ E(f, {
4763
4763
  open: !0,
4764
4764
  onClose: a,
4765
4765
  icon: we,
4766
4766
  width: "lg",
4767
- title: s("config.title", { name: i.name ?? i.address }),
4767
+ title: c("config.title", { name: i.name ?? i.address }),
4768
4768
  testId: "hm-config-dialog",
4769
- footer: /* @__PURE__ */ E(t, {
4769
+ footer: /* @__PURE__ */ E(e, {
4770
4770
  type: "button",
4771
4771
  onClick: () => void w(),
4772
- disabled: S === 0 || m,
4773
- children: s("config.save")
4772
+ disabled: x === 0 || g,
4773
+ children: c("config.save")
4774
4774
  }),
4775
- children: l.error === null ? l.data === void 0 ? /* @__PURE__ */ E("p", {
4775
+ children: u.error === null ? u.data === void 0 ? /* @__PURE__ */ E("p", {
4776
4776
  className: "text-sm text-foreground-subtle",
4777
- children: s("common.loading")
4778
- }) : v === void 0 ? /* @__PURE__ */ E("p", {
4777
+ children: c("common.loading")
4778
+ }) : y === void 0 ? /* @__PURE__ */ E("p", {
4779
4779
  className: "text-sm text-foreground-subtle",
4780
- children: s("config.none")
4780
+ children: c("config.none")
4781
4781
  }) : /* @__PURE__ */ D("div", {
4782
4782
  className: "flex flex-col gap-3",
4783
4783
  children: [
4784
- _.length > 1 && /* @__PURE__ */ E(o, {
4785
- label: s("config.channel"),
4786
- children: /* @__PURE__ */ E(b, {
4787
- value: v.channel,
4784
+ v.length > 1 && /* @__PURE__ */ E(s, {
4785
+ label: c("config.channel"),
4786
+ children: /* @__PURE__ */ E(S, {
4787
+ value: y.channel,
4788
4788
  onChange: (e) => {
4789
- d(e.target.value), p({});
4789
+ p(e.target.value), h({});
4790
4790
  },
4791
- options: _.map((e) => ({
4791
+ options: v.map((e) => ({
4792
4792
  value: e.channel,
4793
4793
  label: e.channelType === null ? e.channel : `${e.channel} · ${e.channelType}`
4794
4794
  }))
4795
4795
  })
4796
4796
  }),
4797
- v.error !== null && /* @__PURE__ */ E("p", {
4797
+ y.error !== null && /* @__PURE__ */ E("p", {
4798
4798
  className: "text-xs text-danger",
4799
- children: s("config.valuesUnreadable", { error: v.error })
4799
+ children: c("config.valuesUnreadable", { error: y.error })
4800
4800
  }),
4801
- v.params.map((e) => /* @__PURE__ */ E(Js, {
4801
+ y.params.map((e) => /* @__PURE__ */ E(Js, {
4802
4802
  param: e,
4803
- edit: f[`${v.channel}/${e.parameter}`],
4804
- onEdit: (t) => p((n) => ({
4803
+ edit: m[`${y.channel}/${e.parameter}`],
4804
+ onEdit: (t) => h((n) => ({
4805
4805
  ...n,
4806
- [`${v.channel}/${e.parameter}`]: t
4806
+ [`${y.channel}/${e.parameter}`]: t
4807
4807
  }))
4808
4808
  }, e.parameter))
4809
4809
  ]
4810
- }) : /* @__PURE__ */ E(y, {
4811
- title: s("config.loadFailed"),
4812
- message: l.error,
4813
- onRetry: l.reload
4810
+ }) : /* @__PURE__ */ E(o, {
4811
+ title: c("config.loadFailed"),
4812
+ message: u.error,
4813
+ onRetry: u.reload
4814
4814
  })
4815
4815
  });
4816
4816
  }
@@ -4826,7 +4826,7 @@ function ec(e) {
4826
4826
  return t === null ? e.receiver : `${t} (${e.receiver})`;
4827
4827
  }
4828
4828
  function tc(e) {
4829
- let { trpc: t, integrationId: n, device: r, onClose: i, onChanged: a } = e, { t: o } = X(), s = g(), [c, l] = T({}), u = async (e) => {
4829
+ let { trpc: t, integrationId: n, device: r, onClose: i, onChanged: a } = e, { t: o } = X(), s = u(), [c, l] = T({}), d = async (e) => {
4830
4830
  let i = e.central !== "on", c = e.name ?? `${r.name ?? r.address} ch${e.index}`;
4831
4831
  if (await s({
4832
4832
  title: o(i ? "devices.enableButtonEvents" : "devices.disableButtonEvents"),
@@ -4859,7 +4859,7 @@ function tc(e) {
4859
4859
  }
4860
4860
  }
4861
4861
  };
4862
- return /* @__PURE__ */ E(h, {
4862
+ return /* @__PURE__ */ E(f, {
4863
4863
  open: !0,
4864
4864
  onClose: i,
4865
4865
  icon: _e,
@@ -4874,13 +4874,13 @@ function tc(e) {
4874
4874
  }), r.keyChannels.map((e) => /* @__PURE__ */ E(nc, {
4875
4875
  channel: e,
4876
4876
  write: c[e.address],
4877
- onToggle: () => void u(e)
4877
+ onToggle: () => void d(e)
4878
4878
  }, e.address))]
4879
4879
  })
4880
4880
  });
4881
4881
  }
4882
- function nc(e) {
4883
- let { channel: n, write: r, onToggle: i } = e, { t: a } = X();
4882
+ function nc(t) {
4883
+ let { channel: n, write: r, onToggle: i } = t, { t: a } = X();
4884
4884
  return /* @__PURE__ */ D("div", {
4885
4885
  className: "flex items-center justify-between gap-3",
4886
4886
  "aria-busy": r?.kind === "busy",
@@ -4902,13 +4902,13 @@ function nc(e) {
4902
4902
  ]
4903
4903
  }), /* @__PURE__ */ D("div", {
4904
4904
  className: "flex flex-col items-end gap-1",
4905
- children: [/* @__PURE__ */ E(rc, { write: r }), n.central === "on" || n.central === "off" ? /* @__PURE__ */ E(t, {
4905
+ children: [/* @__PURE__ */ E(rc, { write: r }), n.central === "on" || n.central === "off" ? /* @__PURE__ */ E(e, {
4906
4906
  type: "button",
4907
4907
  variant: n.central === "on" ? "secondary" : "primary",
4908
4908
  disabled: r?.kind === "busy",
4909
4909
  onClick: i,
4910
4910
  children: a(n.central === "on" ? "devices.disableButtonEvents" : "devices.enableButtonEvents")
4911
- }) : /* @__PURE__ */ E(l, {
4911
+ }) : /* @__PURE__ */ E(c, {
4912
4912
  variant: "info",
4913
4913
  children: a($s(n.central))
4914
4914
  })]
@@ -4930,50 +4930,50 @@ function rc(e) {
4930
4930
  }
4931
4931
  //#endregion
4932
4932
  //#region src/ui/DeleteDeviceDialog.tsx
4933
- function ic(e) {
4934
- let { device: n, onClose: r, onDelete: i } = e, { t: a } = X(), [s, c] = T(!1), [l, u] = T(!1), [d, f] = T(!1), p = async () => {
4935
- f(!0);
4933
+ function ic(t) {
4934
+ let { device: n, onClose: r, onDelete: i } = t, { t: a } = X(), [o, c] = T(!1), [l, u] = T(!1), [d, m] = T(!1), h = async () => {
4935
+ m(!0);
4936
4936
  try {
4937
4937
  await i({
4938
- reset: s,
4938
+ reset: o,
4939
4939
  force: l
4940
4940
  });
4941
4941
  } finally {
4942
- f(!1);
4942
+ m(!1);
4943
4943
  }
4944
4944
  };
4945
- return /* @__PURE__ */ E(h, {
4945
+ return /* @__PURE__ */ E(f, {
4946
4946
  open: !0,
4947
4947
  onClose: r,
4948
4948
  icon: Te,
4949
4949
  width: "md",
4950
4950
  title: a("devices.deleteDialogTitle", { name: n.name ?? n.address }),
4951
4951
  testId: "hm-delete-device-dialog",
4952
- footer: /* @__PURE__ */ E(t, {
4952
+ footer: /* @__PURE__ */ E(e, {
4953
4953
  type: "button",
4954
4954
  variant: "danger",
4955
- onClick: () => void p(),
4955
+ onClick: () => void h(),
4956
4956
  disabled: d,
4957
4957
  children: a("devices.deleteContinue")
4958
4958
  }),
4959
4959
  children: /* @__PURE__ */ D("div", {
4960
4960
  className: "flex flex-col gap-3",
4961
- children: [/* @__PURE__ */ E(o, {
4961
+ children: [/* @__PURE__ */ E(s, {
4962
4962
  label: a("devices.deleteResetLabel"),
4963
4963
  description: a("devices.deleteResetHint"),
4964
4964
  children: /* @__PURE__ */ D("label", {
4965
4965
  className: "flex items-center gap-2 text-sm text-foreground",
4966
- children: [/* @__PURE__ */ E(v, {
4967
- checked: s,
4968
- onChange: () => c(!s)
4966
+ children: [/* @__PURE__ */ E(p, {
4967
+ checked: o,
4968
+ onChange: () => c(!o)
4969
4969
  }), /* @__PURE__ */ E("span", { children: a("devices.deleteResetOption") })]
4970
4970
  })
4971
- }), /* @__PURE__ */ E(o, {
4971
+ }), /* @__PURE__ */ E(s, {
4972
4972
  label: a("devices.deleteForceLabel"),
4973
4973
  description: a("devices.deleteForceHint"),
4974
4974
  children: /* @__PURE__ */ D("label", {
4975
4975
  className: "flex items-center gap-2 text-sm text-foreground",
4976
- children: [/* @__PURE__ */ E(v, {
4976
+ children: [/* @__PURE__ */ E(p, {
4977
4977
  checked: l,
4978
4978
  onChange: () => u(!l)
4979
4979
  }), /* @__PURE__ */ E("span", { children: a("devices.deleteForceOption") })]
@@ -4984,13 +4984,13 @@ function ic(e) {
4984
4984
  }
4985
4985
  //#endregion
4986
4986
  //#region src/ui/RenameDeviceDialog.tsx
4987
- function ac(e) {
4988
- let { channel: n, onRename: r } = e, { t: i } = X(), [a, o] = T(n.name ?? ""), [c, l] = T(!1), u = a.trim() !== "" && a.trim() !== (n.name ?? ""), d = async () => {
4989
- l(!0);
4987
+ function ac(t) {
4988
+ let { channel: n, onRename: r } = t, { t: i } = X(), [a, o] = T(n.name ?? ""), [s, c] = T(!1), l = a.trim() !== "" && a.trim() !== (n.name ?? ""), u = async () => {
4989
+ c(!0);
4990
4990
  try {
4991
4991
  await r(n, a);
4992
4992
  } finally {
4993
- l(!1);
4993
+ c(!1);
4994
4994
  }
4995
4995
  };
4996
4996
  return /* @__PURE__ */ D("li", {
@@ -5000,70 +5000,70 @@ function ac(e) {
5000
5000
  className: "w-10 shrink-0 text-xs text-foreground-subtle",
5001
5001
  children: [":", n.index]
5002
5002
  }),
5003
- /* @__PURE__ */ E(s, {
5003
+ /* @__PURE__ */ E(h, {
5004
5004
  "aria-label": i("rename.channelName", { index: n.index }),
5005
5005
  value: a,
5006
5006
  placeholder: n.type ?? "",
5007
5007
  onChange: (e) => o(e.target.value)
5008
5008
  }),
5009
- /* @__PURE__ */ E(t, {
5009
+ /* @__PURE__ */ E(e, {
5010
5010
  type: "button",
5011
5011
  size: "sm",
5012
5012
  variant: "secondary",
5013
- disabled: !u || c,
5014
- onClick: () => void d(),
5013
+ disabled: !l || s,
5014
+ onClick: () => void u(),
5015
5015
  children: i("rename.channelSave")
5016
5016
  })
5017
5017
  ]
5018
5018
  });
5019
5019
  }
5020
- function oc(e) {
5021
- let { device: n, onClose: r, onRenameDevice: i, onRenameChannel: a } = e, { t: c } = X(), [l, u] = T(n.name ?? ""), [d, f] = T(!1), [p, m] = T(!1), g = l.trim() !== "" && !p, _ = async () => {
5022
- m(!0);
5020
+ function oc(t) {
5021
+ let { device: n, onClose: r, onRenameDevice: i, onRenameChannel: a } = t, { t: o } = X(), [c, l] = T(n.name ?? ""), [u, d] = T(!1), [m, g] = T(!1), _ = c.trim() !== "" && !m, v = async () => {
5022
+ g(!0);
5023
5023
  try {
5024
5024
  await i({
5025
- name: l,
5026
- renameChannels: d
5025
+ name: c,
5026
+ renameChannels: u
5027
5027
  });
5028
5028
  } finally {
5029
- m(!1);
5029
+ g(!1);
5030
5030
  }
5031
5031
  };
5032
- return /* @__PURE__ */ E(h, {
5032
+ return /* @__PURE__ */ E(f, {
5033
5033
  open: !0,
5034
5034
  onClose: r,
5035
5035
  icon: ve,
5036
5036
  width: "md",
5037
- title: c("rename.title", { name: n.name ?? n.address }),
5037
+ title: o("rename.title", { name: n.name ?? n.address }),
5038
5038
  testId: "hm-rename-dialog",
5039
- footer: /* @__PURE__ */ E(t, {
5039
+ footer: /* @__PURE__ */ E(e, {
5040
5040
  type: "button",
5041
- onClick: () => void _(),
5042
- disabled: !g,
5043
- children: c("rename.deviceSave")
5041
+ onClick: () => void v(),
5042
+ disabled: !_,
5043
+ children: o("rename.deviceSave")
5044
5044
  }),
5045
5045
  children: /* @__PURE__ */ D("div", {
5046
5046
  className: "flex flex-col gap-3",
5047
5047
  children: [
5048
- /* @__PURE__ */ E(o, {
5049
- label: c("rename.deviceName"),
5048
+ /* @__PURE__ */ E(s, {
5049
+ label: o("rename.deviceName"),
5050
5050
  required: !0,
5051
- children: /* @__PURE__ */ E(s, {
5052
- "aria-label": c("rename.deviceName"),
5053
- value: l,
5054
- onChange: (e) => u(e.target.value)
5051
+ children: /* @__PURE__ */ E(h, {
5052
+ "aria-label": o("rename.deviceName"),
5053
+ value: c,
5054
+ onChange: (e) => l(e.target.value)
5055
5055
  })
5056
5056
  }),
5057
5057
  /* @__PURE__ */ D("label", {
5058
5058
  className: "flex items-center gap-2 text-sm text-foreground",
5059
- children: [/* @__PURE__ */ E(v, {
5060
- checked: d,
5061
- onChange: () => f(!d)
5062
- }), /* @__PURE__ */ E("span", { children: c("rename.renameChannels") })]
5059
+ children: [/* @__PURE__ */ E(p, {
5060
+ checked: u,
5061
+ onChange: () => d(!u)
5062
+ }), /* @__PURE__ */ E("span", { children: o("rename.renameChannels") })]
5063
5063
  }),
5064
- n.channels.length > 0 && /* @__PURE__ */ E(o, {
5065
- label: c("rename.channels"),
5066
- description: c("rename.channelsHint"),
5064
+ n.channels.length > 0 && /* @__PURE__ */ E(s, {
5065
+ label: o("rename.channels"),
5066
+ description: o("rename.channelsHint"),
5067
5067
  children: /* @__PURE__ */ E("ul", {
5068
5068
  className: "flex flex-col gap-2",
5069
5069
  children: n.channels.map((e) => /* @__PURE__ */ E(ac, {
@@ -5139,8 +5139,8 @@ function pc(e) {
5139
5139
  });
5140
5140
  }
5141
5141
  function mc(e) {
5142
- let { trpc: t, integrationId: n, navigate: r } = e, { t: i } = X(), a = Q(t, "listCcuDevices", C(() => ({ integrationId: n }), [n]), ds), o = C(() => a.data?.devices ?? [], [a.data]), s = u(o, cc), c = Zs(t), [d, p] = T(null), [h, g] = T(null), [v, b] = T(null), [x, S] = T(null), w = async (e, t) => {
5143
- await c({
5142
+ let { trpc: t, integrationId: n, navigate: i } = e, { t: s } = X(), u = Q(t, "listCcuDevices", C(() => ({ integrationId: n }), [n]), ds), d = C(() => u.data?.devices ?? [], [u.data]), f = r(d, cc), p = Zs(t), [m, h] = T(null), [g, v] = T(null), [y, b] = T(null), [x, S] = T(null), w = async (e, t) => {
5143
+ await p({
5144
5144
  action: "renameCcuDevice",
5145
5145
  input: {
5146
5146
  integrationId: n,
@@ -5149,15 +5149,15 @@ function mc(e) {
5149
5149
  renameChannels: t.renameChannels
5150
5150
  },
5151
5151
  schema: Fs,
5152
- title: i("rename.deviceTitle"),
5153
- message: i(t.renameChannels ? "rename.deviceMessageChannels" : "rename.deviceMessage", {
5152
+ title: s("rename.deviceTitle"),
5153
+ message: s(t.renameChannels ? "rename.deviceMessageChannels" : "rename.deviceMessage", {
5154
5154
  from: e.name ?? e.address,
5155
5155
  to: t.name.trim()
5156
5156
  }),
5157
- confirmLabel: i("rename.deviceConfirm")
5158
- }) !== null && (S(null), a.reload());
5157
+ confirmLabel: s("rename.deviceConfirm")
5158
+ }) !== null && (S(null), u.reload());
5159
5159
  }, ee = async (e, t) => {
5160
- await c({
5160
+ await p({
5161
5161
  action: "renameCcuChannel",
5162
5162
  input: {
5163
5163
  integrationId: n,
@@ -5165,15 +5165,15 @@ function mc(e) {
5165
5165
  name: t
5166
5166
  },
5167
5167
  schema: Ps,
5168
- title: i("rename.channelTitle"),
5169
- message: i("rename.channelMessage", {
5168
+ title: s("rename.channelTitle"),
5169
+ message: s("rename.channelMessage", {
5170
5170
  from: e.name ?? e.address,
5171
5171
  to: t.trim()
5172
5172
  }),
5173
- confirmLabel: i("rename.channelConfirm")
5174
- }) !== null && a.reload();
5173
+ confirmLabel: s("rename.channelConfirm")
5174
+ }) !== null && u.reload();
5175
5175
  }, te = async (e, t) => {
5176
- await c({
5176
+ await p({
5177
5177
  action: "deleteCcuDevice",
5178
5178
  input: {
5179
5179
  integrationId: n,
@@ -5182,96 +5182,96 @@ function mc(e) {
5182
5182
  force: t.force
5183
5183
  },
5184
5184
  schema: Y,
5185
- title: i("devices.deleteTitle"),
5186
- message: i(t.reset ? "devices.deleteMessageReset" : "devices.deleteMessage", { name: e.name ?? e.address }),
5187
- confirmLabel: i("devices.deleteConfirm"),
5185
+ title: s("devices.deleteTitle"),
5186
+ message: s(t.reset ? "devices.deleteMessageReset" : "devices.deleteMessage", { name: e.name ?? e.address }),
5187
+ confirmLabel: s("devices.deleteConfirm"),
5188
5188
  variant: "danger"
5189
- }) !== null && (p(null), a.reload());
5189
+ }) !== null && (h(null), u.reload());
5190
5190
  }, ne = C(() => [
5191
5191
  {
5192
5192
  key: "name",
5193
- header: i("devices.colDevice"),
5193
+ header: s("devices.colDevice"),
5194
5194
  render: (e) => /* @__PURE__ */ E(pc, {
5195
5195
  row: e,
5196
- navigate: r
5196
+ navigate: i
5197
5197
  }),
5198
5198
  sortValue: (e) => e.name ?? e.address
5199
5199
  },
5200
5200
  {
5201
5201
  key: "type",
5202
- header: i("devices.colType"),
5202
+ header: s("devices.colType"),
5203
5203
  render: (e) => e.type,
5204
5204
  sortValue: (e) => e.type
5205
5205
  },
5206
5206
  {
5207
5207
  key: "place",
5208
- header: i("devices.colPlace"),
5208
+ header: s("devices.colPlace"),
5209
5209
  nowrap: !1,
5210
5210
  render: (e) => Z([...e.rooms, ...e.functions].join(", ")),
5211
5211
  sortValue: (e) => e.rooms.join(", ")
5212
5212
  },
5213
5213
  {
5214
5214
  key: "firmware",
5215
- header: i("devices.colFirmware"),
5215
+ header: s("devices.colFirmware"),
5216
5216
  render: (e) => /* @__PURE__ */ D("span", {
5217
5217
  className: "flex items-center gap-1",
5218
- children: [Z(e.firmware), e.updatable === !0 && e.availableFirmware !== null && /* @__PURE__ */ E(l, {
5218
+ children: [Z(e.firmware), e.updatable === !0 && e.availableFirmware !== null && /* @__PURE__ */ E(c, {
5219
5219
  variant: "info",
5220
- children: i("devices.updateTo", { version: e.availableFirmware })
5220
+ children: s("devices.updateTo", { version: e.availableFirmware })
5221
5221
  })]
5222
5222
  }),
5223
5223
  sortValue: (e) => e.firmware
5224
5224
  },
5225
5225
  {
5226
5226
  key: "signal",
5227
- header: i("devices.colSignal"),
5227
+ header: s("devices.colSignal"),
5228
5228
  align: "right",
5229
5229
  render: lc,
5230
5230
  sortValue: (e) => e.rssi
5231
5231
  },
5232
5232
  {
5233
5233
  key: "duty",
5234
- header: i("devices.colDutyCycle"),
5234
+ header: s("devices.colDutyCycle"),
5235
5235
  align: "right",
5236
- render: (e) => e.dutyCycleLimited === !0 ? /* @__PURE__ */ E(l, {
5236
+ render: (e) => e.dutyCycleLimited === !0 ? /* @__PURE__ */ E(c, {
5237
5237
  variant: "warning",
5238
- children: i("devices.dutyLimited")
5238
+ children: s("devices.dutyLimited")
5239
5239
  }) : Gs(e.dutyCycle),
5240
5240
  sortValue: (e) => e.dutyCycle
5241
5241
  },
5242
5242
  {
5243
5243
  key: "health",
5244
- header: i("devices.colHealth"),
5244
+ header: s("devices.colHealth"),
5245
5245
  nowrap: !1,
5246
5246
  notSortableReason: "A set of flags, not one value",
5247
5247
  render: (e) => /* @__PURE__ */ D("span", {
5248
5248
  className: "flex flex-wrap gap-1",
5249
5249
  children: [
5250
- e.unreach === !0 && /* @__PURE__ */ E(l, {
5250
+ e.unreach === !0 && /* @__PURE__ */ E(c, {
5251
5251
  variant: "danger",
5252
- children: i("devices.unreach")
5252
+ children: s("devices.unreach")
5253
5253
  }),
5254
- e.sabotage === !0 && /* @__PURE__ */ E(l, {
5254
+ e.sabotage === !0 && /* @__PURE__ */ E(c, {
5255
5255
  variant: "danger",
5256
- children: i("devices.sabotage")
5256
+ children: s("devices.sabotage")
5257
5257
  }),
5258
- e.lowBattery === !0 && /* @__PURE__ */ E(l, {
5258
+ e.lowBattery === !0 && /* @__PURE__ */ E(c, {
5259
5259
  variant: "warning",
5260
- children: i("devices.lowBattery")
5260
+ children: s("devices.lowBattery")
5261
5261
  }),
5262
- e.configPending === !0 && /* @__PURE__ */ E(l, {
5262
+ e.configPending === !0 && /* @__PURE__ */ E(c, {
5263
5263
  variant: "info",
5264
- children: i("devices.configPending")
5264
+ children: s("devices.configPending")
5265
5265
  }),
5266
- sc(e) === "ok" && /* @__PURE__ */ E(l, {
5266
+ sc(e) === "ok" && /* @__PURE__ */ E(c, {
5267
5267
  variant: "success",
5268
- children: i("devices.ok")
5268
+ children: s("devices.ok")
5269
5269
  }),
5270
- e.keyChannels.map((e) => /* @__PURE__ */ E(l, {
5270
+ e.keyChannels.map((e) => /* @__PURE__ */ E(c, {
5271
5271
  variant: e.central === "on" ? "success" : "warning",
5272
- children: i("devices.buttonEventsBadge", {
5272
+ children: s("devices.buttonEventsBadge", {
5273
5273
  index: e.index,
5274
- state: i($s(e.central))
5274
+ state: s($s(e.central))
5275
5275
  })
5276
5276
  }, e.address))
5277
5277
  ]
@@ -5282,87 +5282,87 @@ function mc(e) {
5282
5282
  header: "",
5283
5283
  align: "right",
5284
5284
  notSortableReason: "Action column",
5285
- render: (e) => /* @__PURE__ */ E(f, { items: [
5286
- ...dc(e, i("devices.openDevicePage"), r),
5285
+ render: (e) => /* @__PURE__ */ E(l, { items: [
5286
+ ...dc(e, s("devices.openDevicePage"), i),
5287
5287
  ...e.keyChannels.length > 0 ? [{
5288
5288
  id: "button-events",
5289
- label: i("devices.buttonEventsAction"),
5289
+ label: s("devices.buttonEventsAction"),
5290
5290
  icon: _e,
5291
5291
  onClick: () => b(e.address)
5292
5292
  }] : [],
5293
5293
  {
5294
5294
  id: "rename",
5295
- label: i("devices.renameAction"),
5295
+ label: s("devices.renameAction"),
5296
5296
  icon: ve,
5297
5297
  onClick: () => S(e)
5298
5298
  },
5299
5299
  {
5300
5300
  id: "configure",
5301
- label: i("devices.configureAction"),
5301
+ label: s("devices.configureAction"),
5302
5302
  icon: we,
5303
- onClick: () => g(e)
5303
+ onClick: () => v(e)
5304
5304
  },
5305
5305
  {
5306
5306
  id: "delete",
5307
- label: i("devices.deleteAction"),
5307
+ label: s("devices.deleteAction"),
5308
5308
  icon: Te,
5309
5309
  danger: !0,
5310
- onClick: () => p(e)
5310
+ onClick: () => h(e)
5311
5311
  }
5312
5312
  ] })
5313
5313
  }
5314
- ], [r, i]);
5315
- if (a.error !== null) return /* @__PURE__ */ E(y, {
5316
- title: i("devices.loadFailed"),
5317
- message: a.error,
5318
- onRetry: a.reload
5314
+ ], [i, s]);
5315
+ if (u.error !== null) return /* @__PURE__ */ E(o, {
5316
+ title: s("devices.loadFailed"),
5317
+ message: u.error,
5318
+ onRetry: u.reload
5319
5319
  });
5320
- let re = v === null ? null : o.find((e) => e.address === v) ?? null, ie = {
5321
- issue: i("devices.groupIssue"),
5322
- type: i("devices.groupType")
5323
- }, ae = (e) => e === "unreach" || e === "sabotage" || e === "lowBattery" || e === "configPending" || e === "ok" ? i(`devices.${e}`) : e;
5320
+ let re = y === null ? null : d.find((e) => e.address === y) ?? null, ie = {
5321
+ issue: s("devices.groupIssue"),
5322
+ type: s("devices.groupType")
5323
+ }, ae = (e) => e === "unreach" || e === "sabotage" || e === "lowBattery" || e === "configPending" || e === "ok" ? s(`devices.${e}`) : e;
5324
5324
  return /* @__PURE__ */ D("div", {
5325
5325
  className: "flex flex-col gap-3",
5326
5326
  children: [
5327
- /* @__PURE__ */ E(_, {
5328
- state: s.state,
5329
- facets: s.facets,
5330
- groups: s.groups.map((e) => ({
5327
+ /* @__PURE__ */ E(a, {
5328
+ state: f.state,
5329
+ facets: f.facets,
5330
+ groups: f.groups.map((e) => ({
5331
5331
  ...e,
5332
5332
  label: ie[e.id] ?? e.id,
5333
5333
  ...e.id === "issue" ? { facetLabel: ae } : {}
5334
5334
  })),
5335
5335
  labels: {
5336
- searchPlaceholder: i("devices.searchPlaceholder"),
5337
- searchLabel: i("devices.searchLabel"),
5338
- facetsLabel: i("devices.facetsLabel"),
5339
- clearLabel: i("devices.clearFilters")
5336
+ searchPlaceholder: s("devices.searchPlaceholder"),
5337
+ searchLabel: s("devices.searchLabel"),
5338
+ facetsLabel: s("devices.facetsLabel"),
5339
+ clearLabel: s("devices.clearFilters")
5340
5340
  },
5341
- onSearch: s.setSearch,
5342
- onToggleFacet: s.toggleFacet,
5343
- onToggleGroupFacet: s.toggleGroupFacet,
5344
- onClear: s.clear
5341
+ onSearch: f.setSearch,
5342
+ onToggleFacet: f.toggleFacet,
5343
+ onToggleGroupFacet: f.toggleGroupFacet,
5344
+ onClear: f.clear
5345
5345
  }),
5346
- /* @__PURE__ */ E(m, {
5346
+ /* @__PURE__ */ E(_, {
5347
5347
  columns: ne,
5348
- rows: s.rows,
5348
+ rows: f.rows,
5349
5349
  rowKey: (e) => e.address,
5350
5350
  minWidthPx: 760,
5351
5351
  pageSize: 25,
5352
- emptyMessage: a.loading ? i("common.loading") : s.active ? i("devices.noMatch") : i("devices.none")
5352
+ emptyMessage: u.loading ? s("common.loading") : f.active ? s("devices.noMatch") : s("devices.none")
5353
5353
  }),
5354
- h !== null && /* @__PURE__ */ E(Qs, {
5354
+ g !== null && /* @__PURE__ */ E(Qs, {
5355
5355
  trpc: t,
5356
5356
  integrationId: n,
5357
- device: h,
5358
- onClose: () => g(null)
5357
+ device: g,
5358
+ onClose: () => v(null)
5359
5359
  }),
5360
5360
  re !== null && /* @__PURE__ */ E(tc, {
5361
5361
  trpc: t,
5362
5362
  integrationId: n,
5363
5363
  device: re,
5364
5364
  onClose: () => b(null),
5365
- onChanged: () => a.reload()
5365
+ onChanged: () => u.reload()
5366
5366
  }),
5367
5367
  x !== null && /* @__PURE__ */ E(oc, {
5368
5368
  device: x,
@@ -5370,77 +5370,77 @@ function mc(e) {
5370
5370
  onRenameDevice: (e) => w(x, e),
5371
5371
  onRenameChannel: ee
5372
5372
  }),
5373
- d !== null && /* @__PURE__ */ E(ic, {
5374
- device: d,
5375
- onClose: () => p(null),
5376
- onDelete: (e) => te(d, e)
5373
+ m !== null && /* @__PURE__ */ E(ic, {
5374
+ device: m,
5375
+ onClose: () => h(null),
5376
+ onDelete: (e) => te(m, e)
5377
5377
  })
5378
5378
  ]
5379
5379
  });
5380
5380
  }
5381
5381
  //#endregion
5382
5382
  //#region src/ui/GroupFormDialog.tsx
5383
- function hc(e) {
5384
- let { group: n, candidates: r, onClose: i, onSave: a } = e, { t: c } = X(), [l, u] = T(n?.name ?? ""), [d, f] = T(n?.type ?? fs[0]), [p, m] = T(() => n?.members.map((e) => e.address) ?? []), [g, _] = T(!1), y = (e) => m((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]), x = l.trim() !== "" && p.length > 0 && !g, S = async () => {
5385
- _(!0);
5383
+ function hc(t) {
5384
+ let { group: n, candidates: r, onClose: i, onSave: a } = t, { t: o } = X(), [c, l] = T(n?.name ?? ""), [u, d] = T(n?.type ?? fs[0]), [m, g] = T(() => n?.members.map((e) => e.address) ?? []), [_, v] = T(!1), y = (e) => g((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]), b = c.trim() !== "" && m.length > 0 && !_, x = async () => {
5385
+ v(!0);
5386
5386
  try {
5387
5387
  await a({
5388
- name: l,
5389
- type: d,
5390
- members: p
5388
+ name: c,
5389
+ type: u,
5390
+ members: m
5391
5391
  });
5392
5392
  } finally {
5393
- _(!1);
5393
+ v(!1);
5394
5394
  }
5395
5395
  };
5396
- return /* @__PURE__ */ E(h, {
5396
+ return /* @__PURE__ */ E(f, {
5397
5397
  open: !0,
5398
5398
  onClose: i,
5399
5399
  icon: me,
5400
5400
  width: "md",
5401
- title: n === null ? c("heating.newGroup") : c("heating.editGroup", { name: n.name }),
5401
+ title: n === null ? o("heating.newGroup") : o("heating.editGroup", { name: n.name }),
5402
5402
  testId: "hm-group-dialog",
5403
- footer: /* @__PURE__ */ E(t, {
5403
+ footer: /* @__PURE__ */ E(e, {
5404
5404
  type: "button",
5405
- onClick: () => void S(),
5406
- disabled: !x,
5407
- children: c("heating.save")
5405
+ onClick: () => void x(),
5406
+ disabled: !b,
5407
+ children: o("heating.save")
5408
5408
  }),
5409
5409
  children: /* @__PURE__ */ D("div", {
5410
5410
  className: "flex flex-col gap-3",
5411
5411
  children: [
5412
- /* @__PURE__ */ E(o, {
5413
- label: c("heating.fieldName"),
5412
+ /* @__PURE__ */ E(s, {
5413
+ label: o("heating.fieldName"),
5414
5414
  required: !0,
5415
- children: /* @__PURE__ */ E(s, {
5416
- value: l,
5417
- onChange: (e) => u(e.target.value)
5415
+ children: /* @__PURE__ */ E(h, {
5416
+ value: c,
5417
+ onChange: (e) => l(e.target.value)
5418
5418
  })
5419
5419
  }),
5420
- n === null && /* @__PURE__ */ E(o, {
5421
- label: c("heating.fieldType"),
5422
- children: /* @__PURE__ */ E(b, {
5423
- value: d,
5424
- onChange: (e) => f(e.target.value),
5420
+ n === null && /* @__PURE__ */ E(s, {
5421
+ label: o("heating.fieldType"),
5422
+ children: /* @__PURE__ */ E(S, {
5423
+ value: u,
5424
+ onChange: (e) => d(e.target.value),
5425
5425
  options: fs.map((e) => ({
5426
5426
  value: e,
5427
- label: c(e === "hmip.heating.group" ? "heating.typeHmip" : "heating.typeHomematic")
5427
+ label: o(e === "hmip.heating.group" ? "heating.typeHmip" : "heating.typeHomematic")
5428
5428
  }))
5429
5429
  })
5430
5430
  }),
5431
- /* @__PURE__ */ E(o, {
5432
- label: c("heating.fieldMembers"),
5433
- description: c("heating.fieldMembersHint"),
5431
+ /* @__PURE__ */ E(s, {
5432
+ label: o("heating.fieldMembers"),
5433
+ description: o("heating.fieldMembersHint"),
5434
5434
  children: r.length === 0 ? /* @__PURE__ */ E("p", {
5435
5435
  className: "text-xs text-foreground-subtle",
5436
- children: c("heating.noCandidates")
5436
+ children: o("heating.noCandidates")
5437
5437
  }) : /* @__PURE__ */ E("ul", {
5438
5438
  className: "flex flex-col gap-1",
5439
5439
  children: r.map((e) => /* @__PURE__ */ E("li", { children: /* @__PURE__ */ D("label", {
5440
5440
  className: "flex items-center gap-2 text-sm text-foreground",
5441
5441
  children: [
5442
- /* @__PURE__ */ E(v, {
5443
- checked: p.includes(e.address),
5442
+ /* @__PURE__ */ E(p, {
5443
+ checked: m.includes(e.address),
5444
5444
  onChange: () => y(e.address)
5445
5445
  }),
5446
5446
  /* @__PURE__ */ E("span", { children: e.deviceName ?? e.address }),
@@ -5478,9 +5478,9 @@ function gc(e) {
5478
5478
  function _c(e) {
5479
5479
  return e === null ? "—" : `${e} °C`;
5480
5480
  }
5481
- function vc(e) {
5482
- let { trpc: n, integrationId: r } = e, { t: i } = X(), a = Q(n, "listHeatingGroups", C(() => ({ integrationId: r }), [r]), _s), o = Zs(n), [s, c] = T({ kind: "closed" }), u = async (e, t) => {
5483
- (e === null ? await o({
5481
+ function vc(t) {
5482
+ let { trpc: n, integrationId: r } = t, { t: i } = X(), a = Q(n, "listHeatingGroups", C(() => ({ integrationId: r }), [r]), _s), s = Zs(n), [u, d] = T({ kind: "closed" }), f = async (e, t) => {
5483
+ (e === null ? await s({
5484
5484
  action: "createHeatingGroup",
5485
5485
  input: {
5486
5486
  integrationId: r,
@@ -5495,7 +5495,7 @@ function vc(e) {
5495
5495
  count: t.members.length
5496
5496
  }),
5497
5497
  confirmLabel: i("heating.createConfirm")
5498
- }) : await o({
5498
+ }) : await s({
5499
5499
  action: "updateHeatingGroup",
5500
5500
  input: {
5501
5501
  integrationId: r,
@@ -5510,9 +5510,9 @@ function vc(e) {
5510
5510
  count: t.members.length
5511
5511
  }),
5512
5512
  confirmLabel: i("heating.updateConfirm")
5513
- })) !== null && (c({ kind: "closed" }), a.reload());
5514
- }, d = async (e) => {
5515
- await o({
5513
+ })) !== null && (d({ kind: "closed" }), a.reload());
5514
+ }, p = async (e) => {
5515
+ await s({
5516
5516
  action: "deleteHeatingGroup",
5517
5517
  input: {
5518
5518
  integrationId: r,
@@ -5524,7 +5524,7 @@ function vc(e) {
5524
5524
  confirmLabel: i("heating.deleteConfirm"),
5525
5525
  variant: "danger"
5526
5526
  }) !== null && a.reload();
5527
- }, p = [
5527
+ }, m = [
5528
5528
  {
5529
5529
  key: "name",
5530
5530
  header: i("heating.colGroup"),
@@ -5549,11 +5549,11 @@ function vc(e) {
5549
5549
  header: "",
5550
5550
  align: "right",
5551
5551
  notSortableReason: "Action column",
5552
- render: (e) => /* @__PURE__ */ E(f, { items: [{
5552
+ render: (e) => /* @__PURE__ */ E(l, { items: [{
5553
5553
  id: "edit",
5554
5554
  label: i("heating.edit"),
5555
5555
  icon: ve,
5556
- onClick: () => c({
5556
+ onClick: () => d({
5557
5557
  kind: "form",
5558
5558
  group: e
5559
5559
  })
@@ -5561,7 +5561,7 @@ function vc(e) {
5561
5561
  id: "delete",
5562
5562
  label: i("heating.delete"),
5563
5563
  icon: Te,
5564
- onClick: () => void d(e)
5564
+ onClick: () => void p(e)
5565
5565
  }] })
5566
5566
  }
5567
5567
  ], h = [
@@ -5594,14 +5594,14 @@ function vc(e) {
5594
5594
  {
5595
5595
  key: "activity",
5596
5596
  header: i("heating.colActivity"),
5597
- render: (e) => /* @__PURE__ */ E(l, {
5597
+ render: (e) => /* @__PURE__ */ E(c, {
5598
5598
  variant: e.activity === "heating" ? "warning" : "default",
5599
5599
  children: i(`heating.activity_${e.activity}`)
5600
5600
  }),
5601
5601
  sortValue: (e) => e.activity
5602
5602
  }
5603
5603
  ];
5604
- if (a.error !== null) return /* @__PURE__ */ E(y, {
5604
+ if (a.error !== null) return /* @__PURE__ */ E(o, {
5605
5605
  title: i("heating.loadFailed"),
5606
5606
  message: a.error,
5607
5607
  onRetry: a.reload
@@ -5613,22 +5613,22 @@ function vc(e) {
5613
5613
  /* @__PURE__ */ E(gc, {
5614
5614
  headingId: "hm-heating-groups",
5615
5615
  title: i("heating.groupsTitle"),
5616
- actions: /* @__PURE__ */ D(t, {
5616
+ actions: /* @__PURE__ */ D(e, {
5617
5617
  type: "button",
5618
5618
  size: "sm",
5619
5619
  disabled: g === void 0 || g.groupsError !== null,
5620
- onClick: () => c({
5620
+ onClick: () => d({
5621
5621
  kind: "form",
5622
5622
  group: null
5623
5623
  }),
5624
5624
  children: [/* @__PURE__ */ E(be, { className: "h-4 w-4" }), i("heating.newGroup")]
5625
5625
  }),
5626
- children: g?.groupsError ? /* @__PURE__ */ E(y, {
5626
+ children: g?.groupsError ? /* @__PURE__ */ E(o, {
5627
5627
  variant: "warning",
5628
5628
  title: i("heating.groupsUnavailable"),
5629
5629
  message: g.groupsError
5630
- }) : /* @__PURE__ */ E(m, {
5631
- columns: p,
5630
+ }) : /* @__PURE__ */ E(_, {
5631
+ columns: m,
5632
5632
  rows: g?.groups ?? [],
5633
5633
  rowKey: (e) => e.id,
5634
5634
  minWidthPx: 520,
@@ -5638,7 +5638,7 @@ function vc(e) {
5638
5638
  /* @__PURE__ */ E(gc, {
5639
5639
  headingId: "hm-heating-thermostats",
5640
5640
  title: i("heating.thermostatsTitle"),
5641
- children: /* @__PURE__ */ E(m, {
5641
+ children: /* @__PURE__ */ E(_, {
5642
5642
  columns: h,
5643
5643
  rows: g?.thermostats ?? [],
5644
5644
  rowKey: (e) => e.channel,
@@ -5646,11 +5646,11 @@ function vc(e) {
5646
5646
  emptyMessage: a.loading ? i("common.loading") : i("heating.noThermostats")
5647
5647
  })
5648
5648
  }),
5649
- s.kind === "form" && g !== void 0 && /* @__PURE__ */ E(hc, {
5650
- group: s.group,
5649
+ u.kind === "form" && g !== void 0 && /* @__PURE__ */ E(hc, {
5650
+ group: u.group,
5651
5651
  candidates: g.candidates,
5652
- onClose: () => c({ kind: "closed" }),
5653
- onSave: (e) => u(s.group, e)
5652
+ onClose: () => d({ kind: "closed" }),
5653
+ onSave: (e) => f(u.group, e)
5654
5654
  })
5655
5655
  ]
5656
5656
  });
@@ -5674,31 +5674,31 @@ function bc(e) {
5674
5674
  label: `${$(e)}${t} (${e.address})`
5675
5675
  };
5676
5676
  }
5677
- function xc(e) {
5678
- let { link: n, senders: r, receivers: i, onClose: a, onSave: s } = e, { t: c } = X(), l = n?.profile?.kind === "switch" ? n.profile : null, [u, d] = T(n?.sender.address ?? ""), [f, p] = T(n?.receiver.address ?? ""), [m, g] = T(l?.short ?? "toggle"), [_, v] = T(l?.long ?? "toggle"), [y, x] = T(!1), S = Cs.map((e) => ({
5677
+ function xc(t) {
5678
+ let { link: n, senders: r, receivers: i, onClose: a, onSave: o } = t, { t: c } = X(), l = n?.profile?.kind === "switch" ? n.profile : null, [u, d] = T(n?.sender.address ?? ""), [p, m] = T(n?.receiver.address ?? ""), [h, g] = T(l?.short ?? "toggle"), [_, v] = T(l?.long ?? "toggle"), [y, b] = T(!1), x = Cs.map((e) => ({
5679
5679
  value: e,
5680
5680
  label: c(`links.action_${e}`)
5681
- })), C = u !== "" && f !== "" && !y, w = async () => {
5682
- x(!0);
5681
+ })), C = u !== "" && p !== "" && !y, w = async () => {
5682
+ b(!0);
5683
5683
  try {
5684
- await s({
5684
+ await o({
5685
5685
  sender: u,
5686
- receiver: f,
5687
- short: m,
5686
+ receiver: p,
5687
+ short: h,
5688
5688
  long: _
5689
5689
  });
5690
5690
  } finally {
5691
- x(!1);
5691
+ b(!1);
5692
5692
  }
5693
5693
  };
5694
- return /* @__PURE__ */ E(h, {
5694
+ return /* @__PURE__ */ E(f, {
5695
5695
  open: !0,
5696
5696
  onClose: a,
5697
5697
  icon: he,
5698
5698
  width: "md",
5699
5699
  title: c(n === null ? "links.newLink" : "links.editProfile"),
5700
5700
  testId: "hm-link-dialog",
5701
- footer: /* @__PURE__ */ E(t, {
5701
+ footer: /* @__PURE__ */ E(e, {
5702
5702
  type: "button",
5703
5703
  onClick: () => void w(),
5704
5704
  disabled: !C,
@@ -5707,11 +5707,11 @@ function xc(e) {
5707
5707
  children: /* @__PURE__ */ D("div", {
5708
5708
  className: "flex flex-col gap-3",
5709
5709
  children: [
5710
- n === null ? /* @__PURE__ */ D(ie, { children: [/* @__PURE__ */ E(o, {
5710
+ n === null ? /* @__PURE__ */ D(ie, { children: [/* @__PURE__ */ E(s, {
5711
5711
  label: c("links.fieldSender"),
5712
5712
  description: c("links.fieldSenderHint"),
5713
5713
  required: !0,
5714
- children: /* @__PURE__ */ E(b, {
5714
+ children: /* @__PURE__ */ E(S, {
5715
5715
  "aria-label": c("links.fieldSender"),
5716
5716
  value: u,
5717
5717
  onChange: (e) => d(e.target.value),
@@ -5720,14 +5720,14 @@ function xc(e) {
5720
5720
  label: c("links.pick")
5721
5721
  }, ...r.map(bc)]
5722
5722
  })
5723
- }), /* @__PURE__ */ E(o, {
5723
+ }), /* @__PURE__ */ E(s, {
5724
5724
  label: c("links.fieldReceiver"),
5725
5725
  description: c("links.fieldReceiverHint"),
5726
5726
  required: !0,
5727
- children: /* @__PURE__ */ E(b, {
5727
+ children: /* @__PURE__ */ E(S, {
5728
5728
  "aria-label": c("links.fieldReceiver"),
5729
- value: f,
5730
- onChange: (e) => p(e.target.value),
5729
+ value: p,
5730
+ onChange: (e) => m(e.target.value),
5731
5731
  options: [{
5732
5732
  value: "",
5733
5733
  label: c("links.pick")
@@ -5741,26 +5741,26 @@ function xc(e) {
5741
5741
  $(n.receiver)
5742
5742
  ]
5743
5743
  }),
5744
- /* @__PURE__ */ E(o, {
5744
+ /* @__PURE__ */ E(s, {
5745
5745
  label: c("links.fieldShort"),
5746
- children: /* @__PURE__ */ E(b, {
5746
+ children: /* @__PURE__ */ E(S, {
5747
5747
  "aria-label": c("links.fieldShort"),
5748
- value: m,
5748
+ value: h,
5749
5749
  onChange: (e) => {
5750
5750
  yc(e.target.value) && g(e.target.value);
5751
5751
  },
5752
- options: S
5752
+ options: x
5753
5753
  })
5754
5754
  }),
5755
- /* @__PURE__ */ E(o, {
5755
+ /* @__PURE__ */ E(s, {
5756
5756
  label: c("links.fieldLong"),
5757
- children: /* @__PURE__ */ E(b, {
5757
+ children: /* @__PURE__ */ E(S, {
5758
5758
  "aria-label": c("links.fieldLong"),
5759
5759
  value: _,
5760
5760
  onChange: (e) => {
5761
5761
  yc(e.target.value) && v(e.target.value);
5762
5762
  },
5763
- options: S
5763
+ options: x
5764
5764
  })
5765
5765
  })
5766
5766
  ]
@@ -5806,94 +5806,94 @@ function Tc(e) {
5806
5806
  })]
5807
5807
  });
5808
5808
  }
5809
- function Ec(e) {
5810
- let { trpc: n, integrationId: r } = e, { t: i } = X(), a = Q(n, "listCcuLinks", C(() => ({ integrationId: r }), [r]), ks), o = Zs(n), [s, c] = T({ kind: "closed" }), d = u(a.data?.links ?? [], wc), p = (e, t) => {
5811
- let n = [...a.data?.senders ?? [], ...a.data?.receivers ?? []], r = (e) => {
5809
+ function Ec(t) {
5810
+ let { trpc: n, integrationId: i } = t, { t: s } = X(), u = Q(n, "listCcuLinks", C(() => ({ integrationId: i }), [i]), ks), d = Zs(n), [f, p] = T({ kind: "closed" }), m = r(u.data?.links ?? [], wc), h = (e, t) => {
5811
+ let n = [...u.data?.senders ?? [], ...u.data?.receivers ?? []], r = (e) => {
5812
5812
  let t = n.find((t) => t.address === e);
5813
5813
  return t === void 0 ? e : $(t);
5814
5814
  };
5815
5815
  return `${r(e)} → ${r(t)}`;
5816
- }, h = async (e, t) => {
5816
+ }, g = async (e, t) => {
5817
5817
  let n = {
5818
- short: i(`links.action_${t.short}`),
5819
- long: i(`links.action_${t.long}`)
5818
+ short: s(`links.action_${t.short}`),
5819
+ long: s(`links.action_${t.long}`)
5820
5820
  };
5821
- await o({
5821
+ await d({
5822
5822
  action: e === null ? "createCcuLink" : "setCcuLinkProfile",
5823
5823
  input: {
5824
- integrationId: r,
5824
+ integrationId: i,
5825
5825
  ...t
5826
5826
  },
5827
5827
  schema: Y,
5828
- title: i(e === null ? "links.createTitle" : "links.profileTitle"),
5829
- message: i(e === null ? "links.createMessage" : "links.profileMessage", {
5830
- link: p(t.sender, t.receiver),
5828
+ title: s(e === null ? "links.createTitle" : "links.profileTitle"),
5829
+ message: s(e === null ? "links.createMessage" : "links.profileMessage", {
5830
+ link: h(t.sender, t.receiver),
5831
5831
  ...n
5832
5832
  }),
5833
- confirmLabel: i(e === null ? "links.createConfirm" : "links.profileConfirm")
5834
- }) !== null && (c({ kind: "closed" }), a.reload());
5835
- }, g = async (e) => {
5836
- await o({
5833
+ confirmLabel: s(e === null ? "links.createConfirm" : "links.profileConfirm")
5834
+ }) !== null && (p({ kind: "closed" }), u.reload());
5835
+ }, v = async (e) => {
5836
+ await d({
5837
5837
  action: "deleteCcuLink",
5838
5838
  input: {
5839
- integrationId: r,
5839
+ integrationId: i,
5840
5840
  sender: e.sender.address,
5841
5841
  receiver: e.receiver.address
5842
5842
  },
5843
5843
  schema: Y,
5844
- title: i("links.deleteTitle"),
5845
- message: i("links.deleteMessage", { link: `${$(e.sender)} → ${$(e.receiver)}` }),
5846
- confirmLabel: i("links.deleteConfirm"),
5844
+ title: s("links.deleteTitle"),
5845
+ message: s("links.deleteMessage", { link: `${$(e.sender)} → ${$(e.receiver)}` }),
5846
+ confirmLabel: s("links.deleteConfirm"),
5847
5847
  variant: "danger"
5848
- }) !== null && a.reload();
5849
- }, v = (e) => e.profile === null ? /* @__PURE__ */ E("span", {
5848
+ }) !== null && u.reload();
5849
+ }, y = (e) => e.profile === null ? /* @__PURE__ */ E("span", {
5850
5850
  className: "text-foreground-subtle",
5851
5851
  children: "—"
5852
- }) : e.profile.kind === "custom" ? /* @__PURE__ */ E(l, { children: i("links.profileCustom") }) : /* @__PURE__ */ E("span", {
5852
+ }) : e.profile.kind === "custom" ? /* @__PURE__ */ E(c, { children: s("links.profileCustom") }) : /* @__PURE__ */ E("span", {
5853
5853
  className: "text-sm text-foreground",
5854
- children: i("links.profileSwitch", {
5855
- short: i(`links.action_${e.profile.short}`),
5856
- long: i(`links.action_${e.profile.long}`)
5854
+ children: s("links.profileSwitch", {
5855
+ short: s(`links.action_${e.profile.short}`),
5856
+ long: s(`links.action_${e.profile.long}`)
5857
5857
  })
5858
5858
  }), b = (e) => [...e.profile?.kind === "switch" ? [{
5859
5859
  id: "edit",
5860
- label: i("links.editProfile"),
5860
+ label: s("links.editProfile"),
5861
5861
  icon: ve,
5862
- onClick: () => c({
5862
+ onClick: () => p({
5863
5863
  kind: "form",
5864
5864
  link: e
5865
5865
  })
5866
5866
  }] : [], {
5867
5867
  id: "delete",
5868
- label: i("links.delete"),
5868
+ label: s("links.delete"),
5869
5869
  icon: Te,
5870
- onClick: () => void g(e)
5870
+ onClick: () => void v(e)
5871
5871
  }], x = [
5872
5872
  {
5873
5873
  key: "sender",
5874
- header: i("links.colSender"),
5874
+ header: s("links.colSender"),
5875
5875
  nowrap: !1,
5876
5876
  render: (e) => /* @__PURE__ */ E(Tc, { endpoint: e.sender }),
5877
5877
  sortValue: (e) => $(e.sender)
5878
5878
  },
5879
5879
  {
5880
5880
  key: "receiver",
5881
- header: i("links.colReceiver"),
5881
+ header: s("links.colReceiver"),
5882
5882
  nowrap: !1,
5883
5883
  render: (e) => /* @__PURE__ */ E(Tc, { endpoint: e.receiver }),
5884
5884
  sortValue: (e) => $(e.receiver)
5885
5885
  },
5886
5886
  {
5887
5887
  key: "name",
5888
- header: i("links.colName"),
5888
+ header: s("links.colName"),
5889
5889
  render: (e) => e.name || "—",
5890
5890
  sortValue: (e) => e.name
5891
5891
  },
5892
5892
  {
5893
5893
  key: "profile",
5894
- header: i("links.colProfile"),
5894
+ header: s("links.colProfile"),
5895
5895
  nowrap: !1,
5896
- render: v,
5896
+ render: y,
5897
5897
  sortValue: (e) => e.profile === null ? "" : e.profile.kind
5898
5898
  },
5899
5899
  {
@@ -5901,71 +5901,71 @@ function Ec(e) {
5901
5901
  header: "",
5902
5902
  align: "right",
5903
5903
  notSortableReason: "Action column",
5904
- render: (e) => /* @__PURE__ */ E(f, { items: b(e) })
5904
+ render: (e) => /* @__PURE__ */ E(l, { items: b(e) })
5905
5905
  }
5906
5906
  ];
5907
- if (a.error !== null) return /* @__PURE__ */ E(y, {
5908
- title: i("links.loadFailed"),
5909
- message: a.error,
5910
- onRetry: a.reload
5907
+ if (u.error !== null) return /* @__PURE__ */ E(o, {
5908
+ title: s("links.loadFailed"),
5909
+ message: u.error,
5910
+ onRetry: u.reload
5911
5911
  });
5912
- let S = a.data, w = S?.failures ?? [];
5912
+ let S = u.data, w = S?.failures ?? [];
5913
5913
  return /* @__PURE__ */ D("div", {
5914
5914
  className: "flex flex-col gap-3",
5915
5915
  children: [/* @__PURE__ */ D(gc, {
5916
5916
  headingId: "hm-links",
5917
- title: i("links.title"),
5918
- actions: /* @__PURE__ */ D(t, {
5917
+ title: s("links.title"),
5918
+ actions: /* @__PURE__ */ D(e, {
5919
5919
  type: "button",
5920
5920
  size: "sm",
5921
5921
  disabled: S === void 0,
5922
- onClick: () => c({
5922
+ onClick: () => p({
5923
5923
  kind: "form",
5924
5924
  link: null
5925
5925
  }),
5926
- children: [/* @__PURE__ */ E(be, { className: "h-4 w-4" }), i("links.newLink")]
5926
+ children: [/* @__PURE__ */ E(be, { className: "h-4 w-4" }), s("links.newLink")]
5927
5927
  }),
5928
5928
  children: [
5929
5929
  /* @__PURE__ */ E("p", {
5930
5930
  className: "text-xs text-foreground-muted",
5931
- children: i("links.hint")
5931
+ children: s("links.hint")
5932
5932
  }),
5933
- w.length > 0 && /* @__PURE__ */ E(y, {
5933
+ w.length > 0 && /* @__PURE__ */ E(o, {
5934
5934
  variant: "warning",
5935
- title: i("links.partial", { count: w.length }),
5935
+ title: s("links.partial", { count: w.length }),
5936
5936
  message: w.map((e) => `${e.deviceName ?? e.address}: ${e.error}`).join("\n")
5937
5937
  }),
5938
- /* @__PURE__ */ E(_, {
5939
- state: d.state,
5940
- facets: d.facets,
5938
+ /* @__PURE__ */ E(a, {
5939
+ state: m.state,
5940
+ facets: m.facets,
5941
5941
  labels: {
5942
- searchPlaceholder: i("links.searchPlaceholder"),
5943
- searchLabel: i("links.searchLabel"),
5944
- facetsLabel: i("links.facetsLabel"),
5945
- clearLabel: i("links.clearFilters")
5942
+ searchPlaceholder: s("links.searchPlaceholder"),
5943
+ searchLabel: s("links.searchLabel"),
5944
+ facetsLabel: s("links.facetsLabel"),
5945
+ clearLabel: s("links.clearFilters")
5946
5946
  },
5947
- onSearch: d.setSearch,
5948
- onToggleFacet: d.toggleFacet,
5949
- onClear: d.clear
5947
+ onSearch: m.setSearch,
5948
+ onToggleFacet: m.toggleFacet,
5949
+ onClear: m.clear
5950
5950
  }),
5951
- /* @__PURE__ */ E(m, {
5951
+ /* @__PURE__ */ E(_, {
5952
5952
  columns: x,
5953
- rows: d.rows,
5953
+ rows: m.rows,
5954
5954
  rowKey: Sc,
5955
5955
  minWidthPx: 640,
5956
5956
  defaultSort: {
5957
5957
  columnKey: "sender",
5958
5958
  dir: "asc"
5959
5959
  },
5960
- emptyMessage: a.loading ? i("common.loading") : d.active ? i("links.noMatch") : i("links.none")
5960
+ emptyMessage: u.loading ? s("common.loading") : m.active ? s("links.noMatch") : s("links.none")
5961
5961
  })
5962
5962
  ]
5963
- }), s.kind === "form" && S !== void 0 && /* @__PURE__ */ E(xc, {
5964
- link: s.link,
5963
+ }), f.kind === "form" && S !== void 0 && /* @__PURE__ */ E(xc, {
5964
+ link: f.link,
5965
5965
  senders: S.senders,
5966
5966
  receivers: S.receivers,
5967
- onClose: () => c({ kind: "closed" }),
5968
- onSave: (e) => h(s.link, e)
5967
+ onClose: () => p({ kind: "closed" }),
5968
+ onSave: (e) => g(f.link, e)
5969
5969
  })]
5970
5970
  });
5971
5971
  }
@@ -5974,57 +5974,57 @@ function Ec(e) {
5974
5974
  function Dc(e) {
5975
5975
  return e === null ? "unknown" : e ? "online" : "offline";
5976
5976
  }
5977
- function Oc(e) {
5978
- let { trpc: n, integrationId: r } = e, { t: a } = X(), o = C(() => ({ integrationId: r }), [r]), s = Q(n, "ccuOverview", o, os), u = Q(n, "listServiceMessages", o, ss), f = Zs(n), p = async (e) => {
5979
- await f({
5977
+ function Oc(r) {
5978
+ let { trpc: a, integrationId: s } = r, { t: l } = X(), u = C(() => ({ integrationId: s }), [s]), d = Q(a, "ccuOverview", u, os), f = Q(a, "listServiceMessages", u, ss), p = Zs(a), m = async (e) => {
5979
+ await p({
5980
5980
  action: "acknowledgeServiceMessage",
5981
5981
  input: {
5982
- integrationId: r,
5982
+ integrationId: s,
5983
5983
  id: e.id
5984
5984
  },
5985
5985
  schema: Y,
5986
- title: a("overview.ackTitle"),
5987
- message: a("overview.ackMessage", {
5986
+ title: l("overview.ackTitle"),
5987
+ message: l("overview.ackMessage", {
5988
5988
  type: Z(e.type),
5989
5989
  name: Z(e.name ?? e.address)
5990
5990
  }),
5991
- confirmLabel: a("overview.ackConfirm")
5992
- }) !== null && u.reload();
5991
+ confirmLabel: l("overview.ackConfirm")
5992
+ }) !== null && f.reload();
5993
5993
  }, h = [
5994
5994
  {
5995
5995
  key: "name",
5996
- header: a("overview.colInterface"),
5996
+ header: l("overview.colInterface"),
5997
5997
  render: (e) => e.name,
5998
5998
  sortValue: (e) => e.name
5999
5999
  },
6000
6000
  {
6001
6001
  key: "state",
6002
- header: a("overview.colState"),
6003
- render: (e) => /* @__PURE__ */ E(x, { status: Dc(e.connected) }),
6002
+ header: l("overview.colState"),
6003
+ render: (e) => /* @__PURE__ */ E(t, { status: Dc(e.connected) }),
6004
6004
  sortValue: (e) => e.connected === null ? null : +!!e.connected
6005
6005
  },
6006
6006
  {
6007
6007
  key: "duty",
6008
- header: a("overview.colDutyCycle"),
6008
+ header: l("overview.colDutyCycle"),
6009
6009
  align: "right",
6010
6010
  render: (e) => Gs(e.dutyCycle),
6011
6011
  sortValue: (e) => e.dutyCycle
6012
6012
  },
6013
6013
  {
6014
6014
  key: "firmware",
6015
- header: a("overview.colFirmware"),
6015
+ header: l("overview.colFirmware"),
6016
6016
  render: (e) => Z(e.firmware),
6017
6017
  sortValue: (e) => e.firmware
6018
6018
  },
6019
6019
  {
6020
6020
  key: "type",
6021
- header: a("overview.colType"),
6021
+ header: l("overview.colType"),
6022
6022
  render: (e) => Z(e.type ?? e.info),
6023
6023
  sortValue: (e) => e.type ?? e.info
6024
6024
  },
6025
6025
  {
6026
6026
  key: "gateways",
6027
- header: a("overview.colGateways"),
6027
+ header: l("overview.colGateways"),
6028
6028
  align: "right",
6029
6029
  render: (e) => e.gateways.length,
6030
6030
  sortValue: (e) => e.gateways.length
@@ -6032,14 +6032,14 @@ function Oc(e) {
6032
6032
  ], g = [
6033
6033
  {
6034
6034
  key: "time",
6035
- header: a("overview.colWhen"),
6035
+ header: l("overview.colWhen"),
6036
6036
  render: (e) => Ks(e.timestamp),
6037
6037
  sortValue: (e) => e.timestamp
6038
6038
  },
6039
6039
  {
6040
6040
  key: "type",
6041
- header: a("overview.colMessage"),
6042
- render: (e) => /* @__PURE__ */ E(l, {
6041
+ header: l("overview.colMessage"),
6042
+ render: (e) => /* @__PURE__ */ E(c, {
6043
6043
  variant: "warning",
6044
6044
  children: Z(e.type)
6045
6045
  }),
@@ -6047,7 +6047,7 @@ function Oc(e) {
6047
6047
  },
6048
6048
  {
6049
6049
  key: "device",
6050
- header: a("overview.colDevice"),
6050
+ header: l("overview.colDevice"),
6051
6051
  render: (e) => Z(e.name ?? e.address),
6052
6052
  sortValue: (e) => e.name ?? e.address
6053
6053
  },
@@ -6056,89 +6056,89 @@ function Oc(e) {
6056
6056
  header: "",
6057
6057
  align: "right",
6058
6058
  notSortableReason: "Action column",
6059
- render: (e) => e.acknowledgeable ? /* @__PURE__ */ E(t, {
6059
+ render: (t) => t.acknowledgeable ? /* @__PURE__ */ E(e, {
6060
6060
  type: "button",
6061
6061
  size: "sm",
6062
6062
  variant: "outline",
6063
- onClick: () => void p(e),
6064
- children: a("overview.ack")
6063
+ onClick: () => void m(t),
6064
+ children: l("overview.ack")
6065
6065
  }) : null
6066
6066
  }
6067
- ], _ = s.data?.info ?? null;
6067
+ ], v = d.data?.info ?? null;
6068
6068
  return /* @__PURE__ */ D("div", {
6069
6069
  className: "flex flex-col gap-3",
6070
6070
  children: [
6071
- s.error !== null && /* @__PURE__ */ E(y, {
6072
- title: a("overview.loadFailed"),
6073
- message: s.error,
6074
- onRetry: s.reload
6071
+ d.error !== null && /* @__PURE__ */ E(o, {
6072
+ title: l("overview.loadFailed"),
6073
+ message: d.error,
6074
+ onRetry: d.reload
6075
6075
  }),
6076
- /* @__PURE__ */ E(c, {
6076
+ /* @__PURE__ */ E(n, {
6077
6077
  headingId: "hm-ccu-info",
6078
- title: a("overview.ccuTitle"),
6078
+ title: l("overview.ccuTitle"),
6079
6079
  icon: Ce,
6080
- children: s.loading && s.data === void 0 ? /* @__PURE__ */ E(S, { className: "h-16 w-full" }) : _ === null ? /* @__PURE__ */ E(y, {
6080
+ children: d.loading && d.data === void 0 ? /* @__PURE__ */ E(i, { className: "h-16 w-full" }) : v === null ? /* @__PURE__ */ E(o, {
6081
6081
  variant: "warning",
6082
- title: a("overview.infoUnavailable"),
6083
- message: s.data?.infoError ?? a("overview.infoNoAnswer")
6082
+ title: l("overview.infoUnavailable"),
6083
+ message: d.data?.infoError ?? l("overview.infoNoAnswer")
6084
6084
  }) : /* @__PURE__ */ D("div", {
6085
6085
  className: "grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-4",
6086
6086
  children: [
6087
- /* @__PURE__ */ E(i, {
6088
- label: a("overview.version"),
6089
- value: Z(_.version)
6087
+ /* @__PURE__ */ E(x, {
6088
+ label: l("overview.version"),
6089
+ value: Z(v.version)
6090
6090
  }),
6091
- /* @__PURE__ */ E(i, {
6092
- label: a("overview.product"),
6093
- value: Z(_.product),
6094
- subtext: _.platform ?? void 0
6091
+ /* @__PURE__ */ E(x, {
6092
+ label: l("overview.product"),
6093
+ value: Z(v.product),
6094
+ subtext: v.platform ?? void 0
6095
6095
  }),
6096
- /* @__PURE__ */ E(i, {
6097
- label: a("overview.hostname"),
6098
- value: Z(_.hostname)
6096
+ /* @__PURE__ */ E(x, {
6097
+ label: l("overview.hostname"),
6098
+ value: Z(v.hostname)
6099
6099
  }),
6100
- /* @__PURE__ */ E(i, {
6101
- label: a("overview.serial"),
6102
- value: Z(_.serial)
6100
+ /* @__PURE__ */ E(x, {
6101
+ label: l("overview.serial"),
6102
+ value: Z(v.serial)
6103
6103
  })
6104
6104
  ]
6105
6105
  })
6106
6106
  }),
6107
6107
  /* @__PURE__ */ E(gc, {
6108
6108
  headingId: "hm-ccu-interfaces",
6109
- title: a("overview.interfacesTitle"),
6110
- children: s.data?.interfacesError ? /* @__PURE__ */ E(y, {
6109
+ title: l("overview.interfacesTitle"),
6110
+ children: d.data?.interfacesError ? /* @__PURE__ */ E(o, {
6111
6111
  variant: "warning",
6112
- title: a("overview.interfacesUnavailable"),
6113
- message: s.data.interfacesError
6114
- }) : /* @__PURE__ */ E(m, {
6112
+ title: l("overview.interfacesUnavailable"),
6113
+ message: d.data.interfacesError
6114
+ }) : /* @__PURE__ */ E(_, {
6115
6115
  columns: h,
6116
- rows: s.data?.interfaces ?? [],
6116
+ rows: d.data?.interfaces ?? [],
6117
6117
  rowKey: (e) => e.name,
6118
- emptyMessage: s.loading ? a("common.loading") : a("overview.noInterfaces"),
6118
+ emptyMessage: d.loading ? l("common.loading") : l("overview.noInterfaces"),
6119
6119
  minWidthPx: 560
6120
6120
  })
6121
6121
  }),
6122
6122
  /* @__PURE__ */ E(gc, {
6123
6123
  headingId: "hm-ccu-messages",
6124
- title: a("overview.messagesTitle"),
6125
- children: u.data?.error ? /* @__PURE__ */ E(y, {
6124
+ title: l("overview.messagesTitle"),
6125
+ children: f.data?.error ? /* @__PURE__ */ E(o, {
6126
6126
  variant: "warning",
6127
- title: a("overview.messagesUnavailable"),
6128
- message: u.data.error
6129
- }) : u.error === null ? u.data !== void 0 && u.data.messages.length === 0 ? /* @__PURE__ */ E(d, { title: a("overview.noMessages") }) : /* @__PURE__ */ E(m, {
6127
+ title: l("overview.messagesUnavailable"),
6128
+ message: f.data.error
6129
+ }) : f.error === null ? f.data !== void 0 && f.data.messages.length === 0 ? /* @__PURE__ */ E(y, { title: l("overview.noMessages") }) : /* @__PURE__ */ E(_, {
6130
6130
  columns: g,
6131
- rows: u.data?.messages ?? [],
6131
+ rows: f.data?.messages ?? [],
6132
6132
  rowKey: (e) => e.id,
6133
- emptyMessage: a("common.loading"),
6133
+ emptyMessage: l("common.loading"),
6134
6134
  minWidthPx: 520,
6135
6135
  defaultSort: {
6136
6136
  columnKey: "time",
6137
6137
  dir: "desc"
6138
6138
  }
6139
- }) : /* @__PURE__ */ E(y, {
6140
- message: u.error,
6141
- onRetry: u.reload
6139
+ }) : /* @__PURE__ */ E(o, {
6140
+ message: f.error,
6141
+ onRetry: f.reload
6142
6142
  })
6143
6143
  })
6144
6144
  ]
@@ -6150,66 +6150,66 @@ var kc = 3e3, Ac = 4e3, jc = 60;
6150
6150
  function Mc(e) {
6151
6151
  return e.secondsLeft !== null && e.secondsLeft > 0;
6152
6152
  }
6153
- function Nc(e) {
6154
- let { iface: n, busy: r, onStart: i, onStop: a } = e, { t: u } = X(), [d, f] = T(String(jc)), [p, m] = T(vs[0]), h = Number(d), g = Number.isInteger(h) && h >= 1 && h <= 3600, _ = n.error === null ? n.secondsLeft === null ? /* @__PURE__ */ E(l, {
6153
+ function Nc(t) {
6154
+ let { iface: r, busy: i, onStart: a, onStop: o } = t, { t: l } = X(), [u, d] = T(String(jc)), [f, p] = T(vs[0]), m = Number(u), g = Number.isInteger(m) && m >= 1 && m <= 3600, _ = r.error === null ? r.secondsLeft === null ? /* @__PURE__ */ E(c, {
6155
6155
  variant: "neutral",
6156
- children: u("pairing.statusUnknown")
6157
- }) : Mc(n) ? /* @__PURE__ */ E(l, {
6156
+ children: l("pairing.statusUnknown")
6157
+ }) : Mc(r) ? /* @__PURE__ */ E(c, {
6158
6158
  variant: "success",
6159
- children: u("pairing.statusOpen", { seconds: n.secondsLeft })
6160
- }) : /* @__PURE__ */ E(l, {
6159
+ children: l("pairing.statusOpen", { seconds: r.secondsLeft })
6160
+ }) : /* @__PURE__ */ E(c, {
6161
6161
  variant: "neutral",
6162
- children: u("pairing.statusClosed")
6163
- }) : /* @__PURE__ */ E(l, {
6162
+ children: l("pairing.statusClosed")
6163
+ }) : /* @__PURE__ */ E(c, {
6164
6164
  variant: "danger",
6165
- children: u("pairing.statusUnknown")
6165
+ children: l("pairing.statusUnknown")
6166
6166
  });
6167
- return /* @__PURE__ */ E(c, {
6168
- headingId: `hm-pairing-${n.name}-heading`,
6169
- title: n.name,
6167
+ return /* @__PURE__ */ E(n, {
6168
+ headingId: `hm-pairing-${r.name}-heading`,
6169
+ title: r.name,
6170
6170
  actions: _,
6171
6171
  children: /* @__PURE__ */ D("div", {
6172
6172
  className: "flex flex-col gap-3 p-3",
6173
- "data-testid": `hm-pairing-${n.name}`,
6174
- children: [n.error !== null && /* @__PURE__ */ E("p", {
6173
+ "data-testid": `hm-pairing-${r.name}`,
6174
+ children: [r.error !== null && /* @__PURE__ */ E("p", {
6175
6175
  className: "text-xs text-danger",
6176
- children: n.error
6176
+ children: r.error
6177
6177
  }), /* @__PURE__ */ D("div", {
6178
6178
  className: "flex flex-wrap items-end gap-3",
6179
6179
  children: [
6180
- /* @__PURE__ */ E(o, {
6181
- label: u("pairing.fieldSeconds"),
6182
- children: /* @__PURE__ */ E(s, {
6180
+ /* @__PURE__ */ E(s, {
6181
+ label: l("pairing.fieldSeconds"),
6182
+ children: /* @__PURE__ */ E(h, {
6183
6183
  type: "number",
6184
6184
  min: 1,
6185
6185
  max: 3600,
6186
- value: d,
6187
- onChange: (e) => f(e.target.value)
6186
+ value: u,
6187
+ onChange: (e) => d(e.target.value)
6188
6188
  })
6189
6189
  }),
6190
- n.supportsSecure && /* @__PURE__ */ E(o, {
6191
- label: u("pairing.fieldMode"),
6192
- children: /* @__PURE__ */ E(b, {
6193
- value: p,
6194
- onChange: (e) => m(e.target.value),
6190
+ r.supportsSecure && /* @__PURE__ */ E(s, {
6191
+ label: l("pairing.fieldMode"),
6192
+ children: /* @__PURE__ */ E(S, {
6193
+ value: f,
6194
+ onChange: (e) => p(e.target.value),
6195
6195
  options: vs.map((e) => ({
6196
6196
  value: e,
6197
- label: u(e === "secure" ? "pairing.modeSecure" : "pairing.modeNormal")
6197
+ label: l(e === "secure" ? "pairing.modeSecure" : "pairing.modeNormal")
6198
6198
  }))
6199
6199
  })
6200
6200
  }),
6201
- /* @__PURE__ */ E(t, {
6201
+ /* @__PURE__ */ E(e, {
6202
6202
  type: "button",
6203
- disabled: !g || r,
6204
- onClick: () => i(h, n.supportsSecure ? p : void 0),
6205
- children: u("pairing.start")
6203
+ disabled: !g || i,
6204
+ onClick: () => a(m, r.supportsSecure ? f : void 0),
6205
+ children: l("pairing.start")
6206
6206
  }),
6207
- Mc(n) && /* @__PURE__ */ E(t, {
6207
+ Mc(r) && /* @__PURE__ */ E(e, {
6208
6208
  type: "button",
6209
6209
  variant: "secondary",
6210
- disabled: r,
6211
- onClick: a,
6212
- children: u("pairing.stop")
6210
+ disabled: i,
6211
+ onClick: o,
6212
+ children: l("pairing.stop")
6213
6213
  })
6214
6214
  ]
6215
6215
  })]
@@ -6217,68 +6217,68 @@ function Nc(e) {
6217
6217
  });
6218
6218
  }
6219
6219
  function Pc(e) {
6220
- let { trpc: t, integrationId: n } = e, { t: r } = X(), i = Zs(t), a = C(() => ({ integrationId: n }), [n]), o = Q(t, "ccuPairingStatus", a, ys, { pollMs: kc }), s = (o.data?.interfaces ?? []).some(Mc), l = Q(t, "listCcuDevices", a, ds, { ...s ? { pollMs: Ac } : {} }), [u, d] = T(!1), [f, p] = T(null);
6220
+ let { trpc: t, integrationId: r } = e, { t: i } = X(), a = Zs(t), s = C(() => ({ integrationId: r }), [r]), c = Q(t, "ccuPairingStatus", s, ys, { pollMs: kc }), l = (c.data?.interfaces ?? []).some(Mc), u = Q(t, "listCcuDevices", s, ds, { ...l ? { pollMs: Ac } : {} }), [d, f] = T(!1), [p, m] = T(null);
6221
6221
  w(() => {
6222
- f === null && l.data !== void 0 && p(new Set(l.data.devices.map((e) => e.address)));
6223
- }, [f, l.data]);
6224
- let m = C(() => f === null ? [] : (l.data?.devices ?? []).filter((e) => !f.has(e.address)), [f, l.data]), h = async (e, t, a, s) => {
6225
- d(!0);
6222
+ p === null && u.data !== void 0 && m(new Set(u.data.devices.map((e) => e.address)));
6223
+ }, [p, u.data]);
6224
+ let h = C(() => p === null ? [] : (u.data?.devices ?? []).filter((e) => !p.has(e.address)), [p, u.data]), g = async (e, t, n, o) => {
6225
+ f(!0);
6226
6226
  try {
6227
- await i({
6227
+ await a({
6228
6228
  action: "setCcuInstallMode",
6229
6229
  input: {
6230
- integrationId: n,
6230
+ integrationId: r,
6231
6231
  interface: e.name,
6232
6232
  on: t,
6233
- ...t ? { seconds: a } : {},
6234
- ...t && s !== void 0 ? { mode: s } : {}
6233
+ ...t ? { seconds: n } : {},
6234
+ ...t && o !== void 0 ? { mode: o } : {}
6235
6235
  },
6236
6236
  schema: Y,
6237
- title: r(t ? "pairing.startTitle" : "pairing.stopTitle", { name: e.name }),
6238
- message: t ? r("pairing.startMessage", {
6237
+ title: i(t ? "pairing.startTitle" : "pairing.stopTitle", { name: e.name }),
6238
+ message: t ? i("pairing.startMessage", {
6239
6239
  name: e.name,
6240
- seconds: a
6241
- }) : r("pairing.stopMessage", { name: e.name }),
6242
- confirmLabel: r(t ? "pairing.start" : "pairing.stop"),
6240
+ seconds: n
6241
+ }) : i("pairing.stopMessage", { name: e.name }),
6242
+ confirmLabel: i(t ? "pairing.start" : "pairing.stop"),
6243
6243
  variant: "warning"
6244
- }) !== null && o.reload();
6244
+ }) !== null && c.reload();
6245
6245
  } finally {
6246
- d(!1);
6246
+ f(!1);
6247
6247
  }
6248
6248
  };
6249
- return o.error === null ? o.data === void 0 ? /* @__PURE__ */ E("p", {
6249
+ return c.error === null ? c.data === void 0 ? /* @__PURE__ */ E("p", {
6250
6250
  className: "text-sm text-foreground-subtle",
6251
- children: r("common.loading")
6252
- }) : o.data.error === null ? /* @__PURE__ */ D("div", {
6251
+ children: i("common.loading")
6252
+ }) : c.data.error === null ? /* @__PURE__ */ D("div", {
6253
6253
  className: "flex flex-col gap-4",
6254
6254
  children: [
6255
6255
  /* @__PURE__ */ E("p", {
6256
6256
  className: "text-xs text-foreground-subtle",
6257
- children: r("pairing.hmipKeyNote")
6257
+ children: i("pairing.hmipKeyNote")
6258
6258
  }),
6259
- o.data.interfaces.length === 0 ? /* @__PURE__ */ E("p", {
6259
+ c.data.interfaces.length === 0 ? /* @__PURE__ */ E("p", {
6260
6260
  className: "text-sm text-foreground-subtle",
6261
- children: r("pairing.noInterfaces")
6262
- }) : o.data.interfaces.map((e) => /* @__PURE__ */ E(Nc, {
6261
+ children: i("pairing.noInterfaces")
6262
+ }) : c.data.interfaces.map((e) => /* @__PURE__ */ E(Nc, {
6263
6263
  iface: e,
6264
- busy: u,
6265
- onStart: (t, n) => void h(e, !0, t, n),
6266
- onStop: () => void h(e, !1, 0, void 0)
6264
+ busy: d,
6265
+ onStart: (t, n) => void g(e, !0, t, n),
6266
+ onStop: () => void g(e, !1, 0, void 0)
6267
6267
  }, e.name)),
6268
- /* @__PURE__ */ E(c, {
6268
+ /* @__PURE__ */ E(n, {
6269
6269
  headingId: "hm-pairing-found",
6270
- title: r("pairing.foundTitle"),
6271
- children: l.error !== null && f === null ? /* @__PURE__ */ E("p", {
6270
+ title: i("pairing.foundTitle"),
6271
+ children: u.error !== null && p === null ? /* @__PURE__ */ E("p", {
6272
6272
  className: "p-3 text-xs text-danger",
6273
- children: l.error
6274
- }) : m.length === 0 ? /* @__PURE__ */ E("p", {
6273
+ children: u.error
6274
+ }) : h.length === 0 ? /* @__PURE__ */ E("p", {
6275
6275
  className: "p-3 text-sm text-foreground-subtle",
6276
6276
  "data-testid": "hm-pairing-none",
6277
- children: r(s ? "pairing.foundWaiting" : "pairing.foundNone")
6277
+ children: i(l ? "pairing.foundWaiting" : "pairing.foundNone")
6278
6278
  }) : /* @__PURE__ */ E("ul", {
6279
6279
  className: "flex flex-col gap-1 p-3",
6280
6280
  "data-testid": "hm-pairing-found",
6281
- children: m.map((e) => /* @__PURE__ */ D("li", {
6281
+ children: h.map((e) => /* @__PURE__ */ D("li", {
6282
6282
  className: "flex items-center gap-2 text-sm text-foreground",
6283
6283
  children: [/* @__PURE__ */ E("span", { children: e.name ?? e.address }), /* @__PURE__ */ D("span", {
6284
6284
  className: "text-xs text-foreground-subtle",
@@ -6292,14 +6292,14 @@ function Pc(e) {
6292
6292
  })
6293
6293
  })
6294
6294
  ]
6295
- }) : /* @__PURE__ */ E(y, {
6296
- title: r("pairing.loadFailed"),
6297
- message: o.data.error,
6298
- onRetry: o.reload
6299
- }) : /* @__PURE__ */ E(y, {
6300
- title: r("pairing.loadFailed"),
6301
- message: o.error,
6302
- onRetry: o.reload
6295
+ }) : /* @__PURE__ */ E(o, {
6296
+ title: i("pairing.loadFailed"),
6297
+ message: c.data.error,
6298
+ onRetry: c.reload
6299
+ }) : /* @__PURE__ */ E(o, {
6300
+ title: i("pairing.loadFailed"),
6301
+ message: c.error,
6302
+ onRetry: c.reload
6303
6303
  });
6304
6304
  }
6305
6305
  //#endregion
@@ -6323,25 +6323,25 @@ function Ic(e) {
6323
6323
  function Lc(e) {
6324
6324
  return e.name ?? e.address;
6325
6325
  }
6326
- function Rc(e) {
6327
- let { program: n, keys: r, busy: i, error: a, onClose: s, onSave: c } = e, { t: l } = X(), u = C(() => Ic(r), [r]), d = n === null || n.channels[0] === void 0 ? "" : Fc(n.channels[0].address), [f, p] = T(d === "" ? u[0]?.address ?? "" : d), [m, g] = T(new Set(n?.channels.map((e) => e.address) ?? [])), _ = u.find((e) => e.address === f)?.keys ?? [], y = _.filter((e) => m.has(e.address)).map((e) => e.address), x = (e) => {
6328
- g((t) => {
6326
+ function Rc(t) {
6327
+ let { program: n, keys: r, busy: i, error: a, onClose: o, onSave: c } = t, { t: l } = X(), u = C(() => Ic(r), [r]), d = n === null || n.channels[0] === void 0 ? "" : Fc(n.channels[0].address), [m, h] = T(d === "" ? u[0]?.address ?? "" : d), [g, _] = T(new Set(n?.channels.map((e) => e.address) ?? [])), v = u.find((e) => e.address === m)?.keys ?? [], y = v.filter((e) => g.has(e.address)).map((e) => e.address), b = (e) => {
6328
+ _((t) => {
6329
6329
  let n = new Set(t);
6330
6330
  return n.has(e) ? n.delete(e) : n.add(e), n;
6331
6331
  });
6332
6332
  };
6333
- return /* @__PURE__ */ E(h, {
6333
+ return /* @__PURE__ */ E(f, {
6334
6334
  open: !0,
6335
- onClose: s,
6335
+ onClose: o,
6336
6336
  icon: ge,
6337
6337
  width: "md",
6338
6338
  title: l(n === null ? "programs.formTitleNew" : "programs.formTitleEdit"),
6339
6339
  testId: "hm-program-dialog",
6340
- footer: /* @__PURE__ */ E(t, {
6340
+ footer: /* @__PURE__ */ E(e, {
6341
6341
  type: "button",
6342
- disabled: y.length === 0 || i || f === "",
6342
+ disabled: y.length === 0 || i || m === "",
6343
6343
  onClick: () => c({
6344
- deviceAddress: f,
6344
+ deviceAddress: m,
6345
6345
  channelAddresses: y
6346
6346
  }),
6347
6347
  children: l(i ? "programs.saving" : "programs.save")
@@ -6357,14 +6357,14 @@ function Rc(e) {
6357
6357
  className: "text-sm text-foreground",
6358
6358
  children: n.name
6359
6359
  }),
6360
- /* @__PURE__ */ E(o, {
6360
+ /* @__PURE__ */ E(s, {
6361
6361
  label: l("programs.fieldDevice"),
6362
- children: /* @__PURE__ */ E(b, {
6362
+ children: /* @__PURE__ */ E(S, {
6363
6363
  "aria-label": l("programs.fieldDevice"),
6364
- value: f,
6364
+ value: m,
6365
6365
  disabled: n !== null,
6366
6366
  onChange: (e) => {
6367
- p(e.target.value), g(/* @__PURE__ */ new Set());
6367
+ h(e.target.value), _(/* @__PURE__ */ new Set());
6368
6368
  },
6369
6369
  options: [{
6370
6370
  value: "",
@@ -6375,20 +6375,20 @@ function Rc(e) {
6375
6375
  }))]
6376
6376
  })
6377
6377
  }),
6378
- /* @__PURE__ */ E(o, {
6378
+ /* @__PURE__ */ E(s, {
6379
6379
  label: l("programs.fieldKeys"),
6380
6380
  description: l("programs.fieldKeysHint"),
6381
- children: _.length === 0 ? /* @__PURE__ */ E("p", {
6381
+ children: v.length === 0 ? /* @__PURE__ */ E("p", {
6382
6382
  className: "text-xs text-foreground-subtle",
6383
6383
  children: l("programs.noKeys")
6384
6384
  }) : /* @__PURE__ */ E("ul", {
6385
6385
  className: "flex flex-col gap-1",
6386
- children: _.map((e) => /* @__PURE__ */ E("li", { children: /* @__PURE__ */ D("label", {
6386
+ children: v.map((e) => /* @__PURE__ */ E("li", { children: /* @__PURE__ */ D("label", {
6387
6387
  className: "flex items-center gap-2 text-sm text-foreground",
6388
6388
  children: [
6389
- /* @__PURE__ */ E(v, {
6390
- checked: m.has(e.address),
6391
- onChange: () => x(e.address)
6389
+ /* @__PURE__ */ E(p, {
6390
+ checked: g.has(e.address),
6391
+ onChange: () => b(e.address)
6392
6392
  }),
6393
6393
  /* @__PURE__ */ E("span", { children: Lc(e) }),
6394
6394
  /* @__PURE__ */ E("span", {
@@ -6437,31 +6437,31 @@ function Gc(e) {
6437
6437
  function Kc(e) {
6438
6438
  return e instanceof Error ? e.message : String(e);
6439
6439
  }
6440
- function qc(e) {
6441
- let { trpc: n, integrationId: r } = e, { t: i } = X(), a = g(), o = Q(n, "listCcuPrograms", C(() => ({ integrationId: r }), [r]), Ns), [s, c] = T({}), [d, p] = T({ kind: "closed" }), [h, v] = T(!1), [b, x] = T(null), S = u(o.data?.programs ?? [], Wc), w = {
6442
- justNow: i("programs.justNow"),
6443
- minutesAgo: (e) => i("programs.minutesAgo", { count: e }),
6444
- hoursAgo: (e) => i("programs.hoursAgo", { count: e }),
6445
- daysAgo: (e) => i("programs.daysAgo", { count: e })
6440
+ function qc(t) {
6441
+ let { trpc: n, integrationId: i } = t, { t: s } = X(), d = u(), f = Q(n, "listCcuPrograms", C(() => ({ integrationId: i }), [i]), Ns), [p, m] = T({}), [h, g] = T({ kind: "closed" }), [v, y] = T(!1), [b, x] = T(null), S = r(f.data?.programs ?? [], Wc), w = {
6442
+ justNow: s("programs.justNow"),
6443
+ minutesAgo: (e) => s("programs.minutesAgo", { count: e }),
6444
+ hoursAgo: (e) => s("programs.hoursAgo", { count: e }),
6445
+ daysAgo: (e) => s("programs.daysAgo", { count: e })
6446
6446
  }, ee = Date.now(), te = (e, t) => {
6447
- c((n) => ({
6447
+ m((n) => ({
6448
6448
  ...n,
6449
6449
  [e]: t
6450
6450
  }));
6451
- }, ne = async (e, t, i, s) => {
6452
- if (await a({
6453
- title: s.title,
6454
- message: s.message,
6455
- confirmLabel: s.confirmLabel,
6456
- variant: s.variant ?? "default"
6451
+ }, ne = async (e, t, r, a) => {
6452
+ if (await d({
6453
+ title: a.title,
6454
+ message: a.message,
6455
+ confirmLabel: a.confirmLabel,
6456
+ variant: a.variant ?? "default"
6457
6457
  })) {
6458
6458
  te(e.id, { kind: "busy" });
6459
6459
  try {
6460
6460
  await Xs(n, t, {
6461
- integrationId: r,
6462
- ...i,
6461
+ integrationId: i,
6462
+ ...r,
6463
6463
  confirmed: !0
6464
- }, Y), te(e.id, { kind: "saved" }), o.reload();
6464
+ }, Y), te(e.id, { kind: "saved" }), f.reload();
6465
6465
  } catch (t) {
6466
6466
  te(e.id, {
6467
6467
  kind: "error",
@@ -6470,65 +6470,65 @@ function qc(e) {
6470
6470
  }
6471
6471
  }
6472
6472
  }, re = async (e, t) => {
6473
- let s = e?.name ?? o.data?.keys.find((e) => e.deviceAddress === t.deviceAddress)?.deviceName ?? t.deviceAddress;
6474
- if (await a({
6475
- title: i(e === null ? "programs.createTitle" : "programs.updateTitle"),
6476
- message: i(e === null ? "programs.createMessage" : "programs.updateMessage", { name: s }),
6477
- confirmLabel: i(e === null ? "programs.createConfirm" : "programs.updateConfirm")
6473
+ let r = e?.name ?? f.data?.keys.find((e) => e.deviceAddress === t.deviceAddress)?.deviceName ?? t.deviceAddress;
6474
+ if (await d({
6475
+ title: s(e === null ? "programs.createTitle" : "programs.updateTitle"),
6476
+ message: s(e === null ? "programs.createMessage" : "programs.updateMessage", { name: r }),
6477
+ confirmLabel: s(e === null ? "programs.createConfirm" : "programs.updateConfirm")
6478
6478
  })) {
6479
- v(!0), x(null);
6479
+ y(!0), x(null);
6480
6480
  try {
6481
6481
  await Xs(n, "ensureCcuKeyEventProgram", {
6482
- integrationId: r,
6482
+ integrationId: i,
6483
6483
  ...t,
6484
6484
  confirmed: !0
6485
- }, Y), p({ kind: "closed" }), o.reload();
6485
+ }, Y), g({ kind: "closed" }), f.reload();
6486
6486
  } catch (e) {
6487
6487
  x(Kc(e));
6488
6488
  } finally {
6489
- v(!1);
6489
+ y(!1);
6490
6490
  }
6491
6491
  }
6492
6492
  }, ie = (e) => {
6493
- let t = s[e.id]?.kind === "busy", n = e.name;
6493
+ let t = p[e.id]?.kind === "busy", n = e.name;
6494
6494
  return [
6495
6495
  {
6496
6496
  id: "run",
6497
- label: i("programs.run"),
6497
+ label: s("programs.run"),
6498
6498
  icon: ye,
6499
6499
  disabled: t,
6500
6500
  onClick: () => void ne(e, "runCcuProgram", { programId: e.id }, {
6501
- title: i("programs.runTitle"),
6502
- message: i("programs.runMessage", { name: n }),
6503
- confirmLabel: i("programs.runConfirm")
6501
+ title: s("programs.runTitle"),
6502
+ message: s("programs.runMessage", { name: n }),
6503
+ confirmLabel: s("programs.runConfirm")
6504
6504
  })
6505
6505
  },
6506
6506
  {
6507
6507
  id: "active",
6508
- label: i(e.active ? "programs.disable" : "programs.enable"),
6508
+ label: s(e.active ? "programs.disable" : "programs.enable"),
6509
6509
  icon: Se,
6510
6510
  disabled: t,
6511
6511
  onClick: () => void ne(e, "setCcuProgramActive", {
6512
6512
  programId: e.id,
6513
6513
  active: !e.active
6514
6514
  }, e.active ? {
6515
- title: i("programs.disableTitle"),
6516
- message: i("programs.disableMessage", { name: n }),
6517
- confirmLabel: i("programs.disableConfirm")
6515
+ title: s("programs.disableTitle"),
6516
+ message: s("programs.disableMessage", { name: n }),
6517
+ confirmLabel: s("programs.disableConfirm")
6518
6518
  } : {
6519
- title: i("programs.enableTitle"),
6520
- message: i("programs.enableMessage", { name: n }),
6521
- confirmLabel: i("programs.enableConfirm")
6519
+ title: s("programs.enableTitle"),
6520
+ message: s("programs.enableMessage", { name: n }),
6521
+ confirmLabel: s("programs.enableConfirm")
6522
6522
  })
6523
6523
  },
6524
6524
  {
6525
6525
  id: "edit",
6526
- label: i("programs.edit"),
6526
+ label: s("programs.edit"),
6527
6527
  icon: ve,
6528
6528
  hidden: !e.createdByCamstack,
6529
6529
  disabled: t,
6530
6530
  onClick: () => {
6531
- x(null), p({
6531
+ x(null), g({
6532
6532
  kind: "form",
6533
6533
  program: e
6534
6534
  });
@@ -6536,15 +6536,15 @@ function qc(e) {
6536
6536
  },
6537
6537
  {
6538
6538
  id: "delete",
6539
- label: i("programs.delete"),
6539
+ label: s("programs.delete"),
6540
6540
  icon: Te,
6541
6541
  danger: !0,
6542
6542
  hidden: e.internal,
6543
6543
  disabled: t,
6544
6544
  onClick: () => void ne(e, "deleteCcuProgram", { programId: e.id }, {
6545
- title: i("programs.deleteTitle"),
6546
- message: i("programs.deleteMessage", { name: n }),
6547
- confirmLabel: i("programs.deleteConfirm"),
6545
+ title: s("programs.deleteTitle"),
6546
+ message: s("programs.deleteMessage", { name: n }),
6547
+ confirmLabel: s("programs.deleteConfirm"),
6548
6548
  variant: "danger"
6549
6549
  })
6550
6550
  }
@@ -6552,36 +6552,36 @@ function qc(e) {
6552
6552
  }, ae = [
6553
6553
  {
6554
6554
  key: "name",
6555
- header: i("programs.colName"),
6555
+ header: s("programs.colName"),
6556
6556
  nowrap: !1,
6557
6557
  render: (e) => /* @__PURE__ */ D("div", {
6558
6558
  className: "flex min-w-0 flex-col",
6559
- "aria-busy": s[e.id]?.kind === "busy",
6559
+ "aria-busy": p[e.id]?.kind === "busy",
6560
6560
  children: [/* @__PURE__ */ E("span", {
6561
6561
  className: "text-sm text-foreground",
6562
6562
  children: e.name
6563
- }), /* @__PURE__ */ E(Jc, { write: s[e.id] })]
6563
+ }), /* @__PURE__ */ E(Jc, { write: p[e.id] })]
6564
6564
  }),
6565
6565
  sortValue: (e) => e.name
6566
6566
  },
6567
6567
  {
6568
6568
  key: "active",
6569
- header: i("programs.colActive"),
6570
- render: (e) => /* @__PURE__ */ E(l, {
6569
+ header: s("programs.colActive"),
6570
+ render: (e) => /* @__PURE__ */ E(c, {
6571
6571
  variant: e.active ? "success" : "warning",
6572
- children: i(e.active ? "programs.active" : "programs.inactive")
6572
+ children: s(e.active ? "programs.active" : "programs.inactive")
6573
6573
  }),
6574
6574
  sortValue: (e) => +!!e.active
6575
6575
  },
6576
6576
  {
6577
6577
  key: "lastRun",
6578
- header: i("programs.colLastRun"),
6578
+ header: s("programs.colLastRun"),
6579
6579
  render: (e) => Hc(e.lastRunMs, ee, w) ?? "—",
6580
6580
  sortValue: (e) => e.lastRunMs
6581
6581
  },
6582
6582
  {
6583
6583
  key: "conditions",
6584
- header: i("programs.colConditions"),
6584
+ header: s("programs.colConditions"),
6585
6585
  nowrap: !1,
6586
6586
  render: (e) => e.channels.length === 0 ? /* @__PURE__ */ E("span", {
6587
6587
  className: "text-foreground-subtle",
@@ -6594,8 +6594,8 @@ function qc(e) {
6594
6594
  },
6595
6595
  {
6596
6596
  key: "origin",
6597
- header: i("programs.colOrigin"),
6598
- render: (e) => e.createdByCamstack ? /* @__PURE__ */ E(l, { children: i("programs.camstack") }) : i("programs.other"),
6597
+ header: s("programs.colOrigin"),
6598
+ render: (e) => e.createdByCamstack ? /* @__PURE__ */ E(c, { children: s("programs.camstack") }) : s("programs.other"),
6599
6599
  sortValue: (e) => +!e.createdByCamstack
6600
6600
  },
6601
6601
  {
@@ -6603,45 +6603,45 @@ function qc(e) {
6603
6603
  header: "",
6604
6604
  align: "right",
6605
6605
  notSortableReason: "Action column",
6606
- render: (e) => /* @__PURE__ */ E(f, { items: ie(e) })
6606
+ render: (e) => /* @__PURE__ */ E(l, { items: ie(e) })
6607
6607
  }
6608
6608
  ];
6609
- return o.error === null ? /* @__PURE__ */ D("div", {
6609
+ return f.error === null ? /* @__PURE__ */ D("div", {
6610
6610
  className: "flex flex-col gap-3",
6611
6611
  children: [/* @__PURE__ */ D(gc, {
6612
6612
  headingId: "hm-programs",
6613
- title: i("programs.title"),
6614
- actions: /* @__PURE__ */ D(t, {
6613
+ title: s("programs.title"),
6614
+ actions: /* @__PURE__ */ D(e, {
6615
6615
  type: "button",
6616
6616
  size: "sm",
6617
- disabled: o.data === void 0,
6617
+ disabled: f.data === void 0,
6618
6618
  onClick: () => {
6619
- x(null), p({
6619
+ x(null), g({
6620
6620
  kind: "form",
6621
6621
  program: null
6622
6622
  });
6623
6623
  },
6624
- children: [/* @__PURE__ */ E(ge, { className: "h-4 w-4" }), i("programs.newProgram")]
6624
+ children: [/* @__PURE__ */ E(ge, { className: "h-4 w-4" }), s("programs.newProgram")]
6625
6625
  }),
6626
6626
  children: [
6627
6627
  /* @__PURE__ */ E("p", {
6628
6628
  className: "text-xs text-foreground-muted",
6629
- children: i("programs.hint")
6629
+ children: s("programs.hint")
6630
6630
  }),
6631
- /* @__PURE__ */ E(_, {
6631
+ /* @__PURE__ */ E(a, {
6632
6632
  state: S.state,
6633
6633
  facets: S.facets,
6634
6634
  labels: {
6635
- searchPlaceholder: i("programs.searchPlaceholder"),
6636
- searchLabel: i("programs.searchLabel"),
6637
- facetsLabel: i("programs.facetsLabel"),
6638
- clearLabel: i("programs.clearFilters")
6635
+ searchPlaceholder: s("programs.searchPlaceholder"),
6636
+ searchLabel: s("programs.searchLabel"),
6637
+ facetsLabel: s("programs.facetsLabel"),
6638
+ clearLabel: s("programs.clearFilters")
6639
6639
  },
6640
6640
  onSearch: S.setSearch,
6641
6641
  onToggleFacet: S.toggleFacet,
6642
6642
  onClear: S.clear
6643
6643
  }),
6644
- /* @__PURE__ */ E(m, {
6644
+ /* @__PURE__ */ E(_, {
6645
6645
  columns: ae,
6646
6646
  rows: S.rows,
6647
6647
  rowKey: (e) => e.id,
@@ -6650,21 +6650,21 @@ function qc(e) {
6650
6650
  columnKey: "name",
6651
6651
  dir: "asc"
6652
6652
  },
6653
- emptyMessage: o.loading ? i("common.loading") : S.active ? i("programs.noMatch") : i("programs.none")
6653
+ emptyMessage: f.loading ? s("common.loading") : S.active ? s("programs.noMatch") : s("programs.none")
6654
6654
  })
6655
6655
  ]
6656
- }), d.kind === "form" && o.data !== void 0 && /* @__PURE__ */ E(Rc, {
6657
- program: d.program,
6658
- keys: o.data.keys,
6659
- busy: h,
6656
+ }), h.kind === "form" && f.data !== void 0 && /* @__PURE__ */ E(Rc, {
6657
+ program: h.program,
6658
+ keys: f.data.keys,
6659
+ busy: v,
6660
6660
  error: b,
6661
- onClose: () => p({ kind: "closed" }),
6662
- onSave: (e) => void re(d.program, e)
6661
+ onClose: () => g({ kind: "closed" }),
6662
+ onSave: (e) => void re(h.program, e)
6663
6663
  })]
6664
- }) : /* @__PURE__ */ E(y, {
6665
- title: i("programs.loadFailed"),
6666
- message: o.error,
6667
- onRetry: o.reload
6664
+ }) : /* @__PURE__ */ E(o, {
6665
+ title: s("programs.loadFailed"),
6666
+ message: f.error,
6667
+ onRetry: f.reload
6668
6668
  });
6669
6669
  }
6670
6670
  function Jc(e) {
@@ -6689,49 +6689,49 @@ function Yc(e, t) {
6689
6689
  e.deviceName ?? ""
6690
6690
  ].some((e) => e.toLowerCase().includes(t));
6691
6691
  }
6692
- function Xc(e) {
6693
- let { room: n, channels: r, onClose: i, onSave: a } = e, { t: o } = X(), [c, l] = T(() => n.channels.map((e) => e.address)), [u, d] = T(""), [f, p] = T(!1), m = u.trim().toLowerCase(), g = C(() => r.filter((e) => Yc(e, m)), [r, m]), _ = (e) => l((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]), y = async () => {
6694
- p(!0);
6692
+ function Xc(t) {
6693
+ let { room: n, channels: r, onClose: i, onSave: a } = t, { t: o } = X(), [s, c] = T(() => n.channels.map((e) => e.address)), [l, u] = T(""), [d, m] = T(!1), g = l.trim().toLowerCase(), _ = C(() => r.filter((e) => Yc(e, g)), [r, g]), v = (e) => c((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]), y = async () => {
6694
+ m(!0);
6695
6695
  try {
6696
- await a(c);
6696
+ await a(s);
6697
6697
  } finally {
6698
- p(!1);
6698
+ m(!1);
6699
6699
  }
6700
6700
  };
6701
- return /* @__PURE__ */ E(h, {
6701
+ return /* @__PURE__ */ E(f, {
6702
6702
  open: !0,
6703
6703
  onClose: i,
6704
6704
  icon: fe,
6705
6705
  width: "md",
6706
6706
  title: o("rooms.channelsTitle", { name: n.name }),
6707
6707
  testId: "hm-room-channels-dialog",
6708
- footer: /* @__PURE__ */ E(t, {
6708
+ footer: /* @__PURE__ */ E(e, {
6709
6709
  type: "button",
6710
6710
  onClick: () => void y(),
6711
- disabled: f,
6711
+ disabled: d,
6712
6712
  children: o("rooms.save")
6713
6713
  }),
6714
6714
  children: /* @__PURE__ */ D("div", {
6715
6715
  className: "flex flex-col gap-3",
6716
6716
  children: [
6717
- /* @__PURE__ */ E(s, {
6717
+ /* @__PURE__ */ E(h, {
6718
6718
  "aria-label": o("rooms.search"),
6719
6719
  placeholder: o("rooms.search"),
6720
- value: u,
6721
- onChange: (e) => d(e.target.value)
6720
+ value: l,
6721
+ onChange: (e) => u(e.target.value)
6722
6722
  }),
6723
6723
  /* @__PURE__ */ E("p", {
6724
6724
  className: "text-xs text-foreground-subtle",
6725
- children: o("rooms.selected", { count: c.length })
6725
+ children: o("rooms.selected", { count: s.length })
6726
6726
  }),
6727
6727
  /* @__PURE__ */ E("ul", {
6728
6728
  className: "flex flex-col gap-1",
6729
- children: g.map((e) => /* @__PURE__ */ E("li", { children: /* @__PURE__ */ D("label", {
6729
+ children: _.map((e) => /* @__PURE__ */ E("li", { children: /* @__PURE__ */ D("label", {
6730
6730
  className: "flex items-center gap-2 text-sm text-foreground",
6731
6731
  children: [
6732
- /* @__PURE__ */ E(v, {
6733
- checked: c.includes(e.address),
6734
- onChange: () => _(e.address)
6732
+ /* @__PURE__ */ E(p, {
6733
+ checked: s.includes(e.address),
6734
+ onChange: () => v(e.address)
6735
6735
  }),
6736
6736
  /* @__PURE__ */ E("span", { children: $(e) }),
6737
6737
  /* @__PURE__ */ E("span", {
@@ -6747,83 +6747,83 @@ function Xc(e) {
6747
6747
  }
6748
6748
  //#endregion
6749
6749
  //#region src/ui/CcuSettingsTab.tsx
6750
- function Zc(e) {
6751
- let { trpc: n, integrationId: i } = e, { t: a } = X(), o = Q(n, "listCcuRooms", C(() => ({ integrationId: i }), [i]), Ls), s = Zs(n), c = r(), [l, u] = T(null), d = async () => {
6750
+ function Zc(t) {
6751
+ let { trpc: n, integrationId: r } = t, { t: i } = X(), a = Q(n, "listCcuRooms", C(() => ({ integrationId: r }), [r]), Ls), s = Zs(n), c = m(), [u, d] = T(null), f = async () => {
6752
6752
  let e = await c({
6753
- title: a("rooms.newRoom"),
6754
- label: a("rooms.fieldName")
6753
+ title: i("rooms.newRoom"),
6754
+ label: i("rooms.fieldName")
6755
6755
  });
6756
6756
  e === null || e.trim() === "" || await s({
6757
6757
  action: "createCcuRoom",
6758
6758
  input: {
6759
- integrationId: i,
6759
+ integrationId: r,
6760
6760
  name: e
6761
6761
  },
6762
6762
  schema: Is,
6763
- title: a("rooms.createTitle"),
6764
- message: a("rooms.createMessage", { name: e.trim() }),
6765
- confirmLabel: a("rooms.createConfirm")
6766
- }) !== null && o.reload();
6763
+ title: i("rooms.createTitle"),
6764
+ message: i("rooms.createMessage", { name: e.trim() }),
6765
+ confirmLabel: i("rooms.createConfirm")
6766
+ }) !== null && a.reload();
6767
6767
  }, p = async (e) => {
6768
6768
  let t = await c({
6769
- title: a("rooms.renameTitle"),
6770
- label: a("rooms.fieldName"),
6769
+ title: i("rooms.renameTitle"),
6770
+ label: i("rooms.fieldName"),
6771
6771
  defaultValue: e.name
6772
6772
  });
6773
6773
  t === null || t.trim() === "" || t.trim() === e.name || await s({
6774
6774
  action: "renameCcuRoom",
6775
6775
  input: {
6776
- integrationId: i,
6776
+ integrationId: r,
6777
6777
  id: e.id,
6778
6778
  name: t
6779
6779
  },
6780
6780
  schema: Y,
6781
- title: a("rooms.renameTitle"),
6782
- message: a("rooms.renameMessage", {
6781
+ title: i("rooms.renameTitle"),
6782
+ message: i("rooms.renameMessage", {
6783
6783
  from: e.name,
6784
6784
  to: t.trim()
6785
6785
  }),
6786
- confirmLabel: a("rooms.renameConfirm")
6787
- }) !== null && o.reload();
6786
+ confirmLabel: i("rooms.renameConfirm")
6787
+ }) !== null && a.reload();
6788
6788
  }, h = async (e) => {
6789
6789
  await s({
6790
6790
  action: "deleteCcuRoom",
6791
6791
  input: {
6792
- integrationId: i,
6792
+ integrationId: r,
6793
6793
  id: e.id
6794
6794
  },
6795
6795
  schema: Y,
6796
- title: a("rooms.deleteTitle"),
6797
- message: a("rooms.deleteMessage", { name: e.name }),
6798
- confirmLabel: a("rooms.deleteConfirm"),
6796
+ title: i("rooms.deleteTitle"),
6797
+ message: i("rooms.deleteMessage", { name: e.name }),
6798
+ confirmLabel: i("rooms.deleteConfirm"),
6799
6799
  variant: "danger"
6800
- }) !== null && o.reload();
6800
+ }) !== null && a.reload();
6801
6801
  }, g = async (e, t) => {
6802
6802
  await s({
6803
6803
  action: "setCcuRoomChannels",
6804
6804
  input: {
6805
- integrationId: i,
6805
+ integrationId: r,
6806
6806
  id: e.id,
6807
6807
  channels: t
6808
6808
  },
6809
6809
  schema: Rs,
6810
- title: a("rooms.membersTitle"),
6811
- message: a("rooms.membersMessage", {
6810
+ title: i("rooms.membersTitle"),
6811
+ message: i("rooms.membersMessage", {
6812
6812
  name: e.name,
6813
6813
  count: t.length
6814
6814
  }),
6815
- confirmLabel: a("rooms.membersConfirm")
6816
- }) !== null && (u(null), o.reload());
6817
- }, _ = [
6815
+ confirmLabel: i("rooms.membersConfirm")
6816
+ }) !== null && (d(null), a.reload());
6817
+ }, v = [
6818
6818
  {
6819
6819
  key: "name",
6820
- header: a("rooms.colRoom"),
6820
+ header: i("rooms.colRoom"),
6821
6821
  render: (e) => e.name,
6822
6822
  sortValue: (e) => e.name
6823
6823
  },
6824
6824
  {
6825
6825
  key: "channels",
6826
- header: a("rooms.colChannels"),
6826
+ header: i("rooms.colChannels"),
6827
6827
  nowrap: !1,
6828
6828
  render: (e) => e.channels.length === 0 ? "—" : e.channels.map($).join(", "),
6829
6829
  sortValue: (e) => e.channels.length
@@ -6833,22 +6833,22 @@ function Zc(e) {
6833
6833
  header: "",
6834
6834
  align: "right",
6835
6835
  notSortableReason: "Action column",
6836
- render: (e) => /* @__PURE__ */ E(f, { items: [
6836
+ render: (e) => /* @__PURE__ */ E(l, { items: [
6837
6837
  {
6838
6838
  id: "channels",
6839
- label: a("rooms.editChannels"),
6839
+ label: i("rooms.editChannels"),
6840
6840
  icon: fe,
6841
- onClick: () => u(e)
6841
+ onClick: () => d(e)
6842
6842
  },
6843
6843
  {
6844
6844
  id: "rename",
6845
- label: a("rooms.rename"),
6845
+ label: i("rooms.rename"),
6846
6846
  icon: ve,
6847
6847
  onClick: () => void p(e)
6848
6848
  },
6849
6849
  {
6850
6850
  id: "delete",
6851
- label: a("rooms.delete"),
6851
+ label: i("rooms.delete"),
6852
6852
  icon: Te,
6853
6853
  danger: !0,
6854
6854
  onClick: () => void h(e)
@@ -6856,40 +6856,40 @@ function Zc(e) {
6856
6856
  ] })
6857
6857
  }
6858
6858
  ];
6859
- if (o.error !== null) return /* @__PURE__ */ E(y, {
6860
- title: a("rooms.loadFailed"),
6861
- message: o.error,
6862
- onRetry: o.reload
6859
+ if (a.error !== null) return /* @__PURE__ */ E(o, {
6860
+ title: i("rooms.loadFailed"),
6861
+ message: a.error,
6862
+ onRetry: a.reload
6863
6863
  });
6864
- let v = o.data;
6864
+ let y = a.data;
6865
6865
  return /* @__PURE__ */ D("div", {
6866
6866
  className: "flex flex-col gap-3",
6867
6867
  children: [/* @__PURE__ */ E(gc, {
6868
6868
  headingId: "hm-rooms",
6869
- title: a("rooms.title"),
6870
- actions: /* @__PURE__ */ D(t, {
6869
+ title: i("rooms.title"),
6870
+ actions: /* @__PURE__ */ D(e, {
6871
6871
  type: "button",
6872
6872
  size: "sm",
6873
- disabled: v === void 0,
6874
- onClick: () => void d(),
6875
- children: [/* @__PURE__ */ E(be, { className: "h-4 w-4" }), a("rooms.newRoom")]
6873
+ disabled: y === void 0,
6874
+ onClick: () => void f(),
6875
+ children: [/* @__PURE__ */ E(be, { className: "h-4 w-4" }), i("rooms.newRoom")]
6876
6876
  }),
6877
- children: /* @__PURE__ */ E(m, {
6878
- columns: _,
6879
- rows: v?.rooms ?? [],
6877
+ children: /* @__PURE__ */ E(_, {
6878
+ columns: v,
6879
+ rows: y?.rooms ?? [],
6880
6880
  rowKey: (e) => e.id,
6881
6881
  minWidthPx: 340,
6882
6882
  defaultSort: {
6883
6883
  columnKey: "name",
6884
6884
  dir: "asc"
6885
6885
  },
6886
- emptyMessage: o.loading ? a("common.loading") : a("rooms.none")
6886
+ emptyMessage: a.loading ? i("common.loading") : i("rooms.none")
6887
6887
  })
6888
- }), l !== null && v !== void 0 && /* @__PURE__ */ E(Xc, {
6889
- room: l,
6890
- channels: v.channels,
6891
- onClose: () => u(null),
6892
- onSave: (e) => g(l, e)
6888
+ }), u !== null && y !== void 0 && /* @__PURE__ */ E(Xc, {
6889
+ room: u,
6890
+ channels: y.channels,
6891
+ onClose: () => d(null),
6892
+ onSave: (e) => g(u, e)
6893
6893
  })]
6894
6894
  });
6895
6895
  }
@@ -6897,29 +6897,29 @@ function Zc(e) {
6897
6897
  //#region src/page.tsx
6898
6898
  var Qc = G(ns), $c = {};
6899
6899
  function el(e) {
6900
- let t = e.trpc, { t: r } = X(), [i, o] = a("ccu"), [s, c] = a("tab"), l = Q(t, "listCcus", $c, Qc), u = l.data, f = C(() => u === void 0 || u.length === 0 ? null : u.find((e) => e.integrationId === i) ?? u.find((e) => e.connected) ?? u[0] ?? null, [u, i]), p = (e) => l.error === null ? u === void 0 ? /* @__PURE__ */ E(S, { className: "h-32 w-full" }) : f === null ? /* @__PURE__ */ E(d, {
6901
- title: r("page.noCcu"),
6902
- description: r("page.noCcuHint")
6903
- }) : f.connected ? e : /* @__PURE__ */ E(d, {
6904
- title: r("page.notConnected", { name: f.name }),
6905
- description: r("page.notConnectedHint")
6906
- }) : /* @__PURE__ */ E(y, {
6907
- title: r("page.loadFailed"),
6900
+ let t = e.trpc, { t: n } = X(), [r, a] = d("ccu"), [s, c] = d("tab"), l = Q(t, "listCcus", $c, Qc), u = l.data, f = C(() => u === void 0 || u.length === 0 ? null : u.find((e) => e.integrationId === r) ?? u.find((e) => e.connected) ?? u[0] ?? null, [u, r]), p = (e) => l.error === null ? u === void 0 ? /* @__PURE__ */ E(i, { className: "h-32 w-full" }) : f === null ? /* @__PURE__ */ E(y, {
6901
+ title: n("page.noCcu"),
6902
+ description: n("page.noCcuHint")
6903
+ }) : f.connected ? e : /* @__PURE__ */ E(y, {
6904
+ title: n("page.notConnected", { name: f.name }),
6905
+ description: n("page.notConnectedHint")
6906
+ }) : /* @__PURE__ */ E(o, {
6907
+ title: n("page.loadFailed"),
6908
6908
  message: l.error,
6909
6909
  onRetry: l.reload
6910
6910
  }), m = f?.integrationId ?? "";
6911
- return /* @__PURE__ */ E(n, {
6911
+ return /* @__PURE__ */ E(b, {
6912
6912
  icon: xe,
6913
- title: r("page.title"),
6914
- subtitle: f === null ? r("page.subtitle") : f.name,
6913
+ title: n("page.title"),
6914
+ subtitle: f === null ? n("page.subtitle") : f.name,
6915
6915
  defaultSection: "overview",
6916
- sectionsLabel: r("page.sectionsLabel"),
6916
+ sectionsLabel: n("page.sectionsLabel"),
6917
6917
  activeSection: s ?? "overview",
6918
6918
  onSectionChange: (e) => c(e === "overview" ? null : e),
6919
- actions: u !== void 0 && u.length > 1 ? /* @__PURE__ */ E(b, {
6920
- "aria-label": r("page.ccuPicker"),
6919
+ actions: u !== void 0 && u.length > 1 ? /* @__PURE__ */ E(S, {
6920
+ "aria-label": n("page.ccuPicker"),
6921
6921
  value: f?.integrationId ?? "",
6922
- onChange: (e) => o(e.target.value),
6922
+ onChange: (e) => a(e.target.value),
6923
6923
  options: u.map((e) => ({
6924
6924
  value: e.integrationId,
6925
6925
  label: e.name
@@ -6928,7 +6928,7 @@ function el(e) {
6928
6928
  sections: [
6929
6929
  {
6930
6930
  id: "overview",
6931
- label: r("page.tabOverview"),
6931
+ label: n("page.tabOverview"),
6932
6932
  content: p(/* @__PURE__ */ E(Oc, {
6933
6933
  trpc: t,
6934
6934
  integrationId: m
@@ -6936,7 +6936,7 @@ function el(e) {
6936
6936
  },
6937
6937
  {
6938
6938
  id: "devices",
6939
- label: r("page.tabDevices"),
6939
+ label: n("page.tabDevices"),
6940
6940
  content: p(/* @__PURE__ */ E(mc, {
6941
6941
  trpc: t,
6942
6942
  integrationId: m,
@@ -6945,7 +6945,7 @@ function el(e) {
6945
6945
  },
6946
6946
  {
6947
6947
  id: "links",
6948
- label: r("page.tabLinks"),
6948
+ label: n("page.tabLinks"),
6949
6949
  content: p(/* @__PURE__ */ E(Ec, {
6950
6950
  trpc: t,
6951
6951
  integrationId: m
@@ -6953,7 +6953,7 @@ function el(e) {
6953
6953
  },
6954
6954
  {
6955
6955
  id: "programs",
6956
- label: r("page.tabPrograms"),
6956
+ label: n("page.tabPrograms"),
6957
6957
  content: p(/* @__PURE__ */ E(qc, {
6958
6958
  trpc: t,
6959
6959
  integrationId: m
@@ -6961,7 +6961,7 @@ function el(e) {
6961
6961
  },
6962
6962
  {
6963
6963
  id: "heating",
6964
- label: r("page.tabHeating"),
6964
+ label: n("page.tabHeating"),
6965
6965
  content: p(/* @__PURE__ */ E(vc, {
6966
6966
  trpc: t,
6967
6967
  integrationId: m
@@ -6969,7 +6969,7 @@ function el(e) {
6969
6969
  },
6970
6970
  {
6971
6971
  id: "pairing",
6972
- label: r("page.tabPairing"),
6972
+ label: n("page.tabPairing"),
6973
6973
  content: p(/* @__PURE__ */ E(Pc, {
6974
6974
  trpc: t,
6975
6975
  integrationId: m
@@ -6977,7 +6977,7 @@ function el(e) {
6977
6977
  },
6978
6978
  {
6979
6979
  id: "settings",
6980
- label: r("page.tabSettings"),
6980
+ label: n("page.tabSettings"),
6981
6981
  content: p(/* @__PURE__ */ E(Zc, {
6982
6982
  trpc: t,
6983
6983
  integrationId: m