UNPKG

iobroker.lovelace

Version:

With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI

80 lines 110 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[57427],{63708:function(t,e,a){a.d(e,{fW:function(){return r}});a(18111),a(13579);var i=a(44537),o=a(36312);const r=(t,e)=>(l(e)||s(t,e))&&n(t,e),s=(t,e)=>!e.component||(0,i.e)(e.component).some(e=>(0,o.x)(t.config,e)),n=(t,e)=>!e.not_component||!(0,i.e)(e.not_component).some(e=>(0,o.x)(t.config,e)),l=t=>t.core},70137:function(t,e,a){a.d(e,{A:function(){return i}});a(18111),a(22489);const i=(t,e)=>t&&Object.keys(t.services).filter(a=>e in t.services[a])},29006:function(t,e,a){a.d(e,{F:function(){return o}});a(18111),a(22489);var i=a(63708);const o=(t,e,a={})=>e.filter(e=>{var o,r,s;return"#external-app-configuration"===e.path?null===(r=t.auth.external)||void 0===r?void 0:r.config.hasSettingsScreen:!(e.adminOnly&&(null===(o=t.user)||void 0===o||!o.is_admin))&&("bluetooth"===e.component?null!==(s=a.hasBluetoothConfigEntries)&&void 0!==s&&s:(0,i.fW)(t,e))})},93421:function(t,e,a){a.d(e,{IW:function(){return c},dH:function(){return d},fI:function(){return l}});a(44114),a(62953);var i=a(35211),o=a(22792),r=a(32172);const s=(t,e)=>{let a=t;for(const i of e){if(null==a)return;a=a[i]}return a},n=(t,e,a)=>{const o=(0,r.p)({transformer:function(t){return a.call(this,t)},watch:e?[e]:[]}),s=(0,i.Fg)({context:t,subscribe:!0});return(t,e)=>{o(t,e),s(t,e)}},l=t=>n(o.iN,t.entityIdPath[0],function(e){const a=s(this,t.entityIdPath);return"string"==typeof a?null==e?void 0:e[a]:void 0}),d=t=>n(o.X1,t.entityIdPath[0],function(e){const a=s(this,t.entityIdPath);return"string"==typeof a?null==e?void 0:e[a]:void 0}),c=()=>n(o.D5,void 0,({localize:t})=>t)},32172:function(t,e,a){a.d(e,{p:function(){return i}});a(16280),a(18111),a(7588),a(45367),a(92731),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698),a(62953);function i(t){return(e,a)=>{if("object"==typeof a)throw new Error("This decorator does not support this compilation type.");const i=String(a),o=e;if(o._transformers){if(!o.hasOwnProperty("_transformers")){const t=o._transformers;o._transformers=new Map,t.forEach((t,e)=>o._transformers.set(e,t))}}else{o._transformers=new Map,o._watching=new Map;const t=o.willUpdate;o.willUpdate=function(e){t.call(this,e);const a=new Set;e.forEach((t,e)=>{const i=this._watching.get(e);void 0!==i&&i.forEach(t=>a.add(t))}),a.forEach(t=>{this[t]=this[`__original_${String(t)}`]})}}o._transformers.set(a,t.transformer),t.watch&&t.watch.forEach(t=>{let e=o._watching.get(t);e||(e=new Set,o._watching.set(t,e)),e.add(a)});const r=Object.getOwnPropertyDescriptor(e,a);let s;if(void 0===r)s={get(){return this[`__transform_${i}`]},set(t){const e=this[`__transform_${i}`],a=this._transformers.get(i);this[`__transform_${i}`]=a?a.call(this,t):t,this[`__original_${i}`]=t,this.requestUpdate(i,e)},configurable:!0,enumerable:!0};else{const t=r.set;s=Object.assign(Object.assign({},r),{},{set(e){const a=this[`__transform_${i}`],o=this._transformers.get(i);this[`__transform_${i}`]=o?o.call(this,e):e,this[`__original_${i}`]=e,this.requestUpdate(i,a),null==t||t.call(this,e)}})}Object.defineProperty(e,a,s)}}},69093:function(t,e,a){a.d(e,{t:function(){return o}});var i=a(71727);const o=t=>(0,i.m)(t.entity_id)},66033:function(t,e,a){a.d(e,{L:function(){return i}});const i=(t,e)=>{const a=t.floor_id;return{area:t,floor:(a?e[a]:void 0)||null}}},76774:function(t,e,a){a.d(e,{q:function(){return i}});const i=(t,e)=>{const a=t.area_id;return a?e[a]:void 0}},47129:function(t,e,a){a.d(e,{a:function(){return r}});a(74423);var i=a(22675),o=a(71727);function r(t,e){const a=(0,o.m)(t.entity_id),r=void 0!==e?e:null==t?void 0:t.state;if(["button","event","infrared","input_button","radio_frequency","scene"].includes(a))return r!==i.Hh;if(r===i.Hh||r===i.HV)return!1;if("off"===r&&"alert"!==a)return!1;switch(a){case"alarm_control_panel":return"disarmed"!==r;case"alert":return"idle"!==r;case"cover":case"valve":return"closed"!==r;case"device_tracker":case"person":return"not_home"!==r;case"lawn_mower":return!["docked","paused"].includes(r);case"lock":return"locked"!==r;case"media_player":return"standby"!==r;case"vacuum":return!["idle","docked","paused"].includes(r);case"plant":return"problem"===r;case"group":return["on","home","open","locked","problem"].includes(r);case"timer":return"active"===r;case"camera":return"streaming"===r}return!0}},52658:function(t,e,a){a.d(e,{ZK:function(){return u},gf:function(){return h},mT:function(){return f},Se:function(){return c},mg:function(){return p}});a(44114),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698),a(62953);var i=a(22675),o=a(68287),r=a(86030),s=a(80880);var n=a(71727),l=a(47129);const d=new Set(["alarm_control_panel","alert","automation","binary_sensor","calendar","camera","climate","cover","device_tracker","fan","group","humidifier","input_boolean","lawn_mower","light","lock","media_player","person","plant","remote","schedule","script","siren","sun","switch","timer","update","vacuum","valve","water_heater","weather"]),c=(t,e)=>{if((void 0!==e?e:null==t?void 0:t.state)===i.Hh)return"var(--state-unavailable-color)";const a=p(t,e);return a?(0,r.B)(a):void 0},h=(t,e,a)=>{const i=void 0!==a?a:e.state,o=(0,l.a)(e,a);return u(t,e.attributes.device_class,i,o)},u=(t,e,a,i)=>{const o=[],r=(0,s.Y)(a,"_"),n=i?"active":"inactive";return e&&o.push(`--state-${t}-${e}-${r}-color`),o.push(`--state-${t}-${r}-color`,`--state-${t}-${n}-color`,`--state-${n}-color`),o},p=(t,e)=>{const a=void 0!==e?e:null==t?void 0:t.state,i=(0,n.m)(t.entity_id),r=t.attributes.device_class;if("sensor"===i&&"battery"===r){const t=(t=>{const e=Number(t);if(!isNaN(e))return e>=70?"--state-sensor-battery-high-color":e>=30?"--state-sensor-battery-medium-color":"--state-sensor-battery-low-color"})(a);if(t)return[t]}if("group"===i){const a=(0,o.z)(t);if(a&&d.has(a))return h(a,t,e)}if(d.has(i))return h(i,t,e)},f=t=>{if(t.attributes.brightness&&"plant"!==(0,n.m)(t.entity_id)){return`brightness(${(t.attributes.brightness+245)/5}%)`}return""}},82286:function(t,e,a){a.d(e,{$:function(){return i}});const i=(t,e)=>o(t.attributes,e),o=(t,e)=>0!==(t.supported_features&e)},20058:function(t,e,a){a.a(t,async function(t,i){try{a.d(e,{QL:function(){return h},ZQ:function(){return u},ZV:function(){return c},ty:function(){return l},x:function(){return n}});var o=a(74487),r=(a(74423),a(18111),a(61701),a(46927)),s=t([o]);o=(s.then?(await s)():s)[0];const n=t=>l(t.attributes),l=(t,e)=>!!t.unit_of_measurement||!!t.state_class||(e||[]).includes(t.device_class||""),d=t=>{switch(t.number_format){case r.jG.comma_decimal:return["en-US","en"];case r.jG.decimal_comma:return["de","es","it"];case r.jG.space_comma:return["fr","sv","cs"];case r.jG.quote_decimal:return["de-CH"];case r.jG.system:return;default:return t.language}},c=(t,e,a)=>h(t,e,a).map(t=>t.value).join(""),h=(t,e,a)=>{const i=e?d(e):void 0;return(null==e?void 0:e.number_format)===r.jG.none||Number.isNaN(Number(t))?Number.isNaN(Number(t))||""===t||(null==e?void 0:e.number_format)!==r.jG.none?[{type:"literal",value:t}]:new Intl.NumberFormat("en-US",p(t,Object.assign(Object.assign({},a),{},{useGrouping:!1}))).formatToParts(Number(t)):new Intl.NumberFormat(i,p(t,a)).formatToParts(Number(t))},u=(t,e)=>{var a;const i=null==e?void 0:e.display_precision;return null!=i?{maximumFractionDigits:i,minimumFractionDigits:i}:Number.isInteger(Number(null==t||null===(a=t.attributes)||void 0===a?void 0:a.step))&&Number.isInteger(Number(null==t?void 0:t.state))?{maximumFractionDigits:0}:void 0},p=(t,e)=>{const a=Object.assign({maximumFractionDigits:2},e);if("string"!=typeof t)return a;if(!e||void 0===e.minimumFractionDigits&&void 0===e.maximumFractionDigits){const e=t.indexOf(".")>-1?t.split(".")[1].length:0;a.minimumFractionDigits=e,a.maximumFractionDigits=e}return a};i()}catch(n){i(n)}})},80880:function(t,e,a){a.d(e,{Y:function(){return i}});a(84864),a(57465),a(27495),a(25440);const i=(t,e="_")=>{const a="àáâäæãåāăąабçćčđďдèéêëēėęěеёэфğǵгḧхîïíīįìıİийкłлḿмñńǹňнôöòóœøōõőоṕпŕřрßśšşșсťțтûüùúūǘůűųувẃẍÿýыžźżз·",i=`aaaaaaaaaaabcccdddeeeeeeeeeeefggghhiiiiiiiiijkllmmnnnnnoooooooooopprrrsssssstttuuuuuuuuuuvwxyyyzzzz${e}`,o=new RegExp(a.split("").join("|"),"g"),r={"ж":"zh","х":"kh","ц":"ts","ч":"ch","ш":"sh","щ":"shch","ю":"iu","я":"ia"};let s;return""===t?s="":(s=t.toString().toLowerCase().replace(o,t=>i.charAt(a.indexOf(t))).replace(/[а-я]/g,t=>r[t]||"").replace(/(\d),(?=\d)/g,"$1").replace(/[^a-z0-9]+/g,e).replace(new RegExp(`(${e})\\1+`,"g"),"$1").replace(new RegExp(`^${e}+`),"").replace(new RegExp(`${e}+$`),""),""===s&&(s="unknown")),s}},34470:function(t,e,a){a.d(e,{E:function(){return o}});let i;const o=(0,a(5124).AH)(i||(i=(t=>t)`ha-state-icon[data-domain=alarm_control_panel][data-state=arming],ha-state-icon[data-domain=alarm_control_panel][data-state=pending],ha-state-icon[data-domain=alarm_control_panel][data-state=triggered],ha-state-icon[data-domain=lock][data-state=jammed]{animation:pulse 1s infinite}@keyframes pulse{0%{opacity:1}50%{opacity:0}100%{opacity:1}}ha-state-icon[data-state=unavailable]{color:var(--state-unavailable-color)}`))},60353:function(t,e,a){a.d(e,{u:function(){return i}});class i{start(t){const e=Date.now();this._startY=t,this._startTime=e,this._lastY=t,this._lastTime=e,this._delta=0}move(t){const e=Date.now();return this._delta=this._startY-t,this._lastY=t,this._lastTime=e,this._delta}end(){const t=this.getVelocity(),e=Math.abs(t)>this._velocityThreshold;return{velocity:t,delta:this._delta,isSwipe:e,isDownwardSwipe:t>0}}getDelta(){return this._delta}getVelocity(){if(Date.now()-this._lastTime>=this._movementTimeThreshold)return 0;const t=this._lastTime-this._startTime;return t>0?(this._lastY-this._startY)/t:0}reset(){this._startY=0,this._delta=0,this._startTime=0,this._lastY=0,this._lastTime=0}constructor(t={}){var e,a;this._startY=0,this._delta=0,this._startTime=0,this._lastY=0,this._lastTime=0,this._velocityThreshold=null!==(e=t.velocitySwipeThreshold)&&void 0!==e?e:.5,this._movementTimeThreshold=null!==(a=t.movementTimeThreshold)&&void 0!==a?a:100}}},3931:function(t,e,a){a.d(e,{U:function(){return i}});a(3362),a(62953);const i=async(t,e,a,i,o,...r)=>{let s=i[t];s||(s=i[t]={});const n=s[o];if(n)return n;const l=a(i,o,...r);return s[o]=l,l.then(()=>setTimeout(()=>{s[o]=void 0},e),()=>{s[o]=void 0}),l}},64481:function(t,e,a){a.d(e,{D:function(){return o},J:function(){return s}});a(16280),a(3362),a(55815),a(64979),a(79739);let i=!1;try{i="true"===window.localStorage.getItem("disableViewTransition")}catch(n){}const o=t=>{i=t},r=t=>{if(!(t=>(t instanceof DOMException||t instanceof Error)&&"AbortError"===t.name)(t))throw t},s=t=>{if(!document.startViewTransition||i)return t(!1),Promise.resolve();let e=!1;try{const a=document.startViewTransition(()=>{e=!0,t(!0)});return a.ready.catch(r),a.finished.catch(r)}catch(a){return console.warn("View transition failed, falling back to direct execution.",a),e?Promise.reject(a):(t(!1),Promise.resolve())}}},5745:function(t,e,a){var i=a(40445),o=a(99731),r=a(67576);class s extends o.Y{}s=(0,i.Cg)([(0,r.EM)("ha-chip-set")],s)},74281:function(t,e,a){a.a(t,async function(t,e){try{a(18111),a(7588),a(45367),a(92731),a(62953);var i=a(40445),o=a(5124),r=a(67576),s=a(63672),n=a(89784),l=a(71727),d=a(69093),c=a(52658),h=a(34470),u=a(10897),p=a(38279),f=a(93367),m=t([f]);f=(m.then?(await m)():m)[0];let v,g,b,y=t=>t;const _="M13 14H11V9H13M13 18H11V16H13M1 21H23L12 2L1 21Z";class w extends o.WF{connectedCallback(){var t,e;super.connectedCallback(),this.hasUpdated&&void 0===this.overrideImage&&(null!==(t=this.stateObj)&&void 0!==t&&t.attributes.entity_picture||null!==(e=this.stateObj)&&void 0!==e&&e.attributes.entity_picture_local)&&this.requestUpdate("stateObj")}disconnectedCallback(){var t,e;super.disconnectedCallback(),void 0===this.overrideImage&&(null!==(t=this.stateObj)&&void 0!==t&&t.attributes.entity_picture||null!==(e=this.stateObj)&&void 0!==e&&e.attributes.entity_picture_local)&&(this.style.backgroundImage="")}get _stateColor(){var t;const e=this.stateObj?(0,d.t)(this.stateObj):void 0;return null!==(t=this.stateColor)&&void 0!==t?t:"light"===e}render(){const t=this.stateObj;if(!t&&!this.overrideIcon&&!this.overrideImage)return(0,o.qy)(v||(v=y`<div class="missing"> <ha-svg-icon .path="${0}"></ha-svg-icon> </div>`),_);const e=this.getClass();if(e&&e.forEach((t,e)=>{t?this.classList.add(e):this.classList.remove(e)}),!this.icon)return o.s6;const a=t?(0,d.t)(t):void 0;return(0,o.qy)(g||(g=y`<ha-state-icon style="${0}" data-domain="${0}" data-state="${0}" .icon="${0}" .stateObj="${0}"></ha-state-icon>`),(0,n.W)(this._iconStyle),(0,s.J)(a),(0,s.J)(null==t?void 0:t.state),this.overrideIcon,t)}willUpdate(t){if(super.willUpdate(t),!(t.has("stateObj")||t.has("overrideImage")||t.has("overrideIcon")||t.has("stateColor")||t.has("color")))return;const e=this.stateObj,a={};let i="";if(this.icon=!0,e){const t=(0,l.m)(e.entity_id);if(void 0===this.overrideImage)if(!e.attributes.entity_picture_local&&!e.attributes.entity_picture||this.overrideIcon){if(this.color)a.color=this.color;else if(this._stateColor){const t=(0,c.Se)(e);if(t&&(a.color=t),e.attributes.rgb_color&&(a.color=`rgb(${e.attributes.rgb_color.join(",")})`),e.attributes.brightness){const t=e.attributes.brightness;if("number"!=typeof t){const a=`Type error: state-badge expected number, but type of ${e.entity_id}.attributes.brightness is ${typeof t} (${t})`;console.warn(a)}a.filter=(0,c.mT)(e)}if(e.attributes.hvac_action){const t=e.attributes.hvac_action;t in p.sx?a.color=(0,c.Se)(e,p.sx[t]):delete a.color}}}else{let a=e.attributes.entity_picture_local||e.attributes.entity_picture;this.hass&&(a=this.hass.hassUrl(a)),"camera"===t&&(a=(0,u.su)(a,80,80)),i=`url(${a})`,this.icon=!1}else if(this.overrideImage){let t=this.overrideImage;this.hass&&(t=this.hass.hassUrl(t)),i=`url(${t})`,this.icon=!1}}this._iconStyle=a,this.style.backgroundImage=i}getClass(){const t=new Map(["has-no-radius","has-media-image","has-image"].map(t=>[t,!1]));if(this.stateObj){const e=(0,l.m)(this.stateObj.entity_id);"update"===e?t.set("has-no-radius",!0):"media_player"===e||"camera"===e?t.set("has-media-image",!0):""!==this.style.backgroundImage&&t.set("has-image",!0)}return t}static get styles(){return[h.E,(0,o.AH)(b||(b=y`:host{position:relative;display:inline-flex;width:40px;color:var(--state-icon-color);border-radius:var(--state-badge-border-radius,50%);height:40px;background-size:cover;box-sizing:border-box;--state-inactive-color:initial;align-items:center;justify-content:center}:host(.has-image){border-radius:var(--state-badge-with-image-border-radius,50%)}:host(.has-media-image){border-radius:var(--state-badge-with-media-image-border-radius,8%)}:host(.has-no-radius){border-radius:var(--ha-border-radius-square)}:host(:focus){outline:0}:host(:not([icon]):focus){border:2px solid var(--divider-color)}:host([icon]:focus){background:var(--divider-color)}ha-state-icon{transition:color .3s ease-in-out,filter .3s ease-in-out}.missing{color:#fce588}`))]}constructor(...t){super(...t),this.icon=!0,this._iconStyle={}}}(0,i.Cg)([(0,r.MZ)({attribute:!1})],w.prototype,"stateObj",void 0),(0,i.Cg)([(0,r.MZ)({attribute:!1})],w.prototype,"overrideIcon",void 0),(0,i.Cg)([(0,r.MZ)({attribute:!1})],w.prototype,"overrideImage",void 0),(0,i.Cg)([(0,r.MZ)({attribute:!1})],w.prototype,"stateColor",void 0),(0,i.Cg)([(0,r.MZ)()],w.prototype,"color",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],w.prototype,"icon",void 0),(0,i.Cg)([(0,r.wk)()],w.prototype,"_iconStyle",void 0),w=(0,i.Cg)([(0,r.EM)("state-badge")],w),e()}catch(v){e(v)}})},14693:function(t,e,a){a.a(t,async function(t,i){try{a.d(e,{r:function(){return M}});a(62953);var o=a(40445),r=a(35211),s=a(5124),n=a(67576),l=a(71769),d=a(22792),c=a(99611),h=(a(76538),a(26300)),u=a(72554),p=t([c,h,u]);[c,h,u]=p.then?(await p)():p;let f,m,v,g,b,y,_,w,C,x,$,k=t=>t;const L="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",S="(max-width: 870px), (max-height: 500px)";class M extends s.WF{connectedCallback(){super.connectedCallback(),this._unsubMediaQuery=(0,l.m)(S,t=>{this._modeSet&&!this.allowModeChange||(this.mode=t?"bottom-sheet":"dialog",this._modeSet=!0)})}get _defaultAriaLabelledBy(){return this.ariaLabelledBy||(void 0!==this.headerTitle?"ha-dialog-title":void 0)}_renderCloseButton(t){var e,a,i;return this.hideCloseButton?(0,s.qy)(f||(f=k`<span slot="${0}"></span>`),t):(0,s.qy)(m||(m=k` <slot name="headerNavigationIcon" slot="${0}"> <ha-icon-button data-dialog="close" .label="${0}" .path="${0}"></ha-icon-button> </slot> `),t,null!==(e=null===(a=this._i18n)||void 0===a||null===(i=a.localize)||void 0===i?void 0:i.call(a,"ui.common.close"))&&void 0!==e?e:"Close",L)}_renderHeaderContent(){return(0,s.qy)(v||(v=k` <ha-dialog-header .subtitlePosition="${0}"> ${0} ${0} ${0} <slot name="headerActionItems" slot="actionItems"></slot> </ha-dialog-header> `),this.headerSubtitlePosition,this._renderCloseButton("navigationIcon"),void 0!==this.headerTitle?(0,s.qy)(g||(g=k`<span slot="title" class="title" id="ha-dialog-title"> ${0} </span>`),this.headerTitle):(0,s.qy)(b||(b=k`<slot name="headerTitle" slot="title"></slot>`)),void 0!==this.headerSubtitle?(0,s.qy)(y||(y=k`<span slot="subtitle">${0}</span>`),this.headerSubtitle):(0,s.qy)(_||(_=k`<slot name="headerSubtitle" slot="subtitle"></slot>`)))}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._unsubMediaQuery)||void 0===t||t.call(this),this._unsubMediaQuery=void 0,this._modeSet=!1}render(){return"bottom-sheet"===this.mode?(0,s.qy)(w||(w=k` <ha-bottom-sheet .ariaLabelledBy="${0}" .ariaDescribedBy="${0}" .flexContent="${0}" .open="${0}" .preventScrimClose="${0}"> ${0} <slot></slot> <slot name="footer" slot="footer"></slot> </ha-bottom-sheet> `),this._defaultAriaLabelledBy,this.ariaDescribedBy,this.flexContent,this.open,this.preventScrimClose,this.withoutHeader?s.s6:(0,s.qy)(C||(C=k` <slot name="header" slot="header">${0}</slot> `),this._renderHeaderContent())):(0,s.qy)(x||(x=k` <ha-dialog .open="${0}" .type="${0}" .width="${0}" .preventScrimClose="${0}" .ariaLabelledBy="${0}" .ariaDescribedBy="${0}" .headerTitle="${0}" .headerSubtitle="${0}" .headerSubtitlePosition="${0}" .flexContent="${0}" .withoutHeader="${0}"> ${0} <slot name="headerTitle" slot="headerTitle"></slot> <slot name="headerSubtitle" slot="headerSubtitle"></slot> <slot name="headerActionItems" slot="headerActionItems"></slot> <slot></slot> <slot name="footer" slot="footer"></slot> </ha-dialog> `),this.open,this.type,this.width,this.preventScrimClose,this.ariaLabelledBy,this.ariaDescribedBy,this.headerTitle,this.headerSubtitle,this.headerSubtitlePosition,this.flexContent,this.withoutHeader,this._renderCloseButton("headerNavigationIcon"))}static get styles(){return[(0,s.AH)($||($=k`ha-bottom-sheet{--ha-bottom-sheet-border-radius:var(--ha-border-radius-2xl);--ha-bottom-sheet-surface-background:var(
            --ha-dialog-surface-background,
            var(--card-background-color, var(--ha-color-surface-default))
          );--ha-bottom-sheet-padding:0 var(--safe-area-inset-right) var(--safe-area-inset-bottom) var(--safe-area-inset-left);--ha-bottom-sheet-content-padding:var(
            --dialog-content-padding,
            0 var(--ha-space-6) var(--ha-space-6) var(--ha-space-6)
          )}`))]}constructor(...t){super(...t),this.open=!1,this.type="standard",this.width="medium",this.preventScrimClose=!1,this.headerSubtitlePosition="below",this.allowModeChange=!1,this.withoutHeader=!1,this.hideCloseButton=!1,this.flexContent=!1,this.mode="dialog",this._modeSet=!1}}(0,o.Cg)([(0,n.MZ)({attribute:"aria-labelledby"})],M.prototype,"ariaLabelledBy",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"aria-describedby"})],M.prototype,"ariaDescribedBy",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],M.prototype,"open",void 0),(0,o.Cg)([(0,n.MZ)({reflect:!0})],M.prototype,"type",void 0),(0,o.Cg)([(0,n.MZ)({type:String,reflect:!0,attribute:"width"})],M.prototype,"width",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],M.prototype,"preventScrimClose",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"header-title"})],M.prototype,"headerTitle",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"header-subtitle"})],M.prototype,"headerSubtitle",void 0),(0,o.Cg)([(0,n.MZ)({type:String,attribute:"header-subtitle-position"})],M.prototype,"headerSubtitlePosition",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,attribute:"allow-mode-change"})],M.prototype,"allowModeChange",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,attribute:"without-header"})],M.prototype,"withoutHeader",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,attribute:"hide-close-button"})],M.prototype,"hideCloseButton",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],M.prototype,"flexContent",void 0),(0,o.Cg)([(0,n.wk)()],M.prototype,"mode",void 0),(0,o.Cg)([(0,n.wk)(),(0,r.Fg)({context:d.D5,subscribe:!0})],M.prototype,"_i18n",void 0),M=(0,o.Cg)([(0,n.EM)("ha-adaptive-dialog")],M),i()}catch(f){i(f)}})},99611:function(t,e,a){a.a(t,async function(t,e){try{a(18111),a(13579),a(3362),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698),a(62953);var i=a(40445),o=a(1126),r=a(35211),s=a(5124),n=a(67576),l=a(1087),d=a(60353),c=a(22792),h=a(59992),u=a(14503),p=a(22348),f=t([o,h]);[o,h]=f.then?(await f)():f;let m,v,g=t=>t;const b=300,y=new Set(["ha-control-slider","ha-slider","ha-control-switch","ha-control-circular-slider","ha-hs-color-picker","ha-map","ha-more-info-control-select-container","ha-filter-chip"]),_=new Set(["volume-slider-container","forecast"]);class w extends((0,h.V)(s.WF)){get scrollableElement(){return this._bodyElement}connectedCallback(){super.connectedCallback(),this.addEventListener("slider-interaction-start",this._handleSliderInteractionStart,{capture:!0}),this.addEventListener("slider-interaction-stop",this._handleSliderInteractionStop,{capture:!0})}updated(t){super.updated(t),t.has("open")&&(this._drawerOpen=this.open)}render(){return(0,s.qy)(m||(m=g` <wa-drawer id="drawer" placement="bottom" .open="${0}" .lightDismiss="${0}" .ariaLabelledby="${0}" .ariaDescribedby="${0}" @keydown="${0}" @wa-show="${0}" @wa-after-show="${0}" @wa-hide="${0}" @wa-after-hide="${0}" @click="${0}" without-header @touchstart="${0}"> <div class="handle-wrapper" aria-hidden="true"> <div class="handle"></div> </div> <slot name="header"></slot> <div class="content-wrapper"> <div id="body" class="body ha-scrollbar"> <slot></slot> </div> ${0} </div> <slot name="footer"></slot> </wa-drawer> `),this._drawerOpen,!this.preventScrimClose,this.ariaLabelledBy,this.ariaDescribedBy,this._handleKeyDown,this._handleShow,this._handleAfterShow,this._handleHide,this._handleAfterHide,this._handleCloseAction,this._handleTouchStart,this.renderScrollableFades())}_startResizing(t){document.addEventListener("touchmove",this._handleTouchMove,{passive:!1}),document.addEventListener("touchend",this._handleTouchEnd),document.addEventListener("touchcancel",this._handleTouchEnd),this._gestureRecognizer.start(t)}_animateSnapBack(){this.style.setProperty("--dialog-transition",`transform ${b}ms ease-out`),this.style.removeProperty("--dialog-transform"),setTimeout(()=>{this.style.removeProperty("--dialog-transition")},b)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("slider-interaction-start",this._handleSliderInteractionStart,{capture:!0}),this.removeEventListener("slider-interaction-stop",this._handleSliderInteractionStop,{capture:!0}),this._unregisterResizeHandlers(),this._isDragging=!1}static get styles(){return[...super.styles,u.dp,(0,s.AH)(v||(v=g`wa-drawer{--wa-color-surface-raised:transparent;--spacing:0;--size:var(--ha-bottom-sheet-height, auto);--show-duration:${0}ms;--hide-duration:${0}ms}wa-drawer::part(dialog){max-height:min(var(--ha-bottom-sheet-max-height,90vh),calc(100vh - max(var(--safe-area-inset-top),48px)));max-height:min(var(--ha-bottom-sheet-max-height,90dvh),calc(100dvh - max(var(--safe-area-inset-top),48px)));align-items:center;transform:var(--dialog-transform);transition:var(--dialog-transition)}@media (prefers-reduced-motion:reduce){wa-drawer{--wa-color-surface-raised:transparent;--spacing:0;--size:var(--ha-bottom-sheet-height, auto);--show-duration:1ms;--hide-duration:1ms}wa-drawer::part(dialog){transition:1ms}}wa-drawer::part(dialog)::backdrop{-webkit-backdrop-filter:var(--ha-bottom-sheet-scrim-backdrop-filter,var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none)));backdrop-filter:var(--ha-bottom-sheet-scrim-backdrop-filter,var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none)));background-color:var(--ha-bottom-sheet-scrim-color,var(--mdc-dialog-scrim-color,none))}wa-drawer::part(body){max-width:var(--ha-bottom-sheet-max-width);width:100%;position:relative;border-top-left-radius:var(--ha-bottom-sheet-border-radius,var(--ha-dialog-border-radius,var(--ha-border-radius-2xl)));border-top-right-radius:var(--ha-bottom-sheet-border-radius,var(--ha-dialog-border-radius,var(--ha-border-radius-2xl)));background-color:var(--ha-bottom-sheet-surface-background,var(--ha-dialog-surface-background,var(--card-background-color,var(--ha-color-surface-default))));-webkit-backdrop-filter:var(--ha-bottom-sheet-surface-backdrop-filter,var(--ha-dialog-surface-backdrop-filter,none));backdrop-filter:var(--ha-bottom-sheet-surface-backdrop-filter,var(--ha-dialog-surface-backdrop-filter,none));padding:var(--ha-bottom-sheet-padding,0 var(--safe-area-inset-right) var(--safe-area-inset-bottom) var(--safe-area-inset-left))}:host([flexcontent]) wa-drawer::part(body){display:flex;flex-direction:column}:host([prevent-scrim-close]) .handle-wrapper{display:none}.handle-wrapper{position:absolute;top:0;inset-inline-start:0;width:100%;padding-bottom:2px;display:flex;justify-content:center;align-items:center;pointer-events:none;z-index:1}.handle-wrapper .handle{height:16px;width:200px;display:flex;justify-content:center;align-items:center}.handle-wrapper .handle::after{content:"";border-radius:var(--ha-border-radius-md);height:4px;background:var(--ha-bottom-sheet-handle-color,var(--divider-color));width:40px}.content-wrapper{position:relative;flex:1;display:flex;flex-direction:column;min-height:0}.body{padding:var(--ha-bottom-sheet-content-padding,0);box-sizing:border-box}:host([flexcontent]) .body{flex:1;max-width:100%;display:flex;flex-direction:column;padding:var(--ha-bottom-sheet-content-padding,var(--ha-bottom-sheet-padding,0 var(--safe-area-inset-right) var(--safe-area-inset-bottom) var(--safe-area-inset-left)));box-sizing:border-box}slot[name=footer]{display:block;padding:0}::slotted([slot=footer]){display:flex;padding:var(--ha-space-3) var(--ha-space-4) var(--ha-space-4) var(--ha-space-4);gap:var(--ha-space-3);justify-content:flex-end;align-items:center;width:100%;box-sizing:border-box}:host([flexcontent]) slot[name=footer]{flex-shrink:0}`),b,b)]}constructor(...t){super(...t),this.open=!1,this.flexContent=!1,this.preventScrimClose=!1,this._drawerOpen=!1,this._sliderInteractionActive=!1,this._gestureRecognizer=new d.u,this._isDragging=!1,this._escapePressed=!1,this._handleShow=async()=>{this._drawerOpen=!0,this.open=!0,(0,l.r)(this,"opened"),await this.updateComplete,requestAnimationFrame(()=>{var t;const e=this._autofocusElement;null!==(t=this._hassConfig)&&void 0!==t&&t.auth.external&&(0,p.V)(this._hassConfig.auth.external)?e&&(e.id||(e.id="ha-bottom-sheet-autofocus"),this._hassConfig.auth.external.fireMessage({type:"focus_element",payload:{element_id:e.id}})):null==e||e.focus()})},this._handleAfterShow=()=>{(0,l.r)(this,"after-show")},this._handleSliderInteractionStart=()=>{this._sliderInteractionActive=!0},this._handleSliderInteractionStop=()=>{this._sliderInteractionActive=!1},this._handleAfterHide=t=>{if(this._sliderInteractionActive)return this._drawerOpen=!0,void(this.open=!0);t.eventPhase===Event.AT_TARGET&&(this.open=!1,this._drawerOpen=!1,(0,l.r)(this,"closed"))},this._handleHide=t=>{if(t.eventPhase!==Event.AT_TARGET)return;const e=t.detail.source===t.target.drawer;if(this._sliderInteractionActive)return t.preventDefault(),this._drawerOpen=!0,this.open=!0,void(this._escapePressed=!1);this.preventScrimClose&&this._escapePressed&&e&&t.preventDefault(),this._escapePressed=!1},this._handleKeyDown=t=>{"Escape"===t.key&&(this._escapePressed=!0,this.preventScrimClose&&t.preventDefault(),t.stopPropagation(),t.currentTarget.open=!1)},this._handleCloseAction=t=>{t.composedPath().some(t=>t instanceof HTMLElement&&("close"===t.getAttribute("data-dialog")||"close"===t.getAttribute("data-drawer")))&&(this._drawerOpen=!1)},this._handleTouchStart=t=>{if(this.preventScrimClose)return;const e=t.composedPath();for(const a of e){if(a===this._drawer)break;if(a instanceof HTMLElement&&(a.scrollTop>0||y.has(a.localName)||Array.from(a.classList).some(t=>_.has(t))))return}t.stopPropagation(),this._startResizing(t.touches[0].clientY)},this._handleTouchMove=t=>{const e=t.touches[0].clientY,a=this._gestureRecognizer.move(e);a<0&&(t.preventDefault(),this._isDragging=!0,requestAnimationFrame(()=>{this._isDragging&&this.style.setProperty("--dialog-transform",`translateY(${-1*a}px)`)}))},this._handleTouchEnd=()=>{var t;this._unregisterResizeHandlers(),this._isDragging=!1;const e=this._gestureRecognizer.end();if(e.isSwipe)return void(e.isDownwardSwipe?this._drawerOpen=!1:this._animateSnapBack());const a=null===(t=this._drawer.shadowRoot)||void 0===t?void 0:t.querySelector('[part="body"]'),i=(null==a?void 0:a.offsetHeight)||0;i>0&&e.delta<0&&Math.abs(e.delta)>.5*i?this._drawerOpen=!1:this._animateSnapBack()},this._unregisterResizeHandlers=()=>{document.removeEventListener("touchmove",this._handleTouchMove),document.removeEventListener("touchend",this._handleTouchEnd),document.removeEventListener("touchcancel",this._handleTouchEnd)}}}(0,i.Cg)([(0,n.MZ)({attribute:"aria-labelledby"})],w.prototype,"ariaLabelledBy",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"aria-describedby"})],w.prototype,"ariaDescribedBy",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],w.prototype,"open",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],w.prototype,"flexContent",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],w.prototype,"preventScrimClose",void 0),(0,i.Cg)([(0,n.wk)()],w.prototype,"_drawerOpen",void 0),(0,i.Cg)([(0,n.wk)()],w.prototype,"_sliderInteractionActive",void 0),(0,i.Cg)([(0,n.wk)(),(0,r.Fg)({context:c.WF,subscribe:!0})],w.prototype,"_hassConfig",void 0),(0,i.Cg)([(0,n.P)("#drawer")],w.prototype,"_drawer",void 0),(0,i.Cg)([(0,n.P)("#body")],w.prototype,"_bodyElement",void 0),(0,i.Cg)([(0,n.P)("[autofocus]")],w.prototype,"_autofocusElement",void 0),w=(0,i.Cg)([(0,n.EM)("ha-bottom-sheet")],w),e()}catch(m){e(m)}})},76538:function(t,e,a){a(62953);var i=a(40445),o=a(5124),r=a(67576);let s,n,l,d,c,h,u=t=>t;class p extends o.WF{render(){const t=(0,o.qy)(s||(s=u`<div class="header-title"> <slot name="title"></slot> </div>`)),e=(0,o.qy)(n||(n=u`<div class="header-subtitle"> <slot name="subtitle"></slot> </div>`));return(0,o.qy)(l||(l=u` <header class="header"> <div class="header-bar"> <section class="header-navigation-icon"> <slot name="navigationIcon"></slot> </section> <section class="header-content"> ${0} </section> <section class="header-action-items"> <slot name="actionItems"></slot> </section> </div> <slot></slot> </header> `),"above"===this.subtitlePosition?(0,o.qy)(d||(d=u`${0}${0}`),e,t):(0,o.qy)(c||(c=u`${0}${0}`),t,e))}static get styles(){return[(0,o.AH)(h||(h=u`:host{display:block}:host([show-border]){border-bottom:1px solid var(--mdc-dialog-scroll-divider-color,rgba(0,0,0,.12))}.header-bar{display:flex;flex-direction:row;align-items:center;padding:0 var(--ha-space-1);box-sizing:border-box}.header-content{flex:1;padding:10px var(--ha-space-1);display:flex;flex-direction:column;justify-content:center;min-height:var(--ha-space-12);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.header-title{height:var(--ha-dialog-header-title-height,calc(var(--ha-font-size-xl) + var(--ha-space-1)));font-size:var(--ha-font-size-xl);line-height:var(--ha-line-height-condensed);font-weight:var(--ha-font-weight-medium);color:var(--ha-dialog-header-title-color,var(--primary-text-color))}.header-subtitle{font-size:var(--ha-font-size-m);line-height:var(--ha-line-height-normal);color:var(--ha-dialog-header-subtitle-color,var(--secondary-text-color))}@media all and (min-width:450px) and (min-height:500px){.header-bar{padding:0 var(--ha-space-2)}}.header-navigation-icon{flex:none;min-width:var(--ha-space-2);height:100%;display:flex;flex-direction:row}.header-action-items{flex:none;min-width:var(--ha-space-2);height:100%;display:flex;flex-direction:row}`))]}constructor(...t){super(...t),this.subtitlePosition="below",this.showBorder=!1}}(0,i.Cg)([(0,r.MZ)({type:String,attribute:"subtitle-position"})],p.prototype,"subtitlePosition",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean,reflect:!0,attribute:"show-border"})],p.prototype,"showBorder",void 0),p=(0,i.Cg)([(0,r.EM)("ha-dialog-header")],p)},72554:function(t,e,a){a.a(t,async function(t,e){try{a(3362),a(62953),a(49255);var i=a(40445),o=a(93900),r=a(35211),s=a(5124),n=a(67576),l=a(63672),d=a(1087),c=a(64481),h=a(22792),u=a(59992),p=a(14503),f=a(22348),m=(a(76538),a(26300)),v=t([o,m,u]);[o,m,u]=v.then?(await v)():v;let g,b,y,_,w,C,x,$=t=>t;const k="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z";class L extends((0,u.V)(s.WF)){connectedCallback(){super.connectedCallback(),this.addEventListener("dialog-set-fullscreen",this._handleFullscreenChanged)}get scrollableElement(){return this.bodyContainer}updated(t){super.updated(t),t.has("open")&&(this._open=this.open)}render(){var t,e,a;return(0,s.qy)(g||(g=$` <wa-dialog .open="${0}" .lightDismiss="${0}" without-header aria-labelledby="${0}" aria-describedby="${0}" @keydown="${0}" @wa-hide="${0}" @wa-show="${0}" @wa-after-show="${0}" @wa-after-hide="${0}"> ${0} <div class="content-wrapper"> <div class="body ha-scrollbar" @scroll="${0}"> <slot></slot> </div> ${0} </div> <slot name="footer" slot="footer"></slot> </wa-dialog> `),this._open,!this.preventScrimClose,(0,l.J)(this.ariaLabelledBy||(void 0!==this.headerTitle?"ha-dialog-title":void 0)),(0,l.J)(this.ariaDescribedBy),this._handleKeyDown,this._handleHide,this._handleShow,this._handleAfterShow,this._handleAfterHide,this.withoutHeader?s.s6:(0,s.qy)(b||(b=$`<slot name="header"> <ha-dialog-header .subtitlePosition="${0}" .showBorder="${0}"> <slot name="headerNavigationIcon" slot="navigationIcon"> <ha-icon-button data-dialog="close" .label="${0}" .path="${0}"></ha-icon-button> </slot> ${0} ${0} <slot name="headerActionItems" slot="actionItems"></slot> </ha-dialog-header> </slot>`),this.headerSubtitlePosition,this._bodyScrolled,null!==(t=null===(e=this._i18n)||void 0===e||null===(a=e.localize)||void 0===a?void 0:a.call(e,"ui.common.close"))&&void 0!==t?t:"Close",k,void 0!==this.headerTitle?(0,s.qy)(y||(y=$`<span slot="title" class="title" id="ha-dialog-title"> ${0} </span>`),this.headerTitle):(0,s.qy)(_||(_=$`<slot name="headerTitle" slot="title"></slot>`)),void 0!==this.headerSubtitle?(0,s.qy)(w||(w=$`<span slot="subtitle">${0}</span>`),this.headerSubtitle):(0,s.qy)(C||(C=$`<slot name="headerSubtitle" slot="subtitle"></slot>`))),this._handleBodyScroll,this.renderScrollableFades())}disconnectedCallback(){this.removeEventListener("dialog-set-fullscreen",this._handleFullscreenChanged),this._setFullscreen(!1),super.disconnectedCallback(),this._open=!1}_handleFullscreenChanged(t){this._open?(0,c.J)(()=>{this._setFullscreen(t.detail)}):this._setFullscreen(t.detail)}_setFullscreen(t){this.toggleAttribute("fullscreen",t)}_handleBodyScroll(t){this._bodyScrolled=t.target.scrollTop>0}_handleKeyDown(t){"Escape"===t.key&&(this._escapePressed=!0,this.preventScrimClose&&t.preventDefault(),t.stopPropagation(),t.currentTarget.open=!1)}_handleHide(t){var e;const a=(null===(e=t.detail)||void 0===e?void 0:e.source)===t.target.dialog;this.preventScrimClose&&this._escapePressed&&a&&t.preventDefault(),this._escapePressed=!1}static get styles(){return[...super.styles,p.dp,(0,s.AH)(x||(x=$`wa-dialog{--full-width:var(
            --ha-dialog-width-full,
            min(95vw, var(--safe-width))
          );--width:min(var(--ha-dialog-width-md, 580px), var(--full-width));--spacing:var(--dialog-content-padding, var(--ha-space-6));--show-duration:var(--ha-dialog-show-duration, 200ms);--hide-duration:var(--ha-dialog-hide-duration, 200ms);--wa-color-surface-raised:var(
            --ha-dialog-surface-background,
            var(--card-background-color, var(--ha-color-surface-default))
          );--wa-panel-border-radius:var(
            --ha-dialog-border-radius,
            var(--ha-border-radius-3xl)
          );max-width:var(--ha-dialog-max-width,var(--safe-width))}@media (prefers-reduced-motion:reduce){wa-dialog{--show-duration:0ms;--hide-duration:0ms}}:host([width=small]) wa-dialog{--width:min(var(--ha-dialog-width-sm, 320px), var(--full-width))}:host([width=large]) wa-dialog{--width:min(var(--ha-dialog-width-lg, 1024px), var(--full-width))}:host([fullscreen]) wa-dialog,:host([width=full]) wa-dialog{--width:var(--full-width)}:host([fullscreen]) wa-dialog::part(dialog){min-height:var(--safe-height);max-height:var(--safe-height);margin-top:0;transform:none}:host([fullscreen]) .content-wrapper{overflow:hidden}:host([fullscreen]) .body{overflow:hidden;padding:0}wa-dialog::part(dialog){-webkit-backdrop-filter:var(--ha-dialog-surface-backdrop-filter,none);backdrop-filter:var(--ha-dialog-surface-backdrop-filter,none);box-shadow:var(--dialog-box-shadow,var(--wa-shadow-l));color:var(--primary-text-color);min-width:var(--width,var(--full-width));max-width:var(--width,var(--full-width));max-height:var(--ha-dialog-max-height,calc(var(--safe-height) - var(--ha-space-20)));min-height:var(--ha-dialog-min-height);margin-top:var(--dialog-surface-margin-top,auto);transform:translate(calc(var(--safe-area-offset-left,0px) - var(--safe-area-offset-right,0px)),calc(var(--safe-area-offset-top,0px) - var(--safe-area-offset-bottom,0px)));display:flex;flex-direction:column;overflow:hidden}wa-dialog::part(dialog)::backdrop{-webkit-backdrop-filter:var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none));backdrop-filter:var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none));background-color:var(--mdc-dialog-scrim-color,none)}@media all and (max-width:450px),all and (max-height:500px){:host([type=standard]){--ha-dialog-border-radius:0}:host([type=standard]) wa-dialog{--full-width:var(--ha-dialog-width-full, 100vw);--width:var(--full-width)}:host([type=standard]) wa-dialog::part(dialog){min-height:var(--ha-dialog-min-height,100vh);min-height:var(--ha-dialog-min-height,100dvh);max-height:var(--ha-dialog-max-height,100vh);max-height:var(--ha-dialog-max-height,100dvh);margin-top:0;margin-bottom:0;padding-top:var(--safe-area-inset-top);padding-bottom:var(--safe-area-inset-bottom);padding-left:var(--safe-area-inset-left);padding-right:var(--safe-area-inset-right);transform:none}}.header-title-container{display:flex;align-items:center}.header-title{margin:0;margin-bottom:0;color:var(--ha-dialog-header-title-color,var(--primary-text-color));font-size:var(
            --ha-dialog-header-title-font-size,
            var(--ha-font-size-2xl)
          );line-height:var(
            --ha-dialog-header-title-line-height,
            var(--ha-line-height-condensed)
          );font-weight:var(--ha-dialog-header-title-font-weight,var(--ha-font-weight-normal));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:var(--ha-space-3)}wa-dialog::part(body){padding:0;display:flex;flex-direction:column;max-width:100%;overflow:hidden}.content-wrapper{position:relative;flex:1;display:flex;flex-direction:column;min-height:0}.body{position:var(--dialog-content-position,relative);padding:var(--dialog-content-padding,0 var(--ha-space-6) var(--ha-space-6) var(--ha-space-6));overflow:auto;flex-grow:1}:host([flexcontent]) .body{max-width:100%;flex:1;display:flex;flex-direction:column}wa-dialog::part(footer){padding:0}::slotted([slot=footer]){display:flex;padding:var(--ha-space-3) var(--ha-space-4) var(--ha-space-4) var(--ha-space-4);gap:var(--ha-space-3);justify-content:flex-end;align-items:center;width:100%}`))]}constructor(...t){super(...t),this.open=!1,this.type="standard",this.width="medium",this.preventScrimClose=!1,this.headerSubtitlePosition="below",this.flexContent=!1,this.withoutHeader=!1,this._open=!1,this._bodyScrolled=!1,this._escapePressed=!1,this._handleShow=async t=>{t.eventPhase===Event.AT_TARGET&&(this._open=!0,(0,d.r)(this,"opened"),await this.updateComplete,requestAnimationFrame(()=>{var t,e;if(null!==(t=this._hassConfig)&&void 0!==t&&t.auth.external&&(0,f.V)(this._hassConfig.auth.external)){const t=this.querySelector("[autofocus]");return void(null!==t&&(t.id||(t.id="ha-dialog-autofocus"),this._hassConfig.auth.external.fireMessage({type:"focus_element",payload:{element_id:t.id}})))}null===(e=this.querySelector("[autofocus]"))||void 0===e||e.focus()}))},this._handleAfterShow=t=>{t.eventPhase===Event.AT_TARGET&&(0,d.r)(this,"after-show")},this._handleAfterHide=t=>{t.eventPhase===Event.AT_TARGET&&(this._open=!1,this._setFullscreen(!1),(0,d.r)(this,"closed"))}}}(0,i.Cg)([(0,n.MZ)({attribute:"aria-labelledby"})],L.prototype,"ariaLabelledBy",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"aria-describedby"})],L.prototype,"ariaDescribedBy",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],L.prototype,"open",void 0),(0,i.Cg)([(0,n.MZ)({reflect:!0})],L.prototype,"type",void 0),(0,i.Cg)([(0,n.MZ)({type:String,reflect:!0,attribute:"width"})],L.prototype,"width",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],L.prototype,"preventScrimClose",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"header-title"})],L.prototype,"headerTitle",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"header-subtitle"})],L.prototype,"headerSubtitle",void 0),(0,i.Cg)([(0,n.MZ)({type:String,attribute:"header-subtitle-position"})],L.prototype,"headerSubtitlePosition",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],L.prototype,"flexContent",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,attribute:"without-header"})],L.prototype,"withoutHeader",void 0),(0,i.Cg)([(0,n.wk)()],L.prototype,"_open",void 0),(0,i.Cg)([(0,n.P)(".body")],L.prototype,"bodyContainer",void 0),(0,i.Cg)([(0,n.wk)(),(0,r.Fg)({context:h.D5,subscribe:!0})],L.prototype,"_i18n",void 0),(0,i.Cg)([(0,n.wk)(),(0,r.Fg)({context:h.WF,subscribe:!0})],L.prototype,"_hassConfig",void 0),(0,i.Cg)([(0,n.wk)()],L.prototype,"_bodyScrolled",void 0),(0,i.Cg)([(0,n.Ls)({passive:!0})],L.prototype,"_handleBodyScroll",null),L=(0,i.Cg)([(0,n.EM)("ha-dialog")],L),e()}catch(g){e(g)}})},59174:function(t,e,a){a.a(t,async function(t,e){try{var i=a(40445),o=a(35211),r=a(5124),s=a(67576),n=a(91450),l=a(22792),d=a(85694),c=a(44144),h=(a(47680),t([d]));d=(h.then?(await h)():h)[0];let u,p,f,m,v,g,b,y=t=>t;class _ extends r.WF{render(){if(this.icon)return(0,r.qy)(u||(u=y`<ha-icon .icon="${0}"></ha-icon>`),this.icon);if(!this.domain)return r.s6;if(!this._connection||!this._hassConfig)return this._renderFallback();const t=(0,d._4)(this._connection.connection,this._hassConfig.config,this.domain,this.deviceClass,this.state).then(t=>t?(0,r.qy)(p||(p=y`<ha-icon .icon="${0}"></ha-icon>`),t):this._renderFallback());return(0,r.qy)(f||(f=y`${0}`),(0,n.T)(t))}_renderFallback(){if(this.domain&&this.domain in d.l)return(0,r.qy)(m||(m=y` <ha-svg-icon .path="${0}"></ha-svg-icon> `),d.l[this.domain]);if(this.brandFallback){var t,e;const a=(0,c.MR)({domain:this.domain,type:"icon",darkOptimized:null===(t=this._hassUi)||void 0===t?void 0:t.themes.darkMode},null===(e=this._hassConfig)||void 0===e?void 0:e.auth.data.hassUrl);return(0,r.qy)(v||(v=y` <img alt="" src="${0}" crossorigin="anonymous" referrerpolicy="no-referrer"> `),a)}return(0,r.qy)(g||(g=y`<ha-svg-icon .path="${0}"></ha-svg-icon>`),d.lW)}}_.styles=(0,r.AH)(b||(b=y`img{width:var(--mdc-icon-size,24px)}`)),(0,i.Cg)([(0,s.MZ)()],_.prototype,"domain",void 0),(0,i.Cg)([(0,s.MZ)({attribute:!1})],_.prototype,"deviceClass",void 0),(0,i.Cg)([(0,s.MZ)({attribute:!1})],_.prototype,"state",void 0),(0,i.Cg)([(0,s.MZ)()],_.prototype,"icon",void 0),(0,i.Cg)([(0,s.MZ)({attribute:"brand-fallback",type:Boolean})],_.prototype,"brandFallback",void 0),(0,i.Cg)([(0,s.wk)(),(0,o.Fg)({context:l.WF,subscribe:!0})],_.prototype,"_hassConfig",void 0),(0,i.Cg)([(0,s.wk)(),(0,o.Fg)({context:l.Wq,subscribe:!0})],_.prototype,"_connection",void 0),(0,i.Cg)([(0,s.wk)(),(0,o.Fg)({context:l.EK,subscribe:!0})],_.prototype,"_hassUi",void 0),_=(0,i.Cg)([(0,s.EM)("ha-domain-icon")],_),e()}catch(u){e(u)}})},26300:function(t,e,a){a.a(t,async function(t,i){try{a.r(e),a.d(e,{HaIconButton:function(){return m}});a(62953);var o=a(40445),r=a(5124),s=a(67576),n=a(63672),l=a(18350),d=(a(67094),t([l]));l=(d.then?(await d)():d)[0];let c,h,u,p,f=t=>t;class m extends r.WF{render(){return(0,r.qy)(c||(c=f` <ha-button appearance="plain" variant="neutral" aria-label="${0}" title="${0}" aria-haspopup="${0}" .disabled="${0}" .iconTag="${0}" .href="${0}" .target="${0}" .rel="${0}" .download="${0}"> ${0} </ha-button> `),(0,n.J)(this.label),(0,n.J)(this.hideTitle?void 0:this.label),(0,n.J)(this.ariaHasPopup),this.disabled,this.path?"ha-svg-icon":"span",this.href,this.target,this.rel,this.download,this.path?(0,r.qy)(h||(h=f`<ha-svg-icon aria-hidden="true" .path="${0}"></ha-svg-icon>`),this.path):(0,r.qy)(u||(u=f`<span><slot></slot></span>`)))}constructor(...t){super(...t),this.disabled=!1,this.hideTitle=!1,this.selected=!1}}m.shadowRootOptions={mode:"open",delegatesFocus:!0},m.styles=(0,r.AH)(p||(p=f`:host{display:inline-block;outline:0;--ha-button-height:var(--ha-icon-button-size, 48px)}ha-button{position:relative;isolation:isolate;--wa-form-control-padding-inline:var(
        --ha-icon-button-padding-inline,
        --ha-space-2
      );--wa-color-on-normal:currentColor;--wa-color-fill-quiet:transparent;--ha-button-label-overflow:visible}ha-button::after{content:"";position:absolute;inset:0;z-index:-1;border-radius:50%;background-color:currentColor;opacity:0;pointer-events:none}ha-button::part(base){width:var(--wa-form-control-height);aspect-ratio:1;outline-offset:-4px}ha-button::part(label){display:flex}:host([selected]) ha-button::after{opacity:.1}@media (hover:hover){:host(:hover:not([disabled])) ha-button::after{opacity:.1}}`)),(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],m.prototype,"disabled",void 0),(0,o.Cg)([(0,s.MZ)({type:String})],m.prototype,"path",void 0),(0,o.Cg)([(0,s.MZ)({type:String})],m.prototype,"label",void 0),(0,o.Cg)([(0,s.MZ)({type:String,attribute:"aria-haspopup"})],m.prototype,"ariaHasPopup",void 0),(0,o.Cg)([(0,s.MZ)({attribute:"hide-title",type:Boolean})],m.prototype,"hideTitle",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],m.prototype,"selected",void 0),(0,o.Cg)([(0,s.MZ)()],m.prototype,"href",void 0),(0,o.Cg)([(0,s.MZ)()],m.prototype,"target",void 0),(0,o.Cg)([(0,s.MZ)()],m.prototype,"rel",void 0),(0,o.Cg)([(0,s.MZ)()],m.prototype,"download",void 0),m=(0,o.Cg)([(0,s.EM)("ha-icon-button")],m),i()}catch(c){i(c)}})},47680:function(t,e,a){a.r(e),a.d(e,{HaIcon:function(){return L}});a(74423),a(3362),a(62953);var i=a(40445),o=a(5124),r=a(67576),s=a(1087),n=a(9899),l=a(700),d=(a(44114),a(18111),a(7588),a(96167),a(95192)),c=a(7553);const h=JSON.parse('{"version":"7.4.47","parts":[{"file":"7a7139d465f1f41cb26ab851a17caa21a9331234"},{"start":"account-supervisor-circle-","file":"9561286c4c1021d46b9006596812178190a7cc1c"},{"start":"alpha-r-c","file":"eb466b7087fb2b4d23376ea9bc86693c45c500fa"},{"start":"arrow-decision-o","file":"4b3c01b7e0723b702940c5ac46fb9e555646972b"},{"start":"baby-f","file":"2611401d85450b95ab448ad1d02c1a432b409ed2"},{"start":"battery-hi","file":"89bcd31855b34cd9d31ac693fb073277e74f1f6a"},{"start":"blur-r","file":"373709cd5d7e688c2addc9a6c5d26c2d57c02c48"},{"start":"briefcase-account-","file":"a75956cf812ee90ee4f656274426aafac81e1053"},{"start":"calendar-question-","file":"3253f2529b5ebdd110b411917bacfacb5b7063e6"},{"start":"car-lig","file":"74566af3501ad6ae58ad13a8b6921b3cc2ef879d"},{"start":"cellphone-co","file":"7677f1cfb2dd4f5562a2aa6d3ae43a2e6997b21a"},{"start":"circle-slice-2","file":"70d08c50ec4522dd75d11338db57846588263ee2"},{"start":"cloud-co","file":"141d2bfa55ca4c83f4bae2812a5da59a84fec4ff"},{"start":"cog-s","file":"5a640365f8e47c609005d5e098e0e8104286d120"},{"start":"cookie-l","file":"dd85b8eb8581b176d3acf75d1bd82e61ca1ba2fc"},{"start":"currency-eur-","file":"15362279f4ebfc3620ae55f79d2830ad86d5213e"},{"start":"delete-o","file":"239434ab8df61237277d7599ebe066c55806c274"},{"start":"draw-","file":"5605918a592070803ba2ad05a5aba06263da0d70"},{"start":"emoticon-po","file":"a838cfcec34323946237a9f18e66945f55260f78"},{"start":"fan","file":"effd56103b37a8c7f332e22de8e4d67a69b70db7"},{"start":"file-question-","file":"b2424b50bd465ae192593f1c3d086c5eec893af8"},{"start":"flask-off-","file":"3b76295cde006a18f0301dd98eed8c57e1d5a425"},{"start":"food-s","file":"1c6941474cbeb1755faaaf5771440577f4f1f9c6"},{"start":"gamepad-u","file":"c6efe18db6bc9654ae3540c7dee83218a5450263"},{"start":"google-f","file":"df341afe6ad4437457cf188499cb8d2df8ac7b9e"},{"start":"head-c","file":"282121c9e45ed67f033edcc1eafd279334c00f46"},{"start":"home-pl","file":"27e8e38fc7adcacf2a210802f27d841b49c8c508"},{"start":"inbox-","file":"0f0316ec7b1b7f7ce3eaabce26c9ef619b5a1694"},{"start":"key-v","file":"ea33462be7b953ff1eafc5dac2d166b210685a60"},{"start":"leaf-circle-","file":"33db9bbd66ce48a2db3e987fdbd37fb0482145a4"},{"start":"lock-p","file":"b89e27ed39e9d10c44259362a4b57f3c579d3ec8"},{"start":"message-s","file":"7b5ab5a5cadbe06e3113ec148f044aa701eac53a"},{"start":"moti","file":"01024d78c248d36805b565e343dd98033cc3bcaf"},{"start":"newspaper-variant-o","file":"22a6ec4a4fdd0a7c0acaf805f6127b38723c9189"},{"start":"on","file":"c73d55b412f394e64632e2011a59aa05e5a1f50d"},{"start":"paw-ou","file":"3f669bf26d16752dc4a9ea349492df93a13dcfbf"},{"start":"pigg","file":"0c24edb27eb1c90b6e33fc05f34ef3118fa94256"},{"start":"printer-pos-sy","file":"41a55cda866f90b99a64395c3bb18c14983dcf0a"},{"start":"read","file":"c7ed91552a3a64c9be88c85e807404cf705b7edf"},{"start":"robot-vacuum-variant-o","file":"917d2a35d7268c0ea9ad9ecab2778060e19d90e0"},{"start":"sees","file":"6e82d9861d8fac30102bafa212021b819f303bdb"},{"start":"shoe-f","file":"e2fe7ce02b5472301418cc90a0e631f187b9f238"},{"start":"snowflake-m","file":"a28ba9f5309090c8b49a27ca20ff582a944f6e71"},{"start":"st","file":"7e92d03f095ec27e137b708b879dfd273bd735ab"},{"start":"su","file":"61c74913720f9de59a379bdca37f1d2f0dc1f9db"},{"start":"tag-plus-","file":"8f3184156a4f38549cf4c4fffba73a6a941166ae"},{"start":"timer-a","file":"baab470d11cfb3a3cd3b063ee6503a77d12a80d0"},{"start":"transit-d","file":"8561c0d9b1ac03fab360fd8fe9729c96e8693239"},{"start":"vector-arrange-b","file":"c9a3439257d4bab33d3355f1f2e11842e8171141"},{"start":"water-ou","file":"02dbccfb8ca35f39b99f5a085b095fc1275005a0"},{"start":"webc","file":"57bafd4b97341f4f2ac20a609d023719f23a619c"},{"start":"zip","file":"65ae094e8263236fa50486584a08c03497a38d93"}]}');let u;const p=()=>(u||(u=f().catch(t=>{throw u=void 0,t})),u),f=async()=>{const t=(0,d.y$)("hass-icon-db","mdi-icon-store"),e=await(0,d.Jt)("_version",t);return e?e!==h.version&&(await(0,d.IU)(t),(0,d.hZ)("_version",h.version,t)):(0,d.hZ)("_version",h.version,t),t},m=["mdi","hass","hassio","hademo"];let v=[];a(67094);let g,b,y,_=t=>t;const w={},C={},x=(0,n.s)(()=>(async t=>{const e=Object.keys(t),a=await Promise.allSettled(Object.values(t));(await p())("readwrite",i=>{a.forEach((a,o)=>{"fulfilled"===a.status&&Object.entries(a.value).forEach(([t,e])=>{i.put(e,t)}),delete t[e[o]]})})})(C),2e3),$={},k={"home-assistant":()=>a.e(58781).then(a.bind(a,53580)).then(t=>t.mdiHomeAssistant),"music-assistant":()=>a.e(56009).then(a.bind(a,10576)).then(t=>t.mdiMusicAssistant),esphome:()=>a.e(88800).then(a.bind(a,45091)).then(t=>t.mdiEsphomeLogo)};class L extends o.WF{willUpdate(t){super.willUpdate(t),t.has("icon")&&(this._path=void 0,this._secondaryPath=void 0,this._viewBox=void 0,this._loadIcon())}render(){return this.icon?this._legacy?(0,o.qy)(g||(g=_` <iron-icon .icon="${0}"></iron-icon>`),this.icon):(0,o.qy)(b||(b=_`<ha-svg-icon .path="${0}" .secondaryPath="${0}" .viewBox="${0}"></ha-svg-icon>`),this._path,this._secondaryPath,this._viewBox):o.s6}async _loadIcon(){if(!this.icon)return;const t=this.icon,[e,a]=this.icon.split(":",2);let i,o=a;if(!e||!o)return;if(!m.includes(e)){const a=l.y[e];return a?void(a&&"function"==typeof a.getIcon&&this._setCustomPath(a.getIcon(o),t)):void(this._legacy=!0)}if(this._legacy=!1,o in w){const t=w[o];let a;t.newName?(a=`Icon ${e}:${o} was renamed to ${e}:${t.newName}, please change your config, it will be removed in version ${t.removeIn}.`,o=t.newName):a=`Icon ${e}:${o} was removed from MDI, please replace this icon with an other icon in your config, it will be removed in version ${t.removeIn}.`,console.warn(a),(0,s.r)(this,"write_log",{level:"warning",message:a})}if(o in $)return void(this._path=$[o]);if(o in k){const e=await k[o]();return this.icon===t&&(this._path=e),void($[o]=e)}try{i=await(t=>new Promise((e,a)=>{if(v.push([t,e,a]),v.length>1)return;const i=p();(0,c.h)(1e3,(async()=>{(await i)("readonly",t=>{for(const[e,a,i]of v)(0,d.Yd)(t.get(e)).then(t=>a(t)).catch(t=>i(t));v=[]})})()).catch(t=>{for(const[,,e]of v)e(t);v=[]})}))(o)}catch(u){i=void 0}if(i)return this.icon===t&&(this._path=i),void($[o]=i);const r=(t=>{let e;for(const a of h.parts){if(void 0!==a.start&&t<a.start)break;e=a}return e.file})(o);if(r in C)return void this._setPath(C[r],o,t);const n=fetch(`/static/mdi/${r}.json`).then(t=>t.json());C[r]=n,this._setPath(n,o,t),n.catch(()=>{delete C[r]}),x()}async _setCustomPath(t,e){const a=await t;this.icon===e&&(this._path=a.path,this._secondaryPath=a.secondaryPath,this._viewBox=a.viewBox)}async _setPath(t,e,a){try{const i=await t;this.icon===a&&(this._path=i[e]),$[e]=i[e]}catch(i){}}constructor(...t){super(...t),this._legacy=!1}}L.styles=(0,o.AH)(y||(y=_`:host{fill:currentcolor}`)),(0,i.Cg)([(0,r.MZ)()],L.prototype,"icon",void 0),(0,i.Cg)([(0,r.wk)()],L.prototype,"_path",void 0),(0,i.Cg)([(0,r.wk)()],L.prototype,"_secondaryPath",void 0),(0,i.Cg)([(0,r.wk)()],L.prototype,"_viewBox",void 0),(0,i.Cg)([(0,r.wk)()],L.prototype,"_legacy",void 0),L=(0,i.Cg)([(0,r.EM)("ha-icon")],L)},54276:function(t,e,a){a(62953);var i=a(40445),o=a(76482),r=a(91382),s=a(96245),n=a(5124),l=a(67576);let d;class c extends r.n{attach(t){super.attach(t),this.attachableTouchController.attach(t)}disconnectedCallback(){super.disconnectedCallback(),this.hovered=!1,this.pressed=!1}detach(){super.detach(),this.attachableTouchController.detach()}_onTouchControlChange(t,e){null==t||t.removeEventListener("touchend",this._handleTouchEnd),null==e||e.addEventListener("touchend",this._handleTouchEnd)}constructor(...t){super(...t),this.attachableTouchController=new o.i(this,this._onTouchControlChange.bind(this)),this._handleTouchEnd=()=>{this.disabled||super.endPressAnimation()}}}c.styles=[s.R,(0,n.AH)(d||(d=(t=>t)`:host{--md-ripple-hover-opacity:var(--ha-ripple-hover-opacity, 0.08);--md-ripple-pressed-opacity:var(--ha-ripple-pressed-opacity, 0.12);--md-ripple-hover-color:var(
          --ha-ripple-hover-color,
          var(--ha-ripple-color, var(--secondary-text-color))
        );--md-ripple-pressed-color:var(
          --ha-ripple-pressed-color,
          var(--ha-ripple-color, var(--secondary-text-color))
        )}`))],c=(0,i.Cg)([(0,l.EM)("ha-ripple")],c)},93367:function(t,e,a){a.a(t,async function(t,e){try{var i=a(40445),o=a(35211),r=a(5124),s=a(67576),n=a(91450),l=a(69093),d=a(22792),c=a(85694),h=(a(47680),a(67094),t([c]));c=(h.then?(await h)():h)[0];let u,p,f,m,v=t=>t;class g extends r.WF{render(){var t,e;const a=this.icon||this.stateObj&&(null===(t=this._entities)||void 0===t||null===(t=t[this.stateObj.entity_id])||void 0===t?void 0:t.icon)||(null===(e=this.stateObj)||void 0===e?void 0:e.attributes.icon);if(a)return(0,r.qy)(u||(u=v`<ha-icon .icon="${0}"></ha-icon>`),a);if(!this.stateObj)return r.s6;if(!this._config||!this._connection||!this._entities)return this._renderFallback();const i=(0,c.fq)(this._entities,this._config.config,this._connection.connection,this.stateObj,this.stateValue).then(t=>t?(0,r.qy)(p||(p=v`<ha-icon .icon="${0}"></ha-icon>`),t):this._renderFallback());return(0,r.qy)(f||(f=v`${0}`),(0,n.T)(i))}_renderFallback(){const t=(0,l.t)(this.stateObj);return(0,r.qy)(m||(m=v` <ha-svg-icon .path="${0}"></ha-svg-icon> `),c.l[t]||c.lW)}}(0,i.Cg)([(0,s.MZ)({attribute:!1})],g.prototype,"stateObj",void 0),(0,i.Cg)([(0,s.MZ)({attribute:!1})],g.prototype,"stateValue",void 0),(0,i.Cg)([(0,s.MZ)()],g.prototype,"icon",void 0),(0,i.Cg)([(0,s.wk)(),(0,o.Fg)({context:d.WF,subscribe:!0})],g.prototype,"_config",void 0),(0,i.Cg)([(0,s.wk)(),(0,o.Fg)({context:d.Wq,subscribe:!0})],g.prototype,"_connection",void 0),(0,i.Cg)([(0,s.wk)(),(0,o.Fg)({context:d.X1,subscribe:!0})],g.prototype,"_entities",void 0),g=(0,i.Cg)([(0,s.EM)("ha-state-icon")],g),e()}catch(u){e(u)}})},67094:function(t,e,a){a.r(e),a.d(e,{HaSvgIcon:function(){return h}});var i=a(40445),o=a(5124),r=a(67576);let s,n,l,d,c=t=>t;class h extends o.WF{render(){return(0,o.JW)(s||(s=c` <svg viewBox="${0}" preserveAspectRatio="xMidYMid meet" focusable="false" role="img" aria-hidden="true"> <g> ${0} ${0} </g> </svg>`),this.viewBox||"0 0 24 24",this.path?(0,o.JW)(n||(n=c`<path class="primary-path" d="${0}"></path>`),this.path):o.s6,this.secondaryPath?(0,o.JW)(l||(l=c`<path class="secondary-path" d="${0}"></path>`),this.secondaryPath):o.s6)}}h.styles=(0,o.AH)(d||(d=c`:host{display:var(--ha-icon-display,inline-flex);align-items:center;justify-content:center;position:relative;vertical-align:middle;fill:var(--icon-primary-color,currentcolor);width:var(--mdc-icon-size,24px);height:var(--mdc-icon-size,24px)}svg{width:100%;height:100%;pointer-events:none;display:block}path.primary-path{opacity:var(--icon-primary-opactity, 1)}path.secondary-path{fill:var(--icon-secondary-color,currentcolor);opacity:var(--icon-secondary-opactity, .5)}`)),(0,i.Cg)([(0,r.MZ)()],h.prototype,"path",void 0),(0,i.Cg)([(0,r.MZ)({attribute:!1})],h.prototype,"secondaryPath",void 0),(0,i.Cg)([(0,r.MZ)({attribute:!1})],h.prototype,"viewBox",void 0),h=(0,i.Cg)([(0,r.EM)("ha-svg-icon")],h)},67505:function(t,e,a){var i=a(40445),o=a(5124),r=a(67576),s=a(93421);a(67094);let n,l,d=t=>t;class c extends o.WF{render(){return this._localize?(0,o.qy)(n||(n=d` <ha-svg-icon .path="${0}"></ha-svg-icon> <span class="prefix">${0}</span> <span class="text"><slot></slot></span> `),"M12,2A7,7 0 0,1 19,9C19,11.38 17.81,13.47 16,14.74V17A1,1 0 0,1 15,18H9A1,1 0 0,1 8,17V14.74C6.19,13.47 5,11.38 5,9A7,7 0 0,1 12,2M9,21V20H15V21A1,1 0 0,1 14,22H10A1,1 0 0,1 9,21M12,4A5,5 0 0,0 7,9C7,11.05 8.23,12.81 10,13.58V16H14V13.58C15.77,12.81 17,11.05 17,9A5,5 0 0,0 12,4Z",this._localize("ui.panel.config.tips.tip")):o.s6}}c.styles=(0,o.AH)(l||(l=d`:host{display:block;text-align:center}.text{direction:var(--direction);margin-left:2px;margin-inline-start:2px;margin-inline-end:initial;color:var(--secondary-text-color)}.prefix{font-weight:var(--ha-font-weight-medium)}`)),(0,i.Cg)([(0,r.wk)(),(0,s.IW)()],c.prototype,"_localize",void 0),c=(0,i.Cg)([(0,r.EM)("ha-tip")],c)},34127:function(t,e,a){a.a(t,async function(t,e){try{a(62953);var i=a(40445),o=a(52630),r=a(5124),s=a(67576),n=t([o]);o=(n.then?(await n)():n)[0];let l,d=t=>t;class c extends o.A{static get styles(){return[o.A.styles,(0,r.AH)(l||(l=d`:host{--wa-tooltip-background-color:var(
            --ha-tooltip-background-color,
            var(--ha-color-surface-default)
          );--wa-tooltip-content-color:var(
            --ha-tooltip-text-color,
            var(--primary-text-color)
          );--wa-tooltip-font-family:var(
            --ha-tooltip-font-family,
            var(--ha-font-family-body)
          );--wa-tooltip-font-size:var(
            --ha-tooltip-font-size,
            var(--ha-font-size-m)
          );--wa-tooltip-font-weight:var(
            --ha-tooltip-font-weight,
            var(--ha-font-weight-medium)
          );--wa-tooltip-line-height:var(
            --ha-tooltip-line-height,
            var(--ha-line-height-condensed)
          );--wa-tooltip-padding:var(--ha-tooltip-padding, var(--ha-space-2));--wa-tooltip-border-radius:var(
            --ha-tooltip-border-radius,
            var(--ha-border-radius-md)
          );--wa-tooltip-arrow-size:var(--ha-tooltip-arrow-size, 0px);--wa-tooltip-border-width:0px;--wa-z-index-tooltip:1000}.tooltip::part(popup){animation-duration:var(--ha-tooltip-animation-duration, 0)}.body{box-shadow:var(--ha-tooltip-box-shadow,var(--ha-box-shadow-m))}`))]}constructor(...t){super(...t),this.showDelay=350,this.hideDelay=150}}(0,i.Cg)([(0,s.MZ)({attribute:"show-delay",type:Number})],c.prototype,"showDelay",void 0),(0,i.Cg)([(0,s.MZ)({attribute:"hide-delay",type:Number})],c.prototype,"hideDelay",void 0),c=(0,i.Cg)([(0,s.EM)("ha-tooltip")],c),e()}catch(l){e(l)}})},36866:function(t,e,a){a.a(t,async function(t,e){try{a(62953);var i=a(40445),o=a(5124),r=a(67576),s=a(91485),n=t([s]);s=(n.then?(await n)():n)[0];let l,d,c=t=>t;const h="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z";class u extends s.U{willUpdate(t){var e,a;(super.willUpdate(t),this.label||this.placeholder||this.hasUpdated&&!t.has("_i18n"))||(this.placeholder=(null===(e=this.i18n)||void 0===e||null===(a=e.localize)||void 0===a?void 0:a.call(e,"ui.common.search"))||"Search")}renderStartDefault(){return(0,o.qy)(l||(l=c`<ha-svg-icon slot="start" .path="${0}"></ha-svg-icon>`),h)}constructor(){super(),this.withClear=!0,this.autocomplete=this.autocomplete||"off"}}u.styles=[...s.U.styles,(0,o.AH)(d||(d=c`:host([appearance=outlined]) wa-input.no-label::part(base){height:40px}`))],u=(0,i.Cg)([(0,r.EM)("ha-input-search")],u),e()}catch(l){e(l)}})},49852:function(t,e,a){a.d(e,{P:function(){return d},j:function(){return l}});a(74423),a(18111),a(81148),a(22489),a(61701),a(13579);var i=a(65522),o=a(71727),r=a(55931),s=a(66033),n=a(58594);const l=(t,e,a,l,d,c,h,u,p,f,m,v="")=>{let g,b,y={};const _=Object.values(t),w=Object.values(a),C=Object.values(l);(c||h||u||p||f)&&(y=(0,n.g2)(C),g=w,b=C.filter(t=>t.area_id),c&&(g=g.filter(t=>{const e=y[t.id];return!(!e||!e.length)&&y[t.id].some(t=>c.includes((0,o.m)(t.entity_id)))}),b=b.filter(t=>c.includes((0,o.m)(t.entity_id)))),h&&(g=g.filter(t=>{const e=y[t.id];return!e||!e.length||C.every(t=>!h.includes((0,o.m)(t.entity_id)))}),b=b.filter(t=>!h.includes((0,o.m)(t.entity_id)))),u&&(g=g.filter(t=>{const e=y[t.id];return!(!e||!e.length)&&y[t.id].some(t=>{const e=d[t.entity_id];return!!e&&(e.attributes.device_class&&u.includes(e.attributes.device_class))})}),b=b.filter(t=>{const e=d[t.entity_id];return e.attributes.device_class&&u.includes(e.attributes.device_class)})),p&&(g=g.filter(t=>p(t))),f&&(g=g.filter(t=>{const e=y[t.id];return!(!e||!e.length)&&y[t.id].some(t=>{const e=d[t.entity_id];return!!e&&f(e)})}),b=b.filter(t=>{const e=d[t.entity_id];return!!e&&f(e)})));let x,$=_;g&&(x=g.filter(t=>t.area_id).map(t=>t.area_id)),b&&(x=(null!=x?x:[]).concat(b.filter(t=>t.area_id).map(t=>t.area_id))),x&&($=$.filter(t=>x.includes(t.area_id))),m&&($=$.filter(t=>!m.includes(t.area_id)));return $.map(t=>{const{floor:a}=(0,s.L)(t,e),o=a?(0,r.X)(a):void 0,n=(0,i.A)(t);return{id:`${v}${t.area_id}`,primary:n||t.area_id,secondary:o,icon:t.icon||void 0,icon_path:t.icon?void 0:"M20 2H4C2.9 2 2 2.9 2 4V20C2 21.11 2.9 22 4 22H20C21.11 22 22 21.11 22 20V4C22 2.9 21.11 2 20 2M4 6L6 4H10.9L4 10.9V6M4 13.7L13.7 4H18.6L4 18.6V13.7M20 18L18 20H13.1L20 13.1V18M20 10.3L10.3 20H5.4L20 5.4V10.3Z",search_labels:{areaId:t.area_id,aliases:t.aliases.join(" ")}}})},d=[{name:"primary",weight:10},{name:"search_labels.aliases",weight:8},{name:"secondary",weight:6},{name:"search_labels.domain",weight:4},{name:"search_labels.areaId",weight:2}]},82e3:function(t,e,a){a.d(e,{D5:function(){return i},Fy:function(){return s},Gk:function(){return d},Hg:function(){return o},Y_:function(){return c},ds:function(){return l},e0:function(){return r},ec:function(){return n}});a(74423),a(18111),a(61701),a(33110),a(3362);const i=14881==a.j?`${location.protocol}//${location.host}`:null,o=t=>t.map(t=>{if("string"!==t.type)return t;switch(t.name){case"username":return Object.assign(Object.assign({},t),{},{autocomplete:"username",autofocus:!0});case"password":return Object.assign(Object.assign({},t),{},{autocomplete:"current-password"});case"code":return Object.assign(Object.assign({},t),{},{autocomplete:"one-time-code",autofocus:!0});default:return t}}),r=(t,e)=>t.callWS({type:"auth/sign_path",path:e}),s=async(t,e,a,i)=>t.callWS({type:"config/auth_provider/homeassistant/create",user_id:e,username:a,password:i}),n=(t,e,a)=>t.callWS({type:"config/auth_provider/homeassistant/change_password",current_password:e,new_password:a}),l=(t,e,a)=>t.callWS({type:"config/auth_provider/homeassistant/admin_change_password",user_id:e,password:a}),d=(t,e,a)=>t.callWS({type:"config/auth_provider/homeassistant/admin_change_username",user_id:e,username:a}),c=(t,e,a)=>t.callWS({type:"auth/delete_all_refresh_tokens",token_type:e,delete_current_token:a})},10897:function(t,e,a){a.d(e,{C4:function(){return d},CK:function(){return l},FX:function(){return m},UC:function(){return p},_Z:function(){return y},bT:function(){return _},j4:function(){return g},sd:function(){return r},su:function(){return n},vc:function(){return b},w8:function(){return u},wv:function(){return h},y3:function(){return f},zS:function(){return s}});a(3362);var i=a(3931),o=a(82e3);const r=[1,2,3,4,6,8],s="web_rtc",n=(t,e,a)=>`${t}&width=${e}&height=${a}`,l=t=>t.attributes.access_token?`/api/camera_proxy_stream/${t.entity_id}?token=${t.attributes.access_token}`:void 0,d=async(t,e,a,o)=>{const r=await(0,i.U)("_cameraTmbUrl",9e3,c,t,e);return n(r,a,o)},c=async(t,e)=>{const a=await(0,o.e0)(t,`/api/camera_proxy/${e}`);return t.hassUrl(a.path)},h=async(t,e,a)=>{const i={type:"camera/stream",entity_id:e};a&&(i.format=a);const o=await t.callWS(i);return o.url=t.hassUrl(o.url),o},u=(t,e,a,i)=>t.connection.subscribeMessage(i,{type:"camera/webrtc/offer",entity_id:e,offer:a}),p=(t,e,a,i)=>t.callWS({type:"camera/webrtc/candidate",entity_id:e,session_id:a,candidate:i}),f=(t,e)=>t.callWS({type:"camera/get_prefs",entity_id:e}),m=(t,e,a)=>t.callWS(Object.assign({type:"camera/update_prefs",entity_id:e},a)),v="media-source://camera/",g=t=>t.startsWith(v),b=t=>t.substring(22),y=async(t,e)=>t.callWS({type:"camera/capabilities",entity_id:e}),_=async(t,e)=>t.callWS({type:"camera/webrtc/get_client_config",entity_id:e})},38279:function(t,e,a){a.d(e,{$2:function(){return i},VV:function(){return r},on:function(){return l},sx:function(){return s}});a(72712);var i=function(t){return t[t.TARGET_TEMPERATURE=1]="TARGET_TEMPERATURE",t[t.TARGET_TEMPERATURE_RANGE=2]="TARGET_TEMPERATURE_RANGE",t[t.TARGET_HUMIDITY=4]="TARGET_HUMIDITY",t[t.FAN_MODE=8]="FAN_MODE",t[t.PRESET_MODE=16]="PRESET_MODE",t[t.SWING_MODE=32]="SWING_MODE",t[t.AUX_HEAT=64]="AUX_HEAT",t[t.TURN_OFF=128]="TURN_OFF",t[t.TURN_ON=256]="TURN_ON",t[t.SWING_HORIZONTAL_MODE=512]="SWING_HORIZONTAL_MODE",t}({});const o=["auto","heat_cool","heat","cool","dry","fan_only","off"].reduce((t,e,a)=>(t[e]=a,t),{}),r=(t,e)=>o[t]-o[e],s={cooling:"cool",defrosting:"heat",drying:"dry",fan:"fan_only",heating:"heat",idle:"off",off:"off",preheating:"heat"},n={cool:"M20.79,13.95L18.46,14.57L16.46,13.44V10.56L18.46,9.43L20.79,10.05L21.31,8.12L19.54,7.65L20,5.88L18.07,5.36L17.45,7.69L15.45,8.82L13,7.38V5.12L14.71,3.41L13.29,2L12,3.29L10.71,2L9.29,3.41L11,5.12V7.38L8.5,8.82L6.5,7.69L5.92,5.36L4,5.88L4.47,7.65L2.7,8.12L3.22,10.05L5.55,9.43L7.55,10.56V13.45L5.55,14.58L3.22,13.96L2.7,15.89L4.47,16.36L4,18.12L5.93,18.64L6.55,16.31L8.55,15.18L11,16.62V18.88L9.29,20.59L10.71,22L12,20.71L13.29,22L14.7,20.59L13,18.88V16.62L15.5,15.17L17.5,16.3L18.12,18.63L20,18.12L19.53,16.35L21.3,15.88L20.79,13.95M9.5,10.56L12,9.11L14.5,10.56V13.44L12,14.89L9.5,13.44V10.56Z",dry:"M12,3.25C12,3.25 6,10 6,14C6,17.32 8.69,20 12,20A6,6 0 0,0 18,14C18,10 12,3.25 12,3.25M14.47,9.97L15.53,11.03L9.53,17.03L8.47,15.97M9.75,10A1.25,1.25 0 0,1 11,11.25A1.25,1.25 0 0,1 9.75,12.5A1.25,1.25 0 0,1 8.5,11.25A1.25,1.25 0 0,1 9.75,10M14.25,14.5A1.25,1.25 0 0,1 15.5,15.75A1.25,1.25 0 0,1 14.25,17A1.25,1.25 0 0,1 13,15.75A1.25,1.25 0 0,1 14.25,14.5Z",fan_only:"M12,11A1,1 0 0,0 11,12A1,1 0 0,0 12,13A1,1 0 0,0 13,12A1,1 0 0,0 12,11M12.5,2C17,2 17.11,5.57 14.75,6.75C13.76,7.24 13.32,8.29 13.13,9.22C13.61,9.42 14.03,9.73 14.35,10.13C18.05,8.13 22.03,8.92 22.03,12.5C22.03,17 18.46,17.1 17.28,14.73C16.78,13.74 15.72,13.3 14.79,13.11C14.59,13.59 14.28,14 13.88,14.34C15.87,18.03 15.08,22 11.5,22C7,22 6.91,18.42 9.27,17.24C10.25,16.75 10.69,15.71 10.89,14.79C10.4,14.59 9.97,14.27 9.65,13.87C5.96,15.85 2,15.07 2,11.5C2,7 5.56,6.89 6.74,9.26C7.24,10.25 8.29,10.68 9.22,10.87C9.41,10.39 9.73,9.97 10.14,9.65C8.15,5.96 8.94,2 12.5,2Z",auto:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22C12.4 22 12.7 22 13.1 21.9L15.4 15.3L14.8 14.7C15.5 14 16 13 16 11.9C16 11.2 15.8 10.5 15.4 9.9L17.6 7.7C18.5 9 19 10.4 19 12H20C20.3 12 20.6 12.1 20.8 12.2C20.8 12.2 20.9 12.2 20.9 12.3C21.3 12.5 21.7 12.9 21.9 13.4C22 12.9 22 12.5 22 12C22 6.5 17.5 2 12 2M14 8.6C13.4 8.2 12.7 8 12 8C9.8 8 8 9.8 8 12C8 13.1 8.4 14.1 9.2 14.8L7.1 16.9C5.8 15.7 5 13.9 5 12C5 8.1 8.1 5 12 5C13.6 5 15 5.5 16.2 6.4L14 8.6M20 14H18L14.8 23H16.7L17.4 21H20.6L21.3 23H23.2L20 14M17.8 19.7L19 16L20.2 19.7H17.8Z",heat:"M17.66 11.2C17.43 10.9 17.15 10.64 16.89 10.38C16.22 9.78 15.46 9.35 14.82 8.72C13.33 7.26 13 4.85 13.95 3C13 3.23 12.17 3.75 11.46 4.32C8.87 6.4 7.85 10.07 9.07 13.22C9.11 13.32 9.15 13.42 9.15 13.55C9.15 13.77 9 13.97 8.8 14.05C8.57 14.15 8.33 14.09 8.14 13.93C8.08 13.88 8.04 13.83 8 13.76C6.87 12.33 6.69 10.28 7.45 8.64C5.78 10 4.87 12.3 5 14.47C5.06 14.97 5.12 15.47 5.29 15.97C5.43 16.57 5.7 17.17 6 17.7C7.08 19.43 8.95 20.67 10.96 20.92C13.1 21.19 15.39 20.8 17.03 19.32C18.86 17.66 19.5 15 18.56 12.72L18.43 12.46C18.22 12 17.66 11.2 17.66 11.2M14.5 17.5C14.22 17.74 13.76 18 13.4 18.1C12.28 18.5 11.16 17.94 10.5 17.28C11.69 17 12.4 16.12 12.61 15.23C12.78 14.43 12.46 13.77 12.33 13C12.21 12.26 12.23 11.63 12.5 10.94C12.69 11.32 12.89 11.7 13.13 12C13.9 13 15.11 13.44 15.37 14.8C15.41 14.94 15.43 15.08 15.43 15.23C15.46 16.05 15.1 16.95 14.5 17.5H14.5Z",off:"M16.56,5.44L15.11,6.89C16.84,7.94 18,9.83 18,12A6,6 0 0,1 12,18A6,6 0 0,1 6,12C6,9.83 7.16,7.94 8.88,6.88L7.44,5.44C5.36,6.88 4,9.28 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12C20,9.28 18.64,6.88 16.56,5.44M13,3H11V13H13",heat_cool:"M12.92 1.58L11.18 2.58L12.39 4.67L11.8 6.85L9 7.6L7.38 6L7.42 3.59L5.43 3.59L5.43 5.42L3.59 5.42L3.6 7.42L6 7.42L7.65 9.03L6.9 11.82L4.68 12.4L2.59 11.2L1.59 12.93L3.17 13.84L2.26 15.42L4 16.42L5.19 14.33L7.42 13.75L7.92 14.26L9.32 12.86L8.78 12.32L9.53 9.54L12.32 8.78L12.85 9.32L14.26 7.91L13.73 7.37L14.32 5.19L16.41 4L15.41 2.25L13.83 3.16L12.92 1.58M20.72 4L4 20.72L5.27 22L10.16 17.11C10.63 17.43 11.15 17.68 11.71 17.83C14.38 18.55 17.12 16.96 17.83 14.29C18.22 12.86 17.93 11.36 17.11 10.16L22 5.27L20.72 4M18.74 9C19.18 9.63 19.53 10.38 19.75 11.19C19.97 12 20.03 12.81 19.96 13.61L22.65 10.41L18.74 9M19.32 15.95C19 16.67 18.5 17.35 17.93 17.94C17.34 18.53 16.66 19 15.96 19.34L20.05 20.06L19.32 15.95M9 18.71L10.41 22.66L13.59 19.95C12.81 20 12 19.97 11.19 19.76C10.36 19.54 9.62 19.17 9 18.71Z"},l=t=>n[t]||"M16.95,16.95L14.83,14.83C15.55,14.1 16,13.1 16,12C16,11.26 15.79,10.57 15.43,10L17.6,7.81C18.5,9 19,10.43 19,12C19,13.93 18.22,15.68 16.95,16.95M12,5C13.57,5 15,5.5 16.19,6.4L14,8.56C13.43,8.21 12.74,8 12,8A4,4 0 0,0 8,12C8,13.1 8.45,14.1 9.17,14.83L7.05,16.95C5.78,15.68 5,13.93 5,12A7,7 0 0,1 12,5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z"},700:function(t,e,a){a.d(e,{y:function(){return s}});const i=window;"customIconsets"in i||(i.customIconsets={});const o=i.customIconsets,r=window;"customIcons"in r||(r.customIcons={});const s=new Proxy(r.customIcons,{get:(t,e)=>{var a;return null!==(a=t[e])&&void 0!==a?a:o[e]?{getIcon:o[e]}:void 0}})},31422:function(t,e,a){a.d(e,{_o:function(){return h},oG:function(){return u},pq:function(){return c}});a(74423),a(18111),a(81148),a(22489),a(61701),a(13579);var i=a(65522),o=a(37981),r=a(71727),s=a(76774),n=a(15638),l=a(95350),d=a(58594);const c=(t,e,a,r,l,d,c,h)=>{const u=(0,s.q)(t,e),p=t.via_device_id?a[t.via_device_id]:void 0,f=p?(0,o.T)(p,l,r,h):void 0,m=p?(0,s.q)(p,e):void 0,v=m?(0,i.A)(m):void 0,g=(0,n.qC)(d,c.translations);return{areaName:u?(0,i.A)(u):v?`${v}${g?" ◂ ":" ▸ "}${f}`:f||void 0,viaDeviceName:f,viaDeviceAreaName:v}},h=[{name:"search_labels.deviceName",weight:10},{name:"search_labels.areaName",weight:8},{name:"search_labels.domainName",weight:4},{name:"search_labels.domain",weight:4},{name:"search_labels.viaDeviceName",weight:3},{name:"search_labels.viaDeviceArea",weight:3}],u=(t,e,a,i,s,n,h,u,p,f="")=>{const m=Object.values(t.devices),v=Object.values(t.entities);let g={};(a||i||s||h)&&(g=(0,d.g2)(v));let b=m.filter(t=>t.id===p||!t.disabled_by);a&&(b=b.filter(t=>{const e=g[t.id];return!(!e||!e.length)&&g[t.id].some(t=>a.includes((0,r.m)(t.entity_id)))})),i&&(b=b.filter(t=>{const e=g[t.id];return!e||!e.length||v.every(t=>!i.includes((0,r.m)(t.entity_id)))})),u&&(b=b.filter(t=>!u.includes(t.id))),s&&(b=b.filter(e=>{const a=g[e.id];return!(!a||!a.length)&&g[e.id].some(e=>{const a=t.states[e.entity_id];return!!a&&(a.attributes.device_class&&s.includes(a.attributes.device_class))})})),h&&(b=b.filter(e=>{const a=g[e.id];return!(!a||!a.length)&&a.some(e=>{const a=t.states[e.entity_id];return!!a&&h(a)})})),n&&(b=b.filter(t=>t.id===p||n(t)));return b.map(a=>{const i=(0,o.T)(a,t.localize,t.states,g[a.id]),{areaName:r,viaDeviceName:s,viaDeviceAreaName:n}=c(a,t.areas,t.devices,t.states,t.localize,t.language,t.translationMetadata,a.via_device_id?g[a.via_device_id]:void 0),d=a.primary_config_entry?null==e?void 0:e[a.primary_config_entry]:void 0,h=null==d?void 0:d.domain,u=h?(0,l.p$)(t.localize,h):void 0,p=i||t.localize("ui.components.device-picker.unnamed_device");return{id:`${f}${a.id}`,label:"",primary:p,secondary:r,domain:null==d?void 0:d.domain,domain_name:u,search_labels:{deviceName:i,areaName:r||null,domain:h||null,domainName:u||null,viaDeviceName:s||null,viaDeviceArea:n||null},sorting_label:[p,r,u].filter(Boolean).join("_")}})}},22675:function(t,e,a){a.d(e,{HV:function(){return r},Hh:function(){return o}});var i=a(23832);const o="unavailable",r="unknown",s=[o,r,"off"];(0,i.g)(s)},53756:function(t,e,a){a.d(e,{t:function(){return l},w:function(){return d}});a(74423),a(18111),a(22489),a(61701),a(62953);var i=a(71727),o=a(74705),r=a(28978),s=a(15638),n=a(95350);const l=[{name:"search_labels.entityName",weight:10},{name:"search_labels.friendlyName",weight:8},{name:"search_labels.deviceName",weight:7},{name:"search_labels.areaName",weight:6},{name:"search_labels.domainName",weight:6},{name:"search_labels.entityId",weight:3}],d=(t,e,a,l,d,c,h,u,p,f="")=>{let m,v=Object.keys(t.states);return h&&(v=v.filter(t=>h.includes(t))),u&&(v=v.filter(t=>!u.includes(t))),e&&(v=v.filter(t=>e.includes((0,i.m)(t)))),a&&(v=v.filter(t=>!a.includes((0,i.m)(t)))),m=v.map(e=>{const a=t.states[e],l=(0,r.u)(a),[d,c,h]=(0,o.Cf)(a,[{type:"entity"},{type:"device"},{type:"area"}],t.entities,t.devices,t.areas,t.floors),u=(0,n.p$)(t.localize,(0,i.m)(e)),p=(0,s.qC)(t.language,t.translationMetadata.translations),m=d||c||e,v=[h,d?c:void 0].filter(Boolean).join(p?" ◂ ":" ▸ ");return{id:`${f}${e}`,primary:m,secondary:v,domain_name:u,sorting_label:[m,v].filter(Boolean).join("_"),search_labels:{entityName:d||null,deviceName:c||null,areaName:h||null,domainName:u||null,friendlyName:l||null,entityId:e},stateObj:a}}),d&&(m=m.filter(t=>{var e;return t.id===p||(null===(e=t.stateObj)||void 0===e?void 0:e.attributes.device_class)&&d.includes(t.stateObj.attributes.device_class)})),c&&(m=m.filter(t=>{var e;return t.id===p||(null===(e=t.stateObj)||void 0===e?void 0:e.attributes.unit_of_measurement)&&c.includes(t.stateObj.attributes.unit_of_measurement)})),l&&(m=m.filter(t=>t.id===p||t.stateObj&&l(t.stateObj))),m}},68287:function(t,e,a){a.d(e,{z:function(){return o}});a(18111),a(61701),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698),a(62953);var i=a(71727);const o=t=>{const e=t.attributes.entity_id||[],a=[...new Set(e.map(t=>(0,i.m)(t)))];return 1===a.length?a[0]:void 0}},22130:function(t,e,a){a.r(e),a.d(e,{fetchAddonInfo:function(){return _},fetchHassioAddonChangelog:function(){return l},fetchHassioAddonDocumentation:function(){return c},fetchHassioAddonInfo:function(){return n},fetchHassioAddonLogs:function(){return d},fetchHassioAddonsInfo:function(){return s},installHassioAddon:function(){return v},rebuildLocalAddon:function(){return w},reloadHassioAddons:function(){return r},restartHassioAddon:function(){return b},setHassioAddonOption:function(){return h},setHassioAddonSecurity:function(){return m},startHassioAddon:function(){return p},stopHassioAddon:function(){return f},uninstallHassioAddon:function(){return y},updateHassioAddon:function(){return g},validateHassioAddonOption:function(){return u}});a(16280),a(18111),a(20116),a(3362);var i=a(35541),o=a(47351);const r=async t=>{await t.callWS({type:"supervisor/api",endpoint:"/addons/reload",method:"post"})},s=async t=>t.callWS({type:"supervisor/api",endpoint:"/addons",method:"get"}),n=async(t,e)=>t({type:"supervisor/api",endpoint:`/addons/${e}/info`,method:"get"}),l=async(t,e)=>t.callApi("GET",`hassio/addons/${e}/changelog`),d=async(t,e)=>t.callApi("GET",`hassio/addons/${e}/logs`),c=async(t,e)=>t.callApi("GET",`hassio/addons/${e}/documentation`),h=async(t,e,a)=>{const i=await t({type:"supervisor/api",endpoint:`/addons/${e}/options`,method:"post",data:a});if("error"===i.result)throw Error((0,o.VR)(i));return i},u=async(t,e,a)=>t({type:"supervisor/api",endpoint:`/addons/${e}/options/validate`,method:"post",data:a}),p=async(t,e)=>t({type:"supervisor/api",endpoint:`/addons/${e}/start`,method:"post",timeout:null}),f=async(t,e)=>t({type:"supervisor/api",endpoint:`/addons/${e}/stop`,method:"post",timeout:null}),m=async(t,e,a)=>{await t({type:"supervisor/api",endpoint:`/addons/${e}/security`,method:"post",data:a})},v=async(t,e)=>{await t({type:"supervisor/api",endpoint:`/addons/${e}/install`,method:"post",timeout:null})},g=async(t,e,a)=>{await t.callWS({type:"hassio/update/addon",addon:e,backup:a})},b=async(t,e)=>{await t({type:"supervisor/api",endpoint:`/addons/${e}/restart`,method:"post",timeout:null})},y=async(t,e,a)=>{await t({type:"supervisor/api",endpoint:`/addons/${e}/uninstall`,method:"post",timeout:null,data:{remove_config:a}})},_=(t,e,a)=>{var o;return(0,i.X)(t,null!==(o=e.addon)&&void 0!==o&&o.addons.find(t=>t.slug===a)?`/addons/${a}/info`:`/store/addons/${a}`)},w=async(t,e)=>t({type:"supervisor/api",endpoint:`/addons/${e}/rebuild`,method:"post",timeout:null})},47351:function(t,e,a){a.d(e,{PS:function(){return i},Tv:function(){return s},VR:function(){return o},lE:function(){return n}});a(74423),a(3362),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698),a(62953);const i=t=>t.data,o=t=>"object"==typeof t?"object"==typeof t.body?t.body.message||"Unknown error, see supervisor logs":t.body||t.message||"Unknown error, see supervisor logs":t,r=new Set([502,503,504]),s=t=>!!(t&&t.status_code&&r.has(t.status_code))||!(!t||!t.message||!t.message.includes("ERR_CONNECTION_CLOSED")&&!t.message.includes("ERR_CONNECTION_RESET")),n=async(t,e)=>t({type:"supervisor/api",endpoint:`/${e}/stats`,method:"get"})},92457:function(t,e,a){a.d(e,{hW:function(){return m},ke:function(){return h},t0:function(){return v},yJ:function(){return f}});a(46449),a(74423),a(44114),a(93514),a(18111),a(22489),a(20116),a(61701),a(62953);var i=a(70137),o=a(29006),r=a(36312),s=a(25635),n=a(95350),l=a(99774);const d="M2 12C2 16.97 6.03 21 11 21C13.39 21 15.68 20.06 17.4 18.4L15.9 16.9C14.63 18.25 12.86 19 11 19C4.76 19 1.64 11.46 6.05 7.05C10.46 2.64 18 5.77 18 12H15L19 16H19.1L23 12H20C20 7.03 15.97 3 11 3C6.03 3 2 7.03 2 12Z",c=(t,e)=>{const a=e.path.substring(1);let i=a.substring(a.indexOf("/")+1);i=i.indexOf("/")>-1?i.substring(0,i.indexOf("/")):i;const o=i&&t(`ui.dialogs.quick-bar.commands.navigation.${i}`)||e.translationKey&&t(e.translationKey);if(o)return Object.assign(Object.assign({},e),{},{primary:o})},h=(t,e,a={})=>{var i;const n=((t,e,a)=>Object.entries(e).filter(([t])=>!l.qx.includes(t)).map(([e,i])=>{const o=(0,l.Wp)(i),r=(0,l.Q)(i)||"mdi:view-dashboard",s=t(o)||i.title||i.url_path;let n;if(a){const t=a.find(({slug:t})=>t===i.url_path);t&&(n=t.icon?`/api/hassio/addons/${t.slug}/icon`:void 0)}return{primary:s,icon:r,image:n,path:`/${i.url_path}`}}))(t.localize,t.panels,e),d=((t,e={})=>{const a=[],i=Object.values(s.configSections).flat(),r=(0,o.F)(t,i,e);for(const o of r){const e=c(t.localize,o);e&&(a.some(t=>t.path===e.path)||a.push(e))}return a})(t,a),h=[];if(null!==(i=t.user)&&void 0!==i&&i.is_admin&&(0,r.x)(t.config,"hassio")&&(h.push({path:"/config/apps/available",icon_path:"M4 4V6H20V4M4 7L3 12V14H4V20H13C12.95 19.66 12.92 19.31 12.92 18.95C12.92 17.73 13.3 16.53 14 15.53V14H15.54C16.54 13.33 17.71 12.96 18.91 12.96C19.62 12.96 20.33 13.09 21 13.34V12L20 7M6 14H12V18H6M18 15V18H15V20H18V23H20V20H23V18H20V15",primary:t.localize("ui.dialogs.quick-bar.commands.navigation.app_store"),iconColor:"#F1C447"}),e))for(const o of e.filter(t=>t.version))h.push({path:`/config/app/${o.slug}`,image:o.icon?`/api/hassio/addons/${o.slug}/icon`:void 0,primary:t.localize("ui.dialogs.quick-bar.commands.navigation.app_info",{app:o.name}),secondary:t.localize("ui.dialogs.quick-bar.commands.types.app_settings"),iconColor:"#F1C447"});const u=[{path:"",primary:t.localize("ui.dialogs.quick-bar.commands.navigation.shortcuts"),icon_path:"M19,10H17V8H19M19,13H17V11H19M16,10H14V8H16M16,13H14V11H16M16,17H8V15H16M7,10H5V8H7M7,13H5V11H7M8,11H10V13H8M8,8H10V10H8M11,11H13V13H11M11,8H13V10H11M20,5H4C2.89,5 2,5.89 2,7V17A2,2 0 0,0 4,19H20A2,2 0 0,0 22,17V7C22,5.89 21.1,5 20,5Z"}];return p=t.localize,[...n,...d,...h,...u].map((t,e)=>{const a=p("ui.dialogs.quick-bar.commands.types.navigation");return Object.assign({id:`navigation_${e}_${t.path}`,icon_path:t.iconPath||"M21 3L3 10.53V11.5L9.84 14.16L12.5 21H13.46L21 3Z",secondary:t.secondary||a,sorting_label:`${t.primary}_${a}`},t)});var p},u=t=>{const e=(0,i.A)(t,"reload").map(e=>({primary:t.localize(`ui.dialogs.quick-bar.commands.reload.${e}`)||t.localize("ui.dialogs.quick-bar.commands.reload.reload",{domain:(0,n.p$)(t.localize,e)}),domain:e,action:"reload",icon_path:d,secondary:t.localize("ui.dialogs.quick-bar.commands.types.reload")}));return e.push({primary:t.localize("ui.dialogs.quick-bar.commands.reload.themes"),domain:"frontend",action:"reload_themes",icon_path:d,secondary:t.localize("ui.dialogs.quick-bar.commands.types.reload")}),e.push({primary:t.localize("ui.dialogs.quick-bar.commands.reload.core"),domain:"homeassistant",action:"reload_core_config",icon_path:d,secondary:t.localize("ui.dialogs.quick-bar.commands.types.reload")}),e.push({primary:t.localize("ui.dialogs.quick-bar.commands.reload.all"),domain:"homeassistant",action:"reload_all",icon_path:d,secondary:t.localize("ui.dialogs.quick-bar.commands.types.reload")}),e.map((t,e)=>Object.assign(Object.assign({},t),{},{id:`command_${e}_${t.primary}`,sorting_label:`${t.primary}_${t.secondary}_${t.domain}`}))},p=t=>["restart","stop"].map((e,a)=>{const i=t.localize("ui.dialogs.quick-bar.commands.home_assistant_control.perform_action",{action:t.localize(`ui.dialogs.quick-bar.commands.home_assistant_control.${e}`)}),o=t.localize("ui.dialogs.quick-bar.commands.types.home_assistant_control");return{id:`server_control_${a}_${e}`,primary:i,domain:"homeassistant",icon_path:"M13,19H14A1,1 0 0,1 15,20H22V22H15A1,1 0 0,1 14,23H10A1,1 0 0,1 9,22H2V20H9A1,1 0 0,1 10,19H11V17H4A1,1 0 0,1 3,16V12A1,1 0 0,1 4,11H20A1,1 0 0,1 21,12V16A1,1 0 0,1 20,17H13V19M4,3H20A1,1 0 0,1 21,4V8A1,1 0 0,1 20,9H4A1,1 0 0,1 3,8V4A1,1 0 0,1 4,3M9,7H10V5H9V7M9,15H10V13H9V15M5,5V7H7V5H5M5,13V15H7V13H5Z",secondary:o,sorting_label:`${i}_${o}_${e}`,action:e}}),f=t=>[...u(t),...p(t)],m=[{name:"primary",weight:10},{name:"domain",weight:8},{name:"secondary",weight:6}],v=[{name:"primary",weight:10},{name:"path",weight:8},{name:"secondary",weight:6}]},35541:function(t,e,a){a.d(e,{X:function(){return r}});a(3362);var i=a(62384),o=a(47351);const r=async(t,e,a)=>{var r;return(0,i.v)(t.config.version,2021,2,4)?t.callWS({type:"supervisor/api",endpoint:e,method:(null==a?void 0:a.method)||"get",timeout:null!==(r=null==a?void 0:a.timeout)&&void 0!==r?r:null,data:null==a?void 0:a.data}):(0,o.PS)(await t.callApi((a.method||"get").toUpperCase(),`hassio${e}`,null==a?void 0:a.data))}},89704:function(t,e,a){a.a(t,async function(t,i){try{a.r(e),a.d(e,{QuickBar:function(){return J}});a(44114),a(26910),a(18111),a(61701),a(13579),a(53921),a(3362),a(27495),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698),a(62953);var o=a(40445),r=a(78648),s=a(5124),n=a(67576),l=a(22786),d=a(36312),c=a(1087),h=a(91926),u=a(52220),p=a(74281),f=a(14693),m=(a(75064),a(59174)),v=(a(47680),a(49639)),g=a(65829),b=(a(67094),a(67505),a(49852)),y=a(77423),_=a(31422),w=a(53756),C=a(22130),x=a(92457),$=a(59653),k=a(14503),L=a(22348),S=a(41570),M=a(65063),A=a(41631),H=a(34779),E=t([p,f,m,v,g]);[p,f,m,v,g]=E.then?(await E)():E;let T,z,O,q,I,j,V,F,P,B,D,Z,R,N,W,U=t=>t;const G="M3 6H21V4H3C1.9 4 1 4.9 1 6V18C1 19.1 1.9 20 3 20H7V18H3V6M13 12H9V13.78C8.39 14.33 8 15.11 8 16C8 16.89 8.39 17.67 9 18.22V20H13V18.22C13.61 17.67 14 16.88 14 16S13.61 14.33 13 13.78V12M11 17.5C10.17 17.5 9.5 16.83 9.5 16S10.17 14.5 11 14.5 12.5 15.17 12.5 16 11.83 17.5 11 17.5M22 8H16C15.5 8 15 8.5 15 9V19C15 19.5 15.5 20 16 20H22C22.5 20 23 19.5 23 19V9C23 8.5 22.5 8 22 8M21 18H17V10H21V18Z",Y="________";class J extends s.WF{get _showEntityId(){var t;return null===(t=this.hass.userData)||void 0===t?void 0:t.showEntityIdPicker}async showDialog(t){var e;this._translationsLoaded||(this._fetchTranslations(),this._translationsLoaded=!0),this._initialize(),this._selectedSection=(0,H.XJ)(this.hass.user,t.mode),this._showHint=null!==(e=t.showHint)&&void 0!==e&&e,this._relatedResult=t.contextItem?t.related:void 0,this._open=!0}async _fetchTranslations(){await this.hass.loadBackendTranslation("title")}async _initialize(){var t;try{const t=await(0,y.VN)(this.hass);this._configEntryLookup=Object.fromEntries(t.map(t=>[t.entry_id,t])),this._navigationFilterOptions={hasBluetoothConfigEntries:t.some(t=>"bluetooth"===t.domain)}}catch(e){console.error("Error fetching config entries for quick bar",e)}if(null!==(t=this.hass.user)&&void 0!==t&&t.is_admin&&(0,d.x)(this.hass.config,"hassio"))try{const t=await(0,C.fetchHassioAddonsInfo)(this.hass);this._addons=t.addons}catch(e){console.error("Error fetching hassio addons for quick bar",e)}this._loading=!1}updated(t){t.has("_loading")&&!this._loading&&this._opened&&requestAnimationFrame(()=>{var t;null===(t=this._comboBox)||void 0===t||t.focus()})}closeDialog(){return this._open=!1,!0}render(){var t,e;if(!this._open&&!this._opened)return s.s6;const a=[{id:"navigate",label:this.hass.localize("ui.dialogs.quick-bar.navigate_title")},...null!==(t=this.hass.user)&&void 0!==t&&t.is_admin?["separator",{id:"command",label:this.hass.localize("ui.dialogs.quick-bar.commands_title")}]:[],"separator",{id:"entity",label:this.hass.localize("ui.components.target-picker.type.entities")},...null!==(e=this.hass.user)&&void 0!==e&&e.is_admin?[{id:"device",label:this.hass.localize("ui.components.target-picker.type.devices")},{id:"area",label:this.hass.localize("ui.components.target-picker.type.areas")}]:[]];return(0,s.qy)(T||(T=U` <ha-adaptive-dialog without-header flexcontent aria-label="${0}" .open="${0}" hideActions @wa-show="${0}" @wa-after-show="${0}" @closed="${0}"> ${0} ${0} </ha-adaptive-dialog> `),this.hass.localize("ui.dialogs.quick-bar.title"),this._open,this._showTriggered,this._dialogOpened,this._dialogClosed,!this._loading&&this._opened?(0,s.qy)(z||(z=U`<ha-picker-combo-box id="combo-box" @index-selected="${0}" .notFoundLabel="${0}" .label="${0}" .getItems="${0}" .rowRenderer="${0}" mode="dialog" .sections="${0}" .selectedSection="${0}" .sectionTitleFunction="${0}" clearable></ha-picker-combo-box>`),this._handleItemSelected,this.hass.localize("ui.dialogs.quick-bar.nothing_found"),this.hass.localize("ui.dialogs.quick-bar.title"),this._getItems,this._renderRow,a,this._selectedSection,this._sectionTitleFunction):s.s6,this._showHint?(0,s.qy)(O||(O=U`<ha-tip slot="footer">${0}</ha-tip>`),this.hass.localize("ui.tips.key_shortcut_quick_search",{keyboard_shortcut:(0,s.qy)(q||(q=U`<button class="link" @click="${0}"> ${0} </button>`),this._openShortcutDialog,this.hass.localize("ui.tips.keyboard_shortcut")),modifier:S.c?"⌘":"Ctrl"})):s.s6)}_filterGroup(t,e,a,i){const o=this._fuseIndexes[t](e);return(0,$.x)(e,a,i,t=>t.id,o)}_navigate(t,e=!1){e?window.open(t,"_blank","noreferrer"):(0,h.oo)(t)}async _handleItemSelected(t){if(!this._itemSelected&&this._comboBox&&this._comboBox.virtualizerElement){const{index:e,newTab:a}=t.detail,i=this._comboBox.virtualizerElement.items[e];if(this._itemSelected=!0,i&&"stateObj"in i)return this.closeDialog(),void(0,c.r)(this,"hass-more-info",{entityId:i.search_labels.entityId});if(i&&i.id.startsWith(`device${Y}`)){const t=`/config/devices/device/${i.id.split(Y)[1]}`;return this.closeDialog(),void this._navigate(t,a)}if(i&&i.id.startsWith(`area${Y}`)){const t=`/config/areas/area/${i.id.split(Y)[1]}`;return this.closeDialog(),void this._navigate(t,a)}if(i&&"action"in i){const t=i;if("restart"===t.action||"stop"===t.action){if(!(await(0,M.dk)(this,{title:this.hass.localize(`ui.dialogs.restart.${t.action}.confirm_title`),text:this.hass.localize(`ui.dialogs.restart.${t.action}.confirm_description`),confirmText:this.hass.localize(`ui.dialogs.restart.${t.action}.confirm_action`),destructive:!0})))return;return this.hass.callService(t.domain,t.action),void this.closeDialog()}const a=this._comboBox.virtualizerElement.querySelector(`#list-item-${e}`);return a&&(a.style.backgroundColor="var(--ha-color-fill-primary-normal-resting)",a.prepend(this._getRowSpinner())),await this.hass.callService(t.domain,t.action),void this.closeDialog()}if(i&&"path"in i){if(this.closeDialog(),!i.path)return void(0,A.H)(this);const t=i.path;this._navigate(t,a)}}}_openShortcutDialog(t){t.preventDefault(),(0,A.H)(this),this.closeDialog()}static get styles(){return[k.og,(0,s.AH)(I||(I=U`:host{--dialog-surface-margin-top:var(--ha-space-10);--ha-dialog-min-height:620px;--ha-bottom-sheet-height:calc(
            100vh - max(var(--safe-area-inset-top), 48px)
          );--ha-bottom-sheet-height:calc(
            100dvh - max(var(--safe-area-inset-top), 48px)
          );--ha-bottom-sheet-max-height:calc(
            100vh - max(var(--safe-area-inset-top), 48px)
          );--ha-bottom-sheet-max-height:calc(
            100dvh - max(var(--safe-area-inset-top), 48px)
          );--dialog-content-padding:0;--safe-area-inset-bottom:0px;--ha-dialog-show-duration:var(--ha-animation-duration-instant)}ha-tip{display:flex;justify-content:center;align-items:center;color:var(--secondary-text-color);gap:var(--ha-space-1)}ha-tip a{color:var(--primary-color)}@media all and (max-width:450px),all and (max-height:690px){ha-tip{display:none}}`))]}constructor(...t){super(...t),this._open=!1,this._loading=!0,this._showHint=!1,this._opened=!1,this._configEntryLookup={},this._navigationFilterOptions={},this._translationsLoaded=!1,this._itemSelected=!1,this._dialogOpened=async()=>{this._opened=!0,requestAnimationFrame(()=>{var t;this.hass&&(0,L.V)(this.hass.auth.external)?this.hass.auth.external.fireMessage({type:"focus_element",payload:{element_id:"combo-box"}}):null===(t=this._comboBox)||void 0===t||t.focus()})},this._showTriggered=()=>{this._opened=!1},this._dialogClosed=()=>{this._selectedSection=void 0,this._opened=!1,this._open=!1,this._itemSelected=!1,(0,c.r)(this,"dialog-closed",{dialog:this.localName})},this._renderRow=t=>{var e,a;if(!t)return s.s6;const i=t.icon_path||G;return(0,s.qy)(j||(j=U` <ha-combo-box-item tabindex="-1" type="button" style="--mdc-icon-size:24px"> ${0} <span slot="headline">${0}</span> ${0} ${0} ${0} </ha-combo-box-item> `),"stateObj"in t&&t.stateObj?(0,s.qy)(V||(V=U` <state-badge slot="start" .stateObj="${0}" .hass="${0}"></state-badge> `),t.stateObj,this.hass):"domain"in t&&t.domain?(0,s.qy)(F||(F=U` <ha-domain-icon slot="start" style="margin:var(--ha-space-1)" .domain="${0}" brand-fallback></ha-domain-icon> `),t.domain):"image"in t&&t.image?(0,s.qy)(P||(P=U` <img slot="start" alt="${0}" .src="${0}" style="${0}"> `),null!==(e=t.primary)&&void 0!==e?e:"Unknown",t.image,"iconColor"in t&&t.iconColor?`background-color: ${t.iconColor}; padding: 4px; border-radius: var(--ha-border-radius-circle); width: 24px; height: 24px`:""):t.icon?(0,s.qy)(B||(B=U`<ha-icon style="margin:var(--ha-space-1)" slot="start" .icon="${0}"></ha-icon>`),t.icon):"iconColor"in t&&t.iconColor?(0,s.qy)(D||(D=U` <div slot="start" style="${0}"> <ha-svg-icon style="color:var(--white-color);--mdc-icon-size:24px" .path="${0}"></ha-svg-icon> </div> `),`padding: 4px; border-radius: var(--ha-border-radius-circle); background-color: ${t.iconColor};`,i):(0,s.qy)(Z||(Z=U` <ha-svg-icon style="margin:var(--ha-space-1)" slot="start" .path="${0}"></ha-svg-icon> `),i),t.primary,t.secondary?(0,s.qy)(R||(R=U`<span slot="supporting-text">${0}</span>`),t.secondary):s.s6,"stateObj"in t&&this._showEntityId?(0,s.qy)(N||(N=U` <span slot="supporting-text" class="code"> ${0} </span> `),null===(a=t.stateObj)||void 0===a?void 0:a.entity_id):s.s6,!("domain_name"in t)||"stateObj"in t&&this._showEntityId?s.s6:(0,s.qy)(W||(W=U` <div slot="trailing-supporting-text" class="domain"> ${0} </div> `),t.domain_name))},this._getRowSpinner=(0,l.A)(()=>{const t=document.createElement("ha-spinner");return t.size="small",t.style.marginRight="16px",t.style.position="absolute",t.style.right="0",t}),this._sectionTitleFunction=({firstIndex:t,lastIndex:e,firstItem:a,secondItem:i,itemsCount:o})=>{if(void 0===a||void 0===i||"string"==typeof a||"string"==typeof i&&"padding"!==i||0===t&&e===o-1)return;return"action"in a?this.hass.localize("ui.dialogs.quick-bar.commands_title"):"path"in a?this.hass.localize("ui.dialogs.quick-bar.navigate_title"):"stateObj"in a?this.hass.localize("ui.components.target-picker.type.entities"):"domain"in a?this.hass.localize("ui.components.target-picker.type.devices"):this.hass.localize("ui.components.target-picker.type.areas")},this._getItems=(t,e)=>(this._selectedSection=e,this._getItemsMemoized(this._configEntryLookup,this._relatedResult,t,this._selectedSection)),this._getItemsMemoized=(0,l.A)((t,e,a,i)=>{var o,r,s;const n=[],l=this._getRelatedIdSets(e);if(!i||"navigate"===i){let t=this._generateNavigationCommandsMemoized(this.hass,this._addons,this._navigationFilterOptions).sort(this._sortBySortingLabel);a&&(t=this._filterGroup("navigate",t,a,x.t0)),!i&&t.length&&n.push(this.hass.localize("ui.dialogs.quick-bar.navigate_title")),n.push(...t)}if(null!==(o=this.hass.user)&&void 0!==o&&o.is_admin&&(!i||"command"===i)){let t=this._generateActionCommandsMemoized(this.hass).sort(this._sortBySortingLabel);a&&(t=this._filterGroup("command",t,a,x.hW)),!i&&t.length&&n.push(this.hass.localize("ui.dialogs.quick-bar.commands_title")),n.push(...t)}if(!i||"entity"===i){let t=this._getEntitiesMemoized(this.hass);l.entities.size>0&&(t=t.map(t=>{var e;return Object.assign(Object.assign({},t),{},{isRelated:l.entities.has((null===(e=t.stateObj)||void 0===e?void 0:e.entity_id)||"")})})),t=a?this._sortRelatedFirst(this._filterGroup("entity",t,a,w.t)):this._sortRelatedByLabel(t),!i&&t.length&&n.push(this.hass.localize("ui.components.target-picker.type.entities")),n.push(...t)}if(null!==(r=this.hass.user)&&void 0!==r&&r.is_admin&&(!i||"device"===i)){let e=this._getDevicesMemoized(this.hass,t);l.devices.size>0&&(e=e.map(t=>{const e=t.id.split(Y)[1];return Object.assign(Object.assign({},t),{},{isRelated:l.devices.has(e||"")})})),e=a?this._sortRelatedFirst(this._filterGroup("device",e,a,_._o)):this._sortRelatedByLabel(e),!i&&e.length&&n.push(this.hass.localize("ui.components.target-picker.type.devices")),n.push(...e)}if(null!==(s=this.hass.user)&&void 0!==s&&s.is_admin&&(!i||"area"===i)){let t=this._getAreasMemoized(this.hass);l.areas.size>0&&(t=t.map(t=>{const e=t.id.split(Y)[1];return Object.assign(Object.assign({},t),{},{isRelated:l.areas.has(e||"")})})),t=a?this._sortRelatedFirst(this._filterGroup("area",t,a,b.P)):this._sortRelatedByLabel(t),!i&&t.length&&n.push(this.hass.localize("ui.components.target-picker.type.areas")),n.push(...t)}return n}),this._getRelatedIdSets=(0,l.A)(t=>({entities:new Set((null==t?void 0:t.entity)||[]),devices:new Set((null==t?void 0:t.device)||[]),areas:new Set((null==t?void 0:t.area)||[])})),this._getEntitiesMemoized=(0,l.A)(t=>(0,w.w)(t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,`entity${Y}`)),this._getDevicesMemoized=(0,l.A)((t,e)=>(0,_.oG)(t,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,`device${Y}`)),this._getAreasMemoized=(0,l.A)(t=>(0,b.j)(t.areas,t.floors,t.devices,t.entities,t.states,void 0,void 0,void 0,void 0,void 0,void 0,`area${Y}`)),this._generateNavigationCommandsMemoized=(0,l.A)((t,e,a)=>(0,x.ke)(t,e,a)),this._generateActionCommandsMemoized=(0,l.A)(x.yJ),this._createFuseIndex=(t,e)=>r.A.createIndex(e,t),this._fuseIndexes={entity:(0,l.A)(t=>this._createFuseIndex(t,w.t)),device:(0,l.A)(t=>this._createFuseIndex(t,_._o)),area:(0,l.A)(t=>this._createFuseIndex(t,b.P)),command:(0,l.A)(t=>this._createFuseIndex(t,x.hW)),navigate:(0,l.A)(t=>this._createFuseIndex(t,x.t0))},this._sortBySortingLabel=(t,e)=>(0,u.SH)(t.sorting_label,e.sorting_label,this.hass.locale.language),this._sortRelatedByLabel=t=>[...t].sort((t,e)=>t.isRelated&&!e.isRelated?-1:!t.isRelated&&e.isRelated?1:this._sortBySortingLabel(t,e)),this._sortRelatedFirst=t=>[...t].sort((t,e)=>{const a=Boolean(t.isRelated);return a===Boolean(e.isRelated)?0:a?-1:1})}}(0,o.Cg)([(0,n.MZ)({attribute:!1})],J.prototype,"hass",void 0),(0,o.Cg)([(0,n.wk)()],J.prototype,"_open",void 0),(0,o.Cg)([(0,n.wk)()],J.prototype,"_loading",void 0),(0,o.Cg)([(0,n.wk)()],J.prototype,"_showHint",void 0),(0,o.Cg)([(0,n.wk)()],J.prototype,"_selectedSection",void 0),(0,o.Cg)([(0,n.wk)()],J.prototype,"_opened",void 0),(0,o.Cg)([(0,n.wk)()],J.prototype,"_relatedResult",void 0),(0,o.Cg)([(0,n.P)("ha-picker-combo-box")],J.prototype,"_comboBox",void 0),J=(0,o.Cg)([(0,n.EM)("ha-quick-bar")],J),i()}catch(T){i(T)}})},59992:function(t,e,a){a.a(t,async function(t,i){try{a.d(e,{V:function(){return f}});a(62953);var o=a(40445),r=a(88696),s=a(5124),n=a(6412),l=a(67576),d=t([r]);r=(d.then?(await d)():d)[0];let c,h,u=t=>t;const p=t=>void 0===t?[]:Array.isArray(t)?t:[t],f=t=>{class e extends t{get scrollableElement(){return e.DEFAULT_SCROLLABLE_ELEMENT}firstUpdated(t){var e;null===(e=super.firstUpdated)||void 0===e||e.call(this,t),this.scrollableElement&&this._updateScrollableState(this.scrollableElement),this._attachScrollableElement()}updated(t){var e;null===(e=super.updated)||void 0===e||e.call(this,t),this._attachScrollableElement()}disconnectedCallback(){this._detachScrollableElement(),this._contentScrolled=!1,this._contentScrollable=!1,super.disconnectedCallback()}renderScrollableFades(t=!1){return(0,s.qy)(c||(c=u` <div class="${0}"></div> <div class="${0}"></div> `),(0,n.H)({"fade-top":!0,rounded:t,visible:this._contentScrolled}),(0,n.H)({"fade-bottom":!0,rounded:t,visible:this._contentScrollable}))}static get styles(){var t;const e=Object.getPrototypeOf(this);return[...p(null!==(t=null==e?void 0:e.styles)&&void 0!==t?t:[]),(0,s.AH)(h||(h=u`.fade-bottom,.fade-top{position:absolute;left:0;right:0;height:var(--ha-space-2);pointer-events:none;transition:opacity 180ms ease-in-out;border-radius:var(--ha-border-radius-square);opacity:0;background:linear-gradient(to bottom,var(--ha-color-shadow-scrollable-fade),transparent)}.fade-top{top:0}.fade-bottom{bottom:0;transform:rotate(180deg)}.fade-bottom.visible,.fade-top.visible{opacity:1}.fade-bottom.rounded,.fade-top.rounded{border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}.fade-top.rounded{border-top-left-radius:var(--ha-border-radius-square);border-top-right-radius:var(--ha-border-radius-square)}.fade-bottom.rounded{border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}`))]}_attachScrollableElement(){const t=this.scrollableElement;t!==this._scrollTarget&&(this._detachScrollableElement(),t&&(this._scrollTarget=t,t.addEventListener("scroll",this._onScroll,{passive:!0}),this._resize.observe(t),this._updateScrollableState(t)))}_detachScrollableElement(){var t,e;this._scrollTarget&&(this._scrollTarget.removeEventListener("scroll",this._onScroll),null===(t=(e=this._resize).unobserve)||void 0===t||t.call(e,this._scrollTarget),this._scrollTarget=void 0)}_updateScrollableState(t){const e=parseFloat(getComputedStyle(t).getPropertyValue("--safe-area-inset-bottom"))||0,{scrollHeight:a=0,clientHeight:i=0,scrollTop:o=0}=t;this._contentScrollable=a-i>o+e+this.scrollFadeSafeAreaPadding}constructor(...t){super(...t),this._contentScrolled=!1,this._contentScrollable=!1,this._onScroll=t=>{var e;const a=t.currentTarget;this._contentScrolled=(null!==(e=a.scrollTop)&&void 0!==e?e:0)>this.scrollFadeThreshold,this._updateScrollableState(a)},this._resize=new r.P(this,{target:null,callback:t=>{var e;const a=null===(e=t[0])||void 0===e?void 0:e.target;a&&this._updateScrollableState(a)}}),this.scrollFadeSafeAreaPadding=4,this.scrollFadeThreshold=4}}return e.DEFAULT_SCROLLABLE_ELEMENT=null,(0,o.Cg)([(0,l.wk)()],e.prototype,"_contentScrolled",void 0),(0,o.Cg)([(0,l.wk)()],e.prototype,"_contentScrollable",void 0),e};i()}catch(c){i(c)}})},86030:function(t,e,a){a.d(e,{B:function(){return i},a:function(){return o}});a(72712),a(94490),a(18111),a(18237),a(42762),a(62953);function i(t){return Array.isArray(t)?t.reverse().reduce((t,e)=>`var(${e}${t?`, ${t}`:""})`,void 0):`var(${t})`}function o(t,e){if(Array.isArray(t))for(const a of t){const t=o(a,e);if(t)return t}else if(t.endsWith("-color"))return e.getPropertyValue(t).trim()||void 0}},53580:function(t,e,a){a.d(e,{mdiHomeAssistant:function(){return i}});const i="m12.151 1.5882c-.3262 0-.6523.1291-.8996.3867l-8.3848 8.7354c-.0619.0644-.1223.1368-.1807.2154-.0588.0789-.1151.1638-.1688.2534-.2593.4325-.4552.9749-.5232 1.4555-.0026.018-.0076.0369-.0094.0548-.0121.0987-.0184.1944-.0184.2857v8.0124a1.2731 1.2731 0 001.2731 1.2731h7.8313l-3.4484-3.593a1.7399 1.7399 0 111.0803-1.125l2.6847 2.7972v-10.248a1.7399 1.7399 0 111.5276-0v7.187l2.6702-2.782a1.7399 1.7399 0 111.0566 1.1505l-3.7269 3.8831v2.7299h8.174a1.2471 1.2471 0 001.2471-1.2471v-8.0375c0-.0912-.0059-.1868-.0184-.2855-.0603-.4935-.2636-1.0617-.5326-1.5105-.0537-.0896-.1101-.1745-.1684-.253-.0588-.079-.1191-.1513-.181-.2158l-8.3848-8.7363c-.2473-.2577-.5735-.3866-.8995-.3864"},69235:function(t,e,a){a.a(t,async function(t,e){try{a(3362),a(62953);"function"!=typeof window.ResizeObserver&&(window.ResizeObserver=(await a.e(71055).then(a.bind(a,52370))).default),e()}catch(i){e(i)}},1)},14503:function(t,e,a){a.d(e,{RF:function(){return u},dp:function(){return m},kO:function(){return f},nA:function(){return p},og:function(){return h}});var i=a(5124);let o,r,s,n,l,d,c=t=>t;const h=(0,i.AH)(o||(o=c`button.link{background:0 0;color:inherit;border:none;padding:0;font:inherit;text-align:left;text-decoration:underline;cursor:pointer;outline:0}`)),u=(0,i.AH)(r||(r=c`:host{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-m);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-normal)}app-header div[sticky]{height:48px}app-toolbar [main-title]{margin-left:20px;margin-inline-start:20px;margin-inline-end:initial}.header{transition:box-shadow .2s linear,width var(--ha-animation-duration-normal) ease,padding-left var(--ha-animation-duration-normal) ease,padding-right var(--ha-animation-duration-normal) ease}@media (prefers-reduced-motion:reduce){.header{transition:box-shadow .2s linear}}h1{font-family:var(--ha-font-family-heading);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-2xl);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-condensed)}h2{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:var(--ha-font-size-xl);font-weight:var(--ha-font-weight-medium);line-height:var(--ha-line-height-normal)}h3{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-l);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-normal)}a{color:var(--primary-color)}.secondary{color:var(--secondary-text-color)}.error{color:var(--error-color)}.warning{color:var(--error-color)}${0} .card-actions a{text-decoration:none}.card-actions .warning{--mdc-theme-primary:var(--error-color)}.layout.horizontal,.layout.vertical{display:flex}.layout.inline{display:inline-flex}.layout.horizontal{flex-direction:row}.layout.vertical{flex-direction:column}.layout.wrap{flex-wrap:wrap}.layout.no-wrap{flex-wrap:nowrap}.layout.center,.layout.center-center{align-items:center}.layout.bottom{align-items:flex-end}.layout.center-center,.layout.center-justified{justify-content:center}.flex{flex:1;flex-basis:0.000000001px}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.layout.justified{justify-content:space-between}`),h),p=(0,i.AH)(s||(s=c`ha-adaptive-dialog,ha-dialog{--mdc-dialog-min-width:400px;--mdc-dialog-max-width:600px;--mdc-dialog-max-width:min(600px, 95vw);--justify-action-buttons:space-between;--dialog-container-padding:var(--safe-area-inset-top, 0) var(--safe-area-inset-right, 0) var(--safe-area-inset-bottom, 0) var(--safe-area-inset-left, 0);--dialog-surface-padding:0px}ha-adaptive-dialog .form,ha-dialog .form{color:var(--primary-text-color)}a{color:var(--primary-color)}@media all and (max-width:450px),all and (max-height:500px){ha-adaptive-dialog,ha-dialog{--mdc-dialog-min-width:100vw;--mdc-dialog-max-width:100vw;--mdc-dialog-min-height:100vh;--mdc-dialog-min-height:100svh;--mdc-dialog-max-height:100vh;--mdc-dialog-max-height:100svh;--dialog-container-padding:0px;--dialog-surface-padding:var(--safe-area-inset-top, 0) var(--safe-area-inset-right, 0) var(--safe-area-inset-bottom, 0) var(--safe-area-inset-left, 0);--vertical-align-dialog:flex-end}ha-dialog{--ha-dialog-border-radius:var(--ha-border-radius-square)}}.error{color:var(--error-color)}`)),f=(0,i.AH)(n||(n=c`ha-adaptive-dialog,ha-dialog{--vertical-align-dialog:flex-start;--dialog-surface-margin-top:var(--ha-space-10);--mdc-dialog-max-height:calc(
      100vh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
          --safe-area-inset-y,
          0px
        )
    );--mdc-dialog-max-height:calc(
      100svh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
          --safe-area-inset-y,
          0px
        )
    );--ha-dialog-max-height:calc(
      100vh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
          --safe-area-inset-y,
          0px
        )
    );--ha-dialog-max-height:calc(
      100svh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
          --safe-area-inset-y,
          0px
        )
    )}@media all and (max-width:450px),all and (max-height:500px){ha-adaptive-dialog,ha-dialog{--dialog-surface-margin-top:0px;--mdc-dialog-min-height:100vh;--mdc-dialog-min-height:100svh;--mdc-dialog-max-height:100vh;--mdc-dialog-max-height:100svh;--ha-dialog-max-height:100vh;--ha-dialog-max-height:100svh}}`)),m=(0,i.AH)(l||(l=c`.ha-scrollbar::-webkit-scrollbar{width:.4rem;height:.4rem}.ha-scrollbar::-webkit-scrollbar-thumb{border-radius:var(--ha-border-radius-sm);background:var(--scrollbar-thumb-color)}.ha-scrollbar{overflow-y:auto;scrollbar-color:var(--scrollbar-thumb-color) transparent;scrollbar-width:thin}`));(0,i.AH)(d||(d=c`body{background-color:var(--primary-background-color);color:var(--primary-text-color);height:calc(100vh - 32px);width:100vw}`))},85614:function(t,e,a){a.d(e,{i:function(){return i}});a(3362),a(62953);const i=async()=>{await Promise.all([a.e(38085),a.e(22309)]).then(a.bind(a,40772))}},22348:function(t,e,a){a.d(e,{V:function(){return o}});var i=a(37177);const o=t=>!!t&&i.n},41570:function(t,e,a){a.d(e,{c:function(){return i}});a(27495);const i=/Mac/i.test(navigator.userAgent)},37177:function(t,e,a){a.d(e,{n:function(){return i}});a(27495);const i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)},88438:function(t,e,a){a.d(e,{C:function(){return i}});const i="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}}]);