mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-03 13:18:58 +00:00
@@ -1,125 +1,125 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"fingerprint": "eb43411403730eb71d1cd9533ad5095bd9df3dfe268e6f2eec0a9bd790530601",
|
||||
"fingerprint": "f9d1d97505a93d92d3be104dc3b731c5191d3e7ecb10fef673bdc5e60fe8b2c7",
|
||||
"entry": "houseplan-card.js",
|
||||
"initialViewFiles": [
|
||||
"houseplan-assets/houseplan-card-qNKtsnEK.js",
|
||||
"houseplan-assets/houseplan-card-CBWTStJK.js",
|
||||
"houseplan-card.js"
|
||||
],
|
||||
"initialViewGzipBytes": 283088,
|
||||
"lazyFiles": [
|
||||
"houseplan-assets/backdrop-pick-CdAZ6RMj.js",
|
||||
"houseplan-assets/de-BVKerrju.js",
|
||||
"houseplan-assets/editor-CtyQ9s5Z.js",
|
||||
"houseplan-assets/fr-DBD_kI8t.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CtBVzfe8.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-E2130GwY.js"
|
||||
"houseplan-assets/backdrop-pick-Do7LQiRQ.js",
|
||||
"houseplan-assets/de-oZrkEqX6.js",
|
||||
"houseplan-assets/editor--mflqGUR.js",
|
||||
"houseplan-assets/fr-DfONpvOM.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-By0nbxeL.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-DRAI36pI.js"
|
||||
],
|
||||
"lazyGzipBytes": 197604,
|
||||
"lazyEditorFiles": [
|
||||
"houseplan-assets/backdrop-pick-CdAZ6RMj.js",
|
||||
"houseplan-assets/editor-CtyQ9s5Z.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CtBVzfe8.js"
|
||||
"houseplan-assets/backdrop-pick-Do7LQiRQ.js",
|
||||
"houseplan-assets/editor--mflqGUR.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-By0nbxeL.js"
|
||||
],
|
||||
"lazyEditorGzipBytes": 143894,
|
||||
"lazyEditorGzipBytes": 143900,
|
||||
"lazyOnboardingFiles": [
|
||||
"houseplan-assets/backdrop-pick-CdAZ6RMj.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-E2130GwY.js"
|
||||
"houseplan-assets/backdrop-pick-Do7LQiRQ.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-DRAI36pI.js"
|
||||
],
|
||||
"lazyOnboardingGzipBytes": 13786,
|
||||
"lazyOnboardingGzipBytes": 13789,
|
||||
"lazyLocaleFiles": [
|
||||
"houseplan-assets/de-BVKerrju.js",
|
||||
"houseplan-assets/fr-DBD_kI8t.js"
|
||||
"houseplan-assets/de-oZrkEqX6.js",
|
||||
"houseplan-assets/fr-DfONpvOM.js"
|
||||
],
|
||||
"lazyLocaleGzipBytes": 46992,
|
||||
"lazyLocaleGzipBytes": 46986,
|
||||
"files": [
|
||||
{
|
||||
"path": "houseplan-assets/backdrop-pick-CdAZ6RMj.js",
|
||||
"sha256": "a718235ca60d15448295f4b705a1c6a60b7b3ca74bee2e789b7ae4b873a7f1aa",
|
||||
"path": "houseplan-assets/backdrop-pick-Do7LQiRQ.js",
|
||||
"sha256": "5331740c6e13db3e93870fc4b2d3f098ea327417cdab7eb0800cbf3215834b92",
|
||||
"rawBytes": 20636,
|
||||
"gzipBytes": 7068,
|
||||
"gzipBytes": 7071,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-qNKtsnEK.js"
|
||||
"houseplan-assets/houseplan-card-CBWTStJK.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/de-BVKerrju.js",
|
||||
"sha256": "3056786cc25d1e848b09007240dffc6754bbff98cc81992fd49a618290e35f95",
|
||||
"path": "houseplan-assets/de-oZrkEqX6.js",
|
||||
"sha256": "6184f30f2a77335edf045179e42c7ee285995670b143c9b3f9a9ab50c2955746",
|
||||
"rawBytes": 78310,
|
||||
"gzipBytes": 23718,
|
||||
"gzipBytes": 23715,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/editor-CtyQ9s5Z.js",
|
||||
"sha256": "52c7884b1ba89022ae8edd41b2318b17025fe1bdaa9320ba5f56da1ad09d3ff0",
|
||||
"path": "houseplan-assets/editor--mflqGUR.js",
|
||||
"sha256": "86e469e66557c2aff1c7e3cff65cf7a21bd8ed5e24a6749f1eaa0a050566beff",
|
||||
"rawBytes": 3826,
|
||||
"gzipBytes": 1581,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-qNKtsnEK.js"
|
||||
"houseplan-assets/houseplan-card-CBWTStJK.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/fr-DBD_kI8t.js",
|
||||
"sha256": "2034c36516cdd52b6b2f8d45f9f6bd8c1619964003f2ec1d6b1910320c9f54cf",
|
||||
"path": "houseplan-assets/fr-DfONpvOM.js",
|
||||
"sha256": "e797479f529a3b301db1b612010958789ab58fcdfe1bfbeeed8856a3cbb32255",
|
||||
"rawBytes": 80482,
|
||||
"gzipBytes": 23274,
|
||||
"gzipBytes": 23271,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-card-qNKtsnEK.js",
|
||||
"sha256": "fb91a2dcec8848678c87c822cd94d94f35b87ac4042336a0034bd2b220525ea4",
|
||||
"path": "houseplan-assets/houseplan-card-CBWTStJK.js",
|
||||
"sha256": "2d137f17eeb1a7bcdb1846edc3e5f36e7ebe7d689c7b07b22a51f7c12f13e02a",
|
||||
"rawBytes": 1001304,
|
||||
"gzipBytes": 282292,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": [
|
||||
"houseplan-assets/de-BVKerrju.js",
|
||||
"houseplan-assets/editor-CtyQ9s5Z.js",
|
||||
"houseplan-assets/fr-DBD_kI8t.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CtBVzfe8.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-E2130GwY.js"
|
||||
"houseplan-assets/de-oZrkEqX6.js",
|
||||
"houseplan-assets/editor--mflqGUR.js",
|
||||
"houseplan-assets/fr-DfONpvOM.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-By0nbxeL.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-DRAI36pI.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-CtBVzfe8.js",
|
||||
"sha256": "a9f39e176cd6c68aed8a0a1d9652004dee1af938ae62014637c0a1631a70a2a8",
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-By0nbxeL.js",
|
||||
"sha256": "c316d389463599c5230c92af641cd6b413d8b34074ed2101d9232157c234c336",
|
||||
"rawBytes": 524015,
|
||||
"gzipBytes": 135245,
|
||||
"gzipBytes": 135248,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-CdAZ6RMj.js",
|
||||
"houseplan-assets/houseplan-card-qNKtsnEK.js"
|
||||
"houseplan-assets/backdrop-pick-Do7LQiRQ.js",
|
||||
"houseplan-assets/houseplan-card-CBWTStJK.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-E2130GwY.js",
|
||||
"sha256": "13e62a0191697cfba73d052d5d142cd658c671be59567dccb9c3320724f66b86",
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-DRAI36pI.js",
|
||||
"sha256": "e1184e7c0bfd79eb07573bda18c348d98c618a674f05653553c955a14dcc6370",
|
||||
"rawBytes": 27120,
|
||||
"gzipBytes": 6718,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-CdAZ6RMj.js",
|
||||
"houseplan-assets/houseplan-card-qNKtsnEK.js"
|
||||
"houseplan-assets/backdrop-pick-Do7LQiRQ.js",
|
||||
"houseplan-assets/houseplan-card-CBWTStJK.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-card.js",
|
||||
"sha256": "369215385ae412062e894aa5606f5e3e24ec286b5f2d036b5b61bd83beb6989b",
|
||||
"sha256": "819076ed93c5615271a579b4713b4d346c99f8ad168c063bd4b3904cac3f5626",
|
||||
"rawBytes": 1183,
|
||||
"gzipBytes": 796,
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-qNKtsnEK.js"
|
||||
"houseplan-assets/houseplan-card-CBWTStJK.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
}
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,4 +1,4 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="eb43411403730eb71d1cd9533ad5095bd9df3dfe268e6f2eec0a9bd790530601";import{b as e,l as o,t,d7 as s,A as a,d8 as i,d9 as l,da as n,E as r,c}from"./houseplan-card-qNKtsnEK.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__="f9d1d97505a93d92d3be104dc3b731c5191d3e7ecb10fef673bdc5e60fe8b2c7";import{b as e,l as o,t,d7 as s,A as a,d8 as i,d9 as l,da as n,E as r,c}from"./houseplan-card-CBWTStJK.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}
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+4
-4
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,4 +1,4 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="eb43411403730eb71d1cd9533ad5095bd9df3dfe268e6f2eec0a9bd790530601";import{l as t,ar as s,A as e,t as o,c as a,bV as l,bW as i,bX as h,bY as c,ao as n,bZ as p,c2 as r,b_ as _,b$ as d,c0 as u,c1 as g,cX as m,an as b,ap as $,cY as v}from"./houseplan-card-qNKtsnEK.js";import{i as f,c as y,e as w,r as D,a as S,b as k,s as C,t as M}from"./backdrop-pick-CdAZ6RMj.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="eb43411403730eb71d1cd9533ad5095bd9df3dfe268e6f2eec0a9bd790530601";class I{constructor(t){this.host=t,this._toggleServerPlans=async()=>{const t=this.host._spaceDialog;if(t)if(t.pickSaved)this.host._spaceDialog={...t,pickSaved:!1};else{this.host._spaceDialog={...t,pickSaved:!0,savedBusy:!0};try{const t=await this.host.hass.callWS({type:"houseplan/plans/list"}),s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:t?.plans||[],savedBusy:!1})}catch(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:[],savedBusy:!1}),this.host._showToast(this.host._t("toast.plans_list_failed",{err:this.host._errText(t)}))}}}}_help(l){const i=`${l}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,l)&&s(h,i)?a`<hp-help data-help-key=${l}
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="f9d1d97505a93d92d3be104dc3b731c5191d3e7ecb10fef673bdc5e60fe8b2c7";import{l as t,ar as s,A as e,t as o,c as a,bV as l,bW as i,bX as h,bY as c,ao as n,bZ as p,c2 as r,b_ as _,b$ as d,c0 as u,c1 as g,cX as m,an as b,ap as $,cY as v}from"./houseplan-card-CBWTStJK.js";import{i as f,c as y,e as w,r as D,a as S,b as k,s as C,t as M}from"./backdrop-pick-Do7LQiRQ.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="f9d1d97505a93d92d3be104dc3b731c5191d3e7ecb10fef673bdc5e60fe8b2c7";class I{constructor(t){this.host=t,this._toggleServerPlans=async()=>{const t=this.host._spaceDialog;if(t)if(t.pickSaved)this.host._spaceDialog={...t,pickSaved:!1};else{this.host._spaceDialog={...t,pickSaved:!0,savedBusy:!0};try{const t=await this.host.hass.callWS({type:"houseplan/plans/list"}),s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:t?.plans||[],savedBusy:!1})}catch(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:[],savedBusy:!1}),this.host._showToast(this.host._t("toast.plans_list_failed",{err:this.host._errText(t)}))}}}}_help(l){const i=`${l}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,l)&&s(h,i)?a`<hp-help data-help-key=${l}
|
||||
.text=${o(h,l)} .ariaLabel=${o(h,i)}></hp-help>`:e}_openSpaceDialog(t,s){if(!this.host._serverStorage||!this.host._serverCfg)return void this.host._showToast(this.host._t("toast.integration_missing"));if("edit"===t){const e=this.host._serverCfg.spaces.find(t=>t.id===s);if(!e)return;const o=l(e),a=e.settings?.custom_fill&&"object"==typeof e.settings.custom_fill?i(e.settings.custom_fill):null,r="none"===o.fill?{...a||h,a:0}:a;return void(this.host._spaceDialog={mode:t,spaceId:s,title:e.title,planUrl:e.plan_url||null,planFile:null,source:e.plan_url?"file":"draw",showBorders:o.showBorders,showNames:o.showNames,zeroWallStyle:p(e),displayTouched:!0,hideDecor:o.hideDecor,hideOpenings:o.hideOpenings,roomColor:o.color,roomOpacity:o.opacity,fillMode:"none"===o.fill?"custom":o.fill,customFill:r,glowEnabled:o.glow,bgColor:o.bgColor,bgMode:"static"===e.settings?.bg_mode||"daynight"===e.settings?.bg_mode?e.settings.bg_mode:null,northDeg:n({},e.settings),sunRays:"boolean"==typeof e.settings?.sun_rays?e.settings.sun_rays:null,tempMin:o.tempMin,tempMax:o.tempMax,showLqi:o.showLqi??this.host._config?.show_signal??!0,cardFontScale:o.cardFontScale,labelTemp:o.labelTemp,labelHum:o.labelHum,labelLqi:o.labelLqi,labelLight:o.labelLight,cellCm:Number(e.cell_cm)>0?Number(e.cell_cm):5,cellCmInput:c(Number(e.cell_cm)>0?Number(e.cell_cm):5,this.host._imperial),cellCmTouched:!1,busy:!1})}const e=r(this.host._imperial);this.host._spaceDialog={mode:t,title:"",planUrl:null,planFile:null,...f(),hideDecor:!1,hideOpenings:!1,zeroWallStyle:"dashed",roomColor:g,roomOpacity:u,fillMode:"custom",customFill:{...h,a:0},glowEnabled:!0,bgColor:null,bgMode:"daynight",northDeg:null,sunRays:null,tempMin:d,tempMax:_,showLqi:this.host._config?.show_signal??!0,cardFontScale:1,labelTemp:!1,labelHum:!1,labelLqi:!1,labelLight:!1,cellCm:e,cellCmInput:c(e,this.host._imperial),cellCmTouched:!1,busy:!1}}async _pickPlanFile(t){const s=t.target,e=s.files?.[0];if(!e||!this.host._spaceDialog)return;s.value="";const o=await y(e);if("reject"===o.kind)return void this.host._showToast(this.host._t("toast.plan_formats"));if("guard"===o.kind)return void(this.host._backdropGuard=o.state);const a=await w(e,o.ext,e.name);this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:a})}_renderBackdropGuard(){return D(this.host,t=>{this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:t})},()=>{this.host._backdropGuard=null},this.host.hass)??e}_useServerPlan(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,planUrl:t,planFile:null,pickSaved:!1,savedAspect:void 0},this.host._aspectJob=this._readPlanAspect(t))}async _readPlanAspect(t){for(let s=0;s<40;s++){const s=this.host._display(t);if(s){const e=await new Promise(t=>{const e=new Image;e.onload=()=>t(e.naturalWidth&&e.naturalHeight?e.naturalWidth/e.naturalHeight:0),e.onerror=()=>t(0),e.src=s}),o=this.host._spaceDialog;return o&&o.planUrl===t&&Number.isFinite(e)&&e>0?(this.host._spaceDialog={...o,savedAspect:e},e):0}if(await new Promise(t=>setTimeout(t,150)),this.host._spaceDialog?.planUrl!==t)return 0}return 0}async _deleteServerPlan(t){if(confirm(this.host._t("confirm.delete_plan",{name:t})))try{await this.host.hass.callWS({type:"houseplan/plans/delete",name:t});const s=this.host._spaceDialog;s?.saved&&(this.host._spaceDialog={...s,saved:s.saved.filter(s=>s.name!==t)})}catch(t){this.host._showToast(this.host._t("toast.plan_delete_failed",{err:this.host._errText(t)}))}}_renderServerPlans(t){if(t.savedBusy)return a`<div class="savedplans muted">${this.host._t("space.loading")}</div>`;const s=t.saved||[];if(!s.length)return a`<div class="savedplans muted">${this.host._t("space.no_saved")}</div>`;return a`<div class="savedplans">
|
||||
${s.map(s=>{return a`
|
||||
<div class="savedplan ${s.url===t.planUrl?"cur":""}">
|
||||
@@ -1 +1 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="eb43411403730eb71d1cd9533ad5095bd9df3dfe268e6f2eec0a9bd790530601";try{await import("./houseplan-assets/houseplan-card-qNKtsnEK.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__="f9d1d97505a93d92d3be104dc3b731c5191d3e7ecb10fef673bdc5e60fe8b2c7";try{await import("./houseplan-assets/houseplan-card-CBWTStJK.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)}
|
||||
|
||||
Vendored
+49
-49
@@ -1,125 +1,125 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"fingerprint": "eb43411403730eb71d1cd9533ad5095bd9df3dfe268e6f2eec0a9bd790530601",
|
||||
"fingerprint": "f9d1d97505a93d92d3be104dc3b731c5191d3e7ecb10fef673bdc5e60fe8b2c7",
|
||||
"entry": "houseplan-card.js",
|
||||
"initialViewFiles": [
|
||||
"houseplan-assets/houseplan-card-qNKtsnEK.js",
|
||||
"houseplan-assets/houseplan-card-CBWTStJK.js",
|
||||
"houseplan-card.js"
|
||||
],
|
||||
"initialViewGzipBytes": 283088,
|
||||
"lazyFiles": [
|
||||
"houseplan-assets/backdrop-pick-CdAZ6RMj.js",
|
||||
"houseplan-assets/de-BVKerrju.js",
|
||||
"houseplan-assets/editor-CtyQ9s5Z.js",
|
||||
"houseplan-assets/fr-DBD_kI8t.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CtBVzfe8.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-E2130GwY.js"
|
||||
"houseplan-assets/backdrop-pick-Do7LQiRQ.js",
|
||||
"houseplan-assets/de-oZrkEqX6.js",
|
||||
"houseplan-assets/editor--mflqGUR.js",
|
||||
"houseplan-assets/fr-DfONpvOM.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-By0nbxeL.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-DRAI36pI.js"
|
||||
],
|
||||
"lazyGzipBytes": 197604,
|
||||
"lazyEditorFiles": [
|
||||
"houseplan-assets/backdrop-pick-CdAZ6RMj.js",
|
||||
"houseplan-assets/editor-CtyQ9s5Z.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CtBVzfe8.js"
|
||||
"houseplan-assets/backdrop-pick-Do7LQiRQ.js",
|
||||
"houseplan-assets/editor--mflqGUR.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-By0nbxeL.js"
|
||||
],
|
||||
"lazyEditorGzipBytes": 143894,
|
||||
"lazyEditorGzipBytes": 143900,
|
||||
"lazyOnboardingFiles": [
|
||||
"houseplan-assets/backdrop-pick-CdAZ6RMj.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-E2130GwY.js"
|
||||
"houseplan-assets/backdrop-pick-Do7LQiRQ.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-DRAI36pI.js"
|
||||
],
|
||||
"lazyOnboardingGzipBytes": 13786,
|
||||
"lazyOnboardingGzipBytes": 13789,
|
||||
"lazyLocaleFiles": [
|
||||
"houseplan-assets/de-BVKerrju.js",
|
||||
"houseplan-assets/fr-DBD_kI8t.js"
|
||||
"houseplan-assets/de-oZrkEqX6.js",
|
||||
"houseplan-assets/fr-DfONpvOM.js"
|
||||
],
|
||||
"lazyLocaleGzipBytes": 46992,
|
||||
"lazyLocaleGzipBytes": 46986,
|
||||
"files": [
|
||||
{
|
||||
"path": "houseplan-assets/backdrop-pick-CdAZ6RMj.js",
|
||||
"sha256": "a718235ca60d15448295f4b705a1c6a60b7b3ca74bee2e789b7ae4b873a7f1aa",
|
||||
"path": "houseplan-assets/backdrop-pick-Do7LQiRQ.js",
|
||||
"sha256": "5331740c6e13db3e93870fc4b2d3f098ea327417cdab7eb0800cbf3215834b92",
|
||||
"rawBytes": 20636,
|
||||
"gzipBytes": 7068,
|
||||
"gzipBytes": 7071,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-qNKtsnEK.js"
|
||||
"houseplan-assets/houseplan-card-CBWTStJK.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/de-BVKerrju.js",
|
||||
"sha256": "3056786cc25d1e848b09007240dffc6754bbff98cc81992fd49a618290e35f95",
|
||||
"path": "houseplan-assets/de-oZrkEqX6.js",
|
||||
"sha256": "6184f30f2a77335edf045179e42c7ee285995670b143c9b3f9a9ab50c2955746",
|
||||
"rawBytes": 78310,
|
||||
"gzipBytes": 23718,
|
||||
"gzipBytes": 23715,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/editor-CtyQ9s5Z.js",
|
||||
"sha256": "52c7884b1ba89022ae8edd41b2318b17025fe1bdaa9320ba5f56da1ad09d3ff0",
|
||||
"path": "houseplan-assets/editor--mflqGUR.js",
|
||||
"sha256": "86e469e66557c2aff1c7e3cff65cf7a21bd8ed5e24a6749f1eaa0a050566beff",
|
||||
"rawBytes": 3826,
|
||||
"gzipBytes": 1581,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-qNKtsnEK.js"
|
||||
"houseplan-assets/houseplan-card-CBWTStJK.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/fr-DBD_kI8t.js",
|
||||
"sha256": "2034c36516cdd52b6b2f8d45f9f6bd8c1619964003f2ec1d6b1910320c9f54cf",
|
||||
"path": "houseplan-assets/fr-DfONpvOM.js",
|
||||
"sha256": "e797479f529a3b301db1b612010958789ab58fcdfe1bfbeeed8856a3cbb32255",
|
||||
"rawBytes": 80482,
|
||||
"gzipBytes": 23274,
|
||||
"gzipBytes": 23271,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-card-qNKtsnEK.js",
|
||||
"sha256": "fb91a2dcec8848678c87c822cd94d94f35b87ac4042336a0034bd2b220525ea4",
|
||||
"path": "houseplan-assets/houseplan-card-CBWTStJK.js",
|
||||
"sha256": "2d137f17eeb1a7bcdb1846edc3e5f36e7ebe7d689c7b07b22a51f7c12f13e02a",
|
||||
"rawBytes": 1001304,
|
||||
"gzipBytes": 282292,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": [
|
||||
"houseplan-assets/de-BVKerrju.js",
|
||||
"houseplan-assets/editor-CtyQ9s5Z.js",
|
||||
"houseplan-assets/fr-DBD_kI8t.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CtBVzfe8.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-E2130GwY.js"
|
||||
"houseplan-assets/de-oZrkEqX6.js",
|
||||
"houseplan-assets/editor--mflqGUR.js",
|
||||
"houseplan-assets/fr-DfONpvOM.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-By0nbxeL.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-DRAI36pI.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-CtBVzfe8.js",
|
||||
"sha256": "a9f39e176cd6c68aed8a0a1d9652004dee1af938ae62014637c0a1631a70a2a8",
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-By0nbxeL.js",
|
||||
"sha256": "c316d389463599c5230c92af641cd6b413d8b34074ed2101d9232157c234c336",
|
||||
"rawBytes": 524015,
|
||||
"gzipBytes": 135245,
|
||||
"gzipBytes": 135248,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-CdAZ6RMj.js",
|
||||
"houseplan-assets/houseplan-card-qNKtsnEK.js"
|
||||
"houseplan-assets/backdrop-pick-Do7LQiRQ.js",
|
||||
"houseplan-assets/houseplan-card-CBWTStJK.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-E2130GwY.js",
|
||||
"sha256": "13e62a0191697cfba73d052d5d142cd658c671be59567dccb9c3320724f66b86",
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-DRAI36pI.js",
|
||||
"sha256": "e1184e7c0bfd79eb07573bda18c348d98c618a674f05653553c955a14dcc6370",
|
||||
"rawBytes": 27120,
|
||||
"gzipBytes": 6718,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-CdAZ6RMj.js",
|
||||
"houseplan-assets/houseplan-card-qNKtsnEK.js"
|
||||
"houseplan-assets/backdrop-pick-Do7LQiRQ.js",
|
||||
"houseplan-assets/houseplan-card-CBWTStJK.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-card.js",
|
||||
"sha256": "369215385ae412062e894aa5606f5e3e24ec286b5f2d036b5b61bd83beb6989b",
|
||||
"sha256": "819076ed93c5615271a579b4713b4d346c99f8ad168c063bd4b3904cac3f5626",
|
||||
"rawBytes": 1183,
|
||||
"gzipBytes": 796,
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-qNKtsnEK.js"
|
||||
"houseplan-assets/houseplan-card-CBWTStJK.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
}
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,4 +1,4 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="eb43411403730eb71d1cd9533ad5095bd9df3dfe268e6f2eec0a9bd790530601";import{b as e,l as o,t,d7 as s,A as a,d8 as i,d9 as l,da as n,E as r,c}from"./houseplan-card-qNKtsnEK.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__="f9d1d97505a93d92d3be104dc3b731c5191d3e7ecb10fef673bdc5e60fe8b2c7";import{b as e,l as o,t,d7 as s,A as a,d8 as i,d9 as l,da as n,E as r,c}from"./houseplan-card-CBWTStJK.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}
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+4
-4
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,4 +1,4 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="eb43411403730eb71d1cd9533ad5095bd9df3dfe268e6f2eec0a9bd790530601";import{l as t,ar as s,A as e,t as o,c as a,bV as l,bW as i,bX as h,bY as c,ao as n,bZ as p,c2 as r,b_ as _,b$ as d,c0 as u,c1 as g,cX as m,an as b,ap as $,cY as v}from"./houseplan-card-qNKtsnEK.js";import{i as f,c as y,e as w,r as D,a as S,b as k,s as C,t as M}from"./backdrop-pick-CdAZ6RMj.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="eb43411403730eb71d1cd9533ad5095bd9df3dfe268e6f2eec0a9bd790530601";class I{constructor(t){this.host=t,this._toggleServerPlans=async()=>{const t=this.host._spaceDialog;if(t)if(t.pickSaved)this.host._spaceDialog={...t,pickSaved:!1};else{this.host._spaceDialog={...t,pickSaved:!0,savedBusy:!0};try{const t=await this.host.hass.callWS({type:"houseplan/plans/list"}),s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:t?.plans||[],savedBusy:!1})}catch(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:[],savedBusy:!1}),this.host._showToast(this.host._t("toast.plans_list_failed",{err:this.host._errText(t)}))}}}}_help(l){const i=`${l}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,l)&&s(h,i)?a`<hp-help data-help-key=${l}
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="f9d1d97505a93d92d3be104dc3b731c5191d3e7ecb10fef673bdc5e60fe8b2c7";import{l as t,ar as s,A as e,t as o,c as a,bV as l,bW as i,bX as h,bY as c,ao as n,bZ as p,c2 as r,b_ as _,b$ as d,c0 as u,c1 as g,cX as m,an as b,ap as $,cY as v}from"./houseplan-card-CBWTStJK.js";import{i as f,c as y,e as w,r as D,a as S,b as k,s as C,t as M}from"./backdrop-pick-Do7LQiRQ.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="f9d1d97505a93d92d3be104dc3b731c5191d3e7ecb10fef673bdc5e60fe8b2c7";class I{constructor(t){this.host=t,this._toggleServerPlans=async()=>{const t=this.host._spaceDialog;if(t)if(t.pickSaved)this.host._spaceDialog={...t,pickSaved:!1};else{this.host._spaceDialog={...t,pickSaved:!0,savedBusy:!0};try{const t=await this.host.hass.callWS({type:"houseplan/plans/list"}),s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:t?.plans||[],savedBusy:!1})}catch(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:[],savedBusy:!1}),this.host._showToast(this.host._t("toast.plans_list_failed",{err:this.host._errText(t)}))}}}}_help(l){const i=`${l}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,l)&&s(h,i)?a`<hp-help data-help-key=${l}
|
||||
.text=${o(h,l)} .ariaLabel=${o(h,i)}></hp-help>`:e}_openSpaceDialog(t,s){if(!this.host._serverStorage||!this.host._serverCfg)return void this.host._showToast(this.host._t("toast.integration_missing"));if("edit"===t){const e=this.host._serverCfg.spaces.find(t=>t.id===s);if(!e)return;const o=l(e),a=e.settings?.custom_fill&&"object"==typeof e.settings.custom_fill?i(e.settings.custom_fill):null,r="none"===o.fill?{...a||h,a:0}:a;return void(this.host._spaceDialog={mode:t,spaceId:s,title:e.title,planUrl:e.plan_url||null,planFile:null,source:e.plan_url?"file":"draw",showBorders:o.showBorders,showNames:o.showNames,zeroWallStyle:p(e),displayTouched:!0,hideDecor:o.hideDecor,hideOpenings:o.hideOpenings,roomColor:o.color,roomOpacity:o.opacity,fillMode:"none"===o.fill?"custom":o.fill,customFill:r,glowEnabled:o.glow,bgColor:o.bgColor,bgMode:"static"===e.settings?.bg_mode||"daynight"===e.settings?.bg_mode?e.settings.bg_mode:null,northDeg:n({},e.settings),sunRays:"boolean"==typeof e.settings?.sun_rays?e.settings.sun_rays:null,tempMin:o.tempMin,tempMax:o.tempMax,showLqi:o.showLqi??this.host._config?.show_signal??!0,cardFontScale:o.cardFontScale,labelTemp:o.labelTemp,labelHum:o.labelHum,labelLqi:o.labelLqi,labelLight:o.labelLight,cellCm:Number(e.cell_cm)>0?Number(e.cell_cm):5,cellCmInput:c(Number(e.cell_cm)>0?Number(e.cell_cm):5,this.host._imperial),cellCmTouched:!1,busy:!1})}const e=r(this.host._imperial);this.host._spaceDialog={mode:t,title:"",planUrl:null,planFile:null,...f(),hideDecor:!1,hideOpenings:!1,zeroWallStyle:"dashed",roomColor:g,roomOpacity:u,fillMode:"custom",customFill:{...h,a:0},glowEnabled:!0,bgColor:null,bgMode:"daynight",northDeg:null,sunRays:null,tempMin:d,tempMax:_,showLqi:this.host._config?.show_signal??!0,cardFontScale:1,labelTemp:!1,labelHum:!1,labelLqi:!1,labelLight:!1,cellCm:e,cellCmInput:c(e,this.host._imperial),cellCmTouched:!1,busy:!1}}async _pickPlanFile(t){const s=t.target,e=s.files?.[0];if(!e||!this.host._spaceDialog)return;s.value="";const o=await y(e);if("reject"===o.kind)return void this.host._showToast(this.host._t("toast.plan_formats"));if("guard"===o.kind)return void(this.host._backdropGuard=o.state);const a=await w(e,o.ext,e.name);this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:a})}_renderBackdropGuard(){return D(this.host,t=>{this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:t})},()=>{this.host._backdropGuard=null},this.host.hass)??e}_useServerPlan(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,planUrl:t,planFile:null,pickSaved:!1,savedAspect:void 0},this.host._aspectJob=this._readPlanAspect(t))}async _readPlanAspect(t){for(let s=0;s<40;s++){const s=this.host._display(t);if(s){const e=await new Promise(t=>{const e=new Image;e.onload=()=>t(e.naturalWidth&&e.naturalHeight?e.naturalWidth/e.naturalHeight:0),e.onerror=()=>t(0),e.src=s}),o=this.host._spaceDialog;return o&&o.planUrl===t&&Number.isFinite(e)&&e>0?(this.host._spaceDialog={...o,savedAspect:e},e):0}if(await new Promise(t=>setTimeout(t,150)),this.host._spaceDialog?.planUrl!==t)return 0}return 0}async _deleteServerPlan(t){if(confirm(this.host._t("confirm.delete_plan",{name:t})))try{await this.host.hass.callWS({type:"houseplan/plans/delete",name:t});const s=this.host._spaceDialog;s?.saved&&(this.host._spaceDialog={...s,saved:s.saved.filter(s=>s.name!==t)})}catch(t){this.host._showToast(this.host._t("toast.plan_delete_failed",{err:this.host._errText(t)}))}}_renderServerPlans(t){if(t.savedBusy)return a`<div class="savedplans muted">${this.host._t("space.loading")}</div>`;const s=t.saved||[];if(!s.length)return a`<div class="savedplans muted">${this.host._t("space.no_saved")}</div>`;return a`<div class="savedplans">
|
||||
${s.map(s=>{return a`
|
||||
<div class="savedplan ${s.url===t.planUrl?"cur":""}">
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="eb43411403730eb71d1cd9533ad5095bd9df3dfe268e6f2eec0a9bd790530601";try{await import("./houseplan-assets/houseplan-card-qNKtsnEK.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__="f9d1d97505a93d92d3be104dc3b731c5191d3e7ecb10fef673bdc5e60fe8b2c7";try{await import("./houseplan-assets/houseplan-card-CBWTStJK.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)}
|
||||
|
||||
@@ -4176,16 +4176,16 @@ export class HouseplanCard extends LitElement {
|
||||
const configChanged = nextCfgFingerprint !== (this._cfgContentFingerprint
|
||||
|| contentFingerprint(this._serverCfg));
|
||||
if (configChanged) {
|
||||
// #82: a new structural baseline owns the viewport. Freeze the last
|
||||
// painted camera frame before replacing geometry so an obsolete target
|
||||
// cannot settle against the new content frame.
|
||||
this._cancelCameraTransition(false);
|
||||
// A genuinely different baseline invalidates local geometry undo. A
|
||||
// reconnect echo with identical content deliberately does not.
|
||||
this._geometryHistory.clear();
|
||||
this._devicePositionHistory.clear();
|
||||
this._cancelDeviceDrag();
|
||||
this._pendingPhysicalWrites.clear();
|
||||
// #82: a new structural baseline owns the viewport. Freeze the last
|
||||
// painted camera frame before replacing geometry so an obsolete target
|
||||
// cannot settle against the new content frame.
|
||||
this._cancelCameraTransition(false);
|
||||
if (this._serverCfg) this._clearGeometryGesture();
|
||||
this._serverCfg = nextConfig;
|
||||
this._seedDecorStyle(this._serverCfg);
|
||||
|
||||
Reference in New Issue
Block a user