From 5aa53ae7ae05325700f349597149e8bf7a7b86bf Mon Sep 17 00:00:00 2001 From: dfcarvajal Date: Sun, 27 Dec 2020 17:22:59 +0100 Subject: [PATCH] Upgrades HACS --- .../lovelace-auto-entities/auto-entities.js | 4 +- .../auto-entities.js.gz | Bin 2888 -> 4373 bytes .../webpack.config.js.gz | Bin 175 -> 175 bytes .../lovelace-card-tools/card-tools.js | 91 ++- .../lovelace-card-tools/card-tools.js.gz | Bin 4477 -> 6619 bytes .../lovelace-card-tools/webpack.config.js.gz | Bin 173 -> 173 bytes .../fold-entity-row.js | 24 +- .../fold-entity-row.js.gz | Bin 2524 -> 3102 bytes .../webpack.config.js.gz | Bin 177 -> 177 bytes www/community/lovelace-gap-card/gap-card.js | 14 + .../lovelace-gap-card/gap-card.js.gz | Bin 0 -> 232 bytes .../lovelace-layout-card/layout-card.js | 68 +- .../lovelace-layout-card/layout-card.js.gz | Bin 3350 -> 4833 bytes .../lovelace-layout-card/webpack.config.js.gz | Bin 173 -> 173 bytes .../multiple-entity-row.js | 244 +----- .../multiple-entity-row.js.gz | Bin 2077 -> 5000 bytes .../slider-entity-row.js | 51 +- .../slider-entity-row.js.gz | Bin 2794 -> 3413 bytes .../webpack.config.js.gz | Bin 178 -> 178 bytes .../xiaomi-vacuum-card.js | 656 ++++++++++------ .../xiaomi-vacuum-card.js.gz | Bin 2342 -> 3275 bytes .../coordinates-converter.js | 70 ++ .../coordinates-converter.js.gz | Bin 0 -> 521 bytes .../lovelace-xiaomi-vacuum-map-card/style.js | 133 ++++ .../style.js.gz | Bin 0 -> 840 bytes .../lovelace-xiaomi-vacuum-map-card/texts.js | 147 ++++ .../texts.js.gz | Bin 0 -> 1059 bytes .../xiaomi-vacuum-map-card.js | 722 +++++++++++++++++ .../xiaomi-vacuum-map-card.js.gz | Bin 0 -> 5483 bytes .../mini-graph-card/mini-graph-card-bundle.js | 1 + .../mini-graph-card-bundle.js.gz | Bin 0 -> 25758 bytes .../mini-media-player-bundle.js | 2 +- .../mini-media-player-bundle.js.gz | Bin 21527 -> 42388 bytes .../pvpc-hourly-pricing-card-editor.js | 242 ++++++ .../pvpc-hourly-pricing-card-editor.js.gz | Bin 0 -> 2098 bytes .../pvpc-hourly-pricing-card.js | 740 ++++++++++++++++++ .../pvpc-hourly-pricing-card.js.gz | Bin 0 -> 6668 bytes .../secondaryinfo-entity-row.js.gz | Bin 779 -> 778 bytes 38 files changed, 2652 insertions(+), 557 deletions(-) create mode 100644 www/community/lovelace-gap-card/gap-card.js create mode 100644 www/community/lovelace-gap-card/gap-card.js.gz create mode 100644 www/community/lovelace-xiaomi-vacuum-map-card/coordinates-converter.js create mode 100644 www/community/lovelace-xiaomi-vacuum-map-card/coordinates-converter.js.gz create mode 100644 www/community/lovelace-xiaomi-vacuum-map-card/style.js create mode 100644 www/community/lovelace-xiaomi-vacuum-map-card/style.js.gz create mode 100644 www/community/lovelace-xiaomi-vacuum-map-card/texts.js create mode 100644 www/community/lovelace-xiaomi-vacuum-map-card/texts.js.gz create mode 100644 www/community/lovelace-xiaomi-vacuum-map-card/xiaomi-vacuum-map-card.js create mode 100644 www/community/lovelace-xiaomi-vacuum-map-card/xiaomi-vacuum-map-card.js.gz create mode 100644 www/community/mini-graph-card/mini-graph-card-bundle.js create mode 100644 www/community/mini-graph-card/mini-graph-card-bundle.js.gz create mode 100644 www/community/pvpc-hourly-pricing-card/pvpc-hourly-pricing-card-editor.js create mode 100644 www/community/pvpc-hourly-pricing-card/pvpc-hourly-pricing-card-editor.js.gz create mode 100644 www/community/pvpc-hourly-pricing-card/pvpc-hourly-pricing-card.js create mode 100644 www/community/pvpc-hourly-pricing-card/pvpc-hourly-pricing-card.js.gz diff --git a/www/community/lovelace-auto-entities/auto-entities.js b/www/community/lovelace-auto-entities/auto-entities.js index 8faa05f..ec8ecfe 100644 --- a/www/community/lovelace-auto-entities/auto-entities.js +++ b/www/community/lovelace-auto-entities/auto-entities.js @@ -1,2 +1,2 @@ -!function(t){var e={};function i(s){if(e[s])return e[s].exports;var r=e[s]={i:s,l:!1,exports:{}};return t[s].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=t,i.c=e,i.d=function(t,e,s){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(i.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(s,r,function(e){return t[e]}.bind(null,r));return s},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=0)}([function(t,e,i){"use strict";i.r(e);const s=customElements.get("home-assistant-main")?Object.getPrototypeOf(customElements.get("home-assistant-main")):Object.getPrototypeOf(customElements.get("hui-view")),r=s.prototype.html;s.prototype.css;function n(){return document.querySelector("home-assistant").hass}const o=n().callWS({type:"config/area_registry/list"}),a=n().callWS({type:"config/device_registry/list"}),c=n().callWS({type:"config/entity_registry/list"});async function u(){return window.cardToolsData=window.cardToolsData||{areas:await o,devices:await a,entities:await c},window.cardToolsData}function l(t){const e=window.cardToolsData;let i=[];if(!t)return i;for(const s of e.devices)s.area_id===t.area_id&&i.push(s);return i}function f(t){const e=window.cardToolsData;let i=[];if(!t)return i;for(const s of e.entities)s.device_id===t.id&&i.push(s.entity_id);return i}function d(t,e){if("string"==typeof e&&"string"==typeof t&&(t.startsWith("/")&&t.endsWith("/")||-1!==t.indexOf("*"))){return t.startsWith("/")||(t=`/^${t=t.replace(/\./g,".").replace(/\*/g,".*")}$/`),new RegExp(t.slice(1,-1)).test(e)}if("string"==typeof t){if(t.startsWith("<="))return parseFloat(e)<=parseFloat(t.substr(2));if(t.startsWith(">="))return parseFloat(e)>=parseFloat(t.substr(2));if(t.startsWith("<"))return parseFloat(e)"))return parseFloat(e)>parseFloat(t.substr(1));if(t.startsWith("!"))return parseFloat(e)!=parseFloat(t.substr(1));if(t.startsWith("="))return parseFloat(e)==parseFloat(t.substr(1))}return t===e}function h(t,e){return function(i){const s="string"==typeof i?t.states[i]:t.states[i.entity];if(!i)return!1;for(const[r,n]of Object.entries(e))switch(r.split(" ")[0]){case"options":case"sort":break;case"domain":if(!d(n,s.entity_id.split(".")[0]))return!1;break;case"entity_id":if(!d(n,s.entity_id))return!1;break;case"state":if(!d(n,s.state))return!1;break;case"name":if(!s.attributes.friendly_name||!d(n,s.attributes.friendly_name))return!1;break;case"group":if(!(n.startsWith("group.")&&t.states[n]&&t.states[n].attributes.entity_id&&t.states[n].attributes.entity_id.includes(s.entity_id)))return!1;break;case"attributes":for(const[t,e]of Object.entries(n)){let i=t.split(" ")[0],r=s.attributes;for(;i&&r;){let t;[t,i]=i.split(":"),r=r[t]}if(void 0===r||e&&!d(e,r))return!1}break;case"not":if(h(t,n)(i))return!1;break;case"device":if(!window.cardToolsData||!window.cardToolsData.devices)return!1;let e=!1;for(const t of window.cardToolsData.devices)d(n,t.name)&&f(t).includes(s.entity_id)&&(e=!0);if(!e)return!1;break;case"area":if(!window.cardToolsData||!window.cardToolsData.areas)return!1;let r=!1;for(const t of window.cardToolsData.areas)d(n,t.name)&&l(t).flatMap(f).includes(s.entity_id)&&(r=!0);if(!r)return!1;break;default:return!1}return!0}}function p(t,e){return"string"==typeof e&&(e={method:e}),function(i,s){const r="string"==typeof i?t.states[i]:t.states[i.entity],n="string"==typeof s?t.states[s]:t.states[s.entity];if(void 0===r||void 0===n)return 0;const[o,a]=e.reverse?[-1,1]:[1,-1];function c(t,i){return e.ignore_case&&t.toLowerCase&&(t=t.toLowerCase()),e.ignore_case&&i.toLowerCase&&(i=i.toLowerCase()),e.numeric&&(isNaN(parseFloat(t))&&isNaN(parseFloat(i))||(t=isNaN(parseFloat(t))?void 0:parseFloat(t),i=isNaN(parseFloat(i))?void 0:parseFloat(i))),void 0===t&&void 0===i?0:void 0===t?o:void 0===i?a:ti?o:0}switch(e.method){case"domain":return c(r.entity_id.split(".")[0],n.entity_id.split(".")[0]);case"entity_id":return c(r.entity_id,n.entity_id);case"friendly_name":case"name":return c(r.attributes.friendly_name||r.entity_id.split(".")[1],n.attributes.friendly_name||n.entity_id.split(".")[1]);case"state":return c(r.state,n.state);case"attribute":let t=r.attributes,i=n.attributes,s=e.attribute;for(;s;){let e;if([e,s]=s.split(":"),t=t[e],i=i[e],void 0===t&&void 0===i)return 0;if(void 0===t)return o;if(void 0===i)return a}return c(t,i);default:return 0}}}function y(t,e,i=null){if((t=new Event(t,{bubbles:!0,cancelable:!1,composed:!0})).detail=e||{},i)i.dispatchEvent(t);else{var s=document.querySelector("home-assistant");(s=(s=(s=(s=(s=(s=(s=(s=(s=(s=(s=s&&s.shadowRoot)&&s.querySelector("home-assistant-main"))&&s.shadowRoot)&&s.querySelector("app-drawer-layout partial-panel-resolver"))&&s.shadowRoot||s)&&s.querySelector("ha-panel-lovelace"))&&s.shadowRoot)&&s.querySelector("hui-root"))&&s.shadowRoot)&&s.querySelector("ha-app-layout #view"))&&s.firstElementChild)&&s.dispatchEvent(t)}}u();const g="custom:";function _(t,e){const i=document.createElement("hui-error-card");return i.setConfig({type:"error",error:t,origConfig:e}),i}function m(t,e){if(!e||"object"!=typeof e||!e.type)return _(`No ${t} type configured`,e);let i=e.type;if(i=i.startsWith(g)?i.substr(g.length):`hui-${i}-${t}`,customElements.get(i))return function(t,e){const i=document.createElement(t);try{i.setConfig(e)}catch(t){return _(t,e)}return i}(i,e);const s=_(`Custom element doesn't exist: ${i}.`,e);s.style.display="None";const r=setTimeout(()=>{s.style.display=""},2e3);return customElements.whenDefined(i).then(()=>{clearTimeout(r),y("ll-rebuild",{},s)}),s}customElements.define("auto-entities",class extends s{static get properties(){return{hass:{}}}setConfig(t){if(!t||!t.card)throw new Error("Invalid configuration");this._config?(this._config=t,this.hass=this.hass):(this._config=t,this.hass=n(),this._getEntities(),this.cardConfig={entities:this.entities,...t.card},this.card=function(t){return m("card",t)}(this.cardConfig)),u().then(()=>this._getEntities())}_getEntities(){let t=[];if(this._config.entities&&(t=t.concat(this._config.entities).map(t=>"string"==typeof t?{entity:t}:t)),!this.hass||!this._config.filter)return t;if(this._config.filter.include){const e=Object.keys(this.hass.states).map(t=>new Object({entity:t}));for(const i of this._config.filter.include){if(void 0!==i.type){t.push(i);continue}let s=e.filter(h(this.hass,i)).map(t=>new Object({...t,...i.options}));void 0!==i.sort&&(s=s.sort(p(this.hass,i.sort))),t=t.concat(s)}}if(this._config.filter.exclude)for(const e of this._config.filter.exclude)t=t.filter(t=>"string"!=typeof t&&void 0===t.entity||!h(this.hass,e)(t));if(this._config.sort&&(t=t.sort(p(this.hass,this._config.sort)),this._config.sort.count)){const e=this._config.sort.first||0;t=t.slice(e,e+this._config.sort.count)}if(this._config.unique){function e(t,i){return typeof t==typeof i&&("object"!=typeof t?t===i:!Object.keys(t).some(t=>!Object.keys(i).includes(t))&&Object.keys(t).every(s=>e(t[s],i[s])))}let i=[];for(const s of t)i.some(t=>e(t,s))||i.push(s);t=i}this.entities=t}set entities(t){(function(t,e){if(t===e)return!0;if(null==t||null==e)return!1;if(t.length!=e.length)return!1;for(var i=0;ithis._getEntities(),0))}createRenderRoot(){return this}render(){return r` - ${this.card}`}getCardSize(){let t=0;return this.card&&this.card.getCardSize&&(t=this.card.getCardSize()),1===t&&this.entities.length&&(t=this.entities.length),0===t&&this._config.filter&&this._config.filter.include&&(t=Object.keys(this._config.filter.include).length),t||1}}),y("ll-rebuild",{})}]); \ No newline at end of file +!function(t){var e={};function i(r){if(e[r])return e[r].exports;var s=e[r]={i:r,l:!1,exports:{}};return t[r].call(s.exports,s,s.exports,i),s.l=!0,s.exports}i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(r,s,function(e){return t[e]}.bind(null,s));return r},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1)}([function(t){t.exports=JSON.parse('{"name":"auto-entities","private":true,"version":"1.7.0","description":"","scripts":{"build":"webpack","watch":"webpack --watch --mode=development","update-card-tools":"npm uninstall card-tools && npm install thomasloven/lovelace-card-tools"},"author":"Thomas Lovén","license":"MIT","devDependencies":{"webpack":"^4.44.2","webpack-cli":"^3.3.12"},"dependencies":{"card-tools":"github:thomasloven/lovelace-card-tools"}}')},function(t,e,i){"use strict";i.r(e);const r=customElements.get("home-assistant-main")?Object.getPrototypeOf(customElements.get("home-assistant-main")):Object.getPrototypeOf(customElements.get("hui-view")),s=r.prototype.html;r.prototype.css;function n(){return document.querySelector("hc-main")?document.querySelector("hc-main").hass:document.querySelector("home-assistant")?document.querySelector("home-assistant").hass:void 0}const a=n().callWS({type:"config/area_registry/list"}),o=n().callWS({type:"config/device_registry/list"}),l=n().callWS({type:"config/entity_registry/list"});async function c(){return window.cardToolsData=window.cardToolsData||{areas:await a,devices:await o,entities:await l},window.cardToolsData}function u(t){const e=window.cardToolsData;let i=[];if(!t)return i;for(const r of e.devices)r.area_id===t.area_id&&i.push(r);return i}function d(t){const e=window.cardToolsData;let i=[];if(!t)return i;for(const r of e.entities)r.device_id===t.id&&i.push(r.entity_id);return i}function f(t,e){if("string"==typeof e&&"string"==typeof t&&(t.startsWith("/")&&t.endsWith("/")||-1!==t.indexOf("*"))){return t.startsWith("/")||(t=`/^${t=t.replace(/\./g,".").replace(/\*/g,".*")}$/`),new RegExp(t.slice(1,-1)).test(e)}if("string"==typeof t){if(t.startsWith("<="))return parseFloat(e)<=parseFloat(t.substr(2));if(t.startsWith(">="))return parseFloat(e)>=parseFloat(t.substr(2));if(t.startsWith("<"))return parseFloat(e)"))return parseFloat(e)>parseFloat(t.substr(1));if(t.startsWith("!"))return parseFloat(e)!=parseFloat(t.substr(1));if(t.startsWith("="))return parseFloat(e)==parseFloat(t.substr(1))}return t===e}function h(t,e){return function(i){const r="string"==typeof i?t.states[i]:t.states[i.entity];if(!r)return!1;for(const[s,n]of Object.entries(e))switch(s.split(" ")[0]){case"options":case"sort":break;case"domain":if(!f(n,r.entity_id.split(".")[0]))return!1;break;case"entity_id":if(!f(n,r.entity_id))return!1;break;case"state":if(!f(n,r.state))return!1;break;case"name":if(!r.attributes.friendly_name||!f(n,r.attributes.friendly_name))return!1;break;case"group":if(!(n.startsWith("group.")&&t.states[n]&&t.states[n].attributes.entity_id&&t.states[n].attributes.entity_id.includes(r.entity_id)))return!1;break;case"attributes":for(const[t,e]of Object.entries(n)){let i=t.split(" ")[0].trim(),s=r.attributes;for(;i&&s;){let t;[t,i]=i.split(":"),s=s[t]}if(void 0===s||void 0!==e&&!f(e,s))return!1}break;case"not":if(h(t,n)(i))return!1;break;case"or":for(const e of n)if(h(t,e)(i))return!0;return!1;case"device":if(!window.cardToolsData||!window.cardToolsData.devices)return!1;let e=!1;for(const t of window.cardToolsData.devices)(f(n,t.name_by_user)||f(n,t.name))&&d(t).includes(r.entity_id)&&(e=!0);if(!e)return!1;break;case"area":if(!window.cardToolsData||!window.cardToolsData.areas)return!1;let s=!1;for(const t of window.cardToolsData.areas)f(n,t.name)&&u(t).flatMap(d).includes(r.entity_id)&&(s=!0);if(!s)return!1;break;case"last_changed":if(!f(n,((new Date).getTime()-new Date(r.last_changed).getTime())/6e4))return!1;break;case"last_updated":if(!f(n,((new Date).getTime()-new Date(r.last_updated).getTime())/6e4))return!1;break;default:return!1}return!0}}function p(t,e){return"string"==typeof e&&(e={method:e}),function(i,r){const s="string"==typeof i?t.states[i]:t.states[i.entity],n="string"==typeof r?t.states[r]:t.states[r.entity];if(void 0===s||void 0===n)return 0;const[a,o]=e.reverse?[-1,1]:[1,-1];function l(t,i){return e.ignore_case&&t.toLowerCase&&(t=t.toLowerCase()),e.ignore_case&&i.toLowerCase&&(i=i.toLowerCase()),e.numeric&&(isNaN(parseFloat(t))&&isNaN(parseFloat(i))||(t=isNaN(parseFloat(t))?void 0:parseFloat(t),i=isNaN(parseFloat(i))?void 0:parseFloat(i))),void 0===t&&void 0===i?0:void 0===t?a:void 0===i||ti?a:0}switch(e.method){case"domain":return l(s.entity_id.split(".")[0],n.entity_id.split(".")[0]);case"entity_id":return l(s.entity_id,n.entity_id);case"friendly_name":case"name":return l(s.attributes.friendly_name||s.entity_id.split(".")[1],n.attributes.friendly_name||n.entity_id.split(".")[1]);case"state":return l(s.state,n.state);case"attribute":let t=s.attributes,i=n.attributes,r=e.attribute;for(;r;){let e;if([e,r]=r.split(":"),t=t[e],i=i[e],void 0===t&&void 0===i)return 0;if(void 0===t)return a;if(void 0===i)return o}return l(t,i);case"last_changed":return e.numeric=!0,l(new Date(n.last_changed).getTime(),new Date(s.last_changed).getTime());case"last_updated":return e.numeric=!0,l(new Date(n.last_updated).getTime(),new Date(s.last_updated).getTime());case"last_triggered":return null==s.attributes.last_triggered||null==n.attributes.last_triggered?0:(e.numeric=!0,l(new Date(n.attributes.last_triggered).getTime(),new Date(s.attributes.last_triggered).getTime()));default:return 0}}}function g(t,e,i=null){if((t=new Event(t,{bubbles:!0,cancelable:!1,composed:!0})).detail=e||{},i)i.dispatchEvent(t);else{var r=function(){var t=document.querySelector("hc-main");return t=t?(t=(t=(t=t&&t.shadowRoot)&&t.querySelector("hc-lovelace"))&&t.shadowRoot)&&t.querySelector("hui-view")||t.querySelector("hui-panel-view"):(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=document.querySelector("home-assistant"))&&t.shadowRoot)&&t.querySelector("home-assistant-main"))&&t.shadowRoot)&&t.querySelector("app-drawer-layout partial-panel-resolver"))&&t.shadowRoot||t)&&t.querySelector("ha-panel-lovelace"))&&t.shadowRoot)&&t.querySelector("hui-root"))&&t.shadowRoot)&&t.querySelector("ha-app-layout"))&&t.querySelector("#view"))&&t.firstElementChild}();r&&r.dispatchEvent(t)}}c();let m=window.cardHelpers;const y=new Promise(async(t,e)=>{m&&t();const i=async()=>{m=await window.loadCardHelpers(),window.cardHelpers=m,t()};window.loadCardHelpers?i():window.addEventListener("load",async()=>{!async function(){if(customElements.get("hui-view"))return!0;await customElements.whenDefined("partial-panel-resolver");const t=document.createElement("partial-panel-resolver");if(t.hass={panels:[{url_path:"tmp",component_name:"lovelace"}]},t._updateRoutes(),await t.routerOptions.routes.tmp.load(),!customElements.get("ha-panel-lovelace"))return!1;const e=document.createElement("ha-panel-lovelace");e.hass=n(),void 0===e.hass&&(await new Promise(t=>{window.addEventListener("connection-status",e=>{console.log(e),t()},{once:!0})}),e.hass=n()),e.panel={config:{mode:null}},e._fetchConfig()}(),window.loadCardHelpers&&i()})});function w(t,e){const i={type:"error",error:t,origConfig:e},r=document.createElement("hui-error-card");return customElements.whenDefined("hui-error-card").then(()=>{const t=document.createElement("hui-error-card");t.setConfig(i),r.parentElement&&r.parentElement.replaceChild(t,r)}),y.then(()=>{g("ll-rebuild",{},r)}),r}function _(t,e){if(!e||"object"!=typeof e||!e.type)return w(`No ${t} type configured`,e);let i=e.type;if(i=i.startsWith("custom:")?i.substr("custom:".length):`hui-${i}-${t}`,customElements.get(i))return function(t,e){let i=document.createElement(t);try{i.setConfig(JSON.parse(JSON.stringify(e)))}catch(t){i=w(t,e)}return y.then(()=>{g("ll-rebuild",{},i)}),i}(i,e);const r=w(`Custom element doesn't exist: ${i}.`,e);r.style.display="None";const s=setTimeout(()=>{r.style.display=""},2e3);return customElements.whenDefined(i).then(()=>{clearTimeout(s),g("ll-rebuild",{},r)}),r}const b="lovelace-player-device-id";function v(){if(!localStorage[b]){const t=()=>Math.floor(1e5*(1+Math.random())).toString(16).substring(1);window.fully&&"function"==typeof fully.getDeviceId?localStorage[b]=fully.getDeviceId():localStorage[b]=`${t()}${t()}-${t()}${t()}`}return localStorage[b]}let S=v();const E=new URLSearchParams(window.location.search);var O;E.get("deviceID")&&null!==(O=E.get("deviceID"))&&("clear"===O?localStorage.removeItem(b):localStorage[b]=O,S=v());class T extends r{static get properties(){return{hass:{}}}setConfig(t){if(!t)throw new Error("No configuration.");if(!t.card||!t.card.type)throw new Error("No card type specified.");if(!t.filter&&!t.entities)throw new Error("No filters specified.");t=JSON.parse(JSON.stringify(t)),this._config?(this._config=t,this.hass=this.hass):(this._config=t,this.hass=n(),this._getEntities(),this.cardConfig={[t.card_param||"entities"]:this.entities,...t.card},this.card=function(t){return m?m.createCardElement(t):_("card",t)}(this.cardConfig)),t.filter&&t.filter.template&&(this.template="",(String(t.filter.template).includes("{%")||String(t.filter.template).includes("{{"))&&function(t,e,i,r=!0){t||(t=n().connection);let s={user:n().user.name,browser:S,hash:location.hash.substr(1)||" ",...i.variables},a=i.template,o=i.entity_ids;t.subscribeMessage(t=>{if(r){let i=String(t.result);const r=/_\([^)]*\)/g;i=i.replace(r,t=>n().localize(t.substring(2,t.length-1))||t),e(i)}else e(t.result)},{type:"render_template",template:a,variables:s,entity_ids:o})}(null,t=>{this.template=t,this._getEntities()},{template:t.filter.template,variables:{config:t},entity_ids:t.filter.entity_ids},!1)),c().then(()=>this._getEntities())}_getEntities(){const t=t=>t?"string"==typeof t?{entity:t.trim()}:t:null;let e=[];if(this._config.entities&&(e=e.concat(this._config.entities.map(t))),this.hass&&this._config.filter){if(this.template&&(e="string"==typeof this.template?e.concat(this.template.split(/[\s,]+/).map(t)):e.concat(this.template.map(t))),e=e.filter(Boolean),this._config.filter.include){const i=Object.keys(this.hass.states).map(t);for(const t of this._config.filter.include){if(void 0!==t.type){e.push(t);continue}let r=i.filter(h(this.hass,t)).map(e=>JSON.parse(JSON.stringify(new Object({...e,...t.options})).replace(/this.entity_id/g,e.entity)));void 0!==t.sort&&(r=r.sort(p(this.hass,t.sort))),e=e.concat(r)}}if(this._config.filter.exclude)for(const t of this._config.filter.exclude)e=e.filter(e=>"string"!=typeof e&&void 0===e.entity||!h(this.hass,t)(e));if(this._config.sort&&(e=e.sort(p(this.hass,this._config.sort)),this._config.sort.count)){const t=this._config.sort.first||0;e=e.slice(t,t+this._config.sort.count)}if(this._config.unique){function i(t,e){return typeof t==typeof e&&("object"!=typeof t?t===e:Object.keys(t).lenght===Object.keys(e).length&&(!Object.keys(t).some(t=>!Object.keys(e).includes(t))&&Object.keys(t).every(r=>i(t[r],e[r]))))}let t=[];for(const r of e)"entity"===this._config.unique&&t.some(t=>t.entity===r.entity)||t.some(t=>i(t,r))||t.push(r);e=t}this.entities=e}else this.entities=e}set entities(t){(function(t,e){if(t===e)return!0;if(null==t||null==e)return!1;if(t.length!=e.length)return!1;for(var i=0;ithis._getEntities(),0))}createRenderRoot(){return this}render(){return s` + ${this.card}`}getCardSize(){let t=0;return this.card&&this.card.getCardSize&&(t=this.card.getCardSize()),1===t&&this.entities.length&&(t=this.entities.length),0===t&&this._config.filter&&this._config.filter.include&&(t=Object.keys(this._config.filter.include).length),t||1}}if(!customElements.get("auto-entities")){customElements.define("auto-entities",T);const t=i(0);console.info(`%cAUTO-ENTITIES ${t.version} IS INSTALLED`,"color: green; font-weight: bold","")}}]); \ No newline at end of file diff --git a/www/community/lovelace-auto-entities/auto-entities.js.gz b/www/community/lovelace-auto-entities/auto-entities.js.gz index 08aca46cc8b6a4f2196bdc2be5ce50dbd35c2f96..165ab2b889108bc986468bd44cde4f2005bd4e99 100644 GIT binary patch literal 4373 zcmV+w5$f(AiwFqak-uL8|6z4>Z!KkRbZK;HWpgfSa{#Sc{c_tllK=mng5qU0;;GnM`-etj(-I_Mha$BAWJf3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V6wsT(;lO3Xwt3n3dU~ZWNZVif83)pH-}! z2`1|j!rBG0(@Bofky*g9eqz|iyod^%CkQxu+2w48R9kZYXy*`kam|HPc2ep+mRxl}#F&`9>1nD#Ry+VA z+g=+GJ>bLQtS?SC<9-Dzf$+QK4 zxuoHTx?<y~OuY_eGNHm#T=E)jiPu-tyP&Az6mp^yr3N`lMUYIF1eZZ4WXS23tMt zqELGz1z(TOkV6Rq-rp;0gdWlk*QU3zGb*1sN13hHU^mB_XzU7!cTiWW^zG$<=GO3g zNK~8PjDO-JhWhf6t$C@K82kZXY zBvv2r8SQJPeb@nv;VpndZ$~-)VH5n?4V%xV z%lP-G?ja;zViVNQwV@ko2azaM7+iyHiJ>RD_`{tZ?sYA)u5GdW1Svr6u0OnCfF3ED z^g98+u!(puwZoc{r-0{8cXP?V|DFKk-#>r+5F3-@YbbT0118`UXWI<7dz7v<2fMRY z<3bfSfPwnU2eBJeSIwTqu-1CMiwj}p5@T39_eD@jqc~`&Xp*ef4 zKWUqN0pYmN521f!ohzjt8+IO#fxx{oOuO`~mKjU4b70++W1pasU;^vwAwf`b;X%JC z9{v!(zgI{1Zu@{Ny@RjM{J+d4$NAFd>s%rpgb8M2CpfTJnBH*UY|d^vz_SBF=N{BB mK#y*Au|s3LNR3xgn|lo0chR;ZMIC9O_5L5Pjvo$cApij7VxCq2 diff --git a/www/community/lovelace-auto-entities/webpack.config.js.gz b/www/community/lovelace-auto-entities/webpack.config.js.gz index 0f46b4cfe56cd89a3023a1732f2fa914090a1e46..d42d625bbe0432e0449d7129fb7206cee591b29b 100644 GIT binary patch delta 16 YcmZ3_xSo+izMF&N?!^7^6FHUx04-|;?*IS* delta 16 XcmZ3_xSo+izMF$1Z_eA;i5$xTD}n{L diff --git a/www/community/lovelace-card-tools/card-tools.js b/www/community/lovelace-card-tools/card-tools.js index ede63c0..1ec9d24 100644 --- a/www/community/lovelace-card-tools/card-tools.js +++ b/www/community/lovelace-card-tools/card-tools.js @@ -1 +1,90 @@ -!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=3)}([function(e,t,r){"use strict";function n(){return document.querySelector("home-assistant").hass}function o(e){return document.querySelector("home-assistant").provideHass(e)}function s(){var e=document.querySelector("home-assistant");if(e=(e=(e=(e=(e=(e=(e=(e=e&&e.shadowRoot)&&e.querySelector("home-assistant-main"))&&e.shadowRoot)&&e.querySelector("app-drawer-layout partial-panel-resolver"))&&e.shadowRoot||e)&&e.querySelector("ha-panel-lovelace"))&&e.shadowRoot)&&e.querySelector("hui-root")){var t=e.lovelace;return t.current_view=e.___curView,t}return null}function a(){var e=document.querySelector("home-assistant");return e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e&&e.shadowRoot)&&e.querySelector("home-assistant-main"))&&e.shadowRoot)&&e.querySelector("app-drawer-layout partial-panel-resolver"))&&e.shadowRoot||e)&&e.querySelector("ha-panel-lovelace"))&&e.shadowRoot)&&e.querySelector("hui-root"))&&e.shadowRoot)&&e.querySelector("ha-app-layout #view"))&&e.firstElementChild}r.d(t,"a",(function(){return n})),r.d(t,"d",(function(){return o})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return a}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));let n=function(){if(window.fully&&"function"==typeof fully.getDeviceId)return fully.getDeviceId();if(!localStorage["lovelace-player-device-id"]){const e=()=>Math.floor(1e5*(1+Math.random())).toString(16).substring(1);localStorage["lovelace-player-device-id"]=`${e()}${e()}-${e()}${e()}`}return localStorage["lovelace-player-device-id"]}()},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return hasOldTemplate})),__webpack_require__.d(__webpack_exports__,"b",(function(){return parseOldTemplate}));var _hass_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_deviceID_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1);function hasOldTemplate(e){return/\[\[\s+.*\s+\]\]/.test(e)}function parseTemplateString(str,specialData={}){if("string"!=typeof str)return text;const FUNCTION=/^[a-zA-Z0-9_]+\(.*\)$/,EXPR=/([^=<>!]+)\s*(==|!=|<|>|<=|>=)\s*([^=<>!]+)/,SPECIAL=/^\{.+\}$/,STRING=/^"[^"]*"|'[^']*'$/;"string"==typeof specialData&&(specialData={}),specialData=Object.assign({user:Object(_hass_js__WEBPACK_IMPORTED_MODULE_0__.a)().user.name,browser:_deviceID_js__WEBPACK_IMPORTED_MODULE_1__.a,hash:location.hash.substr(1)||" "},specialData);const _parse_function=e=>{let t=[e.substr(0,e.indexOf("(")).trim()];for(e=e.substr(e.indexOf("(")+1);e;){let r=0,n=0,o=!1;for(;e[r];){let t=e[r++];if(t===o&&r>1&&"\\"!==e[r-2]?o=!1:"\"'".includes(t)&&(o=t),!o){if("("===t)n+=1;else if(")"===t){n-=1;continue}if(!(n>0)&&",)".includes(t))break}}t.push(e.substr(0,r-1).trim()),e=e.substr(r)}return t},_parse_special=e=>(e=e.substr(1,e.length-2),specialData[e]||`{${e}}`),_parse_entity=e=>{let t;if((e=e.split("."))[0].match(SPECIAL))t=_parse_special(e.shift()),t=Object(_hass_js__WEBPACK_IMPORTED_MODULE_0__.a)().states[t]||t;else if(t=Object(_hass_js__WEBPACK_IMPORTED_MODULE_0__.a)().states[`${e.shift()}.${e.shift()}`],!e.length)return t.state;return e.forEach(e=>t=t[e]),t},_eval_expr=str=>{if(str=EXPR.exec(str),null===str)return!1;const lhs=parseTemplateString(str[1]),rhs=parseTemplateString(str[3]);var expr="";return expr=parseFloat(lhs)!=lhs?`"${lhs}" ${str[2]} "${rhs}"`:`${parseFloat(lhs)} ${str[2]} ${parseFloat(rhs)}`,eval(expr)},_eval_function=e=>{if("if"===e[0])return _eval_expr(e[1])?parseTemplateString(e[2]):parseTemplateString(e[3])};try{return str=str.trim(),str.match(STRING)?str.substr(1,str.length-2):str.match(SPECIAL)?_parse_special(str):str.match(FUNCTION)?_eval_function(_parse_function(str)):str.includes(".")?_parse_entity(str):str}catch(e){return`[[ Template matching failed: ${str} ]]`}}function parseOldTemplate(e,t={}){if("string"!=typeof e)return e;return e=e.replace(/\[\[\s(.*?)\s\]\]/g,(e,r,n,o)=>parseTemplateString(r,t))}},function(e,t,r){"use strict";r.r(t);const n=customElements.get("home-assistant-main")?Object.getPrototypeOf(customElements.get("home-assistant-main")):Object.getPrototypeOf(customElements.get("hui-view")),o=n.prototype.html,s=n.prototype.css;function a(e,t,r=null){if((e=new Event(e,{bubbles:!0,cancelable:!1,composed:!0})).detail=t||{},r)r.dispatchEvent(e);else{var n=document.querySelector("home-assistant");(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=n&&n.shadowRoot)&&n.querySelector("home-assistant-main"))&&n.shadowRoot)&&n.querySelector("app-drawer-layout partial-panel-resolver"))&&n.shadowRoot||n)&&n.querySelector("ha-panel-lovelace"))&&n.shadowRoot)&&n.querySelector("hui-root"))&&n.shadowRoot)&&n.querySelector("ha-app-layout #view"))&&n.firstElementChild)&&n.dispatchEvent(e)}}const i="custom:";function c(e,t){const r=document.createElement("hui-error-card");return r.setConfig({type:"error",error:e,origConfig:t}),r}function l(e,t){if(!t||"object"!=typeof t||!t.type)return c(`No ${e} type configured`,t);let r=t.type;if(r=r.startsWith(i)?r.substr(i.length):`hui-${r}-${e}`,customElements.get(r))return function(e,t){const r=document.createElement(e);try{r.setConfig(t)}catch(e){return c(e,t)}return r}(r,t);const n=c(`Custom element doesn't exist: ${r}.`,t);n.style.display="None";const o=setTimeout(()=>{n.style.display=""},2e3);return customElements.whenDefined(r).then(()=>{clearTimeout(o),a("ll-rebuild",{},n)}),n}function u(e){return l("card",e)}function p(e){return l("element",e)}function d(e){const t=new Set(["call-service","divider","section","weblink"]);if(!e)return c("Invalid configuration given.",e);if("string"==typeof e&&(e={entity:e}),"object"!=typeof e||!e.entity&&!e.type)return c("Invalid configuration given.",e);const r=e.type||"default";if(t.has(r)||r.startsWith(i))return l("row",e);const n=e.entity.split(".",1)[0];return Object.assign(e,{type:{alert:"toggle",automation:"toggle",climate:"climate",cover:"cover",fan:"toggle",group:"group",input_boolean:"toggle",input_number:"input-number",input_select:"input-select",input_text:"input-text",light:"toggle",lock:"lock",media_player:"media-player",remote:"toggle",scene:"scene",script:"script",sensor:"sensor",timer:"timer",switch:"toggle",vacuum:"toggle",water_heater:"climate",input_datetime:"input-datetime"}[n]||"text"}),l("entity-row",e)}var f=r(0);const m=2;class h extends n{static get version(){return m}static get properties(){return{noHass:{type:Boolean}}}setConfig(e){this._config=e,this.el?this.el.setConfig(e):(this.el=this.create(e),this._hass&&(this.el.hass=this._hass),this.noHass&&Object(f.d)(this))}set config(e){this.setConfig(e)}set hass(e){this._hass=e,this.el&&(this.el.hass=e)}createRenderRoot(){return this}render(){return o`${this.el}`}}const _=function(e,t){const r=Object.getOwnPropertyDescriptors(t.prototype);for(const[t,n]of Object.entries(r))"constructor"!==t&&Object.defineProperty(e.prototype,t,n);const n=Object.getOwnPropertyDescriptors(t);for(const[t,r]of Object.entries(n))"prototype"!==t&&Object.defineProperty(e,t,r);const o=Object.getPrototypeOf(t),s=Object.getOwnPropertyDescriptors(o.prototype);for(const[t,r]of Object.entries(s))"constructor"!==t&&Object.defineProperty(Object.getPrototypeOf(e).prototype,t,r);const a=Object.getOwnPropertyDescriptors(o);for(const[t,r]of Object.entries(a))"prototype"!==t&&Object.defineProperty(Object.getPrototypeOf(e),t,r)},g=customElements.get("card-maker");if(!g||!g.version||g.version{document.body.querySelector("long-press").bind(e)}),customElements.whenDefined("action-handler").then(()=>{document.body.querySelector("action-handler").bind(e,t)}),e}function O(e,t=!1){a("hass-more-info",{entityId:e},document.querySelector("home-assistant"));const r=document.querySelector("home-assistant")._moreInfoEl;return r.large=t,r}function E(){const e=document.querySelector("home-assistant")&&document.querySelector("home-assistant")._moreInfoEl;e&&e.close()}function S(e,t,r=!1,n=null,o=!1){a("hass-more-info",{entityId:null});const s=document.querySelector("home-assistant")._moreInfoEl;s.close(),s.open();const i=document.createElement("div");i.innerHTML=`\n \n ${o?"":`\n \n \n
\n ${e}\n
\n
\n `}\n
\n \n \n
\n `;const c=i.querySelector(".scrollable");c.querySelector("card-maker").config=t,s.sizingTarget=c,s.large=r,s._page="none",s.shadowRoot.appendChild(i);let l={};if(n)for(var u in s.resetFit(),n)l[u]=s.style[u],s.style.setProperty(u,n[u]);return s._dialogOpenChanged=function(e){if(!e&&(this.stateObj&&this.fire("hass-more-info",{entityId:null}),this.shadowRoot==i.parentNode&&(this._page=null,this.shadowRoot.removeChild(i),n)))for(var t in s.resetFit(),l)l[t]?s.style.setProperty(t,l[t]):s.style.removeProperty(t)},s}function j(e,t,r){e||(e=Object(f.a)().connection);let n={user:Object(f.a)().user.name,browser:v.a,hash:location.hash.substr(1)||" ",...r.variables},o=r.template,s=r.entity_ids;return e.subscribeMessage(e=>t(e.result),{type:"render_template",template:o,variables:n,entity_ids:s})}var D=r(2);const T=Object(f.a)().callWS({type:"config/area_registry/list"}),P=Object(f.a)().callWS({type:"config/device_registry/list"}),C=Object(f.a)().callWS({type:"config/entity_registry/list"});async function q(){return window.cardToolsData=window.cardToolsData||{areas:await T,devices:await P,entities:await C},window.cardToolsData}function R(e){const t=window.cardToolsData;for(const r of t.areas)if(r.name.toLowerCase()===e.toLowerCase())return r;return null}function I(e){const t=window.cardToolsData;let r=[];if(!e)return r;for(const n of t.devices)n.area_id===e.area_id&&r.push(n);return r}function x(e){const t=window.cardToolsData;for(const r of t.devices)if(r.name.toLowerCase()===e.toLowerCase())return r;return null}function $(e){const t=window.cardToolsData;let r=[];if(!e)return r;for(const n of t.entities)n.device_id===e.id&&r.push(n.entity_id);return r}q();class k{static checkVersion(e){}static args(){}static logger(){}static get localize(){return Object(f.a)().localize}static get deviceID(){return v.a}static get fireEvent(){return a}static get hass(){return Object(f.a)()}static get lovelace(){return Object(f.b)()}static get lovelace_view(){return f.c}static get provideHass(){return f.d}static get LitElement(){return n}static get LitHtml(){return o}static get LitCSS(){return s}static get longpress(){return w}static get createCard(){return u}static get createElement(){return p}static get createEntityRow(){return d}static get moreInfo(){return O}static get popUp(){return S}static get closePopUp(){return E}static get hasTemplate(){return D.a}static parseTemplate(e,t,r={}){return"string"==typeof e?Object(D.b)(e,t):async function(e,t,r={}){for(var n in e||(e=e()),r={},r=Object.assign({user:e.user.name,browser:v.a,hash:location.hash.substr(1)||" "},r)){var o=new RegExp(`\\{${n}\\}`,"g");t=t.replace(o,r[n])}return e.callApi("POST","template",{template:t})}(e,t,r)}static get subscribeRenderTemplate(){return j}static get getData(){return q}static get areaByName(){return R}static get areaDevices(){return I}static get deviceByName(){return x}static get deviceEntities(){return $}}customElements.get("card-tools")||(customElements.define("card-tools",k),window.cardTools=customElements.get("card-tools"),console.info(`%cCARD-TOOLS 2 IS INSTALLED\n %cDeviceID: ${customElements.get("card-tools").deviceID}`,"color: green; font-weight: bold",""))}]); \ No newline at end of file +!function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}([function(e,t,r){"use strict";function o(){return document.querySelector("hc-main")?document.querySelector("hc-main").hass:document.querySelector("home-assistant")?document.querySelector("home-assistant").hass:void 0}function n(e){return document.querySelector("hc-main")?document.querySelector("hc-main").provideHass(e):document.querySelector("home-assistant")?document.querySelector("home-assistant").provideHass(e):void 0}function s(){var e,t=document.querySelector("hc-main");return t?((e=t._lovelaceConfig).current_view=t._lovelacePath,e):(t=(t=(t=(t=(t=(t=(t=(t=(t=document.querySelector("home-assistant"))&&t.shadowRoot)&&t.querySelector("home-assistant-main"))&&t.shadowRoot)&&t.querySelector("app-drawer-layout partial-panel-resolver"))&&t.shadowRoot||t)&&t.querySelector("ha-panel-lovelace"))&&t.shadowRoot)&&t.querySelector("hui-root"))?((e=t.lovelace).current_view=t.___curView,e):null}function a(){var e=document.querySelector("hc-main");return e=e?(e=(e=(e=e&&e.shadowRoot)&&e.querySelector("hc-lovelace"))&&e.shadowRoot)&&e.querySelector("hui-view")||e.querySelector("hui-panel-view"):(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=document.querySelector("home-assistant"))&&e.shadowRoot)&&e.querySelector("home-assistant-main"))&&e.shadowRoot)&&e.querySelector("app-drawer-layout partial-panel-resolver"))&&e.shadowRoot||e)&&e.querySelector("ha-panel-lovelace"))&&e.shadowRoot)&&e.querySelector("hui-root"))&&e.shadowRoot)&&e.querySelector("ha-app-layout"))&&e.querySelector("#view"))&&e.firstElementChild}async function i(){if(customElements.get("hui-view"))return!0;await customElements.whenDefined("partial-panel-resolver");const e=document.createElement("partial-panel-resolver");if(e.hass={panels:[{url_path:"tmp",component_name:"lovelace"}]},e._updateRoutes(),await e.routerOptions.routes.tmp.load(),!customElements.get("ha-panel-lovelace"))return!1;const t=document.createElement("ha-panel-lovelace");return t.hass=o(),void 0===t.hass&&(await new Promise(e=>{window.addEventListener("connection-status",t=>{console.log(t),e()},{once:!0})}),t.hass=o()),t.panel={config:{mode:null}},t._fetchConfig(),!0}r.d(t,"a",(function(){return o})),r.d(t,"e",(function(){return n})),r.d(t,"c",(function(){return s})),r.d(t,"d",(function(){return a})),r.d(t,"b",(function(){return i}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));let o=function(){if(window.fully&&"function"==typeof fully.getDeviceId)return fully.getDeviceId();if(!localStorage["lovelace-player-device-id"]){const e=()=>Math.floor(1e5*(1+Math.random())).toString(16).substring(1);localStorage["lovelace-player-device-id"]=`${e()}${e()}-${e()}${e()}`}return localStorage["lovelace-player-device-id"]}()},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return hasOldTemplate})),__webpack_require__.d(__webpack_exports__,"b",(function(){return parseOldTemplate}));var _hass_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_deviceID_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1);function hasOldTemplate(e){return/\[\[\s+.*\s+\]\]/.test(e)}function parseTemplateString(str,specialData={}){if("string"!=typeof str)return text;const FUNCTION=/^[a-zA-Z0-9_]+\(.*\)$/,EXPR=/([^=<>!]+)\s*(==|!=|<|>|<=|>=)\s*([^=<>!]+)/,SPECIAL=/^\{.+\}$/,STRING=/^"[^"]*"|'[^']*'$/;"string"==typeof specialData&&(specialData={}),specialData=Object.assign({user:Object(_hass_js__WEBPACK_IMPORTED_MODULE_0__.a)().user.name,browser:_deviceID_js__WEBPACK_IMPORTED_MODULE_1__.a,hash:location.hash.substr(1)||" "},specialData);const _parse_function=e=>{let t=[e.substr(0,e.indexOf("(")).trim()];for(e=e.substr(e.indexOf("(")+1);e;){let r=0,o=0,n=!1;for(;e[r];){let t=e[r++];if(t===n&&r>1&&"\\"!==e[r-2]?n=!1:"\"'".includes(t)&&(n=t),!n){if("("===t)o+=1;else if(")"===t){o-=1;continue}if(!(o>0)&&",)".includes(t))break}}t.push(e.substr(0,r-1).trim()),e=e.substr(r)}return t},_parse_special=e=>(e=e.substr(1,e.length-2),specialData[e]||`{${e}}`),_parse_entity=e=>{let t;if((e=e.split("."))[0].match(SPECIAL))t=_parse_special(e.shift()),t=Object(_hass_js__WEBPACK_IMPORTED_MODULE_0__.a)().states[t]||t;else if(t=Object(_hass_js__WEBPACK_IMPORTED_MODULE_0__.a)().states[`${e.shift()}.${e.shift()}`],!e.length)return t.state;return e.forEach(e=>t=t[e]),t},_eval_expr=str=>{if(str=EXPR.exec(str),null===str)return!1;const lhs=parseTemplateString(str[1]),rhs=parseTemplateString(str[3]);var expr="";return expr=parseFloat(lhs)!=lhs?`"${lhs}" ${str[2]} "${rhs}"`:`${parseFloat(lhs)} ${str[2]} ${parseFloat(rhs)}`,eval(expr)},_eval_function=e=>{if("if"===e[0])return _eval_expr(e[1])?parseTemplateString(e[2]):parseTemplateString(e[3])};try{return str=str.trim(),str.match(STRING)?str.substr(1,str.length-2):str.match(SPECIAL)?_parse_special(str):str.match(FUNCTION)?_eval_function(_parse_function(str)):str.includes(".")?_parse_entity(str):str}catch(e){return`[[ Template matching failed: ${str} ]]`}}function parseOldTemplate(e,t={}){if("string"!=typeof e)return e;return e=e.replace(/\[\[\s(.*?)\s\]\]/g,(e,r,o,n)=>parseTemplateString(r,t))}},function(e){e.exports=JSON.parse('{"name":"card-tools","private":true,"version":"2.1.2","description":"Lovelace Card Tools","scripts":{"build":"webpack","watch":"webpack --watch --mode=development"},"repository":{"type":"git","url":"github.com:thomasloven/card-tools"},"author":"Thomas Lovén","license":"MIT","devDependencies":{"webpack":"^4.44.1","webpack-cli":"^3.3.12"}}')},function(e,t,r){"use strict";r.r(t);const o=customElements.get("home-assistant-main")?Object.getPrototypeOf(customElements.get("home-assistant-main")):Object.getPrototypeOf(customElements.get("hui-view")),n=o.prototype.html,s=o.prototype.css;var a=r(0);function i(e,t,r=null){if((e=new Event(e,{bubbles:!0,cancelable:!1,composed:!0})).detail=t||{},r)r.dispatchEvent(e);else{var o=Object(a.d)();o&&o.dispatchEvent(e)}}let c=window.cardHelpers;const l=new Promise(async(e,t)=>{c&&e();const r=async()=>{c=await window.loadCardHelpers(),window.cardHelpers=c,e()};window.loadCardHelpers?r():window.addEventListener("load",async()=>{Object(a.b)(),window.loadCardHelpers&&r()})});function u(e,t){const r={type:"error",error:e,origConfig:t},o=document.createElement("hui-error-card");return customElements.whenDefined("hui-error-card").then(()=>{const e=document.createElement("hui-error-card");e.setConfig(r),o.parentElement&&o.parentElement.replaceChild(e,o)}),l.then(()=>{i("ll-rebuild",{},o)}),o}function d(e,t){if(!t||"object"!=typeof t||!t.type)return u(`No ${e} type configured`,t);let r=t.type;if(r=r.startsWith("custom:")?r.substr("custom:".length):`hui-${r}-${e}`,customElements.get(r))return function(e,t){let r=document.createElement(e);try{r.setConfig(JSON.parse(JSON.stringify(t)))}catch(e){r=u(e,t)}return l.then(()=>{i("ll-rebuild",{},r)}),r}(r,t);const o=u(`Custom element doesn't exist: ${r}.`,t);o.style.display="None";const n=setTimeout(()=>{o.style.display=""},2e3);return customElements.whenDefined(r).then(()=>{clearTimeout(n),i("ll-rebuild",{},o)}),o}function p(e){return c?c.createCardElement(e):d("card",e)}function m(e){return c?c.createHuiElement(e):d("element",e)}function h(e){if(c)return c.createRowElement(e);const t=new Set(["call-service","cast","conditional","divider","section","select","weblink"]),r={alert:"toggle",automation:"toggle",climate:"climate",cover:"cover",fan:"toggle",group:"group",input_boolean:"toggle",input_number:"input-number",input_select:"input-select",input_text:"input-text",light:"toggle",lock:"lock",media_player:"media-player",remote:"toggle",scene:"scene",script:"script",sensor:"sensor",timer:"timer",switch:"toggle",vacuum:"toggle",water_heater:"climate",input_datetime:"input-datetime",none:void 0};if(!e)return u("Invalid configuration given.",e);if("string"==typeof e&&(e={entity:e}),"object"!=typeof e||!e.entity&&!e.type)return u("Invalid configuration given.",e);const o=e.type||"default";if(t.has(o)||o.startsWith("custom:"))return d("row",e);return d("entity-row",{type:r[e.entity?e.entity.split(".",1)[0]:"none"]||"text",...e})}class f extends o{static get version(){return 2}static get properties(){return{noHass:{type:Boolean}}}setConfig(e){this._config=e,this.el?this.el.setConfig(e):(this.el=this.create(e),this._hass&&(this.el.hass=this._hass),this.noHass&&Object(a.e)(this))}set config(e){this.setConfig(e)}set hass(e){this._hass=e,this.el&&(this.el.hass=e)}createRenderRoot(){return this}render(){return n`${this.el}`}}const g=function(e,t){const r=Object.getOwnPropertyDescriptors(t.prototype);for(const[t,o]of Object.entries(r))"constructor"!==t&&Object.defineProperty(e.prototype,t,o);const o=Object.getOwnPropertyDescriptors(t);for(const[t,r]of Object.entries(o))"prototype"!==t&&Object.defineProperty(e,t,r);const n=Object.getPrototypeOf(t),s=Object.getOwnPropertyDescriptors(n.prototype);for(const[t,r]of Object.entries(s))"constructor"!==t&&Object.defineProperty(Object.getPrototypeOf(e).prototype,t,r);const a=Object.getOwnPropertyDescriptors(n);for(const[t,r]of Object.entries(a))"prototype"!==t&&Object.defineProperty(Object.getPrototypeOf(e),t,r)},_=customElements.get("card-maker");if(!_||!_.version||_.version<2){class e extends f{create(e){return p(e)}getCardSize(){return this.firstElementChild&&this.firstElementChild.getCardSize?this.firstElementChild.getCardSize():1}}_?g(_,e):customElements.define("card-maker",e)}const w=customElements.get("element-maker");if(!w||!w.version||w.version<2){class e extends f{create(e){return m(e)}}w?g(w,e):customElements.define("element-maker",e)}const y=customElements.get("entity-row-maker");if(!y||!y.version||y.version<2){class e extends f{create(e){return h(e)}}y?g(y,e):customElements.define("entity-row-maker",e)}var v=r(1);function b(e,t={}){return customElements.whenDefined("long-press").then(()=>{document.body.querySelector("long-press").bind(e)}),customElements.whenDefined("action-handler").then(()=>{document.body.querySelector("action-handler").bind(e,t)}),e}async function E(e,t,r=!1){let o=e;"string"==typeof t&&(t=t.split(/(\$| )/));for(const[e,n]of t.entries())if(n.trim().length){if(!o)return null;o.localName&&o.localName.includes("-")&&await customElements.whenDefined(o.localName),o.updateComplete&&await o.updateComplete,o="$"===n?r&&e==t.length-1?[o.shadowRoot]:o.shadowRoot:r&&e==t.length-1?o.querySelectorAll(n):o.querySelector(n)}return o}async function O(e,t,r=!1,o=1e4){return Promise.race([E(e,t,r),new Promise((e,t)=>setTimeout(()=>t(new Error("timeout")),o))]).catch(e=>{if(!e.message||"timeout"!==e.message)throw e;return null})}async function S(e,t=!1){const r=document.querySelector("hc-main")||document.querySelector("home-assistant");i("hass-more-info",{entityId:e},r);const o=await O(r,"$ ha-more-info-dialog");return o.large=t,o}async function C(){const e=document.querySelector("home-assistant")||document.querySelector("hc-root");i("hass-more-info",{entityId:"."},e);const t=await O(e,"$ card-tools-popup");t&&t.closeDialog()}async function x(e,t,r=!1,o={},n=!1){if(!customElements.get("card-tools-popup")){const e=customElements.get("home-assistant-main")?Object.getPrototypeOf(customElements.get("home-assistant-main")):Object.getPrototypeOf(customElements.get("hui-view")),t=e.prototype.html,r=e.prototype.css;class o extends e{static get properties(){return{open:{},large:{reflect:!0,type:Boolean},hass:{}}}updated(e){e.has("hass")&&this.card&&(this.card.hass=this.hass)}closeDialog(){this.open=!1}async _makeCard(){const e=await window.loadCardHelpers();this.card=await e.createCardElement(this._card),this.card.hass=this.hass,this.requestUpdate()}async _applyStyles(){let e=await O(this,"$ ha-dialog");customElements.whenDefined("card-mod").then(async()=>{if(!e)return;customElements.get("card-mod").applyToElement(e,"more-info",this._style,{config:this._card},[],!1)})}async showDialog(e,t,r=!1,o={},n=!1){this.title=e,this._card=t,this.large=r,this._style=o,this.fullscreen=!!n,this._makeCard(),await this.updateComplete,this.open=!0,await this._applyStyles()}_enlarge(){this.large=!this.large}render(){return this.open?t` + + ${this.fullscreen?t`
`:t` + + + + +
+ ${this.title} +
+
+ `} +
+ ${this.card} +
+
+ `:t``}static get styles(){return r` + ha-dialog { + --mdc-dialog-min-width: 400px; + --mdc-dialog-max-width: 600px; + --mdc-dialog-heading-ink-color: var(--primary-text-color); + --mdc-dialog-content-ink-color: var(--primary-text-color); + --justify-action-buttons: space-between; + } + @media all and (max-width: 450px), all and (max-height: 500px) { + ha-dialog { + --mdc-dialog-min-width: 100vw; + --mdc-dialog-max-width: 100vw; + --mdc-dialog-min-height: 100%; + --mdc-dialog-max-height: 100%; + --mdc-shape-medium: 0px; + --vertial-align-dialog: flex-end; + } + } + + app-toolbar { + flex-shrink: 0; + color: var(--primary-text-color); + background-color: var(--secondary-background-color); + } + + .main-title { + margin-left: 16px; + line-height: 1.3em; + max-height: 2.6em; + overflow: hidden; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + text-overflow: ellipsis; + } + .content { + margin: -20px -24px; + } + + @media all and (max-width: 450px), all and (max-height: 500px) { + app-toolbar { + background-color: var(--app-header-background-color); + color: var(--app-header-text-color, white); + } + } + + @media all and (min-width: 451px) and (min-height: 501px) { + ha-dialog { + --mdc-dialog-max-width: 90vw; + } + + .content { + width: 400px; + } + :host([large]) .content { + width: calc(90vw - 48px); + } + + :host([large]) app-toolbar { + max-width: calc(90vw - 32px); + } + } + `}}customElements.define("card-tools-popup",o)}const s=document.querySelector("home-assistant")||document.querySelector("hc-root");if(!s)return;let i=await O(s,"$ card-tools-popup");if(i||(i=document.createElement("card-tools-popup"),s.shadowRoot.appendChild(i),Object(a.e)(i)),!window._moreInfoDialogListener){const e=async e=>{if(e.state&&"cardToolsPopup"in e.state)if(e.state.cardToolsPopup){const{title:t,card:r,large:o,style:n,fullscreen:s}=e.state.params;x(t,r,o,n,s)}else i.closeDialog()};window.addEventListener("popstate",e),window._moreInfoDialogListener=!0}history.replaceState({cardToolsPopup:!1},""),history.pushState({cardToolsPopup:!0,params:{title:e,card:t,large:r,style:o,fullscreen:n}},""),i.showDialog(e,t,r,o,n)}function D(e,t,r){e||(e=Object(a.a)().connection);let o={user:Object(a.a)().user.name,browser:v.a,hash:location.hash.substr(1)||" ",...r.variables},n=r.template,s=r.entity_ids;return e.subscribeMessage(e=>{let r=e.result;r=r.replace(/_\([^)]*\)/g,e=>Object(a.a)().localize(e.substring(2,e.length-1))||e),t(r)},{type:"render_template",template:n,variables:o,entity_ids:s})}var j=r(2);const T=Object(a.a)().callWS({type:"config/area_registry/list"}),P=Object(a.a)().callWS({type:"config/device_registry/list"}),k=Object(a.a)().callWS({type:"config/entity_registry/list"});async function q(){return window.cardToolsData=window.cardToolsData||{areas:await T,devices:await P,entities:await k},window.cardToolsData}function $(e){const t=window.cardToolsData;for(const r of t.areas)if(r.name.toLowerCase()===e.toLowerCase())return r;return null}function R(e){const t=window.cardToolsData;let r=[];if(!e)return r;for(const o of t.devices)o.area_id===e.area_id&&r.push(o);return r}function I(e){const t=window.cardToolsData;for(const r of t.devices)if(r.name.toLowerCase()===e.toLowerCase())return r;return null}function L(e){const t=window.cardToolsData;let r=[];if(!e)return r;for(const o of t.entities)o.device_id===e.id&&r.push(o.entity_id);return r}function M(e,t){window._registerCard||(window._customCardButtons=[],window._registerCard=(e,t)=>{window._customCardButtons.push({el:e,name:t})},customElements.whenDefined("hui-card-picker").then(()=>{customElements.get("hui-card-picker").prototype.firstUpdated=function(){this._customCardButtons=document.createElement("div"),this._customCardButtons.classList.add("cards-container"),this._customCardButtons.id="custom",this._customCardButtons.style.borderTop="1px solid var(--primary-color)",window._customCardButtons.forEach,this.shadowRoot.appendChild(this._customCardButtons),window._customCardButtons.forEach(e=>{const t=document.createElement("mwc-button");t.type="custom:"+e.el,t.innerHTML=e.name,t.addEventListener("click",this._cardPicked),this._customCardButtons.appendChild(t)})}})),window._registerCard(e,t)}q();const B=async e=>{await(async()=>{if(customElements.get("developer-tools-event"))return;await customElements.whenDefined("partial-panel-resolver");const e=document.createElement("partial-panel-resolver");e.hass={panels:[{url_path:"tmp",component_name:"developer-tools"}]},e._updateRoutes(),await e.routerOptions.routes.tmp.load(),await customElements.whenDefined("developer-tools-router");const t=document.createElement("developer-tools-router");await t.routerOptions.routes.event.load()})();return document.createElement("developer-tools-event")._computeParsedEventData(e)};class N{static checkVersion(e){}static args(){}static logger(){}static get localize(){return Object(a.a)().localize}static get deviceID(){return v.a}static get fireEvent(){return i}static get hass(){return Object(a.a)()}static get lovelace(){return Object(a.c)()}static get lovelace_view(){return a.d}static get provideHass(){return a.e}static get LitElement(){return o}static get LitHtml(){return n}static get LitCSS(){return s}static get longpress(){return b}static get createCard(){return p}static get createElement(){return m}static get createEntityRow(){return h}static get moreInfo(){return S}static get popUp(){return x}static get closePopUp(){return C}static get hasTemplate(){return e=>{return t=e,!!String(t).includes("{%")||!!String(t).includes("{{")||void 0||Object(j.a)(e);var t}}static parseTemplate(e,t,r={}){return"string"==typeof e?Object(j.b)(e,t):async function(e,t,r={}){for(var o in e||(e=e()),r={},r=Object.assign({user:e.user.name,browser:v.a,hash:location.hash.substr(1)||" "},r)){var n=new RegExp(`\\{${o}\\}`,"g");t=t.replace(n,r[o])}return e.callApi("POST","template",{template:t})}(e,t,r)}static get subscribeRenderTemplate(){return D}static get getData(){return q}static get areaByName(){return $}static get areaDevices(){return R}static get deviceByName(){return I}static get deviceEntities(){return L}static get registerCard(){return M}static get yaml2json(){return B}static get selectTree(){return O}}const A=r(3);customElements.get("card-tools")||(customElements.define("card-tools",N),window.cardTools=customElements.get("card-tools"),console.info(`%cCARD-TOOLS ${A.version} IS INSTALLED\n %cDeviceID: ${customElements.get("card-tools").deviceID}`,"color: green; font-weight: bold",""))}]); \ No newline at end of file diff --git a/www/community/lovelace-card-tools/card-tools.js.gz b/www/community/lovelace-card-tools/card-tools.js.gz index 315ed2d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OcPe}!efd=P##50`Q2&>eF@I$a(7L|_t&$*toE;B#G8K| zBa9LNCrU*wd114mKE@V9zF{<^vW2gvauiQ#{PiDY=?F+PH6w5(SSd11Fya$c3bAWS z>IGFJC2SraGj7i@PetlEV76=kwEOxt#CjBGjjIyR_63`?=_{Tspra>1)#J??ejLPW z1+?lltp$_VFrQMB&)P5YngGAZS!TZ(Y>uAZ+}O_r8&tB1%7`qxVvp;f7Srb%V6h3X zLEn4}j8dIzZZV^=O%rZgylrrb&wriQV>gWjFesAQaj#d<#{DI*fQF% z`CNH)UH#nT`5!hkzWxLoRgZqNN6`lV^!NpsPy<}A1L)VImiAt3nuT>F-#0tGn<=LA^pK371}Q2tkM!<&XLVfN87^9-Mq!Fd?|5TAa$K5O4zUVgf9J~$UQ z&c&CT+mD|P|CW_m^0aapz3zS8F9S5BgFFx Ph`s*_Ro3+XBQyX2HP@!H diff --git a/www/community/lovelace-card-tools/webpack.config.js.gz b/www/community/lovelace-card-tools/webpack.config.js.gz index 5e3511982c30b5124f8010579e63b8da28e727fc..eb44d52256f620ffefb5e454886e523d053c9cb1 100644 GIT binary patch delta 16 XcmZ3>xR#MazMF%?f0JeWM2@8ZCvyb$ delta 16 YcmZ3>xR#MazMF$%!JN0T6FHUw04$;f;{X5v diff --git a/www/community/lovelace-fold-entity-row/fold-entity-row.js b/www/community/lovelace-fold-entity-row/fold-entity-row.js index 040a64d..d0eab35 100644 --- a/www/community/lovelace-fold-entity-row/fold-entity-row.js +++ b/www/community/lovelace-fold-entity-row/fold-entity-row.js @@ -1,11 +1,6 @@ -!function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=0)}([function(t,e,i){"use strict";i.r(e);const n=customElements.get("home-assistant-main")?Object.getPrototypeOf(customElements.get("home-assistant-main")):Object.getPrototypeOf(customElements.get("hui-view")),s=n.prototype.html,o=n.prototype.css;function r(){return document.querySelector("home-assistant").hass}const a="custom:",c=["input_number","input_select","input_text","scene","weblink"];function l(t,e){const i=document.createElement("hui-error-card");return i.setConfig({type:"error",error:t,config:e}),i}function h(t,e){if(!e||"object"!=typeof e||!e.type)return l(`No ${t} type configured`,e);let i=e.type;if(i=i.startsWith(a)?i.substr(a.length):`hui-${i}-${t}`,customElements.get(i))return function(t,e){const i=document.createElement(t);try{i.setConfig(e)}catch(t){return l(t,e)}return i}(i,e);const n=l(`Custom element doesn't exist: ${i}.`,e);n.style.display="None";const s=setTimeout(()=>{n.style.display=""},2e3);return customElements.whenDefined(i).then(()=>{clearTimeout(s),function(t,e,i=null){if((t=new Event(t,{bubbles:!0,cancelable:!1,composed:!0})).detail=e||{},i)i.dispatchEvent(t);else{var n=document.querySelector("home-assistant");(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=n&&n.shadowRoot)&&n.querySelector("home-assistant-main"))&&n.shadowRoot)&&n.querySelector("app-drawer-layout partial-panel-resolver"))&&n.shadowRoot||n)&&n.querySelector("ha-panel-lovelace"))&&n.shadowRoot)&&n.querySelector("hui-root"))&&n.shadowRoot)&&n.querySelector("ha-app-layout #view"))&&n.firstElementChild)&&n.dispatchEvent(t)}}("ll-rebuild",{},n)}),n}class u extends n{static get properties(){return{hass:{},config:{},noHass:{type:Boolean}}}setConfig(t){var e;this._config=t,this.el?this.el.setConfig(t):this.el=this.create(t),this._hass&&(this.el.hass=this._hass),this.noHass&&(e=this,document.querySelector("home-assistant").provideHass(e))}set config(t){this.setConfig(t)}set hass(t){this._hass=t,this.el&&(this.el.hass=t)}createRenderRoot(){return this}render(){return s`${this.el}`}}if(!customElements.get("card-maker")){class t extends u{create(t){return function(t){return h("card",t)}(t)}getCardSize(){return this.firstElementChild&&this.firstElementChild.getCardSize?this.firstElementChild.getCardSize():1}}customElements.define("card-maker",t)}if(!customElements.get("element-maker")){class t extends u{create(t){return function(t){return h("element",t)}(t)}}customElements.define("element-maker",t)}if(!customElements.get("entity-row-maker")){class t extends u{create(t){return function(t){const e=new Set(["call-service","divider","section","weblink"]);if(!t)return l("Invalid configuration given.",t);if("string"==typeof t&&(t={entity:t}),"object"!=typeof t||!t.entity&&!t.type)return l("Invalid configuration given.",t);const i=t.type||"default";if(e.has(i)||i.startsWith(a))return h("row",t);const n=t.entity.split(".",1)[0];return Object.assign(t,{type:{alert:"toggle",automation:"toggle",climate:"climate",cover:"cover",fan:"toggle",group:"group",input_boolean:"toggle",input_number:"input-number",input_select:"input-select",input_text:"input-text",light:"toggle",lock:"lock",media_player:"media-player",remote:"toggle",scene:"scene",script:"script",sensor:"sensor",timer:"timer",switch:"toggle",vacuum:"toggle",water_heater:"climate",input_datetime:"input-datetime"}[n]||"text"}),h("entity-row",t)}(t)}}customElements.define("entity-row-maker",t)}customElements.define("fold-entity-row",class extends n{static get properties(){return{_hass:{},open:Boolean,items:{}}}setConfig(t){this._config=Object.assign({},{open:!1,padding:20,group_config:{}},t),this.open=this.open||this._config.open,this.head=this._config.head,this._config.entity&&(this.head=this._config.entity),"string"==typeof this.head&&(this.head={entity:this.head}),this.items=this._config.items,this._config.entities&&(this.items=this._config.entities),this.head.entity&&this.head.entity.startsWith("group.")&&!this.items&&(this.items=r().states[this.head.entity].attributes.entity_id)}clickRow(t){t.stopPropagation();const e=t.target.parentElement._config;this.hasMoreInfo(e)||e.tap_action?customElements.get("hui-entities-card").prototype._handleClick.bind(this)(e):t.target.parentElement.hasAttribute("head")&&this.toggle(t)}toggle(t){t&&t.stopPropagation(),this.open=!this.open}hasMoreInfo(t){const e=t.entity||("string"==typeof t?t:null);return!(!e||c.includes(e.split(".",1)[0]))}firstUpdated(){const t=this.shadowRoot.querySelector("#head > entity-row-maker");t.updateComplete.then(()=>{const e=t.querySelector("hui-section-row");e&&e.updateComplete.then(()=>{e.shadowRoot.querySelector(".divider").style.marginRight="-56px"})})}set hass(t){this._hass=t}render(){this._entities&&this._entities.forEach(t=>t.hass=this._hass);const t=t=>("string"==typeof t&&(t={entity:t}),Object.assign({},this._config.group_config,t));return s` +!function(e){var t={};function o(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)o.d(n,i,function(t){return e[t]}.bind(null,i));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=1)}([function(e){e.exports=JSON.parse('{"name":"fold-entity-row","private":true,"version":"19.0.0","description":"","scripts":{"build":"webpack","watch":"webpack --watch --mode=development","update-card-tools":"npm uninstall card-tools && npm install thomasloven/lovelace-card-tools"},"keywords":[],"author":"Thomas Lovén","license":"MIT","devDependencies":{"webpack":"^4.42.0","webpack-cli":"^3.3.11"},"dependencies":{"card-tools":"github:thomasloven/lovelace-card-tools"}}')},function(e,t,o){"use strict";o.r(t);const n=customElements.get("home-assistant-main")?Object.getPrototypeOf(customElements.get("home-assistant-main")):Object.getPrototypeOf(customElements.get("hui-view")),i=n.prototype.html,r=n.prototype.css;function s(){return document.querySelector("hc-main")?document.querySelector("hc-main").hass:document.querySelector("home-assistant")?document.querySelector("home-assistant").hass:void 0}function a(e,t,o=null){if((e=new Event(e,{bubbles:!0,cancelable:!1,composed:!0})).detail=t||{},o)o.dispatchEvent(e);else{var n=function(){var e=document.querySelector("hc-main");return e=e?(e=(e=(e=e&&e.shadowRoot)&&e.querySelector("hc-lovelace"))&&e.shadowRoot)&&e.querySelector("hui-view")||e.querySelector("hui-panel-view"):(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=document.querySelector("home-assistant"))&&e.shadowRoot)&&e.querySelector("home-assistant-main"))&&e.shadowRoot)&&e.querySelector("app-drawer-layout partial-panel-resolver"))&&e.shadowRoot||e)&&e.querySelector("ha-panel-lovelace"))&&e.shadowRoot)&&e.querySelector("hui-root"))&&e.shadowRoot)&&e.querySelector("ha-app-layout #view"))&&e.firstElementChild}();n&&n.dispatchEvent(e)}}const l=["input_number","input_select","input_text","scene","weblink"];let c=window.cardHelpers;const d=new Promise(async(e,t)=>{c&&e();const o=async()=>{c=await window.loadCardHelpers(),window.cardHelpers=c,e()};window.loadCardHelpers?o():window.addEventListener("load",async()=>{!function(){if(customElements.get("hui-view"))return!0;const e=document.createElement("partial-panel-resolver");if(e.hass=s(),!e.hass||!e.hass.panels)return!1;e.route={path:"/lovelace/"},e._updateRoutes();try{document.querySelector("home-assistant").appendChild(e)}catch(e){}finally{document.querySelector("home-assistant").removeChild(e)}customElements.get("hui-view")}(),window.loadCardHelpers&&o()})});function u(e,t){const o={type:"error",error:e,origConfig:t},n=document.createElement("hui-error-card");return customElements.whenDefined("hui-error-card").then(()=>{const e=document.createElement("hui-error-card");e.setConfig(o),n.parentElement&&n.parentElement.replaceChild(e,n)}),d.then(()=>{a("ll-rebuild",{},n)}),n}function h(e,t){if(!t||"object"!=typeof t||!t.type)return u(`No ${e} type configured`,t);let o=t.type;if(o=o.startsWith("custom:")?o.substr("custom:".length):`hui-${o}-${e}`,customElements.get(o))return function(e,t){let o=document.createElement(e);try{o.setConfig(JSON.parse(JSON.stringify(t)))}catch(e){o=u(e,t)}return d.then(()=>{a("ll-rebuild",{},o)}),o}(o,t);const n=u(`Custom element doesn't exist: ${o}.`,t);n.style.display="None";const i=setTimeout(()=>{n.style.display=""},2e3);return customElements.whenDefined(o).then(()=>{clearTimeout(i),a("ll-rebuild",{},n)}),n}function p(e){if(c)return c.createRowElement(e);const t=new Set(["call-service","cast","conditional","divider","section","select","weblink"]),o={alert:"toggle",automation:"toggle",climate:"climate",cover:"cover",fan:"toggle",group:"group",input_boolean:"toggle",input_number:"input-number",input_select:"input-select",input_text:"input-text",light:"toggle",lock:"lock",media_player:"media-player",remote:"toggle",scene:"scene",script:"script",sensor:"sensor",timer:"timer",switch:"toggle",vacuum:"toggle",water_heater:"climate",input_datetime:"input-datetime",none:void 0};if(!e)return u("Invalid configuration given.",e);if("string"==typeof e&&(e={entity:e}),"object"!=typeof e||!e.entity&&!e.type)return u("Invalid configuration given.",e);const n=e.type||"default";return t.has(n)||n.startsWith("custom:")?h("row",e):h("entity-row",{type:o[e.entity?e.entity.split(".",1)[0]:"none"]||"text",...e})}class m extends n{static get properties(){return{open:Boolean,rows:{}}}setConfig(e){this._config=Object.assign({},{open:!1,padding:20,group_config:{}},e),this.open=this.open||this._config.open;let t=this._config.head;if(this._config.entity&&(t=this._config.entity),!t)throw new Error("No fold head specified");"string"==typeof t&&(t={entity:t});let o=this._config.items;if(void 0!==this._config.entities&&(o=this._config.entities),t.entity&&t.entity.startsWith("group.")&&void 0===o)o=s().states[t.entity].attributes.entity_id;else{if(void 0===o)throw new Error("No entities specified.");if(!o||void 0===o.length)throw new Error("Entities must be a list.")}const n=e=>("string"==typeof e&&(e={entity:e}),Object.assign({},this._config.group_config,e));this.head=p(t),this.head.hass=s(),this.head.addEventListener("click",e=>{this.hasMoreInfo(t)||t.tap_action||this.toggle(e)}),this.head.setAttribute("head","head"),this.applyStyle(this.head,t),"HUI-SECTION-ROW"===this.head.tagName&&customElements.whenDefined(this.head.localName).then(async()=>{await this.updateComplete,await this.head.updateComplete,this.head.shadowRoot.querySelector(".divider").style.marginRight="-56px"}),this.rows=o.map(e=>{const t=p(n(e));return t.hass=s(),this.hasMoreInfo(e)&&t.classList.add("state-card-dialog"),this.applyStyle(t,n(e)),t})}async applyStyle(e,t){if(!t.style)return;e.updateComplete&&await e.updateComplete;const o=document.createElement("card-mod");o.template={template:t.style,variables:{config:t},entity_ids:t.entity_ids},customElements.whenDefined(e.localName).then(()=>{e.shadowRoot&&e.shadowRoot.appendChild(o)})}toggle(e){e&&e.stopPropagation(),this.open=!this.open}hasMoreInfo(e){const t=e.entity||("string"==typeof e?e:null);return!(!t||l.includes(t.split(".",1)[0]))}set hass(e){this.rows.forEach(t=>t.hass=e),this.head.hass=e}render(){return i` - `}static get styles(){return o` + `}static get styles(){return r` #head { --toggle-icon-width: 40px; display: flex; cursor: pointer; align-items: center; } - #head entity-row-maker { + #head :not(ha-icon) { flex-grow: 1; max-width: calc(100% - var(--toggle-icon-width)); } @@ -55,4 +43,4 @@ .state-card-dialog { cursor: pointer; } - `}})}]); \ No newline at end of file + `}}if(!customElements.get("fold-entity-row")){customElements.define("fold-entity-row",m);const e=o(0);console.info(`%cFOLD-ENTITY-ROW ${e.version} IS INSTALLED`,"color: green; font-weight: bold","")}}]); \ No newline at end of file diff --git a/www/community/lovelace-fold-entity-row/fold-entity-row.js.gz b/www/community/lovelace-fold-entity-row/fold-entity-row.js.gz index 3caac218f71446cb1d1cbd446144fb618328bba2..3714f540875aaaad273786b1a418a0ab87b03310 100644 GIT binary patch liter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v0!)!iCLmM<=>{q6Vdn4;-+}e6znL0R*EeD* zj_qj|bbzJ3RPQD|E4H2K=E1&1oUZgIlT*98@@f8%5G$oKi`}cGfj}|%iP2&A<2?p-B*so5Bx8ig(oi`PNH?NdT00J8p0Hv=*WPpkX zz;CqJO{6$fZX^~S6+t5J67Oo@yv?4Rh;WC={j1B%-+7Vum{tA>Js|T>9%}=7beiRP zj?Y=0d-jgMR(izP;VtiStOSzuc-6FF7_04=cw1ONa4 diff --git a/www/community/lovelace-gap-card/gap-card.js b/www/community/lovelace-gap-card/gap-card.js new file mode 100644 index 0000000..303e805 --- /dev/null +++ b/www/community/lovelace-gap-card/gap-card.js @@ -0,0 +1,14 @@ +class GapCard extends HTMLElement { + + setConfig(config) { + this.height = ('height' in config) ? config.height : 50; + this.size = ('size' in config) ? config.size : Math.ceil(this.height/50); + this.style.setProperty('height', this.height + 'px'); + } + + getCardSize() { + return this.size; + } +} + +customElements.define('gap-card', GapCard); diff --git a/www/community/lovelace-gap-card/gap-card.js.gz b/www/community/lovelace-gap-card/gap-card.js.gz new file mode 100644 index 0000000000000000000000000000000000000000..4083da549ca6ae6f036bed84a486d4fc8e170ed7 GIT binary patch literal 232 zcmVnNQ(Gom@0Kg+9 zl|7qG>h=qH4g4rKKFZN#Il&U7c#i^%g&w%-rXDtjS-kj?y}4scZHE8E7BUCeE6O8{ zrjP^K=`0S1=jc{o#C8v^s?pKy<7xb3b_AlnikA6o0%jbL8#uC*?87;vi?d&wZ!p94 i#Zy&w1^Fn&v#}^ers|32BP`Vw%J*L*I@MBP0RRBC8EoSK literal 0 HcmV?d00001 diff --git a/www/community/lovelace-layout-card/layout-card.js b/www/community/lovelace-layout-card/layout-card.js index ea64eb0..01736bf 100644 --- a/www/community/lovelace-layout-card/layout-card.js +++ b/www/community/lovelace-layout-card/layout-card.js @@ -1,8 +1,14 @@ -!function(t){var e={};function n(s){if(e[s])return e[s].exports;var o=e[s]={i:s,l:!1,exports:{}};return t[s].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,s){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(s,o,function(e){return t[e]}.bind(null,o));return s},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";n.r(e);const s=customElements.get("home-assistant-main")?Object.getPrototypeOf(customElements.get("home-assistant-main")):Object.getPrototypeOf(customElements.get("hui-view")),o=s.prototype.html,i=s.prototype.css;const r="custom:";function c(t,e){const n=document.createElement("hui-error-card");return n.setConfig({type:"error",error:t,origConfig:e}),n}function a(t,e){if(!e||"object"!=typeof e||!e.type)return c(`No ${t} type configured`,e);let n=e.type;if(n=n.startsWith(r)?n.substr(r.length):`hui-${n}-${t}`,customElements.get(n))return function(t,e){const n=document.createElement(t);try{n.setConfig(e)}catch(t){return c(t,e)}return n}(n,e);const s=c(`Custom element doesn't exist: ${n}.`,e);s.style.display="None";const o=setTimeout(()=>{s.style.display=""},2e3);return customElements.whenDefined(n).then(()=>{clearTimeout(o),function(t,e,n=null){if((t=new Event(t,{bubbles:!0,cancelable:!1,composed:!0})).detail=e||{},n)n.dispatchEvent(t);else{var s=document.querySelector("home-assistant");(s=(s=(s=(s=(s=(s=(s=(s=(s=(s=(s=s&&s.shadowRoot)&&s.querySelector("home-assistant-main"))&&s.shadowRoot)&&s.querySelector("app-drawer-layout partial-panel-resolver"))&&s.shadowRoot||s)&&s.querySelector("ha-panel-lovelace"))&&s.shadowRoot)&&s.querySelector("hui-root"))&&s.shadowRoot)&&s.querySelector("ha-app-layout #view"))&&s.firstElementChild)&&s.dispatchEvent(t)}}("ll-rebuild",{},s)}),s}function l(){return document.querySelector("home-assistant").hass}const u=2;class d extends s{static get version(){return u}static get properties(){return{noHass:{type:Boolean}}}setConfig(t){var e;this._config=t,this.el?this.el.setConfig(t):(this.el=this.create(t),this._hass&&(this.el.hass=this._hass),this.noHass&&(e=this,document.querySelector("home-assistant").provideHass(e)))}set config(t){this.setConfig(t)}set hass(t){this._hass=t,this.el&&(this.el.hass=t)}createRenderRoot(){return this}render(){return o`${this.el}`}}const h=function(t,e){const n=Object.getOwnPropertyDescriptors(e.prototype);for(const[e,s]of Object.entries(n))"constructor"!==e&&Object.defineProperty(t.prototype,e,s);const s=Object.getOwnPropertyDescriptors(e);for(const[e,n]of Object.entries(s))"prototype"!==e&&Object.defineProperty(t,e,n);const o=Object.getPrototypeOf(e),i=Object.getOwnPropertyDescriptors(o.prototype);for(const[e,n]of Object.entries(i))"constructor"!==e&&Object.defineProperty(Object.getPrototypeOf(t).prototype,e,n);const r=Object.getOwnPropertyDescriptors(o);for(const[e,n]of Object.entries(r))"prototype"!==e&&Object.defineProperty(Object.getPrototypeOf(t),e,n)},m=customElements.get("card-maker");if(!m||!m.version||m.version{if(!t)return;const s=e[function(){let t=0;for(let s=0;sthis.place_cards()),window.addEventListener("hass-open-menu",()=>setTimeout(()=>this.place_cards(),100)),window.addEventListener("hass-close-menu",()=>setTimeout(()=>this.place_cards(),100)),window.addEventListener("location-changed",()=>{""===location.hash&&setTimeout(()=>this.place_cards(),100)})}async updated(t){!this.cards.length&&(this._config.entities&&this._config.entities.length||this._config.cards&&this._config.cards.length)&&(this.cards=await this.build_cards(),this.place_cards()),t.has("hass")&&this.hass&&this.cards&&this.cards.forEach(t=>{t&&(t.hass=this.hass)})}async build_card(t){if("break"===t)return null;const e=document.createElement("card-maker");return e.config={...t,...this._config.card_options},e.hass=l(),this.shadowRoot.querySelector("#staging").appendChild(e),new Promise((t,n)=>e.updateComplete.then(()=>t(e)))}async build_cards(){const t=this.shadowRoot.querySelector("#staging");for(;t.lastChild;)t.removeChild(t.lastChild);return Promise.all((this._config.entities||this._config.cards).map(t=>this.build_card(t)))}place_cards(){const t=this.shadowRoot.querySelector("#columns").clientWidth;this.columns=function(t,e,n){const s=t=>"string"==typeof t&&t.endsWith("%")?Math.floor(e*parseInt(t)/100):parseInt(t);let o=0;if("object"==typeof n.column_width){let t=e;for(;t>0;){let e=n.column_width[o];void 0===e&&(e=n.column_width.slice(-1)[0]),t-=s(e),o+=1}o=Math.max(o-1,1)}else o=Math.floor(e/s(n.column_width));o=Math.max(o,n.min_columns),o=Math.min(o,n.max_columns);let i=[];for(let t=0;t{if(s+=1,!t)return;const n=e[(s-1)%e.length];n.appendChild(t),n.length+=t.getCardSize?t.getCardSize():1})}(t,i);break;case"vertical":!function(t,e,n){let s=0;t.forEach(t=>{if(!t)return void(s+=1);const n=e[s%e.length];n.appendChild(t),n.length+=t.getCardSize?t.getCardSize():1})}(t,i);break;case"auto":default:g(t,i,n)}return i=i.filter(t=>t.childElementCount>0)}(this.cards,t,this._config),this._config.rtl&&this.columns.reverse(),this.format_columns(),this.requestUpdate()}format_columns(){const t=(t,e,n,s="px")=>{if(void 0===this._config[e])return"";let o=`${t}: `;const i=this._config[e];return"object"==typeof i?i.length>n?o+=`${i[n]}`:o+=`${i.slice(-1)}`:o+=`${i}`,o.endsWith("px")||o.endsWith("%")||(o+=s),o+";"};for(const[e,n]of this.columns.entries()){const s=[t("max-width","max_width",e),t("min-width","min_width",e),t("width","column_width",e),t("flex-grow","flex_grow",e,"")];n.style.cssText="".concat(...s)}}getCardSize(){if(this.columns)return Math.max.apply(Math,this.columns.map(t=>t.length))}_isPanel(){if(this.isPanel)return!0;let t=this.parentElement,e=10;for(;e--;){if("hui-panel-view"===t.localName)return!0;if("div"===t.localName)return!1;t=t.parentElement}return!1}render(){return o` +!function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=5)}([function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.ContentRect=function(t){if("getBBox"in t){var e=t.getBBox();return Object.freeze({height:e.height,left:0,top:0,width:e.width})}var i=window.getComputedStyle(t);return Object.freeze({height:parseFloat(i.height||"0"),left:parseFloat(i.paddingLeft||"0"),top:parseFloat(i.paddingTop||"0"),width:parseFloat(i.width||"0")})}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(2),o=i(3),r=[],s=function(){function t(t){this.$$observationTargets=[],this.$$activeTargets=[],this.$$skippedTargets=[];var e=function(t){if(void 0===t)return"Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.";if("function"!=typeof t)return"Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function."}(t);if(e)throw TypeError(e);this.$$callback=t,r.push(this)}return t.prototype.observe=function(t){var e=a("observe",t);if(e)throw TypeError(e);c(this.$$observationTargets,t)>0||(this.$$observationTargets.push(new n.ResizeObservation(t)),f())},t.prototype.unobserve=function(t){var e=a("unobserve",t);if(e)throw TypeError(e);var i=c(this.$$observationTargets,t);i<0||(this.$$observationTargets.splice(i,1),m())},t.prototype.disconnect=function(){this.$$observationTargets=[],this.$$activeTargets=[]},t}();function a(t,e){return void 0===e?"Failed to execute '"+t+"' on 'ResizeObserver': 1 argument required, but only 0 present.":e instanceof window.Element?void 0:"Failed to execute '"+t+"' on 'ResizeObserver': parameter 1 is not of type 'Element'."}function c(t,e){for(var i=0;it?e.$$activeTargets.push(i):e.$$skippedTargets.push(i))}))}))},u=function(){var t=1/0;return r.forEach((function(e){if(e.$$activeTargets.length){var i=[];e.$$activeTargets.forEach((function(e){var n=new o.ResizeObserverEntry(e.target);i.push(n),e.$$broadcastWidth=n.contentRect.width,e.$$broadcastHeight=n.contentRect.height;var r=h(e.target);r{c&&t();const i=async()=>{c=await window.loadCardHelpers(),window.cardHelpers=c,t()};window.loadCardHelpers?i():window.addEventListener("load",async()=>{!function(){if(customElements.get("hui-view"))return!0;const t=document.createElement("partial-panel-resolver");if(t.hass=s(),!t.hass||!t.hass.panels)return!1;t.route={path:"/lovelace/"},t._updateRoutes();try{document.querySelector("home-assistant").appendChild(t)}catch(t){}finally{document.querySelector("home-assistant").removeChild(t)}customElements.get("hui-view")}(),window.loadCardHelpers&&i()})});function d(t,e){const i={type:"error",error:t,origConfig:e},n=document.createElement("hui-error-card");return customElements.whenDefined("hui-error-card").then(()=>{const t=document.createElement("hui-error-card");t.setConfig(i),n.parentElement&&n.parentElement.replaceChild(t,n)}),l.then(()=>{a("ll-rebuild",{},n)}),n}function u(t,e){if(!e||"object"!=typeof e||!e.type)return d(`No ${t} type configured`,e);let i=e.type;if(i=i.startsWith("custom:")?i.substr("custom:".length):`hui-${i}-${t}`,customElements.get(i))return function(t,e){let i=document.createElement(t);try{i.setConfig(JSON.parse(JSON.stringify(e)))}catch(t){i=d(t,e)}return l.then(()=>{a("ll-rebuild",{},i)}),i}(i,e);const n=d(`Custom element doesn't exist: ${i}.`,e);n.style.display="None";const o=setTimeout(()=>{n.style.display=""},2e3);return customElements.whenDefined(i).then(()=>{clearTimeout(o),a("ll-rebuild",{},n)}),n}const h=t=>"function"==typeof t.getCardSize?t.getCardSize():customElements.get(t.localName)?1:customElements.whenDefined(t.localName).then(()=>h(t)),p=async(t,e,i)=>{const n=t=>"string"==typeof t&&t.endsWith("%")?Math.floor(e*parseInt(t)/100):parseInt(t);let o=0;if("object"==typeof i.column_width){let t=e;for(;t>0;){let e=i.column_width[o];void 0===e&&(e=i.column_width.slice(-1)[0]),t-=n(e),o+=1}o=Math.max(o-1,1)}else o=Math.floor(e/n(i.column_width));o=Math.max(o,i.min_columns),o=Math.min(o,i.max_columns),"auto"===i.layout&&"docked"===s().dockedSidebar&&!window.matchMedia("(max-width: 870px)").matches&&i.sidebar_column&&(o-=1),o=Math.max(o,1);let r=[];for(let t=0;t{let n=0;for(const i of t){if(n+=1,!i)continue;const t=e[(n-1)%e.length];t.appendChild(i),t.length+=await h(i)}})(t,r);break;case"vertical":await(async(t,e,i)=>{let n=0;for(const i of t){if(!i){n+=1;continue}const t=e[n%e.length];t.appendChild(i),t.length+=await h(i)}})(t,r);break;case"auto":default:await(async(t,e,i)=>{function n(){let t=0;for(let n=0;nt.childElementCount>0),r};var f=i(1);class g extends n{static get properties(){return{hass:{},_config:{}}}async setConfig(t){this._config={layout:"auto",min_height:5,column_width:300,max_width:t.column_width||"500px",min_columns:t.column_num||1,max_columns:t.column_num||100,sidebar_column:!1,...t},this.cards=[],this.columns=[],this._layoutWidth=0}connectedCallback(){super.connectedCallback();let t=this.parentElement,e=10;for(;e--&&t;){if("HUI-PANEL-VIEW"===t.tagName)this.classList.add("panel");else if("HUI-VERTICAL-STACK-CARD"===t.tagName)this.classList.add("stacked");else if("DIV"!==t.tagName&&"root"!==t.id)break;t=t.parentElement?t.parentElement:t.getRootNode().host}}async firstUpdated(){window.addEventListener("location-changed",()=>{""===location.hash&&setTimeout(()=>this.updateSize(),100)}),this.resizer||(this.resizer=new f.ResizeObserver(()=>{this.updateSize()}),this.resizer.observe(this)),this.updateSize()}async updateSize(){let t=this.getBoundingClientRect().width;this.classList.contains("panel")&&!window.matchMedia("(max-width: 870px)").matches&&this._config.sidebar_column&&(this.hass&&"docked"===this.hass.dockedSidebar?t+=256:t+=64),t&&Math.abs(t-this._layoutWidth)>50&&(this._layoutWidth=t,this.resizer.disconnect(),await this.place_cards(),this.requestUpdate().then(()=>this.resizer.observe(this)))}async updated(t){if(!this.cards.length&&(this._config.entities&&this._config.entities.length||this._config.cards&&this._config.cards.length)){this.clientWidth;this.cards=await this.build_cards(),await this.place_cards(),this.requestUpdate()}if(t.has("hass")&&this.hass&&this.cards)for(const t of this.cards)t&&(t.hass=this.hass)}async build_card(t){if("break"===t){if("grid"===this._config.layout){const t=document.createElement("div");return this.shadowRoot.querySelector("#staging").appendChild(t),t}return null}const e={...t,...this._config.card_options},i=function(t){return c?c.createCardElement(t):u("card",t)}(e);return i.hass=s(),"grid"===this._config.layout&&(i.style.gridColumn=e.gridcol||"auto",i.style.gridRow=e.gridrow||"auto"),this.shadowRoot.querySelector("#staging").appendChild(i),new Promise((t,e)=>i.updateComplete?i.updateComplete.then(()=>t(i)):t(i))}async build_cards(){const t=this.shadowRoot.querySelector("#staging");for(;t.lastChild;)t.removeChild(t.lastChild);return Promise.all((this._config.entities||this._config.cards).map(t=>this.build_card(t)))}async place_cards(){"grid"!==this._config.layout&&this.cards.length&&(this.columns=await p(this.cards,this._layoutWidth||1,this._config),this._config.rtl&&this.columns.reverse(),this.format_columns())}format_columns(){const t=(t,e,i,n="px")=>{if(void 0===this._config[e])return"";let o=t+": ";const r=this._config[e];return"object"==typeof r?r.length>i?o+=""+r[i]:o+=""+r.slice(-1):o+=""+r,o.endsWith("px")||o.endsWith("%")||(o+=n),o+";"};for(const[e,i]of this.columns.entries()){const n=[t("max-width","max_width",e),t("min-width","min_width",e),t("width","column_width",e),t("flex-grow","flex_grow",e,"")];i.style.cssText="".concat(...n)}}getCardSize(){return this.columns&&this.columns.length?Math.max.apply(Math,this.columns.map(t=>t.length)):this._config.entities?2*this._config.entities.length:this._config.cards?2*this._config.cards.length:1}render(){return"grid"===this._config.layout?o` +
+ `:o`
@@ -11,12 +17,25 @@ `)}
- `}static get styles(){return i` + `}static get styles(){return r` :host { - padding: 0 4px; + padding: 0; display: block; margin-bottom: 0!important; } + :host(.panel) { + padding: 0 4px; + margin-top: 8px; + } + :host(.panel.stacked:first-child) { + margin-top: 8px !important; + } + @media(max-width: 500px) { + :host(.panel) { + padding-left: 0px; + padding-right: 0px; + } + } #columns { display: flex; @@ -24,29 +43,50 @@ justify-content: center; margin-top: -8px; } - #columns.panel { - margin-top: 0; - } .column { flex-basis: 0; flex-grow: 1; overflow-x: hidden; } + .column:first-child { + margin-left: -4px; + } + .column:last-child { + margin-right: -4px; + } + :host(.panel) .column { + margin: 0; + } - card-maker>* { + + .cards>*, + .grid>* { display: block; margin: 4px 4px 8px; } - card-maker:first-child>* { + .cards>*:first-child { margin-top: 8px; } - card-maker:last-child>* { + .cards>*:last-child { margin-bottom: 4px; } + @media(max-width: 500px) { + .cards:first-child>*, + .grid>* { + margin-left: 0px; + } + .cards:last-child>*, + .grid>* { + margin-right: 0px; + } + } - #staging { + #staging:not(.grid) { visibility: hidden; height: 0; } - `}get _cardModder(){return{target:this}}})}]); \ No newline at end of file + #staging.grid { + margin: 0 -4px; + } + `}get _cardModder(){return{target:this}}}if(!customElements.get("layout-card")){customElements.define("layout-card",g);const t=i(4);console.info(`%cLAYOUT-CARD ${t.version} IS INSTALLED`,"color: green; font-weight: bold","")}}]); \ No newline at end of file diff --git a/www/community/lovelace-layout-card/layout-card.js.gz b/www/community/lovelace-layout-card/layout-card.js.gz index b528d4b2462e5b9287a39fae183ab6a0450e02b7..8002fa373e719d811a2193ab26ce137519d0f8bb 100644 GIT binary patch literal 4833 zcmV<75+3aziwFo%iTz#z|7>A-Z*_DnV_|Y+E^2cCy*g=g+eVh(=U0G8LIV*9lRjos zfFZ3%b}HWWk+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Q|&z-38RAm=Z!(-)iFx&{t z>&j0dI&2U-1e34?bq4|%z|}h@sSg2`gJsazoc$ZIt07*};p#}48g#A)3^PVpmA#k| z9gb5KLl`s2HVssaneKtwm^lpf>am>0cvpPh0?*l45byFDPj+TJ_<+r(Qv)xvtF90}Bc?;6cHDwi9Kg+W}xQjxkq3rYc4?Cj6=HWY${Lnb~T*V(Mz z5RH~YnGpa8^i*AspU-3xYRCItW0O z+`~%!Nf8Gb9|jqp4!VJHBynTwioTCFx&+bhcjldjgal}x=5tCRq5StUFg6WjU{nz-~tvJd-dpJa{^oY)Z;)+(A_cl3*P>Zh}s@Y^kSKsAZCzF-hkGu zF^4p}G?h$BqbN1_13wIy?+N;vAB`wR@K^nm@901ir(&!-KYp3Qe$&l5H+1F>_!Ce6 zdkq9VR%XQIL)))oY35q?!gvt;nrMDWLOjyhNp7+}m6N5`HUEIhh^-&72?$tS-`kGJ zb|lX%=+gUy3|n5=mwunwsr7Q&DP7;Z58V6fFF*%ZbA33Rb2S>iAAi5lVh#nG$J|!Q zR)Aj|`kiXXMnEa?mfqL(`?T-3p8*qZg*OO8|1NJ}=V&DqemC}(7i@=rIFfVa=5(Lf z7l&d-yY*DjVFsewl}gr_yR5_mM;ZoC&Y*zbv^il(i8}G3ZwDc|86UB>iV-*Ch07E6 z?P-nXYc^N8WO6j$cBAtr-sRAXw?Y6$_R;&q+p@Bx{A7m#qF;S}PDy7~pWr#^|7S!U zC?>j&jdZG-P#+8ZVG0P4pC;fe;Oj9Br*Uhaqg4+~vK6cFDsiR`&$E{R<1;V@jh3vj g^N*q&M~H(09;iz67o-jn`fZT@7q;fbeN`m@00)s?TL1t6 diff --git a/www/community/lovelace-layout-card/webpack.config.js.gz b/www/community/lovelace-layout-card/webpack.config.js.gz index d27989716ece02531d7bee8c36661fb3de1617c4..3e239f8baf5fc2b09f47796069b2e23e1981dbe2 100644 GIT binary patch delta 16 XcmZ3>xR#MazMF$1p!09sM2@8ZDpUoL delta 16 YcmZ3>xR#MazMF&N?3}l;6FHUw04?1H5C8xG diff --git a/www/community/lovelace-multiple-entity-row/multiple-entity-row.js b/www/community/lovelace-multiple-entity-row/multiple-entity-row.js index cf5c375..5d9dac4 100644 --- a/www/community/lovelace-multiple-entity-row/multiple-entity-row.js +++ b/www/community/lovelace-multiple-entity-row/multiple-entity-row.js @@ -1,243 +1 @@ -class MultipleEntityRow extends Polymer.Element { - - static get template() { - return Polymer.html` - - -

-
- [[entityName(main)]] -
- - -
-
- - - - -
`; - } - - defaultMoreInfo(e) { - e.stopPropagation(); - this.fireEvent(this.main.entity); - } - - primaryMoreInfo(e) { - e.stopPropagation(); - this.fireEvent(this.primary.entity); - } - - secondaryMoreInfo(e) { - e.stopPropagation(); - this.fireEvent(this.secondary.entity); - } - - tertiaryMoreInfo(e) { - e.stopPropagation(); - this.fireEvent(this.tertiary.entity); - } - - entityName(data) { - return data && data.stateObj && data.name !== false ? this.computeStateName(data.stateObj, data.name) : null; - } - - entityState(data) { - if (!data || !data.stateObj) return this._hass.localize('state.default.unavailable'); - return data.attribute - ? (data.attribute in data.stateObj.attributes) - ? `${data.stateObj.attributes[data.attribute]} ${data.unit ? data.unit : ''}` - : this._hass.localize('state.default.unavailable') - : this.computeStateValue(data.stateObj, data.unit); - } - - computeStateName(stateObj, name) { - return name || (stateObj.attributes.friendly_name === undefined - ? stateObj.entity_id.substr(stateObj.entity_id.indexOf('.') + 1).replace(/_/g, ' ') - : stateObj.attributes.friendly_name || ''); - } - - computeStateValue(stateObj, unit) { - let display; - const domain = stateObj.entity_id.substr(0, stateObj.entity_id.indexOf(".")); - - if (domain === "binary_sensor") { - if (stateObj.attributes.device_class) { - display = this._hass.localize(`state.${domain}.${stateObj.attributes.device_class}.${stateObj.state}`); - } - if (!display) { - display = this._hass.localize(`state.${domain}.default.${stateObj.state}`); - } - } else if (unit !== false && (unit || stateObj.attributes.unit_of_measurement) && !["unknown", "unavailable"].includes(stateObj.state)) { - display = `${stateObj.state} ${unit || stateObj.attributes.unit_of_measurement}`; - } else if (domain === "zwave") { - display = ["initializing", "dead"].includes(stateObj.state) - ? this._hass.localize(`state.zwave.query_stage.${stateObj.state}`, 'query_stage', stateObj.attributes.query_stage) - : this._hass.localize(`state.zwave.default.${stateObj.state}`); - } else { - display = this._hass.localize(`state.${domain}.${stateObj.state}`); - } - - return display || - this._hass.localize(`state.default.${stateObj.state}`) || - this._hass.localize(`component.${domain}.state.${stateObj.state}`) || - stateObj.state; - } - - setConfig(config) { - if (!config.entity) throw new Error('Please define an entity.'); - if (config.primary && !config.primary.entity) throw new Error('Please define a primary entity.'); - if (config.secondary && !config.secondary.entity) throw new Error('Please define a secondary entity.'); - if (config.tertiary && !config.tertiary.entity) throw new Error('Please define a tertiary entity.'); - if (config.info && !config.info.entity) throw new Error('Please define an info entity.'); - - this.showMainHeader = config.name_state; - this.showLastChanged = config.secondary_info === 'last-changed' && !config.info; - - this._config = config; - } - - set hass(hass) { - this._hass = hass; - - if (hass && this._config) { - const stateObj = this._config.entity in hass.states ? hass.states[this._config.entity] : null; - if (stateObj) { - this.main = this.initEntity(this._config); - this.primary = this.initEntity(this._config.primary); - this.secondary = this.initEntity(this._config.secondary); - this.tertiary = this.initEntity(this._config.tertiary); - this.info = this.initEntity(this._config.info); - } - } - } - - initEntity(config) { - const stateObj = config && config.entity && this._hass.states[config.entity]; - return stateObj ? Object.assign({}, config, { - stateObj: stateObj, - showToggle: this.validateToggle(config, stateObj), - }) : null; - } - - validateToggle(config, stateObj) { - return config && config.toggle === true && stateObj && (stateObj.state === "on" || stateObj.state === "off"); - } - - fireEvent(entity, options = {}) { - const event = new Event('hass-more-info', { - bubbles: options.bubbles || true, - cancelable: options.cancelable || true, - composed: options.composed || true, - }); - event.detail = {entityId: entity}; - this.shadowRoot.dispatchEvent(event); - return event; - } -} - -customElements.define('multiple-entity-row', MultipleEntityRow); +(()=>{"use strict";var t="[1-9]\\d?",n="\\d\\d",e="[^\\s]+";function i(t,n){for(var e=[],i=0,r=t.length;i-1?i:null}};function o(t){for(var n=[],e=1;e3?0:(t-t%10!=10?1:0)*t%10]}},f=(o({},s),function(t){return+t-1}),l=[null,t],y=[null,e],d=["isPm",e,function(t,n){var e=t.toLowerCase();return e===n.amPm[0]?0:e===n.amPm[1]?1:null}],h=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(t){var n=(t+"").match(/([+-]|\d\d)/gi);if(n){var e=60*+n[1]+parseInt(n[2],10);return"+"===n[0]?e:-e}return 0}];r("monthNamesShort"),r("monthNames");(function(){try{(new Date).toLocaleDateString("i")}catch(t){return"RangeError"===t.name}})(),function(){try{(new Date).toLocaleString("i")}catch(t){return"RangeError"===t.name}}(),function(){try{(new Date).toLocaleTimeString("i")}catch(t){return"RangeError"===t.name}}();var p=function(t){return t<10?"0"+t:t};function b(t){return t.substr(0,t.indexOf("."))}var v=["closed","locked","off"],m=(new Set(["fan","input_boolean","light","switch","group","automation"]),function(t,n,e,i){i=i||{},e=null==e?{}:e;var r=new Event(n,{bubbles:void 0===i.bubbles||i.bubbles,cancelable:Boolean(i.cancelable),composed:void 0===i.composed||i.composed});return r.detail=e,t.dispatchEvent(r),r});new Set(["call-service","divider","section","weblink","cast","select"]);var g=function(t){m(window,"haptic",t)};function _(t){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var w=["entity-id","last-changed","last-updated","last-triggered","position","tilt-position","brightness"],O=function(t){return"object"===_(t)&&!Array.isArray(t)&&!!t},j=function(t){return!t||["unknown","unavailable"].includes(t.state)},k=function(t,n){return n.hide_unavailable&&(j(t)||n.attribute&&void 0===t.attributes[n.attribute])},S=function(t){if(O(t)&&!(t.entity||t.attribute||t.icon))throw new Error("Entity object requires at least one 'entity', 'attribute' or 'icon'.");if("string"==typeof t&&""===t)throw new Error("Entity ID string must not be blank.");if("string"!=typeof t&&!O(t))throw new Error("Entity config must be a valid entity ID string or entity object.")},E=function(t,n){return!1===n.name?null:n.name||(n.entity?t.attributes.friendly_name||(e=t.entity_id).substr(e.indexOf(".")+1):null)||null;var e},P=function(t){return O(null==t?void 0:t.styles)?Object.keys(t.styles).map((function(n){return"".concat(n,": ").concat(t.styles[n],";")})).join(""):""};function x(){var t,n,e=(t=["\n .icon-small {\n width: auto;\n }\n .entity {\n text-align: center;\n cursor: pointer;\n }\n .entity span {\n font-size: 10px;\n color: var(--secondary-text-color);\n }\n .entities-row {\n flex-direction: row;\n display: inline-flex;\n justify-content: space-between;\n align-items: center;\n }\n .entities-row .entity {\n margin-right: 16px;\n }\n .entities-row .entity:last-of-type {\n margin-right: 0;\n }\n .entities-column {\n flex-direction: column;\n display: flex;\n align-items: flex-end;\n justify-content: space-evenly;\n }\n .entities-column .entity div {\n display: inline-block;\n vertical-align: middle;\n }\n"],n||(n=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(n)}})));return x=function(){return e},e}function D(t){return(D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function I(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,i)}return e}function N(t){for(var n=1;n\n ","\n "]);return z=function(){return t},t}function M(){var t=U(['']);return M=function(){return t},t}function T(){var t=U([""]);return T=function(){return t},t}function F(){var t=U(['']);return F=function(){return t},t}function L(){var t=U(['
\n ',"\n
","
\n
"]);return L=function(){return t},t}function C(){var t=U(["",""]);return C=function(){return t},t}function A(){var t=U(['
\n ',"\n
","
\n
"]);return A=function(){return t},t}function W(){var t=U([""," ",""]);return W=function(){return t},t}function V(){var t=U(["",""]);return V=function(){return t},t}function H(){var t=U(['\n
\n ',"","\n
\n "]);return H=function(){return t},t}function J(){var t=U([""]);return J=function(){return t},t}function U(t,n){return n||(n=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(n)}}))}function q(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function B(t,n){for(var e=0;e0?i+":"+p(r)+":"+p(o):r>0?r+":"+p(o):o>0?""+o:null;if(n.format.startsWith("precision")){var u=function(t,n){return void 0!==n.attribute?n.unit:n.unit||t.attributes.unit_of_measurement}(t,n),s=parseInt(n.format.slice(-1),10);return"".concat(parseFloat(a).toFixed(s)).concat(u?" ".concat(u):"")}return a}},{key:"renderIcon",value:function(t,n){return X(M(),t,!0===n.icon?t.attributes.icon||null:n.icon,n.state_color)}},{key:"renderWarning",value:function(){return X(z(),this._hass.localize("ui.panel.lovelace.warning.entity_not_found","entity",this.config.entity))}},{key:"clickHandler",value:function(t,n){var e=this;return function(){return function(t,n,e,i,r){var o;if(e.tap_action&&(o=e.tap_action),o||(o={action:"more-info"}),!o.confirmation||o.confirmation.exemptions&&o.confirmation.exemptions.some((function(t){return t.user===n.user.id}))||confirm(o.confirmation.text||"Are you sure you want to "+o.action+"?"))switch(o.action){case"more-info":(o.entity||e.entity||e.camera_image)&&(m(t,"hass-more-info",{entityId:o.entity?o.entity:e.entity?e.entity:e.camera_image}),o.haptic&&g(o.haptic));break;case"navigate":o.navigation_path&&(function(t,n,e){void 0===e&&(e=!1),e?history.replaceState(null,"",n):history.pushState(null,"",n),m(window,"location-changed",{replace:e})}(0,o.navigation_path),o.haptic&&g(o.haptic));break;case"url":o.url_path&&window.open(o.url_path),o.haptic&&g(o.haptic);break;case"toggle":e.entity&&(function(t,n){(function(t,n,e){void 0===e&&(e=!0);var i,r=b(n),o="group"===r?"homeassistant":r;switch(r){case"lock":i=e?"unlock":"lock";break;case"cover":i=e?"open_cover":"close_cover";break;default:i=e?"turn_on":"turn_off"}t.callService(o,i,{entity_id:n})})(t,n,v.includes(t.states[n].state))}(n,e.entity),o.haptic&&g(o.haptic));break;case"call-service":if(!o.service)return;var a=o.service.split(".",2),c=a[0],u=a[1],s=Object.assign({},o.service_data);"entity"===s.entity_id&&(s.entity_id=e.entity),n.callService(c,u,s),o.haptic&&g(o.haptic)}}(e,e._hass,{entity:t,tap_action:n})}}},{key:"hass",set:function(t){var n,e,i,r=this;this._hass=t,t&&this.config&&(this.stateObj=t.states[this.config.entity],O(this.config.secondary_info)&&(this.info=null!==(i=t.states[this.config.secondary_info.entity])&&void 0!==i?i:this.stateObj),this.entities=null!==(n=null===(e=this.config.entities)||void 0===e?void 0:e.map((function(n){var e="string"==typeof n?{entity:n}:n;return N(N({},e),{},{stateObj:e.entity?t.states[e.entity]:r.stateObj})})))&&void 0!==n?n:[])}}])&&B(n.prototype,e),i&&B(n,i),c}(K);customElements.define("multiple-entity-row",tt)})(); \ No newline at end of file diff --git a/www/community/lovelace-multiple-entity-row/multiple-entity-row.js.gz b/www/community/lovelace-multiple-entity-row/multiple-entity-row.js.gz index 70242b53c54f88ca2f238d6042ca0a6c42c7643d..6ea262d34836e20d52a6c495586cfcc60d9c6182 100644 GIT binary patch literal 5000 zcmV;36L;(%iwFoUuC-qR|7~?_bZKyGWi4fHbZK;XEpl&nE^2cC-8*Y@+qSZQg~FWJ zWKA(rdrxN$6-GDBqfMH`IkDTMRdh8J1zCtGP$fajj>P|dcL9(DDJo9S%>8mbnHa=l zvAfteVB2e+3BIGi@Vg>;WQS|iI{rpaAVsY3xp?<*U6TqPs5DbPT@En z;|qFwzO;FBsM?-A?hnVz=Xo3#MNMFWP)qVSl1GE#h&~F_t9(tl$VxIPkjN*rKb!{D z*o00;`^_wn?yG* zbDF8v2fE;8`*M}1y7?kys&NqlFlWB0XEajHshbDPj@%y{Hw$)v!`pC8vx`-d z3ZK~__LrT0=&lnkR>q9n=rT)$iU6B4drhs_#bKTBS4ze^a-CPW}L5?c<(PI1jIw zGh(1NCFVa4zB}W9&DkbQGy0MXn@_%ipl^Ik2sFBBsU;N z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#WMQ(Yx&bc z*)E6@MAwrE%9EnP=qF`C%2w-|V+k!Q+cJ+D)**sxXk8RNHYr@TjUqV;ucb+!Kcj0; z?9f;&O^^i^!;KFvR-bSJGFdcp#5qPcY)VB$#H!ZYHTF0I`~a4}{{Zl@ZIWfHNamT-Ec6mtoHi0U;mX z=HVb74AHmf)i5qGw6YY3H?y0?2n|ptDyOXj9|nWN(NIxr!XablgrmURyrpQc2pyt= zWhUAmnjCTRc7%@j8N|U5Eb|J;2!)sib3&mv%qmPPRtBzBhPu!F3~xw^XYyQZ^EmHZ z!0tXoJ}E>3x}_m|csixTqfyhwlT)}V@NLVlwHaT)LQ_2#Sg}V~v_xTuEZU|^Li1Eh zfSW$Y#omnNvlULNx|Humhl1&P8r1XyWm_7IP~a4D@Cf-%i#o$q=-W4J``-Bd)bR!S z&4p&|pYHnnbpiHin{04!*ozQyCf^-ZI#p=>x>QQjjIqbCb&!0V|M^qj0VD9f8}zk7&p}{Z$+n2%EqYy+tPBV53P3hS>XbnV)ssl{g}Hv=IcWRPHbviBt;9BV<=rq`wocTh zf`C!{Xr1M92Q<4X+Ravt5_Wc-bydP=tqZTX-OEYMX{C)cpL!Yu6 zI7h^X5Na_rQZ4Kn_I>aD@)UpfqSA?we%B+K055Af(YaUS*2tm;Aw~mlvU0cbJn*j% z%^hAvdW6_oT=qp5c;0u@i3Kg}$xbQx1|n0}get _max(){return this.stateObj.attributes.options.length-1}get _step(){return 1}}};customElements.define("slider-entity-row",class extends i{static get properties(){return{hass:{}}}setConfig(t){this._config=t;const e=t.entity.split(".")[0],s=n[e];if(!s)throw new Error(`Unsupported entity type: ${e}`);this.ctrl=new s(t)}render(){const t=this.ctrl;t.hass=this.hass;const e=this.hass.translationMetadata.translations[this.hass.language||"en"].isRTL?"rtl":"ltr",s=a` +!function(t){var e={};function s(i){if(e[i])return e[i].exports;var a=e[i]={i:i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,s),a.l=!0,a.exports}s.m=t,s.c=e,s.d=function(t,e,i){s.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},s.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(s.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)s.d(i,a,function(e){return t[e]}.bind(null,a));return i},s.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="",s(s.s=1)}([function(t){t.exports=JSON.parse('{"name":"slider-entity-row","private":true,"version":"1.0.0","description":"slider-entity-row =================","scripts":{"build":"webpack","watch":"webpack --watch --mode=development","update-card-tools":"npm uninstall card-tools && npm install thomasloven/lovelace-card-tools"},"repository":{"type":"git","url":"github.com:thomasloven/lovelace-slider-entity-row"},"keywords":[],"author":"Thomas Lovén","license":"MIT","devDependencies":{"webpack":"^4.42.1","webpack-cli":"^3.3.11"},"dependencies":{"card-tools":"github:thomasloven/lovelace-card-tools"}}')},function(t,e,s){"use strict";s.r(e);const i=customElements.get("home-assistant-main")?Object.getPrototypeOf(customElements.get("home-assistant-main")):Object.getPrototypeOf(customElements.get("hui-view")),a=i.prototype.html,r=i.prototype.css;class n{constructor(t){this._config=t}set hass(t){this._hass=t,this.stateObj=this._config.entity in t.states?t.states[this._config.entity]:null}get value(){return this._value?Math.round(this._value/this.step)*this.step:0}set value(t){t!==this.value&&(this._value=t)}get string(){return""+this.value}get hidden(){return!1}get hasSlider(){return!0}get hasToggle(){return!0}get isOff(){return 0===this.value}get min(){return void 0!==this._config.min?this._config.min:void 0!==this._min?this._min:0}get max(){return void 0!==this._config.max?this._config.max:void 0!==this._max?this._max:100}get step(){return void 0!==this._config.step?this._config.step:void 0!==this._step?this._step:5}}const u={light:class extends n{get attribute(){return this._config.attribute||"brightness"}get _value(){if(!this.stateObj||"on"!==this.stateObj.state)return 0;switch(this.attribute){case"color_temp":return Math.ceil(this.stateObj.attributes.color_temp);case"white_value":return Math.ceil(this.stateObj.attributes.white_value);case"brightness":return Math.ceil(100*this.stateObj.attributes.brightness/255);case"red":return this.stateObj.attributes.rgb_color?Math.ceil(this.stateObj.attributes.rgb_color[0]):0;case"green":return this.stateObj.attributes.rgb_color?Math.ceil(this.stateObj.attributes.rgb_color[1]):0;case"blue":return this.stateObj.attributes.rgb_color?Math.ceil(this.stateObj.attributes.rgb_color[2]):0;case"hue":return this.stateObj.attributes.hs_color?Math.ceil(this.stateObj.attributes.hs_color[0]):0;case"saturation":return this.stateObj.attributes.hs_color?Math.ceil(this.stateObj.attributes.hs_color[1]):0;case"effect":return this.stateObj.attributes.effect_list?this.stateObj.attributes.effect_list.indexOf(this.stateObj.attributes.effect):0;default:return 0}}get _step(){switch(this.attribute){case"effect":return 1;default:return 5}}get _min(){switch(this.attribute){case"color_temp":return this.stateObj?this.stateObj.attributes.min_mireds:0;default:return 0}}get _max(){switch(this.attribute){case"color_temp":return this.stateObj?this.stateObj.attributes.max_mireds:0;case"red":case"green":case"blue":case"white_value":return 255;case"hue":return 360;case"effect":return this.stateObj&&this.stateObj.attributes.effect_list?this.stateObj.attributes.effect_list.length-1:0;default:return 100}}set _value(t){if(!this.stateObj)return;let e,s=this.attribute,i=!0;switch(s){case"brightness":(t=Math.ceil(t/100*255))||(i=!1);break;case"red":case"green":case"blue":e=this.stateObj.attributes.rgb_color||[0,0,0],"red"===s&&(e[0]=t),"green"===s&&(e[1]=t),"blue"===s&&(e[2]=t),t=e,s="rgb_color";break;case"hue":case"saturation":e=this.stateObj.attributes.hs_color||[0,0],"hue"===s&&(e[0]=t),"saturation"===s&&(e[1]=t),t=e,s="hs_color";break;case"effect":t=this.stateObj.attributes.effect_list[t],s="effect"}i?this._hass.callService("light","turn_on",{entity_id:this.stateObj.entity_id,[s]:t}):this._hass.callService("light","turn_off",{entity_id:this.stateObj.entity_id})}get string(){if(this.stateObj&&"off"===this.stateObj.state)return this._hass.localize("state.default.off");switch(this.attribute){case"color_temp":return""+this.value;case"brightness":case"saturation":return this.value+" %";case"hue":return this.value+" °";case"effect":return this.stateObj?this.stateObj.attributes.effect:"";default:return this.value}}get hasSlider(){if(!this.stateObj)return!1;switch(this.attribute){case"brightness":return"brightness"in this.stateObj.attributes||!!("supported_features"in this.stateObj.attributes&&1&this.stateObj.attributes.supported_features);case"color_temp":return"color_temp"in this.stateObj.attributes||!!("supported_features"in this.stateObj.attributes&&2&this.stateObj.attributes.supported_features);case"white_value":return"white_value"in this.stateObj.attributes||!!("supported_features"in this.stateObj.attributes&&128&this.stateObj.attributes.supported_features);case"red":case"green":case"blue":return"rgb_color"in this.stateObj.attributes||!!("supported_features"in this.stateObj.attributes&&16&this.stateObj.attributes.supported_features);case"hue":case"saturation":return"hs_color"in this.stateObj.attributes||!!("supported_features"in this.stateObj.attributes&&16&this.stateObj.attributes.supported_features);case"effect":return"effect"in this.stateObj.attributes;default:return!1}}},media_player:class extends n{get _value(){return"on"===this.stateObj.is_volume_muted?0:Math.ceil(100*this.stateObj.attributes.volume_level)}set _value(t){t/=100,this._hass.callService("media_player","volume_set",{entity_id:this.stateObj.entity_id,volume_level:t})}get isOff(){return"off"===this.stateObj.state}get string(){return this.stateObj.attributes.is_volume_muted?"-":this.stateObj.attributes.volume_level?this.value+" %":this._hass.localize("state.media_player.off")}get hasToggle(){return!1}},climate:class extends n{get _value(){return this.stateObj.attributes.temperature}set _value(t){this._hass.callService("climate","set_temperature",{entity_id:this.stateObj.entity_id,temperature:t})}get string(){return"off"===this.stateObj.attributes.hvac_mode?this._hass.localize("state.climate.off"):`${this.value} ${this._hass.config.unit_system.temperature}`}get isOff(){return"off"===this.stateObj.attributes.hvac_mode}get _min(){return this.stateObj.attributes.min_temp}get _max(){return this.stateObj.attributes.max_temp}get _step(){return 1}},cover:class extends n{get attribute(){return this._config.attribute||"position"}get _value(){switch(this.attribute){case"position":return"closed"===this.stateObj.state?0:this.stateObj.attributes.current_position;case"tilt":return this.stateObj.attributes.current_tilt_position;default:return 0}}set _value(t){switch(this.attribute){case"position":this._hass.callService("cover","set_cover_position",{entity_id:this.stateObj.entity_id,position:t});break;case"tilt":this._hass.callService("cover","set_cover_tilt_position",{entity_id:this.stateObj.entity_id,tilt_position:t})}}get string(){if(!this.hasSlider)return"";switch(this.attribute){case"position":return"closed"===this.stateObj.state?this._hass.localize("state.cover.closed"):this.value+" %";case"tilt":return this.value}}get hasToggle(){return!1}get hasSlider(){switch(this.attribute){case"position":if("current_position"in this.stateObj.attributes)return!0;if("supported_features"in this.stateObj.attributes&&4&this.stateObj.attributes.supported_features)return!0;case"tilt":if("current_tilt_position"in this.stateObj.attributes)return!0;if("supported_features"in this.stateObj.attributes&&128&this.stateObj.attributes.supported_features)return!0;default:return!1}}get _step(){return 10}},fan:class extends n{get _value(){return"off"!==this.stateObj.state?this.stateObj.attributes.speed_list.indexOf(this.stateObj.attributes.speed):0}set _value(t){t in this.stateObj.attributes.speed_list?this._hass.callService("fan","turn_on",{entity_id:this.stateObj.entity_id,speed:this.stateObj.attributes.speed_list[t]}):this._hass.callService("fan","turn_off",{entity_id:this.stateObj.entity_id})}get string(){return"off"===this.stateObj.state?this._hass.localize("state.default.off"):this.stateObj.attributes.speed}get hasSlider(){return"speed"in this.stateObj.attributes}get _max(){return this.stateObj.attributes.speed_list.length-1}get _step(){return 1}},input_number:class extends n{get _value(){return this.stateObj.state}set _value(t){this._hass.callService("input_number","set_value",{entity_id:this.stateObj.entity_id,value:t})}get string(){return`${parseFloat(this.stateObj.state)} ${this.stateObj.attributes.unit_of_measurement||""}`.trim()}get isOff(){return!1}get hasToggle(){return!1}get hasSlider(){return"slider"===this.stateObj.attributes.mode}get _min(){return this.stateObj.attributes.min}get _max(){return this.stateObj.attributes.max}get _step(){return this.stateObj.attributes.step}},input_select:class extends n{get _value(){return this.stateObj.attributes.options.indexOf(this.stateObj.state)}set _value(t){t in this.stateObj.attributes.options&&this._hass.callService("input_select","select_option",{entity_id:this.stateObj.entity_id,option:this.stateObj.attributes.options[t]})}get string(){return this.stateObj.state}get isOff(){return!1}get hasToggle(){return!1}get hasSlider(){return this.stateObj.attributes.options&&this.stateObj.attributes.options.length>0}get _max(){return this.stateObj.attributes.options.length-1}get _step(){return 1}}};class h extends i{static get properties(){return{hass:{},hide_state:{}}}setConfig(t){if(this._config=t,!t.entity)throw new Error("No entity specified.");const e=t.entity.split(".")[0],s=u[e];if(!s)throw new Error("Unsupported entity type: "+e);this.ctrl=new s(t)}async resized(){await this.updateComplete,this.shadowRoot&&(this.hide_state=this._config.full_row?this.parentElement.clientWidth<=180:this.parentElement.clientWidth<=335)}async firstUpdated(){await this.resized()}render(){const t=this.ctrl;if(t.hass=this.hass,!t.stateObj)return a` + + ${this.hass.localize("ui.panel.lovelace.warning.entity_not_found","entity",this._config.entity)} + + `;const e=this.hass.translationMetadata.translations[this.hass.language||"en"].isRTL?"rtl":"ltr",s=a` `,r=a`
t.stopPropagation()}> ${"unavailable"===t.stateObj.state?a` - - unavailable - + + unavailable + `:a` - ${this._config.hide_when_off&&t.isOff||!t.hasSlider?"":s} - ${this._config.hide_state||this._config.toggle?"":a` - - ${t.string} - - `} - ${this._config.toggle&&t.hasToggle?i:""} - `} + ${this._config.hide_when_off&&t.isOff||!t.hasSlider?"":s} + + ${this._config.toggle?t.hasToggle?i:"":(this._config.hide_state||this.hide_state)&&!1!==this._config.hide_state?"":a` + + ${t.string} + + `} + `}
- `;return this._config.full_row?r:a` - ${r} + `;return this._config.full_row?this._config.hide_when_off&&t.isOff?a``:r:a` + ${r} `}static get styles(){return r` .wrapper { display: flex; align-items: center; + justify-content: flex-end; + flex-grow: 2; height: 40px; } .state { min-width: 45px; text-align: end; + margin-left: 5px; } ha-entity-toggle { + min-width: auto; margin-left: 8px; } - ha-slider.full { + ha-slider { width: 100%; + min-width: 100px; } - `}})}]); \ No newline at end of file + ha-slider:not(.full) { + max-width: 200px; + } + `}}if(!customElements.get("slider-entity-row")){customElements.define("slider-entity-row",h);const t=s(0);console.info(`%cSLIDER-ENTITY-ROW ${t.version} IS INSTALLED`,"color: green; font-weight: bold","")}}]); \ No newline at end of file diff --git a/www/community/lovelace-slider-entity-row/slider-entity-row.js.gz b/www/community/lovelace-slider-entity-row/slider-entity-row.js.gz index 175922a959e11abf1e0808ebc805a61db0fdea1a..837cf37d7208cb2cc6ea84cb55a203e4c6dde9fe 100644 GIT binary patch literal 3413 zcmV-b4XW}ViwFp2iTz#z|8s0=wmgvFGK=w9Q7Ad?dBrJ+B_<{<~+md$AjSNTOuft4$N& z(xS1+`S{InW;mqT-XcpPLDOU)+}#ak4heVpq!@JgfVw-n7?2Bk=`tcRmN@dWPi{9U z6MQ0Ba43hu9Sx`#2feXpCWBp`PYjcgOc9Rb0WNqw>{Xw+3t!@}H>$>R?yp1PaX$(P z{C6H!P(9)SF7BuDqkDh<;re$H34cx&G$FsRbVHc9Q)D}mWNX6kbxZ;fz9b@`xtoJL z7TTtxEYaL^)C~4LX#{Itj+ZXAXU^H2t<7K~pNaH@O2X2is5}2Ym^0IN?GAg=sUIa#=ilnqoE zITTR1u+kt8d!@NxY#Bu4GWV}(GFP}f?7BsKQR$;3+>hplwbPQKlIk1mdC)RhMzF+1 zJcJQ=-y>38+E@}pXk4^msYs=f{tELC+oW)o&H~9GWo$x(JPzLF;n>Xw7q$VS$b|5( zXCL1C8_YNve7i#lUK11`9@9BtLy`z8?uIPgA`fjCy@6#zfnXVcy&;T)Fd!cLBY%YC zGVzGfjnJceBAl@K2Y56GN5KwVXEdGz8(PUj??lN%DJ zn>DBa;%qYqbi)X<`B0>33^Gx&Svy%m6E46nPBrE9`;MF|X2dF8V;-kBBsr1)jd4_y zlzWJgP0FcA*`35HeGl@NRB2|h{=CYr{U}`rt>X4w3Q|9jyKTzmfc4@M);|MI2C~kT z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2#mfUrvZO8Xgo8IAz%jsVn4J z>r{w+&j2 zub<^Yg;=1<0%W(9$-MF3G(zug@;DA4o=YUYz$d6?pxY$P$n+6sQ=aBwq$ln^+*Dfb zr|#oWo(a=Qk$GdcgD0K z%VfF{Ts7UwYshTHECSC5&k>RBn|P!qi{tS);`IS;iIB&N3o<0U2Xz2FWT%aBekh#Kq@T4!m83QX(L57_lFw@v5x!V)SX9_=2>ah2l3o&OA?aN&?v7z zT*xO8d$m8omW#08>fZDR7WsD`1n z-X>GZ$&Pte2--+iPew$(G_u~#_7zKIiHxA304m({nXY*R^zZhD3J!bCRO<1dzOUPY w+Uw60iL)(8jmZW;yzgSD>WB=G!KiV}XR{xhJgWj4hX;G{KX*0pn0_n(0O4b04*&oF diff --git a/www/community/lovelace-slider-entity-row/webpack.config.js.gz b/www/community/lovelace-slider-entity-row/webpack.config.js.gz index aac74bd93b07b21fc10f7d6f7ba29139ed5f6cab..9f3a3512d6099ab911da03b6f5d2e08a256b96c9 100644 GIT binary patch delta 16 XcmdnQxQUTNzMF$1t@Cf(M2=MeD~ScR delta 16 YcmdnQxQUTNzMF&N`<%D26FF7^056^fNdN!< diff --git a/www/community/lovelace-xiaomi-vacuum-card/xiaomi-vacuum-card.js b/www/community/lovelace-xiaomi-vacuum-card/xiaomi-vacuum-card.js index 496b9c8..eced0d3 100644 --- a/www/community/lovelace-xiaomi-vacuum-card/xiaomi-vacuum-card.js +++ b/www/community/lovelace-xiaomi-vacuum-card/xiaomi-vacuum-card.js @@ -1,274 +1,412 @@ -class XiaomiVacuumCard extends Polymer.Element { +((LitElement) => { + console.info( + '%c XIAOMI-VACUUM-CARD %c 4.1.0 ', + 'color: cyan; background: black; font-weight: bold;', + 'color: darkblue; background: white; font-weight: bold;', + ); - static get template() { - return Polymer.html` - - - -
-
-
[[getValue('status')]]
-
[[getValue('battery', ' %')]]
-
[[getValue('mode')]]
-
- -
- -
- `; + const state = { + status: { + key: 'status', + icon: 'mdi:robot-vacuum', + }, + battery: { + key: 'battery_level', + unit: '%', + icon: 'mdi:battery-charging-80', + }, + mode: { + key: 'fan_speed', + icon: 'mdi:fan', + }, + }; + + const attributes = { + main_brush: { + key: 'main_brush_left', + label: 'Main Brush: ', + unit: ' h', + }, + side_brush: { + key: 'side_brush_left', + label: 'Side Brush: ', + unit: ' h', + }, + filter: { + key: 'filter_left', + label: 'Filter: ', + unit: ' h', + }, + sensor: { + key: 'sensor_dirty_left', + label: 'Sensor: ', + unit: ' h', + }, + }; + + const buttons = { + start: { + label: 'Start', + icon: 'mdi:play', + service: 'vacuum.start', + }, + pause: { + label: 'Pause', + icon: 'mdi:pause', + service: 'vacuum.pause', + }, + stop: { + label: 'Stop', + icon: 'mdi:stop', + service: 'vacuum.stop', + }, + spot: { + show: false, + label: 'Clean Spot', + icon: 'mdi:broom', + service: 'vacuum.clean_spot', + }, + locate: { + label: 'Locate', + icon: 'mdi:map-marker', + service: 'vacuum.locate', + }, + return: { + label: 'Return to Base', + icon: 'mdi:home-map-marker', + service: 'vacuum.return_to_base', + }, + }; + + const compute = { + trueFalse: v => (v === true ? 'Yes' : (v === false ? 'No' : '-')), + divide100: v => Math.round(Number(v) / 100), } - moreInfo() { this.fireEvent('hass-more-info'); } - startVaccum() { this.callService(this._config.service.start); } - pauseVacuum() { this.callService(this._config.service.pause); } - stopVacuum() { this.callService(this._config.service.stop); } - locateVacuum() { this.callService(this._config.service.locate); } - returnVacuum() { this.callService(this._config.service.return); } - cleanSpot() { this.callService(this._config.service.spot); } - - callService(service) { - this._hass.callService('vacuum', service, {entity_id: this._config.entity}); - } - - fireEvent(type, options = {}) { - const event = new Event(type, { - bubbles: options.bubbles || true, - cancelable: options.cancelable || true, - composed: options.composed || true, - }); - event.detail = {entityId: this._config.entity}; - this.shadowRoot.dispatchEvent(event); - return event; - } - - getCardSize() { - if (this.name && this.showButtons) return 5; - if (this.name || this.showButtons) return 4; - return 3; - } - - setConfig(config) { - const labels = { - status: 'Status', - battery: 'Battery', - mode: 'Mode', - main_brush: 'Main Brush', - side_brush: 'Side Brush', - filter: 'Filter', - sensor: 'Sensor', - hours: 'h', - }; - - const services = { - start: 'start', - pause: 'pause', - stop: 'stop', - locate: 'locate', - return: 'return_to_base', - spot: 'clean_spot', - }; - - const buttons = { - start: true, - pause: true, - stop: true, - spot: false, - locate: true, - return: true, - }; - - const attributes = { - status: 'status', - battery: 'battery_level', - mode: 'fan_speed', - main_brush: 'main_brush_left', - side_brush: 'side_brush_left', - filter: 'filter_left', - sensor: 'sensor_dirty_left', - }; - - const vendors = { - xiaomi: { - image: '/local/img/vacuum.png', - details: true, - }, - valetudo: { - image: '/local/img/vacuum.png', - details: true, - attributes: { - status: 'state', - main_brush: 'mainBrush', - side_brush: 'sideBrush', - filter: 'filter', - sensor: 'sensor', + const vendors = { + xiaomi: {}, + xiaomi_mi: { + attributes: { + main_brush: {key: 'main_brush_hours'}, + side_brush: {key: 'side_brush_hours'}, + filter: {key: 'hypa_hours'}, + sensor: { + key: 'mop_hours', + label: 'Mop: ', }, }, - ecovacs: { - image: '/local/img/vacuum_ecovacs.png', - details: false, - buttons: { - stop: false, - spot: true, - }, - service: { - start: 'turn_on', - pause: 'stop', - stop: 'turn_off', + }, + valetudo: { + state: { + status: { + key: 'state', }, }, - deebot: { - image: '/local/img/vacuum_ecovacs.png', - details: true, - service: { - start: 'turn_on', - pause: 'stop', - stop: 'turn_off', + attributes: { + main_brush: {key: 'mainBrush'}, + side_brush: {key: 'sideBrush'}, + filter: {key: 'filter'}, + sensor: {key: 'sensor'}, + }, + }, + roomba: { + attributes: { + main_brush: false, + side_brush: false, + filter: false, + sensor: false, + bin_present: { + key: 'bin_present', + label: 'Bin Present: ', + compute: compute.trueFalse, }, - attributes: { - main_brush: 'component_main_brush', - side_brush: 'component_side_brush', - filter: 'component_filter', + bin_full: { + key: 'bin_full', + label: 'Bin Full: ', + compute: compute.trueFalse, }, - computeValue: v => Math.round(Number(v) / 100), - } - }; + }, + }, + robovac: { + attributes: false, + buttons: { + stop: {show: false}, + spot: {show: true}, + }, + }, + ecovacs: { + attributes: false, + buttons: { + start: {service: 'vacuum.turn_on'}, + pause: {service: 'vacuum.stop'}, + stop: {service: 'vacuum.turn_off', show: false}, + spot: {show: true}, + }, + }, + deebot: { + buttons: { + start: {service: 'vacuum.turn_on'}, + pause: {service: 'vacuum.stop'}, + stop: {service: 'vacuum.turn_off'}, + }, + attributes: { + main_brush: { + key: 'component_main_brush', + compute: compute.divide100, + }, + side_brush: { + key: 'component_side_brush', + compute: compute.divide100, + }, + filter: { + key: 'component_filter', + compute: compute.divide100, + }, + sensor: false, + }, + }, + deebot_slim: { + buttons: { + start: {service: 'vacuum.turn_on'}, + pause: {service: 'vacuum.stop'}, + stop: {service: 'vacuum.turn_off'}, + }, + attributes: { + main_brush: false, + side_brush: {key: 'component_side_brush'}, + filter: {key: 'component_filter'}, + sensor: false, + }, + }, + neato: { + state: { + mode: false, + }, + attributes: { + main_brush: false, + side_brush: false, + filter: false, + sensor: false, + clean_area: { + key: 'clean_area', + label: 'Cleaned area: ', + unit: ' m2', + }, + }, + }, + }; - if (!config.entity) throw new Error('Please define an entity.'); - if (config.entity.split('.')[0] !== 'vacuum') throw new Error('Please define a vacuum entity.'); - if (config.vendor && !config.vendor in vendors) throw new Error('Please define a valid vendor.'); + const html = LitElement.prototype.html; + const css = LitElement.prototype.css; - const vendor = vendors[config.vendor] || vendors.xiaomi; + class XiaomiVacuumCard extends LitElement { - this.showDetails = vendor.details; - this.showButtons = config.buttons !== false; - - config.service = Object.assign({}, services, vendor.service); - config.buttons = Object.assign({}, buttons, vendor.buttons, config.buttons); - config.attributes = Object.assign({}, attributes, vendor.attributes, config.attributes); - config.labels = Object.assign({}, labels, config.labels); - - this.getValue = (field, unit = '') => { - const value = (this.stateObj && config.attributes[field] in this.stateObj.attributes) - ? this.stateObj.attributes[config.attributes[field]] + unit - : (this._hass ? this._hass.localize('state.default.unavailable') : 'Unavailable'); - return `${config.labels[field]}: ${value}`; - }; - - this.computeValue = field => { - if (this.stateObj && config.attributes[field] in this.stateObj.attributes) { - const value = this.stateObj.attributes[config.attributes[field]]; - return `${config.labels[field]}: ${vendor.computeValue ? vendor.computeValue(value) : value} ${config.labels.hours}`; - } else { - return `${config.labels[field]}: - `; - } - }; - - this.contentText = `color: ${config.image !== false ? 'white; text-shadow: 0 0 10px black;' : 'var(--primary-text-color)'}`; - this.contentStyle = `padding: ${this.showButtons ? '16px 16px 4px' : '16px'}; ${this.contentText}`; - this.backgroundImage = config.image !== false ? `background-image: url('${config.image || vendor.image}')` : ''; - - this._config = config; - } - - set hass(hass) { - this._hass = hass; - - if (hass && this._config) { - this.stateObj = this._config.entity in hass.states ? hass.states[this._config.entity] : null; - - if (this.stateObj) { - this.name = this._config.name !== false && (this._config.name || this.stateObj.attributes.friendly_name); + static get properties() { + return { + _hass: {}, + config: {}, + stateObj: {}, } } - } -} -customElements.define('xiaomi-vacuum-card', XiaomiVacuumCard); + static get styles() { + return css` +.background { + background-repeat: no-repeat; + background-position: center center; + background-size: cover; +} +.title { + font-size: 20px; + padding: 12px 16px 8px; + text-align: center; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.flex { + display: flex; + align-items: center; + justify-content: space-evenly; +} +.grid { + display: grid; + grid-template-columns: repeat(2, auto); + cursor: pointer; +} +.grid-content { + display: grid; + align-content: space-between; + grid-row-gap: 6px; +} +.grid-left { + text-align: left; + font-size: 110%; + padding-left: 10px; + border-left: 2px solid var(--primary-color); +} +.grid-right { + text-align: right; + padding-right: 10px; + border-right: 2px solid var(--primary-color); +}`; + } + + render() { + return this.stateObj ? html` + + ${this.config.show.name ? + html`
${this.config.name || this.stateObj.attributes.friendly_name}
` + : null} + ${(this.config.show.state || this.config.show.attributes) ? html` +
+ ${this.config.show.state ? html` +
+ ${Object.values(this.config.state).filter(v => v).map(this.renderAttribute.bind(this))} +
` : null} + ${this.config.show.attributes ? html` +
+ ${Object.values(this.config.attributes).filter(v => v).map(this.renderAttribute.bind(this))} +
` : null} +
` : null} + ${this.config.show.buttons ? html` +
+ ${Object.values(this.config.buttons).filter(v => v).map(this.renderButton.bind(this))} +
` : null} +
` : html`Entity '${this.config.entity}' not available...`; + } + + renderAttribute(data) { + const computeFunc = data.compute || (v => v); + const isValid = data && data.key in this.stateObj.attributes; + + const value = isValid + ? computeFunc(this.stateObj.attributes[data.key]) + (data.unit || '') + : this._hass.localize('state.default.unavailable'); + const attribute = html`
${data.icon && this.renderIcon(data)}${(data.label || '') + value}
`; + + return (isValid && data.key === 'fan_speed' && 'fan_speed_list' in this.stateObj.attributes) + ? this.renderMode(attribute) : attribute; + + } + + renderIcon(data) { + const icon = (data.key === 'battery_level' && 'battery_icon' in this.stateObj.attributes) + ? this.stateObj.attributes.battery_icon + : data.icon; + return html``; + } + + renderButton(data) { + return data && data.show !== false + ? html`` + : null; + } + + renderMode(attribute) { + const selected = this.stateObj.attributes.fan_speed; + const list = this.stateObj.attributes.fan_speed_list; + + return html` + + ${attribute} + + ${list.map(item => html`${item}`)} + + + `; + } + + getCardSize() { + if (this.config.show.name && this.config.show.buttons) return 4; + if (this.config.show.name || this.config.show.buttons) return 3; + return 2; + } + + shouldUpdate(changedProps) { + return changedProps.has('stateObj'); + } + + setConfig(config) { + if (!config.entity) throw new Error('Please define an entity.'); + if (config.entity.split('.')[0] !== 'vacuum') throw new Error('Please define a vacuum entity.'); + if (config.vendor && !config.vendor in vendors) throw new Error('Please define a valid vendor.'); + + const vendor = vendors[config.vendor] || vendors.xiaomi; + + this.config = { + name: config.name, + entity: config.entity, + show: { + name: config.name !== false, + state: config.state !== false, + attributes: config.attributes !== false, + buttons: config.buttons !== false, + }, + buttons: this.deepMerge(buttons, vendor.buttons, config.buttons), + state: this.deepMerge(state, vendor.state, config.state), + attributes: this.deepMerge(attributes, vendor.attributes, config.attributes), + styles: { + background: config.image ? `background-image: url('${config.image}'); color: white; text-shadow: 0 0 10px black;` : '', + icon: `color: ${config.image ? 'white' : 'var(--paper-item-icon-color)'};`, + content: `padding: ${config.name !== false ? '8px' : '16px'} 16px ${config.buttons !== false ? '8px' : '16px'};`, + }, + }; + } + + set hass(hass) { + if (hass && this.config) { + this.stateObj = this.config.entity in hass.states ? hass.states[this.config.entity] : null; + } + this._hass = hass; + } + + handleChange(e) { + const mode = e.target.getAttribute('value'); + this.callService('vacuum.set_fan_speed', {entity_id: this.stateObj.entity_id, fan_speed: mode}); + } + + callService(service, data = {entity_id: this.stateObj.entity_id}) { + const [domain, name] = service.split('.'); + this._hass.callService(domain, name, data); + } + + fireEvent(type, options = {}) { + const event = new Event(type, { + bubbles: options.bubbles || true, + cancelable: options.cancelable || true, + composed: options.composed || true, + }); + event.detail = {entityId: this.stateObj.entity_id}; + this.dispatchEvent(event); + } + + deepMerge(...sources) { + const isObject = (obj) => obj && typeof obj === 'object'; + const target = {}; + + sources.filter(source => isObject(source)).forEach(source => { + Object.keys(source).forEach(key => { + const targetValue = target[key]; + const sourceValue = source[key]; + + if (Array.isArray(targetValue) && Array.isArray(sourceValue)) { + target[key] = targetValue.concat(sourceValue); + } else if (isObject(targetValue) && isObject(sourceValue)) { + target[key] = this.deepMerge(Object.assign({}, targetValue), sourceValue); + } else { + target[key] = sourceValue; + } + }); + }); + + return target; + } + } + + customElements.define('xiaomi-vacuum-card', XiaomiVacuumCard); +})(window.LitElement || Object.getPrototypeOf(customElements.get("hui-masonry-view") || customElements.get("hui-view"))); diff --git a/www/community/lovelace-xiaomi-vacuum-card/xiaomi-vacuum-card.js.gz b/www/community/lovelace-xiaomi-vacuum-card/xiaomi-vacuum-card.js.gz index 65128ae0af65a3cfd550f20d145f3aac8e584f70..65d5207a54a31fe6fa5d63da5e9459cec71c0803 100644 GIT binary patch literal 3275 zcmV;+3^el}iwFn?uC-qR|9EL(Z*6HUc41?6b!{zUVRB?HYI6YP8~u;lw)OY?73^WH zB+ODTSy2Rb?y@9HfB;P!G-%Kv2z<0e+iGM{peWyYssH!AM^X|cQL+;x!-hHN*&-j` zC;7gp`upuvL{t(@dE{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F~i-)B*RD%?xhfKidLc5Ax(0qGg@1sRo zYzIP_*`^&zgj{;;KkhLDAE*2ab2T&7CP+feyjURt4nc2+lF_KYr+^0@A0yd!dI0J; zX>pQpu%bN4;A@BUoZ$n9+tvvtw~U)zCyWu?Hgkl%di0lEo}Tcs$<`)y@?ylyb>0pn z=Rx|mbh7MZPo#uwv|?Yt5n)^X-x}s+$Fq0xOdVK2;kE9}C0}p|TfELp@|pA4;*6fm zfI{7Al}(f!5?g$ zE(8~|=oh%}C4o@LXh9H$^3*^sqItih?9qW9g;8iG0qXYh4!ya)Ms>&WJPTwYpJ8Ng z9bNRk>90W5=We7Iu`;h>47}kKyxZVvb0lwjyzX@Q>~S{MrZ>YFNLauz! zk4@RspJf;mnv~WTvC|g<&fhn`kwh(^*`wQH_H=BzJ9%ESu3N;_kV;#y`BdCqL!^1` z}k+I zny9ETtl#wQ4*Yd2dLrK%qIWtfd%#_-yrcfZDD3SRgFEyGBe+Lv>7+C>fSR%$2$bOL2pNzGR_p4wIvLla9 zY6G(xT;KLhG0IOjEQn80%P=0*0h70}ckZTbTJBJ(wum3_Hxha*dL3BUU7IodFs zd|pL5?D}uW4Y++x9(6VC3SnOMYAKp;a=d-=aw|yCeoN>3^3m|p57BW|!*`VOcnw~b zx4GI^^}h4{BUgk~g3Y3Vb(&kmJ|Cm`y_P8&n%d2o8jizhjQJ+OO#caw00B||8iL`h|?6vpm>7sh~d1-IwU(!j=}Z$d&`Kt!2zOK05cliwE@o M3mU|4YNaOt0Ma3rO#lD@ diff --git a/www/community/lovelace-xiaomi-vacuum-map-card/coordinates-converter.js b/www/community/lovelace-xiaomi-vacuum-map-card/coordinates-converter.js new file mode 100644 index 0000000..c5a19ca --- /dev/null +++ b/www/community/lovelace-xiaomi-vacuum-map-card/coordinates-converter.js @@ -0,0 +1,70 @@ +export default class CoordinatesConverter { + + constructor(p1, p2, p3) { + this.ABMatrix = this.conversionMatrixAB(p1, p2, p3); + this.BAMatrix = this.conversionMatrixBA(p1, p2, p3); + } + + conversionMatrixAB(p1, p2, p3) { + const p1p2ax = p1.a.x - p2.a.x; + const p1p3ax = p1.a.x - p3.a.x; + const p1p2ay = p1.a.y - p2.a.y; + const p1p3ay = p1.a.y - p3.a.y; + const p1p2bx = p1.b.x - p2.b.x; + const p1p3by = p1.b.y - p3.b.y; + const p1p3bx = p1.b.x - p3.b.x; + const p1p2by = p1.b.y - p2.b.y; + + const divAD = p1p2ax * p1p3ay - p1p3ax * p1p2ay; + const dibBE = p1p2ay * p1p3ax - p1p3ay * p1p2ax; + + const A = (p1p2bx * p1p3ay - p1p3bx * p1p2ay) / divAD; + const B = (p1p2bx * p1p3ax - p1p3bx * p1p2ax) / dibBE; + const C = p1.b.x - A * p1.a.x - B * p1.a.y; + + const D = (p1p2by * p1p3ay - p1p3by * p1p2ay) / divAD; + const E = (p1p2by * p1p3ax - p1p3by * p1p2ax) / dibBE; + const F = p1.b.y - D * p1.a.x - E * p1.a.y; + + return {A, B, C, D, E, F}; + } + + conversionMatrixBA(p1, p2, p3) { + const p1p2ax = p1.a.x - p2.a.x; + const p1p3ax = p1.a.x - p3.a.x; + const p1p2ay = p1.a.y - p2.a.y; + const p1p3ay = p1.a.y - p3.a.y; + const p1p2bx = p1.b.x - p2.b.x; + const p1p3by = p1.b.y - p3.b.y; + const p1p3bx = p1.b.x - p3.b.x; + const p1p2by = p1.b.y - p2.b.y; + + const divAD = p1p2bx * p1p3by - p1p3bx * p1p2by; + const dibBE = p1p2by * p1p3bx - p1p3by * p1p2bx; + + const A = (p1p2ax * p1p3by - p1p3ax * p1p2by) / divAD; + const B = (p1p2ax * p1p3bx - p1p3ax * p1p2bx) / dibBE; + const C = p1.a.x - A * p1.b.x - B * p1.b.y; + + const D = (p1p2ay * p1p3by - p1p3ay * p1p2by) / divAD; + const E = (p1p2ay * p1p3bx - p1p3ay * p1p2bx) / dibBE; + const F = p1.a.y - D * p1.b.x - E * p1.b.y; + + return {A, B, C, D, E, F}; + } + + convertAB(x, y) { + return this.convert(x, y, this.ABMatrix); + } + + convertBA(x, y) { + return this.convert(x, y, this.BAMatrix); + } + + convert(oldX, oldY, matrix) { + const {A, B, C, D, E, F} = matrix; + const x = A * oldX + B * oldY + C; + const y = D * oldX + E * oldY + F; + return {x, y}; + } +} diff --git a/www/community/lovelace-xiaomi-vacuum-map-card/coordinates-converter.js.gz b/www/community/lovelace-xiaomi-vacuum-map-card/coordinates-converter.js.gz new file mode 100644 index 0000000000000000000000000000000000000000..298a4980caa89de8e488659e41846b5129491476 GIT binary patch literal 521 zcmV+k0`~nMiwFpT)ZbqM|6^}&a%5?4VRU74En{zPc4cyOWpXZRa{%pC%Wi`(5WMFr z_L!t@s=zVofmd$5w?{jnDpCr_IF+p^|6cPjI9>v3rQV7Z1Yu@&y!P0sEDJ8+n7-5V zNxMG8a@mXn%5CY(2aygjjSJb z80R}U{|?Th%HWjIQ=@vfIR6gLV_jWl{IPL=Oc`9K$HwbAdj1_f&(ZT*JqLKqzJj>H zHH}=Gkv*E0t-GG=5Rrw6Au2{s-+ZgVwKHh88}X3|hZ_7+ODUB4`xVqeH#p|G&U8qeoGlF zt9i=_rlTE+%?6FyL1T8%*sp^o^g$*GC_7ml-#Q{igCVy^@Yn$yw=u_kqfQE6A#d2fbMsw)%AG#_Ffm? L8_?#k{s;g7Us?g| literal 0 HcmV?d00001 diff --git a/www/community/lovelace-xiaomi-vacuum-map-card/style.js b/www/community/lovelace-xiaomi-vacuum-map-card/style.js new file mode 100644 index 0000000..d718462 --- /dev/null +++ b/www/community/lovelace-xiaomi-vacuum-map-card/style.js @@ -0,0 +1,133 @@ +const LitElement = Object.getPrototypeOf( + customElements.get("ha-panel-lovelace") +); +const html = LitElement.prototype.html; + +const style = html` + `; + +export default style; \ No newline at end of file diff --git a/www/community/lovelace-xiaomi-vacuum-map-card/style.js.gz b/www/community/lovelace-xiaomi-vacuum-map-card/style.js.gz new file mode 100644 index 0000000000000000000000000000000000000000..884618bdc41b07ec86b4fdb6698411f212b6d74a G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Y~1zbmfKq0ivs_x}pWqWi*xz+FiA(y4N`eMY3EGPD#XeID~=kg4VK!k~nJD zxAZCg+VoSZ6b|)5Zf)x$K!fG|-t2pi|DYISTP_&?I4asFE>-M=V4lc*v9q9VQWAUpS(F{4lQ>2J}u zPy;bLn_u0^wsfAWxJfKmCm#7$YTocL?WQv&bgliMZEdb-TN`+%S+?(nE#q50*Xno$ z-cr4tplQXIrvzuKTsjZ)t{1(mhzbx4NTwC+%KN@!yy?2;Up&57d9)`}KQ}FUi+K^0 zlKZ{v@_-83Bn};486v(TyP&?vfKYAv1fR?ux$pqrW|i$?np$v(J$8Llu!sfhx)$5~ zVNU*oYpdMHZjbDV{a}aoV`vBL@Aeq`KVaTDUQdWUCFQT!I%M$GG2{68-= zb+NebT+$iZENauHH{|V4td^tlarq0u9lpRSDGyQq!=$ zO#LlaD@Qo#U%0B{73##T?|pe#{)|;Jn5mM7_=^r6;8EA3t#aE`&pX+ax;+g(iDdOH du6=Y1R{sZrKC-@By005#g5j_9^ literal 0 HcmV?d00001 diff --git a/www/community/lovelace-xiaomi-vacuum-map-card/xiaomi-vacuum-map-card.js b/www/community/lovelace-xiaomi-vacuum-map-card/xiaomi-vacuum-map-card.js new file mode 100644 index 0000000..0152510 --- /dev/null +++ b/www/community/lovelace-xiaomi-vacuum-map-card/xiaomi-vacuum-map-card.js @@ -0,0 +1,722 @@ +import CoordinatesConverter from './coordinates-converter.js'; +import style from './style.js'; +import { + mode, + goToTarget, + zonedCleanup, + zones, + run, + repeats, + confirmation, + texts +} from './texts.js' + +const LitElement = Object.getPrototypeOf( + customElements.get("ha-panel-lovelace") +); +const html = LitElement.prototype.html; + +if (typeof loadCardHelpers !== "undefined") { + loadCardHelpers().then(helpers => { + if (typeof helpers.importMoreInfoControl !== "undefined") { + helpers.importMoreInfoControl("light"); + } + }); +} + +class XiaomiVacuumMapCard extends LitElement { + constructor() { + super(); + this.isMouseDown = false; + this.rectangles = []; + this.selectedRectangle = -1; + this.selectedZones = []; + this.currRectangle = {x: null, y: null, w: null, h: null}; + this.imageScale = -1; + this.mode = 0; + this.vacuumZonedCleanupRepeats = 1; + this.currPoint = {x: null, y: null}; + this.outdatedConfig = false; + this.missingCameraAttribute = false; + } + + static get properties() { + return { + _hass: {}, + _config: {}, + isMouseDown: {}, + rectangles: {}, + selectedRectangle: {}, + selectedZones: {}, + currRectangle: {}, + mode: {}, + vacuumZonedCleanupRepeats: {}, + currPoint: {}, + mapDrawing: {}, + }; + } + + set hass(hass) { + this._hass = hass; + if (this._config && !this.map_image) { + this.updateCameraImage(); + } + } + + setConfig(config) { + const availableModes = new Map(); + this._language = config.language || "en"; + availableModes.set("go_to_target", texts[this._language][goToTarget]); + availableModes.set("zoned_cleanup", texts[this._language][zonedCleanup]); + availableModes.set("predefined_zones", texts[this._language][zones]); + + if (!config.entity) { + throw new Error("Missing configuration: entity"); + } + if (!config.map_image && !config.map_camera) { + throw new Error("Missing configuration: map_image or map_camera"); + } + if (config.map_image && config.map_camera) { + throw new Error("Only one of following properties is allowed: map_image or map_camera"); + } + if (config.base_position || config.reference_point) { + this.outdatedConfig = true; + this._config = config; + return; + } + if (!config.camera_calibration) { + if (!config.calibration_points || !Array.isArray(config.calibration_points)) { + throw new Error("Missing configuration: calibration_points or camera_calibration"); + } + if (config.calibration_points.length !== 3) { + throw new Error("Exactly 3 calibration_points required"); + } + for (const calibration_point of config.calibration_points) { + if (calibration_point.map === null) { + throw new Error("Missing configuration: calibration_points.map"); + } + if (calibration_point.map.x === null) { + throw new Error("Missing configuration: calibration_points.map.x"); + } + if (calibration_point.map.y === null) { + throw new Error("Missing configuration: calibration_points.map.y"); + } + if (calibration_point.vacuum === null) { + throw new Error("Missing configuration: calibration_points.vacuum"); + } + if (calibration_point.vacuum.x === null) { + throw new Error("Missing configuration: calibration_points.vacuum.x"); + } + if (calibration_point.vacuum.y === null) { + throw new Error("Missing configuration: calibration_points.vacuum.y"); + } + } + this.updateCoordinates(config) + } else { + if (!config.map_camera) { + throw new Error("Invalid configuration: map_camera is required for camera_calibration"); + } + } + + if (config.modes) { + if (!Array.isArray(config.modes) || config.modes.length < 1 || config.modes.length > 3) { + throw new Error("Invalid configuration: modes"); + } + this.modes = []; + for (const mode of config.modes) { + if (!availableModes.has(mode)) { + throw new Error("Invalid mode: " + mode); + } + this.modes.push(availableModes.get(mode)); + } + } else { + this.modes = [ + texts[this._language][goToTarget], + texts[this._language][zonedCleanup], + texts[this._language][zones] + ]; + } + if (!config.zones || !Array.isArray(config.zones) || config.zones.length === 0 && this.modes.includes(texts[this._language][zones])) { + this.modes.splice(this.modes.indexOf(texts[this._language][zones]), 1); + } + if (config.default_mode) { + if (!availableModes.has(config.default_mode) || !this.modes.includes(availableModes.get(config.default_mode))) { + throw new Error("Invalid default mode: " + config.default_mode); + } + this.defaultMode = this.modes.indexOf(availableModes.get(config.default_mode)); + } else { + this.defaultMode = -1; + } + if (config.service && config.service.split(".").length === 2) { + this.service_domain = config.service.split(".")[0]; + this.service_method = config.service.split(".")[1]; + } else { + this.service_domain = "vacuum"; + this.service_method = "send_command"; + } + if (config.map_image) { + this.map_image = config.map_image; + } + this._map_refresh_interval = (config.camera_refresh_interval || 5) * 1000; + this._config = config; + } + + updateCoordinates(config) { + const p1 = this.getCalibrationPoint(config, 0); + const p2 = this.getCalibrationPoint(config, 1); + const p3 = this.getCalibrationPoint(config, 2); + this.coordinatesConverter = new CoordinatesConverter(p1, p2, p3); + } + + getConfigurationMigration(config) { + const diffX = config.reference_point.x - config.base_position.x; + const diffY = config.reference_point.y - config.base_position.y; + const shouldSwapAxis = diffX * diffY > 0; + let unit = shouldSwapAxis ? diffX : diffY; + if (shouldSwapAxis) { + const temp = config.base_position.x; + config.base_position.x = config.base_position.y; + config.base_position.y = temp; + } + const canvasX = config.base_position.x; + const canvasY = unit + config.base_position.y; + let x = Math.round(canvasX); + let y = Math.round(canvasY); + if (shouldSwapAxis) { + x = Math.round(canvasY); + y = Math.round(canvasX); + } + return html` + +
Xiaomi Vacuum Map card
+

Your configuration is outdated

+

Migrate it using following calibration settings:

+
+
` + } + + getCalibrationPoint(config, index) { + return { + a: { + x: config.calibration_points[index].map.x, + y: config.calibration_points[index].map.y + }, + b: { + x: config.calibration_points[index].vacuum.x, + y: config.calibration_points[index].vacuum.y + } + }; + } + + render() { + if (this.outdatedConfig) { + return this.getConfigurationMigration(this._config); + } + const modesDropdown = this.modes.map(m => html`${m}`); + const rendered = html` + ${style} + +
+
+ + +
+
+ ${this.missingCameraAttribute ? + html`
+

Your camera entity is not providing calibration_points

+

Enable calibration_points in camera entity or disable camera_calibration

+
` : + html` +

+ + ${texts[this._language][run]} +

+
${texts[this._language][confirmation]}
`} +
`; + if (this.getMapImage()) { + this.calculateScale(); + } + return rendered; + } + + calculateScale() { + const img = this.getMapImage(); + const canvas = this.getCanvas(); + this.imageScale = img.width / img.naturalWidth; + const mapHeight = Math.round(this.imageScale * img.naturalHeight); + img.parentElement.parentElement.style.height = mapHeight + "px"; + canvas.width = img.width; + canvas.height = mapHeight; + this.drawCanvas(); + } + + onMouseDown(e) { + const pos = this.getMousePos(e); + this.isMouseDown = true; + if (this.mode === 1) { + this.currPoint.x = pos.x; + this.currPoint.y = pos.y; + } else if (this.mode === 2) { + const {selected, shouldDelete, shouldResize} = this.getSelectedRectangle(pos.x, pos.y); + this.currRectangle.x = pos.x; + this.currRectangle.y = pos.y; + if (shouldDelete) { + this.rectangles.splice(selected, 1); + this.selectedRectangle = -1; + this.isMouseDown = false; + this.drawCanvas(); + return; + } + if (shouldResize) { + this.currRectangle.x = this.rectangles[selected].x; + this.currRectangle.y = this.rectangles[selected].y; + this.rectangles.splice(selected, 1); + this.drawCanvas(); + return; + } + this.selectedRectangle = selected; + if (this.selectedRectangle >= 0) { + this.currRectangle.w = this.rectangles[this.selectedRectangle].x; + this.currRectangle.h = this.rectangles[this.selectedRectangle].y; + } else { + this.currRectangle.w = 0; + this.currRectangle.h = 0; + } + } else if (this.mode === 3) { + const selectedZone = this.getSelectedZone(pos.x, pos.y); + if (selectedZone >= 0) { + if (this.selectedZones.includes(selectedZone)) { + this.selectedZones.splice(this.selectedZones.indexOf(selectedZone), 1); + } else { + if (this.selectedZones.length < 5 || this._config.ignore_zones_limit) { + this.selectedZones.push(selectedZone); + } + } + } + } + this.drawCanvas(); + } + + onMouseUp(e) { + this.isMouseDown = false; + if (this.selectedRectangle >= 0 || this.mode !== 2 || this.mode === 2 && this.rectangles.length >= 5 && !this._config.ignore_zones_limit) { + this.selectedRectangle = -1; + this.drawCanvas(); + return; + } + const {x, y} = this.getMousePos(e); + const rx = Math.min(x, this.currRectangle.x); + const ry = Math.min(y, this.currRectangle.y); + const rw = Math.max(x, this.currRectangle.x) - rx; + const rh = Math.max(y, this.currRectangle.y) - ry; + this.currRectangle.x = rx; + this.currRectangle.y = ry; + this.currRectangle.w = rw; + this.currRectangle.h = rh; + if (rw > 5 && rh > 5) { + this.rectangles.push({x: rx, y: ry, w: rw, h: rh}); + } + this.drawCanvas(); + } + + onMouseMove(e) { + if (this.isMouseDown && this.mode === 2) { + const {x, y} = this.getMousePos(e); + if (this.selectedRectangle < 0) { + this.currRectangle.w = x - this.currRectangle.x; + this.currRectangle.h = y - this.currRectangle.y; + } else { + this.rectangles[this.selectedRectangle].x = this.currRectangle.w + x - this.currRectangle.x; + this.rectangles[this.selectedRectangle].y = this.currRectangle.h + y - this.currRectangle.y; + } + this.drawCanvas(); + } + } + + onTouchStart(e) { + if (this.mode === 2) { + this.onMouseDown(this.convertTouchToMouse(e)); + } + } + + onTouchEnd(e) { + if (this.mode === 2) { + this.onMouseUp(this.convertTouchToMouse(e)); + } + } + + onTouchMove(e) { + if (this.mode === 2) { + this.onMouseMove(this.convertTouchToMouse(e)); + } + } + + modeSelected(e) { + const selected = e.detail.value; + this.mode = 0; + if (selected === texts[this._language][goToTarget]) { + this.mode = 1; + } else if (selected === texts[this._language][zonedCleanup]) { + this.mode = 2; + } else if (selected === texts[this._language][zones]) { + this.mode = 3; + } + this.getPredefinedZonesIncreaseButton().hidden = this.mode !== 3 && this.mode !== 2; + this.drawCanvas(); + } + + vacuumZonedIncreaseButton() { + this.vacuumZonedCleanupRepeats++; + if (this.vacuumZonedCleanupRepeats > 3) { + this.vacuumZonedCleanupRepeats = 1; + } + } + + vacuumStartButton(debug) { + if (this.mode === 1 && this.currPoint.x != null) { + this.vacuumGoToPoint(debug); + } else if (this.mode === 2 && !this.rectangles.empty) { + this.vacuumStartZonedCleanup(debug); + } else if (this.mode === 3 && !this.selectedZones.empty) { + this.vacuumStartPreselectedZonesCleanup(debug); + } + } + + drawCanvas() { + const canvas = this.getCanvas(); + const context = canvas.getContext("2d"); + context.clearRect(0, 0, canvas.width, canvas.height); + context.translate(0.5, 0.5); + if (this._config.debug) { + let calibration_points = this._config.calibration_points; + if (this._config.camera_calibration) { + calibration_points = this._hass.states[this._config.map_camera].attributes.calibration_points; + } + for (const calibration_point of calibration_points) { + const {x, y} = this.convertVacuumToMapCoordinates(calibration_point.vacuum.x, calibration_point.vacuum.y); + this.drawCircle(context, x, y, 4, 'red', 1); + } + } + if (this.mode === 1 && this.currPoint.x != null) { + this.drawCircle(context, this.currPoint.x, this.currPoint.y, 4, 'yellow', 1); + } else if (this.mode === 2) { + for (let i = 0; i < this.rectangles.length; i++) { + const rect = this.rectangles[i]; + context.beginPath(); + if (i === this.selectedRectangle) { + context.setLineDash([10, 5]); + context.strokeStyle = 'white'; + } else { + context.setLineDash([]); + context.strokeStyle = 'white'; + context.fillStyle = 'rgba(255, 255, 255, 0.25)'; + context.fillRect(rect.x, rect.y, rect.w, rect.h); + } + context.rect(rect.x, rect.y, rect.w, rect.h); + context.lineWidth = 1; + context.stroke(); + this.drawDelete(context, rect.x + rect.w, rect.y); + this.drawResize(context, rect.x + rect.w, rect.y + rect.h); + } + if (this.isMouseDown && this.selectedRectangle < 0) { + context.beginPath(); + context.setLineDash([10, 5]); + context.strokeStyle = 'white'; + context.lineWidth = 1; + context.rect(this.currRectangle.x, this.currRectangle.y, this.currRectangle.w, this.currRectangle.h); + context.stroke(); + } + } else if (this.mode === 3) { + for (let i = 0; i < this._config.zones.length; i++) { + const zone = this._config.zones[i]; + for (const rect of zone) { + const {x, y, w, h} = this.convertVacuumToMapZone(rect[0], rect[1], rect[2], rect[3]); + context.beginPath(); + context.setLineDash([]); + if (!this.selectedZones.includes(i)) { + context.strokeStyle = 'red'; + context.fillStyle = 'rgba(255, 0, 0, 0.25)'; + } else { + context.strokeStyle = 'green'; + context.fillStyle = 'rgba(0, 255, 0, 0.25)'; + } + context.lineWidth = 1; + context.rect(x, y, w, h); + context.fillRect(x, y, w, h); + context.stroke(); + } + } + } + context.translate(-0.5, -0.5); + } + + drawCircle(context, x, y, r, style, lineWidth) { + context.beginPath(); + context.arc(x, y, r, 0, Math.PI * 2); + context.strokeStyle = style; + context.lineWidth = lineWidth; + context.stroke(); + } + + drawDelete(context, x, y) { + context.setLineDash([]); + this.drawCircle(context, x, y, 8, 'black', 1.2); + const diff = 4; + context.moveTo(x - diff, y - diff); + context.lineTo(x + diff, y + diff); + context.moveTo(x - diff, y + diff); + context.lineTo(x + diff, y - diff); + context.stroke(); + } + + drawResize(context, x, y) { + context.setLineDash([]); + this.drawCircle(context, x, y, 8, 'black', 1.2); + const diff = 4; + context.moveTo(x - diff, y - diff); + context.lineTo(x + diff, y + diff); + context.lineTo(x + diff, y + diff - 4); + context.lineTo(x + diff - 4, y + diff); + context.lineTo(x + diff, y + diff); + context.moveTo(x - diff, y - diff); + context.lineTo(x - diff, y - diff + 4); + context.lineTo(x - diff + 4, y - diff); + context.lineTo(x - diff, y - diff); + context.stroke(); + } + + getSelectedRectangle(x, y) { + let selected = -1; + let shouldDelete = false; + let shouldResize = false; + for (let i = this.rectangles.length - 1; i >= 0; i--) { + const rect = this.rectangles[i]; + if (Math.pow(x - rect.x - rect.w, 2) + Math.pow(y - rect.y, 2) <= 64) { + selected = i; + shouldDelete = true; + break; + } + if (Math.pow(x - rect.x - rect.w, 2) + Math.pow(y - rect.y - rect.h, 2) <= 64) { + selected = i; + shouldResize = true; + break; + } + if (x >= rect.x && y >= rect.y && x <= rect.x + rect.w && y <= rect.y + rect.h) { + selected = i; + break; + } + } + return {selected, shouldDelete, shouldResize}; + } + + getSelectedZone(mx, my) { + let selected = -1; + for (let i = 0; i < this._config.zones.length && selected === -1; i++) { + const zone = this._config.zones[i]; + for (const rect of zone) { + const {x, y, w, h} = this.convertVacuumToMapZone(rect[0], rect[1], rect[2], rect[3]); + if (mx >= x && my >= y && mx <= x + w && my <= y + h) { + selected = i; + break; + } + } + } + return selected; + } + + getCanvasStyle() { + if (this.mode === 2) return html`touch-action: none;`; + else return html``; + } + + vacuumGoToPoint(debug) { + const mapPos = this.convertMapToVacuumCoordinates(this.currPoint.x, this.currPoint.y); + if (debug && this._config.debug) { + alert(JSON.stringify([mapPos.x, mapPos.y])); + } else { + this._hass.callService(this.service_domain, this.service_method, { + entity_id: this._config.entity, + command: "app_goto_target", + params: [mapPos.x, mapPos.y] + }).then(() => this.showToast()); + } + } + + vacuumStartZonedCleanup(debug) { + const zone = []; + for (const rect of this.rectangles) { + zone.push(this.convertMapToVacuumRect(rect, this.vacuumZonedCleanupRepeats)); + } + if (debug && this._config.debug) { + alert(JSON.stringify(zone)); + } else { + this._hass.callService(this.service_domain, this.service_method, { + entity_id: this._config.entity, + command: "app_zoned_clean", + params: zone + }).then(() => this.showToast()); + } + } + + vacuumStartPreselectedZonesCleanup(debug) { + const zone = []; + for (let i = 0; i < this.selectedZones.length; i++) { + const selectedZone = this.selectedZones[i]; + const preselectedZone = this._config.zones[selectedZone]; + for (const rect of preselectedZone) { + zone.push([rect[0], rect[1], rect[2], rect[3], this.vacuumZonedCleanupRepeats]) + } + } + if (debug && this._config.debug) { + alert(JSON.stringify(zone)); + } else { + this._hass.callService(this.service_domain, this.service_method, { + entity_id: this._config.entity, + command: "app_zoned_clean", + params: zone + }).then(() => this.showToast()); + } + } + + getCardSize() { + return 5; + } + + convertMapToVacuumRect(rect, repeats) { + const xy1 = this.convertMapToVacuumCoordinates(rect.x, rect.y); + const xy2 = this.convertMapToVacuumCoordinates(rect.x + rect.w, rect.y + rect.h); + const x1 = Math.min(xy1.x, xy2.x); + const y1 = Math.min(xy1.y, xy2.y); + const x2 = Math.max(xy1.x, xy2.x); + const y2 = Math.max(xy1.y, xy2.y); + return [x1, y1, x2, y2, repeats]; + } + + convertMapToVacuumCoordinates(mapX, mapY) { + const {x, y} = this.coordinatesConverter.convertAB(mapX / this.imageScale, mapY / this.imageScale); + return {x: Math.round(x), y: Math.round(y)}; + } + + convertVacuumToMapZone(vacuumX1, vacuumY1, vacuumX2, vacuumY2) { + const {x: x1, y: y1} = this.convertVacuumToMapCoordinates(vacuumX1, vacuumY1); + const {x: x2, y: y2} = this.convertVacuumToMapCoordinates(vacuumX2, vacuumY2); + let x = Math.min(x1, x2); + let y = Math.min(y1, y2); + let w = Math.abs(x2 - x1); + let h = Math.abs(y2 - y1); + return {x, y, w, h}; + } + + convertVacuumToMapCoordinates(vacuumX, vacuumY) { + const {x: vX, y: vY} = this.coordinatesConverter.convertBA(vacuumX, vacuumY); + const x = Math.round(vX * this.imageScale); + const y = Math.round(vY * this.imageScale); + return {x, y}; + } + + getMapImage() { + return this.shadowRoot.getElementById("mapBackground"); + } + + getCanvas() { + return this.shadowRoot.getElementById("mapDrawing"); + } + + getPredefinedZonesIncreaseButton() { + return this.shadowRoot.getElementById("increaseButton"); + } + + getMousePos(evt) { + const canvas = this.getCanvas(); + const rect = canvas.getBoundingClientRect(); + return { + x: Math.round(evt.clientX - rect.left), + y: Math.round(evt.clientY - rect.top) + }; + } + + convertTouchToMouse(evt) { + if (evt.cancelable && this.mode === 2) { + evt.preventDefault(); + } + return { + clientX: evt.changedTouches[0].clientX, + clientY: evt.changedTouches[0].clientY, + currentTarget: evt.currentTarget + }; + } + + showToast() { + const x = this.shadowRoot.getElementById("toast"); + x.className = "show"; + setTimeout(function () { + x.className = x.className.replace("show", ""); + }, 2000); + } + + updateCameraImage() { + this._hass.callWS({ + type: 'camera_thumbnail', + entity_id: this._config.map_camera, + }).then(val => { + const {content_type: contentType, content} = val; + this.map_image = `data:${contentType};base64, ${content}`; + if (this._config.camera_calibration) { + if (!this._hass.states[this._config.map_camera].attributes.calibration_points) { + this.missingCameraAttribute = true; + } else { + this.updateCoordinates(this._hass.states[this._config.map_camera].attributes) + } + } + this.requestUpdate(); + }) + } + + connectedCallback() { + super.connectedCallback(); + if (this._config.map_camera) { + this.thumbUpdater = setInterval(() => this.updateCameraImage(), this._map_refresh_interval); + } + } + + disconnectedCallback() { + super.disconnectedCallback(); + if (this._config.map_camera) { + clearInterval(this.thumbUpdater); + this.map_image = null; + } + } +} + +customElements.define('xiaomi-vacuum-map-card', XiaomiVacuumMapCard); diff --git a/www/community/lovelace-xiaomi-vacuum-map-card/xiaomi-vacuum-map-card.js.gz b/www/community/lovelace-xiaomi-vacuum-map-card/xiaomi-vacuum-map-card.js.gz new file mode 100644 index 0000000000000000000000000000000000000000..d88f973079a2cd79d8808184c91f23e6225cabac GIT binary patch literal 5483 zcmV-x6_n~9iwFpT)ZbqM|9EL(Z*6HUc41?6b!{zeVQ?*DVRB?HYI6YXJ^gdr%8kGK zuV6H}ntGOGNr^KZf2c2CbIncDWRmn=T#v?~rM1L{B3Y8M#OLaNKVWxB?k7pvNoVfn zJc&(_SS%L60$41T@>g+`WX|g-O6Gp(Wh8wag?A*$NaEZk(aJd-9M7tU{aNvJ@Q?KH z?7(Nu(<~222~R&s&+iW$_*q4B(xX?4=u7m)OBN(!pMQ@+GJhQqFI>mfos?ZB>yTfN zn0Oh#3xwSI$;!+8h(FHAHcJn7B^mTHl5ubVz-i|E#n0XbWJSWvxo|$*{DaK00g&)9 ziLxlmWAfqFWvJI_7OgmFiXd)h>GfkTBtbuj?nvOxNT++yJ>!U%*(v~(75+h7;2hwy zvx5Ww)^YK3bn66>H-GIV^FNayCQ0f%xwvpT>u^qPec(c;%eke1x!pmwB%!xU&N$2VR;wUwtoH z`Tyy*5SHX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){return a},a}function d(){var a=I(["\n
\n ","\n ","\n
\n "]);return d=function(){return a},a}function e(){var a=I(["\n
\n ","\n ","\n
\n "]);return e=function(){return a},a}function f(){var a=I(["\n \n \n \n ","\n \n ","\n ","\n ","\n ","\n ","\n \n ","\n "]);return f=function(){return a},a}function g(){var a=I(["",""]);return g=function(){return a},a}function h(){var a=I(["\n \n ","\n "]);return h=function(){return a},a}function j(){var a=I(["\n \n "]);return j=function(){return a},a}function k(){var a=I(["\n "]);return k=function(){return a},a}function l(){var a=I(["\n "]);return l=function(){return a},a}function m(){var a=I(["",""]);return m=function(){return a},a}function n(){var a=I(["\n \n "]);return n=function(){return a},a}function o(){var a=I(["\n \n ","\n "]);return o=function(){return a},a}function p(){var a=I(["\n \n ","\n "]);return p=function(){return a},a}function q(){var a=I(["\n \n "]);return q=function(){return a},a}function r(){var a=I(["\n \n ","\n \n "]);return r=function(){return a},a}function s(){var a=I(["\n "]);return s=function(){return a},a}function t(){var a=I(["\n \n \n \n \n \n \n \n \n \n \n \n "]);return t=function(){return a},a}function u(){var a=I(["\n \n \n \n "]);return u=function(){return a},a}function v(){var a=I(["\n
\n ","\n ","\n
\n "]);return v=function(){return a},a}function w(){var a=I(["\n
\n ","\n
\n "]);return w=function(){return a},a}function x(){var a=I(["\n
\n
\n ","\n ","\n
\n ","\n
\n
\n ","\n
"]);return x=function(){return a},a}function y(){var a=I(["\n "," -\n ","\n "]);return y=function(){return a},a}function z(){var a=I(["\n ","\n "]);return z=function(){return a},a}function A(){var a=I(["\n
\n ","\n
\n "]);return A=function(){return a},a}function B(){var a=I(["\n \n ","\n \n ","\n \n \n ","\n \n \n "]);return B=function(){return a},a}function C(){var a=I(["\n
\n
\n \n ","\n \n \n ","\n \n ","\n
\n
","
\n ","\n
\n "]);return C=function(){return a},a}function D(){var a=I(["\n
\n ","\n
\n "]);return D=function(){return a},a}function E(){var a=I(["\n
\n \n
\n "]);return E=function(){return a},a}function F(){var a=I(["\n
\n "," ","\n
\n "]);return F=function(){return a},a}function G(){var a=I(["\n \n "," "," "," ","\n \n "]);return G=function(){return a},a}function H(){var a=I(["\n :host {\n display: flex;\n flex-direction: column;\n }\n ha-card {\n flex-direction: column;\n flex: 1;\n padding: 16px 0;\n position: relative;\n overflow: hidden;\n }\n ha-card > div {\n padding: 0px 16px 16px 16px;\n }\n ha-card > div:last-child {\n padding-bottom: 0;\n }\n ha-card[points] .line--points,\n ha-card[labels] .graph__labels.--primary {\n opacity: 0;\n transition: opacity .25s;\n animation: none;\n }\n ha-card[labels-secondary] .graph__labels.--secondary {\n opacity: 0;\n transition: opacity .25s;\n animation: none;\n }\n ha-card[points]:hover .line--points,\n ha-card:hover .graph__labels.--primary,\n ha-card:hover .graph__labels.--secondary {\n opacity: 1;\n }\n ha-card[fill] {\n padding-bottom: 0;\n }\n ha-card[fill] .graph {\n padding: 0;\n order: 10;\n }\n ha-card[fill] path {\n stroke-linecap: initial;\n stroke-linejoin: initial;\n }\n ha-card[fill] .graph__legend {\n order: -1;\n padding: 0 16px 8px 16px;\n }\n ha-card[fill] .info {\n padding-bottom: 16px;\n }\n ha-card[group] {\n box-shadow: none;\n padding: 0;\n }\n ha-card[group] > div {\n padding-left: 0;\n padding-right: 0;\n }\n ha-card[group] .graph__legend {\n padding-left: 0;\n padding-right: 0;\n }\n ha-card[hover] {\n cursor: pointer;\n }\n .flex {\n display: flex;\n display: -webkit-flex;\n min-width: 0;\n }\n .header {\n justify-content: space-between;\n }\n .header[loc=\"center\"] {\n justify-content: space-around;\n }\n .header[loc=\"left\"] {\n align-self: flex-start;\n }\n .header[loc=\"right\"] {\n align-self: flex-end;\n }\n .name {\n align-items: center;\n min-width: 0;\n letter-spacing: var(--mcg-title-letter-spacing, normal);\n }\n .name > span {\n font-size: 1.2em;\n font-weight: var(--mcg-title-font-weight, 500);\n max-height: 1.4em;\n min-height: 1.4em;\n opacity: .65;\n }\n .icon {\n color: var(--paper-item-icon-color, #44739e);\n display: inline-block;\n flex: 0 0 1.7em;\n text-align: center;\n }\n .icon > ha-icon {\n height: 1.7em;\n width: 1.7em;\n }\n .icon[loc=\"left\"] {\n order: -1;\n margin-right: .6em;\n margin-left: 0;\n }\n .icon[loc=\"state\"] {\n align-self: center;\n }\n .states {\n align-items: flex-start;\n font-weight: 300;\n justify-content: space-between;\n flex-wrap: nowrap;\n }\n .states .icon {\n align-self: center;\n margin-left: 0;\n }\n .states[loc=\"center\"] {\n justify-content: space-evenly;\n }\n .states[loc=\"right\"] > .state {\n margin-left: auto;\n order: 2;\n }\n .states[loc=\"center\"] .states--secondary,\n .states[loc=\"right\"] .states--secondary {\n margin-left: 0;\n }\n .states[loc=\"center\"] .states--secondary {\n align-items: center;\n }\n .states[loc=\"right\"] .states--secondary {\n align-items: flex-start;\n }\n .states[loc=\"center\"] .state__time {\n left: 50%;\n transform: translateX(-50%);\n }\n .states > .icon > ha-icon {\n height: 2em !important;\n width: 2em !important;\n }\n .states--secondary {\n display: flex;\n flex-flow: column;\n flex-wrap: wrap;\n align-items: flex-end;\n margin-left: 1rem;\n min-width: 0;\n margin-left: 1.4em;\n }\n .states--secondary:empty {\n display: none;\n }\n .state {\n position: relative;\n display: flex;\n flex-wrap: nowrap;\n max-width: 100%;\n min-width: 0;\n }\n .state--small {\n font-size: .6em;\n margin-bottom: .6rem;\n flex-wrap: nowrap;\n }\n .state--small > svg {\n position: absolute;\n left: -1.6em;\n align-self: center;\n height: 1em;\n width: 1em;\n border-radius: 100%;\n margin-right: 1em;\n }\n .state--small:last-child {\n margin-bottom: 0;\n }\n .states--secondary > :only-child {\n font-size: 1em;\n margin-bottom: 0;\n }\n .states--secondary > :only-child svg {\n display: none;\n }\n .state__value {\n display: inline-block;\n font-size: 2.4em;\n margin-right: .25rem;\n line-height: 1.2em;\n }\n .state__uom {\n flex: 1;\n align-self: flex-end;\n display: inline-block;\n font-size: 1.4em;\n font-weight: 400;\n line-height: 1.6em;\n margin-top: .1em;\n opacity: .6;\n vertical-align: bottom;\n }\n .state--small .state__uom {\n flex: 1;\n }\n .state__time {\n font-size: .95rem;\n font-weight: 500;\n bottom: -1.1rem;\n left: 0;\n opacity: .75;\n position: absolute;\n white-space: nowrap;\n animation: fade .15s cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n .states[loc=\"right\"] .state__time {\n left: initial;\n right: 0;\n }\n .graph {\n align-self: flex-end;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n margin-top: auto;\n width: 100%;\n }\n .graph__container {\n display: flex;\n flex-direction: row;\n position: relative;\n }\n .graph__container__svg {\n cursor: default;\n flex: 1;\n }\n svg {\n overflow: hidden;\n display: block;\n }\n path {\n stroke-linecap: round;\n stroke-linejoin: round;\n }\n .fill[anim=\"false\"] {\n animation: reveal .25s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;\n }\n .fill[anim=\"false\"][type=\"fade\"] {\n animation: reveal-2 .25s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;\n }\n .line--points[anim=\"false\"],\n .line[anim=\"false\"] {\n animation: pop .25s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;\n }\n .line--points[inactive],\n .line--rect[inactive],\n .fill--rect[inactive] {\n opacity: 0 !important;\n animation: none !important;\n transition: all .15s !important;\n }\n .line--points[tooltip] .line--point[inactive] {\n opacity: 0;\n }\n .line--point {\n cursor: pointer;\n fill: var(--primary-background-color, white);\n stroke-width: inherit;\n }\n .line--point:hover {\n fill: var(--mcg-hover, inherit) !important;\n }\n .bars {\n animation: pop .25s cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n .bars[anim] {\n animation: bars .5s cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n .bar {\n transition: opacity .25s cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n .bar:hover {\n opacity: .5;\n cursor: pointer;\n }\n ha-card[gradient] .line--point:hover {\n fill: var(--primary-text-color, white);\n }\n path,\n .line--points,\n .fill {\n opacity: 0;\n }\n .line--points[anim=\"true\"][init] {\n animation: pop .5s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;\n }\n .fill[anim=\"true\"][init] {\n animation: reveal .5s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;\n }\n .fill[anim=\"true\"][init][type=\"fade\"] {\n animation: reveal-2 .5s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;\n }\n .line[anim=\"true\"][init] {\n animation: dash 1s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;\n }\n .graph__labels.--secondary {\n right: 0;\n margin-right: 0px;\n }\n .graph__labels {\n align-items: flex-start;\n flex-direction: column;\n font-size: calc(.15em + 8.5px);\n font-weight: 400;\n justify-content: space-between;\n margin-right: 10px;\n padding: .6em;\n position: absolute;\n pointer-events: none;\n top: 0; bottom: 0;\n opacity: .75;\n }\n .graph__labels > span {\n cursor: pointer;\n background: var(--primary-background-color, white);\n border-radius: 1em;\n padding: .2em .6em;\n box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.24);\n }\n .graph__legend {\n display: flex;\n flex-direction: row;\n justify-content: space-evenly;\n padding-top: 16px;\n flex-wrap: wrap;\n }\n .graph__legend__item {\n cursor: pointer;\n display: flex;\n min-width: 0;\n margin: .4em;\n align-items: center\n }\n .graph__legend__item span {\n opacity: .75;\n margin-left: .4em;\n }\n .graph__legend__item svg {\n border-radius: 100%;\n min-width: 10px;\n }\n .info {\n justify-content: space-between;\n align-items: middle;\n }\n .info__item {\n display: flex;\n flex-flow: column;\n text-align: center;\n }\n .info__item:last-child {\n align-items: flex-end;\n text-align: right;\n }\n .info__item:first-child {\n align-items: flex-start;\n text-align: left;\n }\n .info__item__type {\n text-transform: capitalize;\n font-weight: 500;\n opacity: .9;\n }\n .info__item__time,\n .info__item__value {\n opacity: .75;\n }\n .ellipsis {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n @keyframes fade {\n 0% { opacity: 0; }\n }\n @keyframes reveal {\n 0% { opacity: 0; }\n 100% { opacity: .15; }\n }\n @keyframes reveal-2 {\n 0% { opacity: 0; }\n 100% { opacity: .4; }\n }\n @keyframes pop {\n 0% { opacity: 0; }\n 100% { opacity: 1; }\n }\n @keyframes bars {\n 0% { opacity: 0; }\n 50% { opacity: 0; }\n 100% { opacity: 1; }\n }\n @keyframes dash {\n 0% {\n opacity: 0;\n }\n 25% {\n opacity: 1;\n }\n 100% {\n opacity: 1;\n stroke-dashoffset: 0;\n }\n }"]);return H=function(){return a},a}function I(a,b){return b||(b=a.slice(0)),Object.freeze(Object.defineProperties(a,{raw:{value:Object.freeze(b)}}))}function J(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function K(a){for(var b,c=1;ca.length)&&(b=a.length);for(var c=0,d=Array(b);ca.parentNode.removeChild(a))}function I(a,b){var c=2=b.oldVersion&&c.createObjectStore("local-forage-detect-blob-support")}catch(c){if("ConstraintError"===c.name)console.warn("The database \""+a.name+"\" has been upgraded from version "+b.oldVersion+" to version "+b.newVersion+", but the storage \""+a.storeName+"\" already exists.");else throw c}}),f.onerror=function(a){a.preventDefault(),d(f.error)},f.onsuccess=function(){c(f.result),Z(a)}})}function aa(a){return _(a,!1)}function ba(a){return _(a,!0)}function ca(a,b){if(!a.db)return!0;var c=!a.db.objectStoreNames.contains(a.storeName),d=a.versiona.db.version;if(d&&(a.version!==b&&console.warn("The database \""+a.name+"\" can't be downgraded from version "+a.db.version+" to version "+a.version+"."),a.version=a.db.version),e||c){if(c){var f=a.db.version+1;f>a.version&&(a.version=f)}return!0}return!1}function da(a){return new Promise(function(b,c){var d=new FileReader;d.onerror=c,d.onloadend=function(c){var d=btoa(c.target.result||"");b({__local_forage_encoded_blob:!0,data:d,type:a.type})},d.readAsBinaryString(a)})}function ea(a){var b=S(atob(a.data));return L([b],{type:a.type})}function fa(a){return a&&a.__local_forage_encoded_blob}function ga(a){var b=this,c=b._initReady().then(function(){var a=Ob[b._dbInfo.name];if(a&&a.dbReady)return a.dbReady});return P(c,a,a),c}function ha(a){W(a);for(var b,c=Ob[a.name],d=c.forages,e=0;e(a.db=b,ca(a)?ba(a):b)).then(b=>{a.db=c.db=b;for(var e=0;e{throw $(a,b),b})}function ia(a,b,c,d){d===void 0&&(d=1);try{var e=a.db.transaction(a.storeName,b);c(null,e)}catch(e){if(0{if(!a.db||"NotFoundError"===e.name&&!a.db.objectStoreNames.contains(a.storeName)&&a.version<=a.db.version)return a.db&&(a.version=a.db.version+1),ba(a)}).then(()=>ha(a).then(function(){ia(a,b,c,d-1)})).catch(c);c(e)}}function ja(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function ka(a){var b,c,d,e,f,g=.75*a.length,h=a.length,j=0;"="===a[a.length-1]&&(g--,"="===a[a.length-2]&&g--);var k=new ArrayBuffer(g),l=new Uint8Array(k);for(b=0;b>4,l[j++]=(15&d)<<4|e>>2,l[j++]=(3&e)<<6|63&f;return k}function la(a){var b,c=new Uint8Array(a),d="";for(b=0;b>2],d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(3&c[b])<<4|c[b+1]>>4],d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(15&c[b+1])<<2|c[b+2]>>6],d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[63&c[b+2]];return 2==c.length%3?d=d.substring(0,d.length-1)+"=":1==c.length%3&&(d=d.substring(0,d.length-2)+"=="),d}function ma(a,b,c,d){a.executeSql("CREATE TABLE IF NOT EXISTS ".concat(b.storeName," ")+"(id INTEGER PRIMARY KEY, key unique, value)",[],c,d)}function na(a,b,c,d,e,f){a.executeSql(c,d,e,function(a,g){g.code===g.SYNTAX_ERR?a.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[b.storeName],function(a,h){h.rows.length?f(a,g):ma(a,b,function(){a.executeSql(c,d,e,f)},f)},f):f(a,g)},f)}function oa(a,b,c,d){var e=this;a=Q(a);var f=new Promise(function(f,g){e.ready().then(function(){void 0===b&&(b=null);var h=b,i=e._dbInfo;i.serializer.serialize(b,function(b,j){j?g(j):i.db.transaction(function(c){na(c,i,"INSERT OR REPLACE INTO ".concat(i.storeName," ")+"(key, value) VALUES (?, ?)",[a,b],function(){f(h)},function(a,b){g(b)})},function(b){if(b.code===b.QUOTA_ERR){if(0 '__WebKitDatabaseInfoTable__'",[],function(c,d){for(var e=[],f=0;f"),Ha=new RegExp("".concat(Fa,"|").concat(Ga)),Ia="$lit$";class Ja{constructor(a,b){this.parts=[],this.element=b;for(var c,d=[],e=[],f=document.createTreeWalker(b.content,133,null,!1),g=0,h=-1,j=0,{strings:k,values:{length:l}}=a;j{var c=a.length-b.length;return 0<=c&&a.slice(c)===b},La=a=>-1!==a.index,Ma=()=>document.createComment(""),Na=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/,Oa=a=>{for(var b=11===a.nodeType?0:1,c=document.createTreeWalker(a,133,null,!1);c.nextNode();)b++;return b},Pa=function(a){for(var b,c=1"function"==typeof a&&Qa.has(a),Sa={},Ta={};class Ua{constructor(a,b,c){this.__parts=[],this.template=a,this.processor=b,this.options=c}update(a){var b=0;for(var c of this.__parts)void 0!==c&&c.setValue(a[b]),b++;for(var d of this.__parts)void 0!==d&&d.commit()}_clone(){for(var a,b=Ca?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),c=[],d=this.template.parts,e=document.createTreeWalker(b,133,null,!1),f=0,g=0,h=e.nextNode();f",f+1);var g=Na.exec(e);b+=null===g?e+(c?Va:Ga):e.substr(0,g.index)+g[1]+g[2]+Ia+g[3]+Fa}return b+=this.strings[a],b}getTemplateElement(){var a=document.createElement("template");return a.innerHTML=this.getHTML(),a}}class Xa extends Wa{getHTML(){return"".concat(super.getHTML(),"")}getTemplateElement(){var a=super.getTemplateElement(),b=a.content,c=b.firstChild;return b.removeChild(c),Da(b,c.firstChild),a}}var Ya=a=>null===a||"object"!=typeof a&&"function"!=typeof a,Za=a=>Array.isArray(a)||!!(a&&a[Symbol.iterator]);class $a{constructor(a,b,c){this.dirty=!0,this.element=a,this.name=b,this.strings=c,this.parts=[];for(var d=0;d{try{var a={get capture(){return fb=!0,!1}};window.addEventListener("test",a,a),window.removeEventListener("test",a,a)}catch(a){}})();class gb{constructor(a,b,c){this.value=void 0,this.__pendingValue=void 0,this.element=a,this.eventName=b,this.eventContext=c,this.__boundHandleEvent=a=>this.handleEvent(a)}setValue(a){this.__pendingValue=a}commit(){for(;Ra(this.__pendingValue);){var d=this.__pendingValue;this.__pendingValue=Sa,d(this)}if(this.__pendingValue!==Sa){var a=this.__pendingValue,b=this.value,c=null==a||null!=b&&(a.capture!==b.capture||a.once!==b.once||a.passive!==b.passive);c&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),null!=a&&(null==b||c)&&(this.__options=hb(a),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=a,this.__pendingValue=Sa}}handleEvent(a){"function"==typeof this.value?this.value.call(this.eventContext||this.element,a):this.value.handleEvent(a)}}var hb=a=>a&&(fb?{capture:a.capture,passive:a.passive,once:a.once}:a.capture),ib=new Map,jb=new WeakMap,kb=(a,b,c)=>{var d=jb.get(b);d===void 0&&(Ea(b,b.firstChild),jb.set(b,d=new bb(Object.assign({templateFactory:J},c))),d.appendInto(b)),d.setValue(a),d.commit()};var lb=new class a{handleAttributeExpressions(a,b,c,d){var e=b[0];if("."===e){var g=new db(a,b.slice(1),c);return g.parts}if("@"===e)return[new gb(a,b.slice(1),d.eventContext)];if("?"===e)return[new cb(a,b.slice(1),c)];var f=new $a(a,b,c);return f.parts}handleTextExpression(a){return new bb(a)}};"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.2.1");var mb=function(a){for(var b=arguments.length,c=Array(1"".concat(a,"--").concat(b),pb=!0;"undefined"==typeof window.ShadyCSS?pb=!1:"undefined"==typeof window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),pb=!1);var qb,rb=a=>b=>{var c=ob(b.type,a),d=ib.get(c);void 0===d&&(d={stringsArray:new WeakMap,keyString:new Map},ib.set(c,d));var e=d.stringsArray.get(b.strings);if(void 0!==e)return e;var f=b.strings.join(Fa);if(e=d.keyString.get(f),void 0===e){var g=b.getTemplateElement();pb&&window.ShadyCSS.prepareTemplateDom(g,a),e=new Ja(b,g),d.keyString.set(f,e)}return d.stringsArray.set(b.strings,e),e},sb=["html","svg"],tb=a=>{sb.forEach(b=>{var c=ib.get(ob(b,a));c!==void 0&&c.keyString.forEach(a=>{var{element:{content:b}}=a,c=new Set;Array.from(b.querySelectorAll("style")).forEach(a=>{c.add(a)}),i(a,c)})})},ub=new Set,vb=(a,b,c)=>{ub.add(a);var d=!c?document.createElement("template"):c.element,e=b.querySelectorAll("style"),{length:f}=e;if(0===f)return void window.ShadyCSS.prepareTemplateStyles(d,a);for(var g,h=document.createElement("style"),j=0;j{if(!c||"object"!=typeof c||!c.scopeName)throw new Error("The `scopeName` option is required.");var d=c.scopeName,e=jb.has(b),f=pb&&11===b.nodeType&&!!b.host,g=f&&!ub.has(d),h=g?document.createDocumentFragment():b;if(kb(a,h,Object.assign({templateFactory:rb(d)},c)),g){var i=jb.get(h);jb.delete(h);var j=i.value instanceof Ua?i.value.template:void 0;vb(d,h,j),Ea(b,b.firstChild),b.appendChild(h),jb.set(b,i)}!e&&f&&window.ShadyCSS.styleElement(b.host)};window.JSCompiler_renameProperty=a=>a;var xb={toAttribute(a,b){return b===Boolean?a?"":null:b===Object||b===Array?null==a?a:JSON.stringify(a):a},fromAttribute(a,b){return b===Boolean?null!==a:b===Number?null===a?null:+a:b===Object||b===Array?JSON.parse(a):a}},yb=(a,b)=>b!==a&&(b===b||a===a),zb={attribute:!0,type:String,converter:xb,reflect:!1,hasChanged:yb},Ab=1,Bb=4,Cb=8,Db=16,Eb="finalized";class Fb extends HTMLElement{constructor(){super(),this._updateState=0,this._instanceProperties=void 0,this._updatePromise=new Promise(a=>this._enableUpdatingResolver=a),this._changedProperties=new Map,this._reflectingProperties=void 0,this.initialize()}static get observedAttributes(){this.finalize();var a=[];return this._classProperties.forEach((b,c)=>{var d=this._attributeNameForProperty(c,b);void 0!==d&&(this._attributeToPropertyMap.set(d,c),a.push(d))}),a}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;var a=Object.getPrototypeOf(this)._classProperties;a!==void 0&&a.forEach((a,b)=>this._classProperties.set(b,a))}}static createProperty(a){var b=1{if(this.hasOwnProperty(b)){var c=this[b];delete this[b],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(b,c)}})}_applyInstanceProperties(){this._instanceProperties.forEach((a,b)=>this[b]=a),this._instanceProperties=void 0}connectedCallback(){this.enableUpdating()}enableUpdating(){this._enableUpdatingResolver!==void 0&&(this._enableUpdatingResolver(),this._enableUpdatingResolver=void 0)}disconnectedCallback(){}attributeChangedCallback(a,b,c){b!==c&&this._attributeToProperty(a,c)}_propertyToAttribute(a,b){var c=2this._propertyToAttribute(b,this[b],a)),this._reflectingProperties=void 0),this._markUpdated()}updated(){}firstUpdated(){}}qb=Eb,Fb[qb]=!0;var Gb="adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Hb=Symbol();class Ib{constructor(a,b){if(b!==Hb)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=a}get styleSheet(){return void 0===this._styleSheet&&(Gb?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}}var Jb=a=>{if(a instanceof Ib)return a.cssText;if("number"==typeof a)return a;throw new Error("Value passed to 'css' function must be a 'css' function result: ".concat(a,". Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security."))};(window.litElementVersions||(window.litElementVersions=[])).push("2.3.1");var Kb={};class Lb extends Fb{static getStyles(){return this.styles}static _getUniqueStyles(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_styles",this))){var a=this.getStyles();if(void 0===a)this._styles=[];else if(Array.isArray(a)){var b=(a,c)=>a.reduceRight((a,c)=>Array.isArray(c)?b(c,a):(a.add(c),a),c),c=b(a,new Set),d=[];c.forEach(a=>d.unshift(a)),this._styles=d}else this._styles=[a]}}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow({mode:"open"})}adoptStyles(){var a=this.constructor._styles;0===a.length||(window.ShadyCSS===void 0||window.ShadyCSS.nativeShadow?Gb?this.renderRoot.adoptedStyleSheets=a.map(a=>a.styleSheet):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(a.map(a=>a.cssText),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&window.ShadyCSS!==void 0&&window.ShadyCSS.styleElement(this)}update(a){var b=this.render();super.update(a),b!==Kb&&this.constructor.render(b,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(a=>{var b=document.createElement("style");b.textContent=a.cssText,this.renderRoot.appendChild(b)}))}render(){return Kb}}Lb.finalized=!0,Lb.render=wb;var Mb=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(a){}}();"undefined"==typeof Promise&&require("lie/polyfill");var Nb,Ob={},Pb=Object.prototype.toString,Qb={_driver:"asyncStorage",_initStorage:function(a){function b(){return Promise.resolve()}var c=this,d={db:null};if(a)for(var e in a)d[e]=a[e];var f=Ob[d.name];f||(f=ja(),Ob[d.name]=f),f.forages.push(c),c._initReady||(c._initReady=c.ready,c.ready=ga);for(var g,h=[],i=0;ia?void b(null):void c.ready().then(function(){ia(c._dbInfo,"readonly",function(e,f){if(e)return d(e);try{var g=f.objectStore(c._dbInfo.storeName),h=!1,i=g.openCursor();i.onsuccess=function(){var c=i.result;return c?void(0===a?b(c.key):h?b(c.key):(h=!0,c.advance(a))):void b(null)},i.onerror=function(){d(i.error)}}catch(a){d(a)}})}).catch(d)});return M(d,b),d},keys:function(a){var b=this,c=new Promise(function(a,c){b.ready().then(function(){ia(b._dbInfo,"readonly",function(d,e){if(d)return c(d);try{var f=e.objectStore(b._dbInfo.storeName),g=f.openCursor(),h=[];g.onsuccess=function(){var b=g.result;return b?void(h.push(b.key),b.continue()):void a(h)},g.onerror=function(){c(g.error)}}catch(a){c(a)}})}).catch(c)});return M(c,a),c},dropInstance:function(a,b){b=R.apply(this,arguments);var c=this.config();a="function"!=typeof a&&a||{},a.name||(a.name=a.name||c.name,a.storeName=a.storeName||c.storeName);var d,e=this;if(!a.name)d=Promise.reject("Invalid arguments");else{var f=a.name===c.name&&e._dbInfo.db,g=f?Promise.resolve(e._dbInfo.db):aa(a).then(b=>{var c=Ob[a.name],d=c.forages;c.db=b;for(var e=0;e{if(b.objectStoreNames.contains(a.storeName)){var c=b.version+1;W(a);var d=Ob[a.name],e=d.forages;b.close();for(var g,h=0;h{var e=Mb.open(a.name,c);e.onerror=a=>{var b=e.result;b.close(),d(a)},e.onupgradeneeded=()=>{var b=e.result;b.deleteObjectStore(a.storeName)},e.onsuccess=()=>{var a=e.result;a.close(),b(a)}});return f.then(a=>{d.db=a;for(var b,c=0;c{throw($(a,b)||Promise.resolve()).catch(()=>{}),b})}}):g.then(b=>{W(a);var c=Ob[a.name],d=c.forages;b.close();for(var e,f=0;f{var d=Mb.deleteDatabase(a.name);d.onerror=d.onblocked=a=>{var b=d.result;b&&b.close(),c(a)},d.onsuccess=()=>{var a=d.result;a&&a.close(),b(a)}});return g.then(a=>{c.db=a;for(var b,e=0;e{throw($(a,b)||Promise.resolve()).catch(()=>{}),b})})}return M(d,b),d}},Rb=/^~~local_forage_type~([^~]+)~/,Sb="__lfsc__:".length,Tb=Sb+"arbf".length,Ub=Object.prototype.toString,Vb={serialize:function(a,b){var c="";if(a&&(c=Ub.call(a)),a&&("[object ArrayBuffer]"===c||a.buffer&&"[object ArrayBuffer]"===Ub.call(a.buffer))){var d,e="__lfsc__:";a instanceof ArrayBuffer?(d=a,e+="arbf"):(d=a.buffer,"[object Int8Array]"===c?e+="si08":"[object Uint8Array]"===c?e+="ui08":"[object Uint8ClampedArray]"===c?e+="uic8":"[object Int16Array]"===c?e+="si16":"[object Uint16Array]"===c?e+="ur16":"[object Int32Array]"===c?e+="si32":"[object Uint32Array]"===c?e+="ui32":"[object Float32Array]"===c?e+="fl32":"[object Float64Array]"===c?e+="fl64":b(new Error("Failed to get type for BinaryArray"))),b(e+la(d))}else if("[object Blob]"===c){var f=new FileReader;f.onload=function(){var c="~~local_forage_type~"+a.type+"~"+la(this.result);b("__lfsc__:blob"+c)},f.readAsArrayBuffer(a)}else try{b(JSON.stringify(a))}catch(c){console.error("Couldn't convert value into a JSON string: ",a),b(null,c)}},deserialize:function(a){if(a.substring(0,Sb)!=="__lfsc__:")return JSON.parse(a);var b,c=a.substring(Tb),d=a.substring(Sb,Tb);if(d==="blob"&&Rb.test(c)){var e=c.match(Rb);b=e[1],c=c.substring(e[0].length)}var f=ka(c);switch(d){case"arbf":return f;case"blob":return L([f],{type:b});case"si08":return new Int8Array(f);case"ui08":return new Uint8Array(f);case"uic8":return new Uint8ClampedArray(f);case"si16":return new Int16Array(f);case"ur16":return new Uint16Array(f);case"si32":return new Int32Array(f);case"ui32":return new Uint32Array(f);case"fl32":return new Float32Array(f);case"fl64":return new Float64Array(f);default:throw new Error("Unkown type: "+d);}},stringToBuffer:ka,bufferToString:la},Wb={_driver:"webSQLStorage",_initStorage:function(a){var b=this,c={db:null};if(a)for(var d in a)c[d]="string"==typeof a[d]?a[d]:a[d].toString();var e=new Promise(function(a,d){try{c.db=openDatabase(c.name,c.version+"",c.description,c.size)}catch(a){return d(a)}c.db.transaction(function(e){ma(e,c,function(){b._dbInfo=c,a()},function(a,b){d(b)})},d)});return c.serializer=Vb,e},_support:function(){return"function"==typeof openDatabase}(),iterate:function(a,b){var c=this,d=new Promise(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){na(c,e,"SELECT * FROM ".concat(e.storeName),[],function(c,d){for(var f=d.rows,g=f.length,h=0;ha===b||"number"==typeof a&&"number"==typeof b&&isNaN(a)&&isNaN(b),Zb=(a,b)=>{for(var c=a.length,d=0;d{})}config(a){if("object"==typeof a){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var b in a){if("storeName"==b&&(a[b]=a[b].replace(/\W/g,"_")),"version"==b&&"number"!=typeof a[b])return new Error("Database version must be a number.");this._config[b]=a[b]}return!("driver"in a&&a.driver)||this.setDriver(this._config.driver)}return"string"==typeof a?this._config[a]:this._config}defineDriver(a,b,c){var d=new Promise(function(b,c){try{var d=a._driver,e=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!a._driver)return void c(e);for(var f=ec.concat("_initStorage"),g=0,h=f.length;g(null===b._ready&&(b._ready=b._initDriver()),b._ready));return P(c,a,a),c}setDriver(a,b,c){function d(){g._config.driver=g.driver()}function e(a){return g._extend(a),d(),g._ready=g._initStorage(g._config),g._ready}function f(a){return function(){function b(){for(;cPromise.resolve());return this._driverSet=i.then(()=>{var a=h[0];return g._dbInfo=null,g._ready=null,g.getDriver(a).then(a=>{g._driver=a._driver,d(),g._wrapLibraryMethodsWithReady(),g._initDriver=f(h)})}).catch(()=>{d();var a=new Error("No available storage method found.");return g._driverSet=Promise.reject(a),g._driverSet}),P(this._driverSet,b,c),this._driverSet}supports(a){return!!ac[a]}_extend(a){va(this,a)}_getSupportedDrivers(a){for(var b,c=[],d=0,e=a.length;dkc(a,16,function(b){return ic(b)}),kc=(a,b,c)=>{if(null==a)return"";var d,e,f,g={},h={},j="",k="",l="",m=2,n=3,o=2,p=[],q=0,r=0;for(f=0;fl.charCodeAt(0)){for(d=0;dd;d++)q=q<<1|1&e,r==b-1?(r=0,p.push(c(q)),q=0):r++,e>>=1}else{for(e=1,d=0;dd;d++)q=q<<1|1&e,r==b-1?(r=0,p.push(c(q)),q=0):r++,e>>=1}m--,0==m&&(m=Ba(2,o),o++),delete h[l]}else for(e=g[l],d=0;d>=1;m--,0==m&&(m=Ba(2,o),o++),g[k]=n++,l=j+""}if(""!==l){if(Object.prototype.hasOwnProperty.call(h,l)){if(256>l.charCodeAt(0)){for(d=0;dd;d++)q=q<<1|1&e,r==b-1?(r=0,p.push(c(q)),q=0):r++,e>>=1}else{for(e=1,d=0;dd;d++)q=q<<1|1&e,r==b-1?(r=0,p.push(c(q)),q=0):r++,e>>=1}m--,0==m&&(m=Ba(2,o),o++),delete h[l]}else for(e=g[l],d=0;d>=1;m--,0==m&&(m=Ba(2,o),o++)}for(e=2,d=0;d>=1;for(;;)if(q<<=1,r==b-1){p.push(c(q));break}else r++;return p.join("")},lc=a=>null==a?"":""==a?null:mc(a.length,32768,function(b){return a.charCodeAt(b)}),mc=(a,b,d)=>{var e,f,g,h,j,k,l,m,n=[],o=4,p=4,q=3,r="",s=[],t={val:d(0),position:b,index:1};for(f=0;3>f;f+=1)n[f]=f;for(h=0,k=Ba(2,2),l=1;l!=k;)j=t.val&t.position,t.position>>=1,0==t.position&&(t.position=b,t.val=d(t.index++)),h|=(0>=1,0==t.position&&(t.position=b,t.val=d(t.index++)),h|=(0>=1,0==t.position&&(t.position=b,t.val=d(t.index++)),h|=(0a)return"";for(h=0,k=Ba(2,q),l=1;l!=k;)j=t.val&t.position,t.position>>=1,0==t.position&&(t.position=b,t.val=d(t.index++)),h|=(0>=1,0==t.position&&(t.position=b,t.val=d(t.index++)),h|=(0>=1,0==t.position&&(t.position=b,t.val=d(t.index++)),h|=(0a.reduce((a,c)=>+c[b]<+a[b]?c:a,a[0]),oc=(a,b)=>a.reduce((a,c)=>a+ +c[b],0)/a.length,pc=(a,b)=>a.reduce((a,c)=>+c[b]>+a[b]?c:a,a[0]),qc=function(a,b){var c=2a*3600*1000,sc=(c,a,b)=>{var d=+c.replace("#","0x"),e=d>>16,f=255&d>>8,g=255&d,h=+a.replace("#","0x");return"#".concat((0|16777216+(e+b*((h>>16)-e)<<16)+(f+b*((255&h>>8)-f)<<8)+(g+b*((255&h)-g))).toString(16).slice(1))},tc=a=>jc(JSON.stringify(a)),uc=a=>"string"==typeof a?JSON.parse(lc(a)):a,vc=function(){for(var a=arguments.length,b=Array(a),c=0;c"undefined"!=typeof a)},wc=(c,a)=>c.length===a.length&&c.every((b,c)=>b===a[c]),xc=a=>{console.warn("mini-graph-card: ",a)},yc="https://github.com/kalkih/mini-graph-card/blob/master/README.md",zc=14,Ac=96,Bc={humidity:"hass:water-percent",illuminance:"hass:brightness-5",temperature:"hass:thermometer",battery:"hass:battery",pressure:"hass:gauge",power:"hass:flash",signal_strength:"hass:wifi",motion:"hass:walk",door:"hass:door-closed",window:"hass:window-closed",presence:"hass:account",light:"hass:lightbulb"},Cc=["var(--accent-color)","#3498db","#e74c3c","#9b59b6","#f1c40f","#2ecc71","#1abc9c","#34495e","#e67e22","#7f8c8d","#27ae60","#2980b9","#8e44ad"],Dc=["entity","line","length","fill","points","tooltip","abs","config"],Ec={name:!0,icon:!0,state:!0,graph:"line",labels:"hover",labels_secondary:"hover",extrema:!1,legend:!0,fill:!0,points:"hover"},Fc=0,X=1,Y=2,V=3600000;class Gc{constructor(a,b,c){var d=3this._reducer(a,b),[]);b[0]&&b[0].length&&(b[0]=[b[0][b[0].length-1]]);var c=Aa(this.hours*this.points);b.length=c,this.coords=this._calcPoints(b),this.min=za.apply(Math,O(this.coords.map(a=>+a[Y]))),this.max=ya.apply(Math,O(this.coords.map(a=>+a[Y])))}}_reducer(a,b){var c=Math.floor,d=this._endTime-new Date(b.last_changed).getTime(),e=d/V*this.points-this.hours*this.points,f=0>e?c(xa(e)):0;return a[f]||(a[f]=[]),a[f].push(b),a}_calcPoints(a){var b=[],c=this.width/(this.hours*this.points-1);c=Number.isFinite(c)?c:this.width;for(var d=a.filter(Boolean)[0],e=[this._calcPoint(d),this._lastValue(d)],f=(a,d)=>{var f=c*d+this.margin[Fc];return a&&(e=[this._calcPoint(a),this._lastValue(a)]),b.push([f,0,a?e[0]:e[1]])},g=0;g[a[Fc],this.height-(a[Y]-this.min)/b+2*this.margin[X],a[Y]])}getPoints(){var{coords:a}=this;1===a.length&&(a[1]=[this.width+this.margin[Fc],0,a[0][Y]]),a=this._calcY(this.coords);var b,c,d=a[0];a.shift();var e=a.map((a,e)=>{b=a,c=this._smoothing?this._midPoint(d[Fc],d[X],b[Fc],b[X]):b;var f=this._smoothing?(b[Y]+d[Y])/2:b[Y];return d=b,[c[Fc],c[X],f,e+1]});return e}getPath(){var{coords:a}=this;1===a.length&&(a[1]=[this.width+this.margin[Fc],0,a[0][Y]]),a=this._calcY(this.coords);var b,c,d="",e=a[0];return d+="M".concat(e[Fc],",").concat(e[X]),a.forEach(a=>{b=a,c=this._smoothing?this._midPoint(e[Fc],e[X],b[Fc],b[X]):b,d+=" ".concat(c[Fc],",").concat(c[X]),d+=" Q ".concat(b[Fc],",").concat(b[X]),e=b}),d+=" ".concat(b[Fc],",").concat(b[X]),d}computeGradient(a){var b=this._max-this._min;return a.map((a,c,d)=>{var e;if(a.value>this._max&&d[c+1]){var f=(this._max-d[c+1].value)/(a.value-d[c+1].value);e=sc(d[c+1].color,a.color,f)}else if(a.value=b?0:(this._max-a.value)*(100/b)}})}getFill(a){var b=this.height+4*this.margin[X],c=a;return c+=" L ".concat(this.width-2*this.margin[Fc],", ").concat(b),c+=" L ".concat(this.coords[0][Fc],", ").concat(b," z"),c}getBars(a,b){var c=2({x:e*f*b+e*a+c,y:d[X],height:this.height-d[X]+4*this.margin[X],width:e-c,value:d[Y]}))}_midPoint(a,b,c,d){return[(a-c)/2+c,(b-d)/2+d]}_average(a){return a.reduce((a,b)=>a+parseFloat(b.state),0)/a.length}_maximum(a){return ya.apply(Math,O(a.map(a=>a.state)))}_minimum(a){return za.apply(Math,O(a.map(a=>a.state)))}_first(a){return parseFloat(a[0].state)}_last(a){return parseFloat(a[a.length-1].state)}_sum(a){return a.reduce((a,b)=>a+parseFloat(b.state),0)}_delta(a){return this._maximum(a)-this._minimum(a)}_lastValue(a){return"delta"===this.aggregateFuncName?0:parseFloat(a[a.length-1].state)||0}_updateEndTime(){switch(this._endTime=new Date,this._groupBy){case"month":this._endTime.setMonth(this._endTime.getMonth()+1),this._endTime.setDate(1);break;case"date":this._endTime.setDate(this._endTime.getDate()+1),this._endTime.setHours(0,0,0,0);break;case"hour":this._endTime.setHours(this._endTime.getHours()+1),this._endTime.setMinutes(0,0,0);break;default:}}}var Hc=function css(a){for(var b=arguments.length,c=Array(1b+Jb(c)+a[d+1],a[0]);return new Ib(e,Hb)}(H()),Ic=(a,b,c,d,f)=>{var g;switch(d.action){case"more-info":{g=new Event("hass-more-info",{composed:!0}),g.detail={entityId:f},a.dispatchEvent(g);break}case"navigate":{if(!d.navigation_path)return;window.history.pushState(null,"",d.navigation_path),g=new Event("location-changed",{composed:!0}),g.detail={replace:!1},window.dispatchEvent(g);break}case"call-service":{if(!d.service)return;var[h,i]=d.service.split(".",2),j=K({},d.service_data);b.callService(h,i,j);break}case"url":{if(!d.url)return;window.location.href=d.url}}},Jc=(a,b)=>{if(a.sort((c,a)=>a.value-c.value),"smooth"===b)return a;var c,d=(c=[]).concat.apply(c,O(a.map((b,c)=>[b,{value:b.value-1e-4,color:a[c+1]?a[c+1].color:b.color}])));return d},Kc=a=>{if(a.entity)throw new Error("The \"entity\" option was removed, please use \"entities\".\n See ".concat(yc));if(!Array.isArray(a.entities))throw new Error("Please provide the \"entities\" option as a list.\n See ".concat(yc));if(a.line_color_above||a.line_color_below)throw new Error("\"line_color_above/line_color_below\" was removed, please use \"color_thresholds\".\n See ".concat(yc));var b=K(K({animate:!1,hour24:!1,font_size:zc,font_size_header:14,height:100,hours_to_show:24,points_per_hour:.5,aggregate_func:"avg",group_by:"interval",line_color:[].concat(Cc),color_thresholds:[],color_thresholds_transition:"smooth",line_width:5,bar_spacing:4,compress:!0,smoothing:!0,state_map:[],cache:!0,value_factor:0,tap_action:{action:"more-info"}},JSON.parse(JSON.stringify(a))),{},{show:K(K({},Ec),a.show)});b.entities.forEach((a,c)=>{"string"==typeof a&&(b.entities[c]={entity:a})}),b.state_map.forEach((a,c)=>{"string"==typeof a&&(b.state_map[c]={value:a,label:a}),b.state_map[c].label=b.state_map[c].label||b.state_map[c].value}),"string"==typeof a.line_color&&(b.line_color=[a.line_color].concat(Cc)),b.font_size=a.font_size/100*zc||zc,b.color_thresholds=Jc(b.color_thresholds,b.color_thresholds_transition);var c=24Ac&&(b.points_per_hour=Ac/(b.hours_to_show*d),xc("Not enough space, adjusting points_per_hour to ".concat(b.points_per_hour)))}return b};hc.config({name:"mini-graph-card",version:1,storeName:"entity_history_cache",description:"Mini graph card uses caching for the entity history"}),hc.iterate((a,b)=>{var c=b.endsWith("-raw")?a:uc(a),d=new Date;d.setHours(d.getHours()-c.hours_to_show),new Date(c.last_fetched){console.warn("Purging has errored: ",a)}),console.info("%c MINI-GRAPH-CARD %c ".concat("0.9.4"," "),"color: white; background: coral; font-weight: 700;","color: coral; background: white; font-weight: 700;");class Lc extends Lb{constructor(){super(),this.id=Math.random().toString(36).substr(2,9),this.config={},this.bound=[0,0],this.boundSecondary=[0,0],this.length=[],this.entity=[],this.line=[],this.bar=[],this.abs=[],this.fill=[],this.points=[],this.gradient=[],this.tooltip={},this.updateQueue=[],this.updating=!1,this.stateChanged=!1,this.initial=!0}static get styles(){return Hc}set hass(a){this._hass=a;var b=!1,c=[];this.config.entities.forEach((d,e)=>{this.config.entities[e].index=e;var f=a&&a.states[d.entity]||void 0;f&&this.entity[e]!==f&&(this.entity[e]=f,c.push("".concat(f.entity_id,"-").concat(e)),b=!0)}),b&&(this.stateChanged=!0,this.entity=O(this.entity),this.config.update_interval||this.updating?this.updateQueue=[].concat(c,O(this.updateQueue)):setTimeout(()=>{this.updateQueue=[].concat(c,O(this.updateQueue)),this.updateData()},this.initial?0:1e3))}static get properties(){return{id:String,_hass:{},config:{},entity:[],Graph:[],line:[],shadow:[],length:Number,bound:[],boundSecondary:[],abs:[],tooltip:{},updateQueue:[],color:String}}setConfig(a){var b=!wc(this.config.entities||[],a.entities);this.config=Kc(a,this.config),(!this.Graph||b)&&(this._hass&&(this.hass=this._hass),this.Graph=this.config.entities.map(a=>new Gc(500,this.config.height,[this.config.show.fill?0:this.config.line_width,this.config.line_width],this.config.hours_to_show,this.config.points_per_hour,a.aggregate_func||this.config.aggregate_func,this.config.group_by,vc(a.smoothing,this.config.smoothing,!a.entity.startsWith("binary_sensor.")))))}connectedCallback(){super.connectedCallback(),this.config.update_interval&&(this.updateOnInterval(),this.interval=setInterval(()=>this.updateOnInterval(),1e3*this.config.update_interval))}disconnectedCallback(){this.interval&&clearInterval(this.interval),super.disconnectedCallback()}shouldUpdate(a){return!!this.entity[0]&&(Dc.some(b=>a.has(b))?(this.color=this.intColor(void 0===this.tooltip.value?this.entity[0].state:this.tooltip.value,this.tooltip.entity||0),!0):void 0)}firstUpdated(){this.initial=!1}updated(a){this.config.animate&&a.has("line")&&(this.length.length{this.length[a.id]=a.getTotalLength()}),this.length=O(this.length)):this.length=Array(this.entity.length).fill("none"))}render(){var{config:a}=0this.handlePopup(b,a.tap_action.entity||this.entity[0]),this.renderHeader(),this.renderStates(),this.renderGraph(),this.renderInfo())}renderHeader(){var{show:a,align_icon:b,align_header:c,font_size_header:d}=this.config;return a.name||a.icon&&"state"!==b?mb(F(),c,d,this.renderName(),"state"===b?"":this.renderIcon()):""}renderIcon(){var{icon:a,icon_adaptive_color:b}=this.config.show;return a?mb(E(),this.config.align_icon,b?"color: ".concat(this.color,";"):"",this.computeIcon(this.entity[0])):""}renderName(){if(this.config.show.name){var a=void 0===this.tooltip.entity?this.config.name||this.computeName(0):this.computeName(this.tooltip.entity),b=this.config.show.name_adaptive_color?"opacity: 1; color: ".concat(this.color,";"):"";return mb(D(),b,a)}}renderStates(){var{entity:a,value:b}=this.tooltip,c=b===void 0?this.entity[0].state:b,d=this.config.entities[0].state_adaptive_color?"color: ".concat(this.color,";"):"";if(this.config.show.state)return mb(C(),this.config.align_state,d,this.computeState(c),d,this.computeUom(a||0),this.renderStateTime(),this.config.entities.map((a,b)=>this.renderState(a,b)),"state"===this.config.align_icon?this.renderIcon():"")}renderState(a,b){if(a.show_state&&0!==b){var{state:c}=this.entity[b];return mb(B(),a=>this.handlePopup(a,this.entity[b]),a.state_adaptive_color?"color: ".concat(this.computeColor(c,b),";"):"",a.show_indicator?this.renderIndicator(c,b):"",this.computeState(c),this.computeUom(b))}}renderStateTime(){return void 0===this.tooltip.value?void 0:mb(A(),this.tooltip.label?mb(z(),this.tooltip.label):mb(y(),this.tooltip.time[0],this.tooltip.time[1]))}renderGraph(){return this.config.show.graph?mb(x(),this.renderLabels(),this.renderLabelsSecondary(),this.renderSvg(),this.renderLegend()):""}renderLegend(){return 1>=this.visibleLegends.length||!this.config.show.legend?void 0:mb(w(),this.visibleLegends.map(a=>mb(v(),b=>this.handlePopup(b,this.entity[a.index]),()=>this.setTooltip(a.index,-1,this.entity[a.index].state,"Current"),()=>this.tooltip={},this.renderIndicator(this.entity[a.index].state,a.index),this.computeName(a.index))))}renderIndicator(a,b){return nb(u(),this.intColor(a,b))}renderSvgFill(a,b){if(a){var c="fade"===this.config.show.fill,d=this.length[b]||!1===this.config.entities[b].show_line;return nb(t(),"fill-grad-".concat(this.id,"-").concat(b),"fill-grad-mask-".concat(this.id,"-").concat(b),"url(#fill-grad-".concat(this.id,"-").concat(b,")"),"fill-".concat(this.id,"-").concat(b),this.config.show.fill,b,this.config.animate,d,this.config.animate?"".concat(.5*b,"s"):"0s",c?"url(#fill-grad-mask-".concat(this.id,"-").concat(b,")"):"",this.fill[b])}}renderSvgLine(a,b){if(a){var c=nb(s(),b,this.config.animate,this.length[b],this.config.animate?"".concat(.5*b,"s"):"0s",this.length[b]||"none",this.length[b]||"none","white",this.config.line_width,this.line[b]);return nb(r(),"line-".concat(this.id,"-").concat(b),c)}}renderSvgPoint(a,b){var c=this.gradient[b]?this.computeColor(a[Y],b):"inherit";return nb(q(),this.tooltip.index!==a[3],"--mcg-hover: ".concat(c,";"),c,c,a[Fc],a[X],this.config.line_width,()=>this.setTooltip(b,a[3],a[Y]),()=>this.tooltip={})}renderSvgPoints(a,b){if(a){var c=this.computeColor(this.entity[b].state,b);return nb(p(),this.tooltip.entity===b,void 0!==this.tooltip.entity&&this.tooltip.entity!==b,this.length[b],this.config.animate&&"hover"!==this.config.show.points,this.config.animate?"".concat(.5*b+.5,"s"):"0s",c,c,this.config.line_width/2,a.map(a=>this.renderSvgPoint(a,b)))}}renderSvgGradient(a){if(a){var b=a.map((a,b)=>a?nb(o(),"grad-".concat(this.id,"-").concat(b),a.map(a=>nb(n(),a.color,"".concat(a.offset,"%")))):void 0);return nb(m(),b)}}renderSvgLineRect(a,b){if(a){var c=this.gradient[b]?"url(#grad-".concat(this.id,"-").concat(b,")"):this.computeColor(this.entity[b].state,b);return nb(l(),void 0!==this.tooltip.entity&&this.tooltip.entity!==b,"rect-".concat(this.id,"-").concat(b),c,"url(#line-".concat(this.id,"-").concat(b,")"))}}renderSvgFillRect(a,b){if(a){var c=this.gradient[b]?"url(#grad-".concat(this.id,"-").concat(b,")"):this.intColor(this.entity[b].state,b);return nb(k(),void 0!==this.tooltip.entity&&this.tooltip.entity!==b,"fill-rect-".concat(this.id,"-").concat(b),c,"url(#fill-".concat(this.id,"-").concat(b,")"))}}renderSvgBars(a,b){if(a){var c=a.map((a,c)=>{var d=this.config.animate?nb(j(),this.config.height,a.y):"",e=this.computeColor(a.value,b);return nb(h(),a.x,a.y,a.height,a.width,e,()=>this.setTooltip(b,c,a.value),()=>this.tooltip={},d)});return nb(g(),this.config.animate,c)}}renderSvg(){var{height:a}=this.config;return nb(f(),0===a?0:"100%",a,a=>a.stopPropagation(),this.renderSvgGradient(this.gradient),this.fill.map((a,b)=>this.renderSvgFill(a,b)),this.fill.map((a,b)=>this.renderSvgFillRect(a,b)),this.line.map((a,b)=>this.renderSvgLine(a,b)),this.line.map((a,b)=>this.renderSvgLineRect(a,b)),this.bar.map((a,b)=>this.renderSvgBars(a,b)),this.points.map((a,b)=>this.renderSvgPoints(a,b)))}setTooltip(a,b,c){var d=3f&&1>e?e*f:1/e,i=xa(b+1-Aa(f*e)),j=this.getEndDate(),k=1/60;j.setMilliseconds(j.getMilliseconds()-rc(h*i+k));var l=qc(j,{hour12:!this.config.hour24},this._hass.language);j.setMilliseconds(j.getMilliseconds()-rc(h-k));var m=qc(j,g,this._hass.language);this.tooltip={value:c,id:i,entity:a,time:[m,l],index:b,label:d}}renderLabels(){return this.config.show.labels&&0!==this.primaryYaxisSeries.length?mb(e(),this.computeState(this.bound[1]),this.computeState(this.bound[0])):void 0}renderLabelsSecondary(){return this.config.show.labels_secondary&&0!==this.secondaryYaxisSeries.length?mb(d(),this.computeState(this.boundSecondary[1]),this.computeState(this.boundSecondary[0])):void 0}renderInfo(){return 0mb(b(),a.type,this.computeState(a.state),this.computeUom(0),"avg"===a.type?"":qc(new Date(a.last_changed),this.config.format,this._hass.language)))):mb(a())}handlePopup(a,b){a.stopPropagation(),Ic(this,this._hass,this.config,this.config.tap_action,b.entity_id||b)}computeColor(a,b){var{color_thresholds:c,line_color:d}=this.config,e=K(K({color:d[b]||d[0]},c.slice(-1)[0]),c.find(b=>b.value<(+a||0)));return this.config.entities[b].color||e.color}get visibleEntities(){return this.config.entities.filter(a=>!1!==a.show_graph)}get primaryYaxisEntities(){return this.visibleEntities.filter(a=>a.y_axis===void 0||"primary"===a.y_axis)}get secondaryYaxisEntities(){return this.visibleEntities.filter(a=>"secondary"===a.y_axis)}get visibleLegends(){return this.visibleEntities.filter(a=>!1!==a.show_legend)}get primaryYaxisSeries(){return this.primaryYaxisEntities.map(a=>this.Graph[a.index])}get secondaryYaxisSeries(){return this.secondaryYaxisEntities.map(a=>this.Graph[a.index])}intColor(a,b){var c,{color_thresholds:d,line_color:e}=this.config,f=+a||0;if(0a.valuea.valueb.value===a);if(g)return g.label;xc("value [".concat(a,"] not found in state_map"))}var c="string"==typeof a?parseFloat(a.replace(/,/g,".")):+a;var d=this.config.decimals,e=10**this.config.value_factor;if(d===void 0||wa(d)||wa(c))return b(100*(c*e))/100;var f=10**d;return(b(c*e*f)/f).toFixed(d)}updateOnInterval(){this.stateChanged&&!this.updating&&(this.stateChanged=!1,this.updateData())}updateData(){var a=arguments,b=this;return N(function*(){var{config:c}=0b.updateEntity(a,c,e,d));yield Promise.all(f)}catch(a){xc(a)}if(c.show.graph&&b.entity.forEach((a,c)=>{a&&b.Graph[c].update()}),b.updateBounds(),c.show.graph){var g=0;b.entity.forEach((a,d)=>{if(a&&0!==b.Graph[d].coords.length){var e="secondary"===c.entities[d].y_axis?b.boundSecondary:b.bound;if([b.Graph[d].min,b.Graph[d].max]=[e[0],e[1]],"bar"===c.show.graph){var f=b.visibleEntities.length;b.bar[d]=b.Graph[d].getBars(g,f,c.bar_spacing),g+=1}else{var h=b.Graph[d].getPath();!1!==c.entities[d].show_line&&(b.line[d]=h),c.show.fill&&!1!==c.entities[d].show_fill&&(b.fill[d]=b.Graph[d].getFill(h)),c.show.points&&!1!==c.entities[d].show_points&&(b.points[d]=b.Graph[d].getPoints()),0b[a])))||d:"~"===b[0]?Math[a].apply(Math,[+b.substr(1)].concat(O(c.map(b=>b[a])))):b}updateBounds(){var{config:a}=0c!=="".concat(a.entity_id,"-").concat(b));var f=[],g=c,h=!1,i=e.config.cache?yield e.getCache(a.entity_id,e.config.useCompress):void 0;if(i&&i.hours_to_show===e.config.hours_to_show){f=i.data;var k=f.findIndex(a=>new Date(a.last_changed)>c);-1===k?f=[]:(0g&&(g=new Date(l-1))}var j=yield e.fetchRecent(a.entity_id,g,d,h);if(j[0]&&0e._convertState(a)),j=j[0].filter(a=>!wa(parseFloat(a.state))),j=j.map(a=>({last_changed:a.last_changed,state:a.state})),f=[].concat(O(f),O(j)),e.config.cache&&e.setCache(a.entity_id,{hours_to_show:e.config.hours_to_show,last_fetched:new Date,data:f},e.config.useCompress).catch(a=>{xc(a),hc.clear()})),0!==f.length)if(a.entity_id===e.entity[0].entity_id&&e.updateExtrema(f),!0===e.config.entities[b].fixed_value){var m=f[f.length-1];e.Graph[b].history=[m,m]}else e.Graph[b].history=f}})()}fetchRecent(a,b,c,d){var e=this;return N(function*(){var f="history/period";return b&&(f+="/".concat(b.toISOString())),f+="?filter_entity_id=".concat(a),c&&(f+="&end_time=".concat(c.toISOString())),d&&(f+="&skip_initial_state"),f+="&minimal_response",e._hass.callApi("GET",f)})()}updateExtrema(a){var{extrema:b,average:c}=this.config.show;this.abs=[].concat(O(b?[K({type:"min"},nc(a,"state"))]:[]),O(c?[{type:"avg",state:oc(a,"state")}]:[]),O(b?[K({type:"max"},pc(a,"state"))]:[]))}_convertState(a){var b=this.config.state_map.findIndex(b=>b.value===a.state);-1===b||(a.state=b)}getEndDate(){var a=new Date;switch(this.config.group_by){case"date":a.setDate(a.getDate()+1),a.setHours(0,0,0);break;case"hour":a.setHours(a.getHours()+1),a.setMinutes(0,0);break;default:}return a}setNextUpdate(){if(!this.config.update_interval){var a=1/this.config.points_per_hour;clearInterval(this.interval),this.interval=setInterval(()=>{this.updating||this.updateData()},a*V)}}getCardSize(){return 3}}customElements.define("mini-graph-card",Lc)})})(); diff --git a/www/community/mini-graph-card/mini-graph-card-bundle.js.gz b/www/community/mini-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CuY_2Kz9r@af`B0CgIFgC<$E4^QOPSFd5rva)LsH7@q?I*T!hhcqZ>4x zRd%Es7{ofOCT9!E?-Cegt|`KZ-tnXY`zdfExpxEwU(bF87f4N?anM)d;W7b@$2>Ht z_ML~}Ng9=|J-U`e-0CB=dz5-!93I8c)SbF*83~bNjLg;q6+{n$?)tRF!V$lhOJKC8 z>n`W%vAi_s8zHu`-QCO<2|{C*wybc|3$r?24{iy)r)O(R>kKbPvEQoU(f>soXA*$) zOgVLHVUzVb7hS7%h^gG5Wuc{AFqLQtHL#tAGE?fVGW*6*Yj}j>TtBZctTm;mdmbu4 zQSG;BOows?tokfr0}`*#$&1fs%rSorj+>QV>(+XO#DatQbK0>c!5P8hS;GILUjWoC!=2iG|W1FX|F@c#t z4|GrmL=C)mUx{=8YFz3{~G46Cq^oy{F6b4SgcwLE>b08sVB< z+Cv@TOep0y!UEmv^m5G`WN5+tp{@!y*BP;qj8R|lwzndZWTDetDU#UNu54-_hIjqdo>#=NQ7qs^?w3g>@<5F{psyx5Q zrf1SIT{!T$qO)BJBm#x7p3}*Ap1PPWl#HhsE8xjA^W1Mw-nkfg$RO2nZMbyXl%YE# zCIi4|UqI8v*0?{GqjJ>l{NUZ7mP%J6T@3Y%3__04?*@C0GtEK~j>4b~s5Q+JPh($C1F6L)W4;bis#1 z;M+0+^{Amfo;^C&c=wCo-^x;r(#uEQqz2z2mZ%j5Y{i2s&Z3lH(B0 hLRZLjc(98&H88j3`XqyIT>|!}xBzgDxb4MY0RXW_Qbqs( literal 0 HcmV?d00001 diff --git a/www/community/mini-media-player/mini-media-player-bundle.js b/www/community/mini-media-player/mini-media-player-bundle.js index 2f9e232..bd4c6ef 100644 --- a/www/community/mini-media-player/mini-media-player-bundle.js +++ b/www/community/mini-media-player/mini-media-player-bundle.js @@ -1 +1 @@ -(function(){"use strict";function a(){const b=ya(["",""]);return a=function(){return b},b}function b(){const a=ya(["",""]);return b=function(){return a},a}function c(){const a=ya(["\n
\n
\n ","\n
\n
"]);return c=function(){return a},a}function d(){const a=ya(["\n
\n ","\n ","\n
"]);return d=function(){return a},a}function e(){const a=ya(["\n
\n "," ","\n
"]);return e=function(){return a},a}function f(){const a=ya(["\n
\n \n
"]);return f=function(){return a},a}function g(){const a=ya(["\n
\n
"]);return g=function(){return a},a}function h(){const a=ya(["
"]);return h=function(){return a},a}function i(){const a=ya(["\n \n \n "]);return i=function(){return a},a}function j(){const a=ya(["\n \n \n "]);return j=function(){return a},a}function k(){const a=ya(["\n \n \n "]);return k=function(){return a},a}function l(){const a=ya(["\n \n
\n ","\n
\n
\n
\n ","\n
\n ","\n ","\n
\n \n \n
\n
\n ","\n \n \n ","\n \n \n
\n
\n
\n ","\n
\n \n "]);return l=function(){return a},a}function m(){const a=ya(["\n :host {\n display: flex;\n line-height: 40px;\n max-height: 40px;\n }\n :host([flow]) mmp-media-controls {\n max-width: unset;\n }\n mmp-media-controls {\n max-width: 200px;\n line-height: initial;\n }\n .group-button {\n height: 34px;\n width: 34px;\n min-width: 34px;\n margin: 3px;\n }\n paper-icon-button {\n min-width: 40px;\n }\n "]);return m=function(){return a},a}function n(){const a=ya(["\n \n ","\n \n "]);return n=function(){return a},a}function o(){const a=ya(["\n \n "]);return o=function(){return a},a}function p(){const a=ya(["\n \n "]);return p=function(){return a},a}function q(){const a=ya(["\n \n "]);return q=function(){return a},a}function r(){const a=ya(["\n \n "]);return r=function(){return a},a}function s(){const a=ya(["\n \n "]);return s=function(){return a},a}function t(){const a=ya(["\n \n \n "]);return t=function(){return a},a}function u(){const a=ya(["\n ","\n ","\n ","\n ","\n ","\n ","\n "]);return u=function(){return a},a}function v(){const a=ya(["\n \n ","\n \n "]);return v=function(){return a},a}function w(){const a=ya(["\n :host {\n display: flex;\n width: 100%;\n }\n .flex {\n display: flex;\n flex: 1;\n justify-content: space-between;\n }\n ha-slider {\n max-width: none;\n min-width: 100px;\n width: 100%;\n }\n paper-icon-button {\n min-width: 40px;\n }\n .mmp-media-controls__volume {\n flex: 100;\n max-height: 40px;\n }\n .mmp-media-controls__volume.--buttons {\n justify-content: left;\n }\n .mmp-media-controls__media {\n justify-content: flex-end;\n max-width: calc(40px * 4);\n margin-right: 0;\n margin-left: auto;\n }\n .mmp-media-controls__media[flow] {\n max-width: none;\n justify-content: space-between;\n }\n .mmp-media-controls__shuffle {\n flex: 3;\n flex-shrink: 200;\n justify-content: center;\n }\n .mmp-media-controls__shuffle paper-icon-button {\n height: 36px;\n width: 36px;\n min-width: 36px;\n margin: 2px;\n }\n "]);return w=function(){return a},a}function x(){const a=ya([""]);return x=function(){return a},a}function y(){const a=ya(["\n \n \n "]);return y=function(){return a},a}function z(){const a=ya([""]);return z=function(){return a},a}function A(){const a=ya(["\n \n \n "]);return A=function(){return a},a}function B(){const a=ya(["\n ","\n ","\n "]);return B=function(){return a},a}function C(){const a=ya(["\n \n \n "]);return C=function(){return a},a}function D(){const a=ya(["\n \n \n "]);return D=function(){return a},a}function E(){const a=ya(["\n \n \n "]);return E=function(){return a},a}function F(){const a=ya(["\n \n \n "]);return F=function(){return a},a}function G(){const a=ya(["\n \n \n "]);return G=function(){return a},a}function H(){const a=ya(["\n
\n ","\n \n \n \n \n
"]);return H=function(){return a},a}function I(){const a=ya(["\n
\n ","\n \n \n
"]);return I=function(){return a},a}function J(){const a=ya([""]);return J=function(){return a},a}function K(){const a=ya(["\n
\n \n \n ","\n \n \n
\n "]);return K=function(){return a},a}function L(){const a=ya([""]);return L=function(){return a},a}function M(){const a=ya(["\n
\n \n \n
\n "]);return M=function(){return a},a}function N(){const a=ya([""]);return N=function(){return a},a}function O(){const a=ya(["\n ","\n ","\n ","\n "]);return O=function(){return a},a}function P(){const a=ya(["\n :host {\n max-width: 120px;\n min-width: 40px;\n }\n :host([full]) {\n max-width: none;\n }\n "]);return P=function(){return a},a}function Q(){const a=ya(["\n \n "]);return Q=function(){return a},a}function R(){const a=ya(["\n :host {\n max-width: 120px;\n min-width: 40px;\n }\n :host([full]) {\n max-width: none;\n }\n "]);return R=function(){return a},a}function S(){const a=ya(["\n \n "]);return S=function(){return a},a}function T(){const a=ya(["\n .mmp-progress {\n cursor: pointer;\n left: 0; right: 0; bottom: 0;\n position: absolute;\n pointer-events: auto;\n min-height: calc(var(--mmp-progress-height) + 10px);\n }\n .mmp-progress__duration {\n left: calc(var(--ha-card-border-radius, 4px) / 2);\n right: calc(var(--ha-card-border-radius, 4px) / 2);\n bottom: calc(var(--mmp-progress-height) + 6px);\n position: absolute;\n display: flex;\n justify-content: space-between;\n font-size: .8em;\n padding: 0 6px;\n z-index: 2\n }\n paper-progress {\n height: var(--mmp-progress-height);\n --paper-progress-height: var(--mmp-progress-height);\n bottom: 0;\n position: absolute;\n width: 100%;\n transition: height 0;\n z-index: 1;\n --paper-progress-active-color: var(--mmp-accent-color);\n --paper-progress-container-color: rgba(100,100,100,.15);\n --paper-progress-transition-duration: 1s;\n --paper-progress-transition-timing-function: linear;\n --paper-progress-transition-delay: 0s;\n }\n paper-progress.seeking {\n transition: height .15s ease-out;\n height: calc(var(--mmp-progress-height) + 4px);\n --paper-progress-height: calc(var(--mmp-progress-height) + 4px);\n }\n .mmp-progress[paused] paper-progress {\n --paper-progress-active-color: var(--disabled-text-color, rgba(150,150,150,.5));\n }\n "]);return T=function(){return a},a}function U(){const a=ya(["\n
\n ","\n ","\n
\n "]);return U=function(){return a},a}function V(){const a=ya(["\n
\n ","\n \n \n
\n "]);return V=function(){return a},a}function W(){const a=ya(["\n :host {\n align-items: center;\n margin-left: 8px;\n display: flex;\n }\n .mmp-tts__input {\n cursor: text;\n flex: 1;\n margin-right: 8px;\n --paper-input-container-input: {\n font-size: 1em;\n };\n }\n ha-card[rtl] .mmp-tts__input {\n margin-right: auto;\n margin-left: 8px;\n }\n .mmp-tts__button {\n margin: 0;\n height: 30px;\n padding: 0 .4em;\n }\n paper-input {\n opacity: .75;\n --paper-input-container-color: var(--mmp-text-color);\n --paper-input-container-focus-color: var(--mmp-text-color);\n --paper-input-container: {\n padding: 0;\n };\n }\n paper-input[focused] {\n opacity: 1;\n }\n\n ha-card[artwork*='cover'][has-artwork] paper-input {\n --paper-input-container-focus-color: #FFFFFF;\n }\n ha-card[artwork*='cover'][has-artwork] paper-input {\n --paper-input-container-color: #FFFFFF;\n --paper-input-container-input-color: #FFFFFF;\n }\n "]);return W=function(){return a},a}function X(){const a=ya(["\n \n \n \n SEND\n \n "]);return X=function(){return a},a}function Y(){const a=ya(["\n .mmp-shortcuts__buttons {\n box-sizing: border-box;\n display: flex;\n flex-wrap: wrap;\n margin-top: 8px;\n }\n .mmp-shortcuts__button {\n min-width: calc(50% - 8px);\n flex: 1;\n }\n .mmp-shortcuts__button > div {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n }\n .mmp-shortcuts__button > div[align='left'] {\n justify-content: flex-start;\n }\n .mmp-shortcuts__button > div[align='right'] {\n justify-content: flex-end;\n }\n .mmp-shortcuts__button[columns='1'] {\n min-width: calc(100% - 8px);\n }\n .mmp-shortcuts__button[columns='3'] {\n min-width: calc(33.33% - 8px);\n }\n .mmp-shortcuts__button[columns='4'] {\n min-width: calc(25% - 8px);\n }\n .mmp-shortcuts__button[columns='5'] {\n min-width: calc(20% - 8px);\n }\n .mmp-shortcuts__button[columns='6'] {\n min-width: calc(16.66% - 8px);\n }\n .mmp-shortcuts__button > div > span {\n line-height: 24px;\n text-transform: initial;\n }\n .mmp-shortcuts__button > div > *:nth-child(2) {\n margin-left: 4px;\n }\n "]);return Y=function(){return a},a}function Z(){const a=ya(["\n ","\n ","\n "]);return Z=function(){return a},a}function $(){const a=ya(["",""]);return $=function(){return a},a}function _(){const a=ya([""]);return _=function(){return a},a}function aa(){const a=ya(["\n \n
\n ","\n ","\n
\n "]);return aa=function(){return a},a}function ba(){const a=ya(["\n
\n ","\n
\n "]);return ba=function(){return a},a}function ca(){const a=ya(["\n \n \n "]);return ca=function(){return a},a}function da(){const a=ya([""]);return da=function(){return a},a}function ea(){const a=ya(["\n :host {\n display: block;\n }\n :host([faded]) {\n opacity: .75;\n }\n :host[small] .mmp-dropdown__label {\n max-width: 60px;\n display: block;\n position: relative;\n width: auto;\n text-transform: initial;\n }\n :host[full] .mmp-dropdown__label {\n max-width: none;\n }\n .mmp-dropdown {\n padding: 0;\n display: block;\n }\n .mmp-dropdown__button {\n display: flex;\n font-size: 1em;\n justify-content: space-between;\n align-items: center;\n height: 36px;\n margin: 2px 0;\n }\n .mmp-dropdown__button.icon {\n height: 40px;\n margin: 0;\n }\n .mmp-dropdown__button > div {\n display: flex;\n flex: 1;\n justify-content: space-between;\n align-items: center;\n height: 36px;\n max-width: 100%;\n }\n .mmp-dropdown__label {\n text-align: left;\n text-transform: none;\n }\n .mmp-dropdown__icon {\n height: 24px;\n width: 24px;\n min-width: 24px;\n }\n paper-item > *:nth-child(2) {\n margin-left: 4px;\n }\n paper-menu-button[focused] mmp-button iron-icon {\n color: var(--mmp-accent-color);\n transform: rotate(180deg);\n }\n paper-menu-button[focused] paper-icon-button {\n color: var(--mmp-accent-color);\n transform: rotate(180deg);\n }\n paper-menu-button[focused] paper-icon-button[focused] {\n color: var(--mmp-text-color);\n transform: rotate(0deg);\n }\n "]);return ea=function(){return a},a}function fa(){const a=ya(["",""]);return fa=function(){return a},a}function ga(){const a=ya([""]);return ga=function(){return a},a}function ha(){const a=ya(["\n \n ","\n ","\n "]);return ha=function(){return a},a}function ia(){const a=ya(["\n \n
\n \n ","\n \n \n
\n
\n "]);return ia=function(){return a},a}function ja(){const a=ya(["\n \n \n "]);return ja=function(){return a},a}function ka(){const a=ya(["\n \n ","\n \n ","\n \n \n "]);return ka=function(){return a},a}function la(){const a=ya(["\n .ellipsis {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .label {\n margin: 0 8px;\n }\n paper-icon-button {\n color: var(--mmp-text-color);\n transition: color .25s;\n }\n paper-icon-button[color] {\n color: var(--mmp-accent-color) !important;\n opacity: 1 !important;\n }\n paper-icon-button[inactive] {\n opacity: .5;\n }\n"]);return la=function(){return a},a}function ma(){const a=ya(["\n .mmp-group-list {\n display: flex;\n flex-direction: column;\n margin-left: 8px;\n margin-bottom: 8px;\n }\n .mmp-group-list__title {\n font-weight: 500;\n letter-spacing: .1em;\n margin: 8px 0 4px;\n text-transform: uppercase;\n }\n .mmp-group-list__buttons {\n display: flex;\n }\n .mmp-group-list__button {\n margin: 8px 8px 0 0;\n min-width: 0;\n text-transform: uppercase;\n text-align: center;\n width: 50%;\n --mdc-theme-primary: transparent;\n background: rgba(255,255,255,0.25);\n }\n "]);return ma=function(){return a},a}function na(){const a=ya([""]);return na=function(){return a},a}function oa(){const a=ya(["Leave"]);return oa=function(){return a},a}function pa(){const a=ya(["Ungroup"]);return pa=function(){return a},a}function qa(){const a=ya(["\n "]);return qa=function(){return a},a}function ra(){const a=ya(["\n
\n Group speakers\n ","\n
\n \n ","\n \n \n Group all\n \n
\n
\n "]);return ra=function(){return a},a}function sa(){const a=ya(["\n :host {\n position: relative;\n box-sizing: border-box;\n margin: 4px;\n min-width: 0;\n overflow: hidden;\n transition: background .5s;\n }\n :host([raised]) {\n background: rgba(255,255,255,0.25);\n min-height: 36px;\n box-shadow:\n 0px 3px 1px -2px rgba(0, 0, 0, 0.2),\n 0px 2px 2px 0px rgba(0, 0, 0, 0.14),\n 0px 1px 5px 0px rgba(0,0,0,.12);\n }\n :host([color]) {\n background: var(--mmp-active-color);\n transition: background .25s;\n opacity: 1;\n }\n :host([faded]) {\n opacity: .75;\n }\n .container {\n height: 100%;\n width: 100%;\n }\n .slot-container {\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 0 8px;\n width: auto;\n }\n paper-ripple {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n }\n "]);return sa=function(){return a},a}function ta(){const a=ya(["\n
\n
\n \n
\n \n
\n "]);return ta=function(){return a},a}function ua(){const a=ya(["\n paper-checkbox {\n padding: 8px 0;\n }\n paper-checkbox > span {\n font-weight: 600;\n }\n\n ha-card[artwork*='cover'][has-artwork] paper-checkbox[disabled] {\n --paper-checkbox-checkmark-color: rgba(0,0,0,.5);\n }\n ha-card[artwork*='cover'][has-artwork] paper-checkbox {\n --paper-checkbox-unchecked-color: #FFFFFF;\n --paper-checkbox-label-color: #FFFFFF;\n }\n "]);return ua=function(){return a},a}function va(){const a=ya(["(master)"]);return va=function(){return a},a}function wa(){const a=ya(["\n \n ","\n ","\n \n "]);return wa=function(){return a},a}function xa(){const a=ya(["\n :host {\n overflow: visible !important;\n display: block;\n --mmp-accent-color: var(--mini-media-player-accent-color, var(--accent-color, #f39c12));\n --mmp-base-color: var(--mini-media-player-base-color, var(--primary-text-color, #000));\n --mmp-overlay-color: var(--mini-media-player-overlay-color, rgba(0,0,0,0.5));\n --mmp-overlay-color-stop: var(--mini-media-player-overlay-color-stop, 25%);\n --mmp-overlay-base-color: var(--mini-media-player-overlay-base-color, #fff);\n --mmp-overlay-accent-color: var(--mini-media-player-overlay-accent-color, --mmp-accent-color);\n --mmp-text-color: var(--mini-media-player-base-color, var(--primary-text-color, #000));\n --mmp-media-cover-info-color: var(--mini-media-player-media-cover-info-color, --mmp-text-color);\n --mmp-text-color-inverted: var(--disabled-text-color);\n --mmp-active-color: var(--mmp-accent-color);\n --mmp-icon-color:\n var(--mini-media-player-icon-color,\n var(--mini-media-player-base-color,\n var(--paper-item-icon-colo, #44739e)));\n --mmp-info-opacity: 1;\n --mmp-artwork-opacity: var(--mini-media-player-artwork-opacity, 1);\n --mmp-progress-height: var(--mini-media-player-progress-height, 6px);\n --mdc-theme-primary: var(--mmp-text-color);\n --mdc-theme-on-primary: var(--mmp-text-color);\n --paper-checkbox-unchecked-color: var(--mmp-text-color);\n --paper-checkbox-label-color: var(--mmp-text-color);\n color: var(--mmp-text-color);\n }\n ha-card.--bg {\n --mmp-info-opacity: .75;\n }\n ha-card.--has-artwork[artwork*='cover'] {\n --mmp-accent-color: var(--mini-media-player-overlay-accent-color, var(--mini-media-player-accent-color, var(--accent-color, #f39c12)));\n --mmp-text-color: var(--mmp-overlay-base-color);\n --mmp-text-color-inverted: #000;\n --mmp-active-color: rgba(255,255,255,.5);\n --mmp-icon-color: var(--mmp-text-color);\n --mmp-info-opacity: .75;\n --paper-slider-container-color: var(--mini-media-player-overlay-color, rgba(255,255,255,.75));\n --mdc-theme-primary: var(--mmp-text-color);\n --mdc-theme-on-primary: var(--mmp-text-color);\n --paper-checkbox-unchecked-color: var(--mmp-text-color);\n --paper-checkbox-label-color: var(--mmp-text-color);\n color: var(--mmp-text-color);\n }\n ha-card {\n cursor: default;\n display: flex;\n background: transparent;\n overflow: hidden;\n padding: 0;\n position: relative;\n color: inherit;\n }\n ha-card.--group {\n box-shadow: none;\n --mmp-progress-height: var(--mini-media-player-progress-height, 4px);\n }\n ha-card.--more-info {\n cursor: pointer;\n }\n .mmp__bg, .mmp__player, .mmp__container {\n border-radius: var(--ha-card-border-radius, 0);\n -webkit-transform: translateZ(0);\n transform: translateZ(0);\n }\n .mmp__container {\n overflow: hidden;\n height: 100%;\n width: 100%;\n position: absolute;\n pointer-events: none;\n }\n ha-card:before {\n content: '';\n padding-top: 0px;\n transition: padding-top .5s cubic-bezier(.21,.61,.35,1);\n will-change: padding-top;\n }\n ha-card.--initial .entity__artwork,\n ha-card.--initial .entity__icon {\n animation-duration: .001s;\n }\n ha-card.--initial:before,\n ha-card.--initial .mmp-player {\n transition: none;\n }\n header {\n display: none;\n }\n ha-card[artwork='full-cover'].--has-artwork:before {\n padding-top: 56%;\n }\n ha-card[artwork='full-cover'].--has-artwork[content='music']:before,\n ha-card[artwork='full-cover-fit'].--has-artwork:before {\n padding-top: 100%;\n }\n .mmp__bg {\n background: var(--ha-card-background, var(--paper-card-background-color, white));\n position: absolute;\n top: 0; right: 0; bottom: 0; left: 0;\n overflow: hidden;\n -webkit-transform: translateZ(0);\n transform: translateZ(0);\n }\n ha-card[artwork*='cover'].--has-artwork .mmp__bg {\n opacity: var(--mmp-artwork-opacity);\n background: transparent;\n }\n ha-card.--group .mmp__bg {\n background: transparent;\n }\n .cover,\n .cover:before {\n display: block;\n opacity: 0;\n position: absolute;\n top: 0; right: 0; bottom: 0; left: 0;\n transition: opacity .75s cubic-bezier(.21,.61,.35,1);\n will-change: opacity;\n }\n .cover {\n animation: fade-in .5s cubic-bezier(.21,.61,.35,1);\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center center;\n }\n .cover:before {\n background: var(--mmp-overlay-color);\n content: '';\n }\n ha-card[artwork*='full-cover'].--has-artwork .mmp-player {\n background: linear-gradient(to top, var(--mmp-overlay-color) var(--mmp-overlay-color-stop), transparent 100%);\n border-bottom-left-radius: var(--ha-card-border-radius, 0);\n border-bottom-right-radius: var(--ha-card-border-radius, 0);\n }\n ha-card.--has-artwork .cover,\n ha-card.--has-artwork[artwork='cover'] .cover:before,\n ha-card.--bg .cover {\n opacity: .999;\n }\n ha-card[artwork='default'] .cover {\n display: none;\n }\n ha-card.--bg .cover {\n display: block;\n }\n ha-card[artwork='full-cover-fit'].--has-artwork .cover {\n background-color: black;\n background-size: contain;\n }\n .mmp-player {\n align-self: flex-end;\n box-sizing: border-box;\n position: relative;\n padding: 16px;\n transition: padding .25s ease-out;\n width: 100%;\n will-change: padding;\n }\n ha-card.--group .mmp-player {\n padding: 10px 0;\n }\n .flex {\n display: flex;\n display: -ms-flexbox;\n display: -webkit-flex;\n flex-direction: row;\n }\n .mmp-player__core {\n position: relative;\n }\n .entity__info {\n justify-content: center;\n display: flex;\n flex-direction: column;\n margin-left: 8px;\n position: relative;\n overflow: hidden;\n user-select: none;\n }\n ha-card.--rtl .entity__info {\n margin-left: auto;\n margin-right: 8px;\n }\n ha-card[content='movie'] .attr__media_season,\n ha-card[content='movie'] .attr__media_episode {\n display: none;\n }\n .entity__icon {\n color: var(--mmp-icon-color);\n }\n .entity__artwork, .entity__icon {\n animation: fade-in .25s ease-out;\n background-position: center center;\n background-repeat: no-repeat;\n background-size: cover;\n border-radius: 100%;\n height: 40px;\n width: 40px;\n min-width: 40px;\n line-height: 40px;\n margin-right: 8px;\n position: relative;\n text-align: center;\n will-change: border-color;\n transition: border-color .25s ease-out;\n }\n ha-card.--rtl .entity__artwork,\n ha-card.--rtl .entity__icon {\n margin-right: auto;\n }\n .entity__artwork[border] {\n border: 2px solid var(--primary-text-color);\n box-sizing: border-box;\n -moz-box-sizing: border-box;\n -webkit-box-sizing: border-box;\n }\n .entity__artwork[border][state='playing'] {\n border-color: var(--mmp-accent-color);\n }\n .entity__info__name,\n .entity__info__media[short] {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .entity__info__name {\n line-height: 20px;\n color: var(--mmp-text-color);\n }\n .entity__info__media {\n color: var(--secondary-text-color);\n max-height: 6em;\n word-break: break-word;\n opacity: var(--mmp-info-opacity);\n transition: color .5s;\n }\n .entity__info__media[short] {\n max-height: 20px;\n overflow: hidden;\n }\n .attr__app_name {\n display: none;\n }\n .attr__app_name:first-child,\n .attr__app_name:first-of-type {\n display: inline;\n }\n .mmp-player__core[inactive] .entity__info__media {\n color: var(--mmp-text-color);\n max-width: 200px;\n opacity: .5;\n }\n .entity__info__media[short-scroll] {\n max-height: 20px;\n white-space: nowrap;\n }\n .entity__info__media[scroll] > span {\n visibility: hidden;\n }\n .entity__info__media[scroll] > div {\n animation: move linear infinite;\n }\n .entity__info__media[scroll] .marquee {\n animation: slide linear infinite;\n }\n .entity__info__media[scroll] .marquee,\n .entity__info__media[scroll] > div {\n animation-duration: inherit;\n visibility: visible;\n }\n .entity__info__media[scroll] {\n animation-duration: 10s;\n mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);\n -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);\n }\n .marquee {\n visibility: hidden;\n position: absolute;\n white-space: nowrap;\n }\n ha-card[artwork*='cover'].--has-artwork .entity__info__media,\n ha-card.--bg .entity__info__media {\n color: var(--mmp-media-cover-info-color);\n }\n .entity__info__media span:before {\n content: ' - ';\n }\n .entity__info__media span:first-of-type:before {\n content: '';\n }\n .entity__info__media span:empty {\n display: none;\n }\n .mmp-player__adds {\n margin-left: 48px;\n position: relative;\n }\n ha-card.--rtl .mmp-player__adds {\n margin-left: auto;\n margin-right: 48px;\n }\n .mmp-player__adds > *:nth-child(2) {\n margin-top: 0px;\n }\n mmp-powerstrip {\n flex: 1;\n justify-content: flex-end;\n margin-right: 0;\n margin-left: auto;\n width: auto;\n max-width: 100%;\n }\n mmp-media-controls {\n flex-wrap: wrap;\n justify-content: center;\n }\n ha-card.--flow mmp-powerstrip {\n justify-content: space-between;\n margin-left: auto;\n }\n ha-card.--flow.--rtl mmp-powerstrip {\n margin-right: auto;\n }\n ha-card.--flow .entity__info {\n display: none;\n }\n ha-card.--responsive .mmp-player__adds {\n margin-left: 0;\n }\n ha-card.--responsive.--rtl .mmp-player__adds {\n margin-right: 0;\n }\n ha-card.--responsive .mmp-player__adds > mmp-media-controls {\n padding: 0;\n }\n ha-card.--progress .mmp-player {\n padding-bottom: calc(16px + calc(var(--mini-media-player-progress-height, 6px) - 6px));\n }\n ha-card.--progress.--group .mmp-player {\n padding-bottom: calc(10px + calc(var(--mini-media-player-progress-height, 6px) - 6px));\n }\n ha-card.--runtime .mmp-player {\n padding-bottom: calc(16px + 16px + var(--mini-media-player-progress-height, 0px));\n }\n ha-card.--runtime.--group .mmp-player {\n padding-bottom: calc(16px + 12px + var(--mini-media-player-progress-height, 0px));\n }\n ha-card.--inactive .mmp-player {\n padding: 16px;\n }\n ha-card.--inactive.--group .mmp-player {\n padding: 10px 0;\n }\n .mmp-player div:empty {\n display: none;\n }\n @keyframes slide {\n 100% { transform: translateX(-100%); }\n }\n @keyframes move {\n from { transform: translateX(100%); }\n to { transform: translateX(0); }\n }\n @keyframes fade-in {\n from { opacity: 0; }\n to { opacity: 1; }\n }\n"]);return xa=function(){return a},a}function ya(a,b){return b||(b=a.slice(0)),Object.freeze(Object.defineProperties(a,{raw:{value:Object.freeze(b)}}))}function za(a,b){return Ca(a)||Ba(a,b)||Aa()}function Aa(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function Ba(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!(b&&c.length===b));d=!0);}catch(a){e=!0,f=a}finally{try{d||null==h["return"]||h["return"]()}finally{if(e)throw f}}return c}function Ca(a){if(Array.isArray(a))return a}function Da(a){for(var b=1;ba.parentNode.removeChild(a))}function Ba(a,b){let c=2"function"==typeof a&&Pa.has(a),Ra=window.customElements!==void 0&&window.customElements.polyfillWrapFlushCallback!==void 0,Sa=function(a,b){for(let c=2"),Xa=new RegExp("".concat(Va,"|").concat(Wa)),Ya="$lit$";class Za{constructor(a,b){this.parts=[],this.element=b;const c=[],d=[],e=document.createTreeWalker(b.content,133,null,!1);let f=0,g=-1,h=0;for(const i=a.strings,j=a.values.length;h{const c=a.length-b.length;return 0<=c&&a.slice(c)===b},_a=a=>-1!==a.index,ab=()=>document.createComment(""),bb=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;class cb{constructor(a,b,c){this.__parts=[],this.template=a,this.processor=b,this.options=c}update(a){let b=0;for(const c of this.__parts)void 0!==c&&c.setValue(a[b]),b++;for(const b of this.__parts)void 0!==b&&b.commit()}_clone(){const a=Ra?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),b=[],c=this.template.parts,d=document.createTreeWalker(a,133,null,!1);let e,f=0,g=0,h=d.nextNode();for(;f",e+1);const f=bb.exec(a);b+=null===f?a+(c?Va:Wa):a.substr(0,f.index)+f[1]+f[2]+Ya+f[3]+Va}return b+=this.strings[a],b}getTemplateElement(){const a=document.createElement("template");return a.innerHTML=this.getHTML(),a}}const eb=a=>null===a||"object"!=typeof a&&"function"!=typeof a,fb=a=>Array.isArray(a)||!!(a&&a[Symbol.iterator]);class gb{constructor(a,b,c){this.dirty=!0,this.element=a,this.name=b,this.strings=c,this.parts=[];for(let d=0;dthis.handleEvent(a)}setValue(a){this.__pendingValue=a}commit(){for(;Qa(this.__pendingValue);){const a=this.__pendingValue;this.__pendingValue=Ta,a(this)}if(this.__pendingValue===Ta)return;const a=this.__pendingValue,b=this.value,c=null==a||null!=b&&(a.capture!==b.capture||a.once!==b.once||a.passive!==b.passive);c&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),null!=a&&(null==b||c)&&(this.__options=ob(a),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=a,this.__pendingValue=Ta}handleEvent(a){"function"==typeof this.value?this.value.call(this.eventContext||this.element,a):this.value.handleEvent(a)}}const ob=a=>a&&(mb?{capture:a.capture,passive:a.passive,once:a.once}:a.capture);const pb=new class{handleAttributeExpressions(a,b,c,d){const e=b[0];if("."===e){const d=new kb(a,b.slice(1),c);return d.parts}if("@"===e)return[new nb(a,b.slice(1),d.eventContext)];if("?"===e)return[new jb(a,b.slice(1),c)];const f=new gb(a,b,c);return f.parts}handleTextExpression(a){return new ib(a)}},qb=new Map,rb=new WeakMap,sb=(a,b,c)=>{let d=rb.get(b);d===void 0&&(Sa(b,b.firstChild),rb.set(b,d=new ib(Object.assign({templateFactory:ya},c))),d.appendInto(b)),d.setValue(a),d.commit()};(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.0.0");const tb=function(a){for(var b=arguments.length,c=Array(1{let b=11===a.nodeType?0:1;for(const c=document.createTreeWalker(a,ub,null,!1);c.nextNode();)b++;return b},wb=function(a){let b=1"".concat(a,"--").concat(b);let yb=!0;"undefined"==typeof window.ShadyCSS?yb=!1:"undefined"==typeof window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),yb=!1);const zb=a=>b=>{const c=xb(b.type,a);let d=qb.get(c);void 0===d&&(d={stringsArray:new WeakMap,keyString:new Map},qb.set(c,d));let e=d.stringsArray.get(b.strings);if(void 0!==e)return e;const f=b.strings.join(Va);if(e=d.keyString.get(f),void 0===e){const c=b.getTemplateElement();yb&&window.ShadyCSS.prepareTemplateDom(c,a),e=new Za(b,c),d.keyString.set(f,e)}return d.stringsArray.set(b.strings,e),e},Ab=["html","svg"],Bb=a=>{Ab.forEach(b=>{const c=qb.get(xb(b,a));c!==void 0&&c.keyString.forEach(a=>{const b=a.element.content,c=new Set;Array.from(b.querySelectorAll("style")).forEach(a=>{c.add(a)}),Aa(a,c)})})},Cb=new Set,Db=(a,b,c)=>{Cb.add(c);const d=a.querySelectorAll("style"),e=d.length;if(0===e)return void window.ShadyCSS.prepareTemplateStyles(b.element,c);const f=document.createElement("style");for(let g=0;g{const d=c.scopeName,e=rb.has(b),f=yb&&11===b.nodeType&&!!b.host&&a instanceof db,g=f&&!Cb.has(d),h=g?document.createDocumentFragment():b;if(sb(a,h,Object.assign({templateFactory:zb(d)},c)),g){const a=rb.get(h);rb.delete(h),a.value instanceof cb&&Db(h,a.value.template,d),Sa(b,b.firstChild),b.appendChild(h),rb.set(b,a)}!e&&f&&window.ShadyCSS.styleElement(b.host)};window.JSCompiler_renameProperty=a=>a;const Fb={toAttribute(a,b){return b===Boolean?a?"":null:b===Object||b===Array?null==a?a:JSON.stringify(a):a},fromAttribute(a,b){return b===Boolean?null!==a:b===Number?null===a?null:+a:b===Object||b===Array?JSON.parse(a):a}},Gb=(a,b)=>b!==a&&(b===b||a===a),Hb={attribute:!0,type:String,converter:Fb,reflect:!1,hasChanged:Gb},Ib=Promise.resolve(!0),Jb=1,Kb=4,Lb=8,Mb=16,Nb=32;class Ob extends HTMLElement{constructor(){super(),this._updateState=0,this._instanceProperties=void 0,this._updatePromise=Ib,this._hasConnectedResolver=void 0,this._changedProperties=new Map,this._reflectingProperties=void 0,this.initialize()}static get observedAttributes(){this.finalize();const a=[];return this._classProperties.forEach((b,c)=>{const d=this._attributeNameForProperty(c,b);void 0!==d&&(this._attributeToPropertyMap.set(d,c),a.push(d))}),a}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;const a=Object.getPrototypeOf(this)._classProperties;a!==void 0&&a.forEach((a,b)=>this._classProperties.set(b,a))}}static createProperty(a){let b=1{if(this.hasOwnProperty(b)){const a=this[b];delete this[b],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(b,a)}})}_applyInstanceProperties(){this._instanceProperties.forEach((a,b)=>this[b]=a),this._instanceProperties=void 0}connectedCallback(){this._updateState|=Nb,this._hasConnectedResolver&&(this._hasConnectedResolver(),this._hasConnectedResolver=void 0)}disconnectedCallback(){}attributeChangedCallback(a,b,c){b!==c&&this._attributeToProperty(a,c)}_propertyToAttribute(a,b){let c=2{b=a,c=d});try{yield d}catch(a){}a._hasConnected||(yield new Promise(b=>a._hasConnectedResolver=b));try{const b=a.performUpdate();null!=b&&(yield b)}catch(a){c(a)}b(!a._hasRequestedUpdate)})()}get _hasConnected(){return this._updateState&Nb}get _hasRequestedUpdate(){return this._updateState&Kb}get hasUpdated(){return this._updateState&Jb}performUpdate(){this._instanceProperties&&this._applyInstanceProperties();let a=!1;const b=this._changedProperties;try{a=this.shouldUpdate(b),a&&this.update(b)}catch(b){throw a=!1,b}finally{this._markUpdated()}a&&(!(this._updateState&Jb)&&(this._updateState|=Jb,this.firstUpdated(b)),this.updated(b))}_markUpdated(){this._changedProperties=new Map,this._updateState&=~Kb}get updateComplete(){return this._updatePromise}shouldUpdate(a){return!0}update(a){this._reflectingProperties!==void 0&&0this._propertyToAttribute(b,this[b],a)),this._reflectingProperties=void 0)}updated(a){}firstUpdated(a){}}Ob.finalized=!0;const Pb="adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Qb=Symbol();class Rb{constructor(a,b){if(b!==Qb)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=a}get styleSheet(){return void 0===this._styleSheet&&(Pb?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}}const Sb=a=>{if(a instanceof Rb)return a.cssText;if("number"==typeof a)return a;throw new Error("Value passed to 'css' function must be a 'css' function result: ".concat(a,". Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security."))},Tb=function(a){for(var b=arguments.length,c=Array(1b+Sb(c)+a[d+1],a[0]);return new Rb(e,Qb)};(window.litElementVersions||(window.litElementVersions=[])).push("2.2.0");const Ub=a=>a.flat?a.flat(1/0):Ca(a);class Vb extends Ob{static finalize(){super.finalize(),this._styles=this.hasOwnProperty(JSCompiler_renameProperty("styles",this))?this._getUniqueStyles():this._styles||[]}static _getUniqueStyles(){const a=this.styles,b=[];if(Array.isArray(a)){const c=Ub(a),d=c.reduceRight((a,b)=>(a.add(b),a),new Set);d.forEach(a=>b.unshift(a))}else a&&b.push(a);return b}initialize(){super.initialize(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow({mode:"open"})}adoptStyles(){const a=this.constructor._styles;0===a.length||(window.ShadyCSS===void 0||window.ShadyCSS.nativeShadow?Pb?this.renderRoot.adoptedStyleSheets=a.map(a=>a.styleSheet):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(a.map(a=>a.cssText),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&window.ShadyCSS!==void 0&&window.ShadyCSS.styleElement(this)}update(a){super.update(a);const b=this.render();b instanceof db&&this.constructor.render(b,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(a=>{const b=document.createElement("style");b.textContent=a.cssText,this.renderRoot.appendChild(b)}))}render(){}}Vb.finalized=!0,Vb.render=Eb;const Wb=new WeakMap,Xb=(a=>function(){const b=a(...arguments);return Pa.set(b,!0),b})(a=>b=>{if(!(b instanceof hb)||b instanceof lb||"class"!==b.committer.name||1Da({text:this.attr[a.attr],prefix:""},a)).filter(a=>a.text)}get hasProgress(){return!this.config.hide.progress&&!this.idle&&qc.every(a=>a in this.attr)}get progress(){return this.position+(Date.now()-new Date(this.updatedAt).getTime())/1e3}get idleView(){const a=this.config.idle_view;return!!(a.when_idle&&this.isIdle||a.when_standby&&this.isStandby||a.when_paused&&this.isPaused)||!!(this.updatedAt&&a.after&&!this.isPlaying)&&this.checkIdleAfter(a.after)}get trackIdle(){return this.active&&!this.isPlaying&&this.updatedAt&&this.config.idle_view&&this.config.idle_view.after}checkIdleAfter(a){const b=(Date.now()-new Date(this.updatedAt).getTime())/1e3;return this.idle=b>60*a,this.active=this.isActive,this.idle}get supportsShuffle(){return"undefined"!=typeof this.attr.shuffle}get supportsMute(){return"undefined"!=typeof this.attr.is_volume_muted}getAttribute(a){return this.attr[a]||""}fetchThumbnail(){var a=this;return Ga(function*(){try{const b=yield a.hass.callWS({type:"media_player_thumbnail",entity_id:a.config.entity}),c=b.content_type,d=b.content;return"url(data:".concat(c,";base64,").concat(d,")")}catch(a){return console.error("mini-media-player: Failed fetching thumbnail"),!1}})()}toggle(a){return this.config.toggle_power?this.callService(a,"toggle"):this.isOff?this.callService(a,"turn_on"):void this.callService(a,"turn_off")}toggleMute(a){this.callService(a,"volume_mute",{is_volume_muted:!this.muted})}toggleShuffle(a){this.callService(a,"shuffle_set",{shuffle:!this.shuffle})}setSource(a,b){this.callService(a,"select_source",{source:b})}setMedia(a,b){this.callService(a,"play_media",Da({},b))}playPause(a){this.callService(a,"media_play_pause")}playStop(a){this.isPlaying?this.callService(a,"media_stop"):this.callService(a,"media_play")}setSoundMode(a,b){this.callService(a,"select_sound_mode",{sound_mode:b})}next(a){this.callService(a,"media_next_track")}prev(a){this.callService(a,"media_previous_track")}stop(a){this.callService(a,"media_stop")}volumeUp(a){this.callService(a,"volume_up")}volumeDown(a){this.callService(a,"volume_down")}seek(a,b){this.callService(a,"media_seek",{seek_position:b})}setVolume(a,b){this.config.speaker_group.sync_volume?this.group.forEach(c=>{const d=this.config.speaker_group.entities.find(a=>a.entity_id===c)||{};let e=b;d.volume_offset&&(e+=d.volume_offset/100,1e&&(e=0)),this.callService(a,"volume_set",{entity_id:c,volume_level:e})}):this.callService(a,"volume_set",{entity_id:this.config.entity,volume_level:b})}handleGroupChange(a,b,c){const d=this.config.speaker_group.platform,e={entity_id:b};if(c){if(e.master=this.config.entity,"bluesound"===d)return this.callService(a,"".concat(d,"_JOIN"),e);this.callService(a,"join",e,d)}else{if("bluesound"===d)return this.callService(a,"".concat(d,"_UNJOIN"),e);this.callService(a,"unjoin",e,d)}}toggleScript(a,b){let c=2a.stopPropagation(),this.handleClick,this.item.name,this.master?tb(va()):"")}handleClick(a){a.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:{entity:this.item.entity_id,checked:!this.checked}}))}static get styles(){return Tb(ua())}}customElements.define("mmp-group-item",uc);class vc extends Vb{render(){return tb(ta())}static get styles(){return Tb(sa())}}customElements.define("mmp-button",vc);class wc extends Vb{static get properties(){return{entities:{},player:{},visible:Boolean}}get group(){return this.player.group}get master(){return this.player.master}get isMaster(){return this.player.isMaster}handleGroupChange(a){const b=a.detail,c=b.entity,d=b.checked;this.player.handleGroupChange(a,c,d)}render(){let a=0tb(qa(),this.handleGroupChange,a,a.entity_id===this.player.id||b.includes(a.entity_id),a.entity_id===this.player.id||c!==this.player.id,a.entity_id===c)),2>b.length,a=>this.player.handleGroupChange(a,d?b:this.player.entity_id,!1),d?tb(pa()):tb(oa()),!d,a=>this.player.handleGroupChange(a,this.entities.map(a=>a.entity_id),!0)):tb(na())}static get styles(){return Tb(ma())}}customElements.define("mmp-group-list",wc);const xc=Tb(la());class yc extends Vb{static get properties(){return{items:[],label:String,selected:String}}get selectedId(){return this.items.map(a=>a.id).indexOf(this.selected)}onChange(a){this.dispatchEvent(new CustomEvent("change",{detail:a}))}render(){return tb(ka(),"right","top",44,a=>a.stopPropagation(),this.icon?tb(ja(),oc.DROPDOWN):tb(ia(),this.selected||this.label,oc.DROPDOWN),this.selectedId,this.items.map(a=>tb(ha(),a.id||a.name,()=>this.onChange(a),a.icon?tb(ga(),a.icon):"",a.name?tb(fa(),a.name):"")))}static get styles(){return[xc,Tb(ea())]}}customElements.define("mmp-dropdown",yc);class zc extends Vb{static get properties(){return{player:{},shortcuts:{}}}get buttons(){return this.shortcuts.buttons}get list(){return this.shortcuts.list}get show(){return!this.shortcuts.hide_when_off||this.player.active}get active(){return this.player.getAttribute(this.shortcuts.attribute)}get height(){return this.shortcuts.column_height||36}render(){if(!this.show)return tb(da());const a=this.active,b=this.list?tb(ca(),this.handleShortcut,this.list,this.shortcuts.label,a):"",c=this.buttons?tb(ba(),this.buttons.map(b=>tb(aa(),"min-height: ".concat(this.height,"px;"),this.shortcuts.columns,b.id===a,a=>this.handleShortcut(a,b),this.shortcuts.align_text,b.icon?tb(_(),b.icon):"",b.name?tb($(),b.name):""))):"";return tb(Z(),c,b)}handleShortcut(a,b){const c=b||a.detail,d=c.type,e=c.id,f=c.data;if("source"===d)return this.player.setSource(a,e);if("service"===d)return this.player.toggleService(a,e,f);if("script"===d)return this.player.toggleScript(a,e,f);if("sound_mode"===d)return this.player.setSoundMode(a,e);this.player.setMedia(a,{media_content_type:d,media_content_id:e})}static get styles(){return[xc,Tb(Y())]}}customElements.define("mmp-shortcuts",zc);const Ac=function(a,b){let c=2a.stopPropagation(),this.handleTts)}handleTts(a){const b=this.config,c=this.message,d={message:c,entity_id:b.entity_id||this.entity};b.language&&(d.language=b.language),"alexa"===b.platform?this.hass.callService("notify","alexa_media",{message:c,data:{type:b.type||"tts"},target:d.entity_id}):"sonos"===b.platform?this.hass.callService("script","sonos_say",{sonos_entity:d.entity_id,volume:b.volume||.5,message:c}):"webos"===b.platform?this.hass.callService("notify",d.entity_id.split(".").slice(-1)[0],{message:c}):"ga"===b.platform?this.hass.callService("notify","ga_broadcast",{message:c}):this.hass.callService("tts","".concat(b.platform,"_say"),d),a.stopPropagation(),this.reset()}reset(){this.input.value=""}static get styles(){return Tb(W())}}customElements.define("mmp-tts",Bc);var Cc=a=>{let b=parseInt(a%60,10),c=parseInt(a/60%60,10),d=parseInt(a/3600%24,10);return d=10>d?"0".concat(d):d,c=10>c?"0".concat(c):c,b=10>b?"0".concat(b):b,"".concat("00"===d?"":"".concat(d,":")).concat(c,":").concat(b)};class Dc extends Vb{static get properties(){return{_player:{},showTime:Boolean,progress:Number,duration:Number,tracker:{},seekProgress:Number,seekWidth:Number,track:Boolean}}set player(a){this._player=a,this.hasProgress&&this.trackProgress()}get duration(){return this.player.mediaDuration}get player(){return this._player}get hasProgress(){return this.player.hasProgress}get width(){return this.shadowRoot.querySelector(".mmp-progress").offsetWidth}get offset(){return this.getBoundingClientRect().left}get classes(){return Xb({transiting:!this.seekProgress,seeking:this.seekProgress})}render(){return tb(V(),this.initSeek,this.handleSeek,this.initSeek,this.handleSeek,this.resetSeek,a=>a.stopPropagation(),!this.player.isPlaying,this.showTime?tb(U(),Cc(this.seekProgress||this.progress),Cc(this.duration)):"",this.classes,this.seekProgress||this.progress,this.duration)}trackProgress(){this.progress=this.player.progress,this.tracker||(this.tracker=setInterval(()=>this.trackProgress(),1e3)),this.player.isPlaying||(clearInterval(this.tracker),this.tracker=null)}initSeek(a){const b=a.offsetX||a.touches[0].pageX-this.offset;this.seekWidth=this.width,this.seekProgress=this.calcProgress(b),this.addEventListener("touchmove",this.moveSeek),this.addEventListener("mousemove",this.moveSeek)}resetSeek(){this.seekProgress=null,this.removeEventListener("touchmove",this.moveSeek),this.removeEventListener("mousemove",this.moveSeek)}moveSeek(a){a.preventDefault();const b=a.offsetX||a.touches[0].pageX-this.offset;this.seekProgress=this.calcProgress(b)}handleSeek(a){this.resetSeek();const b=a.offsetX||a.changedTouches[0].pageX-this.offset,c=this.calcProgress(b);this.player.seek(a,c)}disconnectedCallback(){this.resetSeek(),clearInterval(this.tracker)}calcProgress(a){const b=a/this.seekWidth*this.duration;return Math.min(Math.max(b,.1),this.duration)}static get styles(){return Tb(T())}}customElements.define("mmp-progress",Dc);class Ec extends Vb{static get properties(){return{player:{},selected:String,icon:Boolean}}get source(){return this.player.source}get sources(){return this.player.sources.map(a=>({name:a,id:a,type:"source"}))}render(){return tb(S(),this.handleSource,this.sources,this.source,this.selected||this.source,this.icon)}handleSource(a){const b=a.detail.id;this.player.setSource(a,b),this.selected=b}static get styles(){return Tb(R())}}customElements.define("mmp-source-menu",Ec);class Fc extends Vb{static get properties(){return{player:{},selected:String,icon:Boolean}}get mode(){return this.player.soundMode}get modes(){return this.player.soundModes.map(a=>({name:a,id:a,type:"soundMode"}))}render(){return tb(Q(),this.handleChange,this.modes,this.mode,this.selected||this.mode,this.icon)}handleChange(a){const b=a.detail.id;this.player.setSoundMode(a,b),this.selected=b}static get styles(){return Tb(P())}}customElements.define("mmp-sound-menu",Fc);class Gc extends Vb{static get properties(){return{player:{},config:{},break:Boolean}}get showShuffle(){return!this.config.hide.shuffle&&this.player.supportsShuffle}get maxVol(){return this.config.max_volume||100}get minVol(){return this.config.min_volume||0}render(){const a=this.config.hide;return tb(O(),a.volume?tb(N()):this.renderVolControls(this.player.muted),this.showShuffle?tb(M(),a=>this.player.toggleShuffle(a),oc.SHUFFLE,this.player.shuffle):tb(L()),a.controls?tb(J()):tb(K(),this.config.flow||this.break,a=>this.player.prev(a),oc.PREV,this.renderPlayButtons(),a=>this.player.next(a),oc.NEXT))}renderVolControls(a){return this.config.volume_stateless?this.renderVolButtons(a):this.renderVolSlider(a)}renderVolSlider(a){return tb(I(),this.renderMuteButton(a),this.handleVolumeChange,a=>a.stopPropagation(),a,this.minVol,this.maxVol,100*this.player.vol,"ltr")}renderVolButtons(a){return tb(H(),this.renderMuteButton(a),a=>this.player.volumeDown(a),oc.VOL_DOWN,a=>this.player.volumeUp(a),oc.VOL_UP)}renderMuteButton(a){if(!this.config.hide.mute)switch(this.config.replace_mute){case"play":case"play_pause":return tb(G(),a=>this.player.playPause(a),oc.PLAY[this.player.isPlaying]);case"stop":return tb(F(),a=>this.player.stop(a),oc.STOP.true);case"play_stop":return tb(E(),a=>this.player.playStop(a),oc.STOP[this.player.isPlaying]);case"next":return tb(D(),a=>this.player.next(a),oc.NEXT);default:return this.player.supportsMute?tb(C(),a=>this.player.toggleMute(a),oc.MUTE[a]):void 0;}}renderPlayButtons(){const a=this.config.hide;return tb(B(),a.play_pause?tb(z()):tb(A(),a=>this.player.playPause(a),oc.PLAY[this.player.isPlaying]),a.play_stop?tb(x()):tb(y(),a=>this.handleStop(a),a.play_pause?oc.STOP[this.player.isPlaying]:oc.STOP.true))}handleStop(a){return this.config.hide.play_pause?this.player.playStop(a):this.player.stop(a)}handleVolumeChange(a){const b=parseFloat(a.target.value)/100;this.player.setVolume(a,b)}static get styles(){return[xc,Tb(w())]}}customElements.define("mmp-media-controls",Gc);class Hc extends Vb{static get properties(){return{hass:{},player:{},config:{},groupVisible:Boolean,idle:Boolean}}get icon(){return this.config.speaker_group.icon||oc.GROUP}get showGroupButton(){return this.config.speaker_group.entities}get showPowerButton(){return!this.config.hide.power}get powerColor(){return this.player.active&&!this.config.hide.power_state}get sourceSize(){return"icon"===this.config.source||this.hasControls||this.idle}get soundSize(){return"icon"===this.config.sound_mode||this.hasControls||this.idle}get hasControls(){return this.player.active&&this.config.hide.controls!==this.config.hide.volume}get hasSource(){return 0this.player.toggle(a),this.powerColor):"")}handleGroupClick(a){a.stopPropagation(),this.dispatchEvent(new CustomEvent("toggleGroupList"))}get renderIdleView(){return this.player.isPaused?tb(o(),oc.PLAY[this.player.isPlaying],a=>this.player.playPause(a)):tb(n(),Ac(this.hass,"state.media_player.idle","Idle"))}static get styles(){return[xc,Tb(m())]}}customElements.define("mmp-powerstrip",Hc),customElements.get("ha-slider")||customElements.define("ha-slider",class extends customElements.get("paper-slider"){});class Ic extends Vb{constructor(){super(),this._overflow=!1,this.initial=!0,this.picture=!1,this.thumbnail=!1,this.edit=!1,this.rtl=!1}static get properties(){return{_hass:{},config:{},entity:{},player:{},_overflow:Boolean,break:Boolean,initial:Boolean,picture:String,thumbnail:String,edit:Boolean,rtl:Boolean,idle:Boolean}}static get styles(){return tc}set hass(a){if(a){const b=a.states[this.config.entity];this._hass=a,b&&this.entity!==b&&(this.entity=b,this.player=new sc(a,this.config,b),this.rtl=this.computeRTL(a),this.idle=this.player.idle,this.player.trackIdle&&this.updateIdleStatus())}}get hass(){return this._hass}set overflow(a){this._overflow!==a&&(this._overflow=a)}get overflow(){return this._overflow}get name(){return this.config.name||this.player.name}setConfig(a){if(!a.entity||"media_player"!==a.entity.split(".")[0])throw new Error("Specify an entity from within the media_player domain.");const b=Da({artwork:"default",info:"default",more_info:!0,source:"default",sound_mode:"default",toggle_power:!0},a,{hide:Da({},nc,a.hide),speaker_group:Da({show_group_count:!0,platform:"sonos"},a.sonos,a.speaker_group),shortcuts:Da({label:"Shortcuts..."},a.shortcuts)});b.max_volume=+b.max_volume||100,b.min_volume=+b.min_volume||0,b.collapse=b.hide.controls||b.hide.volume,b.info=b.collapse&&"scroll"!==b.info?"short":b.info,b.flow=b.hide.icon&&b.hide.name&&b.hide.info,this.config=b}shouldUpdate(a){return void 0===this.break&&this.computeRect(this),pc.some(b=>a.has(b))&&this.player}firstUpdated(){const a=new mc(a=>{a.forEach(a=>{window.requestAnimationFrame(()=>{"scroll"===this.config.info&&this.computeOverflow(),this._resizeTimer||(this.computeRect(a),this._resizeTimer=setTimeout(()=>{this._resizeTimer=null,this.computeRect(this._resizeEntry)},250)),this._resizeEntry=a})})});a.observe(this),setTimeout(()=>this.initial=!1,250),this.edit=this.config.speaker_group.expanded||!1}updated(){"scroll"===this.config.info&&setTimeout(()=>{this.computeOverflow()},10)}render(){let a=0tb(b(),"attr__".concat(a.attr),a.prefix+a.text))):"",e.map(b=>tb(a(),"attr__".concat(b.attr),b.prefix+b.text)))}}speakerCount(){if(this.config.speaker_group.show_group_count){const a=this.player.groupCount;return 1{this.thumbnail=a}),this.picture=b),!!(c&&this.thumbnail)}computeIcon(){return this.config.icon?this.config.icon:this.player.icon||oc.DEFAULT}computeOverflow(){const a=this.shadowRoot.querySelector(".marquee");if(a){const b=a.clientWidth>a.parentNode.clientWidth;this.overflow=!!(b&&this.player.active)&&7.5+a.clientWidth/50}}computeRect(a){const b=a.contentRect||a.getBoundingClientRect(),c=b.left,d=b.width;this.break=d+2*c<390}computeRTL(a){const b=a.language||"en";return!!a.translationMetadata.translations[b]&&(a.translationMetadata.translations[b].isRTL||!1)}toggleGroupList(){this.edit=!this.edit}handleMoreInfo(a){a.stopPropagation(),this.config.more_info&&this.fire("hass-more-info",{entityId:this.config.entity})}fire(a,b,c){const d=c||{},f=null===b||void 0===b?{}:b,g=new Event(a,{bubbles:void 0===d.bubbles||d.bubbles,cancelable:!!d.cancelable,composed:void 0===d.composed||d.composed});return g.detail=f,this.dispatchEvent(g),g}updateIdleStatus(){this._idleTracker&&clearTimeout(this._idleTracker);const a=(Date.now()-new Date(this.player.updatedAt).getTime())/1e3;this._idleTracker=setTimeout(()=>{this.idle=this.player.checkIdleAfter(this.config.idle_view.after),this.player.idle=this.idle,this._idleTracker=null},1e3*(60*this.config.idle_view.after-a))}getCardSize(){return this.config.collapse?1:2}}customElements.define("mini-media-player",Ic)})})(); +(function(){"use strict";function a(){var b=Ha(["",""]);return a=function(){return b},b}function b(){var a=Ha(["",""]);return b=function(){return a},a}function c(){var a=Ha(["\n
\n
\n ","\n
\n
"]);return c=function(){return a},a}function d(){var a=Ha(["\n
\n ","\n ","\n
"]);return d=function(){return a},a}function e(){var a=Ha(["\n
\n "," ","\n
"]);return e=function(){return a},a}function f(){var a=Ha(["\n
\n \n
"]);return f=function(){return a},a}function g(){var a=Ha(["\n
\n
"]);return g=function(){return a},a}function h(){var a=Ha(["\n
\n "]);return h=function(){return a},a}function i(){var a=Ha(["
"]);return i=function(){return a},a}function j(){var a=Ha(["\n
\n "]);return j=function(){return a},a}function k(){var a=Ha(["\n
\n ",""]);return k=function(){return a},a}function l(){var a=Ha(["\n \n \n "]);return l=function(){return a},a}function m(){var a=Ha(["\n \n \n "]);return m=function(){return a},a}function n(){var a=Ha(["\n \n \n "]);return n=function(){return a},a}function o(){var a=Ha(["\n \n
\n ","\n ","\n ","\n
\n
\n
\n ","\n
\n ","\n ","\n
\n \n \n
\n
\n ","\n \n \n ","\n \n \n
\n
\n
\n ","\n
\n \n "]);return o=function(){return a},a}function p(){var a=Ha(["\n :host {\n display: flex;\n line-height: var(--mmp-unit);\n max-height: var(--mmp-unit);\n }\n :host([flow]) mmp-media-controls {\n max-width: unset;\n }\n mmp-media-controls {\n max-width: calc(var(--mmp-unit) * 5);\n line-height: initial;\n justify-content: flex-end;\n }\n .group-button {\n --mdc-icon-size: calc(var(--mmp-unit) * 0.5);\n }\n ha-icon-button {\n min-width: var(--mmp-unit);\n }\n "]);return p=function(){return a},a}function q(){var a=Ha(["\n \n ","\n \n "]);return q=function(){return a},a}function r(){var a=Ha(["\n \n "]);return r=function(){return a},a}function s(){var a=Ha(["\n \n "]);return s=function(){return a},a}function t(){var a=Ha(["\n \n "]);return t=function(){return a},a}function u(){var a=Ha(["\n \n "]);return u=function(){return a},a}function v(){var a=Ha(["\n \n "]);return v=function(){return a},a}function w(){var a=Ha(["\n \n \n "]);return w=function(){return a},a}function x(){var a=Ha(["\n ","\n ","\n ","\n ","\n ","\n ","\n "]);return x=function(){return a},a}function y(){var a=Ha(["\n \n ","\n \n "]);return y=function(){return a},a}function z(){var a=Ha(["\n :host {\n display: flex;\n width: 100%;\n justify-content: space-between;\n }\n .flex {\n display: flex;\n flex: 1;\n justify-content: space-between;\n }\n ha-slider {\n max-width: none;\n min-width: 100px;\n width: 100%;\n --paper-slider-active-color: var(--mmp-accent-color);\n --paper-slider-knob-color: var(--mmp-accent-color);\n }\n ha-icon-button {\n min-width: var(--mmp-unit);\n }\n .mmp-media-controls__volume {\n flex: 100;\n max-height: var(--mmp-unit);\n align-items: center;\n }\n .mmp-media-controls__volume.--buttons {\n justify-content: left;\n }\n .mmp-media-controls__media {\n margin-right: 0;\n margin-left: auto;\n justify-content: inherit;\n }\n .mmp-media-controls__media[flow] {\n max-width: none;\n justify-content: space-between;\n }\n .mmp-media-controls__shuffle {\n flex: 3;\n flex-shrink: 200;\n justify-content: center;\n }\n .mmp-media-controls__shuffle ha-icon-button {\n height: 36px;\n width: 36px;\n min-width: 36px;\n margin: 2px;\n }\n "]);return z=function(){return a},a}function A(){var a=Ha(["\n \n \n "]);return A=function(){return a},a}function B(){var a=Ha([""]);return B=function(){return a},a}function C(){var a=Ha(["\n \n \n "]);return C=function(){return a},a}function E(){var a=Ha([""]);return E=function(){return a},a}function F(){var a=Ha(["\n ","\n ","\n "]);return F=function(){return a},a}function G(){var a=Ha(["\n \n \n "]);return G=function(){return a},a}function H(){var a=Ha(["\n \n \n "]);return H=function(){return a},a}function I(){var a=Ha(["\n \n \n "]);return I=function(){return a},a}function J(){var a=Ha(["\n \n \n "]);return J=function(){return a},a}function K(){var a=Ha(["\n \n \n "]);return K=function(){return a},a}function L(){var a=Ha(["\n ","%\n "]);return L=function(){return a},a}function M(){var a=Ha(["\n ","\n \n \n \n \n "]);return M=function(){return a},a}function N(){var a=Ha(["\n ","\n \n \n "]);return N=function(){return a},a}function O(){var a=Ha(["\n
\n ","\n ","\n
"]);return O=function(){return a},a}function P(){var a=Ha(["\n \n "]);return P=function(){return a},a}function Q(){var a=Ha(["\n \n "]);return Q=function(){return a},a}function R(){var a=Ha(["\n
\n ","\n ","\n ","\n
\n "]);return R=function(){return a},a}function S(){var a=Ha([""]);return S=function(){return a},a}function T(){var a=Ha([""]);return T=function(){return a},a}function U(){var a=Ha(["\n
\n \n \n
\n "]);return U=function(){return a},a}function V(){var a=Ha([""]);return V=function(){return a},a}function W(){var a=Ha(["\n ","\n ","\n ","\n "]);return W=function(){return a},a}function X(){var a=Ha(["\n :host {\n max-width: 120px;\n min-width: var(--mmp-unit);\n }\n :host([full]) {\n max-width: none;\n }\n "]);return X=function(){return a},a}function Y(){var a=Ha(["\n \n "]);return Y=function(){return a},a}function Z(){var a=Ha(["\n :host {\n max-width: 120px;\n min-width: var(--mmp-unit);\n }\n :host([full]) {\n max-width: none;\n }\n "]);return Z=function(){return a},a}function $(){var a=Ha(["\n \n "]);return $=function(){return a},a}function _(){var a=Ha(["\n .mmp-progress {\n cursor: pointer;\n left: 0; right: 0; bottom: 0;\n position: absolute;\n pointer-events: auto;\n min-height: calc(var(--mmp-progress-height) + 10px);\n }\n .mmp-progress__duration {\n left: calc(var(--ha-card-border-radius, 4px) / 2);\n right: calc(var(--ha-card-border-radius, 4px) / 2);\n bottom: calc(var(--mmp-progress-height) + 6px);\n position: absolute;\n display: flex;\n justify-content: space-between;\n font-size: .8em;\n padding: 0 6px;\n z-index: 2\n }\n paper-progress {\n height: var(--mmp-progress-height);\n --paper-progress-height: var(--mmp-progress-height);\n bottom: 0;\n position: absolute;\n width: 100%;\n transition: height 0;\n z-index: 1;\n --paper-progress-active-color: var(--mmp-accent-color);\n --paper-progress-container-color: rgba(100,100,100,.15);\n --paper-progress-transition-duration: 1s;\n --paper-progress-transition-timing-function: linear;\n --paper-progress-transition-delay: 0s;\n }\n paper-progress.seeking {\n transition: height .15s ease-out;\n height: calc(var(--mmp-progress-height) + 4px);\n --paper-progress-height: calc(var(--mmp-progress-height) + 4px);\n }\n .mmp-progress[paused] paper-progress {\n --paper-progress-active-color: var(--disabled-text-color, rgba(150,150,150,.5));\n }\n "]);return _=function(){return a},a}function aa(){var a=Ha(["\n
\n ","\n ","\n
\n "]);return aa=function(){return a},a}function ba(){var a=Ha(["\n
\n ","\n \n \n
\n "]);return ba=function(){return a},a}function ca(){var a=Ha(["\n :host {\n align-items: center;\n margin-left: 8px;\n display: flex;\n }\n .mmp-tts__input {\n cursor: text;\n flex: 1;\n margin-right: 8px;\n --paper-input-container-input: {\n font-size: 1em;\n };\n }\n ha-card[rtl] .mmp-tts__input {\n margin-right: auto;\n margin-left: 8px;\n }\n .mmp-tts__button {\n margin: 0;\n height: 30px;\n padding: 0 .4em;\n }\n paper-input {\n opacity: .75;\n --paper-input-container-color: var(--mmp-text-color);\n --paper-input-container-input-color: var(--mmp-text-color);\n --paper-input-container-focus-color: var(--mmp-text-color);\n --paper-input-container: {\n padding: 0;\n };\n }\n paper-input[focused] {\n opacity: 1;\n }\n\n ha-card[artwork*='cover'][has-artwork] paper-input {\n --paper-input-container-color: #FFFFFF;\n --paper-input-container-input-color: #FFFFFF;\n --paper-input-container-focus-color: #FFFFFF;\n }\n "]);return ca=function(){return a},a}function da(){var a=Ha(["\n \n \n \n ","\n \n "]);return da=function(){return a},a}function ea(){var a=Ha(["\n .mmp-shortcuts__buttons {\n box-sizing: border-box;\n display: flex;\n flex-wrap: wrap;\n margin-top: 8px;\n }\n .mmp-shortcuts__button {\n min-width: calc(50% - 8px);\n flex: 1;\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center center;\n }\n .mmp-shortcuts__button > div {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n padding: .2em 0;\n }\n .mmp-shortcuts__button > div[align='left'] {\n justify-content: flex-start;\n }\n .mmp-shortcuts__button > div[align='right'] {\n justify-content: flex-end;\n }\n .mmp-shortcuts__button[columns='1'] {\n min-width: calc(100% - 8px);\n }\n .mmp-shortcuts__button[columns='3'] {\n min-width: calc(33.33% - 8px);\n }\n .mmp-shortcuts__button[columns='4'] {\n min-width: calc(25% - 8px);\n }\n .mmp-shortcuts__button[columns='5'] {\n min-width: calc(20% - 8px);\n }\n .mmp-shortcuts__button[columns='6'] {\n min-width: calc(16.66% - 8px);\n }\n .mmp-shortcuts__button > div > span {\n line-height: calc(var(--mmp-unit) * .6);\n text-transform: initial;\n }\n .mmp-shortcuts__button > div > ha-icon {\n width: calc(var(--mmp-unit) * .6);\n height: calc(var(--mmp-unit) * .6);\n }\n .mmp-shortcuts__button > div > *:nth-child(2) {\n margin-left: 4px;\n }\n .mmp-shortcuts__button > div > img {\n height: 24px;\n }\n "]);return ea=function(){return a},a}function fa(){var a=Ha(["\n ","\n ","\n "]);return fa=function(){return a},a}function ga(){var a=Ha(["",""]);return ga=function(){return a},a}function ha(){var a=Ha([""]);return ha=function(){return a},a}function ia(){var a=Ha([""]);return ia=function(){return a},a}function ja(){var a=Ha(["\n \n
\n ","\n ","\n ","\n
\n "]);return ja=function(){return a},a}function ka(){var a=Ha(["\n
\n ","\n
\n "]);return ka=function(){return a},a}function la(){var a=Ha(["\n \n \n "]);return la=function(){return a},a}function ma(){var a=Ha([""]);return ma=function(){return a},a}function na(){var a=Ha(["\n :host {\n display: block;\n }\n :host([faded]) {\n opacity: .75;\n }\n :host[small] .mmp-dropdown__label {\n max-width: 60px;\n display: block;\n position: relative;\n width: auto;\n text-transform: initial;\n }\n :host[full] .mmp-dropdown__label {\n max-width: none;\n }\n .mmp-dropdown {\n padding: 0;\n display: block;\n }\n .mmp-dropdown__button {\n display: flex;\n font-size: 1em;\n justify-content: space-between;\n align-items: center;\n height: calc(var(--mmp-unit) - 4px);\n margin: 2px 0;\n }\n .mmp-dropdown__button.icon {\n height: var(--mmp-unit);\n margin: 0;\n }\n .mmp-dropdown__button > div {\n display: flex;\n flex: 1;\n justify-content: space-between;\n align-items: center;\n height: calc(var(--mmp-unit) - 4px);\n max-width: 100%;\n }\n .mmp-dropdown__label {\n text-align: left;\n text-transform: none;\n }\n .mmp-dropdown__icon {\n height: auto;\n width: calc(var(--mmp-unit) * .6);\n min-width: calc(var(--mmp-unit) * .6);\n }\n paper-item > *:nth-child(2) {\n margin-left: 4px;\n }\n paper-menu-button[focused] mmp-button ha-icon {\n color: var(--mmp-accent-color);\n transform: rotate(180deg);\n }\n paper-menu-button[focused] ha-icon-button {\n color: var(--mmp-accent-color);\n transform: rotate(180deg);\n }\n paper-menu-button[focused] ha-icon-button[focused] {\n color: var(--mmp-text-color);\n transform: rotate(0deg);\n }\n "]);return na=function(){return a},a}function oa(){var a=Ha(["",""]);return oa=function(){return a},a}function pa(){var a=Ha([""]);return pa=function(){return a},a}function qa(){var a=Ha(["\n \n ","\n ","\n "]);return qa=function(){return a},a}function ra(){var a=Ha(["\n \n
\n \n ","\n \n \n
\n
\n "]);return ra=function(){return a},a}function sa(){var a=Ha(["\n \n \n "]);return sa=function(){return a},a}function ta(){var a=Ha(["\n \n ","\n \n ","\n \n \n "]);return ta=function(){return a},a}function ua(){var a=Ha(["\n .mmp-group-list {\n display: flex;\n flex-direction: column;\n margin-left: 8px;\n margin-bottom: 8px;\n }\n .mmp-group-list__title {\n font-weight: 500;\n letter-spacing: .1em;\n margin: 8px 0 4px;\n text-transform: uppercase;\n }\n .mmp-group-list__buttons {\n display: flex;\n }\n mmp-button {\n margin: 8px 8px 0 0;\n min-width: 0;\n text-transform: uppercase;\n text-align: center;\n width: 50%;\n --mdc-theme-primary: transparent;\n }\n "]);return ua=function(){return a},a}function va(){var a=Ha(["\n "]);return va=function(){return a},a}function wa(){var a=Ha([""]);return wa=function(){return a},a}function xa(){var a=Ha(["\n \n ","\n \n "]);return xa=function(){return a},a}function ya(){var a=Ha(["\n
\n ","\n ","\n
\n \n ","\n \n ","\n \n ","\n \n
\n
\n "]);return ya=function(){return a},a}function za(){var a=Ha([""]);return za=function(){return a},a}function Aa(){var a=Ha(["\n :host {\n position: relative;\n box-sizing: border-box;\n margin: 4px;\n min-width: 0;\n overflow: hidden;\n transition: background .5s;\n border-radius: 4px;\n font-weight: 500;\n }\n :host([raised]) {\n background: var(--mmp-button-color);\n min-height: calc(var(--mmp-unit) * .8);\n box-shadow:\n 0px 3px 1px -2px rgba(0, 0, 0, 0.2),\n 0px 2px 2px 0px rgba(0, 0, 0, 0.14),\n 0px 1px 5px 0px rgba(0,0,0,.12);\n }\n :host([color]) {\n background: var(--mmp-active-color);\n transition: background .25s;\n opacity: 1;\n }\n :host([faded]) {\n opacity: .75;\n }\n :host([disabled]) {\n opacity: .25;\n pointer-events: none;\n }\n .container {\n height: 100%;\n width: 100%;\n }\n .slot-container {\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 0 8px;\n width: auto;\n }\n paper-ripple {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n }\n "]);return Aa=function(){return a},a}function Ba(){var a=Ha(["\n
\n
\n \n
\n \n
\n "]);return Ba=function(){return a},a}function Ca(){var a=Ha(["\n paper-checkbox {\n padding: 8px 0;\n }\n paper-checkbox > span {\n font-weight: 600;\n text-transform: lowercase;\n }\n\n ha-card[artwork*='cover'][has-artwork] paper-checkbox[disabled] {\n --paper-checkbox-checkmark-color: rgba(0,0,0,.5);\n }\n ha-card[artwork*='cover'][has-artwork] paper-checkbox {\n --paper-checkbox-unchecked-color: #FFFFFF;\n --paper-checkbox-label-color: #FFFFFF;\n }\n "]);return Ca=function(){return a},a}function Da(){var a=Ha(["(",")"]);return Da=function(){return a},a}function Ea(){var a=Ha(["\n \n ","\n ","\n \n "]);return Ea=function(){return a},a}function Fa(){var a=Ha(["\n .ellipsis {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .label {\n margin: 0 8px;\n }\n ha-icon {\n width: calc(var(--mmp-unit) * .6);\n height: calc(var(--mmp-unit) * .6);\n }\n ha-icon-button {\n width: var(--mmp-unit);\n height: var(--mmp-unit);\n color: var(--mmp-text-color, var(--primary-text-color));\n transition: color .25s;\n }\n ha-icon-button[color] {\n color: var(--mmp-accent-color, var(--accent-color)) !important;\n opacity: 1 !important;\n }\n ha-icon-button[inactive] {\n opacity: .5;\n }\n"]);return Fa=function(){return a},a}function Ga(){var a=Ha(["\n :host {\n overflow: visible !important;\n display: block;\n --mmp-scale: var(--mini-media-player-scale, 1);\n --mmp-unit: calc(var(--mmp-scale) * 40px);\n --mmp-name-font-weight: var(--mini-media-player-name-font-weight, 400);\n --mmp-accent-color: var(--mini-media-player-accent-color, var(--accent-color, #f39c12));\n --mmp-base-color: var(--mini-media-player-base-color, var(--primary-text-color, #000));\n --mmp-overlay-color: var(--mini-media-player-overlay-color, rgba(0,0,0,0.5));\n --mmp-overlay-color-stop: var(--mini-media-player-overlay-color-stop, 25%);\n --mmp-overlay-base-color: var(--mini-media-player-overlay-base-color, #fff);\n --mmp-overlay-accent-color: var(--mini-media-player-overlay-accent-color, --mmp-accent-color);\n --mmp-text-color: var(--mini-media-player-base-color, var(--primary-text-color, #000));\n --mmp-media-cover-info-color: var(--mini-media-player-media-cover-info-color, --mmp-text-color);\n --mmp-text-color-inverted: var(--disabled-text-color);\n --mmp-active-color: var(--mmp-accent-color);\n --mmp-button-color: var(--mini-media-player-button-color, rgba(255,255,255,0.25));\n --mmp-icon-color:\n var(--mini-media-player-icon-color,\n var(--mini-media-player-base-color,\n var(--paper-item-icon-color, #44739e)));\n --mmp-icon-active-color: var(--paper-item-icon-active-color, --mmp-active-color);\n --mmp-info-opacity: 0.75;\n --mmp-bg-opacity: var(--mini-media-player-background-opacity, 1);\n --mmp-artwork-opacity: var(--mini-media-player-artwork-opacity, 1);\n --mmp-progress-height: var(--mini-media-player-progress-height, 6px);\n --mdc-theme-primary: var(--mmp-text-color);\n --mdc-theme-on-primary: var(--mmp-text-color);\n --paper-checkbox-unchecked-color: var(--mmp-text-color);\n --paper-checkbox-label-color: var(--mmp-text-color);\n color: var(--mmp-text-color);\n }\n ha-card.--bg {\n --mmp-info-opacity: .75;\n }\n ha-card.--has-artwork[artwork='material'],\n ha-card.--has-artwork[artwork*='cover'] {\n --mmp-accent-color: var(--mini-media-player-overlay-accent-color, var(--mini-media-player-accent-color, var(--accent-color, #f39c12)));\n --mmp-text-color: var(--mmp-overlay-base-color);\n --mmp-text-color-inverted: #000;\n --mmp-active-color: rgba(255,255,255,.5);\n --mmp-icon-color: var(--mmp-text-color);\n --mmp-icon-active-color: var(--mmp-text-color);\n --mmp-info-opacity: 0.75;\n --paper-slider-container-color: var(--mini-media-player-overlay-color, rgba(255,255,255,.75)) !important;\n --mdc-theme-primary: var(--mmp-text-color);\n --mdc-theme-on-primary: var(--mmp-text-color);\n --paper-checkbox-unchecked-color: var(--mmp-text-color);\n --paper-checkbox-label-color: var(--mmp-text-color);\n color: var(--mmp-text-color);\n }\n ha-card {\n cursor: default;\n display: flex;\n background: transparent;\n overflow: visible;\n padding: 0;\n position: relative;\n color: inherit;\n font-size: calc(var(--mmp-unit) * 0.35);\n --mdc-icon-button-size: calc(var(--mmp-unit));\n --mdc-icon-size: calc(var(--mmp-unit) * 0.6);\n }\n ha-card.--group {\n box-shadow: none;\n --mmp-progress-height: var(--mini-media-player-progress-height, 4px);\n }\n ha-card.--more-info {\n cursor: pointer;\n }\n .mmp__bg, .mmp-player, .mmp__container {\n border-radius: var(--ha-card-border-radius, 0);\n }\n .mmp__container {\n overflow: hidden;\n height: 100%;\n width: 100%;\n position: absolute;\n pointer-events: none;\n -webkit-transform: translateZ(0);\n transform: translateZ(0);\n }\n ha-card:before {\n content: '';\n padding-top: 0px;\n transition: padding-top .5s cubic-bezier(.21,.61,.35,1);\n will-change: padding-top;\n }\n ha-card.--initial .entity__artwork,\n ha-card.--initial .entity__icon {\n animation-duration: .001s;\n }\n ha-card.--initial:before,\n ha-card.--initial .mmp-player {\n transition: none;\n }\n header {\n display: none;\n }\n ha-card[artwork='full-cover'].--has-artwork:before {\n padding-top: 56%;\n }\n ha-card[artwork='full-cover'].--has-artwork[content='music']:before,\n ha-card[artwork='full-cover-fit'].--has-artwork:before {\n padding-top: 100%;\n }\n .mmp__bg {\n background: var(--ha-card-background, var(--card-background-color, var(--paper-card-background-color, white)));\n position: absolute;\n top: 0; right: 0; bottom: 0; left: 0;\n overflow: hidden;\n -webkit-transform: translateZ(0);\n transform: translateZ(0);\n opacity: var(--mmp-bg-opacity);\n }\n ha-card[artwork='material'].--has-artwork .mmp__bg,\n ha-card[artwork*='cover'].--has-artwork .mmp__bg {\n opacity: var(--mmp-artwork-opacity);\n background: transparent;\n }\n ha-card[artwork='material'].--has-artwork .cover {\n height: 100%;\n right: 0;\n left: unset;\n animation: fade-in 4s cubic-bezier(.21,.61,.35,1) !important;\n }\n ha-card[artwork='material'].--has-artwork .cover.--prev {\n animation: fade-in 1s linear reverse forwards !important;\n }\n ha-card[artwork='material'].--has-artwork .cover-gradient {\n position: absolute;\n height: 100%;\n right: 0;\n left: 0;\n opacity: 1;\n }\n ha-card.--group .mmp__bg {\n background: transparent;\n }\n ha-card.--inactive .cover {\n opacity: 0;\n }\n ha-card.--inactive .cover.--bg {\n opacity: 1;\n }\n .cover-gradient {\n transition: opacity .45s linear;\n opacity: 0;\n }\n .cover,\n .cover:before {\n display: block;\n opacity: 0;\n position: absolute;\n top: 0; right: 0; bottom: 0; left: 0;\n transition: opacity .75s linear, width .05s cubic-bezier(.21,.61,.35,1);\n will-change: opacity;\n }\n .cover:before {\n content: '';\n background: var(--mmp-overlay-color);\n }\n .cover {\n animation: fade-in .5s cubic-bezier(.21,.61,.35,1);\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center center;\n border-radius: var(--ha-card-border-radius, 0);\n overflow: hidden;\n }\n .cover.--prev {\n animation: fade-in .5s linear reverse forwards;\n }\n .cover.--bg {\n opacity: 1;\n }\n ha-card[artwork*='full-cover'].--has-artwork .mmp-player {\n background: linear-gradient(to top, var(--mmp-overlay-color) var(--mmp-overlay-color-stop), transparent 100%);\n border-bottom-left-radius: var(--ha-card-border-radius, 0);\n border-bottom-right-radius: var(--ha-card-border-radius, 0);\n }\n ha-card.--has-artwork .cover,\n ha-card.--has-artwork[artwork='cover'] .cover:before {\n opacity: .999;\n }\n ha-card[artwork='default'] .cover {\n display: none;\n }\n ha-card.--bg .cover {\n display: block;\n }\n ha-card[artwork='material'].--has-artwork .cover {\n background-size: cover;\n }\n ha-card[artwork='full-cover-fit'].--has-artwork .cover {\n background-color: black;\n background-size: contain;\n }\n .mmp-player {\n align-self: flex-end;\n box-sizing: border-box;\n position: relative;\n padding: 16px;\n transition: padding .25s ease-out;\n width: 100%;\n will-change: padding;\n }\n ha-card.--group .mmp-player {\n padding: 2px 0;\n }\n .flex {\n display: flex;\n display: -ms-flexbox;\n display: -webkit-flex;\n flex-direction: row;\n }\n .mmp-player__core {\n position: relative;\n }\n .entity__info {\n justify-content: center;\n display: flex;\n flex-direction: column;\n margin-left: 8px;\n position: relative;\n overflow: hidden;\n user-select: none;\n }\n ha-card.--rtl .entity__info {\n margin-left: auto;\n margin-right: calc(var(--mmp-unit) / 5);\n }\n ha-card[content='movie'] .attr__media_season,\n ha-card[content='movie'] .attr__media_episode {\n display: none;\n }\n .entity__icon {\n color: var(--mmp-icon-color);\n }\n .entity__icon[color] {\n color: var(--mmp-icon-active-color);\n }\n .entity__artwork, .entity__icon {\n animation: fade-in .25s ease-out;\n background-position: center center;\n background-repeat: no-repeat;\n background-size: cover;\n border-radius: 100%;\n height: var(--mmp-unit);\n width: var(--mmp-unit);\n min-width: var(--mmp-unit);\n line-height: var(--mmp-unit);\n margin-right: calc(var(--mmp-unit) / 5);\n position: relative;\n text-align: center;\n will-change: border-color;\n transition: border-color .25s ease-out;\n }\n ha-card.--rtl .entity__artwork,\n ha-card.--rtl .entity__icon {\n margin-right: auto;\n }\n .entity__artwork[border] {\n border: 2px solid var(--primary-text-color);\n box-sizing: border-box;\n -moz-box-sizing: border-box;\n -webkit-box-sizing: border-box;\n }\n .entity__artwork[border][state='playing'] {\n border-color: var(--mmp-accent-color);\n }\n .entity__info__name,\n .entity__info__media[short] {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .entity__info__name {\n line-height: calc(var(--mmp-unit) / 2);\n color: var(--mmp-text-color);\n font-weight: var(--mmp-name-font-weight);\n }\n .entity__info__media {\n color: var(--secondary-text-color);\n max-height: 6em;\n word-break: break-word;\n opacity: var(--mmp-info-opacity);\n transition: color .5s;\n }\n .entity__info__media[short] {\n max-height: calc(var(--mmp-unit) / 2);\n overflow: hidden;\n }\n .attr__app_name {\n display: none;\n }\n .attr__app_name:first-child,\n .attr__app_name:first-of-type {\n display: inline;\n }\n .mmp-player__core[inactive] .entity__info__media {\n color: var(--mmp-text-color);\n max-width: 200px;\n opacity: .5;\n }\n .entity__info__media[short-scroll] {\n max-height: calc(var(--mmp-unit) / 2);\n white-space: nowrap;\n }\n .entity__info__media[scroll] > span {\n visibility: hidden;\n }\n .entity__info__media[scroll] > div {\n animation: move linear infinite;\n }\n .entity__info__media[scroll] .marquee {\n animation: slide linear infinite;\n }\n .entity__info__media[scroll] .marquee,\n .entity__info__media[scroll] > div {\n animation-duration: inherit;\n visibility: visible;\n }\n .entity__info__media[scroll] {\n animation-duration: 10s;\n mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);\n -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);\n }\n .marquee {\n visibility: hidden;\n position: absolute;\n white-space: nowrap;\n }\n ha-card[artwork*='cover'].--has-artwork .entity__info__media,\n ha-card.--bg .entity__info__media {\n color: var(--mmp-media-cover-info-color);\n }\n .entity__info__media span:before {\n content: ' - ';\n }\n .entity__info__media span:first-of-type:before {\n content: '';\n }\n .entity__info__media span:empty {\n display: none;\n }\n .mmp-player__adds {\n margin-left: calc(var(--mmp-unit) * 1.2);\n position: relative;\n }\n ha-card.--rtl .mmp-player__adds {\n margin-left: auto;\n margin-right: calc(var(--mmp-unit) * 1.2);\n }\n .mmp-player__adds > *:nth-child(2) {\n margin-top: 0px;\n }\n mmp-powerstrip {\n flex: 1;\n justify-content: flex-end;\n margin-right: 0;\n margin-left: auto;\n width: auto;\n max-width: 100%;\n }\n mmp-media-controls {\n flex-wrap: wrap;\n }\n ha-card.--flow mmp-powerstrip {\n justify-content: space-between;\n margin-left: auto;\n }\n ha-card.--flow.--rtl mmp-powerstrip {\n margin-right: auto;\n }\n ha-card.--flow .entity__info {\n display: none;\n }\n ha-card.--responsive .mmp-player__adds {\n margin-left: 0;\n }\n ha-card.--responsive.--rtl .mmp-player__adds {\n margin-right: 0;\n }\n ha-card.--responsive .mmp-player__adds > mmp-media-controls {\n padding: 0;\n }\n ha-card.--progress .mmp-player {\n padding-bottom: calc(16px + calc(var(--mini-media-player-progress-height, 6px) - 6px));\n }\n ha-card.--progress.--group .mmp-player {\n padding-bottom: calc(10px + calc(var(--mini-media-player-progress-height, 6px) - 6px));\n }\n ha-card.--runtime .mmp-player {\n padding-bottom: calc(16px + 16px + var(--mini-media-player-progress-height, 0px));\n }\n ha-card.--runtime.--group .mmp-player {\n padding-bottom: calc(16px + 12px + var(--mini-media-player-progress-height, 0px));\n }\n ha-card.--inactive .mmp-player {\n padding: 16px;\n }\n ha-card.--inactive.--group .mmp-player {\n padding: 2px 0;\n }\n .mmp-player div:empty {\n display: none;\n }\n @keyframes slide {\n 100% { transform: translateX(-100%); }\n }\n @keyframes move {\n from { transform: translateX(100%); }\n to { transform: translateX(0); }\n }\n @keyframes fade-in {\n from { opacity: 0; }\n to { opacity: 1; }\n }\n"]);return Ga=function(){return a},a}function Ha(a,b){return b||(b=a.slice(0)),Object.freeze(Object.defineProperties(a,{raw:{value:Object.freeze(b)}}))}function Ia(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function Ja(a){for(var b,c=1;ce(La(h))+e(La(s))?e(t*t-h*h-s*s):0;return h/=1,s/=1*(1+.045*l),f/=1*(1+.015*l),e(h*h+s*s+f*f)}function a(a,b){return j(i.apply(void 0,a),i.apply(void 0,b))}Object.defineProperty(d,"__esModule",{value:!0}),d.DELTAE94_DIFF_STATUS={NA:0,PERFECT:1,CLOSE:2,GOOD:10,SIMILAR:50},d.SIGBITS=5,d.RSHIFT=8-d.SIGBITS,d.defer=function(){var a,b,c=new Promise(function(c,d){a=c,b=d});return{resolve:a,reject:b,promise:c}},d.hexToRgb=f,d.rgbToHex=function(a,b,c){return"#"+(16777216+(a<<16)+(b<<8)+c).toString(16).slice(1,7)},d.rgbToHsl=function(b,d,f){b/=255,d/=255,f/=255;var g,h,j=Ka(b,d,f),k=Ia(b,d,f),l=(j+k)/2;if(j===k)g=h=0;else{var a=j-k;switch(h=.5c&&(c+=1),1c?b:c<2/3?a+6*((b-a)*(2/3-c)):a}var g,h,j;if(0===d)g=h=j=e;else{var k=.5>e?e*(1+d):e+d-e*d,a=2*e-k;g=f(a,k,b+1/3),h=f(a,k,b),j=f(a,k,b-1/3)}return[255*g,255*h,255*j]},d.rgbToXyz=g,d.xyzToCIELab=h,d.rgbToCIELab=i,d.deltaE94=j,d.rgbDiff=a,d.hexDiff=function(b,c){return a(f(b),f(c))},d.getColorDiffStatus=function(a){return athis.getYiq()?"#fff":"#000"),this._titleTextColor},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"bodyTextColor",{get:function(){return this._bodyTextColor||(this._bodyTextColor=150>this.getYiq()?"#fff":"#000"),this._bodyTextColor},enumerable:!0,configurable:!0}),a.prototype.getTitleTextColor=function(){return this.titleTextColor},a.prototype.getBodyTextColor=function(){return this.bodyTextColor},a}();b.Swatch=e},function(a,b,d){(function(e){var f=d(0),g=d(74),h=b&&!b.nodeType&&b,i=h&&"object"==typeof e&&e&&!e.nodeType&&e,j=i&&i.exports===h?f.Buffer:void 0,a=(j?j.isBuffer:void 0)||g;e.exports=a}).call(this,d(10)(a))},function(a){a.exports=function(a,b){var c=typeof a;return!!(b=null==b?9007199254740991:b)&&("number"==c||"symbol"!=c&&/^(?:0|[1-9]\d*)$/.test(a))&&-1=a}},function(a){a.exports=function(a){return function(b){return a(b)}}},function(a,b,c){(function(d){var e=c(40),f=b&&!b.nodeType&&b,g=f&&"object"==typeof d&&d&&!d.nodeType&&d,h=g&&g.exports===f&&e.process,i=function(){try{var a=g&&g.require&&g.require("util").types;return a||h&&h.binding&&h.binding("util")}catch(a){}}();d.exports=i}).call(this,c(10)(a))},function(a){var b=Object.prototype;a.exports=function(a){var c=a&&a.constructor;return a===("function"==typeof c&&c.prototype||b)}},function(b,d,e){function f(a){var b=this.__data__=new g(a);this.size=b.size}var g=e(12),h=e(87),i=e(88),j=e(89),k=e(90),a=e(91);f.prototype.clear=h,f.prototype.delete=i,f.prototype.get=j,f.prototype.has=k,f.prototype.set=a,b.exports=f},function(a,b,c){var d=c(4)(c(0),"Map");a.exports=d},function(b,d,e){function f(a){var b=-1,c=null==a?0:a.length;for(this.clear();++be))return!1;var h=a.get(b);if(h&&a.get(i))return h==i;var p=-1,q=!0,r=2&k?new j:void 0;for(a.set(b,i),a.set(i,b);++pa-h)return;g=!0}else c=!0,g=!1,setTimeout(f,d);h=a}var c=!1,g=!1,h=0;return a}(this.refresh.bind(this),20)}return a.prototype.addObserver=function(a){~this.observers_.indexOf(a)||this.observers_.push(a),this.connected_||this.connect_()},a.prototype.removeObserver=function(a){var b=this.observers_,c=b.indexOf(a);~c&&b.splice(c,1),!b.length&&this.connected_&&this.disconnect_()},a.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},a.prototype.updateObservers_=function(){var a=this.observers_.filter(function(a){return a.gatherActive(),a.hasActive()});return a.forEach(function(a){return a.broadcastActive()}),0c)&&(c==b.length-1?b.pop():f.call(b,c,1),--this.size,!0)}},function(a,b,c){var d=c(13);a.exports=function(a){var b=this.__data__,c=d(b,a);return 0>c?void 0:b[c][1]}},function(a,b,c){var d=c(13);a.exports=function(a){return-1e?(++this.size,c.push([a,b])):c[e][1]=b,this}},function(a,b,c){var d=c(12);a.exports=function(){this.__data__=new d,this.size=0}},function(a){a.exports=function(a){var b=this.__data__,c=b.delete(a);return this.size=b.size,c}},function(a){a.exports=function(a){return this.__data__.get(a)}},function(a){a.exports=function(a){return this.__data__.has(a)}},function(a,b,c){var d=c(12),f=c(28),g=c(29);a.exports=function(a,b){var c=this.__data__;if(c instanceof d){var e=c.__data__;if(!f||199>e.length)return e.push([a,b]),this.size=++c.size,this;c=this.__data__=new g(e)}return c.set(a,b),this.size=c.size,this}},function(a,b,d){var e=d(43),f=d(93),g=d(3),i=d(44),j=Function.prototype,c=Object.prototype,k=j.toString,l=c.hasOwnProperty,h=RegExp("^"+k.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");a.exports=function(a){return g(a)&&!f(a)&&(e(a)?h:/^\[object .+?Constructor\]$/).test(i(a))}},function(a,b,c){var d,e=c(94),f=(d=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||""))?"Symbol(src)_1."+d:"";a.exports=function(a){return!!f&&f in a}},function(a,b,c){var d=c(0)["__core-js_shared__"];a.exports=d},function(a){a.exports=function(a,b){return null==a?void 0:a[b]}},function(a,b,c){var d=c(97),e=c(12),f=c(28);a.exports=function(){this.size=0,this.__data__={hash:new d,map:new(f||e),string:new d}}},function(b,d,e){function f(a){var b=-1,c=null==a?0:a.length;for(this.clear();++bb.colorCount||256>=j.RSHIFT,y>>=j.RSHIFT,z>>=j.RSHIFT,d[j.getColorIndex(x,y,z)]+=1,x>e&&(e=x),xq&&(q=y),yt&&(t=z),zthis._volume){var a=this.dimension,b=a.r1,c=a.r2,d=a.g1,e=a.g2,f=a.b1,g=a.b2;this._volume=(c-b+1)*(e-d+1)*(g-f+1)}return this._volume},b.prototype.count=function(){if(0>this._count){for(var b=this.hist,d=this.dimension,e=d.r1,f=d.r2,g=d.g1,i=d.g2,k=d.b1,a=d.b2,c=0,m=e;m<=f;m++)for(var n=g;n<=i;n++)for(var o=k;o<=a;o++)c+=b[j.getColorIndex(m,n,o)];this._count=c}return this._count},b.prototype.clone=function(){var a=this.hist,c=this.dimension;return new b(c.r1,c.r2,c.g1,c.g2,c.b1,c.b2,a)},b.prototype.avg=function(){if(!this._avg){var b,k,n,q=this.hist,t=this.dimension,e=t.r1,r=t.r2,i=t.g1,o=t.g2,s=t.b1,a=t.b2,c=0,w=1<<8-j.SIGBITS;b=k=n=0;for(var l=e;l<=r;l++)for(var x=i;x<=o;x++)for(var y,z=s;z<=a;z++)y=q[j.getColorIndex(l,x,z)],c+=y,b+=y*(l+.5)*w,k+=y*(x+.5)*w,n+=y*(z+.5)*w;this._avg=c?[~~(b/c),~~(k/c),~~(n/c)]:[~~(w*(e+r+1)/2),~~(w*(i+o+1)/2),~~(w*(s+a+1)/2)]}return this._avg},b.prototype.contains=function(b){var d=b[0],f=b[1],g=b[2],k=this.dimension,m=k.r1,n=k.r2,a=k.g1,c=k.g2,o=k.b1,l=k.b2;return d>>=j.RSHIFT,f>>=j.RSHIFT,g>>=j.RSHIFT,d>=m&&d<=n&&f>=a&&f<=c&&g>=o&&g<=l},b.prototype.split=function(){var f=this.hist,n=this.dimension,e=n.r1,q=n.r2,i=n.g1,o=n.g2,r=n.b1,a=n.b2,c=this.count();if(!c)return[];if(1===c)return[this.clone()];var s,t,u=q-e+1,p=o-i+1,d=Ka(u,p,a-r+1),m=null;s=t=0;var z=null;if(d===u){z="r",m=new Uint32Array(q+1);for(var A=e;A<=q;A++){s=0;for(var B=i;B<=o;B++)for(var C=r;C<=a;C++)s+=f[j.getColorIndex(A,B,C)];t+=s,m[A]=t}}else if(d===p)for(z="g",m=new Uint32Array(o+1),B=i;B<=o;B++){for(s=0,A=e;A<=q;A++)for(C=r;C<=a;C++)s+=f[j.getColorIndex(A,B,C)];t+=s,m[B]=t}else for(z="b",m=new Uint32Array(a+1),C=r;C<=a;C++){for(s=0,A=e;A<=q;A++)for(B=i;B<=o;B++)s+=f[j.getColorIndex(A,B,C)];t+=s,m[C]=t}for(var D,E=-1,F=new Uint32Array(m.length),x=0;xE&&D>t/2&&(E=x),F[x]=t-D;var G=this;return function(b){var d=b+"1",e=b+"2",f=G.dimension[d],g=G.dimension[e],h=G.clone(),j=G.clone(),k=E-f,a=g-E;for(k<=a?(g=Ia(g-1,~~(E+a/2)),g=Ka(0,g)):(g=Ka(f,~~(E-1-k/2)),g=Ia(G.dimension[e],g));!m[g];)g++;for(var c=F[g];!c&&m[g-1];)c=F[--g];return h.dimension[e]=g,j.dimension[d]=g+1,[h,j]}(z)},b}();b.default=d},function(a,b){Object.defineProperty(b,"__esModule",{value:!0});var c=function(){function a(a){this._comparator=a,this.contents=[],this._sorted=!1}return a.prototype._sort=function(){this._sorted||(this.contents.sort(this._comparator),this._sorted=!0)},a.prototype.push=function(a){this.contents.push(a),this._sorted=!1},a.prototype.peek=function(a){return this._sort(),a="number"==typeof a?a:this.contents.length-1,this.contents[a]},a.prototype.pop=function(){return this._sort(),this.contents.pop()},a.prototype.size=function(){return this.contents.length},a.prototype.map=function(a){return this._sort(),this.contents.map(a)},a}();b.default=c},function(a,b,c){Object.defineProperty(b,"__esModule",{value:!0});var d=c(167);b.Default=d.default},function(b,c,d){function f(b,d,g,j,k,i,n,o,a,c){var p=null,q=0;return d.forEach(function(h){var e=h.getHsl(),l=e[1],d=e[2];if(l>=o&&l<=a&&d>=k&&d<=i&&!function(a,b){return a.Vibrant===b||a.DarkVibrant===b||a.LightVibrant===b||a.Muted===b||a.DarkMuted===b||a.LightMuted===b}(b,h)){var f=function(b,c,d,e,f,g,h){function i(a,b){return 1-La(a-b)}return function(){for(var a=[],b=0;bq)&&(p=h,q=f)}}),p}Object.defineProperty(c,"__esModule",{value:!0});var e=d(20),j=d(9),a=d(61),g={targetDarkLuma:.26,maxDarkLuma:.45,minLightLuma:.55,targetLightLuma:.74,minNormalLuma:.3,targetNormalLuma:.5,maxNormalLuma:.7,targetMutesSaturation:.3,maxMutesSaturation:.4,targetVibrantSaturation:1,minVibrantSaturation:.35,weightSaturation:3,weightLuma:6.5,weightPopulation:.5};c.default=function(b,d){d=a({},d,g);var h=function(a){var b=0;return a.forEach(function(a){b=Ka(b,a.getPopulation())}),b}(b),i=function(a,b,c){var d={};return d.Vibrant=f(d,a,b,c.targetNormalLuma,c.minNormalLuma,c.maxNormalLuma,c.targetVibrantSaturation,c.minVibrantSaturation,1,c),d.LightVibrant=f(d,a,b,c.targetLightLuma,c.minLightLuma,1,c.targetVibrantSaturation,c.minVibrantSaturation,1,c),d.DarkVibrant=f(d,a,b,c.targetDarkLuma,0,c.maxDarkLuma,c.targetVibrantSaturation,c.minVibrantSaturation,1,c),d.Muted=f(d,a,b,c.targetNormalLuma,c.minNormalLuma,c.maxNormalLuma,c.targetMutesSaturation,0,c.maxMutesSaturation,c),d.LightMuted=f(d,a,b,c.targetLightLuma,c.minLightLuma,1,c.targetMutesSaturation,0,c.maxMutesSaturation,c),d.DarkMuted=f(d,a,b,c.targetDarkLuma,0,c.maxDarkLuma,c.targetMutesSaturation,0,c.maxMutesSaturation,c),d}(b,h,d);return function(b,i,k){if(null===b.Vibrant&&null===b.DarkVibrant&&null===b.LightVibrant){if(null===b.DarkVibrant&&null!==b.DarkMuted){var n=b.DarkMuted.getHsl(),o=n[0],q=n[1],r=n[2];r=k.targetDarkLuma,b.DarkVibrant=new e.Swatch(j.hslToRgb(o,q,r),0)}if(null===b.LightVibrant&&null!==b.LightMuted){var t=b.LightMuted.getHsl();o=t[0],q=t[1],r=t[2],r=k.targetDarkLuma,b.DarkVibrant=new e.Swatch(j.hslToRgb(o,q,r),0)}}if(null===b.Vibrant&&null!==b.DarkVibrant){var u=b.DarkVibrant.getHsl();o=u[0],q=u[1],r=u[2],r=k.targetNormalLuma,b.Vibrant=new e.Swatch(j.hslToRgb(o,q,r),0)}else if(null===b.Vibrant&&null!==b.LightVibrant){var l=b.LightVibrant.getHsl();o=l[0],q=l[1],r=l[2],r=k.targetNormalLuma,b.Vibrant=new e.Swatch(j.hslToRgb(o,q,r),0)}if(null===b.DarkVibrant&&null!==b.Vibrant){var h=b.Vibrant.getHsl();o=h[0],q=h[1],r=h[2],r=k.targetDarkLuma,b.DarkVibrant=new e.Swatch(j.hslToRgb(o,q,r),0)}if(null===b.LightVibrant&&null!==b.Vibrant){var p=b.Vibrant.getHsl();o=p[0],q=p[1],r=p[2],r=k.targetLightLuma,b.LightVibrant=new e.Swatch(j.hslToRgb(o,q,r),0)}if(null===b.Muted&&null!==b.Vibrant){var d=b.Vibrant.getHsl();o=d[0],q=d[1],r=d[2],r=k.targetMutesSaturation,b.Muted=new e.Swatch(j.hslToRgb(o,q,r),0)}if(null===b.DarkMuted&&null!==b.DarkVibrant){var f=b.DarkVibrant.getHsl();o=f[0],q=f[1],r=f[2],r=k.targetMutesSaturation,b.DarkMuted=new e.Swatch(j.hslToRgb(o,q,r),0)}if(null===b.LightMuted&&null!==b.LightVibrant){var m=b.LightVibrant.getHsl();o=m[0],q=m[1],r=m[2],r=k.targetMutesSaturation,b.LightMuted=new e.Swatch(j.hslToRgb(o,q,r),0)}}(i,0,d),i}},function(a,b,c){var d=c(33),f=c(169),g=c(171);a.exports=function(a,b){return g(f(a,b,d),a+"")}},function(a,b,c){var d=c(170),f=Ka;a.exports=function(b,g,h){return g=f(void 0===g?b.length-1:g,0),function(){for(var e=arguments,i=-1,j=f(e.length-g,0),a=Array(j);++ia.maxDimension&&(d=a.maxDimension/e)}else d=1/a.quality;1>d&&this.resize(b*d,c*d,d)},a.prototype.applyFilter=function(a){var b=this.getImageData();if("function"==typeof a)for(var c=b.data,d=c.length/4,e=void 0,f=0;f","\"","`"," ","\r","\n","\t"]),k=["'"].concat(i),l=["%","/","?",";","#"].concat(k),h=["/","?","#"],n=/^[+a-z0-9A-Z_-]{0,63}$/,d={javascript:!0,"javascript:":!0},s={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=c(183);f.prototype.parse=function(c,f,i){if(!G.isString(c))throw new TypeError("Parameter 'url' must be a string, not "+typeof c);var p=c.indexOf("?"),o=-1!==p&&pE.length&&E.unshift(""),q.pathname=E.join("/")}if(q.search=i.search,q.query=i.query,q.host=i.host||"",q.auth=i.auth,q.hostname=i.hostname||i.host,q.port=i.port,q.pathname||q.search){var F=q.pathname||"",m=q.search||"";q.path=F+m}return q.slashes=q.slashes||i.slashes,q.href=q.format(),q}var H=q.pathname&&"/"===q.pathname.charAt(0),y=i.host||i.pathname&&"/"===i.pathname.charAt(0),b=y||H||q.host&&i.pathname,I=b,x=q.pathname&&q.pathname.split("/")||[],J=(E=i.pathname&&i.pathname.split("/")||[],q.protocol&&!g[q.protocol]);if(J&&(q.hostname="",q.port=null,q.host&&(""===x[0]?x[0]=q.host:x.unshift(q.host)),q.host="",i.protocol&&(i.hostname=null,i.port=null,i.host&&(""===E[0]?E[0]=i.host:E.unshift(i.host)),i.host=null),b=b&&(""===E[0]||""===x[0])),y)q.host=i.host||""===i.host?i.host:q.host,q.hostname=i.hostname||""===i.hostname?i.hostname:q.hostname,q.search=i.search,q.query=i.query,x=E;else if(E.length)x||(x=[]),x.pop(),x=x.concat(E),q.search=i.search,q.query=i.query;else if(!G.isNullOrUndefined(i.search))return J&&(q.hostname=q.host=x.shift(),(N=!!(q.host&&0=b&&f>>10),a=56320|1023&a),b+=d(a)}).join("")}function t(a,b){return a+22+75*(26>a)-((0!=b)<<5)}function A(a,b,c){var d=0;for(a=c?w(a/700):a>>1,a+=w(a/b);455(j=c.lastIndexOf("-"))&&(j=0),k=0;k=f&&q("invalid-input"),(36<=(B=10>(E=c.charCodeAt(m++))-48?E-22:26>E-65?E-65:26>E-97?E-97:36)||B>w((2147483647-g)/x))&&q("overflow"),g+=B*x,!(B<(C=y<=H?1:y>=H+26?26:y-H));y+=36)x>w(2147483647/(D=36-C))&&q("overflow"),x*=D;H=A(g-t,d=F.length+1,0==t),w(g/d)>2147483647-G&&q("overflow"),G+=w(g/d),g%=d,F.splice(g++,0,G)}return z(F)}function n(b){var c,f,j,k,z,B,C,D,E,F,G,H,I,J,K,L=[];for(H=(b=m(b)).length,c=128,f=0,z=72,B=0;B(G=b[B])&&L.push(d(G));for(j=k=L.length,k&&L.push("-");j=c&&Gw((2147483647-f)/(I=j+1))&&q("overflow"),f+=(C-c)*I,c=C,B=0;B2147483647&&q("overflow"),G==c){for(D=f,E=36;!(D<(F=E<=z?1:E>=z+26?26:E-z));E+=36)K=D-F,J=36-F,L.push(d(t(F+K%J,0))),D=w(K/J);L.push(d(t(D,0))),z=A(f,I,j==k),f=0,++j}++f,++c}return L.join("")}c&&c.nodeType,j&&j.nodeType;var o="object"==typeof k&&k;o.global!==o&&o.window!==o&&o.self;var r,s=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=Math.floor,d=D;r={version:"1.4.1",ucs2:{decode:m,encode:z},decode:b,encode:n,toASCII:function(a){return g(a,function(a){return /[^\x20-\x7E]/.test(a)?"xn--"+n(a):a})},toUnicode:function(a){return g(a,function(a){return /^xn--/.test(a)?b(a.slice(4).toLowerCase()):a})}},void 0===(l=function(){return r}.call(c,e,c,j))||(j.exports=l)}()}).call(this,e(10)(a),e(19))},function(a){a.exports={isString:function(a){return"string"==typeof a},isObject:function(a){return"object"==typeof a&&null!==a},isNull:function(a){return null===a},isNullOrUndefined:function(a){return null==a}}},function(a,b,c){b.decode=b.parse=c(184),b.encode=b.stringify=c(185)},function(a){function b(a,b){return Object.prototype.hasOwnProperty.call(a,b)}a.exports=function(a,i,j,k){i=i||"&",j=j||"=";var n={};if("string"!=typeof a||0===a.length)return n;a=a.split(i);var o=1e3;k&&"number"==typeof k.maxKeys&&(o=k.maxKeys);var q=a.length;0o&&(q=o);for(var s=0;sa.parentNode.removeChild(a))}function Ra(a){var b=vb.get(a.type);void 0===b&&(b={stringsArray:new WeakMap,keyString:new Map},vb.set(a.type,b));var c=b.stringsArray.get(a.strings);if(void 0!==c)return c;var d=a.strings.join(Ua);return c=b.keyString.get(d),void 0===c&&(c=new Xa(a,a.getTemplateElement()),b.keyString.set(d,c)),b.stringsArray.set(a.strings,c),c}Pa.r(Oa);var Sa="undefined"!=typeof window&&null!=window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,Ta=function(a,b){for(var c=2"),Wa=new RegExp("".concat(Ua,"|").concat(Va));class Xa{constructor(a,b){this.parts=[],this.element=b;for(var e=[],g=[],h=document.createTreeWalker(b.content,133,null,!1),i=0,j=-1,k=0,{strings:m,values:{length:d}}=a;k{var c=a.length-b.length;return 0<=c&&a.slice(c)===b},Za=a=>-1!==a.index,$a=()=>document.createComment(""),ab=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/,_a=a=>{for(var b=11===a.nodeType?0:1,c=document.createTreeWalker(a,133,null,!1);c.nextNode();)b++;return b},bb=function(a){for(var b,c=1function(){var b=a(...arguments);return cb.set(b,!0),b},eb=a=>"function"==typeof a&&cb.has(a),fb={},gb={};class hb{constructor(a,b,c){this.__parts=[],this.template=a,this.processor=b,this.options=c}update(a){var b=0;for(var c of this.__parts)void 0!==c&&c.setValue(a[b]),b++;for(var d of this.__parts)void 0!==d&&d.commit()}_clone(){for(var b,d=Sa?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),f=[],e=this.template.parts,g=document.createTreeWalker(d,133,null,!1),h=0,i=0,j=g.nextNode();h",g+1);var h=ab.exec(f);b+=null===h?f+(c?ib:Va):f.substr(0,h.index)+h[1]+h[2]+"$lit$"+h[3]+Ua}return b+=this.strings[a],b}getTemplateElement(){var a=document.createElement("template");return a.innerHTML=this.getHTML(),a}}var kb=a=>null===a||"object"!=typeof a&&"function"!=typeof a,lb=a=>Array.isArray(a)||a&&a[Symbol.iterator];class mb{constructor(a,b,c){this.dirty=!0,this.element=a,this.name=b,this.strings=c,this.parts=[];for(var d=0;d{try{var a={get capture(){return sb=!0,!1}};window.addEventListener("test",a,a),window.removeEventListener("test",a,a)}catch(a){}})();class tb{constructor(a,b,c){this.value=void 0,this.__pendingValue=void 0,this.element=a,this.eventName=b,this.eventContext=c,this.__boundHandleEvent=a=>this.handleEvent(a)}setValue(a){this.__pendingValue=a}commit(){for(;eb(this.__pendingValue);){var d=this.__pendingValue;this.__pendingValue=fb,d(this)}if(this.__pendingValue!==fb){var a=this.__pendingValue,b=this.value,c=null==a||null!=b&&(a.capture!==b.capture||a.once!==b.once||a.passive!==b.passive);c&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),null!=a&&(null==b||c)&&(this.__options=ub(a),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=a,this.__pendingValue=fb}}handleEvent(a){"function"==typeof this.value?this.value.call(this.eventContext||this.element,a):this.value.handleEvent(a)}}var ub=a=>a&&(sb?{capture:a.capture,passive:a.passive,once:a.once}:a.capture),vb=new Map,wb=new WeakMap,xb=new class{handleAttributeExpressions(a,b,c,d){var e=b[0];return"."===e?new qb(a,b.slice(1),c).parts:"@"===e?[new tb(a,b.slice(1),d.eventContext)]:"?"===e?[new pb(a,b.slice(1),c)]:new mb(a,b,c).parts}handleTextExpression(a){return new ob(a)}};"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.2.1");var yb=function(a){for(var b=arguments.length,c=Array(1"".concat(a,"--").concat(b),Ab=!0;void 0===window.ShadyCSS?Ab=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),Ab=!1);var Bb=a=>b=>{var c=zb(b.type,a),d=vb.get(c);void 0===d&&(d={stringsArray:new WeakMap,keyString:new Map},vb.set(c,d));var e=d.stringsArray.get(b.strings);if(void 0!==e)return e;var f=b.strings.join(Ua);if(e=d.keyString.get(f),void 0===e){var g=b.getTemplateElement();Ab&&window.ShadyCSS.prepareTemplateDom(g,a),e=new Xa(b,g),d.keyString.set(f,e)}return d.stringsArray.set(b.strings,e),e},Cb=["html","svg"],Db=new Set,Eb=(b,d,e)=>{Db.add(b);var f=e?e.element:document.createElement("template"),g=d.querySelectorAll("style"),{length:h}=g;if(0===h)return void window.ShadyCSS.prepareTemplateStyles(f,b);for(var i,j=document.createElement("style"),k=0;k{Cb.forEach(b=>{var c=vb.get(zb(b,a));void 0!==c&&c.keyString.forEach(a=>{var{element:{content:b}}=a,c=new Set;Array.from(b.querySelectorAll("style")).forEach(a=>{c.add(a)}),Qa(a,c)})})})(b);var l=f.content;e?function(b,d){var e=2a;var Fb={toAttribute(a,b){return b===Boolean?a?"":null:b===Object||b===Array?null==a?a:JSON.stringify(a):a},fromAttribute(a,b){return b===Boolean?null!==a:b===Number?null===a?null:+a:b===Object||b===Array?JSON.parse(a):a}},Gb=(a,b)=>b!==a&&(b==b||a==a),Hb={attribute:!0,type:String,converter:Fb,reflect:!1,hasChanged:Gb};class Ib extends HTMLElement{constructor(){super(),this._updateState=0,this._instanceProperties=void 0,this._updatePromise=new Promise(a=>this._enableUpdatingResolver=a),this._changedProperties=new Map,this._reflectingProperties=void 0,this.initialize()}static get observedAttributes(){this.finalize();var a=[];return this._classProperties.forEach((b,c)=>{var d=this._attributeNameForProperty(c,b);void 0!==d&&(this._attributeToPropertyMap.set(d,c),a.push(d))}),a}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;var a=Object.getPrototypeOf(this)._classProperties;void 0!==a&&a.forEach((a,b)=>this._classProperties.set(b,a))}}static createProperty(a){var b=1{if(this.hasOwnProperty(b)){var c=this[b];delete this[b],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(b,c)}})}_applyInstanceProperties(){this._instanceProperties.forEach((a,b)=>this[b]=a),this._instanceProperties=void 0}connectedCallback(){this.enableUpdating()}enableUpdating(){void 0!==this._enableUpdatingResolver&&(this._enableUpdatingResolver(),this._enableUpdatingResolver=void 0)}disconnectedCallback(){}attributeChangedCallback(a,b,c){b!==c&&this._attributeToProperty(a,c)}_propertyToAttribute(a,b){var c=2this._propertyToAttribute(b,this[b],a)),this._reflectingProperties=void 0),this._markUpdated()}updated(){}firstUpdated(){}}Ib.finalized=!0;var Jb="adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Kb=Symbol();class Lb{constructor(a,b){if(b!==Kb)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=a}get styleSheet(){return void 0===this._styleSheet&&(Jb?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}}var Mb=function(a){for(var b=arguments.length,c=Array(1b+(a=>{if(a instanceof Lb)return a.cssText;if("number"==typeof a)return a;throw new Error("Value passed to 'css' function must be a 'css' function result: ".concat(a,". Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security."))})(c)+a[d+1],a[0]);return new Lb(e,Kb)};(window.litElementVersions||(window.litElementVersions=[])).push("2.3.1");var Nb={};class Ob extends Ib{static getStyles(){return this.styles}static _getUniqueStyles(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_styles",this))){var a=this.getStyles();if(void 0===a)this._styles=[];else if(Array.isArray(a)){var b=(a,c)=>a.reduceRight((a,c)=>Array.isArray(c)?b(c,a):(a.add(c),a),c),c=b(a,new Set),d=[];c.forEach(a=>d.unshift(a)),this._styles=d}else this._styles=[a]}}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow({mode:"open"})}adoptStyles(){var a=this.constructor._styles;0!==a.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?Jb?this.renderRoot.adoptedStyleSheets=a.map(a=>a.styleSheet):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(a.map(a=>a.cssText),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(a){var b=this.render();super.update(a),b!==Nb&&this.constructor.render(b,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(a=>{var b=document.createElement("style");b.textContent=a.cssText,this.renderRoot.appendChild(b)}))}render(){return Nb}}Ob.finalized=!0,Ob.render=(b,d,e)=>{if(!e||"object"!=typeof e||!e.scopeName)throw new Error("The `scopeName` option is required.");var f=e.scopeName,g=wb.has(d),h=Ab&&11===d.nodeType&&!!d.host,i=h&&!Db.has(f),a=i?document.createDocumentFragment():d;if(((a,b,c)=>{var d=wb.get(b);void 0===d&&(Ta(b,b.firstChild),wb.set(b,d=new ob(Object.assign({templateFactory:Ra},c))),d.appendInto(b)),d.setValue(a),d.commit()})(b,a,Object.assign({templateFactory:Bb(f)},e)),i){var c=wb.get(a);wb.delete(a);var j=c.value instanceof hb?c.value.template:void 0;Eb(f,a,j),Ta(d,d.firstChild),d.appendChild(a),wb.set(d,c)}!g&&h&&window.ShadyCSS.styleElement(d.host)};class Pb{constructor(a){this.classes=new Set,this.changed=!1,this.element=a;var b=(a.getAttribute("class")||"").split(/\s+/);for(var c of b)this.classes.add(c)}add(a){this.classes.add(a),this.changed=!0}remove(a){this.classes.delete(a),this.changed=!0}commit(){if(this.changed){var a="";this.classes.forEach(b=>a+=b+" "),this.element.setAttribute("class",a)}}}var Qb=new WeakMap,Rb=db(a=>b=>{if(!(b instanceof nb)||b instanceof rb||"class"!==b.committer.name||1{b in a||(g.remove(b),f.delete(b))}),a){var h=a[e];h!=f.has(e)&&(h?(g.add(e),f.add(e)):(g.remove(e),f.delete(e)))}"function"==typeof g.commit&&g.commit()}),Sb=new WeakMap,Tb=db(a=>b=>{if(!(b instanceof nb)||b instanceof rb||"style"!==b.committer.name||1{b in a||(f.delete(b),-1===b.indexOf("-")?d[b]=null:d.removeProperty(b))}),a)f.add(e),-1===e.indexOf("-")?d[e]=a[e]:d.setProperty(e,a[e])}),Ub=Pa(62),Vb={shuffle:!0,power_state:!0,artwork_border:!0,icon_state:!0,sound_mode:!0,runtime:!0,volume:!1,volume_level:!0,controls:!1,play_pause:!1,play_stop:!0,prev:!1,next:!1},Wb="mdi:chevron-down",Xb={true:"mdi:volume-off",false:"mdi:volume-high"},Yb="mdi:skip-next",Zb={true:"mdi:pause",false:"mdi:play"},$b={true:"mdi:stop",false:"mdi:play"},_b=["entity","_overflow","break","thumbnail","prevThumbnail","edit","idle","cardHeight","backgroundColor","foregroundColor"],ac=["media_duration","media_position","media_position_updated_at"],bc=[{attr:"media_title"},{attr:"media_artist"},{attr:"media_series_title"},{attr:"media_season",prefix:"S"},{attr:"media_episode",prefix:"E"},{attr:"app_name"}],cc="squeezebox",dc="soundtouch",ec=a=>{(a=>{if(!a.entity||"media_player"!==a.entity.split(".")[0])throw new Error("Specify an entity from within the media_player domain.")})(a);var b=Ja(Ja({artwork:"default",info:"default",more_info:!0,source:"default",sound_mode:"default",toggle_power:!0,volume_step:null,tap_action:{action:"more-info"}},a),{},{hide:Ja(Ja({},Vb),a.hide),speaker_group:Ja(Ja({show_group_count:!0,platform:"sonos"},a.sonos),a.speaker_group),shortcuts:Ja({label:"Shortcuts..."},a.shortcuts)});return b.max_volume=+b.max_volume||100,b.min_volume=+b.min_volume||0,b.collapse=b.hide.controls||b.hide.volume,b.info=b.collapse&&"scroll"!==b.info?"short":b.info,b.flow=b.hide.icon&&b.hide.name&&b.hide.info,b},fc=a=>{var b="";return[].slice.call(new Uint8Array(a)).forEach(a=>b+=D(a)),window.btoa(b)};class gc{constructor(a,b,c){this.hass=a||{},this.config=b||{},this.entity=c||{},this.state=c.state,this.attr=c.attributes,this.idle=!!b.idle_view&&this.idleView,this.active=this.isActive}get id(){return this.entity.entity_id}get icon(){return this.attr.icon}get isPaused(){return"paused"===this.state}get isPlaying(){return"playing"===this.state}get isIdle(){return"idle"===this.state}get isStandby(){return"standby"===this.state}get isUnavailable(){return"unavailable"===this.state}get isOff(){return"off"===this.state}get isActive(){return!this.isOff&&!this.isUnavailable&&!this.idle||!1}get shuffle(){return this.attr.shuffle||!1}get content(){return this.attr.media_content_type||"none"}get mediaDuration(){return this.attr.media_duration||0}get updatedAt(){return this.attr.media_position_updated_at||0}get position(){return this.attr.media_position||0}get name(){return this.attr.friendly_name||""}get groupCount(){return this.group.length}get isGrouped(){return 1Ja({text:this.attr[a.attr],prefix:""},a)).filter(a=>a.text)}get hasProgress(){return!this.config.hide.progress&&!this.idle&&ac.every(a=>a in this.attr)}get progress(){return this.position+(Date.now()-new Date(this.updatedAt).getTime())/1e3}get idleView(){var a=this.config.idle_view;return!!(a.when_idle&&this.isIdle||a.when_standby&&this.isStandby||a.when_paused&&this.isPaused)||this.updatedAt&&a.after&&!this.isPlaying&&this.checkIdleAfter(a.after)}get trackIdle(){return this.active&&!this.isPlaying&&this.updatedAt&&this.config.idle_view&&this.config.idle_view.after}checkIdleAfter(a){var b=(Date.now()-new Date(this.updatedAt).getTime())/1e3;return this.idle=b>60*a,this.active=this.isActive,this.idle}get supportsShuffle(){return void 0!==this.attr.shuffle}get supportsMute(){return void 0!==this.attr.is_volume_muted}get supportsVolumeSet(){return void 0!==this.attr.volume_level}get supportsMaster(){return this.platform!==cc}fetchArtwork(){var a=this;return Ma(function*(){var b=a.attr.entity_picture_local?a.hass.hassUrl(a.picture):a.picture;try{var c=yield fetch(new Request(b)),d=yield c.arrayBuffer(),e=fc(d);return"url(data:".concat(c.headers.get("Content-Type")||"image/jpeg",";base64,").concat(e,")")}catch(a){return!1}})()}getAttribute(a){return this.attr[a]||""}toggle(a){return this.config.toggle_power?this.callService(a,"toggle"):this.isOff?this.callService(a,"turn_on"):void this.callService(a,"turn_off")}toggleMute(a){this.config.speaker_group.sync_volume?this.group.forEach(b=>{this.callService(a,"volume_mute",{entity_id:b,is_volume_muted:!this.muted})}):this.callService(a,"volume_mute",{is_volume_muted:!this.muted})}toggleShuffle(a){this.callService(a,"shuffle_set",{shuffle:!this.shuffle})}setSource(a,b){this.callService(a,"select_source",{source:b})}setMedia(a,b){this.callService(a,"play_media",Ja({},b))}playPause(a){this.callService(a,"media_play_pause")}playStop(a){this.isPlaying?this.callService(a,"media_stop"):this.callService(a,"media_play")}setSoundMode(a,b){this.callService(a,"select_sound_mode",{sound_mode:b})}next(a){this.callService(a,"media_next_track")}prev(a){this.callService(a,"media_previous_track")}stop(a){this.callService(a,"media_stop")}volumeUp(a){this.supportsVolumeSet&&0{var d=this.config.speaker_group.entities.find(a=>a.entity_id===c)||{},e=b;d.volume_offset&&(e+=d.volume_offset/100,1e&&(e=0)),this.callService(a,"volume_set",{entity_id:c,volume_level:e})}):this.callService(a,"volume_set",{entity_id:this.config.entity,volume_level:b})}handleGroupChange(a,b,c){var{platform:d}=this,e={entity_id:b};if(c)switch(e.master=this.config.entity,d){case dc:return this.handleSoundtouch(a,this.isGrouped?"ADD_ZONE_SLAVE":"CREATE_ZONE",b);case cc:return this.callService(a,"sync",{entity_id:this.config.entity,other_player:b},cc);default:return this.callService(a,"join",e,d);}else return d===dc?this.handleSoundtouch(a,"REMOVE_ZONE_SLAVE",b):d===cc?this.callService(a,"unsync",e,cc):this.callService(a,"unjoin",e,d)}handleSoundtouch(a,b,c){return this.callService(a,b,{master:this.master,slaves:c},dc,!0)}toggleScript(a,b){var c=2{var d=[a,b,c].map(a=>{var b=a;return b/=255,.03928>=b?b/12.92:((b+.055)/1.055)**2.4});return .2126*d[0]+.7152*d[1]+.0722*d[2]},lc=(a,b)=>Ha(100*(((a,b)=>{var c=kc(...a),d=kc(...b);return(Ka(c,d)+.05)/(Ia(c,d)+.05)})(a,b)+Number.EPSILON))/100,mc=a=>{function b(a){return e.has(a)||e.set(a,lc(d.rgb,a.rgb)),4.5b.population-a.population);for(var c,d=a[0],e=new Map,f=1;f=La(h.rgb[0]-g.rgb[0])+La(h.rgb[1]-g.rgb[1])+La(h.rgb[2]-g.rgb[2])&&b(g)&&b(g)){c=g.hex;break}}return void 0===c&&(c=d.bodyTextColor),[c,d.hex]};Pa(186);var nc={en:{placeholder:{tts:"Text to speech"},label:{leave:"Leave",ungroup:"Ungroup",group_all:"Group all",send:"Send",master:"Master"},state:{idle:"Idle",unavailable:"Unavailable"},title:{speaker_management:"Group management"}},fr:{placeholder:{tts:"Texte \xE0 lire"},label:{leave:"Quitter",ungroup:"D\xE9grouper",group_all:"Grouper tous",send:"Envoyer"},state:{idle:"Inactif",unavailable:"Indisponible"},title:{speaker_management:"Gestion des groupes"}},hu:{placeholder:{tts:"Sz\xF6vegfelolvas\xE1s"},label:{leave:"Kil\xE9p\xE9s",ungroup:"\xD6sszes ki",group_all:"\xD6sszes be",send:"K\xFCld\xE9s",master:"Forr\xE1s"},state:{idle:"T\xE9tlen",unavailable:"Nem el\xE9rhet\u0151"},title:{speaker_management:"Hangsz\xF3r\xF3k csoportos\xEDt\xE1sa"}},pl:{placeholder:{tts:"Zamie\u0144 tekst na mow\u0119"},label:{leave:"Opu\u015B\u0107",ungroup:"Usu\u0144 grup\u0119",group_all:"Grupuj wszystkie",send:"Wy\u015Blij"},state:{idle:"nieaktywny",unavailable:"niedost\u0119pny"},title:{speaker_management:"Zarz\u0105dzanie grup\u0105"}},uk:{placeholder:{tts:"\u0422\u0435\u043A\u0441\u0442 \u0434\u043B\u044F \u0432\u0456\u0434\u0442\u0432\u043E\u0440\u0435\u043D\u043D\u044F"},label:{leave:"\u0417\u0430\u043B\u0438\u0448\u0438\u0442\u0438",ungroup:"\u0420\u043E\u0437\u0433\u0440\u0443\u043F\u0443\u0432\u0430\u0442\u0438",group_all:"\u0417\u0433\u0440\u0443\u043F\u0443\u0432\u0430\u0442\u0438 \u0432\u0441\u0456",send:"\u041D\u0430\u0434\u0456\u0441\u043B\u0430\u0442\u0438",master:"\u0413\u043E\u043B\u043E\u0432\u043D\u0438\u0439"},state:{idle:"\u0431\u0435\u0437\u0434\u0456\u044F\u043B\u044C\u043D\u0456\u0441\u0442\u044C",unavailable:"\u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0438\u0439"},title:{speaker_management:"\u0423\u043F\u0440\u0430\u0432\u043B\u0456\u043D\u043D\u044F \u0433\u0440\u0443\u043F\u043E\u044E"}}},oc=(a,b)=>b.split(".").reduce((a,b)=>a&&a[b]||null,a),pc=function(a,b,c){var d=3a.stopPropagation(),this.handleClick,this.item.name,this.master?yb(Da(),pc(this.hass,"label.master")):"")}handleClick(a){a.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:{entity:this.item.entity_id,checked:!this.checked}}))}static get styles(){return Mb(Ca())}}),customElements.define("mmp-button",class extends Ob{render(){return yb(Ba())}static get styles(){return Mb(Aa())}}),customElements.define("mmp-group-list",class extends Ob{static get properties(){return{hass:{},entities:{},player:{},visible:Boolean}}get group(){return this.player.group}get master(){return this.player.master}get isMaster(){return this.player.isMaster}get isGrouped(){return this.player.isGrouped}handleGroupChange(a){var{entity:b,checked:c}=a.detail;this.player.handleGroupChange(a,b,c)}render(){if(!this.visible)return yb(za());var{group:a,isMaster:b,isGrouped:c}=this,{id:d}=this.player;return yb(ya(),pc(this.hass,"title.speaker_management"),this.entities.map(a=>this.renderItem(a,d)),!c,a=>this.player.handleGroupChange(a,d,!1),pc(this.hass,"label.leave"),c&&b?yb(xa(),b=>this.player.handleGroupChange(b,a,!1),pc(this.hass,"label.ungroup")):yb(wa()),!b,a=>this.player.handleGroupChange(a,this.entities.map(a=>a.entity_id),!0),pc(this.hass,"label.group_all"))}renderItem(a,b){var c=a.entity_id;return yb(va(),this.handleGroupChange,a,c===b||this.group.includes(c),c===b||!this.isMaster,c===this.master)}static get styles(){return Mb(ua())}}),customElements.define("mmp-dropdown",class extends Ob{static get properties(){return{items:[],label:String,selected:String}}get selectedId(){return this.items.map(a=>a.id).indexOf(this.selected)}onChange(a){var b=a.target.selected;b!==this.selectedId&&this.items[b]&&(this.dispatchEvent(new CustomEvent("change",{detail:this.items[b]})),a.target.selected=-1)}render(){return yb(ta(),"right","top",44,a=>a.stopPropagation(),this.icon?yb(sa(),Wb):yb(ra(),this.selected||this.label,Wb),this.selectedId,this.onChange,this.items.map(a=>yb(qa(),a.id||a.name,a.icon?yb(pa(),a.icon):"",a.name?yb(oa(),a.name):"")))}static get styles(){return[ic,Mb(na())]}}),customElements.define("mmp-shortcuts",class extends Ob{static get properties(){return{player:{},shortcuts:{}}}get buttons(){return this.shortcuts.buttons}get list(){return this.shortcuts.list}get show(){return!this.shortcuts.hide_when_off||this.player.active}get active(){return this.player.getAttribute(this.shortcuts.attribute)}get height(){return this.shortcuts.column_height||36}render(){if(!this.show)return yb(ma());var{active:a}=this,b=this.list?yb(la(),this.handleShortcut,this.list,this.shortcuts.label,a):"",c=this.buttons?yb(ka(),this.buttons.map(b=>yb(ja(),Tb(this.shortcutStyle(b)),this.shortcuts.columns,b.id===a,a=>this.handleShortcut(a,b),this.shortcuts.align_text,b.icon?yb(ia(),b.icon):"",b.image?yb(ha(),b.image):"",b.name?yb(ga(),b.name):""))):"";return yb(fa(),c,b)}handleShortcut(a,b){var{type:c,id:d,data:e}=b||a.detail;if("source"===c)return this.player.setSource(a,d);if("service"===c)return this.player.toggleService(a,d,e);if("script"===c)return this.player.toggleScript(a,d,e);if("sound_mode"===c)return this.player.setSoundMode(a,d);this.player.setMedia(a,{media_content_type:c,media_content_id:d})}shortcutStyle(a){return Ja({"min-height":this.height+"px"},a.cover&&{"background-image":"url(".concat(a.cover,")")})}static get styles(){return[ic,Mb(ea())]}}),customElements.define("mmp-tts",class extends Ob{static get properties(){return{hass:{},config:{},player:{}}}get label(){return pc(this.hass,"placeholder.tts","ui.card.media_player.text_to_speak","Say")}get input(){return this.shadowRoot.getElementById("tts-input")}get message(){return this.input.value}render(){return yb(da(),this.label,a=>a.stopPropagation(),this.handleTts,pc(this.hass,"label.send"))}handleTts(a){var{config:b,message:c}=this,d=Ja({message:c,entity_id:b.entity_id||this.player.id},"group"===b.entity_id&&{entity_id:this.player.group});b.language&&(d.language=b.language),"alexa"===b.platform?this.hass.callService("notify","alexa_media",{message:c,data:{type:b.type||"tts"},target:d.entity_id}):"sonos"===b.platform?this.hass.callService("script","sonos_say",{sonos_entity:d.entity_id,volume:b.volume||.5,message:c}):"webos"===b.platform?this.hass.callService("notify",d.entity_id.split(".").slice(-1)[0],{message:c}):"ga"===b.platform?this.hass.callService("notify","ga_broadcast",{message:c}):this.hass.callService("tts",b.platform+"_say",d),a.stopPropagation(),this.reset()}reset(){this.input.value=""}static get styles(){return Mb(ca())}});var qc=a=>{var b=parseInt(a%60,10),c=parseInt(a/60%60,10),d=parseInt(a/3600%24,10);return d=10>d?"0"+d:d,c=10>c?"0"+c:c,b=10>b?"0"+b:b,"".concat("00"===d?"":d+":").concat(c,":").concat(b)};customElements.define("mmp-progress",class extends Ob{static get properties(){return{_player:{},showTime:Boolean,progress:Number,duration:Number,tracker:{},seekProgress:Number,seekWidth:Number,track:Boolean}}set player(a){this._player=a,this.hasProgress&&this.trackProgress()}get duration(){return this.player.mediaDuration}get player(){return this._player}get hasProgress(){return this.player.hasProgress}get width(){return this.shadowRoot.querySelector(".mmp-progress").offsetWidth}get offset(){return this.getBoundingClientRect().left}get classes(){return Rb({transiting:!this.seekProgress,seeking:this.seekProgress})}render(){return yb(ba(),this.initSeek,this.handleSeek,this.initSeek,this.handleSeek,this.resetSeek,a=>a.stopPropagation(),!this.player.isPlaying,this.showTime?yb(aa(),qc(this.seekProgress||this.progress),qc(this.duration)):"",this.classes,this.seekProgress||this.progress,this.duration)}trackProgress(){this.progress=this.player.progress,this.tracker||(this.tracker=setInterval(()=>this.trackProgress(),1e3)),this.player.isPlaying||(clearInterval(this.tracker),this.tracker=null)}initSeek(a){var b=a.offsetX||a.touches[0].pageX-this.offset;this.seekWidth=this.width,this.seekProgress=this.calcProgress(b),this.addEventListener("touchmove",this.moveSeek),this.addEventListener("mousemove",this.moveSeek)}resetSeek(){this.seekProgress=null,this.removeEventListener("touchmove",this.moveSeek),this.removeEventListener("mousemove",this.moveSeek)}moveSeek(a){a.preventDefault();var b=a.offsetX||a.touches[0].pageX-this.offset;this.seekProgress=this.calcProgress(b)}handleSeek(a){this.resetSeek();var b=a.offsetX||a.changedTouches[0].pageX-this.offset,c=this.calcProgress(b);this.player.seek(a,c)}disconnectedCallback(){super.disconnectedCallback(),this.resetSeek(),clearInterval(this.tracker),this.tracker=null}connectedCallback(){super.connectedCallback(),this.hasProgress&&this.trackProgress()}calcProgress(a){var b=a/this.seekWidth*this.duration;return Ia(Ka(b,.1),this.duration)}static get styles(){return Mb(_())}}),customElements.define("mmp-source-menu",class extends Ob{static get properties(){return{player:{},icon:Boolean}}get source(){return this.player.source}get sources(){return this.player.sources.map(a=>({name:a,id:a,type:"source"}))}render(){return yb($(),this.handleSource,this.sources,this.source,this.source,this.icon)}handleSource(a){var{id:b}=a.detail;this.player.setSource(a,b)}static get styles(){return Mb(Z())}}),customElements.define("mmp-sound-menu",class extends Ob{static get properties(){return{player:{},selected:String,icon:Boolean}}get mode(){return this.player.soundMode}get modes(){return this.player.soundModes.map(a=>({name:a,id:a,type:"soundMode"}))}render(){return yb(Y(),this.handleChange,this.modes,this.mode,this.selected||this.mode,this.icon)}handleChange(a){var{id:b}=a.detail;this.player.setSoundMode(a,b),this.selected=b}static get styles(){return Mb(X())}}),customElements.define("mmp-media-controls",class extends Ob{static get properties(){return{player:{},config:{},break:Boolean}}get showShuffle(){return!this.config.hide.shuffle&&this.player.supportsShuffle}get maxVol(){return this.config.max_volume||100}get minVol(){return this.config.min_volume||0}get vol(){return Ha(100*this.player.vol)}render(){var{hide:a}=this.config;return yb(W(),a.volume?yb(V()):this.renderVolControls(this.player.muted),this.showShuffle?yb(U(),a=>this.player.toggleShuffle(a),"mdi:shuffle",this.player.shuffle):yb(T()),a.controls?yb(S()):yb(R(),this.config.flow||this.break,a.prev?"":yb(Q(),a=>this.player.prev(a),"mdi:skip-previous"),this.renderPlayButtons(),a.next?"":yb(P(),a=>this.player.next(a),Yb)))}renderVolControls(a){var b=this.config.volume_stateless?this.renderVolButtons(a):this.renderVolSlider(a),c=Rb({"--buttons":this.config.volume_stateless,"mmp-media-controls__volume":!0,flex:!0}),d=!this.config.hide.volume_level;return yb(O(),c,b,d?this.renderVolLevel():"")}renderVolSlider(a){return yb(N(),this.renderMuteButton(a),this.handleVolumeChange,a=>a.stopPropagation(),a,this.minVol,this.maxVol,100*this.player.vol,this.config.volume_step||1,"ltr")}renderVolButtons(a){return yb(M(),this.renderMuteButton(a),a=>this.player.volumeDown(a),"mdi:volume-minus",a=>this.player.volumeUp(a),"mdi:volume-plus")}renderVolLevel(){return yb(L(),this.vol)}renderMuteButton(a){if(!this.config.hide.mute)switch(this.config.replace_mute){case"play":case"play_pause":return yb(K(),a=>this.player.playPause(a),Zb[this.player.isPlaying]);case"stop":return yb(J(),a=>this.player.stop(a),$b.true);case"play_stop":return yb(I(),a=>this.player.playStop(a),$b[this.player.isPlaying]);case"next":return yb(H(),a=>this.player.next(a),Yb);default:return this.player.supportsMute?yb(G(),a=>this.player.toggleMute(a),Xb[a]):void 0;}}renderPlayButtons(){var{hide:a}=this.config;return yb(F(),a.play_pause?yb(E()):yb(C(),a=>this.player.playPause(a),Zb[this.player.isPlaying]),a.play_stop?yb(B()):yb(A(),a=>this.handleStop(a),a.play_pause?$b[this.player.isPlaying]:$b.true))}handleStop(a){return this.config.hide.play_pause?this.player.playStop(a):this.player.stop(a)}handleVolumeChange(a){var b=parseFloat(a.target.value)/100;this.player.setVolume(a,b)}static get styles(){return[ic,Mb(z())]}}),customElements.define("mmp-powerstrip",class extends Ob{static get properties(){return{hass:{},player:{},config:{},groupVisible:Boolean,idle:Boolean}}get icon(){return this.config.speaker_group.icon||"mdi:speaker-multiple"}get showGroupButton(){return this.config.speaker_group.entities}get showPowerButton(){return!this.config.hide.power}get powerColor(){return this.player.active&&!this.config.hide.power_state}get sourceSize(){return"icon"===this.config.source||this.hasControls||this.idle}get soundSize(){return"icon"===this.config.sound_mode||this.hasControls||this.idle}get hasControls(){return this.player.active&&this.config.hide.controls!==this.config.hide.volume}get hasSource(){return 0this.player.toggle(a),this.powerColor):"")}handleGroupClick(a){a.stopPropagation(),this.dispatchEvent(new CustomEvent("toggleGroupList"))}get renderIdleView(){return this.player.isPaused?yb(r(),Zb[this.player.isPlaying],a=>this.player.playPause(a)):yb(q(),pc(this.hass,"state.idle","state.media_player.idle"))}static get styles(){return[ic,Mb(p())]}}),customElements.define("mini-media-player",class extends Ob{constructor(){super(),this._overflow=!1,this.initial=!0,this.picture=!1,this.thumbnail="",this.prevThumbnail="",this.edit=!1,this.rtl=!1,this.cardHeight=0,this.foregroundColor="",this.backgroundColor=""}static get properties(){return{_hass:{},config:{},entity:{},player:{},_overflow:Boolean,break:Boolean,initial:Boolean,picture:String,thumbnail:String,prevThumbnail:String,edit:Boolean,rtl:Boolean,idle:Boolean,cardHeight:Number,foregroundColor:String,backgroundColor:String}}static get styles(){return[ic,hc]}set hass(a){if(a){var b=a.states[this.config.entity];this._hass=a,b&&this.entity!==b&&(this.entity=b,this.player=new gc(a,this.config,b),this.rtl=this.computeRTL(a),this.idle=this.player.idle,this.player.trackIdle&&this.updateIdleStatus())}}get hass(){return this._hass}set overflow(a){this._overflow!==a&&(this._overflow=a)}get overflow(){return this._overflow}get name(){return this.config.name||this.player.name}setConfig(a){this.config=ec(a)}shouldUpdate(a){return void 0===this.break&&this.computeRect(this),a.has("prevThumbnail")&&this.prevThumbnail&&setTimeout(()=>{this.prevThumbnail=""},1e3),a.has("player")&&"material"===this.config.artwork&&this.setColors(),_b.some(b=>a.has(b))&&this.player}firstUpdated(){new Ub.a(a=>{a.forEach(a=>{window.requestAnimationFrame(()=>{"scroll"===this.config.info&&this.computeOverflow(),this._resizeTimer||(this.computeRect(a),this._resizeTimer=setTimeout(()=>{this._resizeTimer=null,this.computeRect(this._resizeEntry),this.measureCard()},250)),this._resizeEntry=a})})}).observe(this),setTimeout(()=>this.initial=!1,250),this.edit=this.config.speaker_group.expanded||!1}updated(){"scroll"===this.config.info&&setTimeout(()=>{this.computeOverflow()},10)}render(){var{config:a}=0this.handlePopup(a),a.artwork,this.player.content,this.renderBackground(),this.renderArtwork(),this.renderGradient(),this.player.idle,this.renderIcon(),this.renderEntityName(),this.renderMediaInfo(),this.toggleGroupList,this.hass,this.player,a,this.edit,this.idle,a.flow,!a.collapse&&this.player.active?yb(n(),this.player,a,this.break):"",this.player,a.shortcuts,a.tts?yb(m(),a.tts,this.hass,this.player):"",this.hass,this.edit,a.speaker_group.entities,this.player,this.player.active&&this.player.hasProgress?yb(l(),this.player,!this.config.hide.runtime):"")}computeClasses(){var{config:a}=0{var f;switch(d.action){case"more-info":f=new Event("hass-more-info",{composed:!0}),f.detail={entityId:d.entity||e},a.dispatchEvent(f);break;case"navigate":if(!d.navigation_path)return;window.history.pushState(null,"",d.navigation_path),f=new Event("location-changed",{composed:!0}),f.detail={replace:!1},window.dispatchEvent(f);break;case"call-service":{if(!d.service)return;var[h,i]=d.service.split(".",2),g=Ja({},d.service_data);b.callService(h,i,g);break}case"url":if(!d.url)return;d.new_tab?window.open(d.url,"_blank"):window.location.href=d.url;}})(this,this._hass,this.config,this.config.tap_action,this.player.id)}renderIcon(){if(!this.config.hide.icon){if(this.player.active&&this.thumbnail&&"default"===this.config.artwork)return yb(g(),this.thumbnail,!this.config.hide.artwork_border,this.player.state);var a=!this.config.hide.icon_state&&this.player.isActive;return yb(f(),a,this.computeIcon())}}renderEntityName(){if(!this.config.hide.name)return yb(e(),this.name,this.speakerCount())}renderMediaInfo(){if(!this.config.hide.info){var e=this.player.mediaInfo;return yb(d(),"short"===this.config.info||!this.player.active,"scroll"===this.config.info,this.overflow,this.overflow,"scroll"===this.config.info?yb(c(),e.map(a=>yb(b(),"attr__"+a.attr,a.prefix+a.text))):"",e.map(b=>yb(a(),"attr__"+b.attr,b.prefix+b.text)))}}speakerCount(){if(this.config.speaker_group.show_group_count){var a=this.player.groupCount;return 1a.parentNode.clientWidth;this.overflow=b&&this.player.active&&7.5+a.clientWidth/50}}computeRect(a){var{left:b,width:c}=a.contentRect||a.getBoundingClientRect();this.break=390>c+2*b}computeRTL(a){var b=a.language||"en";return a.translationMetadata.translations[b]&&a.translationMetadata.translations[b].isRTL||!1}toggleGroupList(){this.edit=!this.edit}updateIdleStatus(){this._idleTracker&&clearTimeout(this._idleTracker);var a=(Date.now()-new Date(this.player.updatedAt).getTime())/1e3;this._idleTracker=setTimeout(()=>{this.idle=this.player.checkIdleAfter(this.config.idle_view.after),this.player.idle=this.idle,this._idleTracker=null},1e3*(60*this.config.idle_view.after-a))}getCardSize(){return this.config.collapse?1:2}setColors(){var a=this;return Ma(function*(){if(a.player.picture!==a.picture){if(!a.player.picture)return a.foregroundColor="",void(a.backgroundColor="");try{[a.foregroundColor,a.backgroundColor]=yield(b=a.player.picture,new jc(b,{colorCount:16,generator:mc}).getPalette())}catch(b){console.error("Error getting Image Colors",b),a.foregroundColor="",a.backgroundColor=""}var b}})()}})}])})})(); diff --git a/www/community/mini-media-player/mini-media-player-bundle.js.gz b/www/community/mini-media-player/mini-media-player-bundle.js.gz index 2a3d5f37a792af857357929b6c665a508592738d..78dd1b70eda0b85a8ab46d13f79f7f440458a75b 100644 GIT binary patch literal 42388 zcmV(rK<>XEiwFpO_EcX2|7~e*X)SGKWNBe7aBN|DWpXWIb#7#AWiD!S0PKAWd)i2{ z=wHF?tRoqL0UJ98%WU40nPf6E$?ohfW_u=d!e^ng;2&6s%2^R*08s6tv0LGdPJ?ZqE>5bSV^spT*T2{ehd`DA8=w=2(klFCx403@kWhv}MViU6on3aG0FRD{TzFa72H)s;UV z1y@%y&-JY*Nvr*65`;@rf{v!uBPR@|)AT1rVzj)Udgc>r?$0cQs_w2r^3cUzM?G;c zq=LdrrtfZP-@V87eQwRX6fA`xc%>kW9szHPB0BZf|>~&=M$@rpDPXgOFo_- zvb2j_=tiZ`jq|Wr1)miz?}G5=iHMMFVr|R08Hd4Y?$%+3#~zv1o|Ln12cheQW(v!r zrM2|Zy-jyyT-uRI=`debo#3+v`s%nSTb$Z$D!r=Fno&k zgqHl$macc1Cf>b8=zV^Y(?6+)*QM>=lp`-`wV*kpDztc0+Tt{ytU|l9*#f#3j6*Mq z($urDm|F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P(I&9fkh`D2aB-Bt+2gcEWI&KW@ph%uqf| zOmcH5Qrhr%qeKtzceD;g>rl21Woxi83~Z}C<-Y%J>1me7Tffvt{qHf|_#+R~Ac^8jW9o`L)C*^LiFnd}O3W%C{*rqjZBkAsgVglnq!W|Hg8#zC^e1 z7Z#|fkzNT4rdFK6dcD2S;JBrHo1=(t2(M?klSF1ce{0Kj7oE^b2}7A~KIV9kD~C_7 zsC$Gmuat4kZ<=qpza}cmCSh8Xf~}n5nwH z;U#lVrMF^jiani@9q}?*GmOjE%kU{{pp>2J0o}s5s7T9P21dIz!$dys$UFJO#CAkJXq za^Q~rV7x6ld*rM3c!7k+>h14S9G^5{3g7dqcI9cj1l5;k^D6Y}wiXNSEGws2Mf$O# z?J>wrfa37DuJlmZ*UkGP_QBn6i*Zl)W41C6vkcxPCB|{LcU100w)0$h!SjghS+LUn O&;JD}vI73kSOEY^B?o)} diff --git a/www/community/pvpc-hourly-pricing-card/pvpc-hourly-pricing-card-editor.js b/www/community/pvpc-hourly-pricing-card/pvpc-hourly-pricing-card-editor.js new file mode 100644 index 0000000..8ec9f4e --- /dev/null +++ b/www/community/pvpc-hourly-pricing-card/pvpc-hourly-pricing-card-editor.js @@ -0,0 +1,242 @@ +const fireEvent = (node, type, detail, options) => { + options = options || {}; + detail = detail === null || detail === undefined ? {} : detail; + const event = new Event(type, { + bubbles: options.bubbles === undefined ? true : options.bubbles, + cancelable: Boolean(options.cancelable), + composed: options.composed === undefined ? true : options.composed + }); + event.detail = detail; + node.dispatchEvent(event); + return event; +}; + +const locale = { + da: { + optionName: 'Navn (valgfrit)', + optionEntity: 'Enhed (påkrævet)', + optionShowCurrent: 'Vis nuværende status', + optionShowDetails: 'Vis detaljer', + optionShowGraph: 'Vis graf', + optionShowInfo: 'Vis information' + }, + de: { + optionName: 'Name (optional)', + optionEntity: 'Entity (Erforderlich)', + optionShowCurrent: 'Aktuellen Status anzeigen', + optionShowDetails: 'Details anzeigen', + optionShowGraph: 'Grafik anzeigen', + optionShowInfo: 'Informationen anzeigen' + }, + en: { + optionName: 'Name (Optional)', + optionEntity: 'Entity (Required)', + optionShowCurrent: 'Show Current State', + optionShowDetails: 'Show Details', + optionShowGraph: 'Show Graph', + optionShowInfo: 'Show Info' + }, + es: { + optionName: 'Nombre (Opcional)', + optionEntity: 'Entidad (Necesario)', + optionShowCurrent: 'Mostrar Estado Actual', + optionShowDetails: 'Mostrar Detalles', + optionShowGraph: 'Mostrar Gráfico', + optionShowInfo: 'Mostrar Información' + }, + fr: { + optionName: 'Nom (Facultatif)', + optionEntity: 'Entity (Required)', + optionShowCurrent: "Afficher l'état actuel", + optionShowDetails: 'Afficher les détails', + optionShowGraph: 'Afficher le graphique', + optionShowInfo: 'Afficher les informations' + }, + nl: { + optionName: 'Naam (optioneel)', + optionEntity: 'Entiteit (vereist)', + optionShowCurrent: 'Toon huidige status', + optionShowDetails: 'Details weergeven', + optionShowGraph: 'Show Graph', + optionShowInfo: 'Informatie weergeven' + }, + ru: { + optionName: 'Имя (необязательно)', + optionEntity: 'Entity (обязательно)', + optionShowCurrent: 'Показать текущий статус', + optionShowDetails: 'Показать детали', + optionShowGraph: 'Показать график', + optionShowInfo: 'Показать информацию' + }, + sv: { + optionName: 'Namn (valfritt)', + optionEntity: 'Enhet (obligatoriskt)', + optionShowCurrent: 'Visa aktuell status', + optionShowDetails: 'Visa detaljer', + optionShowGraph: 'Visa graf', + optionShowInfo: 'Visa information' + } +}; + +const LitElement = + window.LitElement || Object.getPrototypeOf(customElements.get('home-assistant') || customElements.get('hui-view')); +const { html, css } = LitElement.prototype; + +export class PVPCHourlyPricingCardEditor extends LitElement { + setConfig(config) { + this._config = { ...config }; + } + + static get properties() { + return { hass: {}, _config: {} }; + } + + get _entity() { + return this._config.entity || ''; + } + + get _name() { + return this._config.name || ''; + } + + get _current() { + return this._config.current !== false; + } + + get _details() { + return this._config.details !== false; + } + + get _graph() { + return this._config.graph !== false; + } + + get _info() { + return this._config.info !== false; + } + + render() { + if (!this.hass) { + return html``; + } + + this.lang = this.hass.selectedLanguage || this.hass.language; + + const entities = Object.keys(this.hass.states).filter((eid) => + Object.keys(this.hass.states[eid].attributes).some((aid) => aid == 'min_price_at') + ); + + return html` +

+
+ + +
+
+ + + ${entities.map((entity) => { + return html` ${entity} `; + })} + + +
+
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+
+ `; + } + + _valueChanged(ev) { + if (!this._config || !this.hass) { + return; + } + + const target = ev.target; + if (this[`_${target.configValue}`] === target.value) { + return; + } + + if (target.configValue) { + if (target.value === '') { + delete this._config[target.configValue]; + } else { + this._config = { + ...this._config, + [target.configValue]: target.checked !== undefined ? target.checked : target.value + }; + } + } + + fireEvent(this, 'config-changed', { config: this._config }); + } + + ll(str) { + if (locale[this.lang] === undefined) return locale.en[str]; + return locale[this.lang][str]; + } + + static get styles() { + return css` + ha-switch { + padding-top: 16px; + } + .mdc-label { + margin-left: 12px; + vertical-align: text-bottom; + } + .side-by-side { + display: flex; + } + .side-by-side > * { + flex: 1; + padding-right: 4px; + } + `; + } +} + +customElements.define('pvpc-hourly-pricing-card-editor', PVPCHourlyPricingCardEditor); + +window.customCards = window.customCards || []; +window.customCards.push({ + type: 'pvpc-hourly-pricing-card', + name: 'PVPC Hourly Pricing', + preview: true, + description: 'The PVPC Hourly Pricing card allows you to display propertly the PVPC Hourly Pricing entity.' +}); diff --git a/www/community/pvpc-hourly-pricing-card/pvpc-hourly-pricing-card-editor.js.gz b/www/community/pvpc-hourly-pricing-card/pvpc-hourly-pricing-card-editor.js.gz new file mode 100644 index 0000000000000000000000000000000000000000..57af8492bd48f8162ccb9730e210f8a6bfdd9e8d GIT binary patch literal 2098 zcmV-22+j8&iwFqMWQAV>|8RD2V=ZWJb#iQZEpT#aV`*+@En{JFWG!W6X>@OLE^2cC z%~?^8{@|)qz#~E@)4%0*`m@q+4 z=QL4p1b&i6bO36R;r|g;gz*8SnPQ0S!_hH3e)%P+1`uC8z5hNuULNW>D}+|3?MX+6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RG)Ued2^DU)QRZ?TU(@{%p7E!kTQAFsX?g;2Su+N8U^;+54#W{LvW?Xic7mv(0 z<8sCrxpzsUv!%)ra{xx8S;F)B?rjp`g{5et;5=(9eN^8aOQ2YUx*9h75O&kYW;?A~Y zB#N;29I7-M!7qQEU2l?w`&MVBD>y^0Su*5wqEPTPM-X7H`${x^NI07&$Q|~x!*Qyx zo8F?{J&qgE$YjRJVgwUTulLCv!>g{W7D2NP+l~r0jnU#?wLPuR2E*<~^KUoK_p*5w z4r9}{4>Q}h4^5juP3Mjw)6v)4&ZGQNVHePox%0uavAD+!A<2bETv cR()MSu-YMP>(anOzBMmD0fKnYu5lay0P!CdKmY&$ literal 0 HcmV?d00001 diff --git a/www/community/pvpc-hourly-pricing-card/pvpc-hourly-pricing-card.js b/www/community/pvpc-hourly-pricing-card/pvpc-hourly-pricing-card.js new file mode 100644 index 0000000..f41fac8 --- /dev/null +++ b/www/community/pvpc-hourly-pricing-card/pvpc-hourly-pricing-card.js @@ -0,0 +1,740 @@ +const LitElement = + window.LitElement || Object.getPrototypeOf(customElements.get('home-assistant') || customElements.get('hui-view')); +const { html, css } = LitElement.prototype; + +const locale = { + da: { + minPrice: 'Minimumspris i dag:', + maxPrice: 'Maksimal pris i dag:', + minPriceNextDay: 'Minimumspris i morgen:', + maxPriceNextDay: 'Maksimal pris i morgen:', + infoNoNextDay: 'Morgendagens data er endnu ikke tilgængelige', + from: 'fra', + to: 'til' + }, + de: { + minPrice: 'Mindestpreis heute:', + maxPrice: 'Maximaler preis heute:', + minPriceNextDay: 'Mindestpreis morgen:', + maxPriceNextDay: 'Maximaler preis morgen:', + infoNoNextDay: 'Die Daten von morgen sind noch nicht verfügbar', + from: 'von', + to: 'bis' + }, + en: { + minPrice: 'Lowest price today:', + maxPrice: 'Highest price today:', + minPriceNextDay: 'Lowest price tomorrow:', + maxPriceNextDay: 'Highest price tomorrow:', + infoNoNextDay: "Tomorrow's data is not yet available", + from: 'from', + to: 'to' + }, + es: { + minPrice: 'Precio mínimo hoy:', + maxPrice: 'Precio máximo hoy:', + minPriceNextDay: 'Precio mínimo mañana:', + maxPriceNextDay: 'Precio máximo mañana:', + infoNoNextDay: 'Los datos de mañana no están disponibles aún', + from: 'de', + to: 'a' + }, + fr: { + minPrice: "Prix minimum aujourd'hui:", + maxPrice: "Prix maximum aujourd'hui:", + minPriceNextDay: 'Prix minimum demain:', + maxPriceNextDay: 'Prix maximum demain:', + infoNoNextDay: 'Les données de demain ne sont pas encore disponibles', + from: 'de', + to: 'à' + }, + nl: { + minPrice: 'Minimumspris i dag:', + maxPrice: 'Maksimal pris i dag:', + minPriceNextDay: 'Minimum prijs morgen:', + maxPriceNextDay: 'Maximale prijs morgen:', + infoNoNextDay: 'De gegevens van morgen zijn nog niet beschikbaar', + from: 'fra', + to: 'til' + }, + ru: { + minPrice: 'Минимальная цена сегодня:', + maxPrice: 'Максимальная цена сегодня:', + minPriceNextDay: 'Минимальная цена завтра:', + maxPriceNextDay: 'Максимальная цена завтра:', + infoNoNextDay: 'Данные завтра еще не доступны', + from: 'С', + to: 'до' + }, + sv: { + minPrice: 'Lägsta pris idag:', + maxPrice: 'Maxpris idag:', + minPriceNextDay: 'Lägsta pris imorgon:', + maxPriceNextDay: 'Maxpris i morgon:', + infoNoNextDay: 'Morgondagens data är ännu inte tillgängliga', + from: '', + to: 'till' + } +}; + +const tariffPeriodIconColors = { + error: '--error-color', + normal: '--warning-color', + peak: '--error-color', + valley: '--success-color', + 'super-valley': '--info-color' +}; + +const tariffPeriodIcons = { + error: + 'M 28.342306,10.429944 27.798557,32.995546 H 24.243272 L 23.657695,10.429944 Z M 28.133172,41.570057 H 23.86683 v -4.412736 h 4.266342 z', + normal: + 'M 31.032172,16.612305 20.999855,32.113255 15.66609,25.065424 H 0.97821381 a 25.017275,25.017275 0 0 0 -0.0332829,0.949884 25.017275,25.017275 0 0 0 0.0468985,0.940092 H 14.800215 l 6.199595,8.453119 10.03232,-15.502917 5.335714,7.049798 h 14.578421 a 25.017275,25.017275 0 0 0 0.03328,-0.940092 25.017275,25.017275 0 0 0 -0.0469,-0.949884 H 37.233737 Z', + peak: + 'M 2.5238392,34.768609 A 25.003164,25.003164 0 0 1 1.9104804,32.879664 h 8.6436716 l 15.49805,-22.870055 15.121052,22.870055 h 8.891749 a 25.003164,25.003164 0 0 1 -0.628986,1.888945 H 40.038344 L 26.052202,13.679995 12.06606,34.768609 Z', + valley: + 'm 2.5238392,17.238401 a 25.003164,25.003164 0 0 0 -0.6133588,1.888945 h 8.6436716 l 15.49805,22.870055 15.121052,-22.870055 h 8.891749 A 25.003164,25.003164 0 0 0 49.436017,17.238401 H 40.038344 L 26.052202,38.327015 12.06606,17.238401 Z', + 'super-valley': + 'm 30.867213,27.342466 c 0,0.670334 -0.543413,1.213747 -1.213747,1.213746 -0.670333,-10e-7 -1.213744,-0.543413 -1.213744,-1.213746 0,-0.670333 0.543411,-1.213745 1.213744,-1.213746 0.670334,-1e-6 1.213747,0.543412 1.213747,1.213746 z m -7.282476,0 c 0,0.670333 -0.543412,1.213746 -1.213745,1.213746 -0.670334,0 -1.213746,-0.543412 -1.213746,-1.213746 0,-0.670334 0.543412,-1.213746 1.213746,-1.213746 0.670333,0 1.213745,0.543413 1.213745,1.213746 z m 8.026907,-6.869803 c -0.161832,-0.477407 -0.614966,-0.817256 -1.149013,-0.817256 h -8.900804 c -0.534048,0 -0.979088,0.339849 -1.149012,0.817256 l -1.683061,4.846893 v 6.473312 c 0,0.445039 0.364123,0.809164 0.809163,0.809164 h 0.809164 c 0.445041,0 0.809165,-0.364125 0.809165,-0.809164 v -0.809165 h 9.709967 v 0.809165 c 0,0.445039 0.364125,0.809164 0.809164,0.809164 h 0.809165 c 0.445039,0 0.809163,-0.364125 0.809163,-0.809164 v -6.473312 z m -9.800018,0.767664 h 8.393115 l 0.841531,2.49431 H 20.970096 Z m 9.89816,8.158458 H 20.314672 v -3.837522 l 0.0971,-0.275116 h 11.209006 l 0.089,0.275116 z M 25.208235,17.875001 v -1.607989 h -3.215979 l 4.823966,-2.411981 v 1.607988 H 30.0322 Z M 2.5904451,17.061236 C 2.3615878,17.681074 2.1574473,18.309759 1.9785073,18.945805 H 10.602006 V 37.331696 H 41.150085 V 18.945805 h 8.871408 c -0.184075,-0.636272 -0.393416,-1.26496 -0.62753,-1.884569 H 38.720725 V 35.001194 H 12.908652 V 17.061236 Z' +}; + +const fireEvent = (node, type, detail, options) => { + options = options || {}; + detail = detail === null || detail === undefined ? {} : detail; + const event = new Event(type, { + bubbles: options.bubbles === undefined ? true : options.bubbles, + cancelable: Boolean(options.cancelable), + composed: options.composed === undefined ? true : options.composed + }); + event.detail = detail; + node.dispatchEvent(event); + return event; +}; + +function hasConfigOrEntityChanged(element, changedProps) { + if (changedProps.has('_config')) { + return true; + } + + const oldHass = changedProps.get('hass'); + if (oldHass) { + return oldHass.states[element._config.entity] !== element.hass.states[element._config.entity]; + } + + return true; +} + +class PVPCHourlyPricingCard extends LitElement { + static get properties() { + return { + _config: { type: Object }, + hass: { type: Object } + }; + } + + static async getConfigElement() { + await import('./pvpc-hourly-pricing-card-editor.js'); + return document.createElement('pvpc-hourly-pricing-card-editor'); + } + + static getStubConfig(hass, entities, entitiesFallback) { + const entity = Object.keys(hass.states).find((eid) => + Object.keys(hass.states[eid].attributes).some((aid) => aid == 'min_price_at') + ); + return { entity: entity }; + } + + setConfig(config) { + if (!config.entity) { + throw new Error('Please define a "Spain electricity hourly pricing (PVPC)" entity'); + } + + this._config = config; + + this.setPVPCHourlyPricingObj(); + } + + setPVPCHourlyPricingObj() { + if (!this.hass) return; + + this.pvpcHourlyPricingObj = this._config.entity in this.hass.states ? this.hass.states[this._config.entity] : null; + if (!this.pvpcHourlyPricingObj) return; + + this.despiction = this.getDespiction(this.pvpcHourlyPricingObj.attributes); + } + + shouldUpdate(changedProps) { + return hasConfigOrEntityChanged(this, changedProps); + } + + updated(param) { + this.setPVPCHourlyPricingObj(); + let chart = this.shadowRoot.getElementById('Chart'); + if (chart) { + chart.data = this.ChartData; + chart.hass = this.hass; + } + } + + render() { + if (!this._config || !this.hass) { + return html``; + } + + this.setPVPCHourlyPricingObj(); + this.numberElements = 0; + this.lang = this.hass.selectedLanguage || this.hass.language; + + if (!this.pvpcHourlyPricingObj) { + return html` + + +
Entity not available: ${this._config.entity}
+
+ `; + } + + return html` + + ${this._config.current !== false ? this.renderCurrent() : ''} + ${this._config.details !== false ? this.renderDetails() : ''} + ${this._config.graph !== false ? this.renderGraph() : ''} + ${this._config.info !== false ? this.renderInfo() : ''} + + `; + } + + renderCurrent() { + this.numberElements++; + const tariffPeriod = this.getTariffPeriod(this.pvpcHourlyPricingObj.attributes.tariff); + const style = getComputedStyle(document.body); + const iconColor = style.getPropertyValue(tariffPeriodIconColors[tariffPeriod]); + + return html` +
+ + + + + + ${this.getFixedFloat(this.pvpcHourlyPricingObj.state)} + ${this.pvpcHourlyPricingObj.attributes.unit_of_measurement} +
+ `; + } + + renderDetails() { + if (!this.despiction) { + return html``; + } + + const minPrice = this.getFixedFloat(this.despiction.minPrice); + const minPriceFrom = this.getTimeString(new Date().setHours(this.despiction.minIndex, 0)); + const minPriceTo = this.getTimeString(new Date().setHours(this.despiction.minIndex + 1, 0)); + const maxPrice = this.getFixedFloat(this.despiction.maxPrice); + const maxPriceFrom = this.getTimeString(new Date().setHours(this.despiction.maxIndex, 0)); + const maxPriceTo = this.getTimeString(new Date().setHours(this.despiction.maxIndex + 1, 0)); + const minPriceNextDay = this.getFixedFloat(this.despiction.minPriceNextDay); + const minPriceFromNextDay = this.getTimeString(new Date().setHours(this.despiction.minIndexNextDay, 0)); + const minPriceToNextDay = this.getTimeString(new Date().setHours(this.despiction.minIndexNextDay + 1, 0)); + const maxPriceNextDay = this.getFixedFloat(this.despiction.maxPriceNextDay); + const maxPriceFromNextDay = this.getTimeString(new Date().setHours(this.despiction.maxIndexNextDay, 0)); + const maxPriceToNextDay = this.getTimeString(new Date().setHours(this.despiction.maxIndexNextDay + 1, 0)); + + this.numberElements++; + + return html` +
    +
  • + + ${this.ll('minPrice')} ${minPrice}${this.pvpcHourlyPricingObj.attributes.unit_of_measurement} + ${this.ll('from')} ${minPriceFrom} ${this.ll('to')} ${minPriceTo} +
  • +
  • + + ${this.ll('maxPrice')} ${maxPrice}${this.pvpcHourlyPricingObj.attributes.unit_of_measurement} + ${this.ll('from')} ${maxPriceFrom} ${this.ll('to')} ${maxPriceTo} +
  • + ${this.despiction.minPriceNextDay + ? html`
  • + + ${this.ll('minPriceNextDay')} + ${minPriceNextDay}${this.pvpcHourlyPricingObj.attributes.unit_of_measurement} ${this.ll('from')} + ${minPriceFromNextDay} ${this.ll('to')} ${minPriceToNextDay} +
  • +
  • + + ${this.ll('maxPriceNextDay')} + ${maxPriceNextDay}${this.pvpcHourlyPricingObj.attributes.unit_of_measurement} ${this.ll('from')} + ${maxPriceFromNextDay} ${this.ll('to')} ${maxPriceToNextDay} +
  • ` + : ''} +
+ `; + } + + renderGraph() { + if (!this.despiction) { + return html``; + } + + this.numberElements++; + + this.drawChart(); + + return html` +
+ +
+ `; + } + + renderInfo() { + if (!this.despiction) { + return html``; + } + + this.numberElements++; + + if (!this.despiction.minPriceNextDay) { + return html` +
${this.ll('infoNoNextDay')}
+ `; + } else { + return html``; + } + } + + drawChart() { + if (!this.despiction) return; + + const that = this; + + const style = getComputedStyle(document.body); + const legendTextColor = style.getPropertyValue('--primary-text-color'); + const axisTextColor = style.getPropertyValue('--secondary-text-color'); + const dividerColor = style.getPropertyValue('--divider-color'); + const selectionColor = style.getPropertyValue('--paper-grey-500'); + const today = new Date(); + const minIndex = this.despiction.minIndex; + const maxIndex = this.despiction.maxIndex; + const minIndexNextDay = this.despiction.minIndexNextDay; + const maxIndexNextDay = this.despiction.maxIndexNextDay; + const hasNextDayData = this.despiction.pricesNextDay[0] !== undefined; + const minIcon = '▼'; + const maxIcon = '▲'; + + const chartOptions = { + type: 'line', + data: { + labels: this.despiction.dateTime, + datasets: [ + { + label: that.getDateString(today), + type: 'line', + data: this.despiction.prices, + borderWidth: 2.0, + pointRadius: 0.0, + pointHitRadius: 0.0, + fill: false, + steppedLine: true + } + ] + }, + options: { + animation: { + duration: 300, + easing: 'linear', + onComplete: function () { + const chartInstance = this.chart; + const ctx = chartInstance.ctx; + const fontSize = 12; + const fontStyle = 'normal'; + const fontFamily = 'Roboto'; + ctx.font = Chart.helpers.fontString(fontSize, fontStyle, fontFamily); + ctx.textAlign = 'center'; + ctx.textBaseline = 'middle'; + + const meta = chartInstance.controller.getDatasetMeta(0); + const minBarStart = meta.data[minIndex]; + const minBarEnd = meta.data[minIndex + 1]; + const pointToPointCenterXOffset = (minBarEnd._model.x - minBarStart._model.x) / 2; + const maxBar = meta.data[maxIndex]; + const iconYOffset = 8; + ctx.fillStyle = meta.dataset._model.borderColor; + ctx.fillText(minIcon, minBarStart._model.x + pointToPointCenterXOffset, minBarStart._model.y - iconYOffset); + ctx.fillText(maxIcon, maxBar._model.x + pointToPointCenterXOffset, maxBar._model.y - iconYOffset); + + ctx.save(); + const selectedIndex = + chartInstance.tooltip._active && + chartInstance.tooltip._active.length > 0 && + chartInstance.tooltip._active[0]._index < 24 + ? chartInstance.tooltip._active[0]._index + : today.getHours(); + const yaxis = meta.controller.chart.scales['y-axis-0']; + const xBarStart = meta.data[selectedIndex]._model.x; + const xBarEnd = meta.data[selectedIndex + 1]._model.x; + const yBarStart = yaxis.top; + const yBarEnd = yaxis.bottom; + ctx.globalAlpha = 0.6; + ctx.beginPath(); + ctx.moveTo(xBarStart, yBarStart); + ctx.lineTo(xBarStart, yBarEnd); + ctx.strokeStyle = selectionColor; + ctx.stroke(); + ctx.beginPath(); + ctx.moveTo(xBarEnd, yBarStart); + ctx.lineTo(xBarEnd, yBarEnd); + ctx.strokeStyle = selectionColor; + ctx.stroke(); + ctx.globalAlpha = 0.3; + ctx.fillStyle = selectionColor; + ctx.fillRect(xBarStart, yBarStart, xBarEnd - xBarStart, yBarEnd - yBarStart); + ctx.restore(); + + if (hasNextDayData) { + const meta_next_day = chartInstance.controller.getDatasetMeta(1); + const minNextDayBar = meta_next_day.data[minIndexNextDay]; + const maxNextDayBar = meta_next_day.data[maxIndexNextDay]; + ctx.fillStyle = meta_next_day.dataset._model.borderColor; + ctx.fillText( + minIcon, + minNextDayBar._model.x + pointToPointCenterXOffset, + minNextDayBar._model.y - iconYOffset + ); + ctx.fillText( + maxIcon, + maxNextDayBar._model.x + pointToPointCenterXOffset, + maxNextDayBar._model.y - iconYOffset + ); + } + } + }, + legend: { + display: true, + labels: { + fontColor: legendTextColor, + fontSize: 14, + usePointStyle: true, + boxWidth: 6 + } + }, + scales: { + xAxes: [ + { + type: 'time', + maxBarThickness: 15, + display: false, + ticks: { + display: false + }, + gridLines: { + display: false + } + }, + { + position: 'bottom', + gridLines: { + display: true, + drawTicks: false, + drawBorder: false, + color: dividerColor + }, + ticks: { + display: true, + padding: 10, + source: 'labels', + autoSkip: true, + fontColor: axisTextColor, + maxRotation: 0, + callback: function (value, index, values) { + return that.getHourString.call(that, value); + } + } + } + ], + yAxes: [ + { + position: 'left', + gridLines: { + display: true, + drawBorder: false, + drawTicks: false, + color: dividerColor, + borderDash: [4, 6] + }, + ticks: { + display: true, + padding: 10, + fontColor: axisTextColor + } + } + ] + }, + tooltips: { + mode: 'index', + intersect: false, + callbacks: { + title: function (items, data) { + const index = items[0].index != 24 ? items[0].index : (items[0].index = 23); + + const date = new Date(data.labels[index]); + const initDate = that.getTimeString(date); + const endDate = that.getTimeString(date.setHours(date.getHours() + 1)); + return initDate + ' - ' + endDate; + }, + label: function (tooltipItems, data) { + let icon; + const index = tooltipItems.index != 24 ? tooltipItems.index : (tooltipItems.index = 23); + + if (tooltipItems.datasetIndex === 0) { + if (index == minIndex) { + icon = minIcon; + } else if (index == maxIndex) { + icon = maxIcon; + } + } else if (tooltipItems.datasetIndex === 1) { + if (index == minIndexNextDay) { + icon = minIcon; + } else if (index == maxIndexNextDay) { + icon = maxIcon; + } + } + + const labelTitle = data.datasets[tooltipItems.datasetIndex].label || ''; + const label = + labelTitle + + ': ' + + parseFloat(tooltipItems.value).toFixed(5) + + ' ' + + that.pvpcHourlyPricingObj.attributes.unit_of_measurement + + ' '; + + return icon ? label + icon : label; + } + } + } + } + }; + + if (hasNextDayData) { + chartOptions.data.datasets.push({ + label: that.getDateString(today.setDate(today.getDate() + 1)), + type: 'line', + data: this.despiction.pricesNextDay, + borderWidth: 2.0, + pointRadius: 0.0, + pointHitRadius: 0.0, + fill: false, + steppedLine: true + }); + } + + this.ChartData = chartOptions; + } + + getDespiction(attributes) { + const priceRegex = /price_\d\dh/; + const priceNextDayRegex = /price_(next|last)_day_\d\dh/; + + const priceArray = Object.keys(attributes) + .filter((key) => priceRegex.test(key)) + .map((key) => attributes[key]); + const priceNextDayArray = Object.keys(attributes) + .filter((key) => priceNextDayRegex.test(key)) + .map((key) => attributes[key]); + + let data = []; + let dateTime = []; + let prices = []; + let pricesNextDay = []; + + for (let index = 0; index < 24; index++) { + dateTime.push(new Date().setHours(index, 0)); + prices.push(priceArray[index]); + pricesNextDay.push(priceNextDayArray[index]); + } + + dateTime.push(new Date().setHours(24, 0)); + prices.push(priceArray[23]); + pricesNextDay.push(priceNextDayArray[23]); + + data.dateTime = dateTime; + data.prices = prices; + data.pricesNextDay = pricesNextDay; + + data.minPrice = Math.min.apply(null, prices); + data.maxPrice = Math.max.apply(null, prices); + data.minIndex = prices.indexOf(data.minPrice); + data.maxIndex = prices.indexOf(data.maxPrice); + data.minPriceNextDay = Math.min.apply(null, pricesNextDay); + data.maxPriceNextDay = Math.max.apply(null, pricesNextDay); + data.minIndexNextDay = pricesNextDay.indexOf(data.minPriceNextDay); + data.maxIndexNextDay = pricesNextDay.indexOf(data.maxPriceNextDay); + + return data; + } + + getTariffPeriod(tariff) { + let period; + + switch (tariff) { + case 'normal': + period = 'normal'; + break; + case 'discrimination': + const utcHours = new Date().getUTCHours(); + if (utcHours >= 21 || utcHours < 11) { + period = 'valley'; + } else { + period = 'peak'; + } + break; + case 'electric_car': + const hours = new Date().getHours(); + if (hours >= 1 && hours < 7) { + period = 'super-valley'; + } else if (hours >= 13 && hours < 23) { + period = 'peak'; + } else { + period = 'valley'; + } + break; + default: + period = 'error'; + } + + return period; + } + + getDateString(datetime) { + return new Date(datetime).toLocaleDateString(this.lang, { + day: '2-digit', + month: '2-digit', + year: 'numeric' + }); + } + + getHourString(datetime) { + return new Date(datetime).toLocaleTimeString(this.lang, { hour: '2-digit', hour12: false }); + } + + getTimeString(datetime) { + return new Date(datetime).toLocaleTimeString(this.lang, { hour: '2-digit', minute: '2-digit', hour12: false }); + } + + getFixedFloat(number) { + return parseFloat(number).toFixed(5); + } + + _handleClick() { + fireEvent(this, 'hass-more-info', { entityId: this._config.entity }); + } + + getCardSize() { + return this.numberElements || 3; + } + + static get styles() { + return css` + ha-card { + margin: auto; + padding-top: 1.3em; + padding-bottom: 1.3em; + padding-left: 1em; + padding-right: 1em; + position: relative; + } + + ha-icon { + color: var(--paper-item-icon-color); + } + + .spacer { + padding-top: 1em; + } + + .clear { + clear: both; + } + + .tappable { + cursor: pointer; + } + + .current { + height: 5.5em; + position: relative; + display: flex; + align-items: center; + justify-content: space-between; + } + + .period-icon { + padding-left: 16px; + padding-right: 16px; + width: 5.5em; + height: 5.5em; + } + + .currentPrice { + font-weight: 300; + font-size: 4em; + color: var(--primary-text-color); + margin-top: 0.5em; + margin-right: 8px; + } + + .currentPriceUnit { + font-weight: 300; + font-size: 1.5em; + vertical-align: super; + color: var(--primary-text-color); + right: 0em; + top: 0em; + position: absolute; + margin-right: 8px; + } + + .details { + font-weight: 300; + color: var(--primary-text-color); + list-style: none; + padding-right: 1em; + padding-left: 1em; + } + + .details li { + display: flex; + align-items: center; + justify-content: flex-start; + } + + .details ha-icon { + height: 22px; + margin-right: 4px; + } + + .info { + color: var(--primary-text-color); + text-align: center; + padding-right: 1em; + padding-left: 1em; + } + `; + } + + ll(str) { + if (locale[this.lang] === undefined) return locale.en[str]; + return locale[this.lang][str]; + } +} + +customElements.define('pvpc-hourly-pricing-card', PVPCHourlyPricingCard); diff --git a/www/community/pvpc-hourly-pricing-card/pvpc-hourly-pricing-card.js.gz b/www/community/pvpc-hourly-pricing-card/pvpc-hourly-pricing-card.js.gz new file mode 100644 index 0000000000000000000000000000000000000000..b09b4394f3951559c5ccb2230a659c01c149f899 GIT binary patch literal 6668 zcmV+n8uR5JiwFqMWQAV>|8RD2V=ZWJb#iQZEpT#aV`*+@En{JFWG-rR0L49BkK9Ib z?+5rlv^Rlg2AZMxJs+!;W3TL3fP5A#`I2~VA#-PXW@vH90m<19%M0WZAV81+_Y&kO z4>{lvAP)hY%N-J2&X))Mfz@BgFG*E*lk6s&GqaL>v0;nTU0q*YT~%G(q^3!n<>XPA ze-zObjdODJ&W{MW2;*6DVMxv2eoH<(`~&#Po`N$uE~+anz1g(0&oEy zCDS0H0QUmHd z6Ucr{FY^b%RTJkbNf$J3pq1cj*lPpAc%J+?k-%9uut4JsILQM-Qvwa~hJ??bQ<8_# z;^n`@3mSzBS|FLH$qL5K)1YX{6Zj3V9sGIC8fUacMKhY^>y!d_OS;LaUPYHE1F)h6 z)G4XLx`&EX>^oHSAf)6$kkgo)C$Rt~8Bio~GF_55oGx>6PSg3z-!0C9w5B8&qbTVt z%p@fNS&fn&B^MwK&fpYgAejLh8YO)aE|#re4HeaJf*5IXu|-LB?6m9a$ra5>a2|wFa2C;ny7?q4)qWCLGnq~^k5f7g6S8{wZ?Gy7vP`s^DWQIG*??*& zriOAAy!`hd4z_5fhP^(ZZa$9^rV{)=Er3BcAYlIT7crTI**b|sP)|mJm%oi`<};&; ziULVP^Higu1Nie2f1}eN!RG5^lg`lpO%57*60o=$+F&)>lF-lSDhT7Ps*(uQpc{Gu z1n361kxUdc~SS`~erLxMlYwP7dOX`ZFKd{S2;ID7tj`Z*iZ$!z0 zF6cS>>+_)WN8f~BgRYVVxFc9{XEd8G!{=u~!yRq++37~7qnm%a`LCPr;lJPAe0THT zul^pMzkBs_^6GDHeuIzX)z9GJKW=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bNW4}o4O>#KInVI+)t!8N6jAx|M}U{yn5tl-$S=A{ zy%VOz{GILne~qZE(#(?jvz;C|xYLWU^JKvVp5I!!YdW^0Q0DwCtw0BfD%_T-V6Tz9cr9hKR$+Gy`Ceb$ zjTd#IsGH@f@-_+o`!!C=9OG2|HeB&?iTHasAV8l0hEw(1QVkpx%yseIGWBl<;n>^1 W&jmSx_8VuYwEqL}taNzNWB>rXZp`BV literal 0 HcmV?d00001 diff --git a/www/community/secondaryinfo-entity-row/secondaryinfo-entity-row.js.gz b/www/community/secondaryinfo-entity-row/secondaryinfo-entity-row.js.gz index f6ed3c2871c4c48e1ef12abc562067065f940fef..90dc1a8776702100e7470a59d4a0704dc8a86753 100644 GIT binary patch delta 760 zcmV+!dNQ`j zkc`P(uP=!IL{T3u-ovKT0ls7wI|uhDjZR{_{-|f>N|U1Xomm0?BGickZ)56zO^6#s zl^Zqy)%A?lDWlo$1}su;HFQtKyY3jaom$AUCA40q{#1T0ZcPk(=Q2h4<4YCJnKv2H7@{?X6Iy1I_3}sA#hm09da2Dr(8F6z=c2&R( zq9noS)m%rL?EqR6n;`4skpbbsg_5l92(Yf5gYqnS*!5@BG}drg^;Tu6mD<>?wS-1~ zS~Jt2Tg@PP6AJb#hvUv4J3_ozn(-=D)UH#4oS4PZGx^tQE{zkjx-*6Zca>e=Gar(S zjk;;BhI7)Cw7bLkc&VQ2micdAuc(OHYZHWg_4pf;-*>Tl2mk;jHGTB} delta 761 zcmVf&U487-9aK_L$K%!(Hrv%*&X@L&tP@v6r z8HU!CnOK`6WfI*q2=d=Y*^U#tZZ~W`$X_Ji;}b>7%#m51r?^B-POKBuXE;|H7QTBnTWxLdGDnbi=C#5?gOn82=6nOTm7)>~DdiqE-64da5A>0QmrU$3{6 zC?{^$Hd?JPE{W`Fc6XEN^$6M_O^u$bMJV%IlfwaACMbV?EfX4v_q|EYupm$bfm0|R z+Dz&k*|hYu7!j6V_hef9E&j@X(9xGw%;sV5xuhWB-3$HF%&36#e;C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