From c87939fd89c3e5344715c52be21ac6d5c40d4b8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Lov=C3=A9n?= Date: Sun, 31 Dec 2023 00:15:28 +0000 Subject: [PATCH] Version 3.4.1 --- card-mod.js | 2 +- package-lock.json | 4 ++-- package.json | 2 +- src/card-mod.ts | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/card-mod.js b/card-mod.js index 3f2262f..33b158f 100644 --- a/card-mod.js +++ b/card-mod.js @@ -1 +1 @@ -var t,e,n,r,i,o,a,s;function u(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function l(t){for(var e=1;e=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:T(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function y(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function m(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){y(o,r,i,a,s,"next",t)}function s(t){y(o,r,i,a,s,"throw",t)}a(void 0)}))}}function g(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&E(t,e)}function b(t){var e=x();return function(){var n,r=$(t);if(e){var i=$(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===M(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _(t)}(this,n)}}function _(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function w(t){var e="function"==typeof Map?new Map:void 0;return w=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return k(t,arguments,$(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),E(n,t)},w(t)}function k(t,e,n){return k=x()?Reflect.construct.bind():function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&E(i,n.prototype),i},k.apply(null,arguments)}function x(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function E(t,e){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},E(t,e)}function $(t){return $=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$(t)}function A(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=S(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function S(t,e){if(t){if("string"==typeof t)return O(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O(t,e):void 0}}function O(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}"function"==typeof SuppressedError&&SuppressedError;var R=globalThis,L=R.ShadowRoot&&(void 0===R.ShadyCSS||R.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,U=Symbol(),D=new WeakMap,H=function(){function t(e,n,r){if(P(this,t),this._$cssResult$=!0,r!==U)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=n}return j(t,[{key:"styleSheet",get:function(){var t=this.o,e=this.t;if(L&&void 0===t){var n=void 0!==e&&1===e.length;n&&(t=D.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&D.set(e,t))}return t}},{key:"toString",value:function(){return this.cssText}}]),t}(),I=L?function(t){return t}:function(t){return t instanceof CSSStyleSheet?function(t){var e,n="",r=A(t.cssRules);try{for(r.s();!(e=r.n()).done;){n+=e.value.cssText}}catch(t){r.e(t)}finally{r.f()}return function(t){return new H("string"==typeof t?t:t+"",void 0,U)}(n)}(t):t},z=Object.is,q=Object.defineProperty,B=Object.getOwnPropertyDescriptor,V=Object.getOwnPropertyNames,J=Object.getOwnPropertySymbols,W=Object.getPrototypeOf,G=globalThis,F=G.trustedTypes,Y=F?F.emptyScript:"",K=G.reactiveElementPolyfillSupport,Z=function(t,e){return t},Q={toAttribute:function(t,e){switch(e){case Boolean:t=t?Y:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute:function(t,e){var n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},X=function(t,e){return!z(t,e)},tt={attribute:!0,type:String,converter:Q,reflect:!1,hasChanged:X};null!==(t=Symbol.metadata)&&void 0!==t||(Symbol.metadata=Symbol("metadata")),null!==(e=G.litPropertyMetadata)&&void 0!==e||(G.litPropertyMetadata=new WeakMap);var et=function(t){g(r,w(HTMLElement));var e,n=b(r);function r(){var t;return P(this,r),(t=n.call(this))._$Ep=void 0,t.isUpdatePending=!1,t.hasUpdated=!1,t._$Em=null,t._$Ev(),t}return j(r,[{key:"_$Ev",value:function(){var t,e=this;this._$Eg=new Promise((function(t){return e.enableUpdating=t})),this._$AL=new Map,this._$ES(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((function(t){return t(e)}))}},{key:"addController",value:function(t){var e,n;(null!==(e=this._$E_)&&void 0!==e?e:this._$E_=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&(null===(n=t.hostConnected)||void 0===n||n.call(t))}},{key:"removeController",value:function(t){var e;null===(e=this._$E_)||void 0===e||e.delete(t)}},{key:"_$ES",value:function(){var t,e=new Map,n=A(this.constructor.elementProperties.keys());try{for(n.s();!(t=n.n()).done;){var r=t.value;this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r])}}catch(t){n.e(t)}finally{n.f()}e.size>0&&(this._$Ep=e)}},{key:"createRenderRoot",value:function(){var t,e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return function(t,e){if(L)t.adoptedStyleSheets=e.map((function(t){return t instanceof CSSStyleSheet?t:t.styleSheet}));else{var n,r=A(e);try{for(r.s();!(n=r.n()).done;){var i=n.value,o=document.createElement("style"),a=R.litNonce;void 0!==a&&o.setAttribute("nonce",a),o.textContent=i.cssText,t.appendChild(o)}}catch(t){r.e(t)}finally{r.f()}}}(e,this.constructor.elementStyles),e}},{key:"connectedCallback",value:function(){var t,e;null!==(t=this.renderRoot)&&void 0!==t||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$E_)||void 0===e||e.forEach((function(t){var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}},{key:"enableUpdating",value:function(t){}},{key:"disconnectedCallback",value:function(){var t;null===(t=this._$E_)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}},{key:"attributeChangedCallback",value:function(t,e,n){this._$AK(t,n)}},{key:"_$EO",value:function(t,e){var n=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,n);if(void 0!==r&&!0===n.reflect){var i,o=(void 0!==(null===(i=n.converter)||void 0===i?void 0:i.toAttribute)?n.converter:Q).toAttribute(e,n.type);this._$Em=t,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}},{key:"_$AK",value:function(t,e){var n=this.constructor,r=n._$Eh.get(t);if(void 0!==r&&this._$Em!==r){var i,o=n.getPropertyOptions(r),a="function"==typeof o.converter?{fromAttribute:o.converter}:void 0!==(null===(i=o.converter)||void 0===i?void 0:i.fromAttribute)?o.converter:Q;this._$Em=r,this[r]=a.fromAttribute(e,o.type),this._$Em=null}}},{key:"requestUpdate",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4?arguments[4]:void 0;if(void 0!==t){var o,a;if(null!==(o=n)&&void 0!==o||(n=this.constructor.getPropertyOptions(t)),!(null!==(a=n.hasChanged)&&void 0!==a?a:X)(r?i:this[t],e))return;this.C(t,e,n)}!1===this.isUpdatePending&&(this._$Eg=this._$EP())}},{key:"C",value:function(t,e,n){var r;this._$AL.has(t)||this._$AL.set(t,e),!0===n.reflect&&this._$Em!==t&&(null!==(r=this._$Ej)&&void 0!==r?r:this._$Ej=new Set).add(t)}},{key:"_$EP",value:(e=m(v().mark((function t(){var e;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.isUpdatePending=!0,t.prev=1,t.next=4,this._$Eg;case 4:t.next=9;break;case 6:t.prev=6,t.t0=t.catch(1),Promise.reject(t.t0);case 9:if(e=this.scheduleUpdate(),t.t1=null!=e,!t.t1){t.next=14;break}return t.next=14,e;case 14:return t.abrupt("return",!this.isUpdatePending);case 15:case"end":return t.stop()}}),t,this,[[1,6]])}))),function(){return e.apply(this,arguments)})},{key:"scheduleUpdate",value:function(){return this.performUpdate()}},{key:"performUpdate",value:function(){if(this.isUpdatePending){if(!this.hasUpdated){var t;if(null!==(t=this.renderRoot)&&void 0!==t||(this.renderRoot=this.createRenderRoot()),this._$Ep){var e,n=A(this._$Ep);try{for(n.s();!(e=n.n()).done;){var r=p(e.value,2),i=r[0],o=r[1];this[i]=o}}catch(t){n.e(t)}finally{n.f()}this._$Ep=void 0}var a=this.constructor.elementProperties;if(a.size>0){var s,u=A(a);try{for(u.s();!(s=u.n()).done;){var c=p(s.value,2),l=c[0],d=c[1];!0!==d.wrapped||this._$AL.has(l)||void 0===this[l]||this.C(l,this[l],d)}}catch(t){u.e(t)}finally{u.f()}}}var h=!1,f=this._$AL;try{var v;(h=this.shouldUpdate(f))?(this.willUpdate(f),null!==(v=this._$E_)&&void 0!==v&&v.forEach((function(t){var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(f)):this._$ET()}catch(f){throw h=!1,this._$ET(),f}h&&this._$AE(f)}}},{key:"willUpdate",value:function(t){}},{key:"_$AE",value:function(t){var e;null!==(e=this._$E_)&&void 0!==e&&e.forEach((function(t){var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}},{key:"_$ET",value:function(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function(){return this._$Eg}},{key:"shouldUpdate",value:function(t){return!0}},{key:"update",value:function(t){var e=this;this._$Ej&&(this._$Ej=this._$Ej.forEach((function(t){return e._$EO(t,e[t])}))),this._$ET()}},{key:"updated",value:function(t){}},{key:"firstUpdated",value:function(t){}}],[{key:"addInitializer",value:function(t){var e;this._$Ei(),(null!==(e=this.l)&&void 0!==e?e:this.l=[]).push(t)}},{key:"observedAttributes",get:function(){return this.finalize(),this._$Eh&&f(this._$Eh.keys())}},{key:"createProperty",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tt;if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){var n=Symbol(),r=this.getPropertyDescriptor(t,n,e);void 0!==r&&q(this.prototype,t,r)}}},{key:"getPropertyDescriptor",value:function(t,e,n){var r,i=null!==(r=B(this.prototype,t))&&void 0!==r?r:{get:function(){return this[e]},set:function(t){this[e]=t}},o=i.get,a=i.set;return{get:function(){return null==o?void 0:o.call(this)},set:function(e){var r=null==o?void 0:o.call(this);a.call(this,e),this.requestUpdate(t,r,n)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(t){var e;return null!==(e=this.elementProperties.get(t))&&void 0!==e?e:tt}},{key:"_$Ei",value:function(){if(!this.hasOwnProperty(Z("elementProperties"))){var t=W(this);t.finalize(),void 0!==t.l&&(this.l=f(t.l)),this.elementProperties=new Map(t.elementProperties)}}},{key:"finalize",value:function(){if(!this.hasOwnProperty(Z("finalized"))){if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Z("properties"))){var t,e=this.properties,n=A([].concat(f(V(e)),f(J(e))));try{for(n.s();!(t=n.n()).done;){var r=t.value;this.createProperty(r,e[r])}}catch(t){n.e(t)}finally{n.f()}}var i=this[Symbol.metadata];if(null!==i){var o=litPropertyMetadata.get(i);if(void 0!==o){var a,s=A(o);try{for(s.s();!(a=s.n()).done;){var u=p(a.value,2),c=u[0],l=u[1];this.elementProperties.set(c,l)}}catch(t){s.e(t)}finally{s.f()}}}this._$Eh=new Map;var d,h=A(this.elementProperties);try{for(h.s();!(d=h.n()).done;){var v=p(d.value,2),y=v[0],m=v[1],g=this._$Eu(y,m);void 0!==g&&this._$Eh.set(g,y)}}catch(t){h.e(t)}finally{h.f()}this.elementStyles=this.finalizeStyles(this.styles)}}},{key:"finalizeStyles",value:function(t){var e=[];if(Array.isArray(t)){var n,r=A(new Set(t.flat(1/0).reverse()));try{for(r.s();!(n=r.n()).done;){var i=n.value;e.unshift(I(i))}}catch(t){r.e(t)}finally{r.f()}}else void 0!==t&&e.push(I(t));return e}},{key:"_$Eu",value:function(t,e){var n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}}]),r}();et.elementStyles=[],et.shadowRootOptions={mode:"open"},et[Z("elementProperties")]=new Map,et[Z("finalized")]=new Map,null!=K&&K({ReactiveElement:et}),(null!==(n=G.reactiveElementVersions)&&void 0!==n?n:G.reactiveElementVersions=[]).push("2.0.2");var nt=globalThis,rt=nt.trustedTypes,it=rt?rt.createPolicy("lit-html",{createHTML:function(t){return t}}):void 0,ot="$lit$",at="lit$".concat((Math.random()+"").slice(9),"$"),st="?"+at,ut="<".concat(st,">"),ct=document,lt=function(){return ct.createComment("")},dt=function(t){return null===t||"object"!=M(t)&&"function"!=typeof t},ht=Array.isArray,ft="[ \t\n\f\r]",pt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,vt=/-->/g,yt=/>/g,mt=RegExp(">|".concat(ft,"(?:([^\\s\"'>=/]+)(").concat(ft,"*=").concat(ft,"*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)"),"g"),gt=/'/g,bt=/"/g,_t=/^(?:script|style|textarea|title)$/i,wt=function(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i":"",a=pt,s=0;s"===l[0]?(a=null!==(f=n)&&void 0!==f?f:pt,d=-1):void 0===l[1]?d=-2:(d=a.lastIndex-l[2].length,c=l[1],a=void 0===l[3]?mt:'"'===l[3]?bt:gt):a===bt||a===gt?a=mt:a===vt||a===yt?a=pt:(a=mt,n=void 0)}var p=a===mt&&t[s+1].startsWith("/>")?" ":"";o+=a===pt?u+ut:d>=0?(i.push(c),u.slice(0,d)+ot+u.slice(d)+at+p):u+at+(-2===d?s:p)}return[At(t,o+(t[r]||"")+(2===e?"":"")),i]},Ot=function(){function t(e,n){var r,i=e.strings,o=e._$litType$;P(this,t),this.parts=[];var a=0,s=0,u=i.length-1,c=this.parts,l=p(St(i,o),2),d=l[0],h=l[1];if(this.el=t.createElement(d,n),$t.currentNode=this.el.content,2===o){var v=this.el.content.firstChild;v.replaceWith.apply(v,f(v.childNodes))}for(;null!==(r=$t.nextNode())&&c.length0){r.textContent=rt?rt.emptyScript:"";for(var E=0;E2&&void 0!==arguments[2]?arguments[2]:t,u=arguments.length>3?arguments[3]:void 0;if(e===kt)return e;var c=void 0!==u?null===(n=s._$Co)||void 0===n?void 0:n[u]:s._$Cl,l=dt(e)?void 0:e._$litDirective$;return(null===(r=c)||void 0===r?void 0:r.constructor)!==l&&(null!==(i=c)&&void 0!==i&&null!==(o=i._$AO)&&void 0!==o&&o.call(i,!1),void 0===l?c=void 0:(c=new l(t))._$AT(t,s,u),void 0!==u?(null!==(a=s._$Co)&&void 0!==a?a:s._$Co=[])[u]=c:s._$Cl=c),void 0!==c&&(e=Pt(t,c._$AS(t,e.values),c,u)),e}var Ct=function(){function t(e,n){P(this,t),this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}return j(t,[{key:"parentNode",get:function(){return this._$AM.parentNode}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"u",value:function(t){var e,n=this._$AD,r=n.el.content,i=n.parts,o=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:ct).importNode(r,!0);$t.currentNode=o;for(var a=$t.nextNode(),s=0,u=0,c=i[0];void 0!==c;){var l;if(s===c.index){var d=void 0;2===c.type?d=new jt(a,a.nextSibling,this,t):1===c.type?d=new c.ctor(a,c.name,c.strings,this,t):6===c.type&&(d=new Lt(a,this,t)),this._$AV.push(d),c=i[++u]}s!==(null===(l=c)||void 0===l?void 0:l.index)&&(a=$t.nextNode(),s++)}return $t.currentNode=ct,o}},{key:"p",value:function(t){var e,n=0,r=A(this._$AV);try{for(r.s();!(e=r.n()).done;){var i=e.value;void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,n),n+=i.strings.length-2):i._$AI(t[n])),n++}}catch(t){r.e(t)}finally{r.f()}}}]),t}(),jt=function(){function t(e,n,r,i){var o;P(this,t),this.type=2,this._$AH=xt,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=r,this.options=i,this._$Cv=null===(o=null==i?void 0:i.isConnected)||void 0===o||o}return j(t,[{key:"_$AU",get:function(){var t,e;return null!==(t=null===(e=this._$AM)||void 0===e?void 0:e._$AU)&&void 0!==t?t:this._$Cv}},{key:"parentNode",get:function(){var t,e=this._$AA.parentNode,n=this._$AM;return void 0!==n&&11===(null===(t=e)||void 0===t?void 0:t.nodeType)&&(e=n.parentNode),e}},{key:"startNode",get:function(){return this._$AA}},{key:"endNode",get:function(){return this._$AB}},{key:"_$AI",value:function(t){t=Pt(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this),dt(t)?t===xt||null==t||""===t?(this._$AH!==xt&&this._$AR(),this._$AH=xt):t!==this._$AH&&t!==kt&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):function(t){return ht(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator])}(t)?this.T(t):this._(t)}},{key:"k",value:function(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}},{key:"$",value:function(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}},{key:"_",value:function(t){this._$AH!==xt&&dt(this._$AH)?this._$AA.nextSibling.data=t:this.$(ct.createTextNode(t)),this._$AH=t}},{key:"g",value:function(t){var e,n=t.values,r=t._$litType$,i="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=Ot.createElement(At(r.h,r.h[0]),this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===i)this._$AH.p(n);else{var o=new Ct(i,this),a=o.u(this.options);o.p(n),this.$(a),this._$AH=o}}},{key:"_$AC",value:function(t){var e=Et.get(t.strings);return void 0===e&&Et.set(t.strings,e=new Ot(t)),e}},{key:"T",value:function(e){ht(this._$AH)||(this._$AH=[],this._$AR());var n,r,i=this._$AH,o=0,a=A(e);try{for(a.s();!(r=a.n()).done;){var s=r.value;o===i.length?i.push(n=new t(this.k(lt()),this.k(lt()),this,this.options)):n=i[o],n._$AI(s),o++}}catch(t){a.e(t)}finally{a.f()}o0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,e=arguments.length>1?arguments[1]:void 0;for(null===(n=this._$AP)||void 0===n||n.call(this,!1,!0,e);t&&t!==this._$AB;){var n,r=t.nextSibling;t.remove(),t=r}}},{key:"setConnected",value:function(t){var e;void 0===this._$AM&&(this._$Cv=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}]),t}(),Tt=function(){function t(e,n,r,i,o){P(this,t),this.type=1,this._$AH=xt,this._$AN=void 0,this.element=e,this.name=n,this._$AM=i,this.options=o,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=xt}return j(t,[{key:"tagName",get:function(){return this.element.tagName}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=this.strings,o=!1;if(void 0===i)t=Pt(this,t,e,0),(o=!dt(t)||t!==this._$AH&&t!==kt)&&(this._$AH=t);else{var a,s,u=t;for(t=i[0],a=0;a1&&void 0!==arguments[1]?arguments[1]:this,0))&&void 0!==e?e:xt)!==kt){var n=this._$AH,r=t===xt&&n!==xt||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,i=t!==xt&&(n===xt||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}}},{key:"handleEvent",value:function(t){var e,n;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(n=this.options)||void 0===n?void 0:n.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}]),n}(),Lt=function(){function t(e,n,r){P(this,t),this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=r}return j(t,[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){Pt(this,t)}}]),t}(),Ut=nt.litHtmlPolyfillSupport;null!=Ut&&Ut(Ot,jt),(null!==(r=nt.litHtmlVersions)&&void 0!==r?r:nt.litHtmlVersions=[]).push("3.1.0");var Dt=function(t){g(n,et);var e=b(n);function n(){var t;return P(this,n),(t=e.apply(this,arguments)).renderOptions={host:_(t)},t._$Do=void 0,t}return j(n,[{key:"createRenderRoot",value:function(){var t,e,r=h($(n.prototype),"createRenderRoot",this).call(this);return null!==(e=(t=this.renderOptions).renderBefore)&&void 0!==e||(t.renderBefore=r.firstChild),r}},{key:"update",value:function(t){var e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),h($(n.prototype),"update",this).call(this,t),this._$Do=function(t,e,n){var r,i=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:e,o=i._$litPart$;if(void 0===o){var a,s=null!==(a=null==n?void 0:n.renderBefore)&&void 0!==a?a:null;i._$litPart$=o=new jt(e.insertBefore(lt(),s),s,void 0,null!=n?n:{})}return o._$AI(t),o}(e,this.renderRoot,this.renderOptions)}},{key:"connectedCallback",value:function(){var t;h($(n.prototype),"connectedCallback",this).call(this),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}},{key:"disconnectedCallback",value:function(){var t;h($(n.prototype),"disconnectedCallback",this).call(this),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}},{key:"render",value:function(){return kt}}]),n}();Dt._$litElement$=!0,Dt.finalized=!0,null===(i=globalThis.litElementHydrateSupport)||void 0===i||i.call(globalThis,{LitElement:Dt});var Ht=globalThis.litElementPolyfillSupport;null==Ht||Ht({LitElement:Dt}),(null!==(o=globalThis.litElementVersions)&&void 0!==o?o:globalThis.litElementVersions=[]).push("4.0.2");var It={attribute:!0,type:String,converter:Q,reflect:!1,hasChanged:X},zt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:It,e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=n.kind,i=n.metadata,o=globalThis.litPropertyMetadata.get(i);if(void 0===o&&globalThis.litPropertyMetadata.set(i,o=new Map),o.set(n.name,t),"accessor"===r){var a=n.name;return{set:function(n){var r=e.get.call(this);e.set.call(this,n),this.requestUpdate(a,r,t)},init:function(e){return void 0!==e&&this.C(a,void 0,t),e}}}if("setter"===r){var s=n.name;return function(n){var r=this[s];e.call(this,n),this.requestUpdate(s,r,t)}}throw Error("Unsupported decorator location: "+r)};function qt(t){return function(e,n){return"object"==M(n)?zt(t,e,n):function(t,e,n){var r=e.hasOwnProperty(n);return e.constructor.createProperty(n,r?l(l({},t),{},{wrapped:!0}):t),r?Object.getOwnPropertyDescriptor(e,n):void 0}(t,e,n)}}function Bt(){return Vt.apply(this,arguments)}function Vt(){return Vt=m(v().mark((function t(){var e;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.race([customElements.whenDefined("home-assistant"),customElements.whenDefined("hc-main")]);case 2:e=customElements.get("home-assistant")?"home-assistant":"hc-main";case 3:if(document.querySelector(e)){t.next=8;break}return t.next=6,new Promise((function(t){return window.setTimeout(t,100)}));case 6:t.next=3;break;case 8:return t.abrupt("return",document.querySelector(e));case 9:case"end":return t.stop()}}),t)}))),Vt.apply(this,arguments)}function Jt(){return Wt.apply(this,arguments)}function Wt(){return Wt=m(v().mark((function t(){var e;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Bt();case 2:e=t.sent;case 3:if(e.hass){t.next=8;break}return t.next=6,new Promise((function(t){return window.setTimeout(t,100)}));case 6:t.next=3;break;case 8:return t.abrupt("return",e.hass);case 9:case"end":return t.stop()}}),t)}))),Wt.apply(this,arguments)}var Gt="browser_mod-browser-id";window.cardMod_template_cache=window.cardMod_template_cache||{};var Ft=window.cardMod_template_cache;function Yt(t,e){var n=Ft[t];n&&(n.value=e.result,n.callbacks.forEach((function(t){return t(e.result)})))}function Kt(t,e,n){return Zt.apply(this,arguments)}function Zt(){return(Zt=m(v().mark((function t(e,n,r){var i,o,a,s;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Jt();case 2:i=t.sent,o=i.connection,a=JSON.stringify([n,r]),(s=Ft[a])?(s.callbacks.has(e)||Qt(e),e(s.value),s.callbacks.add(e)):(Qt(e),e(""),r=Object.assign({user:i.user.name,browser:document.querySelector("hc-main")?"CAST":localStorage[Gt]?localStorage[Gt]:"",hash:location.hash.substr(1)||""},r),Ft[a]=s={template:n,variables:r,value:"",callbacks:new Set([e]),unsubscribe:o.subscribeMessage((function(t){return Yt(a,t)}),{type:"render_template",template:n,variables:r})});case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Qt(t){return Xt.apply(this,arguments)}function Xt(){return(Xt=m(v().mark((function t(e){var n,r,i,o,a,s;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=0,i=Object.entries(Ft);case 1:if(!(r1&&void 0!==o[1]&&o[1],!(null===(r=e.localName)||void 0===r?void 0:r.includes("-"))){t.next=4;break}return t.next=4,customElements.whenDefined(e.localName);case 4:if(!e.updateComplete){t.next=7;break}return t.next=7,e.updateComplete;case 7:if(!n){t.next=18;break}if(!e.pageRendered){t.next=11;break}return t.next=11,e.pageRendered;case 11:if(!e._panelState){t.next=18;break}i=0;case 13:if(!("loaded"!==e._panelState&&i++<5)){t.next=18;break}return t.next=16,new Promise((function(t){return setTimeout(t,100)}));case 16:t.next=13;break;case 18:case"end":return t.stop()}}),t)}))),se.apply(this,arguments)}function ue(t,e){return ce.apply(this,arguments)}function ce(){return ce=m(v().mark((function t(e,n){var r,i,o,a,s,u,c,l=arguments;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(r=l.length>2&&void 0!==l[2]&&l[2],i=[e],"string"==typeof n&&(n=n.split(/(\$| )/));""===n[n.length-1];)n.pop();o=A(n.entries()),t.prev=5,o.s();case 7:if((a=o.n()).done){t.next=21;break}if(s=p(a.value,2),s[0],"$"!==(u=s[1])){t.next=12;break}return i=f(i).map((function(t){return t.shadowRoot})),t.abrupt("continue",19);case 12:if(c=i[0]){t.next=15;break}return t.abrupt("return",null);case 15:if(u.trim().length){t.next=17;break}return t.abrupt("continue",19);case 17:ae(c),i=c.querySelectorAll(u);case 19:t.next=7;break;case 21:t.next=26;break;case 23:t.prev=23,t.t0=t.catch(5),o.e(t.t0);case 26:return t.prev=26,o.f(),t.finish(26);case 29:return t.abrupt("return",r?i:i[0]);case 30:case"end":return t.stop()}}),t,null,[[5,23,26,29]])}))),ce.apply(this,arguments)}function le(t,e){return de.apply(this,arguments)}function de(){return de=m(v().mark((function t(e,n){var r,i,o=arguments;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=o.length>2&&void 0!==o[2]&&o[2],i=o.length>3&&void 0!==o[3]?o[3]:1e4,t.abrupt("return",Promise.race([ue(e,n,r),new Promise((function(t,e){return setTimeout((function(){return e(new Error(oe))}),i)}))]).catch((function(t){if(!t.message||t.message!==oe)throw t;return null})));case 3:case"end":return t.stop()}}),t)}))),de.apply(this,arguments)}var he=function(t){g(n,Dt);var e=b(n);function n(){var t;return P(this,n),(t=e.apply(this,arguments))._cardMod=[],t}return j(n,[{key:"setConfig",value:function(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i1?n-1:0),i=1;i3&&void 0!==l[3]?l[3]:{},o=!(l.length>4&&void 0!==l[4])||l[4],c=!1,void 0!==(a=l.length>5&&void 0!==l[5]?l[5]:void 0)&&"string"!=typeof a&&(c=!0,o=a,a=void 0),"boolean"!=typeof o&&(o=!0,c=!0),"string"==typeof(r=l.length>2&&void 0!==l[2]?l[2]:void 0)&&(r={style:r},c=!0),r&&0!==Object.keys(r).length&&void 0===(null!==(u=null!==(s=null==r?void 0:r.style)&&void 0!==s?s:null==r?void 0:r.class)&&void 0!==u?u:null==r?void 0:r.debug)&&(r={style:r},c=!0),c&&!window.cm_compatibility_warning&&(window.cm_compatibility_warning=!0,console.groupCollapsed("Card-mod warning"),console.info("You are using a custom card which reiles on card-mod, and uses an outdated signature for applyElement."),console.info("The outdated signature will be removed at some point in the future. Hopefully the developer of your card will have updated their card by then."),console.info("The card used card-mod to apply styles here:",e),console.groupEnd()),t.abrupt("return",ve(e,n,r,i,o,a));case 11:case"end":return t.stop()}}),t)}))),pe.apply(this,arguments)}function ve(t,e){return ye.apply(this,arguments)}function ye(){return ye=m(v().mark((function t(e,n){var r,i,o,a,s,u,c,l,d,h,p,y,g,b,_,w=arguments;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=w.length>3&&void 0!==w[3]?w[3]:{},a=!(w.length>4&&void 0!==w[4])||w[4],s=w.length>5&&void 0!==w[5]?w[5]:void 0,g=(null==(i=w.length>2&&void 0!==w[2]?w[2]:void 0)?void 0:i.debug)?function(){for(var t,e=arguments.length,n=new Array(e),r=0;r2&&void 0!==s[2]?s[2]:0,i=this.parentElement||this.parentNode,t.next=4,le(i,e,!0);case 4:if((o=t.sent)&&o.length){t.next=11;break}if(!(r>5)){t.next=8;break}throw new Error("NoElements");case 8:return t.next=10,new Promise((function(t){return setTimeout(t,100*r)}));case 10:return t.abrupt("return",this._style_child(e,n,r+1));case 11:return t.abrupt("return",f(o).map(function(){var t=m(v().mark((function t(e){var r;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ve(e,"".concat(a.type,"-child"),{style:n,debug:a.debug},a.variables,!1);case 2:return(r=t.sent)&&(r.card_mod_parent=a),t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 12:case"end":return t.stop()}}),t,this)}))),function(t,e){return r.apply(this,arguments)})},{key:"_connect",value:(n=m(v().mark((function t(){var e,n,r,i,o,a,s,u,c,l,d,h,f,y=this;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=null!==(e=this._fixed_styles)&&void 0!==e?e:{},a={},s="",u=!1,this.parentElement||this.parentNode,this._debug("(Re)connecting",this),c=v().mark((function t(){var e,n,r;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=p(d[l],2),n=e[0],r=e[1],"."===n?"string"==typeof r?s=r:y._debug("Style of '.' must be a string: ",r):(u=!0,a[n]=y._style_child(n,r).catch((function(t){if("NoElements"!=t.message)throw t;y.debug&&(console.groupCollapsed("card-mod found no elements"),console.info("Looked for ".concat(n)),console.info(y),console.groupEnd())})));case 2:case"end":return t.stop()}}),t)})),l=0,d=Object.entries(o);case 8:if(!(l\n ","\n \n "])),this._rendered_styles)}}],[{key:"applyToElement",get:function(){return fe}}]),s}();N([qt({attribute:"card-mod-type",reflect:!0})],be.prototype,"type",void 0),N([qt()],be.prototype,"_rendered_styles",void 0),m(v().mark((function t(){return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:customElements.get("card-mod")||customElements.define("card-mod",be);case 1:if(void 0!==customElements.get("home-assistant")){t.next=6;break}return t.next=4,new Promise((function(t){return window.setTimeout(t,100)}));case 4:t.next=1;break;case 6:customElements.get("card-mod")||(customElements.define("card-mod",be),console.info("%cCARD-MOD ".concat(te," IS INSTALLED"),"color: green; font-weight: bold"));case 7:case"end":return t.stop()}}),t)})))();var _e=function(t,e,n){if("constructor"!==e){var r=t[e];if(!(null==r?void 0:r.cm_patched)){var i=function(){for(var t=arguments.length,e=new Array(t),i=0;i1?o-1:0),s=1;s2?i-2:0),a=2;a1?i-1:0),a=1;a1?n-1:0),i=1;i1?e-1:0),r=1;r1?e-1:0),r=1;r2?r-2:0),o=2;o1?e-1:0),r=1;r2?f-2:0),y=2;y1?n-1:0),i=1;i2?i-2:0),a=2;a1?a-1:0),u=1;u1?r-1:0),o=1;o1&&void 0!==u[1]?u[1]:0,Ue(e),!(null===(r=e._boundCardMod)||void 0===r?void 0:r.size)){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,Be(e);case 6:if(e._boundCardMod=t.sent,(null===(i=e._cardMod)||void 0===i?void 0:i.size)||!(n<5)){t.next=9;break}return t.abrupt("return",window.setTimeout((function(){return De(e,n+1)}),100*n));case 9:o=A(e._boundCardMod),t.prev=10,s=v().mark((function t(){var n;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(n=a.value).addEventListener("card-mod-update",m(v().mark((function t(){return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.updateComplete;case 2:Ue(e);case 3:case"end":return t.stop()}}),t)}))));case 2:case"end":return t.stop()}}),t)})),o.s();case 13:if((a=o.n()).done){t.next=17;break}return t.delegateYield(s(),"t0",15);case 15:t.next=13;break;case 17:t.next=22;break;case 19:t.prev=19,t.t1=t.catch(10),o.e(t.t1);case 22:return t.prev=22,o.f(),t.finish(22);case 25:case"end":return t.stop()}}),t,null,[[10,19,22,25]])})));return function(e){return t.apply(this,arguments)}}(),He=function(t){g(n,he);var e=b(n);function n(){return P(this,n),e.apply(this,arguments)}return j(n,[{key:"firstUpdated",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r1?e-1:0),r=1;r1?r-1:0),o=1;o1&&void 0!==s[1]?s[1]:0,r=new Set,10!=n){t.next=4;break}return t.abrupt("return",r);case 4:if(e){t.next=6;break}return t.abrupt("return",r);case 6:if(e._cardMod){i=A(e._cardMod);try{for(i.s();!(o=i.n()).done;)(a=o.value).styles&&r.add(a)}catch(t){i.e(t)}finally{i.f()}}if(!e.updateComplete){t.next=10;break}return t.next=10,e.updateComplete;case 10:if(!e.parentElement){t.next=19;break}return t.t0=qe,t.t1=r,t.next=15,Be(e.parentElement,n+1);case 15:t.t2=t.sent,(0,t.t0)(t.t1,t.t2),t.next=26;break;case 19:if(!e.parentNode){t.next=26;break}return t.t3=qe,t.t4=r,t.next=24,Be(e.parentNode,n+1);case 24:t.t5=t.sent,(0,t.t3)(t.t4,t.t5);case 26:if(!e.host){t.next=33;break}return t.t6=qe,t.t7=r,t.next=31,Be(e.host,n+1);case 31:t.t8=t.sent,(0,t.t6)(t.t7,t.t8);case 33:return t.abrupt("return",r);case 34:case"end":return t.stop()}}),t)}))),Ve.apply(this,arguments)}ze=N([xe("ha-svg-icon")],ze);var Je="\nha-card {\n background: none;\n box-shadow: none;\n border: none;\n transition: none;\n}",We=function(t){g(r,Dt);var e,n=b(r);function r(){return P(this,r),n.apply(this,arguments)}return j(r,[{key:"setConfig",value:function(t){var e;this._config=JSON.parse(JSON.stringify(t));var n=(null===(e=this._config.card_mod)||void 0===e?void 0:e.style)||this._config.style;void 0===n?n=Je:"string"==typeof n?n=Je+n:n["."]?n["."]=Je+n["."]:n["."]=Je,this._config.card_mod={style:n},this.build_card(t.card)}},{key:"build_card",value:(e=m(v().mark((function t(e){var n,r=this;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0!==this._hass){t.next=3;break}return t.next=3,new Promise((function(t){return r._hassResolve=t}));case 3:return this._hassResolve=void 0,t.next=6,window.loadCardHelpers();case 6:return n=t.sent,t.next=9,n.createCardElement(e);case 9:this.card=t.sent,this.card.hass=this._hass;case 11:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"firstUpdated",value:function(){var t=this;window.setTimeout((function(){var e,n;if(null===(n=null===(e=t.card)||void 0===e?void 0:e.shadowRoot)||void 0===n?void 0:n.querySelector("ha-card")){console.info("%cYou are doing it wrong!","color: red; font-weight: bold");var r=t.card.localName.replace(/hui-(.*)-card/,"$1");console.info("mod-card should NEVER be used with a card that already has a ha-card element, such as ".concat(r))}}),3e3)}},{key:"hass",set:function(t){this._hass=t,this.card&&(this.card.hass=t),this._hassResolve&&this._hassResolve()}},{key:"render",value:function(){return wt(s||(s=u([" "," "])),this.card)}},{key:"getCardSize",value:function(){if(this._config.report_size)return this._config.report_size;var t=this.shadowRoot;return t&&(t=t.querySelector("ha-card card-maker")),t&&(t=t.getCardSize),t&&(t=t()),t||1}}]),r}();function Ge(){document.dispatchEvent(new Event("cm_update"))}N([qt()],We.prototype,"card",void 0),m(v().mark((function t(){return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:customElements.get("mod-card")||customElements.define("mod-card",We);case 1:if(void 0!==customElements.get("home-assistant")){t.next=6;break}return t.next=4,new Promise((function(t){return window.setTimeout(t,100)}));case 4:t.next=1;break;case 6:customElements.get("mod-card")||customElements.define("mod-card",We);case 7:case"end":return t.stop()}}),t)})))();var Fe,Ye,Ke,Ze=[customElements.whenDefined("home-assistant"),customElements.whenDefined("hc-main")];Promise.race(Ze).then((function(){window.setTimeout(m(v().mark((function t(){var e,n,r;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Jt();case 2:r=t.sent;case 3:if(r){t.next=8;break}return t.next=6,new Promise((function(t){return window.setTimeout(t,500)}));case 6:t.next=3;break;case 8:r.connection.subscribeEvents((function(){window.setTimeout(Ge,500)}),"themes_updated"),null===(e=document.querySelector("home-assistant"))||void 0===e||e.addEventListener("settheme",Ge),null===(n=document.querySelector("hc-main"))||void 0===n||n.addEventListener("settheme",Ge);case 11:case"end":return t.stop()}}),t)}))),1e3)}));var Qe,Xe=[],tn=A(document.querySelectorAll("script"));try{for(tn.s();!(Qe=tn.n()).done;){var en=Qe.value;if(null===(Ye=null===(Fe=null==en?void 0:en.innerText)||void 0===Fe?void 0:Fe.trim())||void 0===Ye?void 0:Ye.startsWith("import(")){var nn,rn=null===(Ke=en.innerText.split("\n"))||void 0===Ke?void 0:Ke.map((function(t){return t.trim()})),on=A(rn);try{for(on.s();!(nn=on.n()).done;){var an=nn.value;Xe.push(an.replace(/^import\(\"/,"").replace(/\"\);/,""))}}catch(t){on.e(t)}finally{on.f()}}}}catch(t){tn.e(t)}finally{tn.f()}Xe.some((function(t){return t.includes("/card-mod.js")}))||console.info("You may not be getting optimal performance out of card-mod.\nSee https://github.com/thomasloven/lovelace-card-mod#performance-improvements"); +var t,e,n,r,i,o,a,s;function u(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function l(t){for(var e=1;e=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:T(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function y(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function m(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){y(o,r,i,a,s,"next",t)}function s(t){y(o,r,i,a,s,"throw",t)}a(void 0)}))}}function g(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$(t,e)}function b(t){var e=x();return function(){var n,r=E(t);if(e){var i=E(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===N(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _(t)}(this,n)}}function _(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function w(t){var e="function"==typeof Map?new Map:void 0;return w=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return k(t,arguments,E(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),$(n,t)},w(t)}function k(t,e,n){return k=x()?Reflect.construct.bind():function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&$(i,n.prototype),i},k.apply(null,arguments)}function x(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function $(t,e){return $=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},$(t,e)}function E(t){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},E(t)}function A(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=S(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function S(t,e){if(t){if("string"==typeof t)return O(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O(t,e):void 0}}function O(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}"function"==typeof SuppressedError&&SuppressedError;var R=globalThis,U=R.ShadowRoot&&(void 0===R.ShadyCSS||R.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,L=Symbol(),D=new WeakMap,H=function(){function t(e,n,r){if(P(this,t),this._$cssResult$=!0,r!==L)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=n}return j(t,[{key:"styleSheet",get:function(){var t=this.o,e=this.t;if(U&&void 0===t){var n=void 0!==e&&1===e.length;n&&(t=D.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&D.set(e,t))}return t}},{key:"toString",value:function(){return this.cssText}}]),t}(),I=U?function(t){return t}:function(t){return t instanceof CSSStyleSheet?function(t){var e,n="",r=A(t.cssRules);try{for(r.s();!(e=r.n()).done;){n+=e.value.cssText}}catch(t){r.e(t)}finally{r.f()}return function(t){return new H("string"==typeof t?t:t+"",void 0,L)}(n)}(t):t},z=Object.is,q=Object.defineProperty,B=Object.getOwnPropertyDescriptor,V=Object.getOwnPropertyNames,J=Object.getOwnPropertySymbols,W=Object.getPrototypeOf,G=globalThis,F=G.trustedTypes,Y=F?F.emptyScript:"",K=G.reactiveElementPolyfillSupport,Z=function(t,e){return t},Q={toAttribute:function(t,e){switch(e){case Boolean:t=t?Y:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute:function(t,e){var n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},X=function(t,e){return!z(t,e)},tt={attribute:!0,type:String,converter:Q,reflect:!1,hasChanged:X};null!==(t=Symbol.metadata)&&void 0!==t||(Symbol.metadata=Symbol("metadata")),null!==(e=G.litPropertyMetadata)&&void 0!==e||(G.litPropertyMetadata=new WeakMap);var et=function(t){g(r,w(HTMLElement));var e,n=b(r);function r(){var t;return P(this,r),(t=n.call(this))._$Ep=void 0,t.isUpdatePending=!1,t.hasUpdated=!1,t._$Em=null,t._$Ev(),t}return j(r,[{key:"_$Ev",value:function(){var t,e=this;this._$Eg=new Promise((function(t){return e.enableUpdating=t})),this._$AL=new Map,this._$ES(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((function(t){return t(e)}))}},{key:"addController",value:function(t){var e,n;(null!==(e=this._$E_)&&void 0!==e?e:this._$E_=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&(null===(n=t.hostConnected)||void 0===n||n.call(t))}},{key:"removeController",value:function(t){var e;null===(e=this._$E_)||void 0===e||e.delete(t)}},{key:"_$ES",value:function(){var t,e=new Map,n=A(this.constructor.elementProperties.keys());try{for(n.s();!(t=n.n()).done;){var r=t.value;this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r])}}catch(t){n.e(t)}finally{n.f()}e.size>0&&(this._$Ep=e)}},{key:"createRenderRoot",value:function(){var t,e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return function(t,e){if(U)t.adoptedStyleSheets=e.map((function(t){return t instanceof CSSStyleSheet?t:t.styleSheet}));else{var n,r=A(e);try{for(r.s();!(n=r.n()).done;){var i=n.value,o=document.createElement("style"),a=R.litNonce;void 0!==a&&o.setAttribute("nonce",a),o.textContent=i.cssText,t.appendChild(o)}}catch(t){r.e(t)}finally{r.f()}}}(e,this.constructor.elementStyles),e}},{key:"connectedCallback",value:function(){var t,e;null!==(t=this.renderRoot)&&void 0!==t||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$E_)||void 0===e||e.forEach((function(t){var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}},{key:"enableUpdating",value:function(t){}},{key:"disconnectedCallback",value:function(){var t;null===(t=this._$E_)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}},{key:"attributeChangedCallback",value:function(t,e,n){this._$AK(t,n)}},{key:"_$EO",value:function(t,e){var n=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,n);if(void 0!==r&&!0===n.reflect){var i,o=(void 0!==(null===(i=n.converter)||void 0===i?void 0:i.toAttribute)?n.converter:Q).toAttribute(e,n.type);this._$Em=t,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}},{key:"_$AK",value:function(t,e){var n=this.constructor,r=n._$Eh.get(t);if(void 0!==r&&this._$Em!==r){var i,o=n.getPropertyOptions(r),a="function"==typeof o.converter?{fromAttribute:o.converter}:void 0!==(null===(i=o.converter)||void 0===i?void 0:i.fromAttribute)?o.converter:Q;this._$Em=r,this[r]=a.fromAttribute(e,o.type),this._$Em=null}}},{key:"requestUpdate",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4?arguments[4]:void 0;if(void 0!==t){var o,a;if(null!==(o=n)&&void 0!==o||(n=this.constructor.getPropertyOptions(t)),!(null!==(a=n.hasChanged)&&void 0!==a?a:X)(r?i:this[t],e))return;this.C(t,e,n)}!1===this.isUpdatePending&&(this._$Eg=this._$EP())}},{key:"C",value:function(t,e,n){var r;this._$AL.has(t)||this._$AL.set(t,e),!0===n.reflect&&this._$Em!==t&&(null!==(r=this._$Ej)&&void 0!==r?r:this._$Ej=new Set).add(t)}},{key:"_$EP",value:(e=m(p().mark((function t(){var e;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.isUpdatePending=!0,t.prev=1,t.next=4,this._$Eg;case 4:t.next=9;break;case 6:t.prev=6,t.t0=t.catch(1),Promise.reject(t.t0);case 9:if(e=this.scheduleUpdate(),t.t1=null!=e,!t.t1){t.next=14;break}return t.next=14,e;case 14:return t.abrupt("return",!this.isUpdatePending);case 15:case"end":return t.stop()}}),t,this,[[1,6]])}))),function(){return e.apply(this,arguments)})},{key:"scheduleUpdate",value:function(){return this.performUpdate()}},{key:"performUpdate",value:function(){if(this.isUpdatePending){if(!this.hasUpdated){var t;if(null!==(t=this.renderRoot)&&void 0!==t||(this.renderRoot=this.createRenderRoot()),this._$Ep){var e,n=A(this._$Ep);try{for(n.s();!(e=n.n()).done;){var r=v(e.value,2),i=r[0],o=r[1];this[i]=o}}catch(t){n.e(t)}finally{n.f()}this._$Ep=void 0}var a=this.constructor.elementProperties;if(a.size>0){var s,u=A(a);try{for(u.s();!(s=u.n()).done;){var c=v(s.value,2),l=c[0],d=c[1];!0!==d.wrapped||this._$AL.has(l)||void 0===this[l]||this.C(l,this[l],d)}}catch(t){u.e(t)}finally{u.f()}}}var h=!1,f=this._$AL;try{var p;(h=this.shouldUpdate(f))?(this.willUpdate(f),null!==(p=this._$E_)&&void 0!==p&&p.forEach((function(t){var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(f)):this._$ET()}catch(f){throw h=!1,this._$ET(),f}h&&this._$AE(f)}}},{key:"willUpdate",value:function(t){}},{key:"_$AE",value:function(t){var e;null!==(e=this._$E_)&&void 0!==e&&e.forEach((function(t){var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}},{key:"_$ET",value:function(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function(){return this._$Eg}},{key:"shouldUpdate",value:function(t){return!0}},{key:"update",value:function(t){var e=this;this._$Ej&&(this._$Ej=this._$Ej.forEach((function(t){return e._$EO(t,e[t])}))),this._$ET()}},{key:"updated",value:function(t){}},{key:"firstUpdated",value:function(t){}}],[{key:"addInitializer",value:function(t){var e;this._$Ei(),(null!==(e=this.l)&&void 0!==e?e:this.l=[]).push(t)}},{key:"observedAttributes",get:function(){return this.finalize(),this._$Eh&&f(this._$Eh.keys())}},{key:"createProperty",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tt;if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){var n=Symbol(),r=this.getPropertyDescriptor(t,n,e);void 0!==r&&q(this.prototype,t,r)}}},{key:"getPropertyDescriptor",value:function(t,e,n){var r,i=null!==(r=B(this.prototype,t))&&void 0!==r?r:{get:function(){return this[e]},set:function(t){this[e]=t}},o=i.get,a=i.set;return{get:function(){return null==o?void 0:o.call(this)},set:function(e){var r=null==o?void 0:o.call(this);a.call(this,e),this.requestUpdate(t,r,n)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(t){var e;return null!==(e=this.elementProperties.get(t))&&void 0!==e?e:tt}},{key:"_$Ei",value:function(){if(!this.hasOwnProperty(Z("elementProperties"))){var t=W(this);t.finalize(),void 0!==t.l&&(this.l=f(t.l)),this.elementProperties=new Map(t.elementProperties)}}},{key:"finalize",value:function(){if(!this.hasOwnProperty(Z("finalized"))){if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Z("properties"))){var t,e=this.properties,n=A([].concat(f(V(e)),f(J(e))));try{for(n.s();!(t=n.n()).done;){var r=t.value;this.createProperty(r,e[r])}}catch(t){n.e(t)}finally{n.f()}}var i=this[Symbol.metadata];if(null!==i){var o=litPropertyMetadata.get(i);if(void 0!==o){var a,s=A(o);try{for(s.s();!(a=s.n()).done;){var u=v(a.value,2),c=u[0],l=u[1];this.elementProperties.set(c,l)}}catch(t){s.e(t)}finally{s.f()}}}this._$Eh=new Map;var d,h=A(this.elementProperties);try{for(h.s();!(d=h.n()).done;){var p=v(d.value,2),y=p[0],m=p[1],g=this._$Eu(y,m);void 0!==g&&this._$Eh.set(g,y)}}catch(t){h.e(t)}finally{h.f()}this.elementStyles=this.finalizeStyles(this.styles)}}},{key:"finalizeStyles",value:function(t){var e=[];if(Array.isArray(t)){var n,r=A(new Set(t.flat(1/0).reverse()));try{for(r.s();!(n=r.n()).done;){var i=n.value;e.unshift(I(i))}}catch(t){r.e(t)}finally{r.f()}}else void 0!==t&&e.push(I(t));return e}},{key:"_$Eu",value:function(t,e){var n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}}]),r}();et.elementStyles=[],et.shadowRootOptions={mode:"open"},et[Z("elementProperties")]=new Map,et[Z("finalized")]=new Map,null!=K&&K({ReactiveElement:et}),(null!==(n=G.reactiveElementVersions)&&void 0!==n?n:G.reactiveElementVersions=[]).push("2.0.2");var nt=globalThis,rt=nt.trustedTypes,it=rt?rt.createPolicy("lit-html",{createHTML:function(t){return t}}):void 0,ot="$lit$",at="lit$".concat((Math.random()+"").slice(9),"$"),st="?"+at,ut="<".concat(st,">"),ct=document,lt=function(){return ct.createComment("")},dt=function(t){return null===t||"object"!=N(t)&&"function"!=typeof t},ht=Array.isArray,ft="[ \t\n\f\r]",vt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,pt=/-->/g,yt=/>/g,mt=RegExp(">|".concat(ft,"(?:([^\\s\"'>=/]+)(").concat(ft,"*=").concat(ft,"*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)"),"g"),gt=/'/g,bt=/"/g,_t=/^(?:script|style|textarea|title)$/i,wt=function(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i":"",a=vt,s=0;s"===l[0]?(a=null!==(f=n)&&void 0!==f?f:vt,d=-1):void 0===l[1]?d=-2:(d=a.lastIndex-l[2].length,c=l[1],a=void 0===l[3]?mt:'"'===l[3]?bt:gt):a===bt||a===gt?a=mt:a===pt||a===yt?a=vt:(a=mt,n=void 0)}var v=a===mt&&t[s+1].startsWith("/>")?" ":"";o+=a===vt?u+ut:d>=0?(i.push(c),u.slice(0,d)+ot+u.slice(d)+at+v):u+at+(-2===d?s:v)}return[At(t,o+(t[r]||"")+(2===e?"":"")),i]},Ot=function(){function t(e,n){var r,i=e.strings,o=e._$litType$;P(this,t),this.parts=[];var a=0,s=0,u=i.length-1,c=this.parts,l=v(St(i,o),2),d=l[0],h=l[1];if(this.el=t.createElement(d,n),Et.currentNode=this.el.content,2===o){var p=this.el.content.firstChild;p.replaceWith.apply(p,f(p.childNodes))}for(;null!==(r=Et.nextNode())&&c.length0){r.textContent=rt?rt.emptyScript:"";for(var $=0;$2&&void 0!==arguments[2]?arguments[2]:t,u=arguments.length>3?arguments[3]:void 0;if(e===kt)return e;var c=void 0!==u?null===(n=s._$Co)||void 0===n?void 0:n[u]:s._$Cl,l=dt(e)?void 0:e._$litDirective$;return(null===(r=c)||void 0===r?void 0:r.constructor)!==l&&(null!==(i=c)&&void 0!==i&&null!==(o=i._$AO)&&void 0!==o&&o.call(i,!1),void 0===l?c=void 0:(c=new l(t))._$AT(t,s,u),void 0!==u?(null!==(a=s._$Co)&&void 0!==a?a:s._$Co=[])[u]=c:s._$Cl=c),void 0!==c&&(e=Pt(t,c._$AS(t,e.values),c,u)),e}var Ct=function(){function t(e,n){P(this,t),this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}return j(t,[{key:"parentNode",get:function(){return this._$AM.parentNode}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"u",value:function(t){var e,n=this._$AD,r=n.el.content,i=n.parts,o=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:ct).importNode(r,!0);Et.currentNode=o;for(var a=Et.nextNode(),s=0,u=0,c=i[0];void 0!==c;){var l;if(s===c.index){var d=void 0;2===c.type?d=new jt(a,a.nextSibling,this,t):1===c.type?d=new c.ctor(a,c.name,c.strings,this,t):6===c.type&&(d=new Ut(a,this,t)),this._$AV.push(d),c=i[++u]}s!==(null===(l=c)||void 0===l?void 0:l.index)&&(a=Et.nextNode(),s++)}return Et.currentNode=ct,o}},{key:"p",value:function(t){var e,n=0,r=A(this._$AV);try{for(r.s();!(e=r.n()).done;){var i=e.value;void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,n),n+=i.strings.length-2):i._$AI(t[n])),n++}}catch(t){r.e(t)}finally{r.f()}}}]),t}(),jt=function(){function t(e,n,r,i){var o;P(this,t),this.type=2,this._$AH=xt,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=r,this.options=i,this._$Cv=null===(o=null==i?void 0:i.isConnected)||void 0===o||o}return j(t,[{key:"_$AU",get:function(){var t,e;return null!==(t=null===(e=this._$AM)||void 0===e?void 0:e._$AU)&&void 0!==t?t:this._$Cv}},{key:"parentNode",get:function(){var t,e=this._$AA.parentNode,n=this._$AM;return void 0!==n&&11===(null===(t=e)||void 0===t?void 0:t.nodeType)&&(e=n.parentNode),e}},{key:"startNode",get:function(){return this._$AA}},{key:"endNode",get:function(){return this._$AB}},{key:"_$AI",value:function(t){t=Pt(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this),dt(t)?t===xt||null==t||""===t?(this._$AH!==xt&&this._$AR(),this._$AH=xt):t!==this._$AH&&t!==kt&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):function(t){return ht(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator])}(t)?this.T(t):this._(t)}},{key:"k",value:function(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}},{key:"$",value:function(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}},{key:"_",value:function(t){this._$AH!==xt&&dt(this._$AH)?this._$AA.nextSibling.data=t:this.$(ct.createTextNode(t)),this._$AH=t}},{key:"g",value:function(t){var e,n=t.values,r=t._$litType$,i="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=Ot.createElement(At(r.h,r.h[0]),this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===i)this._$AH.p(n);else{var o=new Ct(i,this),a=o.u(this.options);o.p(n),this.$(a),this._$AH=o}}},{key:"_$AC",value:function(t){var e=$t.get(t.strings);return void 0===e&&$t.set(t.strings,e=new Ot(t)),e}},{key:"T",value:function(e){ht(this._$AH)||(this._$AH=[],this._$AR());var n,r,i=this._$AH,o=0,a=A(e);try{for(a.s();!(r=a.n()).done;){var s=r.value;o===i.length?i.push(n=new t(this.k(lt()),this.k(lt()),this,this.options)):n=i[o],n._$AI(s),o++}}catch(t){a.e(t)}finally{a.f()}o0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,e=arguments.length>1?arguments[1]:void 0;for(null===(n=this._$AP)||void 0===n||n.call(this,!1,!0,e);t&&t!==this._$AB;){var n,r=t.nextSibling;t.remove(),t=r}}},{key:"setConnected",value:function(t){var e;void 0===this._$AM&&(this._$Cv=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}]),t}(),Tt=function(){function t(e,n,r,i,o){P(this,t),this.type=1,this._$AH=xt,this._$AN=void 0,this.element=e,this.name=n,this._$AM=i,this.options=o,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=xt}return j(t,[{key:"tagName",get:function(){return this.element.tagName}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=this.strings,o=!1;if(void 0===i)t=Pt(this,t,e,0),(o=!dt(t)||t!==this._$AH&&t!==kt)&&(this._$AH=t);else{var a,s,u=t;for(t=i[0],a=0;a1&&void 0!==arguments[1]?arguments[1]:this,0))&&void 0!==e?e:xt)!==kt){var n=this._$AH,r=t===xt&&n!==xt||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,i=t!==xt&&(n===xt||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}}},{key:"handleEvent",value:function(t){var e,n;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(n=this.options)||void 0===n?void 0:n.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}]),n}(),Ut=function(){function t(e,n,r){P(this,t),this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=r}return j(t,[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){Pt(this,t)}}]),t}(),Lt=nt.litHtmlPolyfillSupport;null!=Lt&&Lt(Ot,jt),(null!==(r=nt.litHtmlVersions)&&void 0!==r?r:nt.litHtmlVersions=[]).push("3.1.0");var Dt=function(t){g(n,et);var e=b(n);function n(){var t;return P(this,n),(t=e.apply(this,arguments)).renderOptions={host:_(t)},t._$Do=void 0,t}return j(n,[{key:"createRenderRoot",value:function(){var t,e,r=h(E(n.prototype),"createRenderRoot",this).call(this);return null!==(e=(t=this.renderOptions).renderBefore)&&void 0!==e||(t.renderBefore=r.firstChild),r}},{key:"update",value:function(t){var e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),h(E(n.prototype),"update",this).call(this,t),this._$Do=function(t,e,n){var r,i=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:e,o=i._$litPart$;if(void 0===o){var a,s=null!==(a=null==n?void 0:n.renderBefore)&&void 0!==a?a:null;i._$litPart$=o=new jt(e.insertBefore(lt(),s),s,void 0,null!=n?n:{})}return o._$AI(t),o}(e,this.renderRoot,this.renderOptions)}},{key:"connectedCallback",value:function(){var t;h(E(n.prototype),"connectedCallback",this).call(this),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}},{key:"disconnectedCallback",value:function(){var t;h(E(n.prototype),"disconnectedCallback",this).call(this),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}},{key:"render",value:function(){return kt}}]),n}();Dt._$litElement$=!0,Dt.finalized=!0,null===(i=globalThis.litElementHydrateSupport)||void 0===i||i.call(globalThis,{LitElement:Dt});var Ht=globalThis.litElementPolyfillSupport;null==Ht||Ht({LitElement:Dt}),(null!==(o=globalThis.litElementVersions)&&void 0!==o?o:globalThis.litElementVersions=[]).push("4.0.2");var It={attribute:!0,type:String,converter:Q,reflect:!1,hasChanged:X},zt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:It,e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=n.kind,i=n.metadata,o=globalThis.litPropertyMetadata.get(i);if(void 0===o&&globalThis.litPropertyMetadata.set(i,o=new Map),o.set(n.name,t),"accessor"===r){var a=n.name;return{set:function(n){var r=e.get.call(this);e.set.call(this,n),this.requestUpdate(a,r,t)},init:function(e){return void 0!==e&&this.C(a,void 0,t),e}}}if("setter"===r){var s=n.name;return function(n){var r=this[s];e.call(this,n),this.requestUpdate(s,r,t)}}throw Error("Unsupported decorator location: "+r)};function qt(t){return function(e,n){return"object"==N(n)?zt(t,e,n):function(t,e,n){var r=e.hasOwnProperty(n);return e.constructor.createProperty(n,r?l(l({},t),{},{wrapped:!0}):t),r?Object.getOwnPropertyDescriptor(e,n):void 0}(t,e,n)}}function Bt(){return Vt.apply(this,arguments)}function Vt(){return Vt=m(p().mark((function t(){var e;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.race([customElements.whenDefined("home-assistant"),customElements.whenDefined("hc-main")]);case 2:e=customElements.get("home-assistant")?"home-assistant":"hc-main";case 3:if(document.querySelector(e)){t.next=8;break}return t.next=6,new Promise((function(t){return window.setTimeout(t,100)}));case 6:t.next=3;break;case 8:return t.abrupt("return",document.querySelector(e));case 9:case"end":return t.stop()}}),t)}))),Vt.apply(this,arguments)}function Jt(){return Wt.apply(this,arguments)}function Wt(){return Wt=m(p().mark((function t(){var e;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Bt();case 2:e=t.sent;case 3:if(e.hass){t.next=8;break}return t.next=6,new Promise((function(t){return window.setTimeout(t,100)}));case 6:t.next=3;break;case 8:return t.abrupt("return",e.hass);case 9:case"end":return t.stop()}}),t)}))),Wt.apply(this,arguments)}var Gt="browser_mod-browser-id";window.cardMod_template_cache=window.cardMod_template_cache||{};var Ft=window.cardMod_template_cache;function Yt(t,e){var n=Ft[t];n&&(n.value=e.result,n.callbacks.forEach((function(t){return t(e.result)})))}function Kt(t,e,n){return Zt.apply(this,arguments)}function Zt(){return(Zt=m(p().mark((function t(e,n,r){var i,o,a,s;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Jt();case 2:i=t.sent,o=i.connection,a=JSON.stringify([n,r]),(s=Ft[a])?(s.callbacks.has(e)||Qt(e),e(s.value),s.callbacks.add(e)):(Qt(e),e(""),r=Object.assign({user:i.user.name,browser:document.querySelector("hc-main")?"CAST":localStorage[Gt]?localStorage[Gt]:"",hash:location.hash.substr(1)||""},r),Ft[a]=s={template:n,variables:r,value:"",callbacks:new Set([e]),unsubscribe:o.subscribeMessage((function(t){return Yt(a,t)}),{type:"render_template",template:n,variables:r})});case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Qt(t){return Xt.apply(this,arguments)}function Xt(){return(Xt=m(p().mark((function t(e){var n,r,i,o,a,s;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=0,i=Object.entries(Ft);case 1:if(!(r1&&void 0!==o[1]&&o[1],!(null===(r=e.localName)||void 0===r?void 0:r.includes("-"))){t.next=4;break}return t.next=4,customElements.whenDefined(e.localName);case 4:if(!e.updateComplete){t.next=7;break}return t.next=7,e.updateComplete;case 7:if(!n){t.next=18;break}if(!e.pageRendered){t.next=11;break}return t.next=11,e.pageRendered;case 11:if(!e._panelState){t.next=18;break}i=0;case 13:if(!("loaded"!==e._panelState&&i++<5)){t.next=18;break}return t.next=16,new Promise((function(t){return setTimeout(t,100)}));case 16:t.next=13;break;case 18:case"end":return t.stop()}}),t)}))),se.apply(this,arguments)}function ue(t,e){return ce.apply(this,arguments)}function ce(){return ce=m(p().mark((function t(e,n){var r,i,o,a,s,u,c,l=arguments;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(r=l.length>2&&void 0!==l[2]&&l[2],i=[e],"string"==typeof n&&(n=n.split(/(\$| )/));""===n[n.length-1];)n.pop();o=A(n.entries()),t.prev=5,o.s();case 7:if((a=o.n()).done){t.next=21;break}if(s=v(a.value,2),s[0],"$"!==(u=s[1])){t.next=12;break}return i=f(i).map((function(t){return t.shadowRoot})),t.abrupt("continue",19);case 12:if(c=i[0]){t.next=15;break}return t.abrupt("return",null);case 15:if(u.trim().length){t.next=17;break}return t.abrupt("continue",19);case 17:ae(c),i=c.querySelectorAll(u);case 19:t.next=7;break;case 21:t.next=26;break;case 23:t.prev=23,t.t0=t.catch(5),o.e(t.t0);case 26:return t.prev=26,o.f(),t.finish(26);case 29:return t.abrupt("return",r?i:i[0]);case 30:case"end":return t.stop()}}),t,null,[[5,23,26,29]])}))),ce.apply(this,arguments)}function le(t,e){return de.apply(this,arguments)}function de(){return de=m(p().mark((function t(e,n){var r,i,o=arguments;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=o.length>2&&void 0!==o[2]&&o[2],i=o.length>3&&void 0!==o[3]?o[3]:1e4,t.abrupt("return",Promise.race([ue(e,n,r),new Promise((function(t,e){return setTimeout((function(){return e(new Error(oe))}),i)}))]).catch((function(t){if(!t.message||t.message!==oe)throw t;return null})));case 3:case"end":return t.stop()}}),t)}))),de.apply(this,arguments)}var he=function(t){g(n,Dt);var e=b(n);function n(){var t;return P(this,n),(t=e.apply(this,arguments))._cardMod=[],t}return j(n,[{key:"setConfig",value:function(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i1?n-1:0),i=1;i3&&void 0!==l[3]?l[3]:{},o=!(l.length>4&&void 0!==l[4])||l[4],c=!1,void 0!==(a=l.length>5&&void 0!==l[5]?l[5]:void 0)&&"string"!=typeof a&&(c=!0,o=a,a=void 0),"boolean"!=typeof o&&(o=!0,c=!0),"string"==typeof(r=l.length>2&&void 0!==l[2]?l[2]:void 0)&&(r={style:r},c=!0),r&&0!==Object.keys(r).length&&void 0===(null!==(u=null!==(s=null==r?void 0:r.style)&&void 0!==s?s:null==r?void 0:r.class)&&void 0!==u?u:null==r?void 0:r.debug)&&(r={style:r},c=!0),c&&!window.cm_compatibility_warning&&(window.cm_compatibility_warning=!0,console.groupCollapsed("Card-mod warning"),console.info("You are using a custom card which reiles on card-mod, and uses an outdated signature for applyElement."),console.info("The outdated signature will be removed at some point in the future. Hopefully the developer of your card will have updated their card by then."),console.info("The card used card-mod to apply styles here:",e),console.groupEnd()),t.abrupt("return",pe(e,n,r,i,o,a));case 11:case"end":return t.stop()}}),t)}))),ve.apply(this,arguments)}function pe(t,e){return ye.apply(this,arguments)}function ye(){return ye=m(p().mark((function t(e,n){var r,i,o,a,s,u,c,l,d,h,v,y,g,b,_,w=arguments;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=w.length>3&&void 0!==w[3]?w[3]:{},a=!(w.length>4&&void 0!==w[4])||w[4],s=w.length>5&&void 0!==w[5]?w[5]:void 0,g=(null==(i=w.length>2&&void 0!==w[2]?w[2]:void 0)?void 0:i.debug)?function(){for(var t,e=arguments.length,n=new Array(e),r=0;r2&&void 0!==s[2]?s[2]:0,i=this.parentElement||this.parentNode,t.next=4,le(i,e,!0);case 4:if((o=t.sent)&&o.length){t.next=11;break}if(!(r>5)){t.next=8;break}throw new Error("NoElements");case 8:return t.next=10,new Promise((function(t){return setTimeout(t,100*r)}));case 10:return t.abrupt("return",this._style_child(e,n,r+1));case 11:return t.abrupt("return",f(o).map(function(){var t=m(p().mark((function t(e){var r;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,pe(e,"".concat(a.type,"-child"),{style:n,debug:a.debug},a.variables,!1);case 2:return(r=t.sent)&&(r.card_mod_parent=a),t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 12:case"end":return t.stop()}}),t,this)}))),function(t,e){return r.apply(this,arguments)})},{key:"_connect",value:(n=m(p().mark((function t(){var e,n,r,i,o,a,s,u,c,l,d,h,f,y=this;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=null!==(e=this._fixed_styles)&&void 0!==e?e:{},a={},s="",u=!1,this.parentElement||this.parentNode,this._debug("(Re)connecting",this),c=p().mark((function t(){var e,n,r;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=v(d[l],2),n=e[0],r=e[1],"."===n?"string"==typeof r?s=r:y._debug("Style of '.' must be a string: ",r):(u=!0,a[n]=y._style_child(n,r).catch((function(t){if("NoElements"!=t.message)throw t;y.debug&&(console.groupCollapsed("card-mod found no elements"),console.info("Looked for ".concat(n)),console.info(y),console.groupEnd())})));case 2:case"end":return t.stop()}}),t)})),l=0,d=Object.entries(o);case 8:if(!(l\n ","\n \n "])),this._rendered_styles)}}],[{key:"applyToElement",get:function(){return fe}}]),s}();M([qt({attribute:"card-mod-type",reflect:!0})],be.prototype,"type",void 0),M([qt()],be.prototype,"_rendered_styles",void 0),customElements.get("card-mod")||(customElements.define("card-mod",be),console.info("%cCARD-MOD ".concat(te," IS INSTALLED"),"color: green; font-weight: bold")),m(p().mark((function t(){return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0!==customElements.get("home-assistant")){t.next=5;break}return t.next=3,new Promise((function(t){return window.setTimeout(t,100)}));case 3:t.next=0;break;case 5:customElements.get("card-mod")||customElements.define("card-mod",be);case 6:case"end":return t.stop()}}),t)})))();var _e=function(t,e,n){if("constructor"!==e){var r=t[e];if(!(null==r?void 0:r.cm_patched)){var i=function(){for(var t=arguments.length,e=new Array(t),i=0;i1?o-1:0),s=1;s2?i-2:0),a=2;a1?i-1:0),a=1;a1?n-1:0),i=1;i1?e-1:0),r=1;r1?e-1:0),r=1;r2?r-2:0),o=2;o1?e-1:0),r=1;r2?f-2:0),y=2;y1?n-1:0),i=1;i2?i-2:0),a=2;a1?a-1:0),u=1;u1?r-1:0),o=1;o1&&void 0!==u[1]?u[1]:0,Le(e),!(null===(r=e._boundCardMod)||void 0===r?void 0:r.size)){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,Be(e);case 6:if(e._boundCardMod=t.sent,(null===(i=e._boundCardMod)||void 0===i?void 0:i.size)||!(n<5)){t.next=9;break}return t.abrupt("return",window.setTimeout((function(){return De(e,n+1)}),100*n));case 9:o=A(e._boundCardMod),t.prev=10,s=p().mark((function t(){var n;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(n=a.value).addEventListener("card-mod-update",m(p().mark((function t(){return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.updateComplete;case 2:Le(e);case 3:case"end":return t.stop()}}),t)}))));case 2:case"end":return t.stop()}}),t)})),o.s();case 13:if((a=o.n()).done){t.next=17;break}return t.delegateYield(s(),"t0",15);case 15:t.next=13;break;case 17:t.next=22;break;case 19:t.prev=19,t.t1=t.catch(10),o.e(t.t1);case 22:return t.prev=22,o.f(),t.finish(22);case 25:case"end":return t.stop()}}),t,null,[[10,19,22,25]])})));return function(e){return t.apply(this,arguments)}}(),He=function(t){g(n,he);var e=b(n);function n(){return P(this,n),e.apply(this,arguments)}return j(n,[{key:"firstUpdated",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r1?e-1:0),r=1;r1?r-1:0),o=1;o1&&void 0!==s[1]?s[1]:0,r=new Set,e){t.next=4;break}return t.abrupt("return",r);case 4:if(e._cardMod){i=A(e._cardMod);try{for(i.s();!(o=i.n()).done;)(a=o.value).styles&&r.add(a)}catch(t){i.e(t)}finally{i.f()}}if(!e.updateComplete){t.next=8;break}return t.next=8,e.updateComplete;case 8:if(!e.parentElement){t.next=17;break}return t.t0=qe,t.t1=r,t.next=13,Be(e.parentElement,n+1);case 13:t.t2=t.sent,(0,t.t0)(t.t1,t.t2),t.next=24;break;case 17:if(!e.parentNode){t.next=24;break}return t.t3=qe,t.t4=r,t.next=22,Be(e.parentNode,n+1);case 22:t.t5=t.sent,(0,t.t3)(t.t4,t.t5);case 24:if(!e.host){t.next=31;break}return t.t6=qe,t.t7=r,t.next=29,Be(e.host,n+1);case 29:t.t8=t.sent,(0,t.t6)(t.t7,t.t8);case 31:return t.abrupt("return",r);case 32:case"end":return t.stop()}}),t)}))),Ve.apply(this,arguments)}ze=M([xe("ha-svg-icon")],ze);var Je="\nha-card {\n background: none;\n box-shadow: none;\n border: none;\n transition: none;\n}",We=function(t){g(r,Dt);var e,n=b(r);function r(){return P(this,r),n.apply(this,arguments)}return j(r,[{key:"setConfig",value:function(t){var e;this._config=JSON.parse(JSON.stringify(t));var n=(null===(e=this._config.card_mod)||void 0===e?void 0:e.style)||this._config.style;void 0===n?n=Je:"string"==typeof n?n=Je+n:n["."]?n["."]=Je+n["."]:n["."]=Je,this._config.card_mod={style:n},this.build_card(t.card)}},{key:"build_card",value:(e=m(p().mark((function t(e){var n,r=this;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0!==this._hass){t.next=3;break}return t.next=3,new Promise((function(t){return r._hassResolve=t}));case 3:return this._hassResolve=void 0,t.next=6,window.loadCardHelpers();case 6:return n=t.sent,t.next=9,n.createCardElement(e);case 9:this.card=t.sent,this.card.hass=this._hass;case 11:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"firstUpdated",value:function(){var t=this;window.setTimeout((function(){var e,n;if(null===(n=null===(e=t.card)||void 0===e?void 0:e.shadowRoot)||void 0===n?void 0:n.querySelector("ha-card")){console.info("%cYou are doing it wrong!","color: red; font-weight: bold");var r=t.card.localName.replace(/hui-(.*)-card/,"$1");console.info("mod-card should NEVER be used with a card that already has a ha-card element, such as ".concat(r))}}),3e3)}},{key:"hass",set:function(t){this._hass=t,this.card&&(this.card.hass=t),this._hassResolve&&this._hassResolve()}},{key:"render",value:function(){return wt(s||(s=u([" "," "])),this.card)}},{key:"getCardSize",value:function(){if(this._config.report_size)return this._config.report_size;var t=this.shadowRoot;return t&&(t=t.querySelector("ha-card card-maker")),t&&(t=t.getCardSize),t&&(t=t()),t||1}}]),r}();function Ge(){document.dispatchEvent(new Event("cm_update"))}M([qt()],We.prototype,"card",void 0),customElements.get("mod-card")||customElements.define("mod-card",We),m(p().mark((function t(){return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0!==customElements.get("home-assistant")){t.next=5;break}return t.next=3,new Promise((function(t){return window.setTimeout(t,100)}));case 3:t.next=0;break;case 5:customElements.get("mod-card")||customElements.define("mod-card",We);case 6:case"end":return t.stop()}}),t)})))();var Fe,Ye,Ke,Ze=[customElements.whenDefined("home-assistant"),customElements.whenDefined("hc-main")];Promise.race(Ze).then((function(){window.setTimeout(m(p().mark((function t(){var e,n,r;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Jt();case 2:r=t.sent;case 3:if(r){t.next=8;break}return t.next=6,new Promise((function(t){return window.setTimeout(t,500)}));case 6:t.next=3;break;case 8:r.connection.subscribeEvents((function(){window.setTimeout(Ge,500)}),"themes_updated"),null===(e=document.querySelector("home-assistant"))||void 0===e||e.addEventListener("settheme",Ge),null===(n=document.querySelector("hc-main"))||void 0===n||n.addEventListener("settheme",Ge);case 11:case"end":return t.stop()}}),t)}))),1e3)}));var Qe,Xe=[],tn=A(document.querySelectorAll("script"));try{for(tn.s();!(Qe=tn.n()).done;){var en=Qe.value;if(null===(Ye=null===(Fe=null==en?void 0:en.innerText)||void 0===Fe?void 0:Fe.trim())||void 0===Ye?void 0:Ye.startsWith("import(")){var nn,rn=null===(Ke=en.innerText.split("\n"))||void 0===Ke?void 0:Ke.map((function(t){return t.trim()})),on=A(rn);try{for(on.s();!(nn=on.n()).done;){var an=nn.value;Xe.push(an.replace(/^import\(\"/,"").replace(/\"\);/,""))}}catch(t){on.e(t)}finally{on.f()}}}}catch(t){tn.e(t)}finally{tn.f()}Xe.some((function(t){return t.includes("/card-mod.js")}))||console.info("You may not be getting optimal performance out of card-mod.\nSee https://github.com/thomasloven/lovelace-card-mod#performance-improvements"); diff --git a/package-lock.json b/package-lock.json index e3961bf..cb99d21 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "card-mod", - "version": "3.4.0", + "version": "3.4.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "card-mod", - "version": "3.4.0", + "version": "3.4.1", "license": "MIT", "dependencies": { "lit": "^3.1.0", diff --git a/package.json b/package.json index 5441d24..30ba14a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "card-mod", "private": true, - "version": "3.4.0", + "version": "3.4.1", "description": "", "scripts": { "build": "rollup -c", diff --git a/src/card-mod.ts b/src/card-mod.ts index 2dbb983..7794fdb 100644 --- a/src/card-mod.ts +++ b/src/card-mod.ts @@ -237,6 +237,10 @@ export class CardMod extends LitElement { if (!customElements.get("card-mod")) { customElements.define("card-mod", CardMod); + console.info( + `%cCARD-MOD ${pjson.version} IS INSTALLED`, + "color: green; font-weight: bold" + ); } (async () => { // Wait for scoped customElements registry to be set up @@ -248,9 +252,5 @@ if (!customElements.get("card-mod")) { if (!customElements.get("card-mod")) { customElements.define("card-mod", CardMod); - console.info( - `%cCARD-MOD ${pjson.version} IS INSTALLED`, - "color: green; font-weight: bold" - ); } })();