iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
16 lines • 48 kB
JavaScript
;(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[44770],{7553:function(e,t,o){o.d(t,{h:function(){return i}});o(16280),o(3362),o(62953);class n extends Error{constructor(e,...t){super(...t),Error.captureStackTrace&&Error.captureStackTrace(this,n),this.name="TimeoutError",this.timeout=e,this.message=`Timed out in ${e} ms.`}}const i=(e,t)=>{const o=new Promise((t,o)=>{setTimeout(()=>{o(new n(e))},e)});return Promise.race([t,o])}},75064:function(e,t,o){o(62953);var n=o(40445),i=o(5124),a=o(67576),r=o(2846);let s;class c extends r.G{constructor(...e){super(...e),this.borderTop=!1}}c.styles=[...r.J,(0,i.AH)(s||(s=(e=>e)`:host{--md-list-item-one-line-container-height:48px;--md-list-item-two-line-container-height:64px}:host([border-top]) md-item{border-top:1px solid var(--divider-color)}[slot=start]{--state-icon-color:var(--secondary-text-color)}[slot=overline]{line-height:1.15rem;font-size:calc(var(--mdc-typography-subtitle1-font-size, 1rem) * .75);font-weight:var(--mdc-typography-subtitle1-font-weight,400);font-family:var(
--mdc-typography-subtitle1-font-family,
var(--mdc-typography-font-family)
);color:var(--mdc-select-label-ink-color,rgba(0,0,0,.6))}[slot=headline]{line-height:var(--ha-line-height-normal);font-size:var(--ha-font-size-m);white-space:nowrap}[slot=supporting-text]{line-height:var(--ha-line-height-normal);font-size:var(--ha-font-size-s);white-space:nowrap}::slotted(img),::slotted(state-badge){width:32px;height:32px}::slotted(.code){font-family:var(--ha-font-family-code);font-size:var(--ha-font-size-xs)}::slotted(.domain){font-size:var(--ha-font-size-s);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-normal);align-self:flex-end;max-width:30%;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}`))],(0,n.Cg)([(0,a.MZ)({type:Boolean,reflect:!0,attribute:"border-top"})],c.prototype,"borderTop",void 0),c=(0,n.Cg)([(0,a.EM)("ha-combo-box-item")],c)},82432:function(e,t,o){o.a(e,async function(e,t){try{o(74423),o(13609),o(18111),o(20116),o(61701),o(3362),o(62953);var n=o(40445),i=o(5124),a=o(67576),r=o(1087),s=o(9899),c=o(77423),l=o(88433),d=o(59241),p=o(95350),h=o(70241),u=o(26401),f=o(606),g=e([f]);f=(g.then?(await g)():g)[0];let m,b,y,v=e=>e;const _="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",w="__NONE_OPTION__";class $ extends i.WF{render(){var e,t;if(!this._agents)return i.s6;let o=this.value;o||(o=w);const n=this._agents.map(e=>({value:e.id,label:e.name,disabled:"*"!==e.supported_languages&&0===e.supported_languages.length}));return this.required||n.unshift({value:w,label:this.hass.localize("ui.components.conversation-agent-picker.none")}),(0,i.qy)(m||(m=v` <ha-select .label="${0}" .value="${0}" .required="${0}" .disabled="${0}" @selected="${0}" .options="${0}"></ha-select>${0} `),this.label||this.hass.localize("ui.components.conversation-agent-picker.conversation_agent"),o,this.required,this.disabled,this._changed,n,this._subConfigEntry&&null!==(e=this._configEntry)&&void 0!==e&&null!==(e=e.supported_subentry_types[this._subConfigEntry.subentry_type])&&void 0!==e&&e.supports_reconfigure||null!==(t=this._configEntry)&&void 0!==t&&t.supports_options?(0,i.qy)(b||(b=v`<ha-icon-button .path="${0}" @click="${0}"></ha-icon-button>`),_,this._openOptionsFlow):"")}willUpdate(e){super.willUpdate(e),this.hasUpdated?e.has("language")&&this._debouncedUpdateAgents():this._updateAgents(),e.has("value")&&this._maybeFetchConfigEntry()}async _maybeFetchConfigEntry(){if(this.value&&this.value in this.hass.entities)try{const e=await(0,d.v)(this.hass,this.value);if(!e.config_entry_id)return void(this._configEntry=void 0);this._configEntry=(await(0,c.Vx)(this.hass,e.config_entry_id)).config_entry,e.config_subentry_id?this._subConfigEntry=(await(0,c.t0)(this.hass,e.config_entry_id)).find(t=>t.subentry_id===e.config_subentry_id):this._subConfigEntry=void 0}catch(e){this._configEntry=void 0,this._subConfigEntry=void 0}else this._configEntry=void 0}async _updateAgents(){const{agents:e}=await(0,l.vc)(this.hass,this.language,this.hass.config.country||void 0);if(this._agents=e,!this.value&&this.required){let e;for(const t of this._agents)if("conversation.home_assistant"===t.id&&(!this.language||"*"===t.supported_languages||t.supported_languages.includes(this.language))){e=t.id;break}if(!e)for(const t of this._agents)if("*"===t.supported_languages||!this.language||t.supported_languages.includes(this.language)){e=t.id;break}e&&(this.value=e,(0,r.r)(this,"value-changed",{value:this.value}))}if(!this.value)return;const t=e.find(e=>e.id===this.value);(0,r.r)(this,"supported-languages-changed",{value:null==t?void 0:t.supported_languages}),(!t||"*"!==t.supported_languages&&0===t.supported_languages.length)&&(this.value=void 0,(0,r.r)(this,"value-changed",{value:this.value}))}async _openOptionsFlow(){var e;this._configEntry&&(this._subConfigEntry&&null!==(e=this._configEntry.supported_subentry_types[this._subConfigEntry.subentry_type])&&void 0!==e&&e.supports_reconfigure?(0,u.a)(this,this._configEntry,this._subConfigEntry.subentry_type,{startFlowHandler:this._configEntry.entry_id,subEntryId:this._subConfigEntry.subentry_id}):(0,h.Q)(this,this._configEntry,{manifest:await(0,p.QC)(this.hass,this._configEntry.domain)}))}_changed(e){var t;const o=e.detail.value;!this.hass||""===o||o===this.value||void 0===this.value&&o===w||(this.value=o===w?void 0:o,(0,r.r)(this,"value-changed",{value:this.value}),(0,r.r)(this,"supported-languages-changed",{value:null===(t=this._agents.find(e=>e.id===this.value))||void 0===t?void 0:t.supported_languages}))}constructor(...e){super(...e),this.disabled=!1,this.required=!1,this._debouncedUpdateAgents=(0,s.s)(()=>this._updateAgents(),500)}}$.styles=(0,i.AH)(y||(y=v`:host{display:flex;align-items:center}ha-select{width:100%}ha-icon-button{color:var(--secondary-text-color)}`)),(0,n.Cg)([(0,a.MZ)()],$.prototype,"value",void 0),(0,n.Cg)([(0,a.MZ)()],$.prototype,"language",void 0),(0,n.Cg)([(0,a.MZ)()],$.prototype,"label",void 0),(0,n.Cg)([(0,a.MZ)({attribute:!1})],$.prototype,"hass",void 0),(0,n.Cg)([(0,a.MZ)({type:Boolean,reflect:!0})],$.prototype,"disabled",void 0),(0,n.Cg)([(0,a.MZ)({type:Boolean})],$.prototype,"required",void 0),(0,n.Cg)([(0,a.wk)()],$.prototype,"_agents",void 0),(0,n.Cg)([(0,a.wk)()],$.prototype,"_configEntry",void 0),(0,n.Cg)([(0,a.wk)()],$.prototype,"_subConfigEntry",void 0),$=(0,n.Cg)([(0,a.EM)("ha-conversation-agent-picker")],$),t()}catch(m){t(m)}})},70947:function(e,t,o){o(62953);var n=o(40445),i=o(50759),a=(o(38625),o(5124)),r=o(67576);o(67094);let s,c,l=e=>e;class d extends i.A{renderCheckboxIcon(){return(0,a.qy)(s||(s=l` <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[i.A.styles,(0,a.AH)(c||(c=l`: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(...e){super(...e),this.selected=!1}}(0,n.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],d.prototype,"selected",void 0),d=(0,n.Cg)([(0,r.EM)("ha-dropdown-item")],d)},29823:function(e,t,o){o.a(e,async function(e,t){try{o(3362),o(62953);var n=o(40445),i=o(52254),a=o(5124),r=o(67576),s=e([i]);i=(s.then?(await s)():s)[0];let c,l=e=>e;class d extends i.A{get anchorElement(){var e;return null===(e=this.popup)||void 0===e?void 0:e.anchor}set anchorElement(e){this.popup&&(this.popup.anchor&&"ha-icon-button"===this.popup.anchor.localName&&(this.popup.anchor.selected=!1),this.popup.anchor=e)}getTrigger(){return this.anchorElement?this.anchorElement:super.getTrigger()}async showMenu(){await super.showMenu();const e=this.getTrigger();e&&"ha-icon-button"===e.localName&&(e.selected=!0)}async hideMenu(){const e=this.getTrigger();e&&"ha-icon-button"===e.localName&&(e.selected=!1),await super.hideMenu()}static get styles(){return[i.A.styles,(0,a.AH)(c||(c=l`: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(...e){super(...e),this.dropdownTag="ha-dropdown",this.dropdownItemTag="ha-dropdown-item"}}(0,n.Cg)([(0,r.MZ)({attribute:!1})],d.prototype,"dropdownTag",void 0),(0,n.Cg)([(0,r.MZ)({attribute:!1})],d.prototype,"dropdownItemTag",void 0),d=(0,n.Cg)([(0,r.EM)("ha-dropdown")],d),t()}catch(c){t(c)}})},47680:function(e,t,o){o.r(t),o.d(t,{HaIcon:function(){return z}});o(74423),o(3362),o(62953);var n=o(40445),i=o(5124),a=o(67576),r=o(1087),s=o(9899),c=o(700),l=(o(44114),o(18111),o(7588),o(96167),o(95192)),d=o(7553);const p=JSON.parse('{"version":"7.4.47","parts":[{"file":"7a7139d465f1f41cb26ab851a17caa21a9331234"},{"start":"account-supervisor-circle-","file":"9561286c4c1021d46b9006596812178190a7cc1c"},{"start":"alpha-r-c","file":"eb466b7087fb2b4d23376ea9bc86693c45c500fa"},{"start":"arrow-decision-o","file":"4b3c01b7e0723b702940c5ac46fb9e555646972b"},{"start":"baby-f","file":"2611401d85450b95ab448ad1d02c1a432b409ed2"},{"start":"battery-hi","file":"89bcd31855b34cd9d31ac693fb073277e74f1f6a"},{"start":"blur-r","file":"373709cd5d7e688c2addc9a6c5d26c2d57c02c48"},{"start":"briefcase-account-","file":"a75956cf812ee90ee4f656274426aafac81e1053"},{"start":"calendar-question-","file":"3253f2529b5ebdd110b411917bacfacb5b7063e6"},{"start":"car-lig","file":"74566af3501ad6ae58ad13a8b6921b3cc2ef879d"},{"start":"cellphone-co","file":"7677f1cfb2dd4f5562a2aa6d3ae43a2e6997b21a"},{"start":"circle-slice-2","file":"70d08c50ec4522dd75d11338db57846588263ee2"},{"start":"cloud-co","file":"141d2bfa55ca4c83f4bae2812a5da59a84fec4ff"},{"start":"cog-s","file":"5a640365f8e47c609005d5e098e0e8104286d120"},{"start":"cookie-l","file":"dd85b8eb8581b176d3acf75d1bd82e61ca1ba2fc"},{"start":"currency-eur-","file":"15362279f4ebfc3620ae55f79d2830ad86d5213e"},{"start":"delete-o","file":"239434ab8df61237277d7599ebe066c55806c274"},{"start":"draw-","file":"5605918a592070803ba2ad05a5aba06263da0d70"},{"start":"emoticon-po","file":"a838cfcec34323946237a9f18e66945f55260f78"},{"start":"fan","file":"effd56103b37a8c7f332e22de8e4d67a69b70db7"},{"start":"file-question-","file":"b2424b50bd465ae192593f1c3d086c5eec893af8"},{"start":"flask-off-","file":"3b76295cde006a18f0301dd98eed8c57e1d5a425"},{"start":"food-s","file":"1c6941474cbeb1755faaaf5771440577f4f1f9c6"},{"start":"gamepad-u","file":"c6efe18db6bc9654ae3540c7dee83218a5450263"},{"start":"google-f","file":"df341afe6ad4437457cf188499cb8d2df8ac7b9e"},{"start":"head-c","file":"282121c9e45ed67f033edcc1eafd279334c00f46"},{"start":"home-pl","file":"27e8e38fc7adcacf2a210802f27d841b49c8c508"},{"start":"inbox-","file":"0f0316ec7b1b7f7ce3eaabce26c9ef619b5a1694"},{"start":"key-v","file":"ea33462be7b953ff1eafc5dac2d166b210685a60"},{"start":"leaf-circle-","file":"33db9bbd66ce48a2db3e987fdbd37fb0482145a4"},{"start":"lock-p","file":"b89e27ed39e9d10c44259362a4b57f3c579d3ec8"},{"start":"message-s","file":"7b5ab5a5cadbe06e3113ec148f044aa701eac53a"},{"start":"moti","file":"01024d78c248d36805b565e343dd98033cc3bcaf"},{"start":"newspaper-variant-o","file":"22a6ec4a4fdd0a7c0acaf805f6127b38723c9189"},{"start":"on","file":"c73d55b412f394e64632e2011a59aa05e5a1f50d"},{"start":"paw-ou","file":"3f669bf26d16752dc4a9ea349492df93a13dcfbf"},{"start":"pigg","file":"0c24edb27eb1c90b6e33fc05f34ef3118fa94256"},{"start":"printer-pos-sy","file":"41a55cda866f90b99a64395c3bb18c14983dcf0a"},{"start":"read","file":"c7ed91552a3a64c9be88c85e807404cf705b7edf"},{"start":"robot-vacuum-variant-o","file":"917d2a35d7268c0ea9ad9ecab2778060e19d90e0"},{"start":"sees","file":"6e82d9861d8fac30102bafa212021b819f303bdb"},{"start":"shoe-f","file":"e2fe7ce02b5472301418cc90a0e631f187b9f238"},{"start":"snowflake-m","file":"a28ba9f5309090c8b49a27ca20ff582a944f6e71"},{"start":"st","file":"7e92d03f095ec27e137b708b879dfd273bd735ab"},{"start":"su","file":"61c74913720f9de59a379bdca37f1d2f0dc1f9db"},{"start":"tag-plus-","file":"8f3184156a4f38549cf4c4fffba73a6a941166ae"},{"start":"timer-a","file":"baab470d11cfb3a3cd3b063ee6503a77d12a80d0"},{"start":"transit-d","file":"8561c0d9b1ac03fab360fd8fe9729c96e8693239"},{"start":"vector-arrange-b","file":"c9a3439257d4bab33d3355f1f2e11842e8171141"},{"start":"water-ou","file":"02dbccfb8ca35f39b99f5a085b095fc1275005a0"},{"start":"webc","file":"57bafd4b97341f4f2ac20a609d023719f23a619c"},{"start":"zip","file":"65ae094e8263236fa50486584a08c03497a38d93"}]}');let h;const u=()=>(h||(h=f().catch(e=>{throw h=void 0,e})),h),f=async()=>{const e=(0,l.y$)("hass-icon-db","mdi-icon-store"),t=await(0,l.Jt)("_version",e);return t?t!==p.version&&(await(0,l.IU)(e),(0,l.hZ)("_version",p.version,e)):(0,l.hZ)("_version",p.version,e),e},g=["mdi","hass","hassio","hademo"];let m=[];o(67094);let b,y,v,_=e=>e;const w={},$={},C=(0,s.s)(()=>(async e=>{const t=Object.keys(e),o=await Promise.allSettled(Object.values(e));(await u())("readwrite",n=>{o.forEach((o,i)=>{"fulfilled"===o.status&&Object.entries(o.value).forEach(([e,t])=>{n.put(t,e)}),delete e[t[i]]})})})($),2e3),k={},x={"home-assistant":()=>o.e(58781).then(o.bind(o,53580)).then(e=>e.mdiHomeAssistant),"music-assistant":()=>o.e(56009).then(o.bind(o,10576)).then(e=>e.mdiMusicAssistant),esphome:()=>o.e(88800).then(o.bind(o,45091)).then(e=>e.mdiEsphomeLogo)};class z extends i.WF{willUpdate(e){super.willUpdate(e),e.has("icon")&&(this._path=void 0,this._secondaryPath=void 0,this._viewBox=void 0,this._loadIcon())}render(){return this.icon?this._legacy?(0,i.qy)(b||(b=_` <iron-icon .icon="${0}"></iron-icon>`),this.icon):(0,i.qy)(y||(y=_`<ha-svg-icon .path="${0}" .secondaryPath="${0}" .viewBox="${0}"></ha-svg-icon>`),this._path,this._secondaryPath,this._viewBox):i.s6}async _loadIcon(){if(!this.icon)return;const e=this.icon,[t,o]=this.icon.split(":",2);let n,i=o;if(!t||!i)return;if(!g.includes(t)){const o=c.y[t];return o?void(o&&"function"==typeof o.getIcon&&this._setCustomPath(o.getIcon(i),e)):void(this._legacy=!0)}if(this._legacy=!1,i in w){const e=w[i];let o;e.newName?(o=`Icon ${t}:${i} was renamed to ${t}:${e.newName}, please change your config, it will be removed in version ${e.removeIn}.`,i=e.newName):o=`Icon ${t}:${i} was removed from MDI, please replace this icon with an other icon in your config, it will be removed in version ${e.removeIn}.`,console.warn(o),(0,r.r)(this,"write_log",{level:"warning",message:o})}if(i in k)return void(this._path=k[i]);if(i in x){const t=await x[i]();return this.icon===e&&(this._path=t),void(k[i]=t)}try{n=await(e=>new Promise((t,o)=>{if(m.push([e,t,o]),m.length>1)return;const n=u();(0,d.h)(1e3,(async()=>{(await n)("readonly",e=>{for(const[t,o,n]of m)(0,l.Yd)(e.get(t)).then(e=>o(e)).catch(e=>n(e));m=[]})})()).catch(e=>{for(const[,,t]of m)t(e);m=[]})}))(i)}catch(h){n=void 0}if(n)return this.icon===e&&(this._path=n),void(k[i]=n);const a=(e=>{let t;for(const o of p.parts){if(void 0!==o.start&&e<o.start)break;t=o}return t.file})(i);if(a in $)return void this._setPath($[a],i,e);const s=fetch(`/static/mdi/${a}.json`).then(e=>e.json());$[a]=s,this._setPath(s,i,e),s.catch(()=>{delete $[a]}),C()}async _setCustomPath(e,t){const o=await e;this.icon===t&&(this._path=o.path,this._secondaryPath=o.secondaryPath,this._viewBox=o.viewBox)}async _setPath(e,t,o){try{const n=await e;this.icon===o&&(this._path=n[t]),k[t]=n[t]}catch(n){}}constructor(...e){super(...e),this._legacy=!1}}z.styles=(0,i.AH)(v||(v=_`:host{fill:currentcolor}`)),(0,n.Cg)([(0,a.MZ)()],z.prototype,"icon",void 0),(0,n.Cg)([(0,a.wk)()],z.prototype,"_path",void 0),(0,n.Cg)([(0,a.wk)()],z.prototype,"_secondaryPath",void 0),(0,n.Cg)([(0,a.wk)()],z.prototype,"_viewBox",void 0),(0,n.Cg)([(0,a.wk)()],z.prototype,"_legacy",void 0),z=(0,n.Cg)([(0,a.EM)("ha-icon")],z)},3449:function(e,t,o){o(62953);var n=o(40445),i=o(5124),a=o(67576);let r,s,c=e=>e;class l extends i.WF{render(){return(0,i.qy)(r||(r=c`<slot></slot>`))}constructor(...e){super(...e),this.disabled=!1}}l.styles=(0,i.AH)(s||(s=c`: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,n.Cg)([(0,a.MZ)({type:Boolean,reflect:!0})],l.prototype,"disabled",void 0),l=(0,n.Cg)([(0,a.EM)("ha-input-helper-text")],l)},2846:function(e,t,o){o.d(t,{G:function(){return h},J:function(){return p}});var n=o(40445),i=o(58168),a=o(82553),r=o(5124),s=o(67576);o(54276);let c,l,d=e=>e;const p=[a.R,(0,r.AH)(c||(c=d`:host{--ha-icon-display:block;--md-sys-color-primary:var(--primary-text-color);--md-sys-color-secondary:var(--secondary-text-color);--md-sys-color-surface:var(--card-background-color);--md-sys-color-on-surface:var(--primary-text-color);--md-sys-color-on-surface-variant:var(--secondary-text-color)}md-item{overflow:var(--md-item-overflow,hidden);align-items:var(--md-item-align-items,center);gap:var(--ha-md-list-item-gap,16px)}`))];class h extends i.n{renderRipple(){return"text"===this.type?r.s6:(0,r.qy)(l||(l=d`<ha-ripple part="ripple" for="item" ?disabled="${0}"></ha-ripple>`),this.disabled&&"link"!==this.type)}}h.styles=p,h=(0,n.Cg)([(0,s.EM)("ha-md-list-item")],h)},88285:function(e,t,o){o.a(e,async function(e,t){try{o(3362),o(62953);var n=o(40445),i=o(35211),a=o(5124),r=o(67576),s=o(63672),c=o(1087),l=o(22792),d=o(17894),p=(o(75064),o(47680),o(26300)),h=e([p]);p=(h.then?(await h)():h)[0];let u,f,g,m,b,y,v,_,w,$,C=e=>e;const k="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",x="M7,10L12,15L17,10H7Z";class z extends((0,d.c)(a.WF)){async focus(){var e;await this.updateComplete,await(null===(e=this.item)||void 0===e?void 0:e.focus())}render(){var e,t,o,n;const i=!!this.value,r=!(!this.value||this.required||this.disabled||this.hideClearIcon),c=null!==(e=this.placeholder)&&void 0!==e?e:this.label,l=this.label&&i?(0,a.qy)(u||(u=C`<span slot="overline">${0}${0}</span>`),this.label,this.required?" *":""):a.s6,d=i?this.valueRenderer?this.valueRenderer(null!==(t=this.value)&&void 0!==t?t:""):(0,a.qy)(f||(f=C`<span slot="headline">${0}</span>`),this.value):c?(0,a.qy)(g||(g=C`<span slot="headline" class="placeholder"> ${0}${0} </span>`),c,this.required?" *":""):a.s6;return(0,a.qy)(m||(m=C` <ha-combo-box-item aria-label="${0}" .disabled="${0}" type="button" compact="compact"> ${0} ${0}${0} ${0} ${0} <ha-svg-icon class="arrow" slot="end" .path="${0}"></ha-svg-icon> </ha-combo-box-item> `),(0,s.J)(this.label||this.placeholder),this.disabled,this.image?(0,a.qy)(b||(b=C`<img alt="${0}" slot="start" .src="${0}" crossorigin="anonymous" referrerpolicy="no-referrer">`),null!==(o=this.label)&&void 0!==o?o:"",this.image):this.icon?(0,a.qy)(y||(y=C`<ha-icon slot="start" .icon="${0}"></ha-icon>`),this.icon):(0,a.qy)(v||(v=C`<slot name="start"></slot>`)),l,d,this.unknown?(0,a.qy)(_||(_=C`<div slot="supporting-text" class="unknown"> ${0} </div>`),this.unknownItemText||(null===(n=this._i18n)||void 0===n?void 0:n.localize("ui.components.combo-box.unknown_item"))):a.s6,r?(0,a.qy)(w||(w=C` <ha-icon-button class="clear" slot="end" @click="${0}" .path="${0}"></ha-icon-button> `),this._clear,k):a.s6,x)}_clear(e){e.stopPropagation(),(0,c.r)(this,"clear")}static get styles(){return[(0,a.AH)($||($=C`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,n.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],z.prototype,"invalid",void 0),(0,n.Cg)([(0,r.P)("ha-combo-box-item",!0)],z.prototype,"item",void 0),(0,n.Cg)([(0,r.wk)(),(0,i.Fg)({context:l.D5,subscribe:!0})],z.prototype,"_i18n",void 0),z=(0,n.Cg)([(0,r.EM)("ha-picker-field")],z),t()}catch(u){t(u)}})},54276:function(e,t,o){o(62953);var n=o(40445),i=o(76482),a=o(91382),r=o(96245),s=o(5124),c=o(67576);let l;class d extends a.n{attach(e){super.attach(e),this.attachableTouchController.attach(e)}disconnectedCallback(){super.disconnectedCallback(),this.hovered=!1,this.pressed=!1}detach(){super.detach(),this.attachableTouchController.detach()}_onTouchControlChange(e,t){null==e||e.removeEventListener("touchend",this._handleTouchEnd),null==t||t.addEventListener("touchend",this._handleTouchEnd)}constructor(...e){super(...e),this.attachableTouchController=new i.i(this,this._onTouchControlChange.bind(this)),this._handleTouchEnd=()=>{this.disabled||super.endPressAnimation()}}}d.styles=[r.R,(0,s.AH)(l||(l=(e=>e)`: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))
)}`))],d=(0,n.Cg)([(0,c.EM)("ha-ripple")],d)},606:function(e,t,o){o.a(e,async function(e,t){try{o(74423),o(18111),o(61701),o(62953);var n=o(40445),i=o(5124),a=o(67576),r=o(63672),s=o(22786),c=o(1087),l=o(29823),d=(o(70947),o(3449),o(88285)),p=(o(67094),e([l,d]));[l,d]=p.then?(await p)():p;let h,u,f,g,m,b,y,v,_,w=e=>e;class $ extends i.WF{render(){return this.disabled?(0,i.qy)(h||(h=w`${0}${0}`),this._renderField(),this._renderHelper()):(0,i.qy)(u||(u=w` <ha-dropdown placement="bottom" @wa-select="${0}" @wa-show="${0}" @wa-hide="${0}"> ${0} ${0} </ha-dropdown> ${0} `),this._handleSelect,this._handleShow,this._handleHide,this._renderField(),this.options?this.options.map(e=>{var t;const o=["string","number"].includes(typeof e);return(0,i.qy)(f||(f=w` <ha-dropdown-item .value="${0}" .disabled="${0}" .selected="${0}"> ${0} <div class="content"> ${0} ${0} </div> </ha-dropdown-item> `),o?e:e.value,!o&&(null!==(t=e.disabled)&&void 0!==t&&t),this.value===(o?e:e.value),e.iconPath?(0,i.qy)(g||(g=w`<ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon>`),e.iconPath):i.s6,o?e:e.label||e.value,e.secondary?(0,i.qy)(m||(m=w`<div class="secondary">${0}</div>`),e.secondary):i.s6)}):(0,i.qy)(b||(b=w`<slot></slot>`)),this._renderHelper())}_renderField(){const e=this._getValueLabel(this.options,this.value);return(0,i.qy)(y||(y=w` <ha-picker-field slot="trigger" type="button" class="${0}" compact="compact" aria-label="${0}" @clear="${0}" .label="${0}" .value="${0}" .required="${0}" .disabled="${0}" .hideClearIcon="${0}"> </ha-picker-field> `),this._opened?"opened":"",(0,r.J)(this.label),this._clearValue,this.label,e,this.required,this.disabled,!this.clearable||this.required||this.disabled||!String(this.value))}_renderHelper(){return this.helper?(0,i.qy)(v||(v=w`<ha-input-helper-text .disabled="${0}">${0}</ha-input-helper-text>`),this.disabled,this.helper):i.s6}_handleSelect(e){e.stopPropagation();const t=e.detail.item.value;t!==this.value&&(0,c.r)(this,"selected",{value:t})}_clearValue(){!this.disabled&&this.value&&(0,c.r)(this,"selected",{value:void 0})}_handleShow(){this.style.setProperty("--select-menu-width",`${this._triggerField.offsetWidth}px`),this._opened=!0}_handleHide(){this._opened=!1}constructor(...e){super(...e),this.clearable=!1,this.required=!1,this.disabled=!1,this._opened=!1,this._getValueLabel=(0,s.A)((e,t)=>{const o=void 0!==t?String(t):void 0;if(!e||!o)return o;for(const n of e){const e=["string","number"].includes(typeof n);if(e&&n===o||!e&&String(n.value)===o)return e?n:n.label||n.value}return o})}}$.styles=(0,i.AH)(_||(_=w`:host{position:relative}ha-picker-field.opened{--mdc-text-field-idle-line-color:var(--primary-color)}ha-dropdown-item .content{display:flex;gap:var(--ha-space-1);flex-direction:column}ha-dropdown-item .secondary{font-size:var(--ha-font-size-s);color:var(--ha-color-text-secondary)}ha-dropdown::part(menu){min-width:var(--select-menu-width)}ha-input-helper-text{display:block;margin:var(--ha-space-2) 0 0}`)),(0,n.Cg)([(0,a.MZ)({type:Boolean})],$.prototype,"clearable",void 0),(0,n.Cg)([(0,a.MZ)({attribute:!1})],$.prototype,"options",void 0),(0,n.Cg)([(0,a.MZ)()],$.prototype,"label",void 0),(0,n.Cg)([(0,a.MZ)()],$.prototype,"helper",void 0),(0,n.Cg)([(0,a.MZ)()],$.prototype,"value",void 0),(0,n.Cg)([(0,a.MZ)({type:Boolean})],$.prototype,"required",void 0),(0,n.Cg)([(0,a.MZ)({type:Boolean})],$.prototype,"disabled",void 0),(0,n.Cg)([(0,a.wk)()],$.prototype,"_opened",void 0),(0,n.Cg)([(0,a.P)("ha-picker-field")],$.prototype,"_triggerField",void 0),$=(0,n.Cg)([(0,a.EM)("ha-select")],$),t()}catch(h){t(h)}})},94215:function(e,t,o){o.a(e,async function(e,n){try{o.r(t),o.d(t,{HaConversationAgentSelector:function(){return h}});o(62953);var i=o(40445),a=o(5124),r=o(67576),s=o(82432),c=e([s]);s=(c.then?(await c)():c)[0];let l,d,p=e=>e;class h extends a.WF{render(){var e,t;return(0,a.qy)(l||(l=p`<ha-conversation-agent-picker .hass="${0}" .value="${0}" .language="${0}" .label="${0}" .helper="${0}" .disabled="${0}" .required="${0}"></ha-conversation-agent-picker>`),this.hass,this.value,(null===(e=this.selector.conversation_agent)||void 0===e?void 0:e.language)||(null===(t=this.context)||void 0===t?void 0:t.language),this.label,this.helper,this.disabled,this.required)}constructor(...e){super(...e),this.disabled=!1,this.required=!0}}h.styles=(0,a.AH)(d||(d=p`ha-conversation-agent-picker{width:100%}`)),(0,i.Cg)([(0,r.MZ)({attribute:!1})],h.prototype,"hass",void 0),(0,i.Cg)([(0,r.MZ)({attribute:!1})],h.prototype,"selector",void 0),(0,i.Cg)([(0,r.MZ)()],h.prototype,"value",void 0),(0,i.Cg)([(0,r.MZ)()],h.prototype,"label",void 0),(0,i.Cg)([(0,r.MZ)()],h.prototype,"helper",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean})],h.prototype,"disabled",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean})],h.prototype,"required",void 0),(0,i.Cg)([(0,r.MZ)({attribute:!1})],h.prototype,"context",void 0),h=(0,i.Cg)([(0,r.EM)("ha-selector-conversation_agent")],h),n()}catch(l){n(l)}})},77423:function(e,t,o){o.d(t,{A:function(){return i},Cm:function(){return a},Fs:function(){return b},JW:function(){return m},TC:function(){return c},VN:function(){return l},Vx:function(){return d},XQ:function(){return f},eM:function(){return h},iH:function(){return p},k3:function(){return g},m4:function(){return r},qf:function(){return s},t0:function(){return n},yv:function(){return u}});o(44114),o(18111),o(22489),o(20116),o(7588),o(61701),o(62953);const n=(e,t)=>e.callWS({type:"config_entries/subentries/list",entry_id:t}),i=(e,t,o,n)=>e.callWS(Object.assign({type:"config_entries/subentries/update",entry_id:t,subentry_id:o},n)),a=(e,t,o)=>e.callWS({type:"config_entries/subentries/delete",entry_id:t,subentry_id:o}),r=66649!=o.j?["migration_error","setup_error","setup_retry"]:null,s=66649!=o.j?["not_loaded","loaded","setup_error","setup_retry"]:null,c=(e,t,o)=>{const n={type:"config_entries/subscribe"};return o&&o.type&&(n.type_filter=o.type),e.connection.subscribeMessage(e=>{t(e)},n)},l=(e,t)=>{const o={};return t&&(t.type&&(o.type_filter=t.type),t.domain&&(o.domain=t.domain)),e.callWS(Object.assign({type:"config_entries/get"},o))},d=(e,t)=>e.callWS({type:"config_entries/get_single",entry_id:t}),p=(e,t,o)=>e.callWS(Object.assign({type:"config_entries/update",entry_id:t},o)),h=(e,t)=>e.callApi("DELETE",`config/config_entries/entry/${t}`),u=(e,t)=>e.callApi("POST",`config/config_entries/entry/${t}/reload`),f=(e,t)=>e.callWS({type:"config_entries/disable",entry_id:t,disabled_by:"user"}),g=(e,t)=>e.callWS({type:"config_entries/disable",entry_id:t,disabled_by:null}),m=(e,t)=>{if(!t)return e;const o=e.find(e=>e.entry_id===t);if(!o)return e;return[o,...e.filter(e=>e.entry_id!==t)]};class b{processMessage(e){return e.forEach(e=>{if(null!==e.type&&"added"!==e.type)if("removed"!==e.type){if("updated"===e.type){const t=e.entry;this._entries=this._entries.map(e=>e.entry_id===t.entry_id?t:e)}}else this._entries=this._entries.filter(t=>t.entry_id!==e.entry.entry_id);else this._entries.push(e.entry)}),this._entries}constructor(){this._entries=[]}}},88433:function(e,t,o){if(o.d(t,{RW:function(){return r},ZE:function(){return i},e1:function(){return s},vc:function(){return a}}),66649!=o.j)var n=o(44537);var i=function(e){return e[e.CONTROL=1]="CONTROL",e}({});const a=(e,t,o)=>e.callWS({type:"conversation/agent/list",language:t,country:o}),r=(e,t,o,i)=>e.callWS({type:"conversation/agent/homeassistant/debug",sentences:(0,n.e)(t),language:o,device_id:i}),s=(e,t,o)=>e.callWS({type:"conversation/agent/homeassistant/language_scores",language:t,country:o})},700:function(e,t,o){o.d(t,{y:function(){return r}});const n=window;"customIconsets"in n||(n.customIconsets={});const i=n.customIconsets,a=window;"customIcons"in a||(a.customIcons={});const r=new Proxy(a.customIcons,{get:(e,t)=>{var o;return null!==(o=e[t])&&void 0!==o?o:i[t]?{getIcon:i[t]}:void 0}})},59241:function(e,t,o){o.d(t,{BM:function(){return S},Bz:function(){return k},DW:function(){return g},Er:function(){return f},G3:function(){return y},G_:function(){return v},Ox:function(){return z},P9:function(){return E},RP:function(){return $},bg:function(){return _},fs:function(){return p},jh:function(){return m},n4:function(){return x},oY:function(){return d},v:function(){return b},z0:function(){return h}});o(74423),o(26910),o(18111),o(22489),o(20116),o(62953);var n=o(90889),i=o(22786),a=o(71727),r=o(28978),s=o(52220),c=o(9899);const l=66649!=o.j?["light","cover","valve"]:null,d=e=>l.includes(e),p=e=>null==e||e.length>0,h=e=>null!=e,u=["sensor","binary_sensor"],f=(e,t)=>{const o=t.filter(t=>e.states[t.entity_id]&&"battery"===e.states[t.entity_id].attributes.device_class&&u.includes((0,a.m)(t.entity_id))).sort((e,t)=>u.indexOf((0,a.m)(e.entity_id))-u.indexOf((0,a.m)(t.entity_id)));if(o.length>0)return o[0]},g=(e,t)=>t.find(t=>e.states[t.entity_id]&&"battery_charging"===e.states[t.entity_id].attributes.device_class),m=(e,t)=>{if(t.name)return t.name;const o=e.states[t.entity_id];return o?(0,r.u)(o):t.original_name?t.original_name:t.entity_id},b=(e,t)=>e.callWS({type:"config/entity_registry/get",entity_id:t}),y=(e,t)=>e.callWS({type:"config/entity_registry/get_entries",entity_ids:t}),v=(e,t,o)=>e.callWS(Object.assign({type:"config/entity_registry/update",entity_id:t},o)),_=(e,t)=>e.callWS({type:"config/entity_registry/remove",entity_id:t}),w=e=>e.sendMessagePromise({type:"config/entity_registry/list"}),$=e=>e.sendMessagePromise({type:"config/entity_registry/list_for_display"}),C=(e,t)=>e.subscribeEvents((0,c.s)(()=>w(e).then(e=>t.setState(e,!0)),500,!0),"entity_registry_updated"),k=(e,t)=>(0,n.N)("_entityRegistry",w,C,e,t),x=(e,t)=>e.sort((e,o)=>(0,s.SH)(e.name||"",o.name||"",t)),z=(0,i.A)(e=>{const t={};for(const o of e)t[o.entity_id]=o;return t}),E=(0,i.A)(e=>{const t={};for(const o of e)t[o.id]=o;return t}),S=(e,t)=>e.callWS({type:"config/entity_registry/get_automatic_entity_ids",entity_ids:t})},95350:function(e,t,o){o.d(t,{$h:function(){return h},FP:function(){return m},Og:function(){return a},QC:function(){return p},QQ:function(){return s},S1:function(){return r},Ud:function(){return b},fK:function(){return l},l7:function(){return d},nQ:function(){return f},p$:function(){return c}});o(3362),o(62953);if(66649!=o.j)var n=o(90889);var i=o(9899);const a=66649!=o.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 r=66649!=o.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 s=(e,t)=>t.issue_tracker||`https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+${e}%22`,c=(e,t,o)=>e(`component.${t}.title`)||(null==o?void 0:o.name)||t,l=(e,t)=>{const o={type:"manifest/list"};return t&&(o.integrations=t),e.callWS(o)},d=async(e,t)=>{const o=await e.sendMessagePromise({type:"manifest/list"}),n={};for(const i of o)n[i.domain]=i;return t(n),()=>{}},p=(e,t)=>e.callWS({type:"manifest/get",integration:t}),h=e=>e.callWS({type:"integration/setup_info"}),u=e=>e.sendMessagePromise({type:"logger/log_info"}),f=(e,t,o,n)=>e.callWS({type:"logger/integration_log_level",integration:t,level:o,persistence:n}),g=(e,t)=>e.subscribeEvents((0,i.s)(()=>u(e).then(e=>t.setState(e,!0)),200,!0),"logging_changed"),m=(e,t)=>(0,n.N)("_integration_log_info",u,g,e,t),b=(e,t)=>e.callWS({type:"integration/wait",domain:t})},7749:function(e,t,o){o.d(t,{HH:function(){return n},TY:function(){return i},lu:function(){return a},mu:function(){return r}});const n=(e,t)=>e.callApi("POST","config/config_entries/options/flow",{handler:t}),i=(e,t)=>e.callApi("GET",`config/config_entries/options/flow/${t}`),a=(e,t,o)=>e.callApi("POST",`config/config_entries/options/flow/${t}`,o),r=(e,t)=>e.callApi("DELETE",`config/config_entries/options/flow/${t}`)},29094:function(e,t,o){o.d(t,{g:function(){return a}});o(3362),o(62953);var n=o(1087);const i=()=>Promise.all([o.e(72850),o.e(39763),o.e(32450),o.e(46095),o.e(7305),o.e(92769),o.e(3283),o.e(80131),o.e(98470),o.e(54066),o.e(84038),o.e(62364),o.e(62574),o.e(26092),o.e(39005),o.e(28501),o.e(29792)]).then(o.bind(o,78314)),a=(e,t,o)=>{(0,n.r)(e,"show-dialog",{dialogTag:"dialog-data-entry-flow",dialogImport:i,dialogParams:Object.assign(Object.assign({},t),{},{flowConfig:o,dialogParentElement:e})})}},70241:function(e,t,o){o.d(t,{Q:function(){return f}});o(3362),o(62953);var n=o(5124),i=o(95350),a=o(7749),r=o(29094);let s,c,l,d,p,h,u=e=>e;const f=(e,t,o)=>(0,r.g)(e,Object.assign({startFlowHandler:t.entry_id,domain:t.domain},o),{flowType:"options_flow",showDevices:!1,createFlow:async(e,o)=>{const[n]=await Promise.all([(0,a.HH)(e,o),e.loadFragmentTranslation("config"),e.loadBackendTranslation("options",t.domain),e.loadBackendTranslation("selector",t.domain)]);return n},fetchFlow:async(e,o)=>{const[n]=await Promise.all([(0,a.TY)(e,o),e.loadFragmentTranslation("config"),e.loadBackendTranslation("options",t.domain),e.loadBackendTranslation("selector",t.domain)]);return n},handleFlowStep:a.lu,deleteFlow:a.mu,renderAbortDescription(e,o){const i=e.localize(`component.${o.translation_domain||t.domain}.options.abort.${o.reason}`,o.description_placeholders);return i?(0,n.qy)(s||(s=u` <ha-markdown breaks allow-svg .content="${0}"></ha-markdown> `),i):o.reason},renderShowFormStepHeader(e,o){return e.localize(`component.${o.translation_domain||t.domain}.options.step.${o.step_id}.title`,o.description_placeholders)||e.localize("ui.dialogs.options_flow.form.header")},renderShowFormStepDescription(e,o){const i=e.localize(`component.${o.translation_domain||t.domain}.options.step.${o.step_id}.description`,o.description_placeholders);return i?(0,n.qy)(c||(c=u` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),i):""},renderShowFormStepFieldLabel(e,o,n,i){var a;if("expandable"===n.type)return e.localize(`component.${t.domain}.options.step.${o.step_id}.sections.${n.name}.name`,o.description_placeholders)||n.name;const r=null!=i&&null!==(a=i.path)&&void 0!==a&&a[0]?`sections.${i.path[0]}.`:"";return e.localize(`component.${t.domain}.options.step.${o.step_id}.${r}data.${n.name}`,o.description_placeholders)||n.name},renderShowFormStepFieldHelper(e,o,i,a){var r;if("expandable"===i.type)return e.localize(`component.${o.translation_domain||t.domain}.options.step.${o.step_id}.sections.${i.name}.description`,o.description_placeholders);const s=null!=a&&null!==(r=a.path)&&void 0!==r&&r[0]?`sections.${a.path[0]}.`:"",c=e.localize(`component.${o.translation_domain||t.domain}.options.step.${o.step_id}.${s}data_description.${i.name}`,o.description_placeholders);return c?(0,n.qy)(l||(l=u`<ha-markdown breaks .content="${0}"></ha-markdown>`),c):""},renderShowFormStepFieldError(e,o,n){return e.localize(`component.${o.translation_domain||t.domain}.options.error.${n}`,o.description_placeholders)||n},renderShowFormStepFieldLocalizeValue(e,o,n){return e.localize(`component.${t.domain}.selector.${n}`)},renderShowFormStepSubmitButton(e,o){return e.localize(`component.${t.domain}.options.step.${o.step_id}.submit`)||e.localize("ui.panel.config.integrations.config_flow."+(!1===o.last_step?"next":"submit"))},renderExternalStepHeader(e,t){return""},renderExternalStepDescription(e,t){return""},renderCreateEntryDescription(e,t){return(0,n.qy)(d||(d=u` <p>${0}</p> `),e.localize("ui.dialogs.options_flow.success.description"))},renderShowFormProgressHeader(e,o){return e.localize(`component.${t.domain}.options.step.${o.step_id}.title`)||e.localize(`component.${t.domain}.title`)},renderShowFormProgressDescription(e,o){const i=e.localize(`component.${o.translation_domain||t.domain}.options.progress.${o.progress_action}`,o.description_placeholders);return i?(0,n.qy)(p||(p=u` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),i):""},renderMenuHeader(e,o){return e.localize(`component.${t.domain}.options.step.${o.step_id}.title`)||e.localize(`component.${t.domain}.title`)},renderMenuDescription(e,o){const i=e.localize(`component.${o.translation_domain||t.domain}.options.step.${o.step_id}.description`,o.description_placeholders);return i?(0,n.qy)(h||(h=u` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),i):""},renderMenuOption(e,o,n){return e.localize(`component.${o.translation_domain||t.domain}.options.step.${o.step_id}.menu_options.${n}`,o.description_placeholders)},renderMenuOptionDescription(e,o,n){return e.localize(`component.${o.translation_domain||t.domain}.options.step.${o.step_id}.menu_option_descriptions.${n}`,o.description_placeholders)},renderLoadingDescription(e,o){return e.localize(`component.${t.domain}.options.loading`)||("loading_flow"===o||"loading_step"===o?e.localize(`ui.dialogs.options_flow.loading.${o}`,{integration:(0,i.p$)(e.localize,t.domain)}):"")}})},26401:function(e,t,o){o.d(t,{a:function(){return _}});o(89463),o(3362),o(62953);var n=o(5124),i=o(95350);const a={"HA-Frontend-Base":`${location.protocol}//${location.host}`},r=(e,t,o,n)=>e.callApi("POST","config/config_entries/subentries/flow",{handler:[t,o],subentry_id:n},a),s=(e,t,o)=>e.callApi("POST",`config/config_entries/subentries/flow/${t}`,o,a),c=(e,t)=>e.callApi("DELETE",`config/config_entries/subentries/flow/${t}`);var l=o(29094);let d,p,h,u,f,g,m,b,y,v=e=>e;const _=(e,t,o,_)=>(0,l.g)(e,_,{flowType:"config_subentries_flow",showDevices:!0,createFlow:async(e,n)=>{const[i]=await Promise.all([r(e,n,o,_.subEntryId),e.loadFragmentTranslation("config"),e.loadBackendTranslation("config_subentries",t.domain),e.loadBackendTranslation("selector",t.domain),e.loadBackendTranslation("title",t.domain)]);return i},fetchFlow:async(e,n)=>{const i=await((e,t)=>e.callApi("GET",`config/config_entries/subentries/flow/${t}`,void 0,a))(e,n);return o=i.handler[1],await e.loadFragmentTranslation("config"),await e.loadBackendTranslation("config_subentries",t.domain),await e.loadBackendTranslation("selector",t.domain),i},handleFlowStep:s,deleteFlow:c,renderAbortDescription(e,i){const a=e.localize(`component.${i.translation_domain||t.domain}.config_subentries.${o}.abort.${i.reason}`,i.description_placeholders);return a?(0,n.qy)(d||(d=v` <ha-markdown allowsvg breaks .content="${0}"></ha-markdown> `),a):i.reason},renderShowFormStepHeader(e,n){return e.localize(`component.${n.translation_domain||t.domain}.config_subentries.${o}.step.${n.step_id}.title`,n.description_placeholders)||e.localize(`component.${t.domain}.title`)},renderShowFormStepDescription(e,i){const a=e.localize(`component.${i.translation_domain||t.domain}.config_subentries.${o}.step.${i.step_id}.description`,i.description_placeholders);return a?(0,n.qy)(p||(p=v` <ha-markdown allowsvg breaks .content="${0}"></ha-markdown> `),a):""},renderShowFormStepFieldLabel(e,n,i,a){var r;if("expandable"===i.type)return e.localize(`component.${t.domain}.config_subentries.${o}.step.${n.step_id}.sections.${i.name}.name`,n.description_placeholders)||i.name;const s=null!=a&&null!==(r=a.path)&&void 0!==r&&r[0]?`sections.${a.path[0]}.`:"";return e.localize(`component.${t.domain}.config_subentries.${o}.step.${n.step_id}.${s}data.${i.name}`,n.description_placeholders)||i.name},renderShowFormStepFieldHelper(e,i,a,r){var s;if("expandable"===a.type)return e.localize(`component.${i.translation_domain||t.domain}.config_subentries.${o}.step.${i.step_id}.sections.${a.name}.description`,i.description_placeholders);const c=null!=r&&null!==(s=r.path)&&void 0!==s&&s[0]?`sections.${r.path[0]}.`:"",l=e.localize(`component.${i.translation_domain||t.domain}.config_subentries.${o}.step.${i.step_id}.${c}data_description.${a.name}`,i.description_placeholders);return l?(0,n.qy)(h||(h=v`<ha-markdown breaks .content="${0}"></ha-markdown>`),l):""},renderShowFormStepFieldError(e,n,i){return e.localize(`component.${n.translation_domain||n.translation_domain||t.domain}.config_subentries.${o}.error.${i}`,n.description_placeholders)||i},renderShowFormStepFieldLocalizeValue(e,o,n){return e.localize(`component.${t.domain}.selector.${n}`)},renderShowFormStepSubmitButton(e,n){return e.localize(`component.${t.domain}.config_subentries.${o}.step.${n.step_id}.submit`)||e.localize("ui.panel.config.integrations.config_flow."+(!1===n.last_step?"next":"submit"))},renderExternalStepHeader(e,n){return e.localize(`component.${t.domain}.config_subentries.${o}.step.${n.step_id}.title`)||e.localize("ui.panel.config.integrations.config_flow.external_step.open_site")},renderExternalStepDescription(e,i){const a=e.localize(`component.${i.translation_domain||t.domain}.config_subentries.${o}.step.${i.step_id}.description`,i.description_placeholders);return(0,n.qy)(u||(u=v` <p> ${0} </p> ${0} `),e.localize("ui.panel.config.integrations.config_flow.external_step.description"),a?(0,n.qy)(f||(f=v` <ha-markdown allowsvg breaks .content="${0}"></ha-markdown> `),a):"")},renderCreateEntryDescription(e,i){const a=e.localize(`component.${i.translation_domain||t.domain}.config_subentries.${o}.create_entry.${i.description||"default"}`,i.description_placeholders);return(0,n.qy)(g||(g=v` ${0} `),a?(0,n.qy)(m||(m=v` <ha-markdown allowsvg breaks .content="${0}"></ha-markdown> `),a):n.s6)},renderShowFormProgressHeader(e,n){return e.localize(`component.${t.domain}.config_subentries.${o}.step.${n.step_id}.title`)||e.localize(`component.${t.domain}.title`)},renderShowFormProgressDescription(e,i){const a=e.localize(`component.${i.translation_domain||t.domain}.config_subentries.${o}.progress.${i.progress_action}`,i.description_placeholders);return a?(0,n.qy)(b||(b=v` <ha-markdown allowsvg breaks .content="${0}"></ha-markdown> `),a):""},renderMenuHeader(e,n){return e.localize(`component.${t.domain}.config_subentries.${o}.step.${n.step_id}.title`,n.description_placeholders)||e.localize(`component.${t.domain}.title`)},renderMenuDescription(e,i){const a=e.localize(`component.${i.translation_domain||t.domain}.config_subentries.${o}.step.${i.step_id}.description`,i.description_placeholders);return a?(0,n.qy)(y||(y=v` <ha-markdown allowsvg breaks .content="${0}"></ha-markdown> `),a):""},renderMenuOption(e,n,i){return e.localize(`component.${n.translation_domain||t.domain}.config_subentries.${o}.step.${n.step_id}.menu_options.${i}`,n.description_placeholders)},renderMenuOptionDescription(e,n,i){return e.localize(`component.${n.translation_domain||t.domain}.config_subentries.${o}.step.${n.step_id}.menu_option_descriptions.${i}`,n.description_placeholders)},renderLoadingDescription(e,t,o,n){if("loading_flow"!==t&&"loading_step"!==t)return"";const a=(null==n?void 0:n.handler)||o;return e.localize(`ui.panel.config.integrations.config_flow.loading.${t}`,{integration:a?(0,i.p$)(e.localize,a):e.localize("ui.panel.config.integrations.config_flow.loading.fallback_title")})}})},17894:function(e,t,o){o.d(t,{c:function(){return a}});o(62953);var n=o(40445),i=o(67576);const a=e=>{class t extends e{constructor(...e){super(...e),this.disabled=!1,this.required=!1,this.unknown=!1,this.hideClearIcon=!1}}return(0,n.Cg)([(0,i.MZ)({type:Boolean})],t.prototype,"disabled",void 0),(0,n.Cg)([(0,i.MZ)({type:Boolean})],t.prototype,"required",void 0),(0,n.Cg)([(0,i.MZ)()],t.prototype,"icon",void 0),(0,n.Cg)([(0,i.MZ)()],t.prototype,"image",void 0),(0,n.Cg)([(0,i.MZ)()],t.prototype,"label",void 0),(0,n.Cg)([(0,i.MZ)()],t.prototype,"placeholder",void 0),(0,n.Cg)([(0,i.MZ)()],t.prototype,"helper",void 0),(0,n.Cg)([(0,i.MZ)()],t.prototype,"value",void 0),(0,n.Cg)([(0,i.MZ)({type:Boolean,reflect:!0})],t.prototype,"unknown",void 0),(0,n.Cg)([(0,i.MZ)({attribute:"unknown-item-text"})],t.prototype,"unknownItemText",void 0),(0,n.Cg)([(0,i.MZ)({attribute:"hide-clear-icon",type:Boolean})],t.prototype,"hideClearIcon",void 0),(0,n.Cg)([(0,i.MZ)({attribute:!1})],t.prototype,"valueRenderer",void 0),t}},69235:function(e,t,o){o.a(e,async function(e,t){try{o(3362),o(62953);"function"!=typeof window.ResizeObserver&&(window.ResizeObserver=(await o.e(71055).then(o.bind(o,52370))).default),t()}catch(n){t(n)}},1)}}]);