${t.map(t=>P`${t}`)}${e.map(t=>P`${t}`)}${ri("editor.compact_view")}
${ri("editor.show_name")}
${ri("editor.show_status")}
${ri("editor.show_toolbar")}
${ri("editor.code_only_note")} `}_valueChanged(t){if(!this._config||!this.hass)return;const e=t.target;this["_"+e.configValue]!==e.value&&(e.configValue&&(""===e.value?delete this._config[e.configValue]:this._config={...this._config,[e.configValue]:void 0!==e.checked?e.checked:e.value}),at(this,"config-changed",{config:this._config}))}static get styles(){return r`.card-config paper-dropdown-menu{width:100%}.option{display:flex;align-items:center}.option ha-switch{margin-right:10px}`}}),function(t="ha-template"){customElements.get(t)||customElements.define(t,ot)}(),console.info("%c VACUUM-CARD %c 2.5.3 ","color: white; background: blue; font-weight: 700;","color: blue; background: white; font-weight: 700;"),customElements.get("ha-icon-button")||customElements.define("ha-icon-button",class extends(customElements.get("paper-icon-button")){});customElements.define("vacuum-card",class extends Y{static get properties(){return{hass:Object,config:Object,requestInProgress:Boolean}}static get styles(){return ni}static async getConfigElement(){return document.createElement("vacuum-card-editor")}static getStubConfig(t,e){const[a]=e.filter(t=>"vacuum"===t.substr(0,t.indexOf(".")));return{entity:a||"",image:"default"}}get entity(){return this.hass.states[this.config.entity]}get map(){return this.hass?this.hass.states[this.config.map]:null}get image(){return"default"===this.config.image?si:this.config.image||si}get showName(){return void 0===this.config.show_name||this.config.show_name}get showStatus(){return void 0===this.config.show_status||this.config.show_status}get showToolbar(){return void 0===this.config.show_toolbar||this.config.show_toolbar}get compactView(){return void 0!==this.config.compact_view&&this.config.compact_view}setConfig(t){if(!t.entity)throw new Error(ri("error.missing_entity"));const e=t.actions;e&&Array.isArray(e)&&console.warn(ri("warning.actions_array")),this.config=t}getCardSize(){return this.config.compact_view?3:8}shouldUpdate(t){return function(t,e,a){if(e.has("config")||a)return!0;if(t.config.entity){var o=e.get("hass");return!o||o.states[t.config.entity]!==t.hass.states[t.config.entity]}return!1}(this,t)}updated(t){t.get("hass")&&t.get("hass").states[this.config.entity].state!==this.hass.states[this.config.entity].state&&(this.requestInProgress=!1)}connectedCallback(){super.connectedCallback(),!this.compactView&&this.map&&(this.requestUpdate(),this.thumbUpdater=setInterval(()=>this.requestUpdate(),1e3*(this.config.map_refresh||5)))}disconnectedCallback(){super.disconnectedCallback(),this.map&&clearInterval(this.thumbUpdater)}handleMore(t=this.entity.entity_id){at(this,"hass-more-info",{entityId:t},{bubbles:!1,composed:!0})}handleSpeed(t){const e=t.target.getAttribute("value");this.callService("set_fan_speed",{isRequest:!1},{fan_speed:e})}handleAction(t,e={isRequest:!0}){const a=this.config.actions||{};return()=>{a[t]?this.callAction(a[t]):this.callService(e.defaultService||t,{isRequest:e.isRequest})}}callService(t,e={isRequest:!0},a={}){this.hass.callService("vacuum",t,{entity_id:this.config.entity,...a}),e.isRequest&&(this.requestInProgress=!0,this.requestUpdate())}callAction(t){const{service:e,service_data:a}=t,[o,i]=e.split(".");this.hass.callService(o,i,a)}getAttributes(t){const{status:e,state:a,fan_speed:o,fan_speed_list:i,battery_level:r,battery_icon:n,friendly_name:s}=t.attributes;return{status:e||a||t.state,fan_speed:o,fan_speed_list:i,battery_level:r,battery_icon:n,friendly_name:s}}renderSource(){const{fan_speed:t,fan_speed_list:e}=this.getAttributes(this.entity);if(!e)return M;const a=e.indexOf(t);return P`