iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
43 lines • 102 kB
JavaScript
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[49207],{69558:function(e,t,a){a.d(t,{_:function(){return r}});a(16280),a(18111),a(7588),a(62953);var i=a(5124),o=a(54495);const r=(0,o.u$)(class extends o.WL{update(e,[t,a]){return this._element&&this._element.localName===t?(a&&Object.entries(a).forEach(([e,t])=>{this._element[e]=t}),i.c0):this.render(t,a)}render(e,t){return this._element=document.createElement(e),t&&Object.entries(t).forEach(([e,t])=>{this._element[e]=t}),this._element}constructor(e){if(super(e),e.type!==o.OA.CHILD)throw new Error("dynamicElementDirective can only be used in content bindings")}})},81816:function(e,t,a){a.d(t,{aH:function(){return s},cx:function(){return n},es:function(){return d}});var i=a(37981),o=a(28978),r=a(79461);const s=(e,t,a)=>{const i=t[e.entity_id];return i?n(i,a):(0,o.u)(e)},n=(e,t,a)=>{const s=e.name||("original_name"in e&&null!=e.original_name?String(e.original_name):void 0),n=e.device_id?t[e.device_id]:void 0;if(!n)return s||(a?(0,o.u)(a):void 0);const d=(0,i.xn)(n);return d!==s?d&&s&&(0,r.p)(s,d)||s:void 0},d=(e,t,a)=>!s(e,t,a)},74705:function(e,t,a){a.d(t,{Bj:function(){return p},Cf:function(){return u},uU:function(){return h}});a(18111),a(81148),a(22489),a(61701),a(13579),a(62953);if(66649!=a.j)var i=a(44537);var o=a(15638),r=a(65522),s=a(37981),n=a(81816),d=a(55931),l=a(28978),c=a(28455);const h=(e,t,a,o,r,s,d)=>{var c;if("string"==typeof t)return t;if(!t)return(0,l.u)(e);let h=(0,i.e)(t);const p=null!==(c=null==d?void 0:d.separator)&&void 0!==c?c:" ";if(h.every(e=>"text"===e.type))return h.map(e=>e.text).join(p);if((0,n.es)(e,a,o)){h.some(e=>"device"===e.type)||(h=h.map(e=>"entity"===e.type?{type:"device"}:e))}const v=u(e,h,a,o,r,s);return 1===v.length?v[0]||"":v.filter(e=>e).join(p)},u=(e,t,a,i,o,l)=>{const{device:h,area:u,floor:p}=(0,c.ln)(e,a,i,o,l);return t.map(t=>{switch(t.type){case"entity":return(0,n.aH)(e,a,i);case"device":return h?(0,s.xn)(h):void 0;case"area":return u?(0,r.A)(u):void 0;case"floor":return p?(0,d.X)(p):void 0;case"text":return t.text;default:return""}})},p=(e,t)=>{const[a,i,r]=u(t,[{type:"entity"},{type:"device"},{type:"area"}],e.entities,e.devices,e.areas,e.floors),s=(0,o.qC)(e.language,e.translationMetadata.translations);return{primary:a||i||t.entity_id,secondary:[r,a?i:void 0].filter(Boolean).join(s?" ◂ ":" ▸ ")||void 0}}},69093:function(e,t,a){a.d(t,{t:function(){return o}});var i=a(71727);const o=e=>(0,i.m)(e.entity_id)},47129:function(e,t,a){a.d(t,{a:function(){return r}});a(74423);var i=a(22675),o=a(71727);function r(e,t){const a=(0,o.m)(e.entity_id),r=void 0!==t?t:null==e?void 0:e.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(e,t,a){a.d(t,{ZK:function(){return u},gf:function(){return h},mT:function(){return v},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),d=a(47129);const l=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=(e,t)=>{if((void 0!==t?t:null==e?void 0:e.state)===i.Hh)return"var(--state-unavailable-color)";const a=p(e,t);return a?(0,r.B)(a):void 0},h=(e,t,a)=>{const i=void 0!==a?a:t.state,o=(0,d.a)(t,a);return u(e,t.attributes.device_class,i,o)},u=(e,t,a,i)=>{const o=[],r=(0,s.Y)(a,"_"),n=i?"active":"inactive";return t&&o.push(`--state-${e}-${t}-${r}-color`),o.push(`--state-${e}-${r}-color`,`--state-${e}-${n}-color`,`--state-${n}-color`),o},p=(e,t)=>{const a=void 0!==t?t:null==e?void 0:e.state,i=(0,n.m)(e.entity_id),r=e.attributes.device_class;if("sensor"===i&&"battery"===r){const e=(e=>{const t=Number(e);if(!isNaN(t))return t>=70?"--state-sensor-battery-high-color":t>=30?"--state-sensor-battery-medium-color":"--state-sensor-battery-low-color"})(a);if(e)return[e]}if("group"===i){const a=(0,o.z)(e);if(a&&l.has(a))return h(a,e,t)}if(l.has(i))return h(i,e,t)},v=e=>{if(e.attributes.brightness&&"plant"!==(0,n.m)(e.entity_id)){return`brightness(${(e.attributes.brightness+245)/5}%)`}return""}},82286:function(e,t,a){a.d(t,{$:function(){return i}});const i=(e,t)=>o(e.attributes,t),o=(e,t)=>0!==(e.supported_features&t)},78649:function(e,t,a){a.d(t,{n:function(){return o}});a(27495);const i=/^(\w+)\.(\w+)$/,o=e=>i.test(e)},20058:function(e,t,a){a.a(e,async function(e,i){try{a.d(t,{QL:function(){return h},ZQ:function(){return u},ZV:function(){return c},ty:function(){return d},x:function(){return n}});var o=a(74487),r=(a(74423),a(18111),a(61701),a(46927)),s=e([o]);o=(s.then?(await s)():s)[0];const n=e=>d(e.attributes),d=(e,t)=>!!e.unit_of_measurement||!!e.state_class||(t||[]).includes(e.device_class||""),l=e=>{switch(e.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 e.language}},c=(e,t,a)=>h(e,t,a).map(e=>e.value).join(""),h=(e,t,a)=>{const i=t?l(t):void 0;return(null==t?void 0:t.number_format)===r.jG.none||Number.isNaN(Number(e))?Number.isNaN(Number(e))||""===e||(null==t?void 0:t.number_format)!==r.jG.none?[{type:"literal",value:e}]:new Intl.NumberFormat("en-US",p(e,Object.assign(Object.assign({},a),{},{useGrouping:!1}))).formatToParts(Number(e)):new Intl.NumberFormat(i,p(e,a)).formatToParts(Number(e))},u=(e,t)=>{var a;const i=null==t?void 0:t.display_precision;return null!=i?{maximumFractionDigits:i,minimumFractionDigits:i}:Number.isInteger(Number(null==e||null===(a=e.attributes)||void 0===a?void 0:a.step))&&Number.isInteger(Number(null==e?void 0:e.state))?{maximumFractionDigits:0}:void 0},p=(e,t)=>{const a=Object.assign({maximumFractionDigits:2},t);if("string"!=typeof e)return a;if(!t||void 0===t.minimumFractionDigits&&void 0===t.maximumFractionDigits){const t=e.indexOf(".")>-1?e.split(".")[1].length:0;a.minimumFractionDigits=t,a.maximumFractionDigits=t}return a};i()}catch(n){i(n)}})},79791:function(e,t,a){a.d(t,{L:function(){return i}});const i=(e,t=2)=>Math.round(e*10**t)/10**t},52943:function(e,t,a){a.d(t,{Z:function(){return i}});const i=e=>e.charAt(0).toUpperCase()+e.slice(1)},80880:function(e,t,a){a.d(t,{Y:function(){return i}});a(84864),a(57465),a(27495),a(25440);const i=(e,t="_")=>{const a="àáâäæãåāăąабçćčđďдèéêëēėęěеёэфğǵгḧхîïíīįìıİийкłлḿмñńǹňнôöòóœøōõőоṕпŕřрßśšşșсťțтûüùúūǘůűųувẃẍÿýыžźżз·",i=`aaaaaaaaaaabcccdddeeeeeeeeeeefggghhiiiiiiiiijkllmmnnnnnoooooooooopprrrsssssstttuuuuuuuuuuvwxyyyzzzz${t}`,o=new RegExp(a.split("").join("|"),"g"),r={"ж":"zh","х":"kh","ц":"ts","ч":"ch","ш":"sh","щ":"shch","ю":"iu","я":"ia"};let s;return""===e?s="":(s=e.toString().toLowerCase().replace(o,e=>i.charAt(a.indexOf(e))).replace(/[а-я]/g,e=>r[e]||"").replace(/(\d),(?=\d)/g,"$1").replace(/[^a-z0-9]+/g,t).replace(new RegExp(`(${t})\\1+`,"g"),"$1").replace(new RegExp(`^${t}+`),"").replace(new RegExp(`${t}+$`),""),""===s&&(s="unknown")),s}},34470:function(e,t,a){a.d(t,{E:function(){return o}});let i;const o=(0,a(5124).AH)(i||(i=(e=>e)`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)}`))},22533:function(e,t,a){a.d(t,{i:function(){return o}});var i=a(52943);const o=(e,t)=>(e=>{switch(e){case"de":case"lb":return!0;default:return!1}})(t)?(0,i.Z)(e):e.toLocaleLowerCase(t)},63130:function(e,t,a){a.d(t,{l:function(){return o}});a(3362);var i=a(50248);const o=async(e,t)=>{var a;if(navigator.clipboard)try{return void(await navigator.clipboard.writeText(e))}catch(s){}const o=t||(null===(a=(0,i.n)())||void 0===a?void 0:a.getRootNode())||document.body,r=document.createElement("textarea");r.value=e,r.setAttribute("readonly",""),r.style.position="fixed",r.style.top="0",r.style.left="0",r.style.opacity="0",o.appendChild(r),r.select(),document.execCommand("copy"),o.removeChild(r)}},60353:function(e,t,a){a.d(t,{u:function(){return i}});class i{start(e){const t=Date.now();this._startY=e,this._startTime=t,this._lastY=e,this._lastTime=t,this._delta=0}move(e){const t=Date.now();return this._delta=this._startY-e,this._lastY=e,this._lastTime=t,this._delta}end(){const e=this.getVelocity(),t=Math.abs(e)>this._velocityThreshold;return{velocity:e,delta:this._delta,isSwipe:t,isDownwardSwipe:e>0}}getDelta(){return this._delta}getVelocity(){if(Date.now()-this._lastTime>=this._movementTimeThreshold)return 0;const e=this._lastTime-this._startTime;return e>0?(this._lastY-this._startY)/e:0}reset(){this._startY=0,this._delta=0,this._startTime=0,this._lastY=0,this._lastTime=0}constructor(e={}){var t,a;this._startY=0,this._delta=0,this._startTime=0,this._lastY=0,this._lastTime=0,this._velocityThreshold=null!==(t=e.velocitySwipeThreshold)&&void 0!==t?t:.5,this._movementTimeThreshold=null!==(a=e.movementTimeThreshold)&&void 0!==a?a:100}}},3931:function(e,t,a){a.d(t,{U:function(){return i}});a(3362),a(62953);const i=async(e,t,a,i,o,...r)=>{let s=i[e];s||(s=i[e]={});const n=s[o];if(n)return n;const d=a(i,o,...r);return s[o]=d,d.then(()=>setTimeout(()=>{s[o]=void 0},t),()=>{s[o]=void 0}),d}},86836:function(e,t,a){function i(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}function o(){return i()+i()+i()+i()+i()}a.d(t,{L:function(){return o}})},5745:function(e,t,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(e,t,a){a.a(e,async function(e,t){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),d=a(71727),l=a(69093),c=a(52658),h=a(34470),u=a(10897),p=a(38279),v=a(93367),g=e([v]);v=(g.then?(await g)():g)[0];let f,m,b,_=e=>e;const y="M13 14H11V9H13M13 18H11V16H13M1 21H23L12 2L1 21Z";class w extends o.WF{connectedCallback(){var e,t;super.connectedCallback(),this.hasUpdated&&void 0===this.overrideImage&&(null!==(e=this.stateObj)&&void 0!==e&&e.attributes.entity_picture||null!==(t=this.stateObj)&&void 0!==t&&t.attributes.entity_picture_local)&&this.requestUpdate("stateObj")}disconnectedCallback(){var e,t;super.disconnectedCallback(),void 0===this.overrideImage&&(null!==(e=this.stateObj)&&void 0!==e&&e.attributes.entity_picture||null!==(t=this.stateObj)&&void 0!==t&&t.attributes.entity_picture_local)&&(this.style.backgroundImage="")}get _stateColor(){var e;const t=this.stateObj?(0,l.t)(this.stateObj):void 0;return null!==(e=this.stateColor)&&void 0!==e?e:"light"===t}render(){const e=this.stateObj;if(!e&&!this.overrideIcon&&!this.overrideImage)return(0,o.qy)(f||(f=_`<div class="missing"> <ha-svg-icon .path="${0}"></ha-svg-icon> </div>`),y);const t=this.getClass();if(t&&t.forEach((e,t)=>{e?this.classList.add(t):this.classList.remove(t)}),!this.icon)return o.s6;const a=e?(0,l.t)(e):void 0;return(0,o.qy)(m||(m=_`<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==e?void 0:e.state),this.overrideIcon,e)}willUpdate(e){if(super.willUpdate(e),!(e.has("stateObj")||e.has("overrideImage")||e.has("overrideIcon")||e.has("stateColor")||e.has("color")))return;const t=this.stateObj,a={};let i="";if(this.icon=!0,t){const e=(0,d.m)(t.entity_id);if(void 0===this.overrideImage)if(!t.attributes.entity_picture_local&&!t.attributes.entity_picture||this.overrideIcon){if(this.color)a.color=this.color;else if(this._stateColor){const e=(0,c.Se)(t);if(e&&(a.color=e),t.attributes.rgb_color&&(a.color=`rgb(${t.attributes.rgb_color.join(",")})`),t.attributes.brightness){const e=t.attributes.brightness;if("number"!=typeof e){const a=`Type error: state-badge expected number, but type of ${t.entity_id}.attributes.brightness is ${typeof e} (${e})`;console.warn(a)}a.filter=(0,c.mT)(t)}if(t.attributes.hvac_action){const e=t.attributes.hvac_action;e in p.sx?a.color=(0,c.Se)(t,p.sx[e]):delete a.color}}}else{let a=t.attributes.entity_picture_local||t.attributes.entity_picture;this.hass&&(a=this.hass.hassUrl(a)),"camera"===e&&(a=(0,u.su)(a,80,80)),i=`url(${a})`,this.icon=!1}else if(this.overrideImage){let e=this.overrideImage;this.hass&&(e=this.hass.hassUrl(e)),i=`url(${e})`,this.icon=!1}}this._iconStyle=a,this.style.backgroundImage=i}getClass(){const e=new Map(["has-no-radius","has-media-image","has-image"].map(e=>[e,!1]));if(this.stateObj){const t=(0,d.m)(this.stateObj.entity_id);"update"===t?e.set("has-no-radius",!0):"media_player"===t||"camera"===t?e.set("has-media-image",!0):""!==this.style.backgroundImage&&e.set("has-image",!0)}return e}static get styles(){return[h.E,(0,o.AH)(b||(b=_`: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(...e){super(...e),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),t()}catch(f){t(f)}})},99611:function(e,t,a){a.a(e,async function(e,t){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),d=a(1087),l=a(60353),c=a(22792),h=a(59992),u=a(14503),p=a(22348),v=e([o,h]);[o,h]=v.then?(await v)():v;let g,f,m=e=>e;const b=300,_=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"]),y=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(e){super.updated(e),e.has("open")&&(this._drawerOpen=this.open)}render(){return(0,s.qy)(g||(g=m` <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(e){document.addEventListener("touchmove",this._handleTouchMove,{passive:!1}),document.addEventListener("touchend",this._handleTouchEnd),document.addEventListener("touchcancel",this._handleTouchEnd),this._gestureRecognizer.start(e)}_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)(f||(f=m`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(...e){super(...e),this.open=!1,this.flexContent=!1,this.preventScrimClose=!1,this._drawerOpen=!1,this._sliderInteractionActive=!1,this._gestureRecognizer=new l.u,this._isDragging=!1,this._escapePressed=!1,this._handleShow=async()=>{this._drawerOpen=!0,this.open=!0,(0,d.r)(this,"opened"),await this.updateComplete,requestAnimationFrame(()=>{var e;const t=this._autofocusElement;null!==(e=this._hassConfig)&&void 0!==e&&e.auth.external&&(0,p.V)(this._hassConfig.auth.external)?t&&(t.id||(t.id="ha-bottom-sheet-autofocus"),this._hassConfig.auth.external.fireMessage({type:"focus_element",payload:{element_id:t.id}})):null==t||t.focus()})},this._handleAfterShow=()=>{(0,d.r)(this,"after-show")},this._handleSliderInteractionStart=()=>{this._sliderInteractionActive=!0},this._handleSliderInteractionStop=()=>{this._sliderInteractionActive=!1},this._handleAfterHide=e=>{if(this._sliderInteractionActive)return this._drawerOpen=!0,void(this.open=!0);e.eventPhase===Event.AT_TARGET&&(this.open=!1,this._drawerOpen=!1,(0,d.r)(this,"closed"))},this._handleHide=e=>{if(e.eventPhase!==Event.AT_TARGET)return;const t=e.detail.source===e.target.drawer;if(this._sliderInteractionActive)return e.preventDefault(),this._drawerOpen=!0,this.open=!0,void(this._escapePressed=!1);this.preventScrimClose&&this._escapePressed&&t&&e.preventDefault(),this._escapePressed=!1},this._handleKeyDown=e=>{"Escape"===e.key&&(this._escapePressed=!0,this.preventScrimClose&&e.preventDefault(),e.stopPropagation(),e.currentTarget.open=!1)},this._handleCloseAction=e=>{e.composedPath().some(e=>e instanceof HTMLElement&&("close"===e.getAttribute("data-dialog")||"close"===e.getAttribute("data-drawer")))&&(this._drawerOpen=!1)},this._handleTouchStart=e=>{if(this.preventScrimClose)return;const t=e.composedPath();for(const a of t){if(a===this._drawer)break;if(a instanceof HTMLElement&&(a.scrollTop>0||_.has(a.localName)||Array.from(a.classList).some(e=>y.has(e))))return}e.stopPropagation(),this._startResizing(e.touches[0].clientY)},this._handleTouchMove=e=>{const t=e.touches[0].clientY,a=this._gestureRecognizer.move(t);a<0&&(e.preventDefault(),this._isDragging=!0,requestAnimationFrame(()=>{this._isDragging&&this.style.setProperty("--dialog-transform",`translateY(${-1*a}px)`)}))},this._handleTouchEnd=()=>{var e;this._unregisterResizeHandlers(),this._isDragging=!1;const t=this._gestureRecognizer.end();if(t.isSwipe)return void(t.isDownwardSwipe?this._drawerOpen=!1:this._animateSnapBack());const a=null===(e=this._drawer.shadowRoot)||void 0===e?void 0:e.querySelector('[part="body"]'),i=(null==a?void 0:a.offsetHeight)||0;i>0&&t.delta<0&&Math.abs(t.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),t()}catch(g){t(g)}})},93444:function(e,t,a){var i=a(40445),o=a(5124),r=a(67576);let s,n,d=e=>e;class l extends o.WF{render(){return(0,o.qy)(s||(s=d` <footer> <slot name="secondaryAction"></slot> <slot name="primaryAction"></slot> </footer> `))}static get styles(){return[(0,o.AH)(n||(n=d`footer{display:flex;gap:var(--ha-space-3);justify-content:flex-end;align-items:center;width:100%}`))]}}l=(0,i.Cg)([(0,r.EM)("ha-dialog-footer")],l)},76538:function(e,t,a){a(62953);var i=a(40445),o=a(5124),r=a(67576);let s,n,d,l,c,h,u=e=>e;class p extends o.WF{render(){const e=(0,o.qy)(s||(s=u`<div class="header-title"> <slot name="title"></slot> </div>`)),t=(0,o.qy)(n||(n=u`<div class="header-subtitle"> <slot name="subtitle"></slot> </div>`));return(0,o.qy)(d||(d=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)(l||(l=u`${0}${0}`),t,e):(0,o.qy)(c||(c=u`${0}${0}`),e,t))}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(...e){super(...e),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(e,t,a){a.a(e,async function(e,t){try{a(3362),a(62953),a(49255);var i=a(40445),o=a(93900),r=a(35211),s=a(5124),n=a(67576),d=a(63672),l=a(1087),c=a(64481),h=a(22792),u=a(59992),p=a(14503),v=a(22348),g=(a(76538),a(26300)),f=e([o,g,u]);[o,g,u]=f.then?(await f)():f;let m,b,_,y,w,C,x,k=e=>e;const $="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(e){super.updated(e),e.has("open")&&(this._open=this.open)}render(){var e,t,a;return(0,s.qy)(m||(m=k` <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,d.J)(this.ariaLabelledBy||(void 0!==this.headerTitle?"ha-dialog-title":void 0)),(0,d.J)(this.ariaDescribedBy),this._handleKeyDown,this._handleHide,this._handleShow,this._handleAfterShow,this._handleAfterHide,this.withoutHeader?s.s6:(0,s.qy)(b||(b=k`<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!==(e=null===(t=this._i18n)||void 0===t||null===(a=t.localize)||void 0===a?void 0:a.call(t,"ui.common.close"))&&void 0!==e?e:"Close",$,void 0!==this.headerTitle?(0,s.qy)(_||(_=k`<span slot="title" class="title" id="ha-dialog-title"> ${0} </span>`),this.headerTitle):(0,s.qy)(y||(y=k`<slot name="headerTitle" slot="title"></slot>`)),void 0!==this.headerSubtitle?(0,s.qy)(w||(w=k`<span slot="subtitle">${0}</span>`),this.headerSubtitle):(0,s.qy)(C||(C=k`<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(e){this._open?(0,c.J)(()=>{this._setFullscreen(e.detail)}):this._setFullscreen(e.detail)}_setFullscreen(e){this.toggleAttribute("fullscreen",e)}_handleBodyScroll(e){this._bodyScrolled=e.target.scrollTop>0}_handleKeyDown(e){"Escape"===e.key&&(this._escapePressed=!0,this.preventScrimClose&&e.preventDefault(),e.stopPropagation(),e.currentTarget.open=!1)}_handleHide(e){var t;const a=(null===(t=e.detail)||void 0===t?void 0:t.source)===e.target.dialog;this.preventScrimClose&&this._escapePressed&&a&&e.preventDefault(),this._escapePressed=!1}static get styles(){return[...super.styles,p.dp,(0,s.AH)(x||(x=k`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(...e){super(...e),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 e=>{e.eventPhase===Event.AT_TARGET&&(this._open=!0,(0,l.r)(this,"opened"),await this.updateComplete,requestAnimationFrame(()=>{var e,t;if(null!==(e=this._hassConfig)&&void 0!==e&&e.auth.external&&(0,v.V)(this._hassConfig.auth.external)){const e=this.querySelector("[autofocus]");return void(null!==e&&(e.id||(e.id="ha-dialog-autofocus"),this._hassConfig.auth.external.fireMessage({type:"focus_element",payload:{element_id:e.id}})))}null===(t=this.querySelector("[autofocus]"))||void 0===t||t.focus()}))},this._handleAfterShow=e=>{e.eventPhase===Event.AT_TARGET&&(0,l.r)(this,"after-show")},this._handleAfterHide=e=>{e.eventPhase===Event.AT_TARGET&&(this._open=!1,this._setFullscreen(!1),(0,l.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),t()}catch(m){t(m)}})},43661:function(e,t,a){a.r(t),a.d(t,{HaIconNext:function(){return n}});a(62953);var i=a(40445),o=a(67576),r=a(63091),s=a(67094);class n extends s.HaSvgIcon{constructor(...e){super(...e),this.path="rtl"===r.G.document.dir?"M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z":"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"}}(0,i.Cg)([(0,o.MZ)()],n.prototype,"path",void 0),n=(0,i.Cg)([(0,o.EM)("ha-icon-next")],n)},47680:function(e,t,a){a.r(t),a.d(t,{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),d=a(700),l=(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=v().catch(e=>{throw u=void 0,e})),u),v=async()=>{const e=(0,l.y$)("hass-icon-db","mdi-icon-store"),t=await(0,l.Jt)("_version",e);return t?t!==h.version&&(await(0,l.IU)(e),(0,l.hZ)("_version",h.version,e)):(0,l.hZ)("_version",h.version,e),e},g=["mdi","hass","hassio","hademo"];let f=[];a(67094);let m,b,_,y=e=>e;const w={},C={},x=(0,n.s)(()=>(async e=>{const t=Object.keys(e),a=await Promise.allSettled(Object.values(e));(await p())("readwrite",i=>{a.forEach((a,o)=>{"fulfilled"===a.status&&Object.entries(a.value).forEach(([e,t])=>{i.put(t,e)}),delete e[t[o]]})})})(C),2e3),k={},$={"home-assistant":()=>a.e(58781).then(a.bind(a,53580)).then(e=>e.mdiHomeAssistant),"music-assistant":()=>a.e(56009).then(a.bind(a,10576)).then(e=>e.mdiMusicAssistant),esphome:()=>a.e(88800).then(a.bind(a,45091)).then(e=>e.mdiEsphomeLogo)};class L extends o.WF{willUpdate(e){super.willUpdate(e),e.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)(m||(m=y` <iron-icon .icon="${0}"></iron-icon>`),this.icon):(0,o.qy)(b||(b=y`<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 e=this.icon,[t,a]=this.icon.split(":",2);let i,o=a;if(!t||!o)return;if(!g.includes(t)){const a=d.y[t];return a?void(a&&"function"==typeof a.getIcon&&this._setCustomPath(a.getIcon(o),e)):void(this._legacy=!0)}if(this._legacy=!1,o in w){const e=w[o];let a;e.newName?(a=`Icon ${t}:${o} was renamed to ${t}:${e.newName}, please change your config, it will be removed in version ${e.removeIn}.`,o=e.newName):a=`Icon ${t}:${o} was removed from MDI, please replace this icon with an other icon in your config, it will be removed in version ${e.removeIn}.`,console.warn(a),(0,s.r)(this,"write_log",{level:"warning",message:a})}if(o in k)return void(this._path=k[o]);if(o in $){const t=await $[o]();return this.icon===e&&(this._path=t),void(k[o]=t)}try{i=await(e=>new Promise((t,a)=>{if(f.push([e,t,a]),f.length>1)return;const i=p();(0,c.h)(1e3,(async()=>{(await i)("readonly",e=>{for(const[t,a,i]of f)(0,l.Yd)(e.get(t)).then(e=>a(e)).catch(e=>i(e));f=[]})})()).catch(e=>{for(const[,,t]of f)t(e);f=[]})}))(o)}catch(u){i=void 0}if(i)return this.icon===e&&(this._path=i),void(k[o]=i);const r=(e=>{let t;for(const a of h.parts){if(void 0!==a.start&&e<a.start)break;t=a}return t.file})(o);if(r in C)return void this._setPath(C[r],o,e);const n=fetch(`/static/mdi/${r}.json`).then(e=>e.json());C[r]=n,this._setPath(n,o,e),n.catch(()=>{delete C[r]}),x()}async _setCustomPath(e,t){const a=await e;this.icon===t&&(this._path=a.path,this._secondaryPath=a.secondaryPath,this._viewBox=a.viewBox)}async _setPath(e,t,a){try{const i=await e;this.icon===a&&(this._path=i[t]),k[t]=i[t]}catch(i){}}constructor(...e){super(...e),this._legacy=!1}}L.styles=(0,o.AH)(_||(_=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)},17308:function(e,t,a){var i=a(40445),o=a(49838),r=a(11245),s=a(5124),n=a(67576);let d;class l extends o.B{}l.styles=[r.R,(0,s.AH)(d||(d=(e=>e)`:host{--md-sys-color-surface:var(--card-background-color)}`))],l=(0,i.Cg)([(0,n.EM)("ha-md-list")],l)},606:function(e,t,a){a.a(e,async function(e,t){try{a(74423),a(18111),a(61701),a(62953);var i=a(40445),o=a(5124),r=a(67576),s=a(63672),n=a(22786),d=a(1087),l=a(29823),c=(a(70947),a(3449),a(88285)),h=(a(67094),e([l,c]));[l,c]=h.then?(await h)():h;let u,p,v,g,f,m,b,_,y,w=e=>e;class C extends o.WF{render(){return this.disabled?(0,o.qy)(u||(u=w`${0}${0}`),this._renderField(),this._renderHelper()):(0,o.qy)(p||(p=w` <ha-dropdown placement="bottom" @wa-select="${0}" @wa-show="${0}" @wa-hide="${0}"> ${0} ${0} </ha-dropdown> ${0} `),this._handleSelect,this._handleShow,this._handleHide,this._renderField(),this.options?this.options.map(e=>{var t;const a=["string","number"].includes(typeof e);return(0,o.qy)(v||(v=w` <ha-dropdown-item .value="${0}" .disabled="${0}" .selected="${0}"> ${0} <div class="content"> ${0} ${0} </div> </ha-dropdown-item> `),a?e:e.value,!a&&(null!==(t=e.disabled)&&void 0!==t&&t),this.value===(a?e:e.value),e.iconPath?(0,o.qy)(g||(g=w`<ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon>`),e.iconPath):o.s6,a?e:e.label||e.value,e.secondary?(0,o.qy)(f||(f=w`<div class="secondary">${0}</div>`),e.secondary):o.s6)}):(0,o.qy)(m||(m=w`<slot></slot>`)),this._renderHelper())}_renderField(){const e=this._getValueLabel(this.options,this.value);return(0,o.qy)(b||(b=w` <ha-picker-field slot="trigger" type="button" class="${0}" compact="compact" aria-label="${0}" @clear="${0}" .label="${0}" .value="${0}" .required="${0}" .disabled="${0}" .hideClearIcon="${0}"> </ha-picker-field> `),this._opened?"opened":"",(0,s.J)(this.label),this._clearValue,this.label,e,this.required,this.disabled,!this.clearable||this.required||this.disabled||!String(this.value))}_renderHelper(){return this.helper?(0,o.qy)(_||(_=w`<ha-input-helper-text .disabled="${0}">${0}</ha-input-helper-text>`),this.disabled,this.helper):o.s6}_handleSelect(e){e.stopPropagation();const t=e.detail.item.value;t!==this.value&&(0,d.r)(this,"selected",{value:t})}_clearValue(){!this.disabled&&this.value&&(0,d.r)(this,"selected",{value:void 0})}_handleShow(){this.style.setProperty("--select-menu-width",`${this._triggerField.offsetWidth}px`),this._opened=!0}_handleHide(){this._opened=!1}constructor(...e){super(...e),this.clearable=!1,this.required=!1,this.disabled=!1,this._opened=!1,this._getValueLabel=(0,n.A)((e,t)=>{const a=void 0!==t?String(t):void 0;if(!e||!a)return a;for(const i of e){const e=["string","number"].includes(typeof i);if(e&&i===a||!e&&String(i.value)===a)return e?i:i.label||i.value}return a})}}C.styles=(0,o.AH)(y||(y=w`:host{position:relative}ha-picker-field.opened{--mdc-text-field-idle-line-color:var(--primary-color)}ha-dropdown-item .content{display:flex;gap:var(--ha-space-1);flex-direction:column}ha-dropdown-item .secondary{font-size:var(--ha-font-size-s);color:var(--ha-color-text-secondary)}ha-dropdown::part(menu){min-width:var(--select-menu-width)}ha-input-helper-text{display:block;margin:var(--ha-space-2) 0 0}`)),(0,i.Cg)([(0,r.MZ)({type:Boolean})],C.prototype,"clearable",void 0),(0,i.Cg)([(0,r.MZ)({attribute:!1})],C.prototype,"options",void 0),(0,i.Cg)([(0,r.MZ)()],C.prototype,"label",void 0),(0,i.Cg)([(0,r.MZ)()],C.prototype,"helper",void 0),(0,i.Cg)([(0,r.MZ)()],C.prototype,"value",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean})],C.prototype,"required",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean})],C.prototype,"disabled",void 0),(0,i.Cg)([(0,r.wk)()],C.prototype,"_opened",void 0),(0,i.Cg)([(0,r.P)("ha-picker-field")],C.prototype,"_triggerField",void 0),C=(0,i.Cg)([(0,r.EM)("ha-select")],C),t()}catch(u){t(u)}})},93367:function(e,t,a){a.a(e,async function(e,t){try{var i=a(40445),o=a(35211),r=a(5124),s=a(67576),n=a(91450),d=a(69093),l=a(22792),c=a(85694),h=(a(47680),a(67094),e([c]));c=(h.then?(await h)():h)[0];let u,p,v,g,f=e=>e;class m extends r.WF{render(){var e,t;const a=this.icon||this.stateObj&&(null===(e=this._entities)||void 0===e||null===(e=e[this.stateObj.entity_id])||void 0===e?void 0:e.icon)||(null===(t=this.stateObj)||void 0===t?void 0:t.attributes.icon);if(a)return(0,r.qy)(u||(u=f`<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(e=>e?(0,r.qy)(p||(p=f`<ha-icon .icon="${0}"></ha-icon>`),e):this._renderFallback());return(0,r.qy)(v||(v=f`${0}`),(0,n.T)(i))}_renderFallback(){const e=(0,d.t)(this.stateObj);return(0,r.qy)(g||(g=f` <ha-svg-icon .path="${0}"></ha-svg-icon> `),c.l[e]||c.lW)}}(0,i.Cg)([(0,s.MZ)({attribute:!1})],m.prototype,"stateObj",void 0),(0,i.Cg)([(0,s.MZ)({attribute:!1})],m.prototype,"stateValue",void 0),(0,i.Cg)([(0,s.MZ)()],m.prototype,"icon",void 0),(0,i.Cg)([(0,s.wk)(),(0,o.Fg)({context:l.WF,subscribe:!0})],m.prototype,"_config",void 0),(0,i.Cg)([(0,s.wk)(),(0,o.Fg)({context:l.Wq,subscribe:!0})],m.prototype,"_connection",void 0),(0,i.Cg)([(0,s.wk)(),(0,o.Fg)({context:l.X1,subscribe:!0})],m.prototype,"_entities",void 0),m=(0,i.Cg)([(0,s.EM)("ha-state-icon")],m),t()}catch(u){t(u)}})},59646:function(e,t,a){a.a(e,async function(e,t){try{a(62953);var i=a(40445),o=a(29344),r=a(5124),s=a(67576),n=a(88360),d=e([o]);o=(d.then?(await d)():d)[0];let l,c=e=>e;class h extends o.A{updated(e){super.updated(e),e.has("haptic")&&(this.haptic?this.addEventListener("change",this._forwardHaptic):this.removeEventListener("change",this._forwardHaptic))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",this._forwardHaptic)}static get styles(){return[o.A.styles,(0,r.AH)(l||(l=c`:host{--wa-form-control-toggle-size:var(--ha-switch-size, 24px);--wa-form-control-required-content:var(
--ha-switch-required-marker,
var(--ha-input-required-marker, "*")
);--wa-form-control-required-content-offset:var(
--ha-switch-required-marker-offset,
0.1rem
);--thumb-size:var(--ha-switch-thumb-size, 18px);--width:var(--ha-switch-width, 48px)}label{position:relative;height:max(var(--thumb-size),var(--wa-form-control-toggle-size))}label::before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-width:var(--ha-switch-min-touch-size,40px);min-height:var(--ha-switch-min-touch-size,40px)}label.disabled::before{pointer-events:none}.switch{background-color:var(--ha-switch-background-color,var(--ha-color-fill-disabled-quiet-resting));border-color:var(--ha-switch-border-color,var(--ha-color-border-neutral-normal))}label:not(.disabled) .input:focus-visible~.switch,label:not(.disabled):hover .switch{background-color:var(--ha-switch-background-color-hover,var(--ha-switch-background-color,var(--ha-color-fill-disabled-quiet-hover)))}.checked .switch{background-color:var(--ha-switch-checked-background-color,var(--ha-color-fill-primary-normal-resting));border-color:var(--ha-switch-checked-border-color,var(--ha-color-border-primary-loud))}label:not(.disabled).checked .input:focus-visible~.switch,label:not(.disabled).checked:hover .switch{background-color:var(--ha-switch-checked-background-color-hover,var(--ha-switch-checked-background-color,var(--ha-color-fill-primary-normal-hover)));border-color:var(--ha-switch-checked-border-color-hover,var(--ha-switch-checked-border-color,var(--ha-color-border-primary-loud)))}.switch .thumb{background-color:var(--ha-switch-thumb-background-color,var(--ha-color-on-neutral-normal));border-color:var(--ha-switch-thumb-border-color,var(--ha-color-on-neutral-normal));border-style:var(--wa-form-control-border-style);border-width:var(--wa-form-control-border-width);box-shadow:var(--ha-switch-thumb-box-shadow,var(--ha-box-shadow-s))}label:not(.disabled) .input:focus-visible~.switch .thumb,label:not(.disabled):hover .switch .thumb{background-color:var(--ha-switch-thumb-background-color-hover,var(--ha-switch-thumb-background-color,var(--ha-color-on-neutral-normal)));border-color:var(--ha-switch-thumb-border-color-hover,var(--ha-switch-thumb-border-color,var(--ha-color-on-neutral-normal)))}.checked .switch .thumb{background-color:var(--ha-switch-checked-thumb-background-color,var(--ha-color-on-primary-normal));border-color:var(--ha-switch-checked-thumb-border-color,var(--ha-color-on-primary-normal))}label:not(.disabled).checked .input:focus-visible~.switch .thumb,label:not(.disabled).checked:hover .switch .thumb{background-color:var(--ha-switch-checked-thumb-background-color-hover,var(--ha-switch-checked-thumb-background-color,var(--ha-color-on-primary-normal)));border-color:var(--ha-switch-checked-thumb-border-color-hover,var(--ha-switch-checked-thumb-border-color,var(--ha-color-on-primary-normal)))}label.disabled{opacity:var(--ha-switch-disabled-opacity, .3);cursor:not-allowed}label:not(.disabled) .input:focus-visible~.switch .thumb{outline:0;outline-offset:none}label:not(.disabled) .input:focus-visible~.switch{outline:var(--wa-focus-ring);outline-offset:var(--wa-focus-ring-offset)}:host(:empty) slot.label{display:none}`))]}constructor(...e){super(...e),this.haptic=!1,this._forwardHaptic=()=>{(0,n.j)(this,"light")}}}(0,i.Cg)([(0,s.MZ)({type:Boolean})],h.prototype,"haptic",void 0),h=(0,i.Cg)([(0,s.EM)("ha-switch")],h),t()}catch(l){t(l)}})},34127:function(e,t,a){a.a(e,async function(e,t){try{a(62953);var i=a(40445),o=a(52630),r=a(5124),s=a(67576),n=e([o]);o=(n.then?(await n)():n)[0];let d,l=e=>e;class c extends o.A{static get styles(){return[o.A.styles,(0,r.AH)(d||(d=l`: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(...e){super(...e),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),t()}catch(d){t(d)}})},36866:function(e,t,a){a.a(e,async function(e,t){try{a(62953);var i=a(40445),o=a(5124),r=a(67576),s=a(91485),n=e([s]);s=(n.then?(await n)():n)[0];let d,l,c=e=>e;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(e){var t,a;(super.willUpdate(e),this.label||this.placeholder||this.hasUpdated&&!e.has("_i18n"))||(this.placeholder=(null===(t=this.i18n)||void 0===t||null===(a=t.localize)||void 0===a?void 0:a.call(t,"ui.common.search"))||"Search")}renderStartDefault(){return(0,o.qy)(d||(d=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)(l||(l=c`:host([appearance=outlined]) wa-input.no-label::part(base){height:40px}`))],u=(0,i.Cg)([(0,r.EM)("ha-input-search")],u),t()}catch(d){t(d)}})},53641:function(e,t,a){a.d(t,{L3:function(){return o},QI:function(){return l},WT:function(){return n},bQ:function(){return d},ft:function(){return i.f},gs:function(){return r},uG:function(){return s}});a(44114),a(62953);var i=a(29908);const o=(e,t)=>e.callWS(Object.assign({type:"config/area_registry/create"},t)),r=(e,t,a)=>e.callWS(Object.assign({type:"config/area_registry/update",area_id:t},a)),s=(e,t)=>e.callWS({type:"config/area_registry/delete",area_id:t}),n=(e,t)=>e.callWS({type:"config/area_registry/reorder",area_ids:t}),d=e=>{const t={};for(const a of e)a.area_id&&(a.area_id in t||(t[a.area_id]=[]),t[a.area_id].push(a));return t},l=e=>{const t={};for(const a of e)a.area_id&&(a.area_id in t||(t[a.area_id]=[]),t[a.area_id].push(a));return t}},82e3:function(e,t,a){a.d(t,{D5:function(){return i},Fy:function(){return h},Gk:function(){return v},Hg:function(){return o},TJ:function(){return s},UQ:function(){return c},Y_:function(){return g},ds:function(){return p},e0:function(){return r},ec:function(){return u},go:function(){return d},n2:function(){return l},sq:function(){return n}});a(74423),a(18111),a(61701),a(33110),a(3362);const i=14881==a.j?`${location.protocol}//${location.host}`:null,o=e=>e.map(e=>{if("string"!==e.type)return e;switch(e.name){case"username":return Object.assign(Object.assign({},e),{},{autocomplete:"username",autofocus:!0});case"password":return Object.assign(Object.assign({},e),{},{autocomplete:"current-password"});case"code":return Object.assign(Object.assign({},e),{},{autocomplete:"one-time-code",autofocus:!0});default:return e}}),r=(e,t)=>e.callWS({type:"auth/sign_path",path:t}),s=()=>fetch("/auth/providers",{credentials:"same-origin"}),n=(e,t,a)=>fetch("/auth/login_flow",{method:"POST",credentials:"same-origin",body:JSON.stringify({client_id:e,handler:a,redirect_uri:t})}),d=(e,t)=>fetch(`/auth/login_flow/${e}`,{method:"POST",credentials:"same-origin",body:JSON.stringify(t)}),l=e=>fetch(`/auth/login_flow/${e}`,{method:"DELETE",credentials:"same-origin"}),c=(e,t,a,i)=>{e.includes("?")?e.endsWith("&")||(e+="&"):e+="?",e+=`code=${encodeURIComponent(t)}`,a&&(e+=`&state=${encodeURIComponent(a)}`),i&&(e+="&storeToken=true"),document.location.assign(e)},h=async(e,t,a,i)=>e.callWS({type:"config/auth_provider/homeassistant/create",user_id:t,username:a,password:i}),u=(e,t,a)=>e.callWS({type:"config/auth_provider/homeassistant/change_password",current_password:t,new_password:a}),p=(e,t,a)=>e.callWS({type:"config/auth_provider/homeassistant/admin_change_password",user_id:t,password:a}),v=(e,t,a)=>e.callWS({type:"config/auth_provider/homeassistant/admin_change_username",user_id:t,username:a}),g=(e,t,a)=>e.callWS({type:"auth/delete_all_refresh_tokens",token_type:t,delete_current_token:a})},10897:function(e,t,a){a.d(t,{C4:function(){return l},CK:function(){return d},FX:function(){return g},UC:function(){return p},_Z:function(){return _},bT:function(){return y},j4:function(){return m},sd:function(){return r},su:function(){return n},vc:function(){return b},w8:function(){return u},wv:function(){return h},y3:function(){return v},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=(e,t,a)=>`${e}&width=${t}&height=${a}`,d=e=>e.attributes.access_token?`/api/camera_proxy_stream/${e.entity_id}?token=${e.attributes.access_token}`:void 0,l=async(e,t,a,o)=>{const r=await(0,i.U)("_cameraTmbUrl",9e3,c,e,t);return n(r,a,o)},c=async(e,t)=>{const a=await(0,o.e0)(e,`/api/camera_proxy/${t}`);return e.hassUrl(a.path)},h=async(e,t,a)=>{const i={type:"camera/stream",entity_id:t};a&&(i.format=a);const o=await e.callWS(i);return o.url=e.hassUrl(o.url),o},u=(e,t,a,i)=>e.connection.subscribeMessage(i,{type:"camera/webrtc/offer",entity_id:t,offer:a}),p=(e,t,a,i)=>e.callWS({type:"camera/webrtc/candidate",entity_id:t,session_id:a,candidate:i}),v=(e,t)=>e.callWS({type:"camera/get_prefs",entity_id:t}),g=(e,t,a)=>e.callWS(Object.assign({type:"camera/update_prefs",entity_id:t},a)),f="media-source://camera/",m=e=>e.startsWith(f),b=e=>e.substring(22),_=async(e,t)=>e.callWS({type:"camera/capabilities",entity_id:t}),y=async(e,t)=>e.callWS({type:"camera/webrtc/get_client_config",entity_id:t})},38279:function(e,t,a){a.d(t,{$2:function(){return i},VV:function(){return r},on:function(){return d},sx:function(){return s}});a(72712);var i=function(e){return e[e.TARGET_TEMPERATURE=1]="TARGET_TEMPERATURE",e[e.TARGET_TEMPERATURE_RANGE=2]="TARGET_TEMPERATURE_RANGE",e[e.TARGET_HUMIDITY=4]="TARGET_HUMIDITY",e[e.FAN_MODE=8]="FAN_MODE",e[e.PRESET_MODE=16]="PRESET_MODE",e[e.SWING_MODE=32]="SWING_MODE",e[e.AUX_HEAT=64]="AUX_HEAT",e[e.TURN_OFF=128]="TURN_OFF",e[e.TURN_ON=256]="TURN_ON",e[e.SWING_HORIZONTAL_MODE=512]="SWING_HORIZONTAL_MODE",e}({});const o=["auto","heat_cool","heat","cool","dry","fan_only","off"].reduce((e,t,a)=>(e[t]=a,e),{}),r=(e,t)=>o[e]-o[t],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"},d=e=>n[e]||"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(e,t,a){a.d(t,{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:(e,t)=>{var a;return null!==(a=e[t])&&void 0!==a?a:o[t]?{getIcon:o[t]}:void 0}})},22675:function(e,t,a){a.d(t,{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)},68287:function(e,t,a){a.d(t,{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=e=>{const t=e.attributes.entity_id||[],a=[...new Set(t.map(e=>(0,i.m)(e)))];return 1===a.length?a[0]:void 0}},92557:function(e,t,a){a.d(t,{Rp:function(){return c},_9:function(){return l},_G:function(){return s},d4:function(){return h},o5:function(){return d}});a(26910);var i=a(90889),o=a(52220),r=a(9899);const s=e=>e.sendMessagePromise({type:"config/label_registry/list"}).then(e=>e.sort((e,t)=>(0,o.xL)(e.name,t.name))),n=(e,t)=>e.subscribeEvents((0,r.s)(()=>s(e).then(e=>t.setState(e,!0)),500,!0),"label_registry_updated"),d=(e,t)=>(0,i.N)("_labelRegistry",s,n,e,t),l=(e,t)=>e.callWS(Object.assign({type:"config/label_registry/create"},t)),c=(e,t,a)=>e.callWS(Object.assign({type:"config/label_registry/update",label_id:t},a)),h=(e,t)=>e.callWS({type:"config/label_registry/delete",label_id:t})},20559:function(e,t,a){a.d(t,{JW:function(){return y},OW:function(){return m},PO:function(){return u},VN:function(){return l},XG:function(){return p},eB:function(){return f},gZ:function(){return g},hM:function(){return h},k2:function(){return d},lU:function(){return v},m2:function(){return c},nc:function(){return b},vX:function(){return _},z1:function(){return n}});a(18111),a(22489),a(20116),a(61701),a(3362),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698),a(62953);var i=a(36312),o=a(91926),r=a(58594),s=a(16790),n=66649!=a.j?function(e){return e.THREAD="thread",e.WIFI="wifi",e.ETHERNET="ethernet",e.UNKNOWN="unknown",e}({}):null;const d=e=>{var t;return null===(t=e.auth.external)||void 0===t?void 0:t.config.canCommissionMatter},l=async e=>{if((0,i.x)(e.config,"thread")){const t=(await(0,s.sL)(e)).datasets.find(e=>e.preferred);if(t)return e.auth.external.fireMessage({type:"matter/commission",payload:{active_operational_dataset:(await(0,s.dy)(e,t.dataset_id)).tlv,border_agent_id:t.preferred_border_agent_id,mac_extended_address:t.preferred_extended_address,extended_pan_id:t.extended_pan_id}})}return e.auth.external.fireMessage({type:"matter/commission"})},c=(e,t)=>{let a;const i=(0,r.Ag)(e.connection,e=>{if(!a)return void(a=new Set(Object.values(e).filter(e=>e.identifiers.find(e=>"matter"===e[0])).map(e=>e.id)));const o=Object.values(e).filter(e=>e.identifiers.find(e=>"matter"===e[0])&&!a.has(e.id));o.length&&(i(),a=void 0,t(o[0]))});return()=>{i(),a=void 0}},h=(e,t)=>c(e,e=>{null==t||t(),(0,o.oo)(`/config/devices/device/${e.id}`)}),u=(e,t)=>e.callWS({type:"matter/commission",code:t}),p=(e,t)=>e.callWS({type:"matter/commission_on_network",pin:t}),v=(e,t,a)=>e.callWS({type:"matter/set_wifi_credentials",network_name:t,password:a}),g=(e,t)=>e.callWS({type:"matter/set_thread",thread_operation_dataset:t}),f=(e,t)=>e.callWS({type:"matter/node_diagnostics",device_id:t}),m=(e,t)=>e.callWS({type:"matter/ping_node",device_id:t}),b=(e,t)=>e.callWS({type:"matter/open_commissioning_window",device_id:t}),_=(e,t,a)=>e.callWS({type:"matter/remove_matter_fabric",device_id:t,fabric_index:a}),y=(e,t)=>e.callWS({type:"matter/interview_node",device_id:t})},16790:function(e,t,a){a.d(t,{It:function(){return n},W4:function(){return l},dy:function(){return s},l1:function(){return c},rY:function(){return d},sL:function(){return r},wm:function(){return o}});class i{processEvent(e){return"router_discovered"===e.type?this.routers[e.key]=e.data:"router_removed"===e.type&&delete this.routers[e.key],Object.values(this.routers)}constructor(){this.routers={}}}const o=(e,t)=>{const a=new i;return e.connection.subscribeMessage(e=>t(a.processEvent(e)),{type:"thread/discover_routers"})},r=e=>e.callWS({type:"thread/list_datasets"}),s=(e,t)=>e.callWS({type:"thread/get_dataset_tlv",dataset_id:t}),n=(e,t,a)=>e.callWS({type:"thread/add_dataset_tlv",source:t,tlv:a}),d=(e,t)=>e.callWS({type:"thread/delete_dataset",dataset_id:t}),l=(e,t)=>e.callWS({type:"thread/set_preferred_dataset",dataset_id:t}),c=(e,t,a,i)=>e.callWS({type:"thread/set_preferred_border_agent",dataset_id:t,border_agent_id:a,extended_address:i})},24717:function(e,t,a){a.d(t,{Ak:function(){return r},Bd:function(){return s},Ri:function(){return o},lg:function(){return n},qT:function(){return l},uu:function(){return d}});a(74423);var i=a(22675),o=function(e){return e[e.TURN_ON=1]="TURN_ON",e[e.TURN_OFF=2]="TURN_OFF",e[e.PAUSE=4]="PAUSE",e[e.STOP=8]="STOP",e[e.RETURN_HOME=16]="RETURN_HOME",e[e.FAN_SPEED=32]="FAN_SPEED",e[e.BATTERY=64]="BATTERY",e[e.STATUS=128]="STATUS",e[e.SEND_COMMAND=256]="SEND_COMMAND",e[e.LOCATE=512]="LOCATE",e[e.CLEAN_SPOT=1024]="CLEAN_SPOT",e[e.MAP=2048]="MAP",e[e.STATE=4096]="STATE",e[e.START=8192]="START",e[e.CLEAN_AREA=16384]="CLEAN_AREA",e}({});function r(e){return["cleaning","on"].includes(e.state)}function s(e){return e.state!==i.Hh&&!r(e)}function n(e){return!["docked","off","idle"].includes(e.state)}function d(e){return e.state!==i.Hh&&"returning"!==e.state}const l=(e,t)=>e.callWS({type:"vacuum/get_segments",entity_id:t})},29908:function(e,t,a){a.d(t,{f:function(){return n}});var i=a(90889),o=a(9899);const r=e=>e.sendMessagePromise({type:"config/area_registry/list"}),s=(e,t)=>e.subscribeEvents((0,o.s)(()=>r(e).then(e=>t.setState(e,!0)),500,!0),"area_registry_updated"),n=(e,t)=>(0,i.N)("_areaRegistry",r,s,e,t)},42269:function(e,t,a){a.d(t,{p:function(){return o}});var i=a(1087);const o=(e,t)=>(0,i.r)(e,"hass-more-info",t)},59992:function(e,t,a){a.a(e,async function(e,i){try{a.d(t,{V:function(){return v}});a(62953);var o=a(40445),r=a(88696),s=a(5124),n=a(6412),d=a(67576),l=e([r]);r=(l.then?(await l)():l)[0];let c,h,u=e=>e;const p=e=>void 0===e?[]:Array.isArray(e)?e:[e],v=e=>{class t extends e{get scrollableElement(){return t.DEFAULT_SCROLLABLE_ELEMENT}firstUpdated(e){var t;null===(t=super.firstUpdated)||void 0===t||t.call(this,e),this.scrollableElement&&this._updateScrollableState(this.scrollableElement),this._attachScrollableElement()}updated(e){var t;null===(t=super.updated)||void 0===t||t.call(this,e),this._attachScrollableElement()}disconnectedCallback(){this._detachScrollableElement(),this._contentScrolled=!1,this._contentScrollable=!1,super.disconnectedCallback()}renderScrollableFades(e=!1){return(0,s.qy)(c||(c=u` <div class="${0}"></div> <div class="${0}"></div> `),(0,n.H)({"fade-top":!0,rounded:e,visible:this._contentScrolled}),(0,n.H)({"fade-bottom":!0,rounded:e,visible:this._contentScrollable}))}static get styles(){var e;const t=Object.getPrototypeOf(this);return[...p(null!==(e=null==t?void 0:t.styles)&&void 0!==e?e:[]),(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 e=this.scrollableElement;e!==this._scrollTarget&&(this._detachScrollableElement(),e&&(this._scrollTarget=e,e.addEventListener("scroll",this._onScroll,{passive:!0}),this._resize.observe(e),this._updateScrollableState(e)))}_detachScrollableElement(){var e,t;this._scrollTarget&&(this._scrollTarget.removeEventListener("scroll",this._onScroll),null===(e=(t=this._resize).unobserve)||void 0===e||e.call(t,this._scrollTarget),this._scrollTarget=void 0)}_updateScrollableState(e){const t=parseFloat(getComputedStyle(e).getPropertyValue("--safe-area-inset-bottom"))||0,{scrollHeight:a=0,clientHeight:i=0,scrollTop:o=0}=e;this._contentScrollable=a-i>o+t+this.scrollFadeSafeAreaPadding}constructor(...e){super(...e),this._contentScrolled=!1,this._contentScrollable=!1,this._onScroll=e=>{var t;const a=e.currentTarget;this._contentScrolled=(null!==(t=a.scrollTop)&&void 0!==t?t:0)>this.scrollFadeThreshold,this._updateScrollableState(a)},this._resize=new r.P(this,{target:null,callback:e=>{var t;const a=null===(t=e[0])||void 0===t?void 0:t.target;a&&this._updateScrollableState(a)}}),this.scrollFadeSafeAreaPadding=4,this.scrollFadeThreshold=4}}return t.DEFAULT_SCROLLABLE_ELEMENT=null,(0,o.Cg)([(0,d.wk)()],t.prototype,"_contentScrolled",void 0),(0,o.Cg)([(0,d.wk)()],t.prototype,"_contentScrollable",void 0),t};i()}catch(c){i(c)}})},34023:function(e,t,a){a.d(t,{E:function(){return o},J:function(){return r}});a(3362),a(62953);var i=a(1087);const o=()=>Promise.all([a.e(32450),a.e(7305),a.e(92769),a.e(3283),a.e(85010),a.e(89100),a.e(33889),a.e(62574),a.e(26092),a.e(39005),a.e(8851),a.e(66201),a.e(52808),a.e(33887),a.e(33790),a.e(61023)]).then(a.bind(a,39803)),r=(e,t)=>{(0,i.r)(e,"show-dialog",{dialogTag:"dialog-area-registry-detail",dialogImport:o,dialogParams:t})}},24367:function(e,t,a){a.d(t,{L:function(){return o},z:function(){return r}});var i=a(23832);const o=["input_boolean","input_button","input_text","input_number","input_datetime","input_select","counter","timer","schedule"],r=(0,i.g)(o)},7664:function(e,t,a){a.a(e,async function(e,i){try{a.r(t);a(74423),a(18111),a(22489),a(20116),a(61701),a(13579),a(3362),a(96167),a(27495),a(25440),a(79978),a(62953);var o=a(40445),r=a(5124),s=a(67576),n=a(69558),d=a(1087),l=a(71727),c=a(37981),h=a(91926),u=(a(93444),a(90248)),p=a(18350),v=a(72554),g=a(20559),f=a(14503),m=a(58594),b=a(59241),_=a(65063),y=a(72373),w=a(32280),C=(a(41834),a(16946)),x=(a(85810),a(10625)),k=(a(70978),a(2205)),$=a(11988),L=a(84806),S=a(81619),E=e([u,p,v,w,C,x,k,$,L,y]);[u,p,v,w,C,x,k,$,L,y]=E.then?(await E)():E;let A,M,T,z,O,q,P,H,I=e=>e;const N={main:void 0,new:"main",existing:"main",google_home:"existing",google_home_fallback:"google_home",apple_home:"existing",generic:"existing",commissioning:void 0,device_added:void 0};class D extends r.WF{showDialog(){this._open=!0,this._unsub=(0,g.m2)(this.hass,e=>{(0,h.Te)(`/config/devices/device/${e.id}`),this._newDevice=e,this._step="device_added",this._fetchMainEntity()})}closeDialog(){this._open=!1}updated(e){e.has("hass")&&this._newDevice&&!this._mainEntityFetched&&this._fetchMainEntity()}async _fetchMainEntity(){if(!this._newDevice||this._mainEntityFetched)return;const e=Object.values(this.hass.entities).filter(e=>e.device_id===this._newDevice.id).map(e=>e.entity_id);if(!e.length)return;this._mainEntityFetched=!0;const t=await(0,b.G3)(this.hass,e);this._mainEntity=Object.values(t).find(e=>{var t;if(e.entity_category)return!1;const a=(0,l.m)(e.entity_id),i=y.T[a];if(!i)return!1;const o=null!==(t=e.device_class)&&void 0!==t?t:e.original_device_class;return!!o&&i.some(e=>e.length>1&&e.includes(o))})}_dialogClosed(){var e;this._open=!1,this._step="main",this._pairingCode="",this._newDevice=void 0,this._mainEntity=void 0,this._mainEntityFetched=!1,this._deviceAddedState={name:"",area:void 0,deviceClass:void 0,hasPendingUpdates:!1},null===(e=this._unsub)||void 0===e||e.call(this),this._unsub=void 0,(0,d.r)(this,"dialog-closed",{dialog:this.localName})}_handleStepSelected(e){this._step=e.detail.step,this._pairingCode=""}_handlePairingCodeChanged(e){this._pairingCode=e.detail.code}_handleDeviceAddedChanged(e){this._deviceAddedState=e.detail}_back(){const e=N[this._step];e&&(this._step=e)}_renderStep(){return(0,r.qy)(A||(A=I` <div @pairing-code-changed="${0}" @step-selected="${0}" @device-added-changed="${0}" .hass="${0}"> ${0} </div> `),this._handlePairingCodeChanged,this._handleStepSelected,this._handleDeviceAddedChanged,this.hass,(0,n._)(`matter-add-device-${this._step.replaceAll("_","-")}`,{hass:this.hass,device:this._newDevice,mainEntity:this._mainEntity}))}async _addDevice(){const e=this._pairingCode,t=this._step;try{this._step="commissioning",await(0,g.PO)(this.hass,e)}catch(a){(0,S.P)(this,{message:this.hass.localize("ui.dialogs.matter-add-device.add_device_failed"),duration:2e3}),this._step=t}}async _finishDeviceAdded(){const e=this._newDevice,{name:t,area:a,deviceClass:i,hasPendingUpdates:o}=this._deviceAddedState;if(o){var r,s;const o=t!==(null!==(r=(0,c.xn)(e))&&void 0!==r?r:""),l=a!==(null!==(s=e.area_id)&&void 0!==s?s:void 0);if((o||l)&&await(0,m.FB)(this.hass,e.id,Object.assign(Object.assign({},o&&{name_by_user:t||null}),l&&{area_id:a||null})).catch(e=>(0,_.showAlertDialog)(this,{text:this.hass.localize("ui.panel.config.integrations.config_flow.error_saving_device",{error:e.message})})),o&&t){const t=Object.values(this.hass.entities).filter(t=>t.device_id===e.id).map(e=>e.entity_id);if(t.length){const e=await(0,b.BM)(this.hass,t);await Promise.allSettled(Object.entries(e).filter(e=>!!e[1]).map(([e,t])=>(0,b.G_)(this.hass,e,{new_entity_id:t}).catch(e=>(0,_.showAlertDialog)(this,{text:this.hass.localize("ui.panel.config.integrations.config_flow.error_saving_entity",{error:e.message})}))))}}if(this._mainEntity){var n,d;i!==(null!==(n=null!==(d=this._mainEntity.device_class)&&void 0!==d?d:this._mainEntity.original_device_class)&&void 0!==n?n:void 0)&&await(0,b.G_)(this.hass,this._mainEntity.entity_id,{device_class:i||null}).catch(e=>(0,_.showAlertDialog)(this,{text:this.hass.localize("ui.panel.config.integrations.config_flow.error_saving_entity",{error:e.message})}))}}this.closeDialog(),(0,h.oo)(`/config/devices/device/${e.id}`)}_renderActions(){return"apple_home"===this._step||"google_home_fallback"===this._step||"generic"===this._step?(0,r.qy)(M||(M=I` <ha-button slot="primaryAction" @click="${0}" .disabled="${0}"> ${0} </ha-button> `),this._addDevice,!this._pairingCode,this.hass.localize("ui.dialogs.matter-add-device.add_device")):"new"===this._step?(0,r.qy)(T||(T=I` <ha-button slot="primaryAction" @click="${0}"> ${0} </ha-button> `),this.closeDialog,this.hass.localize("ui.common.ok")):"device_added"===this._step?(0,r.qy)(z||(z=I` <ha-button slot="primaryAction" @click="${0}"> ${0} </ha-button> `),this._finishDeviceAdded,this._deviceAddedState.hasPendingUpdates?this.hass.localize("ui.dialogs.matter-add-device.device_added.finish"):this.hass.localize("ui.dialogs.matter-add-device.device_added.skip")):r.s6}render(){if(!this._open)return r.s6;const e=this.hass.localize(`ui.dialogs.matter-add-device.${this._step}.header`),t=N[this._step],a=this._renderActions();return(0,r.qy)(O||(O=I` <ha-dialog .open="${0}" header-title="${0}" prevent-scrim-close @closed="${0}"> ${0} ${0} ${0} </ha-dialog> `),this._open,e,this._dialogClosed,t?(0,r.qy)(q||(q=I` <ha-icon-button-arrow-prev slot="headerNavigationIcon" .hass="${0}" @click="${0}"></ha-icon-button-arrow-prev> `),this.hass,this._back):r.s6,this._renderStep(),a===r.s6?r.s6:(0,r.qy)(P||(P=I`<ha-dialog-footer slot="footer"> ${0} </ha-dialog-footer>`),a))}constructor(...e){super(...e),this._open=!1,this._pairingCode="",this._step="main",this._deviceAddedState={name:"",area:void 0,deviceClass:void 0,hasPendingUpdates:!1},this._mainEntityFetched=!1}}D.styles=[f.nA,(0,r.AH)(H||(H=I`:host{--horizontal-padding:24px}ha-dialog{--dialog-content-padding:0}@media all and (max-width:450px),all and (max-height:500px){:host{--horizontal-padding:16px}}.loading{padding:24px;display:flex;align-items:center;justify-content:center}`))],(0,o.Cg)([(0,s.MZ)({attribute:!1})],D.prototype,"hass",void 0),(0,o.Cg)([(0,s.wk)()],D.prototype,"_open",void 0),(0,o.Cg)([(0,s.wk)()],D.prototype,"_pairingCode",void 0),(0,o.Cg)([(0,s.wk)()],D.prototype,"_step",void 0),(0,o.Cg)([(0,s.wk)()],D.prototype,"_newDevice",void 0),(0,o.Cg)([(0,s.wk)()],D.prototype,"_mainEntity",void 0),(0,o.Cg)([(0,s.wk)()],D.prototype,"_deviceAddedState",void 0),D=(0,o.Cg)([(0,s.EM)("dialog-matter-add-device")],D),i()}catch(A){i(A)}})},32280:function(e,t,a){a.a(e,async function(e,t){try{a(62953);var i=a(40445),o=a(5124),r=a(67576),s=a(1087),n=(a(43661),a(91485)),d=a(10465),l=e([n]);n=(l.then?(await l)():l)[0];let c,h,u,p=e=>e;class v extends o.WF{render(){return(0,o.qy)(c||(c=p` <div class="content"> <ol> <li> ${0} </li> <li> ${0} </li> <li> ${0} </li> </ol> <br> <p> ${0} </p> <ha-input label="${0}" .value="${0}" @input="${0}"></ha-input> </div> `),this.hass.localize("ui.dialogs.matter-add-device.apple_home.step_1",{accessory_settings:(0,o.qy)(h||(h=p`<b>${0}</b>`),this.hass.localize("ui.dialogs.matter-add-device.apple_home.accessory_settings"))}),this.hass.localize("ui.dialogs.matter-add-device.apple_home.step_2",{turn_on_pairing_mode:(0,o.qy)(u||(u=p`<b>${0}</b>`),this.hass.localize("ui.dialogs.matter-add-device.apple_home.turn_on_pairing_mode"))}),this.hass.localize("ui.dialogs.matter-add-device.apple_home.step_3"),this.hass.localize("ui.dialogs.matter-add-device.apple_home.code_instructions"),this.hass.localize("ui.dialogs.matter-add-device.apple_home.setup_code"),this._code,this._onCodeChanged)}_onCodeChanged(e){const t=e.target.value;this._code=t,(0,s.r)(this,"pairing-code-changed",{code:t})}constructor(...e){super(...e),this._code=""}}v.styles=[d.g],(0,i.Cg)([(0,r.MZ)({attribute:!1})],v.prototype,"hass",void 0),(0,i.Cg)([(0,r.wk)()],v.prototype,"_code",void 0),v=(0,i.Cg)([(0,r.EM)("matter-add-device-apple-home")],v),t()}catch(c){t(c)}})},11988:function(e,t,a){a.a(e,async function(e,t){try{var i=a(40445),o=a(5124),r=a(67576),s=a(10465),n=a(65829),d=e([n]);n=(d.then?(await d)():d)[0];let l,c,h=e=>e;class u extends o.WF{render(){return(0,o.qy)(l||(l=h` <div class="content"> <ha-spinner size="medium"></ha-spinner> <p> ${0} </p> </div> `),this.hass.localize("ui.dialogs.matter-add-device.commissioning.note"))}}u.styles=[s.g,(0,o.AH)(c||(c=h`.content{display:flex;align-items:center;flex-direction:column;text-align:center}ha-spinner{margin-bottom:24px}`))],(0,i.Cg)([(0,r.MZ)({attribute:!1})],u.prototype,"hass",void 0),u=(0,i.Cg)([(0,r.EM)("matter-add-device-commissioning")],u),t()}catch(l){t(l)}})},84806:function(e,t,a){a.a(e,async function(e,t){try{a(74423),a(44114),a(26910),a(18111),a(61701),a(62953);var i=a(40445),o=a(5124),r=a(67576),s=a(22786),n=a(71727),d=a(37981),l=a(52220),c=a(1087),h=a(66086),u=a(91485),p=a(606),v=(a(70947),a(44144)),g=a(10465),f=a(72373),m=e([h,u,p,f]);[h,u,p,f]=m.then?(await m)():m;let b,_,y,w,C,x,k=e=>e;class $ extends o.WF{willUpdate(e){var t,a,i,o;!this._initialized&&this.device&&(this._initialized=!0,this._deviceName=null!==(t=(0,d.xn)(this.device))&&void 0!==t?t:"",this._area=null!==(a=this.device.area_id)&&void 0!==a?a:void 0);!this._deviceClassInitialized&&(e.has("mainEntity")||this._initialized)&&this.mainEntity&&(this._deviceClassInitialized=!0,this._deviceClass=null!==(i=null!==(o=this.mainEntity.device_class)&&void 0!==o?o:this.mainEntity.original_device_class)&&void 0!==i?i:void 0)}get _deviceClassOptions(){if(!this.mainEntity)return;const e=(0,n.m)(this.mainEntity.entity_id),t=f.T[e];if(!t)return;const a=[[],[]];for(const i of t)this.mainEntity.original_device_class&&i.includes(this.mainEntity.original_device_class)?a[0]=i:a[1].push(...i);return a}get _hasPendingUpdates(){var e,t,a,i,o,r;const s=null!==(e=(0,d.xn)(this.device))&&void 0!==e?e:"",n=null!==(t=this.device.area_id)&&void 0!==t?t:void 0,l=null!==(a=null!==(i=null===(o=this.mainEntity)||void 0===o?void 0:o.device_class)&&void 0!==i?i:null===(r=this.mainEntity)||void 0===r?void 0:r.original_device_class)&&void 0!==a?a:void 0;return this._deviceName!==s||this._area!==n||void 0!==this.mainEntity&&this._deviceClass!==l}updated(e){(e.has("_deviceName")||e.has("_area")||e.has("_deviceClass"))&&(0,c.r)(this,"device-added-changed",{name:this._deviceName,area:this._area,deviceClass:this._deviceClass,hasPendingUpdates:this._hasPendingUpdates})}render(){var e;if(!this.device)return o.s6;const t=this.mainEntity?(0,n.m)(this.mainEntity.entity_id):void 0,a=this._deviceClassOptions;return(0,o.qy)(b||(b=k` <div class="content"> <div class="device"> <div class="device-info"> <img alt="Matter" src="${0}" crossorigin="anonymous" referrerpolicy="no-referrer"> <div class="device-name"> <span>${0}</span> <span class="secondary">Matter</span> </div> </div> <ha-input .label="${0}" .value="${0}" @change="${0}"></ha-input> <ha-area-picker .hass="${0}" .value="${0}" @value-changed="${0}"></ha-area-picker> ${0} </div> </div> `),(0,v.MR)({domain:"matter",type:"icon",darkOptimized:null===(e=this.hass.themes)||void 0===e?void 0:e.darkMode},this.hass.auth.data.hassUrl),(0,d.xn)(this.device),this.hass.localize("ui.panel.config.integrations.config_flow.device_name"),this._deviceName,this._deviceNameChanged,this.hass,this._area,this._areaPicked,a&&t?(0,o.qy)(_||(_=k` <ha-select .label="${0}" .value="${0}" clearable @selected="${0}"> ${0} ${0} ${0} </ha-select> `),this.hass.localize("ui.dialogs.entity_registry.editor.device_class"),this._deviceClass?this.hass.localize(`ui.dialogs.entity_registry.editor.device_classes.${t}.${this._deviceClass}`):void 0,this._deviceClassChanged,this._deviceClassesSorted(t,a[0]).map(e=>(0,o.qy)(y||(y=k` <ha-dropdown-item .value="${0}" .selected="${0}"> ${0} </ha-dropdown-item> `),e.deviceClass,e.deviceClass===this._deviceClass,e.label)),a[0].length&&a[1].length?(0,o.qy)(w||(w=k`<wa-divider></wa-divider>`)):o.s6,this._deviceClassesSorted(t,a[1]).map(e=>(0,o.qy)(C||(C=k` <ha-dropdown-item .value="${0}" .selected="${0}"> ${0} </ha-dropdown-item> `),e.deviceClass,e.deviceClass===this._deviceClass,e.label))):o.s6)}_deviceNameChanged(e){this._deviceName=e.currentTarget.value}_areaPicked(e){this._area=e.detail.value||void 0}_deviceClassChanged(e){this._deviceClass=e.detail.value}constructor(...e){super(...e),this._deviceName="",this._initialized=!1,this._deviceClassInitialized=!1,this._deviceClassesSorted=(0,s.A)((e,t)=>t.map(t=>({deviceClass:t,label:this.hass.localize(`ui.dialogs.entity_registry.editor.device_classes.${e}.${t}`)})).sort((e,t)=>(0,l.SH)(e.label,t.label,this.hass.locale.language)))}}$.styles=[g.g,(0,o.AH)(x||(x=k`.device{border:1px solid var(--divider-color);padding:var(--ha-space-2);border-radius:var(--ha-border-radius-sm)}.device-info{display:flex;align-items:center;gap:var(--ha-space-2);margin-bottom:var(--ha-space-1)}.device-info img{width:40px;height:40px}.device-name{display:flex;flex-direction:column;justify-content:center}.secondary{color:var(--secondary-text-color);font-size:var(--ha-font-size-s)}ha-input{margin:var(--ha-space-2) 0}ha-area-picker,ha-select{display:block;margin-top:var(--ha-space-2)}`))],(0,i.Cg)([(0,r.MZ)({attribute:!1})],$.prototype,"hass",void 0),(0,i.Cg)([(0,r.MZ)({attribute:!1})],$.prototype,"device",void 0),(0,i.Cg)([(0,r.MZ)({attribute:!1})],$.prototype,"mainEntity",void 0),(0,i.Cg)([(0,r.wk)()],$.prototype,"_deviceName",void 0),(0,i.Cg)([(0,r.wk)()],$.prototype,"_area",void 0),(0,i.Cg)([(0,r.wk)()],$.prototype,"_deviceClass",void 0),$=(0,i.Cg)([(0,r.EM)("matter-add-device-device-added")],$),t()}catch(b){t(b)}})},41834:function(e,t,a){var i=a(40445),o=a(5124),r=a(67576),s=a(1087),n=(a(43661),a(17308),a(2846),a(10465));let d,l,c=e=>e;class h extends o.WF{render(){return(0,o.qy)(d||(d=c` <div class="content"> <p> ${0} </p> </div> <ha-md-list> <ha-md-list-item interactive type="button" .step="${0}" @click="${0}" @keydown="${0}"> <img src="/static/images/logo_google_home.png" alt="" class="logo" slot="start"> <span slot="headline"> ${0} </span> <ha-icon-next slot="end"></ha-icon-next> </ha-md-list-item> <ha-md-list-item interactive type="button" .step="${0}" @click="${0}" @keydown="${0}"> <img src="/static/images/logo_apple_home.png" alt="" class="logo" slot="start"> <span slot="headline"> ${0} </span> <ha-icon-next slot="end"></ha-icon-next> </ha-md-list-item> <ha-md-list-item interactive type="button" .step="${0}" @click="${0}" @keydown="${0}"> <div class="logo" slot="start"> <ha-svg-icon path="${0}"></ha-svg-icon> </div> <span slot="headline"> ${0} </span> <ha-icon-next slot="end"></ha-icon-next> </ha-md-list-item> </ha-md-list> `),this.hass.localize("ui.dialogs.matter-add-device.existing.question"),"google_home",this._onItemClick,this._onItemClick,this.hass.localize("ui.dialogs.matter-add-device.existing.answer_google_home"),"apple_home",this._onItemClick,this._onItemClick,this.hass.localize("ui.dialogs.matter-add-device.existing.answer_apple_home"),"generic",this._onItemClick,this._onItemClick,"M12,3L2,12H5V20H19V12H22L12,3M12,8.5C14.34,8.5 16.46,9.43 18,10.94L16.8,12.12C15.58,10.91 13.88,10.17 12,10.17C10.12,10.17 8.42,10.91 7.2,12.12L6,10.94C7.54,9.43 9.66,8.5 12,8.5M12,11.83C13.4,11.83 14.67,12.39 15.6,13.3L14.4,14.47C13.79,13.87 12.94,13.5 12,13.5C11.06,13.5 10.21,13.87 9.6,14.47L8.4,13.3C9.33,12.39 10.6,11.83 12,11.83M12,15.17C12.94,15.17 13.7,15.91 13.7,16.83C13.7,17.75 12.94,18.5 12,18.5C11.06,18.5 10.3,17.75 10.3,16.83C10.3,15.91 11.06,15.17 12,15.17Z",this.hass.localize("ui.dialogs.matter-add-device.existing.answer_generic"))}_onItemClick(e){if("keydown"===e.type&&"Enter"!==e.key&&" "!==e.key)return;const t=e.currentTarget.step;(0,s.r)(this,"step-selected",{step:t})}}h.styles=[n.g,(0,o.AH)(l||(l=c`.logo{width:48px;height:48px;border-radius:var(--ha-border-radius-lg);border:1px solid var(--divider-color);padding:10px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;object-fit:contain}.logo ha-svg-icon{--mdc-icon-size:36px}`))],(0,i.Cg)([(0,r.MZ)({attribute:!1})],h.prototype,"hass",void 0),h=(0,i.Cg)([(0,r.EM)("matter-add-device-existing")],h)},16946:function(e,t,a){a.a(e,async function(e,t){try{a(62953);var i=a(40445),o=a(5124),r=a(67576),s=a(1087),n=(a(43661),a(91485)),d=a(10465),l=e([n]);n=(l.then?(await l)():l)[0];let c,h=e=>e;class u extends o.WF{render(){return(0,o.qy)(c||(c=h` <div class="content"> <p> ${0} </p> <ha-input label="${0}" .value="${0}" @input="${0}"></ha-input> </div> `),this.hass.localize("ui.dialogs.matter-add-device.generic.code_instructions"),this.hass.localize("ui.dialogs.matter-add-device.generic.setup_code"),this._code,this._onCodeChanged)}_onCodeChanged(e){const t=e.target.value;this._code=t,(0,s.r)(this,"pairing-code-changed",{code:t})}constructor(...e){super(...e),this._code=""}}u.styles=[d.g],(0,i.Cg)([(0,r.MZ)({attribute:!1})],u.prototype,"hass",void 0),(0,i.Cg)([(0,r.wk)()],u.prototype,"_code",void 0),u=(0,i.Cg)([(0,r.EM)("matter-add-device-generic")],u),t()}catch(c){t(c)}})},10625:function(e,t,a){a.a(e,async function(e,t){try{a(62953);var i=a(40445),o=a(5124),r=a(67576),s=a(1087),n=(a(43661),a(91485)),d=a(10465),l=e([n]);n=(l.then?(await l)():l)[0];let c,h,u,p,v=e=>e;class g extends o.WF{render(){return(0,o.qy)(c||(c=v` <div class="content"> <ol> <li> ${0} </li> <li> ${0} </li> <li> ${0} </li> </ol> <br> <p> ${0} </p> <ha-input label="${0}" .value="${0}" @input="${0}"></ha-input> </div> `),this.hass.localize("ui.dialogs.matter-add-device.google_home_fallback.step_1"),this.hass.localize("ui.dialogs.matter-add-device.google_home_fallback.step_2",{linked_matter_apps_services:(0,o.qy)(h||(h=v`<b>${0}</b>`),this.hass.localize("ui.dialogs.matter-add-device.google_home_fallback.linked_matter_apps_services"))}),this.hass.localize("ui.dialogs.matter-add-device.google_home_fallback.step_3",{link_apps_services:(0,o.qy)(u||(u=v`<b>${0}</b>`),this.hass.localize("ui.dialogs.matter-add-device.google_home_fallback.link_apps_services")),use_pairing_code:(0,o.qy)(p||(p=v`<b>${0}</b>`),this.hass.localize("ui.dialogs.matter-add-device.google_home_fallback.use_pairing_code"))}),this.hass.localize("ui.dialogs.matter-add-device.google_home_fallback.code_instructions"),this.hass.localize("ui.dialogs.matter-add-device.google_home_fallback.pairing_code"),this._code,this._onCodeChanged)}_onCodeChanged(e){const t=e.target.value;this._code=t,(0,s.r)(this,"pairing-code-changed",{code:t})}constructor(...e){super(...e),this._code=""}}g.styles=[d.g],(0,i.Cg)([(0,r.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,i.Cg)([(0,r.wk)()],g.prototype,"_code",void 0),g=(0,i.Cg)([(0,r.EM)("matter-add-device-google-home-fallback")],g),t()}catch(c){t(c)}})},85810:function(e,t,a){var i=a(40445),o=a(5124),r=a(67576),s=a(1087),n=(a(43661),a(10465));let d,l,c,h,u=e=>e;class p extends o.WF{render(){return(0,o.qy)(d||(d=u` <div class="content"> <ol> <li> ${0} </li> <li> ${0} </li> <li> ${0} <span class="link" type="button" tabindex="0" @keydown="${0}" @click="${0}"> ${0} </span> </li> <li> ${0} </li> </ol> <br> </div> `),this.hass.localize("ui.dialogs.matter-add-device.google_home.step_1"),this.hass.localize("ui.dialogs.matter-add-device.google_home.step_2",{linked_matter_apps_services:(0,o.qy)(l||(l=u`<b>${0}</b>`),this.hass.localize("ui.dialogs.matter-add-device.google_home.linked_matter_apps_services"))}),this.hass.localize("ui.dialogs.matter-add-device.google_home.step_3",{link_apps_services:(0,o.qy)(c||(c=u`<b>${0}</b>`),this.hass.localize("ui.dialogs.matter-add-device.google_home.link_apps_services")),home_assistant:(0,o.qy)(h||(h=u`<b>ioBroker</b>`))}),this._nextStep,this._nextStep,this.hass.localize("ui.dialogs.matter-add-device.google_home.no_home_assistant"),this.hass.localize("ui.dialogs.matter-add-device.google_home.redirect"))}_nextStep(){(0,s.r)(this,"step-selected",{step:"google_home_fallback"})}}p.styles=[n.g],(0,i.Cg)([(0,r.MZ)({attribute:!1})],p.prototype,"hass",void 0),p=(0,i.Cg)([(0,r.EM)("matter-add-device-google-home")],p)},70978:function(e,t,a){var i=a(40445),o=a(5124),r=a(67576),s=a(1087),n=(a(43661),a(2846),a(17308),a(10465));let d,l=e=>e;class c extends o.WF{render(){return(0,o.qy)(d||(d=l` <div class="content"> <p class="text"> ${0} </p> </div> <ha-md-list> <ha-md-list-item interactive type="button" .step="${0}" @click="${0}" @keydown="${0}"> <span slot="headline"> ${0} </span> <span slot="supporting-text"> ${0} </span> <ha-icon-next slot="end"></ha-icon-next> </ha-md-list-item> <ha-md-list-item interactive type="button" .step="${0}" @click="${0}" @keydown="${0}"> <span slot="headline"> ${0} </span> <span slot="supporting-text"> ${0} </span> <ha-icon-next slot="end"></ha-icon-next> </ha-md-list-item> </ha-md-list> `),this.hass.localize("ui.dialogs.matter-add-device.main.question"),"new",this._onItemClick,this._onItemClick,this.hass.localize("ui.dialogs.matter-add-device.main.answer_new"),this.hass.localize("ui.dialogs.matter-add-device.main.answer_new_description"),"existing",this._onItemClick,this._onItemClick,this.hass.localize("ui.dialogs.matter-add-device.main.answer_existing"),this.hass.localize("ui.dialogs.matter-add-device.main.answer_existing_description"))}_onItemClick(e){if("keydown"===e.type&&"Enter"!==e.key&&" "!==e.key)return;const t=e.currentTarget.step;(0,s.r)(this,"step-selected",{step:t})}}c.styles=[n.g],(0,i.Cg)([(0,r.MZ)({attribute:!1})],c.prototype,"hass",void 0),c=(0,i.Cg)([(0,r.EM)("matter-add-device-main")],c)},2205:function(e,t,a){a.a(e,async function(e,t){try{var i=a(40445),o=a(5124),r=a(67576),s=a(65829),n=a(20559),d=a(10465),l=e([s]);s=(l.then?(await l)():l)[0];let c,h,u,p=e=>e;class v extends o.WF{firstUpdated(){(0,n.k2)(this.hass)&&(0,n.VN)(this.hass)}render(){return(0,n.k2)(this.hass)?(0,o.qy)(c||(c=p` <div class="content"> <ha-spinner size="medium"></ha-spinner> </div> `)):(0,o.qy)(h||(h=p` <div class="content"> <p>${0}</p> <p> ${0} </p> <div class="app-qr"> <a target="_blank" rel="noreferrer noopener" href="https://apps.apple.com/app/home-assistant/id1099568401?mt=8"> <img loading="lazy" src="/static/images/appstore.svg" alt="${0}" class="icon"> <img loading="lazy" src="/static/images/qr-appstore.svg" alt="${0}"> </a> <a target="_blank" rel="noreferrer noopener" href="https://play.google.com/store/apps/details?id=io.homeassistant.companion.android"> <img loading="lazy" src="/static/images/playstore.svg" alt="${0}" class="icon"> <img loading="lazy" src="/static/images/qr-playstore.svg" alt="${0}"> </a> </div> </div> `),this.hass.localize("ui.dialogs.matter-add-device.new.note"),this.hass.localize("ui.dialogs.matter-add-device.new.download_app"),this.hass.localize("ui.dialogs.matter-add-device.new.appstore"),this.hass.localize("ui.dialogs.matter-add-device.new.appstore"),this.hass.localize("ui.dialogs.matter-add-device.new.playstore"),this.hass.localize("ui.dialogs.matter-add-device.new.playstore"))}}v.styles=[d.g,(0,o.AH)(u||(u=p`.content{display:flex;align-items:center;flex-direction:column;text-align:center}.app-qr{margin:24px auto 0 auto;display:flex;justify-content:space-between;padding:0 24px;box-sizing:border-box;gap:var(--ha-space-4);width:100%;max-width:400px}.app-qr a,.app-qr img{flex:1}`))],(0,i.Cg)([(0,r.MZ)({attribute:!1})],v.prototype,"hass",void 0),v=(0,i.Cg)([(0,r.EM)("matter-add-device-new")],v),t()}catch(c){t(c)}})},10465:function(e,t,a){a.d(t,{g:function(){return o}});let i;const o=(0,a(5124).AH)(i||(i=(e=>e)`.content{padding:16px var(--horizontal-padding,16px)}p{margin:0}p:not(:last-child){margin-bottom:8px}ol{padding-inline-start:20px;margin-block-start:0;margin-block-end:8px}li{margin-bottom:8px}.link{color:var(--primary-color);cursor:pointer;text-decoration:underline}ha-md-list{padding:0;--md-list-item-leading-space:var(--horizontal-padding, 16px);--md-list-item-trailing-space:var(--horizontal-padding, 16px);margin-bottom:16px}ha-input{width:100%}`))},86030:function(e,t,a){a.d(t,{B:function(){return i},a:function(){return o}});a(72712),a(94490),a(18111),a(18237),a(42762),a(62953);function i(e){return Array.isArray(e)?e.reverse().reduce((e,t)=>`var(${t}${e?`, ${e}`:""})`,void 0):`var(${e})`}function o(e,t){if(Array.isArray(e))for(const a of e){const e=o(a,t);if(e)return e}else if(e.endsWith("-color"))return t.getPropertyValue(e).trim()||void 0}},53580:function(e,t,a){a.d(t,{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"},85614:function(e,t,a){a.d(t,{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(e,t,a){a.d(t,{V:function(){return o}});var i=a(37177);const o=e=>!!e&&i.n},37177:function(e,t,a){a.d(t,{n:function(){return i}});a(27495);const i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)},88438:function(e,t,a){a.d(t,{C:function(){return i}});const i="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}}]);