UNPKG

iobroker.lovelace

Version:

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

4 lines 39.8 kB
export const __rspack_esm_id=53345;export const __rspack_esm_ids=[53345];export const __webpack_modules__={65522(e,t,a){a.d(t,{A:()=>i});const i=e=>e.name?.trim()},81816(e,t,a){a.d(t,{aH:()=>s,cx:()=>n,es:()=>l});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 l=(0,i.xn)(n);return l!==s?l&&s&&(0,r.p)(s,l)||s:void 0},l=(e,t,a)=>!s(e,t,a)},74705(e,t,a){a.d(t,{Bj:()=>u,Cf:()=>p,uU:()=>h});a(18111),a(81148),a(22489),a(61701),a(13579);if(66649!=a.j)var i=a(44537);var o=a(15638),r=a(65522),s=a(37981),n=a(81816),l=a(55931);if(66649!=a.j)var d=a(28978);var c=a(28455);const h=(e,t,a,o,r,s,l)=>{if("string"==typeof t)return t;if(!t)return(0,d.u)(e);let c=(0,i.e)(t);const h=l?.separator??" ";if(c.every(e=>"text"===e.type))return c.map(e=>e.text).join(h);if((0,n.es)(e,a,o)){c.some(e=>"device"===e.type)||(c=c.map(e=>"entity"===e.type?{type:"device"}:e))}const u=p(e,c,a,o,r,s);return 1===u.length?u[0]||"":u.filter(e=>e).join(h)},p=(e,t,a,i,o,d)=>{const{device:h,area:p,floor:u}=(0,c.ln)(e,a,i,o,d);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 p?(0,r.A)(p):void 0;case"floor":return u?(0,l.X)(u):void 0;case"text":return t.text;default:return""}})},u=(e,t)=>{const[a,i,r]=p(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}}},55931(e,t,a){a.d(t,{X:()=>i});const i=e=>e.name?.trim()},78649(e,t,a){a.d(t,{n:()=>o});const i=/^(\w+)\.(\w+)$/,o=e=>i.test(e)},34470(e,t,a){a.d(t,{E:()=>i});const i=a(5124).AH`ha-state-icon[data-domain=alarm_control_panel][data-state=arming],ha-state-icon[data-domain=alarm_control_panel][data-state=pending],ha-state-icon[data-domain=alarm_control_panel][data-state=triggered],ha-state-icon[data-domain=lock][data-state=jammed]{animation:pulse 1s infinite}@keyframes pulse{0%{opacity:1}50%{opacity:0}100%{opacity:1}}ha-state-icon[data-state=unavailable]{color:var(--state-unavailable-color)}`},60353(e,t,a){a.d(t,{u:()=>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={}){this._startY=0,this._delta=0,this._startTime=0,this._lastY=0,this._lastTime=0,this._velocityThreshold=e.velocitySwipeThreshold??.5,this._movementTimeThreshold=e.movementTimeThreshold??100}}},3931(e,t,a){a.d(t,{U:()=>i});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 l=a(i,o,...r);return s[o]=l,l.then(()=>setTimeout(()=>{s[o]=void 0},t),()=>{s[o]=void 0}),l}},5745(e,t,a){var i=a(62826),o=a(99731),r=a(22441);class s extends o.Y{}s=(0,i.Cg)([(0,r.EM)("ha-chip-set")],s)},74281(e,t,a){a.a(e,async function(e,t){try{a(18111),a(7588),a(45367),a(92731);var i=a(62826),o=a(5124),r=a(22441),s=a(63672),n=a(89784),l=a(71727),d=a(69093),c=a(52658),h=a(34470),p=a(10897),u=a(38279),m=a(93367),g=e([m]);m=(g.then?(await g)():g)[0];const v="M13 14H11V9H13M13 18H11V16H13M1 21H23L12 2L1 21Z";class b extends o.WF{connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0===this.overrideImage&&(this.stateObj?.attributes.entity_picture||this.stateObj?.attributes.entity_picture_local)&&this.requestUpdate("stateObj")}disconnectedCallback(){super.disconnectedCallback(),void 0===this.overrideImage&&(this.stateObj?.attributes.entity_picture||this.stateObj?.attributes.entity_picture_local)&&(this.style.backgroundImage="")}get _stateColor(){const e=this.stateObj?(0,d.t)(this.stateObj):void 0;return this.stateColor??"light"===e}render(){const e=this.stateObj;if(!e&&!this.overrideIcon&&!this.overrideImage)return o.qy`<div class="missing"> <ha-svg-icon .path="${v}"></ha-svg-icon> </div>`;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,d.t)(e):void 0;return o.qy`<ha-state-icon style="${(0,n.W)(this._iconStyle)}" data-domain="${(0,s.J)(a)}" data-state="${(0,s.J)(e?.state)}" .icon="${this.overrideIcon}" .stateObj="${e}"></ha-state-icon>`}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,l.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 u.sx?a.color=(0,c.Se)(t,u.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,p.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,l.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,o.AH`: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})],b.prototype,"stateObj",void 0),(0,i.Cg)([(0,r.MZ)({attribute:!1})],b.prototype,"overrideIcon",void 0),(0,i.Cg)([(0,r.MZ)({attribute:!1})],b.prototype,"overrideImage",void 0),(0,i.Cg)([(0,r.MZ)({attribute:!1})],b.prototype,"stateColor",void 0),(0,i.Cg)([(0,r.MZ)()],b.prototype,"color",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],b.prototype,"icon",void 0),(0,i.Cg)([(0,r.wk)()],b.prototype,"_iconStyle",void 0),b=(0,i.Cg)([(0,r.EM)("state-badge")],b),t()}catch(e){t(e)}})},99611(e,t,a){a.a(e,async function(e,t){try{a(18111),a(13579),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698);var i=a(62826),o=a(1126),r=a(35211),s=a(5124),n=a(22441),l=a(1087),d=a(60353),c=a(22792),h=a(59992),p=a(14503),u=a(22348),m=e([o]);o=(m.then?(await m)():m)[0];const g=300,v=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"]),b=new Set(["volume-slider-container","forecast"]);class _ 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 s.qy` <wa-drawer id="drawer" placement="bottom" .open="${this._drawerOpen}" .lightDismiss="${!this.preventScrimClose}" .ariaLabelledby="${this.ariaLabelledBy}" .ariaDescribedby="${this.ariaDescribedBy}" @keydown="${this._handleKeyDown}" @wa-show="${this._handleShow}" @wa-after-show="${this._handleAfterShow}" @wa-hide="${this._handleHide}" @wa-after-hide="${this._handleAfterHide}" @click="${this._handleCloseAction}" without-header @touchstart="${this._handleTouchStart}"> <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> ${this.renderScrollableFades()} </div> <slot name="footer"></slot> </wa-drawer> `}_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 ${g}ms ease-out`),this.style.removeProperty("--dialog-transform"),setTimeout(()=>{this.style.removeProperty("--dialog-transition")},g)}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,p.dp,s.AH`wa-drawer{--wa-color-surface-raised:transparent;--spacing:0;--size:var(--ha-bottom-sheet-height, auto);--show-duration:${g}ms;--hide-duration:${g}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}`]}constructor(...e){super(...e),this.open=!1,this.flexContent=!1,this.preventScrimClose=!1,this._drawerOpen=!1,this._sliderInteractionActive=!1,this._gestureRecognizer=new d.u,this._isDragging=!1,this._escapePressed=!1,this._handleShow=async()=>{this._drawerOpen=!0,this.open=!0,(0,l.r)(this,"opened"),await this.updateComplete,requestAnimationFrame(()=>{const e=this._autofocusElement;this._hassConfig?.auth.external&&(0,u.V)(this._hassConfig.auth.external)?e&&(e.id||(e.id="ha-bottom-sheet-autofocus"),this._hassConfig.auth.external.fireMessage({type:"focus_element",payload:{element_id:e.id}})):e?.focus()})},this._handleAfterShow=()=>{(0,l.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,l.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 e of t){if(e===this._drawer)break;if(e instanceof HTMLElement&&(e.scrollTop>0||v.has(e.localName)||Array.from(e.classList).some(e=>b.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=()=>{this._unregisterResizeHandlers(),this._isDragging=!1;const e=this._gestureRecognizer.end();if(e.isSwipe)return void(e.isDownwardSwipe?this._drawerOpen=!1:this._animateSnapBack());const t=this._drawer.shadowRoot?.querySelector('[part="body"]'),a=t?.offsetHeight||0;a>0&&e.delta<0&&Math.abs(e.delta)>.5*a?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"})],_.prototype,"ariaLabelledBy",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"aria-describedby"})],_.prototype,"ariaDescribedBy",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],_.prototype,"open",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],_.prototype,"flexContent",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],_.prototype,"preventScrimClose",void 0),(0,i.Cg)([(0,n.wk)()],_.prototype,"_drawerOpen",void 0),(0,i.Cg)([(0,n.wk)()],_.prototype,"_sliderInteractionActive",void 0),(0,i.Cg)([(0,n.wk)(),(0,r.Fg)({context:c.WF,subscribe:!0})],_.prototype,"_hassConfig",void 0),(0,i.Cg)([(0,n.P)("#drawer")],_.prototype,"_drawer",void 0),(0,i.Cg)([(0,n.P)("#body")],_.prototype,"_bodyElement",void 0),(0,i.Cg)([(0,n.P)("[autofocus]")],_.prototype,"_autofocusElement",void 0),_=(0,i.Cg)([(0,n.EM)("ha-bottom-sheet")],_),t()}catch(e){t(e)}})},38508(e,t,a){a.a(e,async function(e,t){try{a(18111),a(13579);var i=a(62826),o=a(61366),r=a(35211),s=a(5124),n=a(22441),l=a(63672),d=a(91335),c=a(1087),h=a(22792),p=a(17894),u=a(22348),m=a(99611),g=a(18350),v=(a(75064),a(3449),a(49639)),b=a(88285),_=(a(67094),e([o,m,g,v,b]));[o,m,g,v,b]=_.then?(await _)():_;const y="M3 16H10V14H3M18 14V10H16V14H12V16H16V20H18V16H22V14M14 6H3V8H14M14 10H3V12H14V10Z";class f extends((0,p.c)(s.WF)){willUpdate(e){e.has("value")&&this._setUnknownValue()}setFieldValue(e){this._comboBox?this._comboBox.setFieldValue(e):this._initialFieldValue=e}render(){const e=this.useTopLabel&&this.value?void 0:this.label;return s.qy`<div class="container"> ${this.useTopLabel&&this.label?s.qy`<label ?disabled="${this.disabled}">${this.label}</label>`:s.s6} <div id="picker"> <slot name="field"> ${this.addButtonLabel&&!this.value?s.qy`<ha-button size="small" appearance="filled" @click="${this.open}" .disabled="${this.disabled}"> <ha-svg-icon .path="${y}" slot="start"></ha-svg-icon> ${this.addButtonLabel} </ha-button>`:s.qy`<ha-picker-field type="button" class="${this._opened?"opened":""}" compact="compact" .unknown="${this._unknownValue}" .unknownItemText="${this.unknownItemText}" aria-label="${(0,l.J)(this.label)}" @click="${this.open}" @clear="${this._clear}" .icon="${this.icon}" .image="${this.image}" .label="${e}" .placeholder="${this.placeholder}" .value="${this.value}" .valueRenderer="${this.valueRenderer}" .required="${this.required}" .disabled="${this.disabled}" .invalid="${this.invalid}" .hideClearIcon="${this.hideClearIcon}"> <slot name="start"></slot> </ha-picker-field>`} </slot> </div> ${this._pickerWrapperOpen||this._opened?this._openedNarrow?s.qy` <ha-bottom-sheet flexcontent .open="${this._pickerWrapperOpen}" @wa-after-show="${this._dialogOpened}" @closed="${this._hidePicker}" role="dialog" aria-modal="true" aria-label="${this.label||"Select option"}"> ${this._renderComboBox(!0)} </ha-bottom-sheet> `:s.qy` <wa-popover .open="${this._pickerWrapperOpen}" style="--body-width:${this._popoverWidth}px" without-arrow distance="-4" .placement="${this.popoverPlacement}" .for="${this.popoverAnchor?null:"picker"}" .anchor="${this.popoverAnchor??null}" auto-size="vertical" auto-size-padding="16" @wa-after-show="${this._dialogOpened}" @wa-after-hide="${this._hidePicker}" trap-focus role="dialog" aria-modal="true" aria-label="${this.label||"Select option"}"> ${this._renderComboBox()} </wa-popover> `:s.s6} </div> ${this._renderHelper()}`}_renderComboBox(e=!1){return this._opened?s.qy` <ha-picker-combo-box id="combo-box" .allowCustomValue="${this.allowCustomValue}" .label="${this.searchLabel}" .value="${this._selectedValue??this.value}" @value-changed="${this._valueChanged}" .rowRenderer="${this.rowRenderer}" .notFoundLabel="${this.notFoundLabel}" .emptyLabel="${this.emptyLabel}" .getItems="${this.getItems}" .getAdditionalItems="${this.getAdditionalItems}" .searchFn="${this.searchFn}" .mode="${e?"dialog":"popover"}" .sections="${this.sections}" .sectionTitleFunction="${this.sectionTitleFunction}" .selectedSection="${this.selectedSection}" .searchKeys="${this.searchKeys}" .customValueLabel="${this.customValueLabel}" .noSort="${this.noSort}"></ha-picker-combo-box> `:s.s6}_renderHelper(){const e=this.invalid&&this.errorMessage,t=!e&&this.helper;return e||t?s.qy`<ha-input-helper-text .disabled="${this.disabled}"> ${e?this.errorMessage:this.helper} </ha-input-helper-text>`:s.s6}refreshItems(){this._comboBox?.refreshItems()}_hidePicker(e){e.stopPropagation(),this._newValue&&((0,c.r)(this,"value-changed",{value:this._newValue}),this._newValue=void 0),this._opened=!1,this._pickerWrapperOpen=!1,this._selectedValue=void 0,this._unsubscribeTinyKeys?.(),(0,c.r)(this,"picker-closed")}_valueChanged(e){e.stopPropagation();const t=e.detail.value;t&&(this._pickerWrapperOpen=!1,this._newValue=t)}_clear(e){e.stopPropagation(),this._setValue(void 0)}_setValue(e){this.value=e,(0,c.r)(this,"value-changed",{value:e})}async open(e,t){e?.stopPropagation(),this.disabled||(this._selectedValue=t?.selectedValue,this._openedNarrow=this._narrow,this._popoverWidth=this._containerElement?.offsetWidth||250,this._pickerWrapperOpen=!0,this._unsubscribeTinyKeys=(0,d.Tc)(this,{Escape:this._handleEscClose}))}connectedCallback(){super.connectedCallback(),this._handleResize(),window.addEventListener("resize",this._handleResize)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this._handleResize),this._unsubscribeTinyKeys?.()}static get styles(){return[s.AH`.container{position:relative;display:block;max-width:100%}label[disabled]{color:var(--mdc-text-field-disabled-ink-color,rgba(0,0,0,.6))}label{display:block;margin:0 0 8px}ha-input-helper-text{display:block;margin:var(--ha-space-2) 0 0}:host([invalid]) ha-input-helper-text{color:var(--mdc-theme-error,var(--error-color,#b00020))}wa-popover{--wa-space-l:0}wa-popover::part(dialog)::backdrop{background:0 0}wa-popover::part(body){width:var(--ha-generic-picker-width,max(var(--body-width),250px));max-width:var(--ha-generic-picker-max-width,var(--ha-generic-picker-width,max(var(--body-width),250px)));max-height:500px;height:70vh;overflow:hidden}@media (max-height:1000px){wa-popover::part(body){max-height:400px}}ha-bottom-sheet{--ha-bottom-sheet-height:90vh;--ha-bottom-sheet-height:calc(100dvh - var(--ha-space-12));--ha-bottom-sheet-max-height:var(--ha-bottom-sheet-height);--ha-bottom-sheet-max-width:600px;--ha-bottom-sheet-padding:0;--ha-bottom-sheet-surface-background:var(--card-background-color);--ha-bottom-sheet-border-radius:var(--ha-border-radius-2xl);--ha-bottom-sheet-content-padding:0 var(--safe-area-inset-right) var(--safe-area-inset-bottom) var(--safe-area-inset-left)}ha-picker-field.opened{--mdc-text-field-idle-line-color:var(--primary-color)}`]}constructor(...e){super(...e),this.popoverPlacement="bottom",this.useTopLabel=!1,this.noSort=!1,this._opened=!1,this._pickerWrapperOpen=!1,this._popoverWidth=0,this._openedNarrow=!1,this._unknownValue=!1,this._narrow=!1,this.invalid=!1,this._setUnknownValue=()=>{const e=this.getItems();!this.allowCustomValue&&void 0!==this.value&&null!==this.value&&""!==this.value&&e?this._unknownValue=!e.some(e=>"string"!=typeof e&&e.id===this.value):this._unknownValue=!1},this._dialogOpened=()=>{this._opened=!0,(0,c.r)(this,"picker-opened"),requestAnimationFrame(()=>{this._initialFieldValue&&(this._comboBox?.setFieldValue(this._initialFieldValue),this._initialFieldValue=void 0),this._hassConfig?.auth.external&&(0,u.V)(this._hassConfig.auth.external)?this._hassConfig.auth.external.fireMessage({type:"focus_element",payload:{element_id:"combo-box"}}):this._comboBox?.focus()})},this._handleResize=()=>{this._narrow=window.matchMedia("(max-width: 870px)").matches||window.matchMedia("(max-height: 500px)").matches,!this._openedNarrow&&this._pickerWrapperOpen&&(this._popoverWidth=this._containerElement?.offsetWidth||250)},this._handleEscClose=e=>{e.stopPropagation()}}}f.shadowRootOptions={...s.WF.shadowRootOptions,delegatesFocus:!0},(0,i.Cg)([(0,n.MZ)({type:Boolean,attribute:"allow-custom-value"})],f.prototype,"allowCustomValue",void 0),(0,i.Cg)([(0,n.MZ)({type:String,attribute:"search-label"})],f.prototype,"searchLabel",void 0),(0,i.Cg)([(0,n.MZ)({attribute:!1})],f.prototype,"getItems",void 0),(0,i.Cg)([(0,n.MZ)({attribute:!1})],f.prototype,"getAdditionalItems",void 0),(0,i.Cg)([(0,n.MZ)({attribute:!1})],f.prototype,"rowRenderer",void 0),(0,i.Cg)([(0,n.MZ)({attribute:!1})],f.prototype,"searchFn",void 0),(0,i.Cg)([(0,n.MZ)({attribute:!1})],f.prototype,"searchKeys",void 0),(0,i.Cg)([(0,n.MZ)({attribute:!1})],f.prototype,"notFoundLabel",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"empty-label"})],f.prototype,"emptyLabel",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"popover-placement"})],f.prototype,"popoverPlacement",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"add-button-label"})],f.prototype,"addButtonLabel",void 0),(0,i.Cg)([(0,n.MZ)({attribute:!1})],f.prototype,"sections",void 0),(0,i.Cg)([(0,n.MZ)({attribute:!1})],f.prototype,"sectionTitleFunction",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"selected-section"})],f.prototype,"selectedSection",void 0),(0,i.Cg)([(0,n.MZ)({attribute:!1})],f.prototype,"popoverAnchor",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,attribute:"use-top-label"})],f.prototype,"useTopLabel",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"custom-value-label"})],f.prototype,"customValueLabel",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,attribute:"no-sort"})],f.prototype,"noSort",void 0),(0,i.Cg)([(0,n.P)(".container")],f.prototype,"_containerElement",void 0),(0,i.Cg)([(0,n.P)("ha-picker-combo-box")],f.prototype,"_comboBox",void 0),(0,i.Cg)([(0,n.wk)(),(0,r.Fg)({context:h.WF,subscribe:!0})],f.prototype,"_hassConfig",void 0),(0,i.Cg)([(0,n.wk)()],f.prototype,"_opened",void 0),(0,i.Cg)([(0,n.wk)()],f.prototype,"_pickerWrapperOpen",void 0),(0,i.Cg)([(0,n.wk)()],f.prototype,"_popoverWidth",void 0),(0,i.Cg)([(0,n.wk)()],f.prototype,"_openedNarrow",void 0),(0,i.Cg)([(0,n.wk)()],f.prototype,"_unknownValue",void 0),(0,i.Cg)([(0,n.wk)()],f.prototype,"_selectedValue",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"error-message"})],f.prototype,"errorMessage",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],f.prototype,"invalid",void 0),f=(0,i.Cg)([(0,n.EM)("ha-generic-picker")],f),t()}catch(e){t(e)}})},3449(e,t,a){var i=a(62826),o=a(5124),r=a(22441);class s extends o.WF{render(){return o.qy`<slot></slot>`}constructor(...e){super(...e),this.disabled=!1}}s.styles=o.AH`:host{display:block;color:var(--mdc-text-field-label-ink-color,rgba(0,0,0,.6));font-size:var(--ha-font-size-s);padding-left:16px;padding-right:16px;padding-inline-start:16px;padding-inline-end:16px;letter-spacing:var( --mdc-typography-caption-letter-spacing, .0333333333em );line-height:normal}:host([disabled]){color:var(--mdc-text-field-disabled-ink-color,rgba(0,0,0,.6))}`,(0,i.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],s.prototype,"disabled",void 0),s=(0,i.Cg)([(0,r.EM)("ha-input-helper-text")],s)},88285(e,t,a){a.a(e,async function(e,t){try{var i=a(62826),o=a(35211),r=a(5124),s=a(22441),n=a(63672),l=a(1087),d=a(22792),c=a(17894),h=(a(75064),a(47680),a(26300)),p=e([h]);h=(p.then?(await p)():p)[0];const u="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",m="M7,10L12,15L17,10H7Z";class g extends((0,c.c)(r.WF)){async focus(){await this.updateComplete,await(this.item?.focus())}render(){const e=!!this.value,t=!(!this.value||this.required||this.disabled||this.hideClearIcon),a=this.placeholder??this.label,i=this.label&&e?r.qy`<span slot="overline">${this.label}${this.required?" *":""}</span>`:r.s6,o=e?this.valueRenderer?this.valueRenderer(this.value??""):r.qy`<span slot="headline">${this.value}</span>`:a?r.qy`<span slot="headline" class="placeholder"> ${a}${this.required?" *":""} </span>`:r.s6;return r.qy` <ha-combo-box-item aria-label="${(0,n.J)(this.label||this.placeholder)}" .disabled="${this.disabled}" type="button" compact="compact"> ${this.image?r.qy`<img alt="${this.label??""}" slot="start" .src="${this.image}" crossorigin="anonymous" referrerpolicy="no-referrer">`:this.icon?r.qy`<ha-icon slot="start" .icon="${this.icon}"></ha-icon>`:r.qy`<slot name="start"></slot>`} ${i}${o} ${this.unknown?r.qy`<div slot="supporting-text" class="unknown"> ${this.unknownItemText||this._i18n?.localize("ui.components.combo-box.unknown_item")} </div>`:r.s6} ${t?r.qy` <ha-icon-button class="clear" slot="end" @click="${this._clear}" .path="${u}"></ha-icon-button> `:r.s6} <ha-svg-icon class="arrow" slot="end" .path="${m}"></ha-svg-icon> </ha-combo-box-item> `}_clear(e){e.stopPropagation(),(0,l.r)(this,"clear")}static get styles(){return[r.AH`ha-combo-box-item[disabled]{background-color:var(--ha-color-form-background-disabled);--md-list-item-disabled-opacity:0.5;opacity:.5;cursor:not-allowed}ha-combo-box-item{position:relative;background-color:var(--ha-color-form-background);border-radius:var(--ha-border-radius-sm);border-end-end-radius:0;border-end-start-radius:0;--md-list-item-one-line-container-height:56px;--md-list-item-two-line-container-height:56px;--md-list-item-top-space:0px;--md-list-item-bottom-space:0px;--md-list-item-leading-space:var(--ha-space-4);--md-list-item-trailing-space:var(--ha-space-2);--ha-md-list-item-gap:var(--ha-space-2);--md-focus-ring-width:0px;--md-focus-ring-duration:0s}ha-combo-box-item:after{display:block;content:"";position:absolute;pointer-events:none;bottom:0;left:0;right:0;height:1px;width:100%;background-color:var(--ha-color-border-neutral-loud);transform:height 180ms ease-in-out,background-color 180ms ease-in-out}ha-combo-box-item:focus:after{height:2px;background-color:var(--mdc-theme-primary)}:host([unknown]) ha-combo-box-item{background-color:var(--ha-color-fill-warning-quiet-resting)}:host([invalid]) ha-combo-box-item:after{height:2px;background-color:var(--mdc-theme-error,var(--error-color,#b00020))}.clear{margin:0 -8px;--ha-icon-button-size:32px;--ha-icon-button-padding-inline:var(--ha-space-1)}.arrow{--mdc-icon-size:20px;width:32px}.placeholder{color:var(--secondary-text-color)}:host([invalid]) .placeholder{color:var(--mdc-theme-error,var(--error-color,#b00020))}.unknown{color:var(--ha-color-on-warning-normal)}`]}constructor(...e){super(...e),this.invalid=!1}}(0,i.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],g.prototype,"invalid",void 0),(0,i.Cg)([(0,s.P)("ha-combo-box-item",!0)],g.prototype,"item",void 0),(0,i.Cg)([(0,s.wk)(),(0,o.Fg)({context:d.D5,subscribe:!0})],g.prototype,"_i18n",void 0),g=(0,i.Cg)([(0,s.EM)("ha-picker-field")],g),t()}catch(e){t(e)}})},93367(e,t,a){a.a(e,async function(e,t){try{var i=a(62826),o=a(35211),r=a(5124),s=a(22441),n=a(91450),l=a(69093),d=a(22792),c=a(85694),h=(a(47680),a(67094),e([c]));c=(h.then?(await h)():h)[0];class p extends r.WF{render(){const e=this.icon||this.stateObj&&this._entities?.[this.stateObj.entity_id]?.icon||this.stateObj?.attributes.icon;if(e)return r.qy`<ha-icon .icon="${e}"></ha-icon>`;if(!this.stateObj)return r.s6;if(!this._config||!this._connection||!this._entities)return this._renderFallback();const t=(0,c.fq)(this._entities,this._config.config,this._connection.connection,this.stateObj,this.stateValue).then(e=>e?r.qy`<ha-icon .icon="${e}"></ha-icon>`:this._renderFallback());return r.qy`${(0,n.T)(t)}`}_renderFallback(){const e=(0,l.t)(this.stateObj);return r.qy` <ha-svg-icon .path="${c.l[e]||c.lW}"></ha-svg-icon> `}}(0,i.Cg)([(0,s.MZ)({attribute:!1})],p.prototype,"stateObj",void 0),(0,i.Cg)([(0,s.MZ)({attribute:!1})],p.prototype,"stateValue",void 0),(0,i.Cg)([(0,s.MZ)()],p.prototype,"icon",void 0),(0,i.Cg)([(0,s.wk)(),(0,o.Fg)({context:d.WF,subscribe:!0})],p.prototype,"_config",void 0),(0,i.Cg)([(0,s.wk)(),(0,o.Fg)({context:d.Wq,subscribe:!0})],p.prototype,"_connection",void 0),(0,i.Cg)([(0,s.wk)(),(0,o.Fg)({context:d.X1,subscribe:!0})],p.prototype,"_entities",void 0),p=(0,i.Cg)([(0,s.EM)("ha-state-icon")],p),t()}catch(e){t(e)}})},82e3(e,t,a){a.d(t,{D5:()=>i,Fy:()=>h,Gk:()=>m,Hg:()=>o,TJ:()=>s,UQ:()=>c,Y_:()=>g,ds:()=>u,e0:()=>r,ec:()=>p,go:()=>l,n2:()=>d,sq:()=>n});a(74423),a(18111),a(61701),a(33110);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{...e,autocomplete:"username",autofocus:!0};case"password":return{...e,autocomplete:"current-password"};case"code":return{...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})}),l=(e,t)=>fetch(`/auth/login_flow/${e}`,{method:"POST",credentials:"same-origin",body:JSON.stringify(t)}),d=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}),p=(e,t,a)=>e.callWS({type:"config/auth_provider/homeassistant/change_password",current_password:t,new_password:a}),u=(e,t,a)=>e.callWS({type:"config/auth_provider/homeassistant/admin_change_password",user_id:t,password:a}),m=(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(e,t,a){a.d(t,{C4:()=>d,CK:()=>l,FX:()=>g,UC:()=>u,_Z:()=>y,bT:()=>f,j4:()=>b,sd:()=>r,su:()=>n,vc:()=>_,w8:()=>p,wv:()=>h,y3:()=>m,zS:()=>s});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}`,l=e=>e.attributes.access_token?`/api/camera_proxy_stream/${e.entity_id}?token=${e.attributes.access_token}`:void 0,d=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},p=(e,t,a,i)=>e.connection.subscribeMessage(i,{type:"camera/webrtc/offer",entity_id:t,offer:a}),u=(e,t,a,i)=>e.callWS({type:"camera/webrtc/candidate",entity_id:t,session_id:a,candidate:i}),m=(e,t)=>e.callWS({type:"camera/get_prefs",entity_id:t}),g=(e,t,a)=>e.callWS({type:"camera/update_prefs",entity_id:t,...a}),v="media-source://camera/",b=e=>e.startsWith(v),_=e=>e.substring(22),y=async(e,t)=>e.callWS({type:"camera/capabilities",entity_id:t}),f=async(e,t)=>e.callWS({type:"camera/webrtc/get_client_config",entity_id:t})},95350(e,t,a){if(a.d(t,{$h:()=>p,FP:()=>v,Og:()=>r,QC:()=>h,QQ:()=>n,S1:()=>s,Ud:()=>b,fK:()=>d,l7:()=>c,nQ:()=>m,p$:()=>l}),66649!=a.j)var i=a(35518);if(66649!=a.j)var o=a(9899);const r=66649!=a.j?{bluetooth:"config/bluetooth",dhcp:"config/dhcp",matter:"config/matter",mqtt:"config/mqtt",ssdp:"config/ssdp",thread:"config/thread",zeroconf:"config/zeroconf",zha:"config/zha/dashboard",zwave_js:"config/zwave_js/dashboard"}:null;var s=66649!=a.j?function(e){return e[e.CRITICAL=50]="CRITICAL",e[e.ERROR=40]="ERROR",e[e.WARNING=30]="WARNING",e[e.INFO=20]="INFO",e[e.DEBUG=10]="DEBUG",e[e.NOTSET=0]="NOTSET",e}({}):null;const n=(e,t)=>t.issue_tracker||`https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+${e}%22`,l=(e,t,a)=>e(`component.${t}.title`)||a?.name||t,d=(e,t)=>{const a={type:"manifest/list"};return t&&(a.integrations=t),e.callWS(a)},c=async(e,t)=>{const a=await e.sendMessagePromise({type:"manifest/list"}),i={};for(const e of a)i[e.domain]=e;return t(i),()=>{}},h=(e,t)=>e.callWS({type:"manifest/get",integration:t}),p=e=>e.callWS({type:"integration/setup_info"}),u=e=>e.sendMessagePromise({type:"logger/log_info"}),m=(e,t,a,i)=>e.callWS({type:"logger/integration_log_level",integration:t,level:a,persistence:i}),g=(e,t)=>e.subscribeEvents((0,o.s)(()=>u(e).then(e=>t.setState(e,!0)),200,!0),"logging_changed"),v=(e,t)=>(0,i.N)("_integration_log_info",u,g,e,t),b=(e,t)=>e.callWS({type:"integration/wait",domain:t})},17894(e,t,a){a.d(t,{c:()=>r});var i=a(62826),o=a(22441);const r=e=>{class t extends e{constructor(...e){super(...e),this.disabled=!1,this.required=!1,this.unknown=!1,this.hideClearIcon=!1}}return(0,i.Cg)([(0,o.MZ)({type:Boolean})],t.prototype,"disabled",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean})],t.prototype,"required",void 0),(0,i.Cg)([(0,o.MZ)()],t.prototype,"icon",void 0),(0,i.Cg)([(0,o.MZ)()],t.prototype,"image",void 0),(0,i.Cg)([(0,o.MZ)()],t.prototype,"label",void 0),(0,i.Cg)([(0,o.MZ)()],t.prototype,"placeholder",void 0),(0,i.Cg)([(0,o.MZ)()],t.prototype,"helper",void 0),(0,i.Cg)([(0,o.MZ)()],t.prototype,"value",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean,reflect:!0})],t.prototype,"unknown",void 0),(0,i.Cg)([(0,o.MZ)({attribute:"unknown-item-text"})],t.prototype,"unknownItemText",void 0),(0,i.Cg)([(0,o.MZ)({attribute:"hide-clear-icon",type:Boolean})],t.prototype,"hideClearIcon",void 0),(0,i.Cg)([(0,o.MZ)({attribute:!1})],t.prototype,"valueRenderer",void 0),t}},24367(e,t,a){a.d(t,{L:()=>o,z:()=>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)},75796(e,t,a){a.a(e,async function(e,i){try{a.r(t),a.d(t,{HuiHomeDashboardStrategyEditor:()=>c});var o=a(62826),r=a(5124),s=a(22441),n=a(1087),l=a(77122),d=e([l]);l=(d.then?(await d)():d)[0];class c extends r.WF{setConfig(e){this._config=e}render(){return this.hass&&this._config?r.qy` <ha-entities-picker .hass="${this.hass}" .value="${this._config.favorite_entities||[]}" label="${this.hass.localize("ui.panel.lovelace.editor.strategy.home.favorite_entities")}" placeholder="${this.hass.localize("ui.panel.lovelace.editor.strategy.home.add_favorite_entity")}" reorder @value-changed="${this._valueChanged}"> </ha-entities-picker> `:r.s6}_valueChanged(e){if(e.stopPropagation(),!this._config||!this.hass)return;const t=e.detail.value,a={...this._config,favorite_entities:t};0===a.favorite_entities?.length&&delete a.favorite_entities,(0,n.r)(this,"config-changed",{config:a})}}(0,o.Cg)([(0,s.MZ)({attribute:!1})],c.prototype,"hass",void 0),(0,o.Cg)([(0,s.wk)()],c.prototype,"_config",void 0),c=(0,o.Cg)([(0,s.EM)("hui-home-dashboard-strategy-editor")],c),i()}catch(e){i(e)}})},53580(e,t,a){a.d(t,{mdiHomeAssistant:()=>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"},88438(e,t,a){a.d(t,{C:()=>i});const i="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}};