fix: satisfy render review gates

Issue: #451
User-Visible: no
This commit is contained in:
Sergey Matyunin
2026-09-04 23:54:09 +03:00
parent cb68492c99
commit fe03eae213
30 changed files with 283 additions and 260 deletions
@@ -1,182 +1,182 @@
{
"schema": 1,
"fingerprint": "9cba40b372f43cfad12eb432d5b2ee7847cb3f00f6d91e154ffada6f31df2fd4",
"fingerprint": "e328b3e916661a47b5dcfaefbc166eb4fa3ec6d4591a5a11596b873352345668",
"entry": "houseplan-card.js",
"initialViewFiles": [
"houseplan-assets/houseplan-card-ClTiXI3p.js",
"houseplan-assets/houseplan-card-LkQ8PXVU.js",
"houseplan-card.js"
],
"initialViewGzipBytes": 296711,
"initialViewGzipBytes": 296722,
"lazyFiles": [
"houseplan-assets/backdrop-pick-DxIrP2TG.js",
"houseplan-assets/de-DrM43PtS.js",
"houseplan-assets/editor-DF8nDJsl.js",
"houseplan-assets/fr-BUknt1Ee.js",
"houseplan-assets/houseplan-editor-runtime-CEjxcGHj.js",
"houseplan-assets/houseplan-onboarding-runtime-CDcvp0Jc.js",
"houseplan-assets/hp-zigbee-topology-overlay-BclGSBEr.js",
"houseplan-assets/live-interaction-runtime-Cm2wMojA.js",
"houseplan-assets/zigbee-topology-Di0_F8nQ.js",
"houseplan-assets/zigbee-topology-runtime-B9aBn1Rm.js"
"houseplan-assets/backdrop-pick-BGWbfzuX.js",
"houseplan-assets/de-CZPSgCyO.js",
"houseplan-assets/editor-DEG2tQvp.js",
"houseplan-assets/fr-DvHhmtkh.js",
"houseplan-assets/houseplan-editor-runtime-B01s3iov.js",
"houseplan-assets/houseplan-onboarding-runtime-BUvSajtQ.js",
"houseplan-assets/hp-zigbee-topology-overlay-B0IZZPwI.js",
"houseplan-assets/live-interaction-runtime-CPX07mdJ.js",
"houseplan-assets/zigbee-topology-BvbVnUDV.js",
"houseplan-assets/zigbee-topology-runtime-CzdA3a58.js"
],
"lazyGzipBytes": 239429,
"lazyGzipBytes": 239498,
"lazyEditorFiles": [
"houseplan-assets/backdrop-pick-DxIrP2TG.js",
"houseplan-assets/editor-DF8nDJsl.js",
"houseplan-assets/houseplan-editor-runtime-CEjxcGHj.js",
"houseplan-assets/zigbee-topology-Di0_F8nQ.js"
"houseplan-assets/backdrop-pick-BGWbfzuX.js",
"houseplan-assets/editor-DEG2tQvp.js",
"houseplan-assets/houseplan-editor-runtime-B01s3iov.js",
"houseplan-assets/zigbee-topology-BvbVnUDV.js"
],
"lazyEditorGzipBytes": 177118,
"lazyEditorGzipBytes": 177156,
"lazyOnboardingFiles": [
"houseplan-assets/backdrop-pick-DxIrP2TG.js",
"houseplan-assets/houseplan-onboarding-runtime-CDcvp0Jc.js"
"houseplan-assets/backdrop-pick-BGWbfzuX.js",
"houseplan-assets/houseplan-onboarding-runtime-BUvSajtQ.js"
],
"lazyOnboardingGzipBytes": 14237,
"lazyOnboardingGzipBytes": 14244,
"lazyLocaleFiles": [
"houseplan-assets/de-DrM43PtS.js",
"houseplan-assets/fr-BUknt1Ee.js"
"houseplan-assets/de-CZPSgCyO.js",
"houseplan-assets/fr-DvHhmtkh.js"
],
"lazyLocaleGzipBytes": 49095,
"lazyLocaleGzipBytes": 49111,
"files": [
{
"path": "houseplan-assets/backdrop-pick-DxIrP2TG.js",
"sha256": "40a2b20a1d2895882f9f5253c23012c4082ff794f59d69d16906cdbd0ef0b81b",
"path": "houseplan-assets/backdrop-pick-BGWbfzuX.js",
"sha256": "e8f94b8a504fd8f417f000389e1b0f4385559b2f36e637bd1c4322245004b018",
"rawBytes": 21417,
"gzipBytes": 7279,
"gzipBytes": 7284,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-ClTiXI3p.js"
"houseplan-assets/houseplan-card-LkQ8PXVU.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/de-DrM43PtS.js",
"sha256": "8eef78c8bb65d4dd600c779a6d9ab39f8edc2b05dec690624cff32734181f102",
"path": "houseplan-assets/de-CZPSgCyO.js",
"sha256": "4990f2e0701854e45fd32901880dd09f0cc725b842843669c8b1533805c8e4fa",
"rawBytes": 82182,
"gzipBytes": 24817,
"gzipBytes": 24825,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/editor-DF8nDJsl.js",
"sha256": "abb853b6f918c548c0cb09101dc9186340fccc5e252a04f28e7ca113e43d04c2",
"path": "houseplan-assets/editor-DEG2tQvp.js",
"sha256": "f069bbe50052c6a0ccf9da365f42130310ea953cf364132a51b8e9ea2b9cbc92",
"rawBytes": 3831,
"gzipBytes": 1580,
"gzipBytes": 1585,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-ClTiXI3p.js"
"houseplan-assets/houseplan-card-LkQ8PXVU.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/fr-BUknt1Ee.js",
"sha256": "54ea601d94848dca21dc418c66be5dd3efed711ddbd167e1b3803aa4eca34816",
"path": "houseplan-assets/fr-DvHhmtkh.js",
"sha256": "05d5890e904b4493d28b3e992955760eaed31c9141da542da3e96e5cb47f6df1",
"rawBytes": 84312,
"gzipBytes": 24278,
"gzipBytes": 24286,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/houseplan-card-ClTiXI3p.js",
"sha256": "23062c58e7a572faeaceaf8690447cf3efc26a35394ca616f95b942fb4ff342a",
"path": "houseplan-assets/houseplan-card-LkQ8PXVU.js",
"sha256": "2236ac1efdf62591c0d3139f9c644bc5beadd986f9c505c267c172c081f79f9f",
"rawBytes": 1053904,
"gzipBytes": 295917,
"gzipBytes": 295925,
"isEntry": false,
"imports": [],
"dynamicImports": [
"houseplan-assets/de-DrM43PtS.js",
"houseplan-assets/editor-DF8nDJsl.js",
"houseplan-assets/fr-BUknt1Ee.js",
"houseplan-assets/houseplan-editor-runtime-CEjxcGHj.js",
"houseplan-assets/houseplan-onboarding-runtime-CDcvp0Jc.js",
"houseplan-assets/hp-zigbee-topology-overlay-BclGSBEr.js",
"houseplan-assets/live-interaction-runtime-Cm2wMojA.js"
"houseplan-assets/de-CZPSgCyO.js",
"houseplan-assets/editor-DEG2tQvp.js",
"houseplan-assets/fr-DvHhmtkh.js",
"houseplan-assets/houseplan-editor-runtime-B01s3iov.js",
"houseplan-assets/houseplan-onboarding-runtime-BUvSajtQ.js",
"houseplan-assets/hp-zigbee-topology-overlay-B0IZZPwI.js",
"houseplan-assets/live-interaction-runtime-CPX07mdJ.js"
]
},
{
"path": "houseplan-assets/houseplan-editor-runtime-CEjxcGHj.js",
"sha256": "edd71327a1d38a9175f85f1f4caede3a5ec75cb0e1ee76e02153051149b08296",
"rawBytes": 618575,
"gzipBytes": 163415,
"path": "houseplan-assets/houseplan-editor-runtime-B01s3iov.js",
"sha256": "a5d642347eed103dfcc03fd32dffcfd43cc38fc0520ce5ce5822165923b296c1",
"rawBytes": 618633,
"gzipBytes": 163438,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-DxIrP2TG.js",
"houseplan-assets/houseplan-card-ClTiXI3p.js",
"houseplan-assets/zigbee-topology-Di0_F8nQ.js"
"houseplan-assets/backdrop-pick-BGWbfzuX.js",
"houseplan-assets/houseplan-card-LkQ8PXVU.js",
"houseplan-assets/zigbee-topology-BvbVnUDV.js"
],
"dynamicImports": [
"houseplan-assets/zigbee-topology-runtime-B9aBn1Rm.js"
"houseplan-assets/zigbee-topology-runtime-CzdA3a58.js"
]
},
{
"path": "houseplan-assets/houseplan-onboarding-runtime-CDcvp0Jc.js",
"sha256": "8b98688fdb1c1b0ef8c2e1bdba4e776922a12dad06694df686406d237ddae545",
"path": "houseplan-assets/houseplan-onboarding-runtime-BUvSajtQ.js",
"sha256": "c43e6601bc98ee7f743971ec20951b84d3547b08323e3b93d6e1bc7f027e2e54",
"rawBytes": 28088,
"gzipBytes": 6958,
"gzipBytes": 6960,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-DxIrP2TG.js",
"houseplan-assets/houseplan-card-ClTiXI3p.js"
"houseplan-assets/backdrop-pick-BGWbfzuX.js",
"houseplan-assets/houseplan-card-LkQ8PXVU.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/hp-zigbee-topology-overlay-BclGSBEr.js",
"sha256": "b16af400fa662e3f8b583655654a4a51d97e17632ce2609070546049995e9f4e",
"path": "houseplan-assets/hp-zigbee-topology-overlay-B0IZZPwI.js",
"sha256": "fc09b807842c3908fb569040c2d0c170b66f19392830fec357d80053fa5fb0a7",
"rawBytes": 6006,
"gzipBytes": 2373,
"gzipBytes": 2377,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-ClTiXI3p.js",
"houseplan-assets/zigbee-topology-Di0_F8nQ.js",
"houseplan-assets/zigbee-topology-runtime-B9aBn1Rm.js"
"houseplan-assets/houseplan-card-LkQ8PXVU.js",
"houseplan-assets/zigbee-topology-BvbVnUDV.js",
"houseplan-assets/zigbee-topology-runtime-CzdA3a58.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/live-interaction-runtime-Cm2wMojA.js",
"sha256": "864dbac45c561ca96bd101ad7d02609daca27f2786250607a0f030fdc53c5e12",
"path": "houseplan-assets/live-interaction-runtime-CPX07mdJ.js",
"sha256": "a9f3ca8df90c970709a2e156ad9910f7ed983401a9278049006c302ff1659e14",
"rawBytes": 5196,
"gzipBytes": 2124,
"gzipBytes": 2129,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-ClTiXI3p.js"
"houseplan-assets/houseplan-card-LkQ8PXVU.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/zigbee-topology-Di0_F8nQ.js",
"sha256": "b2d2fc995f582cc9e11f6b8ee33deff93879bbafaf96900e8ac7ef090f5148a8",
"path": "houseplan-assets/zigbee-topology-BvbVnUDV.js",
"sha256": "990d6b7c07a058e0fece1a65188c3efc65f5aad83ff9761a9567174047363894",
"rawBytes": 12382,
"gzipBytes": 4844,
"gzipBytes": 4849,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-ClTiXI3p.js"
"houseplan-assets/houseplan-card-LkQ8PXVU.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/zigbee-topology-runtime-B9aBn1Rm.js",
"sha256": "7bf47628bde723081c132b9af5172b93f340baf5efb969cb40381d1af2345fce",
"path": "houseplan-assets/zigbee-topology-runtime-CzdA3a58.js",
"sha256": "8c01260e23843f194f03034360e3b15b0f7d37efc4176dafacc3d8e17b5796cc",
"rawBytes": 3941,
"gzipBytes": 1761,
"gzipBytes": 1765,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-ClTiXI3p.js",
"houseplan-assets/zigbee-topology-Di0_F8nQ.js"
"houseplan-assets/houseplan-card-LkQ8PXVU.js",
"houseplan-assets/zigbee-topology-BvbVnUDV.js"
],
"dynamicImports": []
},
{
"path": "houseplan-card.js",
"sha256": "ba2206bd6eca725fd19155de72b02ba441ea0aa9f51891f0f7080f7141e9e61c",
"sha256": "4a72638147eb83bcc847c3e2a180adcd1386d9817c3d86182aff0cdfba36189a",
"rawBytes": 1183,
"gzipBytes": 794,
"gzipBytes": 797,
"isEntry": true,
"imports": [
"houseplan-assets/houseplan-card-ClTiXI3p.js"
"houseplan-assets/houseplan-card-LkQ8PXVU.js"
],
"dynamicImports": []
}
File diff suppressed because one or more lines are too long
@@ -1,14 +1,14 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="9cba40b372f43cfad12eb432d5b2ee7847cb3f00f6d91e154ffada6f31df2fd4";import{v as e,l as o,z as t,dt as s,A as a,du as i,dv as l,dw as n,E as r,c}from"./houseplan-card-ClTiXI3p.js";class f 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,f={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")},h=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__="e328b3e916661a47b5dcfaefbc166eb4fa3ec6d4591a5a11596b873352345668";import{v as e,l as o,z as t,dt as s,A as a,du as i,dv as l,dw as n,E as r,c}from"./houseplan-card-LkQ8PXVU.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
.hass=${this.hass}
.data=${this._formData}
.schema=${e}
.computeLabel=${e=>f[e.name]||e.name}
.computeLabel=${e=>h[e.name]||e.name}
@value-changed=${this._valueChanged}
></ha-form>`;return c`
${d(h.slice(0,3))}
${d(f.slice(0,3))}
${_?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:_})}
</div>`:a}
${d(h.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)}}f.properties={hass:{attribute:!1},_config:{state:!0},_spaces:{state:!0}},customElements.get("houseplan-card-editor")||customElements.define("houseplan-card-editor",f);
${d(f.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
@@ -1,4 +1,4 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="9cba40b372f43cfad12eb432d5b2ee7847cb3f00f6d91e154ffada6f31df2fd4";import{v as e,A as t,dx as i,w as s,c as o,l as r,u as n}from"./houseplan-card-ClTiXI3p.js";import{a,r as h,t as d}from"./zigbee-topology-Di0_F8nQ.js";import{zigbeeTopologyRuntimeSnapshot as p,subscribeZigbeeTopology as c}from"./zigbee-topology-runtime-B9aBn1Rm.js";const l={revision:0,topologies:[],states:{}};class v extends e{constructor(){super(...arguments),this.devices=[],this.currentSpace="",this._runtime=l,this._hovered="",this._pointerOver=e=>{if(!this._mouseAllowed(e))return void this._clear();const t=this._deviceFromEvent(e),i=t?.dataset.id||"";i&&i!==this._hovered&&(this._hovered=i,this.requestUpdate())},this._pointerOut=e=>{const t=this._deviceFromEvent(e);if(!t||t.dataset.id!==this._hovered)return;const i=e.relatedTarget instanceof Element?e.relatedTarget.closest('[data-hp="device"]'):null;i?.dataset.id!==this._hovered&&this._clear()},this._pointerDown=e=>{"mouse"!==e.pointerType&&this._clear()}}connectedCallback(){super.connectedCallback();const e=this.getRootNode();e.host&&"undefined"!=typeof MutationObserver&&(this._hoverGateObserver=new MutationObserver(()=>{e.host.hasAttribute("data-pointer-hover")||this._clear()}),this._hoverGateObserver.observe(e.host,{attributes:!0,attributeFilter:["data-pointer-hover"]})),queueMicrotask(()=>this._connectParent())}disconnectedCallback(){this._release?.(),this._release=void 0,this._disconnectParent(),this._hoverGateObserver?.disconnect(),this._hoverGateObserver=void 0,this._hovered="",super.disconnectedCallback()}updated(e){e.has("hass")&&(this._release?.(),this._runtime=p(this.hass),this._mappedMemo=void 0,this._release=c(this.hass,()=>{this._runtime=p(this.hass),this._mappedMemo=void 0,this.requestUpdate()})),(e.has("currentSpace")||e.has("devices")||e.has("registry"))&&(this._mappedMemo=void 0,this.devices.some(e=>e.id===this._hovered&&e.space===this.currentSpace)||(this._hovered=""))}_connectParent(){const e=this.parentElement;e&&e!==this._parent&&(this._disconnectParent(),this._parent=e,e.addEventListener("pointerover",this._pointerOver),e.addEventListener("pointerout",this._pointerOut),e.addEventListener("pointerdown",this._pointerDown,!0))}_disconnectParent(){this._parent?.removeEventListener("pointerover",this._pointerOver),this._parent?.removeEventListener("pointerout",this._pointerOut),this._parent?.removeEventListener("pointerdown",this._pointerDown,!0),this._parent=void 0}_deviceFromEvent(e){for(const t of e.composedPath())if(t instanceof HTMLElement&&"device"===t.dataset.hp)return t;return null}_mouseAllowed(e){const t=this.getRootNode();return"mouse"===e.pointerType&&t.host?.hasAttribute?.("data-pointer-hover")}_clear(){this._hovered&&(this._hovered="",this.requestUpdate())}_position(e){const t=[...this._parent?.querySelectorAll(".dev[data-id]")||[]].find(t=>t.dataset.id===e);if(!t)return null;const i=Number.parseFloat(t.style.left),s=Number.parseFloat(t.style.top),o=t.getBoundingClientRect();return Number.isFinite(i)&&Number.isFinite(s)?{x:i,y:s,width:o.width,height:o.height}:null}render(){if(!this._hovered||!this.registry||!this._runtime.topologies.length)return t;const e=this._mappedMemo,n=e&&e.runtime===this._runtime&&e.devices===this.devices&&e.registry===this.registry?e.mapped:a(this._runtime.topologies,this.devices,this.registry);e&&n===e.mapped||(this._mappedMemo={runtime:this._runtime,devices:this.devices,registry:this.registry,mapped:n});const p=h(n,this.currentSpace,this._hovered),c=this._position(this._hovered);if(!c)return t;const l=p.lines.map(e=>({...e,point:this._position(e.neighborMarkerId)})).filter(e=>!!e.point);return o`
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="e328b3e916661a47b5dcfaefbc166eb4fa3ec6d4591a5a11596b873352345668";import{v as e,A as t,dx as i,w as s,c as o,l as r,u as n}from"./houseplan-card-LkQ8PXVU.js";import{a,r as h,t as d}from"./zigbee-topology-BvbVnUDV.js";import{zigbeeTopologyRuntimeSnapshot as p,subscribeZigbeeTopology as c}from"./zigbee-topology-runtime-CzdA3a58.js";const l={revision:0,topologies:[],states:{}};class v extends e{constructor(){super(...arguments),this.devices=[],this.currentSpace="",this._runtime=l,this._hovered="",this._pointerOver=e=>{if(!this._mouseAllowed(e))return void this._clear();const t=this._deviceFromEvent(e),i=t?.dataset.id||"";i&&i!==this._hovered&&(this._hovered=i,this.requestUpdate())},this._pointerOut=e=>{const t=this._deviceFromEvent(e);if(!t||t.dataset.id!==this._hovered)return;const i=e.relatedTarget instanceof Element?e.relatedTarget.closest('[data-hp="device"]'):null;i?.dataset.id!==this._hovered&&this._clear()},this._pointerDown=e=>{"mouse"!==e.pointerType&&this._clear()}}connectedCallback(){super.connectedCallback();const e=this.getRootNode();e.host&&"undefined"!=typeof MutationObserver&&(this._hoverGateObserver=new MutationObserver(()=>{e.host.hasAttribute("data-pointer-hover")||this._clear()}),this._hoverGateObserver.observe(e.host,{attributes:!0,attributeFilter:["data-pointer-hover"]})),queueMicrotask(()=>this._connectParent())}disconnectedCallback(){this._release?.(),this._release=void 0,this._disconnectParent(),this._hoverGateObserver?.disconnect(),this._hoverGateObserver=void 0,this._hovered="",super.disconnectedCallback()}updated(e){e.has("hass")&&(this._release?.(),this._runtime=p(this.hass),this._mappedMemo=void 0,this._release=c(this.hass,()=>{this._runtime=p(this.hass),this._mappedMemo=void 0,this.requestUpdate()})),(e.has("currentSpace")||e.has("devices")||e.has("registry"))&&(this._mappedMemo=void 0,this.devices.some(e=>e.id===this._hovered&&e.space===this.currentSpace)||(this._hovered=""))}_connectParent(){const e=this.parentElement;e&&e!==this._parent&&(this._disconnectParent(),this._parent=e,e.addEventListener("pointerover",this._pointerOver),e.addEventListener("pointerout",this._pointerOut),e.addEventListener("pointerdown",this._pointerDown,!0))}_disconnectParent(){this._parent?.removeEventListener("pointerover",this._pointerOver),this._parent?.removeEventListener("pointerout",this._pointerOut),this._parent?.removeEventListener("pointerdown",this._pointerDown,!0),this._parent=void 0}_deviceFromEvent(e){for(const t of e.composedPath())if(t instanceof HTMLElement&&"device"===t.dataset.hp)return t;return null}_mouseAllowed(e){const t=this.getRootNode();return"mouse"===e.pointerType&&t.host?.hasAttribute?.("data-pointer-hover")}_clear(){this._hovered&&(this._hovered="",this.requestUpdate())}_position(e){const t=[...this._parent?.querySelectorAll(".dev[data-id]")||[]].find(t=>t.dataset.id===e);if(!t)return null;const i=Number.parseFloat(t.style.left),s=Number.parseFloat(t.style.top),o=t.getBoundingClientRect();return Number.isFinite(i)&&Number.isFinite(s)?{x:i,y:s,width:o.width,height:o.height}:null}render(){if(!this._hovered||!this.registry||!this._runtime.topologies.length)return t;const e=this._mappedMemo,n=e&&e.runtime===this._runtime&&e.devices===this.devices&&e.registry===this.registry?e.mapped:a(this._runtime.topologies,this.devices,this.registry);e&&n===e.mapped||(this._mappedMemo={runtime:this._runtime,devices:this.devices,registry:this.registry,mapped:n});const p=h(n,this.currentSpace,this._hovered),c=this._position(this._hovered);if(!c)return t;const l=p.lines.map(e=>({...e,point:this._position(e.neighborMarkerId)})).filter(e=>!!e.point);return o`
${l.length?s`<svg viewBox="0 0 100 100" preserveAspectRatio="none"
aria-hidden="true" data-hp="zigbee-topology-lines">
${l.map(e=>s`<line x1=${c.x} y1=${c.y}
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="9cba40b372f43cfad12eb432d5b2ee7847cb3f00f6d91e154ffada6f31df2fd4";import{n as t,b as n}from"./zigbee-topology-Di0_F8nQ.js";import{I as e}from"./houseplan-card-ClTiXI3p.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 f(t){if(!0!==t?.user?.is_admin)throw a("permission")}function p(n){const e=i(n);return e?c(e,"zha",async()=>{if(f(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(f(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,p=null,g=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{p=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 f=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&&p?.(n):c&&g?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof f&&b.push(f),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{p as readZhaTopology,g as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="e328b3e916661a47b5dcfaefbc166eb4fa3ec6d4591a5a11596b873352345668";import{n as t,b as n}from"./zigbee-topology-BvbVnUDV.js";import{I as e}from"./houseplan-card-LkQ8PXVU.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__="9cba40b372f43cfad12eb432d5b2ee7847cb3f00f6d91e154ffada6f31df2fd4";try{await import("./houseplan-assets/houseplan-card-ClTiXI3p.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__="e328b3e916661a47b5dcfaefbc166eb4fa3ec6d4591a5a11596b873352345668";try{await import("./houseplan-assets/houseplan-card-LkQ8PXVU.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)}
+84 -84
View File
@@ -1,182 +1,182 @@
{
"schema": 1,
"fingerprint": "9cba40b372f43cfad12eb432d5b2ee7847cb3f00f6d91e154ffada6f31df2fd4",
"fingerprint": "e328b3e916661a47b5dcfaefbc166eb4fa3ec6d4591a5a11596b873352345668",
"entry": "houseplan-card.js",
"initialViewFiles": [
"houseplan-assets/houseplan-card-ClTiXI3p.js",
"houseplan-assets/houseplan-card-LkQ8PXVU.js",
"houseplan-card.js"
],
"initialViewGzipBytes": 296711,
"initialViewGzipBytes": 296722,
"lazyFiles": [
"houseplan-assets/backdrop-pick-DxIrP2TG.js",
"houseplan-assets/de-DrM43PtS.js",
"houseplan-assets/editor-DF8nDJsl.js",
"houseplan-assets/fr-BUknt1Ee.js",
"houseplan-assets/houseplan-editor-runtime-CEjxcGHj.js",
"houseplan-assets/houseplan-onboarding-runtime-CDcvp0Jc.js",
"houseplan-assets/hp-zigbee-topology-overlay-BclGSBEr.js",
"houseplan-assets/live-interaction-runtime-Cm2wMojA.js",
"houseplan-assets/zigbee-topology-Di0_F8nQ.js",
"houseplan-assets/zigbee-topology-runtime-B9aBn1Rm.js"
"houseplan-assets/backdrop-pick-BGWbfzuX.js",
"houseplan-assets/de-CZPSgCyO.js",
"houseplan-assets/editor-DEG2tQvp.js",
"houseplan-assets/fr-DvHhmtkh.js",
"houseplan-assets/houseplan-editor-runtime-B01s3iov.js",
"houseplan-assets/houseplan-onboarding-runtime-BUvSajtQ.js",
"houseplan-assets/hp-zigbee-topology-overlay-B0IZZPwI.js",
"houseplan-assets/live-interaction-runtime-CPX07mdJ.js",
"houseplan-assets/zigbee-topology-BvbVnUDV.js",
"houseplan-assets/zigbee-topology-runtime-CzdA3a58.js"
],
"lazyGzipBytes": 239429,
"lazyGzipBytes": 239498,
"lazyEditorFiles": [
"houseplan-assets/backdrop-pick-DxIrP2TG.js",
"houseplan-assets/editor-DF8nDJsl.js",
"houseplan-assets/houseplan-editor-runtime-CEjxcGHj.js",
"houseplan-assets/zigbee-topology-Di0_F8nQ.js"
"houseplan-assets/backdrop-pick-BGWbfzuX.js",
"houseplan-assets/editor-DEG2tQvp.js",
"houseplan-assets/houseplan-editor-runtime-B01s3iov.js",
"houseplan-assets/zigbee-topology-BvbVnUDV.js"
],
"lazyEditorGzipBytes": 177118,
"lazyEditorGzipBytes": 177156,
"lazyOnboardingFiles": [
"houseplan-assets/backdrop-pick-DxIrP2TG.js",
"houseplan-assets/houseplan-onboarding-runtime-CDcvp0Jc.js"
"houseplan-assets/backdrop-pick-BGWbfzuX.js",
"houseplan-assets/houseplan-onboarding-runtime-BUvSajtQ.js"
],
"lazyOnboardingGzipBytes": 14237,
"lazyOnboardingGzipBytes": 14244,
"lazyLocaleFiles": [
"houseplan-assets/de-DrM43PtS.js",
"houseplan-assets/fr-BUknt1Ee.js"
"houseplan-assets/de-CZPSgCyO.js",
"houseplan-assets/fr-DvHhmtkh.js"
],
"lazyLocaleGzipBytes": 49095,
"lazyLocaleGzipBytes": 49111,
"files": [
{
"path": "houseplan-assets/backdrop-pick-DxIrP2TG.js",
"sha256": "40a2b20a1d2895882f9f5253c23012c4082ff794f59d69d16906cdbd0ef0b81b",
"path": "houseplan-assets/backdrop-pick-BGWbfzuX.js",
"sha256": "e8f94b8a504fd8f417f000389e1b0f4385559b2f36e637bd1c4322245004b018",
"rawBytes": 21417,
"gzipBytes": 7279,
"gzipBytes": 7284,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-ClTiXI3p.js"
"houseplan-assets/houseplan-card-LkQ8PXVU.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/de-DrM43PtS.js",
"sha256": "8eef78c8bb65d4dd600c779a6d9ab39f8edc2b05dec690624cff32734181f102",
"path": "houseplan-assets/de-CZPSgCyO.js",
"sha256": "4990f2e0701854e45fd32901880dd09f0cc725b842843669c8b1533805c8e4fa",
"rawBytes": 82182,
"gzipBytes": 24817,
"gzipBytes": 24825,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/editor-DF8nDJsl.js",
"sha256": "abb853b6f918c548c0cb09101dc9186340fccc5e252a04f28e7ca113e43d04c2",
"path": "houseplan-assets/editor-DEG2tQvp.js",
"sha256": "f069bbe50052c6a0ccf9da365f42130310ea953cf364132a51b8e9ea2b9cbc92",
"rawBytes": 3831,
"gzipBytes": 1580,
"gzipBytes": 1585,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-ClTiXI3p.js"
"houseplan-assets/houseplan-card-LkQ8PXVU.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/fr-BUknt1Ee.js",
"sha256": "54ea601d94848dca21dc418c66be5dd3efed711ddbd167e1b3803aa4eca34816",
"path": "houseplan-assets/fr-DvHhmtkh.js",
"sha256": "05d5890e904b4493d28b3e992955760eaed31c9141da542da3e96e5cb47f6df1",
"rawBytes": 84312,
"gzipBytes": 24278,
"gzipBytes": 24286,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/houseplan-card-ClTiXI3p.js",
"sha256": "23062c58e7a572faeaceaf8690447cf3efc26a35394ca616f95b942fb4ff342a",
"path": "houseplan-assets/houseplan-card-LkQ8PXVU.js",
"sha256": "2236ac1efdf62591c0d3139f9c644bc5beadd986f9c505c267c172c081f79f9f",
"rawBytes": 1053904,
"gzipBytes": 295917,
"gzipBytes": 295925,
"isEntry": false,
"imports": [],
"dynamicImports": [
"houseplan-assets/de-DrM43PtS.js",
"houseplan-assets/editor-DF8nDJsl.js",
"houseplan-assets/fr-BUknt1Ee.js",
"houseplan-assets/houseplan-editor-runtime-CEjxcGHj.js",
"houseplan-assets/houseplan-onboarding-runtime-CDcvp0Jc.js",
"houseplan-assets/hp-zigbee-topology-overlay-BclGSBEr.js",
"houseplan-assets/live-interaction-runtime-Cm2wMojA.js"
"houseplan-assets/de-CZPSgCyO.js",
"houseplan-assets/editor-DEG2tQvp.js",
"houseplan-assets/fr-DvHhmtkh.js",
"houseplan-assets/houseplan-editor-runtime-B01s3iov.js",
"houseplan-assets/houseplan-onboarding-runtime-BUvSajtQ.js",
"houseplan-assets/hp-zigbee-topology-overlay-B0IZZPwI.js",
"houseplan-assets/live-interaction-runtime-CPX07mdJ.js"
]
},
{
"path": "houseplan-assets/houseplan-editor-runtime-CEjxcGHj.js",
"sha256": "edd71327a1d38a9175f85f1f4caede3a5ec75cb0e1ee76e02153051149b08296",
"rawBytes": 618575,
"gzipBytes": 163415,
"path": "houseplan-assets/houseplan-editor-runtime-B01s3iov.js",
"sha256": "a5d642347eed103dfcc03fd32dffcfd43cc38fc0520ce5ce5822165923b296c1",
"rawBytes": 618633,
"gzipBytes": 163438,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-DxIrP2TG.js",
"houseplan-assets/houseplan-card-ClTiXI3p.js",
"houseplan-assets/zigbee-topology-Di0_F8nQ.js"
"houseplan-assets/backdrop-pick-BGWbfzuX.js",
"houseplan-assets/houseplan-card-LkQ8PXVU.js",
"houseplan-assets/zigbee-topology-BvbVnUDV.js"
],
"dynamicImports": [
"houseplan-assets/zigbee-topology-runtime-B9aBn1Rm.js"
"houseplan-assets/zigbee-topology-runtime-CzdA3a58.js"
]
},
{
"path": "houseplan-assets/houseplan-onboarding-runtime-CDcvp0Jc.js",
"sha256": "8b98688fdb1c1b0ef8c2e1bdba4e776922a12dad06694df686406d237ddae545",
"path": "houseplan-assets/houseplan-onboarding-runtime-BUvSajtQ.js",
"sha256": "c43e6601bc98ee7f743971ec20951b84d3547b08323e3b93d6e1bc7f027e2e54",
"rawBytes": 28088,
"gzipBytes": 6958,
"gzipBytes": 6960,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-DxIrP2TG.js",
"houseplan-assets/houseplan-card-ClTiXI3p.js"
"houseplan-assets/backdrop-pick-BGWbfzuX.js",
"houseplan-assets/houseplan-card-LkQ8PXVU.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/hp-zigbee-topology-overlay-BclGSBEr.js",
"sha256": "b16af400fa662e3f8b583655654a4a51d97e17632ce2609070546049995e9f4e",
"path": "houseplan-assets/hp-zigbee-topology-overlay-B0IZZPwI.js",
"sha256": "fc09b807842c3908fb569040c2d0c170b66f19392830fec357d80053fa5fb0a7",
"rawBytes": 6006,
"gzipBytes": 2373,
"gzipBytes": 2377,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-ClTiXI3p.js",
"houseplan-assets/zigbee-topology-Di0_F8nQ.js",
"houseplan-assets/zigbee-topology-runtime-B9aBn1Rm.js"
"houseplan-assets/houseplan-card-LkQ8PXVU.js",
"houseplan-assets/zigbee-topology-BvbVnUDV.js",
"houseplan-assets/zigbee-topology-runtime-CzdA3a58.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/live-interaction-runtime-Cm2wMojA.js",
"sha256": "864dbac45c561ca96bd101ad7d02609daca27f2786250607a0f030fdc53c5e12",
"path": "houseplan-assets/live-interaction-runtime-CPX07mdJ.js",
"sha256": "a9f3ca8df90c970709a2e156ad9910f7ed983401a9278049006c302ff1659e14",
"rawBytes": 5196,
"gzipBytes": 2124,
"gzipBytes": 2129,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-ClTiXI3p.js"
"houseplan-assets/houseplan-card-LkQ8PXVU.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/zigbee-topology-Di0_F8nQ.js",
"sha256": "b2d2fc995f582cc9e11f6b8ee33deff93879bbafaf96900e8ac7ef090f5148a8",
"path": "houseplan-assets/zigbee-topology-BvbVnUDV.js",
"sha256": "990d6b7c07a058e0fece1a65188c3efc65f5aad83ff9761a9567174047363894",
"rawBytes": 12382,
"gzipBytes": 4844,
"gzipBytes": 4849,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-ClTiXI3p.js"
"houseplan-assets/houseplan-card-LkQ8PXVU.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/zigbee-topology-runtime-B9aBn1Rm.js",
"sha256": "7bf47628bde723081c132b9af5172b93f340baf5efb969cb40381d1af2345fce",
"path": "houseplan-assets/zigbee-topology-runtime-CzdA3a58.js",
"sha256": "8c01260e23843f194f03034360e3b15b0f7d37efc4176dafacc3d8e17b5796cc",
"rawBytes": 3941,
"gzipBytes": 1761,
"gzipBytes": 1765,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-ClTiXI3p.js",
"houseplan-assets/zigbee-topology-Di0_F8nQ.js"
"houseplan-assets/houseplan-card-LkQ8PXVU.js",
"houseplan-assets/zigbee-topology-BvbVnUDV.js"
],
"dynamicImports": []
},
{
"path": "houseplan-card.js",
"sha256": "ba2206bd6eca725fd19155de72b02ba441ea0aa9f51891f0f7080f7141e9e61c",
"sha256": "4a72638147eb83bcc847c3e2a180adcd1386d9817c3d86182aff0cdfba36189a",
"rawBytes": 1183,
"gzipBytes": 794,
"gzipBytes": 797,
"isEntry": true,
"imports": [
"houseplan-assets/houseplan-card-ClTiXI3p.js"
"houseplan-assets/houseplan-card-LkQ8PXVU.js"
],
"dynamicImports": []
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,14 +1,14 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="9cba40b372f43cfad12eb432d5b2ee7847cb3f00f6d91e154ffada6f31df2fd4";import{v as e,l as o,z as t,dt as s,A as a,du as i,dv as l,dw as n,E as r,c}from"./houseplan-card-ClTiXI3p.js";class f 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,f={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")},h=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__="e328b3e916661a47b5dcfaefbc166eb4fa3ec6d4591a5a11596b873352345668";import{v as e,l as o,z as t,dt as s,A as a,du as i,dv as l,dw as n,E as r,c}from"./houseplan-card-LkQ8PXVU.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
.hass=${this.hass}
.data=${this._formData}
.schema=${e}
.computeLabel=${e=>f[e.name]||e.name}
.computeLabel=${e=>h[e.name]||e.name}
@value-changed=${this._valueChanged}
></ha-form>`;return c`
${d(h.slice(0,3))}
${d(f.slice(0,3))}
${_?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:_})}
</div>`:a}
${d(h.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)}}f.properties={hass:{attribute:!1},_config:{state:!0},_spaces:{state:!0}},customElements.get("houseplan-card-editor")||customElements.define("houseplan-card-editor",f);
${d(f.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
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="9cba40b372f43cfad12eb432d5b2ee7847cb3f00f6d91e154ffada6f31df2fd4";import{v as e,A as t,dx as i,w as s,c as o,l as r,u as n}from"./houseplan-card-ClTiXI3p.js";import{a,r as h,t as d}from"./zigbee-topology-Di0_F8nQ.js";import{zigbeeTopologyRuntimeSnapshot as p,subscribeZigbeeTopology as c}from"./zigbee-topology-runtime-B9aBn1Rm.js";const l={revision:0,topologies:[],states:{}};class v extends e{constructor(){super(...arguments),this.devices=[],this.currentSpace="",this._runtime=l,this._hovered="",this._pointerOver=e=>{if(!this._mouseAllowed(e))return void this._clear();const t=this._deviceFromEvent(e),i=t?.dataset.id||"";i&&i!==this._hovered&&(this._hovered=i,this.requestUpdate())},this._pointerOut=e=>{const t=this._deviceFromEvent(e);if(!t||t.dataset.id!==this._hovered)return;const i=e.relatedTarget instanceof Element?e.relatedTarget.closest('[data-hp="device"]'):null;i?.dataset.id!==this._hovered&&this._clear()},this._pointerDown=e=>{"mouse"!==e.pointerType&&this._clear()}}connectedCallback(){super.connectedCallback();const e=this.getRootNode();e.host&&"undefined"!=typeof MutationObserver&&(this._hoverGateObserver=new MutationObserver(()=>{e.host.hasAttribute("data-pointer-hover")||this._clear()}),this._hoverGateObserver.observe(e.host,{attributes:!0,attributeFilter:["data-pointer-hover"]})),queueMicrotask(()=>this._connectParent())}disconnectedCallback(){this._release?.(),this._release=void 0,this._disconnectParent(),this._hoverGateObserver?.disconnect(),this._hoverGateObserver=void 0,this._hovered="",super.disconnectedCallback()}updated(e){e.has("hass")&&(this._release?.(),this._runtime=p(this.hass),this._mappedMemo=void 0,this._release=c(this.hass,()=>{this._runtime=p(this.hass),this._mappedMemo=void 0,this.requestUpdate()})),(e.has("currentSpace")||e.has("devices")||e.has("registry"))&&(this._mappedMemo=void 0,this.devices.some(e=>e.id===this._hovered&&e.space===this.currentSpace)||(this._hovered=""))}_connectParent(){const e=this.parentElement;e&&e!==this._parent&&(this._disconnectParent(),this._parent=e,e.addEventListener("pointerover",this._pointerOver),e.addEventListener("pointerout",this._pointerOut),e.addEventListener("pointerdown",this._pointerDown,!0))}_disconnectParent(){this._parent?.removeEventListener("pointerover",this._pointerOver),this._parent?.removeEventListener("pointerout",this._pointerOut),this._parent?.removeEventListener("pointerdown",this._pointerDown,!0),this._parent=void 0}_deviceFromEvent(e){for(const t of e.composedPath())if(t instanceof HTMLElement&&"device"===t.dataset.hp)return t;return null}_mouseAllowed(e){const t=this.getRootNode();return"mouse"===e.pointerType&&t.host?.hasAttribute?.("data-pointer-hover")}_clear(){this._hovered&&(this._hovered="",this.requestUpdate())}_position(e){const t=[...this._parent?.querySelectorAll(".dev[data-id]")||[]].find(t=>t.dataset.id===e);if(!t)return null;const i=Number.parseFloat(t.style.left),s=Number.parseFloat(t.style.top),o=t.getBoundingClientRect();return Number.isFinite(i)&&Number.isFinite(s)?{x:i,y:s,width:o.width,height:o.height}:null}render(){if(!this._hovered||!this.registry||!this._runtime.topologies.length)return t;const e=this._mappedMemo,n=e&&e.runtime===this._runtime&&e.devices===this.devices&&e.registry===this.registry?e.mapped:a(this._runtime.topologies,this.devices,this.registry);e&&n===e.mapped||(this._mappedMemo={runtime:this._runtime,devices:this.devices,registry:this.registry,mapped:n});const p=h(n,this.currentSpace,this._hovered),c=this._position(this._hovered);if(!c)return t;const l=p.lines.map(e=>({...e,point:this._position(e.neighborMarkerId)})).filter(e=>!!e.point);return o`
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="e328b3e916661a47b5dcfaefbc166eb4fa3ec6d4591a5a11596b873352345668";import{v as e,A as t,dx as i,w as s,c as o,l as r,u as n}from"./houseplan-card-LkQ8PXVU.js";import{a,r as h,t as d}from"./zigbee-topology-BvbVnUDV.js";import{zigbeeTopologyRuntimeSnapshot as p,subscribeZigbeeTopology as c}from"./zigbee-topology-runtime-CzdA3a58.js";const l={revision:0,topologies:[],states:{}};class v extends e{constructor(){super(...arguments),this.devices=[],this.currentSpace="",this._runtime=l,this._hovered="",this._pointerOver=e=>{if(!this._mouseAllowed(e))return void this._clear();const t=this._deviceFromEvent(e),i=t?.dataset.id||"";i&&i!==this._hovered&&(this._hovered=i,this.requestUpdate())},this._pointerOut=e=>{const t=this._deviceFromEvent(e);if(!t||t.dataset.id!==this._hovered)return;const i=e.relatedTarget instanceof Element?e.relatedTarget.closest('[data-hp="device"]'):null;i?.dataset.id!==this._hovered&&this._clear()},this._pointerDown=e=>{"mouse"!==e.pointerType&&this._clear()}}connectedCallback(){super.connectedCallback();const e=this.getRootNode();e.host&&"undefined"!=typeof MutationObserver&&(this._hoverGateObserver=new MutationObserver(()=>{e.host.hasAttribute("data-pointer-hover")||this._clear()}),this._hoverGateObserver.observe(e.host,{attributes:!0,attributeFilter:["data-pointer-hover"]})),queueMicrotask(()=>this._connectParent())}disconnectedCallback(){this._release?.(),this._release=void 0,this._disconnectParent(),this._hoverGateObserver?.disconnect(),this._hoverGateObserver=void 0,this._hovered="",super.disconnectedCallback()}updated(e){e.has("hass")&&(this._release?.(),this._runtime=p(this.hass),this._mappedMemo=void 0,this._release=c(this.hass,()=>{this._runtime=p(this.hass),this._mappedMemo=void 0,this.requestUpdate()})),(e.has("currentSpace")||e.has("devices")||e.has("registry"))&&(this._mappedMemo=void 0,this.devices.some(e=>e.id===this._hovered&&e.space===this.currentSpace)||(this._hovered=""))}_connectParent(){const e=this.parentElement;e&&e!==this._parent&&(this._disconnectParent(),this._parent=e,e.addEventListener("pointerover",this._pointerOver),e.addEventListener("pointerout",this._pointerOut),e.addEventListener("pointerdown",this._pointerDown,!0))}_disconnectParent(){this._parent?.removeEventListener("pointerover",this._pointerOver),this._parent?.removeEventListener("pointerout",this._pointerOut),this._parent?.removeEventListener("pointerdown",this._pointerDown,!0),this._parent=void 0}_deviceFromEvent(e){for(const t of e.composedPath())if(t instanceof HTMLElement&&"device"===t.dataset.hp)return t;return null}_mouseAllowed(e){const t=this.getRootNode();return"mouse"===e.pointerType&&t.host?.hasAttribute?.("data-pointer-hover")}_clear(){this._hovered&&(this._hovered="",this.requestUpdate())}_position(e){const t=[...this._parent?.querySelectorAll(".dev[data-id]")||[]].find(t=>t.dataset.id===e);if(!t)return null;const i=Number.parseFloat(t.style.left),s=Number.parseFloat(t.style.top),o=t.getBoundingClientRect();return Number.isFinite(i)&&Number.isFinite(s)?{x:i,y:s,width:o.width,height:o.height}:null}render(){if(!this._hovered||!this.registry||!this._runtime.topologies.length)return t;const e=this._mappedMemo,n=e&&e.runtime===this._runtime&&e.devices===this.devices&&e.registry===this.registry?e.mapped:a(this._runtime.topologies,this.devices,this.registry);e&&n===e.mapped||(this._mappedMemo={runtime:this._runtime,devices:this.devices,registry:this.registry,mapped:n});const p=h(n,this.currentSpace,this._hovered),c=this._position(this._hovered);if(!c)return t;const l=p.lines.map(e=>({...e,point:this._position(e.neighborMarkerId)})).filter(e=>!!e.point);return o`
${l.length?s`<svg viewBox="0 0 100 100" preserveAspectRatio="none"
aria-hidden="true" data-hp="zigbee-topology-lines">
${l.map(e=>s`<line x1=${c.x} y1=${c.y}
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__="9cba40b372f43cfad12eb432d5b2ee7847cb3f00f6d91e154ffada6f31df2fd4";import{n as t,b as n}from"./zigbee-topology-Di0_F8nQ.js";import{I as e}from"./houseplan-card-ClTiXI3p.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 f(t){if(!0!==t?.user?.is_admin)throw a("permission")}function p(n){const e=i(n);return e?c(e,"zha",async()=>{if(f(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(f(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,p=null,g=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{p=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 f=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&&p?.(n):c&&g?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof f&&b.push(f),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{p as readZhaTopology,g as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="e328b3e916661a47b5dcfaefbc166eb4fa3ec6d4591a5a11596b873352345668";import{n as t,b as n}from"./zigbee-topology-BvbVnUDV.js";import{I as e}from"./houseplan-card-LkQ8PXVU.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
View File
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="9cba40b372f43cfad12eb432d5b2ee7847cb3f00f6d91e154ffada6f31df2fd4";try{await import("./houseplan-assets/houseplan-card-ClTiXI3p.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__="e328b3e916661a47b5dcfaefbc166eb4fa3ec6d4591a5a11596b873352345668";try{await import("./houseplan-assets/houseplan-card-LkQ8PXVU.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)}
+4 -4
View File
@@ -92,9 +92,8 @@ import {
type LinearWallSegment, type WallEntry, type WallInterval,
innerEdgeSpan, ownEdgeOffsets, thicknessCmAt,
} from './wall-thickness';
import {
checkNodeDistances, checkNodes, checkRoomClearance, checkSegmentLengths,
increasedViolations, type JunctionLimitViolation, type LimitSegment,
import type {
JunctionLimitViolation, JunctionSharedGeometry, LimitSegment,
} from './junction-limits';
import {
pointOnOpenCut, sanitizeOpenSpans,
@@ -7789,7 +7788,8 @@ export class HouseplanCard extends LitElement {
}
/** #329 П1-П5 over one space. Pure input, no side effects. */
private _junctionLimitViolations(config: any, spaceId: string, sharedGeometry?: any,
private _junctionLimitViolations(config: unknown, spaceId: string,
sharedGeometry?: JunctionSharedGeometry | null,
roomIds?: ReadonlySet<string>): JunctionLimitViolation[] {
return this._editorRuntimeOrThrow()._junctionLimitViolations(config, spaceId, sharedGeometry, roomIds);
}
+8 -8
View File
@@ -105,7 +105,7 @@ import {
} from './wall-thickness';
import {
junctionLimitViolations, increasedViolations,
type JunctionLimitViolation, type LimitSegment,
type JunctionLimitViolation, type JunctionSharedGeometry, type LimitSegment,
} from './junction-limits';
import {
pointOnOpenCut, sanitizeOpenSpans,
@@ -973,9 +973,8 @@ export interface HouseplanEditorHostPort {
_importTotal: number;
_infoCard: DevItem | null;
_innerRoomContour: (space: SpaceModel, roomId: string, openCuts?: number[][], roomWalls?: any, multiWallNodes?: MultiWallNodeMap | null | undefined) => number[][] | null;
_junctionLimitViolations: (
config: unknown, spaceId: string, sharedGeometry?: unknown, roomIds?: ReadonlySet<string>,
) => JunctionLimitViolation[];
_junctionLimitViolations: (config: unknown, spaceId: string,
sharedGeometry?: JunctionSharedGeometry | null, roomIds?: ReadonlySet<string>) => JunctionLimitViolation[];
_isVacDev: (d: DevItem) => boolean;
_kiosk: boolean;
_kioskDialog: boolean;
@@ -2047,13 +2046,14 @@ public _limitSegmentsOf(space: any): LimitSegment[] {
}
public _junctionLimitViolations(
config: any, spaceId: string,
config: unknown, spaceId: string,
/** #330 §4.7: an already computed masonry pass of THIS config (e.g. the
* resize preflight's artifact) — the union is never paid twice. */
sharedGeometry?: any,
sharedGeometry?: JunctionSharedGeometry | null,
roomIds?: ReadonlySet<string>,
): JunctionLimitViolation[] {
const space = (config?.spaces || []).find((item) => item?.id === spaceId);
const space = ((config as { spaces?: Array<{ id?: unknown }> } | null)?.spaces || [])
.find((item) => item?.id === spaceId);
return space ? junctionLimitViolations(
config, spaceId, this._limitSegmentsOf(space), sharedGeometry, roomIds,
) : [];
@@ -2068,7 +2068,7 @@ public _junctionLimitLabel(violation: JunctionLimitViolation): string {
public _junctionLimitsIntroduced(
candidate: any, previousConfig: any, spaceId: string,
candidateGeometry?: unknown,
candidateGeometry?: JunctionSharedGeometry | null,
affectedRoomIds?: readonly string[],
): JunctionLimitViolation[] {
// The baseline must be the previous document AS THE CANDIDATE SEES IT: a
+22 -5
View File
@@ -15,7 +15,21 @@
import { GRID_STEP_N } from './space-geometry';
import {
innerContourForRoom, multiWallNodesForGeometry, wallBodiesGeometry,
type MultiWallNodeMap, type WallBodiesGeometryResult, type WallEntry,
} from './wall-thickness';
import type { RoomCfg } from './types';
interface JunctionLimitSpace {
id?: string;
cell_cm?: unknown;
rooms?: RoomCfg[];
walls?: WallEntry[];
}
type JunctionLimitConfig = { spaces?: JunctionLimitSpace[] };
export type JunctionSharedGeometry =
| Pick<WallBodiesGeometryResult, 'status' | 'roomGeom' | 'multiWallNodes'>
| { status: 'lightweight'; multiWallNodes?: MultiWallNodeMap | null };
export const MIN_JUNCTION_ANGLE_DEG = 15;
export const MAX_JUNCTION_VALENCE = 6;
@@ -48,13 +62,14 @@ export interface LimitSegment {
/** Shared full/affected-room validation used by editor writes and lightweight resize previews. */
export function junctionLimitViolations(
config: any,
config: unknown,
spaceId: string,
segments: readonly LimitSegment[],
sharedGeometry?: any,
sharedGeometry?: JunctionSharedGeometry | null,
roomIds?: ReadonlySet<string>,
): JunctionLimitViolation[] {
const space = (config?.spaces || []).find((item: any) => item?.id === spaceId);
const spaces = (config as JunctionLimitConfig | null)?.spaces || [];
const space = spaces.find((item) => item?.id === spaceId);
if (!space) return [];
const cellCm = Number(space.cell_cm) > 0 ? Number(space.cell_cm) : 5;
const violations = [
@@ -70,8 +85,10 @@ export function junctionLimitViolations(
);
} catch { nodes = null; }
}
let roomGeometry: any = sharedGeometry?.status === 'ok'
|| sharedGeometry?.status === 'degraded-extra' ? sharedGeometry.roomGeom : null;
const completeGeometry = sharedGeometry && sharedGeometry.status !== 'lightweight'
? sharedGeometry : null;
let roomGeometry: unknown = completeGeometry?.status === 'ok'
|| completeGeometry?.status === 'degraded-extra' ? completeGeometry.roomGeom : null;
const lightweight = sharedGeometry === null || sharedGeometry?.status === 'lightweight';
if (!roomGeometry && !lightweight && nodes?.nodes.length) {
try {
+15 -9
View File
@@ -1,6 +1,9 @@
import { nothing, render, svg, type TemplateResult } from 'lit';
import { cancelHouseplanPointerMove } from './pointer-move-queue';
import { gridVisualUnits } from './grid-scale';
import type { RenderOpening } from './interaction-types';
import type { SpaceDisplay } from './logic';
import type { SpaceModel, WallEntry } from './types';
import {
wallBodyNeedsSolid, wallCmToUnits, wallEdgePathD,
wallHatchNeedsSolid, wallHatchStepUnits,
@@ -38,7 +41,7 @@ interface LiveEditorHost {
_liveEditorPaintCount: number;
_baseVb: () => number[];
_viewOr: (viewBox: number[]) => { x: number; y: number; w: number; h: number };
_spaceDisplayForRender: () => unknown;
_spaceDisplayForRender: () => SpaceDisplay;
_renderWallBodies: (display: unknown) => unknown;
_renderResizeMeasurements: () => unknown;
_renderOpenings: (display: unknown, onlyIds?: readonly string[]) => unknown;
@@ -58,11 +61,11 @@ interface LiveEditorHost {
_livePos: (device: { id: string }) => { x: number; y: number };
_scenePoint: (point: number[]) => number[];
_renderProjection: string;
_spaceModel: () => any;
_spaceWalls: any[];
_spaceModel: () => SpaceModel | null;
_spaceWalls: WallEntry[];
_cellCm: number;
_gridPitch: number;
_openingsR: any[];
_openingsR: RenderOpening[];
_stageEl: HTMLElement | null;
_fillColors: { wall_fill: { c: string; a: number } };
}
@@ -154,16 +157,19 @@ const restore = (state: LiveEditorState): void => {
/** Resize moves paint individual wall strips; pointerup still validates the canonical union. */
const resizePreviewWalls = (
host: LiveEditorHost, display: any, roomIds: readonly string[] = [],
host: LiveEditorHost, display: SpaceDisplay, roomIds: readonly string[] = [],
): TemplateResult => {
if (host._renderProjection === 'iso') return svg``;
const space = host._spaceModel();
if (!space) return svg``;
const affected = new Set(roomIds);
const boundary = (space.rooms || []).filter((room: any) => affected.has(room.id))
.flatMap((room: any) => (room.poly || []).map((point: number[], index: number) => [
point, room.poly[(index + 1) % room.poly.length],
]));
const boundary = (space.rooms || []).filter((room) => !!room.id && affected.has(room.id))
.flatMap((room) => {
const poly = room.poly || [];
return poly.map((point: number[], index: number) => [
point, poly[(index + 1) % poly.length],
]);
});
const onSegment = (point: number[], segment: number[][]): boolean => {
const [a, b] = segment;
const dx = b[0] - a[0], dy = b[1] - a[1];