iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
6 lines • 22.3 kB
JavaScript
/*! For license information please see 9979.a0056438aa91ecef.js.LICENSE.txt */
export const __webpack_ids__=["9979"];export const __webpack_modules__={95198:function(e,i,t){var o=t(44249),n=t(57243),a=t(15093);(0,o.Z)([(0,a.Mo)("ha-dialog-header")],(function(e,i){return{F:class extends i{constructor(...i){super(...i),e(this)}},d:[{kind:"method",key:"render",value:function(){return n.dy` <header class="header"> <div class="header-bar"> <section class="header-navigation-icon"> <slot name="navigationIcon"></slot> </section> <section class="header-content"> <div class="header-title"> <slot name="title"></slot> </div> <div class="header-subtitle"> <slot name="subtitle"></slot> </div> </section> <section class="header-action-items"> <slot name="actionItems"></slot> </section> </div> <slot></slot> </header> `}},{kind:"get",static:!0,key:"styles",value:function(){return[n.iv`: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:flex-start;padding:4px;box-sizing:border-box}.header-content{flex:1;padding:10px 4px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.header-title{font-size:22px;line-height:28px;font-weight:400}.header-subtitle{font-size:14px;line-height:20px;color:var(--secondary-text-color)} all and (min-width:450px) and (min-height:500px){.header-bar{padding:12px}}.header-navigation-icon{flex:none;min-width:8px;height:100%;display:flex;flex-direction:row}.header-action-items{flex:none;min-width:8px;height:100%;display:flex;flex-direction:row}`]}}]}}),n.oi)},73729:function(e,i,t){t.d(i,{i:()=>h});var o=t(44249),n=t(72621),a=t(74966),s=t(51408),d=t(57243),r=t(15093),l=t(76525);t(23334);const c=["button","ha-list-item"],h=(e,i)=>d.dy` <div class="header_title"> <ha-icon-button .label="${e?.localize("ui.common.close")??"Close"}" .path="${"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"}" dialogAction="close" class="header_button"></ha-icon-button> <span>${i}</span> </div> `;(0,o.Z)([(0,r.Mo)("ha-dialog")],(function(e,i){class t extends i{constructor(...i){super(...i),e(this)}}return{F:t,d:[{kind:"field",key:l.gA,value:void 0},{kind:"method",key:"scrollToPos",value:function(e,i){this.contentElement?.scrollTo(e,i)}},{kind:"method",key:"renderHeading",value:function(){return d.dy`<slot name="heading"> ${(0,n.Z)(t,"renderHeading",this,3)([])} </slot>`}},{kind:"method",key:"firstUpdated",value:function(){(0,n.Z)(t,"firstUpdated",this,3)([]),this.suppressDefaultPressSelector=[this.suppressDefaultPressSelector,c].join(", "),this._updateScrolledAttribute(),this.contentElement?.addEventListener("scroll",this._onScroll,{passive:!0})}},{kind:"method",key:"disconnectedCallback",value:function(){(0,n.Z)(t,"disconnectedCallback",this,3)([]),this.contentElement.removeEventListener("scroll",this._onScroll)}},{kind:"field",key:"_onScroll",value(){return()=>{this._updateScrolledAttribute()}}},{kind:"method",key:"_updateScrolledAttribute",value:function(){this.contentElement&&this.toggleAttribute("scrolled",0!==this.contentElement.scrollTop)}},{kind:"field",static:!0,key:"styles",value:()=>[s.W,d.iv`:host([scrolled]) ::slotted(ha-dialog-header){border-bottom:1px solid var(--mdc-dialog-scroll-divider-color,rgba(0,0,0,.12))}.mdc-dialog{--mdc-dialog-scroll-divider-color:var(
--dialog-scroll-divider-color,
var(--divider-color)
);z-index:var(--dialog-z-index,8);-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));--mdc-dialog-box-shadow:var(--dialog-box-shadow, none);--mdc-typography-headline6-font-weight:400;--mdc-typography-headline6-font-size:1.574rem}.mdc-dialog__actions{justify-content:var(--justify-action-buttons,flex-end);padding-bottom:max(env(safe-area-inset-bottom),24px)}.mdc-dialog__actions span:first-child{flex:var(--secondary-action-button-flex,unset)}.mdc-dialog__actions span:nth-child(2){flex:var(--primary-action-button-flex,unset)}.mdc-dialog__container{align-items:var(--vertical-align-dialog,center)}.mdc-dialog__title{padding:24px 24px 0 24px}.mdc-dialog__title:has(span){padding:12px 12px 0}.mdc-dialog__actions{padding:12px 24px 12px 24px}.mdc-dialog__title::before{content:unset}.mdc-dialog .mdc-dialog__content{position:var(--dialog-content-position,relative);padding:var(--dialog-content-padding,24px)}:host([hideactions]) .mdc-dialog .mdc-dialog__content{padding-bottom:max(var(--dialog-content-padding,24px),env(safe-area-inset-bottom))}.mdc-dialog .mdc-dialog__surface{position:var(--dialog-surface-position,relative);top:var(--dialog-surface-top);margin-top:var(--dialog-surface-margin-top);min-height:var(--mdc-dialog-min-height,auto);border-radius:var(--ha-dialog-border-radius,28px);-webkit-backdrop-filter:var(--ha-dialog-surface-backdrop-filter,none);backdrop-filter:var(--ha-dialog-surface-backdrop-filter,none);background:var(--ha-dialog-surface-background,var(--mdc-theme-surface,#fff))}:host([flexContent]) .mdc-dialog .mdc-dialog__content{display:flex;flex-direction:column}.header_title{display:flex;align-items:center;direction:var(--direction)}.header_title span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;padding-left:4px}.header_button{text-decoration:none;color:inherit;inset-inline-start:initial;inset-inline-end:-12px;direction:var(--direction)}.dialog-actions{inset-inline-start:initial!important;inset-inline-end:0px!important;direction:var(--direction)}`]}]}}),a.M)},86614:function(e,i,t){t.a(e,(async function(e,o){try{t.r(i);var n=t(44249),a=t(57243),s=t(15093),d=t(36522),r=t(49976),l=(t(59826),t(34273),t(73729),t(95198),t(23334),t(28008)),c=t(58885),h=t(32930),u=t(16815),g=e([u]);u=(g.then?(await g)():g)[0];const m="M12,15C7.58,15 4,16.79 4,19V21H20V19C20,16.79 16.42,15 12,15M8,9A4,4 0 0,0 12,13A4,4 0 0,0 16,9M11.5,2C11.2,2 11,2.21 11,2.5V5.5H10V3C10,3 7.75,3.86 7.75,6.75C7.75,6.75 7,6.89 7,8H17C16.95,6.89 16.25,6.75 16.25,6.75C16.25,3.86 14,3 14,3V5.5H13V2.5C13,2.21 12.81,2 12.5,2H11.5Z",f="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",p="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",v="M3 6V8H14V6H3M3 10V12H14V10H3M20 10.1C19.9 10.1 19.7 10.2 19.6 10.3L18.6 11.3L20.7 13.4L21.7 12.4C21.9 12.2 21.9 11.8 21.7 11.6L20.4 10.3C20.3 10.2 20.2 10.1 20 10.1M18.1 11.9L12 17.9V20H14.1L20.2 13.9L18.1 11.9M3 14V16H10V14H3Z";(0,n.Z)([(0,s.Mo)("dialog-dashboard-strategy-editor")],(function(e,i){return{F:class extends i{constructor(...i){super(...i),e(this)}},d:[{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,s.SB)()],key:"_params",value:void 0},{kind:"field",decorators:[(0,s.SB)()],key:"_strategyConfig",value:void 0},{kind:"field",decorators:[(0,s.SB)()],key:"_GUImode",value:()=>!0},{kind:"field",decorators:[(0,s.SB)()],key:"_guiModeAvailable",value:()=>!0},{kind:"field",decorators:[(0,s.IO)("hui-dashboard-strategy-element-editor")],key:"_strategyEditorEl",value:void 0},{kind:"method",key:"showDialog",value:async function(e){this._params=e,this._strategyConfig=e.config.strategy,await this.updateComplete}},{kind:"method",key:"closeDialog",value:function(){this._params=void 0,this._strategyConfig=void 0,this._guiModeAvailable=!0,this._GUImode=!0,(0,d.B)(this,"dialog-closed",{dialog:this.localName})}},{kind:"method",key:"_handleConfigChanged",value:function(e){e.stopPropagation(),this._guiModeAvailable=e.detail.guiModeAvailable,this._strategyConfig=e.detail.config}},{kind:"method",key:"_handleGUIModeChanged",value:function(e){e.stopPropagation(),this._GUImode=e.detail.guiMode,this._guiModeAvailable=e.detail.guiModeAvailable}},{kind:"method",key:"_opened",value:function(){this._strategyEditorEl?.focusYamlEditor()}},{kind:"method",key:"_save",value:async function(){await this._params.saveConfig({...this._params.config,strategy:this._strategyConfig}),(0,c.f)(this,this.hass),this.closeDialog()}},{kind:"method",key:"_delete",value:async function(e){e.stopPropagation(),await this._params.deleteDashboard()&&this.closeDialog()}},{kind:"method",key:"_cancel",value:function(e){e.stopPropagation(),this.closeDialog()}},{kind:"method",key:"_handleAction",value:function(e){switch(e.stopPropagation(),e.detail.index){case 0:this._toggleMode();break;case 1:this._takeControl()}}},{kind:"method",key:"_toggleMode",value:function(){this._strategyEditorEl?.toggleMode()}},{kind:"method",key:"_takeControl",value:function(){this._params.takeControl(),this.closeDialog()}},{kind:"method",key:"render",value:function(){if(!this._params||!this._strategyConfig)return a.Ld;const e=(0,h.n2)(this._strategyConfig),i=this.hass.localize("ui.panel.lovelace.editor.strategy-editor.header");return a.dy` <ha-dialog open ="${this.closeDialog}" scrimClickAction escapeKeyAction ="${this._opened}" .heading="${i||"-"}"> <ha-dialog-header slot="heading"> <ha-icon-button slot="navigationIcon" dialogAction="cancel" .label="${this.hass.localize("ui.common.close")}" .path="${f}"></ha-icon-button> <span slot="title" .title="${i}">${i}</span> <ha-button-menu corner="BOTTOM_END" menu-corner="END" slot="actionItems" ="${r.U}" fixed ="${this._handleAction}"> <ha-icon-button slot="trigger" .label="${this.hass.localize("ui.common.menu")}" .path="${p}"></ha-icon-button> <ha-list-item graphic="icon" .disabled="${!this._guiModeAvailable&&!this._GUImode}"> ${this.hass.localize("ui.panel.lovelace.editor.edit_view.edit_"+(this._GUImode?"yaml":"ui"))} <ha-svg-icon slot="graphic" .path="${v}"></ha-svg-icon> </ha-list-item> <ha-list-item graphic="icon"> ${this.hass.localize("ui.panel.lovelace.editor.strategy-editor.take_control")} <ha-svg-icon slot="graphic" .path="${m}"></ha-svg-icon> </ha-list-item> </ha-button-menu> </ha-dialog-header> <div class="content"> <hui-dashboard-strategy-element-editor .hass="${this.hass}" .lovelace="${this._params.config}" .value="${e}" -changed="${this._handleConfigChanged}" -changed="${this._handleGUIModeChanged}" dialogInitialFocus></hui-dashboard-strategy-element-editor> </div> <ha-button class="danger" ="${this._delete}" slot="secondaryAction"> ${this.hass.localize("ui.common.delete")} </ha-button> <ha-button ="${this._cancel}" slot="primaryAction"> ${this.hass.localize("ui.common.cancel")} </ha-button> <ha-button ="${this._save}" slot="primaryAction"> ${this.hass.localize("ui.common.save")} </ha-button> </ha-dialog> `}},{kind:"get",static:!0,key:"styles",value:function(){return[l.yu,a.iv`ha-dialog{--dialog-content-padding:0 24px;--dialog-surface-position:fixed;--dialog-surface-top:40px;--mdc-dialog-min-width:min(600px, calc(100% - 32px));--mdc-dialog-max-width:calc(100% - 32px);--mdc-dialog-max-height:calc(100% - 80px)} all and (max-width:450px),all and (max-height:500px){ha-dialog{height:100%;--dialog-surface-top:0px;--mdc-dialog-min-width:100%;--mdc-dialog-max-width:100%;--mdc-dialog-max-height:100%;--dialog-content-padding:8px}}.danger{--mdc-theme-primary:var(--error-color)}`]}}]}}),a.oi);o()}catch(e){o(e)}}))},16815:function(e,i,t){t.a(e,(async function(e,i){try{var o=t(44249),n=t(15093),a=t(28421),s=t(6973),d=e([s]);s=(d.then?(await d)():d)[0];(0,o.Z)([(0,n.Mo)("hui-dashboard-strategy-element-editor")],(function(e,i){return{F:class extends i{constructor(...i){super(...i),e(this)}},d:[{kind:"method",key:"getConfigElement",value:async function(){const e=await(0,a.lN)("dashboard",this.configElementType);if(e&&e.getConfigElement)return e.getConfigElement()}}]}}),s.k);i()}catch(e){i(e)}}))},32012:function(e,i,t){t.d(i,{e:()=>o});class o extends Error{constructor(e,i,t){super(e),this.warnings=void 0,this.errors=void 0,this.name="GUISupportError",this.warnings=i,this.errors=t}}},43299:function(e,i,t){t.a(e,(async function(e,o){try{t.d(i,{O:()=>p});var n=t(44249),a=t(72621),s=(t(9359),t(31526),t(70104),t(57243)),d=t(15093),r=t(67064),l=t(36522),c=t(22381),h=t(41680),u=t(48045),g=(t(99426),t(17170)),m=(t(64889),t(32012)),f=e([g]);g=(f.then?(await f)():f)[0];let p=(0,n.Z)(null,(function(e,i){class o extends i{constructor(...i){super(...i),e(this)}}return{F:o,d:[{kind:"field",decorators:[(0,d.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,d.Cb)({attribute:!1})],key:"lovelace",value:void 0},{kind:"field",decorators:[(0,d.Cb)({attribute:!1})],key:"context",value:void 0},{kind:"field",decorators:[(0,d.SB)()],key:"_config",value:void 0},{kind:"field",decorators:[(0,d.SB)()],key:"_configElement",value:void 0},{kind:"field",decorators:[(0,d.SB)()],key:"_subElementEditorConfig",value:void 0},{kind:"field",decorators:[(0,d.SB)()],key:"_guiMode",value:()=>!0},{kind:"field",decorators:[(0,d.SB)()],key:"_errors",value:void 0},{kind:"field",decorators:[(0,d.SB)()],key:"_pendingYamlError",value:void 0},{kind:"field",decorators:[(0,d.SB)()],key:"_yamlError",value:()=>!1},{kind:"field",decorators:[(0,d.SB)()],key:"_warnings",value:void 0},{kind:"field",decorators:[(0,d.SB)()],key:"_guiSupported",value:void 0},{kind:"field",decorators:[(0,d.SB)()],key:"_loading",value:()=>!1},{kind:"field",decorators:[(0,d.IO)("ha-yaml-editor")],key:"_yamlEditor",value:void 0},{kind:"get",key:"value",value:function(){return this._config}},{kind:"set",key:"value",value:function(e){this._config&&(0,u.v)(e,this._config)||(this._config=e,this._errors=void 0,this._setConfig())}},{kind:"method",key:"_setConfig",value:function(){if(!this._errors)try{this._updateConfigElement()}catch(e){this._errors=[e.message]}this.updateComplete.then((()=>{(0,l.B)(this,"config-changed",{config:this.value,error:this._errors?.join(", "),guiModeAvailable:!(this.hasWarning||this.hasError||!1===this._guiSupported)})}))}},{kind:"get",key:"hasWarning",value:function(){return void 0!==this._warnings&&this._warnings.length>0}},{kind:"get",key:"hasError",value:function(){return void 0!==this._errors&&this._errors.length>0}},{kind:"get",key:"GUImode",value:function(){return this._guiMode}},{kind:"set",key:"GUImode",value:function(e){this._guiMode=e,this.updateComplete.then((()=>{(0,l.B)(this,"GUImode-changed",{guiMode:e,guiModeAvailable:!(this.hasWarning||this.hasError||!1===this._guiSupported)})}))}},{kind:"method",key:"toggleMode",value:function(){this.GUImode=!this.GUImode}},{kind:"method",key:"focusYamlEditor",value:function(){this._configElement?.focusYamlEditor&&this._configElement.focusYamlEditor(),this._yamlEditor&&this._yamlEditor.focus()}},{kind:"method",key:"getConfigElement",value:async function(){}},{kind:"method",key:"getConfigForm",value:async function(){}},{kind:"method",key:"renderConfigElement",value:function(){return s.dy`${this._configElement}`}},{kind:"method",key:"_renderSubElement",value:function(){return s.dy` <hui-sub-element-editor .hass="${this.hass}" .config="${this._subElementEditorConfig}" -back="${this._goBack}" -changed="${this._subElementChanged}"> </hui-sub-element-editor> `}},{kind:"method",key:"_subElementChanged",value:function(e){e.stopPropagation();const i=e.detail.config;this._subElementEditorConfig={...this._subElementEditorConfig,elementConfig:i},this._subElementEditorConfig.saveElementConfig?.(i)}},{kind:"method",key:"_goBack",value:function(e){e.stopPropagation(),this._subElementEditorConfig=void 0}},{kind:"method",key:"_editSubElement",value:async function(e){e.stopPropagation(),await Promise.all([t.e("91552"),t.e("78456"),t.e("56898"),t.e("35671"),t.e("92139"),t.e("32146"),t.e("37602"),t.e("18865"),t.e("88975"),t.e("79931"),t.e("44251"),t.e("65005"),t.e("60487"),t.e("3371"),t.e("38326"),t.e("10745"),t.e("16912"),t.e("92368"),t.e("95444"),t.e("8754"),t.e("54291"),t.e("76986")]).then(t.bind(t,50357)),this._subElementEditorConfig={type:e.detail.type,elementConfig:e.detail.config,context:e.detail.context,saveElementConfig:e.detail.saveConfig}}},{kind:"method",key:"render",value:function(){return s.dy` <div class="wrapper"> ${this.GUImode?s.dy` <div class="gui-editor" -sub-element="${this._editSubElement}"> ${this._loading?s.dy` <ha-spinner class="center margin-bot"></ha-spinner> `:(0,r.F)(this._subElementEditorConfig?this._renderSubElement():this.renderConfigElement())} </div> `:s.dy` <div class="yaml-editor"> <ha-yaml-editor .defaultValue="${this._config}" autofocus .hass="${this.hass}" -changed="${this._handleYAMLChanged}" ="${this._onBlurYaml}" ="${this._ignoreKeydown}" dir="ltr"></ha-yaml-editor> </div> `} ${!1===this._guiSupported&&!1===this._loading?s.dy` <ha-alert alert-type="info" .title="${this.hass.localize("ui.errors.config.visual_editor_not_supported")}"> ${this.hass.localize("ui.errors.config.visual_editor_not_supported_reason_type")} <br> ${this.hass.localize("ui.errors.config.edit_in_yaml_supported")} </ha-alert> `:s.Ld} ${this.hasError?s.dy` <ha-alert alert-type="error" .title="${this.hass.localize("ui.errors.config.configuration_error")}"> <ul> ${this._errors.map((e=>s.dy`<li>${e}</li>`))} </ul> </ha-alert> `:s.Ld} ${this.hasWarning?s.dy` <ha-alert alert-type="warning" .title="${this.hass.localize("ui.errors.config.visual_editor_not_supported")}"> <ul> ${this._warnings.map((e=>s.dy`<li>${e}</li>`))} </ul> ${this.hass.localize("ui.errors.config.edit_in_yaml_supported")} </ha-alert> `:s.Ld} </div> `}},{kind:"method",key:"updated",value:function(e){(0,a.Z)(o,"updated",this,3)([e]),this._configElement&&e.has("hass")&&(this._configElement.hass=this.hass),this._configElement&&"lovelace"in this._configElement&&e.has("lovelace")&&(this._configElement.lovelace=this.lovelace),this._configElement&&e.has("context")&&(this._configElement.context=this.context)}},{kind:"method",key:"_handleUIConfigChanged",value:function(e){if(e.stopPropagation(),!this.GUImode)return;const i=e.detail.config;Object.keys(i).forEach((e=>{void 0===i[e]&&delete i[e]})),this.value=i}},{kind:"method",key:"_handleYAMLChanged",value:function(e){e.stopPropagation();const i=e.detail.value;e.detail.isValid?(this._config=i,this._errors=void 0,this._pendingYamlError=void 0,this._yamlError=!1,this._debounceYamlError.cancel(),this._setConfig()):this._yamlError?this._errors=[e.detail.errorMsg]:(this._pendingYamlError=e.detail.errorMsg,this._debounceYamlError())}},{kind:"field",key:"_debounceYamlError",value(){return(0,c.D)((()=>{this._pendingYamlError&&(this._yamlError=!0,this._errors=[this._pendingYamlError],this._pendingYamlError=void 0,this._setConfig())}),2e3)}},{kind:"method",key:"_onBlurYaml",value:function(){this._debounceYamlError.cancel(),this._pendingYamlError&&(this._yamlError=!0,this._errors=[this._pendingYamlError],this._pendingYamlError=void 0,this._setConfig())}},{kind:"method",key:"unloadConfigElement",value:async function(){this._configElement=void 0,this._guiSupported=void 0}},{kind:"method",key:"loadConfigElement",value:async function(){if(this._configElement)return;let e=await this.getConfigElement();if(!e){const i=await this.getConfigForm();if(i){await t.e("10106").then(t.bind(t,66374)),e=document.createElement("hui-form-editor");const{schema:o,assertConfig:n,computeLabel:a,computeHelper:s}=i;e.schema=o,a&&(e.computeLabel=a),s&&(e.computeHelper=s),n&&(e.assertConfig=n)}}e?(e.hass=this.hass,"lovelace"in e&&(e.lovelace=this.lovelace),e.context=this.context,e.addEventListener("config-changed",(e=>this._handleUIConfigChanged(e))),this._guiSupported=!0):this._guiSupported=!1,this._configElement=e}},{kind:"method",key:"_updateConfigElement",value:async function(){if(this.value)try{if(this._errors=void 0,this._warnings=void 0,await this.loadConfigElement(),this._configElement)try{this._configElement.setConfig(this.value)}catch(e){const i=(0,h.p)(this.hass,e);throw new m.e("Config is not supported",i.warnings,i.errors)}else this._guiSupported=!1,this.GUImode=!1}catch(e){e instanceof m.e?(this._warnings=e.warnings??[e.message],this._errors=e.errors||void 0):this._errors=[e.message],this.GUImode=!1}finally{this._loading=!1}}},{kind:"method",key:"_ignoreKeydown",value:function(e){e.stopPropagation()}},{kind:"field",static:!0,key:"styles",value:()=>s.iv`:host{display:flex}.wrapper{width:100%}.gui-editor,.yaml-editor{padding:8px 0px}ha-code-editor{--code-mirror-max-height:calc(100vh - 245px)}ha-spinner{display:block;margin:auto}`}]}}),s.oi);o()}catch(e){o(e)}}))},6973:function(e,i,t){t.a(e,(async function(e,o){try{t.d(i,{k:()=>l});var n=t(44249),a=t(72621),s=t(15093),d=t(43299),r=e([d]);d=(r.then?(await r)():r)[0];let l=(0,n.Z)(null,(function(e,i){class t extends i{constructor(...i){super(...i),e(this)}}return{F:t,d:[{kind:"field",decorators:[(0,s.SB)()],key:"_configElementType",value:void 0},{kind:"get",key:"configElementType",value:function(){return this.value?this.value.type:void 0}},{kind:"method",key:"loadConfigElement",value:async function(){if(this._configElementType!==this.configElementType){if(this.unloadConfigElement(),!this.configElementType)throw new Error(this.hass.localize("ui.errors.config.no_type_provided"));this._configElementType=this.configElementType}return(0,a.Z)(t,"loadConfigElement",this,3)([])}}]}}),d.O);o()}catch(e){o(e)}}))},58885:function(e,i,t){t.d(i,{f:()=>n});var o=t(72473);const n=(e,i)=>(0,o.C)(e,{message:i.localize("ui.common.successfully_saved")})},67064:function(e,i,t){t.d(i,{F:()=>d});var o=t(2841),n=t(45779),a=t(53232);const s=e=>(0,a.dZ)(e)?e._$litType$.h:e.strings,d=(0,n.XM)(class extends n.Xe{constructor(e){super(e),this.tt=new WeakMap}render(e){return[e]}update(e,[i]){const t=(0,a.hN)(this.et)?s(this.et):null,n=(0,a.hN)(i)?s(i):null;if(null!==t&&(null===n||t!==n)){const i=(0,a.i9)(e).pop();let n=this.tt.get(t);if(void 0===n){const e=document.createDocumentFragment();n=(0,o.sY)(o.Ld,e),n.setConnected(!1),this.tt.set(t,n)}(0,a.hl)(n,[i]),(0,a._Y)(n,void 0,i)}if(null!==n){if(null===t||t!==n){const i=this.tt.get(n);if(void 0!==i){const t=(0,a.i9)(i).pop();(0,a.E_)(e),(0,a._Y)(e,void 0,t),(0,a.hl)(e,[t])}}this.et=i}else this.et=void 0;return this.render(i)}})}};
//# sourceMappingURL=9979.a0056438aa91ecef.js.map