perf: bound isometric overlay collision work

Issue: #160
User-Visible: no
This commit is contained in:
Sergey Matyunin
2026-09-06 09:17:54 +03:00
parent de2155787d
commit f1b9bbf33e
34 changed files with 555 additions and 434 deletions
@@ -1,199 +1,199 @@
{
"schema": 1,
"fingerprint": "f5cac791d009713cb86ce941810e43fba4976300e3e5f0310074b65d585e42f2",
"fingerprint": "58505e23c334e756bdb941b6dd18d00de39044d1b1b52028c2bc1ee04332807a",
"entry": "houseplan-card.js",
"initialViewFiles": [
"houseplan-assets/houseplan-card-D6Qc0AL6.js",
"houseplan-assets/houseplan-card-QFWZI8m6.js",
"houseplan-card.js"
],
"initialViewGzipBytes": 299501,
"initialViewGzipBytes": 299511,
"lazyFiles": [
"houseplan-assets/backdrop-pick-BdfZNhPk.js",
"houseplan-assets/de-CFmFuWzq.js",
"houseplan-assets/editor-D3B9FzoG.js",
"houseplan-assets/fr-DL7YEG9b.js",
"houseplan-assets/houseplan-editor-runtime-B1Pz5Qxl.js",
"houseplan-assets/houseplan-onboarding-runtime-w3Taqb-I.js",
"houseplan-assets/hp-zigbee-topology-overlay-CsCY64EP.js",
"houseplan-assets/iso-scene-render-BJIdcXVS.js",
"houseplan-assets/live-interaction-runtime-DMHKsxrG.js",
"houseplan-assets/zigbee-topology-hm8kNj1e.js",
"houseplan-assets/zigbee-topology-runtime-C-ybyrNs.js"
"houseplan-assets/backdrop-pick-My-VJARv.js",
"houseplan-assets/de-DQe-XVD7.js",
"houseplan-assets/editor-CGanHiHV.js",
"houseplan-assets/fr-BYryILXY.js",
"houseplan-assets/houseplan-editor-runtime-BHXdF80I.js",
"houseplan-assets/houseplan-onboarding-runtime-Dsp5UfQ0.js",
"houseplan-assets/hp-zigbee-topology-overlay-B8bTARmd.js",
"houseplan-assets/iso-scene-render-CPJ_aYf_.js",
"houseplan-assets/live-interaction-runtime-CMojDls2.js",
"houseplan-assets/zigbee-topology-C-2fV84O.js",
"houseplan-assets/zigbee-topology-runtime-CVqwFK1r.js"
],
"lazyGzipBytes": 263425,
"lazyGzipBytes": 263852,
"lazyEditorFiles": [
"houseplan-assets/backdrop-pick-BdfZNhPk.js",
"houseplan-assets/editor-D3B9FzoG.js",
"houseplan-assets/houseplan-editor-runtime-B1Pz5Qxl.js",
"houseplan-assets/zigbee-topology-hm8kNj1e.js"
"houseplan-assets/backdrop-pick-My-VJARv.js",
"houseplan-assets/editor-CGanHiHV.js",
"houseplan-assets/houseplan-editor-runtime-BHXdF80I.js",
"houseplan-assets/zigbee-topology-C-2fV84O.js"
],
"lazyEditorGzipBytes": 186635,
"lazyEditorGzipBytes": 186643,
"lazyOnboardingFiles": [
"houseplan-assets/backdrop-pick-BdfZNhPk.js",
"houseplan-assets/houseplan-onboarding-runtime-w3Taqb-I.js"
"houseplan-assets/backdrop-pick-My-VJARv.js",
"houseplan-assets/houseplan-onboarding-runtime-Dsp5UfQ0.js"
],
"lazyOnboardingGzipBytes": 14326,
"lazyOnboardingGzipBytes": 14331,
"lazyLocaleFiles": [
"houseplan-assets/de-CFmFuWzq.js",
"houseplan-assets/fr-DL7YEG9b.js"
"houseplan-assets/de-DQe-XVD7.js",
"houseplan-assets/fr-BYryILXY.js"
],
"lazyLocaleGzipBytes": 50157,
"lazyLocaleGzipBytes": 50152,
"lazyIsometricFiles": [
"houseplan-assets/iso-scene-render-BJIdcXVS.js"
"houseplan-assets/iso-scene-render-CPJ_aYf_.js"
],
"lazyIsometricGzipBytes": 12043,
"lazyIsometricGzipBytes": 12457,
"files": [
{
"path": "houseplan-assets/backdrop-pick-BdfZNhPk.js",
"sha256": "0a8698a964c832d2c3bb0511bd8ba8b6c61815d3446efe137827d27341b4f22a",
"path": "houseplan-assets/backdrop-pick-My-VJARv.js",
"sha256": "cd656539e7e819187ffee1c886b20e3af24e0db065955485d7f03f0c8cec3b5d",
"rawBytes": 21592,
"gzipBytes": 7359,
"gzipBytes": 7360,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-D6Qc0AL6.js"
"houseplan-assets/houseplan-card-QFWZI8m6.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/de-CFmFuWzq.js",
"sha256": "13e330d5f6bf8eb869b16b908ad22e86a2b43950b74b8a27713dadc8926857c2",
"path": "houseplan-assets/de-DQe-XVD7.js",
"sha256": "e4404e40fa899cc1ea6f0ade19b8cb5e7154236569b7efedc33a5e9abfbdb61f",
"rawBytes": 84232,
"gzipBytes": 25356,
"gzipBytes": 25353,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/editor-D3B9FzoG.js",
"sha256": "46b0c5cbb84829f75d00f69765f82399cc8b5e6c54bba54a27ce4bb9210467cf",
"path": "houseplan-assets/editor-CGanHiHV.js",
"sha256": "2b1070116961c26c7c20a1d7ff5fd31bd0f8f26e11e8b0cf74f095efa6d7be21",
"rawBytes": 3831,
"gzipBytes": 1586,
"gzipBytes": 1587,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-D6Qc0AL6.js"
"houseplan-assets/houseplan-card-QFWZI8m6.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/fr-DL7YEG9b.js",
"sha256": "93194b66ec63e5923a0da05b8d93f7ca5cbee2f896cbaa291d3225b15bb3dd13",
"path": "houseplan-assets/fr-BYryILXY.js",
"sha256": "9b926d6d212cfc1419433fc683371114670b6622de716a32ec9e4ab029880402",
"rawBytes": 86273,
"gzipBytes": 24801,
"gzipBytes": 24799,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/houseplan-card-D6Qc0AL6.js",
"sha256": "9d84d3866d723ee7edad4c49f4f83f4c6a35331c5b4b942470d3745752ee0a9c",
"rawBytes": 1072059,
"gzipBytes": 298704,
"path": "houseplan-assets/houseplan-card-QFWZI8m6.js",
"sha256": "1c901826c5ba5b6aaca02fa1b270fc2b27fee2a72a9c30b8c33004ce9c32eb1a",
"rawBytes": 1072087,
"gzipBytes": 298713,
"isEntry": false,
"imports": [],
"dynamicImports": [
"houseplan-assets/de-CFmFuWzq.js",
"houseplan-assets/editor-D3B9FzoG.js",
"houseplan-assets/fr-DL7YEG9b.js",
"houseplan-assets/houseplan-editor-runtime-B1Pz5Qxl.js",
"houseplan-assets/houseplan-onboarding-runtime-w3Taqb-I.js",
"houseplan-assets/hp-zigbee-topology-overlay-CsCY64EP.js",
"houseplan-assets/iso-scene-render-BJIdcXVS.js",
"houseplan-assets/live-interaction-runtime-DMHKsxrG.js"
"houseplan-assets/de-DQe-XVD7.js",
"houseplan-assets/editor-CGanHiHV.js",
"houseplan-assets/fr-BYryILXY.js",
"houseplan-assets/houseplan-editor-runtime-BHXdF80I.js",
"houseplan-assets/houseplan-onboarding-runtime-Dsp5UfQ0.js",
"houseplan-assets/hp-zigbee-topology-overlay-B8bTARmd.js",
"houseplan-assets/iso-scene-render-CPJ_aYf_.js",
"houseplan-assets/live-interaction-runtime-CMojDls2.js"
]
},
{
"path": "houseplan-assets/houseplan-editor-runtime-B1Pz5Qxl.js",
"sha256": "6b4ac9f766aa97c463707544e20e18b9e5a8513fdfb481dbd38e881afa4b23c8",
"path": "houseplan-assets/houseplan-editor-runtime-BHXdF80I.js",
"sha256": "bb2ca6b3feb7367ee6edceaccca0fed6926998873fba75bfca98eb871d664c7d",
"rawBytes": 639587,
"gzipBytes": 170265,
"gzipBytes": 170270,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-BdfZNhPk.js",
"houseplan-assets/houseplan-card-D6Qc0AL6.js",
"houseplan-assets/zigbee-topology-hm8kNj1e.js"
"houseplan-assets/backdrop-pick-My-VJARv.js",
"houseplan-assets/houseplan-card-QFWZI8m6.js",
"houseplan-assets/zigbee-topology-C-2fV84O.js"
],
"dynamicImports": [
"houseplan-assets/zigbee-topology-runtime-C-ybyrNs.js"
"houseplan-assets/zigbee-topology-runtime-CVqwFK1r.js"
]
},
{
"path": "houseplan-assets/houseplan-onboarding-runtime-w3Taqb-I.js",
"sha256": "908d4ad5f067a7dfcb299e810c790063bce1e8b32e9b40c509e829510a330478",
"path": "houseplan-assets/houseplan-onboarding-runtime-Dsp5UfQ0.js",
"sha256": "7f1813a03a58789b6ec850652433a30b14d591ef7f254ffe942bd6c1a159b0c9",
"rawBytes": 28071,
"gzipBytes": 6967,
"gzipBytes": 6971,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-BdfZNhPk.js",
"houseplan-assets/houseplan-card-D6Qc0AL6.js"
"houseplan-assets/backdrop-pick-My-VJARv.js",
"houseplan-assets/houseplan-card-QFWZI8m6.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/hp-zigbee-topology-overlay-CsCY64EP.js",
"sha256": "f2393f6191fe920e57df088e39332e9aafc7367b63cb49e08f9054ec94a4be1c",
"path": "houseplan-assets/hp-zigbee-topology-overlay-B8bTARmd.js",
"sha256": "12af34c9a9d09074b420dd03aafd30fb7f181893548cfd2f2a662b8ef6bc47f7",
"rawBytes": 11034,
"gzipBytes": 3732,
"gzipBytes": 3735,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-D6Qc0AL6.js",
"houseplan-assets/zigbee-topology-hm8kNj1e.js",
"houseplan-assets/zigbee-topology-runtime-C-ybyrNs.js"
"houseplan-assets/houseplan-card-QFWZI8m6.js",
"houseplan-assets/zigbee-topology-C-2fV84O.js",
"houseplan-assets/zigbee-topology-runtime-CVqwFK1r.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/iso-scene-render-BJIdcXVS.js",
"sha256": "10d7c04fb74c4a70252bc2a218459a18beb1fc4e6c1316da9a08a66bc80bd05f",
"rawBytes": 35885,
"gzipBytes": 12043,
"path": "houseplan-assets/iso-scene-render-CPJ_aYf_.js",
"sha256": "abcf3a4a0ed1b1eb6043de6a8819613a710ee23c12f4e52e7b33f2b27f4c131c",
"rawBytes": 36988,
"gzipBytes": 12457,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-D6Qc0AL6.js"
"houseplan-assets/houseplan-card-QFWZI8m6.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/live-interaction-runtime-DMHKsxrG.js",
"sha256": "63d582dfee60251af1f1afb393328fdc86a44379d0fe7536c5f7e71a26c3c5c0",
"path": "houseplan-assets/live-interaction-runtime-CMojDls2.js",
"sha256": "87f0e123ab282a98b66c68cd9d5a161466949ea0f855b12e36d96a67e32c5d45",
"rawBytes": 5196,
"gzipBytes": 2127,
"gzipBytes": 2129,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-D6Qc0AL6.js"
"houseplan-assets/houseplan-card-QFWZI8m6.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/zigbee-topology-hm8kNj1e.js",
"sha256": "7f91d6086813f4ad1a8644943080b53a4474bb698b81328a2ee8bf288558cd62",
"path": "houseplan-assets/zigbee-topology-C-2fV84O.js",
"sha256": "48d42fbd437350b034a9e687b9ea6ce3138db244f6787a062db56dd587f272ea",
"rawBytes": 18961,
"gzipBytes": 7425,
"gzipBytes": 7426,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-D6Qc0AL6.js"
"houseplan-assets/houseplan-card-QFWZI8m6.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/zigbee-topology-runtime-C-ybyrNs.js",
"sha256": "fb63090585f8d45e8a0c0fddc10d4f37682126fe2b54717bb4c73d0314a4888b",
"path": "houseplan-assets/zigbee-topology-runtime-CVqwFK1r.js",
"sha256": "251314c84ae9696ffde45790623dfed78b0720bf59e793e8b6b12fa78a5081b3",
"rawBytes": 3941,
"gzipBytes": 1764,
"gzipBytes": 1765,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-D6Qc0AL6.js",
"houseplan-assets/zigbee-topology-hm8kNj1e.js"
"houseplan-assets/houseplan-card-QFWZI8m6.js",
"houseplan-assets/zigbee-topology-C-2fV84O.js"
],
"dynamicImports": []
},
{
"path": "houseplan-card.js",
"sha256": "75189cf8f3426b9235fcf3c844e53293670633f06eca9fb852ec61463b75e240",
"sha256": "2e0896981cddc78cead21b868d3bd39a3c4cdd76d9c50420f2a7c00fe53cfd37",
"rawBytes": 1183,
"gzipBytes": 797,
"gzipBytes": 798,
"isEntry": true,
"imports": [
"houseplan-assets/houseplan-card-D6Qc0AL6.js"
"houseplan-assets/houseplan-card-QFWZI8m6.js"
],
"dynamicImports": []
}
@@ -1,14 +1,14 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="f5cac791d009713cb86ce941810e43fba4976300e3e5f0310074b65d585e42f2";import{v as e,l as o,z as t,dK as s,A as a,dL as i,dM as l,dN as n,E as r,c}from"./houseplan-card-D6Qc0AL6.js";class h extends e{constructor(){super(...arguments),this._spaces=null,this._spacesLoading=!1,this._spacesAuthoritative=!1}setConfig(e){this._config=e}async _loadSpaces(){if(!this._spaces&&!this._spacesLoading&&this.hass){this._spacesLoading=!0;try{const e=await this.hass.callWS({type:"houseplan/config/get"});this._spaces=(e?.config?.spaces||[]).map(e=>({value:e.id,label:e.title||e.id})),this._spacesAuthoritative=!0}catch{this._spaces=[],this._spacesAuthoritative=!1}finally{this._spacesLoading=!1}}}get _lang(){return o(this.hass,this._config?.language)}get _floorToken(){const e=this._config?.floor;return"number"==typeof e?`__houseplan_yaml_floor_index__:${String(e)}`:null}get _formData(){const e={...this._config},o=this._floorToken;return o?e.floor=o:Object.prototype.hasOwnProperty.call(e,"floor")||(e.floor=""),e}get _schema(){const e=this._spaces||[],o=this._lang,a=[{value:"",label:t(o,"editor.floor_none")}],i=this._floorToken;i&&a.push({value:i,label:t(o,"editor.floor_index",{index:String(this._config?.floor)})});const l="string"==typeof this._config?.floor?this._config.floor:"";l&&!e.some(e=>e.value===l)&&a.push({value:l,label:l}),a.push(...e);const n="string"==typeof this._config?.default_floor?this._config.default_floor:"",r=[...e];return n&&!e.some(e=>e.value===n)&&r.unshift({value:n,label:n}),[{name:"title",selector:{text:{}}},{name:"floor",selector:{select:{mode:"dropdown",options:a}}},e.length?{name:"default_floor",selector:{select:{mode:"dropdown",options:r}}}:{name:"default_floor",selector:{text:{}}},{name:"language",selector:{select:{mode:"dropdown",options:s(t(o,"editor.lang_auto"),this._config?.language)}}},{name:"icon_size",selector:{number:{min:1,max:6,step:.1,mode:"box"}}},{name:"show_temperature",selector:{boolean:{}}},{name:"live_states",selector:{boolean:{}}},{name:"show_signal",selector:{boolean:{}}},{name:"kiosk",selector:{boolean:{}}},{name:"cycle",selector:{number:{min:0,max:3600,step:5,mode:"box"}}}]}render(){if(!this.hass||!this._config)return a;const e=i(this,l,o(this.hass,this._config.language));if("cold"===e)return n();if("warm"===e)return r;this._loadSpaces();const s=this._lang,h={title:t(s,"editor.title"),floor:t(s,"editor.floor"),default_floor:t(s,"editor.default_floor"),language:t(s,"editor.language"),icon_size:t(s,"editor.icon_size"),show_temperature:t(s,"editor.show_temperature"),live_states:t(s,"editor.live_states"),show_signal:t(s,"editor.show_signal"),kiosk:t(s,"editor.kiosk"),cycle:t(s,"editor.cycle")},f=this._schema,_=function(e,o,t){if(!t||null===o)return null;const s="string"==typeof e?.default_floor?e.default_floor:"";return!s||o.some(e=>e.value===s)?null:s}(this._config,this._spaces,this._spacesAuthoritative),d=e=>c`<ha-form
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="58505e23c334e756bdb941b6dd18d00de39044d1b1b52028c2bc1ee04332807a";import{v as e,l as o,z as t,dK as s,A as a,dL as i,dM as l,dN as n,E as r,c}from"./houseplan-card-QFWZI8m6.js";class h extends e{constructor(){super(...arguments),this._spaces=null,this._spacesLoading=!1,this._spacesAuthoritative=!1}setConfig(e){this._config=e}async _loadSpaces(){if(!this._spaces&&!this._spacesLoading&&this.hass){this._spacesLoading=!0;try{const e=await this.hass.callWS({type:"houseplan/config/get"});this._spaces=(e?.config?.spaces||[]).map(e=>({value:e.id,label:e.title||e.id})),this._spacesAuthoritative=!0}catch{this._spaces=[],this._spacesAuthoritative=!1}finally{this._spacesLoading=!1}}}get _lang(){return o(this.hass,this._config?.language)}get _floorToken(){const e=this._config?.floor;return"number"==typeof e?`__houseplan_yaml_floor_index__:${String(e)}`:null}get _formData(){const e={...this._config},o=this._floorToken;return o?e.floor=o:Object.prototype.hasOwnProperty.call(e,"floor")||(e.floor=""),e}get _schema(){const e=this._spaces||[],o=this._lang,a=[{value:"",label:t(o,"editor.floor_none")}],i=this._floorToken;i&&a.push({value:i,label:t(o,"editor.floor_index",{index:String(this._config?.floor)})});const l="string"==typeof this._config?.floor?this._config.floor:"";l&&!e.some(e=>e.value===l)&&a.push({value:l,label:l}),a.push(...e);const n="string"==typeof this._config?.default_floor?this._config.default_floor:"",r=[...e];return n&&!e.some(e=>e.value===n)&&r.unshift({value:n,label:n}),[{name:"title",selector:{text:{}}},{name:"floor",selector:{select:{mode:"dropdown",options:a}}},e.length?{name:"default_floor",selector:{select:{mode:"dropdown",options:r}}}:{name:"default_floor",selector:{text:{}}},{name:"language",selector:{select:{mode:"dropdown",options:s(t(o,"editor.lang_auto"),this._config?.language)}}},{name:"icon_size",selector:{number:{min:1,max:6,step:.1,mode:"box"}}},{name:"show_temperature",selector:{boolean:{}}},{name:"live_states",selector:{boolean:{}}},{name:"show_signal",selector:{boolean:{}}},{name:"kiosk",selector:{boolean:{}}},{name:"cycle",selector:{number:{min:0,max:3600,step:5,mode:"box"}}}]}render(){if(!this.hass||!this._config)return a;const e=i(this,l,o(this.hass,this._config.language));if("cold"===e)return n();if("warm"===e)return r;this._loadSpaces();const s=this._lang,h={title:t(s,"editor.title"),floor:t(s,"editor.floor"),default_floor:t(s,"editor.default_floor"),language:t(s,"editor.language"),icon_size:t(s,"editor.icon_size"),show_temperature:t(s,"editor.show_temperature"),live_states:t(s,"editor.live_states"),show_signal:t(s,"editor.show_signal"),kiosk:t(s,"editor.kiosk"),cycle:t(s,"editor.cycle")},_=this._schema,f=function(e,o,t){if(!t||null===o)return null;const s="string"==typeof e?.default_floor?e.default_floor:"";return!s||o.some(e=>e.value===s)?null:s}(this._config,this._spaces,this._spacesAuthoritative),d=e=>c`<ha-form
.hass=${this.hass}
.data=${this._formData}
.schema=${e}
.computeLabel=${e=>h[e.name]||e.name}
@value-changed=${this._valueChanged}
></ha-form>`;return c`
${d(f.slice(0,3))}
${_?c`<div class="default-floor-error" role="alert"
${d(_.slice(0,3))}
${f?c`<div class="default-floor-error" role="alert"
style="color:var(--error-color,#db4437);margin:-4px 0 12px;overflow-wrap:anywhere">
${t(s,"editor.default_floor_missing",{id:_})}
${t(s,"editor.default_floor_missing",{id:f})}
</div>`:a}
${d(f.slice(3))}
${d(_.slice(3))}
`}_valueChanged(e){const o={...this._config,...e.detail.value};""===o.floor?delete o.floor:o.floor===this._floorToken&&(o.floor=this._config?.floor);const t=new Event("config-changed",{bubbles:!0,composed:!0});t.detail={config:o},this.dispatchEvent(t)}}h.properties={hass:{attribute:!1},_config:{state:!0},_spaces:{state:!0}},customElements.get("houseplan-card-editor")||customElements.define("houseplan-card-editor",h);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="f5cac791d009713cb86ce941810e43fba4976300e3e5f0310074b65d585e42f2";import{n as t,b as n}from"./zigbee-topology-hm8kNj1e.js";import{I as e}from"./houseplan-card-D6Qc0AL6.js";const o=new WeakMap;function i(t){const n=function(t){const n=t?.connection||t;return!n||"object"!=typeof n&&"function"!=typeof n?null:n}(t);if(!n)return null;let e=o.get(n);return e||(e={revision:0,topologies:[],states:{},listeners:new Set,inflight:new Map},o.set(n,e)),e}function r(t,n,e){t.states={...t.states,[n]:e},function(t){t.revision++;for(const n of t.listeners)n()}(t)}function s(t){const n=t?.code;if("permission"===n||"unsupported"===n||"timeout"===n||"invalid_topic"===n||"invalid_payload"===n)return n;const e=String(t?.message||"").toLowerCase();return e.includes("unauthor")||e.includes("permission")?"permission":e.includes("unknown_command")||e.includes("not found")?"unsupported":"provider"}function a(t){return Object.assign(new Error(t),{code:t})}function c(t,n,e){const o=t.inflight.get(n);if(o)return o;r(t,n,{phase:"loading"});const i=e().then(n=>{if(!n.nodes.length&&n.warnings.some(t=>"invalid_payload"===t.code))throw a("invalid_payload");!function(t,n){t.topologies=[...t.topologies.filter(t=>!(t.provider===n.provider&&t.instanceId===n.instanceId)),n],r(t,"zha"===n.provider?"zha":`z2m:${n.instanceId}`,{phase:"ready",obtainedAt:n.obtainedAt,partial:n.warnings.length>0})}(t,n)}).catch(e=>{r(t,n,{phase:"error",error:s(e)})}).finally(()=>t.inflight.delete(n));return t.inflight.set(n,i),i}function l(t){const n=i(t);return n?{revision:n.revision,topologies:n.topologies,states:n.states}:{revision:0,topologies:[],states:{}}}function u(t,n){const e=i(t);return e?(e.listeners.add(n),()=>e.listeners.delete(n)):()=>{}}function p(t){if(!0!==t?.user?.is_admin)throw a("permission")}function f(n){const e=i(n);return e?c(e,"zha",async()=>{if(p(n),"function"!=typeof n?.callWS)throw a("unsupported");return t(await n.callWS({type:"zha/devices"}))}):Promise.resolve()}function d(t){return null!==t&&"object"==typeof t?t:null}function h(t){const n=d(t),e=n?.payload??t;if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return null}}async function m(t,n){let e;try{return await Promise.race([t,new Promise((t,o)=>{e=globalThis.setTimeout(()=>o(a("timeout")),Math.max(1,n))})])}finally{void 0!==e&&globalThis.clearTimeout(e)}}function g(t,o,r=15e4){const s=i(t);if(!s)return Promise.resolve();const l=e(o);return c(s,`z2m:${l||String(o)}`,async()=>{if(p(t),!l)throw a("invalid_topic");const e=t.connection,o=e?.subscribeMessage;if("function"!=typeof o||"function"!=typeof t?.callService)throw a("unsupported");const i=function(){const t=globalThis.crypto;return"function"==typeof t?.randomUUID?`houseplan-${t.randomUUID()}`:`houseplan-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}(),s=Date.now()+Math.max(1,r);let c=!1,u=null,f=null,g=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{f=t,g=n}),b=[];try{const r=await o.call(e,t=>{!0===d(t)?.retain&&h(t)&&u?.()},{type:"mqtt/subscribe",topic:`${l}/bridge/info`});"function"==typeof r&&b.push(r);const p=await o.call(e,t=>{if(!0===d(t)?.retain)return;const n=h(t);null!==n?n&&function(t){const n=d(t),e=n?.transaction??d(n?.data)?.transaction;return"string"==typeof e||"number"==typeof e?String(e):null}(n)===i&&f?.(n):c&&g?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof p&&b.push(p),await m(y,Math.min(4e3,Math.max(1,s-Date.now()))),c=!0,await t.callService("mqtt","publish",{topic:`${l}/bridge/request/networkmap`,payload:JSON.stringify({type:"raw",routes:!1,transaction:i}),qos:0,retain:!1});const v=await m(w,s-Date.now()),_=d(v)?.status;if(_&&"ok"!==_)throw a("provider");return n(v,l)}finally{for(const t of b)try{t()}catch{}}})}export{f as readZhaTopology,g as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="58505e23c334e756bdb941b6dd18d00de39044d1b1b52028c2bc1ee04332807a";import{n as t,b as n}from"./zigbee-topology-C-2fV84O.js";import{I as e}from"./houseplan-card-QFWZI8m6.js";const o=new WeakMap;function i(t){const n=function(t){const n=t?.connection||t;return!n||"object"!=typeof n&&"function"!=typeof n?null:n}(t);if(!n)return null;let e=o.get(n);return e||(e={revision:0,topologies:[],states:{},listeners:new Set,inflight:new Map},o.set(n,e)),e}function r(t,n,e){t.states={...t.states,[n]:e},function(t){t.revision++;for(const n of t.listeners)n()}(t)}function s(t){const n=t?.code;if("permission"===n||"unsupported"===n||"timeout"===n||"invalid_topic"===n||"invalid_payload"===n)return n;const e=String(t?.message||"").toLowerCase();return e.includes("unauthor")||e.includes("permission")?"permission":e.includes("unknown_command")||e.includes("not found")?"unsupported":"provider"}function a(t){return Object.assign(new Error(t),{code:t})}function c(t,n,e){const o=t.inflight.get(n);if(o)return o;r(t,n,{phase:"loading"});const i=e().then(n=>{if(!n.nodes.length&&n.warnings.some(t=>"invalid_payload"===t.code))throw a("invalid_payload");!function(t,n){t.topologies=[...t.topologies.filter(t=>!(t.provider===n.provider&&t.instanceId===n.instanceId)),n],r(t,"zha"===n.provider?"zha":`z2m:${n.instanceId}`,{phase:"ready",obtainedAt:n.obtainedAt,partial:n.warnings.length>0})}(t,n)}).catch(e=>{r(t,n,{phase:"error",error:s(e)})}).finally(()=>t.inflight.delete(n));return t.inflight.set(n,i),i}function l(t){const n=i(t);return n?{revision:n.revision,topologies:n.topologies,states:n.states}:{revision:0,topologies:[],states:{}}}function u(t,n){const e=i(t);return e?(e.listeners.add(n),()=>e.listeners.delete(n)):()=>{}}function p(t){if(!0!==t?.user?.is_admin)throw a("permission")}function f(n){const e=i(n);return e?c(e,"zha",async()=>{if(p(n),"function"!=typeof n?.callWS)throw a("unsupported");return t(await n.callWS({type:"zha/devices"}))}):Promise.resolve()}function d(t){return null!==t&&"object"==typeof t?t:null}function h(t){const n=d(t),e=n?.payload??t;if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return null}}async function m(t,n){let e;try{return await Promise.race([t,new Promise((t,o)=>{e=globalThis.setTimeout(()=>o(a("timeout")),Math.max(1,n))})])}finally{void 0!==e&&globalThis.clearTimeout(e)}}function g(t,o,r=15e4){const s=i(t);if(!s)return Promise.resolve();const l=e(o);return c(s,`z2m:${l||String(o)}`,async()=>{if(p(t),!l)throw a("invalid_topic");const e=t.connection,o=e?.subscribeMessage;if("function"!=typeof o||"function"!=typeof t?.callService)throw a("unsupported");const i=function(){const t=globalThis.crypto;return"function"==typeof t?.randomUUID?`houseplan-${t.randomUUID()}`:`houseplan-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}(),s=Date.now()+Math.max(1,r);let c=!1,u=null,f=null,g=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{f=t,g=n}),b=[];try{const r=await o.call(e,t=>{!0===d(t)?.retain&&h(t)&&u?.()},{type:"mqtt/subscribe",topic:`${l}/bridge/info`});"function"==typeof r&&b.push(r);const p=await o.call(e,t=>{if(!0===d(t)?.retain)return;const n=h(t);null!==n?n&&function(t){const n=d(t),e=n?.transaction??d(n?.data)?.transaction;return"string"==typeof e||"number"==typeof e?String(e):null}(n)===i&&f?.(n):c&&g?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof p&&b.push(p),await m(y,Math.min(4e3,Math.max(1,s-Date.now()))),c=!0,await t.callService("mqtt","publish",{topic:`${l}/bridge/request/networkmap`,payload:JSON.stringify({type:"raw",routes:!1,transaction:i}),qos:0,retain:!1});const v=await m(w,s-Date.now()),_=d(v)?.status;if(_&&"ok"!==_)throw a("provider");return n(v,l)}finally{for(const t of b)try{t()}catch{}}})}export{f as readZhaTopology,g as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="f5cac791d009713cb86ce941810e43fba4976300e3e5f0310074b65d585e42f2";try{await import("./houseplan-assets/houseplan-card-D6Qc0AL6.js")}catch(e){if(!customElements.get("houseplan-card")){const l=String(navigator.language||"en").toLowerCase();const m=l.startsWith("ru")?"House Plan обновился — перезагрузите страницу (Ctrl+F5).":l.startsWith("de")?"House Plan wurde aktualisiert — bitte laden Sie die Seite neu (Strg+F5).":l.startsWith("fr")?"House Plan a été mis à jour — veuillez recharger la page (Ctrl+F5).":"House Plan was updated — please reload the page (Ctrl+F5).";customElements.define("houseplan-card",class extends HTMLElement{setConfig(){}getCardSize(){return 1}connectedCallback(){this.style.cssText="display:block;box-sizing:border-box;padding:16px;border:1px solid var(--divider-color,#e0e0e0);border-radius:var(--ha-card-border-radius,12px);background:var(--card-background-color,#fff);color:var(--primary-text-color,#212121);font:14px/1.4 var(--paper-font-body1_-_font-family,sans-serif)";this.textContent=m}})}console.error("[houseplan] stale entry: the main chunk is unavailable",e)}
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="58505e23c334e756bdb941b6dd18d00de39044d1b1b52028c2bc1ee04332807a";try{await import("./houseplan-assets/houseplan-card-QFWZI8m6.js")}catch(e){if(!customElements.get("houseplan-card")){const l=String(navigator.language||"en").toLowerCase();const m=l.startsWith("ru")?"House Plan обновился — перезагрузите страницу (Ctrl+F5).":l.startsWith("de")?"House Plan wurde aktualisiert — bitte laden Sie die Seite neu (Strg+F5).":l.startsWith("fr")?"House Plan a été mis à jour — veuillez recharger la page (Ctrl+F5).":"House Plan was updated — please reload the page (Ctrl+F5).";customElements.define("houseplan-card",class extends HTMLElement{setConfig(){}getCardSize(){return 1}connectedCallback(){this.style.cssText="display:block;box-sizing:border-box;padding:16px;border:1px solid var(--divider-color,#e0e0e0);border-radius:var(--ha-card-border-radius,12px);background:var(--card-background-color,#fff);color:var(--primary-text-color,#212121);font:14px/1.4 var(--paper-font-body1_-_font-family,sans-serif)";this.textContent=m}})}console.error("[houseplan] stale entry: the main chunk is unavailable",e)}