iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
30 lines • 74.9 kB
JavaScript
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[88350],{380:function(t,e,i){i.a(t,async function(t,a){try{i.d(e,{D:function(){return h},P:function(){return c}});i(74423);var n=i(74487),o=i(27734),r=i(46927),s=i(96029),l=t([n]);n=(l.then?(await l)():l)[0];const c=t=>t.first_weekday===r.zt.language?"weekInfo"in Intl.Locale.prototype?new Intl.Locale(t.language).weekInfo.firstDay%7:(0,o.S)(t.language)%7:s.Z.includes(t.first_weekday)?s.Z.indexOf(t.first_weekday):1,h=t=>{const e=c(t);return s.Z[e]};a()}catch(c){a(c)}})},95747:function(t,e,i){i.a(t,async function(t,a){try{i.d(e,{CL:function(){return _},GH:function(){return x},Rl:function(){return p},ZS:function(){return v},aQ:function(){return f},r6:function(){return d},yg:function(){return b}});var n=i(74487),o=i(22786),r=i(72487),s=i(30162),l=i(8480),c=i(69543),h=t([n,l,r,s]);[n,l,r,s]=h.then?(await h)():h;const d=(t,e,i)=>g(e,i.time_zone).format(t),g=(0,o.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric",hour:(0,c.J)(t)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,c.J)(t)?"h12":"h23",timeZone:(0,l.wj)(t.time_zone,e)})),p=t=>u().format(t),u=(0,o.A)(()=>new Intl.DateTimeFormat(void 0,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})),f=(t,e,i)=>m(e,i.time_zone).format(t),m=(0,o.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"short",day:"numeric",hour:(0,c.J)(t)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,c.J)(t)?"h12":"h23",timeZone:(0,l.wj)(t.time_zone,e)})),v=(t,e,i)=>y(e,i.time_zone).format(t),y=(0,o.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"short",day:"numeric",hour:(0,c.J)(t)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,c.J)(t)?"h12":"h23",timeZone:(0,l.wj)(t.time_zone,e)})),_=(t,e,i)=>(new Date).getFullYear()===t.getFullYear()?v(t,e,i):f(t,e,i),b=(t,e,i)=>w(e,i.time_zone).format(t),w=(0,o.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric",hour:(0,c.J)(t)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hourCycle:(0,c.J)(t)?"h12":"h23",timeZone:(0,l.wj)(t.time_zone,e)})),x=(t,e,i)=>`${(0,r.zB)(t,e,i)}, ${(0,s.fU)(t,e,i)}`;a()}catch(d){a(d)}})},98975:function(t,e,i){i.a(t,async function(t,a){try{i.d(e,{K:function(){return c}});var n=i(74487),o=i(22786),r=i(63927),s=t([n,r]);[n,r]=s.then?(await s)():s;const l=(0,o.A)(t=>new Intl.RelativeTimeFormat(t.language,{numeric:"auto"})),c=(t,e,i,a=!0)=>{const n=(0,r.x)(t,i,e);return a?l(e).format(n.value,n.unit):Intl.NumberFormat(e.language,{style:"unit",unit:n.unit,unitDisplay:"long"}).format(Math.abs(n.value))};a()}catch(l){a(l)}})},8480:function(t,e,i){i.a(t,async function(t,a){try{i.d(e,{fL:function(){return p},n2:function(){return u},wj:function(){return f}});var n,o,r,s=i(74487),l=i(29079),c=i(46927),h=t([s]);s=(h.then?(await h)():h)[0];const d=null===(n=Intl.DateTimeFormat)||void 0===n||null===(o=(r=n.call(Intl)).resolvedOptions)||void 0===o?void 0:o.call(r).timeZone,g=d&&("UTC"===d||"Etc/UTC"===d||d in l)?d:void 0,p=14881==i.j?void 0!==g:null,u=null!=g?g:"UTC",f=(t,e)=>t===c.Wj.local&&g?u:e;a()}catch(d){a(d)}})},96029:function(t,e,i){i.d(e,{Tq:function(){return r},Z:function(){return n},ZV:function(){return a},sj:function(){return o}});const a=["sun","mon","tue","wed","thu","fri","sat"],n=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],o={0:"sun",1:"mon",2:"tue",3:"wed",4:"thu",5:"fri",6:"sat"},r={sun:"sunday",mon:"monday",tue:"tuesday",wed:"wednesday",thu:"thursday",fri:"friday",sat:"saturday"}},93905:function(t,e,i){i.d(e,{I:function(){return o}});i(16280),i(44114),i(18111),i(7588),i(69112),i(33110);class a{addFromStorage(t){if(!this._storage[t]){const e=this.storage.getItem(t);e&&(this._storage[t]=JSON.parse(e))}}subscribeChanges(t,e){return this._listeners[t]?this._listeners[t].push(e):this._listeners[t]=[e],()=>{this.unsubscribeChanges(t,e)}}unsubscribeChanges(t,e){if(!(t in this._listeners))return;const i=this._listeners[t].indexOf(e);-1!==i&&this._listeners[t].splice(i,1)}hasKey(t){return t in this._storage}getValue(t){return this._storage[t]}setValue(t,e){const i=this._storage[t];this._storage[t]=e;try{void 0===e?this.storage.removeItem(t):this.storage.setItem(t,JSON.stringify(e))}catch(a){}finally{this._listeners[t]&&this._listeners[t].forEach(t=>t(i,e))}}constructor(t=window.localStorage){this._storage={},this._listeners={},this.storage=t,this.storage===window.localStorage&&window.addEventListener("storage",t=>{t.key&&this.hasKey(t.key)&&(this._storage[t.key]=t.newValue?JSON.parse(t.newValue):t.newValue,this._listeners[t.key]&&this._listeners[t.key].forEach(e=>e(t.oldValue?JSON.parse(t.oldValue):t.oldValue,this._storage[t.key])))})}}const n={};function o(t){return(e,i)=>{if("object"==typeof i)throw new Error("This decorator does not support this compilation type.");const o=t.storage||"localStorage";let r;o&&o in n?r=n[o]:(r=new a(window[o]),n[o]=r);const s=t.key||String(i);r.addFromStorage(s);const l=!1!==t.subscribe?t=>r.subscribeChanges(s,(e,a)=>{t.requestUpdate(i,e)}):void 0,c=()=>r.hasKey(s)?t.deserializer?t.deserializer(r.getValue(s)):r.getValue(s):void 0,h=(e,a)=>{let n;t.state&&(n=c()),r.setValue(s,t.serializer?t.serializer(a):a),t.state&&e.requestUpdate(i,n)},d=e.performUpdate;if(e.performUpdate=function(){this.__initialized=!0,d.call(this)},t.subscribe){const t=e.connectedCallback,i=e.disconnectedCallback;e.connectedCallback=function(){t.call(this);const e=this;e.__unbsubLocalStorage||(e.__unbsubLocalStorage=null==l?void 0:l(this))},e.disconnectedCallback=function(){var t;i.call(this);const e=this;null===(t=e.__unbsubLocalStorage)||void 0===t||t.call(e),e.__unbsubLocalStorage=void 0}}const g=Object.getOwnPropertyDescriptor(e,i);let p;if(void 0===g)p={get(){return c()},set(t){(this.__initialized||void 0===c())&&h(this,t)},configurable:!0,enumerable:!0};else{const t=g.set;p=Object.assign(Object.assign({},g),{},{get(){return c()},set(e){(this.__initialized||void 0===c())&&h(this,e),null==t||t.call(this,e)}})}Object.defineProperty(e,i,p)}}},68348:function(t,e,i){i.d(e,{u:function(){return a}});i(18111),i(13579);const a=t=>{var e,i;if(t.some(t=>"tagName"in t&&("HA-MENU"===t.tagName||"HA-CODE-EDITOR"===t.tagName)))return!1;const a=t[0];if("TEXTAREA"===a.tagName||"HA-SELECT"===(null===(e=a.parentElement)||void 0===e?void 0:e.tagName)||"HA-DROPDOWN"===(null===(i=a.parentElement)||void 0===i?void 0:i.tagName))return!1;if("INPUT"!==a.tagName)return!0;switch(a.type){case"button":case"checkbox":case"hidden":case"radio":case"range":return!0;default:return!1}}},76830:function(t,e,i){i.d(e,{d:function(){return a}});i(18111),i(20116);const a=(t,e=!0)=>{if(t.defaultPrevented||0!==t.button||t.metaKey||t.ctrlKey||t.shiftKey)return;const i=t.composedPath().find(t=>"A"===t.tagName);if(!i||i.target||i.hasAttribute("download")||"external"===i.getAttribute("rel"))return;let a=i.href;if(!a||-1!==a.indexOf("mailto:"))return;const n=window.location,o=n.origin||n.protocol+"//"+n.host;return a.startsWith(o)&&(a=a.slice(o.length),"#"!==a)?(e&&t.preventDefault(),a):void 0}},19459:function(t,e,i){i.d(e,{b:function(){return a}});i(45367),i(92731),i(84864),i(57465),i(27495),i(69479),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(62953);const a=(t,e,i)=>{if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;let n,o;if(Array.isArray(t)){if(o=t.length,o!==e.length)return!1;for(n=o;0!==n--;)if(!a(t[n],e[n],i))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!a(n[1],e.get(n[0]),i))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(o=t.length,o!==e.length)return!1;for(n=o;0!==n--;)if(t[n]!==e[n])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();const r=Object.keys(t);if(o=r.length,o!==Object.keys(e).length)return!1;for(n=o;0!==n--;)if(!Object.prototype.hasOwnProperty.call(e,r[n]))return!1;for(n=o;0!==n--;){const o=r[n];if(!a(t[o],e[o],i))return!1}if(null!=i&&i.compareSymbols){const n=Object.getOwnPropertySymbols(t),o=Object.getOwnPropertySymbols(e);if(n.length!==o.length)return!1;for(const r of n){if(!Object.prototype.hasOwnProperty.call(e,r))return!1;if(!a(t[r],e[r],i))return!1}}return!0}return t!=t&&e!=e}},63927:function(t,e,i){i.a(t,async function(t,a){try{i.d(e,{x:function(){return p}});var n=i(6946),o=i(52640),r=i(38684),s=i(380),l=t([s]);s=(l.then?(await l)():l)[0];const h=1e3,d=60,g=60*d;function p(t,e=Date.now(),i,a={}){const l=Object.assign(Object.assign({},u),a||{}),c=(+t-+e)/h;if(Math.abs(c)<l.second)return{value:Math.round(c),unit:"second"};const p=c/d;if(Math.abs(p)<l.minute)return{value:Math.round(p),unit:"minute"};const f=c/g;if(Math.abs(f)<l.hour)return{value:Math.round(f),unit:"hour"};const m=new Date(t),v=new Date(e);m.setHours(0,0,0,0),v.setHours(0,0,0,0);const y=(0,n.c)(m,v);if(0===y)return{value:Math.round(f),unit:"hour"};if(Math.abs(y)<l.day)return{value:y,unit:"day"};const _=(0,s.P)(i),b=(0,o.k)(m,{weekStartsOn:_}),w=(0,o.k)(v,{weekStartsOn:_}),x=(0,r.I)(b,w);if(0===x)return{value:y,unit:"day"};if(Math.abs(x)<l.week)return{value:x,unit:"week"};const C=m.getFullYear()-v.getFullYear(),$=12*C+m.getMonth()-v.getMonth();return 0===$?{value:x,unit:"week"}:Math.abs($)<l.month||0===C?{value:$,unit:"month"}:{value:Math.round(C),unit:"year"}}const u={second:59,minute:59,hour:22,day:5,week:4,month:11};a()}catch(c){a(c)}})},64481:function(t,e,i){i.d(e,{D:function(){return n},J:function(){return r}});i(16280),i(3362),i(55815),i(64979),i(79739);let a=!1;try{a="true"===window.localStorage.getItem("disableViewTransition")}catch(s){}const n=t=>{a=t},o=t=>{if(!(t=>(t instanceof DOMException||t instanceof Error)&&"AbortError"===t.name)(t))throw t},r=t=>{if(!document.startViewTransition||a)return t(!1),Promise.resolve();let e=!1;try{const i=document.startViewTransition(()=>{e=!0,t(!0)});return i.ready.catch(o),i.finished.catch(o)}catch(i){return console.warn("View transition failed, falling back to direct execution.",i),e?Promise.reject(i):(t(!1),Promise.resolve())}}},70947:function(t,e,i){i(62953);var a=i(40445),n=i(50759),o=(i(38625),i(5124)),r=i(67576);i(67094);let s,l,c=t=>t;class h extends n.A{renderCheckboxIcon(){return(0,o.qy)(s||(s=c` <ha-svg-icon id="check" part="checkmark" .path="${0}"></ha-svg-icon> `),this.checked?"M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z":"M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M19,5V19H5V5H19Z")}static get styles(){return[n.A.styles,(0,o.AH)(l||(l=c`:host{min-height:var(--ha-space-10)}#check{visibility:visible;flex-shrink:0}#icon ::slotted(*){color:var(--ha-color-on-neutral-normal)}:host([variant=danger]) #icon ::slotted(*){color:var(--ha-color-on-danger-quiet)}:host([selected]){font-weight:var(--ha-font-weight-medium);color:var(--primary-color);background-color:var(--ha-color-fill-primary-quiet-resting);--icon-primary-color:var(--primary-color)}:host([selected]:hover){background-color:var(--ha-color-fill-primary-quiet-hover)}`))]}constructor(...t){super(...t),this.selected=!1}}(0,a.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],h.prototype,"selected",void 0),h=(0,a.Cg)([(0,r.EM)("ha-dropdown-item")],h)},29823:function(t,e,i){i.a(t,async function(t,e){try{i(3362),i(62953);var a=i(40445),n=i(52254),o=i(5124),r=i(67576),s=t([n]);n=(s.then?(await s)():s)[0];let l,c=t=>t;class h extends n.A{get anchorElement(){var t;return null===(t=this.popup)||void 0===t?void 0:t.anchor}set anchorElement(t){this.popup&&(this.popup.anchor&&"ha-icon-button"===this.popup.anchor.localName&&(this.popup.anchor.selected=!1),this.popup.anchor=t)}getTrigger(){return this.anchorElement?this.anchorElement:super.getTrigger()}async showMenu(){await super.showMenu();const t=this.getTrigger();t&&"ha-icon-button"===t.localName&&(t.selected=!0)}async hideMenu(){const t=this.getTrigger();t&&"ha-icon-button"===t.localName&&(t.selected=!1),await super.hideMenu()}static get styles(){return[n.A.styles,(0,o.AH)(l||(l=c`:host{font-size:var(--ha-dropdown-font-size, var(--ha-font-size-m));--wa-color-surface-raised:var(
--card-background-color,
var(--ha-dialog-surface-background, var(--mdc-theme-surface, #fff)),
)}#menu{padding:var(--ha-space-1)}wa-popup::part(popup){z-index:200}`))]}constructor(...t){super(...t),this.dropdownTag="ha-dropdown",this.dropdownItemTag="ha-dropdown-item"}}(0,a.Cg)([(0,r.MZ)({attribute:!1})],h.prototype,"dropdownTag",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],h.prototype,"dropdownItemTag",void 0),h=(0,a.Cg)([(0,r.EM)("ha-dropdown")],h),e()}catch(l){e(l)}})},54276:function(t,e,i){i(62953);var a=i(40445),n=i(76482),o=i(91382),r=i(96245),s=i(5124),l=i(67576);let c;class h extends o.n{attach(t){super.attach(t),this.attachableTouchController.attach(t)}disconnectedCallback(){super.disconnectedCallback(),this.hovered=!1,this.pressed=!1}detach(){super.detach(),this.attachableTouchController.detach()}_onTouchControlChange(t,e){null==t||t.removeEventListener("touchend",this._handleTouchEnd),null==e||e.addEventListener("touchend",this._handleTouchEnd)}constructor(...t){super(...t),this.attachableTouchController=new n.i(this,this._onTouchControlChange.bind(this)),this._handleTouchEnd=()=>{this.disabled||super.endPressAnimation()}}}h.styles=[r.R,(0,s.AH)(c||(c=(t=>t)`:host{--md-ripple-hover-opacity:var(--ha-ripple-hover-opacity, 0.08);--md-ripple-pressed-opacity:var(--ha-ripple-pressed-opacity, 0.12);--md-ripple-hover-color:var(
--ha-ripple-hover-color,
var(--ha-ripple-color, var(--secondary-text-color))
);--md-ripple-pressed-color:var(
--ha-ripple-pressed-color,
var(--ha-ripple-color, var(--secondary-text-color))
)}`))],h=(0,a.Cg)([(0,l.EM)("ha-ripple")],h)},82e3:function(t,e,i){i.d(e,{D5:function(){return a},Fy:function(){return r},Gk:function(){return c},Hg:function(){return n},Y_:function(){return h},ds:function(){return l},e0:function(){return o},ec:function(){return s}});i(74423),i(18111),i(61701),i(33110),i(3362);const a=14881==i.j?`${location.protocol}//${location.host}`:null,n=t=>t.map(t=>{if("string"!==t.type)return t;switch(t.name){case"username":return Object.assign(Object.assign({},t),{},{autocomplete:"username",autofocus:!0});case"password":return Object.assign(Object.assign({},t),{},{autocomplete:"current-password"});case"code":return Object.assign(Object.assign({},t),{},{autocomplete:"one-time-code",autofocus:!0});default:return t}}),o=(t,e)=>t.callWS({type:"auth/sign_path",path:e}),r=async(t,e,i,a)=>t.callWS({type:"config/auth_provider/homeassistant/create",user_id:e,username:i,password:a}),s=(t,e,i)=>t.callWS({type:"config/auth_provider/homeassistant/change_password",current_password:e,new_password:i}),l=(t,e,i)=>t.callWS({type:"config/auth_provider/homeassistant/admin_change_password",user_id:e,password:i}),c=(t,e,i)=>t.callWS({type:"config/auth_provider/homeassistant/admin_change_username",user_id:e,username:i}),h=(t,e,i)=>t.callWS({type:"auth/delete_all_refresh_tokens",token_type:e,delete_current_token:i})},71606:function(t,e,i){i.d(e,{f:function(){return n},o:function(){return a}});i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(62953);const a=new Set(["automation","script","scene","group"]),n=(t,e,i)=>t.callWS({type:"search/related",item_type:e,item_id:i})},42262:function(t,e,i){i.d(e,{$:function(){return a},l:function(){return n}});const a=t=>t.callWS({type:"usb/scan"}),n=t=>t.callWS({type:"usb/list_serial_ports"})},81310:function(t,e,i){i.a(t,async function(t,e){try{i(62953);var a=i(40445),n=i(5124),o=i(67576),r=i(6412),s=i(26218),l=i(91926),c=i(90248),h=i(2054),d=i(14503),g=t([c,h]);[c,h]=g.then?(await g)():g;let p,u,f,m,v,y=t=>t;class _ extends n.WF{render(){var t;return(0,n.qy)(p||(p=y` <div class="toolbar ${0}"> <div class="toolbar-content"> ${0} <div class="main-title"> <slot name="header">${0}</slot> </div> <slot name="toolbar-icon"></slot> </div> </div> <div class="${0}" @scroll="${0}"> <slot></slot> </div> <div id="fab"> <slot name="fab"></slot> </div> `),(0,r.H)({narrow:this.narrow}),this.mainPage||null!==(t=history.state)&&void 0!==t&&t.root?(0,n.qy)(u||(u=y` <ha-menu-button .hass="${0}" .narrow="${0}"></ha-menu-button> `),this.hass,this.narrow):this.backPath?(0,n.qy)(f||(f=y` <ha-icon-button-arrow-prev href="${0}" .hass="${0}"></ha-icon-button-arrow-prev> `),this.backPath,this.hass):(0,n.qy)(m||(m=y` <ha-icon-button-arrow-prev .hass="${0}" @click="${0}"></ha-icon-button-arrow-prev> `),this.hass,this._backTapped),this.header,(0,r.H)({content:!0,"ha-scrollbar":this.scrollable,"not-scrollable":!this.scrollable}),this._saveScrollPos)}_saveScrollPos(t){this._savedScrollPos=t.target.scrollTop}_backTapped(){this.backCallback?this.backCallback():(0,l.OE)()}static get styles(){return[d.dp,(0,n.AH)(v||(v=y`:host{display:block;height:100%;background-color:var(--primary-background-color);overflow:hidden;position:relative}:host([narrow]){width:100%;position:fixed}.toolbar{background-color:var(--app-header-background-color);padding-top:var(--safe-area-inset-top);padding-right:var(--safe-area-inset-right)}:host([narrow]) .toolbar{padding-left:var(--safe-area-inset-left)}.toolbar-content{display:flex;align-items:center;font-size:var(--ha-font-size-xl);height:var(--header-height);font-weight:var(--ha-font-weight-normal);color:var(--app-header-text-color,#fff);border-bottom:var(--app-header-border-bottom,none);box-sizing:border-box;padding:8px 12px}.toolbar a{color:var(--sidebar-text-color);text-decoration:none}::slotted([slot=toolbar-icon]),ha-icon-button-arrow-prev,ha-menu-button{display:flex;align-items:center;pointer-events:auto;color:var(--sidebar-icon-color)}.main-title{margin-inline-start:var(--ha-space-6);line-height:var(--ha-line-height-normal);min-width:0;flex-grow:1;overflow-wrap:break-word;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.narrow .main-title{margin-inline-start:var(--ha-space-2)}.content{position:relative;width:calc(100% - var(--safe-area-inset-right,0px));height:calc(100% - 1px - var(--header-height,0px) - var(--safe-area-inset-top,0px) - var(--safe-area-inset-bottom,0px));padding-bottom:var(--safe-area-inset-bottom,0px);margin-right:var(--safe-area-inset-right);overflow-y:auto;overflow:auto;-webkit-overflow-scrolling:touch}.content.not-scrollable{overflow:hidden;display:flex;flex-direction:column}:host([narrow]) .content{width:calc(100% - var(--safe-area-inset-left,0px) - var(--safe-area-inset-right,0px));margin-left:var(--safe-area-inset-left)}#fab{position:absolute;right:calc(16px + var(--safe-area-inset-right,0px));inset-inline-end:calc(16px + var(--safe-area-inset-right,0px));inset-inline-start:initial;bottom:calc(16px + var(--safe-area-inset-bottom,0px));z-index:1;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--ha-space-2);--ha-button-box-shadow:var(--ha-box-shadow-l)}:host([narrow]) #fab.tabs{bottom:calc(84px + var(--safe-area-inset-bottom,0px))}#fab[is-wide]{bottom:calc(24px + var(--safe-area-inset-bottom,0px));right:calc(24px + var(--safe-area-inset-right,0px));inset-inline-end:calc(24px + var(--safe-area-inset-right,0px));inset-inline-start:initial}`))]}constructor(...t){super(...t),this.mainPage=!1,this.narrow=!1,this.scrollable=!0}}(0,a.Cg)([(0,o.MZ)({attribute:!1})],_.prototype,"hass",void 0),(0,a.Cg)([(0,o.MZ)()],_.prototype,"header",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean,attribute:"main-page"})],_.prototype,"mainPage",void 0),(0,a.Cg)([(0,o.MZ)({type:String,attribute:"back-path"})],_.prototype,"backPath",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],_.prototype,"backCallback",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean,reflect:!0})],_.prototype,"narrow",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean})],_.prototype,"scrollable",void 0),(0,a.Cg)([(0,s.a)(".content")],_.prototype,"_savedScrollPos",void 0),(0,a.Cg)([(0,o.Ls)({passive:!0})],_.prototype,"_saveScrollPos",null),_=(0,a.Cg)([(0,o.EM)("hass-subpage")],_),e()}catch(p){e(p)}})},56267:function(t,e,i){i.a(t,async function(t,e){try{i(74423),i(3362),i(27495),i(25440),i(62953);var a=i(40445),n=i(5124),o=i(67576),r=i(6412),s=i(1087),l=i(18350),c=i(29823),h=(i(70947),i(76944)),d=i(77423),g=i(26571),p=i(77763),u=i(65063),f=i(36918),m=(i(77540),t([l,c]));[l,c]=m.then?(await m)():m;let v,y,_,b,w,x,C,$,z=t=>t;const M="M9 3V18H12V3H9M12 5L16 18L19 17L15 4L12 5M5 5V18H8V5H5M3 19V21H21V19H3Z",k="M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z",E="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z",L="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z",A="M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z";class H extends n.WF{render(){var t;const e=g.Al.includes(this.flow.context.source);return(0,n.qy)(v||(v=z` <ha-integration-action-card class="${0}" .hass="${0}" .manifest="${0}" .domain="${0}" .label="${0}"> ${0} <ha-button @click="${0}" variant="${0}" appearance="filled"> ${0} </ha-button> ${0} </ha-integration-action-card> `),(0,r.H)({attention:e}),this.hass,this.manifest,this.flow.handler,null!==(t=this.flow.localized_title)&&void 0!==t?t:"",g.KY.includes(this.flow.context.source)&&this.flow.context.unique_id?(0,n.qy)(y||(y=z`<ha-button appearance="plain" @click="${0}">${0}</ha-button>`),this._ignoreFlow,this.hass.localize("ui.panel.config.integrations.ignore.ignore")):n.s6,this._continueFlow,e?"danger":"brand",this.hass.localize(e?"ui.panel.config.integrations.reconfigure":"ui.common.add"),this.flow.context.configuration_url||this.manifest||e?(0,n.qy)(_||(_=z`<ha-dropdown slot="header-button" placement="bottom-end" @wa-select="${0}"> <ha-icon-button slot="trigger" .label="${0}" .path="${0}"></ha-icon-button> ${0} ${0} ${0} </ha-dropdown>`),this._handleDropdownSelect,this.hass.localize("ui.common.menu"),L,this.flow.context.configuration_url?(0,n.qy)(b||(b=z`<a href="${0}" rel="noreferrer" target="${0}"> <ha-dropdown-item> ${0} <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> <ha-svg-icon slot="details" .path="${0}"></ha-svg-icon> </ha-dropdown-item> </a>`),this.flow.context.configuration_url.replace(/^homeassistant:\/\//,"/"),this.flow.context.configuration_url.startsWith("homeassistant://")?"_self":"_blank",this.hass.localize("ui.panel.config.integrations.config_entry.open_configuration_url"),k,A):n.s6,this.manifest?(0,n.qy)(w||(w=z`<a href="${0}" rel="noreferrer" target="_blank"> <ha-dropdown-item> ${0} <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> <ha-svg-icon slot="details" .path="${0}"></ha-svg-icon> </ha-dropdown-item> </a>`),this.manifest.is_built_in?(0,f.o)(this.hass,`/integrations/${this.manifest.domain}`):this.manifest.documentation,this.hass.localize("ui.panel.config.integrations.config_entry.documentation"),M,A):n.s6,e?(0,n.qy)(x||(x=z`<ha-dropdown-item variant="danger" value="delete"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item>`),E,this.hass.localize("ui.panel.config.integrations.config_entry.delete")):n.s6):n.s6)}_continueFlow(){"external"!==this.flow.flow_id?(0,p.W)(this,{continueFlowId:this.flow.flow_id,navigateToResult:!0,dialogClosedCallback:()=>{this._handleFlowUpdated()}}):this.hass.auth.external.fireMessage({type:"improv/configure_device",payload:{name:this.flow.localized_title||this.flow.context.title_placeholders.name}})}async _ignoreFlow(){await(0,u.dk)(this,{title:this.hass.localize("ui.panel.config.integrations.ignore.confirm_ignore_title",{name:(0,g.m7)(this.hass.localize,this.flow)}),text:this.hass.localize("ui.panel.config.integrations.ignore.confirm_ignore"),confirmText:this.hass.localize("ui.panel.config.integrations.ignore.ignore")})&&(await(0,g.dG)(this.hass,this.flow.flow_id,(0,g.m7)(this.hass.localize,this.flow)),this._handleFlowUpdated())}_handleFlowUpdated(){(0,s.r)(this,"change",void 0,{bubbles:!1})}async _fetchApplicationCredentials(t){try{return(await(0,h.l3)(this.hass,t)).application_credentials_id}catch(e){return null}}async _removeApplicationCredential(t){if(await(0,u.dk)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.application_credentials.delete_title"),text:(0,n.qy)(C||(C=z`${0}, <br> <br> ${0} <br> <br> <a href="https://www.home-assistant.io/integrations/application_credentials" target="_blank" rel="noreferrer"> ${0} </a>`),this.hass.localize("ui.panel.config.integrations.config_entry.application_credentials.delete_prompt"),this.hass.localize("ui.panel.config.integrations.config_entry.application_credentials.delete_detail"),this.hass.localize("ui.panel.config.integrations.config_entry.application_credentials.learn_more")),confirmText:this.hass.localize("ui.common.delete"),dismissText:this.hass.localize("ui.common.cancel"),destructive:!0}))try{await(0,h.jJ)(this.hass,t)}catch(e){(0,u.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.application_credentials.delete_error_title"),text:e.message})}}_handleDropdownSelect(t){var e;"delete"===(null===(e=t.detail)||void 0===e||null===(e=e.item)||void 0===e?void 0:e.value)&&this._handleDelete()}constructor(...t){super(...t),this._handleDelete=async()=>{const t=this.flow.context.entry_id;if(!t)return;const e=await this._fetchApplicationCredentials(t);if(!(await(0,u.dk)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.delete_confirm_title",{title:(0,g.m7)(this.hass.localize,this.flow)}),text:this.hass.localize("ui.panel.config.integrations.config_entry.delete_confirm_text"),confirmText:this.hass.localize("ui.common.delete"),dismissText:this.hass.localize("ui.common.cancel"),destructive:!0})))return;(await(0,d.eM)(this.hass,t)).require_restart&&(0,u.showAlertDialog)(this,{text:this.hass.localize("ui.panel.config.integrations.config_entry.restart_confirm")}),e&&this._removeApplicationCredential(e),this._handleFlowUpdated()}}}H.styles=(0,n.AH)($||($=z`a{text-decoration:none;color:var(--primary-color)}ha-dropdown{color:var(--secondary-text-color)}ha-svg-icon[slot=meta]{width:18px;height:18px}.attention{--mdc-theme-primary:var(--error-color);--ha-card-border-color:var(--error-color)}`)),(0,a.Cg)([(0,o.MZ)({attribute:!1})],H.prototype,"hass",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],H.prototype,"flow",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],H.prototype,"manifest",void 0),H=(0,a.Cg)([(0,o.EM)("ha-config-flow-card")],H),e()}catch(v){e(v)}})},53896:function(t,e,i){i.a(t,async function(t,e){try{i(74423),i(44114),i(26910),i(18111),i(22489),i(20116),i(7588),i(61701),i(13579),i(45367),i(92731),i(3362),i(27495),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(62953),i(48408),i(14603),i(47566),i(98721);var a=i(40445),n=i(78648),o=i(5124),r=i(67576),s=i(63672),l=i(22786),c=i(36312),h=i(50248),d=i(89020),g=i(91926),p=i(52220),u=i(6030),f=i(12587),m=i(18350),v=i(29823),y=(i(70947),i(26300)),_=(i(67094),i(36866)),b=i(77423),w=i(96204),x=i(59241),C=i(6810),$=i(95350),z=i(95093),M=i(42262),k=i(77763),E=i(65063),L=i(23296),A=i(40511),H=i(79172),I=i(54706),S=i(14503),D=i(25635),V=i(24367),Z=i(56267),P=i(22523),O=i(64103),T=i(88653),q=i(5317),j=i(76559),F=i(73875),R=t([m,v,y,_,L,A,Z,P,O,T,q]);[m,v,y,_,L,A,Z,P,O,T,q]=R.then?(await R)():R;let U,W,N,B,J,K,Y,G,X,Q,tt,et,it,at,nt,ot,rt,st,lt,ct,ht,dt=t=>t;const gt="M6,13H18V11H6M3,6V8H21V6M10,18H14V16H10V18Z",pt="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",ut=t=>{const e=new Map;return t.forEach(t=>{e.has(t.domain)?e.get(t.domain).push(t):e.set(t.domain,[t])}),e},ft=(t,e,i)=>t.localized_domain_name&&t.localized_domain_name!==t.domain?t.localized_domain_name:(0,$.p$)(i,t.domain,e[t.domain]),mt=(t,e,i,a)=>t.sort((t,n)=>(0,p.SH)(ft(t,e,i),ft(n,e,i),a)||(0,p.SH)(t.title||t.domain,n.title||n.domain,a));class vt extends((0,H.b)((0,I.E)(o.WF))){disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("improv-discovered-device",this._handleImprovDiscovered),window.removeEventListener("improv-device-setup-done",this._reScanImprovDevices)}hassSubscribe(){return[(0,x.Bz)(this.hass.connection,t=>{this._entityRegistryEntries=t}),(0,$.FP)(this.hass.connection,t=>{const e={};for(const i of t)e[i.domain]=i;this._logInfos=e})]}firstUpdated(t){super.firstUpdated(t),this._fetchManifests(),this._fetchEntitySources(),this._handleRouteChanged(),this._scanUSBDevices(),this._scanImprovDevices(),(0,c.x)(this.hass.config,"diagnostics")&&(0,w.Dh)(this.hass).then(t=>{const e={};for(const i of t)e[i.domain]=i.handlers.config_entry;this._diagnosticHandlers=e})}updated(t){if(super.updated(t),t.has("route")&&this._handleRouteChanged(),(this._hashParams.has("config_entry")||this._hashParams.has("domain"))&&t.has("configEntries")&&!t.get("configEntries")&&this.configEntries&&this._highlightEntry(),t.has("configEntriesInProgress")&&this.configEntriesInProgress&&this._fetchIntegrationManifests(this.configEntriesInProgress.map(t=>t.handler)),t.has("configEntries")&&this.configEntries&&this._fetchIntegrationManifests(this.configEntries.map(t=>t.domain)),this.configEntries&&this.configEntriesInProgress){var e;const t=(0,h.n)();if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement||null!=t&&t.isContentEditable)return;null===(e=this._tabsSubpage)||void 0===e||e.focusContentScroller()}}render(){if(!this.configEntries||!this.configEntriesInProgress)return(0,o.qy)(U||(U=dt`<hass-loading-screen .hass="${0}" .narrow="${0}"></hass-loading-screen>`),this.hass,this.narrow);const[t,e,i]=this._filterConfigEntries(this.hass.config.components,this._manifests,this.configEntries,this._entityRegistryEntries,this.hass.localize,this._filter),a=this._filterConfigEntriesInProgress(this.configEntriesInProgress,this._improvDiscovered,this._filter),n=(0,o.qy)(W||(W=dt` <div slot="${0}"> <div class="menu-badge-container"> ${0} <ha-dropdown multi @wa-select="${0}"> <ha-icon-button slot="trigger" .label="${0}" .path="${0}"> </ha-icon-button> <ha-dropdown-item type="checkbox" .checked="${0}" value="show-ignored"> ${0} </ha-dropdown-item> <ha-dropdown-item type="checkbox" .checked="${0}" value="show-disabled"> ${0} </ha-dropdown-item> </ha-dropdown> </div> ${0} </div> `),(0,s.J)(this.narrow?"toolbar-icon":void 0),!this._showDisabled&&this.narrow&&i.length?(0,o.qy)(N||(N=dt`<span class="badge">${0}</span>`),i.length):"",this._handleMenuAction,this.hass.localize("ui.common.menu"),gt,this._showIgnored,this.hass.localize("ui.panel.config.integrations.ignore.show_ignored"),this._showDisabled,this.hass.localize("ui.panel.config.integrations.disable.show_disabled"),this.narrow?(0,o.qy)(B||(B=dt` <ha-integration-overflow-menu .hass="${0}" slot="toolbar-icon"></ha-integration-overflow-menu> `),this.hass):"");return(0,o.qy)(J||(J=dt` <hass-tabs-subpage .hass="${0}" .narrow="${0}" .backPath="${0}" .route="${0}" .tabs="${0}" has-fab> ${0} ${0} ${0} ${0} ${0} <div class="container"> ${0} </div> <ha-button slot="fab" size="large" @click="${0}"> <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> ${0} </ha-button> </hass-tabs-subpage> `),this.hass,this.narrow,this._searchParams.has("historyBack")?void 0:"/config",this.route,D.configSections.devices,this.narrow?(0,o.qy)(K||(K=dt` <div slot="header" class="header"> <ha-input-search appearance="outlined" .value="${0}" @input="${0}" .placeholder="${0}"> </ha-input-search> </div> ${0} `),this._filter,this._handleSearchChange,this.hass.localize("ui.panel.config.integrations.search"),n):(0,o.qy)(Y||(Y=dt` <ha-integration-overflow-menu .hass="${0}" slot="toolbar-icon"></ha-integration-overflow-menu> <div class="search"> <ha-input-search appearance="outlined" .value="${0}" @input="${0}" .placeholder="${0}"> </ha-input-search> <div class="filters"> ${0} ${0} </div> </div> `),this.hass,this._filter,this._handleSearchChange,this.hass.localize("ui.panel.config.integrations.search"),!this._showDisabled&&i.length?(0,o.qy)(G||(G=dt`<div class="active-filters"> ${0} <ha-button appearance="plain" size="small" @click="${0}"> ${0} </ha-button> </div>`),this.hass.localize("ui.panel.config.integrations.disable.disabled_integrations",{number:i.length}),this._toggleShowDisabled,this.hass.localize("ui.panel.config.integrations.disable.show")):o.s6,n),this._showIgnored?(0,o.qy)(X||(X=dt`<h1> ${0} </h1> <div class="container"> ${0} </div>`),this.hass.localize("ui.panel.config.integrations.ignore.ignored"),e.length>0?e.map(t=>(0,o.qy)(Q||(Q=dt` <ha-ignored-config-entry-card .hass="${0}" .manifest="${0}" .entry="${0}" @change="${0}"></ha-ignored-config-entry-card> `),this.hass,this._manifests[t.domain],t,this._handleFlowUpdated)):(0,o.qy)(tt||(tt=dt`${0}`),this.hass.localize("ui.panel.config.integrations.no_ignored_integrations"))):"",a.length?(0,o.qy)(et||(et=dt`<h1> ${0} </h1> <div class="container"> ${0} </div>`),this.hass.localize("ui.panel.config.integrations.discovered"),a.map(t=>(0,o.qy)(it||(it=dt` <ha-config-flow-card .hass="${0}" .manifest="${0}" .flow="${0}" @change="${0}"></ha-config-flow-card> `),this.hass,this._manifests[t.handler],t,this._handleFlowUpdated))):"",this._showDisabled?(0,o.qy)(at||(at=dt`<h1> ${0} </h1> <div class="container"> ${0} </div>`),this.hass.localize("ui.panel.config.integrations.disabled"),i.length>0?i.map(t=>(0,o.qy)(nt||(nt=dt` <ha-disabled-config-entry-card .hass="${0}" .entry="${0}" .manifest="${0}" .entityRegistryEntries="${0}"></ha-disabled-config-entry-card> `),this.hass,t,this._manifests[t.domain],this._entityRegistryEntries)):(0,o.qy)(ot||(ot=dt`${0}`),this.hass.localize("ui.panel.config.integrations.no_disabled_integrations"))):"",a.length||this._showDisabled||this._showIgnored?(0,o.qy)(rt||(rt=dt`<h1> ${0} </h1>`),this.hass.localize("ui.panel.config.integrations.configured")):"",t.length?t.map(([t,e])=>(0,o.qy)(st||(st=dt`<ha-integration-card data-domain="${0}" .hass="${0}" .domain="${0}" .items="${0}" .manifest="${0}" .entityRegistryEntries="${0}" .domainEntities="${0}" .supportsDiagnostics="${0}" .logInfo="${0}"></ha-integration-card>`),t,this.hass,t,e,this._manifests[t],this._entityRegistryEntries,this._domainEntities[t]||[],!!this._diagnosticHandlers&&this._diagnosticHandlers[t],this._logInfos?this._logInfos[t]:o.s6)):this._filter&&!a.length&&!t.length&&this.configEntries.length?(0,o.qy)(lt||(lt=dt` <div class="empty-message"> <h1> ${0} </h1> <p> ${0} </p> <ha-button @click="${0}" appearance="filled" size="small"> <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> ${0} </ha-button> </div> `),this.hass.localize("ui.panel.config.integrations.none_found"),this.hass.localize("ui.panel.config.integrations.none_found_detail"),this._createFlow,pt,this.hass.localize("ui.panel.config.integrations.add_integration")):this._filter||this._showIgnored&&0!==e.length||this._showDisabled&&0!==i.length||0!==t.length?"":(0,o.qy)(ct||(ct=dt` <div class="empty-message"> <h1> ${0} </h1> <p> ${0} </p> <ha-button @click="${0}" appearance="filled" size="small"> <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> ${0} </ha-button> </div> `),this.hass.localize("ui.panel.config.integrations.none"),this.hass.localize("ui.panel.config.integrations.no_integrations"),this._createFlow,pt,this.hass.localize("ui.panel.config.integrations.add_integration")),this._createFlow,pt,this.hass.localize("ui.panel.config.integrations.add_integration"))}async _scanUSBDevices(){(0,c.x)(this.hass.config,"usb")&&await(0,M.$)(this.hass)}_scanImprovDevices(){var t;null!==(t=this.hass.auth.external)&&void 0!==t&&t.config.canSetupImprov&&(window.addEventListener("improv-discovered-device",this._handleImprovDiscovered),window.addEventListener("improv-device-setup-done",this._reScanImprovDevices),this.hass.auth.external.fireMessage({type:"improv/scan"}))}async _fetchEntitySources(){const t=await(0,C.c)(this.hass),e={};for(const[i,a]of Object.entries(t))a.domain in e||(e[a.domain]=[]),e[a.domain].push(i);this._domainEntities=e}async _fetchManifests(t){const e=await(0,$.fK)(this.hass,t),i=Object.assign({},this._manifests);for(const a of e)i[a.domain]=a;this._manifests=i}async _fetchIntegrationManifests(t){const e=[];for(const i of t)if(!(i in this._manifests)){if(this._extraFetchedManifests){if(this._extraFetchedManifests.has(i))continue}else this._extraFetchedManifests=new Set;this._extraFetchedManifests.add(i),e.push(i)}e.length&&await this._fetchManifests(e)}_handleFlowUpdated(){this._reScanImprovDevices(),this._fetchManifests()}_createFlow(){(0,j.X)(this,{initialFilter:this._filter,navigateToResult:!0})}_handleMenuAction(t){switch(t.detail.item.value){case"show-ignored":this._showIgnored=!this._showIgnored;break;case"show-disabled":this._toggleShowDisabled()}}_toggleShowDisabled(){this._showDisabled=!this._showDisabled}_handleSearchChange(t){var e;this._filter=null!==(e=t.target.value)&&void 0!==e?e:"",history.replaceState({filter:this._filter},"")}async _highlightEntry(){await(0,f.E)();const t=this._hashParams.get("config_entry");let e;if(t){const i=this.configEntries.find(e=>e.entry_id===t);if(!i)return;e=i.domain}else e=this._hashParams.get("domain");const i=this.shadowRoot.querySelector(`[data-domain=${e}]`);i&&(i.scrollIntoView({block:"center"}),i.classList.add("highlight"))}async _handleRouteChanged(){var t;if("/add"!==(null===(t=this.route)||void 0===t?void 0:t.path))return;const e=(0,u.p9)("brand"),i=(0,u.p9)("domain");if((0,g.oo)("/config/integrations/dashboard/",{replace:!0}),e)return void(0,j.X)(this,{brand:e,navigateToResult:!0});if(!i)return;const a=await(0,z.O)(this.hass),n=Object.assign(Object.assign({},a.core.integration),a.custom.integration),o=(0,z.s)(n,i);if(null!=o&&o.config_flow){if(o.single_config_entry){if((await(0,b.VN)(this.hass,{domain:i})).length>0)return void(0,F.C)(this,{domain:i})}const t=await this.hass.loadBackendTranslation("title",i,!1);return void(await(0,E.dk)(this,{title:t("ui.panel.config.integrations.confirm_new",{integration:o.name||(0,$.p$)(t,i)})})&&(0,j.X)(this,{domain:i,navigateToResult:!0}))}if(null!=o&&o.supported_by){const t=await this.hass.loadBackendTranslation("title",i,!1),e=(0,z.s)(n,o.supported_by);if(!e)return;return void(0,E.dk)(this,{text:this.hass.localize("ui.panel.config.integrations.config_flow.supported_brand_flow",{supported_brand:o.name||(0,$.p$)(t,i),flow_domain_name:e.name||(0,$.p$)(t,o.supported_by)}),confirm:async()=>{d.x.includes(o.supported_by)?(0,d.P)(this,this.hass,o.supported_by):(0,k.W)(this,{dialogClosedCallback:()=>{this._handleFlowUpdated()},startFlowHandler:o.supported_by,manifest:await(0,$.QC)(this.hass,o.supported_by)})}})}if((0,V.z)(i))return void(0,g.oo)(`/config/helpers/add?domain=${i}`,{replace:!0});const r=Object.assign(Object.assign({},a.core.helper),a.custom.helper);(0,z.s)(r,i)?(0,g.oo)(`/config/helpers/add?domain=${i}`,{replace:!0}):(0,E.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_flow.error"),text:this.hass.localize("ui.panel.config.integrations.config_flow.no_config_flow")})}supportedShortcuts(){return{f:()=>this._searchInput.focus()}}static get styles(){return[S.RF,(0,o.AH)(ht||(ht=dt`:host([narrow]) hass-tabs-subpage{--main-title-margin:0}ha-dropdown{margin-left:8px;margin-inline-start:8px;margin-inline-end:initial;direction:var(--direction)}.container{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));grid-gap:8px 8px;padding:8px 16px 16px}.empty-message{margin:auto;text-align:center;grid-column-start:1;grid-column-end:-1}.empty-message h1{margin:0}ha-input-search{flex:1;min-width:0}.header{display:flex;min-width:0}.search{display:flex;justify-content:space-between;width:100%;align-items:center;height:56px;position:sticky;top:0;z-index:2;background-color:var(--primary-background-color);padding:0 16px;gap:var(--ha-space-4);box-sizing:border-box;border-bottom:1px solid var(--divider-color)}.filters{--mdc-text-field-fill-color:var(--input-fill-color);--mdc-text-field-idle-line-color:var(--input-idle-line-color);--mdc-shape-small:4px;--text-field-overflow:initial;display:flex;justify-content:flex-end;align-items:center;color:var(--primary-text-color)}.active-filters{color:var(--primary-text-color);display:flex;align-items:center;padding:2px 2px 2px 8px;line-height:1;padding-inline-start:8px;padding-inline-end:2px;font-size:var(--ha-font-size-m);width:max-content;cursor:initial;direction:var(--direction);height:32px;background-color:var(--ha-color-fill-primary-normal-resting);border-radius:var(--ha-border-radius-sm)}.active-filters ha-button{margin-left:8px;margin-inline-start:8px;margin-inline-end:initial;direction:var(--direction)}.badge{min-width:20px;min-height:20px;border-radius:var(--ha-border-radius-circle);font-weight:var(--ha-font-weight-normal);background-color:var(--primary-color);display:flex;align-items:center;justify-content:center;color:var(--text-primary-color);position:absolute;right:0px;top:4px;font-size:var(--ha-font-size-s)}.menu-badge-container{position:relative}h1{margin-top:8px;margin-left:16px;margin-inline-start:16px;margin-inline-end:initial}ha-dropdown ha-icon-button{color:var(--primary-text-color)}`))]}constructor(...t){var e;super(...t),this.narrow=!1,this.isWide=!1,this._improvDiscovered=new Map,this._entityRegistryEntries=[],this._manifests={},this._domainEntities={},this._showIgnored=!1,this._showDisabled=!1,this._hashParams=new URLSearchParams(window.location.hash.substring(1)),this._searchParams=new URLSearchParams(window.location.search),this._filter=(null===(e=history.state)||void 0===e?void 0:e.filter)||"",this._filterConfigEntries=(0,l.A)((t,e,i,a,o,r)=>{const s=new Set(i.map(t=>t.domain)),l=new Set;for(const n of t){const t=n.split(".")[0];s.has(t)||!e[t]||e[t].config_flow||e[t].integration_type&&!["device","hub","service","integration"].includes(e[t].integration_type)||l.add(t)}const c=[...l].map(t=>({domain:t,localized_domain_name:(0,$.p$)(o,t,e[t]),title:t,source:"yaml",state:"loaded",supports_options:!1,supports_remove_device:!1,supports_unload:!1,supports_reconfigure:!1,supported_subentry_types:{},num_subentries:0,pref_disable_new_entities:!1,pref_disable_polling:!1,disabled_by:null,reason:null,error_reason_translation_key:null,error_reason_translation_placeholders:null})),h=[...i.filter(t=>{var e;return t.supports_options||"hardware"!==(null===(e=this._manifests[t.domain])||void 0===e?void 0:e.integration_type)||a.some(e=>e.config_entry_id===t.entry_id)}),...c];let d;const g=[],u=[],f=[];if(r){const t={keys:["domain","localized_domain_name","title"],isCaseSensitive:!1,minMatchCharLength:Math.min(r.length,2),threshold:.2};d=new n.A(h,t).search(r).map(t=>t.item)}else d=h;for(const n of d)"ignore"===n.source?g.push(n):null!==n.disabled_by?u.push(n):f.push(n);return[Array.from(ut(f)).sort((t,e)=>(0,p.SH)(t[1][0].localized_domain_name||t[0],e[1][0].localized_domain_name||e[0],this.hass.locale.language)),mt(g,this._manifests,this.hass.localize,this.hass.locale.language),mt(u,this._manifests,this.hass.localize,this.hass.locale.language)]}),this._filterConfigEntriesInProgress=(0,l.A)((t,e,i)=>{let a=[...t];const o=Array.from(e.values());let r;if(o.length&&(a=a.filter(t=>!o.some(e=>e.name===t.localized_title)),e.forEach(t=>{a.push({flow_id:"external",handler:"improv_ble",context:{title_placeholders:{name:t.name}},step_id:"bluetooth_confirm",localized_title:t.name})})),i){const t={keys:["handler","localized_title"],isCaseSensitive:!1,minMatchCharLength:Math.min(i.length,2),threshold:.2,ignoreDiacritics:!0};r=new n.A(a,t).search(i).map(t=>t.item)}else r=a;return r.sort((t,e)=>(0,p.SH)(t.localized_title||t.handler,e.localized_title||e.handler,this.hass.locale.language))}),this._reScanImprovDevices=()=>{var t;null!==(t=this.hass.auth.external)&&void 0!==t&&t.config.canSetupImprov&&(this._improvDiscovered=new Map,this.hass.auth.external.fireMessage({type:"improv/scan"}))},this._handleImprovDiscovered=t=>{this._fetchManifests(["improv_ble"]),this._improvDiscovered.set(t.detail.name,t.detail),this._improvDiscovered=new Map(Array.from(this._improvDiscovered))}}}(0,a.Cg)([(0,r.MZ)({attribute:!1})],vt.prototype,"hass",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],vt.prototype,"narrow",void 0),(0,a.Cg)([(0,r.MZ)({attribute:"is-wide",type:Boolean})],vt.prototype,"isWide",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],vt.prototype,"route",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],vt.prototype,"configEntries",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],vt.prototype,"configEntriesInProgress",void 0),(0,a.Cg)([(0,r.wk)()],vt.prototype,"_improvDiscovered",void 0),(0,a.Cg)([(0,r.wk)()],vt.prototype,"_entityRegistryEntries",void 0),(0,a.Cg)([(0,r.wk)()],vt.prototype,"_manifests",void 0),(0,a.Cg)([(0,r.wk)()],vt.prototype,"_domainEntities",void 0),(0,a.Cg)([(0,r.wk)()],vt.prototype,"_showIgnored",void 0),(0,a.Cg)([(0,r.wk)()],vt.prototype,"_showDisabled",void 0),(0,a.Cg)([(0,r.wk)()],vt.prototype,"_hashParams",void 0),(0,a.Cg)([(0,r.wk)()],vt.prototype,"_searchParams",void 0),(0,a.Cg)([(0,r.wk)()],vt.prototype,"_filter",void 0),(0,a.Cg)([(0,r.wk)()],vt.prototype,"_diagnosticHandlers",void 0),(0,a.Cg)([(0,r.wk)()],vt.prototype,"_logInfos",void 0),(0,a.Cg)([(0,r.P)("ha-input-search")],vt.prototype,"_searchInput",void 0),(0,a.Cg)([(0,r.P)("hass-tabs-subpage")],vt.prototype,"_tabsSubpage",void 0),vt=(0,a.Cg)([(0,r.EM)("ha-config-integrations-dashboard")],vt),e()}catch(U){e(U)}})},81074:function(t,e,i){i.a(t,async function(t,a){try{i.r(e);i(44114),i(18111),i(22489),i(7588),i(61701),i(3362),i(27495),i(62953),i(48408),i(14603),i(47566),i(98721);var n=i(40445),o=i(67576),r=i(91926),s=i(77423),l=i(26571),c=i(95350),h=i(23296),d=i(324),g=i(54706),p=i(87599),u=i(53896),f=t([h,p,u]);[h,p,u]=f.then?(await f)():f;class m extends((0,g.E)(d.a)){hassSubscribe(){return[(0,s.TC)(this.hass,async t=>{var e;if(0===t.length)return void(this._configEntries=[]);let i=void 0===this._configEntries;const a=[];await(null===(e=this._loadTranslationsPromise)||void 0===e?void 0:e.then(()=>new Promise(t=>{window.setTimeout(t,0)}))),t.forEach(t=>{if(null===t.type||"added"===t.type)a.push(Object.assign(Object.assign({},t.entry),{},{localized_domain_name:(0,c.p$)(this.hass.localize,t.entry.domain)})),null===t.type&&(i=!0);else if("removed"===t.type)this._configEntries=this._configEntries.filter(e=>e.entry_id!==t.entry.entry_id);else if("updated"===t.type){const e=t.entry;this._configEntries=this._configEntries.map(t=>t.entry_id===e.entry_id?Object.assign(Object.assign({},e),{},{localized_domain_name:t.localized_domain_name}):t)}});const n=i?[]:this._configEntries;this._configEntries=[...n,...a]},{type:["device","hub","service","hardware"]}),(0,l.x)(this.hass,async t=>{if(0===t.length)return void(this._configEntriesInProgress=[]);let e=void 0===this._configEntriesInProgress;const i=[];if(t.forEach(t=>{if("removed"!==t.type)null!==t.type&&"added"!==t.type||(null===t.type&&(e=!0),i.push(t.flow));else{if(!this._configEntriesInProgress)return;this._configEntriesInProgress=this._configEntriesInProgress.filter(e=>e.flow_id!==t.flow_id)}}),!i.length&&!e)return;const a=e?[]:this._configEntriesInProgress,n=i.filter(t=>t.context.title_placeholders).map(t=>t.handler),o=n.length?await this.hass.loadBackendTranslation("config",n):this.hass.localize;this._configEntriesInProgress=[...a,...i.map(t=>Object.assign(Object.assign({},t),{},{localized_title:(0,l.m7)(o,t)}))]})]}willUpdate(t){super.willUpdate(t),this.hasUpdated||(this._loadTranslationsPromise=this.hass.loadBackendTranslation("title",this.hass.config.components.map(t=>t.split(".")[0])))}updatePageEl(t){if(t.hass=this.hass,"integration"===this._currentPage)if(this.routeTail.path)t.domain=this.routeTail.path.substring(1);else if(window.location.search){const e=new URLSearchParams(window.location.search);if(e.has("domain")){const i=e.get("domain");t.domain=i,(0,r.oo)(`/config/integrations/integration/${i}`)}}t.route=this.routeTail,t.configEntries=this._configEntries,t.configEntriesInProgress=this._configEntriesInProgress,t.narrow=this.narrow,t.isWide=this.isWide}constructor(...t){super(...t),this.narrow=!1,this.isWide=!1,this.routerOptions={defaultPage:"dashboard",routes:{dashboard:{tag:"ha-config-integrations-dashboard",cache:!0},integration:{tag:"ha-config-integration-page"}}}}}(0,n.Cg)([(0,o.MZ)({attribute:!1})],m.prototype,"hass",void 0),(0,n.Cg)([(0,o.MZ)({type:Boolean,reflect:!0})],m.prototype,"narrow",void 0),(0,n.Cg)([(0,o.MZ)({attribute:"is-wide",type:Boolean})],m.prototype,"isWide",void 0),(0,n.Cg)([(0,o.wk)()],m.prototype,"_configEntries",void 0),(0,n.Cg)([(0,o.wk)()],m.prototype,"_configEntriesInProgress",void 0),m=(0,n.Cg)([(0,o.EM)("ha-config-integrations")],m),a()}catch(m){a(m)}})},22523:function(t,e,i){i.a(t,async function(t,e){try{i(3362);var a=i(40445),n=i(5124),o=i(67576),r=i(18350),s=i(26300),l=i(77423),c=i(65063),h=(i(77540),t([r,s]));[r,s]=h.then?(await h)():h;let d,g,p=t=>t;const u="M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z";class f extends n.WF{render(){return(0,n.qy)(d||(d=p` <ha-integration-action-card .hass="${0}" .manifest="${0}" .banner="${0}" .domain="${0}" .localizedDomainName="${0}" .label="${0}"> <ha-icon-button .path="${0}" href="${0}" slot="header-button"></ha-icon-button> <ha-button @click="${0}" appearance="filled"> ${0} </ha-button> </ha-integration-action-card> `),this.hass,this.manifest,this.hass.localize("ui.panel.config.integrations.config_entry.disable.disabled_cause",{cause:this.hass.localize(`ui.panel.config.integrations.config_entry.disable.disabled_by.${this.entry.disabled_by}`)||this.entry.disabled_by}),this.entry.domain,this.entry.localized_domain_name,this.entry.title||this.entry.localized_domain_name,u,`/config/integrations/integration/${this.entry.domain}`,this._handleEnable,this.hass.localize("ui.common.enable"))}async _handleEnable(){const t=this.entry.entry_id;let e;try{e=await(0,l.k3)(this.hass,t)}catch(i){return void(0,c.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.disable_error"),text:i.message})}e.require_restart&&(0,c.showAlertDialog)(this,{text:this.hass.localize("ui.panel.config.integrations.config_entry.enable_restart_confirm")})}}f.styles=(0,n.AH)(g||(g=p`:host{--state-color:var(--divider-color, #e0e0e0)}ha-button{--mdc-theme-primary:var(--primary-color)}ha-icon-button{color:var(--secondary-text-color)}`)),(0,a.Cg)([(0,o.MZ)({attribute:!1})],f.prototype,"hass",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],f.prototype,"entry",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],f.prototype,"manifest",void 0),f=(0,a.Cg)([(0,o.EM)("ha-disabled-config-entry-card")],f),e()}catch(d){e(d)}})},64103:function(t,e,i){i.a(t,async function(t,e){try{i(3362);var a=i(40445),n=i(5124),o=i(67576),r=i(1087),s=i(77423),l=i(65063),c=(i(77540),i(18350)),h=t([c]);c=(h.then?(await h)():h)[0];let d,g,p=t=>t;class u extends n.WF{render(){return(0,n.qy)(d||(d=p` <ha-integration-action-card .hass="${0}" .manifest="${0}" .banner="${0}" .domain="${0}" .localizedDomainName="${0}" .label="${0}"> <ha-button appearance="plain" @click="${0}"> ${0} </ha-button> </ha-integration-action-card> `),this.hass,this.manifest,this.hass.localize("ui.panel.config.integrations.ignore.ignored"),this.entry.domain,this.entry.localized_domain_name,"Ignored"===this.entry.title?this.entry.localized_domain_name:this.entry.title,this._removeIgnoredIntegration,this.hass.localize("ui.panel.config.integrations.ignore.stop_ignore"))}async _removeIgnoredIntegration(){(0,l.dk)(this,{title:this.hass.localize("ui.panel.config.integrations.ignore.confirm_delete_ignore_title",{name:this.hass.localize(`component.${this.entry.domain}.title`)}),text:this.hass.localize("ui.panel.config.integrations.ignore.confirm_delete_ignore"),confirmText:this.hass.localize("ui.panel.config.integrations.ignore.stop_ignore"),confirm:async()=>{(await(0,s.eM)(this.hass,this.entry.entry_id)).require_restart&&alert(this.hass.localize("ui.panel.config.integrations.config_entry.restart_confirm")),(0,r.r)(this,"change",void 0,{bubbles:!1})}})}}u.styles=(0,n.AH)(g||(g=p`:host{--state-color:var(--divider-color, #e0e0e0)}ha-button{--mdc-theme-primary:var(--primary-color)}`)),(0,a.Cg)([(0,o.MZ)({attribute:!1})],u.prototype,"hass",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],u.prototype,"entry",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],u.prototype,"manifest",void 0),u=(0,a.Cg)([(0,o.EM)("ha-ignored-config-entry-card")],u),e()}catch(d){e(d)}})},77540:function(t,e,i){var a=i(40445),n=i(5124),o=i(67576),r=i(95350),s=(i(13926),i(76776),i(44144)),l=i(14503);let c,h,d=t=>t;class g extends n.WF{render(){var t;return(0,n.qy)(c||(c=d` <ha-card outlined> <div class="card-content"> <img alt="" src="${0}" crossorigin="anonymous" referrerpolicy="no-referrer" @error="${0}" @load="${0}"> <h2>${0}</h2> <h3> ${0} </h3> </div> <div class="filler"></div> <div class="card-actions"><slot></slot></div> <div class="header-button"><slot name="header-button"></slot></div> </ha-card> `),(0,s.MR)({domain:this.domain,type:"icon",darkOptimized:null===(t=this.hass.themes)||void 0===t?void 0:t.darkMode},this.hass.auth.data.hassUrl),this._onImageError,this._onImageLoad,this.label,this.localizedDomainName&&this.localizedDomainName!==this.domain?this.localizedDomainName:(0,r.p$)(this.hass.localize,this.domain,this.manifest))}_onImageLoad(t){t.target.style.visibility="initial"}_onImageError(t){t.target.style.visibility="hidden"}}g.styles=[l.RF,(0,n.AH)(h||(h=d`ha-card{display:flex;flex-direction:column;height:100%}img{width:40px;height:40px}h2{font-size:var(--ha-font-size-l);font-weight:var(--ha-font-weight-normal);margin-top:8px;margin-bottom:0;max-width:100%}h3{font-size:var(--ha-font-size-m);margin:0;max-width:100%;text-align:center}.header-button{position:absolute;top:8px;right:8px;inset-inline-end:8px;inset-inline-start:initial}.filler{flex:1}.attention{--state-color:var(--error-color);--text-on-state-color:var(--text-primary-color)}.card-content{display:flex;justify-content:center;flex-direction:column;align-items:center}.card-actions{border-top:none;padding-top:0;padding-bottom:16px;justify-content:center;display:flex}:host ::slotted(*){margin-right:8px;margin-inline-end:8px;margin-inline-start:initial}:host ::slotted(:last-child){margin-right:0;margin-inline-end:0;margin-inline-start:initial}`))],(0,a.Cg)([(0,o.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,a.Cg)([(0,o.MZ)()],g.prototype,"banner",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],g.prototype,"localizedDomainName",void 0),(0,a.Cg)([(0,o.MZ)()],g.prototype,"domain",void 0),(0,a.Cg)([(0,o.MZ)()],g.prototype,"label",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],g.prototype,"manifest",void 0),g=(0,a.Cg)([(0,o.EM)("ha-integration-action-card")],g)},88653:function(t,e,i){i.a(t,async function(t,e){try{i(74423),i(18111),i(81148),i(22489),i(20116),i(61701),i(13579),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(62953);var a=i(40445),n=i(5124),o=i(67576),r=i(6412),s=i(22786),l=i(89020),c=i(15638),h=i(18350),d=(i(76776),i(54276),i(67094),i(34127)),g=i(77423),p=i(95350),u=i(14503),f=(i(13926),t([h,d]));[h,d]=f.then?(await f)():f;let m,v,y,_,b,w,x,C,$,z,M=t=>t;const k="M14 2H6C4.89 2 4 2.9 4 4V20C4 21.11 4.89 22 6 22H18C19.11 22 20 21.11 20 20V8L14 2M18 20H6V4H13V9H18V20M9.54 15.65L11.63 17.74L10.35 19L7 15.65L10.35 12.3L11.63 13.56L9.54 15.65M17 15.65L13.65 19L12.38 17.74L14.47 15.65L12.38 13.56L13.65 12.3L17 15.65Z",E="M2,10.96C1.5,10.68 1.35,10.07 1.63,9.59L3.13,7C3.24,6.8 3.41,6.66 3.6,6.58L11.43,2.18C11.59,2.06 11.79,2 12,2C12.21,2 12.41,2.06 12.57,2.18L20.47,6.62C20.66,6.72 20.82,6.88 20.91,7.08L22.36,9.6C22.64,10.08 22.47,10.69 22,10.96L21,11.54V16.5C21,16.88 20.79,17.21 20.47,17.38L12.57,21.82C12.41,21.94 12.21,22 12,22C11.79,22 11.59,21.94 11.43,21.82L3.53,17.38C3.21,17.21 3,16.88 3,16.5V10.96C2.7,11.13 2.32,11.14 2,10.96M12,4.15V4.15L12,10.85V10.85L17.96,7.5L12,4.15M5,15.91L11,19.29V12.58L5,9.21V15.91M19,15.91V12.69L14,15.59C13.67,15.77 13.3,15.76 13,15.6V19.29L19,15.91M13.85,13.36L20.13,9.73L19.55,8.72L13.27,12.35L13.85,13.36Z",L="M16.36,14C16.44,13.34 16.5,12.68 16.5,12C16.5,11.32 16.44,10.66 16.36,10H19.74C19.9,10.64 20,11.31 20,12C20,12.69 19.9,13.36 19.74,14M14.59,19.56C15.19,18.45 15.65,17.25 15.97,16H18.92C17.96,17.65 16.43,18.93 14.59,19.56M14.34,14H9.66C9.56,13.34 9.5,12.68 9.5,12C9.5,11.32 9.56,10.65 9.66,10H14.34C14.43,10.65 14.5,11.32 14.5,12C14.5,12.68 14.43,13.34 14.34,14M12,19.96C11.17,18.76 10.5,17.43 10.09,16H13.91C13.5,17.43 12.83,18.76 12,19.96M8,8H5.08C6.03,6.34 7.57,5.06 9.4,4.44C8.8,5.55 8.35,6.75 8,8M5.08,16H8C8.35,17.25 8.8,18.45 9.4,19.56C7.57,18.93 6.03,17.65 5.08,16M4.26,14C4.1,13.36 4,12.69 4,12C4,11.31 4.1,10.64 4.26,10H7.64C7.56,10.66 7.5,11.32 7.5,12C7.5,12.68 7.56,13.34 7.64,14M12,4.03C12.83,5.23 13.5,6.57 13.91,8H10.09C10.5,6.57 11.17,5.23 12,4.03M18.92,8H15.97C15.65,6.75 15.19,5.55 14.59,4.44C16.43,5.07 17.96,6.34 18.92,8M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z";class A extends n.WF{render(){const t=this._getState(this.items),e=this.logInfo&&this.logInfo.level===p.S1.DEBUG;return(0,n.qy)(m||(m=M` <ha-card outlined class="${0}"> <a href="${0}" class="ripple-anchor"> <ha-ripple></ha-ripple> <ha-integration-header .hass="${0}" .domain="${0}" .localizedDomainName="${0}" .error="${0}" .warning="${0}" .manifest="${0}"> </ha-integration-header> </a> ${0} </ha-card> `),(0,r.H)({"state-loaded":"loaded"===t,"state-not-loaded":"not_loaded"===t,"state-failed-unload":"failed_unload"===t,"state-setup":"setup_in_progress"===t,"state-error":g.m4.includes(t),"debug-logging":Boolean(e)}),`/config/integrations/integration/${this.domain}`,this.hass,this.domain,this.items[0].localized_domain_name,g.m4.includes(t)?this.hass.localize(`ui.panel.config.integrations.config_entry.state.${t}`):void 0,"loaded"===t||g.m4.includes(t)?e?this.hass.localize("ui.panel.config.integrations.config_entry.debug_logging_enabled"):void 0:this.hass.localize(`ui.panel.config.integrations.config_entry.state.${t}`),this.manifest,this._renderSingleEntry())}_renderSingleEntry(){var t,e;const i=this._getDevices(this.items,this.hass.devices),a=i.length?0:this._getEntityCount(this.items,this.entityRegistryEntries,this.domainEntities),o=!i.some(t=>"service"!==t.entry_type);return(0,n.qy)(v||(v=M` <div class="card-actions"> ${0} <div class="icons"> ${0} ${0} ${0} </div> </div> `),i.length>0?(0,n.qy)(y||(y=M`<ha-button appearance="plain" href="${0}"> ${0} </ha-button>`),1!==i.length||l.x.includes(this.domain)?`/config/devices/dashboard?historyBack=1&domain=${this.domain}`:`/config/devices/device/${i[0].id}`,this.hass.localize("ui.panel.config.integrations.config_entry."+(o?"services":"devices"),{count:i.length})):a>0?(0,n.qy)(_||(_=M`<ha-button appearance="plain" href="${0}"> ${0} </ha-button>`),`/config/entities?historyBack=1&domain=${this.domain}`,this.hass.localize("ui.panel.config.integrations.config_entry.entities",{count:a})):this.items.find(t=>"yaml"!==t.source)?(0,n.qy)(b||(b=M`<ha-button appearance="plain" href="${0}"> ${0} </ha-button>`),`/config/integrations/integration/${this.domain}`,this.hass.localize("ui.panel.config.integrations.config_entry.entries",{count:this.items.filter(t=>"yaml"!==t.source).length})):(0,n.qy)(w||(w=M`<div class="spacer"></div>`)),this.manifest&&!this.manifest.is_built_in?(0,n.qy)(x||(x=M`<span class="icon ${0}"> <ha-svg-icon id="icon-custom" .path="${0}"></ha-svg-icon> <ha-tooltip for="icon-custom" .placement="${0}"> ${0} </ha-tooltip> </span>`),this.manifest.overwrites_built_in?"overwrites":"custom",E,(0,c.qC)(this.hass.language,this.hass.translationMetadata.translations)?"right":"left",this.hass.localize(this.manifest.overwrites_built_in?"ui.panel.config.integrations.config_entry.custom_overwrites_core":"ui.panel.config.integrations.config_entry.custom_integration")):n.s6,this.manifest&&null!==(t=this.manifest.iot_class)&&void 0!==t&&t.startsWith("cloud_")?(0,n.qy)(C||(C=M`<div class="icon cloud"> <ha-svg-icon id="icon-cloud" .path="${0}"></ha-svg-icon> <ha-tooltip for="icon-cloud" .placement="${0}"> ${0} </ha-tooltip> </div>`),L,(0,c.qC)(this.hass.language,this.hass.translationMetadata.translations)?"right":"left",this.hass.localize("ui.panel.config.integrations.config_entry.depends_on_cloud")):n.s6,!this.manifest||null!==(e=this.manifest)&&void 0!==e&&e.config_flow||this.items.every(t=>"system"===t.source)?n.s6:(0,n.qy)($||($=M`<div class="icon yaml"> <ha-svg-icon id="icon-yaml" .path="${0}"></ha-svg-icon> <ha-tooltip for="icon-yaml" .placement="${0}"> ${0} </ha-tooltip> </div>`),k,(0,c.qC)(this.hass.language,this.hass.translationMetadata.translations)?"right":"left",this.hass.localize("ui.panel.config.integrations.config_entry.no_config_flow")))}static get styles(){return[u.RF,(0,n.AH)(z||(z=M`ha-card{display:flex;flex-direction:column;justify-content:space-between;height:100%;overflow:hidden;--state-color:var(--divider-color, #e0e0e0);--state-message-color:var(--state-color)}.ripple-anchor{flex-grow:1;position:relative;outline:0}.ripple-anchor:focus-visible:before{position:absolute;display:block;content:"";inset:0;background-color:var(--secondary-text-color);opacity:.08}ha-integration-header{height:100%}.card-actions{display:flex;align-items:center;justify-content:space-between}.debug-logging{--state-color:var(--warning-color);--ha-card-border-color:var(--state-color);--text-on-state-color:var(--primary-text-color)}.state-error{--state-color:var(--error-color);--ha-card-border-color:var(--state-color);--text-on-state-color:var(--text-primary-color)}.state-failed-unload{--state-color:var(--warning-color);--ha-card-border-color:var(--state-color);--text-on-state-color:var(--primary-text-color)}.state-not-loaded{opacity:.8;--state-color:var(--warning-color);--ha-card-border-color:var(--state-color);--state-message-color:var(--primary-text-color)}.state-setup{opacity:.8;--state-message-color:var(--secondary-text-color)}:host(.highlight) ha-card{--state-color:var(--primary-color);--ha-card-border-color:var(--state-color);--text-on-state-color:var(--text-primary-color)}.content{flex:1;--mdc-list-side-padding-right:20px;--mdc-list-side-padding-left:24px;--mdc-list-item-graphic-margin:24px}a{text-decoration:none;color:var(--primary-text-color)}.icons{display:flex}.icon{color:var(--label-badge-grey);padding:4px;margin-left:8px;margin-inline-start:8px;margin-inline-end:initial}.icon.custom{color:var(--warning-color)}.icon.overwrites{color:var(--error-color)}.icon ha-svg-icon{width:24px;height:24px;display:block}.spacer{height:36px}`))]}constructor(...t){super(...t),this.supportsDiagnostics=!1,this.domainEntities=[],this._getState=(0,s.A)(t=>{if(1===t.length)return t[0].state;let e;for(const i of t){if(g.m4.includes(i.state))return i.state;e=i.state}return e}),this._getEntityCount=(0,s.A)((t,e,i)=>{if(!e)return i.length;const a=t.map(t=>t.entry_id).filter(Boolean);if(!a.length)return i.length;const n=e.filter(t=>t.config_entry_id&&a.includes(t.config_entry_id));if(n.length===i.length)return i.length;const o=new Set(n.map(t=>t.entity_id));for(const r of i)o.add(r);return o.size}),this._getDevices=(0,s.A)((t,e)=>{if(!e)return[];const i=t.map(t=>t.entry_id);return Object.values(e).filter(t=>t.config_entries.some(t=>i.includes(t)))})}}(0,a.Cg)([(0,o.MZ)({attribute:!1})],A.prototype,"hass",void 0),(0,a.Cg)([(0,o.MZ)()],A.prototype,"domain",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],A.prototype,"items",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],A.prototype,"manifest",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],A.prototype,"entityRegistryEntries",void 0),(0,a.Cg)([(0,o.MZ)({attribute:"supports-diagnostics",type:Boolean})],A.prototype,"supportsDiagnostics",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],A.prototype,"logInfo",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],A.prototype,"domainEntities",void 0),A=(0,a.Cg)([(0,o.EM)("ha-integration-card")],A),e()}catch(m){e(m)}})},13926:function(t,e,i){var a=i(40445),n=i(5124),o=i(67576),r=(i(43661),i(67094),i(95350)),s=i(44144);let l,c,h,d,g=t=>t;class p extends n.WF{render(){var t;const e=this.localizedDomainName||(0,r.p$)(this.hass.localize,this.domain,this.manifest);return(0,n.qy)(l||(l=g` <div class="header"> <img alt="" src="${0}" crossorigin="anonymous" referrerpolicy="no-referrer" @error="${0}" @load="${0}"> <div class="info"> <div class="primary ${0}" role="heading" aria-level="1"> ${0} </div> ${0} </div> <ha-icon-next class="header-button" .label="${0}"></ha-icon-next> </div> `),(0,s.MR)({domain:this.domain,type:"icon",darkOptimized:null===(t=this.hass.themes)||void 0===t?void 0:t.darkMode},this.hass.auth.data.hassUrl),this._onImageError,this._onImageLoad,this.warning||this.error?"has-secondary":"",e,this.error?(0,n.qy)(c||(c=g` <div class="secondary error"> <ha-svg-icon .path="${0}"></ha-svg-icon> <span>${0}</span> </div> `),"M11,15H13V17H11V15M11,7H13V13H11V7M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20Z",this.error):this.warning?(0,n.qy)(h||(h=g` <div class="secondary warning"> <ha-svg-icon .path="${0}"></ha-svg-icon> <span>${0}</span> </div> `),"M12,2L1,21H23M12,6L19.53,19H4.47M11,10V14H13V10M11,16V18H13V16",this.warning):n.s6,this.hass.localize("ui.panel.config.integrations.config_entry.configure"))}_onImageLoad(t){t.target.style.visibility="initial"}_onImageError(t){t.target.style.visibility="hidden"}}p.styles=(0,n.AH)(d||(d=g`.header{display:flex;align-items:center;position:relative;padding-top:16px;padding-bottom:16px;padding-inline-start:16px;padding-inline-end:8px;direction:var(--direction);box-sizing:border-box;min-width:0}.header img{margin-inline-start:initial;margin-inline-end:16px;width:40px;height:40px;direction:var(--direction)}.header .info{position:relative;display:flex;flex-direction:column;flex:1;align-self:center;min-width:0}ha-icon-next{color:var(--secondary-text-color)}.primary{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:var(--ha-font-size-l);font-weight:var(--ha-font-weight-normal);color:var(--primary-text-color)}.has-secondary{-webkit-line-clamp:1;font-size:var(--ha-font-size-m)}.secondary{min-width:0;--mdc-icon-size:20px;-webkit-line-clamp:1;font-size:var(--ha-font-size-s);display:flex;flex-direction:row}.secondary>span{position:relative;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.secondary>ha-svg-icon{margin-right:4px;margin-inline-end:4px;margin-inline-start:initial;flex-shrink:0}.error ha-svg-icon{color:var(--error-color)}.warning ha-svg-icon{color:var(--warning-color)}`)),(0,a.Cg)([(0,o.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,a.Cg)([(0,o.MZ)()],p.prototype,"error",void 0),(0,a.Cg)([(0,o.MZ)()],p.prototype,"warning",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],p.prototype,"localizedDomainName",void 0),(0,a.Cg)([(0,o.MZ)()],p.prototype,"domain",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],p.prototype,"manifest",void 0),p=(0,a.Cg)([(0,o.EM)("ha-integration-header")],p)},73875:function(t,e,i){i.d(e,{C:function(){return n}});i(3362),i(62953);var a=i(1087);const n=(t,e)=>(0,a.r)(t,"show-dialog",{dialogTag:"dialog-single-config-entry-warning",dialogParams:e,dialogImport:()=>i.e(38187).then(i.bind(i,53766))})},69235:function(t,e,i){i.a(t,async function(t,e){try{i(3362),i(62953);"function"!=typeof window.ResizeObserver&&(window.ResizeObserver=(await i.e(71055).then(i.bind(i,52370))).default),e()}catch(a){e(a)}},1)},14503:function(t,e,i){i.d(e,{RF:function(){return g},dp:function(){return f},kO:function(){return u},nA:function(){return p},og:function(){return d}});var a=i(5124);let n,o,r,s,l,c,h=t=>t;const d=(0,a.AH)(n||(n=h`button.link{background:0 0;color:inherit;border:none;padding:0;font:inherit;text-align:left;text-decoration:underline;cursor:pointer;outline:0}`)),g=(0,a.AH)(o||(o=h`:host{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-m);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-normal)}app-header div[sticky]{height:48px}app-toolbar [main-title]{margin-left:20px;margin-inline-start:20px;margin-inline-end:initial}.header{transition:box-shadow .2s linear,width var(--ha-animation-duration-normal) ease,padding-left var(--ha-animation-duration-normal) ease,padding-right var(--ha-animation-duration-normal) ease}@media (prefers-reduced-motion:reduce){.header{transition:box-shadow .2s linear}}h1{font-family:var(--ha-font-family-heading);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-2xl);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-condensed)}h2{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:var(--ha-font-size-xl);font-weight:var(--ha-font-weight-medium);line-height:var(--ha-line-height-normal)}h3{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-l);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-normal)}a{color:var(--primary-color)}.secondary{color:var(--secondary-text-color)}.error{color:var(--error-color)}.warning{color:var(--error-color)}${0} .card-actions a{text-decoration:none}.card-actions .warning{--mdc-theme-primary:var(--error-color)}.layout.horizontal,.layout.vertical{display:flex}.layout.inline{display:inline-flex}.layout.horizontal{flex-direction:row}.layout.vertical{flex-direction:column}.layout.wrap{flex-wrap:wrap}.layout.no-wrap{flex-wrap:nowrap}.layout.center,.layout.center-center{align-items:center}.layout.bottom{align-items:flex-end}.layout.center-center,.layout.center-justified{justify-content:center}.flex{flex:1;flex-basis:0.000000001px}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.layout.justified{justify-content:space-between}`),d),p=(0,a.AH)(r||(r=h`ha-adaptive-dialog,ha-dialog{--mdc-dialog-min-width:400px;--mdc-dialog-max-width:600px;--mdc-dialog-max-width:min(600px, 95vw);--justify-action-buttons:space-between;--dialog-container-padding:var(--safe-area-inset-top, 0) var(--safe-area-inset-right, 0) var(--safe-area-inset-bottom, 0) var(--safe-area-inset-left, 0);--dialog-surface-padding:0px}ha-adaptive-dialog .form,ha-dialog .form{color:var(--primary-text-color)}a{color:var(--primary-color)}@media all and (max-width:450px),all and (max-height:500px){ha-adaptive-dialog,ha-dialog{--mdc-dialog-min-width:100vw;--mdc-dialog-max-width:100vw;--mdc-dialog-min-height:100vh;--mdc-dialog-min-height:100svh;--mdc-dialog-max-height:100vh;--mdc-dialog-max-height:100svh;--dialog-container-padding:0px;--dialog-surface-padding:var(--safe-area-inset-top, 0) var(--safe-area-inset-right, 0) var(--safe-area-inset-bottom, 0) var(--safe-area-inset-left, 0);--vertical-align-dialog:flex-end}ha-dialog{--ha-dialog-border-radius:var(--ha-border-radius-square)}}.error{color:var(--error-color)}`)),u=(0,a.AH)(s||(s=h`ha-adaptive-dialog,ha-dialog{--vertical-align-dialog:flex-start;--dialog-surface-margin-top:var(--ha-space-10);--mdc-dialog-max-height:calc(
100vh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
--safe-area-inset-y,
0px
)
);--mdc-dialog-max-height:calc(
100svh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
--safe-area-inset-y,
0px
)
);--ha-dialog-max-height:calc(
100vh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
--safe-area-inset-y,
0px
)
);--ha-dialog-max-height:calc(
100svh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
--safe-area-inset-y,
0px
)
)}@media all and (max-width:450px),all and (max-height:500px){ha-adaptive-dialog,ha-dialog{--dialog-surface-margin-top:0px;--mdc-dialog-min-height:100vh;--mdc-dialog-min-height:100svh;--mdc-dialog-max-height:100vh;--mdc-dialog-max-height:100svh;--ha-dialog-max-height:100vh;--ha-dialog-max-height:100svh}}`)),f=(0,a.AH)(l||(l=h`.ha-scrollbar::-webkit-scrollbar{width:.4rem;height:.4rem}.ha-scrollbar::-webkit-scrollbar-thumb{border-radius:var(--ha-border-radius-sm);background:var(--scrollbar-thumb-color)}.ha-scrollbar{overflow-y:auto;scrollbar-color:var(--scrollbar-thumb-color) transparent;scrollbar-width:thin}`));(0,a.AH)(c||(c=h`body{background-color:var(--primary-background-color);color:var(--primary-text-color);height:calc(100vh - 32px);width:100vw}`))}}]);