Skip to content

Instantly share code, notes, and snippets.

@regevbr
Last active March 11, 2022 16:54
Show Gist options
  • Save regevbr/5adc681805e88bf7092381137225f3eb to your computer and use it in GitHub Desktop.
Save regevbr/5adc681805e88bf7092381137225f3eb to your computer and use it in GitHub Desktop.
mini climate card fixed
(function(){"use strict";function j(a,b){return b||(b=a.slice(0)),Object.freeze(Object.defineProperties(a,{raw:{value:Object.freeze(b)}}))}function k(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 l(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?k(Object(b),!0).forEach(function(c){m(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):k(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}function m(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function n(a,b,c,d,e,f,g){try{var h=a[f](g),i=h.value}catch(a){return void c(a)}h.done?b(i):Promise.resolve(i).then(d,e)}function o(a){return function(){var b=this,c=arguments;return new Promise(function(d,e){function f(a){n(h,d,e,f,g,"next",a)}function g(a){n(h,d,e,f,g,"throw",a)}var h=a.apply(b,c);f(void 0)})}}var p,q,r,s,t,u,v,w,y,z,B,C,D,F,G,H,I,J,K,L,M,N,O,P,Q,R,U,V,W,X,Y,Z,_,aa,ba,ca,da,ea,fa,ga,ha,ia,ja,ka,la,ma,na,oa,pa,qa,ra,sa,ta,ua,va,wa,xa,ya,za,Aa,Ba,Ca,Da,Ea,Fa,Ga,Ha,Ia,Ja;(function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b():"function"==typeof define&&define.amd?define(b):b()})(this,function(){var Ka=Number.isNaN,La=Math.round;function Ma(a,b){var c,f,g,j,k=2<arguments.length&&arguments[2]!==void 0?arguments[2]:a,m=3<arguments.length?arguments[3]:void 0;if(b===$)return b;var e=void 0===m?k._$Cu:null===(c=k._$Cl)||void 0===c?void 0:c[m],p=Jb(b)?void 0:b._$litDirective$;return(null==e?void 0:e.constructor)!==p&&(null===(f=null==e?void 0:e._$AO)||void 0===f||f.call(e,!1),void 0===p?e=void 0:(e=new p(a),e._$AT(a,k,m)),void 0===m?k._$Cu=e:(null!==(g=(j=k)._$Cl)&&void 0!==g?g:j._$Cl=[])[m]=e),void 0!==e&&(b=Ma(a,e._$AS(a,b.values),e,m)),b}function Na(a,b){function c(){f&&(f=!1,a()),g&&e()}function d(){ec(c)}function e(){var a=Date.now();if(f){if(a-h<2)return;g=!0}else f=!0,g=!1,setTimeout(d,b);h=a}var f=!1,g=!1,h=0;return e}function Oa(a){return parseFloat(a)||0}function Pa(a){for(var b=[],c=1;c<arguments.length;c++)b[c-1]=arguments[c];return b.reduce(function(b,c){var d=a["border-"+c+"-width"];return b+Oa(d)},0)}function Qa(a){for(var b=["top","right","bottom","left"],c={},d=0,e=b;d<e.length;d++){var f=e[d],g=a["padding-"+f];c[f]=Oa(g)}return c}function Ra(a){var b=a.getBBox();return Wa(0,0,b.width,b.height)}function Sa(a){var b=Math.abs,c=a.clientWidth,d=a.clientHeight;if(!c&&!d)return kc;var e=jc(a).getComputedStyle(a),f=Qa(e),g=f.left+f.right,h=f.top+f.bottom,i=Oa(e.width),j=Oa(e.height);if("border-box"===e.boxSizing&&(La(i+g)!==c&&(i-=Pa(e,"left","right")+g),La(j+h)!==d&&(j-=Pa(e,"top","bottom")+h)),!Ta(a)){var k=La(i+g)-c,l=La(j+h)-d;1!==b(k)&&(i-=k),1!==b(l)&&(j-=l)}return Wa(f.left,f.top,i,j)}function Ta(a){return a===jc(a).document.documentElement}function Ua(a){return cc?lc(a)?Ra(a):Sa(a):kc}function Va(a){var b=a.x,c=a.y,d=a.width,e=a.height,f="undefined"==typeof DOMRectReadOnly?Object:DOMRectReadOnly,g=Object.create(f.prototype);return ic(g,{x:b,y:c,width:d,height:e,top:c,right:b+d,bottom:e+c,left:b}),g}function Wa(a,b,c,d){return{x:a,y:b,width:c,height:d}}function Xa(a){return class extends a{createRenderRoot(){var a=this.constructor,{registry:b,elementDefinitions:c,shadowRootOptions:d}=a;c&&!b&&(a.registry=new CustomElementRegistry,Object.entries(c).forEach(b=>{var[c,d]=b;return a.registry.define(c,d)}));var e=this.renderOptions.creationScope=this.attachShadow(l(l({},d),{},{customElements:a.registry}));return wb(e,this.constructor.elementStyles),e}}}function Ya(a,b,e,f){var g,h=arguments.length,c=3>h?b:null===f?f=Object.getOwnPropertyDescriptor(b,e):f;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(a,b,e,f);else for(var j=a.length-1;0<=j;j--)(g=a[j])&&(c=(3>h?g(c):3<h?g(b,e,c):g(b,e))||c);return 3<h&&c&&Object.defineProperty(b,e,c),c}function Za(a,c){function b(){this.constructor=a}if("function"!=typeof c&&null!==c)throw new TypeError("Class extends value "+(c+"")+" is not a constructor or null");_c(a,c),a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)}function $a(a,c){function b(){this.constructor=a}if("function"!=typeof c&&null!==c)throw new TypeError("Class extends value "+(c+"")+" is not a constructor or null");hd(a,c),a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)}function ab(a){var b="function"==typeof Symbol&&Symbol.iterator,c=b&&a[b],d=0;if(c)return c.call(a);if(a&&"number"==typeof a.length)return{next:function(){return a&&d>=a.length&&(a=void 0),{value:a&&a[d++],done:!a}}};throw new TypeError(b?"Object is not iterable.":"Symbol.iterator is not defined.")}function bb(a){return{addClass:b=>{a.classList.add(b)},removeClass:b=>{a.classList.remove(b)},hasClass:b=>a.classList.contains(b)}}function cb(a){return(b,c)=>void 0===c?xd(a,b):((a,b,c)=>{b.constructor.createProperty(c,a)})(a,b,c)}function db(a){return cb(l(l({},a),{},{state:!0}))}function eb(a,b){return yd({descriptor:c=>{var d={get(){var b,c;return null!==(c=null===(b=this.renderRoot)||void 0===b?void 0:b.querySelector(a))&&void 0!==c?c:null},enumerable:!0,configurable:!0};if(b){var e="symbol"==typeof c?Symbol():"__"+c;d.get=function(){var b,c;return void 0===this[e]&&(this[e]=null!==(c=null===(b=this.renderRoot)||void 0===b?void 0:b.querySelector(a))&&void 0!==c?c:null),this[e]}}return d}})}function fb(a){var{slot:b,selector:c}=null==a?{}:a;return yd({descriptor:()=>({get(){var d,e="slot"+(b?"[name=".concat(b,"]"):":not([name])"),f=null===(d=this.renderRoot)||void 0===d?void 0:d.querySelector(e),g=null==f?[]:zd(f,a);return c?g.filter(a=>a.matches(c)):g},enumerable:!0,configurable:!0})})}function gb(a,b,c){var d,f=a;return"object"==typeof a?(f=a.slot,d=a):d={flatten:b},c?fb({slot:f,flatten:b,selector:c}):yd({descriptor:()=>({get(){var a,b,c="slot"+(f?"[name=".concat(f,"]"):":not([name])"),g=null===(a=this.renderRoot)||void 0===a?void 0:a.querySelector(c);return null!==(b=null==g?void 0:g.assignedNodes(d))&&void 0!==b?b:[]},enumerable:!0,configurable:!0})})}function hb(a){var b=a.key;if(Bd.has(b))return b;var c=Dd.get(a.keyCode);return c?c:Ad.UNKNOWN}function ib(a){return a instanceof Set}function jb(a,b,e,f){var g,h=arguments.length,c=3>h?b:null===f?f=Object.getOwnPropertyDescriptor(b,e):f;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(a,b,e,f);else for(var j=a.length-1;0<=j;j--)(g=a[j])&&(c=(3>h?g(c):3<h?g(b,e,c):g(b,e))||c);return 3<h&&c&&Object.defineProperty(b,e,c),c}function kb(a){var b,c=1<arguments.length&&arguments[1]!==void 0?arguments[1]:50;return function(){var d=!(0<arguments.length&&arguments[0]!==void 0)||arguments[0];clearTimeout(b),b=setTimeout(()=>{a(d)},c)}}function lb(){var a=this.itemsReadyResolver;this.itemsReady=new Promise(a=>this.itemsReadyResolver=a),a()}function mb(a,b,e,f){var g,h=arguments.length,c=3>h?b:null===f?f=Object.getOwnPropertyDescriptor(b,e):f;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(a,b,e,f);else for(var j=a.length-1;0<=j;j--)(g=a[j])&&(c=(3>h?g(c):3<h?g(b,e,c):g(b,e))||c);return 3<h&&c&&Object.defineProperty(b,e,c),c}function nb(a,b){var c=a.matches||a.webkitMatchesSelector||a.msMatchesSelector;return c.call(a,b)}function ob(a,c){function b(){this.constructor=a}if("function"!=typeof c&&null!==c)throw new TypeError("Class extends value "+(c+"")+" is not a constructor or null");Xd(a,c),a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)}function pb(a){var b="function"==typeof Symbol&&Symbol.iterator,c=b&&a[b],d=0;if(c)return c.call(a);if(a&&"number"==typeof a.length)return{next:function(){return a&&d>=a.length&&(a=void 0),{value:a&&a[d++],done:!a}}};throw new TypeError(b?"Object is not iterable.":"Symbol.iterator is not defined.")}function qb(a,b,c){if(!a)return{x:0,y:0};var d,e,f=b.x,g=b.y,h=f+c.left,i=g+c.top;if("touchstart"===a.type){var j=a;d=j.changedTouches[0].pageX-h,e=j.changedTouches[0].pageY-i}else{var k=a;d=k.pageX-h,e=k.pageY-i}return{x:d,y:e}}var rb=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,sb=Symbol(),tb=new Map;class e{constructor(a,b){if(this._$cssResult$=!0,b!==sb)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=a}get styleSheet(){var a=tb.get(this.cssText);return rb&&void 0===a&&(tb.set(this.cssText,a=new CSSStyleSheet),a.replaceSync(this.cssText)),a}toString(){return this.cssText}}var n,ub=a=>new e("string"==typeof a?a:a+"",sb),vb=function(a){for(var b=arguments.length,c=Array(1<b?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var f=1===a.length?a[0]:c.reduce((b,c,d)=>b+(a=>{if(!0===a._$cssResult$)return a.cssText;if("number"==typeof a)return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(c)+a[d+1],a[0]);return new e(f,sb)},wb=(a,b)=>{rb?a.adoptedStyleSheets=b.map(a=>a instanceof CSSStyleSheet?a:a.styleSheet):b.forEach(b=>{var c=document.createElement("style"),d=window.litNonce;void 0!==d&&c.setAttribute("nonce",d),c.textContent=b.cssText,a.appendChild(c)})},i=rb?a=>a:a=>a instanceof CSSStyleSheet?(a=>{var b="";for(var c of a.cssRules)b+=c.cssText;return ub(b)})(a):a,S=window.trustedTypes,xb=S?S.emptyScript:"",yb=window.reactiveElementPolyfillSupport,zb={toAttribute(a,b){return b===Boolean?a=a?xb:null:b===Object||b===Array?a=null==a?a:JSON.stringify(a):void 0,a},fromAttribute(a,b){var c=a;switch(b){case Boolean:c=null!==a;break;case Number:c=null===a?null:+a;break;case Object:case Array:try{c=JSON.parse(a)}catch(a){c=null}}return c}},Ab=(a,b)=>b!==a&&(b==b||a==a),Bb={attribute:!0,type:String,converter:zb,reflect:!1,hasChanged:Ab};class h extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(a){var b;null!==(b=this.l)&&void 0!==b||(this.l=[]),this.l.push(a)}static get observedAttributes(){this.finalize();var a=[];return this.elementProperties.forEach((b,c)=>{var d=this._$Eh(c,b);void 0!==d&&(this._$Eu.set(d,c),a.push(d))}),a}static createProperty(a){var b=1<arguments.length&&arguments[1]!==void 0?arguments[1]:Bb;if(b.state&&(b.attribute=!1),this.finalize(),this.elementProperties.set(a,b),!b.noAccessor&&!this.prototype.hasOwnProperty(a)){var c="symbol"==typeof a?Symbol():"__"+a,d=this.getPropertyDescriptor(a,c,b);void 0!==d&&Object.defineProperty(this.prototype,a,d)}}static getPropertyDescriptor(a,b,c){return{get(){return this[b]},set(d){var e=this[a];this[b]=d,this.requestUpdate(a,e,c)},configurable:!0,enumerable:!0}}static getPropertyOptions(a){return this.elementProperties.get(a)||Bb}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;var a=Object.getPrototypeOf(this);if(a.finalize(),this.elementProperties=new Map(a.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){var b=this.properties,c=[...Object.getOwnPropertyNames(b),...Object.getOwnPropertySymbols(b)];for(var d of c)this.createProperty(d,b[d])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(a){var b=[];if(Array.isArray(a)){var c=new Set(a.flat(1/0).reverse());for(var d of c)b.unshift(i(d))}else void 0!==a&&b.push(i(a));return b}static _$Eh(a,b){var c=b.attribute;return!1===c?void 0:"string"==typeof c?c:"string"==typeof a?a.toLowerCase():void 0}o(){var a;this._$Ep=new Promise(a=>this.enableUpdating=a),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(a=this.constructor.l)||void 0===a||a.forEach(a=>a(this))}addController(a){var b,c;(null!==(b=this._$Eg)&&void 0!==b?b:this._$Eg=[]).push(a),void 0!==this.renderRoot&&this.isConnected&&(null===(c=a.hostConnected)||void 0===c||c.call(a))}removeController(a){var b;null===(b=this._$Eg)||void 0===b||b.splice(this._$Eg.indexOf(a)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach((a,b)=>{this.hasOwnProperty(b)&&(this._$Et.set(b,this[b]),delete this[b])})}createRenderRoot(){var a,b=null!==(a=this.shadowRoot)&&void 0!==a?a:this.attachShadow(this.constructor.shadowRootOptions);return wb(b,this.constructor.elementStyles),b}connectedCallback(){var a;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(a=this._$Eg)||void 0===a||a.forEach(a=>{var b;return null===(b=a.hostConnected)||void 0===b?void 0:b.call(a)})}enableUpdating(){}disconnectedCallback(){var a;null===(a=this._$Eg)||void 0===a||a.forEach(a=>{var b;return null===(b=a.hostDisconnected)||void 0===b?void 0:b.call(a)})}attributeChangedCallback(a,b,c){this._$AK(a,c)}_$ES(a,b){var c,d,f=2<arguments.length&&arguments[2]!==void 0?arguments[2]:Bb,g=this.constructor._$Eh(a,f);if(void 0!==g&&!0===f.reflect){var h=(null!==(d=null===(c=f.converter)||void 0===c?void 0:c.toAttribute)&&void 0!==d?d:zb.toAttribute)(b,f.type);this._$Ei=a,null==h?this.removeAttribute(g):this.setAttribute(g,h),this._$Ei=null}}_$AK(a,b){var c,d,f,g=this.constructor,h=g._$Eu.get(a);if(void 0!==h&&this._$Ei!==h){var i=g.getPropertyOptions(h),j=i.converter,k=null!==(f=null!==(d=null===(c=j)||void 0===c?void 0:c.fromAttribute)&&void 0!==d?d:"function"==typeof j?j:null)&&void 0!==f?f:zb.fromAttribute;this._$Ei=h,this[h]=k(b,i.type),this._$Ei=null}}requestUpdate(a,b,c){var d=!0;void 0!==a&&(((c=c||this.constructor.getPropertyOptions(a)).hasChanged||Ab)(this[a],b)?(this._$AL.has(a)||this._$AL.set(a,b),!0===c.reflect&&this._$Ei!==a&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(a,c))):d=!1),!this.isUpdatePending&&d&&(this._$Ep=this._$E_())}_$E_(){var a=this;return o(function*(){a.isUpdatePending=!0;try{yield a._$Ep}catch(a){Promise.reject(a)}var b=a.scheduleUpdate();return null!=b&&(yield b),!a.isUpdatePending})()}scheduleUpdate(){return this.performUpdate()}performUpdate(){var a;if(this.isUpdatePending){this.hasUpdated,this._$Et&&(this._$Et.forEach((a,b)=>this[b]=a),this._$Et=void 0);var b=!1,c=this._$AL;try{b=this.shouldUpdate(c),b?(this.willUpdate(c),null===(a=this._$Eg)||void 0===a||a.forEach(a=>{var b;return null===(b=a.hostUpdate)||void 0===b?void 0:b.call(a)}),this.update(c)):this._$EU()}catch(a){throw b=!1,this._$EU(),a}b&&this._$AE(c)}}willUpdate(){}_$AE(a){var b;null===(b=this._$Eg)||void 0===b||b.forEach(a=>{var b;return null===(b=a.hostUpdated)||void 0===b?void 0:b.call(a)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(a)),this.updated(a)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(){return!0}update(){void 0!==this._$EC&&(this._$EC.forEach((a,b)=>this._$ES(b,this[b],a)),this._$EC=void 0),this._$EU()}updated(){}firstUpdated(){}}h.finalized=!0,h.elementProperties=new Map,h.elementStyles=[],h.shadowRootOptions={mode:"open"},null==yb||yb({ReactiveElement:h}),(null!==(n=globalThis.reactiveElementVersions)&&void 0!==n?n:globalThis.reactiveElementVersions=[]).push("1.3.0");var a,Cb=globalThis.trustedTypes,Db=Cb?Cb.createPolicy("lit-html",{createHTML:a=>a}):void 0,Eb="lit$".concat((Math.random()+"").slice(9),"$"),Fb="?"+Eb,Gb="<".concat(Fb,">"),Hb=document,Ib=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"";return Hb.createComment(a)},Jb=a=>null===a||"object"!=typeof a&&"function"!=typeof a,Kb=Array.isArray,d=a=>{var b;return Kb(a)||"function"==typeof(null===(b=a)||void 0===b?void 0:b[Symbol.iterator])},Lb=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,c=/-->/g,Mb=/>/g,Nb=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,f=/'/g,Ob=/"/g,m=/^(?:script|style|textarea|title)$/i,g=(a=>function(b){for(var c=arguments.length,d=Array(1<c?c-1:0),e=1;e<c;e++)d[e-1]=arguments[e];return{_$litType$:a,strings:b,values:d}})(1),$=Symbol.for("lit-noChange"),b=Symbol.for("lit-nothing"),Pb=new WeakMap,T=(a,b,c)=>{var d,f,g=null!==(d=null==c?void 0:c.renderBefore)&&void 0!==d?d:b,h=g._$litPart$;if(void 0===h){var i=null!==(f=null==c?void 0:c.renderBefore)&&void 0!==f?f:null;g._$litPart$=h=new Rb(b.insertBefore(Ib(),i),i,void 0,null==c?{}:c)}return h._$AI(a),h},x=Hb.createTreeWalker(Hb,129,null,!1),A=(a,b)=>{for(var e,g=a.length-1,i=[],j=2===b?"<svg>":"",k=Lb,l=0;l<g;l++){for(var n=a[l],o=void 0,p=void 0,q=-1,s=0;s<n.length&&(k.lastIndex=s,p=k.exec(n),null!==p);)s=k.lastIndex,k===Lb?"!--"===p[1]?k=c:void 0===p[1]?void 0===p[2]?void 0!==p[3]&&(k=Nb):(m.test(p[2])&&(e=RegExp("</"+p[2],"g")),k=Nb):k=Mb:k===Nb?">"===p[0]?(k=null==e?Lb:e,q=-1):void 0===p[1]?q=-2:(q=k.lastIndex-p[2].length,o=p[1],k=void 0===p[3]?Nb:"\""===p[3]?Ob:f):k===Ob||k===f?k=Nb:k===c||k===Mb?k=Lb:(k=Nb,e=void 0);var u=k===Nb&&a[l+1].startsWith("/>")?" ":"";j+=k===Lb?n+Gb:0<=q?(i.push(o),n.slice(0,q)+"$lit$"+n.slice(q)+Eb+u):n+Eb+(-2===q?(i.push(void 0),l):u)}var t=j+(a[g]||"<?>")+(2===b?"</svg>":"");if(!Array.isArray(a)||!a.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0===Db?t:Db.createHTML(t),i]};class Qb{constructor(b,e){var f,{strings:g,_$litType$:h}=b;this.parts=[];var i=0,j=0,n=g.length-1,o=this.parts,[c,p]=A(g,h);if(this.el=Qb.createElement(c,e),x.currentNode=this.el.content,2===h){var a=this.el.content,q=a.firstChild;q.remove(),a.append(...q.childNodes)}for(;null!==(f=x.nextNode())&&o.length<n;){if(1===f.nodeType){if(f.hasAttributes()){var s=[];for(var t of f.getAttributeNames())if(t.endsWith("$lit$")||t.startsWith(Eb)){var u=p[j++];if(s.push(t),void 0!==u){var v=f.getAttribute(u.toLowerCase()+"$lit$").split(Eb),w=/([.?@])?(.*)/.exec(u);o.push({type:1,index:i,name:w[2],strings:v,ctor:"."===w[1]?Tb:"?"===w[1]?k:"@"===w[1]?Vb:Sb})}else o.push({type:6,index:i})}for(var y of s)f.removeAttribute(y)}if(m.test(f.tagName)){var z=f.textContent.split(Eb),B=z.length-1;if(0<B){f.textContent=Cb?Cb.emptyScript:"";for(var C=0;C<B;C++)f.append(z[C],Ib()),x.nextNode(),o.push({type:2,index:++i});f.append(z[B],Ib())}}}else if(8===f.nodeType)if(f.data===Fb)o.push({type:2,index:i});else for(var D=-1;-1!==(D=f.data.indexOf(Eb,D+1));)o.push({type:7,index:i}),D+=Eb.length-1;i++}}static createElement(a){var b=Hb.createElement("template");return b.innerHTML=a,b}}class E{constructor(a,b){this.v=[],this._$AN=void 0,this._$AD=a,this._$AM=b}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(a){var b,{el:{content:e},parts:c}=this._$AD,f=(null!==(b=null==a?void 0:a.creationScope)&&void 0!==b?b:Hb).importNode(e,!0);x.currentNode=f;for(var g=x.nextNode(),j=0,h=0,k=c[0];void 0!==k;){if(j===k.index){var d=void 0;2===k.type?d=new Rb(g,g.nextSibling,this,a):1===k.type?d=new k.ctor(g,k.name,k.strings,this,a):6===k.type&&(d=new Wb(g,this,a)),this.v.push(d),k=c[++h]}j!==(null==k?void 0:k.index)&&(g=x.nextNode(),j++)}return f}m(a){var b=0;for(var c of this.v)void 0!==c&&(void 0===c.strings?c._$AI(a[b]):(c._$AI(a,c,b),b+=c.strings.length-2)),b++}}class Rb{constructor(a,c,d,f){var e;this.type=2,this._$AH=b,this._$AN=void 0,this._$AA=a,this._$AB=c,this._$AM=d,this.options=f,this._$Cg=null===(e=null==f?void 0:f.isConnected)||void 0===e||e}get _$AU(){var a,b;return null!==(b=null===(a=this._$AM)||void 0===a?void 0:a._$AU)&&void 0!==b?b:this._$Cg}get parentNode(){var a=this._$AA.parentNode,b=this._$AM;return void 0!==b&&11===a.nodeType&&(a=b.parentNode),a}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(a){var c=1<arguments.length&&arguments[1]!==void 0?arguments[1]:this;a=Ma(this,a,c),Jb(a)?a===b||null==a||""===a?(this._$AH!==b&&this._$AR(),this._$AH=b):a!==this._$AH&&a!==$&&this.$(a):void 0===a._$litType$?void 0===a.nodeType?d(a)?this.S(a):this.$(a):this.k(a):this.T(a)}A(a){var b=1<arguments.length&&arguments[1]!==void 0?arguments[1]:this._$AB;return this._$AA.parentNode.insertBefore(a,b)}k(a){this._$AH!==a&&(this._$AR(),this._$AH=this.A(a))}$(a){this._$AH!==b&&Jb(this._$AH)?this._$AA.nextSibling.data=a:this.k(Hb.createTextNode(a)),this._$AH=a}T(a){var b,{values:c,_$litType$:d}=a,e="number"==typeof d?this._$AC(a):(void 0===d.el&&(d.el=Qb.createElement(d.h,this.options)),d);if((null===(b=this._$AH)||void 0===b?void 0:b._$AD)===e)this._$AH.m(c);else{var f=new E(e,this),g=f.p(this.options);f.m(c),this.k(g),this._$AH=f}}_$AC(a){var b=Pb.get(a.strings);return void 0===b&&Pb.set(a.strings,b=new Qb(a)),b}S(a){Kb(this._$AH)||(this._$AH=[],this._$AR());var b,c=this._$AH,d=0;for(var f of a)d===c.length?c.push(b=new Rb(this.A(Ib()),this.A(Ib()),this,this.options)):b=c[d],b._$AI(f),d++;d<c.length&&(this._$AR(b&&b._$AB.nextSibling,d),c.length=d)}_$AR(){var a,b=0<arguments.length&&arguments[0]!==void 0?arguments[0]:this._$AA.nextSibling,c=1<arguments.length?arguments[1]:void 0;for(null===(a=this._$AP)||void 0===a||a.call(this,!1,!0,c);b&&b!==this._$AB;){var d=b.nextSibling;b.remove(),b=d}}setConnected(a){var b;void 0===this._$AM&&(this._$Cg=a,null===(b=this._$AP)||void 0===b||b.call(this,a))}}class Sb{constructor(a,c,d,f,e){this.type=1,this._$AH=b,this._$AN=void 0,this.element=a,this.name=c,this._$AM=f,this.options=e,2<d.length||""!==d[0]||""!==d[1]?(this._$AH=Array(d.length-1).fill(new String),this.strings=d):this._$AH=b}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(a){var c=1<arguments.length&&arguments[1]!==void 0?arguments[1]:this,d=2<arguments.length?arguments[2]:void 0,f=3<arguments.length?arguments[3]:void 0,e=this.strings,g=!1;if(void 0===e)a=Ma(this,a,c,0),g=!Jb(a)||a!==this._$AH&&a!==$,g&&(this._$AH=a);else{var h,i,j=a;for(a=e[0],h=0;h<e.length-1;h++)i=Ma(this,j[d+h],c,h),i===$&&(i=this._$AH[h]),g||(g=!Jb(i)||i!==this._$AH[h]),i===b?a=b:a!==b&&(a+=(null==i?"":i)+e[h+1]),this._$AH[h]=i}g&&!f&&this.C(a)}C(a){a===b?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null==a?"":a)}}class Tb extends Sb{constructor(){super(...arguments),this.type=3}C(a){this.element[this.name]=a===b?void 0:a}}var Ub=Cb?Cb.emptyScript:"";class k extends Sb{constructor(){super(...arguments),this.type=4}C(a){a&&a!==b?this.element.setAttribute(this.name,Ub):this.element.removeAttribute(this.name)}}class Vb extends Sb{constructor(a,b,c,d,e){super(a,b,c,d,e),this.type=5}_$AI(a){var c,d=1<arguments.length&&arguments[1]!==void 0?arguments[1]:this;if((a=null!==(c=Ma(this,a,d,0))&&void 0!==c?c:b)!==$){var f=this._$AH,e=a===b&&f!==b||a.capture!==f.capture||a.once!==f.once||a.passive!==f.passive,g=a!==b&&(f===b||e);e&&this.element.removeEventListener(this.name,this,f),g&&this.element.addEventListener(this.name,this,a),this._$AH=a}}handleEvent(a){var b,c;"function"==typeof this._$AH?this._$AH.call(null!==(c=null===(b=this.options)||void 0===b?void 0:b.host)&&void 0!==c?c:this.element,a):this._$AH.handleEvent(a)}}class Wb{constructor(a,b,c){this.element=a,this.type=6,this._$AN=void 0,this._$AM=b,this.options=c}get _$AU(){return this._$AM._$AU}_$AI(a){Ma(this,a)}}var Xb=window.litHtmlPolyfillSupport;null==Xb||Xb(Qb,Rb),(null!==(a=globalThis.litHtmlVersions)&&void 0!==a?a:globalThis.litHtmlVersions=[]).push("2.2.0");var Yb,Zb;class $b extends h{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var a,b,c=super.createRenderRoot();return null!==(a=(b=this.renderOptions).renderBefore)&&void 0!==a||(b.renderBefore=c.firstChild),c}update(a){var b=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(a),this._$Dt=T(b,this.renderRoot,this.renderOptions)}connectedCallback(){var a;super.connectedCallback(),null===(a=this._$Dt)||void 0===a||a.setConnected(!0)}disconnectedCallback(){var a;super.disconnectedCallback(),null===(a=this._$Dt)||void 0===a||a.setConnected(!1)}render(){return $}}$b.finalized=!0,$b._$litElement$=!0,null===(Yb=globalThis.litElementHydrateSupport)||void 0===Yb||Yb.call(globalThis,{LitElement:$b});var ac=globalThis.litElementPolyfillSupport;null==ac||ac({LitElement:$b}),(null!==(Zb=globalThis.litElementVersions)&&void 0!==Zb?Zb:globalThis.litElementVersions=[]).push("3.2.0");var bc=function(){function a(a,b){var c=-1;return a.some(function(a,d){return a[0]===b&&(c=d,!0)}),c}return"undefined"==typeof Map?function(){function b(){this.__entries__=[]}return Object.defineProperty(b.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),b.prototype.get=function(b){var c=a(this.__entries__,b),d=this.__entries__[c];return d&&d[1]},b.prototype.set=function(b,c){var d=a(this.__entries__,b);~d?this.__entries__[d][1]=c:this.__entries__.push([b,c])},b.prototype.delete=function(b){var c=this.__entries__,d=a(c,b);~d&&c.splice(d,1)},b.prototype.has=function(b){return!!~a(this.__entries__,b)},b.prototype.clear=function(){this.__entries__.splice(0)},b.prototype.forEach=function(a,b){void 0===b&&(b=null);for(var c,d=0,e=this.__entries__;d<e.length;d++)c=e[d],a.call(b,c[1],c[0])},b}():Map}(),cc="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,dc=function(){return"undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")()}(),ec=function(){return"function"==typeof requestAnimationFrame?requestAnimationFrame.bind(dc):function(a){return setTimeout(function(){return a(Date.now())},1e3/60)}}(),fc=["top","right","bottom","left","width","height","size","weight"],gc="undefined"!=typeof MutationObserver,hc=function(){function a(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=Na(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(){var a=this.updateObservers_();a&&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()}),0<a.length},a.prototype.connect_=function(){!cc||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),gc?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},a.prototype.disconnect_=function(){cc&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},a.prototype.onTransitionEnd_=function(a){var b=a.propertyName,c=void 0===b?"":b,d=fc.some(function(a){return!!~c.indexOf(a)});d&&this.refresh()},a.getInstance=function(){return this.instance_||(this.instance_=new a),this.instance_},a.instance_=null,a}(),ic=function(a,b){for(var c,d=0,e=Object.keys(b);d<e.length;d++)c=e[d],Object.defineProperty(a,c,{value:b[c],enumerable:!1,writable:!1,configurable:!0});return a},jc=function(a){var b=a&&a.ownerDocument&&a.ownerDocument.defaultView;return b||dc},kc=Wa(0,0,0,0),lc=function(){return"undefined"==typeof SVGGraphicsElement?function(a){return a instanceof jc(a).SVGElement&&"function"==typeof a.getBBox}:function(a){return a instanceof jc(a).SVGGraphicsElement}}(),mc=function(){function a(a){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Wa(0,0,0,0),this.target=a}return a.prototype.isActive=function(){var a=Ua(this.target);return this.contentRect_=a,a.width!==this.broadcastWidth||a.height!==this.broadcastHeight},a.prototype.broadcastRect=function(){var a=this.contentRect_;return this.broadcastWidth=a.width,this.broadcastHeight=a.height,a},a}(),nc=function(){return function(a,b){var c=Va(b);ic(this,{target:a,contentRect:c})}}(),oc=function(){function a(a,b,c){if(this.activeObservations_=[],this.observations_=new bc,"function"!=typeof a)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=a,this.controller_=b,this.callbackCtx_=c}return a.prototype.observe=function(a){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(a instanceof jc(a).Element))throw new TypeError("parameter 1 is not of type \"Element\".");var b=this.observations_;b.has(a)||(b.set(a,new mc(a)),this.controller_.addObserver(this),this.controller_.refresh())}},a.prototype.unobserve=function(a){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(a instanceof jc(a).Element))throw new TypeError("parameter 1 is not of type \"Element\".");var b=this.observations_;b.has(a)&&(b.delete(a),!b.size&&this.controller_.removeObserver(this))}},a.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},a.prototype.gatherActive=function(){var a=this;this.clearActive(),this.observations_.forEach(function(b){b.isActive()&&a.activeObservations_.push(b)})},a.prototype.broadcastActive=function(){if(this.hasActive()){var a=this.callbackCtx_,b=this.activeObservations_.map(function(a){return new nc(a.target,a.broadcastRect())});this.callback_.call(a,b,a),this.clearActive()}},a.prototype.clearActive=function(){this.activeObservations_.splice(0)},a.prototype.hasActive=function(){return 0<this.activeObservations_.length},a}(),pc="undefined"==typeof WeakMap?new bc:new WeakMap,qc=function(){function a(b){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var c=hc.getInstance(),d=new oc(b,c,this);pc.set(this,d)}return a}();["observe","unobserve","disconnect"].forEach(function(a){qc.prototype[a]=function(){var b;return(b=pc.get(this))[a].apply(b,arguments)}});var rc=function(){return"undefined"==typeof dc.ResizeObserver?qc:dc.ResizeObserver}(),sc={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},tc=a=>function(){for(var b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];return{_$litDirective$:a,values:c}};class uc{constructor(){}get _$AU(){return this._$AM._$AU}_$AT(a,b,c){this._$Ct=a,this._$AM=b,this._$Ci=c}_$AS(a,b){return this.update(a,b)}update(a,b){return this.render(...b)}}var vc=tc(class extends uc{constructor(a){var b;if(super(a),a.type!==sc.ATTRIBUTE||"class"!==a.name||2<(null===(b=a.strings)||void 0===b?void 0:b.length))throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(a){return" "+Object.keys(a).filter(b=>a[b]).join(" ")+" "}update(a,b){var c,d,[f]=b;if(void 0===this.et){for(var e in this.et=new Set,void 0!==a.strings&&(this.st=new Set(a.strings.join(" ").split(/\s/).filter(a=>""!==a))),f)!f[e]||null!==(c=this.st)&&void 0!==c&&c.has(e)||this.et.add(e);return this.render(f)}var g=a.element.classList;for(var h in this.et.forEach(a=>{a in f||(g.remove(a),this.et.delete(a))}),f){var i=!!f[h];i===this.et.has(h)||(null===(d=this.st)||void 0===d?void 0:d.has(h))||(i?(g.add(h),this.et.add(h)):(g.remove(h),this.et.delete(h)))}return $}}),wc=tc(class extends uc{constructor(a){var b;if(super(a),a.type!==sc.ATTRIBUTE||"style"!==a.name||2<(null===(b=a.strings)||void 0===b?void 0:b.length))throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(a){return Object.keys(a).reduce((b,c)=>{var d=a[c];return null==d?b:b+"".concat(c=c.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase(),":").concat(d,";")},"")}update(a,b){var[c]=b,{style:d}=a.element;if(void 0===this.ct){for(var e in this.ct=new Set,c)this.ct.add(e);return this.render(c)}for(var f in this.ct.forEach(a=>{null==c[a]&&(this.ct.delete(a),a.includes("-")?d.removeProperty(a):d[a]="")}),c){var g=c[f];null!=g&&(this.ct.add(f),f.includes("-")?d.setProperty(f,g):d[f]=g)}return $}}),xc=vb(p||(p=j(["\n :host {\n overflow: visible !important;\n display: block;\n --mc-scale: var(--mini-climate-scale, 1);\n --mc-unit: calc(var(--mc-scale) * 40px);\n --mc-name-font-weight: var(--mini-climate-name-font-weight, 400);\n --mc-info-font-weight: var(--mini-climate-info-font-weight, 300);\n --mc-entity-info-left-offset: 8px;\n --mc-accent-color: var(--mini-climate-accent-color, var(--accent-color, #f39c12));\n --mc-text-color: var(--mini-climate-base-color, var(--primary-text-color, #000));\n --mc-active-color: var(--mc-accent-color);\n --mc-button-color: var(--mini-climate-button-color, var(--paper-item-icon-color, #44739e));\n --mc-icon-color:\n var(--mini-climate-icon-color,\n var(--mini-climate-base-color,\n var(--paper-item-icon-color, #44739e)));\n --mc-icon-active-color: var(--paper-item-icon-active-color, --mc-active-color);\n --mc-info-opacity: 1;\n --mc-bg-opacity: var(--mini-climate-background-opacity, 1);\n color: var(--mc-text-color);\n --mc-dropdown-unit: calc(var(--mc-unit) * .75);\n --paper-item-min-height: var(--mc-unit);\n --mdc-icon-button-size: calc(var(--mc-unit) * 0.75);\n }\n ha-card.--group {\n box-shadow: none;\n }\n ha-card.--bg {\n --mc-info-opacity: .75;\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(--mc-unit) * 0.35);\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 header {\n display: none;\n }\n .mc__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(--mc-bg-opacity);\n border-radius: var(--ha-card-border-radius, 0);\n }\n ha-card.--group .mc__bg {\n background: none;\n }\n .mc-climate {\n align-self: flex-end;\n box-sizing: border-box;\n position: relative;\n padding: 16px 16px 0px 16px;\n transition: padding .25s ease-out;\n width: 100%;\n will-change: padding;\n }\n .flex {\n display: flex;\n display: -ms-flexbox;\n display: -webkit-flex;\n flex-direction: row;\n }\n .mc-climate__core {\n position: relative;\n padding-right: 5px;\n }\n .entity__info {\n user-select: none;\n margin-left: var(--mc-entity-info-left-offset);\n flex: 1;\n min-width: 0;\n white-space: nowrap;\n }\n .entity__icon {\n color: var(--mc-icon-color);\n white-space: nowrap;\n }\n .entity__icon[color] {\n color: var(--mc-icon-active-color);\n }\n .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(--mc-unit);\n width: var(--mc-unit);\n min-width: var(--mc-unit);\n line-height: var(--mc-unit);\n margin-right: calc(var(--mc-unit) / 5);\n position: relative;\n text-align: center;\n will-change: border-color;\n transition: border-color .25s ease-out;\n }\n .entity__info__name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n line-height: calc(var(--mc-unit) / 2);\n color: var(--mc-text-color);\n font-weight: var(--mc-name-font-weight);\n }\n .entity__secondary_info {\n margin-top: -2px;\n }\n ha-card.--initial .mc-climate {\n padding: 16px 16px 5px 16px;\n }\n ha-card.--unavailable .mc-climate {\n padding: 16px;\n }\n ha-card.--group .mc-climate {\n padding: 2px 0 0 0;\n }\n .toggle-button {\n width: calc(var(--mc-unit) * .75);\n height: calc(var(--mc-unit) * .75);\n --mdc-icon-button-size: calc(var(--mc-unit) * .75);\n color: var(--mc-icon-color);\n margin-left: auto;\n margin-top: calc(var(--mc-unit) * -.125);\n margin-right: calc(var(--mc-unit) * .05);\n --ha-icon-display: flex;\n }\n .toggle-button.open {\n transform: rotate(180deg);\n color: var(--mc-active-color);\n }\n .wrap {\n display: flex;\n flex-direction: row;\n }\n .entity__controls {\n margin-left: auto;\n display: flex;\n white-space: nowrap;\n margin-top: calc(var(--mc-unit) * -.25);\n }\n .ctl-wrap {\n display: flex;\n flex-direction: row;\n margin-left: auto;\n margin-top: auto;\n margin-bottom: 0;\n --ha-icon-display: flex;\n }\n .bottom {\n margin-top: calc(var(--mc-unit) * .05);\n height: calc(var(--mc-unit) * .625);;\n }\n .entity__info__name_wrap {\n margin-right: 10px;\n max-width: calc(calc(var(--mc-card-width) - 191.3px) / 1.43);\n min-width: calc(var(--mc-unit) * 2.5);\n cursor: pointer;\n height: var(--mc-unit);\n }\n mc-buttons {\n width: 100%;\n justify-content: space-evenly;\n display: flex;\n --ha-icon-display: flex;\n }\n mc-temperature {\n min-width: 0;\n }\n .--unavailable .ctl-wrap {\n margin-left: auto;\n margin-top: auto;\n margin-bottom: auto;\n }\n .--unavailable .entity__info {\n margin-top: auto;\n margin-bottom: auto;\n }\n .mc-toggle_content {\n margin-top: calc(var(--mc-unit) * .05);\n }\n .ctl-wrap mc-dropdown, .ctl-wrap mc-button {\n min-width: calc(var(--mc-unit) * .75);\n margin-right: 3px;\n }\n .ctl-wrap mc-button {\n width: calc(var(--mc-unit) * 0.75);\n height: calc(var(--mc-unit) * 0.75);\n }\n"]))),yc=vb(q||(q=j(["\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(--mc-unit) * .6);\n height: calc(var(--mc-unit) * .6);\n }\n ha-icon-button {\n color: var(--mc-button-color);\n transition: color .25s;\n }\n ha-icon-button[color] {\n color: var(--mc-icon-active-color) !important;\n opacity: 1 !important;\n }\n ha-icon-button[inactive] {\n opacity: .5;\n }\n"]))),zc=(a,b,c,d)=>{var f;if(c)switch(c.action){case"more-info":{f=new Event("hass-more-info",{composed:!0}),f.detail={entityId:c.entity||d},a.dispatchEvent(f);break}case"navigate":{if(!c.navigation_path)return;window.history.pushState(null,"",c.navigation_path),f=new Event("location-changed",{composed:!0}),f.detail={replace:!1},window.dispatchEvent(f);break}case"call-service":{if(!c.service)return;var[g,h]=c.service.split(".",2),i=l({},c.service_data);b.callService(g,h,i);break}case"url":{if(!c.url)return;window.location.href=c.url}}},Ac=function(a,b){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:"unknown",d=a.selectedLanguage||a.language,e=a.resources[d];if(!e)return c;for(var f,g=0;g<b.length;g+=1)if(f=b[g],e[f])return e[f];return c};console.info("%c MINI-CLIMATE-CARD %c ".concat("v2.0.0"," "),"color: white; background: coral; font-weight: 700;","color: coral; background: white; font-weight: 700;");var Bc={DEFAULT:"mdi:air-conditioner",FAN:"mdi:fan",OFF:"mdi:power",HEAT:"mdi:weather-sunny",AUTO:"mdi:cached",COOL:"mdi:snowflake",HEAT_COOL:"mdi:sun-snowflake",DRY:"mdi:water",FAN_ONLY:"mdi:fan",TOGGLE:"mdi:dots-horizontal",UP:"mdi:chevron-up",DOWN:"mdi:chevron-down"},Cc=["closed","locked","off"],Dc=["unavailable","unknown"],Ec=["more-info","navigate","call-service","url"],Fc="-",Gc=a=>a?Cc.includes(a)||Dc.includes(a)?Cc.includes(a)&&!Dc.includes(a)?"on":a:"off":a,Hc=(a,b)=>a?b?b.attribute?a.attributes[b.attribute]:a.state:a.state:void 0,Ic=(a,b)=>+"".concat(La(+"".concat(a,"e").concat(b)),"e-").concat(b),Jc=(a,b)=>{try{return new Function("","return ".concat(a)).call(b||{})}catch(b){throw new Error("\n[COMPILE ERROR]: [".concat(b.toString(),"]\n[SOURCE]: ").concat(a,"\n"))}};class Kc{constructor(a,b,c){this.temperatureEntity=a||{},this.targetTemperatureEntity=b||{},this.config=c}get unit(){return this.config.temperature.unit||this.config.target_temperature.unit}get step(){var a=this.targetTemperatureEntity;return"step"in this.config.target_temperature?this.config.target_temperature.step:a&&a.attributes&&a.attributes.target_temp_step?a.attributes.target_temp_step:1}get value(){var a=this.rawValue;if(a!==void 0){if("fixed"in this.config.temperature)return parseFloat(a.toString()).toFixed(this.config.temperature.fixed);if("round"in this.config.temperature)return Ic(a,this.config.temperature.round)}return a}get rawValue(){return Hc(this.temperatureEntity,this.config.temperature.source)}}class Lc{constructor(a,b,c){this.entity=a||{},this.config=b,this._hass=c,this.min=this.getMin(),this.max=this.getMax(),this.step=this.getStep()}get hass(){return this._hass}get icons(){return this.config.target_temperature.icons}getStep(){return"step"in this.config.target_temperature?parseFloat(this.config.target_temperature.step):this.entity&&this.entity.attributes&&this.entity.attributes.target_temp_step?parseFloat(this.entity.attributes.target_temp_step):1}getMin(){return"min"in this.config.target_temperature?parseFloat(this.config.target_temperature.min):this.entity&&this.entity.attributes&&this.entity.attributes.min_temp?parseFloat(this.entity.attributes.min_temp):16}getMax(){return"max"in this.config.target_temperature?parseFloat(this.config.target_temperature.max):this.entity&&this.entity.attributes&&this.entity.attributes.max_temp?parseFloat(this.entity.attributes.max_temp):30}_floatOrPlaceholder(a){return Ka(a)?Fc:a}get value(){if(this._targetTemperature!==void 0)return this._floatOrPlaceholder(parseFloat(this._targetTemperature));var a=Hc(this.entity,this.config.target_temperature.source);return this._floatOrPlaceholder(parseFloat(a))}set value(a){this._targetTemperature=parseFloat(a)}increment(){var a=this.value;if(a===Fc)return!1;var b=this._round(this.value+this.step);return this.value=b<=this.max?b<=this.min?this.min:b:this.max,a!==this.value}decrement(){var a=this.value;if(a===Fc)return!1;var b=this._round(this.value-this.step);return this.value=b>=this.min?b:this.min,a!==this.value}_round(a){var b=this.step.toString().split(".");return b[1]?parseFloat(a.toFixed(b[1].length)):La(a)}update(a){if(this.config.target_temperature.functions.change_action){var b=this.hass[this.config.entity];return this.config.target_temperature.functions.change_action(a,this.entity,b)}return this.hass.callService("climate","set_temperature",{entity_id:this.entity.entity_id,temperature:a})}}class Mc{constructor(a,b,c,d){this.config=b||{},this.entity=a||{},this.climate=c||{},this._hass=d||{}}get id(){return this.config.id}get location(){return this.config.location||"bottom"}get hass(){return this._hass}get type(){return this.config.type}get order(){return this.config.order}get hide(){return this.config.hide}get icon(){return this.config.icon}get originalState(){return Hc(this.entity,this.config.state)}get state(){var a=this.originalState;return this.config.functions.state&&this.config.functions.state.mapper&&(a=this.config.functions.state.mapper(a,this.entity,this.climate.entity,this.climate.mode)),a}isActive(a){return!!this.config.functions.active&&this.config.functions.active(a,this.entity,this.climate.entity,this.climate.mode)}get isUnavailable(){return this.entity===void 0||Dc.includes(this.state)}get isOn(){return this.entity!==void 0&&!Cc.includes(this.state)&&!Dc.includes(this.state)}get disabled(){return!!this.config.functions.disabled&&this.config.functions.disabled(this.state,this.entity,this.climate.entity,this.climate.mode)}get style(){return this.config.functions.style?this.config.functions.style(this.state,this.entity,this.climate.entity,this.climate.mode)||{}:{}}get source(){var{functions:a}=this.config,b=Object.entries(this.config.source||{}).filter(a=>{var[b]=a;return"__filter"!==b}).map(a=>{var[b,c]=a;return"object"==typeof c?l({id:b},c||{}):{id:b,name:c}});return b.some(a=>"order"in a)&&(b=b.sort((c,a)=>c.order>a.order?1:a.order>c.order?-1:0)),a.source&&a.source.filter?a.source.filter(b,this.state,this.entity,this.climate.entity,this.climate.mode):b}get selected(){var{state:a}=this;return void 0===a||null===a?void 0:this.source.find(b=>b.id===a.toString())}get actionTimeout(){return"action_timeout"in this.config?this.config.action_timeout:2e3}handleToggle(){return this.config.functions.toggle_action?this.config.functions.toggle_action(this.state,this.entity,this.climate.entity,this.climate.mode):this.climate.callService("switch","toggle",{entity_id:this.entity.entity_id})}handleChange(a){return this.config.functions.change_action?this.config.functions.change_action(a,this.state,this.entity,this.climate.entity,this.climate.mode):void 0}}class Nc{constructor(a,b,c,d){this.config=b||{},this.entity=a||{},this.climate=c||{},this._hass=d||{}}get id(){return this.config.id}get hass(){return this._hass}get originalValue(){return Hc(this.entity,this.config.source)}get value(){var a=this.originalValue;return this.config.functions.mapper&&(a=this.config.functions.mapper(a,this.entity,this.climate.entity,this.climate.mode)),"round"in this.config&&!1===Ka(a)&&(a=Ic(a,this.config.round)),a}get unit(){return this.config.unit}get icon(){if(this.config.functions.icon&&this.config.functions.icon.template)return this.config.functions.icon.template(this.value,this.entity,this.climate.entity,this.climate.mode);return this.config.icon&&"string"==typeof this.config.icon?this.config.icon:""}get iconStyle(){return this.config.functions.icon&&this.config.functions.icon.style?this.config.functions.icon.style(this.value,this.entity,this.climate.entity,this.climate.mode)||{}:{}}}class Oc{constructor(a,b,c){this.hass=a||{},this.config=b||{},this.entity=c||{},this.state=c.state,this.attr=l({friendly_name:"",temperature:16,current_temperature:24,fan_mode:"",hvac_modes:[],target_temp_step:void 0,min_temp:void 0,max_temp:void 0,hvac_action:"",fan_modes:[]},c.attributes||{})}get lastChanged(){return this.entity.last_changed}get hvacAction(){var a=this.config.secondary_info&&this.config.secondary_info.source||{},b=this.attr.hvac_action,c={id:b};return c.name=Ac(this.hass,["".concat("state_attributes.climate.hvac_action",".").concat(b)],b),b in a&&("string"==typeof a[b]?c.name=a[b]:c=l(l({},c),a[b])),c}get mode(){return this._hvac_mode}set mode(a){this._hvac_mode=a}get defaultHvacModes(){for(var a=this.attr.hvac_modes,b=[],c=0;c<a.length;c+=1){var d=a[c],e=["state.climate.".concat(d),"component.climate.state._.".concat(d)],f={id:d,name:Ac(this.hass,e,d)},g=d.toString().toUpperCase();g in Bc&&(f.icon=Bc[g]),b.push(f)}return b}get defaultFanModes(){for(var a,b=this.attr.fan_modes,c={},d=0;d<b.length;d+=1)a=b[d],c[a]=Ac(this.hass,["".concat("state_attributes.climate.fan_mode",".").concat(a)],a);return c}get id(){return this.entity.entity_id}get icon(){return this.attr.icon}get name(){return this.attr.friendly_name||""}get isOff(){return this.entity!==void 0&&Cc.includes(this.state)&&!Dc.includes(this.state)}get isActive(){return!1===this.isOff&&!1===this.isUnavailable||!1}get isUnavailable(){return this.entity===void 0||Dc.includes(this.state)}get isOn(){return this.entity!==void 0&&!Cc.includes(this.state)&&!Dc.includes(this.state)}callService(a,b,c){return this.hass.callService(a,b,l({entity_id:this.config.entity},c))}}class Pc{constructor(a,b,c){this.config=b||{},this.entity=a||{},this.climate=c||{}}get hide(){return this.config.hide}get originalState(){return Hc(this.entity,this.config.state)}get state(){var a=this.originalState;return this.config.functions.state&&this.config.functions.state.mapper&&(a=this.config.functions.state.mapper(a,this.entity,this.climate.entity)),a}isActive(a){return!!this.config.functions.active&&this.config.functions.active(a,this.entity,this.climate.entity)}get disabled(){return!!this.config.functions.disabled&&this.config.functions.disabled(this.state,this.entity,this.climate.entity)}get style(){return this.config.functions.style?this.config.functions.style(this.state,this.entity,this.climate.entity)||{}:{}}get source(){var{functions:a}=this.config,b=Object.entries(this.config.source||{}).filter(a=>{var[b]=a;return"__filter"!==b}).map(a=>{var[b,c]=a;return"object"==typeof c?l({id:b},c||{}):{id:b,name:c}});return b.some(a=>"order"in a)&&(b=b.sort((c,a)=>c.order>a.order?1:a.order>c.order?-1:0)),a.source&&a.source.filter?a.source.filter(b,this.state,this.entity,this.climate.entity):b}get selected(){var{state:a}=this;return void 0===a||null===a?void 0:this.source.find(b=>b.id===a.toString())}handleChange(a){return this.config.functions.change_action?this.config.functions.change_action(a,this.entity,this.climate.entity):void 0}}var Qc=(a,b)=>a.reduce((a,c)=>(c.defineId?a[c.defineId]=c:c.promise.then(a=>{void 0===b.registry.get(c.name)&&b.registry.define(c.name,a)}),a),{});class Rc extends Xa($b){static get defineId(){return"mc-temperature"}static get elementDefinitions(){return Qc([],Rc)}static get properties(){return{temperature:Object,changing:Boolean,target:Number}}get targetStr(){var a=this.temperature.step.toString().split(".");return a[1]?parseFloat(this.target.toString()).toFixed(a[1].length):this.target}renderTemperature(){return void 0===this.temperature.value?"":g(r||(r=j(["\n <span class='state__value'>/</span>\n <span class='state__value'>","</span>"])),this.temperature.value)}render(){if(!this.temperature)return"";var a=this.changing?"changing":"",{unit:b}=this.temperature;return g(s||(s=j(["\n <div class='state ellipsis'>\n <span class='state__value ","'>","</span>\n ","\n <span class='state__uom'>","</span>\n </div>\n "])),a,this.targetStr,this.renderTemperature(),b)}static get styles(){return vb(t||(t=j(["\n .state {\n margin-top:calc(var(--mc-unit) * .15);\n }\n .state__value {\n font-weight: var(--mc-info-font-weight);\n line-height: calc(var(--mc-unit) * .475);\n font-size: calc(var(--mc-unit) * .475);\n }\n .state__uom {\n font-size: calc(var(--mc-unit) * 0.35);\n font-weight: var(--mc-name-font-weight);\n opacity: 0.6;\n line-height: calc(var(--mc-unit) * 0.475);\n }\n .ellipsis {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .changing {\n color: var(--mc-accent-color);\n }\n "])))}}var Sc=a=>({name:a,promise:customElements.whenDefined(a).then(()=>customElements.get(a))});class Tc extends Xa($b){static get defineId(){return"mc-target-temperature"}static get elementDefinitions(){return Qc([Sc("ha-icon"),Sc("ha-icon-button")],Tc)}constructor(){super(),this.timeout=800}static get properties(){return{targetTemperature:{type:Object}}}increment(a){a.stopPropagation();var b=this.targetTemperature.increment();b&&(this.temp_last_changed=Date.now(),this.targetTemperatureChanged())}decrement(a){a.stopPropagation();var b=this.targetTemperature.decrement();b&&(this.temp_last_changed=Date.now(),this.targetTemperatureChanged())}sendChangeEvent(a){var b=new CustomEvent("changing",{detail:{changing:a}});this.dispatchEvent(b)}targetTemperatureChanged(){this.temp_last_changed&&(this.sendChangeEvent(!0),window.setTimeout(()=>{var a=Date.now();if(a-this.temp_last_changed>=this.timeout){var{value:b}=this.targetTemperature;try{this.targetTemperature.update(b)}finally{this.sendChangeEvent(!1),this.temp_last_changed=null}}},this.timeout+10))}render(){return this.targetTemperature?g(u||(u=j(["\n <div class='controls-wrap'>\n <ha-icon-button class='temp --up'\n .icon=","\n @click=",">\n <ha-icon .icon=","></ha-icon>\n </ha-icon-button>\n <ha-icon-button class='temp --down'\n .icon=","\n @click=",">\n <ha-icon .icon=","></ha-icon>\n </ha-icon-button>\n </div>\n "])),this.targetTemperature.icons.up,a=>this.increment(a),this.targetTemperature.icons.up,this.targetTemperature.icons.down,a=>this.decrement(a),this.targetTemperature.icons.down):""}static get styles(){return vb(v||(v=j(["\n .controls-wrap {\n display: flex;\n flex-direction: column;\n height: 100%;\n --ha-icon-display: flex;\n }\n .temp {\n width: calc(var(--mc-unit) * .75);\n height: calc(var(--mc-unit) * .75);\n --mdc-icon-button-size: calc(var(--mc-unit) * .75);\n color: var(--mc-icon-color);\n }\n .temp.--up {\n margin-top: -2px;\n }\n .temp.--down {\n margin-top: -2px;\n }\n .temp.--down {\n margin-top: auto;\n }\n "])))}}var Uc,Vc={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},Wc={ARIA_CHECKED_ATTR:"aria-checked",ARIA_DISABLED_ATTR:"aria-disabled",CHECKBOX_SELECTOR:"input[type=\"checkbox\"]",LIST_SELECTOR:".mdc-list,.mdc-deprecated-list",SELECTED_EVENT:"MDCMenu:selected",SKIP_RESTORE_FOCUS:"data-menu-item-skip-restore-focus"},Xc={FOCUS_ROOT_INDEX:-1};(function(a){a[a.NONE=0]="NONE",a[a.LIST_ROOT=1]="LIST_ROOT",a[a.FIRST_ITEM=2]="FIRST_ITEM",a[a.LAST_ITEM=3]="LAST_ITEM"})(Uc||(Uc={}));var Yc,Zc,$c,_c=function(a,c){return _c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,c){a.__proto__=c}||function(a,c){for(var b in c)Object.prototype.hasOwnProperty.call(c,b)&&(a[b]=c[b])},_c(a,c)},ad=function(){return ad=Object.assign||function(a){for(var b,c=1,d=arguments.length;c<d;c++)for(var e in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,e)&&(a[e]=b[e]);return a},ad.apply(this,arguments)},bd=function(){function a(a){void 0===a&&(a={}),this.adapter=a}return Object.defineProperty(a,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(a,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(a,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(a,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),a.prototype.init=function(){},a.prototype.destroy=function(){},a}(),cd={LIST_ITEM_ACTIVATED_CLASS:"mdc-list-item--activated",LIST_ITEM_CLASS:"mdc-list-item",LIST_ITEM_DISABLED_CLASS:"mdc-list-item--disabled",LIST_ITEM_SELECTED_CLASS:"mdc-list-item--selected",LIST_ITEM_TEXT_CLASS:"mdc-list-item__text",LIST_ITEM_PRIMARY_TEXT_CLASS:"mdc-list-item__primary-text",ROOT:"mdc-list"},dd=(Yc={},Yc[""+cd.LIST_ITEM_ACTIVATED_CLASS]="mdc-list-item--activated",Yc[""+cd.LIST_ITEM_CLASS]="mdc-list-item",Yc[""+cd.LIST_ITEM_DISABLED_CLASS]="mdc-list-item--disabled",Yc[""+cd.LIST_ITEM_SELECTED_CLASS]="mdc-list-item--selected",Yc[""+cd.LIST_ITEM_PRIMARY_TEXT_CLASS]="mdc-list-item__primary-text",Yc[""+cd.ROOT]="mdc-list",Yc),ed=(Zc={},Zc[""+cd.LIST_ITEM_ACTIVATED_CLASS]="mdc-deprecated-list-item--activated",Zc[""+cd.LIST_ITEM_CLASS]="mdc-deprecated-list-item",Zc[""+cd.LIST_ITEM_DISABLED_CLASS]="mdc-deprecated-list-item--disabled",Zc[""+cd.LIST_ITEM_SELECTED_CLASS]="mdc-deprecated-list-item--selected",Zc[""+cd.LIST_ITEM_TEXT_CLASS]="mdc-deprecated-list-item__text",Zc[""+cd.LIST_ITEM_PRIMARY_TEXT_CLASS]="mdc-deprecated-list-item__primary-text",Zc[""+cd.ROOT]="mdc-deprecated-list",Zc),fd={ACTION_EVENT:"MDCList:action",ARIA_CHECKED:"aria-checked",ARIA_CHECKED_CHECKBOX_SELECTOR:"[role=\"checkbox\"][aria-checked=\"true\"]",ARIA_CHECKED_RADIO_SELECTOR:"[role=\"radio\"][aria-checked=\"true\"]",ARIA_CURRENT:"aria-current",ARIA_DISABLED:"aria-disabled",ARIA_ORIENTATION:"aria-orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_ROLE_CHECKBOX_SELECTOR:"[role=\"checkbox\"]",ARIA_SELECTED:"aria-selected",ARIA_INTERACTIVE_ROLES_SELECTOR:"[role=\"listbox\"], [role=\"menu\"]",ARIA_MULTI_SELECTABLE_SELECTOR:"[aria-multiselectable=\"true\"]",CHECKBOX_RADIO_SELECTOR:"input[type=\"checkbox\"], input[type=\"radio\"]",CHECKBOX_SELECTOR:"input[type=\"checkbox\"]",CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:"\n ."+cd.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+cd.LIST_ITEM_CLASS+" a,\n ."+ed[cd.LIST_ITEM_CLASS]+" button:not(:disabled),\n ."+ed[cd.LIST_ITEM_CLASS]+" a\n ",DEPRECATED_SELECTOR:".mdc-deprecated-list",FOCUSABLE_CHILD_ELEMENTS:"\n ."+cd.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+cd.LIST_ITEM_CLASS+" a,\n ."+cd.LIST_ITEM_CLASS+" input[type=\"radio\"]:not(:disabled),\n ."+cd.LIST_ITEM_CLASS+" input[type=\"checkbox\"]:not(:disabled),\n ."+ed[cd.LIST_ITEM_CLASS]+" button:not(:disabled),\n ."+ed[cd.LIST_ITEM_CLASS]+" a,\n ."+ed[cd.LIST_ITEM_CLASS]+" input[type=\"radio\"]:not(:disabled),\n ."+ed[cd.LIST_ITEM_CLASS]+" input[type=\"checkbox\"]:not(:disabled)\n ",RADIO_SELECTOR:"input[type=\"radio\"]",SELECTED_ITEM_SELECTOR:"[aria-selected=\"true\"], [aria-current=\"true\"]"},gd={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300},hd=function(a,c){return hd=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,c){a.__proto__=c}||function(a,c){for(var b in c)Object.prototype.hasOwnProperty.call(c,b)&&(a[b]=c[b])},hd(a,c)},id=function(){return id=Object.assign||function(a){for(var b,c=1,d=arguments.length;c<d;c++)for(var e in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,e)&&(a[e]=b[e]);return a},id.apply(this,arguments)},jd={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",IS_OPEN_BELOW:"mdc-menu-surface--is-open-below",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},kd={CLOSED_EVENT:"MDCMenuSurface:closed",CLOSING_EVENT:"MDCMenuSurface:closing",OPENED_EVENT:"MDCMenuSurface:opened",FOCUSABLE_ELEMENTS:"button:not(:disabled), [href]:not([aria-disabled=\"true\"]), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"]):not([aria-disabled=\"true\"])"},ld={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67,TOUCH_EVENT_WAIT_MS:30};(function(a){a[a.BOTTOM=1]="BOTTOM",a[a.CENTER=2]="CENTER",a[a.RIGHT=4]="RIGHT",a[a.FLIP_RTL=8]="FLIP_RTL"})($c||($c={}));var md;(function(a){a[a.TOP_LEFT=0]="TOP_LEFT",a[a.TOP_RIGHT=4]="TOP_RIGHT",a[a.BOTTOM_LEFT=1]="BOTTOM_LEFT",a[a.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",a[a.TOP_START=8]="TOP_START",a[a.TOP_END=12]="TOP_END",a[a.BOTTOM_START=9]="BOTTOM_START",a[a.BOTTOM_END=13]="BOTTOM_END"})(md||(md={}));var nd=function(a){function b(c){var d=a.call(this,id(id({},b.defaultAdapter),c))||this;return d.isSurfaceOpen=!1,d.isQuickOpen=!1,d.isHoistedElement=!1,d.isFixedPosition=!1,d.isHorizontallyCenteredOnViewport=!1,d.maxHeight=0,d.openBottomBias=0,d.openAnimationEndTimerId=0,d.closeAnimationEndTimerId=0,d.animationRequestId=0,d.anchorCorner=md.TOP_START,d.originCorner=md.TOP_START,d.anchorMargin={top:0,right:0,bottom:0,left:0},d.position={x:0,y:0},d}return $a(b,a),Object.defineProperty(b,"cssClasses",{get:function(){return jd},enumerable:!1,configurable:!0}),Object.defineProperty(b,"strings",{get:function(){return kd},enumerable:!1,configurable:!0}),Object.defineProperty(b,"numbers",{get:function(){return ld},enumerable:!1,configurable:!0}),Object.defineProperty(b,"Corner",{get:function(){return md},enumerable:!1,configurable:!0}),Object.defineProperty(b,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},isElementInContainer:function(){return!1},isFocused:function(){return!1},isRtl:function(){return!1},getInnerDimensions:function(){return{height:0,width:0}},getAnchorDimensions:function(){return null},getWindowDimensions:function(){return{height:0,width:0}},getBodyDimensions:function(){return{height:0,width:0}},getWindowScroll:function(){return{x:0,y:0}},setPosition:function(){},setMaxHeight:function(){},setTransformOrigin:function(){},saveFocus:function(){},restoreFocus:function(){},notifyClose:function(){},notifyOpen:function(){},notifyClosing:function(){}}},enumerable:!1,configurable:!0}),b.prototype.init=function(){var a=b.cssClasses,c=a.ROOT,d=a.OPEN;if(!this.adapter.hasClass(c))throw new Error(c+" class required in root element.");this.adapter.hasClass(d)&&(this.isSurfaceOpen=!0)},b.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId),clearTimeout(this.closeAnimationEndTimerId),cancelAnimationFrame(this.animationRequestId)},b.prototype.setAnchorCorner=function(a){this.anchorCorner=a},b.prototype.flipCornerHorizontally=function(){this.originCorner^=$c.RIGHT},b.prototype.setAnchorMargin=function(a){this.anchorMargin.top=a.top||0,this.anchorMargin.right=a.right||0,this.anchorMargin.bottom=a.bottom||0,this.anchorMargin.left=a.left||0},b.prototype.setIsHoisted=function(a){this.isHoistedElement=a},b.prototype.setFixedPosition=function(a){this.isFixedPosition=a},b.prototype.isFixed=function(){return this.isFixedPosition},b.prototype.setAbsolutePosition=function(a,b){this.position.x=this.isFinite(a)?a:0,this.position.y=this.isFinite(b)?b:0},b.prototype.setIsHorizontallyCenteredOnViewport=function(a){this.isHorizontallyCenteredOnViewport=a},b.prototype.setQuickOpen=function(a){this.isQuickOpen=a},b.prototype.setMaxHeight=function(a){this.maxHeight=a},b.prototype.setOpenBottomBias=function(a){this.openBottomBias=a},b.prototype.isOpen=function(){return this.isSurfaceOpen},b.prototype.open=function(){var a=this;this.isSurfaceOpen||(this.adapter.saveFocus(),this.isQuickOpen?(this.isSurfaceOpen=!0,this.adapter.addClass(b.cssClasses.OPEN),this.dimensions=this.adapter.getInnerDimensions(),this.autoposition(),this.adapter.notifyOpen()):(this.adapter.addClass(b.cssClasses.ANIMATING_OPEN),this.animationRequestId=requestAnimationFrame(function(){a.dimensions=a.adapter.getInnerDimensions(),a.autoposition(),a.adapter.addClass(b.cssClasses.OPEN),a.openAnimationEndTimerId=setTimeout(function(){a.openAnimationEndTimerId=0,a.adapter.removeClass(b.cssClasses.ANIMATING_OPEN),a.adapter.notifyOpen()},ld.TRANSITION_OPEN_DURATION)}),this.isSurfaceOpen=!0))},b.prototype.close=function(a){var c=this;if(void 0===a&&(a=!1),!!this.isSurfaceOpen)return this.adapter.notifyClosing(),this.isQuickOpen?(this.isSurfaceOpen=!1,a||this.maybeRestoreFocus(),this.adapter.removeClass(b.cssClasses.OPEN),this.adapter.removeClass(b.cssClasses.IS_OPEN_BELOW),void this.adapter.notifyClose()):void(this.adapter.addClass(b.cssClasses.ANIMATING_CLOSED),requestAnimationFrame(function(){c.adapter.removeClass(b.cssClasses.OPEN),c.adapter.removeClass(b.cssClasses.IS_OPEN_BELOW),c.closeAnimationEndTimerId=setTimeout(function(){c.closeAnimationEndTimerId=0,c.adapter.removeClass(b.cssClasses.ANIMATING_CLOSED),c.adapter.notifyClose()},ld.TRANSITION_CLOSE_DURATION)}),this.isSurfaceOpen=!1,!a&&this.maybeRestoreFocus())},b.prototype.handleBodyClick=function(a){var b=a.target;this.adapter.isElementInContainer(b)||this.close()},b.prototype.handleKeydown=function(a){var b=a.keyCode,c=a.key;("Escape"===c||27===b)&&this.close()},b.prototype.autoposition=function(){var a;this.measurements=this.getAutoLayoutmeasurements();var c=this.getoriginCorner(),d=this.getMenuSurfaceMaxHeight(c),e=this.hasBit(c,$c.BOTTOM)?"bottom":"top",f=this.hasBit(c,$c.RIGHT)?"right":"left",g=this.getHorizontalOriginOffset(c),h=this.getVerticalOriginOffset(c),i=this.measurements,j=i.anchorSize,k=i.surfaceSize,l=(a={},a[f]=g,a[e]=h,a);j.width/k.width>ld.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(f="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(l),this.adapter.setTransformOrigin(f+" "+e),this.adapter.setPosition(l),this.adapter.setMaxHeight(d?d+"px":""),this.hasBit(c,$c.BOTTOM)||this.adapter.addClass(b.cssClasses.IS_OPEN_BELOW)},b.prototype.getAutoLayoutmeasurements=function(){var a=this.adapter.getAnchorDimensions(),b=this.adapter.getBodyDimensions(),c=this.adapter.getWindowDimensions(),d=this.adapter.getWindowScroll();return a||(a={top:this.position.y,right:this.position.x,bottom:this.position.y,left:this.position.x,width:0,height:0}),{anchorSize:a,bodySize:b,surfaceSize:this.dimensions,viewportDistance:{top:a.top,right:c.width-a.right,bottom:c.height-a.bottom,left:a.left},viewportSize:c,windowScroll:d}},b.prototype.getoriginCorner=function(){var a,c,d=this.originCorner,e=this.measurements,f=e.viewportDistance,g=e.anchorSize,h=e.surfaceSize,i=b.numbers.MARGIN_TO_EDGE,j=this.hasBit(this.anchorCorner,$c.BOTTOM);j?(a=f.top-i+this.anchorMargin.bottom,c=f.bottom-i-this.anchorMargin.bottom):(a=f.top-i+this.anchorMargin.top,c=f.bottom-i+g.height-this.anchorMargin.top);var k=0<c-h.height;!k&&a>c+this.openBottomBias&&(d=this.setBit(d,$c.BOTTOM));var l=this.adapter.isRtl(),m=this.hasBit(this.anchorCorner,$c.FLIP_RTL),n=this.hasBit(this.anchorCorner,$c.RIGHT)||this.hasBit(d,$c.RIGHT),o=!1;o=l&&m?!n:n;var p,q;o?(p=f.left+g.width+this.anchorMargin.right,q=f.right-this.anchorMargin.right):(p=f.left+this.anchorMargin.left,q=f.right+g.width-this.anchorMargin.left);var r=0<p-h.width,s=0<q-h.width,t=this.hasBit(d,$c.FLIP_RTL)&&this.hasBit(d,$c.RIGHT);return s&&t&&l||!r&&t?d=this.unsetBit(d,$c.RIGHT):(r&&o&&l||r&&!o&&n||!s&&p>=q)&&(d=this.setBit(d,$c.RIGHT)),d},b.prototype.getMenuSurfaceMaxHeight=function(a){if(0<this.maxHeight)return this.maxHeight;var c=this.measurements.viewportDistance,d=0,e=this.hasBit(a,$c.BOTTOM),f=this.hasBit(this.anchorCorner,$c.BOTTOM),g=b.numbers.MARGIN_TO_EDGE;return e?(d=c.top+this.anchorMargin.top-g,!f&&(d+=this.measurements.anchorSize.height)):(d=c.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-g,f&&(d-=this.measurements.anchorSize.height)),d},b.prototype.getHorizontalOriginOffset=function(a){var b=this.measurements.anchorSize,c=this.hasBit(a,$c.RIGHT),d=this.hasBit(this.anchorCorner,$c.RIGHT);if(c){var e=d?b.width-this.anchorMargin.left:this.anchorMargin.right;return this.isHoistedElement||this.isFixedPosition?e-(this.measurements.viewportSize.width-this.measurements.bodySize.width):e}return d?b.width-this.anchorMargin.right:this.anchorMargin.left},b.prototype.getVerticalOriginOffset=function(a){var b=this.measurements.anchorSize,c=this.hasBit(a,$c.BOTTOM),d=this.hasBit(this.anchorCorner,$c.BOTTOM),e=0;return e=c?d?b.height-this.anchorMargin.top:-this.anchorMargin.bottom:d?b.height+this.anchorMargin.bottom:this.anchorMargin.top,e},b.prototype.adjustPositionForHoistedElement=function(a){var b,c,d=this.measurements,e=d.windowScroll,f=d.viewportDistance,g=d.surfaceSize,h=d.viewportSize,i=Object.keys(a);try{for(var j=ab(i),k=j.next();!k.done;k=j.next()){var l=k.value,m=a[l]||0;if(this.isHorizontallyCenteredOnViewport&&("left"===l||"right"===l)){a[l]=(h.width-g.width)/2;continue}m+=f[l],this.isFixedPosition||("top"===l?m+=e.y:"bottom"===l?m-=e.y:"left"===l?m+=e.x:m-=e.x),a[l]=m}}catch(a){b={error:a}}finally{try{k&&!k.done&&(c=j.return)&&c.call(j)}finally{if(b)throw b.error}}},b.prototype.maybeRestoreFocus=function(){var a=this,b=this.adapter.isFocused(),c=document.activeElement&&this.adapter.isElementInContainer(document.activeElement);(b||c)&&setTimeout(function(){a.adapter.restoreFocus()},ld.TOUCH_EVENT_WAIT_MS)},b.prototype.hasBit=function(a,b){return!!(a&b)},b.prototype.setBit=function(a,b){return a|b},b.prototype.unsetBit=function(a,b){return a^b},b.prototype.isFinite=function(a){return"number"==typeof a&&isFinite(a)},b}(bd),od=function(a){function b(c){var d=a.call(this,ad(ad({},b.defaultAdapter),c))||this;return d.closeAnimationEndTimerId=0,d.defaultFocusState=Uc.LIST_ROOT,d.selectedIndex=-1,d}return Za(b,a),Object.defineProperty(b,"cssClasses",{get:function(){return Vc},enumerable:!1,configurable:!0}),Object.defineProperty(b,"strings",{get:function(){return Wc},enumerable:!1,configurable:!0}),Object.defineProperty(b,"numbers",{get:function(){return Xc},enumerable:!1,configurable:!0}),Object.defineProperty(b,"defaultAdapter",{get:function(){return{addClassToElementAtIndex:function(){},removeClassFromElementAtIndex:function(){},addAttributeToElementAtIndex:function(){},removeAttributeFromElementAtIndex:function(){},getAttributeFromElementAtIndex:function(){return null},elementContainsClass:function(){return!1},closeSurface:function(){},getElementIndex:function(){return-1},notifySelected:function(){},getMenuItemCount:function(){return 0},focusItemAtIndex:function(){},focusListRoot:function(){},getSelectedSiblingOfItemAtIndex:function(){return-1},isSelectableItemAtIndex:function(){return!1}}},enumerable:!1,configurable:!0}),b.prototype.destroy=function(){this.closeAnimationEndTimerId&&clearTimeout(this.closeAnimationEndTimerId),this.adapter.closeSurface()},b.prototype.handleKeydown=function(a){var b=a.key,c=a.keyCode;("Tab"===b||9===c)&&this.adapter.closeSurface(!0)},b.prototype.handleItemAction=function(a){var b=this,c=this.adapter.getElementIndex(a);if(!(0>c)){this.adapter.notifySelected({index:c});var d="true"===this.adapter.getAttributeFromElementAtIndex(c,Wc.SKIP_RESTORE_FOCUS);this.adapter.closeSurface(d),this.closeAnimationEndTimerId=setTimeout(function(){var c=b.adapter.getElementIndex(a);0<=c&&b.adapter.isSelectableItemAtIndex(c)&&b.setSelectedIndex(c)},nd.numbers.TRANSITION_CLOSE_DURATION)}},b.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState){case Uc.FIRST_ITEM:this.adapter.focusItemAtIndex(0);break;case Uc.LAST_ITEM:this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount()-1);break;case Uc.NONE:break;default:this.adapter.focusListRoot();}},b.prototype.setDefaultFocusState=function(a){this.defaultFocusState=a},b.prototype.getSelectedIndex=function(){return this.selectedIndex},b.prototype.setSelectedIndex=function(a){if(this.validatedIndex(a),!this.adapter.isSelectableItemAtIndex(a))throw new Error("MDCMenuFoundation: No selection group at specified index.");var b=this.adapter.getSelectedSiblingOfItemAtIndex(a);0<=b&&(this.adapter.removeAttributeFromElementAtIndex(b,Wc.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(b,Vc.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(a,Vc.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(a,Wc.ARIA_CHECKED_ATTR,"true"),this.selectedIndex=a},b.prototype.setEnabled=function(a,b){this.validatedIndex(a),b?(this.adapter.removeClassFromElementAtIndex(a,cd.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(a,Wc.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(a,cd.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(a,Wc.ARIA_DISABLED_ATTR,"true"))},b.prototype.validatedIndex=function(a){var b=this.adapter.getMenuItemCount();if(!(0<=a&&a<b))throw new Error("MDCMenuFoundation: No list item at specified index.")},b}(bd),pd=a=>a.nodeType===Node.ELEMENT_NODE,qd=()=>{},rd={get passive(){return!1}};document.addEventListener("x",qd,rd),document.removeEventListener("x",qd);var sd=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:window.document,b=a.activeElement,c=[];if(!b)return c;for(;b&&(c.push(b),b.shadowRoot);)b=b.shadowRoot.activeElement;return c},td=a=>{var b=sd();if(!b.length)return!1;var c=b[b.length-1],d=new Event("check-if-focused",{bubbles:!0,composed:!0}),e=[],f=a=>{e=a.composedPath()};return document.body.addEventListener("check-if-focused",f),c.dispatchEvent(d),document.body.removeEventListener("check-if-focused",f),-1!==e.indexOf(a)};class ud extends $b{click(){return this.mdcRoot?(this.mdcRoot.focus(),void this.mdcRoot.click()):void super.click()}createFoundation(){this.mdcFoundation!==void 0&&this.mdcFoundation.destroy(),this.mdcFoundationClass&&(this.mdcFoundation=new this.mdcFoundationClass(this.createAdapter()),this.mdcFoundation.init())}firstUpdated(){this.createFoundation()}}var vd,wd=a=>(b,c)=>{if(!b.constructor._observers){b.constructor._observers=new Map;var d=b.updated;b.updated=function(a){d.call(this,a),a.forEach((a,b)=>{var c=this.constructor._observers,d=c.get(b);d!==void 0&&d.call(this,this[b],a)})}}else if(!b.constructor.hasOwnProperty("_observers")){var e=b.constructor._observers;b.constructor._observers=new Map,e.forEach((a,c)=>b.constructor._observers.set(c,a))}b.constructor._observers.set(c,a)},xd=(a,b)=>"method"===b.kind&&b.descriptor&&!("value"in b.descriptor)?l(l({},b),{},{finisher(c){c.createProperty(b.key,a)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:b.key,initializer(){"function"==typeof b.initializer&&(this[b.key]=b.initializer.call(this))},finisher(c){c.createProperty(b.key,a)}},yd=a=>{var{finisher:b,descriptor:c}=a;return(a,d)=>{var e;if(void 0===d){var f=null!==(e=a.originalKey)&&void 0!==e?e:a.key,g=null==c?l(l({},a),{},{key:f}):{kind:"method",placement:"prototype",key:f,descriptor:c(a.key)};return null!=b&&(g.finisher=function(a){b(a,f)}),g}{var h=a.constructor;void 0!==c&&Object.defineProperty(a,d,c(d)),null==b||b(h,d)}}},zd=null==(null===(vd=window.HTMLSlotElement)||void 0===vd?void 0:vd.prototype.assignedElements)?(a,b)=>a.assignedNodes(b).filter(a=>a.nodeType===Node.ELEMENT_NODE):(a,b)=>a.assignedElements(b),Ad={UNKNOWN:"Unknown",BACKSPACE:"Backspace",ENTER:"Enter",SPACEBAR:"Spacebar",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",END:"End",HOME:"Home",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_RIGHT:"ArrowRight",ARROW_DOWN:"ArrowDown",DELETE:"Delete",ESCAPE:"Escape",TAB:"Tab"},Bd=new Set;Bd.add(Ad.BACKSPACE),Bd.add(Ad.ENTER),Bd.add(Ad.SPACEBAR),Bd.add(Ad.PAGE_UP),Bd.add(Ad.PAGE_DOWN),Bd.add(Ad.END),Bd.add(Ad.HOME),Bd.add(Ad.ARROW_LEFT),Bd.add(Ad.ARROW_UP),Bd.add(Ad.ARROW_RIGHT),Bd.add(Ad.ARROW_DOWN),Bd.add(Ad.DELETE),Bd.add(Ad.ESCAPE),Bd.add(Ad.TAB);var Cd={BACKSPACE:8,ENTER:13,SPACEBAR:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40,DELETE:46,ESCAPE:27,TAB:9},Dd=new Map;Dd.set(Cd.BACKSPACE,Ad.BACKSPACE),Dd.set(Cd.ENTER,Ad.ENTER),Dd.set(Cd.SPACEBAR,Ad.SPACEBAR),Dd.set(Cd.PAGE_UP,Ad.PAGE_UP),Dd.set(Cd.PAGE_DOWN,Ad.PAGE_DOWN),Dd.set(Cd.END,Ad.END),Dd.set(Cd.HOME,Ad.HOME),Dd.set(Cd.ARROW_LEFT,Ad.ARROW_LEFT),Dd.set(Cd.ARROW_UP,Ad.ARROW_UP),Dd.set(Cd.ARROW_RIGHT,Ad.ARROW_RIGHT),Dd.set(Cd.ARROW_DOWN,Ad.ARROW_DOWN),Dd.set(Cd.DELETE,Ad.DELETE),Dd.set(Cd.ESCAPE,Ad.ESCAPE),Dd.set(Cd.TAB,Ad.TAB);var Ed=new Set([Ad.PAGE_UP,Ad.PAGE_DOWN,Ad.END,Ad.HOME,Ad.ARROW_LEFT,Ad.ARROW_UP,Ad.ARROW_RIGHT,Ad.ARROW_DOWN]),Fd=(c,a)=>c-a,Gd=(a,b)=>{for(var c=Array.from(a),d=Array.from(b),e={added:[],removed:[]},f=c.sort(Fd),g=d.sort(Fd),h=0,k=0;h<f.length||k<g.length;){var l=f[h],m=g[k];if(l===m){h++,k++;continue}if(void 0!==l&&(void 0===m||l<m)){e.removed.push(l),h++;continue}if(void 0!==m&&(void 0===l||m<l)){e.added.push(m),k++;continue}}return e},Hd=["input","button","textarea","select"],Id=a=>{var b=a===gd.UNSET_INDEX?new Set:a;return ib(b)?new Set(b):new Set([b])};class Jd extends bd{constructor(a){super(Object.assign(Object.assign({},Jd.defaultAdapter),a)),this.isMulti_=!1,this.wrapFocus_=!1,this.isVertical_=!0,this.selectedIndex_=gd.UNSET_INDEX,this.focusedItemIndex_=gd.UNSET_INDEX,this.useActivatedClass_=!1,this.ariaCurrentAttrValue_=null}static get strings(){return fd}static get numbers(){return gd}static get defaultAdapter(){return{focusItemAtIndex:()=>void 0,getFocusedElementIndex:()=>0,getListItemCount:()=>0,isFocusInsideList:()=>!1,isRootFocused:()=>!1,notifyAction:()=>void 0,notifySelected:()=>void 0,getSelectedStateForElementIndex:()=>!1,setDisabledStateForElementIndex:()=>void 0,getDisabledStateForElementIndex:()=>!1,setSelectedStateForElementIndex:()=>void 0,setActivatedStateForElementIndex:()=>void 0,setTabIndexForElementIndex:()=>void 0,setAttributeForElementIndex:()=>void 0,getAttributeForElementIndex:()=>null}}setWrapFocus(a){this.wrapFocus_=a}setMulti(a){this.isMulti_=a;var b=this.selectedIndex_;if(a){if(!ib(b)){var c=b===gd.UNSET_INDEX;this.selectedIndex_=c?new Set:new Set([b])}}else if(ib(b))if(b.size){var d=Array.from(b).sort(Fd);this.selectedIndex_=d[0]}else this.selectedIndex_=gd.UNSET_INDEX}setVerticalOrientation(a){this.isVertical_=a}setUseActivatedClass(a){this.useActivatedClass_=a}getSelectedIndex(){return this.selectedIndex_}setSelectedIndex(a){this.isIndexValid_(a)&&(this.isMulti_?this.setMultiSelectionAtIndex_(Id(a)):this.setSingleSelectionAtIndex_(a))}handleFocusIn(a,b){0<=b&&this.adapter.setTabIndexForElementIndex(b,0)}handleFocusOut(a,b){0<=b&&this.adapter.setTabIndexForElementIndex(b,-1),setTimeout(()=>{this.adapter.isFocusInsideList()||this.setTabindexToFirstSelectedItem_()},0)}handleKeydown(a,b,c){var d="ArrowLeft"===hb(a),e="ArrowUp"===hb(a),f="ArrowRight"===hb(a),g="ArrowDown"===hb(a),h="Home"===hb(a),i="End"===hb(a),j="Enter"===hb(a),k="Spacebar"===hb(a);if(this.adapter.isRootFocused())return void(e||i?(a.preventDefault(),this.focusLastElement()):(g||h)&&(a.preventDefault(),this.focusFirstElement()));var l=this.adapter.getFocusedElementIndex();if(!(-1===l&&(l=c,0>l))){var m;if(this.isVertical_&&g||!this.isVertical_&&f)this.preventDefaultEvent(a),m=this.focusNextElement(l);else if(this.isVertical_&&e||!this.isVertical_&&d)this.preventDefaultEvent(a),m=this.focusPrevElement(l);else if(h)this.preventDefaultEvent(a),m=this.focusFirstElement();else if(i)this.preventDefaultEvent(a),m=this.focusLastElement();else if((j||k)&&b){var n=a.target;if(n&&"A"===n.tagName&&j)return;this.preventDefaultEvent(a),this.setSelectedIndexOnAction_(l,!0)}this.focusedItemIndex_=l,void 0!==m&&(this.setTabindexAtIndex_(m),this.focusedItemIndex_=m)}}handleSingleSelection(a,b,c){a===gd.UNSET_INDEX||(this.setSelectedIndexOnAction_(a,b,c),this.setTabindexAtIndex_(a),this.focusedItemIndex_=a)}focusNextElement(a){var b=this.adapter.getListItemCount(),c=a+1;if(c>=b)if(this.wrapFocus_)c=0;else return a;return this.adapter.focusItemAtIndex(c),c}focusPrevElement(a){var b=a-1;if(0>b)if(this.wrapFocus_)b=this.adapter.getListItemCount()-1;else return a;return this.adapter.focusItemAtIndex(b),b}focusFirstElement(){return this.adapter.focusItemAtIndex(0),0}focusLastElement(){var a=this.adapter.getListItemCount()-1;return this.adapter.focusItemAtIndex(a),a}setEnabled(a,b){this.isIndexValid_(a)&&this.adapter.setDisabledStateForElementIndex(a,!b)}preventDefaultEvent(a){var b=a.target,c="".concat(b.tagName).toLowerCase();-1===Hd.indexOf(c)&&a.preventDefault()}setSingleSelectionAtIndex_(a){var b=!(1<arguments.length&&arguments[1]!==void 0)||arguments[1];this.selectedIndex_===a||(this.selectedIndex_!==gd.UNSET_INDEX&&(this.adapter.setSelectedStateForElementIndex(this.selectedIndex_,!1),this.useActivatedClass_&&this.adapter.setActivatedStateForElementIndex(this.selectedIndex_,!1)),b&&this.adapter.setSelectedStateForElementIndex(a,!0),this.useActivatedClass_&&this.adapter.setActivatedStateForElementIndex(a,!0),this.setAriaForSingleSelectionAtIndex_(a),this.selectedIndex_=a,this.adapter.notifySelected(a))}setMultiSelectionAtIndex_(a){var b=!(1<arguments.length&&arguments[1]!==void 0)||arguments[1],c=Id(this.selectedIndex_),d=Gd(c,a);if(d.removed.length||d.added.length){for(var e of d.removed)b&&this.adapter.setSelectedStateForElementIndex(e,!1),this.useActivatedClass_&&this.adapter.setActivatedStateForElementIndex(e,!1);for(var f of d.added)b&&this.adapter.setSelectedStateForElementIndex(f,!0),this.useActivatedClass_&&this.adapter.setActivatedStateForElementIndex(f,!0);this.selectedIndex_=a,this.adapter.notifySelected(a,d)}}setAriaForSingleSelectionAtIndex_(a){this.selectedIndex_===gd.UNSET_INDEX&&(this.ariaCurrentAttrValue_=this.adapter.getAttributeForElementIndex(a,fd.ARIA_CURRENT));var b=null!==this.ariaCurrentAttrValue_,c=b?fd.ARIA_CURRENT:fd.ARIA_SELECTED;this.selectedIndex_!==gd.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex_,c,"false");var d=b?this.ariaCurrentAttrValue_:"true";this.adapter.setAttributeForElementIndex(a,c,d)}setTabindexAtIndex_(a){this.focusedItemIndex_===gd.UNSET_INDEX&&0!==a?this.adapter.setTabIndexForElementIndex(0,-1):0<=this.focusedItemIndex_&&this.focusedItemIndex_!==a&&this.adapter.setTabIndexForElementIndex(this.focusedItemIndex_,-1),this.adapter.setTabIndexForElementIndex(a,0)}setTabindexToFirstSelectedItem_(){var a=0;"number"==typeof this.selectedIndex_&&this.selectedIndex_!==gd.UNSET_INDEX?a=this.selectedIndex_:ib(this.selectedIndex_)&&0<this.selectedIndex_.size&&(a=Math.min(...this.selectedIndex_)),this.setTabindexAtIndex_(a)}isIndexValid_(a){if(a instanceof Set){if(!this.isMulti_)throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list");if(0===a.size)return!0;var b=!1;for(var c of a)if(b=this.isIndexInRange_(c),b)break;return b}if("number"==typeof a){if(this.isMulti_)throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+a);return a===gd.UNSET_INDEX||this.isIndexInRange_(a)}return!1}isIndexInRange_(a){var b=this.adapter.getListItemCount();return 0<=a&&a<b}setSelectedIndexOnAction_(a,b,c){if(!this.adapter.getDisabledStateForElementIndex(a)){var d=a;if(this.isMulti_&&(d=new Set([a])),!!this.isIndexValid_(d)){if(this.isMulti_)this.toggleMultiAtIndex(a,c,b);else if(b||c)this.setSingleSelectionAtIndex_(a,b);else{var e=this.selectedIndex_===a;e&&this.setSingleSelectionAtIndex_(gd.UNSET_INDEX)}b&&this.adapter.notifyAction(a)}}}toggleMultiAtIndex(a,b){var c=!(2<arguments.length&&arguments[2]!==void 0)||arguments[2],d=!1;d=void 0===b?!this.adapter.getSelectedStateForElementIndex(a):b;var e=Id(this.selectedIndex_);d?e.add(a):e.delete(a),this.setMultiSelectionAtIndex_(e,c)}}class Kd extends ud{constructor(){super(...arguments),this.mdcFoundationClass=od,this.listElement_=null,this.anchor=null,this.open=!1,this.quick=!1,this.wrapFocus=!1,this.innerRole="menu",this.innerAriaLabel=null,this.corner="TOP_START",this.x=null,this.y=null,this.absolute=!1,this.multi=!1,this.activatable=!1,this.fixed=!1,this.forceGroupSelection=!1,this.fullwidth=!1,this.menuCorner="START",this.stayOpenOnBodyClick=!1,this.defaultFocus="LIST_ROOT",this._listUpdateComplete=null}get listElement(){return this.listElement_?this.listElement_:(this.listElement_=this.renderRoot.querySelector("mwc-list"),this.listElement_)}get items(){var a=this.listElement;return a?a.items:[]}get index(){var a=this.listElement;return a?a.index:-1}get selected(){var a=this.listElement;return a?a.selected:null}render(){var a="menu"===this.innerRole?"menuitem":"option";return g(w||(w=j(["\n <mwc-menu-surface\n ?hidden=","\n .anchor=","\n .open=","\n .quick=","\n .corner=","\n .x=","\n .y=","\n .absolute=","\n .fixed=","\n .fullwidth=","\n .menuCorner=","\n ?stayOpenOnBodyClick=","\n class=\"mdc-menu mdc-menu-surface\"\n @closed=","\n @opened=","\n @keydown=",">\n <mwc-list\n rootTabbable\n .innerAriaLabel=","\n .innerRole=","\n .multi=","\n class=\"mdc-deprecated-list\"\n .itemRoles=","\n .wrapFocus=","\n .activatable=","\n @action=",">\n <slot></slot>\n </mwc-list>\n </mwc-menu-surface>"])),!this.open,this.anchor,this.open,this.quick,this.corner,this.x,this.y,this.absolute,this.fixed,this.fullwidth,this.menuCorner,this.stayOpenOnBodyClick,this.onClosed,this.onOpened,this.onKeydown,this.innerAriaLabel,this.innerRole,this.multi,a,this.wrapFocus,this.activatable,this.onAction)}createAdapter(){return{addClassToElementAtIndex:(a,b)=>{var c=this.listElement;if(c){var d=c.items[a];d&&("mdc-menu-item--selected"===b?this.forceGroupSelection&&!d.selected&&c.toggle(a,!0):d.classList.add(b))}},removeClassFromElementAtIndex:(a,b)=>{var c=this.listElement;if(c){var d=c.items[a];d&&("mdc-menu-item--selected"===b?d.selected&&c.toggle(a,!1):d.classList.remove(b))}},addAttributeToElementAtIndex:(a,b,c)=>{var d=this.listElement;if(d){var e=d.items[a];e&&e.setAttribute(b,c)}},removeAttributeFromElementAtIndex:(a,b)=>{var c=this.listElement;if(c){var d=c.items[a];d&&d.removeAttribute(b)}},getAttributeFromElementAtIndex:(a,b)=>{var c=this.listElement;if(!c)return null;var d=c.items[a];return d?d.getAttribute(b):null},elementContainsClass:(a,b)=>a.classList.contains(b),closeSurface:()=>{this.open=!1},getElementIndex:a=>{var b=this.listElement;return b?b.items.indexOf(a):-1},notifySelected:()=>{},getMenuItemCount:()=>{var a=this.listElement;return a?a.items.length:0},focusItemAtIndex:a=>{var b=this.listElement;if(b){var c=b.items[a];c&&c.focus()}},focusListRoot:()=>{this.listElement&&this.listElement.focus()},getSelectedSiblingOfItemAtIndex:a=>{var b=this.listElement;if(!b)return-1;var c=b.items[a];if(!c||!c.group)return-1;for(var e=0;e<b.items.length;e++)if(e!==a){var d=b.items[e];if(d.selected&&d.group===c.group)return e}return-1},isSelectableItemAtIndex:a=>{var b=this.listElement;if(!b)return!1;var c=b.items[a];return!!c&&c.hasAttribute("group")}}}onKeydown(a){this.mdcFoundation&&this.mdcFoundation.handleKeydown(a)}onAction(a){var b=this.listElement;if(this.mdcFoundation&&b){var c=a.detail.index,d=b.items[c];d&&this.mdcFoundation.handleItemAction(d)}}onOpened(){this.open=!0,this.mdcFoundation&&this.mdcFoundation.handleMenuSurfaceOpened()}onClosed(){this.open=!1}getUpdateComplete(){var a=()=>super.getUpdateComplete,b=this;return o(function*(){yield b._listUpdateComplete;var c=yield a().call(b);return c})()}firstUpdated(){var a=()=>super.firstUpdated,b=this;return o(function*(){a().call(b);var c=b.listElement;c&&(b._listUpdateComplete=c.updateComplete,yield b._listUpdateComplete)})()}select(a){var b=this.listElement;b&&b.select(a)}close(){this.open=!1}show(){this.open=!0}getFocusedItemIndex(){var a=this.listElement;return a?a.getFocusedItemIndex():-1}focusItemAtIndex(a){var b=this.listElement;b&&b.focusItemAtIndex(a)}layout(){var a=!(0<arguments.length&&arguments[0]!==void 0)||arguments[0],b=this.listElement;b&&b.layout(a)}}Ya([eb(".mdc-menu")],Kd.prototype,"mdcRoot",void 0),Ya([eb("slot")],Kd.prototype,"slotElement",void 0),Ya([cb({type:Object})],Kd.prototype,"anchor",void 0),Ya([cb({type:Boolean,reflect:!0})],Kd.prototype,"open",void 0),Ya([cb({type:Boolean})],Kd.prototype,"quick",void 0),Ya([cb({type:Boolean})],Kd.prototype,"wrapFocus",void 0),Ya([cb({type:String})],Kd.prototype,"innerRole",void 0),Ya([cb({type:String})],Kd.prototype,"innerAriaLabel",void 0),Ya([cb({type:String})],Kd.prototype,"corner",void 0),Ya([cb({type:Number})],Kd.prototype,"x",void 0),Ya([cb({type:Number})],Kd.prototype,"y",void 0),Ya([cb({type:Boolean})],Kd.prototype,"absolute",void 0),Ya([cb({type:Boolean})],Kd.prototype,"multi",void 0),Ya([cb({type:Boolean})],Kd.prototype,"activatable",void 0),Ya([cb({type:Boolean})],Kd.prototype,"fixed",void 0),Ya([cb({type:Boolean})],Kd.prototype,"forceGroupSelection",void 0),Ya([cb({type:Boolean})],Kd.prototype,"fullwidth",void 0),Ya([cb({type:String})],Kd.prototype,"menuCorner",void 0),Ya([cb({type:Boolean})],Kd.prototype,"stayOpenOnBodyClick",void 0),Ya([cb({type:String}),wd(function(a){this.mdcFoundation&&this.mdcFoundation.setDefaultFocusState(Uc[a])})],Kd.prototype,"defaultFocus",void 0);var Ld=vb(y||(y=j(["mwc-list ::slotted([mwc-list-item]:not([twoline])),mwc-list ::slotted([noninteractive]:not([twoline])){height:var(--mdc-menu-item-height, 48px)}"]))),Md={TOP_LEFT:md.TOP_LEFT,TOP_RIGHT:md.TOP_RIGHT,BOTTOM_LEFT:md.BOTTOM_LEFT,BOTTOM_RIGHT:md.BOTTOM_RIGHT,TOP_START:md.TOP_START,TOP_END:md.TOP_END,BOTTOM_START:md.BOTTOM_START,BOTTOM_END:md.BOTTOM_END};class Nd extends ud{constructor(){super(...arguments),this.mdcFoundationClass=nd,this.absolute=!1,this.fullwidth=!1,this.fixed=!1,this.x=null,this.y=null,this.quick=!1,this.open=!1,this.stayOpenOnBodyClick=!1,this.bitwiseCorner=md.TOP_START,this.previousMenuCorner=null,this.menuCorner="START",this.corner="TOP_START",this.styleTop="",this.styleLeft="",this.styleRight="",this.styleBottom="",this.styleMaxHeight="",this.styleTransformOrigin="",this.anchor=null,this.previouslyFocused=null,this.previousAnchor=null,this.onBodyClickBound=()=>void 0}render(){var a={"mdc-menu-surface--fixed":this.fixed,"mdc-menu-surface--fullwidth":this.fullwidth},b={top:this.styleTop,left:this.styleLeft,right:this.styleRight,bottom:this.styleBottom,"max-height":this.styleMaxHeight,"transform-origin":this.styleTransformOrigin};return g(z||(z=j(["\n <div\n class=\"mdc-menu-surface ","\"\n style=\"","\"\n @keydown=","\n @opened=","\n @closed=",">\n <slot></slot>\n </div>"])),vc(a),wc(b),this.onKeydown,this.registerBodyClick,this.deregisterBodyClick)}createAdapter(){var a=this;return Object.assign(Object.assign({},bb(this.mdcRoot)),{hasAnchor:()=>!!this.anchor,notifyClose:()=>{var a=new CustomEvent("closed",{bubbles:!0,composed:!0});this.open=!1,this.mdcRoot.dispatchEvent(a)},notifyClosing:()=>{var a=new CustomEvent("closing",{bubbles:!0,composed:!0});this.mdcRoot.dispatchEvent(a)},notifyOpen:()=>{var a=new CustomEvent("opened",{bubbles:!0,composed:!0});this.open=!0,this.mdcRoot.dispatchEvent(a)},isElementInContainer:()=>!1,isRtl:()=>!!this.mdcRoot&&"rtl"===getComputedStyle(this.mdcRoot).direction,setTransformOrigin:a=>{var b=this.mdcRoot;b&&(this.styleTransformOrigin=a)},isFocused:()=>td(this),saveFocus:()=>{var a=sd(),b=a.length;b||(this.previouslyFocused=null),this.previouslyFocused=a[b-1]},restoreFocus:()=>{!this.previouslyFocused||"focus"in this.previouslyFocused&&this.previouslyFocused.focus()},getInnerDimensions:()=>{var a=this.mdcRoot;return a?{width:a.offsetWidth,height:a.offsetHeight}:{width:0,height:0}},getAnchorDimensions:()=>{var a=this.anchor;return a?a.getBoundingClientRect():null},getBodyDimensions:()=>({width:document.body.clientWidth,height:document.body.clientHeight}),getWindowDimensions:()=>({width:window.innerWidth,height:window.innerHeight}),getWindowScroll:()=>({x:window.pageXOffset,y:window.pageYOffset}),setPosition:a=>{var b=this.mdcRoot;b&&(this.styleLeft="left"in a?"".concat(a.left,"px"):"",this.styleRight="right"in a?"".concat(a.right,"px"):"",this.styleTop="top"in a?"".concat(a.top,"px"):"",this.styleBottom="bottom"in a?"".concat(a.bottom,"px"):"")},setMaxHeight:function(){var b=o(function*(b){var c=a.mdcRoot;c&&(a.styleMaxHeight=b,yield a.updateComplete,a.styleMaxHeight="var(--mdc-menu-max-height, ".concat(b,")"))});return function(){return b.apply(this,arguments)}}()})}onKeydown(a){this.mdcFoundation&&this.mdcFoundation.handleKeydown(a)}onBodyClick(a){if(!this.stayOpenOnBodyClick){var b=a.composedPath();-1===b.indexOf(this)&&this.close()}}registerBodyClick(){this.onBodyClickBound=this.onBodyClick.bind(this),document.body.addEventListener("click",this.onBodyClickBound,{passive:!0,capture:!0})}deregisterBodyClick(){document.body.removeEventListener("click",this.onBodyClickBound,{capture:!0})}close(){this.open=!1}show(){this.open=!0}}Ya([eb(".mdc-menu-surface")],Nd.prototype,"mdcRoot",void 0),Ya([eb("slot")],Nd.prototype,"slotElement",void 0),Ya([cb({type:Boolean}),wd(function(a){this.mdcFoundation&&!this.fixed&&this.mdcFoundation.setIsHoisted(a)})],Nd.prototype,"absolute",void 0),Ya([cb({type:Boolean})],Nd.prototype,"fullwidth",void 0),Ya([cb({type:Boolean}),wd(function(a){this.mdcFoundation&&!this.absolute&&this.mdcFoundation.setFixedPosition(a)})],Nd.prototype,"fixed",void 0),Ya([cb({type:Number}),wd(function(a){this.mdcFoundation&&null!==this.y&&null!==a&&(this.mdcFoundation.setAbsolutePosition(a,this.y),this.mdcFoundation.setAnchorMargin({left:a,top:this.y,right:-a,bottom:this.y}))})],Nd.prototype,"x",void 0),Ya([cb({type:Number}),wd(function(a){this.mdcFoundation&&null!==this.x&&null!==a&&(this.mdcFoundation.setAbsolutePosition(this.x,a),this.mdcFoundation.setAnchorMargin({left:this.x,top:a,right:-this.x,bottom:a}))})],Nd.prototype,"y",void 0),Ya([cb({type:Boolean}),wd(function(a){this.mdcFoundation&&this.mdcFoundation.setQuickOpen(a)})],Nd.prototype,"quick",void 0),Ya([cb({type:Boolean,reflect:!0}),wd(function(a,b){this.mdcFoundation&&(a?this.mdcFoundation.open():b!==void 0&&this.mdcFoundation.close())})],Nd.prototype,"open",void 0),Ya([cb({type:Boolean})],Nd.prototype,"stayOpenOnBodyClick",void 0),Ya([db(),wd(function(a){this.mdcFoundation&&(a?this.mdcFoundation.setAnchorCorner(a):this.mdcFoundation.setAnchorCorner(a))})],Nd.prototype,"bitwiseCorner",void 0),Ya([cb({type:String}),wd(function(a){if(this.mdcFoundation){var b=null===this.previousMenuCorner,c=!b&&a!==this.previousMenuCorner;("START"===a||"END"===a)&&(c||b&&"END"===a)&&(this.bitwiseCorner^=$c.RIGHT,this.mdcFoundation.flipCornerHorizontally(),this.previousMenuCorner=a)}})],Nd.prototype,"menuCorner",void 0),Ya([cb({type:String}),wd(function(a){if(this.mdcFoundation&&a){var b=Md[a];"END"===this.menuCorner&&(b^=$c.RIGHT),this.bitwiseCorner=b}})],Nd.prototype,"corner",void 0),Ya([db()],Nd.prototype,"styleTop",void 0),Ya([db()],Nd.prototype,"styleLeft",void 0),Ya([db()],Nd.prototype,"styleRight",void 0),Ya([db()],Nd.prototype,"styleBottom",void 0),Ya([db()],Nd.prototype,"styleMaxHeight",void 0),Ya([db()],Nd.prototype,"styleTransformOrigin",void 0);var Od=vb(B||(B=j([".mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;transition:opacity .03s linear,transform .12s cubic-bezier(0, 0, 0.2, 1),height 250ms cubic-bezier(0, 0, 0.2, 1);box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12);background-color:#fff;background-color:var(--mdc-theme-surface, #fff);color:#000;color:var(--mdc-theme-on-surface, #000);border-radius:4px;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0;transition:opacity .075s linear}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}:host(:not([open])){display:none}.mdc-menu-surface{z-index:8;z-index:var(--mdc-menu-z-index, 8);min-width:112px;min-width:var(--mdc-menu-min-width, 112px)}"])));class Pd extends Xa(Nd){static get defineId(){return"mwc-menu-surface"}static get elementDefinitions(){return Qc([],Pd)}static get styles(){return Od}}var Qd=a=>null==a?b:a,Rd=a=>a.hasAttribute("mwc-list-item");class Sd extends ud{constructor(){var a;super(),a=this,this.mdcAdapter=null,this.mdcFoundationClass=Jd,this.activatable=!1,this.multi=!1,this.wrapFocus=!1,this.itemRoles=null,this.innerRole=null,this.innerAriaLabel=null,this.rootTabbable=!1,this.previousTabindex=null,this.noninteractive=!1,this.itemsReadyResolver=()=>{},this.itemsReady=Promise.resolve([]),this.items_=[];var b=kb(this.layout.bind(this));this.debouncedLayout=function(){var c=!(0<arguments.length&&arguments[0]!==void 0)||arguments[0];lb.call(a),b(c)}}getUpdateComplete(){var a=()=>super.getUpdateComplete,b=this;return o(function*(){var c=yield a().call(b);return yield b.itemsReady,c})()}get items(){return this.items_}updateItems(){var a,b=null!==(a=this.assignedElements)&&void 0!==a?a:[],c=[];for(var f of b)Rd(f)&&(c.push(f),f._managingList=this),f.hasAttribute("divider")&&!f.hasAttribute("role")&&f.setAttribute("role","separator");this.items_=c;var d=new Set;if(this.items_.forEach((a,b)=>{this.itemRoles?a.setAttribute("role",this.itemRoles):a.removeAttribute("role"),a.selected&&d.add(b)}),this.multi)this.select(d);else{var g=d.size?d.entries().next().value[1]:-1;this.select(g)}var e=new Event("items-updated",{bubbles:!0,composed:!0});this.dispatchEvent(e)}get selected(){var a=this.index;if(!ib(a))return-1===a?null:this.items[a];var b=[];for(var c of a)b.push(this.items[c]);return b}get index(){return this.mdcFoundation?this.mdcFoundation.getSelectedIndex():-1}render(){var a=null===this.innerRole?void 0:this.innerRole,b=null===this.innerAriaLabel?void 0:this.innerAriaLabel,c=this.rootTabbable?"0":"-1";return g(C||(C=j(["\n <!-- @ts-ignore -->\n <ul\n tabindex=","\n role=\"","\"\n aria-label=\"","\"\n class=\"mdc-deprecated-list\"\n @keydown=","\n @focusin=","\n @focusout=","\n @request-selected=","\n @list-item-rendered=",">\n <slot></slot>\n ","\n </ul>\n "])),c,Qd(a),Qd(b),this.onKeydown,this.onFocusIn,this.onFocusOut,this.onRequestSelected,this.onListItemConnected,this.renderPlaceholder())}renderPlaceholder(){var a,b=null!==(a=this.assignedElements)&&void 0!==a?a:[];return void 0!==this.emptyMessage&&0===b.length?g(D||(D=j(["\n <mwc-list-item noninteractive>","</mwc-list-item>\n "])),this.emptyMessage):null}firstUpdated(){super.firstUpdated(),this.items.length||(this.mdcFoundation.setMulti(this.multi),this.layout())}onFocusIn(a){if(this.mdcFoundation&&this.mdcRoot){var b=this.getIndexOfTarget(a);this.mdcFoundation.handleFocusIn(a,b)}}onFocusOut(a){if(this.mdcFoundation&&this.mdcRoot){var b=this.getIndexOfTarget(a);this.mdcFoundation.handleFocusOut(a,b)}}onKeydown(a){if(this.mdcFoundation&&this.mdcRoot){var b=this.getIndexOfTarget(a),c=a.target,d=Rd(c);this.mdcFoundation.handleKeydown(a,d,b)}}onRequestSelected(a){if(this.mdcFoundation){var d=this.getIndexOfTarget(a);if(-1===d&&(this.layout(),d=this.getIndexOfTarget(a),-1===d))return;var e=this.items[d];if(e.disabled)return;var b=a.detail.selected,c=a.detail.source;this.mdcFoundation.handleSingleSelection(d,"interaction"===c,b),a.stopPropagation()}}getIndexOfTarget(a){var b=this.items,c=a.composedPath();for(var d of c){var e=-1;if(pd(d)&&Rd(d)&&(e=b.indexOf(d)),-1!==e)return e}return-1}createAdapter(){return this.mdcAdapter={getListItemCount:()=>this.mdcRoot?this.items.length:0,getFocusedElementIndex:this.getFocusedItemIndex,getAttributeForElementIndex:(a,b)=>{var c=this.mdcRoot;if(!c)return"";var d=this.items[a];return d?d.getAttribute(b):""},setAttributeForElementIndex:(a,b,c)=>{if(this.mdcRoot){var d=this.items[a];d&&d.setAttribute(b,c)}},focusItemAtIndex:a=>{var b=this.items[a];b&&b.focus()},setTabIndexForElementIndex:(a,b)=>{var c=this.items[a];c&&(c.tabindex=b)},notifyAction:a=>{var b=new CustomEvent("action",{bubbles:!0,composed:!0,detail:{index:a}});this.dispatchEvent(b)},notifySelected:(a,b)=>{var c=new CustomEvent("selected",{bubbles:!0,composed:!0,detail:{index:a,diff:b}});this.dispatchEvent(c)},isFocusInsideList:()=>td(this),isRootFocused:()=>{var a=this.mdcRoot,b=a.getRootNode();return b.activeElement===a},setDisabledStateForElementIndex:(a,b)=>{var c=this.items[a];c&&(c.disabled=b)},getDisabledStateForElementIndex:a=>{var b=this.items[a];return!!b&&b.disabled},setSelectedStateForElementIndex:(a,b)=>{var c=this.items[a];c&&(c.selected=b)},getSelectedStateForElementIndex:a=>{var b=this.items[a];return!!b&&b.selected},setActivatedStateForElementIndex:(a,b)=>{var c=this.items[a];c&&(c.activated=b)}},this.mdcAdapter}selectUi(a){var b=!!(1<arguments.length&&arguments[1]!==void 0)&&arguments[1],c=this.items[a];c&&(c.selected=!0,c.activated=b)}deselectUi(a){var b=this.items[a];b&&(b.selected=!1,b.activated=!1)}select(a){this.mdcFoundation&&this.mdcFoundation.setSelectedIndex(a)}toggle(a,b){this.multi&&this.mdcFoundation.toggleMultiAtIndex(a,b)}onListItemConnected(a){var b=a.target;this.layout(-1===this.items.indexOf(b))}layout(){var a=!(0<arguments.length&&arguments[0]!==void 0)||arguments[0];a&&this.updateItems();var b=this.items[0];for(var c of this.items)c.tabindex=-1;b&&(this.noninteractive?!this.previousTabindex&&(this.previousTabindex=b):b.tabindex=0),this.itemsReadyResolver()}getFocusedItemIndex(){if(!this.mdcRoot)return-1;if(!this.items.length)return-1;var a=sd();if(!a.length)return-1;for(var b,c=a.length-1;0<=c;c--)if(b=a[c],Rd(b))return this.items.indexOf(b);return-1}focusItemAtIndex(a){for(var b of this.items)if(0===b.tabindex){b.tabindex=-1;break}this.items[a].tabindex=0,this.items[a].focus()}focus(){var a=this.mdcRoot;a&&a.focus()}blur(){var a=this.mdcRoot;a&&a.blur()}}jb([cb({type:String})],Sd.prototype,"emptyMessage",void 0),jb([eb(".mdc-deprecated-list")],Sd.prototype,"mdcRoot",void 0),jb([gb("",!0,"*")],Sd.prototype,"assignedElements",void 0),jb([gb("",!0,"[tabindex=\"0\"]")],Sd.prototype,"tabbableElements",void 0),jb([cb({type:Boolean}),wd(function(a){this.mdcFoundation&&this.mdcFoundation.setUseActivatedClass(a)})],Sd.prototype,"activatable",void 0),jb([cb({type:Boolean}),wd(function(a,b){this.mdcFoundation&&this.mdcFoundation.setMulti(a),b!==void 0&&this.layout()})],Sd.prototype,"multi",void 0),jb([cb({type:Boolean}),wd(function(a){this.mdcFoundation&&this.mdcFoundation.setWrapFocus(a)})],Sd.prototype,"wrapFocus",void 0),jb([cb({type:String}),wd(function(a,b){b!==void 0&&this.updateItems()})],Sd.prototype,"itemRoles",void 0),jb([cb({type:String})],Sd.prototype,"innerRole",void 0),jb([cb({type:String})],Sd.prototype,"innerAriaLabel",void 0),jb([cb({type:Boolean})],Sd.prototype,"rootTabbable",void 0),jb([cb({type:Boolean,reflect:!0}),wd(function(a){var b,c;if(a){var d=null!==(c=null===(b=this.tabbableElements)||void 0===b?void 0:b[0])&&void 0!==c?c:null;this.previousTabindex=d,d&&d.setAttribute("tabindex","-1")}else!a&&this.previousTabindex&&(this.previousTabindex.setAttribute("tabindex","0"),this.previousTabindex=null)})],Sd.prototype,"noninteractive",void 0);var Td=vb(F||(F=j(["@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{display:block}.mdc-deprecated-list{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);line-height:1.5rem;margin:0;padding:8px 0;list-style-type:none;color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87));padding:var(--mdc-list-vertical-padding, 8px) 0}.mdc-deprecated-list:focus{outline:none}.mdc-deprecated-list-item{height:48px}.mdc-deprecated-list--dense{padding-top:4px;padding-bottom:4px;font-size:.812rem}.mdc-deprecated-list ::slotted([divider]){height:0;margin:0;border:none;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgba(0, 0, 0, 0.12)}.mdc-deprecated-list ::slotted([divider][padded]){margin:0 var(--mdc-list-side-padding, 16px)}.mdc-deprecated-list ::slotted([divider][inset]){margin-left:var(--mdc-list-inset-margin, 72px);margin-right:0;width:calc( 100% - var(--mdc-list-inset-margin, 72px) )}[dir=rtl] .mdc-deprecated-list ::slotted([divider][inset]),.mdc-deprecated-list ::slotted([divider][inset][dir=rtl]){margin-left:0;margin-right:var(--mdc-list-inset-margin, 72px)}.mdc-deprecated-list ::slotted([divider][inset][padded]){width:calc( 100% - var(--mdc-list-inset-margin, 72px) - var(--mdc-list-side-padding, 16px) )}.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:40px}.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 20px}.mdc-deprecated-list--two-line.mdc-deprecated-list--dense ::slotted([mwc-list-item]),.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:60px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 36px}:host([noninteractive]){pointer-events:none;cursor:default}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text){display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::before{display:inline-block;width:0;height:24px;content:\"\";vertical-align:0}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::after{display:inline-block;width:0;height:20px;content:\"\";vertical-align:-20px}"])));class Ud{constructor(a){this.startPress=b=>{a().then(a=>{a&&a.startPress(b)})},this.endPress=()=>{a().then(a=>{a&&a.endPress()})},this.startFocus=()=>{a().then(a=>{a&&a.startFocus()})},this.endFocus=()=>{a().then(a=>{a&&a.endFocus()})},this.startHover=()=>{a().then(a=>{a&&a.startHover()})},this.endHover=()=>{a().then(a=>{a&&a.endHover()})}}}class Vd extends $b{constructor(){super(...arguments),this.value="",this.group=null,this.tabindex=-1,this.disabled=!1,this.twoline=!1,this.activated=!1,this.graphic=null,this.multipleGraphics=!1,this.hasMeta=!1,this.noninteractive=!1,this.selected=!1,this.shouldRenderRipple=!1,this._managingList=null,this.boundOnClick=this.onClick.bind(this),this._firstChanged=!0,this._skipPropRequest=!1,this.rippleHandlers=new Ud(()=>(this.shouldRenderRipple=!0,this.ripple)),this.listeners=[{target:this,eventNames:["click"],cb:()=>{this.onClick()}},{target:this,eventNames:["mouseenter"],cb:this.rippleHandlers.startHover},{target:this,eventNames:["mouseleave"],cb:this.rippleHandlers.endHover},{target:this,eventNames:["focus"],cb:this.rippleHandlers.startFocus},{target:this,eventNames:["blur"],cb:this.rippleHandlers.endFocus},{target:this,eventNames:["mousedown","touchstart"],cb:a=>{var b=a.type;this.onDown("mousedown"===b?"mouseup":"touchend",a)}}]}get text(){var a=this.textContent;return a?a.trim():""}render(){var a=this.renderText(),b=this.graphic?this.renderGraphic():g(G||(G=j([""]))),c=this.hasMeta?this.renderMeta():g(H||(H=j([""])));return g(I||(I=j(["\n ","\n ","\n ","\n ",""])),this.renderRipple(),b,a,c)}renderRipple(){return this.shouldRenderRipple?g(J||(J=j(["\n <mwc-ripple\n .activated=",">\n </mwc-ripple>"])),this.activated):this.activated?g(K||(K=j(["<div class=\"fake-activated-ripple\"></div>"]))):""}renderGraphic(){var a={multi:this.multipleGraphics};return g(L||(L=j(["\n <span class=\"mdc-deprecated-list-item__graphic material-icons ","\">\n <slot name=\"graphic\"></slot>\n </span>"])),vc(a))}renderMeta(){return g(M||(M=j(["\n <span class=\"mdc-deprecated-list-item__meta material-icons\">\n <slot name=\"meta\"></slot>\n </span>"])))}renderText(){var a=this.twoline?this.renderTwoline():this.renderSingleLine();return g(N||(N=j(["\n <span class=\"mdc-deprecated-list-item__text\">\n ","\n </span>"])),a)}renderSingleLine(){return g(O||(O=j(["<slot></slot>"])))}renderTwoline(){return g(P||(P=j(["\n <span class=\"mdc-deprecated-list-item__primary-text\">\n <slot></slot>\n </span>\n <span class=\"mdc-deprecated-list-item__secondary-text\">\n <slot name=\"secondary\"></slot>\n </span>\n "])))}onClick(){this.fireRequestSelected(!this.selected,"interaction")}onDown(a,b){var c=()=>{window.removeEventListener(a,c),this.rippleHandlers.endPress()};window.addEventListener(a,c),this.rippleHandlers.startPress(b)}fireRequestSelected(a,b){if(!this.noninteractive){var c=new CustomEvent("request-selected",{bubbles:!0,composed:!0,detail:{source:b,selected:a}});this.dispatchEvent(c)}}connectedCallback(){super.connectedCallback(),this.noninteractive||this.setAttribute("mwc-list-item","");for(var a of this.listeners)for(var b of a.eventNames)a.target.addEventListener(b,a.cb,{passive:!0})}disconnectedCallback(){super.disconnectedCallback();for(var a of this.listeners)for(var b of a.eventNames)a.target.removeEventListener(b,a.cb);this._managingList&&(this._managingList.debouncedLayout?this._managingList.debouncedLayout(!0):this._managingList.layout(!0))}firstUpdated(){var a=new Event("list-item-rendered",{bubbles:!0,composed:!0});this.dispatchEvent(a)}}jb([eb("slot")],Vd.prototype,"slotElement",void 0),jb([function(a){return yd({descriptor:()=>({get(){var b=this;return o(function*(){var c;return yield b.updateComplete,null===(c=b.renderRoot)||void 0===c?void 0:c.querySelector(a)})()},enumerable:!0,configurable:!0})})}("mwc-ripple")],Vd.prototype,"ripple",void 0),jb([cb({type:String})],Vd.prototype,"value",void 0),jb([cb({type:String,reflect:!0})],Vd.prototype,"group",void 0),jb([cb({type:Number,reflect:!0})],Vd.prototype,"tabindex",void 0),jb([cb({type:Boolean,reflect:!0}),wd(function(a){a?this.setAttribute("aria-disabled","true"):this.setAttribute("aria-disabled","false")})],Vd.prototype,"disabled",void 0),jb([cb({type:Boolean,reflect:!0})],Vd.prototype,"twoline",void 0),jb([cb({type:Boolean,reflect:!0})],Vd.prototype,"activated",void 0),jb([cb({type:String,reflect:!0})],Vd.prototype,"graphic",void 0),jb([cb({type:Boolean})],Vd.prototype,"multipleGraphics",void 0),jb([cb({type:Boolean})],Vd.prototype,"hasMeta",void 0),jb([cb({type:Boolean,reflect:!0}),wd(function(a){a?(this.removeAttribute("aria-checked"),this.removeAttribute("mwc-list-item"),this.selected=!1,this.activated=!1,this.tabIndex=-1):this.setAttribute("mwc-list-item","")})],Vd.prototype,"noninteractive",void 0),jb([cb({type:Boolean,reflect:!0}),wd(function(a){var b=this.getAttribute("role"),c="gridcell"===b||"option"===b||"row"===b||"tab"===b;return c&&a?this.setAttribute("aria-selected","true"):c&&this.setAttribute("aria-selected","false"),this._firstChanged?void(this._firstChanged=!1):void(this._skipPropRequest||this.fireRequestSelected(a,"property"))})],Vd.prototype,"selected",void 0),jb([db()],Vd.prototype,"shouldRenderRipple",void 0),jb([db()],Vd.prototype,"_managingList",void 0);var Wd=vb(Q||(Q=j([":host{cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;height:48px;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:var(--mdc-list-side-padding, 16px);padding-right:var(--mdc-list-side-padding, 16px);outline:none;height:48px;color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}:host:focus{outline:none}:host([activated]){color:#6200ee;color:var(--mdc-theme-primary, #6200ee);--mdc-ripple-color: var( --mdc-theme-primary, #6200ee )}:host([activated]) .mdc-deprecated-list-item__graphic{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host([activated]) .fake-activated-ripple::before{position:absolute;display:block;top:0;bottom:0;left:0;right:0;width:100%;height:100%;pointer-events:none;z-index:1;content:\"\";opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12);background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-deprecated-list-item__graphic{flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;display:inline-flex}.mdc-deprecated-list-item__graphic ::slotted(*){flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;width:100%;height:100%;text-align:center}.mdc-deprecated-list-item__meta{width:var(--mdc-list-item-meta-size, 24px);height:var(--mdc-list-item-meta-size, 24px);margin-left:auto;margin-right:0;color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-hint-on-background, rgba(0, 0, 0, 0.38))}.mdc-deprecated-list-item__meta.multi{width:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:var(--mdc-list-item-meta-size, 24px);line-height:var(--mdc-list-item-meta-size, 24px)}.mdc-deprecated-list-item__meta ::slotted(.material-icons),.mdc-deprecated-list-item__meta ::slotted(mwc-icon){line-height:var(--mdc-list-item-meta-size, 24px) !important}.mdc-deprecated-list-item__meta ::slotted(:not(.material-icons):not(mwc-icon)){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit)}[dir=rtl] .mdc-deprecated-list-item__meta,.mdc-deprecated-list-item__meta[dir=rtl]{margin-left:0;margin-right:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:100%;height:100%}.mdc-deprecated-list-item__text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mdc-deprecated-list-item__text ::slotted([for]),.mdc-deprecated-list-item__text[for]{pointer-events:none}.mdc-deprecated-list-item__primary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;margin-bottom:-20px;display:block}.mdc-deprecated-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:\"\";vertical-align:0}.mdc-deprecated-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:\"\";vertical-align:-20px}.mdc-deprecated-list-item__secondary-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;display:block}.mdc-deprecated-list-item__secondary-text::before{display:inline-block;width:0;height:20px;content:\"\";vertical-align:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__secondary-text{font-size:inherit}* ::slotted(a),a{color:inherit;text-decoration:none}:host([twoline]){height:72px}:host([twoline]) .mdc-deprecated-list-item__text{align-self:flex-start}:host([disabled]),:host([noninteractive]){cursor:default;pointer-events:none}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*){opacity:.38}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__primary-text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__secondary-text ::slotted(*){color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-deprecated-list-item__secondary-text ::slotted(*){color:rgba(0, 0, 0, 0.54);color:var(--mdc-theme-text-secondary-on-background, rgba(0, 0, 0, 0.54))}.mdc-deprecated-list-item__graphic ::slotted(*){background-color:transparent;color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-icon-on-background, rgba(0, 0, 0, 0.38))}.mdc-deprecated-list-group__subheader ::slotted(*){color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 40px);height:var(--mdc-list-item-graphic-size, 40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 40px);line-height:var(--mdc-list-item-graphic-size, 40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 40px) !important}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){border-radius:50%}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic,:host([graphic=medium]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic,:host([graphic=control]) .mdc-deprecated-list-item__graphic{margin-left:0;margin-right:var(--mdc-list-item-graphic-margin, 16px)}[dir=rtl] :host([graphic=avatar]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=medium]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=large]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=control]) .mdc-deprecated-list-item__graphic,:host([graphic=avatar]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=medium]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=large]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=control]) .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:var(--mdc-list-item-graphic-margin, 16px);margin-right:0}:host([graphic=icon]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 24px);height:var(--mdc-list-item-graphic-size, 24px);margin-left:0;margin-right:var(--mdc-list-item-graphic-margin, 32px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 24px);line-height:var(--mdc-list-item-graphic-size, 24px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 24px) !important}[dir=rtl] :host([graphic=icon]) .mdc-deprecated-list-item__graphic,:host([graphic=icon]) .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:var(--mdc-list-item-graphic-margin, 32px);margin-right:0}:host([graphic=avatar]:not([twoLine])),:host([graphic=icon]:not([twoLine])){height:56px}:host([graphic=medium]:not([twoLine])),:host([graphic=large]:not([twoLine])){height:72px}:host([graphic=medium]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 56px);height:var(--mdc-list-item-graphic-size, 56px)}:host([graphic=medium]) .mdc-deprecated-list-item__graphic.multi,:host([graphic=large]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(*),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 56px);line-height:var(--mdc-list-item-graphic-size, 56px)}:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 56px) !important}:host([graphic=large]){padding-left:0px}"]))),Xd=function(a,c){return Xd=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,c){a.__proto__=c}||function(a,c){for(var b in c)Object.prototype.hasOwnProperty.call(c,b)&&(a[b]=c[b])},Xd(a,c)},Yd=function(){return Yd=Object.assign||function(a){for(var b,c=1,d=arguments.length;c<d;c++)for(var e in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,e)&&(a[e]=b[e]);return a},Yd.apply(this,arguments)},Zd={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},$d={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},_d={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300},ae=["touchstart","pointerdown","mousedown","keydown"],be=["touchend","pointerup","mouseup","contextmenu"],ce=[],de=function(a){function b(c){var d=a.call(this,Yd(Yd({},b.defaultAdapter),c))||this;return d.activationAnimationHasEnded=!1,d.activationTimer=0,d.fgDeactivationRemovalTimer=0,d.fgScale="0",d.frame={width:0,height:0},d.initialSize=0,d.layoutFrame=0,d.maxRadius=0,d.unboundedCoords={left:0,top:0},d.activationState=d.defaultActivationState(),d.activationTimerCallback=function(){d.activationAnimationHasEnded=!0,d.runDeactivationUXLogicIfReady()},d.activateHandler=function(a){d.activateImpl(a)},d.deactivateHandler=function(){d.deactivateImpl()},d.focusHandler=function(){d.handleFocus()},d.blurHandler=function(){d.handleBlur()},d.resizeHandler=function(){d.layout()},d}return ob(b,a),Object.defineProperty(b,"cssClasses",{get:function(){return Zd},enumerable:!1,configurable:!0}),Object.defineProperty(b,"strings",{get:function(){return $d},enumerable:!1,configurable:!0}),Object.defineProperty(b,"numbers",{get:function(){return _d},enumerable:!1,configurable:!0}),Object.defineProperty(b,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),b.prototype.init=function(){var a=this,c=this.supportsPressRipple();if(this.registerRootHandlers(c),c){var d=b.cssClasses,e=d.ROOT,f=d.UNBOUNDED;requestAnimationFrame(function(){a.adapter.addClass(e),a.adapter.isUnbounded()&&(a.adapter.addClass(f),a.layoutInternal())})}},b.prototype.destroy=function(){var a=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(b.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(b.cssClasses.FG_DEACTIVATION));var c=b.cssClasses,d=c.ROOT,e=c.UNBOUNDED;requestAnimationFrame(function(){a.adapter.removeClass(d),a.adapter.removeClass(e),a.removeCssVars()})}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},b.prototype.activate=function(a){this.activateImpl(a)},b.prototype.deactivate=function(){this.deactivateImpl()},b.prototype.layout=function(){var a=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame(function(){a.layoutInternal(),a.layoutFrame=0})},b.prototype.setUnbounded=function(a){var c=b.cssClasses.UNBOUNDED;a?this.adapter.addClass(c):this.adapter.removeClass(c)},b.prototype.handleFocus=function(){var a=this;requestAnimationFrame(function(){return a.adapter.addClass(b.cssClasses.BG_FOCUSED)})},b.prototype.handleBlur=function(){var a=this;requestAnimationFrame(function(){return a.adapter.removeClass(b.cssClasses.BG_FOCUSED)})},b.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},b.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},b.prototype.registerRootHandlers=function(a){var b,c;if(a){try{for(var d,e=pb(ae),f=e.next();!f.done;f=e.next())d=f.value,this.adapter.registerInteractionHandler(d,this.activateHandler)}catch(a){b={error:a}}finally{try{f&&!f.done&&(c=e.return)&&c.call(e)}finally{if(b)throw b.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},b.prototype.registerDeactivationHandlers=function(a){var b,c;if("keydown"===a.type)this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var d,e=pb(be),f=e.next();!f.done;f=e.next())d=f.value,this.adapter.registerDocumentInteractionHandler(d,this.deactivateHandler)}catch(a){b={error:a}}finally{try{f&&!f.done&&(c=e.return)&&c.call(e)}finally{if(b)throw b.error}}},b.prototype.deregisterRootHandlers=function(){var a,b;try{for(var c,d=pb(ae),e=d.next();!e.done;e=d.next())c=e.value,this.adapter.deregisterInteractionHandler(c,this.activateHandler)}catch(b){a={error:b}}finally{try{e&&!e.done&&(b=d.return)&&b.call(d)}finally{if(a)throw a.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},b.prototype.deregisterDeactivationHandlers=function(){var a,b;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var c,d=pb(be),e=d.next();!e.done;e=d.next())c=e.value,this.adapter.deregisterDocumentInteractionHandler(c,this.deactivateHandler)}catch(b){a={error:b}}finally{try{e&&!e.done&&(b=d.return)&&b.call(d)}finally{if(a)throw a.error}}},b.prototype.removeCssVars=function(){var a=this,c=b.strings,d=Object.keys(c);d.forEach(function(b){0===b.indexOf("VAR_")&&a.adapter.updateCssVariable(c[b],null)})},b.prototype.activateImpl=function(a){var b=this;if(!this.adapter.isSurfaceDisabled()){var c=this.activationState;if(!c.isActivated){var d=this.previousActivationEvent,e=d&&void 0!==a&&d.type!==a.type;if(!e){c.isActivated=!0,c.isProgrammatic=void 0===a,c.activationEvent=a,c.wasActivatedByPointer=!c.isProgrammatic&&void 0!==a&&("mousedown"===a.type||"touchstart"===a.type||"pointerdown"===a.type);var f=void 0!==a&&0<ce.length&&ce.some(function(a){return b.adapter.containsEventTarget(a)});return f?void this.resetActivationState():void(void 0!==a&&(ce.push(a.target),this.registerDeactivationHandlers(a)),c.wasElementMadeActive=this.checkElementMadeActive(a),c.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame(function(){ce=[],c.wasElementMadeActive||void 0===a||" "!==a.key&&32!==a.keyCode||(c.wasElementMadeActive=b.checkElementMadeActive(a),c.wasElementMadeActive&&b.animateActivation()),c.wasElementMadeActive||(b.activationState=b.defaultActivationState())}))}}}},b.prototype.checkElementMadeActive=function(a){return void 0===a||"keydown"!==a.type||this.adapter.isSurfaceActive()},b.prototype.animateActivation=function(){var a=this,c=b.strings,d=c.VAR_FG_TRANSLATE_START,e=c.VAR_FG_TRANSLATE_END,f=b.cssClasses,g=f.FG_DEACTIVATION,h=f.FG_ACTIVATION,i=b.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var j="",k="";if(!this.adapter.isUnbounded()){var l=this.getFgTranslationCoordinates(),m=l.startPoint,n=l.endPoint;j=m.x+"px, "+m.y+"px",k=n.x+"px, "+n.y+"px"}this.adapter.updateCssVariable(d,j),this.adapter.updateCssVariable(e,k),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(g),this.adapter.computeBoundingRect(),this.adapter.addClass(h),this.activationTimer=setTimeout(function(){a.activationTimerCallback()},i)},b.prototype.getFgTranslationCoordinates=function(){var a,b=this.activationState,c=b.activationEvent,d=b.wasActivatedByPointer;a=d?qb(c,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame.width/2,y:this.frame.height/2},a={x:a.x-this.initialSize/2,y:a.y-this.initialSize/2};var e={x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2};return{startPoint:a,endPoint:e}},b.prototype.runDeactivationUXLogicIfReady=function(){var a=this,c=b.cssClasses.FG_DEACTIVATION,d=this.activationState,e=d.hasDeactivationUXRun,f=d.isActivated;(e||!f)&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(c),this.fgDeactivationRemovalTimer=setTimeout(function(){a.adapter.removeClass(c)},_d.FG_DEACTIVATION_MS))},b.prototype.rmBoundedActivationClasses=function(){var a=b.cssClasses.FG_ACTIVATION;this.adapter.removeClass(a),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},b.prototype.resetActivationState=function(){var a=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout(function(){return a.previousActivationEvent=void 0},b.numbers.TAP_DELAY_MS)},b.prototype.deactivateImpl=function(){var a=this,b=this.activationState;if(b.isActivated){var c=Yd({},b);b.isProgrammatic?(requestAnimationFrame(function(){a.animateDeactivation(c)}),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame(function(){a.activationState.hasDeactivationUXRun=!0,a.animateDeactivation(c),a.resetActivationState()}))}},b.prototype.animateDeactivation=function(a){var b=a.wasActivatedByPointer,c=a.wasElementMadeActive;(b||c)&&this.runDeactivationUXLogicIfReady()},b.prototype.layoutInternal=function(){var a=Math.floor,c=Math.max,d=this;this.frame=this.adapter.computeBoundingRect();var e=c(this.frame.height,this.frame.width);this.maxRadius=this.adapter.isUnbounded()?e:function getBoundedRadius(){var a=Math.sqrt,c=Math.pow,e=a(c(d.frame.width,2)+c(d.frame.height,2));return e+b.numbers.PADDING}();var f=a(e*b.numbers.INITIAL_ORIGIN_SCALE);this.initialSize=this.adapter.isUnbounded()&&0!=f%2?f-1:f,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},b.prototype.updateLayoutCssVars=function(){var a=b.strings,c=a.VAR_FG_SIZE,d=a.VAR_LEFT,e=a.VAR_TOP,f=a.VAR_FG_SCALE;this.adapter.updateCssVariable(c,this.initialSize+"px"),this.adapter.updateCssVariable(f,this.fgScale),this.adapter.isUnbounded()&&(this.unboundedCoords={left:La(this.frame.width/2-this.initialSize/2),top:La(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(d,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(e,this.unboundedCoords.top+"px"))},b}(bd);class ee extends ud{constructor(){super(...arguments),this.primary=!1,this.accent=!1,this.unbounded=!1,this.disabled=!1,this.activated=!1,this.selected=!1,this.internalUseStateLayerCustomProperties=!1,this.hovering=!1,this.bgFocused=!1,this.fgActivation=!1,this.fgDeactivation=!1,this.fgScale="",this.fgSize="",this.translateStart="",this.translateEnd="",this.leftPos="",this.topPos="",this.mdcFoundationClass=de}get isActive(){return nb(this.parentElement||this,":active")}createAdapter(){return{browserSupportsCssVars:()=>!0,isUnbounded:()=>this.unbounded,isSurfaceActive:()=>this.isActive,isSurfaceDisabled:()=>this.disabled,addClass:a=>{switch(a){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!0;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!0;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!0;break;default:}},removeClass:a=>{switch(a){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!1;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!1;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!1;break;default:}},containsEventTarget:()=>!0,registerInteractionHandler:()=>void 0,deregisterInteractionHandler:()=>void 0,registerDocumentInteractionHandler:()=>void 0,deregisterDocumentInteractionHandler:()=>void 0,registerResizeHandler:()=>void 0,deregisterResizeHandler:()=>void 0,updateCssVariable:(a,b)=>{switch(a){case"--mdc-ripple-fg-scale":this.fgScale=b;break;case"--mdc-ripple-fg-size":this.fgSize=b;break;case"--mdc-ripple-fg-translate-end":this.translateEnd=b;break;case"--mdc-ripple-fg-translate-start":this.translateStart=b;break;case"--mdc-ripple-left":this.leftPos=b;break;case"--mdc-ripple-top":this.topPos=b;break;default:}},computeBoundingRect:()=>(this.parentElement||this).getBoundingClientRect(),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset})}}startPress(a){this.waitForFoundation(()=>{this.mdcFoundation.activate(a)})}endPress(){this.waitForFoundation(()=>{this.mdcFoundation.deactivate()})}startFocus(){this.waitForFoundation(()=>{this.mdcFoundation.handleFocus()})}endFocus(){this.waitForFoundation(()=>{this.mdcFoundation.handleBlur()})}startHover(){this.hovering=!0}endHover(){this.hovering=!1}waitForFoundation(a){this.mdcFoundation?a():this.updateComplete.then(a)}update(a){a.has("disabled")&&this.disabled&&this.endHover(),super.update(a)}render(){var a=this.activated&&(this.primary||!this.accent),b=this.selected&&(this.primary||!this.accent),c={"mdc-ripple-surface--accent":this.accent,"mdc-ripple-surface--primary--activated":a,"mdc-ripple-surface--accent--activated":this.accent&&this.activated,"mdc-ripple-surface--primary--selected":b,"mdc-ripple-surface--accent--selected":this.accent&&this.selected,"mdc-ripple-surface--disabled":this.disabled,"mdc-ripple-surface--hover":this.hovering,"mdc-ripple-surface--primary":this.primary,"mdc-ripple-surface--selected":this.selected,"mdc-ripple-upgraded--background-focused":this.bgFocused,"mdc-ripple-upgraded--foreground-activation":this.fgActivation,"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation,"mdc-ripple-upgraded--unbounded":this.unbounded,"mdc-ripple-surface--internal-use-state-layer-custom-properties":this.internalUseStateLayerCustomProperties};return g(R||(R=j(["\n <div class=\"mdc-ripple-surface mdc-ripple-upgraded ","\"\n style=\"","\"></div>"])),vc(c),wc({"--mdc-ripple-fg-scale":this.fgScale,"--mdc-ripple-fg-size":this.fgSize,"--mdc-ripple-fg-translate-end":this.translateEnd,"--mdc-ripple-fg-translate-start":this.translateStart,"--mdc-ripple-left":this.leftPos,"--mdc-ripple-top":this.topPos}))}}mb([eb(".mdc-ripple-surface")],ee.prototype,"mdcRoot",void 0),mb([cb({type:Boolean})],ee.prototype,"primary",void 0),mb([cb({type:Boolean})],ee.prototype,"accent",void 0),mb([cb({type:Boolean})],ee.prototype,"unbounded",void 0),mb([cb({type:Boolean})],ee.prototype,"disabled",void 0),mb([cb({type:Boolean})],ee.prototype,"activated",void 0),mb([cb({type:Boolean})],ee.prototype,"selected",void 0),mb([cb({type:Boolean})],ee.prototype,"internalUseStateLayerCustomProperties",void 0),mb([db()],ee.prototype,"hovering",void 0),mb([db()],ee.prototype,"bgFocused",void 0),mb([db()],ee.prototype,"fgActivation",void 0),mb([db()],ee.prototype,"fgDeactivation",void 0),mb([db()],ee.prototype,"fgScale",void 0),mb([db()],ee.prototype,"fgSize",void 0),mb([db()],ee.prototype,"translateStart",void 0),mb([db()],ee.prototype,"translateEnd",void 0),mb([db()],ee.prototype,"leftPos",void 0),mb([db()],ee.prototype,"topPos",void 0);var fe=vb(U||(U=j([".mdc-ripple-surface{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity;position:relative;outline:none;overflow:hidden}.mdc-ripple-surface::before,.mdc-ripple-surface::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\"\"}.mdc-ripple-surface::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface::before,.mdc-ripple-surface::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-upgraded--unbounded::before,.mdc-ripple-upgraded--unbounded::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface::before,.mdc-ripple-surface::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-ripple-surface:hover::before,.mdc-ripple-surface.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;display:block}:host .mdc-ripple-surface{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;will-change:unset}.mdc-ripple-surface--primary::before,.mdc-ripple-surface--primary::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary:hover::before,.mdc-ripple-surface--primary.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--primary.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before,.mdc-ripple-surface--primary--activated::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--activated:hover::before,.mdc-ripple-surface--primary--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--primary--selected::before,.mdc-ripple-surface--primary--selected::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--selected:hover::before,.mdc-ripple-surface--primary--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent::before,.mdc-ripple-surface--accent::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent:hover::before,.mdc-ripple-surface--accent.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--accent.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before,.mdc-ripple-surface--accent--activated::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--activated:hover::before,.mdc-ripple-surface--accent--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--accent--selected::before,.mdc-ripple-surface--accent--selected::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--selected:hover::before,.mdc-ripple-surface--accent--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--disabled{opacity:0}.mdc-ripple-surface--internal-use-state-layer-custom-properties::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties::after{background-color:#000;background-color:var(--mdc-ripple-hover-state-layer-color, #000)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:hover::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-state-layer-opacity, 0.04)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}"])));class ge extends Xa(ee){static get defineId(){return"mwc-ripple"}static get elementDefinitions(){return Qc([],ge)}static get styles(){return fe}}class he extends Xa(Vd){static get defineId(){return"mwc-list-item"}static get elementDefinitions(){return Qc([ge],he)}static get styles(){return Wd}}class ie extends Xa(Sd){static get defineId(){return"mwc-list"}static get elementDefinitions(){return Qc([he],ie)}static get styles(){return Td}}class je extends Xa(Kd){static get defineId(){return"mwc-menu"}static get elementDefinitions(){return Qc([Pd,ie],je)}static get styles(){return Ld}}class ke extends Xa($b){static get defineId(){return"mc-dropdown-base"}static get elementDefinitions(){return Qc([Sc("ha-icon"),Sc("ha-icon-button"),je,he],ke)}static get properties(){return{items:[],label:String,selected:String,icon:String,active:Boolean,disabled:Boolean}}get selectedId(){return this.items.map(a=>a.id).indexOf(this.selected)}onChange(a){var{index:b}=a.detail;b!==this.selectedId&&this.items[b]&&(this.dispatchEvent(new CustomEvent("change",{detail:this.items[b]})),a.detail.index=-1)}handleClick(){var a=this.shadowRoot.querySelector("#menu");a.anchor=this.shadowRoot.querySelector("#button"),a.show()}render(){return g(V||(V=j(["\n <div class='mc-dropdown'>\n <ha-icon-button class='mc-dropdown__button icon' \n id=","\n @click=","\n ?disabled=","\n ?color=",">\n <ha-icon .icon=","></ha-icon>\n </ha-icon-button>\n <mwc-menu fixed\n id=","\n ?quick=","\n .menuCorner=","\n .corner=","\n @selected=",">\n ","\n </mwc-menu>\n </div>\n "])),"button",this.handleClick,this.disabled,this.active,this.icon,"menu",!0,"END","TOP_RIGHT",this.onChange,this.items.map(a=>g(W||(W=j(["\n <mwc-list-item value="," ?selected=",">\n <span class='mc-dropdown__item__label'>","</span>\n </mwc-list-item>"])),a.id||a.name,this.selected===a.id,a.name)))}static get styles(){return[yc,vb(X||(X=j(["\n :host {\n position: relative;\n overflow: hidden;\n }\n .mc-dropdown\n :host([disabled]) {\n opacity: .25;\n pointer-events: none;\n }\n :host([faded]) {\n opacity: .75;\n }\n .mc-dropdown {\n padding: 0;\n }\n ha-icon-button[disabled] {\n opacity: .25;\n pointer-events: none;\n }\n .mc-dropdown__button.icon {\n margin: 0;\n }\n ha-icon-button {\n width: calc(var(--mc-dropdown-unit));\n height: calc(var(--mc-dropdown-unit));\n --mdc-icon-button-size: calc(var(--mc-dropdown-unit));\n }\n mwc-item > *:nth-child(2) {\n margin-left: 4px;\n }\n .mc-dropdown[focused] ha-icon-button {\n color: var(--mc-accent-color);\n }\n .mc-dropdown[focused] ha-icon-button[focused] {\n color: var(--mc-text-color);\n transform: rotate(0deg);\n }\n "])))]}}class le extends Xa($b){static get defineId(){return"mc-mode-menu"}static get elementDefinitions(){return Qc([ke],le)}constructor(){super(),this.mode={}}static get properties(){return{mode:{type:Object}}}get calcIcon(){if(this.selected){if(this.selected.icon)return this.selected.icon;if(void 0!==this.selected.id&&null!==this.selected.id){var a=this.selected.id.toString().toUpperCase();if(a in Bc)return Bc[a]}}return""}get selected(){return this.mode.source.find(a=>a.id===this.mode.state)||{}}get sources(){return this.mode.source.filter(a=>!a.hide).map(a=>({name:a.name,id:a.id,type:"source"}))}handleChange(a){a.stopPropagation();var b=a.detail.id;this.mode.handleChange(b)}render(){return g(Y||(Y=j(["\n <mc-dropdown-base\n @change=","\n .items=","\n .icon=","\n style=","\n .active=","\n .selected=",">\n </mc-dropdown-base>\n "])),this.handleChange,this.sources,this.calcIcon,wc(this.mode.style),this.mode.isActive(this.mode.state),this.selected.id)}static get styles(){return vb(Z||(Z=j(["\n :host {\n min-width: calc(var(--mc-unit) * .85);\n --mc-dropdown-unit: calc(var(--mc-unit) * .75);\n --paper-item-min-height: var(--mc-unit);\n }\n "])))}}class me extends Xa($b){static get defineId(){return"mc-indicators"}static get elementDefinitions(){return Qc([Sc("ha-icon")],me)}static get properties(){return{indicators:{type:Object}}}handlePopup(a,b){a.stopPropagation(),zc(this,b.hass,b.config.tap_action,b.entity.entity_id)}renderIcon(a){var{icon:b}=a;return b?g(_||(_=j(["<ha-icon style="," class='state__value_icon' .icon=","></ha-icon>"])),wc(a.iconStyle),b):""}renderUnit(a){return a?g(aa||(aa=j(["<span class='state__uom'>","</span>"])),a):""}renderIndicator(a){if(!a)return"";var b=a.config&&a.config.tap_action&&a.config.tap_action.action,c=b&&Ec.includes(b)?"pointer":"";return g(ba||(ba=j(["\n <div class='state ","' @click=",">\n ","\n <span class='state__value'>","</span>\n ","\n </div>\n "])),c,b=>this.handlePopup(b,a),this.renderIcon(a),a.value,this.renderUnit(a.unit))}render(){var a=this;return g(ca||(ca=j(["\n <div class='mc-indicators__container'>\n ","\n </div>\n "])),Object.entries(this.indicators).map(b=>a.renderIndicator(b[1])))}static get styles(){return vb(da||(da=j(["\n :host {\n position: relative;\n box-sizing: border-box;\n font-size: calc(var(--mc-unit) * .35);\n line-height: calc(var(--mc-unit) * .35);\n }\n .mc-indicators__container {\n display: flex;\n flex-wrap: wrap;\n margin-right: calc(var(--mc-unit) * .075);\n }\n .state {\n position: relative;\n display: flex;\n flex-wrap: nowrap;\n margin-right: calc(var(--mc-unit) * .1);\n }\n .pointer {\n cursor: pointer\n }\n .state__value_icon {\n height: calc(var(--mc-unit) * .475);\n width: calc(var(--mc-unit) * .5);\n color: var(--mc-icon-color);\n --mdc-icon-size: calc(var(--mc-unit) * 0.5);\n }\n .state__value {\n margin: 0 1px;\n font-weight: var(--mc-info-font-weight);\n line-height: calc(var(--mc-unit) * .475);\n }\n .state__uom {\n font-size: calc(var(--mc-unit) * .275);\n line-height: calc(var(--mc-unit) * .525);\n margin-left: 1px;\n height: calc(var(--mc-unit) * .475);\n opacity: 0.8;\n }\n "])))}}class ne extends Xa($b){static get defineId(){return"mc-dropdown"}static get elementDefinitions(){return Qc([ke],ne)}constructor(){super(),this.dropdown={},this.timer=void 0,this._state=void 0}static get properties(){return{dropdown:{type:Object}}}handleChange(a){var b=this;a.stopPropagation();var c=a.detail.id,{entity:d}=this.dropdown;this._state=c,this.dropdown.handleChange(c),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(o(function*(){b.dropdown.entity===d&&(b._state=b.dropdown.state!==void 0&&null!==b.dropdown.state?b.dropdown.state.toString():"",b.requestUpdate("_state"))}),this.dropdown.actionTimeout),this.requestUpdate("_state")}render(){return g(ea||(ea=j(["\n <mc-dropdown-base\n style=","\n @change=","\n .items=","\n .icon=","\n .disabled=\"","\"\n .active=","\n .selected=",">\n </mc-dropdown-base>\n "])),wc(this.dropdown.style),a=>this.handleChange(a),this.dropdown.source,this.dropdown.icon,this.dropdown.disabled,this.dropdown.isActive(this._state),this._state)}updated(a){a.has("dropdown")&&(this._state=this.dropdown.state!==void 0&&null!==this.dropdown.state?this.dropdown.state.toString():"",this.timer&&clearTimeout(this.timer),this.requestUpdate("_state"))}static get styles(){return[yc,vb(fa||(fa=j(["\n :host {\n position: relative;\n box-sizing: border-box;\n margin: 0;\n overflow: hidden;\n transition: background .5s;\n }\n :host([color]) {\n background: var(--mc-active-color);\n transition: background .25s;\n opacity: 1;\n }\n :host([disabled]) {\n opacity: .25;\n pointer-events: none;\n }\n "])))]}}class oe extends Xa($b){static get defineId(){return"mc-button"}static get elementDefinitions(){return Qc([Sc("ha-icon"),Sc("ha-icon-button")],oe)}constructor(){super(),this._isOn=!1,this.timer=void 0}static get properties(){return{button:{type:Object}}}handleToggle(a){var b=this;a.stopPropagation();var{entity:c}=this.button;this._isOn=!this._isOn,this.button.handleToggle(),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(o(function*(){b.button.entity===c&&(b._isOn=b.button.isOn,b.requestUpdate("_isOn"))}),this.button.actionTimeout),this.requestUpdate("_isOn")}render(){return g(ga||(ga=j(["\n <ha-icon-button\n style=","\n .icon=","\n @click=","\n ?disabled=\"","\"\n ?color=",">\n <ha-icon .icon=","></ha-icon>\n </ha-icon-button>\n "])),wc(this.button.style),this.button.icon,a=>this.handleToggle(a),this.button.disabled||this.button.isUnavailable,this._isOn,this.button.icon)}updated(a){a.has("button")&&(this._isOn=this.button.isOn,this.timer&&clearTimeout(this.timer),this.requestUpdate("_isOn"))}static get styles(){return[yc,vb(ha||(ha=j(["\n :host {\n position: relative;\n box-sizing: border-box;\n margin: 0;\n overflow: hidden;\n transition: background .5s;\n }\n :host([color]) {\n background: var(--mc-active-color);\n transition: background .25s;\n opacity: 1;\n }\n :host([disabled]) {\n opacity: .25;\n pointer-events: none;\n }\n "])))]}}class pe extends Xa($b){static get defineId(){return"mc-buttons"}static get elementDefinitions(){return Qc([ne,oe],pe)}static get properties(){return{buttons:{}}}renderButton(a){return a.isUnavailable?"":g(ia||(ia=j(["\n <mc-button\n class=\"custom-button\"\n .button=",">\n </mc-button>\n "])),a)}renderDropdown(a){return g(ja||(ja=j(["\n <mc-dropdown\n .dropdown=",">\n </mc-dropdown>\n "])),a)}renderInternal(a){return"dropdown"===a.type?this.renderDropdown(a):this.renderButton(a)}render(){var a=this;return g(ka||(ka=j(["",""])),Object.entries(this.buttons).map(a=>a[1]).filter(a=>"main"!==a.location&&!a.hide).sort((a,b)=>a.order>b.order?1:b.order>a.order?-1:0).map(b=>a.renderInternal(b)))}static get styles(){return[yc,vb(la||(la=j(["\n :host {\n position: relative;\n box-sizing: border-box;\n margin: 0;\n overflow: hidden;\n transition: background .5s;\n --paper-item-min-height: var(--mc-unit);\n --mc-dropdown-unit: var(--mc-unit);\n --mdc-icon-button-size: calc(var(--mc-unit));\n }\n :host([color]) {\n background: var(--mc-active-color);\n transition: background .25s;\n opacity: 1;\n }\n :host([disabled]) {\n opacity: .25;\n pointer-events: none;\n }\n mc-button {\n width: calc(var(--mc-unit));\n height: calc(var(--mc-unit));\n }\n "])))]}}class qe extends Xa($b){static get defineId(){return"mc-fan-mode-secondary"}static get elementDefinitions(){return Qc([Sc("ha-icon"),je,he],qe)}constructor(){super(),this.fanMode={},this.config={},this.timer=void 0,this._selected={},this.source={}}static get properties(){return{fanMode:{type:Object},config:{type:Object}}}get selectedIndex(){return this.fanMode.source.map(a=>a.id).indexOf(this._selected.id)}handleChange(a){var b=this,{index:c}=a.detail;if(c!==this.selectedIndex&&this.fanMode.source[c]){clearTimeout(this.timer);var d=this.fanMode.source[c],{entity:e}=this.fanMode,f=this._selected;this._selected=d,this.timer=setTimeout(o(function*(){b.fanMode.entity===e&&(b._selected=f,b.requestUpdate("_selected"))}),this.fanMode.actionTimeout),this.fanMode.handleChange(d.id),this.requestUpdate("_selected")}}renderFanMode(){var a=this._selected?this._selected.name:this.fanMode.state,b=this.config.secondary_info.icon?this.config.secondary_info.icon:this.fanMode.icon;return g(ma||(ma=j(["\n <ha-icon class='icon' .icon=","></ha-icon>\n <span class='name'>","</span>\n "])),b,a)}handleClick(){var a=this.shadowRoot.querySelector("#menu");a.anchor=this.shadowRoot.querySelector("#button"),a.show()}renderFanModeDropdown(){return g(na||(na=j(["\n <div class='mc-dropdown'>\n <ha-icon-button class='mc-dropdown__button icon'\n id=","\n @click=","\n ?disabled=","\n >\n ","\n </ha-icon-button>\n <mwc-menu fixed\n id=","\n ?quick=","\n .menuCorner=","\n .corner=","\n @selected=",">\n ","\n </mwc-menu>\n </div>\n "])),"button",this.handleClick,this.fanMode.disabled,this.renderFanMode(),"menu",!0,"END","TOP_RIGHT",this.handleChange,this.fanMode.source.map(a=>g(oa||(oa=j(["\n <mwc-list-item value="," ?selected=",">\n <span class='mc-dropdown__item__label'>","</span>\n </mwc-list-item>"])),a.id||a.name,this._selected.id&&this._selected.id===a.id,a.name)))}render(){var{type:a}=this.config.secondary_info;return"fan-mode-dropdown"===a?this.renderFanModeDropdown():this.renderFanMode()}updated(a){a.has("fanMode")&&(clearTimeout(this.timer),this._selected=this.fanMode.selected,this.requestUpdate("_selected"))}static get styles(){return[yc,vb(pa||(pa=j(["\n .mc-dropdown {\n padding: 0;\n }\n .name {\n font-size: calc(var(--mc-unit) * .35);\n font-weight: var(--mc-info-font-weight);\n line-height: calc(var(--mc-unit) * .5);\n vertical-align: middle;\n display: inline-block;\n }\n .icon {\n color: var(--mc-icon-color);\n height: calc(var(--mc-unit) * .475);\n width: calc(var(--mc-unit) * .5);\n min-width: calc(var(--mc-unit) * .5);\n --mdc-icon-size: calc(var(--mc-unit) * 0.5);\n }\n "])))]}}class re extends Xa($b){static get defineId(){return"mc-secondary-info"}static get elementDefinitions(){return Qc([Sc("ha-icon"),Sc("ha-relative-time"),qe],re)}constructor(){super(),this.fanMode={},this.hvacMode={},this.config={},this.climate={}}static get properties(){return{fanMode:{type:Object},config:{type:Object},hvacMode:{type:Object},climate:{type:Object}}}renderHvacAction(){var a=this.climate.hvacAction;if(!a)return"";var b=a.icon?a.icon:this.config.secondary_info.icon,c=b?"":"gray";return g(qa||(qa=j(["\n ","\n <span class='name ","'>","</span>\n "])),b?g(ra||(ra=j(["<ha-icon class='icon' .icon=","></ha-icon>"])),b):"",c,a.name)}renderHvacMode(){var{hvacMode:a}=this,b=a.selected||{},c=b.icon?b.icon:this.config.secondary_info.icon;return g(sa||(sa=j(["\n ","\n <span class='name'>","</span>\n "])),c?g(ta||(ta=j(["<ha-icon class='icon' .icon=","></ha-icon>"])),c):"",b.name)}render(){var{type:a}=this.config.secondary_info;return"hvac-mode"===a?this.renderHvacMode():"hvac-action"===a?this.renderHvacAction():"last-changed"===a?g(ua||(ua=j(["<ha-relative-time .hass="," .datetime=","></ha-relative-time>"])),this.climate.hass,this.climate.lastChanged):g(va||(va=j(["<mc-fan-mode-secondary .fanMode="," .config=","></mc-fan-mode-secondary>"])),this.fanMode,this.config)}static get styles(){return[yc,vb(wa||(wa=j(["\n ha-relative-time, .gray {\n color: #727272;\n }\n .name {\n font-size: calc(var(--mc-unit) * .35);\n font-weight: var(--mc-info-font-weight);\n line-height: calc(var(--mc-unit) * .5);\n vertical-align: middle;\n display: inline-block;\n }\n .icon {\n color: var(--mc-icon-color);\n height: calc(var(--mc-unit) * .475);\n width: calc(var(--mc-unit) * .5);\n min-width: calc(var(--mc-unit) * .5);\n --mdc-icon-size: calc(var(--mc-unit) * 0.5);\n }\n "])))]}}class se extends Xa($b){static get elementDefinitions(){return Qc([Sc("ha-card"),Sc("ha-icon"),Sc("ha-icon-button"),oe,pe,ne,me,le,re,Tc,Rc],se)}constructor(){super(),this.initial=!0,this.toggle=!1,this.temperature={},this.targetTemperature={},this.buttons={},this.indicators={},this.hvacMode={},this.targetTemperatureChanging=!1,this.climate={},this.targetTemperatureValue=0,this.width=0}static get properties(){return{_hass:{type:Object},config:{type:Object},entity:{type:Object},climate:{type:Object},initial:{type:Boolean},toggle:{type:Boolean}}}static get styles(){return[yc,xc]}set hass(a){if(a){var b=a.states[this.config.entity];this._hass=a;var c=!1;b&&this.entity!==b&&(this.entity=b,this.climate=new Oc(a,this.config,b),c=!0),this.updateIndicators(c),this.updateButtons(c),this.updateTemperature(c),this.updateTargetTemperature(c),this.updateHvacMode(c),this.climate.mode=this.hvacMode.selected}}get hass(){return this._hass}get name(){return this.config.name||this.climate.name}updateIndicators(a){for(var b={},c=!1,d=0;d<this.config.indicators.length;d+=1){var e=this.config.indicators[d],{id:f}=e,g=e.source.entity||this.climate.id,h=this.hass.states[g];h&&(b[f]=new Nc(h,e,this.climate,this.hass)),h!==(this.indicators[f]&&this.indicators[f].entity)&&(c=!0)}(c||a)&&(this.indicators=b)}updateTemperature(a){if(!this.targetTemperatureChanging){var b=this.config.temperature.source.entity||this.config.entity,c=this.hass.states[b],d=this.config.target_temperature.source&&this.config.target_temperature.source.entity||this.config.entity,e=this.hass.states[d],f=new Kc(c,e,this.config);(this.temperature.rawValue!==f.rawValue||this.temperature.target!==f.target||a)&&(this.temperature=f)}}updateTargetTemperature(a){if(!this.targetTemperatureChanging){var b=this.config.target_temperature.source&&this.config.target_temperature.source.entity||this.config.entity,c=this.hass.states[b];(this.targetTemperature.entity!==c||a)&&(this.targetTemperature=new Lc(c,this.config,this.hass),this.targetTemperatureValue=this.targetTemperature.value)}}updateHvacMode(a){var b=this.config.hvac_mode,c=b.state&&b.state.entity||this.climate.id,d=this.hass.states[c];(d&&d!==(this.hvacMode&&this.hvacMode.entity)||a)&&(this.hvacMode=new Pc(d,b,this.climate))}updateButtons(a){for(var b={},c=!1,d=0;d<this.config.buttons.length;d+=1){var e=this.config.buttons[d],{id:f}=e,g=e.state&&e.state.entity||this.climate.id,h=this.hass.states[g];h&&(b[f]=new Mc(h,e,this.climate,this.hass)),h!==(this.buttons[f]&&this.buttons[f].entity)&&(c=!0)}(c||a)&&(this.buttons=b)}getButtonsConfig(a){for(var b=Object.entries(a.buttons||{}),c=[],d=0;d<b.length;d+=1){var e=b[d][0],f=b[d][1],g=this.getButtonConfig(f,a);g.id=e,"order"in g||(g.order=d+1),c.push(g)}return c}getButtonConfig(a,b){var c=l({icon:"mdi:radiobox-marked",type:"button",toggle_action:void 0},a);c.functions={};var d=l({},a);return d.call_service=(a,b,c)=>this.hass.callService(a,b,c),d.entity_config=b,d.toggle_state=Gc,c.disabled&&(c.functions.disabled=Jc(c.disabled,d)),c.state&&c.state.mapper&&(c.functions.state={mapper:Jc(c.state.mapper,d)}),c.active&&(c.functions.active=Jc(c.active,d)),c.source&&c.source.__filter&&(c.functions.source={filter:Jc(c.source.__filter,d)}),c.toggle_action&&(c.functions.toggle_action=Jc(c.toggle_action,d)),c.change_action&&(c.functions.change_action=Jc(c.change_action,d)),c.style&&(c.functions.style=Jc(c.style,d)),c}getFanModeConfig(a){var b=l({id:"fan_mode",icon:"mdi:fan",type:"dropdown",order:0,state:{attribute:"fan_mode"},change_action:(a,b,c)=>{var d={fan_mode:a,entity_id:c.entity_id};return this.call_service("climate","set_fan_mode",d)}},a.fan_mode||{});b=this.getButtonConfig(b,a);var{functions:c}=b;return c.active||(c.active=()=>this.climate.isOn),b}getIndicatorConfig(a,b,c){var d=l({id:a,source:{enitity:void 0,attribute:void 0,mapper:void 0},icon:""},b);d.tap_action="string"==typeof b.tap_action?{action:b.tap_action}:l({action:"none"},d.tap_action||{}),d.functions=d.functions||{};var e=l({},b);return e.entity_config=c,e.toggle_state=Gc,d.source.mapper&&(d.functions.mapper=Jc(d.source.mapper,e)),"object"==typeof d.icon&&(d.functions.icon={},d.icon.template&&(d.functions.icon.template=Jc(d.icon.template,e)),d.icon.style&&(d.functions.icon.style=Jc(d.icon.style,e))),d}getIndicatorsConfig(a){return Object.entries(a.indicators||{}).map(b=>this.getIndicatorConfig(b[0],b[1]||{},a)).filter(a=>!a.hide)}getTargetTemperatureConfig(a){var b=l({unit:"\xB0C",source:{entity:void 0,attribute:"temperature"}},a.target_temperature||{});b.icons=l({up:Bc.UP,down:Bc.DOWN},b.icons||{}),b.functions={};var c=l({},a.target_temperature||{});return c.call_service=(a,b,c)=>this.hass.callService(a,b,c),c.entity_config=a,c.toggle_state=Gc,b.change_action&&(b.functions.change_action=Jc(b.change_action,c)),b}getHvacModeConfig(a){var b=l({type:"dropdown",change_action:(a,b)=>{var c={hvac_mode:a,entity_id:b.entity_id};return this.call_service("climate","set_hvac_mode",c)}},a.hvac_mode||{});b=this.getButtonConfig(b,this.config);var{functions:c}=b;return c.active||(c.active=()=>this.climate.isOn),b}setConfig(a){var b=["climate","fan"];if(!a.entity||!1===b.includes(a.entity.split(".")[0]))throw new Error("Specify an entity from within domains: [".concat(b.join(", "),"]."));this.config=l({tap_action:{action:"more-info",navigation_path:"",url:"",entity:"",service:"",service_data:{}}},a),this.config.indicators=this.getIndicatorsConfig(a),this.config.buttons=this.getButtonsConfig(a),this.fanModeConfig=this.getFanModeConfig(a),this.config.buttons.push(this.fanModeConfig),this.config.target_temperature=this.getTargetTemperatureConfig(a),this.config.temperature=l({round:1,unit:"\xB0C",source:{entity:void 0,attribute:"current_temperature"}},a.temperature||{}),this.config.hvac_mode=this.getHvacModeConfig(this.config),this.config.toggle=l({icon:Bc.TOGGLE,hide:!1,default:!1},a.toggle||{}),this.config.secondary_info="string"==typeof a.secondary_info?{type:a.secondary_info}:l({type:"fan_mode"},a.secondary_info||{}),this.toggle=this.config.toggle.default}renderCtlWrap(){if(this.climate.isUnavailable)return g(xa||(xa=j(["\n <span class=\"label ellipsis\"> \n ","\n </span>\n "])),Ac(this.hass,["state.default.unavailable"],"Unavailable"));var a=Object.entries(this.buttons).map(a=>a[1]).filter(a=>"main"===a.location&&!a.hide).sort((a,b)=>a.order>b.order?1:b.order>a.order?-1:0);return g(ya||(ya=j(["\n ","\n ","\n <mc-temperature\n .temperature=","\n .target=","\n .changing=",">\n </mc-temperature>\n "])),a.map(a=>"dropdown"===a.type?g(za||(za=j(["<mc-dropdown .dropdown=","></mc-dropdown>"])),a):g(Aa||(Aa=j(["<mc-button .button=","></mc-button>"])),a)),this.hvacMode.hide?"":g(Ba||(Ba=j(["<mc-mode-menu .mode=","></mc-mode-menu>"])),this.hvacMode),this.temperature,this.targetTemperatureValue,this.targetTemperatureChanging)}renderEntityControls(){return this.climate.isUnavailable?"":g(Ca||(Ca=j(["\n <div class=\"entity__controls\">\n <mc-target-temperature\n .targetTemperature=","\n @changing=\"","\">\n </mc-target-temperature>\n </div>\n "])),this.targetTemperature,a=>this.handleChangingTargetTemperature(a))}render(){var a="fan-mode-dropdown"!==this.config.secondary_info.type;return g(Da||(Da=j(["\n <ha-card\n class=","\n style=",">\n <div class='mc__bg'></div>\n <div class='mc-climate'>\n <div class='mc-climate__core flex'>\n ","\n <div class='entity__info'>\n <div class=\"wrap\">\n <div class=\"entity__info__name_wrap\" @click=",">\n ","\n </div>\n <div class=\"ctl-wrap ellipsis\">\n ","\n </div>\n </div>\n ","\n </div>\n ","\n </div>\n ","\n </div>\n </ha-card>\n "])),this.computeClasses(),this.computeStyles(),this.renderIcon(),b=>this.handlePopup(b,a),this.renderEntityName(),this.renderCtlWrap(),this.renderBottomPanel(),this.renderEntityControls(),this.renderTogglePanel())}handleChangingTargetTemperature(a){this.targetTemperatureValue=this.targetTemperature.value,this.targetTemperatureChanging=a.detail.changing,this.requestUpdate("targetTemperatureChanging")}handlePopup(a,b){b&&(a.stopPropagation(),zc(this,this.hass,this.config.tap_action,this.climate.id))}handleToggle(a){a.stopPropagation(),this.toggle=!this.toggle}toggleButtonCls(){return this.toggle?"open":""}renderIcon(){var a=this.climate.isActive;return g(Ea||(Ea=j(["\n <div class='entity__icon' ?color=",">\n <ha-icon .icon="," ></ha-icon>\n </div>"])),a,this.computeIcon())}renderTogglePanel(){return this.toggle?g(Fa||(Fa=j(["\n <div class=\"mc-toggle_content\">\n <mc-buttons\n .buttons=",">\n </mc-buttons>\n </div>\n "])),this.buttons):""}renderBottomPanel(){return this.climate.isUnavailable?"":g(Ga||(Ga=j(["\n <div class='bottom flex'>\n <mc-indicators\n .indicators=",">\n </mc-indicators>\n ","\n </div>\n "])),this.indicators,this.renderToggleButton())}renderToggleButton(){return 0===this.config.buttons.filter(a=>!a.hide&&"main"!==a.location).length?"":this.config.toggle.hide?"":g(Ha||(Ha=j(["\n <ha-icon-button class='toggle-button ","'\n .icon=","\n @click=",">\n <ha-icon .icon=","></ha-icon>\n </ha-icon-button>\n "])),this.toggleButtonCls(),this.config.toggle.icon,a=>this.handleToggle(a),this.config.toggle.icon)}renderEntityName(){return g(Ia||(Ia=j(["\n <div class='entity__info__name' @click=",">\n ","\n </div>\n ","\n "])),a=>this.handlePopup(a,!0),this.name,this.renderSecondaryInfo())}renderSecondaryInfo(){return this.climate.isUnavailable?"":g(Ja||(Ja=j(["\n <div class='entity__secondary_info ellipsis'>\n <mc-secondary-info\n .climate=","\n .config=","\n .hvacMode=","\n .fanMode=",">\n </mc-secondary-info>\n </div>"])),this.climate,this.config,this.hvacMode,this.buttons.fan_mode)}computeIcon(){return this.config.icon?this.config.icon:this.climate.icon||Bc.DEFAULT}computeClasses(){var{config:a}=0<arguments.length&&arguments[0]!==void 0?arguments[0]:this;return vc({"--initial":this.initial,"--collapse":a.collapse,"--group":a.group,"--more-info":"none"!==a.tap_action,"--inactive":!this.climate.isActive,"--unavailable":this.climate.isUnavailable})}computeStyles(){var{scale:a}=this.config;return wc(l(l({},a&&{"--mc-unit":"".concat(40*a,"px")}),{"--mc-card-width":"".concat(this.width,"px")}))}initDefaultFanModeSource(){var a=this.fanModeConfig,b=Object.entries(a.source||{}).filter(a=>"__filter"!==a[0]),{entity:c}=this.climate;c&&0===b.length&&c.attributes&&c.attributes.fan_modes&&(a.source=l(l({},this.climate.defaultFanModes),a.source||{}))}initDefaultHvacModeSource(){var a=this.config.hvac_mode,b=Object.entries(a.source||{}).filter(a=>"__filter"!==a[0]),{entity:c}=this.climate;c&&0===b.length&&(a.source=l(l({},this.climate.defaultHvacModes),a.source||{}))}firstUpdated(a){super.firstUpdated(a),a.has("climate")&&(this.initDefaultFanModeSource(),this.initDefaultHvacModeSource(),this.requestUpdate("climate")),a.has("targetTemperature")&&(this.targetTemperatureValue=this.targetTemperature.value,this.requestUpdate("targetTemperatureValue"));var b=new rc(a=>{var b=a.find(a=>a.target===this);b&&b.contentRect&&this.width!==b.contentRect.width&&(this.width=b.contentRect.width,this.requestUpdate("width"))});b.observe(this)}}customElements.define("mini-climate",se)})})();
@regevbr
Copy link
Author

regevbr commented Mar 2, 2022

Steps:

in /config/www/community/mini-climate-card:

  • delete the .gz file
  • replace the contents of mini-climate-card-bundle.js with the one here

in {ha_base_url}/config/lovelace/resources:

  • change the lovelace resources URL to have a different number in the hacstag query parameter (just change a single digit) to force refresh the cache

refresh the HA page

@Brandon168
Copy link

Thank you @regevbr, that worked great.

For anyone looking for the resources URL: {ha_base_url}/config/lovelace/resources

@mattmckernan
Copy link

Worked for me too - thank you!

@regevbr
Copy link
Author

regevbr commented Mar 7, 2022

@Brandon168 and @mattmckernan thanks! I just uploaded a fixed version, please update accordingly

@alinm4
Copy link

alinm4 commented Mar 7, 2022

Updated too and works great.
If you do not have a hacstag just add somthing like:
{ha_base_url}/config/<your_path>/mini-climate-card-bundle.js?hacstag=111222

Thank you

@trantoriana
Copy link

Thanks, after getting the resource URL it worked..
Perfect, lets hope the original author soon updates..

@cannondale0815
Copy link

FYI -- clearing the browser cache after replacing the .js file works just as well. Thanks!

@regevbr
Copy link
Author

regevbr commented Mar 9, 2022

FYI -- clearing the browser cache after replacing the .js file works just as well. Thanks!

Please note that this will only affect the browser you did that for, you should do that for every other browser. I'm not sure how to fore refresh the app if you have it thought...

@cannondale0815
Copy link

FYI -- clearing the browser cache after replacing the .js file works just as well. Thanks!

Please note that this will only affect the browser you did that for, you should do that for every other browser. I'm not sure how to fore refresh the app if you have it thought...

Valid point -- I'm not using the mini climate card in the mobile app, so this wasn't an issue for me.

Thank you for this great piece of software btw, I've been using it for several months now and it's the center piece of my dashboard :)

@regevbr
Copy link
Author

regevbr commented Mar 9, 2022

FYI -- clearing the browser cache after replacing the .js file works just as well. Thanks!

Please note that this will only affect the browser you did that for, you should do that for every other browser. I'm not sure how to fore refresh the app if you have it thought...

Valid point -- I'm not using the mini climate card in the mobile app, so this wasn't an issue for me.

Thank you for this great piece of software btw, I've been using it for several months now and it's the center piece of my dashboard :)

I'm glad I can help

@cutzenfriend
Copy link

Hero.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment