Skip to content

Instantly share code, notes, and snippets.

@regevbr
Last active March 9, 2022 08:34
Show Gist options
  • Save regevbr/4e91349b63f1a0700f312ce34dbad233 to your computer and use it in GitHub Desktop.
Save regevbr/4e91349b63f1a0700f312ce34dbad233 to your computer and use it in GitHub Desktop.
mini hmidifier 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,x,y,z,A,B,C,D,E,F,G,H,J,K,L,O,P,Q,R,S,T,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;(function(a){"function"==typeof define&&define.amd?define(a):a()})(function(){var va=Math.round;function wa(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=ob(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=wa(a,e._$AS(a,b.values),e,m)),b}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 Ya(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");Ec(a,c),a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)}function Aa(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");Mc(a,c),a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)}function Ba(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 Ca(a){return{addClass:b=>{a.classList.add(b)},removeClass:b=>{a.classList.remove(b)},hasClass:b=>a.classList.contains(b)}}function Da(a){return(b,c)=>void 0===c?ad(a,b):((a,b,c)=>{b.constructor.createProperty(c,a)})(a,b,c)}function Ea(a){return Da(l(l({},a),{},{state:!0}))}function Fa(a,b){return bd({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 i(a){var{slot:b,selector:c}=null==a?{}:a;return bd({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?[]:cd(f,a);return c?g.filter(a=>a.matches(c)):g},enumerable:!0,configurable:!0})})}function Ga(a,b,c){var d,f=a;return"object"==typeof a?(f=a.slot,d=a):d={flatten:b},c?i({slot:f,flatten:b,selector:c}):bd({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 Ha(a){var b=a.key;if(dd.has(b))return b;var c=fd.get(a.keyCode);return c?c:e.UNKNOWN}function Ia(a){return a instanceof Set}function Ja(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 Ka(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 La(){var a=this.itemsReadyResolver;this.itemsReady=new Promise(a=>this.itemsReadyResolver=a),a()}function Ma(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 Na(a,b){var c=a.matches||a.webkitMatchesSelector||a.msMatchesSelector;return c.call(a,b)}function Oa(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");zd(a,c),a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)}function Pa(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 Qa(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 Ra=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Sa=Symbol(),Ta=new Map;class Ua{constructor(a,b){if(this._$cssResult$=!0,b!==Sa)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=a}get styleSheet(){var a=Ta.get(this.cssText);return Ra&&void 0===a&&(Ta.set(this.cssText,a=new CSSStyleSheet),a.replaceSync(this.cssText)),a}toString(){return this.cssText}}var Va,Wa=a=>new Ua("string"==typeof a?a:a+"",Sa),Xa=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 e=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 Ua(e,Sa)},Ya=(a,b)=>{Ra?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)})},Za=Ra?a=>a:a=>a instanceof CSSStyleSheet?(a=>{var b="";for(var c of a.cssRules)b+=c.cssText;return Wa(b)})(a):a,$a=window.trustedTypes,ab=$a?$a.emptyScript:"",bb=window.reactiveElementPolyfillSupport,cb={toAttribute(a,b){return b===Boolean?a=a?ab: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}},db=(a,b)=>b!==a&&(b==b||a==a),eb={attribute:!0,type:String,converter:cb,reflect:!1,hasChanged:db};class fb 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]:eb;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)||eb}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(Za(d))}else void 0!==a&&b.push(Za(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 Ya(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]:eb,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:cb.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:cb.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||db)(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(){}}fb.finalized=!0,fb.elementProperties=new Map,fb.elementStyles=[],fb.shadowRootOptions={mode:"open"},null==bb||bb({ReactiveElement:fb}),(null!==(Va=globalThis.reactiveElementVersions)&&void 0!==Va?Va:globalThis.reactiveElementVersions=[]).push("1.3.0");var gb,hb=globalThis.trustedTypes,ib=hb?hb.createPolicy("lit-html",{createHTML:a=>a}):void 0,jb="lit$".concat((Math.random()+"").slice(9),"$"),kb="?"+jb,lb="<".concat(kb,">"),mb=document,nb=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"";return mb.createComment(a)},ob=a=>null===a||"object"!=typeof a&&"function"!=typeof a,h=Array.isArray,d=a=>{var b;return h(a)||"function"==typeof(null===(b=a)||void 0===b?void 0:b[Symbol.iterator])},pb=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,c=/-->/g,qb=/>/g,a=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,f=/'/g,rb=/"/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"),sb=new WeakMap,tb=(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 yb(b.insertBefore(nb(),i),i,void 0,null==c?{}:c)}return h._$AI(a),h},ub=mb.createTreeWalker(mb,129,null,!1),vb=(b,e)=>{for(var g,i=b.length-1,j=[],k=2===e?"<svg>":"",l=pb,n=0;n<i;n++){for(var o=b[n],p=void 0,q=void 0,s=-1,t=0;t<o.length&&(l.lastIndex=t,q=l.exec(o),null!==q);)t=l.lastIndex,l===pb?"!--"===q[1]?l=c:void 0===q[1]?void 0===q[2]?void 0!==q[3]&&(l=a):(m.test(q[2])&&(g=RegExp("</"+q[2],"g")),l=a):l=qb:l===a?">"===q[0]?(l=null==g?pb:g,s=-1):void 0===q[1]?s=-2:(s=l.lastIndex-q[2].length,p=q[1],l=void 0===q[3]?a:"\""===q[3]?rb:f):l===rb||l===f?l=a:l===c||l===qb?l=pb:(l=a,g=void 0);var u=l===a&&b[n+1].startsWith("/>")?" ":"";k+=l===pb?o+lb:0<=s?(j.push(p),o.slice(0,s)+"$lit$"+o.slice(s)+jb+u):o+jb+(-2===s?(j.push(void 0),n):u)}var v=k+(b[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(b)||!b.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0===ib?v:ib.createHTML(v),j]};class wb{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]=vb(g,h);if(this.el=wb.createElement(c,e),ub.currentNode=this.el.content,2===h){var a=this.el.content,q=a.firstChild;q.remove(),a.append(...q.childNodes)}for(;null!==(f=ub.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(jb)){var u=p[j++];if(s.push(t),void 0!==u){var v=f.getAttribute(u.toLowerCase()+"$lit$").split(jb),w=/([.?@])?(.*)/.exec(u);o.push({type:1,index:i,name:w[2],strings:v,ctor:"."===w[1]?zb:"?"===w[1]?k:"@"===w[1]?Ab:N})}else o.push({type:6,index:i})}for(var x of s)f.removeAttribute(x)}if(m.test(f.tagName)){var y=f.textContent.split(jb),z=y.length-1;if(0<z){f.textContent=hb?hb.emptyScript:"";for(var A=0;A<z;A++)f.append(y[A],nb()),ub.nextNode(),o.push({type:2,index:++i});f.append(y[z],nb())}}}else if(8===f.nodeType)if(f.data===kb)o.push({type:2,index:i});else for(var B=-1;-1!==(B=f.data.indexOf(jb,B+1));)o.push({type:7,index:i}),B+=jb.length-1;i++}}static createElement(a){var b=mb.createElement("template");return b.innerHTML=a,b}}class xb{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:mb).importNode(e,!0);ub.currentNode=f;for(var g=ub.nextNode(),j=0,h=0,k=c[0];void 0!==k;){if(j===k.index){var d=void 0;2===k.type?d=new yb(g,g.nextSibling,this,a):1===k.type?d=new k.ctor(g,k.name,k.strings,this,a):6===k.type&&(d=new I(g,this,a)),this.v.push(d),k=c[++h]}j!==(null==k?void 0:k.index)&&(g=ub.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 yb{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=wa(this,a,c),ob(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&&ob(this._$AH)?this._$AA.nextSibling.data=a:this.k(mb.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=wb.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 xb(e,this),g=f.p(this.options);f.m(c),this.k(g),this._$AH=f}}_$AC(a){var b=sb.get(a.strings);return void 0===b&&sb.set(a.strings,b=new wb(a)),b}S(a){h(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 yb(this.A(nb()),this.A(nb()),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 N{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=wa(this,a,c,0),g=!ob(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=wa(this,j[d+h],c,h),i===$&&(i=this._$AH[h]),g||(g=!ob(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 zb extends N{constructor(){super(...arguments),this.type=3}C(a){this.element[this.name]=a===b?void 0:a}}var M=hb?hb.emptyScript:"";class k extends N{constructor(){super(...arguments),this.type=4}C(a){a&&a!==b?this.element.setAttribute(this.name,M):this.element.removeAttribute(this.name)}}class Ab extends N{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=wa(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 I{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){wa(this,a)}}var Bb=window.litHtmlPolyfillSupport;null==Bb||Bb(wb,yb),(null!==(gb=globalThis.litHtmlVersions)&&void 0!==gb?gb:globalThis.litHtmlVersions=[]).push("2.2.0");var Cb,Db;class Eb extends fb{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=tb(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 $}}Eb.finalized=!0,Eb._$litElement$=!0,null===(Cb=globalThis.litElementHydrateSupport)||void 0===Cb||Cb.call(globalThis,{LitElement:Eb});var Fb=globalThis.litElementPolyfillSupport;null==Fb||Fb({LitElement:Eb}),(null!==(Db=globalThis.litElementVersions)&&void 0!==Db?Db:globalThis.litElementVersions=[]).push("3.2.0");var Gb={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Hb=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 Ib{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 Jb=Hb(class extends Ib{constructor(a){var b;if(super(a),a.type!==Gb.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 $}}),Kb=Hb(class extends Ib{constructor(a){var b;if(super(a),a.type!==Gb.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 $}}),Lb=Xa(p||(p=j(["\n :host {\n overflow: visible !important;\n display: block;\n --mh-scale: var(--mini-humidifier-scale, 1);\n --mh-unit: calc(var(--mh-scale) * 40px);\n --mh-name-font-weight: var(--mini-humidifier-name-font-weight, 400);\n --mh-info-font-weight: var(--mini-humidifier-info-font-weight, 300);\n --mh-entity-info-left-offset: 8px;\n --mh-accent-color: var(--mini-humidifier-accent-color, var(--accent-color, #f39c12));\n --mh-text-color: var(--mini-humidifier-base-color, var(--primary-text-color, #000));\n --mh-active-color: var(--mh-accent-color);\n --mh-button-color: var(--mini-humidifier-button-color, var(--paper-item-icon-color, #44739e));\n --mh-icon-color:\n var(--mini-humidifier-icon-color,\n var(--mini-humidifier-base-color,\n var(--paper-item-icon-color, #44739e)));\n --mh-icon-active-color: var(--paper-item-icon-active-color, --mh-active-color);\n --mh-info-opacity: 1;\n --mh-bg-opacity: var(--mini-humidifier-background-opacity, 1);\n color: var(--mh-text-color);\n }\n ha-card.--group {\n box-shadow: none;\n }\n ha-card.--bg {\n --mh-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(--mh-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 .mh__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(--mh-bg-opacity);\n border-radius: var(--ha-card-border-radius, 0);\n }\n ha-card.--group .mh__bg {\n background: none;\n }\n .mh-humidifier {\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 .mh-humidifier__core {\n position: relative;\n padding-right: 5px;\n }\n .entity__info {\n user-select: none;\n margin-left: var(--mh-entity-info-left-offset);\n flex: 1;\n min-width: 0;\n white-space: nowrap;\n }\n .entity__icon {\n color: var(--mh-icon-color);\n white-space: nowrap;\n }\n .entity__icon[color] {\n color: var(--mh-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(--mh-unit);\n width: var(--mh-unit);\n min-width: var(--mh-unit);\n line-height: var(--mh-unit);\n margin-right: calc(var(--mh-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(--mh-unit) / 2);\n color: var(--mh-text-color);\n font-weight: var(--mh-name-font-weight);\n }\n .entity__secondary_info_icon {\n color: var(--mh-icon-color);\n height: calc(var(--mh-unit) * .5);\n width: calc(var(--mh-unit) * .5);\n min-width: calc(var(--mh-unit) * .5);\n --mdc-icon-size: calc(var(--mh-unit) * 0.5);\n }\n .entity__secondary_info {\n margin-top: -2px;\n }\n .entity__secondary_info ha-relative-time {\n color: #727272;\n }\n .entity__secondary_info__name {\n font-size: calc(var(--mh-unit) * .35);\n font-weight: var(--mh-info-font-weight);\n line-height: calc(var(--mh-unit) * .5);\n vertical-align: middle;\n display: inline-block;\n }\n ha-card.--initial .mh-humidifier {\n padding: 16px 16px 5px 16px;\n }\n ha-card.--unavailable .mh-humidifier {\n padding: 16px;\n }\n ha-card.--group .mh-humidifier {\n padding: 2px 0 0 0;\n } \n .toggle-button {\n width: calc(var(--mh-unit) * .75);\n height: calc(var(--mh-unit) * .75);\n --mdc-icon-button-size: calc(var(--mh-unit) * .75);\n --ha-icon-display: flex;\n color: var(--mh-icon-color);\n margin-left: auto;\n margin-top: calc(var(--mh-unit) * -.125);\n }\n .toggle-button.open {\n transform: rotate(180deg);\n color: var(--mh-active-color)\n }\n .wrap {\n display: flex;\n flex-direction: row;\n }\n .bottom {\n margin-top: calc(var(--mh-unit) * .075);\n }\n .entity__info__name_wrap {\n display: flex;\n flex-direction: column;\n justify-content: center;\n margin-right: 0;\n max-width: calc(var(--mh-unit) * 4.25);\n cursor: pointer;\n }\n .entity__info__name_wrap.full {\n max-width: 80%;\n }\n .--unavailable .ctl-wrap {\n margin-left: auto;\n margin-top: auto;\n margin-bottom: auto;\n }\n .--unavailable .ctl-wrap .unavailable {\n margin-left: auto;\n margin-right: 0;\n }\n .--unavailable .entity__info {\n margin-top: auto;\n margin-bottom: auto;\n }\n .mh-toggle_content {\n margin-top: calc(var(--mh-unit) * .05);\n }\n mh-buttons {\n width: 100%;\n justify-content: space-evenly;\n display: flex;\n --ha-icon-display: flex;\n }\n .ctl-wrap {\n flex: 1;\n margin-left: auto;\n display: flex;\n flex-direction: row;\n }\n mh-power {\n margin-left: auto;\n min-width: calc(var(--mh-unit) * .875);\n margin-right: calc(var(--mh-unit) * -0.125);\n --ha-icon-display: flex;\n }\n mh-target-humidity {\n display: flex;\n flex: 1;\n }\n"]))),Mb=Xa(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(--mh-unit) * .6);\n height: calc(var(--mh-unit) * .6);\n }\n ha-icon-button {\n width: calc(var(--mh-unit));\n height: calc(var(--mh-unit));\n --mdc-icon-button-size: calc(var(--mh-unit));\n color: var(--mh-button-color);\n transition: color .25s;\n }\n ha-icon-button[color] {\n color: var(--mh-icon-active-color) !important;\n opacity: 1 !important;\n }\n ha-icon-button[inactive] {\n opacity: .5;\n }\n"]))),Nb=(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}}},Ob={DEFAULT:"mdi:air-filter",FAN:"mdi:fan",HUMIDITY:"mdi:water",TEMPERATURE:"mdi:thermometer-low",DEPTH:"mdi:tray-full",WATERLEVEL:"mdi:tray-full",WATERTANKEMPTY:"mdi:tray",WATERTANKDETACHED:"mdi:tray-remove",DRY:"mdi:weather-sunny",BUZZER:"mdi:bell-outline",LEDBUTTON:"mdi:lightbulb-on-outline",CHILDLOCK:"mdi:lock",TOGGLE:"mdi:dots-horizontal",POWER:"mdi:power",TANK:"mdi:cup-water",AQI:"mdi:weather-fog",RPM:"mdi:speedometer",CO2:"mdi:molecule-co2",DISHWASHER:"mdi:dishwasher",MOTORSPEED:"mdi:fan",CLOCK:"mdi:clock-outline"},Pb=["closed","locked","off"],Qb=["unavailable","unknown"],Rb=3500,Sb=["more-info","navigate","call-service","url"],Tb=["fan","humidifier"],Ub=a=>a?Pb.includes(a)||Qb.includes(a)?Pb.includes(a)&&!Qb.includes(a)?"on":a:"off":a,Vb=(a,b)=>a?b?b.attribute?a.attributes[b.attribute]:a.state:a.state:void 0,Wb=(a,b)=>+"".concat(va(+"".concat(a,"e").concat(b)),"e-").concat(b),Xb=(a,b)=>{try{return new Function("","return ".concat(a.toString())).call(b||{})}catch(b){throw new Error("\n[COMPILE ERROR]: [".concat(b.toString(),"]\n[SOURCE]: ").concat(a,"\n"))}};class Yb{constructor(a,b,c,d){this.config=b||{},this.entity=a||{},this.humidifier=c||{},this._hass=d,a&&(this._last_changed=a.last_changed,this._last_updated=a.last_updated)}get lastChanged(){return this._last_changed}get lastUpdated(){return this._last_updated}changed(a){var b=a||{},c=this.lastUpdated!==b.last_changed||this.lastChanged!==b.last_updated;return c}get id(){return this.config.id}get hass(){return this._hass}get originalValue(){return Vb(this.entity,this.config.source)}get value(){var a=Number.isNaN,b=this.originalValue;return this.config.functions.mapper&&(b=this.config.functions.mapper(b,this.entity,this.humidifier.entity)),"round"in this.config&&!1===a(b)&&""!==b&&(b=Wb(b,this.config.round)),b}get unit(){if(this.config.functions.unit&&this.config.functions.unit.template)return this.config.functions.unit.template(this.value,this.entity,this.humidifier.entity);return this.config.unit&&"string"==typeof this.config.unit?this.config.unit:""}get hide(){return this.config.hide}get icon(){if(this.config.functions.icon&&this.config.functions.icon.template)return this.config.functions.icon.template(this.value,this.entity,this.humidifier.entity);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.humidifier.entity)||{}:{}}}class Zb{constructor(a,b,c,d){this.config=b||{},this.entity=a||{},this.humidifier=c||{},this._hass=d||{},a&&(this._last_changed=a.last_changed,this._last_updated=a.last_updated)}get lastChanged(){return this._last_changed}get lastUpdated(){return this._last_updated}changed(a){var b=a||{},c=this.lastChanged!==b.last_changed||this.lastUpdated!==b.last_updated;return c}get id(){return this.config.id}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 Vb(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.humidifier.entity)),a}isActive(a){return!!this.config.functions.active&&this.config.functions.active(a,this.entity,this.humidifier.entity)}get isUnavailable(){return this.entity===void 0||Qb.includes(this.state)}get isOff(){return this.entity!==void 0&&Pb.includes(this.state)&&!Qb.includes(this.state)}get isOn(){return this.entity!==void 0&&!Pb.includes(this.state)&&!Qb.includes(this.state)}get disabled(){return!!this.config.functions.disabled&&this.config.functions.disabled(this.state,this.entity,this.humidifier.entity)}get style(){return this.config.functions.style?this.config.functions.style(this.state,this.entity,this.humidifier.entity)||{}:{}}get source(){var a,{functions:b}=this.config;return a=b&&b.source&&b.source.__init?b.source.__init(this.entity,this.config):Object.entries(this.config.source||{}).filter(a=>"__filter"!==a[0]).map(a=>({id:a[0],name:a[1]})),this.config.functions.source&&this.config.functions.source.filter?this.config.functions.source.filter(a,this.state,this.entity,this.humidifier.entity):a}get selected(){var{state:a}=this;if(void 0!==a&&null!==a){var b=a.toString().toUpperCase(),c=this.source.find(a=>a.id.toString().toUpperCase()===b);return c}}get actionTimeout(){return"action_timeout"in this.config?this.config.action_timeout:Rb}handleToggle(){return this.config.functions.toggle_action?this.config.functions.toggle_action(this.state,this.entity,this.humidifier.entity):this.humidifier.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.humidifier.entity):void 0}}class $b{constructor(a,b,c){this.entity=a||{},this.config=b,this.humidifier=c}get min(){return this.config.target_humidity.min}get max(){return this.config.target_humidity.max}get step(){return this.config.target_humidity.step}get originalValue(){return Vb(this.entity,this.config.target_humidity.state)}get value(){var a=this.originalValue;return this.config.target_humidity.functions.state&&this.config.target_humidity.functions.state.mapper?this.config.target_humidity.functions.state.mapper(a,this.entity,this.humidifier.entity):a}get icon(){var a=this.config.target_humidity;if(a.functions.icon.template)return a.functions.icon.template(this.value,this.entity,this.humidifier.entity);return a.icon&&"string"==typeof a.icon?a.icon:""}get iconStyle(){var a=this.config.target_humidity;return a.functions.icon&&a.functions.icon.style?a.functions.icon.style(this.value,this.entity,this.humidifier.entity)||{}:{}}get hide(){return this.config.target_humidity.hide}get hideIndicator(){return this.config.target_humidity.hide_indicator}get unit(){var a=this.config.target_humidity;if(a.functions.unit&&a.functions.unit.template)return a.functions.unit.template(this.value,this.entity,this.humidifier.entity);return a.unit&&"string"==typeof a.unit?a.unit:""}get actionTimeout(){return"action_timeout"in this.config.target_humidity?this.config.target_humidity.action_timeout:Rb}get disabled(){return!!this.config.target_humidity.functions.disabled&&this.config.target_humidity.functions.disabled(this.state,this.entity,this.humidifier.entity)}handleChange(a){return this.config.target_humidity.functions.change_action?this.config.target_humidity.functions.change_action(a,this.value,this.entity,this.humidifier.entity):void 0}}class ac{constructor(a,b,c){this.hass=a||{},this.config=b||{},this.entity=c||{},this.state=c.state,this.attr=l({friendly_name:"",depth:0,target_humidity:0,mode:"",dry:!1,buzzer:!1,child_lock:!1,led_brightness:0},c.attributes||{}),c&&(this._last_changed=c.last_changed,this._last_updated=c.last_updated)}get lastChanged(){return this._last_changed}get lastUpdated(){return this._last_updated}changed(a){var b=a||{},c=this.lastChanged!==b.last_changed||this.lastUpdated!==b.last_updated;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&&Pb.includes(this.state)&&!Qb.includes(this.state)}get isActive(){return!1===this.isOff&&!1===this.isUnavailable||!1}get isUnavailable(){return this.entity===void 0||Qb.includes(this.state)}get isOn(){return this.entity!==void 0&&!Pb.includes(this.state)&&!Qb.includes(this.state)}callService(a,b,c){return this.hass.callService(a,b,c)}}var bc=function(a,b){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:"unknown",d=a.selectedLanguage||a.language,e=a.resources[d];return e&&e[b]?e[b]:c};console.info("%c MINI-HUMIDIFIER-CARD %c ".concat("v3.0.0"," "),"color: white; background: coral; font-weight: 700;","color: coral; background: white; font-weight: 700;");var cc=()=>({power:{icon:Ob.POWER,type:"button",hide:!1,toggle_action:(a,b)=>{var c="on"===a?"turn_off":"turn_on",d={entity_id:b.entity_id};return this.call_service("humidifier",c,d)}},target_humidity:{icon:Ob.HUMIDITY,unit:{template:a=>""===a?"":"%"},min:30,max:80,step:10,hide:!1,hide_indicator:!1,disabled:(a,b,c)=>{var d=c.attributes.mode.toUpperCase();return"AUTO"!==d},state:{attribute:"humidity",mapper:a=>a===NaN||void 0===a||"unknown"===a?"":a},change_action:(a,b,c)=>{var d={entity_id:c.entity_id,humidity:a};return this.call_service("humidifier","set_humidity",d)}},indicators:{water_level:{tap_action:"more-info",default_icon:Ob.WATERLEVEL,detached_icon:Ob.WATERTANKDETACHED,icon:{template:a=>""===a?this.detached_icon:this.default_icon},unit:{template:a=>{if(""===a)return"";var{type:b}=this;return this.localize("zhimi_humidifier_cb1.water_level.".concat(b),"%")}},round:0,order:0,volume:4,type:"percent",hide:!1,source:{entity:"sensor.{entity_id}_water_level",mapper:a=>a===NaN||void 0===a||"unknown"===a?"":"liters"===this.type?a*this.volume/100:a}},temperature:{tap_action:"more-info",icon:Ob.TEMPERATURE,unit:"\xB0C",round:1,order:1,hide:!1,source:{entity:"sensor.{entity_id}_temperature"}},humidity:{tap_action:"more-info",icon:Ob.HUMIDITY,unit:"%",round:1,order:2,hide:!1,source:{entity:"sensor.{entity_id}_humidity"}},motor_speed:{tap_action:"more-info",icon:Ob.MOTORSPEED,unit:"rpm",round:0,order:3,hide:!1,source:{entity:"sensor.{entity_id}_motor_speed"}}},buttons:{dry:{icon:Ob.DRY,hide:!1,order:0,state:{entity:"switch.{entity_id}_dry_mode"},toggle_action:(a,b)=>{var c="on"===a?"turn_off":"turn_on",d={entity_id:b.entity_id};return this.call_service("switch",c,d)}},mode:{icon:Ob.FAN,type:"dropdown",hide:!1,order:1,source:{__init:a=>{var b=a.attributes.available_modes||[];return b.map(a=>({id:a,name:this.localize("zhimi_humidifier_cb1.mode.".concat(a),a)}))}},active:(a,b)=>"off"!==b.state,state:{attribute:"mode"},change_action:(a,b,c)=>{var d={entity_id:c.entity_id,mode:a};return this.call_service("humidifier","set_mode",d)}},led:{icon:Ob.LEDBUTTON,type:"dropdown",hide:!1,order:2,active:a=>"off"!==a,source:{bright:"Bright",dim:"Dim",off:"Off",__filter:a=>a.map(a=>{var b=this.localize("zhimi_humidifier_cb1.led_brightness.".concat(a.id),a.name);return{id:a.id,name:b}})},state:{entity:"select.{entity_id}_led_brightness"},change_action:(a,b,c)=>{var d={entity_id:c.entity_id,option:a};return this.call_service("select","select_option",d)}},buzzer:{icon:Ob.BUZZER,hide:!1,order:3,state:{entity:"switch.{entity_id}_buzzer"},toggle_action:(a,b)=>{var c="on"===a?"turn_off":"turn_on",d={entity_id:b.entity_id};return this.call_service("switch",c,d)}},child_lock:{icon:Ob.CHILDLOCK,hide:!1,order:4,state:{entity:"switch.{entity_id}_child_lock"},toggle_action:(a,b)=>{var c="on"===a?"turn_off":"turn_on",d={entity_id:b.entity_id};return this.call_service("switch",c,d)}}}}),dc=()=>({power:{icon:Ob.POWER,type:"button",hide:!1,toggle_action:(a,b)=>{var c="on"===a?"turn_off":"turn_on",d={entity_id:b.entity_id};return this.call_service("humidifier",c,d)}},target_humidity:{icon:Ob.HUMIDITY,unit:{template:a=>""===a?"":"%"},min:30,max:80,step:10,hide:!1,hide_indicator:!1,disabled:(a,b,c)=>{var d=c.attributes.mode.toUpperCase();return"HUMIDITY"!==d},state:{attribute:"humidity",mapper:a=>a===NaN||void 0===a||"unknown"===a?"":a},change_action:(a,b,c)=>{var d={entity_id:c.entity_id,humidity:a};return this.call_service("humidifier","set_humidity",d)}},indicators:{water_tank_empty:{tap_action:"more-info",order:0,hide:!1,full_icon:Ob.WATERLEVEL,empty_icon:Ob.WATERLEVEL,detached_icon:Ob.WATERTANKDETACHED,empty:void 0,filled:void 0,icon:{template:(a,b)=>"on"===b.state?this.empty_icon:"off"===b.state?this.full_icon:this.detached_icon},unit:{template:()=>""},source:{entity:"binary_sensor.{entity_id}_water_tank_empty",mapper:a=>"on"===a?void 0===this.empty?this.localize("deerma_humidifier_jsq.water_tank_empty.empty","empty"):this.empty:"off"===a?void 0===this.filled?this.localize("deerma_humidifier_jsq.water_tank_empty.filled","filled"):this.filled:""}},temperature:{tap_action:"more-info",icon:Ob.TEMPERATURE,unit:"\xB0C",round:1,order:1,hide:!1,source:{entity:"sensor.{entity_id}_temperature"}},humidity:{tap_action:"more-info",icon:Ob.HUMIDITY,unit:"%",round:1,order:2,hide:!1,source:{entity:"sensor.{entity_id}_humidity"}}},buttons:{mode:{icon:Ob.FAN,type:"dropdown",hide:!1,order:1,source:{__init:a=>{var b=a.attributes.available_modes||[];return b.map(a=>({id:a,name:this.localize("deerma_humidifier_jsq.mode.".concat(a),a)}))}},active:(a,b)=>"off"!==b.state,state:{attribute:"mode"},change_action:(a,b,c)=>{var d={entity_id:c.entity_id,mode:a};return this.call_service("humidifier","set_mode",d)}},led:{icon:Ob.LEDBUTTON,hide:!1,order:1,state:{entity:"switch.{entity_id}_led"},toggle_action:(a,b)=>{var c="on"===a?"turn_off":"turn_on",d={entity_id:b.entity_id};return this.call_service("switch",c,d)}},buzzer:{icon:Ob.BUZZER,hide:!1,order:2,state:{entity:"switch.{entity_id}_buzzer"},toggle_action:(a,b)=>{var c="on"===a?"turn_off":"turn_on",d={entity_id:b.entity_id};return this.call_service("switch",c,d)}}}}),ec={default:cc,"zhimi.humidifier.cb1":cc,"zhimi.humidifier.ca1":cc,"zhimi.humidifier.ca4":cc,"zhimi.airpurifier.ma2":()=>({power:{icon:Ob.POWER,type:"button",hide:!1,toggle_action:(a,b)=>{var c="on"===a?"turn_off":"turn_on",d={entity_id:b.entity_id};return this.call_service("fan",c,d)}},target_humidity:{unit:"",min:0,max:14,step:1,state:{entity:"number.{entity_id}_favorite_level"},change_action:(a,b,c)=>{var d={entity_id:c.entity_id,value:a};return this.call_service("number","set_value",d)}},indicators:{aqi:{hide:!1,order:0,levels:{good:{min:0,max:50,color:"#1CC09B"},moderate:{min:51,max:100,color:"#FFDE33"},unhealthy_sensitive_groups:{min:101,max:150,color:"#F88B48"},unhealthy:{min:151,max:200,color:"#E64650"},very_unhealthy:{min:201,max:300,color:"#660099"},hazardous:{min:301,max:1e5,color:"#7E0023"}},icon:{template:()=>"mdi:checkbox-blank-circle",style:a=>{for(var b,c={"--mdc-icon-size":"17px","margin-top":"1px"},d=+a,e=Object.entries(this.levels||{}),f=0;f<e.length;f+=1)b=e[f][1]||{},d>=b.min&&d<=b.max&&(c.color=b.color);return c}},unit:"\u03BCg/m\xB3",round:0,source:{entity:"sensor.{entity_id}_pm2_5"}},temperature:{icon:Ob.TEMPERATURE,hide:!1,order:1,unit:"\xB0C",round:1,source:{entity:"sensor.{entity_id}_temperature"}},humidity:{icon:Ob.HUMIDITY,hide:!1,order:2,unit:"%",round:1,source:{entity:"sensor.{entity_id}_humidity"}},motor_speed:{icon:Ob.RPM,hide:!1,order:3,unit:"rpm",round:0,source:{entity:"sensor.{entity_id}_motor_speed"}},filter_use:{icon:Ob.CLOCK,hide:!1,order:4,unit:"h",round:0,source:{entity:"sensor.{entity_id}_filter_use"}}},buttons:{mode:{icon:Ob.FAN,type:"dropdown",hide:!1,order:0,source:{__init:a=>{var b=a.attributes.preset_modes||[];return b.map(a=>({id:a,name:this.localize("zhimi_airpurifier_ma2.mode.".concat(a))}))}},active:(a,b)=>"off"!==b.state,state:{attribute:"preset_mode"},change_action:(a,b,c)=>{var d={entity_id:c.entity_id,preset_mode:a};return this.call_service("fan","set_preset_mode",d)}},led:{icon:Ob.LEDBUTTON,hide:!1,order:1,state:{entity:"switch.{entity_id}_led"},toggle_action:(a,b)=>{var c="on"===a?"turn_off":"turn_on",d={entity_id:b.entity_id};return this.call_service("switch",c,d)}},buzzer:{icon:Ob.BUZZER,hide:!1,order:2,state:{entity:"switch.{entity_id}_buzzer"},toggle_action:(a,b)=>{var c="on"===a?"turn_off":"turn_on",d={entity_id:b.entity_id};return this.call_service("switch",c,d)}},child_lock:{icon:Ob.CHILDLOCK,hide:!1,order:3,state:{entity:"switch.{entity_id}_child_lock"},toggle_action:(a,b)=>{var c="on"===a?"turn_off":"turn_on",d={entity_id:b.entity_id};return this.call_service("switch",c,d)}}}}),"zhimi.airfresh.va2":()=>({power:{icon:Ob.POWER,type:"button",hide:!1,toggle_action:(a,b)=>{var c="on"===a?"turn_off":"turn_on",d={entity_id:b.entity_id};return this.call_service("fan",c,d)}},target_humidity:{unit:"%",min:1,max:100,step:1,state:{attribute:"percentage"},change_action:(a,b,c)=>{var d={entity_id:c.entity_id,percentage:a};return this.call_service("fan","set_percentage",d)}},indicators:{aqi:{round:0,order:0,hide:!1,levels:{good:{min:0,max:50,color:"#1CC09B"},moderate:{min:51,max:100,color:"#FFDE33"},unhealthy_sensitive_groups:{min:101,max:150,color:"#F88B48"},unhealthy:{min:151,max:200,color:"#E64650"},very_unhealthy:{min:201,max:300,color:"#660099"},hazardous:{min:301,max:1e5,color:"#7E0023"}},icon:{template:()=>"mdi:checkbox-blank-circle",style:a=>{for(var b,c={"--mdc-icon-size":"17px","margin-top":"1px"},d=+a,e=Object.entries(this.levels||{}),f=0;f<e.length;f+=1)b=e[f][1]||{},d>=b.min&&d<=b.max&&(c.color=b.color);return c}},unit:"\u03BCg/m\xB3",source:{entity:"sensor.{entity_id}_pm2_5"}},temperature:{icon:Ob.TEMPERATURE,unit:"\xB0C",round:1,order:1,hide:!1,source:{entity:"sensor.{entity_id}_temperature"}},humidity:{icon:Ob.HUMIDITY,unit:"%",round:1,order:2,hide:!1,source:{entity:"sensor.{entity_id}_humidity"}},motor_speed:{icon:Ob.RPM,unit:"rpm",round:0,order:3,hide:!0,source:{attribute:"motor_speed"}},co2:{icon:Ob.CO2,unit:"ppm",round:0,order:4,hide:!1,source:{entity:"sensor.{entity_id}_carbon_dioxide"}},filter_use:{icon:Ob.CLOCK,unit:"h",round:0,order:5,hide:!1,source:{entity:"sensor.{entity_id}_filter_use"}}},buttons:{mode:{icon:Ob.FAN,type:"dropdown",hide:!1,order:0,source:{__init:a=>{var b=a.attributes.speed_list||[];return b.map(a=>({id:a,name:this.localize("zhimi_airfresh_va2.mode.".concat(a))}))}},active:(a,b)=>"off"!==b.state,state:{attribute:"mode"},change_action:(a,b,c)=>{var d={entity_id:c.entity_id,speed:a};return this.call_service("fan","set_speed",d)}},led:{icon:Ob.LEDBUTTON,type:"dropdown",hide:!1,order:1,source:{bright:"Bright",dim:"Dim",off:"Off"},state:{entity:"select.{entity_id}_led_brightness"},change_action:(a,b,c)=>{var d={entity_id:c.entity_id,option:a};return this.call_service("select","select_option",d)}},buzzer:{icon:Ob.BUZZER,hide:!1,order:2,state:{entity:"switch.{entity_id}_buzzer"},toggle_action:(a,b)=>{var c="on"===a?"turn_off":"turn_on",d={entity_id:b.entity_id};return this.call_service("switch",c,d)}},child_lock:{icon:Ob.CHILDLOCK,hide:!1,order:3,state:{entity:"switch.{entity_id}_child_lock"},toggle_action:(a,b)=>{var c="on"===a?"turn_off":"turn_on",d={entity_id:b.entity_id};return this.call_service("switch",c,d)}}}}),"deerma.humidifier.jsq":dc,"deerma.humidifier.jsq1":dc,"deerma.humidifier.mjjsq":dc,"xiaomi_miio_airpurifier:zhimi.humidifier.cb1":()=>({power:{icon:Ob.POWER,type:"button",hide:!1,toggle_action:(a,b)=>{var c="on"===a?"turn_off":"turn_on",d={entity_id:b.entity_id};return this.call_service("fan",c,d)}},target_humidity:{icon:Ob.HUMIDITY,unit:"%",min:30,max:80,step:10,hide:!1,hide_indicator:!1,state:{attribute:"target_humidity"},change_action:(a,b,c)=>{var d={entity_id:c.entity_id,humidity:a};return this.call_service("xiaomi_miio_airpurifier","fan_set_target_humidity",d)}},indicators:{depth:{default_icon:Ob.DEPTH,detached_icon:Ob.WATERTANKDETACHED,icon:{template:a=>""===a?this.detached_icon:this.default_icon},unit:{template:a=>{if(""===a)return"";var{type:b}=this;return this.localize("zhimi_humidifier_cb1.water_level.".concat(b),"%")}},round:0,order:0,max_value:125,volume:4,type:"percent",hide:!1,source:{attribute:"depth",mapper:a=>{if(127===a)return"";var b=100*(a||0)/this.max_value;return"liters"===this.type?b*this.volume/100:b}}},temperature:{icon:Ob.TEMPERATURE,unit:"\xB0C",round:1,order:1,hide:!1,source:{attribute:"temperature"}},humidity:{icon:Ob.HUMIDITY,unit:"%",round:1,order:2,hide:!1,source:{attribute:"humidity"}},motor_speed:{icon:Ob.MOTORSPEED,unit:"rpm",round:0,order:3,hide:!1,source:{attribute:"motor_speed"}}},buttons:{dry:{icon:Ob.DRY,hide:!1,order:0,state:{attribute:"dry",mapper:a=>a?"on":"off"},toggle_action:(a,b)=>{var c="on"===a?"fan_set_dry_off":"fan_set_dry_on",d={entity_id:b.entity_id};return this.call_service("xiaomi_miio_airpurifier",c,d)}},mode:{icon:Ob.FAN,type:"dropdown",hide:!1,order:1,source:{__init:a=>{var b=a.attributes.preset_modes||[];return b.map(a=>({id:a,name:this.localize("zhimi_humidifier_cb1.mode.".concat(a))}))}},active:(a,b)=>"off"!==b.state,disabled:(a,b)=>0===b.attributes.depth,state:{attribute:"preset_mode"},change_action:(a,b,c)=>{var d={entity_id:c.entity_id,preset_mode:a};return this.call_service("fan","set_preset_mode",d)}},led:{icon:Ob.LEDBUTTON,type:"dropdown",hide:!1,order:2,active:a=>2!==a&&"2"!==a,source:{0:"Bright",1:"Dim",2:"Off",__filter:a=>a.map(a=>{var b=this.localize("zhimi_humidifier_cb1.led_brightness.".concat(a.id),a.name);return{id:a.id,name:b}})},state:{attribute:"led_brightness"},change_action:(a,b,c)=>{var d={entity_id:c.entity_id,brightness:a};return this.call_service("xiaomi_miio_airpurifier","fan_set_led_brightness",d)}},buzzer:{icon:Ob.BUZZER,hide:!1,order:3,state:{attribute:"buzzer",mapper:a=>a?"on":"off"},toggle_action:(a,b)=>{var c="on"===a?"fan_set_buzzer_off":"fan_set_buzzer_on",d={entity_id:b.entity_id};return this.call_service("xiaomi_miio_airpurifier",c,d)}},child_lock:{icon:Ob.CHILDLOCK,hide:!1,order:4,state:{attribute:"child_lock",mapper:a=>a?"on":"off"},toggle_action:(a,b)=>{var c="on"===a?"fan_set_child_lock_off":"fan_set_child_lock_on",d={entity_id:b.entity_id};return this.call_service("xiaomi_miio_airpurifier",c,d)}}}}),"xiaomi_miio_airpurifier:zhimi.humidifier.ca4":()=>({power:{icon:Ob.POWER,type:"button",hide:!1,toggle_action:(a,b)=>{var c="on"===a?"turn_off":"turn_on",d={entity_id:b.entity_id};return this.call_service("fan",c,d)}},target_humidity:{icon:Ob.HUMIDITY,unit:"%",min:30,max:80,step:10,hide:!1,hide_indicator:!1,state:{attribute:"target_humidity"},change_action:(a,b,c)=>{var d={entity_id:c.entity_id,humidity:a};return this.call_service("xiaomi_miio_airpurifier","fan_set_target_humidity",d)}},indicators:{water_level:{icon:Ob.DEPTH,unit:"%",round:0,order:0,hide:!1,source:{attribute:"water_level"}},temperature:{icon:Ob.TEMPERATURE,unit:"\xB0C",round:1,order:1,hide:!1,source:{attribute:"temperature"}},humidity:{icon:Ob.HUMIDITY,unit:"%",round:1,order:2,hide:!1,source:{attribute:"humidity"}},motor_speed:{icon:Ob.RPM,unit:"rpm",round:0,order:3,hide:!1,source:{attribute:"motor_speed"}}},buttons:{dry:{icon:Ob.DRY,hide:!1,order:0,state:{attribute:"dry",mapper:a=>a?"on":"off"},toggle_action:(a,b)=>{var c="on"===a?"fan_set_dry_off":"fan_set_dry_on",d={entity_id:b.entity_id};return this.call_service("xiaomi_miio_airpurifier",c,d)}},mode:{icon:Ob.FAN,type:"dropdown",hide:!1,order:1,source:{Auto:"auto",Low:"low",Mid:"medium",High:"high"},active:(a,b)=>"off"!==b.state,disabled:(a,b)=>0===b.attributes.water_level,state:{attribute:"preset_mode"},change_action:(a,b,c)=>{var d={entity_id:c.entity_id,preset_mode:a};return this.call_service("fan","set_preset_mode",d)}},led:{icon:Ob.LEDBUTTON,type:"dropdown",hide:!1,order:2,active:a=>0!==a&&"0"!==a,source:{0:"Off",1:"Dim",2:"Bright"},state:{attribute:"led_brightness"},change_action:(a,b,c)=>{var d={entity_id:c.entity_id,brightness:a};return this.call_service("xiaomi_miio_airpurifier","fan_set_led_brightness",d)}},buzzer:{icon:Ob.BUZZER,hide:!1,order:3,state:{attribute:"buzzer",mapper:a=>a?"on":"off"},toggle_action:(a,b)=>{var c="on"===a?"fan_set_buzzer_off":"fan_set_buzzer_on",d={entity_id:b.entity_id};return this.call_service("xiaomi_miio_airpurifier",c,d)}},child_lock:{icon:Ob.CHILDLOCK,hide:!1,order:4,state:{attribute:"child_lock",mapper:a=>a?"on":"off"},toggle_action:(a,b)=>{var c="on"===a?"fan_set_child_lock_off":"fan_set_child_lock_on",d={entity_id:b.entity_id};return this.call_service("xiaomi_miio_airpurifier",c,d)}},clean:{icon:Ob.DISHWASHER,hide:!1,order:5,state:{attribute:"clean_mode",mapper:a=>a?"on":"off"},toggle_action:(a,b)=>{var c=b.attributes.clean_mode,d=b.attributes.preset_mode,e={entity_id:b.entity_id};return c?(e.preset_mode=d,this.call_service("fan","set_preset_mode",e)):this.call_service("xiaomi_miio_airpurifier","fan_set_clean_mode_on",e)}}}}),"xiaomi_miio_airpurifier:deerma.humidifier.mjjsq":()=>({power:{icon:Ob.POWER,type:"button",hide:!1,toggle_action:(a,b)=>{var c="on"===a?"turn_off":"turn_on",d={entity_id:b.entity_id};return this.call_service("fan",c,d)}},target_humidity:{icon:Ob.HUMIDITY,unit:"%",min:30,max:80,step:1,hide:!1,hide_indicator:!1,state:{attribute:"target_humidity"},change_action:(a,b,c)=>{var d={entity_id:c.entity_id,humidity:a};return this.call_service("xiaomi_miio_airpurifier","fan_set_target_humidity",d)}},indicators:{temperature:{icon:Ob.TEMPERATURE,unit:"\xB0C",round:1,order:1,hide:!1,source:{attribute:"temperature"}},humidity:{icon:Ob.HUMIDITY,unit:"%",round:1,order:2,hide:!1,source:{attribute:"humidity"}},status:{icon:Ob.TANK,order:3,empty:"Empty",filled:"Filled",source:{attribute:"no_water",mapper:a=>a?this.empty:this.filled}}},buttons:{mode:{icon:Ob.FAN,type:"dropdown",hide:!1,order:1,source:{humidity:"auto",low:"low",medium:"medium",high:"high"},active:(a,b)=>"off"!==b.state,state:{attribute:"mode"},change_action:(a,b,c)=>{var d={entity_id:c.entity_id,speed:a};return this.call_service("fan","set_speed",d)}},led:{icon:Ob.LEDBUTTON,type:"button",hide:!1,order:2,state:{attribute:"led",mapper:a=>a?"on":"off"},toggle_action:(a,b)=>{var c="on"===a?"fan_set_led_off":"fan_set_led_on",d={entity_id:b.entity_id};return this.call_service("xiaomi_miio_airpurifier",c,d)}},buzzer:{icon:Ob.BUZZER,hide:!1,type:"button",order:3,state:{attribute:"buzzer",mapper:a=>a?"on":"off"},toggle_action:(a,b)=>{var c="on"===a?"fan_set_buzzer_off":"fan_set_buzzer_on",d={entity_id:b.entity_id};return this.call_service("xiaomi_miio_airpurifier",c,d)}}}}),"xiaomi_miio_airpurifier:zhimi.airfresh.va2":()=>({power:{icon:Ob.POWER,type:"button",hide:!1,toggle_action:(a,b)=>{var c="on"===a?"turn_off":"turn_on",d={entity_id:b.entity_id};return this.call_service("fan",c,d)}},target_humidity:{unit:"%",min:0,max:100,step:25,state:{attribute:"preset_mode",mapper:a=>{if("Auto"===a)return 0;return"Silent"===a?25:"Low"===a?50:"Middle"===a?75:"Strong"===a?100:void 0}},change_action:(a,b,c)=>{if(0===a){var e={entity_id:c.entity_id,preset_mode:"Auto"};return this.call_service("fan","set_preset_mode",e)}if(25===a){var f={entity_id:c.entity_id,preset_mode:"Silent"};return this.call_service("fan","set_preset_mode",f)}if(50===a){var g={entity_id:c.entity_id,preset_mode:"Low"};return this.call_service("fan","set_preset_mode",g)}if(75===a){var h={entity_id:c.entity_id,preset_mode:"Middle"};return this.call_service("fan","set_preset_mode",h)}if(100===a){var i={entity_id:c.entity_id,preset_mode:"Strong"};return this.call_service("fan","set_preset_mode",i)}var d={entity_id:c.entity_id,preset_mode:"Auto"};return this.call_service("fan","set_preset_mode",d)}},indicators:{aqi:{round:0,order:0,hide:!1,levels:{good:{min:0,max:50,color:"#1CC09B"},moderate:{min:51,max:100,color:"#FFDE33"},unhealthy_sensitive_groups:{min:101,max:150,color:"#F88B48"},unhealthy:{min:151,max:200,color:"#E64650"},very_unhealthy:{min:201,max:300,color:"#660099"},hazardous:{min:301,max:1e5,color:"#7E0023"}},icon:{template:()=>"mdi:checkbox-blank-circle",style:a=>{for(var b,c={"--mdc-icon-size":"17px","margin-top":"1px"},d=+a,e=Object.entries(this.levels||{}),f=0;f<e.length;f+=1)b=e[f][1]||{},d>=b.min&&d<=b.max&&(c.color=b.color);return c}},unit:"\u03BCg/m\xB3",source:{attribute:"aqi"}},temperature:{icon:Ob.TEMPERATURE,unit:"\xB0C",round:1,order:1,hide:!1,source:{attribute:"temperature"}},humidity:{icon:Ob.HUMIDITY,unit:"%",round:1,order:2,hide:!1,source:{attribute:"humidity"}},motor_speed:{icon:Ob.RPM,unit:"rpm",round:0,order:3,hide:!1,source:{attribute:"motor_speed"}},co2:{icon:Ob.CO2,unit:"ppm",round:0,order:4,hide:!1,source:{attribute:"co2"}},filter_use:{icon:Ob.CLOCK,unit:"h",round:0,order:5,hide:!1,source:{entity:"filter_hours_used"}}},buttons:{mode:{icon:Ob.FAN,type:"dropdown",hide:!1,order:1,source:{__init:a=>a.attributes.preset_modes.map(a=>({id:a,name:a}))},active:(a,b)=>"off"!==b.state,disabled:(a,b)=>0===b.attributes.depth,state:{attribute:"preset_mode"},change_action:(a,b,c)=>{var d={entity_id:c.entity_id,preset_mode:a};return this.call_service("fan","set_preset_mode",d)}},led:{icon:Ob.LEDBUTTON,type:"dropdown",hide:!1,order:2,active:a=>2!==a&&"2"!==a,source:{0:"Bright",1:"Dim",2:"Off"},state:{attribute:"led_brightness"},change_action:(a,b,c)=>{var d={entity_id:c.entity_id,brightness:a};return this.call_service("xiaomi_miio_airpurifier","fan_set_led_brightness",d)}},buzzer:{icon:Ob.BUZZER,hide:!1,order:3,state:{attribute:"buzzer",mapper:a=>a?"on":"off"},toggle_action:(a,b)=>{var c="on"===a?"fan_set_buzzer_off":"fan_set_buzzer_on",d={entity_id:b.entity_id};return this.call_service("xiaomi_miio_airpurifier",c,d)}},child_lock:{icon:Ob.CHILDLOCK,hide:!1,order:4,state:{attribute:"child_lock",mapper:a=>a?"on":"off"},toggle_action:(a,b)=>{var c="on"===a?"fan_set_child_lock_off":"fan_set_child_lock_on",d={entity_id:b.entity_id};return this.call_service("xiaomi_miio_airpurifier",c,d)}}}})},fc={mode:{auto:"Auto",silent:"Silent",medium:"Medium",high:"High"},led_brightness:{0:"Bright",1:"Dim",2:"Off",bright:"Bright",dim:"Dim",off:"Off"},water_level:{liters:"L",percent:"%"},depth:{liters:"L",percent:"%"}},gc={mode:{off:"Off",low:"Low",medium:"Medium",high:"High",auto:"Auto",interval:"Interval"}},hc={mode:{auto:"Auto",silent:"Silent",favorite:"Favorite",idle:"Idle"}},ic={mode:{low:"Low",medium:"Medium",high:"High",humidity:"Auto"},water_tank_empty:{empty:"empty",filled:"filled"}},jc=Object.freeze({__proto__:null,zhimi_humidifier_cb1:fc,zhimi_airfresh_va2:gc,zhimi_airpurifier_ma2:hc,deerma_humidifier_jsq:ic,default:{zhimi_humidifier_cb1:fc,zhimi_airfresh_va2:gc,zhimi_airpurifier_ma2:hc,deerma_humidifier_jsq:ic}}),kc={led_brightness:{0:"\u042F\u0440\u043A\u043E",1:"\u0422\u0443\u0441\u043A\u043B\u043E",2:"\u0412\u044B\u043A\u043B.",bright:"\u042F\u0440\u043A\u043E",dim:"\u0422\u0443\u0441\u043A\u043B\u043E",off:"\u041E\u0442\u043A\u043B."},mode:{auto:"\u0410\u0432\u0442\u043E",silent:"\u0422\u0438\u0445\u0438\u0439",medium:"\u0421\u0440\u0435\u0434\u043D\u0438\u0439",high:"\u0421\u0438\u043B\u044C\u043D\u044B\u0439"},water_level:{liters:"\u041B",percent:"%"},depth:{liters:"\u041B",percent:"%"}},lc={mode:{off:"\u041E\u0442\u043A\u043B.",low:"\u0421\u043B\u0430\u0431\u044B\u0439",medium:"\u0421\u0440\u0435\u0434\u043D\u0438\u0439",high:"\u0421\u0438\u043B\u044C\u043D\u044B\u0439",auto:"\u0410\u0432\u0442\u043E",silent:"\u041D\u043E\u0447\u043D\u043E\u0439",interval:"\u0420\u0430\u0441\u043F\u0438\u0441\u0430\u043D\u0438\u0435"}},mc={mode:{auto:"\u0410\u0432\u0442\u043E",silent:"\u0422\u0438\u0445\u0438\u0439",favorite:"\u0417\u0430\u0434\u0430\u043D\u043D\u044B\u0439",idle:"\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435"}},nc={mode:{low:"\u0421\u043B\u0430\u0431\u044B\u0439",medium:"\u0421\u0440\u0435\u0434\u043D\u0438\u0439",high:"\u0421\u0438\u043B\u044C\u043D\u044B\u0439",humidity:"\u0410\u0432\u0442\u043E"},water_tank_empty:{empty:"\u041F\u0443\u0441\u0442\u043E\u0439",filled:"\u041F\u043E\u043B\u043D\u044B\u0439"}},oc=Object.freeze({__proto__:null,zhimi_humidifier_cb1:kc,zhimi_airfresh_va2:lc,zhimi_airpurifier_ma2:mc,deerma_humidifier_jsq:nc,default:{zhimi_humidifier_cb1:kc,zhimi_airfresh_va2:lc,zhimi_airpurifier_ma2:mc,deerma_humidifier_jsq:nc}}),pc={en:jc,ru:oc},qc=(a,b)=>{if(a&&b){var c=b.toUpperCase(),d=Object.entries(a||{}).find(a=>a[0].toUpperCase()===c);return d?d[1]:void 0}},rc=function(a,b){var c,d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:"unknown",e=a.split(".");try{c=pc[b];for(var f,g=0;g<e.length;g++)f=e[g],c=qc(c,f)}catch(a){return d}return void 0===c?d:"string"==typeof c?c:d},sc=(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),{}),tc=a=>({name:a,promise:customElements.whenDefined(a).then(()=>customElements.get(a))});class uc extends xa(Eb){static get defineId(){return"mh-target-humidity"}static get elementDefinitions(){return sc([tc("ha-slider"),tc("ha-icon")],uc)}static get properties(){return{targetHumidity:{type:Object},sliderValue:{type:Number}}}constructor(){super(),this.targetHumidity={},this.timer=void 0}handleChange(a){var b=this;a.stopPropagation(),this.sliderValue=a.target.value;var{entity:c}=this.targetHumidity;this.targetHumidity.handleChange(this.sliderValue),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(o(function*(){b.targetHumidity.entity===c&&(b.sliderValue=b.targetHumidity.value,b.requestUpdate("sliderValue"))}),this.targetHumidity.actionTimeout),this.requestUpdate("sliderValue")}renderState(){return this.targetHumidity.hideIndicator?g(r||(r=j(["<div class=\"mh-target_humidifier__state\"></div>"]))):g(s||(s=j(["\n <div class=\"mh-target_humidifier__state\">\n <ha-icon\n class='state__value_icon'\n style=","\n .icon=",">\n </ha-icon>\n <span class='state__value ellipsis'>","</span>\n <span class='state__uom ellipsis'>","</span>\n </div>\n "])),Kb(this.targetHumidity.iconStyle),this.targetHumidity.icon,this.sliderValue,this.targetHumidity.unit)}render(){return g(t||(t=j(["\n <div class='mh-target_humidifier --slider flex'>\n <ha-slider\n @change=","\n @click=","\n ?disabled=\"","\"\n min=","\n max=","\n step=","\n value=","\n dir=","\n ignore-bar-touch pin>\n </ha-slider>\n ","\n </div>"])),a=>this.handleChange(a),a=>a.stopPropagation(),this.targetHumidity.disabled,this.targetHumidity.min,this.targetHumidity.max,this.targetHumidity.step,this.sliderValue,"ltr",this.renderState(this.sliderValue))}updated(a){a.has("targetHumidity")&&(this.sliderValue=this.targetHumidity.value)}static get styles(){return Xa(u||(u=j(["\n :host {\n position: relative;\n box-sizing: border-box;\n min-width: 0;\n font-weight: var(--mh-info-font-weight);\n }\n .mh-target_humidifier.flex {\n display: flex;\n flex-direction: column-reverse;\n align-items: center;\n height: var(--mh-unit);\n width: 100%;\n }\n .mh-target_humidifier ha-slider {\n flex: 1;\n width: 100%;\n margin-top: calc(var(--mh-unit) * -.35);\n line-height: normal;\n }\n .mh-target_humidifier__state {\n position: relative;\n display: flex;\n flex-wrap: nowrap;\n margin-top: calc(var(--mh-unit) * -.1);\n height: calc(var(--mh-unit) * .45);\n }\n .state__value_icon {\n height: calc(var(--mh-unit) * .475);\n width: calc(var(--mh-unit) * .5);\n color: var(--mh-icon-color);\n --mdc-icon-size: calc(var(--mh-unit) * 0.5);\n }\n .state__value {\n font-size: calc(var(--mh-unit) * .35);\n line-height: calc(var(--mh-unit) * .475);\n margin: 0px 1px;\n }\n .state__uom {\n font-size: calc(var(--mh-unit) * .275);\n line-height: calc(var(--mh-unit) * .55);\n height: calc(var(--mh-unit) * .475);\n opacity: 0.8;\n }\n "])))}}class vc extends xa(Eb){static get defineId(){return"mh-button"}static get elementDefinitions(){return sc([tc("ha-icon"),tc("ha-icon-button")],vc)}constructor(){super(),this._isOn=!1,this.timer=void 0}static get properties(){return{button:{type:Object}}}handleToggle(a){var b=this;a.stopPropagation(),this._isOn=!this._isOn;var{lastChanged:c}=this.button,{lastUpdated:d}=this.button;this.button.handleToggle(),clearTimeout(this.timer);var e=this;this.timer=setTimeout(o(function*(){var{button:a}=e,f=c!==a.lastChanged||d!==a.lastUpdated;!1===f&&(b._isOn=b.button.isOn,b.requestUpdate("_isOn"))}),this.button.actionTimeout),this.requestUpdate("_isOn")}render(){return clearTimeout(this.timer),g(v||(v=j(["\n <ha-icon-button\n style=","\n @click=","\n ?disabled=\"","\"\n ?color=",">\n <ha-icon icon=\"","\"></ha-icon>\n </ha-icon-button>\n "])),Kb(this.button.style),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,clearTimeout(this.timer),this.requestUpdate("_isOn"))}static get styles(){return[Mb,Xa(w||(w=j(["\n :host {\n position: relative;\n box-sizing: border-box;\n margin: 0;\n overflow: hidden;\n transition: background .5s;\n --mh-dropdown-unit: var(--mh-unit);\n }\n :host([color]) {\n background: var(--mh-active-color);\n transition: background .25s;\n opacity: 1;\n }\n :host([disabled]) {\n opacity: .25;\n pointer-events: none;\n }\n "])))]}}class wc extends xa(Eb){static get defineId(){return"mh-power"}static get elementDefinitions(){return sc([vc,tc("ha-entity-toggle")],wc)}constructor(){super(),this._isOn=!1}static get properties(){return{power:{type:Object}}}render(){return this.power.hide?"":"toggle"===this.power.type?g(x||(x=j(["\n <ha-entity-toggle\n .stateObj=","\n .hass=",">\n </ha-entity-toggle>\n "])),this.power.entity,this.power.hass):g(y||(y=j(["\n <mh-button\n class=\"power-button\"\n .button=",">\n </mh-button>\n "])),this.power)}updated(a){a.has("power")&&(this._isOn=this.power.isOn)}static get styles(){return[Mb,Xa(z||(z=j(["\n :host {\n position: relative;\n box-sizing: border-box;\n min-width: 0;\n font-weight: var(--mh-info-font-weight);\n }\n "])))]}}class xc extends xa(Eb){static get defineId(){return"mh-indicators"}static get elementDefinitions(){return sc([tc("ha-icon")],xc)}static get properties(){return{indicators:{}}}handlePopup(a,b){a.stopPropagation(),Nb(this,b.hass,b.config.tap_action,b.entity.entity_id)}renderIcon(a){var{icon:b}=a;return b?g(A||(A=j(["<ha-icon style="," class='state__value_icon' .icon=","></ha-icon>"])),Kb(a.iconStyle),b):""}renderUnit(a){return a?g(B||(B=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&&Sb.includes(b)?"pointer":"";return g(C||(C=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(D||(D=j(["\n <div class='mh-indicators__container'>\n ","\n </div>\n "])),Object.entries(this.indicators).map(a=>a[1]).filter(a=>!a.hide).sort((c,a)=>c.order>a.order?1:a.order>c.order?-1:0).map(b=>a.renderIndicator(b)))}static get styles(){return Xa(E||(E=j(["\n :host {\n position: relative;\n box-sizing: border-box;\n font-size: calc(var(--mh-unit) * .35);\n line-height: calc(var(--mh-unit) * .35);\n }\n .mh-indicators__container {\n display: flex;\n flex-wrap: wrap;\n margin-right: calc(var(--mh-unit) * .075);\n }\n .state {\n position: relative;\n display: flex;\n flex-wrap: nowrap;\n margin-right: calc(var(--mh-unit) * .1);\n }\n .pointer {\n cursor: pointer\n }\n .state__value_icon {\n height: calc(var(--mh-unit) * .475);\n width: calc(var(--mh-unit) * .5);\n color: var(--mh-icon-color);\n --mdc-icon-size: calc(var(--mh-unit) * 0.5);\n }\n .state__value {\n margin: 0 1px;\n font-weight: var(--mh-info-font-weight);\n line-height: calc(var(--mh-unit) * .475);\n }\n .state__uom {\n font-size: calc(var(--mh-unit) * .275);\n line-height: calc(var(--mh-unit) * .525);\n margin-left: 1px;\n height: calc(var(--mh-unit) * .475);\n opacity: 0.8;\n }\n "])))}}var yc,zc={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},Ac={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"},Bc={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"})(yc||(yc={}));var Cc,Dc,Ec=function(a,c){return Ec=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])},Ec(a,c)},Fc=function(){return Fc=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},Fc.apply(this,arguments)},Gc=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}(),Hc={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"};Cc={},Cc[""+Hc.LIST_ITEM_ACTIVATED_CLASS]="mdc-list-item--activated",Cc[""+Hc.LIST_ITEM_CLASS]="mdc-list-item",Cc[""+Hc.LIST_ITEM_DISABLED_CLASS]="mdc-list-item--disabled",Cc[""+Hc.LIST_ITEM_SELECTED_CLASS]="mdc-list-item--selected",Cc[""+Hc.LIST_ITEM_PRIMARY_TEXT_CLASS]="mdc-list-item__primary-text",Cc[""+Hc.ROOT]="mdc-list",Cc;var Ic,Jc=(Dc={},Dc[""+Hc.LIST_ITEM_ACTIVATED_CLASS]="mdc-deprecated-list-item--activated",Dc[""+Hc.LIST_ITEM_CLASS]="mdc-deprecated-list-item",Dc[""+Hc.LIST_ITEM_DISABLED_CLASS]="mdc-deprecated-list-item--disabled",Dc[""+Hc.LIST_ITEM_SELECTED_CLASS]="mdc-deprecated-list-item--selected",Dc[""+Hc.LIST_ITEM_TEXT_CLASS]="mdc-deprecated-list-item__text",Dc[""+Hc.LIST_ITEM_PRIMARY_TEXT_CLASS]="mdc-deprecated-list-item__primary-text",Dc[""+Hc.ROOT]="mdc-deprecated-list",Dc),Kc={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 ."+Hc.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+Hc.LIST_ITEM_CLASS+" a,\n ."+Jc[Hc.LIST_ITEM_CLASS]+" button:not(:disabled),\n ."+Jc[Hc.LIST_ITEM_CLASS]+" a\n ",DEPRECATED_SELECTOR:".mdc-deprecated-list",FOCUSABLE_CHILD_ELEMENTS:"\n ."+Hc.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+Hc.LIST_ITEM_CLASS+" a,\n ."+Hc.LIST_ITEM_CLASS+" input[type=\"radio\"]:not(:disabled),\n ."+Hc.LIST_ITEM_CLASS+" input[type=\"checkbox\"]:not(:disabled),\n ."+Jc[Hc.LIST_ITEM_CLASS]+" button:not(:disabled),\n ."+Jc[Hc.LIST_ITEM_CLASS]+" a,\n ."+Jc[Hc.LIST_ITEM_CLASS]+" input[type=\"radio\"]:not(:disabled),\n ."+Jc[Hc.LIST_ITEM_CLASS]+" input[type=\"checkbox\"]:not(:disabled)\n ",RADIO_SELECTOR:"input[type=\"radio\"]",SELECTED_ITEM_SELECTOR:"[aria-selected=\"true\"], [aria-current=\"true\"]"},Lc={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300},Mc=function(a,c){return Mc=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])},Mc(a,c)},Nc=function(){return Nc=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},Nc.apply(this,arguments)},Oc={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"},Pc={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\"])"},Qc={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"})(Ic||(Ic={}));var Rc;(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"})(Rc||(Rc={}));var Sc=function(a){function b(c){var d=a.call(this,Nc(Nc({},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=Rc.TOP_START,d.originCorner=Rc.TOP_START,d.anchorMargin={top:0,right:0,bottom:0,left:0},d.position={x:0,y:0},d}return Aa(b,a),Object.defineProperty(b,"cssClasses",{get:function(){return Oc},enumerable:!1,configurable:!0}),Object.defineProperty(b,"strings",{get:function(){return Pc},enumerable:!1,configurable:!0}),Object.defineProperty(b,"numbers",{get:function(){return Qc},enumerable:!1,configurable:!0}),Object.defineProperty(b,"Corner",{get:function(){return Rc},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^=Ic.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()},Qc.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()},Qc.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,Ic.BOTTOM)?"bottom":"top",f=this.hasBit(c,Ic.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>Qc.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,Ic.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,Ic.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,Ic.BOTTOM));var l=this.adapter.isRtl(),m=this.hasBit(this.anchorCorner,Ic.FLIP_RTL),n=this.hasBit(this.anchorCorner,Ic.RIGHT)||this.hasBit(d,Ic.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,Ic.FLIP_RTL)&&this.hasBit(d,Ic.RIGHT);return s&&t&&l||!r&&t?d=this.unsetBit(d,Ic.RIGHT):(r&&o&&l||r&&!o&&n||!s&&p>=q)&&(d=this.setBit(d,Ic.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,Ic.BOTTOM),f=this.hasBit(this.anchorCorner,Ic.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,Ic.RIGHT),d=this.hasBit(this.anchorCorner,Ic.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,Ic.BOTTOM),d=this.hasBit(this.anchorCorner,Ic.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=Ba(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()},Qc.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}(Gc),Tc=function(a){function b(c){var d=a.call(this,Fc(Fc({},b.defaultAdapter),c))||this;return d.closeAnimationEndTimerId=0,d.defaultFocusState=yc.LIST_ROOT,d.selectedIndex=-1,d}return za(b,a),Object.defineProperty(b,"cssClasses",{get:function(){return zc},enumerable:!1,configurable:!0}),Object.defineProperty(b,"strings",{get:function(){return Ac},enumerable:!1,configurable:!0}),Object.defineProperty(b,"numbers",{get:function(){return Bc},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,Ac.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)},Sc.numbers.TRANSITION_CLOSE_DURATION)}},b.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState){case yc.FIRST_ITEM:this.adapter.focusItemAtIndex(0);break;case yc.LAST_ITEM:this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount()-1);break;case yc.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,Ac.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(b,zc.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(a,zc.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(a,Ac.ARIA_CHECKED_ATTR,"true"),this.selectedIndex=a},b.prototype.setEnabled=function(a,b){this.validatedIndex(a),b?(this.adapter.removeClassFromElementAtIndex(a,Hc.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(a,Ac.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(a,Hc.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(a,Ac.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}(Gc),Uc=a=>a.nodeType===Node.ELEMENT_NODE,Vc=()=>{},Wc={get passive(){return!1}};document.addEventListener("x",Vc,Wc),document.removeEventListener("x",Vc);var Xc=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},Yc=a=>{var b=Xc();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 Zc extends Eb{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 $c,_c=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)},ad=(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)}},bd=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)}}},cd=null==(null===($c=window.HTMLSlotElement)||void 0===$c?void 0:$c.prototype.assignedElements)?(a,b)=>a.assignedNodes(b).filter(a=>a.nodeType===Node.ELEMENT_NODE):(a,b)=>a.assignedElements(b),e={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"},dd=new Set;dd.add(e.BACKSPACE),dd.add(e.ENTER),dd.add(e.SPACEBAR),dd.add(e.PAGE_UP),dd.add(e.PAGE_DOWN),dd.add(e.END),dd.add(e.HOME),dd.add(e.ARROW_LEFT),dd.add(e.ARROW_UP),dd.add(e.ARROW_RIGHT),dd.add(e.ARROW_DOWN),dd.add(e.DELETE),dd.add(e.ESCAPE),dd.add(e.TAB);var ed={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},fd=new Map;fd.set(ed.BACKSPACE,e.BACKSPACE),fd.set(ed.ENTER,e.ENTER),fd.set(ed.SPACEBAR,e.SPACEBAR),fd.set(ed.PAGE_UP,e.PAGE_UP),fd.set(ed.PAGE_DOWN,e.PAGE_DOWN),fd.set(ed.END,e.END),fd.set(ed.HOME,e.HOME),fd.set(ed.ARROW_LEFT,e.ARROW_LEFT),fd.set(ed.ARROW_UP,e.ARROW_UP),fd.set(ed.ARROW_RIGHT,e.ARROW_RIGHT),fd.set(ed.ARROW_DOWN,e.ARROW_DOWN),fd.set(ed.DELETE,e.DELETE),fd.set(ed.ESCAPE,e.ESCAPE),fd.set(ed.TAB,e.TAB);var gd=new Set([e.PAGE_UP,e.PAGE_DOWN,e.END,e.HOME,e.ARROW_LEFT,e.ARROW_UP,e.ARROW_RIGHT,e.ARROW_DOWN]),hd=(c,a)=>c-a,id=(a,b)=>{for(var c=Array.from(a),d=Array.from(b),e={added:[],removed:[]},f=c.sort(hd),g=d.sort(hd),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},jd=["input","button","textarea","select"],kd=a=>{var b=a===Lc.UNSET_INDEX?new Set:a;return Ia(b)?new Set(b):new Set([b])};class ld extends Gc{constructor(a){super(Object.assign(Object.assign({},ld.defaultAdapter),a)),this.isMulti_=!1,this.wrapFocus_=!1,this.isVertical_=!0,this.selectedIndex_=Lc.UNSET_INDEX,this.focusedItemIndex_=Lc.UNSET_INDEX,this.useActivatedClass_=!1,this.ariaCurrentAttrValue_=null}static get strings(){return Kc}static get numbers(){return Lc}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(!Ia(b)){var c=b===Lc.UNSET_INDEX;this.selectedIndex_=c?new Set:new Set([b])}}else if(Ia(b))if(b.size){var d=Array.from(b).sort(hd);this.selectedIndex_=d[0]}else this.selectedIndex_=Lc.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_(kd(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"===Ha(a),e="ArrowUp"===Ha(a),f="ArrowRight"===Ha(a),g="ArrowDown"===Ha(a),h="Home"===Ha(a),i="End"===Ha(a),j="Enter"===Ha(a),k="Spacebar"===Ha(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===Lc.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===jd.indexOf(c)&&a.preventDefault()}setSingleSelectionAtIndex_(a){var b=!(1<arguments.length&&arguments[1]!==void 0)||arguments[1];this.selectedIndex_===a||(this.selectedIndex_!==Lc.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=kd(this.selectedIndex_),d=id(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_===Lc.UNSET_INDEX&&(this.ariaCurrentAttrValue_=this.adapter.getAttributeForElementIndex(a,Kc.ARIA_CURRENT));var b=null!==this.ariaCurrentAttrValue_,c=b?Kc.ARIA_CURRENT:Kc.ARIA_SELECTED;this.selectedIndex_!==Lc.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_===Lc.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_!==Lc.UNSET_INDEX?a=this.selectedIndex_:Ia(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===Lc.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_(Lc.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=kd(this.selectedIndex_);d?e.add(a):e.delete(a),this.setMultiSelectionAtIndex_(e,c)}}class md extends Zc{constructor(){super(...arguments),this.mdcFoundationClass=Tc,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(F||(F=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([Fa(".mdc-menu")],md.prototype,"mdcRoot",void 0),ya([Fa("slot")],md.prototype,"slotElement",void 0),ya([Da({type:Object})],md.prototype,"anchor",void 0),ya([Da({type:Boolean,reflect:!0})],md.prototype,"open",void 0),ya([Da({type:Boolean})],md.prototype,"quick",void 0),ya([Da({type:Boolean})],md.prototype,"wrapFocus",void 0),ya([Da({type:String})],md.prototype,"innerRole",void 0),ya([Da({type:String})],md.prototype,"innerAriaLabel",void 0),ya([Da({type:String})],md.prototype,"corner",void 0),ya([Da({type:Number})],md.prototype,"x",void 0),ya([Da({type:Number})],md.prototype,"y",void 0),ya([Da({type:Boolean})],md.prototype,"absolute",void 0),ya([Da({type:Boolean})],md.prototype,"multi",void 0),ya([Da({type:Boolean})],md.prototype,"activatable",void 0),ya([Da({type:Boolean})],md.prototype,"fixed",void 0),ya([Da({type:Boolean})],md.prototype,"forceGroupSelection",void 0),ya([Da({type:Boolean})],md.prototype,"fullwidth",void 0),ya([Da({type:String})],md.prototype,"menuCorner",void 0),ya([Da({type:Boolean})],md.prototype,"stayOpenOnBodyClick",void 0),ya([Da({type:String}),_c(function(a){this.mdcFoundation&&this.mdcFoundation.setDefaultFocusState(yc[a])})],md.prototype,"defaultFocus",void 0);var nd=Xa(G||(G=j(["mwc-list ::slotted([mwc-list-item]:not([twoline])),mwc-list ::slotted([noninteractive]:not([twoline])){height:var(--mdc-menu-item-height, 48px)}"]))),od={TOP_LEFT:Rc.TOP_LEFT,TOP_RIGHT:Rc.TOP_RIGHT,BOTTOM_LEFT:Rc.BOTTOM_LEFT,BOTTOM_RIGHT:Rc.BOTTOM_RIGHT,TOP_START:Rc.TOP_START,TOP_END:Rc.TOP_END,BOTTOM_START:Rc.BOTTOM_START,BOTTOM_END:Rc.BOTTOM_END};class pd extends Zc{constructor(){super(...arguments),this.mdcFoundationClass=Sc,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=Rc.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(H||(H=j(["\n <div\n class=\"mdc-menu-surface ","\"\n style=\"","\"\n @keydown=","\n @opened=","\n @closed=",">\n <slot></slot>\n </div>"])),Jb(a),Kb(b),this.onKeydown,this.registerBodyClick,this.deregisterBodyClick)}createAdapter(){var a=this;return Object.assign(Object.assign({},Ca(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:()=>Yc(this),saveFocus:()=>{var a=Xc(),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([Fa(".mdc-menu-surface")],pd.prototype,"mdcRoot",void 0),ya([Fa("slot")],pd.prototype,"slotElement",void 0),ya([Da({type:Boolean}),_c(function(a){this.mdcFoundation&&!this.fixed&&this.mdcFoundation.setIsHoisted(a)})],pd.prototype,"absolute",void 0),ya([Da({type:Boolean})],pd.prototype,"fullwidth",void 0),ya([Da({type:Boolean}),_c(function(a){this.mdcFoundation&&!this.absolute&&this.mdcFoundation.setFixedPosition(a)})],pd.prototype,"fixed",void 0),ya([Da({type:Number}),_c(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}))})],pd.prototype,"x",void 0),ya([Da({type:Number}),_c(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}))})],pd.prototype,"y",void 0),ya([Da({type:Boolean}),_c(function(a){this.mdcFoundation&&this.mdcFoundation.setQuickOpen(a)})],pd.prototype,"quick",void 0),ya([Da({type:Boolean,reflect:!0}),_c(function(a,b){this.mdcFoundation&&(a?this.mdcFoundation.open():b!==void 0&&this.mdcFoundation.close())})],pd.prototype,"open",void 0),ya([Da({type:Boolean})],pd.prototype,"stayOpenOnBodyClick",void 0),ya([Ea(),_c(function(a){this.mdcFoundation&&(a?this.mdcFoundation.setAnchorCorner(a):this.mdcFoundation.setAnchorCorner(a))})],pd.prototype,"bitwiseCorner",void 0),ya([Da({type:String}),_c(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^=Ic.RIGHT,this.mdcFoundation.flipCornerHorizontally(),this.previousMenuCorner=a)}})],pd.prototype,"menuCorner",void 0),ya([Da({type:String}),_c(function(a){if(this.mdcFoundation&&a){var b=od[a];"END"===this.menuCorner&&(b^=Ic.RIGHT),this.bitwiseCorner=b}})],pd.prototype,"corner",void 0),ya([Ea()],pd.prototype,"styleTop",void 0),ya([Ea()],pd.prototype,"styleLeft",void 0),ya([Ea()],pd.prototype,"styleRight",void 0),ya([Ea()],pd.prototype,"styleBottom",void 0),ya([Ea()],pd.prototype,"styleMaxHeight",void 0),ya([Ea()],pd.prototype,"styleTransformOrigin",void 0);var qd=Xa(J||(J=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 rd extends xa(pd){static get defineId(){return"mwc-menu-surface"}static get elementDefinitions(){return sc([],rd)}static get styles(){return qd}}var sd=a=>null==a?b:a,td=a=>a.hasAttribute("mwc-list-item");class ud extends Zc{constructor(){var a;super(),a=this,this.mdcAdapter=null,this.mdcFoundationClass=ld,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=Ka(this.layout.bind(this));this.debouncedLayout=function(){var c=!(0<arguments.length&&arguments[0]!==void 0)||arguments[0];La.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)td(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(!Ia(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(K||(K=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,sd(a),sd(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(L||(L=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=td(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(Uc(d)&&td(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:()=>Yc(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=Xc();if(!a.length)return-1;for(var b,c=a.length-1;0<=c;c--)if(b=a[c],td(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()}}Ja([Da({type:String})],ud.prototype,"emptyMessage",void 0),Ja([Fa(".mdc-deprecated-list")],ud.prototype,"mdcRoot",void 0),Ja([Ga("",!0,"*")],ud.prototype,"assignedElements",void 0),Ja([Ga("",!0,"[tabindex=\"0\"]")],ud.prototype,"tabbableElements",void 0),Ja([Da({type:Boolean}),_c(function(a){this.mdcFoundation&&this.mdcFoundation.setUseActivatedClass(a)})],ud.prototype,"activatable",void 0),Ja([Da({type:Boolean}),_c(function(a,b){this.mdcFoundation&&this.mdcFoundation.setMulti(a),b!==void 0&&this.layout()})],ud.prototype,"multi",void 0),Ja([Da({type:Boolean}),_c(function(a){this.mdcFoundation&&this.mdcFoundation.setWrapFocus(a)})],ud.prototype,"wrapFocus",void 0),Ja([Da({type:String}),_c(function(a,b){b!==void 0&&this.updateItems()})],ud.prototype,"itemRoles",void 0),Ja([Da({type:String})],ud.prototype,"innerRole",void 0),Ja([Da({type:String})],ud.prototype,"innerAriaLabel",void 0),Ja([Da({type:Boolean})],ud.prototype,"rootTabbable",void 0),Ja([Da({type:Boolean,reflect:!0}),_c(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)})],ud.prototype,"noninteractive",void 0);var vd=Xa(O||(O=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 wd{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 xd extends Eb{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 wd(()=>(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(P||(P=j([""]))),c=this.hasMeta?this.renderMeta():g(Q||(Q=j([""])));return g(R||(R=j(["\n ","\n ","\n ","\n ",""])),this.renderRipple(),b,a,c)}renderRipple(){return this.shouldRenderRipple?g(S||(S=j(["\n <mwc-ripple\n .activated=",">\n </mwc-ripple>"])),this.activated):this.activated?g(T||(T=j(["<div class=\"fake-activated-ripple\"></div>"]))):""}renderGraphic(){var a={multi:this.multipleGraphics};return g(U||(U=j(["\n <span class=\"mdc-deprecated-list-item__graphic material-icons ","\">\n <slot name=\"graphic\"></slot>\n </span>"])),Jb(a))}renderMeta(){return g(V||(V=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(W||(W=j(["\n <span class=\"mdc-deprecated-list-item__text\">\n ","\n </span>"])),a)}renderSingleLine(){return g(X||(X=j(["<slot></slot>"])))}renderTwoline(){return g(Y||(Y=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)}}Ja([Fa("slot")],xd.prototype,"slotElement",void 0),Ja([function(a){return bd({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")],xd.prototype,"ripple",void 0),Ja([Da({type:String})],xd.prototype,"value",void 0),Ja([Da({type:String,reflect:!0})],xd.prototype,"group",void 0),Ja([Da({type:Number,reflect:!0})],xd.prototype,"tabindex",void 0),Ja([Da({type:Boolean,reflect:!0}),_c(function(a){a?this.setAttribute("aria-disabled","true"):this.setAttribute("aria-disabled","false")})],xd.prototype,"disabled",void 0),Ja([Da({type:Boolean,reflect:!0})],xd.prototype,"twoline",void 0),Ja([Da({type:Boolean,reflect:!0})],xd.prototype,"activated",void 0),Ja([Da({type:String,reflect:!0})],xd.prototype,"graphic",void 0),Ja([Da({type:Boolean})],xd.prototype,"multipleGraphics",void 0),Ja([Da({type:Boolean})],xd.prototype,"hasMeta",void 0),Ja([Da({type:Boolean,reflect:!0}),_c(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","")})],xd.prototype,"noninteractive",void 0),Ja([Da({type:Boolean,reflect:!0}),_c(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"))})],xd.prototype,"selected",void 0),Ja([Ea()],xd.prototype,"shouldRenderRipple",void 0),Ja([Ea()],xd.prototype,"_managingList",void 0);var yd=Xa(Z||(Z=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}"]))),zd=function(a,c){return zd=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])},zd(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={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"},Cd={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"},Dd={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300},Ed=["touchstart","pointerdown","mousedown","keydown"],Fd=["touchend","pointerup","mouseup","contextmenu"],Gd=[],Hd=function(a){function b(c){var d=a.call(this,Ad(Ad({},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 Oa(b,a),Object.defineProperty(b,"cssClasses",{get:function(){return Bd},enumerable:!1,configurable:!0}),Object.defineProperty(b,"strings",{get:function(){return Cd},enumerable:!1,configurable:!0}),Object.defineProperty(b,"numbers",{get:function(){return Dd},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=Pa(Ed),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=Pa(Fd),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=Pa(Ed),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=Pa(Fd),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<Gd.length&&Gd.some(function(a){return b.adapter.containsEventTarget(a)});return f?void this.resetActivationState():void(void 0!==a&&(Gd.push(a.target),this.registerDeactivationHandlers(a)),c.wasElementMadeActive=this.checkElementMadeActive(a),c.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame(function(){Gd=[],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?Qa(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)},Dd.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=Ad({},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:va(this.frame.width/2-this.initialSize/2),top:va(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(d,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(e,this.unboundedCoords.top+"px"))},b}(Gc);class Id extends Zc{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=Hd}get isActive(){return Na(this.parentElement||this,":active")}createAdapter(){return{browserSupportsCssVars:()=>!0,isUnbounded:()=>this.unbounded,isSurfaceActive:()=>this.isActive,isSurfaceDisabled:()=>this.disabled,addClass:a=>{"mdc-ripple-upgraded--background-focused"===a?this.bgFocused=!0:"mdc-ripple-upgraded--foreground-activation"===a?this.fgActivation=!0:"mdc-ripple-upgraded--foreground-deactivation"===a?this.fgDeactivation=!0:void 0},removeClass:a=>{"mdc-ripple-upgraded--background-focused"===a?this.bgFocused=!1:"mdc-ripple-upgraded--foreground-activation"===a?this.fgActivation=!1:"mdc-ripple-upgraded--foreground-deactivation"===a?this.fgDeactivation=!1:void 0},containsEventTarget:()=>!0,registerInteractionHandler:()=>void 0,deregisterInteractionHandler:()=>void 0,registerDocumentInteractionHandler:()=>void 0,deregisterDocumentInteractionHandler:()=>void 0,registerResizeHandler:()=>void 0,deregisterResizeHandler:()=>void 0,updateCssVariable:(a,b)=>{"--mdc-ripple-fg-scale"===a?this.fgScale=b:"--mdc-ripple-fg-size"===a?this.fgSize=b:"--mdc-ripple-fg-translate-end"===a?this.translateEnd=b:"--mdc-ripple-fg-translate-start"===a?this.translateStart=b:"--mdc-ripple-left"===a?this.leftPos=b:"--mdc-ripple-top"===a?this.topPos=b:void 0},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(_||(_=j(["\n <div class=\"mdc-ripple-surface mdc-ripple-upgraded ","\"\n style=\"","\"></div>"])),Jb(c),Kb({"--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}))}}Ma([Fa(".mdc-ripple-surface")],Id.prototype,"mdcRoot",void 0),Ma([Da({type:Boolean})],Id.prototype,"primary",void 0),Ma([Da({type:Boolean})],Id.prototype,"accent",void 0),Ma([Da({type:Boolean})],Id.prototype,"unbounded",void 0),Ma([Da({type:Boolean})],Id.prototype,"disabled",void 0),Ma([Da({type:Boolean})],Id.prototype,"activated",void 0),Ma([Da({type:Boolean})],Id.prototype,"selected",void 0),Ma([Da({type:Boolean})],Id.prototype,"internalUseStateLayerCustomProperties",void 0),Ma([Ea()],Id.prototype,"hovering",void 0),Ma([Ea()],Id.prototype,"bgFocused",void 0),Ma([Ea()],Id.prototype,"fgActivation",void 0),Ma([Ea()],Id.prototype,"fgDeactivation",void 0),Ma([Ea()],Id.prototype,"fgScale",void 0),Ma([Ea()],Id.prototype,"fgSize",void 0),Ma([Ea()],Id.prototype,"translateStart",void 0),Ma([Ea()],Id.prototype,"translateEnd",void 0),Ma([Ea()],Id.prototype,"leftPos",void 0),Ma([Ea()],Id.prototype,"topPos",void 0);var Jd=Xa(aa||(aa=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 Kd extends xa(Id){static get defineId(){return"mwc-ripple"}static get elementDefinitions(){return sc([],Kd)}static get styles(){return Jd}}class Ld extends xa(xd){static get defineId(){return"mwc-list-item"}static get elementDefinitions(){return sc([Kd],Ld)}static get styles(){return yd}}class Md extends xa(ud){static get defineId(){return"mwc-list"}static get elementDefinitions(){return sc([Ld],Md)}static get styles(){return vd}}class Nd extends xa(md){static get defineId(){return"mwc-menu"}static get elementDefinitions(){return sc([rd,Md],Nd)}static get styles(){return nd}}class Od extends xa(Eb){static get defineId(){return"mh-dropdown-base"}static get elementDefinitions(){return sc([tc("ha-icon"),tc("ha-icon-button"),Nd,Ld],Od)}static get properties(){return{items:[],label:String,selected:String,icon:String,active:Boolean,disabled:Boolean}}get selectedId(){return this.items.map(a=>a.id.toString().toUpperCase()).indexOf(this.selected.toString().toUpperCase())}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(ba||(ba=j(["\n <div class='mh-dropdown'>\n <ha-icon-button class='mh-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(ca||(ca=j(["\n <mwc-list-item value="," ?selected=",">\n <span class='mh-dropdown__item__label'>","</span>\n </mwc-list-item>"])),a.id||a.name,this.selected===a.id,a.name)))}static get styles(){return[Mb,Xa(da||(da=j(["\n :host {\n position: relative;\n overflow: hidden;\n }\n .mh-dropdown\n :host([disabled]) {\n opacity: .25;\n pointer-events: none;\n }\n :host([faded]) {\n opacity: .75;\n }\n .mh-dropdown {\n padding: 0;\n }\n ha-icon-button[disabled] {\n opacity: .25;\n pointer-events: none;\n }\n .mh-dropdown__button.icon {\n margin: 0;\n }\n ha-icon-button {\n width: calc(var(--mh-dropdown-unit));\n height: calc(var(--mh-dropdown-unit));\n --mdc-icon-button-size: calc(var(--mh-dropdown-unit));\n }\n mwc-item > *:nth-child(2) {\n margin-left: 4px;\n }\n .mh-dropdown[focused] ha-icon-button {\n color: var(--mh-accent-color);\n }\n .mh-dropdown[focused] ha-icon-button[focused] {\n color: var(--mh-text-color);\n transform: rotate(0deg);\n }\n "])))]}}class Pd extends xa(Eb){static get defineId(){return"mh-dropdown"}static get elementDefinitions(){return sc([Od],Pd)}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),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 clearTimeout(this.timer),g(ea||(ea=j(["\n <mh-dropdown-base\n style=","\n @change=","\n .items=","\n .icon=","\n .disabled=\"","\"\n .active=","\n .selected=",">\n </mh-dropdown-base>\n "])),Kb(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():"",clearTimeout(this.timer),this.requestUpdate("_state"))}static get styles(){return[Mb,Xa(fa||(fa=j(["\n :host {\n position: relative;\n box-sizing: border-box;\n margin: 0;\n overflow: hidden;\n transition: background .5s;\n --mh-dropdown-unit: var(--mh-unit);\n }\n :host([color]) {\n background: var(--mh-active-color);\n transition: background .25s;\n opacity: 1;\n }\n :host([disabled]) {\n opacity: .25;\n pointer-events: none;\n }\n "])))]}}class Qd extends xa(Eb){static get defineId(){return"mh-buttons"}static get elementDefinitions(){return sc([Pd,vc],Qd)}static get properties(){return{buttons:{}}}renderButton(a){return a.isUnavailable?"":g(ga||(ga=j(["\n <mh-button\n class=\"custom-button\"\n .button=",">\n </mh-button>\n "])),a)}renderDropdown(a){return g(ha||(ha=j(["\n <mh-dropdown\n .dropdown=",">\n </mh-dropdown>\n "])),a)}renderInternal(a){return"dropdown"===a.type?this.renderDropdown(a):this.renderButton(a)}render(){var a=this;return g(ia||(ia=j(["",""])),Object.entries(this.buttons).map(a=>a[1]).filter(a=>!a.hide).sort((c,a)=>c.order>a.order?1:a.order>c.order?-1:0).map(b=>a.renderInternal(b)))}static get styles(){return[Mb,Xa(ja||(ja=j(["\n :host {\n position: relative;\n box-sizing: border-box;\n margin: 0;\n overflow: hidden;\n transition: background .5s;\n --mh-dropdown-unit: var(--mh-unit);\n }\n :host([color]) {\n background: var(--mh-active-color);\n transition: background .25s;\n opacity: 1;\n }\n :host([disabled]) {\n opacity: .25;\n pointer-events: none;\n }\n "])))]}}class Rd extends xa(Eb){static get elementDefinitions(){return sc([tc("ha-card"),tc("ha-icon"),tc("ha-relative-time"),uc,wc,xc,tc("ha-icon-button"),Qd],Rd)}constructor(){super(),this.initial=!0,this.toggle=!1,this.indicators={},this.buttons={},this.targetHumidity={},this.power={},this.config={},this.updateIndicatorsTimer=void 0,this.updateButtonsTimer=void 0}static get properties(){return{config:{},entity:{},humidifier:{},initial:Boolean,toggle:Boolean}}static get styles(){return[Mb,Lb]}set hass(a){if(a){var b=a.states[this.config.entity],c=!1;this._hass=a,b&&(!this.humidifier||this.humidifier.changed(b))&&(this.entity=b,this.humidifier=new ac(a,this.config,b),c=!0),this.humidifier&&(this.updateIndicators(c),this.updateButtons(c),this.updateTargetHumidity(c),this.updatePower(c))}}get hass(){return this._hass}get name(){return this.config.name||this.humidifier.name}evalEntityId(a){if(a){var b=this.config.entity&&this.config.entity.split(".")[1].toLowerCase();return a.replaceAll("{entity_id}",b)}return a}updateIndicators(a){for(var b=this,c={},d=!1,e=0;e<this.config.indicators.length;e+=1){var f=this.config.indicators[e],{id:g}=f,h=this.evalEntityId(f.source.entity||this.humidifier.id),i=this.hass.states[h];i&&(c[g]=new Yb(i,f,this.humidifier,this.hass)),this.indicators[g]&&this.indicators[g].changed(i)&&(d=!0)}(d||a)&&(this.indicators=c,clearTimeout(this.updateIndicatorsTimer),this.updateIndicatorsTimer=setTimeout(o(function*(){return b.requestUpdate("indicators")}),500))}updateButtons(a){for(var b=this,c={},d=!1,e=0;e<this.config.buttons.length;e+=1){var f=this.config.buttons[e],{id:g}=f,h=this.evalEntityId(f.state&&f.state.entity||this.humidifier.id),i=this.hass.states[h];i&&(c[g]=new Zb(i,f,this.humidifier,this.hass)),this.buttons[g]&&this.buttons[g].changed(i)&&(d=!0)}(d||a)&&(this.buttons=c,clearTimeout(this.updateButtonsTimer),this.updateButtonsTimer=setTimeout(o(function*(){return b.requestUpdate("buttons")}),500))}updatePower(a){var b=this.config.power,c=this.evalEntityId(b.state&&b.state.entity||this.humidifier.id),d=this.hass.states[c],e=d?new Zb(d,b,this.humidifier,this.hass):{};(d!==(this.power&&this.power.entity)||a)&&(this.power=e)}updateTargetHumidity(a){var b=this.evalEntityId(this.config.target_humidity.state&&this.config.target_humidity.state.entity||this.config.entity),c=this.hass.states[b],d=new $b(c,this.config,this.humidifier);(this.targetHumidity.value!==d.value||a)&&(this.targetHumidity=d)}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=Ub,e.localize=(a,b)=>{var c=this.hass.selectedLanguage||this.hass.language||"en";return rc(a,c,b)},d.source.mapper&&(d.functions.mapper=Xb(d.source.mapper,e)),"object"==typeof d.icon&&(d.functions.icon={},d.icon.template&&(d.functions.icon.template=Xb(d.icon.template,e)),d.icon.style&&(d.functions.icon.style=Xb(d.icon.style,e))),"object"==typeof d.unit&&(d.functions.unit={},d.unit.template&&(d.functions.unit.template=Xb(d.unit.template,e))),d}getIndicatorsConfig(a,b){for(var c=b||{},d=Object.entries(a.indicators||{}),e=0;e<d.length;e+=1){var f=d[e][0],g=d[e][1]||{};c[f]=l(l({},c[f]||{}),g)}return Object.entries(c).map(b=>this.getIndicatorConfig(b[0],b[1],a)).filter(a=>!a.hide)}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=Ub,d.localize=(a,b)=>{var c=this.hass.selectedLanguage||this.hass.language||"en";return rc(a,c,b)},c.disabled&&(c.functions.disabled=Xb(c.disabled,d)),c.state&&c.state.mapper&&(c.functions.state={mapper:Xb(c.state.mapper,d)}),c.active&&(c.functions.active=Xb(c.active,d)),c.source&&c.source.__init&&(c.functions.source={__init:Xb(c.source.__init,d)}),c.source&&c.source.__filter&&(c.functions.source=c.functions.source||{},c.functions.source.filter=Xb(c.source.__filter,d)),c.toggle_action&&(c.functions.toggle_action=Xb(c.toggle_action,d)),c.change_action&&(c.functions.change_action=Xb(c.change_action,d)),c.style&&(c.functions.style=Xb(c.style,d)),c}getButtonsConfig(a,b){for(var c=l({},b||{}),d=Object.entries(a.buttons||{}),e=0;e<d.length;e+=1){var f=d[e][0],g=d[e][1]||{};c[f]=l(l({},c[f]||{}),g)}for(var h=Object.entries(c),i=[],j=0;j<h.length;j+=1){var k=h[j][0],m=h[j][1],n=this.getButtonConfig(m,a);n.id=k,"order"in n||(n.order=j+1),i.push(n)}return i}getTargetHumidityConfig(a,b){var c=l(l({},b||{}),a.target_humidity||{});c.functions={icon:{}};var d=l({},a.target_humidity||{});return d.call_service=(a,b,c)=>this.hass.callService(a,b,c),d.entity_config=a,d.toggle_state=Ub,d.localize=(a,b)=>{var c=this.hass.selectedLanguage||this.hass.language||"en";return rc(a,c,b)},c.disabled&&(c.functions.disabled=Xb(c.disabled,d)),"object"==typeof c.icon&&(c.icon.template&&(c.functions.icon.template=Xb(c.icon.template,d)),c.icon.style&&(c.functions.icon.style=Xb(c.icon.style,d))),c.change_action&&(c.functions.change_action=Xb(c.change_action,d)),c.state&&c.state.mapper&&(c.functions.state={mapper:Xb(c.state.mapper,d)}),"object"==typeof c.unit&&(c.functions.unit={},c.unit.template&&(c.functions.unit.template=Xb(c.unit.template,d))),c}getPowerConfig(a,b){return this.getButtonConfig(l(l({},b||{}),a.power||{}),a)}setConfig(a){var b=a.entity&&a.entity.split(".")[0].toLowerCase();if(!1===Tb.includes(b))throw new Error("Specify an entity from within ".concat(Tb.join(" ,")," domains."));var c,{model:d}=a;c=d in ec?ec[d]():ec.default(),this.config=l({model:"zhimi.humidifier.cb1",tap_action:{action:"more-info",navigation_path:"",url:"",entity:"",service:"",service_data:{}}},a),this.config.toggle=l({icon:Ob.TOGGLE,hide:!1,default:!1},a.toggle||{}),this.config.power=this.getPowerConfig(a,c.power),this.config.target_humidity=this.getTargetHumidityConfig(a,c.target_humidity),this.config.indicators=this.getIndicatorsConfig(a,c.indicators),this.config.buttons=this.getButtonsConfig(a,c.buttons),this.config.secondary_info="string"==typeof a.secondary_info?{type:a.secondary_info}:l({type:"mode"},a.secondary_info||{}),this.toggle=this.config.toggle.default}render(){var a=this.config.target_humidity.hide?"full":"";return g(ka||(ka=j(["\n <ha-card\n class=","\n style=",">\n <div class='mh__bg'>\n </div>\n <div class='mh-humidifier'>\n <div class='mh-humidifier__core flex'>\n ","\n <div class='entity__info'>\n <div class=\"wrap\">\n <div class=\"entity__info__name_wrap ","\" \n @click=",">\n ","\n </div>\n <div class=\"ctl-wrap\">\n ","\n ","\n ","\n </div>\n </div>\n ","\n </div>\n </div>\n ","\n </div>\n </ha-card>\n "])),this.computeClasses(),this.computeStyles(),this.renderIcon(),a,a=>this.handlePopup(a),this.renderEntityName(),this.renderUnavailable(),this.renderTargetHumidifier(),this.renderPower(),this.renderBottomPanel(),this.renderTogglePanel())}renderTargetHumidifier(){return this.humidifier.isUnavailable||this.targetHumidity.hide?"":g(la||(la=j(["\n <mh-target-humidity\n .targetHumidity=",">\n </mh-target-humidity>\n "])),this.targetHumidity)}renderPower(){return this.humidifier.isUnavailable||this.power.hide?"":g(ma||(ma=j(["\n <mh-power\n .power=",">\n </mh-power>\n "])),this.power)}renderUnavailable(){return this.humidifier.isUnavailable?g(na||(na=j(["\n <span class=\"label unavailable ellipsis\"> \n ","\n </span>\n "])),bc(this.hass,"state.default.unavailable","Unavailable")):""}handlePopup(a){a.stopPropagation(),Nb(this,this.hass,this.config.tap_action,this.humidifier.id)}handleToggle(a){a.stopPropagation(),this.toggle=!this.toggle}renderIcon(){var a=this.humidifier.isActive;return g(oa||(oa=j(["\n <div class='entity__icon' ?color=",">\n <ha-icon .icon="," ></ha-icon>\n </div>"])),a,this.computeIcon())}renderTogglePanel(){return this.toggle?g(pa||(pa=j(["\n <div class=\"mh-toggle_content\">\n <mh-buttons\n .buttons=",">\n </mh-buttons>\n </div>\n "])),this.buttons):""}renderBottomPanel(){return this.humidifier.isUnavailable?"":g(qa||(qa=j(["\n <div class='bottom flex'>\n <mh-indicators\n .indicators=",">\n </mh-indicators>\n ","\n </div>\n "])),this.indicators,this.renderToggleButton())}renderToggleButton(){if(0===this.config.buttons.filter(a=>!a.hide).length)return"";if(this.config.toggle.hide)return"";var a=this.toggle?"open":"";return g(ra||(ra=j(["\n <ha-icon-button class='toggle-button ","'\n @click=",">\n <ha-icon icon=\"","\"></ha-icon>\n </ha-icon-button>\n "])),a,a=>this.handleToggle(a),this.config.toggle.icon)}renderEntityName(){return g(sa||(sa=j(["\n <div class='entity__info__name'>\n ","\n </div>\n ","\n "])),this.name,this.renderSecondaryInfo())}renderSecondaryInfo(){if(this.humidifier.isUnavailable)return"";if(this.config.secondary_info.hide)return"";if("last-changed"===this.config.secondary_info.type)return g(ta||(ta=j(["\n <div class='entity__secondary_info ellipsis'>\n <ha-relative-time\n .hass=","\n .datetime=",">\n </ha-relative-time>\n </div>\n "])),this.hass,this.entity.last_changed);var{mode:a}=this.buttons,{selected:b}=a,c=b?b.name:a.state,d=this.config.secondary_info.icon?this.config.secondary_info.icon:a.icon;return g(ua||(ua=j(["\n <div class='entity__secondary_info ellipsis'>\n <ha-icon class='entity__secondary_info_icon' .icon=","></ha-icon>\n <span class='entity__secondary_info__name'>","</span>\n </div>\n "])),d,c)}computeIcon(){return this.config.icon?this.config.icon:this.humidifier.icon||Ob.DEFAULT}computeClasses(){var{config:a}=0<arguments.length&&arguments[0]!==void 0?arguments[0]:this;return Jb({"--initial":this.initial,"--collapse":a.collapse,"--group":a.group,"--more-info":"none"!==a.tap_action,"--inactive":!this.humidifier.isActive,"--unavailable":this.humidifier.isUnavailable})}computeStyles(){var{scale:a}=this.config;return Kb(l({},a&&{"--mh-unit":"".concat(40*a,"px")}))}}customElements.define("mini-humidifier",Rd)})})();
@regevbr
Copy link
Author

regevbr commented Mar 7, 2022

Steps:

in /config/www/community/mini-humidifier:

  • delete the .gz file
  • replace the contents of mini-humidifier-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

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