iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
16 lines • 61.3 kB
JavaScript
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[81969],{69558:function(e,t,a){a.d(t,{_:function(){return s}});a(16280),a(18111),a(7588),a(62953);var i=a(5124),o=a(54495);const s=(0,o.u$)(class extends o.WL{update(e,[t,a]){return this._element&&this._element.localName===t?(a&&Object.entries(a).forEach(([e,t])=>{this._element[e]=t}),i.c0):this.render(t,a)}render(e,t){return this._element=document.createElement(e),t&&Object.entries(t).forEach(([e,t])=>{this._element[e]=t}),this._element}constructor(e){if(super(e),e.type!==o.OA.CHILD)throw new Error("dynamicElementDirective can only be used in content bindings")}})},69093:function(e,t,a){a.d(t,{t:function(){return o}});var i=a(71727);const o=e=>(0,i.m)(e.entity_id)},82286:function(e,t,a){a.d(t,{$:function(){return i}});const i=(e,t)=>o(e.attributes,t),o=(e,t)=>0!==(e.supported_features&t)},64481:function(e,t,a){a.d(t,{D:function(){return o},J:function(){return n}});a(16280),a(3362),a(55815),a(64979),a(79739);let i=!1;try{i="true"===window.localStorage.getItem("disableViewTransition")}catch(r){}const o=e=>{i=e},s=e=>{if(!(e=>(e instanceof DOMException||e instanceof Error)&&"AbortError"===e.name)(e))throw e},n=e=>{if(!document.startViewTransition||i)return e(!1),Promise.resolve();let t=!1;try{const a=document.startViewTransition(()=>{t=!0,e(!0)});return a.ready.catch(s),a.finished.catch(s)}catch(a){return console.warn("View transition failed, falling back to direct execution.",a),t?Promise.reject(a):(e(!1),Promise.resolve())}}},93444:function(e,t,a){var i=a(40445),o=a(5124),s=a(67576);let n,r,l=e=>e;class d extends o.WF{render(){return(0,o.qy)(n||(n=l` <footer> <slot name="secondaryAction"></slot> <slot name="primaryAction"></slot> </footer> `))}static get styles(){return[(0,o.AH)(r||(r=l`footer{display:flex;gap:var(--ha-space-3);justify-content:flex-end;align-items:center;width:100%}`))]}}d=(0,i.Cg)([(0,s.EM)("ha-dialog-footer")],d)},76538:function(e,t,a){a(62953);var i=a(40445),o=a(5124),s=a(67576);let n,r,l,d,h,c,u=e=>e;class p extends o.WF{render(){const e=(0,o.qy)(n||(n=u`<div class="header-title"> <slot name="title"></slot> </div>`)),t=(0,o.qy)(r||(r=u`<div class="header-subtitle"> <slot name="subtitle"></slot> </div>`));return(0,o.qy)(l||(l=u` <header class="header"> <div class="header-bar"> <section class="header-navigation-icon"> <slot name="navigationIcon"></slot> </section> <section class="header-content"> ${0} </section> <section class="header-action-items"> <slot name="actionItems"></slot> </section> </div> <slot></slot> </header> `),"above"===this.subtitlePosition?(0,o.qy)(d||(d=u`${0}${0}`),t,e):(0,o.qy)(h||(h=u`${0}${0}`),e,t))}static get styles(){return[(0,o.AH)(c||(c=u`:host{display:block}:host([show-border]){border-bottom:1px solid var(--mdc-dialog-scroll-divider-color,rgba(0,0,0,.12))}.header-bar{display:flex;flex-direction:row;align-items:center;padding:0 var(--ha-space-1);box-sizing:border-box}.header-content{flex:1;padding:10px var(--ha-space-1);display:flex;flex-direction:column;justify-content:center;min-height:var(--ha-space-12);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.header-title{height:var(--ha-dialog-header-title-height,calc(var(--ha-font-size-xl) + var(--ha-space-1)));font-size:var(--ha-font-size-xl);line-height:var(--ha-line-height-condensed);font-weight:var(--ha-font-weight-medium);color:var(--ha-dialog-header-title-color,var(--primary-text-color))}.header-subtitle{font-size:var(--ha-font-size-m);line-height:var(--ha-line-height-normal);color:var(--ha-dialog-header-subtitle-color,var(--secondary-text-color))}@media all and (min-width:450px) and (min-height:500px){.header-bar{padding:0 var(--ha-space-2)}}.header-navigation-icon{flex:none;min-width:var(--ha-space-2);height:100%;display:flex;flex-direction:row}.header-action-items{flex:none;min-width:var(--ha-space-2);height:100%;display:flex;flex-direction:row}`))]}constructor(...e){super(...e),this.subtitlePosition="below",this.showBorder=!1}}(0,i.Cg)([(0,s.MZ)({type:String,attribute:"subtitle-position"})],p.prototype,"subtitlePosition",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,reflect:!0,attribute:"show-border"})],p.prototype,"showBorder",void 0),p=(0,i.Cg)([(0,s.EM)("ha-dialog-header")],p)},72554:function(e,t,a){a.a(e,async function(e,t){try{a(3362),a(62953),a(49255);var i=a(40445),o=a(93900),s=a(35211),n=a(5124),r=a(67576),l=a(63672),d=a(1087),h=a(64481),c=a(22792),u=a(59992),p=a(14503),g=a(22348),v=(a(76538),a(26300)),m=e([o,v,u]);[o,v,u]=m.then?(await m)():m;let _,f,b,y,w,x,$,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";class P extends((0,u.V)(n.WF)){connectedCallback(){super.connectedCallback(),this.addEventListener("dialog-set-fullscreen",this._handleFullscreenChanged)}get scrollableElement(){return this.bodyContainer}updated(e){super.updated(e),e.has("open")&&(this._open=this.open)}render(){var e,t,a;return(0,n.qy)(_||(_=C` <wa-dialog .open="${0}" .lightDismiss="${0}" without-header aria-labelledby="${0}" aria-describedby="${0}" @keydown="${0}" @wa-hide="${0}" @wa-show="${0}" @wa-after-show="${0}" @wa-after-hide="${0}"> ${0} <div class="content-wrapper"> <div class="body ha-scrollbar" @scroll="${0}"> <slot></slot> </div> ${0} </div> <slot name="footer" slot="footer"></slot> </wa-dialog> `),this._open,!this.preventScrimClose,(0,l.J)(this.ariaLabelledBy||(void 0!==this.headerTitle?"ha-dialog-title":void 0)),(0,l.J)(this.ariaDescribedBy),this._handleKeyDown,this._handleHide,this._handleShow,this._handleAfterShow,this._handleAfterHide,this.withoutHeader?n.s6:(0,n.qy)(f||(f=C`<slot name="header"> <ha-dialog-header .subtitlePosition="${0}" .showBorder="${0}"> <slot name="headerNavigationIcon" slot="navigationIcon"> <ha-icon-button data-dialog="close" .label="${0}" .path="${0}"></ha-icon-button> </slot> ${0} ${0} <slot name="headerActionItems" slot="actionItems"></slot> </ha-dialog-header> </slot>`),this.headerSubtitlePosition,this._bodyScrolled,null!==(e=null===(t=this._i18n)||void 0===t||null===(a=t.localize)||void 0===a?void 0:a.call(t,"ui.common.close"))&&void 0!==e?e:"Close",k,void 0!==this.headerTitle?(0,n.qy)(b||(b=C`<span slot="title" class="title" id="ha-dialog-title"> ${0} </span>`),this.headerTitle):(0,n.qy)(y||(y=C`<slot name="headerTitle" slot="title"></slot>`)),void 0!==this.headerSubtitle?(0,n.qy)(w||(w=C`<span slot="subtitle">${0}</span>`),this.headerSubtitle):(0,n.qy)(x||(x=C`<slot name="headerSubtitle" slot="subtitle"></slot>`))),this._handleBodyScroll,this.renderScrollableFades())}disconnectedCallback(){this.removeEventListener("dialog-set-fullscreen",this._handleFullscreenChanged),this._setFullscreen(!1),super.disconnectedCallback(),this._open=!1}_handleFullscreenChanged(e){this._open?(0,h.J)(()=>{this._setFullscreen(e.detail)}):this._setFullscreen(e.detail)}_setFullscreen(e){this.toggleAttribute("fullscreen",e)}_handleBodyScroll(e){this._bodyScrolled=e.target.scrollTop>0}_handleKeyDown(e){"Escape"===e.key&&(this._escapePressed=!0,this.preventScrimClose&&e.preventDefault(),e.stopPropagation(),e.currentTarget.open=!1)}_handleHide(e){var t;const a=(null===(t=e.detail)||void 0===t?void 0:t.source)===e.target.dialog;this.preventScrimClose&&this._escapePressed&&a&&e.preventDefault(),this._escapePressed=!1}static get styles(){return[...super.styles,p.dp,(0,n.AH)($||($=C`wa-dialog{--full-width:var(
--ha-dialog-width-full,
min(95vw, var(--safe-width))
);--width:min(var(--ha-dialog-width-md, 580px), var(--full-width));--spacing:var(--dialog-content-padding, var(--ha-space-6));--show-duration:var(--ha-dialog-show-duration, 200ms);--hide-duration:var(--ha-dialog-hide-duration, 200ms);--wa-color-surface-raised:var(
--ha-dialog-surface-background,
var(--card-background-color, var(--ha-color-surface-default))
);--wa-panel-border-radius:var(
--ha-dialog-border-radius,
var(--ha-border-radius-3xl)
);max-width:var(--ha-dialog-max-width,var(--safe-width))}@media (prefers-reduced-motion:reduce){wa-dialog{--show-duration:0ms;--hide-duration:0ms}}:host([width=small]) wa-dialog{--width:min(var(--ha-dialog-width-sm, 320px), var(--full-width))}:host([width=large]) wa-dialog{--width:min(var(--ha-dialog-width-lg, 1024px), var(--full-width))}:host([fullscreen]) wa-dialog,:host([width=full]) wa-dialog{--width:var(--full-width)}:host([fullscreen]) wa-dialog::part(dialog){min-height:var(--safe-height);max-height:var(--safe-height);margin-top:0;transform:none}:host([fullscreen]) .content-wrapper{overflow:hidden}:host([fullscreen]) .body{overflow:hidden;padding:0}wa-dialog::part(dialog){-webkit-backdrop-filter:var(--ha-dialog-surface-backdrop-filter,none);backdrop-filter:var(--ha-dialog-surface-backdrop-filter,none);box-shadow:var(--dialog-box-shadow,var(--wa-shadow-l));color:var(--primary-text-color);min-width:var(--width,var(--full-width));max-width:var(--width,var(--full-width));max-height:var(--ha-dialog-max-height,calc(var(--safe-height) - var(--ha-space-20)));min-height:var(--ha-dialog-min-height);margin-top:var(--dialog-surface-margin-top,auto);transform:translate(calc(var(--safe-area-offset-left,0px) - var(--safe-area-offset-right,0px)),calc(var(--safe-area-offset-top,0px) - var(--safe-area-offset-bottom,0px)));display:flex;flex-direction:column;overflow:hidden}wa-dialog::part(dialog)::backdrop{-webkit-backdrop-filter:var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none));backdrop-filter:var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none));background-color:var(--mdc-dialog-scrim-color,none)}@media all and (max-width:450px),all and (max-height:500px){:host([type=standard]){--ha-dialog-border-radius:0}:host([type=standard]) wa-dialog{--full-width:var(--ha-dialog-width-full, 100vw);--width:var(--full-width)}:host([type=standard]) wa-dialog::part(dialog){min-height:var(--ha-dialog-min-height,100vh);min-height:var(--ha-dialog-min-height,100dvh);max-height:var(--ha-dialog-max-height,100vh);max-height:var(--ha-dialog-max-height,100dvh);margin-top:0;margin-bottom:0;padding-top:var(--safe-area-inset-top);padding-bottom:var(--safe-area-inset-bottom);padding-left:var(--safe-area-inset-left);padding-right:var(--safe-area-inset-right);transform:none}}.header-title-container{display:flex;align-items:center}.header-title{margin:0;margin-bottom:0;color:var(--ha-dialog-header-title-color,var(--primary-text-color));font-size:var(
--ha-dialog-header-title-font-size,
var(--ha-font-size-2xl)
);line-height:var(
--ha-dialog-header-title-line-height,
var(--ha-line-height-condensed)
);font-weight:var(--ha-dialog-header-title-font-weight,var(--ha-font-weight-normal));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:var(--ha-space-3)}wa-dialog::part(body){padding:0;display:flex;flex-direction:column;max-width:100%;overflow:hidden}.content-wrapper{position:relative;flex:1;display:flex;flex-direction:column;min-height:0}.body{position:var(--dialog-content-position,relative);padding:var(--dialog-content-padding,0 var(--ha-space-6) var(--ha-space-6) var(--ha-space-6));overflow:auto;flex-grow:1}:host([flexcontent]) .body{max-width:100%;flex:1;display:flex;flex-direction:column}wa-dialog::part(footer){padding:0}::slotted([slot=footer]){display:flex;padding:var(--ha-space-3) var(--ha-space-4) var(--ha-space-4) var(--ha-space-4);gap:var(--ha-space-3);justify-content:flex-end;align-items:center;width:100%}`))]}constructor(...e){super(...e),this.open=!1,this.type="standard",this.width="medium",this.preventScrimClose=!1,this.headerSubtitlePosition="below",this.flexContent=!1,this.withoutHeader=!1,this._open=!1,this._bodyScrolled=!1,this._escapePressed=!1,this._handleShow=async e=>{e.eventPhase===Event.AT_TARGET&&(this._open=!0,(0,d.r)(this,"opened"),await this.updateComplete,requestAnimationFrame(()=>{var e,t;if(null!==(e=this._hassConfig)&&void 0!==e&&e.auth.external&&(0,g.V)(this._hassConfig.auth.external)){const e=this.querySelector("[autofocus]");return void(null!==e&&(e.id||(e.id="ha-dialog-autofocus"),this._hassConfig.auth.external.fireMessage({type:"focus_element",payload:{element_id:e.id}})))}null===(t=this.querySelector("[autofocus]"))||void 0===t||t.focus()}))},this._handleAfterShow=e=>{e.eventPhase===Event.AT_TARGET&&(0,d.r)(this,"after-show")},this._handleAfterHide=e=>{e.eventPhase===Event.AT_TARGET&&(this._open=!1,this._setFullscreen(!1),(0,d.r)(this,"closed"))}}}(0,i.Cg)([(0,r.MZ)({attribute:"aria-labelledby"})],P.prototype,"ariaLabelledBy",void 0),(0,i.Cg)([(0,r.MZ)({attribute:"aria-describedby"})],P.prototype,"ariaDescribedBy",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],P.prototype,"open",void 0),(0,i.Cg)([(0,r.MZ)({reflect:!0})],P.prototype,"type",void 0),(0,i.Cg)([(0,r.MZ)({type:String,reflect:!0,attribute:"width"})],P.prototype,"width",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],P.prototype,"preventScrimClose",void 0),(0,i.Cg)([(0,r.MZ)({attribute:"header-title"})],P.prototype,"headerTitle",void 0),(0,i.Cg)([(0,r.MZ)({attribute:"header-subtitle"})],P.prototype,"headerSubtitle",void 0),(0,i.Cg)([(0,r.MZ)({type:String,attribute:"header-subtitle-position"})],P.prototype,"headerSubtitlePosition",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],P.prototype,"flexContent",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean,attribute:"without-header"})],P.prototype,"withoutHeader",void 0),(0,i.Cg)([(0,r.wk)()],P.prototype,"_open",void 0),(0,i.Cg)([(0,r.P)(".body")],P.prototype,"bodyContainer",void 0),(0,i.Cg)([(0,r.wk)(),(0,s.Fg)({context:c.D5,subscribe:!0})],P.prototype,"_i18n",void 0),(0,i.Cg)([(0,r.wk)(),(0,s.Fg)({context:c.WF,subscribe:!0})],P.prototype,"_hassConfig",void 0),(0,i.Cg)([(0,r.wk)()],P.prototype,"_bodyScrolled",void 0),(0,i.Cg)([(0,r.Ls)({passive:!0})],P.prototype,"_handleBodyScroll",null),P=(0,i.Cg)([(0,r.EM)("ha-dialog")],P),t()}catch(_){t(_)}})},52763:function(e,t,a){a.a(e,async function(e,i){try{a.d(t,{U:function(){return k}});a(74423),a(18111),a(7588),a(61701),a(3362),a(62953);var o=a(40445),s=a(5124),n=a(67576),r=a(69558),l=a(1087),d=a(38962),h=(a(11399),e([d]));d=(h.then?(await h)():h)[0];let c,u,p,g,v,m,_,f,b,y=e=>e;const w={boolean:()=>a.e(81347).then(a.bind(a,46990)),constant:()=>a.e(65733).then(a.bind(a,90820)),float:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(51868),a.e(62574),a.e(16113)]).then(a.bind(a,20676)),grid:()=>a.e(60761).then(a.bind(a,70208)),expandable:()=>a.e(45001).then(a.bind(a,40003)),integer:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(21543),a.e(86712),a.e(62574),a.e(12145)]).then(a.bind(a,20036)),multi_select:()=>Promise.all([a.e(72850),a.e(39763),a.e(46095),a.e(34995),a.e(80131),a.e(58303),a.e(71739),a.e(78219)]).then(a.bind(a,36182)),positive_time_period_dict:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(34995),a.e(67943),a.e(62574),a.e(16508),a.e(21486)]).then(a.bind(a,89422)),select:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(92769),a.e(34995),a.e(3283),a.e(81034),a.e(99463),a.e(62574),a.e(26092),a.e(39005),a.e(35873),a.e(63577)]).then(a.bind(a,63804)),string:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(84725),a.e(62574),a.e(6762)]).then(a.bind(a,54753)),optional_actions:()=>Promise.all([a.e(72850),a.e(39763),a.e(34995),a.e(67395)]).then(a.bind(a,8456))},x=(e,t)=>e?!t.name||t.flatten?e:e[t.name]:void 0,$=(e,t)=>e&&t.name?e[t.name]:null,C=(e,t)=>e&&t.name?e[t.name]:null;class k extends s.WF{getFormProperties(){return{}}reportValidity(){const e=this._root;if(!e)return!0;const t=[...e.children].filter(e=>"ha-alert"!==e.localName);let a,i=!0;var o,s;(this.schema.forEach((e,o)=>{var s;const n=t[o];if(!n)return;let r=!0;if("reportValidity"in n&&"function"==typeof n.reportValidity)r=n.reportValidity();else if(e.required&&(!("type"in e)||!["boolean","constant"].includes(null!==(s=e.type)&&void 0!==s?s:""))&&(!("selector"in e)||!("boolean"in e.selector)&&!("constant"in e.selector))){const t=x(this.data,e);r=null!=t&&""!==t}r||(i=!1,a||(a=n))}),a)&&(null===(o=(s=a).focus)||void 0===o||o.call(s));return i}willUpdate(e){e.has("schema")&&this.schema&&this.schema.forEach(e=>{var t;"selector"in e||null===(t=w[e.type])||void 0===t||t.call(w)})}render(){return(0,s.qy)(c||(c=y` <div class="root" part="root"> ${0} ${0} </div> `),this.error&&this.error.base?(0,s.qy)(u||(u=y` <ha-alert alert-type="error"> ${0} </ha-alert> `),this._computeError(this.error.base,this.schema)):"",this.schema.map(e=>{var t;const a=$(this.error,e),i=C(this.warning,e);return(0,s.qy)(p||(p=y` ${0} ${0} `),a?(0,s.qy)(g||(g=y` <ha-alert own-margin alert-type="error"> ${0} </ha-alert> `),this._computeError(a,e)):i?(0,s.qy)(v||(v=y` <ha-alert own-margin alert-type="warning"> ${0} </ha-alert> `),this._computeWarning(i,e)):"","selector"in e?(0,s.qy)(m||(m=y`<ha-selector .schema="${0}" .hass="${0}" .narrow="${0}" .name="${0}" .selector="${0}" .value="${0}" .label="${0}" .disabled="${0}" .placeholder="${0}" .helper="${0}" .localizeValue="${0}" .required="${0}" .context="${0}"></ha-selector>`),e,this.hass,this.narrow,e.name,e.selector,x(this.data,e),this._computeLabel(e,this.data),e.disabled||this.disabled||!1,e.required?void 0:e.default,this._computeHelper(e),this.localizeValue,e.required||!1,this._generateContext(e)):(0,r._)(this.fieldElementName(e.type),Object.assign({schema:e,data:x(this.data,e),label:this._computeLabel(e,this.data),helper:this._computeHelper(e),disabled:this.disabled||e.disabled||!1,hass:this.hass,localize:null===(t=this.hass)||void 0===t?void 0:t.localize,computeLabel:this.computeLabel,computeHelper:this.computeHelper,localizeValue:this.localizeValue,context:this._generateContext(e)},this.getFormProperties())))}))}fieldElementName(e){return`ha-form-${e}`}_generateContext(e){if(!e.context&&!this.context)return;const t=Object.assign({},this.context);if(e.context)for(const[a,i]of Object.entries(e.context))t[a]=this.data[i];return t}createRenderRoot(){const e=super.createRenderRoot();return this.addValueChangedListener(e),e}addValueChangedListener(e){e.addEventListener("value-changed",e=>{e.stopPropagation();const t=e.target.schema;if(e.target===this)return;const a=!t.name||"flatten"in t&&t.flatten?e.detail.value:{[t.name]:e.detail.value};this.data=Object.assign(Object.assign({},this.data),a),(0,l.r)(this,"value-changed",{value:this.data})})}_computeLabel(e,t){return this.computeLabel?this.computeLabel(e,t):e?e.name:""}_computeHelper(e){return this.computeHelper?this.computeHelper(e):""}_computeError(e,t){return Array.isArray(e)?(0,s.qy)(_||(_=y`<ul> ${0} </ul>`),e.map(e=>(0,s.qy)(f||(f=y`<li> ${0} </li>`),this.computeError?this.computeError(e,t):e))):this.computeError?this.computeError(e,t):e}_computeWarning(e,t){return this.computeWarning?this.computeWarning(e,t):e}constructor(...e){super(...e),this.narrow=!1,this.disabled=!1}}k.shadowRootOptions={mode:"open",delegatesFocus:!0},k.styles=(0,s.AH)(b||(b=y`.root>*{display:block}.root>:not([own-margin]):not(:last-child){margin-bottom:24px}ha-alert[own-margin]{margin-bottom:4px}`)),(0,o.Cg)([(0,n.MZ)({attribute:!1})],k.prototype,"hass",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean})],k.prototype,"narrow",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],k.prototype,"data",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],k.prototype,"schema",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],k.prototype,"error",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],k.prototype,"warning",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean})],k.prototype,"disabled",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],k.prototype,"computeError",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],k.prototype,"computeWarning",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],k.prototype,"computeLabel",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],k.prototype,"computeHelper",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],k.prototype,"localizeValue",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],k.prototype,"context",void 0),(0,o.Cg)([(0,n.P)(".root")],k.prototype,"_root",void 0),k=(0,o.Cg)([(0,n.EM)("ha-form")],k),i()}catch(c){i(c)}})},11399:function(e,t,a){a(3362),a(27495),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698),a(25440),a(62953);var i=a(40445),o=a(5124),s=a(67576),n=a(22786),r=a(69558),l=a(95311);let d,h=e=>e;const c={action:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(92769),a.e(34995),a.e(3283),a.e(80131),a.e(72130),a.e(85010),a.e(67218),a.e(98470),a.e(58303),a.e(81034),a.e(23659),a.e(54066),a.e(25950),a.e(64006),a.e(79185),a.e(62574),a.e(26092),a.e(39005),a.e(8851),a.e(34310),a.e(55392),a.e(12009),a.e(20282),a.e(13628),a.e(16508),a.e(28501),a.e(84207),a.e(31863),a.e(283),a.e(30513),a.e(33547)]).then(a.bind(a,6274)),addon:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(92769),a.e(3283),a.e(26787),a.e(62574),a.e(26092),a.e(39005),a.e(71625),a.e(43305)]).then(a.bind(a,36784)),automation_behavior:()=>Promise.all([a.e(72850),a.e(81034),a.e(99220)]).then(a.bind(a,66034)),app:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(92769),a.e(3283),a.e(26787),a.e(62574),a.e(26092),a.e(39005),a.e(71625)]).then(a.bind(a,48585)),area:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(92769),a.e(3283),a.e(83523),a.e(62574),a.e(26092),a.e(39005),a.e(13905)]).then(a.bind(a,81857)),areas_display:()=>Promise.all([a.e(46095),a.e(64657),a.e(68273),a.e(64280),a.e(47956)]).then(a.bind(a,38235)),attribute:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(92769),a.e(3283),a.e(49168),a.e(62574),a.e(26092),a.e(39005),a.e(58072)]).then(a.bind(a,71498)),assist_pipeline:()=>Promise.all([a.e(72850),a.e(39763),a.e(46095),a.e(34995),a.e(43048),a.e(63071)]).then(a.bind(a,83642)),boolean:()=>Promise.all([a.e(93282),a.e(19623)]).then(a.bind(a,30714)),choose:()=>a.e(93934).then(a.bind(a,58141)),color_rgb:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(7106),a.e(62574),a.e(21332)]).then(a.bind(a,34931)),condition:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(92769),a.e(34995),a.e(3283),a.e(72130),a.e(85010),a.e(67218),a.e(23659),a.e(54066),a.e(25950),a.e(48106),a.e(62574),a.e(26092),a.e(39005),a.e(8851),a.e(34310),a.e(12009),a.e(20282),a.e(13628),a.e(28501),a.e(84207),a.e(283),a.e(77190)]).then(a.bind(a,81539)),config_entry:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(92769),a.e(3283),a.e(8706),a.e(62574),a.e(26092),a.e(39005),a.e(8851),a.e(81594)]).then(a.bind(a,49347)),conversation_agent:()=>Promise.all([a.e(72850),a.e(39763),a.e(46095),a.e(34995),a.e(20667),a.e(44770)]).then(a.bind(a,94215)),constant:()=>a.e(77057).then(a.bind(a,39032)),country:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(92769),a.e(3283),a.e(84887),a.e(65799),a.e(62574),a.e(26092),a.e(39005),a.e(64157),a.e(47352)]).then(a.bind(a,94164)),date:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(81178),a.e(62574),a.e(36553)]).then(a.bind(a,94351)),datetime:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(34995),a.e(62574),a.e(12466)]).then(a.bind(a,39045)),device:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(92769),a.e(3283),a.e(23659),a.e(33246),a.e(62574),a.e(26092),a.e(39005),a.e(83128)]).then(a.bind(a,2270)),duration:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(34995),a.e(90324),a.e(62574),a.e(16508),a.e(24858)]).then(a.bind(a,79488)),entity:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(92769),a.e(3283),a.e(69923),a.e(62574),a.e(26092),a.e(39005),a.e(8851),a.e(1535),a.e(34435)]).then(a.bind(a,73863)),entity_name:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(92769),a.e(3283),a.e(80607),a.e(62574),a.e(26092),a.e(39005),a.e(3067)]).then(a.bind(a,7563)),statistic:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(92769),a.e(3283),a.e(72224),a.e(62574),a.e(26092),a.e(39005),a.e(8851),a.e(54884),a.e(88493)]).then(a.bind(a,28072)),file:()=>Promise.all([a.e(72850),a.e(49224)]).then(a.bind(a,25078)),floor:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(92769),a.e(3283),a.e(89100),a.e(54192),a.e(62574),a.e(26092),a.e(39005),a.e(33790),a.e(94628)]).then(a.bind(a,9040)),label:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(92769),a.e(3283),a.e(79808),a.e(62574),a.e(26092),a.e(39005),a.e(66201),a.e(40231)]).then(a.bind(a,99560)),language:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(92769),a.e(3283),a.e(82025),a.e(62574),a.e(26092),a.e(39005),a.e(59324)]).then(a.bind(a,15430)),navigation:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(92769),a.e(34995),a.e(3283),a.e(83113),a.e(99788),a.e(54066),a.e(83502),a.e(62574),a.e(26092),a.e(39005),a.e(8851),a.e(19112),a.e(30002),a.e(59704),a.e(25322),a.e(89747),a.e(71572),a.e(12009),a.e(20282),a.e(28501),a.e(46152),a.e(33173)]).then(a.bind(a,58350)),number:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(21543),a.e(62574),a.e(64809)]).then(a.bind(a,31157)),numeric_threshold:()=>Promise.all([a.e(72850),a.e(39763),a.e(46095),a.e(34995),a.e(88992),a.e(99386)]).then(a.bind(a,18719)),object:()=>Promise.all([a.e(72850),a.e(39763),a.e(46095),a.e(72130),a.e(85010),a.e(42981),a.e(34310),a.e(87352)]).then(a.bind(a,97951)),period:()=>a.e(54234).then(a.bind(a,40929)),qr_code:()=>Promise.all([a.e(72850),a.e(51343),a.e(90791)]).then(a.bind(a,35313)),select:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(92769),a.e(34995),a.e(3283),a.e(81034),a.e(62574),a.e(26092),a.e(39005),a.e(35873),a.e(99457)]).then(a.bind(a,856)),selector:()=>a.e(77810).then(a.bind(a,13897)),serial_port:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(92769),a.e(3283),a.e(68432),a.e(62574),a.e(26092),a.e(39005),a.e(87464)]).then(a.bind(a,82178)),state:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(92769),a.e(3283),a.e(19269),a.e(62574),a.e(26092),a.e(39005),a.e(48007)]).then(a.bind(a,12995)),backup_location:()=>Promise.all([a.e(72850),a.e(39763),a.e(46095),a.e(34995),a.e(80131),a.e(83241),a.e(72777)]).then(a.bind(a,16360)),stt:()=>Promise.all([a.e(72850),a.e(39763),a.e(46095),a.e(34995),a.e(98286),a.e(87890)]).then(a.bind(a,42999)),target:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(92769),a.e(3283),a.e(40420),a.e(62574),a.e(26092),a.e(39005),a.e(8851),a.e(13628),a.e(14351),a.e(24891),a.e(45862)]).then(a.bind(a,84909)),template:()=>Promise.all([a.e(72850),a.e(39763),a.e(72130),a.e(33387),a.e(34310),a.e(15732)]).then(a.bind(a,62166)),text:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(37694),a.e(62574),a.e(55844)]).then(a.bind(a,47971)),time:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(34995),a.e(92351),a.e(62574),a.e(17066)]).then(a.bind(a,42945)),icon:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(92769),a.e(3283),a.e(86325),a.e(62574),a.e(26092),a.e(39005),a.e(8851),a.e(82568)]).then(a.bind(a,14885)),media:()=>Promise.all([a.e(72850),a.e(33887),a.e(91845),a.e(22308)]).then(a.bind(a,59422)),theme:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(92769),a.e(3283),a.e(4406),a.e(62574),a.e(26092),a.e(39005),a.e(5127)]).then(a.bind(a,77655)),timezone:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(92769),a.e(3283),a.e(56253),a.e(12727),a.e(62574),a.e(26092),a.e(39005),a.e(78464),a.e(41460)]).then(a.bind(a,6719)),button_toggle:()=>a.e(7774).then(a.bind(a,79949)),trigger:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(92769),a.e(34995),a.e(3283),a.e(80131),a.e(72130),a.e(85010),a.e(67218),a.e(58303),a.e(81034),a.e(23659),a.e(54066),a.e(25950),a.e(4379),a.e(62574),a.e(26092),a.e(39005),a.e(8851),a.e(34310),a.e(12009),a.e(20282),a.e(13628),a.e(28501),a.e(84207),a.e(31863),a.e(155)]).then(a.bind(a,45078)),tts:()=>Promise.all([a.e(72850),a.e(39763),a.e(46095),a.e(34995),a.e(75905),a.e(56146)]).then(a.bind(a,59447)),tts_voice:()=>Promise.all([a.e(72850),a.e(39763),a.e(46095),a.e(34995),a.e(53524),a.e(58485)]).then(a.bind(a,41188)),location:()=>Promise.all([a.e(72850),a.e(66139),a.e(70622),a.e(73512),a.e(8851),a.e(12122),a.e(76696),a.e(83462)]).then(a.bind(a,21160)),color_temp:()=>Promise.all([a.e(72850),a.e(39763),a.e(99788),a.e(21543),a.e(29628),a.e(59704),a.e(20282),a.e(68611)]).then(a.bind(a,90780)),ui_action:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(92769),a.e(34995),a.e(3283),a.e(72130),a.e(85010),a.e(83113),a.e(98470),a.e(99788),a.e(54066),a.e(25950),a.e(31746),a.e(62574),a.e(26092),a.e(39005),a.e(8851),a.e(19112),a.e(34310),a.e(30002),a.e(59704),a.e(25322),a.e(55392),a.e(89747),a.e(71572),a.e(36332),a.e(12009),a.e(20282),a.e(28501),a.e(46152),a.e(59800)]).then(a.bind(a,38389)),ui_color:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(92769),a.e(3283),a.e(46051),a.e(62574),a.e(26092),a.e(39005),a.e(80651)]).then(a.bind(a,52744)),ui_state_content:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(92769),a.e(3283),a.e(67493),a.e(62574),a.e(26092),a.e(39005),a.e(48408)]).then(a.bind(a,96074))},u=new Set(["ui-action","ui-color"]);class p extends o.WF{reportValidity(){var e,t;return this._selectorElement&&"reportValidity"in this._selectorElement&&"function"==typeof this._selectorElement.reportValidity?null===(e=null===(t=this._selectorElement)||void 0===t?void 0:t.reportValidity())||void 0===e||e:!this.required||void 0!==this.value&&null!==this.value&&""!==this.value}async focus(){var e;await this.updateComplete,null===(e=this._selectorElement)||void 0===e||e.focus()}get _type(){const e=Object.keys(this.selector)[0];return u.has(e)?e.replace("-","_"):e}willUpdate(e){var t;e.has("selector")&&this.selector&&(null===(t=c[this._type])||void 0===t||t.call(c))}render(){return(0,o.qy)(d||(d=h` ${0} `),(0,r._)(`ha-selector-${this._type}`,{hass:this.hass,narrow:this.narrow,name:this.name,selector:this._handleLegacySelector(this.selector),value:this.value,label:this.label,placeholder:this.placeholder,disabled:this.disabled,required:this.required,helper:this.helper,context:this.context,localizeValue:this.localizeValue,id:"selector"}))}constructor(...e){super(...e),this.narrow=!1,this.disabled=!1,this.required=!0,this._handleLegacySelector=(0,n.A)(e=>{if("entity"in e)return(0,l.UU)(e);if("device"in e)return(0,l.tD)(e);const t=Object.keys(this.selector)[0];return u.has(t)?{[t.replace("-","_")]:e[t]}:e})}}(0,i.Cg)([(0,s.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean})],p.prototype,"narrow",void 0),(0,i.Cg)([(0,s.MZ)()],p.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({attribute:!1})],p.prototype,"selector",void 0),(0,i.Cg)([(0,s.MZ)()],p.prototype,"value",void 0),(0,i.Cg)([(0,s.MZ)()],p.prototype,"label",void 0),(0,i.Cg)([(0,s.MZ)()],p.prototype,"helper",void 0),(0,i.Cg)([(0,s.MZ)({attribute:!1})],p.prototype,"localizeValue",void 0),(0,i.Cg)([(0,s.MZ)()],p.prototype,"placeholder",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean})],p.prototype,"disabled",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean})],p.prototype,"required",void 0),(0,i.Cg)([(0,s.MZ)({attribute:!1})],p.prototype,"context",void 0),(0,i.Cg)([(0,s.P)("#selector",!0)],p.prototype,"_selectorElement",void 0),p=(0,i.Cg)([(0,s.EM)("ha-selector")],p)},95311:function(e,t,a){a.d(t,{DF:function(){return m},Lo:function(){return x},MH:function(){return u},MM:function(){return _},Qz:function(){return v},Ru:function(){return b},UU:function(){return y},_7:function(){return g},bZ:function(){return p},m0:function(){return c},tD:function(){return w},vX:function(){return f},wY:function(){return $}});var i=a(86518),o=(a(78350),a(74423),a(44114),a(30237),a(18111),a(22489),a(30531),a(7588),a(13579),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698),a(62953),a(44537)),s=a(69093),n=a(82286),r=a(24367),l=a(58594);const d=["domain","integration","device_class"],h=["integration","manufacturer","model"],c=(e,t,a,i,o,s,n)=>{const r=[],l=[],d=[];return Object.values(a).forEach(a=>{a.labels.includes(t)&&v(e,o,i,a.area_id,s,n)&&d.push(a.area_id)}),Object.values(i).forEach(a=>{a.labels.includes(t)&&m(e.states,Object.values(o),a,s,n)&&l.push(a.id)}),Object.values(o).forEach(a=>{a.labels.includes(t)&&_(e.states[a.entity_id],s,n)&&r.push(a.entity_id)}),{areas:d,devices:l,entities:r}},u=(e,t,a,i,o)=>{const s=[];return Object.values(a).forEach(a=>{a.floor_id===t&&v(e,e.entities,e.devices,a.area_id,i,o)&&s.push(a.area_id)}),{areas:s}},p=(e,t,a,i,o,s)=>{const n=[],r=[];return Object.values(a).forEach(a=>{a.area_id===t&&m(e.states,Object.values(i),a,o,s)&&r.push(a.id)}),Object.values(i).forEach(a=>{a.area_id===t&&_(e.states[a.entity_id],o,s)&&n.push(a.entity_id)}),{devices:r,entities:n}},g=(e,t,a,i,o)=>{const s=[];return Object.values(a).forEach(a=>{a.device_id===t&&_(e.states[a.entity_id],i,o)&&s.push(a.entity_id)}),{entities:s}},v=(e,t,a,i,o,s)=>!!Object.values(a).some(a=>!(a.area_id!==i||!m(e.states,Object.values(t),a,o,s)))||Object.values(t).some(t=>!(t.area_id!==i||!_(e.states[t.entity_id],o,s))),m=(e,t,a,i,s)=>{var n,r;const d=s?(0,l.fk)(s,t):void 0;if(null!==(n=i.target)&&void 0!==n&&n.device&&!(0,o.e)(i.target.device).some(e=>f(e,a,d)))return!1;if(null!==(r=i.target)&&void 0!==r&&r.entity){return t.filter(e=>e.device_id===a.id).some(t=>{const a=e[t.entity_id];return _(a,i,s)})}return!0},_=(e,t,a)=>{var i;return!!e&&(null===(i=t.target)||void 0===i||!i.entity||(0,o.e)(t.target.entity).some(t=>b(t,e,a)))},f=(e,t,a)=>{const{manufacturer:i,model:o,model_id:s,integration:n}=e;if(i&&t.manufacturer!==i)return!1;if(o&&t.model!==o)return!1;if(s&&t.model_id!==s)return!1;var r;if(n&&a&&(null==a||null===(r=a[t.id])||void 0===r||!r.has(n)))return!1;return!0},b=(e,t,a)=>{var i;const{domain:r,device_class:l,supported_features:d,unit_of_measurement:h,integration:c}=e;if(r){const e=(0,s.t)(t);if(Array.isArray(r)?!r.includes(e):e!==r)return!1}if(l){const e=t.attributes.device_class;if(e&&Array.isArray(l)?!l.includes(e):e!==l)return!1}if(d&&!(0,o.e)(d).some(e=>(0,n.$)(t,e)))return!1;if(h){const e=t.attributes.unit_of_measurement;if(!e||(Array.isArray(h)?!h.includes(e):e!==h))return!1}return!c||(null==a||null===(i=a[t.entity_id])||void 0===i?void 0:i.domain)===c},y=e=>{if(!e.entity)return{entity:null};if("filter"in e.entity)return e;const t=e.entity,{domain:a,integration:o,device_class:s}=t,n=(0,i.A)(t,d);return a||o||s?{entity:Object.assign(Object.assign({},n),{},{filter:{domain:a,integration:o,device_class:s}})}:{entity:n}},w=e=>{if(!e.device)return{device:null};if("filter"in e.device)return e;const t=e.device,{integration:a,manufacturer:o,model:s}=t,n=(0,i.A)(t,h);return a||o||s?{device:Object.assign(Object.assign({},n),{},{filter:{integration:a,manufacturer:o,model:s}})}:{device:n}},x=e=>{let t;var a;if("target"in e)t=(0,o.e)(null===(a=e.target)||void 0===a?void 0:a.entity);else if("entity"in e){var i,s;if(null!==(i=e.entity)&&void 0!==i&&i.include_entities)return;t=(0,o.e)(null===(s=e.entity)||void 0===s?void 0:s.filter)}if(!t)return;const n=t.flatMap(e=>e.integration||e.device_class||e.supported_features||!e.domain?[]:(0,o.e)(e.domain).filter(e=>(0,r.z)(e)));return[...new Set(n)]},$=(e,t,a,i,s,n={target:{}})=>{if(!t)return[];const r=new Set((0,o.e)(t.entity_id)),l=new Set((0,o.e)(t.device_id)),d=new Set((0,o.e)(t.area_id)),h=new Set((0,o.e)(t.floor_id));return new Set((0,o.e)(t.label_id)).forEach(t=>{const o=c(e,t,s,i,a,n);o.devices.forEach(e=>l.add(e)),o.entities.forEach(e=>r.add(e)),o.areas.forEach(e=>d.add(e))}),h.forEach(t=>{u(e,t,s,n).areas.forEach(e=>d.add(e))}),d.forEach(t=>{const o=p(e,t,i,a,n);o.devices.forEach(e=>l.add(e)),o.entities.forEach(e=>r.add(e))}),l.forEach(t=>{g(e,t,a,n).entities.forEach(e=>r.add(e))}),Array.from(r)}},81569:function(e,t,a){a.d(t,{$:function(){return i}});const i=(e,t)=>e.callWS({type:"wake_word/info",entity_id:t})},58947:function(e,t,a){a.d(t,{a:function(){return s}});a(3362),a(62953);var i=a(1087);const o=()=>a.e(62756).then(a.bind(a,12911)),s=(e,t)=>{(0,i.r)(e,"show-dialog",{addHistory:!1,dialogTag:"dialog-tts-try",dialogImport:o,dialogParams:t})}},59992:function(e,t,a){a.a(e,async function(e,i){try{a.d(t,{V:function(){return g}});a(62953);var o=a(40445),s=a(88696),n=a(5124),r=a(6412),l=a(67576),d=e([s]);s=(d.then?(await d)():d)[0];let h,c,u=e=>e;const p=e=>void 0===e?[]:Array.isArray(e)?e:[e],g=e=>{class t extends e{get scrollableElement(){return t.DEFAULT_SCROLLABLE_ELEMENT}firstUpdated(e){var t;null===(t=super.firstUpdated)||void 0===t||t.call(this,e),this.scrollableElement&&this._updateScrollableState(this.scrollableElement),this._attachScrollableElement()}updated(e){var t;null===(t=super.updated)||void 0===t||t.call(this,e),this._attachScrollableElement()}disconnectedCallback(){this._detachScrollableElement(),this._contentScrolled=!1,this._contentScrollable=!1,super.disconnectedCallback()}renderScrollableFades(e=!1){return(0,n.qy)(h||(h=u` <div class="${0}"></div> <div class="${0}"></div> `),(0,r.H)({"fade-top":!0,rounded:e,visible:this._contentScrolled}),(0,r.H)({"fade-bottom":!0,rounded:e,visible:this._contentScrollable}))}static get styles(){var e;const t=Object.getPrototypeOf(this);return[...p(null!==(e=null==t?void 0:t.styles)&&void 0!==e?e:[]),(0,n.AH)(c||(c=u`.fade-bottom,.fade-top{position:absolute;left:0;right:0;height:var(--ha-space-2);pointer-events:none;transition:opacity 180ms ease-in-out;border-radius:var(--ha-border-radius-square);opacity:0;background:linear-gradient(to bottom,var(--ha-color-shadow-scrollable-fade),transparent)}.fade-top{top:0}.fade-bottom{bottom:0;transform:rotate(180deg)}.fade-bottom.visible,.fade-top.visible{opacity:1}.fade-bottom.rounded,.fade-top.rounded{border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}.fade-top.rounded{border-top-left-radius:var(--ha-border-radius-square);border-top-right-radius:var(--ha-border-radius-square)}.fade-bottom.rounded{border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}`))]}_attachScrollableElement(){const e=this.scrollableElement;e!==this._scrollTarget&&(this._detachScrollableElement(),e&&(this._scrollTarget=e,e.addEventListener("scroll",this._onScroll,{passive:!0}),this._resize.observe(e),this._updateScrollableState(e)))}_detachScrollableElement(){var e,t;this._scrollTarget&&(this._scrollTarget.removeEventListener("scroll",this._onScroll),null===(e=(t=this._resize).unobserve)||void 0===e||e.call(t,this._scrollTarget),this._scrollTarget=void 0)}_updateScrollableState(e){const t=parseFloat(getComputedStyle(e).getPropertyValue("--safe-area-inset-bottom"))||0,{scrollHeight:a=0,clientHeight:i=0,scrollTop:o=0}=e;this._contentScrollable=a-i>o+t+this.scrollFadeSafeAreaPadding}constructor(...e){super(...e),this._contentScrolled=!1,this._contentScrollable=!1,this._onScroll=e=>{var t;const a=e.currentTarget;this._contentScrolled=(null!==(t=a.scrollTop)&&void 0!==t?t:0)>this.scrollFadeThreshold,this._updateScrollableState(a)},this._resize=new s.P(this,{target:null,callback:e=>{var t;const a=null===(t=e[0])||void 0===t?void 0:t.target;a&&this._updateScrollableState(a)}}),this.scrollFadeSafeAreaPadding=4,this.scrollFadeThreshold=4}}return t.DEFAULT_SCROLLABLE_ELEMENT=null,(0,o.Cg)([(0,l.wk)()],t.prototype,"_contentScrolled",void 0),(0,o.Cg)([(0,l.wk)()],t.prototype,"_contentScrollable",void 0),t};i()}catch(h){i(h)}})},24367:function(e,t,a){a.d(t,{L:function(){return o},z:function(){return s}});var i=a(23832);const o=["input_boolean","input_button","input_text","input_number","input_datetime","input_select","counter","timer","schedule"],s=(0,i.g)(o)},30057:function(e,t,a){a.a(e,async function(e,t){try{a(3362),a(62953);var i=a(40445),o=a(5124),s=a(67576),n=a(22786),r=a(52763),l=e([r]);r=(l.then?(await l)():l)[0];let d,h,c=e=>e;class u extends o.WF{async focus(){var e;await this.updateComplete,null===(e=this._form)||void 0===e||e.focus()}render(){return(0,o.qy)(d||(d=c` <div class="section"> <div class="intro"> <h3> ${0} </h3> <p> ${0} </p> </div> <ha-form .schema="${0}" .data="${0}" .hass="${0}" .computeLabel="${0}"></ha-form> </div> `),this.hass.localize("ui.panel.config.voice_assistants.assistants.pipeline.detail.steps.config.title"),this.hass.localize("ui.panel.config.voice_assistants.assistants.pipeline.detail.steps.config.description"),this._schema(this.supportedLanguages),this.data,this.hass,this._computeLabel)}constructor(...e){super(...e),this._schema=(0,n.A)(e=>[{name:"",type:"grid",schema:[{name:"name",required:!0,selector:{text:{}}},e?{name:"language",required:!0,selector:{language:{languages:e}}}:{name:"",type:"constant"}]}]),this._computeLabel=e=>e.name?this.hass.localize(`ui.panel.config.voice_assistants.assistants.pipeline.detail.form.${e.name}`):""}}u.styles=(0,o.AH)(h||(h=c`.section{border:1px solid var(--divider-color);border-radius:var(--ha-border-radius-md);box-sizing:border-box;padding:16px}.intro{margin-bottom:16px}h3{font-size:var(--ha-font-size-xl);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-condensed);margin-top:0;margin-bottom:4px}p{color:var(--secondary-text-color);font-size:var(--mdc-typography-body2-font-size, var(--ha-font-size-s));margin-top:0;margin-bottom:0}`)),(0,i.Cg)([(0,s.MZ)({attribute:!1})],u.prototype,"hass",void 0),(0,i.Cg)([(0,s.MZ)({attribute:!1})],u.prototype,"data",void 0),(0,i.Cg)([(0,s.MZ)({attribute:!1})],u.prototype,"supportedLanguages",void 0),(0,i.Cg)([(0,s.P)("ha-form")],u.prototype,"_form",void 0),u=(0,i.Cg)([(0,s.EM)("assist-pipeline-detail-config")],u),t()}catch(d){t(d)}})},3996:function(e,t,a){a.a(e,async function(e,t){try{a(74423),a(44114),a(62953);var i=a(40445),o=a(5124),s=a(67576),n=a(22786),r=a(1087),l=a(52763),d=e([l]);l=(d.then?(await d)():d)[0];let h,c,u=e=>e;class p extends o.WF{render(){var e,t;return(0,o.qy)(h||(h=u` <div class="section"> <div class="intro"> <h3> ${0} </h3> <p> ${0} </p> </div> <ha-form .schema="${0}" .data="${0}" .hass="${0}" .computeLabel="${0}" .computeHelper="${0}" @supported-languages-changed="${0}"></ha-form> </div> `),this.hass.localize("ui.panel.config.voice_assistants.assistants.pipeline.detail.steps.conversation.title"),this.hass.localize("ui.panel.config.voice_assistants.assistants.pipeline.detail.steps.conversation.description"),this._schema(null===(e=this.data)||void 0===e?void 0:e.conversation_engine,null===(t=this.data)||void 0===t?void 0:t.language,this._supportedLanguages),this.data,this.hass,this._computeLabel,this._computeHelper,this._supportedLanguagesChanged)}_supportedLanguagesChanged(e){var t,a,i;this._supportedLanguages=e.detail.value,"*"!==this._supportedLanguages&&null!==(t=this._supportedLanguages)&&void 0!==t&&t.includes((null===(a=this.data)||void 0===a?void 0:a.conversation_language)||"")&&null!==(i=this.data)&&void 0!==i&&i.conversation_language||setTimeout(()=>{const e=Object.assign({},this.data);var t,a;"*"===this._supportedLanguages?e.conversation_language="*":e.conversation_language=null!==(t=null===(a=this._supportedLanguages)||void 0===a?void 0:a[0])&&void 0!==t?t:null;(0,r.r)(this,"value-changed",{value:e})},0)}constructor(...e){super(...e),this._schema=(0,n.A)((e,t,a)=>{const i=[{name:"",type:"grid",schema:[{name:"conversation_engine",required:!0,selector:{conversation_agent:{language:t}}}]}];return"*"!==a&&null!=a&&a.length&&i[0].schema.push({name:"conversation_language",required:!0,selector:{language:{languages:a,no_sort:!0}}}),"conversation.home_assistant"!==e&&i.push({name:"prefer_local_intents",default:!0,selector:{boolean:{}}}),i}),this._computeLabel=e=>e.name?this.hass.localize(`ui.panel.config.voice_assistants.assistants.pipeline.detail.form.${e.name}`):"",this._computeHelper=e=>e.name?this.hass.localize(`ui.panel.config.voice_assistants.assistants.pipeline.detail.form.${e.name}_description`):""}}p.styles=(0,o.AH)(c||(c=u`.section{border:1px solid var(--divider-color);border-radius:var(--ha-border-radius-md);box-sizing:border-box;padding:16px}.intro{margin-bottom:16px}h3{font-size:var(--ha-font-size-xl);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-condensed);margin-top:0;margin-bottom:4px}p{color:var(--secondary-text-color);font-size:var(--mdc-typography-body2-font-size, var(--ha-font-size-s));margin-top:0;margin-bottom:0}`)),(0,i.Cg)([(0,s.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,i.Cg)([(0,s.MZ)({attribute:!1})],p.prototype,"data",void 0),(0,i.Cg)([(0,s.wk)()],p.prototype,"_supportedLanguages",void 0),p=(0,i.Cg)([(0,s.EM)("assist-pipeline-detail-conversation")],p),t()}catch(h){t(h)}})},70398:function(e,t,a){a.a(e,async function(e,t){try{a(74423),a(62953);var i=a(40445),o=a(5124),s=a(67576),n=a(22786),r=a(1087),l=a(52763),d=e([l]);l=(d.then?(await d)():d)[0];let h,c,u=e=>e;class p extends o.WF{render(){var e;return(0,o.qy)(h||(h=u` <div class="section"> <div class="intro"> <h3> ${0} </h3> <p> ${0} </p> </div> <ha-form .schema="${0}" .data="${0}" .hass="${0}" .computeLabel="${0}" @supported-languages-changed="${0}"></ha-form> </div> `),this.hass.localize("ui.panel.config.voice_assistants.assistants.pipeline.detail.steps.stt.title"),this.hass.localize("ui.panel.config.voice_assistants.assistants.pipeline.detail.steps.stt.description"),this._schema(null===(e=this.data)||void 0===e?void 0:e.language,this._supportedLanguages),this.data,this.hass,this._computeLabel,this._supportedLanguagesChanged)}_supportedLanguagesChanged(e){var t,a;this._supportedLanguages=e.detail.value,null!==(t=this.data)&&void 0!==t&&t.stt_language&&null!==(a=this._supportedLanguages)&&void 0!==a&&a.includes(this.data.stt_language)||setTimeout(()=>{var e,t;const a=Object.assign({},this.data);a.stt_language=null!==(e=null===(t=this._supportedLanguages)||void 0===t?void 0:t[0])&&void 0!==e?e:null,(0,r.r)(this,"value-changed",{value:a})},0)}constructor(...e){super(...e),this._schema=(0,n.A)((e,t)=>[{name:"",type:"grid",schema:[{name:"stt_engine",selector:{stt:{language:e}}},null!=t&&t.length?{name:"stt_language",required:!0,selector:{language:{languages:t,no_sort:!0}}}:{name:"",type:"constant"}]}]),this._computeLabel=e=>e.name?this.hass.localize(`ui.panel.config.voice_assistants.assistants.pipeline.detail.form.${e.name}`):""}}p.styles=(0,o.AH)(c||(c=u`.section{border:1px solid var(--divider-color);border-radius:var(--ha-border-radius-md);box-sizing:border-box;padding:16px}.intro{margin-bottom:16px}h3{font-size:var(--ha-font-size-xl);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-condensed);margin-top:0;margin-bottom:4px}p{color:var(--secondary-text-color);font-size:var(--mdc-typography-body2-font-size, var(--ha-font-size-s));margin-top:0;margin-bottom:0}`)),(0,i.Cg)([(0,s.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,i.Cg)([(0,s.MZ)({attribute:!1})],p.prototype,"data",void 0),(0,i.Cg)([(0,s.wk)()],p.prototype,"_supportedLanguages",void 0),p=(0,i.Cg)([(0,s.EM)("assist-pipeline-detail-stt")],p),t()}catch(h){t(h)}})},75902:function(e,t,a){a.a(e,async function(e,t){try{a(74423),a(3362),a(62953);var i=a(40445),o=a(5124),s=a(67576),n=a(22786),r=a(1087),l=a(18350),d=a(52763),h=a(58947),c=e([l,d]);[l,d]=c.then?(await c)():c;let u,p,g,v=e=>e;class m extends o.WF{render(){var e,t;return(0,o.qy)(u||(u=v` <div class="section"> <div class="content"> <div class="intro"> <h3> ${0} </h3> <p> ${0} </p> </div> <ha-form .schema="${0}" .data="${0}" .hass="${0}" .computeLabel="${0}" @supported-languages-changed="${0}"></ha-form> </div> ${0} </div> `),this.hass.localize("ui.panel.config.voice_assistants.assistants.pipeline.detail.steps.tts.title"),this.hass.localize("ui.panel.config.voice_assistants.assistants.pipeline.detail.steps.tts.description"),this._schema(null===(e=this.data)||void 0===e?void 0:e.language,this._supportedLanguages),this.data,this.hass,this._computeLabel,this._supportedLanguagesChanged,null!==(t=this.data)&&void 0!==t&&t.tts_engine?(0,o.qy)(p||(p=v`<div class="footer"> <ha-button @click="${0}"> ${0} </ha-button> </div>`),this._preview,this.hass.localize("ui.panel.config.voice_assistants.assistants.pipeline.detail.try_tts")):o.s6)}async _preview(){if(!this.data)return;const e=this.data.tts_engine,t=this.data.tts_language||void 0,a=this.data.tts_voice||void 0;e&&(0,h.a)(this,{engine:e,language:t,voice:a})}_supportedLanguagesChanged(e){var t,a,i;this._supportedLanguages=e.detail.value,null!==(t=this.data)&&void 0!==t&&t.tts_language&&null!==(a=this._supportedLanguages)&&void 0!==a&&a.includes(null===(i=this.data)||void 0===i?void 0:i.tts_language)||setTimeout(()=>{var e,t;const a=Object.assign({},this.data);a.tts_language=null!==(e=null===(t=this._supportedLanguages)||void 0===t?void 0:t[0])&&void 0!==e?e:null,(0,r.r)(this,"value-changed",{value:a})},0)}constructor(...e){super(...e),this._schema=(0,n.A)((e,t)=>[{name:"",type:"grid",schema:[{name:"tts_engine",selector:{tts:{language:e}}},null!=t&&t.length?{name:"tts_language",required:!0,selector:{language:{languages:t,no_sort:!0}}}:{name:"",type:"constant"},{name:"tts_voice",selector:{tts_voice:{}},context:{language:"tts_language",engineId:"tts_engine"},required:!0}]}]),this._computeLabel=e=>e.name?this.hass.localize(`ui.panel.config.voice_assistants.assistants.pipeline.detail.form.${e.name}`):""}}m.styles=(0,o.AH)(g||(g=v`.section{border:1px solid var(--divider-color);border-radius:var(--ha-border-radius-md)}.content{padding:16px}.intro{margin-bottom:16px}h3{font-size:var(--ha-font-size-xl);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-condensed);margin-top:0;margin-bottom:4px}p{color:var(--secondary-text-color);font-size:var(--mdc-typography-body2-font-size, var(--ha-font-size-s));margin-top:0;margin-bottom:0}.footer{border-top:1px solid var(--divider-color);padding:8px 16px}`)),(0,i.Cg)([(0,s.MZ)({attribute:!1})],m.prototype,"hass",void 0),(0,i.Cg)([(0,s.MZ)({attribute:!1})],m.prototype,"data",void 0),(0,i.Cg)([(0,s.wk)()],m.prototype,"_supportedLanguages",void 0),m=(0,i.Cg)([(0,s.EM)("assist-pipeline-detail-tts")],m),t()}catch(u){t(u)}})},92291:function(e,t,a){a.a(e,async function(e,t){try{a(18111),a(61701),a(13579),a(3362),a(62953);var i=a(40445),o=a(5124),s=a(67576),n=a(22786),r=a(1087),l=a(52763),d=a(81569),h=e([l]);l=(h.then?(await h)():h)[0];let c,u,p=e=>e;class g extends o.WF{willUpdate(e){var t,a,i,o;e.has("data")&&(null===(t=e.get("data"))||void 0===t?void 0:t.wake_word_entity)!==(null===(a=this.data)||void 0===a?void 0:a.wake_word_entity)&&(null!==(i=e.get("data"))&&void 0!==i&&i.wake_word_entity&&null!==(o=this.data)&&void 0!==o&&o.wake_word_id&&(0,r.r)(this,"value-changed",{value:Object.assign(Object.assign({},this.data),{},{wake_word_id:void 0})}),this._fetchWakeWords())}render(){return(0,o.qy)(c||(c=p` <div class="section"> <div class="content"> <div class="intro"> <h3> ${0} </h3> <p> ${0} </p> <ha-alert alert-type="info"> ${0} </ha-alert> </div> <ha-form .schema="${0}" .data="${0}" .hass="${0}" .computeLabel="${0}"></ha-form> </div> </div> `),this.hass.localize("ui.panel.config.voice_assistants.assistants.pipeline.detail.steps.wakeword.title"),this.hass.localize("ui.panel.config.voice_assistants.assistants.pipeline.detail.steps.wakeword.description"),this.hass.localize("ui.panel.config.voice_assistants.assistants.pipeline.detail.steps.wakeword.note"),this._schema(this._wakeWords),this.data,this.hass,this._computeLabel)}async _fetchWakeWords(){var e,t;if(this._wakeWords=void 0,null===(e=this.data)||void 0===e||!e.wake_word_entity)return;const a=this.data.wake_word_entity,i=await(0,d.$)(this.hass,a);var o;this.data.wake_word_entity===a&&(this._wakeWords=i.wake_words,!this.data||null!==(t=this.data)&&void 0!==t&&t.wake_word_id&&this._wakeWords.some(e=>e.id===this.data.wake_word_id)||(0,r.r)(this,"value-changed",{value:Object.assign(Object.assign({},this.data),{},{wake_word_id:null===(o=this._wakeWords[0])||void 0===o?void 0:o.id})}))}constructor(...e){super(...e),this._schema=(0,n.A)(e=>[{name:"",type:"grid",schema:[{name:"wake_word_entity",selector:{entity:{domain:"wake_word"}}},null!=e&&e.length?{name:"wake_word_id",required:!0,selector:{select:{mode:"dropdown",sort:!0,options:e.map(e=>({value:e.id,label:e.name}))}}}:{name:"",type:"constant"}]}]),this._computeLabel=e=>e.name?this.hass.localize(`ui.panel.config.voice_assistants.assistants.pipeline.detail.form.${e.name}`):""}}g.styles=(0,o.AH)(u||(u=p`.section{border:1px solid var(--divider-color);border-radius:var(--ha-border-radius-md)}.content{padding:16px}.intro{margin-bottom:16px}h3{font-size:var(--ha-font-size-xl);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-condensed);margin-top:0;margin-bottom:4px}p{color:var(--secondary-text-color);font-size:var(--mdc-typography-body2-font-size, var(--ha-font-size-s));margin-top:0;margin-bottom:0}a{color:var(--primary-color)}`)),(0,i.Cg)([(0,s.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,i.Cg)([(0,s.MZ)({attribute:!1})],g.prototype,"data",void 0),(0,i.Cg)([(0,s.wk)()],g.prototype,"_wakeWords",void 0),g=(0,i.Cg)([(0,s.EM)("assist-pipeline-detail-wakeword")],g),t()}catch(c){t(c)}})},43528:function(e,t,a){a.a(e,async function(e,i){try{a.r(t),a.d(t,{DialogVoiceAssistantPipelineDetail:function(){return A}});a(18111),a(7588),a(13579),a(3362),a(62953);var o=a(40445),s=a(5124),n=a(67576),r=a(22786),l=a(1087),d=a(71727),h=a(18350),c=(a(70947),a(52763)),u=a(26300),p=a(72554),g=(a(93444),a(69150)),v=a(14503),m=a(30057),_=a(3996),f=a(70398),b=a(75902),y=a(92291),w=a(90056),x=e([h,c,u,p,m,_,f,b,y,w]);[h,c,u,p,m,_,f,b,y,w]=x.then?(await x)():x;let $,C,k,P,L,E,z=e=>e;const S="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";class A extends s.WF{showDialog(e){var t,a,i;if(this._params=e,this._open=!0,this._error=void 0,this._cloudActive=this._params.cloudActiveSubscription,this._params.pipeline&&"id"in this._params.pipeline&&this._params.pipeline.id)return this._data=Object.assign({prefer_local_intents:!1},this._params.pipeline),void(this._hideWakeWord=this._params.hideWakeWord||!this._data.wake_word_entity);let o,s;if(this._hideWakeWord=!0,this._cloudActive)for(const n of Object.values(this.hass.entities))if("cloud"===n.platform)if("stt"===(0,d.m)(n.entity_id)){if(o=n.entity_id,s)break}else if("tts"===(0,d.m)(n.entity_id)&&(s=n.entity_id,o))break;this._data=Object.assign(Object.assign({},this._params.pipeline||{}),{},{language:(null===(t=this._params.pipeline)||void 0===t?void 0:t.language)||(this.hass.config.language||this.hass.locale.language).substring(0,2),stt_engine:(null===(a=this._params.pipeline)||void 0===a?void 0:a.stt_engine)||o,tts_engine:(null===(i=this._params.pipeline)||void 0===i?void 0:i.tts_engine)||s})}closeDialog(){this._open=!1}_dialogClosed(){this._params=void 0,this._data=void 0,this._hideWakeWord=!1,(0,l.r)(this,"dialog-closed",{dialog:this.localName})}firstUpdated(){this._getSupportedLanguages()}async _getSupportedLanguages(){const{languages:e}=await(0,g.ds)(this.hass);this._supportedLanguages=e}render(){var e;if(!this._params||!this._data)return s.s6;const t=this._params.pipeline&&"id"in this._params.pipeline&&!!this._params.pipeline.id,a=t&&null!==(e=this._params.pipeline)&&void 0!==e&&e.name?this._params.pipeline.name:this.hass.localize("ui.panel.config.voice_assistants.assistants.pipeline.detail.add_assistant_title");return(0,s.qy)($||($=z` <ha-dialog .open="${0}" header-title="${0}" prevent-scrim-close @closed="${0}"> ${0} <div class="content"> ${0} <assist-pipeline-detail-config .hass="${0}" .data="${0}" .supportedLanguages="${0}" keys="name,language" @value-changed="${0}" ?autofocus="${0}"></assist-pipeline-detail-config> <assist-pipeline-detail-conversation .hass="${0}" .data="${0}" keys="conversation_engine,conversation_language,prefer_local_intents" @value-changed="${0}"></assist-pipeline-detail-conversation> ${0} <assist-pipeline-detail-stt .hass="${0}" .data="${0}" keys="stt_engine,stt_language" @value-changed="${0}"></assist-pipeline-detail-stt> <assist-pipeline-detail-tts .hass="${0}" .data="${0}" keys="tts_engine,tts_language,tts_voice" @value-changed="${0}"></assist-pipeline-detail-tts> ${0} </div> <ha-dialog-footer slot="footer"> <ha-button slot="secondaryAction" appearance="plain" @click="${0}"> ${0} </ha-button> <ha-button slot="primaryAction" @click="${0}" .loading="${0}"> ${0} </ha-button> </ha-dialog-footer> </ha-dialog> `),this._open,a,this._dialogClosed,this._hideWakeWord&&!this._params.hideWakeWord&&this._hasWakeWorkEntities(this.hass.states)?(0,s.qy)(C||(C=z`<ha-dropdown slot="headerActionItems" @wa-select="${0}" placement="bottom-end"> <ha-icon-button .path="${0}" slot="trigger"></ha-icon-button> <ha-dropdown-item value="show_wake_word"> ${0} </ha-dropdown-item></ha-dropdown>`),this._handleDropdownSelect,S,this.hass.localize("ui.panel.config.voice_assistants.assistants.pipeline.detail.add_streaming_wake_word")):s.s6,this._error?(0,s.qy)(k||(k=z`<ha-alert alert-type="error">${0}</ha-alert>`),this._error):s.s6,this.hass,this._data,this._supportedLanguages,this._valueChanged,!t,this.hass,this._data,this._valueChanged,this._cloudActive||"cloud"!==this._data.tts_engine&&"cloud"!==this._data.stt_engine?s.s6:(0,s.qy)(P||(P=z` <ha-alert alert-type="warning"> ${0} <ha-button size="small" href="/config/cloud" slot="action"> ${0} </ha-button> </ha-alert> `),this.hass.localize("ui.panel.config.voice_assistants.assistants.pipeline.detail.no_cloud_message"),this.hass.localize("ui.panel.config.voice_assistants.assistants.pipeline.detail.no_cloud_action")),this.hass,this._data,this._valueChanged,this.hass,this._data,this._valueChanged,this._hideWakeWord?s.s6:(0,s.qy)(L||(L=z`<assist-pipeline-detail-wakeword .hass="${0}" .data="${0}" keys="wake_word_entity,wake_word_id" @value-changed="${0}"></assist-pipeline-detail-wakeword>`),this.hass,this._data,this._valueChanged),this.closeDialog,this.hass.localize("ui.common.cancel"),this._updatePipeline,this._submitting,t?this.hass.localize("ui.panel.config.voice_assistants.assistants.pipeline.detail.update_assistant_action"):this.hass.localize("ui.panel.config.voice_assistants.assistants.pipeline.detail.add_assistant_action"))}_handleDropdownSelect(e){var t;"show_wake_word"===(null===(t=e.detail)||void 0===t||null===(t=t.item)||void 0===t?void 0:t.value)&&(this._hideWakeWord=!1)}_valueChanged(e){this._error=void 0;const t={};e.currentTarget.getAttribute("keys").split(",").forEach(a=>{t[a]=e.detail.value[a]}),this._data=Object.assign(Object.assign({},this._data),t)}async _updatePipeline(){this._submitting=!0;try{var e,t,a,i,o,s,n,r,l;const d=this._data,h={name:d.name,language:d.language,conversation_engine:d.conversation_engine,conversation_language:null!==(e=d.conversation_language)&&void 0!==e?e:null,prefer_local_intents:null===(t=d.prefer_local_intents)||void 0===t||t,stt_engine:null!==(a=d.stt_engine)&&void 0!==a?a:null,stt_language:null!==(i=d.stt_language)&&void 0!==i?i:null,tts_engine:null!==(o=d.tts_engine)&&void 0!==o?o:null,tts_language:null!==(s=d.tts_language)&&void 0!==s?s:null,tts_voice:null!==(n=d.tts_voice)&&void 0!==n?n:null,wake_word_entity:null!==(r=d.wake_word_entity)&&void 0!==r?r:null,wake_word_id:null!==(l=d.wake_word_id)&&void 0!==l?l:null};this._params.pipeline&&"id"in this._params.pipeline&&this._params.pipeline.id&&this._params.updatePipeline?await this._params.updatePipeline(h):this._params.createPipeline?await this._params.createPipeline(h):console.error("No createPipeline function provided"),this.closeDialog()}catch(d){this._error=(null==d?void 0:d.message)||"Unknown error"}finally{this._submitting=!1}}static get styles(){return[v.nA,(0,s.AH)(E||(E=z`.content>:not(:last-child){margin-bottom:16px;display:block}ha-alert{margin-bottom:16px;display:block}a{text-decoration:none}`))]}constructor(...e){super(...e),this._open=!1,this._hideWakeWord=!1,this._submitting=!1,this._hasWakeWorkEntities=(0,r.A)(e=>Object.keys(e).some(e=>e.startsWith("wake_word.")))}}(0,o.Cg)([(0,n.MZ)({attribute:!1})],A.prototype,"hass",void 0),(0,o.Cg)([(0,n.wk)()],A.prototype,"_params",void 0),(0,o.Cg)([(0,n.wk)()],A.prototype,"_open",void 0),(0,o.Cg)([(0,n.wk)()],A.prototype,"_data",void 0),(0,o.Cg)([(0,n.wk)()],A.prototype,"_hideWakeWord",void 0),(0,o.Cg)([(0,n.wk)()],A.prototype,"_cloudActive",void 0),(0,o.Cg)([(0,n.wk)()],A.prototype,"_error",void 0),(0,o.Cg)([(0,n.wk)()],A.prototype,"_submitting",void 0),(0,o.Cg)([(0,n.wk)()],A.prototype,"_supportedLanguages",void 0),A=(0,o.Cg)([(0,n.EM)("dialog-voice-assistant-pipeline-detail")],A),i()}catch($){i($)}})},22348:function(e,t,a){a.d(t,{V:function(){return o}});var i=a(37177);const o=e=>!!e&&i.n},37177:function(e,t,a){a.d(t,{n:function(){return i}});a(27495);const i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}}]);