2991 lines
640 KiB
JavaScript
2991 lines
640 KiB
JavaScript
function t(t,e,i,o){var a,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,o);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(s=(n<3?a(s):n>3?a(e,i,s):a(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s}"function"==typeof SuppressedError&&SuppressedError;
|
||
/**
|
||
* @license
|
||
* Copyright 2019 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/
|
||
const e=globalThis,i=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),a=new WeakMap;let n=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(i&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=a.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&a.set(e,t))}return t}toString(){return this.cssText}};const s=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new n(i,t,o)},r=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new n("string"==typeof t?t:t+"",void 0,o))(e)})(t):t
|
||
/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/,{is:l,defineProperty:c,getOwnPropertyDescriptor:d,getOwnPropertyNames:h,getOwnPropertySymbols:u,getPrototypeOf:p}=Object,m=globalThis,_=m.trustedTypes,f=_?_.emptyScript:"",g=m.reactiveElementPolyfillSupport,b=(t,e)=>t,v={toAttribute(t,e){switch(e){case Boolean:t=t?f:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},y=(t,e)=>!l(t,e),w={attribute:!0,type:String,converter:v,reflect:!1,useDefault:!1,hasChanged:y};Symbol.metadata??=Symbol("metadata"),m.litPropertyMetadata??=new WeakMap;let x=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=w){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(t,i,e);void 0!==o&&c(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){const{get:o,set:a}=d(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:o,set(e){const n=o?.call(this);a?.call(this,e),this.requestUpdate(t,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??w}static _$Ei(){if(this.hasOwnProperty(b("elementProperties")))return;const t=p(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(b("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(b("properties"))){const t=this.properties,e=[...h(t),...u(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(r(t))}else void 0!==t&&e.push(r(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,o)=>{if(i)t.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of o){const o=document.createElement("style"),a=e.litNonce;void 0!==a&&o.setAttribute("nonce",a),o.textContent=i.cssText,t.appendChild(o)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,i);if(void 0!==o&&!0===i.reflect){const a=(void 0!==i.converter?.toAttribute?i.converter:v).toAttribute(e,i.type);this._$Em=t,null==a?this.removeAttribute(o):this.setAttribute(o,a),this._$Em=null}}_$AK(t,e){const i=this.constructor,o=i._$Eh.get(t);if(void 0!==o&&this._$Em!==o){const t=i.getPropertyOptions(o),a="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:v;this._$Em=o;const n=a.fromAttribute(e,t.type);this[o]=n??this._$Ej?.get(o)??n,this._$Em=null}}requestUpdate(t,e,i,o=!1,a){if(void 0!==t){const n=this.constructor;if(!1===o&&(a=this[t]),i??=n.getPropertyOptions(t),!((i.hasChanged??y)(a,e)||i.useDefault&&i.reflect&&a===this._$Ej?.get(t)&&!this.hasAttribute(n._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:o,wrapped:a},n){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),!0!==a||void 0!==n)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===o&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,o=this[e];!0!==t||this._$AL.has(e)||void 0===o||this.C(e,void 0,i,o)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}};x.elementStyles=[],x.shadowRootOptions={mode:"open"},x[b("elementProperties")]=new Map,x[b("finalized")]=new Map,g?.({ReactiveElement:x}),(m.reactiveElementVersions??=[]).push("2.1.2");
|
||
/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/
|
||
const k=globalThis,S=k.trustedTypes,T=S?S.createPolicy("lit-html",{createHTML:t=>t}):void 0,M="$lit$",D=`lit$${Math.random().toFixed(9).slice(2)}$`,C="?"+D,A=`<${C}>`,P=document,E=()=>P.createComment(""),L=t=>null===t||"object"!=typeof t&&"function"!=typeof t,$=Array.isArray,z="[ \t\n\f\r]",O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,V=/-->/g,H=/>/g,I=RegExp(`>|${z}(?:([^\\s"'>=/]+)(${z}*=${z}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),R=/'/g,F=/"/g,N=/^(?:script|style|textarea|title)$/i,j=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),W=j(1),B=j(2),U=Symbol.for("lit-noChange"),Y=Symbol.for("lit-nothing"),q=new WeakMap,Z=P.createTreeWalker(P,129);function X(t,e){if(!$(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==T?T.createHTML(e):e}const K=(t,e)=>{const i=t.length-1,o=[];let a,n=2===e?"<svg>":3===e?"<math>":"",s=O;for(let e=0;e<i;e++){const i=t[e];let r,l,c=-1,d=0;for(;d<i.length&&(s.lastIndex=d,l=s.exec(i),null!==l);)d=s.lastIndex,s===O?"!--"===l[1]?s=V:void 0!==l[1]?s=H:void 0!==l[2]?(N.test(l[2])&&(a=RegExp("</"+l[2],"g")),s=I):void 0!==l[3]&&(s=I):s===I?">"===l[0]?(s=a??O,c=-1):void 0===l[1]?c=-2:(c=s.lastIndex-l[2].length,r=l[1],s=void 0===l[3]?I:'"'===l[3]?F:R):s===F||s===R?s=I:s===V||s===H?s=O:(s=I,a=void 0);const h=s===I&&t[e+1].startsWith("/>")?" ":"";n+=s===O?i+A:c>=0?(o.push(r),i.slice(0,c)+M+i.slice(c)+D+h):i+D+(-2===c?e:h)}return[X(t,n+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),o]};class G{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let a=0,n=0;const s=t.length-1,r=this.parts,[l,c]=K(t,e);if(this.el=G.createElement(l,i),Z.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(o=Z.nextNode())&&r.length<s;){if(1===o.nodeType){if(o.hasAttributes())for(const t of o.getAttributeNames())if(t.endsWith(M)){const e=c[n++],i=o.getAttribute(t).split(D),s=/([.?@])?(.*)/.exec(e);r.push({type:1,index:a,name:s[2],strings:i,ctor:"."===s[1]?it:"?"===s[1]?ot:"@"===s[1]?at:et}),o.removeAttribute(t)}else t.startsWith(D)&&(r.push({type:6,index:a}),o.removeAttribute(t));if(N.test(o.tagName)){const t=o.textContent.split(D),e=t.length-1;if(e>0){o.textContent=S?S.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],E()),Z.nextNode(),r.push({type:2,index:++a});o.append(t[e],E())}}}else if(8===o.nodeType)if(o.data===C)r.push({type:2,index:a});else{let t=-1;for(;-1!==(t=o.data.indexOf(D,t+1));)r.push({type:7,index:a}),t+=D.length-1}a++}}static createElement(t,e){const i=P.createElement("template");return i.innerHTML=t,i}}function Q(t,e,i=t,o){if(e===U)return e;let a=void 0!==o?i._$Co?.[o]:i._$Cl;const n=L(e)?void 0:e._$litDirective$;return a?.constructor!==n&&(a?._$AO?.(!1),void 0===n?a=void 0:(a=new n(t),a._$AT(t,i,o)),void 0!==o?(i._$Co??=[])[o]=a:i._$Cl=a),void 0!==a&&(e=Q(t,a._$AS(t,e.values),a,o)),e}class J{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,o=(t?.creationScope??P).importNode(e,!0);Z.currentNode=o;let a=Z.nextNode(),n=0,s=0,r=i[0];for(;void 0!==r;){if(n===r.index){let e;2===r.type?e=new tt(a,a.nextSibling,this,t):1===r.type?e=new r.ctor(a,r.name,r.strings,this,t):6===r.type&&(e=new nt(a,this,t)),this._$AV.push(e),r=i[++s]}n!==r?.index&&(a=Z.nextNode(),n++)}return Z.currentNode=P,o}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class tt{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,o){this.type=2,this._$AH=Y,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Q(this,t,e),L(t)?t===Y||null==t||""===t?(this._$AH!==Y&&this._$AR(),this._$AH=Y):t!==this._$AH&&t!==U&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>$(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==Y&&L(this._$AH)?this._$AA.nextSibling.data=t:this.T(P.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,o="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=G.createElement(X(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===o)this._$AH.p(e);else{const t=new J(o,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=q.get(t.strings);return void 0===e&&q.set(t.strings,e=new G(t)),e}k(t){$(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const a of t)o===e.length?e.push(i=new tt(this.O(E()),this.O(E()),this,this.options)):i=e[o],i._$AI(a),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class et{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,o,a){this.type=1,this._$AH=Y,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=a,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Y}_$AI(t,e=this,i,o){const a=this.strings;let n=!1;if(void 0===a)t=Q(this,t,e,0),n=!L(t)||t!==this._$AH&&t!==U,n&&(this._$AH=t);else{const o=t;let s,r;for(t=a[0],s=0;s<a.length-1;s++)r=Q(this,o[i+s],e,s),r===U&&(r=this._$AH[s]),n||=!L(r)||r!==this._$AH[s],r===Y?t=Y:t!==Y&&(t+=(r??"")+a[s+1]),this._$AH[s]=r}n&&!o&&this.j(t)}j(t){t===Y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class it extends et{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Y?void 0:t}}class ot extends et{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==Y)}}class at extends et{constructor(t,e,i,o,a){super(t,e,i,o,a),this.type=5}_$AI(t,e=this){if((t=Q(this,t,e,0)??Y)===U)return;const i=this._$AH,o=t===Y&&i!==Y||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,a=t!==Y&&(i===Y||o);o&&this.element.removeEventListener(this.name,this,i),a&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class nt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Q(this,t)}}const st=k.litHtmlPolyfillSupport;st?.(G,tt),(k.litHtmlVersions??=[]).push("3.3.2");const rt=globalThis;
|
||
/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/let lt=class extends x{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const o=i?.renderBefore??e;let a=o._$litPart$;if(void 0===a){const t=i?.renderBefore??null;o._$litPart$=a=new tt(e.insertBefore(E(),t),t,void 0,i??{})}return a._$AI(t),a})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return U}};lt._$litElement$=!0,lt.finalized=!0,rt.litElementHydrateSupport?.({LitElement:lt});const ct=rt.litElementPolyfillSupport;ct?.({LitElement:lt}),(rt.litElementVersions??=[]).push("4.2.2");
|
||
/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/
|
||
const dt=t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)}
|
||
/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/,ht={attribute:!0,type:String,converter:v,reflect:!1,hasChanged:y},ut=(t=ht,e,i)=>{const{kind:o,metadata:a}=i;let n=globalThis.litPropertyMetadata.get(a);if(void 0===n&&globalThis.litPropertyMetadata.set(a,n=new Map),"setter"===o&&((t=Object.create(t)).wrapped=!0),n.set(i.name,t),"accessor"===o){const{name:o}=i;return{set(i){const a=e.get.call(this);e.set.call(this,i),this.requestUpdate(o,a,t,!0,i)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if("setter"===o){const{name:o}=i;return function(i){const a=this[o];e.call(this,i),this.requestUpdate(o,a,t,!0,i)}}throw Error("Unsupported decorator location: "+o)};function pt(t){return(e,i)=>"object"==typeof i?ut(t,e,i):((t,e,i)=>{const o=e.hasOwnProperty(i);return e.constructor.createProperty(i,t),o?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)
|
||
/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/}function mt(t){return pt({...t,state:!0,attribute:!1})}
|
||
/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/
|
||
/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/
|
||
function _t(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,i),i))(e,i,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}
|
||
/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/const ft=1;class gt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
||
/**
|
||
* @license
|
||
* Copyright 2018 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/const bt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends gt{constructor(t){if(super(t),t.type!==ft||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const i=t.element.classList;for(const t of this.st)t in e||(i.remove(t),this.st.delete(t));for(const t in e){const o=!!e[t];o===this.st.has(t)||this.nt?.has(t)||(o?(i.add(t),this.st.add(t)):(i.remove(t),this.st.delete(t)))}return U}});var vt="M6.59,0.66C8.93,-1.15 11.47,1.06 12.04,4.5C12.47,4.5 12.89,4.62 13.27,4.84C13.79,4.24 14.25,3.42 14.07,2.5C13.65,0.35 16.06,-1.39 18.35,1.58C20.16,3.92 17.95,6.46 14.5,7.03C14.5,7.46 14.39,7.89 14.16,8.27C14.76,8.78 15.58,9.24 16.5,9.06C18.63,8.64 20.38,11.04 17.41,13.34C15.07,15.15 12.53,12.94 11.96,9.5C11.53,9.5 11.11,9.37 10.74,9.15C10.22,9.75 9.75,10.58 9.93,11.5C10.35,13.64 7.94,15.39 5.65,12.42C3.83,10.07 6.05,7.53 9.5,6.97C9.5,6.54 9.63,6.12 9.85,5.74C9.25,5.23 8.43,4.76 7.5,4.94C5.37,5.36 3.62,2.96 6.59,0.66M5,16H7A2,2 0 0,1 9,18V24H7V22H5V24H3V18A2,2 0 0,1 5,16M5,18V20H7V18H5M12.93,16H15L12.07,24H10L12.93,16M18,16H21V18H18V22H21V24H18A2,2 0 0,1 16,22V18A2,2 0 0,1 18,16Z",yt="M19,19H5V5H19M19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M11,15H13V17H11V15M11,7H13V13H11V7",wt="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",xt="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z",kt="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",St="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z",Tt="M12,11A1,1 0 0,0 11,12A1,1 0 0,0 12,13A1,1 0 0,0 13,12A1,1 0 0,0 12,11M12.5,2C17,2 17.11,5.57 14.75,6.75C13.76,7.24 13.32,8.29 13.13,9.22C13.61,9.42 14.03,9.73 14.35,10.13C18.05,8.13 22.03,8.92 22.03,12.5C22.03,17 18.46,17.1 17.28,14.73C16.78,13.74 15.72,13.3 14.79,13.11C14.59,13.59 14.28,14 13.88,14.34C15.87,18.03 15.08,22 11.5,22C7,22 6.91,18.42 9.27,17.24C10.25,16.75 10.69,15.71 10.89,14.79C10.4,14.59 9.97,14.27 9.65,13.87C5.96,15.85 2,15.07 2,11.5C2,7 5.56,6.89 6.74,9.26C7.24,10.25 8.29,10.68 9.22,10.87C9.41,10.39 9.73,9.97 10.14,9.65C8.15,5.96 8.94,2 12.5,2Z",Mt="M5,2V13H8V22L15,10H11L15,2M17,15H19V17H17V15M17,7H19V13H17V7Z",Dt="M8.5 4.5L5.4 9.5L8.5 14.7L5.2 20.5L3.4 19.6L6.1 14.7L3 9.5L6.7 3.6L8.5 4.5M14.7 4.4L11.6 9.5L14.7 14.5L11.4 20.3L9.6 19.4L12.3 14.5L9.2 9.5L12.9 3.5L14.7 4.4M21 4.4L17.9 9.5L21 14.5L17.7 20.3L15.9 19.4L18.6 14.5L15.5 9.5L19.2 3.5L21 4.4",Ct="M12,3L2,12H5V20H19V12H22L12,3M12,8.75A2.25,2.25 0 0,1 14.25,11A2.25,2.25 0 0,1 12,13.25A2.25,2.25 0 0,1 9.75,11A2.25,2.25 0 0,1 12,8.75M12,15C13.5,15 16.5,15.75 16.5,17.25V18H7.5V17.25C7.5,15.75 10.5,15 12,15Z",At="M13 9H11V7H13V9M13 17H11V11H13V17M5 3H19C20.1 3 21 3.89 21 5V19C21 19.53 20.79 20.04 20.41 20.41C20.04 20.79 19.53 21 19 21H5C4.47 21 3.96 20.79 3.59 20.41C3.21 20.04 3 19.53 3 19V5C3 3.89 3.89 3 5 3M19 19V5H5V19H19Z",Pt="M12,17A2,2 0 0,0 14,15C14,13.89 13.1,13 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V10C4,8.89 4.9,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z",Et="M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V10A2,2 0 0,1 6,8H15V6A3,3 0 0,0 12,3A3,3 0 0,0 9,6H7A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,17A2,2 0 0,0 14,15A2,2 0 0,0 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17Z",Lt="M12 2C7.04 2 3 6.04 3 11C3 14.91 5.5 18.24 9 19.47V22H11V19.94C11.33 20 11.66 20 12 20S12.67 20 13 19.94V22H15V19.47C18.5 18.23 21 14.9 21 11C21 6.04 16.96 2 12 2M14.25 14L11.25 17L9.75 15.5L11 14.25L9.75 13L12.75 10L14.25 11.5L13 12.75L14.25 14M16 9H8V7H16V9Z",$t="M10,0.2C9,0.2 8.2,1 8.2,2C8.2,3 9,3.8 10,3.8C11,3.8 11.8,3 11.8,2C11.8,1 11,0.2 10,0.2M15.67,1A7.33,7.33 0 0,0 23,8.33V7A6,6 0 0,1 17,1H15.67M18.33,1C18.33,3.58 20.42,5.67 23,5.67V4.33C21.16,4.33 19.67,2.84 19.67,1H18.33M21,1A2,2 0 0,0 23,3V1H21M7.92,4.03C7.75,4.03 7.58,4.06 7.42,4.11L2,5.8V11H3.8V7.33L5.91,6.67L2,22H3.8L6.67,13.89L9,17V22H10.8V15.59L8.31,11.05L9.04,8.18L10.12,10H15V8.2H11.38L9.38,4.87C9.08,4.37 8.54,4.03 7.92,4.03Z",zt="M18.73,18C15.4,21.69 9.71,22 6,18.64C2.33,15.31 2.04,9.62 5.37,5.93C6.9,4.25 9,3.2 11.27,3C7.96,6.7 8.27,12.39 12,15.71C13.63,17.19 15.78,18 18,18C18.25,18 18.5,18 18.73,18Z",Ot="M17 13V7H19V13H17M17 17V15H19V17H17M13 13V5C13 3.3 11.7 2 10 2S7 3.3 7 5V13C4.8 14.7 4.3 17.8 6 20S10.8 22.7 13 21 15.7 16.2 14 14C13.7 13.6 13.4 13.3 13 13M10 4C10.6 4 11 4.4 11 5V8H9V5C9 4.4 9.4 4 10 4Z",Vt="M12,3.25C12,3.25 6,10 6,14C6,17.32 8.69,20 12,20A6,6 0 0,0 18,14C18,10 12,3.25 12,3.25M14.47,9.97L15.53,11.03L9.53,17.03L8.47,15.97M9.75,10A1.25,1.25 0 0,1 11,11.25A1.25,1.25 0 0,1 9.75,12.5A1.25,1.25 0 0,1 8.5,11.25A1.25,1.25 0 0,1 9.75,10M14.25,14.5A1.25,1.25 0 0,1 15.5,15.75A1.25,1.25 0 0,1 14.25,17A1.25,1.25 0 0,1 13,15.75A1.25,1.25 0 0,1 14.25,14.5Z",Ht="M21 20V2H3V20H1V23H23V20M19 4V11H17V4M5 4H7V11H5M5 20V13H7V20M9 20V4H15V20M17 20V13H19V20Z",It="M2 4H20V8H18V20H16V8H6V20H4V8H2V4M7 9H15V11H7V9M7 12H15V14H7V12M20 19V17H22V19H20M20 15V10H22V15H20Z";var Rt={version:"version",current:"current"},Ft={card:{climate:{autoStartStopEnableEntity:"Auto-start/stop entity",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",allow_lock_toggle:"Allow lock/unlock from card",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Allow preset temperature modification",show_status_text:"Show current HVAC action text",show_background_gradient_on_active:"Show the slider background gradient when the entity is active",show_regulation_chart:"Show regulation chart",show_humidity:"Show humidity"}}},Nt={window_open:"Window open",window_bypass:"Bypass window activated",night_mode:"Night mode",eco:"Eco",overpowering:"Overpowering detected",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active",lock_users_active:"User controls locked",lock_automations_active:"Automation changes locked","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",code_error:"Incorrect code",lock:"Lock",unlock:"Unlock",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Preset temperatures",preset_mod_no_entities:"No preset temperature entities found for this device.",preset_row_heat:"Heat",preset_row_heat_away:"Heat away",preset_row_cool:"Cool",preset_row_cool_away:"Cool away",regulation_chart_title:"Regulation chart"},jt={common:Rt,editor:Ft,extra_states:Nt},Wt=Object.freeze({__proto__:null,common:Rt,default:jt,editor:Ft,extra_states:Nt}),Bt={version:"Version",current:"Aktuell"},Ut={card:{climate:{autoStartStopEnableEntity:"Auto-Start/Stop-Entität",powerEntity:"Entität für den Stromverbrauch",theme:"Thema",theme_classic:"Klassisch",theme_vtherm:"VTherm",theme_uncolored:"Ohne Farbe",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",disable_window:"Fenster deaktivieren",disable_autoStartStop:"Auto-Start/Stop deaktivieren",disable_overpowering:"Überverbrauch deaktivieren",disable_heat:"Heizen deaktivieren",disable_cool:"Kühlen deaktivieren",disable_heat_cool:"Heizen/Kühlen deaktivieren",disable_auto:"Auto deaktivieren",disable_fan_only:"Nur-Lüfter deaktivieren",disable_dry:"Entfeuchten deaktivieren",disable_off:"Aus deaktivieren",disable_menu:"Menü deaktivieren",set_current_as_main:"Zieltemperatur mit aktueller Temperatur tauschen",disable_safety_warning:"Sicherheitsmeldungen deaktivieren",disable_buttons:"Plus/Minus-Buttons deaktivieren",disable_power_infos:"Verbrauchsinformationen deaktivieren",disable_auto_fan_infos:"Auto-Lüfter-Informationen deaktivieren",disable_name:"Name deaktivieren",eco_temperature:"Eco-Temperatur",allow_lock_toggle:"Allow lock/unlock from card",menu_system:"System menu",disable_sleep:"Disable sleep mode",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Voreinstellungstemperaturen bearbeitbar machen",show_status_text:"Aktuellen Status als Text anzeigen",show_background_gradient_on_active:"Hintergrundverlauf des Schiebereglers anzeigen, wenn die Entität aktiv ist",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity",show_humidity:"Luftfeuchtigkeit anzeigen"}}},Yt={window_open:"Fenster offen",window_bypass:"Fenster-Bypass aktiviert",night_mode:"Nachtmodus",eco:"Eco",overpowering:"Überverbrauch erkannt",none:"Manuell",comfort:"Komfort",boost:"Boost",frost:"Frostschutz",power:"Lastabwurf",activity:"Aktivität erkannt",presence:"Anwesenheit erkannt",motion:"Bewegung erkannt",auto_regulation_light:"Leicht",auto_regulation_medium:"Mittel",auto_regulation_strong:"Stark",auto_regulation_slow:"Langsam",auto_regulation_expert:"Experte",auto_fan_mode:"Auto-Lüfter",auto_fan_mode_off:"Keine",auto_fan_none:"Keine",auto_fan_low:"Niedrig",auto_fan_medium:"Mittel",auto_fan_high:"Hoch",auto_fan_turbo:"Turbo",fan_low:"Niedrig",fan_low_mid:"Niedrig-mittel",fan_mid:"Mittel",fan_mid_high:"Mittel-hoch",fan_high:"Hoch",fan_mute:"Leise",fan_turbo:"Turbo",fan_none:"Keine",fan_auto:"Auto",change_message:"Klicken zum Ändern des Presets",toggle_message:"Klicken zum Umschalten",auto_start_stop:"Gestoppt durch Auto-Start/Stop",auto_start_stop_enable:"Aktiviert/deaktiviert Auto-Start/Stop",auto_start_stop_label:"Auto-Start/Stop",temp_unavailable:"-",sleep:"Schlafmodus",lock_users_active:"Benutzersteuerung gesperrt",lock_automations_active:"Automatisierungsänderungen gesperrt",lock:"Sperren",unlock:"Entsperren",code_error:"Falscher Code",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",increase_temp:"Temperatur erhöhen",decrease_temp:"Temperatur verringern",undefined:"None",auto_fan_boost:"Boost",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",not_initialized:"Initialisation error",preset_mod_title:"Voreinstellungstemperaturen",preset_mod_no_entities:"Keine Voreinstellungstemperatur-Entitäten für dieses Gerät gefunden.",preset_row_heat:"Heizen",preset_row_heat_away:"Heizen (abwesend)",preset_row_cool:"Kühlen",preset_row_cool_away:"Kühlen (abwesend)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},qt={common:Bt,editor:Ut,extra_states:Yt},Zt=Object.freeze({__proto__:null,common:Bt,default:qt,editor:Ut,extra_states:Yt}),Xt={version:"version",current:"Actuelle"},Kt={card:{climate:{autoStartStopEnableEntity:"Entité - auto-start/stop",autoStartStopStopModeEntity:"Entité - mode d'arrêt auto-start/stop",autoFanEnableEntity:"Entité - auto-fan",powerEntity:"Entité - puissance consommée",theme:"Thème",theme_classic:"Classique",theme_vtherm:"VTherm",theme_uncolored:"Sans couleur",theme_gunmalmg:"Gunmalmg",section_all_themes:"Pour tous les thèmes",section_classic_only:"Pour les thèmes Classique, VTherm et Sans couleur",menu_system:"Menu système",disable_window:"Désactiver fenêtre status",disable_autoStartStop:"Désactiver auto-startStop",disable_overpowering:"Désactiver sur-puissance status",disable_heat:"Désactiver mode chauffe",disable_cool:"Désactiver mode clim",disable_heat_cool:"Désactiver mode chauffe/clim",disable_auto:"Désactiver mode auto",disable_fan_only:"Désactiver mode ventilation",disable_dry:"Désactiver mode déshumidification",disable_off:"Désactiver mode arret",disable_sleep:"Désactiver mode endormi",set_current_as_main:"Echanger temperature cible avec temperature locale",disable_safety_warning:"Désactiver sécurité messages",disable_buttons:"Désactiver les boutons +/-",disable_power_infos:"Désactiver les infos de puissance",disable_auto_fan_infos:"Désactiver les infos auto-ventilation",disable_name:"Désactiver le nom",disable_target_icon:"Désactiver l'icône cible",allow_lock_toggle:"Activer le verrouillage/déverrouillage depuis la carte",disable_presets:"Désactiver les presets",disable_timed_preset:"Désactiver le champ de durée du preset temporisé",use_manual_duration_input:"Permettre la saisie manuelle de la durée",allow_preset_modification:"Permettre la modification des températures de preset",disable_menu:"Désactiver le menu",show_status_text:"Afficher l'état du HVAC en texte",show_background_gradient_on_active:"Afficher le dégradé de fond du slider lorsque l'entité est active",show_regulation_chart:"Afficher le graphique de régulation",show_humidity:"Afficher l’humidité"}}},Gt={window_open:"Fenêtre ouverte",window_bypass:"Bypass fenêtre activé",eco:"Eco",overpowering:"Sur-puissance détectée",none:"Manuel",comfort:"Confort",boost:"Boost",frost:"Hors-gel",power:"Délestage",activity:"Activité",presence:"Présence détectée",motion:"Mouvement détecté",auto_regulation_light:"Légère",auto_regulation_medium:"Moyenne",auto_regulation_strong:"Forte",auto_regulation_slow:"Lente",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"Aucun",auto_fan_none:"Aucun",auto_fan_low:"Bas",auto_fan_medium:"Moyen",auto_fan_high:"Haut",auto_fan_turbo:"Turbo",fan_low:"Bas",fan_low_mid:"Bas-moyen",fan_mid:"Moyen",fan_mid_high:"Moyen-haut",fan_high:"Haut",fan_mute:"Silence",fan_turbo:"Turbo",fan_none:"Aucun",fan_auto:"Auto",fan_1:"Vitesse 1",fan_2:"Vitesse 2",fan_3:"Vitesse 3",fan_4:"Vitesse 4",fan_5:"Vitesse 5",change_message:"Clic pour sélectionner le preset",toggle_message:"Clic pour basculer",auto_start_stop:"Stoppé par auto-start/stop",auto_start_stop_enable:"Active/désactive l'auto-start/stop",auto_start_stop_label:"Auto-start/stop",auto_start_stop_mode_disabled:"Désactivé",auto_start_stop_mode_off:"Extinction",auto_start_stop_mode_fan_only:"Ventilation seule",auto_start_stop_mode_dry:"Déshumidification",temp_unavailable:"-",sleep:"Endormi","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Temp. pièce",outdoor_temp:"Temp. ext.",safety_warning:"Attention",safety_warning_msg:"défaut de temp.",hvac_off_manual:"Eteint manuellement",hvac_off_auto_start_stop:"Eteint par auto-start/stop",hvac_off_window_detection:"Eteint par détection d'ouverture",hvac_off_sleep_mode:"Eteint par le mode endormi",hvac_off_safety_detection:"Eteint par le mode sécurité",hvac_off_central_mode:"Eteint par le mode central",safety_detected:"Mode sécurité détectée",overpowering_detected:"Sur-puissance détectée",target_temp_window_eco:"Temp. cible : fenêtre éco",target_temp_window_frost:"Temp. cible : fenêtre hors-gel",target_temp_power:"Temp. cible : délestage",target_temp_central_mode:"Temp. cible : mode central",target_temp_activity_detected:"Temp. cible : activité détectée",target_temp_activity_not_detected:"Temp. cible : activité non détectée",target_temp_absence_detected:"Temp. cible : absence détectée",target_temp_timed_preset:"Temporisation d'un preset active",lock_users_active:"Verrouillage utilisateurs actif",lock_automations_active:"Verrouillage automations actif","messages-button":"Pourquoi cet état ?",recalculation_scheduled:"Sous-jacent en cours de mise à jour","window-bypass-button":"Basculer le bypass fenêtre",code_error:"Code incorrect",lock:"Verrouiller",unlock:"Déverrouiller",timed_preset_title:"Durée en minutes (0 = permanent)",timed_preset_active:"Preset temporisé actif",cancel_timed_preset:"Annuler le preset temporisé",heating_failure:"Défaut de chauffage détecté",cooling_failure:"Défaut de refroidissement détecté",increase_temp:"Augmenter la température",decrease_temp:"Diminuer la température",night_mode:"Mode nuit",undefined:"Aucun",auto_fan_boost:"Boost",not_initialized:"Erreur d'initialisation",preset_mod_title:"Températures des presets",preset_mod_no_entities:"Aucune entité de température de preset trouvée pour cet appareil.",preset_row_heat:"Chauffe",preset_row_heat_away:"Chauffe absent",preset_row_cool:"Clim.",preset_row_cool_away:"Clim. absent",regulation_chart_title:"Graphique de régulation",hvac_fan_only_auto_start_stop:"Ventilation seule par auto-start/stop",hvac_dry_auto_start_stop:"Déshumidification par auto-start/stop"},Qt={common:Xt,editor:Kt,extra_states:Gt},Jt=Object.freeze({__proto__:null,common:Xt,default:Qt,editor:Kt,extra_states:Gt}),te={version:"Версия",current:"Текущая"},ee={card:{climate:{autoStartStopEnableEntity:"Сущность автоматического старта/стопа",powerEntity:"Сущность потребления энергии",disable_window:"Отключить окно",disable_autoStartStop:"Отключить автоматический старт/стоп",disable_overpowering:"Отключить перегрузку",disable_heat:"Отключить обогрев",disable_cool:"Отключить охлаждение",disable_heat_cool:"Отключить обогрев/охлаждение",disable_auto:"Отключить авто",disable_fan_only:"Отключить только вентилятор",disable_dry:"Отключить осушение",disable_off:"Отключить режим выключения",disable_sleep:"Отключить спящий режим",disable_menu:"Отключить меню",set_current_as_main:"Поменять местами целевую и текущую температуру",disable_safety_warning:"Отключить сообщения безопасности",disable_buttons:"Отключить кнопки плюс/минус",disable_power_infos:"Отключить информацию о питании",disable_auto_fan_infos:"Отключить информацию автовентилятора",disable_name:"Отключить название",disable_target_icon:"Отключить иконку цели",allow_lock_toggle:"Разрешить блокировку/разблокировку с карты",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Разрешить изменение температур пресетов",show_status_text:"Показывать текущий статус в виде текста",show_background_gradient_on_active:"Показывать фоновый градиент ползунка, когда сущность активна",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity",show_humidity:"Показать влажность"}}},ie={window_open:"Окно открыто",window_bypass:"Обход окна активирован",night_mode:"Ночной режим",eco:"Эко",overpowering:"Обнаружена перегрузка",none:"Ручной",comfort:"Комфорт",boost:"Турбо",frost:"Защита от замерзания",power:"Перегрузка",activity:"Обнаружена активность",presence:"Обнаружено присутствие",motion:"Обнаружено движение",undefined:"Нет",auto_regulation_light:"Легкий",auto_regulation_medium:"Средний",auto_regulation_strong:"Сильный",auto_regulation_slow:"Медленный",auto_regulation_expert:"Экспертный",auto_fan_mode:"Авторежим вентилятора",auto_fan_mode_off:"Нет",auto_fan_none:"Нет",auto_fan_low:"Низкий",auto_fan_medium:"Средний",auto_fan_high:"Высокий",auto_fan_boost:"Турбо",fan_low:"Низкий",fan_low_mid:"Низкий-средний",fan_mid:"Средний",fan_mid_high:"Средний-высокий",fan_high:"Высокий",fan_mute:"Тихий",fan_turbo:"Турбо",fan_none:"Нет",fan_auto:"Авто",change_message:"Клик для смены предустановки",toggle_message:"Клик для переключения",auto_start_stop:"Остановлено авто-старт/стопом",auto_start_stop_enable:"Включить/отключить авто-старт/стоп",auto_start_stop_label:"Авто-старт/стоп",temp_unavailable:"-",sleep:"Сон",minutes:"мин",room_temp:"Температура в помещении",outdoor_temp:"Уличная температура",lock_users_active:"Пользовательское управление заблокировано",lock_automations_active:"Изменения автоматизации заблокированы",code_error:"Неверный код",lock:"Блокировать",unlock:"Разблокировать",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5","New strings for recent edits. Please translate":"-------------------------------------",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Температуры пресетов",preset_mod_no_entities:"Не найдено объектов температуры пресетов для этого устройства.",preset_row_heat:"Обогрев",preset_row_heat_away:"Обогрев (отсутствие)",preset_row_cool:"Охлаждение",preset_row_cool_away:"Охлаждение (отсутствие)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},oe="Тема",ae="Классический",ne="VTherm",se="Без цвета",re="Gunmalmg",le={common:te,editor:ee,extra_states:ie,theme:oe,theme_classic:ae,theme_vtherm:ne,theme_uncolored:se,theme_gunmalmg:re},ce=Object.freeze({__proto__:null,common:te,default:le,editor:ee,extra_states:ie,theme:oe,theme_classic:ae,theme_gunmalmg:re,theme_uncolored:se,theme_vtherm:ne}),de={version:"wersja",current:"aktualna"},he={card:{climate:{allow_lock_toggle:"Zezwalaj na blokowanie/odblokowanie karty",autoStartStopEnableEntity:"Encja autoSTART/autoSTOP",powerEntity:"Encja poboru mocy",disable_window:"Wyłącz okno",disable_autoStartStop:"Wyłącz autoSTART/autoSTOP",disable_overpowering:"Wyłącz przeciążenie",disable_heat:"Wyłącz tryb grzania",disable_cool:"Wyłącz tryb chłodzenia",disable_heat_cool:"Wyłącz tryb 'grzanie/chłodzenie'",disable_auto:"Wyłącz tryb automatyczny",disable_fan_only:"Wyłącz tryb wentylatora",disable_dry:"Wyłącz tryb osuszania",disable_off:"Wyłącz tryb 'OFF'",disable_sleep:"Wyłącz tryb uśpienia",disable_menu:"Wyłącz menu",set_current_as_main:"Zamień temperaturę docelową z temperaturą pomieszczenia",disable_safety_warning:"Wyłącz ostrzeżenie bezpieczeństwa",disable_buttons:"Wyłącz przyciski +/- (plus/minus)",disable_power_infos:"Wyłącz komunikaty mocy",disable_auto_fan_infos:"Wyłącz komunikaty autowentylacji",disable_name:"Wyłącz nazwę",disable_target_icon:"Wyłącz ikonę",theme:"Motyw",theme_classic:"Klasyczny",theme_vtherm:"VTherm",theme_uncolored:"Bez koloru",theme_gunmalmg:"Gunmalmg",section_all_themes:"Dla wszystkich motywów",section_classic_only:"Dla motywu klasycznego, bez koloru i VTherm",menu_system:"Menu systemowe",disable_presets:"Wyłącz presety",disable_timed_preset:"Wyłącz czas trwania presetu",use_manual_duration_input:"Zamiast selektora zezwól na ręczne ustawienie czasu",allow_preset_modification:"Zezwól na modyfikację temperatur ustawień wstępnych",show_status_text:"Pokaż aktualny status jako tekst",show_background_gradient_on_active:"Pokaż gradient tła suwaka, gdy encja jest aktywna",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity",show_humidity:"Pokaż wilgotność"}}},ue={window_open:"Otwarte okno",window_bypass:"Załączone pomijanie okien",night_mode:"Tryb nocny",eco:"Tryb Eko",overpowering:"Wykryte przeciążenie",none:"Ręczny",theme:"Motyw",theme_classic:"Klasyczny",theme_vtherm:"VTherm",theme_uncolored:"Bez koloru",theme_gunmalmg:"Gunmalmg",comfort:"Komfort",boost:"Boost",frost:"Ochrona przed mrozem",power:"Przeciążenie",activity:"Wykryto aktywność",presence:"Wykryto obecność",motion:"Wykryto ruch",undefined:"Brak",auto_regulation_light:"Słaby",auto_regulation_medium:"Średni",auto_regulation_strong:"Silny",auto_regulation_slow:"Powolny",auto_regulation_expert:"Ekspert",auto_fan_mode:"Autowentylacja",auto_fan_mode_off:"Wyłączony",auto_fan_none:"Brak",auto_fan_low:"Niski",auto_fan_medium:"Średni",auto_fan_high:"Wysoki",auto_fan_boost:"Boost",fan_low:"Niski",fan_low_mid:"Niskośredni",fan_mid:"Średni",fan_mid_high:"Średniowysoki",fan_high:"Wysoki",fan_mute:"Cichy",fan_turbo:"Turbo",fan_none:"Brak",fan_auto:"Auto",change_message:"Kliknij aby zmienić preset",toggle_message:"Kliknij aby przełączyć",auto_start_stop:"Zatrzymany przez autoSTART/autoSTOP",auto_start_stop_enable:"Załącz/wyłącz autoSTART/autoSTOP",auto_start_stop_label:"AutoSTART/autoSTOP",temp_unavailable:"-",sleep:"Uśpienie","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Temp. pomieszczenia",outdoor_temp:"Temp. zewnętrzna",safety_warning:"Ostrzeżenie",safety_warning_msg:"Błąd temperatury",hvac_off_manual:"Wyłączony ręcznie",hvac_off_auto_start_stop:"Wyłączony przez autoSTART/autoSTOP",hvac_off_window_detection:"Wyłączony prze otwarcie okna",hvac_off_sleep_mode:"Wyłączony przez tryb uśpienia",hvac_off_safety_detection:"Wyłączony przez tryb bezpieczny",hvac_off_central_mode:"Wyłączony przez tryb główny",safety_detected:"Wykryty tryb bezpieczny",overpowering_detected:"Wykryte przeciążenie",target_temp_window_eco:"Docelowa temp.: Eko okno",target_temp_window_frost:"Docelowa temp.: ochr. przed mrozem okno",target_temp_power:"Docelowa temp.: moc",target_temp_central_mode:"Docelowa temp.: tryb główny",target_temp_activity_detected:"Docelowa temp.: wykryta aktywność",target_temp_activity_not_detected:"Docelowa temp.: brak aktywności",target_temp_absence_detected:"Docelowa temp.: wykryta nieobecność","messages-button":"Dlaczego taki stan?",recalculation_scheduled:"Aktualizacja urządzeń w toku","window-bypass-button":"Przełącz pomijanie okna",lock_users_active:"Sterowanie użytkownika zablokowane",lock_automations_active:"Zmiany automatyzacji zablokowane",code_error:"Błędny kod",lock:"Zablokuj",unlock:"Odblokuj",heating_failure:"Wykryto błąd ogrzewania",cooling_failure:"Wykryto błąd chłodzenia",fan_1:"Prędkość 1",fan_2:"Prędkość 2",fan_3:"Prędkość 3",fan_4:"Prędkość 4",fan_5:"Prędkość 5",target_temp_timed_preset:"Aktywny preset czasowy",timed_preset_title:"Czas trwania (w min., 0 = stały)",timed_preset_active:"Aktywny preset czasowy",cancel_timed_preset:"Usuń preset czasowy",increase_temp:"Zwiększ temperaturę",decrease_temp:"Obniż temperaturę",not_initialized:"Błąd inicjalizacji",preset_mod_title:"Temperatury ustawień wstępnych",preset_mod_no_entities:"Nie znaleziono jednostek temperatury ustawień wstępnych dla tego urządzenia.",preset_row_heat:"Ogrzewanie",preset_row_heat_away:"Ogrzewanie (nieobecność)",preset_row_cool:"Chłodzenie",preset_row_cool_away:"Chłodzenie (nieobecność)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Ustawiony na tryb wentylatora przez autoSTART/autoSTOP",hvac_dry_auto_start_stop:"Ustawiony na tryb osuszania przez autoSTART/autoSTOP"},pe={common:de,editor:he,extra_states:ue},me=Object.freeze({__proto__:null,common:de,default:pe,editor:he,extra_states:ue}),_e={version:"verzia",current:"aktuálny"},fe={card:{climate:{disable_window:"Zakázať okno",disable_overpowering:"Zakázať leto",disable_heat:"Zakázať kúrenie",disable_cool:"Zakázať chladenie",disable_heat_cool:"Zakázať kúrenie/chladenie",disable_auto:"Zakázat automatic",disable_fan_only:"Zakázať režim ventilátora",disable_dry:"Zakázať sušenie",disable_off:"Vypnúť",disable_menu:"Zakázať menu",disable_safety_warning:"Zakázať bezpečnostné správy",disable_buttons:"Zakázať plus/mínus tlačidlá",eco_temperature:"Eco teplota",set_current_as_main:"Vymeňte cieľ za miesta s aktuálnou teplotou",allow_lock_toggle:"Povoliť uzamknutie/odomknutie z karty",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_autoStartStop:"Disable auto-startStop",disable_sleep:"Disable sleep mode",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Povoliť úpravu teplôt predvolieb",show_status_text:"Zobraziť aktuálny stav textom",show_background_gradient_on_active:"Zobraziť prechod pozadia posúvača, keď je entita aktívna",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity",show_humidity:"Zobraziť vlhkosť"}}},ge={window_open:"Okno otvorené",night_mode:"Nočný mód",eco:"Eco",overpowering:"Leto",lock_users_active:"Ovládanie používateľa zamknuté",lock_automations_active:"Zmeny automatizácie zamknuté",code_error:"Chybný kód",lock:"Zamknúť",unlock:"Odomknúť",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Teploty predvolieb",preset_mod_no_entities:"Pre toto zariadenie neboli nájdené žiadne entity teplôt predvolieb.",preset_row_heat:"Kúrenie",preset_row_heat_away:"Kúrenie (neprítomnosť)",preset_row_cool:"Chladenie",preset_row_cool_away:"Chladenie (neprítomnosť)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},be="Téma",ve="Klasický",ye="VTherm",we="Bez farby",xe="Gunmalmg",ke={common:_e,editor:fe,extra_states:ge,theme:be,theme_classic:ve,theme_vtherm:ye,theme_uncolored:we,theme_gunmalmg:xe},Se={version:"Verzió",current:"Aktuális"},Te={card:{climate:{disable_window:"Ablak kikapcsolás",disable_overpowering:"Nyár kikapcsolás",disable_heat:"Fűtés kikacsolás",disable_cool:"Hűtés kikapcsolás",disable_heat_cool:"Fűtés/Hűtés kikapcsolás",disable_auto:"Auto kikapcsolás",disable_fan_only:"Csak ventillátor kikapcsolás",disable_dry:"Szárítás kikapcsolás",disable_off:"Kikapcsolás inaktiválás",eco_temperature:"Eco hőmérséklet",set_current_as_main:"Aktuális hőmérséklet használata",allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_autoStartStop:"Disable auto-startStop",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Előbeállítási hőmérsékletek módosításának engedélyezése",show_status_text:"Aktuális állapot megjelenítése szövegként",show_background_gradient_on_active:"A csúszka háttérszínátmenetének megjelenítése, ha az entitás aktív",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity",show_humidity:"Páratartalom megjelenítése"}}},Me={window_open:"Ablak nyitva",night_mode:"Éjszakai mód",eco:"Eco",overpowering:"Nyár",lock_users_active:"Felhasználói vezérlők zárolva",lock_automations_active:"Automatizálási változtatások zárolva",code_error:"Rossz kód",lock:"Zárolás",unlock:"Feloldás",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Előbeállítási hőmérsékletek",preset_mod_no_entities:"Nem találhatók előbeállítási hőmérséklet entitások ehhez az eszközhöz.",preset_row_heat:"Fűtés",preset_row_heat_away:"Fűtés (távol)",preset_row_cool:"Hűtés",preset_row_cool_away:"Hűtés (távol)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},De="Téma",Ce="Klasszikus",Ae="VTherm",Pe="Színtelen",Ee="Gunmalmg",Le={common:Se,editor:Te,extra_states:Me,theme:De,theme_classic:Ce,theme_vtherm:Ae,theme_uncolored:Pe,theme_gunmalmg:Ee},$e={version:"version",current:"nuværende"},ze={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Tillad ændring af forudindstillingstemperaturer",show_status_text:"Vis aktuel status som tekst",show_background_gradient_on_active:"Vis skyderens baggrundsgradient, når enheden er aktiv",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity",show_humidity:"Vis luftfugtighed"}}},Oe={window_open:"Vindue åben",night_mode:"Nattilstand",eco:"Eco",overpowering:"Overpowering",lock_users_active:"Brugerkontroller låst",lock_automations_active:"Automatiske ændringer låst",code_error:"Forkert kode",lock:"Lås",unlock:"Lås op",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Forudindstilte temperaturer",preset_mod_no_entities:"Ingen forudindstillede temperaturenheder fundet for denne enhed.",preset_row_heat:"Varme",preset_row_heat_away:"Varme fraværende",preset_row_cool:"Køling",preset_row_cool_away:"Køling fraværende",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},Ve="Tema",He="Klassisk",Ie="VTherm",Re="Ufarvet",Fe="Gunmalmg",Ne={common:$e,editor:ze,extra_states:Oe,theme:Ve,theme_classic:He,theme_vtherm:Ie,theme_uncolored:Re,theme_gunmalmg:Fe},je={version:"version",current:"Actual"},We={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",show_status_text:"Mostrar el estado actual en texto",show_background_gradient_on_active:"Mostrar el degradado de fondo del control deslizante cuando la entidad está activa",allow_preset_modification:"Allow preset temperature modification",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity",show_humidity:"Mostrar humedad"}}},Be={window_open:"Ventana abierta",night_mode:"Modo noche",eco:"Eco",overpowering:"Verano",lock_users_active:"Controles de usuario bloqueados",lock_automations_active:"Cambios de automatización bloqueados",code_error:"Código incorrecto",lock:"Bloquear",unlock:"Desbloquear",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",increase_temp:"Aumentar la temperatura",decrease_temp:"Disminuir la temperatura",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",not_initialized:"Initialisation error",preset_mod_title:"Temperaturas de presets",preset_mod_no_entities:"No se encontraron entidades de temperatura de preset para este dispositivo.",preset_row_heat:"Calefacción",preset_row_heat_away:"Calefacción ausente",preset_row_cool:"Refrigeración",preset_row_cool_away:"Refrigeración ausente",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},Ue="Tema",Ye="Clásico",qe="VTherm",Ze="Sin color",Xe="Gunmalmg",Ke={common:je,editor:We,extra_states:Be,theme:Ue,theme_classic:Ye,theme_vtherm:qe,theme_uncolored:Ze,theme_gunmalmg:Xe},Ge={version:"versiyon",current:"şimdiki"},Qe={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Ön ayar sıcaklıklarının değiştirilmesine izin ver",show_status_text:"Mevcut durumu metin olarak göster",show_background_gradient_on_active:"Varlık etkinken kaydırıcı arka plan gradyanını göster",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity",show_humidity:"Nem oranını göster"}}},Je={window_open:"Pencere açık",night_mode:"Gece modu",eco:"Eco",overpowering:"Yaz",lock_users_active:"Kullanıcı kontrolleri kilitlendi",lock_automations_active:"Otomasyon değişiklikleri kilitlendi",code_error:"Hatalı kod",lock:"Kilitle",unlock:"Kilidi aç",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Ön ayar sıcaklıkları",preset_mod_no_entities:"Bu cihaz için ön ayar sıcaklığı varlıkları bulunamadı.",preset_row_heat:"Isıtma",preset_row_heat_away:"Isıtma (uzakta)",preset_row_cool:"Soğutma",preset_row_cool_away:"Soğutma (uzakta)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},ti="Tema",ei="Klasik",ii="VTherm",oi="Renksiz",ai="Gunmalmg",ni={common:Ge,editor:Qe,extra_states:Je,theme:ti,theme_classic:ei,theme_vtherm:ii,theme_uncolored:oi,theme_gunmalmg:ai},si={version:"versione",current:"attuale"},ri={card:{climate:{autoStartStopEnableEntity:"Entità di avvio/arresto automatico",powerEntity:"Entità di consumo energetico",theme:"Tema",theme_classic:"Classico",theme_vtherm:"VTherm",theme_uncolored:"Senza colore",theme_gunmalmg:"Gunmalmg",section_all_themes:"Per tutti i temi",section_classic_only:"Per i temi Classic, VTherm e Uncolored",menu_system:"System menu",disable_window:"Disabilita la finestra",disable_autoStartStop:"Disabilita Avvio/Arresto automatico",disable_overpowering:"Disabilita la sovralimentazione",disable_heat:"Disabilita Riscalda",disable_cool:"Disabilita Raffresca",disable_heat_cool:"Disabilita Riscalda/Raffredda",disable_auto:"Disabilita Automatico",disable_fan_only:"Disabilita Ventilazione",disable_dry:"Disabilita Deumidifica",disable_off:"Disabilita off",disable_menu:"Disabilita menu",set_current_as_main:"Scambia Setpoint con Temperatura ambiente",disable_safety_warning:"Disabilita i messaggi di sicurezza",disable_buttons:"Disabilita pulsanti Più/Meno",disable_power_infos:"Disabilita Info Potenza",disable_auto_fan_infos:"Disabilita Info auto-fan",disable_name:"Disabilita nome",disable_target_icon:"Disabilita icona obbiettivo",allow_lock_toggle:"Consenti blocco/sblocco dalla card",disable_sleep:"Disabilita modo riposo",disable_timed_preset:"Disattiva immissione durata preimpostata",use_manual_duration_input:"Consenti l'inserimento manuale della durata invece della selezione",disable_presets:"Disabilita preimpostazioni",allow_preset_modification:"Consenti la modifica delle temperature dei preset",show_status_text:"Mostra lo stato attuale come testo",show_background_gradient_on_active:"Mostra il gradiente di sfondo del cursore quando l'entità è attiva",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity",show_humidity:"Mostra umidità"}}},li={window_open:"Finestra aperta",window_bypass:"Bypass finestra Attivo",eco:"Eco",overpowering:"Rilevata Sovrapotenza",none:"Manuale",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Sovrapotenza",activity:"Rilevata Attività",presence:"Rilevata Presenza",motion:"Rilevato movimento",auto_regulation_light:"Leggero",auto_regulation_medium:"Medio",auto_regulation_strong:"Forte",auto_regulation_slow:"Lento",auto_regulation_expert:"Esperto",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"Nulla",auto_fan_none:"Nulla",auto_fan_low:"Basso",auto_fan_medium:"Medio",auto_fan_high:"Alto",auto_fan_boost:"Boost",fan_low:"Basso",fan_low_mid:"Medio-basso",fan_mid:"Medio",fan_mid_high:"Medio-alto",fan_high:"Alto",fan_mute:"Silenzioso",fan_turbo:"Turbo",fan_none:"Nulla",fan_auto:"Auto",fan_1:"Velocità 1",fan_2:"Velocità 2",fan_3:"Velocità 3",fan_4:"Velocità 4",fan_5:"Velocità 5",change_message:"Click per cambio preimpostazione",toggle_message:"Click per commutare",auto_start_stop:"Fermato da auto-start/stop",auto_start_stop_enable:"Abilita/disabilita auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Riposo","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Temp. ambiente",outdoor_temp:"Temp. esterna",safety_warning:"Avviso",safety_warning_msg:"Guasto Temp.",hvac_off_manual:"Spento manualmente",hvac_off_auto_start_stop:"Spento da auto-start/stop",hvac_off_window_detection:"Spento da rilevamento finestra",hvac_off_sleep_mode:"Spento da modo notte",hvac_off_safety_detection:"Spento da modalità sicurezza",hvac_off_central_mode:"Spento da modalità centralizzato",safety_detected:"Modalità sicurezza rilavata",overpowering_detected:"Sovrapotenza rilevata",target_temp_window_eco:"Temp. impostata: window eco",target_temp_window_frost:"Temp. impostata: window freddo",target_temp_power:"Temp. impostata: power",target_temp_central_mode:"Temp. impostata: modalità centralizzata",target_temp_activity_detected:"Temp. impostata: rilevata atività",target_temp_activity_not_detected:"Temp. impostata: attività non rilevata",target_temp_absence_detected:"Temp. impostata: assenza rilevata",target_temp_timed_preset:"Preimpostazione a tempo attiva",lock_users_active:"Controlli utente bloccati",lock_automations_active:"Modifiche automazioni bloccate","messages-button":"Perchè questo stato?",recalculation_scheduled:"Aggiornamento sottostanti in corso","window-bypass-button":"Commuta bypass finestra",code_error:"Codice errato",lock:"Blocca",unlock:"Sblocca",timed_preset_title:"Durata in minuti (0 = permanente)",timed_preset_active:"Preimpostazione temporizzata attiva",cancel_timed_preset:"Disattiva Preimpostazione temporizzata",heating_failure:"Rilevato guasto al riscaldamento",cooling_failure:"Rilevato guasto al raffrescamento",increase_temp:"Aumenta la temperatura",decrease_temp:"Diminuisci la temperatura",night_mode:"Modalità notte",undefined:"Nulla",not_initialized:"Errore di inizializzazione",preset_mod_title:"Temperature dei preset",preset_mod_no_entities:"Nessuna entità di temperatura preset trovata per questo dispositivo.",preset_row_heat:"Riscaldamento",preset_row_heat_away:"Riscaldamento (assente)",preset_row_cool:"Raffreddamento",preset_row_cool_away:"Raffreddamento (assente)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Impostato su sola ventola da auto-start/stop",hvac_dry_auto_start_stop:"Impostato su deumidificazione da auto-start/stop"},ci={common:si,editor:ri,extra_states:li},di={version:"versão",current:"actual"},hi={card:{climate:{disable_window:"Desactivar Janela",disable_overpowering:"Desactivar Verão",disable_heat:"Desactivar Aquecimento",disable_cool:"Desactivar Arrefecimento",disable_heat_cool:"Desactivar Aquecimento/Arrefecimento",disable_auto:"Desactivar Auto",disable_fan_only:"Desactivar Ventilação",disable_dry:"Desactivar Secagem",disable_off:"Desactivar Off",eco_temperature:"Modo Eco",set_current_as_main:"Mudar para a temperatura local actual",theme:"Tema",theme_classic:"Clássico",theme_vtherm:"VTherm",theme_uncolored:"Sem cor",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",menu_system:"System menu",disable_autoStartStop:"Disable auto-startStop",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Permitir modificação das temperaturas de predefinição",show_status_text:"Mostrar o estado atual em texto",show_background_gradient_on_active:"Mostrar o gradiente de fundo do controle deslizante quando a entidade está ativa",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity",show_humidity:"Mostrar humidade"}}},ui={window_open:"Janela Aberta",night_mode:"Modo Noturno",eco:"Eco",overpowering:"Verão",lock_users_active:"Controlos de utilizador bloqueados",lock_automations_active:"Alterações de automação bloqueadas",code_error:"Código incorreto",lock:"Bloquear",unlock:"Desbloquear",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Temperaturas das predefinições",preset_mod_no_entities:"Nenhuma entidade de temperatura de predefinição encontrada para este dispositivo.",preset_row_heat:"Aquecimento",preset_row_heat_away:"Aquecimento (ausente)",preset_row_cool:"Arrefecimento",preset_row_cool_away:"Arrefecimento (ausente)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},pi={common:di,editor:hi,extra_states:ui},mi={version:"版本",current:"当前"},_i={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"允许修改预设温度",show_status_text:"以文本形式显示当前状态",show_background_gradient_on_active:"当实体处于活动状态时显示滑块背景渐变",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity",show_humidity:"显示湿度"}}},fi={window_open:"窗户打开",night_mode:"夜间模式",eco:"节能",overpowering:"夏季",lock_users_active:"用户控制已锁定",lock_automations_active:"自动化更改已锁定",code_error:"代码错误",lock:"锁定",unlock:"解锁",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"预设温度",preset_mod_no_entities:"未找到该设备的预设温度实体。",preset_row_heat:"制热",preset_row_heat_away:"制热(离开)",preset_row_cool:"制冷",preset_row_cool_away:"制冷(离开)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},gi="VTherm",bi="Gunmalmg",vi={common:mi,editor:_i,extra_states:fi,theme:"主题",theme_classic:"经典",theme_vtherm:gi,theme_uncolored:"无颜色",theme_gunmalmg:bi},yi={version:"версія",current:"поточний"},wi={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Дозволити зміну температур попередніх налаштувань",show_status_text:"Показувати поточний статус у вигляді тексту",show_background_gradient_on_active:"Показувати фоновий градієнт повзунка, коли сутність активна",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity",show_humidity:"Показати вологість"}}},xi={window_open:"Вікно відчинено",night_mode:"Нічний режим",eco:"Економія",overpowering:"Літо",lock_users_active:"Керування користувача заблоковано",lock_automations_active:"Зміни автоматизації заблоковані",code_error:"Невірний код",lock:"Блокувати",unlock:"Розблокувати",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Температури попередніх налаштувань",preset_mod_no_entities:"Не знайдено об'єктів температури попередніх налаштувань для цього пристрою.",preset_row_heat:"Опалення",preset_row_heat_away:"Опалення (відсутність)",preset_row_cool:"Охолодження",preset_row_cool_away:"Охолодження (відсутність)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},ki="Тема",Si="Класичний",Ti="VTherm",Mi="Без кольору",Di="Gunmalmg",Ci={common:yi,editor:wi,extra_states:xi,theme:ki,theme_classic:Si,theme_vtherm:Ti,theme_uncolored:Mi,theme_gunmalmg:Di},Ai={version:"έκδοση",current:"τρέχουσα"},Pi={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Να επιτρέπεται η τροποποίηση θερμοκρασιών προεπιλογής",show_status_text:"Εμφάνιση τρέχουσας κατάστασης σε κείμενο",show_background_gradient_on_active:"Εμφάνιση της διαβάθμισης φόντου του ρυθμιστικού όταν η οντότητα είναι ενεργή",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity",show_humidity:"Εμφάνιση υγρασίας"}}},Ei={window_open:"Παράθυρο ανοικτό",night_mode:"Λειτουργία νυκτός",eco:"Εξοικονόμηση",overpowering:"Καλοκαίρι",lock_users_active:"Έλεγχοι χρήστη κλειδωμένοι",lock_automations_active:"Αλλαγές αυτοματισμών κλειδωμένες",code_error:"Λάθος κωδικός",lock:"Κλείδωμα",unlock:"Ξεκλείδωμα",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Θερμοκρασίες προεπιλογής",preset_mod_no_entities:"Δεν βρέθηκαν οντότητες θερμοκρασίας προεπιλογής για αυτή τη συσκευή.",preset_row_heat:"Θέρμανση",preset_row_heat_away:"Θέρμανση (απουσία)",preset_row_cool:"Ψύξη",preset_row_cool_away:"Ψύξη (απουσία)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},Li="Θέμα",$i="Κλασικό",zi="VTherm",Oi="Χωρίς χρώμα",Vi="Gunmalmg",Hi={common:Ai,editor:Pi,extra_states:Ei,theme:Li,theme_classic:$i,theme_vtherm:zi,theme_uncolored:Oi,theme_gunmalmg:Vi},Ii={version:"versie",current:"huidig"},Ri={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Voorkeursinstellingstemperaturen aanpassen toestaan",show_status_text:"Toon huidige status als tekst",show_background_gradient_on_active:"Toon achtergrondgradiënt van de schuifregelaar wanneer de entiteit actief is",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity",show_humidity:"Luchtvochtigheid tonen"}}},Fi={window_open:"Raam open",night_mode:"Nacht modus",eco:"Eco",overpowering:"Zomer",lock_users_active:"Gebruikersbediening vergrendeld",lock_automations_active:"Automatisatie wijzigingen vergrendeld",code_error:"Foute code",lock:"Vergrendelen",unlock:"Ontgrendelen",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Voorkeursinstellingstemperaturen",preset_mod_no_entities:"Geen entiteiten voor voorkeursinstellingstemperaturen gevonden voor dit apparaat.",preset_row_heat:"Verwarming",preset_row_heat_away:"Verwarming (afwezig)",preset_row_cool:"Koeling",preset_row_cool_away:"Koeling (afwezig)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},Ni="Thema",ji="Classic",Wi="VTherm",Bi="Ongekleurd",Ui="Gunmalmg",Yi={common:Ii,editor:Ri,extra_states:Fi,theme:Ni,theme_classic:ji,theme_vtherm:Wi,theme_uncolored:Bi,theme_gunmalmg:Ui},qi={version:"versjon",current:"nåværende"},Zi={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Tillat endring av forhåndsinnstillingstemperaturer",show_status_text:"Vis gjeldende status som tekst",show_background_gradient_on_active:"Vis glidebryterens bakgrunnsgradient når enheten er aktiv",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity",show_humidity:"Vis luftfuktighet"}}},Xi={window_open:"Vindu åpent",night_mode:"Nattmodus",eco:"Eco",overpowering:"Sommer",lock_users_active:"Brukerkontroller låst",lock_automations_active:"Automatiseringsendringer låst",code_error:"Feil kode",lock:"Lås",unlock:"Lås opp",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Forhåndsinnstillingstemperaturer",preset_mod_no_entities:"Ingen forhåndsinnstillingstemperaturenheter funnet for denne enheten.",preset_row_heat:"Varme",preset_row_heat_away:"Varme (fraværende)",preset_row_cool:"Kjøling",preset_row_cool_away:"Kjøling (fraværende)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},Ki="Tema",Gi="Klassisk",Qi="VTherm",Ji="Uten farge",to="Gunmalmg",eo={common:qi,editor:Zi,extra_states:Xi,theme:Ki,theme_classic:Gi,theme_vtherm:Qi,theme_uncolored:Ji,theme_gunmalmg:to},io={version:"verze",current:"aktuální"},oo={card:{climate:{disable_window:"Zakázat okno",disable_overpowering:"Zakázat léto",disable_heat:"Zakázat topení",disable_cool:"Zakázat chlazení",disable_heat_cool:"Zakázat topení/chlazení",disable_auto:"Zakázať automatic",disable_fan_only:"Zakázat pouze ventilátor",disable_dry:"Zakázat sušení",disable_off:"Zakázat vypnuto",disable_menu:"Zakázat menu",disable_safety_warning:"Zakázat bezpečnostní oznámení",disable_buttons:"Zakázat tlačítka plus/minus",eco_temperature:"Eco teplota",set_current_as_main:"Prohodit místa cílovoé a aktáalní teploty",allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_autoStartStop:"Disable auto-startStop",disable_sleep:"Disable sleep mode",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Povolit úpravu teplot předvoleb",show_status_text:"Zobrazit aktuální stav textem",show_background_gradient_on_active:"Zobrazit přechod pozadí posuvníku, když je entita aktivní",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity",show_humidity:"Zobrazit vlhkost"}}},ao={window_open:"okno otevřeno",night_mode:"Noční režim",eco:"Eco",overpowering:"Léto",lock_users_active:"Uživatelské ovládání zamčeno",lock_automations_active:"Změny automatizace zamčeny",code_error:"Chybný kód",lock:"Zamknout",unlock:"Odemknout",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Teploty předvoleb",preset_mod_no_entities:"Pro toto zařízení nebyly nalezeny žádné entity teplot předvoleb.",preset_row_heat:"Topení",preset_row_heat_away:"Topení nepřítomnost",preset_row_cool:"Chlazení",preset_row_cool_away:"Chlazení nepřítomnost",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},no="Téma",so="Klasické",ro="VTherm",lo="Bez barvy",co="Gunmalmg",ho={common:io,editor:oo,extra_states:ao,theme:no,theme_classic:so,theme_vtherm:ro,theme_uncolored:lo,theme_gunmalmg:co},uo={version:"različica",current:"trenutno"},po={card:{climate:{allow_lock_toggle:"Dovoli zaklepanje/odklepanje iz kartice",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Dovoli spremembo temperatur prednastavitev",show_status_text:"Prikaži trenutno stanje kot besedilo",show_background_gradient_on_active:"Prikaži preliv ozadja drsnika, ko je entiteta aktivna",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity",show_humidity:"Prikaži vlažnost"}}},mo={window_open:"Okno odprto",night_mode:"Nočni način",eco:"Eko",overpowering:"Poletje",lock_users_active:"Uporabniške kontrole zaklenjene",lock_automations_active:"Spremembe avtomatizacije zaklenjene",code_error:"Napačna koda",lock:"Zakleni",unlock:"Odkleni",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Temperature prednastavitev",preset_mod_no_entities:"Za to napravo ni bila najdena nobena entiteta temperature prednastavitve.",preset_row_heat:"Ogrevanje",preset_row_heat_away:"Ogrevanje (odsotnost)",preset_row_cool:"Hlajenje",preset_row_cool_away:"Hlajenje (odsotnost)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},_o="Tema",fo="Klasična",go="VTherm",bo="Brez barve",vo="Gunmalmg",yo={common:uo,editor:po,extra_states:mo,theme:_o,theme_classic:fo,theme_vtherm:go,theme_uncolored:bo,theme_gunmalmg:vo},wo={version:"version",current:"Nuvarande"},xo={window_open:"Fönster öppet",night_mode:"Nattläge",eco:"Eco",overpowering:"Sommar",lock_users_active:"Användarkontroller låsta",lock_automations_active:"Automationsändringar låsta",code_error:"Fel kod",lock:"Lås",unlock:"Lås upp",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Förinställningstemperaturer",preset_mod_no_entities:"Inga förinställningstemperaturenheter hittades för den här enheten.",preset_row_heat:"Värme",preset_row_heat_away:"Värme (frånvaro)",preset_row_cool:"Kyla",preset_row_cool_away:"Kyla (frånvaro)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},ko="Tema",So="Klassisk",To="VTherm",Mo="Omdfärgad",Do="Gunmalmg",Co={card:{climate:{autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",allow_lock_toggle:"Allow lock/unlock from card",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Tillåt ändring av förinställningstemperaturer",show_status_text:"Visa aktuell status som text",show_background_gradient_on_active:"Visa reglagets bakgrundsgradient när entiteten är aktiv",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity",show_humidity:"Visa luftfuktighet"}}},Ao={common:wo,extra_states:xo,theme:ko,theme_classic:So,theme_vtherm:To,theme_uncolored:Mo,theme_gunmalmg:Do,editor:Co},Po={version:"версия",currrent:"текущий",current:"current"},Eo={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Позволи промяна на температурите на предварителни настройки",show_status_text:"Показване на статуса като текст",show_background_gradient_on_active:"Показване на фоновия градиент на плъзгача, когато обектът е активен",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity",show_humidity:"Показване на влажността"}}},Lo={window_open:"Отворен прозорец",night_mode:"Нощен режим",eco:"Екологичен режим",overpowering:"Лято",lock_users_active:"Потребителските контроли са заключени",lock_automations_active:"Промените от автоматизации са заключени",code_error:"Грешен код",lock:"Заключване",unlock:"Отключване",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Температури на предварителни настройки",preset_mod_no_entities:"Не са намерени обекти за температура на предварителни настройки за това устройство.",preset_row_heat:"Отопление",preset_row_heat_away:"Отопление (отсъствие)",preset_row_cool:"Охлаждане",preset_row_cool_away:"Охлаждане (отсъствие)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},$o="Тема",zo="Класически",Oo="VTherm",Vo="Без цвят",Ho="Gunmalmg",Io={common:Po,editor:Eo,extra_states:Lo,theme:$o,theme_classic:zo,theme_vtherm:Oo,theme_uncolored:Vo,theme_gunmalmg:Ho},Ro={version:"version",current:"Nykyinen"},Fo={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Salli esiasetuslämpötilojen muokkaus",show_status_text:"Näytä nykyinen tila tekstinä",show_background_gradient_on_active:"Näytä liukusäätimen taustaliukuväri, kun entiteetti on aktiivinen",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity",show_humidity:"Näytä kosteus"}}},No={window_open:"Ikkuna auki",night_mode:"Yötila",eco:"Eco",overpowering:"Kesä",lock_users_active:"Käyttäjän säädöt lukittu",lock_automations_active:"Automaation muutokset lukittu",code_error:"Virheellinen koodi",lock:"Lukitse",unlock:"Avaa lukitus",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Esiasetuslämpötilat",preset_mod_no_entities:"Tälle laitteelle ei löydetty esiasetuslämpötilaobjekteja.",preset_row_heat:"Lämmitys",preset_row_heat_away:"Lämmitys (poissa)",preset_row_cool:"Jäähdytys",preset_row_cool_away:"Jäähdytys (poissa)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},jo="Teema",Wo="Klassinen",Bo="VTherm",Uo="Väritön",Yo="Gunmalmg",qo={common:Ro,editor:Fo,extra_states:No,theme:jo,theme_classic:Wo,theme_vtherm:Bo,theme_uncolored:Uo,theme_gunmalmg:Yo},Zo={version:"versiune",current:"curent"},Xo={card:{climate:{allow_lock_toggle:"Permite blocarea/deblocarea din card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Permite modificarea temperaturilor presetate",show_status_text:"Afișează starea curentă ca text",show_background_gradient_on_active:"Afișează gradientul de fundal al glisorului când entitatea este activă",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity",show_humidity:"Afișează umiditatea"}}},Ko={window_open:"Fereastră deschisă",night_mode:"Mod noapte",eco:"Eco",overpowering:"Vară",lock_users_active:"Comenzi utilizator blocate",lock_automations_active:"Modificări automatizări blocate",code_error:"Cod incorect",lock:"Blocare",unlock:"Deblocare",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Temperaturi presetate",preset_mod_no_entities:"Nu s-au găsit entități de temperatură presetată pentru acest dispozitiv.",preset_row_heat:"Încălzire",preset_row_heat_away:"Încălzire (absent)",preset_row_cool:"Răcire",preset_row_cool_away:"Răcire (absent)",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},Go="Temă",Qo="Clasic",Jo="VTherm",ta="Fără culoare",ea="Gunmalmg",ia={common:Zo,editor:Xo,extra_states:Ko,theme:Go,theme_classic:Qo,theme_vtherm:Jo,theme_uncolored:ta,theme_gunmalmg:ea},oa={version:"versió",current:"Actual"},aa={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Permet la modificació de les temperatures de preset",show_status_text:"Mostra l'estat actual en text",show_background_gradient_on_active:"Mostra el degradat de fons del control lliscant quan l'entitat està activa",show_regulation_chart:"Show regulation chart",autoStartStopStopModeEntity:"Auto-start/stop stop mode entity",autoFanEnableEntity:"Auto-fan entity",show_humidity:"Mostra la humitat"}}},na={window_open:"Finestra oberta",night_mode:"Mode nocturn",eco:"Eco",overpowering:"Estiu",lock_users_active:"Controls d'usuari bloquejats",lock_automations_active:"Canvis d'automatització bloquejats",code_error:"Codi incorrecte",lock:"Bloquejar",unlock:"Desbloquejar",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Temperatures dels presets",preset_mod_no_entities:"No s'han trobat entitats de temperatura de preset per a aquest dispositiu.",preset_row_heat:"Calefacció",preset_row_heat_away:"Calefacció absent",preset_row_cool:"Refrigeració",preset_row_cool_away:"Refrigeració absent",regulation_chart_title:"Regulation chart",auto_start_stop_mode_disabled:"Disabled",auto_start_stop_mode_off:"Turn off",auto_start_stop_mode_fan_only:"Fan only",auto_start_stop_mode_dry:"Dry",hvac_fan_only_auto_start_stop:"Set to fan-only by auto-start/stop",hvac_dry_auto_start_stop:"Set to dry by auto-start/stop"},sa="Tema",ra="Clàssic",la="VTherm",ca="Sense color",da="Gunmalmg",ha={common:oa,editor:aa,extra_states:na,theme:sa,theme_classic:ra,theme_vtherm:la,theme_uncolored:ca,theme_gunmalmg:da};const ua={en:Wt,de:Zt,fr:Jt,ru:ce,sk:Object.freeze({__proto__:null,common:_e,default:ke,editor:fe,extra_states:ge,theme:be,theme_classic:ve,theme_gunmalmg:xe,theme_uncolored:we,theme_vtherm:ye}),hu:Object.freeze({__proto__:null,common:Se,default:Le,editor:Te,extra_states:Me,theme:De,theme_classic:Ce,theme_gunmalmg:Ee,theme_uncolored:Pe,theme_vtherm:Ae}),pl:me,da:Object.freeze({__proto__:null,common:$e,default:Ne,editor:ze,extra_states:Oe,theme:Ve,theme_classic:He,theme_gunmalmg:Fe,theme_uncolored:Re,theme_vtherm:Ie}),es:Object.freeze({__proto__:null,common:je,default:Ke,editor:We,extra_states:Be,theme:Ue,theme_classic:Ye,theme_gunmalmg:Xe,theme_uncolored:Ze,theme_vtherm:qe}),tr:Object.freeze({__proto__:null,common:Ge,default:ni,editor:Qe,extra_states:Je,theme:ti,theme_classic:ei,theme_gunmalmg:ai,theme_uncolored:oi,theme_vtherm:ii}),it:Object.freeze({__proto__:null,common:si,default:ci,editor:ri,extra_states:li}),pt:Object.freeze({__proto__:null,common:di,default:pi,editor:hi,extra_states:ui}),cn:Object.freeze({__proto__:null,common:mi,default:vi,editor:_i,extra_states:fi,theme:"主题",theme_classic:"经典",theme_gunmalmg:bi,theme_uncolored:"无颜色",theme_vtherm:gi}),uk:Object.freeze({__proto__:null,common:yi,default:Ci,editor:wi,extra_states:xi,theme:ki,theme_classic:Si,theme_gunmalmg:Di,theme_uncolored:Mi,theme_vtherm:Ti}),el:Object.freeze({__proto__:null,common:Ai,default:Hi,editor:Pi,extra_states:Ei,theme:Li,theme_classic:$i,theme_gunmalmg:Vi,theme_uncolored:Oi,theme_vtherm:zi}),nl:Object.freeze({__proto__:null,common:Ii,default:Yi,editor:Ri,extra_states:Fi,theme:Ni,theme_classic:ji,theme_gunmalmg:Ui,theme_uncolored:Bi,theme_vtherm:Wi}),no:Object.freeze({__proto__:null,common:qi,default:eo,editor:Zi,extra_states:Xi,theme:Ki,theme_classic:Gi,theme_gunmalmg:to,theme_uncolored:Ji,theme_vtherm:Qi}),cs:Object.freeze({__proto__:null,common:io,default:ho,editor:oo,extra_states:ao,theme:no,theme_classic:so,theme_gunmalmg:co,theme_uncolored:lo,theme_vtherm:ro}),sl:Object.freeze({__proto__:null,common:uo,default:yo,editor:po,extra_states:mo,theme:_o,theme_classic:fo,theme_gunmalmg:vo,theme_uncolored:bo,theme_vtherm:go}),sv:Object.freeze({__proto__:null,common:wo,default:Ao,editor:Co,extra_states:xo,theme:ko,theme_classic:So,theme_gunmalmg:Do,theme_uncolored:Mo,theme_vtherm:To}),bg:Object.freeze({__proto__:null,common:Po,default:Io,editor:Eo,extra_states:Lo,theme:$o,theme_classic:zo,theme_gunmalmg:Ho,theme_uncolored:Vo,theme_vtherm:Oo}),fi:Object.freeze({__proto__:null,common:Ro,default:qo,editor:Fo,extra_states:No,theme:jo,theme_classic:Wo,theme_gunmalmg:Yo,theme_uncolored:Uo,theme_vtherm:Bo}),ro:Object.freeze({__proto__:null,common:Zo,default:ia,editor:Xo,extra_states:Ko,theme:Go,theme_classic:Qo,theme_gunmalmg:ea,theme_uncolored:ta,theme_vtherm:Jo}),ca:Object.freeze({__proto__:null,common:oa,default:ha,editor:aa,extra_states:na,theme:sa,theme_classic:ra,theme_gunmalmg:da,theme_uncolored:ca,theme_vtherm:la})},pa="en";function ma({hass:t,string:e,search:i="",replace:o=""}){var a;const n=null!==(a=null==t?void 0:t.locale.language)&&void 0!==a?a:pa;let s;try{s=e.split(".").reduce(((t,e)=>t[e]),ua[n])}catch(t){s=e.split(".").reduce(((t,e)=>t[e]),ua.en)}return void 0===s&&(s=e.split(".").reduce(((t,e)=>t[e]),ua.en)),""!==i&&""!==o&&(s=s.replace(i,o)),s}function _a(t,e){try{return t.split(".").reduce(((t,e)=>t[e]),ua[e])}catch(t){return}}function fa(t){return function(e){var i;let o=_a(e,null!==(i=null==t?void 0:t.locale.language)&&void 0!==i?i:pa);return o||(o=_a(e,pa)),null!=o?o:e}}var ga,ba,va=Number.isNaN||function(t){return"number"==typeof t&&t!=t};function ya(t,e){if(t.length!==e.length)return!1;for(var i=0;i<t.length;i++)if(o=t[i],a=e[i],!(o===a||va(o)&&va(a)))return!1;var o,a;return!0}function wa(t,e){void 0===e&&(e=ya);var i=null;function o(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];if(i&&i.lastThis===this&&e(o,i.lastArgs))return i.lastResult;var n=t.apply(this,o);return i={lastResult:n,lastArgs:o,lastThis:this},n}return o.clear=function(){i=null},o}wa((t=>new Intl.DateTimeFormat(t.language,{weekday:"long",month:"long",day:"numeric"}))),wa((t=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric"}))),wa((t=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"numeric",day:"numeric"}))),wa((t=>new Intl.DateTimeFormat(t.language,{day:"numeric",month:"short"}))),wa((t=>new Intl.DateTimeFormat(t.language,{month:"long",year:"numeric"}))),wa((t=>new Intl.DateTimeFormat(t.language,{month:"long"}))),wa((t=>new Intl.DateTimeFormat(t.language,{year:"numeric"}))),function(t){t.language="language",t.system="system",t.comma_decimal="comma_decimal",t.decimal_comma="decimal_comma",t.space_comma="space_comma",t.none="none"}(ga||(ga={})),function(t){t.language="language",t.system="system",t.am_pm="12",t.twenty_four="24"}(ba||(ba={}));const xa=wa((t=>{if(t.time_format===ba.language||t.time_format===ba.system){const e=t.time_format===ba.language?t.language:void 0,i=(new Date).toLocaleString(e);return i.includes("AM")||i.includes("PM")}return t.time_format===ba.am_pm}));wa((t=>new Intl.DateTimeFormat("en"!==t.language||xa(t)?t.language:"en-u-hc-h23",{year:"numeric",month:"long",day:"numeric",hour:xa(t)?"numeric":"2-digit",minute:"2-digit",hour12:xa(t)}))),wa((t=>new Intl.DateTimeFormat("en"!==t.language||xa(t)?t.language:"en-u-hc-h23",{year:"numeric",month:"long",day:"numeric",hour:xa(t)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hour12:xa(t)}))),wa((t=>new Intl.DateTimeFormat("en"!==t.language||xa(t)?t.language:"en-u-hc-h23",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",hour12:xa(t)}))),wa((t=>new Intl.DateTimeFormat("en"!==t.language||xa(t)?t.language:"en-u-hc-h23",{hour:"numeric",minute:"2-digit",hour12:xa(t)}))),wa((t=>new Intl.DateTimeFormat("en"!==t.language||xa(t)?t.language:"en-u-hc-h23",{hour:xa(t)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hour12:xa(t)}))),wa((t=>new Intl.DateTimeFormat("en"!==t.language||xa(t)?t.language:"en-u-hc-h23",{weekday:"long",hour:xa(t)?"numeric":"2-digit",minute:"2-digit",hour12:xa(t)})));const ka=(t,e,i,o)=>{o=o||{},i=null==i?{}:i;const a=new Event(e,{bubbles:void 0===o.bubbles||o.bubbles,cancelable:Boolean(o.cancelable),composed:void 0===o.composed||o.composed});return a.detail=i,t.dispatchEvent(a),a},Sa=(t,e,i)=>Math.min(Math.max(t,e),i),Ta=(t,e,i)=>{const o=e?(t=>{switch(t.number_format){case ga.comma_decimal:return["en-US","en"];case ga.decimal_comma:return["de","es","it"];case ga.space_comma:return["fr","sv","cs"];case ga.system:return;default:return t.language}})(e):void 0;if(Number.isNaN=Number.isNaN||function t(e){return"number"==typeof e&&t(e)},(null==e?void 0:e.number_format)!==ga.none&&!Number.isNaN(Number(t))&&Intl)try{return new Intl.NumberFormat(o,Ma(t,i)).format(Number(t))}catch(e){return console.error(e),new Intl.NumberFormat(void 0,Ma(t,i)).format(Number(t))}return"string"==typeof t?t:`${((t,e=2)=>Math.round(t*10**e)/10**e)(t,null==i?void 0:i.maximumFractionDigits).toString()}${"currency"===(null==i?void 0:i.style)?` ${i.currency}`:""}`},Ma=(t,e)=>{const i=Object.assign({maximumFractionDigits:2},e);if("string"!=typeof t)return i;if(!e||!e.minimumFractionDigits&&!e.maximumFractionDigits){const e=t.indexOf(".")>-1?t.split(".")[1].length:0;i.minimumFractionDigits=e,i.maximumFractionDigits=e}return i};class Da extends TypeError{constructor(t,e){let i;const{message:o,explanation:a,...n}=t,{path:s}=t,r=0===s.length?o:`At path: ${s.join(".")} -- ${o}`;super(a??r),null!=a&&(this.cause=r),Object.assign(this,n),this.name=this.constructor.name,this.failures=()=>i??(i=[t,...e()])}}function Ca(t){return"object"==typeof t&&null!=t}function Aa(t){return"symbol"==typeof t?t.toString():"string"==typeof t?JSON.stringify(t):`${t}`}function Pa(t,e,i,o){if(!0===t)return;!1===t?t={}:"string"==typeof t&&(t={message:t});const{path:a,branch:n}=e,{type:s}=i,{refinement:r,message:l=`Expected a value of type \`${s}\`${r?` with refinement \`${r}\``:""}, but received: \`${Aa(o)}\``}=t;return{value:o,type:s,refinement:r,key:a[a.length-1],path:a,branch:n,...t,message:l}}function*Ea(t,e,i,o){(function(t){return Ca(t)&&"function"==typeof t[Symbol.iterator]})(t)||(t=[t]);for(const a of t){const t=Pa(a,e,i,o);t&&(yield t)}}function*La(t,e,i={}){const{path:o=[],branch:a=[t],coerce:n=!1,mask:s=!1}=i,r={path:o,branch:a};if(n&&(t=e.coercer(t,r),s&&"type"!==e.type&&Ca(e.schema)&&Ca(t)&&!Array.isArray(t)))for(const i in t)void 0===e.schema[i]&&delete t[i];let l="valid";for(const o of e.validator(t,r))o.explanation=i.message,l="not_valid",yield[o,void 0];for(let[c,d,h]of e.entries(t,r)){const e=La(d,h,{path:void 0===c?o:[...o,c],branch:void 0===c?a:[...a,d],coerce:n,mask:s,message:i.message});for(const i of e)i[0]?(l=null!=i[0].refinement?"not_refined":"not_valid",yield[i[0],void 0]):n&&(d=i[1],void 0===c?t=d:t instanceof Map?t.set(c,d):t instanceof Set?t.add(d):Ca(t)&&(void 0!==d||c in t)&&(t[c]=d))}if("not_valid"!==l)for(const o of e.refiner(t,r))o.explanation=i.message,l="not_refined",yield[o,void 0];"valid"===l&&(yield[void 0,t])}class $a{constructor(t){const{type:e,schema:i,validator:o,refiner:a,coercer:n=(t=>t),entries:s=function*(){}}=t;this.type=e,this.schema=i,this.entries=s,this.coercer=n,this.validator=o?(t,e)=>Ea(o(t,e),e,this,t):()=>[],this.refiner=a?(t,e)=>Ea(a(t,e),e,this,t):()=>[]}assert(t,e){return za(t,this,e)}create(t,e){return function(t,e,i){const o=Oa(t,e,{coerce:!0,message:i});if(o[0])throw o[0];return o[1]}(t,this,e)}is(t){return function(t,e){const i=Oa(t,e);return!i[0]}(t,this)}mask(t,e){return function(t,e,i){const o=Oa(t,e,{coerce:!0,mask:!0,message:i});if(o[0])throw o[0];return o[1]}(t,this,e)}validate(t,e={}){return Oa(t,this,e)}}function za(t,e,i){const o=Oa(t,e,{message:i});if(o[0])throw o[0]}function Oa(t,e,i={}){const o=La(t,e,i),a=function(t){const{done:e,value:i}=t.next();return e?void 0:i}(o);if(a[0]){const t=new Da(a[0],(function*(){for(const t of o)t[0]&&(yield t[0])}));return[t,void 0]}return[void 0,a[1]]}function Va(t,e){return new $a({type:t,schema:null,validator:e})}function Ha(){return Va("any",(()=>!0))}function Ia(t){return new $a({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[i,o]of e.entries())yield[i,o,t]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||`Expected an array value, but received: ${Aa(t)}`})}function Ra(){return Va("boolean",(t=>"boolean"==typeof t))}function Fa(t){const e=Aa(t),i=typeof t;return new $a({type:"literal",schema:"string"===i||"number"===i||"boolean"===i?t:null,validator:i=>i===t||`Expected the literal \`${e}\`, but received: ${Aa(i)}`})}function Na(){return Va("number",(t=>"number"==typeof t&&!isNaN(t)||`Expected a number, but received: ${Aa(t)}`))}function ja(t){const e=t?Object.keys(t):[],i=Va("never",(()=>!1));return new $a({type:"object",schema:t||null,*entries(o){if(t&&Ca(o)){const a=new Set(Object.keys(o));for(const i of e)a.delete(i),yield[i,o[i],t[i]];for(const t of a)yield[t,o[t],i]}},validator:t=>Ca(t)||`Expected an object, but received: ${Aa(t)}`,coercer:t=>Ca(t)?{...t}:t})}function Wa(t){return new $a({...t,validator:(e,i)=>void 0===e||t.validator(e,i),refiner:(e,i)=>void 0===e||t.refiner(e,i)})}function Ba(){return Va("string",(t=>"string"==typeof t||`Expected a string, but received: ${Aa(t)}`))}function Ua(t){const e=Object.keys(t);return new $a({type:"type",schema:t,*entries(i){if(Ca(i))for(const o of e)yield[o,i[o],t[o]]},validator:t=>Ca(t)||`Expected an object, but received: ${Aa(t)}`,coercer:t=>Ca(t)?{...t}:t})}function Ya(t){const e=t.map((t=>t.type)).join(" | ");return new $a({type:"union",schema:null,coercer(e){for(const i of t){const[t,o]=i.validate(e,{coerce:!0});if(!t)return o}return e},validator(i,o){const a=[];for(const e of t){const[...t]=La(i,e,o),[n]=t;if(!n[0])return[];for(const[e]of t)e&&a.push(e)}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${Aa(i)}`,...a]}})}const qa=ja({user:Ba()}),Za=Ya([Ra(),ja({text:Wa(Ba()),excemptions:Wa(Ia(qa))})]),Xa=ja({action:Fa("url"),url_path:Ba(),confirmation:Wa(Za)}),Ka=ja({action:Fa("call-service"),service:Ba(),service_data:Wa(ja()),data:Wa(ja()),target:Wa(ja({entity_id:Wa(Ya([Ba(),Ia(Ba())])),device_id:Wa(Ya([Ba(),Ia(Ba())])),area_id:Wa(Ya([Ba(),Ia(Ba())]))})),confirmation:Wa(Za)}),Ga=ja({action:Fa("navigate"),navigation_path:Ba(),confirmation:Wa(Za)}),Qa=Ua({action:Fa("fire-dom-event")}),Ja=ja({action:function(t){const e={},i=t.map((t=>Aa(t))).join();for(const i of t)e[i]=i;return new $a({type:"enums",schema:e,validator:e=>t.includes(e)||`Expected one of \`${i}\`, but received: ${Aa(e)}`})}(["none","toggle","more-info","call-service","url","navigate"]),confirmation:Wa(Za)});var tn;tn=t=>{if(t&&"object"==typeof t&&"action"in t)switch(t.action){case"call-service":return Ka;case"fire-dom-event":return Qa;case"navigate":return Ga;case"url":return Xa}return Ja},new $a({type:"dynamic",schema:null,*entries(t,e){const i=tn(t,e);yield*i.entries(t,e)},validator:(t,e)=>tn(t,e).validator(t,e),coercer:(t,e)=>tn(t,e).coercer(t,e),refiner:(t,e)=>tn(t,e).refiner(t,e)}),s`
|
||
#sortable a:nth-of-type(2n) paper-icon-item {
|
||
animation-name: keyframes1;
|
||
animation-iteration-count: infinite;
|
||
transform-origin: 50% 10%;
|
||
animation-delay: -0.75s;
|
||
animation-duration: 0.25s;
|
||
}
|
||
|
||
#sortable a:nth-of-type(2n-1) paper-icon-item {
|
||
animation-name: keyframes2;
|
||
animation-iteration-count: infinite;
|
||
animation-direction: alternate;
|
||
transform-origin: 30% 5%;
|
||
animation-delay: -0.5s;
|
||
animation-duration: 0.33s;
|
||
}
|
||
|
||
#sortable a {
|
||
height: 48px;
|
||
display: flex;
|
||
}
|
||
|
||
#sortable {
|
||
outline: none;
|
||
display: block !important;
|
||
}
|
||
|
||
.hidden-panel {
|
||
display: flex !important;
|
||
}
|
||
|
||
.sortable-fallback {
|
||
display: none;
|
||
}
|
||
|
||
.sortable-ghost {
|
||
opacity: 0.4;
|
||
}
|
||
|
||
.sortable-fallback {
|
||
opacity: 0;
|
||
}
|
||
|
||
@keyframes keyframes1 {
|
||
0% {
|
||
transform: rotate(-1deg);
|
||
animation-timing-function: ease-in;
|
||
}
|
||
|
||
50% {
|
||
transform: rotate(1.5deg);
|
||
animation-timing-function: ease-out;
|
||
}
|
||
}
|
||
|
||
@keyframes keyframes2 {
|
||
0% {
|
||
transform: rotate(1deg);
|
||
animation-timing-function: ease-in;
|
||
}
|
||
|
||
50% {
|
||
transform: rotate(-1.5deg);
|
||
animation-timing-function: ease-out;
|
||
}
|
||
}
|
||
|
||
.show-panel,
|
||
.hide-panel {
|
||
display: none;
|
||
position: absolute;
|
||
top: 0;
|
||
right: 4px;
|
||
--mdc-icon-button-size: 40px;
|
||
}
|
||
|
||
:host([rtl]) .show-panel {
|
||
right: initial;
|
||
left: 4px;
|
||
}
|
||
|
||
.hide-panel {
|
||
top: 4px;
|
||
right: 8px;
|
||
}
|
||
|
||
:host([rtl]) .hide-panel {
|
||
right: initial;
|
||
left: 8px;
|
||
}
|
||
|
||
:host([expanded]) .hide-panel {
|
||
display: block;
|
||
}
|
||
|
||
:host([expanded]) .show-panel {
|
||
display: inline-flex;
|
||
}
|
||
|
||
paper-icon-item.hidden-panel,
|
||
paper-icon-item.hidden-panel span,
|
||
paper-icon-item.hidden-panel ha-icon[slot="item-icon"] {
|
||
color: var(--secondary-text-color);
|
||
cursor: pointer;
|
||
}
|
||
`;const en=([[t,e],[i,o]],[a,n])=>[t*a+e*n,i*a+o*n],on=([t,e],[i,o])=>[t+i,e+o],an=t=>t/180*Math.PI,nn=t=>{const{x:e,y:i,r:o,start:a,end:n,rotate:s=0}=t,r=e,l=i,c=o,d=o,h=an(a),u=(an(n)-h)%(2*Math.PI),p=an(s),m=(t=>[[Math.cos(t),-Math.sin(t)],[Math.sin(t),Math.cos(t)]])(p),[_,f]=on(en(m,[c*Math.cos(h),d*Math.sin(h)]),[r,l]),[g,b]=on(en(m,[c*Math.cos(h+u),d*Math.sin(h+u)]),[r,l]),v=u>Math.PI?1:0,y=u>0?1:0;return["M",_,f,"A",c,d,p/(2*Math.PI)*360,v,y,g,b].join(" ")};function sn(){return sn=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])}return t},sn.apply(this,arguments)}function rn(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function ln(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var cn;cn="function"!=typeof Object.assign?function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var o=arguments[i];if(null!=o)for(var a in o)o.hasOwnProperty(a)&&(e[a]=o[a])}return e}:Object.assign;var dn,hn=cn,un=["","webkit","Moz","MS","ms","o"],pn="undefined"==typeof document?{style:{}}:document.createElement("div"),mn=Math.round,_n=Math.abs,fn=Date.now;function gn(t,e){for(var i,o,a=e[0].toUpperCase()+e.slice(1),n=0;n<un.length;){if((o=(i=un[n])?i+a:e)in t)return o;n++}}dn="undefined"==typeof window?{}:window;var bn=gn(pn.style,"touchAction"),vn=void 0!==bn;var yn="compute",wn="auto",xn="manipulation",kn="none",Sn="pan-x",Tn="pan-y",Mn=function(){if(!vn)return!1;var t={},e=dn.CSS&&dn.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(i){return t[i]=!e||dn.CSS.supports("touch-action",i)})),t}(),Dn="ontouchstart"in dn,Cn=void 0!==gn(dn,"PointerEvent"),An=Dn&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),Pn="touch",En="mouse",Ln=25,$n=1,zn=4,On=8,Vn=1,Hn=2,In=4,Rn=8,Fn=16,Nn=Hn|In,jn=Rn|Fn,Wn=Nn|jn,Bn=["x","y"],Un=["clientX","clientY"];function Yn(t,e,i){var o;if(t)if(t.forEach)t.forEach(e,i);else if(void 0!==t.length)for(o=0;o<t.length;)e.call(i,t[o],o,t),o++;else for(o in t)t.hasOwnProperty(o)&&e.call(i,t[o],o,t)}function qn(t,e){return"function"==typeof t?t.apply(e&&e[0]||void 0,e):t}function Zn(t,e){return t.indexOf(e)>-1}var Xn=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){t===yn&&(t=this.compute()),vn&&this.manager.element.style&&Mn[t]&&(this.manager.element.style[bn]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var t=[];return Yn(this.manager.recognizers,(function(e){qn(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(Zn(t,kn))return kn;var e=Zn(t,Sn),i=Zn(t,Tn);return e&&i?kn:e||i?e?Sn:Tn:Zn(t,xn)?xn:wn}(t.join(" "))},e.preventDefaults=function(t){var e=t.srcEvent,i=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var o=this.actions,a=Zn(o,kn)&&!Mn[kn],n=Zn(o,Tn)&&!Mn[Tn],s=Zn(o,Sn)&&!Mn[Sn];if(a){var r=1===t.pointers.length,l=t.distance<2,c=t.deltaTime<250;if(r&&l&&c)return}if(!s||!n)return a||n&&i&Nn||s&&i&jn?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function Kn(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function Gn(t){var e=t.length;if(1===e)return{x:mn(t[0].clientX),y:mn(t[0].clientY)};for(var i=0,o=0,a=0;a<e;)i+=t[a].clientX,o+=t[a].clientY,a++;return{x:mn(i/e),y:mn(o/e)}}function Qn(t){for(var e=[],i=0;i<t.pointers.length;)e[i]={clientX:mn(t.pointers[i].clientX),clientY:mn(t.pointers[i].clientY)},i++;return{timeStamp:fn(),pointers:e,center:Gn(e),deltaX:t.deltaX,deltaY:t.deltaY}}function Jn(t,e,i){i||(i=Bn);var o=e[i[0]]-t[i[0]],a=e[i[1]]-t[i[1]];return Math.sqrt(o*o+a*a)}function ts(t,e,i){i||(i=Bn);var o=e[i[0]]-t[i[0]],a=e[i[1]]-t[i[1]];return 180*Math.atan2(a,o)/Math.PI}function es(t,e){return t===e?Vn:_n(t)>=_n(e)?t<0?Hn:In:e<0?Rn:Fn}function is(t,e,i){return{x:e/t||0,y:i/t||0}}function os(t,e){var i=t.session,o=e.pointers,a=o.length;i.firstInput||(i.firstInput=Qn(e)),a>1&&!i.firstMultiple?i.firstMultiple=Qn(e):1===a&&(i.firstMultiple=!1);var n=i.firstInput,s=i.firstMultiple,r=s?s.center:n.center,l=e.center=Gn(o);e.timeStamp=fn(),e.deltaTime=e.timeStamp-n.timeStamp,e.angle=ts(r,l),e.distance=Jn(r,l),function(t,e){var i=e.center,o=t.offsetDelta||{},a=t.prevDelta||{},n=t.prevInput||{};e.eventType!==$n&&n.eventType!==zn||(a=t.prevDelta={x:n.deltaX||0,y:n.deltaY||0},o=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=a.x+(i.x-o.x),e.deltaY=a.y+(i.y-o.y)}(i,e),e.offsetDirection=es(e.deltaX,e.deltaY);var c,d,h=is(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=h.x,e.overallVelocityY=h.y,e.overallVelocity=_n(h.x)>_n(h.y)?h.x:h.y,e.scale=s?(c=s.pointers,Jn((d=o)[0],d[1],Un)/Jn(c[0],c[1],Un)):1,e.rotation=s?function(t,e){return ts(e[1],e[0],Un)+ts(t[1],t[0],Un)}(s.pointers,o):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,o,a,n,s=t.lastInterval||e,r=e.timeStamp-s.timeStamp;if(e.eventType!==On&&(r>Ln||void 0===s.velocity)){var l=e.deltaX-s.deltaX,c=e.deltaY-s.deltaY,d=is(r,l,c);o=d.x,a=d.y,i=_n(d.x)>_n(d.y)?d.x:d.y,n=es(l,c),t.lastInterval=e}else i=s.velocity,o=s.velocityX,a=s.velocityY,n=s.direction;e.velocity=i,e.velocityX=o,e.velocityY=a,e.direction=n}(i,e);var u,p=t.element,m=e.srcEvent;Kn(u=m.composedPath?m.composedPath()[0]:m.path?m.path[0]:m.target,p)&&(p=u),e.target=p}function as(t,e,i){var o=i.pointers.length,a=i.changedPointers.length,n=e&$n&&o-a==0,s=e&(zn|On)&&o-a==0;i.isFirst=!!n,i.isFinal=!!s,n&&(t.session={}),i.eventType=e,os(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function ns(t){return t.trim().split(/\s+/g)}function ss(t,e,i){Yn(ns(e),(function(e){t.addEventListener(e,i,!1)}))}function rs(t,e,i){Yn(ns(e),(function(e){t.removeEventListener(e,i,!1)}))}function ls(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var cs=function(){function t(t,e){var i=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){qn(t.options.enable,[t])&&i.handler(e)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&ss(this.element,this.evEl,this.domHandler),this.evTarget&&ss(this.target,this.evTarget,this.domHandler),this.evWin&&ss(ls(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&rs(this.element,this.evEl,this.domHandler),this.evTarget&&rs(this.target,this.evTarget,this.domHandler),this.evWin&&rs(ls(this.element),this.evWin,this.domHandler)},t}();function ds(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var o=0;o<t.length;){if(i&&t[o][i]==e||!i&&t[o]===e)return o;o++}return-1}var hs={pointerdown:$n,pointermove:2,pointerup:zn,pointercancel:On,pointerout:On},us={2:Pn,3:"pen",4:En,5:"kinect"},ps="pointerdown",ms="pointermove pointerup pointercancel";dn.MSPointerEvent&&!dn.PointerEvent&&(ps="MSPointerDown",ms="MSPointerMove MSPointerUp MSPointerCancel");var _s=function(t){function e(){var i,o=e.prototype;return o.evEl=ps,o.evWin=ms,(i=t.apply(this,arguments)||this).store=i.manager.session.pointerEvents=[],i}return rn(e,t),e.prototype.handler=function(t){var e=this.store,i=!1,o=t.type.toLowerCase().replace("ms",""),a=hs[o],n=us[t.pointerType]||t.pointerType,s=n===Pn,r=ds(e,t.pointerId,"pointerId");a&$n&&(0===t.button||s)?r<0&&(e.push(t),r=e.length-1):a&(zn|On)&&(i=!0),r<0||(e[r]=t,this.callback(this.manager,a,{pointers:e,changedPointers:[t],pointerType:n,srcEvent:t}),i&&e.splice(r,1))},e}(cs);function fs(t){return Array.prototype.slice.call(t,0)}function gs(t,e,i){for(var o=[],a=[],n=0;n<t.length;){var s=e?t[n][e]:t[n];ds(a,s)<0&&o.push(t[n]),a[n]=s,n++}return i&&(o=e?o.sort((function(t,i){return t[e]>i[e]})):o.sort()),o}var bs={touchstart:$n,touchmove:2,touchend:zn,touchcancel:On},vs=function(t){function e(){var i;return e.prototype.evTarget="touchstart touchmove touchend touchcancel",(i=t.apply(this,arguments)||this).targetIds={},i}return rn(e,t),e.prototype.handler=function(t){var e=bs[t.type],i=ys.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:Pn,srcEvent:t})},e}(cs);function ys(t,e){var i,o,a=fs(t.touches),n=this.targetIds;if(e&(2|$n)&&1===a.length)return n[a[0].identifier]=!0,[a,a];var s=fs(t.changedTouches),r=[],l=this.target;if(o=a.filter((function(t){return Kn(t.target,l)})),e===$n)for(i=0;i<o.length;)n[o[i].identifier]=!0,i++;for(i=0;i<s.length;)n[s[i].identifier]&&r.push(s[i]),e&(zn|On)&&delete n[s[i].identifier],i++;return r.length?[gs(o.concat(r),"identifier",!0),r]:void 0}var ws={mousedown:$n,mousemove:2,mouseup:zn},xs=function(t){function e(){var i,o=e.prototype;return o.evEl="mousedown",o.evWin="mousemove mouseup",(i=t.apply(this,arguments)||this).pressed=!1,i}return rn(e,t),e.prototype.handler=function(t){var e=ws[t.type];e&$n&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=zn),this.pressed&&(e&zn&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:En,srcEvent:t}))},e}(cs),ks=2500;function Ss(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var i={x:e.clientX,y:e.clientY},o=this.lastTouches;this.lastTouches.push(i);setTimeout((function(){var t=o.indexOf(i);t>-1&&o.splice(t,1)}),ks)}}function Ts(t,e){t&$n?(this.primaryTouch=e.changedPointers[0].identifier,Ss.call(this,e)):t&(zn|On)&&Ss.call(this,e)}function Ms(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,o=0;o<this.lastTouches.length;o++){var a=this.lastTouches[o],n=Math.abs(e-a.x),s=Math.abs(i-a.y);if(n<=25&&s<=25)return!0}return!1}var Ds=function(){var t=function(t){function e(e,i){var o;return(o=t.call(this,e,i)||this).handler=function(t,e,i){var a=i.pointerType===Pn,n=i.pointerType===En;if(!(n&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(a)Ts.call(ln(ln(o)),e,i);else if(n&&Ms.call(ln(ln(o)),i))return;o.callback(t,e,i)}},o.touch=new vs(o.manager,o.handler),o.mouse=new xs(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}return rn(e,t),e.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(cs);return t}();function Cs(t,e,i){return!!Array.isArray(t)&&(Yn(t,i[e],i),!0)}var As=32,Ps=1;function Es(t,e){var i=e.manager;return i?i.get(t):t}function Ls(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}var $s=function(){function t(t){void 0===t&&(t={}),this.options=sn({enable:!0},t),this.id=Ps++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var e=t.prototype;return e.set=function(t){return hn(this.options,t),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(t){if(Cs(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=Es(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},e.dropRecognizeWith=function(t){return Cs(t,"dropRecognizeWith",this)||(t=Es(t,this),delete this.simultaneous[t.id]),this},e.requireFailure=function(t){if(Cs(t,"requireFailure",this))return this;var e=this.requireFail;return-1===ds(e,t=Es(t,this))&&(e.push(t),t.requireFailure(this)),this},e.dropRequireFailure=function(t){if(Cs(t,"dropRequireFailure",this))return this;t=Es(t,this);var e=ds(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},e.emit=function(t){var e=this,i=this.state;function o(i){e.manager.emit(i,t)}i<8&&o(e.options.event+Ls(i)),o(e.options.event),t.additionalEvent&&o(t.additionalEvent),i>=8&&o(e.options.event+Ls(i))},e.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=As},e.canEmit=function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},e.recognize=function(t){var e=hn({},t);if(!qn(this.options.enable,[this,e]))return this.reset(),void(this.state=As);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},e.process=function(t){},e.getTouchAction=function(){},e.reset=function(){},t}(),zs=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,sn({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},e))||this).pTime=!1,i.pCenter=!1,i._timer=null,i._input=null,i.count=0,i}rn(e,t);var i=e.prototype;return i.getTouchAction=function(){return[xn]},i.process=function(t){var e=this,i=this.options,o=t.pointers.length===i.pointers,a=t.distance<i.threshold,n=t.deltaTime<i.time;if(this.reset(),t.eventType&$n&&0===this.count)return this.failTimeout();if(a&&n&&o){if(t.eventType!==zn)return this.failTimeout();var s=!this.pTime||t.timeStamp-this.pTime<i.interval,r=!this.pCenter||Jn(this.pCenter,t.center)<i.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,r&&s?this.count+=1:this.count=1,this._input=t,0===this.count%i.taps)return this.hasRequireFailures()?(this._timer=setTimeout((function(){e.state=8,e.tryEmit()}),i.interval),2):8}return As},i.failTimeout=function(){var t=this;return this._timer=setTimeout((function(){t.state=As}),this.options.interval),As},i.reset=function(){clearTimeout(this._timer)},i.emit=function(){8===this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},e}($s),Os=function(t){function e(e){return void 0===e&&(e={}),t.call(this,sn({pointers:1},e))||this}rn(e,t);var i=e.prototype;return i.attrTest=function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},i.process=function(t){var e=this.state,i=t.eventType,o=6&e,a=this.attrTest(t);return o&&(i&On||!a)?16|e:o||a?i&zn?8|e:2&e?4|e:2:As},e}($s);function Vs(t){return t===Fn?"down":t===Rn?"up":t===Hn?"left":t===In?"right":""}var Hs=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,sn({event:"pan",threshold:10,pointers:1,direction:Wn},e))||this).pX=null,i.pY=null,i}rn(e,t);var i=e.prototype;return i.getTouchAction=function(){var t=this.options.direction,e=[];return t&Nn&&e.push(Tn),t&jn&&e.push(Sn),e},i.directionTest=function(t){var e=this.options,i=!0,o=t.distance,a=t.direction,n=t.deltaX,s=t.deltaY;return a&e.direction||(e.direction&Nn?(a=0===n?Vn:n<0?Hn:In,i=n!==this.pX,o=Math.abs(t.deltaX)):(a=0===s?Vn:s<0?Rn:Fn,i=s!==this.pY,o=Math.abs(t.deltaY))),t.direction=a,i&&o>e.threshold&&a&e.direction},i.attrTest=function(t){return Os.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},i.emit=function(e){this.pX=e.deltaX,this.pY=e.deltaY;var i=Vs(e.direction);i&&(e.additionalEvent=this.options.event+i),t.prototype.emit.call(this,e)},e}(Os),Is=function(t){function e(e){return void 0===e&&(e={}),t.call(this,sn({event:"swipe",threshold:10,velocity:.3,direction:Nn|jn,pointers:1},e))||this}rn(e,t);var i=e.prototype;return i.getTouchAction=function(){return Hs.prototype.getTouchAction.call(this)},i.attrTest=function(e){var i,o=this.options.direction;return o&(Nn|jn)?i=e.overallVelocity:o&Nn?i=e.overallVelocityX:o&jn&&(i=e.overallVelocityY),t.prototype.attrTest.call(this,e)&&o&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers===this.options.pointers&&_n(i)>this.options.velocity&&e.eventType&zn},i.emit=function(t){var e=Vs(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)},e}(Os),Rs=function(t){function e(e){return void 0===e&&(e={}),t.call(this,sn({event:"pinch",threshold:0,pointers:2},e))||this}rn(e,t);var i=e.prototype;return i.getTouchAction=function(){return[kn]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},i.emit=function(e){if(1!==e.scale){var i=e.scale<1?"in":"out";e.additionalEvent=this.options.event+i}t.prototype.emit.call(this,e)},e}(Os),Fs=function(t){function e(e){return void 0===e&&(e={}),t.call(this,sn({event:"rotate",threshold:0,pointers:2},e))||this}rn(e,t);var i=e.prototype;return i.getTouchAction=function(){return[kn]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)},e}(Os),Ns=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,sn({event:"press",pointers:1,time:251,threshold:9},e))||this)._timer=null,i._input=null,i}rn(e,t);var i=e.prototype;return i.getTouchAction=function(){return[wn]},i.process=function(t){var e=this,i=this.options,o=t.pointers.length===i.pointers,a=t.distance<i.threshold,n=t.deltaTime>i.time;if(this._input=t,!a||!o||t.eventType&(zn|On)&&!n)this.reset();else if(t.eventType&$n)this.reset(),this._timer=setTimeout((function(){e.state=8,e.tryEmit()}),i.time);else if(t.eventType&zn)return 8;return As},i.reset=function(){clearTimeout(this._timer)},i.emit=function(t){8===this.state&&(t&&t.eventType&zn?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=fn(),this.manager.emit(this.options.event,this._input)))},e}($s),js={domEvents:!1,touchAction:yn,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Ws=[[Fs,{enable:!1}],[Rs,{enable:!1},["rotate"]],[Is,{direction:Nn}],[Hs,{direction:Nn},["swipe"]],[zs],[zs,{event:"doubletap",taps:2},["tap"]],[Ns]];function Bs(t,e){var i,o=t.element;o.style&&(Yn(t.options.cssProps,(function(a,n){i=gn(o.style,n),e?(t.oldCssProps[i]=o.style[i],o.style[i]=a):o.style[i]=t.oldCssProps[i]||""})),e||(t.oldCssProps={}))}var Us=function(){function t(t,e){var i,o=this;this.options=hn({},js,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((i=this).options.inputClass||(Cn?_s:An?vs:Dn?Ds:xs))(i,as),this.touchAction=new Xn(this,this.options.touchAction),Bs(this,!0),Yn(this.options.recognizers,(function(t){var e=o.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])}),this)}var e=t.prototype;return e.set=function(t){return hn(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},e.stop=function(t){this.session.stopped=t?2:1},e.recognize=function(t){var e=this.session;if(!e.stopped){var i;this.touchAction.preventDefaults(t);var o=this.recognizers,a=e.curRecognizer;(!a||a&&8&a.state)&&(e.curRecognizer=null,a=null);for(var n=0;n<o.length;)i=o[n],2===e.stopped||a&&i!==a&&!i.canRecognizeWith(a)?i.reset():i.recognize(t),!a&&14&i.state&&(e.curRecognizer=i,a=i),n++}},e.get=function(t){if(t instanceof $s)return t;for(var e=this.recognizers,i=0;i<e.length;i++)if(e[i].options.event===t)return e[i];return null},e.add=function(t){if(Cs(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},e.remove=function(t){if(Cs(t,"remove",this))return this;var e=this.get(t);if(t){var i=this.recognizers,o=ds(i,e);-1!==o&&(i.splice(o,1),this.touchAction.update())}return this},e.on=function(t,e){if(void 0===t||void 0===e)return this;var i=this.handlers;return Yn(ns(t),(function(t){i[t]=i[t]||[],i[t].push(e)})),this},e.off=function(t,e){if(void 0===t)return this;var i=this.handlers;return Yn(ns(t),(function(t){e?i[t]&&i[t].splice(ds(i[t],e),1):delete i[t]})),this},e.emit=function(t,e){this.options.domEvents&&function(t,e){var i=document.createEvent("Event");i.initEvent(t,!0,!0),i.gesture=e,e.target.dispatchEvent(i)}(t,e);var i=this.handlers[t]&&this.handlers[t].slice();if(i&&i.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var o=0;o<i.length;)i[o](e),o++}},e.destroy=function(){this.element&&Bs(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}(),Ys={touchstart:$n,touchmove:2,touchend:zn,touchcancel:On},qs=function(t){function e(){var i,o=e.prototype;return o.evTarget="touchstart",o.evWin="touchstart touchmove touchend touchcancel",(i=t.apply(this,arguments)||this).started=!1,i}return rn(e,t),e.prototype.handler=function(t){var e=Ys[t.type];if(e===$n&&(this.started=!0),this.started){var i=Zs.call(this,t,e);e&(zn|On)&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:Pn,srcEvent:t})}},e}(cs);function Zs(t,e){var i=fs(t.touches),o=fs(t.changedTouches);return e&(zn|On)&&(i=gs(i.concat(o),"identifier",!0)),[i,o]}function Xs(t,e,i){var o="DEPRECATED METHOD: "+e+"\n"+i+" AT \n";return function(){var e=new Error("get-stack-trace"),i=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",a=window.console&&(window.console.warn||window.console.log);return a&&a.call(window.console,o,i),t.apply(this,arguments)}}var Ks=Xs((function(t,e,i){for(var o=Object.keys(e),a=0;a<o.length;)(!i||i&&void 0===t[o[a]])&&(t[o[a]]=e[o[a]]),a++;return t}),"extend","Use `assign`."),Gs=Xs((function(t,e){return Ks(t,e,!0)}),"merge","Use `assign`.");function Qs(t,e,i){var o,a=e.prototype;(o=t.prototype=Object.create(a)).constructor=t,o._super=a,i&&hn(o,i)}function Js(t,e){return function(){return t.apply(e,arguments)}}var tr=function(){var t=function(t,e){return void 0===e&&(e={}),new Us(t,sn({recognizers:Ws.concat()},e))};return t.VERSION="2.0.17-rc",t.DIRECTION_ALL=Wn,t.DIRECTION_DOWN=Fn,t.DIRECTION_LEFT=Hn,t.DIRECTION_RIGHT=In,t.DIRECTION_UP=Rn,t.DIRECTION_HORIZONTAL=Nn,t.DIRECTION_VERTICAL=jn,t.DIRECTION_NONE=Vn,t.DIRECTION_DOWN=Fn,t.INPUT_START=$n,t.INPUT_MOVE=2,t.INPUT_END=zn,t.INPUT_CANCEL=On,t.STATE_POSSIBLE=1,t.STATE_BEGAN=2,t.STATE_CHANGED=4,t.STATE_ENDED=8,t.STATE_RECOGNIZED=8,t.STATE_CANCELLED=16,t.STATE_FAILED=As,t.Manager=Us,t.Input=cs,t.TouchAction=Xn,t.TouchInput=vs,t.MouseInput=xs,t.PointerEventInput=_s,t.TouchMouseInput=Ds,t.SingleTouchInput=qs,t.Recognizer=$s,t.AttrRecognizer=Os,t.Tap=zs,t.Pan=Hs,t.Swipe=Is,t.Pinch=Rs,t.Rotate=Fs,t.Press=Ns,t.on=ss,t.off=rs,t.each=Yn,t.merge=Gs,t.extend=Ks,t.bindFn=Js,t.assign=hn,t.inherit=Qs,t.bindFn=Js,t.prefixed=gn,t.toArray=fs,t.inArray=ds,t.uniqueArray=gs,t.splitStr=ns,t.boolOrFn=qn,t.hasParent=Kn,t.addEventListeners=ss,t.removeEventListeners=rs,t.defaults=hn({},js,{preset:Ws}),t}();tr.defaults;
|
||
/**
|
||
* @license
|
||
* Copyright 2018 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/
|
||
const er=270;const ir=new Set(["ArrowRight","ArrowUp","ArrowLeft","ArrowDown","PageUp","PageDown","Home","End"]);let or=class extends lt{constructor(){super(...arguments),this.disabled=!1,this.step=1,this.min=0,this.max=100,this._localValue=this.value,this._localLow=this.low,this._localHigh=this.high,this._getPercentageFromEvent=t=>{const e=this._slider.getBoundingClientRect(),i=2*(t.center.x-e.left-e.width/2)/e.width,o=2*(t.center.y-e.top-e.height/2)/e.height,[,a]=function(t,e){return[Math.sqrt(t*t+e*e),Math.atan2(e,t)]}(i,o),n=(a/(2*Math.PI)*360+45-135+360)%360-45;return Math.max(Math.min(n/er,1),0)}}_valueToPercentage(t){return(Sa(t,this.min,this.max)-this.min)/(this.max-this.min)}_percentageToValue(t){return(this.max-this.min)*t+this.min}_steppedValue(t){return Math.round(t/this.step)*this.step}_boundedValue(t){var e,i;const o="high"===this._activeSlider?Math.min(null!==(e=this._localLow)&&void 0!==e?e:this.max):this.min,a="low"===this._activeSlider?Math.max(null!==(i=this._localHigh)&&void 0!==i?i:this.min):this.max;return Math.min(Math.max(t,o),a)}firstUpdated(t){super.firstUpdated(t),this._setupListeners()}updated(t){super.updated(t),this._activeSlider||(t.has("value")&&(this._localValue=this.value),t.has("low")&&(this._localLow=this.low),t.has("high")&&(this._localHigh=this.high))}connectedCallback(){super.connectedCallback(),this._setupListeners()}disconnectedCallback(){super.disconnectedCallback()}_findActiveSlider(t){var e,i;if(!this.dual)return"value";const o=Math.max(null!==(e=this._localLow)&&void 0!==e?e:this.min,this.min),a=Math.min(null!==(i=this._localHigh)&&void 0!==i?i:this.max,this.max);if(o>=t)return"low";if(a<=t)return"high";return Math.abs(t-o)<=Math.abs(t-a)?"low":"high"}_setActiveValue(t){switch(this._activeSlider){case"high":this._localHigh=t;break;case"low":this._localLow=t;break;case"value":this._localValue=t}}_getActiveValue(){switch(this._activeSlider){case"high":return this._localHigh;case"low":return this._localLow;case"value":return this._localValue}}_setupListeners(){this._interaction&&!this._mc&&(this._mc=new Us(this._interaction,{inputClass:Ds}),this._mc.add(new Hs({direction:Wn,enable:!0,threshold:0})),this._mc.add(new zs({event:"singletap"})),this._mc.on("pan",(t=>{t.srcEvent.stopPropagation(),t.srcEvent.preventDefault()})),this._mc.on("panstart",(t=>{var e,i;if(this.disabled)return;const o=this._getPercentageFromEvent(t),a=this._percentageToValue(o);this._activeSlider=this._findActiveSlider(a),this._lastSlider=this._activeSlider,null===(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById("#slider"))||void 0===i||i.focus()})),this._mc.on("pancancel",(()=>{this.disabled||(this._activeSlider=void 0)})),this._mc.on("panmove",(t=>{if(this.disabled)return;const e=this._getPercentageFromEvent(t),i=this._percentageToValue(e),o=this._boundedValue(i);this._setActiveValue(o);const a=this._steppedValue(o);this._activeSlider&&ka(this,`${this._activeSlider}-changing`,{value:a})})),this._mc.on("panend",(t=>{if(this.disabled)return;const e=this._getPercentageFromEvent(t),i=this._percentageToValue(e),o=this._boundedValue(i),a=this._steppedValue(o);this._setActiveValue(a),this._activeSlider&&(ka(this,`${this._activeSlider}-changing`,{value:void 0}),ka(this,`${this._activeSlider}-changed`,{value:a})),this._activeSlider=void 0})),this._mc.on("singletap",(t=>{var e,i;if(this.disabled)return;const o=this._getPercentageFromEvent(t),a=this._percentageToValue(o);this._activeSlider=this._findActiveSlider(a);const n=this._boundedValue(a),s=this._steppedValue(n);this._setActiveValue(s),this._activeSlider&&(ka(this,`${this._activeSlider}-changing`,{value:void 0}),ka(this,`${this._activeSlider}-changed`,{value:s})),this._lastSlider=this._activeSlider,null===(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById("#slider"))||void 0===i||i.focus(),this._activeSlider=void 0})))}get _tenPercentStep(){return Math.max(this.step,(this.max-this.min)/10)}_handleKeyDown(t){var e,i,o;if(!ir.has(t.code))return;t.preventDefault(),this._lastSlider&&(null===(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById(this._lastSlider))||void 0===i||i.focus()),this._activeSlider=null!==(o=this._lastSlider)&&void 0!==o?o:t.currentTarget.id,this._lastSlider=void 0;const a=this._getActiveValue();switch(t.code){case"ArrowRight":case"ArrowUp":this._setActiveValue(this._boundedValue((null!=a?a:this.min)+this.step));break;case"ArrowLeft":case"ArrowDown":this._setActiveValue(this._boundedValue((null!=a?a:this.min)-this.step));break;case"PageUp":this._setActiveValue(this._steppedValue(this._boundedValue((null!=a?a:this.min)+this._tenPercentStep)));break;case"PageDown":this._setActiveValue(this._steppedValue(this._boundedValue((null!=a?a:this.min)-this._tenPercentStep)));break;case"Home":this._setActiveValue(this._boundedValue(this.min));break;case"End":this._setActiveValue(this._boundedValue(this.max))}ka(this,`${this._activeSlider}-changing`,{value:this._getActiveValue()}),this._activeSlider=void 0}_handleKeyUp(t){ir.has(t.code)&&(this._activeSlider=t.currentTarget.id,t.preventDefault(),ka(this,`${this._activeSlider}-changing`,{value:void 0}),ka(this,`${this._activeSlider}-changed`,{value:this._getActiveValue()}),this._activeSlider=void 0)}destroyListeners(){this._mc&&(this._mc.destroy(),this._mc=void 0)}_strokeCircleDashArc(t){return this._strokeDashArc(t,t)}_strokeDashArc(t,e){const i=this._valueToPercentage(t),o=this._valueToPercentage(e),a=290*Math.PI*er/360,n=Math.max((o-i)*a,0);return[`${n} ${a-n}`,`-${i*a-.5}`]}renderArc(t,e,i){var o,a;if(this.disabled)return Y;const n=nn({x:0,y:0,start:0,end:er,r:145}),s="end"===i?this.max:this.min,r=null!==(o=this.current)&&void 0!==o?o:s,l=null!=e?e:s,c="end"===i?l<=r:"start"===i&&r<=l,d=c?"end"===i?this._strokeDashArc(l,r):this._strokeDashArc(r,l):this._strokeCircleDashArc(l),h="full"===i?this._strokeDashArc(this.min,this.max):"end"===i?this._strokeDashArc(l,s):this._strokeDashArc(s,l),u=this._strokeCircleDashArc(l),p=null!=this.current&&this.current<=this.max&&this.current>=this.min&&(c||"full"===this.mode)?this._strokeCircleDashArc(this.current):void 0;return B`
|
||
<g class=${bt({inactive:Boolean(this.inactive)})}>
|
||
<path
|
||
class="arc arc-clear"
|
||
d=${n}
|
||
stroke-dasharray=${h[0]}
|
||
stroke-dashoffset=${h[1]}
|
||
/>
|
||
<path
|
||
class="arc arc-colored ${bt({[t]:!0})}"
|
||
d=${n}
|
||
stroke-dasharray=${h[0]}
|
||
stroke-dashoffset=${h[1]}
|
||
/>
|
||
<path
|
||
.id=${t}
|
||
d=${n}
|
||
class="arc arc-active ${bt({[t]:!0})}"
|
||
stroke-dasharray=${d[0]}
|
||
stroke-dashoffset=${d[1]}
|
||
role="slider"
|
||
tabindex="0"
|
||
aria-valuemin=${this.min}
|
||
aria-valuemax=${this.max}
|
||
aria-valuenow=${null!=this._localValue?this._steppedValue(this._localValue):void 0}
|
||
aria-disabled=${this.disabled}
|
||
aria-label=${(t=>t??Y)(null!==(a=this.lowLabel)&&void 0!==a?a:this.label)}
|
||
@keydown=${this._handleKeyDown}
|
||
@keyup=${this._handleKeyUp}
|
||
/>
|
||
${p?B`
|
||
<path
|
||
class="current arc-current"
|
||
d=${n}
|
||
stroke-dasharray=${p[0]}
|
||
stroke-dashoffset=${p[1]}
|
||
/>
|
||
`:Y}
|
||
<path
|
||
class="target-border ${bt({[t]:!0})}"
|
||
d=${n}
|
||
stroke-dasharray=${u[0]}
|
||
stroke-dashoffset=${u[1]}
|
||
/>
|
||
<path
|
||
class="target"
|
||
d=${n}
|
||
stroke-dasharray=${u[0]}
|
||
stroke-dashoffset=${u[1]}
|
||
/>
|
||
</g>
|
||
`}render(){const t=nn({x:0,y:0,start:0,end:er,r:145}),e=this.dual?this._localLow:this._localValue,i=this._localHigh,o=this.current,a=o?this._strokeCircleDashArc(o):void 0;return W`
|
||
<svg
|
||
id="slider"
|
||
viewBox="0 0 320 320"
|
||
overflow="visible"
|
||
class=${bt({pressed:Boolean(this._activeSlider)})}
|
||
@keydown=${this._handleKeyDown}
|
||
tabindex=${this._lastSlider?"0":"-1"}
|
||
>
|
||
<g
|
||
id="container"
|
||
transform="translate(160 160) rotate(${135})"
|
||
>
|
||
<g id="interaction">
|
||
<path d=${t} />
|
||
</g>
|
||
<g id="display">
|
||
<path class="background" d=${t} />
|
||
${a?B`
|
||
<path
|
||
class="current"
|
||
d=${t}
|
||
stroke-dasharray=${a[0]}
|
||
stroke-dashoffset=${a[1]}
|
||
/>
|
||
`:Y}
|
||
${null!=e?this.renderArc(this.dual?"low":"value",e,!this.dual&&this.mode||"start"):Y}
|
||
${this.dual&&null!=i?this.renderArc("high",i,"end"):Y}
|
||
</g>
|
||
</g>
|
||
</svg>
|
||
<slot></slot>
|
||
`}static get styles(){return s`
|
||
:host {
|
||
--clear-background-color: #111111;
|
||
--control-circular-slider-color: var(--primary-color);
|
||
--control-circular-slider-background: var(--disabled-color);
|
||
--control-circular-slider-background-opacity: 0.3;
|
||
--control-circular-slider-low-color: var(
|
||
--control-circular-slider-color
|
||
);
|
||
--control-circular-slider-high-color: var(
|
||
--control-circular-slider-color
|
||
);
|
||
}
|
||
#wrapper {
|
||
position: relative;
|
||
}
|
||
svg {
|
||
width: 320px;
|
||
display: block;
|
||
}
|
||
#slider {
|
||
width: 100%;
|
||
max-width: 233px;
|
||
outline: none;
|
||
margin: 0 auto;
|
||
margin-top: 1em;
|
||
position: relative;
|
||
}
|
||
#interaction {
|
||
display: flex;
|
||
fill: none;
|
||
stroke: transparent;
|
||
stroke-linecap: round;
|
||
stroke-width: 48px;
|
||
cursor: pointer;
|
||
}
|
||
#display {
|
||
pointer-events: none;
|
||
}
|
||
:host([disabled]) #interaction {
|
||
cursor: initial;
|
||
}
|
||
|
||
.background {
|
||
fill: none;
|
||
stroke: var(--control-circular-slider-background);
|
||
opacity: var(--control-circular-slider-background-opacity);
|
||
transition:
|
||
stroke 180ms ease-in-out,
|
||
opacity 180ms ease-in-out;
|
||
stroke-linecap: round;
|
||
stroke-width: 24px;
|
||
}
|
||
|
||
.arc {
|
||
fill: none;
|
||
stroke-linecap: round;
|
||
stroke-width: 24px;
|
||
transition:
|
||
stroke-width 300ms ease-in-out,
|
||
stroke-dasharray 300ms ease-in-out,
|
||
stroke-dashoffset 300ms ease-in-out,
|
||
stroke 180ms ease-in-out,
|
||
opacity 180ms ease-in-out;
|
||
}
|
||
|
||
.target {
|
||
fill: none;
|
||
stroke-linecap: round;
|
||
stroke-width: 18px;
|
||
stroke: white;
|
||
transition:
|
||
stroke-width 300ms ease-in-out,
|
||
stroke-dasharray 300ms ease-in-out,
|
||
stroke-dashoffset 300ms ease-in-out,
|
||
stroke 180ms ease-in-out,
|
||
opacity 180ms ease-in-out;
|
||
}
|
||
|
||
.target-border {
|
||
fill: none;
|
||
stroke-linecap: round;
|
||
stroke-width: 24px;
|
||
stroke: white;
|
||
transition:
|
||
stroke-width 300ms ease-in-out,
|
||
stroke-dasharray 300ms ease-in-out,
|
||
stroke-dashoffset 300ms ease-in-out,
|
||
stroke 180ms ease-in-out,
|
||
opacity 180ms ease-in-out;
|
||
}
|
||
|
||
|
||
|
||
.current {
|
||
fill: none;
|
||
stroke-linecap: round;
|
||
stroke-width: 8px;
|
||
stroke: var(--primary-text-color);
|
||
opacity: 0.5;
|
||
transition:
|
||
stroke-width 300ms ease-in-out,
|
||
stroke-dasharray 300ms ease-in-out,
|
||
stroke-dashoffset 300ms ease-in-out,
|
||
stroke 180ms ease-in-out,
|
||
opacity 180ms ease-in-out;
|
||
}
|
||
|
||
.arc-current {
|
||
stroke: var(--clear-background-color);
|
||
}
|
||
|
||
.arc-clear {
|
||
stroke: var(--clear-background-color);
|
||
}
|
||
.arc-colored {
|
||
opacity: 0.5;
|
||
}
|
||
.arc-active {
|
||
outline: none;
|
||
}
|
||
.arc-active:focus-visible {
|
||
stroke-width: 28px;
|
||
}
|
||
|
||
.pressed .arc,
|
||
.pressed .target,
|
||
.pressed .target-border,
|
||
.pressed .current {
|
||
transition:
|
||
stroke-width 300ms ease-in-out,
|
||
stroke 180ms ease-in-out,
|
||
opacity 180ms ease-in-out;
|
||
}
|
||
|
||
.inactive .arc,
|
||
.inactive .arc-current {
|
||
opacity: 0;
|
||
}
|
||
|
||
.value {
|
||
stroke: var(--control-circular-slider-color);
|
||
}
|
||
|
||
.low {
|
||
stroke: var(--control-circular-slider-low-color);
|
||
}
|
||
|
||
.high {
|
||
stroke: var(--state-climate-cool-color);
|
||
}
|
||
`}};function ar(t){var e,i;return W`
|
||
<ha-card class="gunmalmg-card ${t.hvacMode} ${t._isLocked?"locked":""}">
|
||
${t._showClassicPopup?function(t){var e,i,o;return W`
|
||
<div class="classic-popup-backdrop" @click=${()=>t._closeClassicPopup()}></div>
|
||
<div class="classic-popup-container">
|
||
<ha-icon-button
|
||
class="classic-popup-close"
|
||
.path=${kt}
|
||
@click=${()=>t._closeClassicPopup()}
|
||
tabindex="0"
|
||
></ha-icon-button>
|
||
${(null===(e=t._config)||void 0===e?void 0:e.disable_menu)?"":W`
|
||
<ha-icon-button
|
||
class="classic-popup-more-info"
|
||
.label=${t.hass.localize("ui.panel.lovelace.cards.show_more_info")}
|
||
.path=${St}
|
||
@click=${()=>{t._closeClassicPopup(),t._handleMoreInfo()}}
|
||
tabindex="0"
|
||
></ha-icon-button>
|
||
`}
|
||
<div class="classic-popup-content ${(null===(i=t._config)||void 0===i?void 0:i.allow_preset_modification)?"has-preset-mod":""} ${(null===(o=t._config)||void 0===o?void 0:o.show_regulation_chart)?"has-regulation-chart":""}">
|
||
${t._renderClassicContent(!0)}
|
||
</div>
|
||
</div>
|
||
`}(t):""}
|
||
|
||
<div class="gunmalmg-grid">
|
||
<div class="gunmalmg-name name">${t.name}</div>
|
||
<div class="gunmalmg-left">
|
||
<div class="hvac-mode-tile">
|
||
${t._renderIcon(t.hvacMode,t.hvacMode,!0)}
|
||
</div>
|
||
</div>
|
||
<div class="gunmalmg-center" @click=${()=>t._openClassicPopup()}>
|
||
<div class="temps">
|
||
${(()=>{var e,i,o,a;const n=(null===(e=t.hass)||void 0===e?void 0:e.locale)||void 0,s=new Intl.NumberFormat(n,{minimumFractionDigits:1,maximumFractionDigits:1}),r=t._display_top,l=t._display_bottom,c=(null===(a=null===(o=null===(i=t.hass)||void 0===i?void 0:i.config)||void 0===o?void 0:o.unit_system)||void 0===a?void 0:a.temperature)||"",d=null==r?t.hass?t.hass.localize("extra_states.temp_unavailable"):"":s.format(r),h=null==l?null:s.format(l);return W`
|
||
<div class="gunmalmg-temps-inline">
|
||
<span class="gunmalmg-temp-main ${t._hasError?"has-error":""}">${d}<span class="gunmalmg-uom"> ${c}</span></span>
|
||
${h?W`<span class="gunmalmg-temp-secondary">(${h}<span class="gunmalmg-uom"> ${c}</span>)</span>`:""}
|
||
</div>
|
||
`})()}
|
||
</div>
|
||
</div>
|
||
<div class="gunmalmg-right">
|
||
<div class="gunmalmg-presets-scroll">
|
||
<div id="presets" class="gunmalmg-presets">
|
||
${(null===(e=t._config)||void 0===e?void 0:e.disable_presets)?"":t.presets.map((e=>W`${t._renderPreset(e,t.preset)}`))}
|
||
</div>
|
||
</div>
|
||
<div class="gunmalmg-actions">
|
||
${(null===(i=t._config)||void 0===i?void 0:i.allow_lock_toggle)?W`
|
||
<ha-icon-button
|
||
class="gunmalmg-lock-btn ${t._isLocked?"locked":"unlocked"}"
|
||
.path=${t._isLocked?Pt:Et}
|
||
@click=${t._handleLockToggle}
|
||
tabindex="0"
|
||
></ha-icon-button>
|
||
`:""}
|
||
${function(t){var e,i,o,a;return(null===(e=t._config)||void 0===e?void 0:e.disable_timed_preset)?W``:W`
|
||
<div class="gunmalmg-timed-preset">
|
||
${t.timedPresetActive?W`
|
||
<span class="gunmalmg-timed-remaining"
|
||
title="${ma({hass:t.hass,string:"extra_states.cancel_timed_preset"})}"
|
||
@click=${t._handleCancelTimedPreset}>
|
||
${t._formatRemainingTime(t.timedPresetRemainingTime)}
|
||
</span>
|
||
${(null!==(i=t.timedPresetRemainingTime)&&void 0!==i?i:0)<60?W`
|
||
<span class="gunmalmg-timed-label">${ma({hass:t.hass,string:"extra_states.minutes"})}</span>
|
||
`:""}
|
||
`:(null===(o=t._config)||void 0===o?void 0:o.use_manual_duration_input)?W`
|
||
<input
|
||
type="number"
|
||
class="gunmalmg-timed-input ${t.timedPresetDuration?"active":""}"
|
||
.value=${null!==(a=t.timedPresetDuration)&&void 0!==a?a:""}
|
||
@input=${t._handleTimedPresetDurationChange}
|
||
placeholder="0"
|
||
min="0"
|
||
max="1440"
|
||
title="${ma({hass:t.hass,string:"extra_states.timed_preset_title"})}"
|
||
/>
|
||
<span class="gunmalmg-timed-label">${ma({hass:t.hass,string:"extra_states.minutes"})}</span>
|
||
`:W`
|
||
<select
|
||
class="gunmalmg-timed-select ${t.timedPresetDuration?"active":""}"
|
||
@change=${t._handleTimedPresetSelectChange}
|
||
title="${ma({hass:t.hass,string:"extra_states.timed_preset_title"})}"
|
||
>
|
||
<option value="" ?selected=${!t.timedPresetDuration}>--</option>
|
||
<option value="15" ?selected=${15===t.timedPresetDuration}>15 ${ma({hass:t.hass,string:"extra_states.minutes"})}</option>
|
||
<option value="30" ?selected=${30===t.timedPresetDuration}>30 ${ma({hass:t.hass,string:"extra_states.minutes"})}</option>
|
||
<option value="60" ?selected=${60===t.timedPresetDuration}>1 h</option>
|
||
<option value="120" ?selected=${120===t.timedPresetDuration}>2 h</option>
|
||
<option value="240" ?selected=${240===t.timedPresetDuration}>4 h</option>
|
||
<option value="480" ?selected=${480===t.timedPresetDuration}>8 h</option>
|
||
<option value="1440" ?selected=${1440===t.timedPresetDuration}>24 h</option>
|
||
</select>
|
||
`}
|
||
</div>
|
||
`}(t)}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</ha-card>
|
||
`}t([pt({type:Boolean,reflect:!0})],or.prototype,"disabled",void 0),t([pt({type:Boolean})],or.prototype,"dual",void 0),t([pt({type:String})],or.prototype,"mode",void 0),t([pt({type:Boolean})],or.prototype,"inactive",void 0),t([pt({type:String})],or.prototype,"label",void 0),t([pt({type:String,attribute:"low-label"})],or.prototype,"lowLabel",void 0),t([pt({type:String,attribute:"high-label"})],or.prototype,"highLabel",void 0),t([pt({type:Number})],or.prototype,"value",void 0),t([pt({type:Number})],or.prototype,"low",void 0),t([pt({type:Number})],or.prototype,"high",void 0),t([pt({type:Number})],or.prototype,"current",void 0),t([pt({type:Number})],or.prototype,"step",void 0),t([pt({type:Number})],or.prototype,"min",void 0),t([pt({type:Number})],or.prototype,"max",void 0),t([mt()],or.prototype,"_localValue",void 0),t([mt()],or.prototype,"_localLow",void 0),t([mt()],or.prototype,"_localHigh",void 0),t([mt()],or.prototype,"_activeSlider",void 0),t([mt()],or.prototype,"_lastSlider",void 0),t([_t("#slider")],or.prototype,"_slider",void 0),t([_t("#interaction")],or.prototype,"_interaction",void 0),or=t([dt("vt-ha-control-circular-slider")],or);const nr=s`
|
||
:host([theme="gunmalmg"]) vt-ha-control-circular-slider { display: none; }
|
||
:host([theme="gunmalmg"]) vt-ha-control-circular-slider { display: none !important; }
|
||
:host([theme="gunmalmg"]) .disabled-circle-container { display: block; background: none; }
|
||
|
||
/* Gunmalmg theme - minimalist compact list style */
|
||
:host([theme="gunmalmg"]) ha-card {
|
||
color: var(--primary-text-color);
|
||
border-radius: 10px;
|
||
padding: 0px 0px;
|
||
box-shadow: none;
|
||
}
|
||
:host([theme="gunmalmg"]) .name { font-weight: 600; color: var(--primary-text-color); font-size: 17px; text-align: left;}
|
||
:host([theme="gunmalmg"]) .content { display: flex; position: relative; width: 100%; height: auto; max-width: none; transform: none; left: 0; top: 0; padding: 0; align-items: center; justify-content: center; }
|
||
:host([theme="gunmalmg"]) .current-info, :host([theme="gunmalmg"]) #left-infos, :host([theme="gunmalmg"]) #vt-control-buttons { display: none !important; }
|
||
:host([theme="gunmalmg"]) .disabled-circle-container { height: 84px; background: transparent; }
|
||
|
||
/* Presets as pill buttons - single horizontal row */
|
||
:host([theme="gunmalmg"]) #presets {
|
||
display: flex;
|
||
flex-direction: row;
|
||
flex-wrap: nowrap;
|
||
margin-top: 0;
|
||
align-items: center;
|
||
gap: 6px;
|
||
margin-bottom: 0em;
|
||
width: max-content;
|
||
}
|
||
:host([theme="gunmalmg"]) .preset-label {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
margin: 0; padding: 0;
|
||
flex-shrink: 0;
|
||
height: 70px;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .preset-label ha-icon-button {
|
||
--mdc-icon-size: 50px;
|
||
width: 70px;
|
||
height: 70px;
|
||
border-radius: 16px;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
background: var(--secondary-background-color);
|
||
color: var(--secondary-text-color);
|
||
border: 1px solid var(--divider-color);
|
||
}
|
||
:host([theme="gunmalmg"]) .preset-label .selected-icon {
|
||
box-shadow: 0 2px 0 rgba(0,0,0,0.3) inset;
|
||
}
|
||
|
||
/* Presets base: icon grey, secondary background */
|
||
:host([theme="gunmalmg"]) .preset-label ha-icon-button {
|
||
background: var(--secondary-background-color);
|
||
border: 1px solid var(--divider-color);
|
||
}
|
||
|
||
/* Only selected preset icon should be colored */
|
||
:host([theme="gunmalmg"]) .preset-label ha-icon-button.selected-icon {
|
||
background: var(--secondary-background-color);
|
||
color: white !important;
|
||
transition: background-color 180ms ease, color 180ms ease;
|
||
}
|
||
|
||
/* Selected colors mapping */
|
||
:host([theme="gunmalmg"]) .preset-frost ha-icon-button.selected-icon { background: #3a9ff2; } /* blue */
|
||
:host([theme="gunmalmg"]) .preset-eco ha-icon-button.selected-icon { background: #5dd461; } /* green */
|
||
:host([theme="gunmalmg"]) .preset-comfort ha-icon-button.selected-icon { background: #f9a21f; } /* orange */
|
||
:host([theme="gunmalmg"]) .preset-boost ha-icon-button.selected-icon { background: #f75252; } /* red-ish */
|
||
:host([theme="gunmalmg"]) .preset-activity ha-icon-button.selected-icon { background: #c455f7; } /* blue */
|
||
/* Left-side compact hvac icon + action for gunmalmg */
|
||
:host([theme="gunmalmg"]) #left-infos-gunmalmg {
|
||
position: absolute;
|
||
left: 12px;
|
||
top: 50%;
|
||
transform: translateY(-50%);
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
z-index: 4;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .hvac-mode ha-icon-button {
|
||
width: 56px;
|
||
height: 56px;
|
||
border-radius: 50%;
|
||
--mdc-icon-size: 28px;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
background: var(--secondary-background-color);
|
||
color: var(--secondary-text-color);
|
||
border: none;
|
||
transition: background-color 220ms ease, color 220ms ease, transform 160ms ease;
|
||
}
|
||
|
||
/* Colored states for hvac mode icon */
|
||
:host([theme="gunmalmg"]) ha-card.heat .hvac-mode-tile ha-icon-button,
|
||
:host([theme="gunmalmg"]) ha-card.heat_cool .hvac-mode-tile ha-icon-button {
|
||
background: rgba(251, 150, 0, 0.15);
|
||
color: #fb9600;
|
||
}
|
||
:host([theme="gunmalmg"]) ha-card.cool .hvac-mode-tile ha-icon-button {
|
||
background: rgba(3, 141, 254, 0.15);
|
||
color: #038dfe;
|
||
}
|
||
:host([theme="gunmalmg"]) ha-card.off .hvac-mode-tile ha-icon-button {
|
||
background: var(--secondary-background-color);
|
||
color: var(--secondary-text-color);
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .hvac-action svg {
|
||
width: 20px;
|
||
height: 20px;
|
||
fill: var(--primary-text-color);
|
||
opacity: 0.95;
|
||
}
|
||
|
||
/* Badge: top-right white icon on colored background */
|
||
:host([theme="gunmalmg"]) .hvac-badge-container { position: relative; display: inline-block; }
|
||
:host([theme="gunmalmg"]) .hvac-badge {
|
||
position: absolute;
|
||
top: -6px;
|
||
right: -6px;
|
||
width: 20px;
|
||
height: 20px;
|
||
border-radius: 10px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
color: #ffffff;
|
||
}
|
||
:host([theme="gunmalmg"]) .hvac-badge.heating { background: #f44336; }
|
||
:host([theme="gunmalmg"]) .hvac-badge.cooling { background: #03A9F4; }
|
||
:host([theme="gunmalmg"]) .hvac-badge.warning { background: #ff9800; }
|
||
:host([theme="gunmalmg"]) .hvac-badge svg { fill: #ffffff; width: 14px; height: 14px; } /* badge always on colored bg */
|
||
|
||
/* Preset pills tweaks */
|
||
:host([theme="gunmalmg"]) .preset-label {
|
||
border-radius: 10px;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
}
|
||
|
||
/* Temperatures look: main number larger, unit and secondary smaller */
|
||
:host([theme="gunmalmg"]) .main-value { font-size: 16px; font-weight: 600; }
|
||
:host([theme="gunmalmg"]) #current { font-size: 12px; }
|
||
:host([theme="gunmalmg"]) .content .name + * { color: var(--secondary-text-color); font-size: 10px; }
|
||
|
||
/* Inline temperature display (left-aligned, no wrapping) */
|
||
:host([theme="gunmalmg"]) .gunmalmg-temps-inline { display: flex; gap: 4px; align-items: baseline; justify-content: flex-start; flex-wrap: nowrap; white-space: nowrap; }
|
||
:host([theme="gunmalmg"]) .gunmalmg-temp-main { font-size: 17px; font-weight: 700; color: var(--secondary-text-color); white-space: nowrap; }
|
||
:host([theme="gunmalmg"]) .gunmalmg-temp-main.has-error { color: var(--error-color, #db4437); }
|
||
:host([theme="gunmalmg"]) .gunmalmg-temp-main.has-error .gunmalmg-uom { color: var(--error-color, #db4437); }
|
||
:host([theme="gunmalmg"]) .gunmalmg-temp-secondary { font-size: 13px; color: var(--secondary-text-color); margin-left: 4px; white-space: nowrap; }
|
||
:host([theme="gunmalmg"]) .gunmalmg-uom { font-size: 11px; color: var(--secondary-text-color); margin-left: 1px; }
|
||
|
||
/* Hide the classic timed-preset-container (we use our own gunmalmg-timed-preset) */
|
||
:host([theme="gunmalmg"]) .timed-preset-container { display: none !important; }
|
||
|
||
/* Grid layout: name spans columns 1-2 on first row; left/center/right on second row */
|
||
:host([theme="gunmalmg"]) .gunmalmg-grid {
|
||
display: grid;
|
||
grid-template-columns: 0.8fr 1.6fr 2.4fr;
|
||
grid-template-areas:
|
||
"name name right"
|
||
"left center right";
|
||
gap: 6px;
|
||
align-items: center;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .gunmalmg-name {
|
||
grid-area: name;
|
||
text-align: left;
|
||
padding-left: 8px;
|
||
display: -webkit-box;
|
||
-webkit-line-clamp: 2;
|
||
-webkit-box-orient: vertical;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: normal;
|
||
line-height: 1.2;
|
||
margin: 0.5em;
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-left { grid-area: left; }
|
||
:host([theme="gunmalmg"]) .gunmalmg-center { grid-area: center; }
|
||
:host([theme="gunmalmg"]) .gunmalmg-right { grid-area: right; }
|
||
|
||
@media (max-width: 480px) {
|
||
:host([theme="gunmalmg"]) .gunmalmg-grid {
|
||
grid-template-columns: 1fr 1fr;
|
||
grid-template-areas:
|
||
"name right"
|
||
"left center";
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-right {
|
||
margin-top: 8px;
|
||
justify-content: center;
|
||
padding-right: 0;
|
||
}
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .gunmalmg-left { background: transparent; padding: 0; display: flex; align-items: center; justify-content: center; }
|
||
:host([theme="gunmalmg"]) .gunmalmg-center { text-align: left; max-width: 100%; display:flex; flex-direction:column; justify-content:left; }
|
||
:host([theme="gunmalmg"]) .gunmalmg-right {
|
||
padding: 0;
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: stretch;
|
||
min-width: 0;
|
||
}
|
||
|
||
/* Scrollable presets zone */
|
||
:host([theme="gunmalmg"]) .gunmalmg-presets-scroll {
|
||
flex: 1 1 0;
|
||
overflow-x: auto;
|
||
overflow-y: hidden;
|
||
min-width: 0;
|
||
scrollbar-width: thin;
|
||
scrollbar-color: var(--secondary-text-color, #888) rgba(128,128,128,0.15);
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-presets-scroll::-webkit-scrollbar { height: 5px; }
|
||
:host([theme="gunmalmg"]) .gunmalmg-presets-scroll::-webkit-scrollbar-thumb { background: var(--secondary-text-color, #888); border-radius: 3px; }
|
||
:host([theme="gunmalmg"]) .gunmalmg-presets-scroll::-webkit-scrollbar-track { background: rgba(128,128,128,0.15); border-radius: 3px; }
|
||
|
||
/* Fixed actions zone (lock + timed preset) */
|
||
:host([theme="gunmalmg"]) .gunmalmg-actions {
|
||
flex: 0 0 auto;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
justify-content: flex-start;
|
||
padding: 4px 4px;
|
||
gap: 4px;
|
||
min-width: 48px;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .hvac-mode-tile { display: flex; align-items: center; justify-content: center; padding: 0; background: transparent; }
|
||
|
||
:host([theme="gunmalmg"]) .hvac-mode-tile ha-icon-button { overflow: hidden; box-shadow: none; border-radius: 30px; }
|
||
|
||
/* Dim hvac mode and preset icons when locked */
|
||
:host([theme="gunmalmg"]) ha-card.locked .hvac-mode-tile ha-icon-button,
|
||
:host([theme="gunmalmg"]) ha-card.locked #presets ha-icon-button,
|
||
:host([theme="gunmalmg"]) ha-card.locked #presets .preset-label,
|
||
:host([theme="gunmalmg"]) ha-card.locked .gunmalmg-timed-preset {
|
||
opacity: 0.45;
|
||
color: var(--disabled-text-color);
|
||
pointer-events: none;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .gunmalmg-presets {
|
||
display: flex;
|
||
flex-direction: row;
|
||
flex-wrap: nowrap;
|
||
gap: 6px;
|
||
align-items: center;
|
||
justify-content: flex-start;
|
||
padding: 4px 4px;
|
||
min-height: 80px;
|
||
width: max-content;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .more-info { color: var(--primary-text-color); z-index: 6; }
|
||
|
||
/* Lock button styles */
|
||
:host([theme="gunmalmg"]) .gunmalmg-lock-btn {
|
||
--mdc-icon-size: 24px;
|
||
width: 40px;
|
||
height: 40px;
|
||
border-radius: 12px;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
transition: background-color 200ms ease, color 200ms ease;
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-lock-btn.locked {
|
||
background: rgba(244, 67, 54, 0.20);
|
||
color: #f44336;
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-lock-btn.unlocked {
|
||
background: rgba(76, 175, 80, 0.20);
|
||
color: #4CAF50;
|
||
}
|
||
|
||
/* Timed preset styles for gunmalmg */
|
||
:host([theme="gunmalmg"]) .gunmalmg-timed-preset {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
gap: 2px;
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-timed-remaining {
|
||
font-size: 13px;
|
||
font-weight: 600;
|
||
color: #f9a21f;
|
||
white-space: nowrap;
|
||
cursor: pointer;
|
||
user-select: none;
|
||
border-radius: 8px;
|
||
padding: 2px 6px;
|
||
transition: background-color 200ms ease;
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-timed-remaining:hover {
|
||
background: rgba(249, 162, 31, 0.15);
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-timed-label {
|
||
font-size: 9px;
|
||
color: var(--secondary-text-color);
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-timed-input {
|
||
width: 35px;
|
||
height: 25px;
|
||
border: 1px solid var(--divider-color);
|
||
border-radius: 8px;
|
||
background: var(--secondary-background-color);
|
||
color: var(--primary-text-color);
|
||
font-size: 12px;
|
||
text-align: center;
|
||
outline: none;
|
||
-moz-appearance: textfield;
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-timed-input:focus {
|
||
border-color: #f9a21f;
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-timed-input.active {
|
||
border-color: #f9a21f;
|
||
color: #f9a21f;
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-timed-input::-webkit-outer-spin-button,
|
||
:host([theme="gunmalmg"]) .gunmalmg-timed-input::-webkit-inner-spin-button {
|
||
-webkit-appearance: none;
|
||
margin: 0;
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-timed-select {
|
||
width: 40px;
|
||
height: 30px;
|
||
border: 1px solid var(--divider-color);
|
||
border-radius: 8px;
|
||
background: var(--secondary-background-color);
|
||
color: var(--primary-text-color);
|
||
font-size: 10px;
|
||
text-align: center;
|
||
outline: none;
|
||
cursor: pointer;
|
||
-webkit-appearance: none;
|
||
-moz-appearance: none;
|
||
appearance: none;
|
||
padding: 0 4px;
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-timed-select:focus {
|
||
border-color: #f9a21f;
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-timed-select.active {
|
||
border-color: #f9a21f;
|
||
color: #f9a21f;
|
||
}
|
||
:host([theme="gunmalmg"]) .theme-menu { background: var(--card-background-color); color: var(--primary-text-color); border-color: var(--divider-color); }
|
||
:host([theme="gunmalmg"]) .theme-menu-item { color: var(--primary-text-color); }
|
||
:host([theme="gunmalmg"]) .theme-menu-header { display:flex; align-items:center; justify-content:space-between; padding: 8px 12px; border-bottom: 1px solid var(--divider-color); }
|
||
:host([theme="gunmalmg"]) .theme-menu-title { font-weight:600; cursor:pointer; }
|
||
|
||
/* Gunmalmg center clickable area */
|
||
:host([theme="gunmalmg"]) .gunmalmg-center {
|
||
cursor: pointer;
|
||
}
|
||
|
||
/* Classic popup styles */
|
||
:host([theme="gunmalmg"]) .classic-popup-backdrop {
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100vw;
|
||
height: 100vh;
|
||
background: rgba(0, 0, 0, 0.7);
|
||
z-index: 1000;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .classic-popup-container {
|
||
position: fixed;
|
||
top: 50%;
|
||
left: 50%;
|
||
transform: translate(-50%, -50%);
|
||
z-index: 1001;
|
||
background: var(--card-background-color, #fff);
|
||
border-radius: 12px;
|
||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
|
||
max-width: 95vw;
|
||
max-height: 90vh;
|
||
overflow: auto;
|
||
min-width: 300px;
|
||
}
|
||
|
||
/* Mobile: full screen */
|
||
@media (max-width: 600px) {
|
||
:host([theme="gunmalmg"]) .classic-popup-container {
|
||
width: 100vw;
|
||
height: 100vh;
|
||
max-width: 100vw;
|
||
max-height: 100vh;
|
||
border-radius: 0;
|
||
top: 0;
|
||
left: 0;
|
||
transform: none;
|
||
}
|
||
}
|
||
|
||
/* Desktop: similar to more-info dialog */
|
||
@media (min-width: 601px) {
|
||
:host([theme="gunmalmg"]) .classic-popup-container {
|
||
width: 450px;
|
||
max-height: 90vh;
|
||
}
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .classic-popup-close {
|
||
position: absolute;
|
||
top: 8px;
|
||
left: 8px;
|
||
z-index: 1002;
|
||
--mdc-icon-size: 24px;
|
||
color: var(--primary-text-color);
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .classic-popup-more-info {
|
||
position: absolute;
|
||
top: 8px;
|
||
right: 8px;
|
||
z-index: 1002;
|
||
--mdc-icon-size: 24px;
|
||
color: var(--secondary-text-color);
|
||
cursor: pointer;
|
||
border-radius: 100%;
|
||
}
|
||
|
||
/* ===== Popup content: reset ALL gunmalmg overrides to classic appearance ===== */
|
||
:host([theme="gunmalmg"]) .classic-popup-content {
|
||
position: relative;
|
||
padding: 1em;
|
||
padding-top: 1.5em;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .classic-popup-content.has-preset-mod {
|
||
padding-bottom: calc(1em + 38px);
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .classic-popup-content.has-regulation-chart {
|
||
padding-bottom: calc(1em + 38px);
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .classic-popup-content.has-preset-mod.has-regulation-chart {
|
||
padding-bottom: calc(1em + 76px);
|
||
}
|
||
|
||
/* Same correction as in the main card: compensate for the 50% shift
|
||
caused by the popup content growing when panels are active. */
|
||
:host([theme="gunmalmg"]) .classic-popup-content.has-preset-mod .content,
|
||
:host([theme="gunmalmg"]) .classic-popup-content.has-regulation-chart .content {
|
||
top: calc(50% - 40px - 19px) !important;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .classic-popup-content.has-preset-mod.has-regulation-chart .content {
|
||
top: calc(50% - 40px - 38px) !important;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .classic-popup-content.has-preset-mod .content.no-presets,
|
||
:host([theme="gunmalmg"]) .classic-popup-content.has-regulation-chart .content.no-presets {
|
||
top: calc(60% - 30px - 19px) !important;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .classic-popup-content.has-preset-mod.has-regulation-chart .content.no-presets {
|
||
top: calc(60% - 30px - 38px) !important;
|
||
}
|
||
|
||
/* Name */
|
||
:host([theme="gunmalmg"]) .classic-popup-content .name {
|
||
display: block;
|
||
width: 100%;
|
||
text-align: center;
|
||
font-size: 20px;
|
||
word-break: keep-all;
|
||
white-space: nowrap;
|
||
text-overflow: ellipsis;
|
||
overflow: hidden;
|
||
color: var(--primary-text-color);
|
||
font-weight: normal;
|
||
}
|
||
|
||
/* Circular slider: force visible */
|
||
:host([theme="gunmalmg"]) .classic-popup-content vt-ha-control-circular-slider {
|
||
display: block !important;
|
||
}
|
||
|
||
/* Content overlay inside slider: reset to classic absolute positioning */
|
||
:host([theme="gunmalmg"]) .classic-popup-content .content {
|
||
position: absolute !important;
|
||
width: calc(70% - 40px) !important;
|
||
height: calc(70% - 100px) !important;
|
||
box-sizing: border-box;
|
||
border-radius: 100%;
|
||
left: 50% !important;
|
||
top: calc(50% - 40px) !important;
|
||
text-align: center;
|
||
overflow-wrap: break-word;
|
||
pointer-events: none;
|
||
display: flex !important;
|
||
align-items: center;
|
||
place-content: center;
|
||
flex-flow: wrap;
|
||
transform: translate(-50%,-50%) !important;
|
||
max-width: 155px !important;
|
||
padding: 0;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .classic-popup-content .content.no-presets {
|
||
top: calc(60% - 30px) !important;
|
||
}
|
||
|
||
/* SVG inside popup */
|
||
:host([theme="gunmalmg"]) .classic-popup-content #main {
|
||
transform: scale(2.3);
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .classic-popup-content svg {
|
||
height: auto;
|
||
margin: auto;
|
||
display: block;
|
||
width: 100%;
|
||
-webkit-backface-visibility: hidden;
|
||
max-width: 233px;
|
||
}
|
||
|
||
/* current-info: force visible */
|
||
:host([theme="gunmalmg"]) .classic-popup-content .current-info {
|
||
display: flex !important;
|
||
}
|
||
|
||
/* Reset font overrides to classic values */
|
||
:host([theme="gunmalmg"]) .classic-popup-content .main-value {
|
||
font-size: inherit !important;
|
||
font-weight: normal !important;
|
||
}
|
||
:host([theme="gunmalmg"]) .classic-popup-content .main-value.temp-main {
|
||
font-size: 15px !important;
|
||
}
|
||
:host([theme="gunmalmg"]) .classic-popup-content .main-value.temp-secondary {
|
||
font-size: 6px !important;
|
||
}
|
||
|
||
/* Hide gunmalmg badges in popup (classic has its own hvac action icon) */
|
||
:host([theme="gunmalmg"]) .classic-popup-content .hvac-badge {
|
||
display: none !important;
|
||
}
|
||
|
||
/* Temperature styles: reset to classic */
|
||
:host([theme="gunmalmg"]) .classic-popup-content .temp-main {
|
||
font-size: 15px;
|
||
}
|
||
:host([theme="gunmalmg"]) .classic-popup-content .temp-main .uom {
|
||
font-size: 5px;
|
||
}
|
||
:host([theme="gunmalmg"]) .classic-popup-content .temp-secondary {
|
||
font-size: 6px;
|
||
}
|
||
:host([theme="gunmalmg"]) .classic-popup-content .temp-secondary .uom {
|
||
font-size: 3px;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .classic-popup-content line {
|
||
stroke: #e7e7e8;
|
||
stroke-width: 0.5;
|
||
}
|
||
|
||
/* Modes: reset to classic */
|
||
:host([theme="gunmalmg"]) .classic-popup-content #modes {
|
||
z-index: 0;
|
||
position: relative;
|
||
display: flex;
|
||
width: auto;
|
||
justify-content: center;
|
||
margin-top: -3em;
|
||
margin-bottom: 1em;
|
||
}
|
||
|
||
/* Control buttons +/-: reset to classic absolute positioning */
|
||
:host([theme="gunmalmg"]) .classic-popup-content #vt-control-buttons {
|
||
z-index: 0;
|
||
position: absolute !important;
|
||
display: block !important;
|
||
width: auto;
|
||
justify-content: center;
|
||
padding-bottom: 0.2em;
|
||
left: 90%;
|
||
top: 35%;
|
||
}
|
||
|
||
/* Presets: reset to classic */
|
||
:host([theme="gunmalmg"]) .classic-popup-content #presets {
|
||
z-index: 0;
|
||
position: relative;
|
||
display: flex;
|
||
width: 100%;
|
||
justify-content: center;
|
||
align-items: center;
|
||
margin-top: -1em;
|
||
margin-bottom: 1em;
|
||
flex-direction: row;
|
||
flex-wrap: wrap;
|
||
gap: 0;
|
||
}
|
||
|
||
/* Preset labels: reset to classic style */
|
||
:host([theme="gunmalmg"]) .classic-popup-content .preset-label {
|
||
cursor: pointer;
|
||
user-select: none;
|
||
display: flex;
|
||
position: relative;
|
||
align-items: center;
|
||
justify-content: flex-start;
|
||
overflow: hidden;
|
||
padding: 0 5px;
|
||
outline: 0px;
|
||
height: 48px;
|
||
margin: 0 5px;
|
||
border-radius: 0;
|
||
flex-shrink: initial;
|
||
}
|
||
|
||
/* Preset icon buttons: reset to classic (no gunmalmg pill background) */
|
||
:host([theme="gunmalmg"]) .classic-popup-content .preset-label ha-icon-button {
|
||
--mdc-icon-size: 24px;
|
||
width: auto;
|
||
height: auto;
|
||
border-radius: 100%;
|
||
background: transparent !important;
|
||
border: none !important;
|
||
box-shadow: none !important;
|
||
}
|
||
|
||
/* Reset selected preset icon colors to classic */
|
||
:host([theme="gunmalmg"]) .classic-popup-content .preset-label ha-icon-button.selected-icon {
|
||
background: transparent !important;
|
||
color: var(--label-badge-yellow) !important;
|
||
}
|
||
|
||
/* Timed preset container: force visible */
|
||
:host([theme="gunmalmg"]) .classic-popup-content .timed-preset-container {
|
||
display: flex !important;
|
||
}
|
||
|
||
/* Left infos: reset to classic absolute positioning */
|
||
:host([theme="gunmalmg"]) .classic-popup-content #left-infos {
|
||
z-index: 3;
|
||
position: absolute !important;
|
||
display: block !important;
|
||
width: auto;
|
||
justify-content: center;
|
||
padding-bottom: 0.2em;
|
||
left: 0%;
|
||
top: 15%;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .classic-popup-content #left-infos.no-presets {
|
||
top: 30%;
|
||
}
|
||
|
||
/* Right lock: align center with +/- buttons */
|
||
:host([theme="gunmalmg"]) .classic-popup-content #right-lock {
|
||
z-index: 0;
|
||
position: absolute;
|
||
left: 86%;
|
||
top: 15%;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding-right: 0;
|
||
}
|
||
|
||
/* Disabled circle container fallback (when no slider) */
|
||
:host([theme="gunmalmg"]) .classic-popup-content .disabled-circle-container {
|
||
height: 145px !important;
|
||
background: radial-gradient(var(--hvac-mode-color), transparent 50%) !important;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .classic-popup-content .disabled-circle-container.no-background-color {
|
||
background: none !important;
|
||
}
|
||
`,sr=s`
|
||
:host([theme="vtherm"]) ha-card { background: var(--card-background-color); color: var(--primary-text-color); }
|
||
:host([theme="vtherm"]) .vtherm-grid { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 8px; align-items: center; }
|
||
:host([theme="vtherm"]) .vtherm-left { display:flex; justify-content:center; }
|
||
:host([theme="vtherm"]) .vtherm-center { text-align:center; }
|
||
:host([theme="vtherm"]) .vtherm-right { display:flex; justify-content:flex-end; }
|
||
:host([theme="vtherm"]) .more-info { z-index:6 }
|
||
:host([theme="vtherm"]) .theme-menu { background: var(--card-background-color); }
|
||
/* Dim hvac mode and preset icons when locked */
|
||
:host([theme="vtherm"]) ha-card.locked .vtherm-left ha-icon-button,
|
||
:host([theme="vtherm"]) ha-card.locked .vtherm-right ha-icon-button,
|
||
:host([theme="vtherm"]) ha-card.locked .vtherm-right .preset-label {
|
||
opacity: 0.5;
|
||
color: var(--disabled-text-color);
|
||
pointer-events: none;
|
||
}
|
||
`;var rr;let lr=rr=class extends lt{constructor(){super(...arguments),this.hass=null,this.entityId="",this.visible=!1,this.targetTemp=null,this.roomTemp=null,this.regulatedTemp=null,this.extTemp=null,this.powerPercent=null,this._history=[],this._loading=!1,this._chart=null,this._canvas=null,this._chartReady=!1,this._destroyed=!1,this._lastEntityId="",this._initialViewSet=!1}connectedCallback(){super.connectedCallback(),this._destroyed=!1}disconnectedCallback(){super.disconnectedCallback(),this._destroyed=!0,this._destroyChart()}async firstUpdated(){var t;await this._initChart(),this._addLiveDataPoint(),this.entityId&&this.hass&&(this._lastEntityId=this.entityId,await this._fetchHistory()),this.visible&&this._chartReady&&(null===(t=this._chart)||void 0===t||t.resize(),this._updateChart(),this._applyInitialView())}updated(t){if(t.has("visible")&&this.visible&&this._chartReady)return void requestAnimationFrame((()=>{var t;null===(t=this._chart)||void 0===t||t.resize(),this._updateChart(),this._applyInitialView()}));if(t.has("entityId")&&this.entityId&&this.entityId!==this._lastEntityId)return this._lastEntityId=this.entityId,this._history=[],void this._fetchHistory().then((()=>{var t;this._chartReady&&this.visible&&(null===(t=this._chart)||void 0===t||t.resize(),this._updateChart(),this._initialViewSet=!1,this._applyInitialView())}));const e=["targetTemp","roomTemp","regulatedTemp","extTemp","powerPercent"].some((e=>t.has(e)));!e||null===this.targetTemp&&null===this.roomTemp&&null===this.powerPercent||(this._addLiveDataPoint(),this._chartReady&&this.visible&&this._updateChart())}async _fetchHistory(){if(!this.hass||!this.entityId)return;this._loading=!0;const t=new Date,e=`history/period/${new Date(t.getTime()-864e5).toISOString()}?filter_entity_id=${this.entityId}&end_time=${t.toISOString()}&significant_changes_only=false&minimal_response=false`;try{const t=await this.hass.callApi("GET",e);if(!Array.isArray(t)||0===t.length)return;const i=t[0].filter((t=>t.attributes&&t.last_updated)).map((t=>{var e,i,o,a,n,s,r,l,c,d,h,u,p,m,_,f,g,b,v,y,w,x,k;return{timestamp:new Date(t.last_updated).getTime(),targetTemp:null!==(e=t.attributes.temperature)&&void 0!==e?e:null,roomTemp:null!==(i=t.attributes.current_temperature)&&void 0!==i?i:null,regulatedTemp:null!==(l=null!==(s=null===(n=null===(a=null===(o=t.attributes)||void 0===o?void 0:o.vtherm_over_climate)||void 0===a?void 0:a.regulation)||void 0===n?void 0:n.regulated_target_temperature)&&void 0!==s?s:null===(r=t.attributes)||void 0===r?void 0:r.regulated_target_temperature)&&void 0!==l?l:null,extTemp:null!==(h=null===(d=null===(c=t.attributes)||void 0===c?void 0:c.specific_states)||void 0===d?void 0:d.ext_current_temperature)&&void 0!==h?h:null,powerPercent:null!==(k=null!==(v=null!==(f=null!==(p=null===(u=t.attributes)||void 0===u?void 0:u.power_percent)&&void 0!==p?p:null===(_=null===(m=t.attributes)||void 0===m?void 0:m.specific_states)||void 0===_?void 0:_.power_percent)&&void 0!==f?f:null===(b=null===(g=t.attributes)||void 0===g?void 0:g.vtherm_over_switch)||void 0===b?void 0:b.power_percent)&&void 0!==v?v:null===(x=null===(w=null===(y=t.attributes)||void 0===y?void 0:y.vtherm_over_climate)||void 0===w?void 0:w.valve_regulation)||void 0===x?void 0:x.power_percent)&&void 0!==k?k:null}})).filter((t=>null!==t.targetTemp||null!==t.roomTemp)),o=i.length>0?i[i.length-1].timestamp:0,a=this._history.filter((t=>t.timestamp>o));this._history=[...i,...a].slice(-rr.MAX_POINTS)}catch(t){console.error("[VtRegulationChart] History fetch failed:",t)}finally{this._loading=!1}}_addLiveDataPoint(){var t,e;const i=Date.now(),o=this._history[this._history.length-1],a={timestamp:i,targetTemp:this.targetTemp,roomTemp:this.roomTemp,regulatedTemp:null!==(t=this.regulatedTemp)&&void 0!==t?t:null,extTemp:null!==(e=this.extTemp)&&void 0!==e?e:null,powerPercent:this.powerPercent};o&&i-o.timestamp<3e4?this._history=[...this._history.slice(0,-1),a]:this._history=[...this._history,a].slice(-rr.MAX_POINTS)}_resolveColor(t,e){return getComputedStyle(this).getPropertyValue(t).trim()||e}async _initChart(){var t,e;if(!this._destroyed&&(this._canvas=null!==(e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("canvas"))&&void 0!==e?e:null,this._canvas))try{const[{Chart:t,registerables:e},{default:i}]=await Promise.all([Promise.resolve().then((function(){return p_})),Promise.resolve().then((function(){return kf}))]);if(await Promise.resolve().then((function(){return Wb})),this._destroyed)return;t.register(...e,i);const o=this._resolveColor("--primary-text-color","#e5e5e5"),a=this._resolveColor("--secondary-text-color","#9e9e9e"),n="rgba(128,128,128,0.18)";this._chart=new t(this._canvas,{type:"line",data:{datasets:[{label:"Consigne",data:[],borderColor:"#f9a21f",backgroundColor:"rgba(249,162,31,0.08)",borderWidth:2,pointRadius:0,pointHoverRadius:4,tension:.3,yAxisID:"yTemp"},{label:"Pièce",data:[],borderColor:"#3a9ff2",backgroundColor:"rgba(58,159,242,0.08)",borderWidth:2,pointRadius:0,pointHoverRadius:4,tension:.3,yAxisID:"yTemp"},{label:"Régulée",data:[],borderColor:"#5dd461",backgroundColor:"rgba(93,212,97,0.08)",borderWidth:2,borderDash:[5,4],pointRadius:0,pointHoverRadius:4,tension:.3,yAxisID:"yTemp",hidden:!0},{label:"Ext.",data:[],borderColor:"#a78bfa",backgroundColor:"rgba(167,139,250,0.08)",borderWidth:1.5,borderDash:[3,3],pointRadius:1,pointHoverRadius:4,tension:.3,yAxisID:"yTemp",hidden:!0},{label:"Puissance %",data:[],borderColor:"#f75252",backgroundColor:"rgba(247,82,82,0.12)",borderWidth:1.5,pointRadius:1,pointHoverRadius:4,tension:.3,fill:!0,yAxisID:"yPercent",hidden:!0}]},options:{responsive:!0,maintainAspectRatio:!1,animation:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!0,position:"top",labels:{boxWidth:12,font:{size:10},color:o,padding:8}},tooltip:{enabled:!0,callbacks:{label:t=>{const e=t.parsed.y,i="yPercent"===t.dataset.yAxisID?"%":"°";return null!==e?` ${t.dataset.label}: ${e.toFixed(1)}${i}`:""}}},zoom:{pan:{enabled:!0,mode:"x"},zoom:{wheel:{enabled:!0,speed:.015},pinch:{enabled:!0},mode:"x"},limits:{x:{minRange:6e4}}}},scales:{x:{type:"time",time:{tooltipFormat:"HH:mm:ss",displayFormats:{millisecond:"HH:mm:ss",second:"HH:mm:ss",minute:"HH:mm",hour:"HH:mm",day:"dd/MM"}},grid:{color:n},ticks:{maxTicksLimit:8,color:a,font:{size:10},maxRotation:0}},yTemp:{type:"linear",position:"left",grid:{color:n},ticks:{color:a,font:{size:10},callback:t=>`${t}°`}},yPercent:{type:"linear",position:"right",min:0,max:100,grid:{drawOnChartArea:!1},ticks:{color:"#f75252",font:{size:10},callback:t=>`${t}%`,stepSize:25}}}}}),this._chartReady=!0,this._updateChart()}catch(t){console.error("[VtRegulationChart] Failed to initialise Chart.js:",t)}}_updateChart(){if(!this._chart)return;const t=(t,e)=>t.filter((t=>null!==t[e]&&void 0!==t[e])).map((t=>({x:t.timestamp,y:t[e]}))),e=this._chart.data.datasets;e[0].data=t(this._history,"targetTemp"),e[1].data=t(this._history,"roomTemp"),e[2].data=t(this._history,"regulatedTemp"),e[3].data=t(this._history,"extTemp"),e[4].data=t(this._history,"powerPercent"),e[2].hidden=0===e[2].data.length,e[3].hidden=0===e[3].data.length,e[4].hidden=0===e[4].data.length,this._chart.update("none")}_applyInitialView(){!this._initialViewSet&&this._chart&&(this._initialViewSet=!0,this._zoomTo2h())}_zoomTo2h(){if(!this._chart)return;const t=Date.now();this._chart.zoomScale("x",{min:t-72e5,max:t},"none")}resetZoom(){var t,e;null===(e=null===(t=this._chart)||void 0===t?void 0:t.resetZoom)||void 0===e||e.call(t)}clearHistory(){this._history=[],this._updateChart()}_destroyChart(){this._chart&&(this._chart.destroy(),this._chart=null,this._chartReady=!1)}render(){return W`
|
||
<div class="chart-wrapper">
|
||
${this._loading?W`<div class="chart-loading"></div>`:""}
|
||
<canvas></canvas>
|
||
<div class="zoom-btns">
|
||
<button class="reset-zoom-btn" @click=${()=>this._zoomTo2h()} title="Vue 2 heures">2h</button>
|
||
<button class="reset-zoom-btn" @click=${()=>this.resetZoom()} title="Vue 24 heures">1d</button>
|
||
</div>
|
||
</div>
|
||
`}static get styles(){return s`
|
||
:host {
|
||
display: block;
|
||
width: 100%;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.chart-wrapper {
|
||
position: relative;
|
||
width: 100%;
|
||
height: 180px;
|
||
}
|
||
|
||
canvas {
|
||
display: block;
|
||
width: 100% !important;
|
||
height: 100% !important;
|
||
}
|
||
|
||
.zoom-btns {
|
||
position: absolute;
|
||
top: -4px;
|
||
right: 4px;
|
||
display: flex;
|
||
gap: 4px;
|
||
z-index: 10;
|
||
}
|
||
|
||
.reset-zoom-btn {
|
||
position: static;
|
||
background: var(--secondary-background-color, rgba(0,0,0,0.08));
|
||
border: 1px solid var(--divider-color, #ccc);
|
||
border-radius: 4px;
|
||
cursor: pointer;
|
||
font-size: 12px;
|
||
padding: 2px 6px;
|
||
color: var(--secondary-text-color, #666);
|
||
z-index: 10;
|
||
line-height: 1.4;
|
||
transition: background-color 150ms ease;
|
||
opacity: 0.7;
|
||
}
|
||
|
||
.chart-loading {
|
||
position: absolute;
|
||
top: 50%;
|
||
left: 50%;
|
||
transform: translate(-50%, -50%);
|
||
width: 24px;
|
||
height: 24px;
|
||
border: 3px solid var(--divider-color, rgba(128,128,128,0.3));
|
||
border-top-color: var(--primary-color, #03a9f4);
|
||
border-radius: 50%;
|
||
animation: vt-spin 0.8s linear infinite;
|
||
z-index: 5;
|
||
}
|
||
|
||
@keyframes vt-spin {
|
||
to { transform: translate(-50%, -50%) rotate(360deg); }
|
||
}
|
||
`}};lr.MAX_POINTS=1440,t([pt({attribute:!1})],lr.prototype,"hass",void 0),t([pt({type:String})],lr.prototype,"entityId",void 0),t([pt({type:Boolean})],lr.prototype,"visible",void 0),t([pt({type:Number})],lr.prototype,"targetTemp",void 0),t([pt({type:Number})],lr.prototype,"roomTemp",void 0),t([pt({type:Number})],lr.prototype,"regulatedTemp",void 0),t([pt({type:Number})],lr.prototype,"extTemp",void 0),t([pt({type:Number})],lr.prototype,"powerPercent",void 0),t([mt()],lr.prototype,"_history",void 0),t([mt()],lr.prototype,"_loading",void 0),lr=rr=t([dt("vt-regulation-chart")],lr);const cr="unavailable",dr={auto:"M18,11V12.5C21.19,12.5 23.09,16.05 21.33,18.71L20.24,17.62C21.06,15.96 19.85,14 18,14V15.5L15.75,13.25L18,11M18,22V20.5C14.81,20.5 12.91,16.95 14.67,14.29L15.76,15.38C14.94,17.04 16.15,19 18,19V17.5L20.25,19.75L18,22M19,3H18V1H16V3H8V1H6V3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H14C13.36,20.45 12.86,19.77 12.5,19H5V8H19V10.59C19.71,10.7 20.39,10.94 21,11.31V5A2,2 0 0,0 19,3Z",heat_cool:"M12,6V9L16,5L12,1V4A8,8 0 0,0 4,12C4,13.57 4.46,15.03 5.24,16.26L6.7,14.8C6.25,13.97 6,13 6,12A6,6 0 0,1 12,6M18.76,7.74L17.3,9.2C17.74,10.04 18,11 18,12A6,6 0 0,1 12,18V15L8,19L12,23V20A8,8 0 0,0 20,12C20,10.43 19.54,8.97 18.76,7.74Z",heat:"M17.66 11.2C17.43 10.9 17.15 10.64 16.89 10.38C16.22 9.78 15.46 9.35 14.82 8.72C13.33 7.26 13 4.85 13.95 3C13 3.23 12.17 3.75 11.46 4.32C8.87 6.4 7.85 10.07 9.07 13.22C9.11 13.32 9.15 13.42 9.15 13.55C9.15 13.77 9 13.97 8.8 14.05C8.57 14.15 8.33 14.09 8.14 13.93C8.08 13.88 8.04 13.83 8 13.76C6.87 12.33 6.69 10.28 7.45 8.64C5.78 10 4.87 12.3 5 14.47C5.06 14.97 5.12 15.47 5.29 15.97C5.43 16.57 5.7 17.17 6 17.7C7.08 19.43 8.95 20.67 10.96 20.92C13.1 21.19 15.39 20.8 17.03 19.32C18.86 17.66 19.5 15 18.56 12.72L18.43 12.46C18.22 12 17.66 11.2 17.66 11.2M14.5 17.5C14.22 17.74 13.76 18 13.4 18.1C12.28 18.5 11.16 17.94 10.5 17.28C11.69 17 12.4 16.12 12.61 15.23C12.78 14.43 12.46 13.77 12.33 13C12.21 12.26 12.23 11.63 12.5 10.94C12.69 11.32 12.89 11.7 13.13 12C13.9 13 15.11 13.44 15.37 14.8C15.41 14.94 15.43 15.08 15.43 15.23C15.46 16.05 15.1 16.95 14.5 17.5H14.5Z",cool:"M20.79,13.95L18.46,14.57L16.46,13.44V10.56L18.46,9.43L20.79,10.05L21.31,8.12L19.54,7.65L20,5.88L18.07,5.36L17.45,7.69L15.45,8.82L13,7.38V5.12L14.71,3.41L13.29,2L12,3.29L10.71,2L9.29,3.41L11,5.12V7.38L8.5,8.82L6.5,7.69L5.92,5.36L4,5.88L4.47,7.65L2.7,8.12L3.22,10.05L5.55,9.43L7.55,10.56V13.45L5.55,14.58L3.22,13.96L2.7,15.89L4.47,16.36L4,18.12L5.93,18.64L6.55,16.31L8.55,15.18L11,16.62V18.88L9.29,20.59L10.71,22L12,20.71L13.29,22L14.7,20.59L13,18.88V16.62L15.5,15.17L17.5,16.3L18.12,18.63L20,18.12L19.53,16.35L21.3,15.88L20.79,13.95M9.5,10.56L12,9.11L14.5,10.56V13.44L12,14.89L9.5,13.44V10.56Z",off:"M16.56,5.44L15.11,6.89C16.84,7.94 18,9.83 18,12A6,6 0 0,1 12,18A6,6 0 0,1 6,12C6,9.83 7.16,7.94 8.88,6.88L7.44,5.44C5.36,6.88 4,9.28 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12C20,9.28 18.64,6.88 16.56,5.44M13,3H11V13H13",fan_only:Tt,dry:Vt,window_open:Ht,windowBypass:It,presence:Ct,motion:$t,eco:"M17,8C8,10 5.9,16.17 3.82,21.34L5.71,22L6.66,19.7C7.14,19.87 7.64,20 8,20C19,20 22,3 22,3C21,5 14,5.25 9,6.25C4,7.25 2,11.5 2,13.5C2,15.5 3.75,17.25 3.75,17.25C7,8 17,8 17,8Z",comfort:"M12.5 7C12.5 5.89 13.39 5 14.5 5H18C19.1 5 20 5.9 20 7V9.16C18.84 9.57 18 10.67 18 11.97V14H12.5V7M6 11.96V14H11.5V7C11.5 5.89 10.61 5 9.5 5H6C4.9 5 4 5.9 4 7V9.15C5.16 9.56 6 10.67 6 11.96M20.66 10.03C19.68 10.19 19 11.12 19 12.12V15H5V12C5 10.9 4.11 10 3 10S1 10.9 1 12V17C1 18.1 1.9 19 3 19V21H5V19H19V21H21V19C22.1 19 23 18.1 23 17V12C23 10.79 21.91 9.82 20.66 10.03Z",boost:"M13.13 22.19L11.5 18.36C13.07 17.78 14.54 17 15.9 16.09L13.13 22.19M5.64 12.5L1.81 10.87L7.91 8.1C7 9.46 6.22 10.93 5.64 12.5M21.61 2.39C21.61 2.39 16.66 .269 11 5.93C8.81 8.12 7.5 10.53 6.65 12.64C6.37 13.39 6.56 14.21 7.11 14.77L9.24 16.89C9.79 17.45 10.61 17.63 11.36 17.35C13.5 16.53 15.88 15.19 18.07 13C23.73 7.34 21.61 2.39 21.61 2.39M14.54 9.46C13.76 8.68 13.76 7.41 14.54 6.63S16.59 5.85 17.37 6.63C18.14 7.41 18.15 8.68 17.37 9.46C16.59 10.24 15.32 10.24 14.54 9.46M8.88 16.53L7.47 15.12L8.88 16.53M6.24 22L9.88 18.36C9.54 18.27 9.21 18.12 8.91 17.91L4.83 22H6.24M2 22H3.41L8.18 17.24L6.76 15.83L2 20.59V22M2 19.17L6.09 15.09C5.88 14.79 5.73 14.47 5.64 14.12L2 17.76V19.17Z",frost:"M14.46 9.41L11 7.38V5.12L12.71 3.41L11.29 2L10 3.29L8.71 2L7.29 3.41L9 5.12V7.38L6.5 8.82L4.5 7.69L3.92 5.36L2 5.88L2.47 7.65L.7 8.12L1.22 10.05L3.55 9.43L5.55 10.56V13.45L3.55 14.58L1.22 13.96L.7 15.89L2.47 16.36L2 18.12L3.93 18.64L4.55 16.31L6.55 15.18L9 16.62V18.88L7.29 20.59L8.71 22L10 20.71L11.29 22L12.7 20.59L11 18.88V16.62L14.46 14.61M7.5 10.56L10 9.11L12.5 10.56V13.44L10 14.89L7.5 13.44M19 5C17.89 5 17 5.89 17 7V13.76C16.36 14.33 16 15.15 16 16C16 17.66 17.34 19 19 19S22 17.66 22 16C22 15.15 21.64 14.33 21 13.77V7C21 5.89 20.11 5 19 5M19 6C19.55 6 20 6.45 20 7V8H18V7C18 6.45 18.45 6 19 6",activity:$t,power:"M12 3L2 12H5V20H19V12H22L12 3M11.5 18V14H9L12.5 7V11H15L11.5 18Z",flashAlert:Mt,temperature:"M15 13V5A3 3 0 0 0 9 5V13A5 5 0 1 0 15 13M12 4A1 1 0 0 1 13 5V8H11V5A1 1 0 0 1 12 4Z",humidity:Vt,ok:vt,thermometerAlert:Ot,none:"M23 17C23 20.31 20.31 23 17 23V21.5C19.5 21.5 21.5 19.5 21.5 17H23M1 7C1 3.69 3.69 1 7 1V2.5C4.5 2.5 2.5 4.5 2.5 7H1M8 4.32L3.41 8.92C.19 12.14 .19 17.37 3.41 20.59S11.86 23.81 15.08 20.59L22.15 13.5C22.64 13.03 22.64 12.24 22.15 11.75C21.66 11.26 20.87 11.26 20.38 11.75L15.96 16.17L15.25 15.46L21.79 8.92C22.28 8.43 22.28 7.64 21.79 7.15S20.5 6.66 20 7.15L14.19 13L13.5 12.27L20.37 5.38C20.86 4.89 20.86 4.1 20.37 3.61S19.09 3.12 18.6 3.61L11.71 10.5L11 9.8L16.5 4.32C17 3.83 17 3.04 16.5 2.55S15.22 2.06 14.73 2.55L7.11 10.17C8.33 11.74 8.22 14 6.78 15.45L6.07 14.74C7.24 13.57 7.24 11.67 6.07 10.5L5.72 10.15L9.79 6.08C10.28 5.59 10.28 4.8 9.79 4.31C9.29 3.83 8.5 3.83 8 4.32Z",auto_regulation_mode:Lt,power_percent:Lt,mean_power_cycle:"M7,2V13H10V22L17,10H13L17,2H7Z",valve_open_percent:"M22 13V21H20V19H16.58C15.81 20.76 14.05 22 12 22S8.19 20.76 7.42 19H4V21H2V13H4V15H7.43C7.93 13.85 8.85 12.93 10 12.42V11H8V9H16V11H14V12.42C15.15 12.93 16.07 13.85 16.57 15H20V13H22M17 2H7C6.45 2 6 2.45 6 3S6.45 4 7 4H10V5H11V8H13V5H14V4H17C17.55 4 18 3.55 18 3S17.55 2 17 2Z",regulated_target_temperature:"M12 14C11.7 13.6 11.4 13.3 11 13V5C11 3.3 9.7 2 8 2S5 3.3 5 5V13C2.8 14.7 2.3 17.8 4 20S8.8 22.7 11 21 13.7 16.2 12 14M9 8H7V5C7 4.5 7.5 4 8 4S9 4.5 9 5V8M18 3H16L12.8 12H14.7L15.4 10H18.6L19.3 12H21.2L18 3M15.8 8.7L17 5L18.2 8.7H15.8Z",auto_fan_mode:"M12.5 2C8.93 2 8.14 5.96 10.13 9.65C9.72 9.97 9.4 10.39 9.21 10.87C8.28 10.68 7.23 10.25 6.73 9.26C5.56 6.89 2 7 2 11.5C2 15.07 5.95 15.85 9.64 13.87C9.96 14.27 10.39 14.59 10.88 14.79C10.68 15.71 10.24 16.75 9.26 17.24C6.9 18.42 7 22 11.5 22C12.31 22 13 21.78 13.5 21.41C13.19 20.67 13 19.86 13 19C13 17.59 13.5 16.3 14.3 15.28C14.17 14.97 14.03 14.65 13.86 14.34C14.26 14 14.57 13.59 14.77 13.11C15.26 13.21 15.78 13.39 16.25 13.67C17.07 13.25 18 13 19 13C20.05 13 21.03 13.27 21.89 13.74C21.95 13.37 22 12.96 22 12.5C22 8.92 18.03 8.13 14.33 10.13C14 9.73 13.59 9.42 13.11 9.22C13.3 8.29 13.74 7.24 14.73 6.75C17.09 5.57 17 2 12.5 2M12 11C12.54 11 13 11.45 13 12C13 12.55 12.54 13 12 13C11.43 13 11 12.55 11 12C11 11.45 11.43 11 12 11M18 15C16.89 15 16 15.9 16 17V23H18V21H20V23H22V17C22 15.9 21.1 15 20 15M18 17H20V19H18Z",auto_fan_mode_off:"M12.5,2C9.64,2 8.57,4.55 9.29,7.47L15,13.16C15.87,13.37 16.81,13.81 17.28,14.73C18.46,17.1 22.03,17 22.03,12.5C22.03,8.92 18.05,8.13 14.35,10.13C14.03,9.73 13.61,9.42 13.13,9.22C13.32,8.29 13.76,7.24 14.75,6.75C17.11,5.57 17,2 12.5,2M3.28,4L2,5.27L4.47,7.73C3.22,7.74 2,8.87 2,11.5C2,15.07 5.96,15.85 9.65,13.87C9.97,14.27 10.4,14.59 10.89,14.79C10.69,15.71 10.25,16.75 9.27,17.24C6.91,18.42 7,22 11.5,22C13.8,22 14.94,20.36 14.94,18.21L18.73,22L20,20.72L3.28,4Z",fan_mode:Tt,power_sleep:zt,auto_start_stop:"M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A9,9 0 0,0 21,12A9,9 0 0,0 12,3M12,19A7,7 0 0,1 5,12A7,7 0 0,1 12,5A7,7 0 0,1 19,12A7,7 0 0,1 12,19M13,17H11V7H13V17Z",sleep:"M23,12H17V10L20.39,6H17V4H23V6L19.62,10H23V12M15,16H9V14L12.39,10H9V8H15V10L11.62,14H15V16M7,20H1V18L4.39,14H1V12H7V14L3.62,18H7V20Z"},hr="none",ur="off",pr="cool",mr="sleep",_r="auto_fan_none",fr="cooling",gr="heating",br={auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_turbo:"Turbo"},vr=["hvac_off_auto_start_stop","hvac_fan_only_auto_start_stop","hvac_dry_auto_start_stop"],yr=["hvac_fan_only_auto_start_stop","hvac_dry_auto_start_stop"],wr="disabled",xr="off",kr="classic",Sr="vtherm",Tr="gunmalmg";function Mr(t){const e=window;e.customCards=e.customCards||[],e.customCards.push(Object.assign(Object.assign({},t),{preview:!0}))}function Dr(t){const e=(new Date).getTime()-t.getTime();return Math.floor(e/6e4)}function Cr(t,e){const i=Math.round(t*e)/e;return parseFloat(i.toFixed(e))}console.info("%c VersatileThermostatUI-CARD \n%c version: 3.4.0 ","color: orange; font-weight: bold; background: black","color: white; font-weight: bold; background: dimgray"),Mr({type:"versatile-thermostat-ui-card",name:"Versatile Thermostat Climate Card",description:"Card for climate entity"});let Ar=class extends lt{_highChanged(t){if(this.isUserLocked)return;const e=t.detail.value;if(isNaN(e))return;const i=t.type.replace("-changed","");this.value=Object.assign(Object.assign({},this.value),{[i]:e}),this._selectTargetTemperature=i,this._callService(i)}_highChanging(t){if(this.isUserLocked)return;const e=t.detail.value;if(isNaN(e))return;const i=t.type.replace("-changing","");this.value=Object.assign(Object.assign({},this.value),{[i]:e}),this._selectTargetTemperature=i,this._updateDisplay(),this._vibrate(20)}_callService(t){this.isUserLocked||("high"!==t&&"low"!==t?this.hass.callService("climate","set_temperature",{entity_id:this.stateObj.entity_id,temperature:this.value.value}):this.hass.callService("climate","set_temperature",{entity_id:this.stateObj.entity_id,target_temp_low:this.value.low,target_temp_high:this.value.high}))}_handleButton(t){var e;if(this.isUserLocked)return;const i=t.currentTarget.target,o=t.currentTarget.step,a="high"===i?this.max:this.min;let n=null!==(e=this.value[i])&&void 0!==e?e:a;n+=o,n=Sa(n,this.min,this.max),"high"===i&&null!=this.value.low&&(n=Sa(n,this.value.low,this.max)),"low"===i&&null!=this.value.high&&(n=Sa(n,this.min,this.value.high)),this.value=Object.assign(Object.assign({},this.value),{[i]:n}),this._updateDisplay(),this._vibrate(40),this._debouncedCallService(i)}_handleTempUp(){var t;if(this.isUserLocked)return;const e=this.step||.5;let i="number"==typeof(null===(t=this.value)||void 0===t?void 0:t.value)?this.value.value:this.min;i+=e,i=Math.min(i,this.max),this.value=Object.assign(Object.assign({},this.value),{value:i}),this._callService("value")}_handleTempDown(){var t;if(this.isUserLocked)return;const e=this.step||.5;let i="number"==typeof(null===(t=this.value)||void 0===t?void 0:t.value)?this.value.value:this.min;i-=e,i=Math.max(i,this.min),this.value=Object.assign(Object.assign({},this.value),{value:i}),this._callService("value")}_handleSelectTemp(t){if(this.isUserLocked)return;const e=t.currentTarget.target;this._selectTargetTemperature=e,this._updateDisplay(),this._vibrate(40)}setConfig(t){this._config=Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t),this._gunmalmgPresetScrollDone=!1;const e=this._config&&this._config.theme?this._config.theme:"";this.theme=e,this.theme?this.setAttribute("theme",this.theme):this.setAttribute("theme","classic"),this._config&&this._config.theme&&this.setAttribute("theme",this._config.theme)}_applyThemeOverrides(t){}get effectiveDisableCircle(){return(this._config&&this._config.theme?this._config.theme:"classic")!==kr}get effectiveDisableBackgroundColor(){const t=this._config&&this._config.theme?this._config.theme:"classic";return t!==kr&&t!==Sr}getCardSize(){return 1}_vibrate(t){try{navigator.vibrate(t)}catch(t){}}_toggleThemeMenu(){this._showThemeMenu=!this._showThemeMenu}_closeThemeMenu(){this._showThemeMenu=!1}_openClassicPopup(){this._hasError&&(this.displayMessages=!0),this._showClassicPopup=!0}_closeClassicPopup(){this._showClassicPopup=!1,this.displayMessages=!1}_renderRegulationChartPanel(){var t,e,i,o,a,n,s,r,l,c,d,h,u,p;return(null===(t=this._config)||void 0===t?void 0:t.show_regulation_chart)?W`
|
||
<div class="regulation-chart-panel">
|
||
<div
|
||
class="regulation-chart-header"
|
||
@click=${()=>{this._regulationChartOpen=!this._regulationChartOpen}}
|
||
>
|
||
<span class="regulation-chart-title">${ma({hass:this.hass,string:"extra_states.regulation_chart_title"})}</span>
|
||
<ha-svg-icon
|
||
class="regulation-chart-chevron"
|
||
.path=${this._regulationChartOpen?wt:xt}
|
||
></ha-svg-icon>
|
||
</div>
|
||
<div class="regulation-chart-body" style=${this._regulationChartOpen?"":"display:none"}>
|
||
<vt-regulation-chart
|
||
.hass=${this.hass}
|
||
.entityId=${null!==(i=null===(e=this._config)||void 0===e?void 0:e.entity)&&void 0!==i?i:""}
|
||
.visible=${this._regulationChartOpen}
|
||
.targetTemp=${null!==(o=this.temperature)&&void 0!==o?o:null}
|
||
.roomTemp=${null!==(a=this.current)&&void 0!==a?a:null}
|
||
.regulatedTemp=${this.regulatedTargetTemperature}
|
||
.extTemp=${null!==(u=null===(h=null===(d=null===(c=null===(s=null===(n=this.hass)||void 0===n?void 0:n.states)||void 0===s?void 0:s[null!==(l=null===(r=this._config)||void 0===r?void 0:r.entity)&&void 0!==l?l:""])||void 0===c?void 0:c.attributes)||void 0===d?void 0:d.specific_states)||void 0===h?void 0:h.ext_current_temperature)&&void 0!==u?u:null}
|
||
.powerPercent=${null!==(p=this.powerPercent)&&void 0!==p?p:null}
|
||
></vt-regulation-chart>
|
||
</div>
|
||
</div>
|
||
`:W``}_renderPresetModificationPanel(){var t;if(!(null===(t=this._config)||void 0===t?void 0:t.allow_preset_modification))return W``;const e=["frost","eco","comfort","boost"],i={frost:ma({hass:this.hass,string:"extra_states.frost"}),eco:ma({hass:this.hass,string:"extra_states.eco"}),comfort:ma({hass:this.hass,string:"extra_states.comfort"}),boost:ma({hass:this.hass,string:"extra_states.boost"})},o=new Map;for(const t of this._presetTempEntities){const e=`${t.mode}_${t.away?"away":"present"}_${t.preset}`;o.set(e,t.entityId)}const a=this._hasValidCentralPresetTemperatures(),n=this._presetTempEntities.some((t=>{var e;const i=null===(e=this.hass)||void 0===e?void 0:e.states[t.entityId];return!!i&&i.state!==cr})),s=this.hvacMode===pr?"cool":"heat";let r=[{mode:"heat",away:!1,labelKey:"extra_states.preset_row_heat"},{mode:"heat",away:!0,labelKey:"extra_states.preset_row_heat_away"},{mode:"cool",away:!1,labelKey:"extra_states.preset_row_cool"},{mode:"cool",away:!0,labelKey:"extra_states.preset_row_cool_away"}];r=r.filter((t=>t.mode===s)),n?r=r.filter((t=>e.some((e=>o.has(`${t.mode}_${t.away?"away":"present"}_${e}`))))):a||(r=[]);const l=n||a,c=(t,e,i)=>{var s,r,l,c,d,h;const u=`${t}_${e?"away":"present"}_${i}`,p=o.get(u),m=p?this.hass.states[p]:void 0,_=!!m&&m.state!==cr;if(p&&_){const t=parseFloat(m.state),e=null!==(r=null===(s=null==m?void 0:m.attributes)||void 0===s?void 0:s.step)&&void 0!==r?r:.5,o=null!==(c=null===(l=null==m?void 0:m.attributes)||void 0===l?void 0:l.min)&&void 0!==c?c:7,a=null!==(h=null===(d=null==m?void 0:m.attributes)||void 0===d?void 0:d.max)&&void 0!==h?h:35,n=t=>{const i=Math.round(Math.min(a,Math.max(o,t))/e)*e,n=Math.round(100*i)/100;this.hass.callService("number","set_value",{entity_id:p,value:n})};return W`
|
||
<td class="preset-temp-cell preset-col-${i}">
|
||
<div class="preset-temp-stepper">
|
||
<input
|
||
type="number"
|
||
class="preset-temp-input"
|
||
.value=${null===t||isNaN(t)?"":String(t)}
|
||
step=${e}
|
||
min=${o}
|
||
max=${a}
|
||
@change=${t=>{const e=parseFloat(t.target.value);isNaN(e)||n(e)}}
|
||
/>
|
||
<div class="preset-step-btns">
|
||
<button class="preset-step-btn preset-step-up" @click=${()=>{null===t||isNaN(t)||n(t+e)}}>+</button>
|
||
<button class="preset-step-btn preset-step-down" @click=${()=>{null===t||isNaN(t)||n(t-e)}}>−</button>
|
||
</div>
|
||
</div>
|
||
</td>
|
||
`}if(!n&&a){const o=this._getPresetTemperature(i,t,e,!1);if(null!==o)return W`
|
||
<td class="preset-temp-cell preset-col-${i}">
|
||
<div class="preset-temp-stepper">
|
||
<div class="preset-temp-readonly">
|
||
${Ta(o,this.hass.locale,{minimumFractionDigits:1,maximumFractionDigits:1})} ${this.hass.config.unit_system.temperature}
|
||
</div>
|
||
</div>
|
||
</td>
|
||
`}return W`<td class="preset-temp-cell empty">–</td>`};return W`
|
||
<div class="preset-mod-panel ${this._isLocked?"locked":""}">
|
||
<div
|
||
class="preset-mod-header"
|
||
@click=${()=>{this._isLocked||(this._presetsPanelOpen=!this._presetsPanelOpen)}}
|
||
title=${ma({hass:this.hass,string:"extra_states.preset_mod_title"})}
|
||
>
|
||
<span class="preset-mod-title">${ma({hass:this.hass,string:"extra_states.preset_mod_title"})}</span>
|
||
<ha-svg-icon
|
||
class="preset-mod-chevron ${this._presetsPanelOpen?"open":""}"
|
||
.path=${this._presetsPanelOpen?wt:xt}
|
||
></ha-svg-icon>
|
||
</div>
|
||
${this._presetsPanelOpen?W`
|
||
<div class="preset-mod-body">
|
||
${l?W`
|
||
<table class="preset-temp-table">
|
||
<thead>
|
||
<tr>
|
||
<th class="preset-temp-row-label"></th>
|
||
${e.map((t=>W`<th class="preset-temp-col-label col-${t}">${i[t]}</th>`))}
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
${r.map((t=>W`
|
||
<tr>
|
||
<td class="preset-temp-row-label">
|
||
${ma({hass:this.hass,string:t.labelKey})}
|
||
</td>
|
||
${e.map((e=>c(t.mode,t.away,e)))}
|
||
</tr>
|
||
`))}
|
||
</tbody>
|
||
</table>
|
||
`:W`
|
||
<div class="preset-mod-empty">
|
||
${ma({hass:this.hass,string:"extra_states.preset_mod_no_entities"})}
|
||
</div>
|
||
`}
|
||
</div>
|
||
`:""}
|
||
</div>
|
||
`}_renderClassicContent(t=!1){var e,i,o,a,n,s,r,l,c,d,h,u,p,m,_,f,g,b,v,y,w,x,k;const S=!t&&this.effectiveDisableCircle,T=!t&&this.effectiveDisableBackgroundColor;this._renderingAsClassic=t;const M=W`
|
||
${this.name.length>0?W`
|
||
<div class="name">${this.name}</div>
|
||
`:""}
|
||
|
||
${(null===(e=this.safety_state)||void 0===e?void 0:e.length)>0&&!this.displayMessages?W`
|
||
<div class="security">
|
||
<ha-icon-button class="alert" .path=${Ot}>
|
||
</ha-icon-button>
|
||
${W`
|
||
${this.safety_state.map((t=>W`<span>${t.name}: ${t.security_msg}</span>`))}
|
||
`}
|
||
</div>
|
||
`:""}
|
||
${this.messages.length>0&&this.displayMessages?W`
|
||
<div class="messages">
|
||
<ha-icon-button class="alert" .path=${this._hasError?yt:At}>
|
||
</ha-icon-button>
|
||
${this.messages.map((t=>W`<span>${t}</span>`))}
|
||
</div>
|
||
`:""}
|
||
|
||
<div title="${this.buildTitle()}" class="${S?"disabled-circle-container":""} ${T?"no-background-color":""} ${this.hvacMode}_${this.hvacAction} ${this._hasWindow?"window_open":""} ${this.overpowering?"overpowering":""}">
|
||
${S?W`
|
||
<!-- No circle configured -->
|
||
`:null!=this.value.low&&null!=this.value.high&&(null===(i=this.stateObj)||void 0===i?void 0:i.state)!==cr?W`
|
||
<vt-ha-control-circular-slider
|
||
class="${null!==this.safety_state||this.displayMessages?"security_msg":""} ${this._hasWindow?"window_open":""} ${this.overpowering?"overpowering":""} ${this.presence?"presence":""} ${this.motion?"motion":""} ${this._hasWindowByPass?"windowByPass":""} ${(null===(o=this._config)||void 0===o?void 0:o.show_background_gradient_on_active)&&this.isDeviceActive?"with-background-gradient":""}"
|
||
.inactive=${this._hasWindow}
|
||
dual
|
||
.low=${this.value.low}
|
||
.high=${this.value.high}
|
||
.min=${this.min}
|
||
.max=${this.max}
|
||
.step=${this.step}
|
||
.current=${this.current}
|
||
@low-changed=${this._highChanged}
|
||
@low-changing=${this._highChanging}
|
||
@high-changed=${this._highChanged}
|
||
@high-changing=${this._highChanging}
|
||
>
|
||
`:W`
|
||
<vt-ha-control-circular-slider
|
||
class="${null!==this.safety_state||this.displayMessages?"security_msg":""} ${this._hasWindow?"window_open":""} ${this.overpowering?"overpowering":""} ${this.presence?"presence":""} ${this.motion?"motion":""} ${this._hasWindowByPass?"windowByPass":""} ${(null===(a=this._config)||void 0===a?void 0:a.show_background_gradient_on_active)&&this.isDeviceActive?"with-background-gradient":""}"
|
||
.inactive=${this._hasWindow}
|
||
.mode="start"
|
||
@value-changed=${this._highChanged}
|
||
@value-changing=${this._highChanging}
|
||
.value=${this.value.value}
|
||
.current=${this.current}
|
||
step=${this.step}
|
||
min=${this.min}
|
||
max=${this.max}
|
||
>
|
||
`}
|
||
<div class="content${(null===(n=this._config)||void 0===n?void 0:n.disable_presets)?" no-presets":""} ${0==this.name.length?" noname":""} ${null!==this.safety_state||this.displayMessages?" security_msg":""} ${this._hasWindow?" window_open":""} ${this.overpowering?" overpowering":""} ${this.presence?" presence":""} ${this.motion?" motion":""} ${this._hasWindowByPass?" windowByPass":""} " >
|
||
<svg id="main" viewbox="0 0 125 100">
|
||
<g transform="translate(57.5,37) scale(0.35)">
|
||
${this._hasWindowByPass?B`
|
||
<g transform="${this._hasWindowByPass?"translate(-50.25,0)":""}" @click=${this._handleToggleWindowByPass} class="icon-group">
|
||
<rect width="24" height="24" fill="transparent" style="cursor: pointer;"/>
|
||
<path class="window window-by-pass ${this._hasWindowByPass?"active":""}" id="window-by-pass" d=${It}/>
|
||
</g>
|
||
`:""}
|
||
${this._hasWindowByPass||!this._hasWindow||(null===(s=this._config)||void 0===s?void 0:s.disable_window)?"":B`
|
||
<g transform="${this._hasWindow&&!(null===(r=this._config)||void 0===r?void 0:r.disable_window)?"translate(-50.25,0)":""}" @click=${this._handleToggleWindowByPass} class="icon-group">
|
||
<rect width="24" height="24" fill="transparent" style="cursor: pointer;"/>
|
||
<path class="window ${this._hasWindow?"active":""}" id="window" d=${Ht}/>
|
||
</g>
|
||
`}
|
||
${this._hasOverpowering&&!(null===(l=this._config)||void 0===l?void 0:l.disable_overpowering)?B`
|
||
<path class="overpowering ${this.overpowering?"active":""}" transform="${this._hasOverpowering&&!(null===(c=this._config)||void 0===c?void 0:c.disable_overpowering)?"translate(-25.25,0)":""}" id="overpowering" d=${Mt} />
|
||
`:""}
|
||
${this._hasPresence?B`
|
||
<path class="presence ${this.presence?"active":""}" transform="${this._hasPresence?"translate(0.25,0)":""}" id="overpowering" d=${Ct} />
|
||
`:""}
|
||
${this._hasAutoStartStop&&!(null===(d=this._config)||void 0===d?void 0:d.disable_autoStartStop)?B`
|
||
<path class="auto-start-stop" transform="${this._hasAutoStartStop&&!(null===(h=this._config)||void 0===h?void 0:h.disable_autoStartStop)?"translate(25.25,0)":""}" id="autoStartStop" d=${zt}/>
|
||
`:""}
|
||
${this._hasMotion?B`
|
||
<path class="motion ${this.motion?"active":""}" transform="${this._hasMotion?"translate(50.25,0)":""}" id="motion" d=${$t} />
|
||
`:""}
|
||
</g>
|
||
|
||
${S?B`
|
||
${this._renderStatusText("62.5","50")}
|
||
${this._renderTemperature(this._display_top,!0,"55","62%",!(null===(u=null==this?void 0:this._config)||void 0===u?void 0:u.set_current_as_main))}
|
||
${this._renderTemperature(this._display_bottom,!1,"90","62%",1==(null===(p=null==this?void 0:this._config)||void 0===p?void 0:p.set_current_as_main))}
|
||
<g class="current-info" transform="translate(100,65)">
|
||
${this._renderHVACAction()}
|
||
</g>
|
||
`:B`
|
||
${this._renderStatusText("62.5","50")}
|
||
${this._renderTemperature(this._display_top,!0,"50%","62%",!(null===(m=null==this?void 0:this._config)||void 0===m?void 0:m.set_current_as_main))}
|
||
<line x1="35" y1="72" x2="90" y2="72" stroke="#e7e7e8" stroke-width="0.5" />
|
||
<g class="current-info" transform="translate(62.5,80)">
|
||
${this._renderTemperature(this._display_bottom,!1,"-5%","0%",1==(null===(_=null==this?void 0:this._config)||void 0===_?void 0:_.set_current_as_main))}
|
||
${this._renderHVACAction()}
|
||
</g>
|
||
`}
|
||
</svg>
|
||
</div>
|
||
${S?"":W`
|
||
</vt-ha-control-circular-slider>`}
|
||
</div>
|
||
<div id="modes" class="${null!==this.safety_state||this.displayMessages?"security_msg":""}">
|
||
${B`
|
||
${this.modes.map((t=>{var e,i,o,a,n,s,r,l;return(null===(e=this._config)||void 0===e?void 0:e.disable_heat)&&"heat"===t||(null===(i=this._config)||void 0===i?void 0:i.disable_auto)&&"auto"===t||(null===(o=this._config)||void 0===o?void 0:o.disable_cool)&&"cool"===t||(null===(a=this._config)||void 0===a?void 0:a.disable_heat_cool)&&"heat_cool"===t||(null===(n=this._config)||void 0===n?void 0:n.disable_dry)&&"dry"===t||(null===(s=this._config)||void 0===s?void 0:s.disable_fan_only)&&"fan_only"===t||(null===(r=this._config)||void 0===r?void 0:r.disable_off)&&"off"===t||(null===(l=this._config)||void 0===l?void 0:l.disable_sleep)&&"sleep"===t?W``:this._renderIcon(t,this.hvacMode)}))}
|
||
`}
|
||
</div>
|
||
${(null===(f=null==this?void 0:this._config)||void 0===f?void 0:f.disable_buttons)?W``:W`
|
||
<div id="vt-control-buttons" class="${null!==this.safety_state||this.displayMessages?"security_msg":""}">
|
||
<div class="button">
|
||
<vt-ha-outlined-icon-button
|
||
.target=${this.target}
|
||
.step=${this.step}
|
||
@click=${this._handleButton}
|
||
>
|
||
<ha-svg-icon .path=${"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"}></ha-svg-icon>
|
||
</vt-ha-outlined-icon-button>
|
||
</div>
|
||
<div class="button">
|
||
<vt-ha-outlined-icon-button
|
||
.target=${this.target}
|
||
.step=${-this.step}
|
||
@click=${this._handleButton}
|
||
>
|
||
<ha-svg-icon .path=${"M19,13H5V11H19V13Z"}></ha-svg-icon>
|
||
</vt-ha-outlined-icon-button>
|
||
</div>
|
||
</div>
|
||
`}
|
||
|
||
${(null===(g=this._config)||void 0===g?void 0:g.disable_presets)?"":W`
|
||
<div id="presets" class="${null!==this.safety_state||this.displayMessages?"security_msg":""}">
|
||
${B`
|
||
${this.presets.map((t=>this._renderPreset(t,this.preset)))}
|
||
`}
|
||
${(null===(b=this._config)||void 0===b?void 0:b.disable_timed_preset)?"":W`
|
||
<div class="timed-preset-container ${this._isLocked?"locked":""}">
|
||
${this.timedPresetActive?W`
|
||
<span class="timed-preset-remaining"
|
||
title="${ma({hass:this.hass,string:"extra_states.cancel_timed_preset"})}"
|
||
@click=${this._handleCancelTimedPreset}>
|
||
${this._formatRemainingTime(this.timedPresetRemainingTime)}
|
||
</span>
|
||
${(null!==(v=this.timedPresetRemainingTime)&&void 0!==v?v:0)<60?W`
|
||
<span class="timed-preset-label">${ma({hass:this.hass,string:"extra_states.minutes"})}</span>
|
||
`:""}
|
||
`:(null===(y=this._config)||void 0===y?void 0:y.use_manual_duration_input)?W`
|
||
<input
|
||
type="number"
|
||
class="timed-preset-input ${this.timedPresetDuration?"active":""}"
|
||
.value=${null!==(w=this.timedPresetDuration)&&void 0!==w?w:""}
|
||
@input=${this._handleTimedPresetDurationChange}
|
||
placeholder="0"
|
||
min="0"
|
||
max="1440"
|
||
title="${ma({hass:this.hass,string:"extra_states.timed_preset_title"})}"
|
||
/>
|
||
<span class="timed-preset-label">${ma({hass:this.hass,string:"extra_states.minutes"})}</span>
|
||
`:W`
|
||
<select
|
||
class="timed-preset-select ${this.timedPresetDuration?"active":""}"
|
||
@change=${this._handleTimedPresetSelectChange}
|
||
title="${ma({hass:this.hass,string:"extra_states.timed_preset_title"})}"
|
||
>
|
||
<option value="" ?selected=${!this.timedPresetDuration}>--</option>
|
||
<option value="15" ?selected=${15===this.timedPresetDuration}>15 ${ma({hass:this.hass,string:"extra_states.minutes"})}</option>
|
||
<option value="30" ?selected=${30===this.timedPresetDuration}>30 ${ma({hass:this.hass,string:"extra_states.minutes"})}</option>
|
||
<option value="60" ?selected=${60===this.timedPresetDuration}>1 h</option>
|
||
<option value="120" ?selected=${120===this.timedPresetDuration}>2 h</option>
|
||
<option value="240" ?selected=${240===this.timedPresetDuration}>4 h</option>
|
||
<option value="480" ?selected=${480===this.timedPresetDuration}>8 h</option>
|
||
<option value="1440" ?selected=${1440===this.timedPresetDuration}>24 h</option>
|
||
</select>
|
||
`}
|
||
</div>
|
||
`}
|
||
</div>
|
||
`}
|
||
|
||
<div id="left-infos" class="${(null===(x=this._config)||void 0===x?void 0:x.disable_presets)?"no-presets":""}">
|
||
${this.isRecalculateScheduled?B`
|
||
${this._renderRecalculateScheduledButton()}
|
||
`:""}
|
||
${this.messages.length>0?B`
|
||
${this._renderMessagesButton()}
|
||
`:""}
|
||
${(this._config.autoStartStopEnableEntity||this._config.autoStartStopStopModeEntity)&&this._isAutoStartStopConfigured?B`
|
||
${this._renderAutoStartStopEnable()}
|
||
`:""}
|
||
${B`
|
||
${this._externalPowerInfos.map((t=>this._renderPowerInfo(t)))}
|
||
`}
|
||
${B`
|
||
${this.powerInfos.map((t=>this._renderPowerInfo(t)))}
|
||
`}
|
||
${B`
|
||
${this.autoFanInfos.map((t=>this._renderAutoFanInfo(t)))}
|
||
`}
|
||
${this._renderHumidityInfo()}
|
||
</div>
|
||
|
||
<div id="right-lock">
|
||
${(null===(k=this._config)||void 0===k?void 0:k.allow_lock_toggle)?W`
|
||
<ha-icon-button
|
||
class="lock-icon ${this._isLocked?"locked":"unlocked"}"
|
||
.path=${this._isLocked?Pt:Et}
|
||
@click=${this._handleLockToggle}
|
||
tabindex="0"
|
||
></ha-icon-button>
|
||
`:""}
|
||
</div>
|
||
<div class="bottom-panels ${this._renderingAsClassic?"in-popup":"in-card"}">
|
||
${this._renderPresetModificationPanel()}
|
||
${this._renderRegulationChartPanel()}
|
||
</div>
|
||
`;return this._renderingAsClassic=!1,M}_applyTheme(t){this._config||(this._config={}),this._config.theme=t,ka(this,"config-changed",{config:this._config}),this._closeThemeMenu(),this.setAttribute("theme",t),this._applyThemeOverrides(t)}async _menuLockToggle(){var t;if((null===(t=this._config)||void 0===t?void 0:t.entity)&&this.hass&&this.stateObj){if(this._hasLockCode)return this.isLocking=!this._isLocked,this.showDigicodeModal=!0,void(this.enteredCode="");try{if(this._isLocked){if(this._hasLockCode)return this.isLocking=!1,this.showDigicodeModal=!0,void(this.enteredCode="");this._isLockConfigured?await this.hass.callService("versatile_thermostat","unlock",{entity_id:this._config.entity}):(this._isLocked=this.isUserLocked=!1,this.requestUpdate())}else{if(this._hasLockCode)return this.isLocking=!0,this.showDigicodeModal=!0,void(this.enteredCode="");this._isLockConfigured?await this.hass.callService("versatile_thermostat","lock",{entity_id:this._config.entity}):(this._isLocked=this.isUserLocked=!0,this.requestUpdate())}}catch(t){console.error(t)}}}_menuCancelTimedPreset(){this.timedPresetActive&&this._handleCancelTimedPreset()}firstUpdated(t){this._init=!1}shouldUpdate(t){return void 0!==t.has("_config")&&void 0!==t.get("_config")&&(this._hasOverpowering=!1,this._hasWindow=!1,this._hasWindowByPass=!1,this._hasMotion=!1,this._hasPresence=!1,this._hasAutoStartStop=!1,this._isAutoStartStopEnabled=!1,this._autoStartStopStopMode=xr,this._autoStartStopStopModeOptions=[],this.humidity=0),void 0!==t.get("hass")&&(this._init=!1),!0}updated(t){var e,i,o;super.updated(t),this._firstRender=!1,"gunmalmg"!==(null===(e=this._config)||void 0===e?void 0:e.theme)||this._gunmalmgPresetScrollDone||requestAnimationFrame((()=>{var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".gunmalmg-presets-scroll"),i=null==e?void 0:e.querySelector(".selected-icon");if(i&&e){this._gunmalmgPresetScrollDone=!0;const t=i.closest(".preset-label")||i,o=t.offsetLeft,a=t.offsetWidth,n=e.clientWidth,s=a,r=Math.max(0,o-(n-a)/2+s);e.scrollLeft=r}})),t.has("showDigicodeModal")&&(this.showDigicodeModal?window.addEventListener("keydown",this._handleKeyDown):window.removeEventListener("keydown",this._handleKeyDown)),null===(o=null===(i=null==this?void 0:this.shadowRoot)||void 0===i?void 0:i.querySelector(".security"))||void 0===o||o.addEventListener("click",(()=>{var t,e,i,o;null===(e=null===(t=null==this?void 0:this.shadowRoot)||void 0===t?void 0:t.querySelector(".security"))||void 0===e||e.remove(),null===(o=null===(i=null==this?void 0:this.shadowRoot)||void 0===i?void 0:i.querySelector(".content"))||void 0===o||o.classList.remove("security_msg"),this._vibrate(2)}))}_willUpdatePower(){let t,e,i;this._externalPowerInfos=[],this._config.powerEntity&&(console.log(`There is a powerEntity ${this._config.powerEntity}`),t=this.hass.states[this._config.powerEntity],e=Number(t.state),i=t.attributes.unit_of_measurement,console.log(`Power found ${e} ${i} for ${name}`)),e&&(console.log("J'ai pushé du power"),this._externalPowerInfos.push({name:"mean_power_cycle",value:e,unit:i,class:"vt-power-color"}))}_classifyPresetEntity(t){const e=t.toLowerCase(),i=/_cool_/.test(e)||e.endsWith("_cool")||/_ac_(away_)?temp$/.test(e),o=e.includes("_away");let a=null;return e.includes("frost")||e.includes("hors_gel")?a="frost":e.includes("eco")?a="eco":e.includes("comfort")?a="comfort":e.includes("boost")&&(a="boost"),a?{entityId:t,preset:a,mode:i?"cool":"heat",away:o}:null}_discoverPresetTempEntities(){var t,e;if(!this.hass||!(null===(t=this._config)||void 0===t?void 0:t.entity))return;const i=this.hass.entities;if(!i)return void console.log("[PresetMod] hass.entities not available");const o=i[this._config.entity];if(!(null==o?void 0:o.device_id))return void console.log(`[PresetMod] No device_id for entity ${this._config.entity}`);const a=o.device_id;console.log(`[PresetMod] device_id=${a}`);const n=[];for(const[t,o]of Object.entries(i)){if(o.device_id!==a)continue;if(!t.startsWith("number."))continue;const i=this.hass.states[t];if(!i)continue;if("temperature"!==(null===(e=i.attributes)||void 0===e?void 0:e.device_class))continue;const s=this._classifyPresetEntity(t);s&&(console.log(`[PresetMod] found entity: ${t} preset=${s.preset} mode=${s.mode} away=${s.away}`),n.push(s))}const s=this._presetTempEntities.map((t=>t.entityId)).join(","),r=n.map((t=>t.entityId)).join(",");s!==r&&(this._presetTempEntities=n)}willUpdate(t){var e,i,o,a,n,s,r,l,c,d,h,u,p,m,_,f,g,b,v,y,w,x,k,S,T,M,D,C,A,P,E,L,$,z,O,V,H,I,R,F,N,j,W,B,U,Y,q,Z,X,K,G,Q,J,tt,et,it,ot,at,nt,st;if(!this.hass||!this._config||!t.has("hass")&&!t.has("_config"))return;const rt=this._config.entity;this._willUpdatePower(),(null===(e=this._config)||void 0===e?void 0:e.allow_preset_modification)&&this._discoverPresetTempEntities();const lt=this.hass.states[rt];if(!lt)return void console.log("No state");const ct=t.get("hass"),dt=null===(i=this._config)||void 0===i?void 0:i.autoFanEnableEntity,ht=!(!dt||ct&&ct.states[dt]===this.hass.states[dt]);if(!ct||ct.states[rt]!==lt||ht){if(!this._config||!this.hass||!this._config.entity)return void console.log("No change return");console.log("Something may have change"),this.stateObj=lt;const t=this.stateObj.attributes,e=this.stateObj.state;this._isLockConfigured=!0===(null==t?void 0:t.is_lock_configured),(null==t?void 0:t.lock_manager)&&(this._isLocked=(null===(o=null==t?void 0:t.lock_manager)||void 0===o?void 0:o.is_locked)||!1),this.isUserLocked=this._isLocked&&(!this._isLockConfigured||(null===(a=null==t?void 0:t.lock_manager)||void 0===a?void 0:a.lock_users)||!1),this.isAutomationLocked=this._isLocked&&((null===(n=null==t?void 0:t.lock_manager)||void 0===n?void 0:n.lock_automations)||!1),this._hasLockCode=!0===(null===(s=null==t?void 0:t.lock_manager)||void 0===s?void 0:s.lock_code),console.log(`Lock states. isConfigured:${this._isLockConfigured} isLocked=${this._isLocked} isUserLocked=${this.isUserLocked} isAutomationLocked=${this.isAutomationLocked} hasLockCode=${this._hasLockCode}`),this.name="",this.hvacMode=e||ur,this.hvacAction=null==t?void 0:t.hvac_action,this.preset=null==t?void 0:t.preset_mode,this.modes=(null==t?void 0:t.hvac_modes)?Object.values(t.hvac_modes):[],this.presets=t.preset_modes?Object.values(t.preset_modes):[],this.isSleeping=!0===(null===(r=null==t?void 0:t.specific_states)||void 0===r?void 0:r.is_sleeping),this.powerPercent=(null===(l=null==t?void 0:t.vtherm_over_switch)||void 0===l?void 0:l.power_percent)||(null===(d=null===(c=null==t?void 0:t.vtherm_over_climate)||void 0===c?void 0:c.valve_regulation)||void 0===d?void 0:d.power_percent)||0,void 0===(null===(h=null==t?void 0:t.specific_states)||void 0===h?void 0:h.is_device_active)?(this.isDeviceActive=this.hvacAction==gr||this.hvacAction==fr,console.log(`is_device_active not found value=${this.isDeviceActive}`)):(this.isDeviceActive=!0===(null===(u=null==t?void 0:t.specific_states)||void 0===u?void 0:u.is_device_active),console.log(`is_device_active found value=${this.isDeviceActive}`)),this.temperature=null==t?void 0:t.temperature,this.step=(null===(p=null==t?void 0:t.configuration)||void 0===p?void 0:p.target_temperature_step)||.5,this.min=(null==t?void 0:t.min_temp)||7,this.max=(null==t?void 0:t.max_temp)||35,this.current=(null==t?void 0:t.current_temperature)||0;const i=null==t?void 0:t.current_humidity;this.humidity=null!=i&&Number.isFinite(Number(i))?Number(i):null,this.windowState=null===(m=null==t?void 0:t.window_manager)||void 0===m?void 0:m.window_state,this.windowAutoState=null===(_=null==t?void 0:t.window_manager)||void 0===_?void 0:_.window_auto_state,this.overpoweringState=(null===(f=null==t?void 0:t.power_manager)||void 0===f?void 0:f.overpowering_state)||"off",this.presenceState=(null===(g=null==t?void 0:t.presence_manager)||void 0===g?void 0:g.presence_state)||"off",this.motionState=(null===(b=null==t?void 0:t.motion_manager)||void 0===b?void 0:b.motion_state)||"off",this._hasWindowByPass=!0===(null===(v=null==t?void 0:t.window_manager)||void 0===v?void 0:v.is_window_bypass),this.safetyState=(null===(y=null==t?void 0:t.safety_manager)||void 0===y?void 0:y.safety_state)||"off",this.meanCyclePower=(null===(w=null==t?void 0:t.power_manager)||void 0===w?void 0:w.mean_cycle_power)||0,this.valveOpenPercent=(null===(x=null==t?void 0:t.vtherm_over_valve)||void 0===x?void 0:x.valve_open_percent)||(null===(S=null===(k=null==t?void 0:t.vtherm_over_climate_valve)||void 0===k?void 0:k.valve_regulation)||void 0===S?void 0:S.valve_open_percent)||0,this.devicePower=(null===(T=null==t?void 0:t.power_manager)||void 0===T?void 0:T.device_power)||0,this.isRegulated=!0===(null===(M=null==t?void 0:t.vtherm_over_climate)||void 0===M?void 0:M.is_regulated),this.regulatedTargetTemperature=(null===(C=null===(D=null==t?void 0:t.vtherm_over_climate)||void 0===D?void 0:D.regulation)||void 0===C?void 0:C.regulated_target_temperature)||null,this.autoRegulationMode=(null===(P=null===(A=null==t?void 0:t.vtherm_over_climate)||void 0===A?void 0:A.regulation)||void 0===P?void 0:P.auto_regulation_mode)||null,this.currentAutoFanMode=(null===(E=null==t?void 0:t.vtherm_over_climate)||void 0===E?void 0:E.current_auto_fan_mode)||null,this.autoFanMode=(null===(L=null==t?void 0:t.vtherm_over_climate)||void 0===L?void 0:L.auto_fan_mode)||null,this.fanMode=(null==t?void 0:t.fan_mode)||null;const rt=null==t?void 0:t.auto_fan;this._isAutoFanPlugin=!!rt;const ct=(null===($=this._config)||void 0===$?void 0:$.autoFanEnableEntity)?null===(z=this.hass)||void 0===z?void 0:z.states[this._config.autoFanEnableEntity]:void 0;this._isAutoFanEnabled=ct?"on"===ct.state:!0===(null==rt?void 0:rt.enabled),this._autoFanSelectedMode=(null==rt?void 0:rt.selected_fan_mode)||"",this.hvacModeReason=(null===(O=null==t?void 0:t.specific_states)||void 0===O?void 0:O.hvac_mode_reason)||null,this.isRecalculateScheduled=(null===(V=null==t?void 0:t.specific_states)||void 0===V?void 0:V.is_recalculate_scheduled)||null,this.isOn=!0===(null===(H=null==t?void 0:t.specific_states)||void 0===H?void 0:H.is_on),this.timedPresetActive=!0===(null===(I=null==t?void 0:t.timed_preset_manager)||void 0===I?void 0:I.is_active),this.timedPresetRemainingTime=(null===(R=null==t?void 0:t.timed_preset_manager)||void 0===R?void 0:R.remaining_time_min)||null,this.timedPresetPreset=(null===(F=null==t?void 0:t.timed_preset_manager)||void 0===F?void 0:F.preset)||null;const dt=(null===(N=null==t?void 0:t.requested_state)||void 0===N?void 0:N.hvac_mode)||null;let ht=(null===(j=null==t?void 0:t.specific_states)||void 0===j?void 0:j.messages)||[];ht&&!Array.isArray(ht)&&(ht=[ht]);const ut=1==(null===(W=null==t?void 0:t.vtherm_over_climate_valve)||void 0===W?void 0:W.have_valve_regulation);if((null===(B=this._config)||void 0===B?void 0:B.disable_name)||(this.name=this._config.name?this._config.name:t.friendly_name),this.hvacMode==ur&&!0===this.isSleeping&&(this.hvacMode=mr),console.log(`Mode is ${this.hvacMode}`),!0===(null==t?void 0:t.is_over_switch)&&this.powerPercent>0&&(this.hvacAction="heat"==dt?gr:fr,console.log(`After hvac_action patch ${this.hvacAction}`)),console.log(`Modes are ${this.modes}`),this.modes.length>1&&this.modes.includes(ur)&&this.modes.sort(((t,e)=>"off"===t?1:"off"===e?-1:t.localeCompare(e))),console.log(`After sort modes are ${this.modes}`),this.presets.length>0&&(this.presets=this.presets.filter((t=>t!=hr&&(e!=pr||"frost"!=t)))),this.value={value:(null==t?void 0:t.temperature)||0,low:(null==t?void 0:t.target_temp_low)||null,high:(null==t?void 0:t.target_temp_high)||null},"on"===this.windowState||"on"===this.windowAutoState?this._hasWindow=!0:this._hasWindow=!1,"on"===this.overpoweringState?(this._hasOverpowering=!0,this.overpowering=!0):(this._hasOverpowering=!1,this.overpowering=!1),"on"===this.presenceState?(this._hasPresence=!0,this.presence=!0):(this._hasPresence=!1,this.presence=!1),"on"===this.motionState?(this._hasMotion=!0,this.motion=!0):(this._hasMotion=!1,this.motion=!1),"on"!==this.safetyState||(null===(U=null==this?void 0:this._config)||void 0===U?void 0:U.disable_safety_warning))this.safety_state=null;else{if(this.safety_state=[],this.safety_state.push({name:ma({hass:this.hass,string:"extra_states.safety_warning"}),security_msg:ma({hass:this.hass,string:"extra_states.safety_warning_msg"})}),null===(Y=t.specific_states)||void 0===Y?void 0:Y.last_temperature_datetime){let e=Dr(new Date(null===(q=t.specific_states)||void 0===q?void 0:q.last_temperature_datetime));e>0&&this.safety_state.push({name:ma({hass:this.hass,string:"extra_states.room_temp"}),security_msg:e+" "+ma({hass:this.hass,string:"extra_states.minutes"})})}if(null===(Z=t.specific_states)||void 0===Z?void 0:Z.last_ext_temperature_datetime){let e=Dr(new Date(null===(X=t.specific_states)||void 0===X?void 0:X.last_ext_temperature_datetime));e>0&&this.safety_state.push({name:ma({hass:this.hass,string:"extra_states.outdoor_temp"}),security_msg:e+" "+ma({hass:this.hass,string:"extra_states.minutes"})})}}if(console.log(`Brut messages=${ht}`),this.messages=[],this._hasError=!1,this.safety_state)for(const t of this.safety_state)this.messages.push(`${t.name}: ${t.security_msg}`),this._hasError=!0;for(const t of ht)this.messages.push(ma({hass:this.hass,string:`extra_states.${t}`}));yr.includes(this.hvacModeReason)&&!ht.includes(this.hvacModeReason)&&this.messages.push(ma({hass:this.hass,string:`extra_states.${this.hvacModeReason}`}));const pt=null==t?void 0:t.heating_failure_detection_manager,mt="on"===(null==pt?void 0:pt.heating_failure_state),_t="on"===(null==pt?void 0:pt.cooling_failure_state);if(mt&&(this.messages.push(ma({hass:this.hass,string:"extra_states.heating_failure"})),this._hasError=!0),_t&&(this.messages.push(ma({hass:this.hass,string:"extra_states.cooling_failure"})),this._hasError=!0),console.log(`Messages=${JSON.stringify(this.messages)}`),this.powerInfos=[],console.log(`MeanCyclePower=${this.meanCyclePower} PowerPercent=${this.powerPercent} ValveOpenPercent=${this.valveOpenPercent} DevicePower=${this.devicePower}`),(null===(K=this._config)||void 0===K?void 0:K.disable_power_infos)||!this.isOn&&!ut?console.log(`No power to disply is_on=${this.isOn} or disabled`):((null==t?void 0:t.is_over_switch)&&(this.meanCyclePower&&!(null===(G=this._config)||void 0===G?void 0:G.powerEntity)&&this.powerInfos.push({name:"mean_power_cycle",value:Cr(this.meanCyclePower,1),unit:this.meanCyclePower<7?"kW":"W",class:"vt-power-color"}),this.powerInfos.push({name:"power_percent",value:this.powerPercent,unit:"%",class:"vt-power-color"})),((null==t?void 0:t.is_over_valve)||ut)&&(this.meanCyclePower&&!(null===(Q=this._config)||void 0===Q?void 0:Q.powerEntity)&&this.powerInfos.push({name:"mean_power_cycle",value:Cr(this.meanCyclePower,1),unit:this.meanCyclePower<7?"kW":"W",class:"vt-power-color"}),this.powerInfos.push({name:"valve_open_percent",value:this.valveOpenPercent,unit:"%",class:"vt-power-color"})),(null==t?void 0:t.is_over_climate)&&!ut&&(this.devicePower&&!(null===(J=this._config)||void 0===J?void 0:J.powerEntity)&&this.powerInfos.push({name:"mean_power_cycle",value:this.devicePower,unit:this.devicePower<7?"kW":"W",class:"vt-power-color"}),this.isRegulated&&(this.powerInfos.push({name:"regulated_target_temperature",value:this.regulatedTargetTemperature,unit:null===(tt=null==t?void 0:t.configuration)||void 0===tt?void 0:tt.temperature_unit,class:"vt-temp-color"}),this.powerInfos.push({name:"auto_regulation_mode",value:ma({hass:this.hass,string:`extra_states.${this.autoRegulationMode}`}),unit:"",class:"vt-label-color"})))),this.autoFanInfos=[],!(null===(et=null==this?void 0:this._config)||void 0===et?void 0:et.disable_auto_fan_infos)&&(null==t?void 0:t.is_over_climate)&&!ut)if(this._isAutoFanPlugin){const t=this._isAutoFanEnabled?"auto_fan_mode":"auto_fan_mode_off";console.log(`VersatileThermostat UI : plugin auto_fan icon name ${t} selected=${this._autoFanSelectedMode}`),this.autoFanInfos.push({name:t,value:this._autoFanSelectedMode,unit:"",class:"vt-label-color"})}else{const t=this.currentAutoFanMode!=_r?"auto_fan_mode":"auto_fan_mode_off";console.log(`VersatileThermostat UI : auto_fan icon name ${t}`),this.autoFanInfos.push({name:t,value:ma({hass:this.hass,string:`extra_states.${this.currentAutoFanMode}`}),unit:"",class:"vt-label-color"}),this.fanMode&&this.autoFanInfos.push({name:"fan_mode",value:ma({hass:this.hass,string:`extra_states.fan_${this.fanMode}`}),unit:"",class:"vt-label-color"})}this._hasAutoStartStop=vr.includes(this.hvacModeReason),this._isAutoStartStopConfigured=!0===(null==t?void 0:t.is_auto_start_stop_configured),this._isAutoStartStopEnabled=!0===(null===(it=null==t?void 0:t.auto_start_stop_manager)||void 0===it?void 0:it.auto_start_stop_enable),this._autoStartStopStopMode=(null===(ot=null==t?void 0:t.auto_start_stop_manager)||void 0===ot?void 0:ot.auto_start_stop_stop_mode)||xr;const ft=null===(at=this._config)||void 0===at?void 0:at.autoStartStopStopModeEntity,gt=ft?null===(nt=this.hass)||void 0===nt?void 0:nt.states[ft]:void 0;this._autoStartStopStopModeOptions=(null===(st=null==gt?void 0:gt.attributes)||void 0===st?void 0:st.options)||[xr],console.log(`_isAutoStartStopConfigured=${this._isAutoStartStopConfigured} _isAutoStartStopEnabled=${this._isAutoStartStopEnabled} hvac_mode_reason=${this.hvacModeReason}`),this._updateDisplay()}}_updateDisplay(){var t;(null===(t=null==this?void 0:this._config)||void 0===t?void 0:t.set_current_as_main)?(this._display_bottom=this._getCurrentSetpoint(),this._display_top=this.current):(this._display_bottom=this.current,this._display_top=this._getCurrentSetpoint())}_handleAction(t){this.isUserLocked||(t.currentTarget.mode===mr?this.hass.callService("versatile_thermostat","set_hvac_mode_sleep",{entity_id:this._config.entity}):this.hass.callService("climate","set_hvac_mode",{entity_id:this._config.entity,hvac_mode:t.currentTarget.mode}))}_handleDisplayMessages(){this.displayMessages=!this.displayMessages,this.requestUpdate(),this._vibrate(40)}_handlePreset(t){if(this.isUserLocked)return;this.last_target_temperature=this.temperature;const e=t.currentTarget.preset;this.timedPresetDuration&&this.timedPresetDuration>0?(this.hass.callService("versatile_thermostat","set_timed_preset",{entity_id:this._config.entity,preset:e,duration_minutes:this.timedPresetDuration}),this.timedPresetDuration=null):this.hass.callService("climate","set_preset_mode",{entity_id:this._config.entity,preset_mode:e})}_formatRemainingTime(t){if(null===t||t<=0)return"0";if(t<60)return`${t}`;const e=Math.floor(t/60),i=t%60;return 0===i?`${e}h`:`${e}h${i}`}_handleTimedPresetDurationChange(t){const e=t.target,i=e.value?parseInt(e.value,10):null;this.timedPresetDuration=i&&i>0?i:null}_handleTimedPresetSelectChange(t){const e=t.target,i=e.value?parseInt(e.value,10):null;this.timedPresetDuration=i&&i>0?i:null}_handleCancelTimedPreset(){this.isUserLocked||(console.info("VersatileThermostatUI-CARD canceling timed preset"),this.hass.callService("versatile_thermostat","cancel_timed_preset",{entity_id:this._config.entity}))}_handleClickAutoFanInfo(){var t;if(this.isUserLocked)return;if(this._isAutoFanPlugin){const e=null===(t=this._config)||void 0===t?void 0:t.autoFanEnableEntity;if(!e)return;return console.info(`VersatileThermostatUI-CARD toggling auto_fan switch ${e}`),void this.hass.callService("switch","toggle",{entity_id:e})}let e=_r;this.currentAutoFanMode==_r&&(e=this.autoFanMode);const i=br[e];console.info(`VersatileThermostatUI-CARD changing auto_fan_mode to ${e} (mapped=$${i}`),i?this.hass.callService("versatile_thermostat","set_auto_fan_mode",{entity_id:this._config.entity,auto_fan_mode:i}):console.warn(`VersatileThermostatUI-CARD: auto_fan_mode ${e} has no mapping, aborting change.`)}_handleChangeAutoStartStop(t){if(this.isUserLocked)return;this._autoStartStopEditMode=!1;const e=t.target.value,i=this._config.autoStartStopEnableEntity,o=this._config.autoStartStopStopModeEntity;console.info(`VersatileThermostatUI-CARD changing auto_start_stop selector to ${e}`),e!==wr?(i&&!this._isAutoStartStopEnabled&&this.hass.callService("switch","turn_on",{entity_id:i}),o&&this.hass.callService("select","select_option",{entity_id:o,option:e})):i&&this.hass.callService("switch","turn_off",{entity_id:i})}_handleToggleWindowByPass(){if(this.isUserLocked)return;console.log(`_handleToggleWindowByPass called. Current windowByPass is ${this._hasWindowByPass}`);let t=!this._hasWindowByPass;console.info(`VersatileThermostatUI-CARD changing windowByPass to ${t}`),this.hass.callService("versatile_thermostat","set_window_bypass",{entity_id:this._config.entity,window_bypass:t})}_getCurrentSetpoint(){var t,e,i,o,a,n,s,r;return null!==(null===(t=null==this?void 0:this.value)||void 0===t?void 0:t.high)&&null!==(null===(e=null==this?void 0:this.value)||void 0===e?void 0:e.low)?((null===(i=null==this?void 0:this.value)||void 0===i?void 0:i.low)||0)>=this.current?(null===(o=null==this?void 0:this.value)||void 0===o?void 0:o.low)||0:((null===(a=null==this?void 0:this.value)||void 0===a?void 0:a.high)||0)<=this.current?(null===(n=null==this?void 0:this.value)||void 0===n?void 0:n.high)||0:(null===(s=null==this?void 0:this.value)||void 0===s?void 0:s.low)||0:(null===(r=null==this?void 0:this.value)||void 0===r?void 0:r.value)||0}_renderStatusText(t,e){var i;if(!(null===(i=this._config)||void 0===i?void 0:i.show_status_text)||!this.hvacAction)return B``;const o=this.hass.localize(`component.climate.entity_component._.state_attributes.hvac_action.state.${this.hvacAction}`)||this.hvacAction;return B`
|
||
<text class="hvac-action-text-svg ${this.hvacAction}" x="${t}" y="${e}" dominant-baseline="middle" text-anchor="middle">
|
||
${o}
|
||
</text>
|
||
`}_renderHVACAction(){return this.hvacAction&&"off"!==this.hvacAction&&"idle"!==this.hvacAction?"heating"===this.hvacAction?B`<path class="status ${this.isDeviceActive?"active":""}" transform="translate(5,-4) scale(0.25)" fill="#9d9d9d" d="${Dt}" />`:"cooling"===this.hvacAction||"cool"==this.hvacMode?B`<path class="status cooler ${this.isDeviceActive?"active":""}" transform="translate(5,-4) scale(0.25)" fill="#9d9d9d" d="${vt}" />`:B`<path class="status" transform="translate(5,-4) scale(0.25)" fill="#9d9d9d" d="${kt}" />`:W``}_renderHVACActionBadge(){return this.hvacAction&&"off"!==this.hvacAction&&"idle"!==this.hvacAction?"heating"===this.hvacAction?B`<svg viewBox="0 0 24 24" aria-hidden="true"><path d="${Dt}"/></svg>`:"cooling"===this.hvacAction?B`<svg viewBox="0 0 24 24" aria-hidden="true"><path d="${vt}"/></svg>`:B`<svg viewBox="0 0 24 24" aria-hidden="true"><path d="${yt}"/></svg>`:W``}_renderIcon(t,e,i){if(!dr[t])return W``;const o=this.hass.localize(`component.climate.state._.${t}`)||ma({hass:this.hass,string:`extra_states.${t}`});return W`
|
||
<div class="hvac-badge-container">
|
||
<ha-icon-button
|
||
title="${e===t?t:""}"
|
||
class=${bt({"selected-icon":e===t})}
|
||
.mode=${t}
|
||
@click=${i?this._cycleHvacMode:this._handleAction}
|
||
tabindex="0"
|
||
.path=${dr[t]}
|
||
.label=${o}
|
||
></ha-icon-button>
|
||
${(()=>{if(this.theme!==Tr||this._renderingAsClassic)return W``;let t="";return this.hvacAction&&"off"!==this.hvacAction&&"idle"!==this.hvacAction?(t="heating"===this.hvacAction?"heating":"cooling"===this.hvacAction?"cooling":"warning",W`<div class="hvac-badge ${t}">${this._renderHVACActionBadge()}</div>`):W``})()}
|
||
</div>
|
||
`}async _cycleHvacMode(){var t;if(!(null===(t=this._config)||void 0===t?void 0:t.entity)||!this.hass)return;const e=Array.isArray(this.modes)&&this.modes.length>0?this.modes:[];if(0===e.length)return;const i=this.hvacMode||"";let o=e.indexOf(i);-1===o&&(o=0);const a=e[(o+1)%e.length];try{a===mr?await this.hass.callService("versatile_thermostat","set_hvac_mode_sleep",{entity_id:this._config.entity}):await this.hass.callService("climate","set_hvac_mode",{entity_id:this._config.entity,hvac_mode:a})}catch(t){console.error(t)}}_renderMessagesButton(){const t=ma({hass:this.hass,string:"extra_states.messages-button"});return W`
|
||
<ha-icon-button
|
||
title="${t}"
|
||
class="messages-button ${this._hasError?"error":""}"
|
||
@click=${this._handleDisplayMessages}
|
||
tabindex="0"
|
||
.path=${this._hasError?yt:At}
|
||
.label=${t}
|
||
>
|
||
</ha-icon-button>
|
||
`}_renderRecalculateScheduledButton(){const t=ma({hass:this.hass,string:"extra_states.recalculation_scheduled"});return W`
|
||
<ha-icon-button
|
||
title="${t}"
|
||
class="messages-button"
|
||
tabindex="0"
|
||
.path=${"M21,10.12H14.22L16.96,7.3C14.23,4.6 9.81,4.5 7.08,7.2C4.35,9.91 4.35,14.28 7.08,17C9.81,19.7 14.23,19.7 16.96,17C18.32,15.65 19,14.08 19,12.1H21C21,14.08 20.12,16.65 18.36,18.39C14.85,21.87 9.15,21.87 5.64,18.39C2.14,14.92 2.11,9.28 5.62,5.81C9.13,2.34 14.76,2.34 18.27,5.81L21,3V10.12M12.5,8V12.25L16,14.33L15.28,15.54L11,13V8H12.5Z"}
|
||
.label=${t}
|
||
>
|
||
</ha-icon-button>
|
||
`}_renderWindowByPassButton(){const t=ma({hass:this.hass,string:"extra_states.window-bypass-button"});return W`
|
||
<ha-icon-button
|
||
title="${t}"
|
||
class="window-bypass-button"
|
||
@click=${this._handleToggleWindowByPass}
|
||
tabindex="0"
|
||
.path=${It}
|
||
.label=${t}
|
||
>
|
||
</ha-icon-button>
|
||
`}_getPresetTemperature(t,e,i,o=!0){var a,n,s;if(!this.hass)return null;const r=null!=e?e:this.hvacMode===pr?"cool":"heat",l=null!=i?i:!!this._hasPresence&&!this.presence;if(o&&(null===(a=this._presetTempEntities)||void 0===a?void 0:a.length)){const e=this._presetTempEntities.filter((e=>e.preset===t));if(e.length>0){const i=[...e.filter((t=>t.mode===r&&t.away===l)),...e.filter((t=>t.mode===r&&t.away!==l)),...e.filter((t=>t.mode!==r))];for(const e of i){const i=this.hass.states[e.entityId];if(i&&i.state!==cr){const o=Number.parseFloat(i.state);if(Number.isFinite(o)&&0!==o)return console.log(`[PresetTemp] entity value for ${t} from ${e.entityId}: ${o}`),o}}}}const c=null===(s=null===(n=this.stateObj)||void 0===n?void 0:n.attributes)||void 0===s?void 0:s.preset_temperatures;if(!c||"object"!=typeof c)return null;const d=[],h=`${t}_${r}_temp`,u=`${t}_${r}_away_temp`;l&&d.push(u),d.push(h,`${t}_away_temp`,`${t}_temp`,t);for(const e of d)if(e in c&&void 0!==c[e]){const i=Number.parseFloat(String(c[e]));if(Number.isFinite(i)&&0!==i)return console.log(`[PresetTemp] central value for ${t} using key ${e}: ${i}`),i}if(c[r]&&"object"==typeof c[r]){const e=c[r];if(void 0!==e[t]){const i=Number.parseFloat(String(e[t]));if(Number.isFinite(i)&&0!==i)return console.log(`[PresetTemp] central nested value for ${t} in ${r}: ${i}`),i}}return null}_hasValidCentralPresetTemperatures(){var t,e;if(!(null===(e=null===(t=this.stateObj)||void 0===t?void 0:t.attributes)||void 0===e?void 0:e.preset_temperatures))return!1;const i=this.stateObj.attributes.preset_temperatures,o=t=>"number"==typeof t?Number.isFinite(t)&&0!==t:!(!t||"object"!=typeof t)&&Object.values(t).some(o);return o(i)}_renderPreset(t,e){const i=this.hass.localize(`component.climate.state._.${t}`)||ma({hass:this.hass,string:`extra_states.${t}`}),o=this._getPresetTemperature(t),a=null!==o?`${Ta(o,this.hass.locale,{minimumFractionDigits:1,maximumFractionDigits:1})} ${this.hass.config.unit_system.temperature}`:null,n=a?`${i} - ${a}`:i,s=`${n}\n${ma({hass:this.hass,string:"extra_states.change_message"})}`;return W`
|
||
<div class="preset-label preset-${t}">
|
||
<ha-icon-button
|
||
title="${n}"
|
||
class=${bt({"selected-icon":e===t})}
|
||
.preset=${t}
|
||
@click=${this._handlePreset}
|
||
tabindex="0"
|
||
.path=${dr[t]}
|
||
.label=${s}
|
||
>
|
||
</ha-icon-button>
|
||
</div>
|
||
`}_renderPowerInfo(t){const e=this.hass.localize(`component.climate.state._.${t.name}`)||ma({hass:this.hass,string:`extra_states.${t.name}`});return W`
|
||
<div class="left-info-label">
|
||
<span>
|
||
<ha-icon-button
|
||
title="${e}"
|
||
class=${t.class}
|
||
.name=${t.name}
|
||
tabindex="0"
|
||
.path=${dr[t.name]}
|
||
.label=${e}
|
||
>
|
||
</ha-icon-button>
|
||
</span>
|
||
<span>${t.value} ${t.unit}</span>
|
||
</div>
|
||
`}_renderAutoFanInfo(t){const e=(this.hass.localize(`component.climate.state._.${t.name}`)||ma({hass:this.hass,string:`extra_states.${t.name}`}))+"\n"+ma({hass:this.hass,string:"extra_states.toggle_message"});return W`
|
||
<div class="left-info-label">
|
||
<span>
|
||
<ha-icon-button
|
||
title="${e}"
|
||
class=${t.class}
|
||
.name=${t.name}
|
||
@click=${this._handleClickAutoFanInfo}
|
||
tabindex="0"
|
||
.path=${dr[t.name]}
|
||
.label=${e}
|
||
>
|
||
</ha-icon-button>
|
||
</span>
|
||
<span class="clickable-info-label" @click=${this._handleClickAutoFanInfo}>${t.value} ${t.unit}</span>
|
||
</div>
|
||
`}_renderHumidityInfo(){var t;if(!(null===(t=this._config)||void 0===t?void 0:t.show_humidity)||this._config.theme===Tr||null===this.humidity)return W``;const e=this.hass.localize("component.climate.state._.humidity")||"Humidity";return W`
|
||
<div class="left-info-label">
|
||
<span>
|
||
<ha-icon-button
|
||
title="${e}"
|
||
class="humidity"
|
||
.name=${"humidity"}
|
||
tabindex="0"
|
||
.path=${dr.humidity}
|
||
.label=${e}
|
||
></ha-icon-button>
|
||
</span>
|
||
<span>${this.humidity} %</span>
|
||
</div>
|
||
`}_renderAutoStartStopEnable(){const t=ma({hass:this.hass,string:"extra_states.auto_start_stop_enable"}),e=ma({hass:this.hass,string:"extra_states.auto_start_stop_label"}),i=this._isAutoStartStopEnabled?this._autoStartStopStopMode:wr,o=this._autoStartStopStopModeOptions.length?this._autoStartStopStopModeOptions:[xr],a=[wr,...o],n=ma({hass:this.hass,string:`extra_states.auto_start_stop_mode_${i}`});return W`
|
||
<div class="left-info-label" title="${e}">
|
||
<span>
|
||
<ha-icon-button
|
||
title="${e}"
|
||
class="auto-start-stop"
|
||
.name=${"auto_start_stop"}
|
||
@click=${this._handleClickAutoStartStopIcon}
|
||
tabindex="0"
|
||
.path=${dr.auto_start_stop}
|
||
.label=${e}
|
||
>
|
||
</ha-icon-button>
|
||
</span>
|
||
${this._autoStartStopEditMode&&!this.isUserLocked?W`
|
||
<span>
|
||
<select
|
||
class="auto-start-stop-select ${this._isAutoStartStopEnabled?"active":""}"
|
||
@change=${this._handleChangeAutoStartStop}
|
||
@blur=${this._handleBlurAutoStartStop}
|
||
title="${t}"
|
||
name="auto-start-stop-select"
|
||
>
|
||
${a.map((t=>W`
|
||
<option value="${t}" ?selected=${i===t}>
|
||
${ma({hass:this.hass,string:`extra_states.auto_start_stop_mode_${t}`})}
|
||
</option>
|
||
`))}
|
||
</select>
|
||
</span>
|
||
`:W`
|
||
<span class="clickable-info-label" @click=${this._handleClickAutoStartStopIcon}>${n}</span>
|
||
`}
|
||
</div>
|
||
`}_handleClickAutoStartStopIcon(){this.isUserLocked||(this._autoStartStopEditMode=!this._autoStartStopEditMode)}_handleBlurAutoStartStop(){this._autoStartStopEditMode=!1}_handleMoreInfo(){ka(this,"hass-more-info",{entityId:this._config.entity})}async _handleLockToggle(){var t,e;if((null===(t=this._config)||void 0===t?void 0:t.allow_lock_toggle)&&(null===(e=this._config)||void 0===e?void 0:e.entity)&&this.hass&&this.stateObj)if(this._isLocked){if(this._hasLockCode)return this.isLocking=!1,this.showDigicodeModal=!0,void(this.enteredCode="");this._isLockConfigured?this.hass.callService("versatile_thermostat","unlock",{entity_id:this._config.entity}):(this._isLocked=this.isUserLocked=!1,this.requestUpdate())}else{if(this._hasLockCode)return this.isLocking=!0,this.showDigicodeModal=!0,void(this.enteredCode="");this._isLockConfigured?await this.hass.callService("versatile_thermostat","lock",{entity_id:this._config.entity}):(this._isLocked=this.isUserLocked=!0,this.requestUpdate())}}_handleKeypadPress(t){this.enteredCode.length<4&&(this.enteredCode+=t,this.codeError=!1,4===this.enteredCode.length&&this._handleValidate())}_handleKeypadClear(){this.enteredCode=this.enteredCode.slice(0,-1),this.codeError=!1}_handleModalClose(){this.showDigicodeModal=!1,this.enteredCode="",this.codeError=!1}async _handleValidate(){if(4===this.enteredCode.length){const t=this.isLocking?"lock":"unlock";try{await this.hass.callService("versatile_thermostat",t,{entity_id:this._config.entity,code:this.enteredCode}),this._handleModalClose()}catch(t){this.codeError=!0,this.enteredCode="",this._vibrate(200)}}else this.codeError=!0,this.enteredCode="",this._vibrate(200)}buildTitle(){var t,e,i;let o="";return this._hasWindow&&!(null===(t=this._config)||void 0===t?void 0:t.disable_window)&&(o+=ma({hass:this.hass,string:"extra_states.window_open"})+"\n"),this._hasWindowByPass&&(o+=ma({hass:this.hass,string:"extra_states.window_bypass"})+"\n"),this._hasOverpowering&&!(null===(e=this._config)||void 0===e?void 0:e.disable_overpowering)&&(o+=ma({hass:this.hass,string:"extra_states.overpowering"})+"\n"),this._hasPresence&&(o+=ma({hass:this.hass,string:"extra_states.presence"})+"\n"),this._hasAutoStartStop&&!(null===(i=this._config)||void 0===i?void 0:i.disable_autoStartStop)&&(o+=ma({hass:this.hass,string:"extra_states.auto_start_stop"})+"\n"),this._hasMotion&&(o+=ma({hass:this.hass,string:"extra_states.motion"})+"\n"),o}_renderTemperature(t,e,i,o,a){var n;let s=76,r=56,l=.2;const c=e?-2:-1,d=e?-5.5:-2;let h;h=t?Ta(t,this.hass.locale,{minimumFractionDigits:1,maximumFractionDigits:1}):this.hass.localize("extra_states.temp_unavailable"),a&&e&&(s=this.effectiveDisableCircle?30:35,r=56,l=.25);const u=e?"temp-main":"temp-secondary";return B`
|
||
${a&&!(null===(n=this._config)||void 0===n?void 0:n.disable_target_icon)?B`
|
||
<path
|
||
class="target-icon"
|
||
transform="translate(${s}, ${r}) scale(${l})"
|
||
fill="var(--primary-text-color)"
|
||
d="${"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,10.84 21.79,9.69 21.39,8.61L19.79,10.21C19.93,10.8 20,11.4 20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.6,4 13.2,4.07 13.79,4.21L15.4,2.6C14.31,2.21 13.16,2 12,2M19,2L15,6V7.5L12.45,10.05C12.3,10 12.15,10 12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12C14,11.85 14,11.7 13.95,11.55L16.5,9H18L22,5H19V2M12,6A6,6 0 0,0 6,12A6,6 0 0,0 12,18A6,6 0 0,0 18,12H16A4,4 0 0,1 12,16A4,4 0 0,1 8,12A4,4 0 0,1 12,8V6Z"}"
|
||
/>`:""}
|
||
<text class="main-value ${u}" x="${i}" y="${o}" dominant-baseline="middle" text-anchor="middle">
|
||
${B`${h}`}
|
||
<tspan class="uom" dx="${c}" dy="${d}">
|
||
${B`
|
||
${this.hass.config.unit_system.temperature}
|
||
`}
|
||
</tspan>
|
||
</text>
|
||
`}constructor(){super(),this.value={},this._selectTargetTemperature="low",this.current=0,this.humidity=null,this.temperature=0,this.min=7,this.max=35,this.step=.5,this.powerPercent=0,this.meanCyclePower=0,this.valveOpenPercent=0,this.devicePower=0,this.regulatedTargetTemperature=null,this.isOn=!1,this.window=!1,this.windowByPass=!1,this.presence=!1,this.motion=!1,this.overpowering=!1,this.isDeviceActive=!1,this.isSleeping=!1,this.isRegulated=!1,this.isRecalculateScheduled=!1,this.windowState="off",this.windowAutoState="off",this.overpoweringState="off",this.presenceState="off",this.motionState="off",this.safetyState="off",this.status="loading",this.hvacMode=ur,this.hvacAction="idle",this.preset=hr,this.autoRegulationMode="",this.currentAutoFanMode=_r,this.autoFanMode=_r,this.fanMode="",this.hvacModeReason="",this.dragging=!1,this.name="",this.target="value",this._debouncedCallService=((t,e,i=!1)=>{let o;const a=(...a)=>{const n=i&&!o;clearTimeout(o),o=window.setTimeout((()=>{o=void 0,i||t(...a)}),e),n&&t(...a)};return a.cancel=()=>{clearTimeout(o)},a})((t=>this._callService(t)),1e3),this._init=!0,this._firstRender=!0,this._gunmalmgPresetScrollDone=!1,this._ignore=!1,this._hasWindow=!1,this._hasWindowByPass=!1,this._hasPresence=!1,this._hasMotion=!1,this._hasOverpowering=!1,this._hasAutoStartStop=!1,this._isAutoStartStopEnabled=!1,this._isAutoStartStopConfigured=!1,this._autoStartStopStopMode=xr,this._autoStartStopStopModeOptions=[],this._isAutoFanPlugin=!1,this._isAutoFanEnabled=!1,this._autoFanSelectedMode="",this._isLockConfigured=!1,this._isLocked=!1,this._hasLockCode=!1,this._oldValueMin=0,this._oldValueMax=0,this._display_bottom=0,this._display_top=0,this.modes=[],this.presets=[],this.safety_state={},this.powerInfos=[],this._externalPowerInfos=[],this.autoFanInfos=[],this.messages=[],this.displayMessages=!1,this._hasError=!1,this._renderingAsClassic=!1,this._showThemeMenu=!1,this._showClassicPopup=!1,this.theme="",this.isLocked=!1,this.isUserLocked=!1,this.isAutomationLocked=!1,this.showDigicodeModal=!1,this.enteredCode="",this.codeError=!1,this.isLocking=!1,this.timedPresetDuration=null,this.timedPresetActive=!1,this.timedPresetRemainingTime=null,this.timedPresetPreset=null,this._presetsPanelOpen=!1,this._regulationChartOpen=!1,this._presetTempEntities=[],this._autoStartStopEditMode=!1,this._handleKeyDown=t=>{t.key>="0"&&t.key<="9"?this._handleKeypadPress(t.key):"Backspace"===t.key&&this._handleKeypadClear()},this.render=()=>{var t,e,i,o,a;return(null===(t=this._config)||void 0===t?void 0:t.theme)===Tr?(console.log("Rendering Gunmalmg theme"),ar(this)):W`
|
||
<ha-card class=${bt({[this.hvacMode]:!0,locked:this.isUserLocked,"has-preset-mod":!!(null===(e=this._config)||void 0===e?void 0:e.allow_preset_modification),"has-regulation-chart":!!(null===(i=this._config)||void 0===i?void 0:i.show_regulation_chart)})}
|
||
>
|
||
${(null===(o=this._config)||void 0===o?void 0:o.disable_menu)?"":W`
|
||
<ha-icon-button
|
||
class="more-info"
|
||
.label=${this.hass.localize("ui.panel.lovelace.cards.show_more_info")}
|
||
.path=${St}
|
||
@click=${this._toggleThemeMenu}
|
||
tabindex="0"
|
||
></ha-icon-button>
|
||
${this._showThemeMenu?W`
|
||
<div class="menu-backdrop" @click=${this._closeThemeMenu}></div>
|
||
<div class="theme-menu">
|
||
<div class="theme-menu-header">
|
||
<div class="theme-menu-title" @click=${()=>{this._handleMoreInfo(),this._closeThemeMenu()}}>${ma({hass:this.hass,string:"editor.card.climate.menu_system"})}</div>
|
||
</div>
|
||
<div class="theme-menu-item" style="border-top:1px solid var(--divider-color, #e0e0e0);"></div>
|
||
${""}
|
||
${(null===(a=this._config)||void 0===a?void 0:a.theme)===Tr?W`
|
||
<div class="theme-menu-item" @click=${()=>{this._menuLockToggle(),this._closeThemeMenu()}}>
|
||
${this._isLocked?ma({hass:this.hass,string:"extra_states.unlock"}):ma({hass:this.hass,string:"extra_states.lock"})}
|
||
</div>
|
||
${this.timedPresetActive?W`
|
||
<div class="theme-menu-item" @click=${()=>{this._menuCancelTimedPreset(),this._closeThemeMenu()}}>
|
||
${ma({hass:this.hass,string:"extra_states.cancel_timed_preset"})}
|
||
</div>
|
||
`:""}
|
||
`:""}
|
||
<div class="theme-menu-item" @click=${()=>this._applyTheme("classic")}>${ma({hass:this.hass,string:"editor.card.climate.theme_classic"})}</div>
|
||
<div class="theme-menu-item" @click=${()=>this._applyTheme("vtherm")}>${ma({hass:this.hass,string:"editor.card.climate.theme_vtherm"})}</div>
|
||
<div class="theme-menu-item" @click=${()=>this._applyTheme("uncolored")}>${ma({hass:this.hass,string:"editor.card.climate.theme_uncolored"})}</div>
|
||
<div class="theme-menu-item" @click=${()=>this._applyTheme("gunmalmg")}>${ma({hass:this.hass,string:"editor.card.climate.theme_gunmalmg"})}</div>
|
||
</div>
|
||
`:""}
|
||
`}
|
||
|
||
${this._renderClassicContent()}
|
||
|
||
<ha-dialog
|
||
.open=${this.showDigicodeModal}
|
||
@closed=${this._handleModalClose}
|
||
hideActions
|
||
class="digicode-dialog"
|
||
>
|
||
<div class="dialog-content">
|
||
<h2 class="dialog-title">
|
||
${this.isLocking?ma({hass:this.hass,string:"extra_states.lock"}):ma({hass:this.hass,string:"extra_states.unlock"})} ${this.name}
|
||
</h2>
|
||
<div class="code-display ${this.codeError?"error":""}">
|
||
<span class="digit ${this.enteredCode.length>0?"filled":""}"></span>
|
||
<span class="digit ${this.enteredCode.length>1?"filled":""}"></span>
|
||
<span class="digit ${this.enteredCode.length>2?"filled":""}"></span>
|
||
<span class="digit ${this.enteredCode.length>3?"filled":""}"></span>
|
||
</div>
|
||
<div class="error-message ${this.codeError?"visible":""}">
|
||
${ma({hass:this.hass,string:"extra_states.code_error"})}
|
||
</div>
|
||
|
||
<div class="keypad">
|
||
<div class="keypad-row">
|
||
<mwc-button class="keypad-btn" @click=${()=>this._handleKeypadPress("1")}>1</mwc-button>
|
||
<mwc-button class="keypad-btn" @click=${()=>this._handleKeypadPress("2")}>2</mwc-button>
|
||
<mwc-button class="keypad-btn" @click=${()=>this._handleKeypadPress("3")}>3</mwc-button>
|
||
</div>
|
||
<div class="keypad-row">
|
||
<mwc-button class="keypad-btn" @click=${()=>this._handleKeypadPress("4")}>4</mwc-button>
|
||
<mwc-button class="keypad-btn" @click=${()=>this._handleKeypadPress("5")}>5</mwc-button>
|
||
<mwc-button class="keypad-btn" @click=${()=>this._handleKeypadPress("6")}>6</mwc-button>
|
||
</div>
|
||
<div class="keypad-row">
|
||
<mwc-button class="keypad-btn" @click=${()=>this._handleKeypadPress("7")}>7</mwc-button>
|
||
<mwc-button class="keypad-btn" @click=${()=>this._handleKeypadPress("8")}>8</mwc-button>
|
||
<mwc-button class="keypad-btn" @click=${()=>this._handleKeypadPress("9")}>9</mwc-button>
|
||
</div>
|
||
<div class="keypad-row">
|
||
<mwc-button class="keypad-btn spacer" disabled></mwc-button>
|
||
<mwc-button class="keypad-btn" @click=${()=>this._handleKeypadPress("0")}>0</mwc-button>
|
||
<mwc-button class="keypad-btn action-btn clear" @click=${this._handleKeypadClear}><ha-svg-icon .path=${"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z"}></ha-svg-icon></mwc-button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</ha-dialog>
|
||
</ha-card>
|
||
`}}connectedCallback(){super.connectedCallback(),this._gunmalmgPresetScrollDone=!1}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("keydown",this._handleKeyDown)}static async getConfigElement(){return await Promise.resolve().then((function(){return Gb})),document.createElement("versatile-thermostat-ui-card-editor")}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>["climate"].includes(t.split(".")[0]))),i=e.filter((e=>{var i;return null===(i=t.states[e].attributes)||void 0===i?void 0:i.specific_states}));return{type:"custom:versatile-thermostat-ui-card",entity:i[0]||e[0]}}};function Pr(t){return t+.5|0}Ar.styles=[s`
|
||
:host {
|
||
display: block;
|
||
box-sizing: border-box;
|
||
position: relative;
|
||
container: vt-card / inline-size;
|
||
}
|
||
|
||
ha-card {
|
||
overflow: visible;
|
||
height: 100%;
|
||
width: 100%;
|
||
vertical-align: middle;
|
||
justify-content: center;
|
||
justify-items: center;
|
||
padding-left: 1em;
|
||
padding-right: 1em;
|
||
padding-top: 1.5em;
|
||
box-sizing: border-box;
|
||
position: relative;
|
||
display: flex;
|
||
flex-direction: column;
|
||
flex-wrap: nowrap;
|
||
align-content: center;
|
||
justify-content: center;
|
||
align-items: center;
|
||
}
|
||
|
||
ha-card.locked #modes ha-icon-button,
|
||
ha-card.locked #vt-control-buttons vt-ha-outlined-icon-button,
|
||
ha-card.locked #vt-control-buttons ha-svg-icon,
|
||
ha-card.locked #presets ha-icon-button,
|
||
ha-card.locked #presets .preset-label,
|
||
ha-card.locked vt-ha-control-circular-slider,
|
||
ha-card.locked .left-info-label .auto-start-stop-enable,
|
||
ha-card.locked .left-info-label ha-icon-button {
|
||
opacity: 0.8;
|
||
pointer-events: none;
|
||
}
|
||
|
||
ha-card.locked #presets .preset-label {
|
||
cursor: default !important;
|
||
}
|
||
|
||
.disabled-circle-container{
|
||
height: 145px;
|
||
width: 100%;
|
||
background: radial-gradient(var(--hvac-mode-color), transparent 50%);
|
||
}
|
||
|
||
.disabled-circle-container.no-background-color{
|
||
background: none;
|
||
}
|
||
|
||
vt-ha-outlined-icon-button {
|
||
border: 1px solid var(--secondary-text-color);
|
||
border-radius: 100%;
|
||
padding: 0.5em;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.content.security_msg, vt-ha-control-circular-slider.security_msg, #modes.security_msg, #presets.security_msg, #vt-control-buttons.security_msg {
|
||
opacity: 0.5;
|
||
filter: blur(5px);
|
||
pointer-events: none;
|
||
}
|
||
|
||
|
||
.security, .messages {
|
||
position: absolute;
|
||
display: flex;
|
||
flex-flow: column;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 100%;
|
||
height: 100%;
|
||
box-sizing: border-box;
|
||
left: 0px;
|
||
top: 0px;
|
||
background: rgba(200, 200, 200, 0.16);
|
||
border-radius: var(--ha-card-border-radius,12px);
|
||
border-width: var(--ha-card-border-width,1px);
|
||
border-style: solid;
|
||
border-color: var(--ha-card-border-color,var(--divider-color,#e0e0e0));
|
||
pointer-events: all;
|
||
font-size: 22px;
|
||
text-align: center;
|
||
line-height: 40px;
|
||
padding: 1em;
|
||
--mdc-icon-size: 40px;
|
||
z-index: 2;
|
||
}
|
||
|
||
.messages-button.error {
|
||
color: var(--error-color) !important;
|
||
animation: pulse 2s infinite;
|
||
}
|
||
|
||
|
||
.unavailable {
|
||
opacity: 0.3;
|
||
}
|
||
|
||
.unavailable #bar, .unavailable .main-value, .unavailable #value,.unavailable #current, .unavailable .current-info,
|
||
.unknown #bar, .unknown .main-value, .unknown #value,.unknown #current, .unknown .current-info {
|
||
display: none;
|
||
}
|
||
|
||
.more-info {
|
||
position: absolute;
|
||
cursor: pointer;
|
||
top: 0px;
|
||
right: 0px;
|
||
inset-inline-end: 0px;
|
||
inset-inline-start: initial;
|
||
border-radius: 100%;
|
||
color: var(--secondary-text-color);
|
||
z-index: 3;
|
||
direction: var(--direction);
|
||
}
|
||
.container {
|
||
position: relative;
|
||
width: 100%;
|
||
height: 100%;
|
||
}
|
||
vt-ha-control-circular-slider {
|
||
--primary-color: var(--hvac-mode-color);
|
||
}
|
||
vt-ha-control-circular-slider.with-background-gradient {
|
||
z-index: 0;
|
||
position: relative;
|
||
}
|
||
vt-ha-control-circular-slider.with-background-gradient::before {
|
||
content: "";
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
background: radial-gradient(circle, var(--hvac-mode-color) 0%, transparent 65%);
|
||
border-radius: 50%;
|
||
opacity: 0.45;
|
||
z-index: -1;
|
||
pointer-events: none;
|
||
}
|
||
|
||
.content {
|
||
position: absolute;
|
||
width: calc(70% - 40px);
|
||
height: calc(70% - 100px);
|
||
box-sizing: border-box;
|
||
border-radius: 100%;
|
||
left: 50%;
|
||
top: calc(50% - 40px);
|
||
text-align: center;
|
||
overflow-wrap: break-word;
|
||
pointer-events: none;
|
||
display: flex;
|
||
align-items: center;
|
||
place-content: center;
|
||
flex-flow: wrap;
|
||
transform: translate(-50%,-50%);
|
||
max-width: 155px;
|
||
}
|
||
.content.no-presets {
|
||
top: calc(60% - 30px);
|
||
}
|
||
|
||
#main {
|
||
transform: scale(2.3);
|
||
}
|
||
|
||
.name {
|
||
display: block;
|
||
width: 100%;
|
||
text-align: center;
|
||
font-size: 20px;
|
||
word-break: keep-all;
|
||
white-space: nowrap;
|
||
text-overflow: ellipsis;
|
||
overflow: hidden;
|
||
}
|
||
svg {
|
||
height: auto;
|
||
margin: auto;
|
||
display: block;
|
||
width: 100%;
|
||
-webkit-backface-visibility: hidden;
|
||
max-width: 233px;
|
||
}
|
||
|
||
path {
|
||
stroke-linecap: round;
|
||
stroke-width: 1;
|
||
}
|
||
|
||
text {
|
||
fill: var(--primary-text-color);
|
||
}
|
||
|
||
/* Temperature display styles */
|
||
.temp-main {
|
||
font-size: 15px;
|
||
}
|
||
.temp-main .uom {
|
||
font-size: 5px;
|
||
}
|
||
.temp-secondary {
|
||
font-size: 6px;
|
||
}
|
||
.temp-secondary .uom {
|
||
font-size: 3px;
|
||
}
|
||
|
||
.auto,
|
||
.heat_cool {
|
||
--hvac-mode-color: var(--state-climate-auto-color);
|
||
}
|
||
.cool {
|
||
--mode-color: var(--label-badge-blue);
|
||
}
|
||
.heat, .heat_cool {
|
||
--mode-color: var(--label-badge-red);
|
||
}
|
||
.manual {
|
||
--mode-color: var(--state-climate-manual-color);
|
||
}
|
||
.off {
|
||
--mode-color: var(--slider-track-color);
|
||
}
|
||
.sleep {
|
||
--mode-color: #2641a3ff !important;
|
||
}
|
||
.fan_only {
|
||
--mode-color: var(--state-climate-fan_only-color);
|
||
}
|
||
.dry {
|
||
--mode-color: var(--state-climate-dry-color);
|
||
}
|
||
.idle {
|
||
--mode-color: var(--state-climate-dry-color);
|
||
}
|
||
.unknown-mode {
|
||
--mode-color: var(--state-unknown-color);
|
||
}
|
||
|
||
.window_open {
|
||
--mode-color: #80a7c4 !important;
|
||
}
|
||
|
||
.overpowering {
|
||
--mode-color: var(--error-color) !important;
|
||
}
|
||
|
||
.heat_heating {
|
||
--hvac-mode-color: var(--label-badge-red);
|
||
}
|
||
|
||
.heat_idle, .heat_off {
|
||
--hvac-mode-color: var(--label-badge-yellow);
|
||
}
|
||
|
||
.cool_cooling {
|
||
--hvac-mode-color: var(--label-badge-blue);
|
||
}
|
||
|
||
.cool_idle {
|
||
--hvac-mode-color:rgb(125, 194, 225);
|
||
}
|
||
|
||
.off_off, .off_idle {
|
||
--hvac-mode-color: var(--slider-track-color);
|
||
}
|
||
|
||
.off_heating {
|
||
--hvac-mode-color: #c7b598ff;
|
||
}
|
||
|
||
.off_cooling {
|
||
--hvac-mode-color: #90acb8ff;
|
||
}
|
||
|
||
|
||
.sleep_off, .sleep_idle {
|
||
--hvac-mode-color: #2641a3ff;
|
||
}
|
||
|
||
#modes {
|
||
z-index: 0;
|
||
position: relative;
|
||
display: flex;
|
||
width: auto;
|
||
justify-content: center;
|
||
margin-top: -3em;
|
||
margin-bottom: 1em;
|
||
}
|
||
|
||
#presets {
|
||
z-index: 0;
|
||
position: relative;
|
||
display: flex;
|
||
width: 100%;
|
||
justify-content: center;
|
||
align-items: center;
|
||
margin-top: -1em;
|
||
margin-bottom: 1em;
|
||
}
|
||
|
||
#presets > * {
|
||
color: var(--disabled-text-color);
|
||
}
|
||
#presets .selected-icon {
|
||
color: var(--label-badge-yellow);
|
||
}
|
||
|
||
.timed-preset-container {
|
||
display: flex;
|
||
align-items: center;
|
||
margin-left: 10px;
|
||
padding-left: 10px;
|
||
border-left: 1px solid var(--divider-color, #e0e0e0);
|
||
}
|
||
|
||
.timed-preset-input {
|
||
width: 30px;
|
||
height: 32px;
|
||
border: 1px solid var(--divider-color, #e0e0e0);
|
||
border-radius: 4px;
|
||
padding: 0 8px;
|
||
font-size: 14px;
|
||
text-align: center;
|
||
background: var(--card-background-color, #fff);
|
||
color: var(--primary-text-color);
|
||
outline: none;
|
||
transition: border-color 0.2s ease;
|
||
}
|
||
|
||
.timed-preset-input:focus {
|
||
border-color: var(--primary-color);
|
||
}
|
||
|
||
.timed-preset-input::-webkit-outer-spin-button,
|
||
.timed-preset-input::-webkit-inner-spin-button {
|
||
-webkit-appearance: none;
|
||
margin: 0;
|
||
}
|
||
|
||
.timed-preset-input[type=number] {
|
||
-moz-appearance: textfield;
|
||
}
|
||
|
||
.timed-preset-label {
|
||
font-size: 12px;
|
||
color: var(--secondary-text-color);
|
||
margin-left: 4px;
|
||
}
|
||
|
||
.timed-preset-input.active {
|
||
border-color: var(--primary-color);
|
||
background: var(--primary-color);
|
||
color: var(--text-primary-color, #fff);
|
||
}
|
||
|
||
.timed-preset-select {
|
||
height: 32px;
|
||
border: 1px solid var(--divider-color, #e0e0e0);
|
||
border-radius: 4px;
|
||
padding: 0 4px;
|
||
font-size: 14px;
|
||
background: var(--card-background-color, #fff);
|
||
color: var(--primary-text-color);
|
||
outline: none;
|
||
cursor: pointer;
|
||
transition: border-color 0.2s ease;
|
||
}
|
||
|
||
.timed-preset-select:focus {
|
||
border-color: var(--primary-color);
|
||
}
|
||
|
||
.timed-preset-select.active {
|
||
border-color: var(--primary-color);
|
||
background: var(--primary-color);
|
||
color: var(--text-primary-color, #fff);
|
||
}
|
||
|
||
.auto-start-stop-select {
|
||
height: 28px;
|
||
max-width: 120px;
|
||
border: 1px solid var(--divider-color, #e0e0e0);
|
||
border-radius: 4px;
|
||
padding: 0 4px;
|
||
font-size: 13px;
|
||
background: var(--card-background-color, #fff);
|
||
color: var(--primary-text-color);
|
||
outline: none;
|
||
cursor: pointer;
|
||
transition: border-color 0.2s ease;
|
||
}
|
||
|
||
.auto-start-stop-select:focus {
|
||
border-color: var(--primary-color);
|
||
}
|
||
|
||
.auto-start-stop-select.active {
|
||
border-color: var(--primary-color);
|
||
}
|
||
|
||
.timed-preset-remaining {
|
||
font-size: 16px;
|
||
font-weight: 500;
|
||
color: var(--primary-color);
|
||
min-width: 30px;
|
||
text-align: center;
|
||
cursor: pointer;
|
||
user-select: none;
|
||
border-radius: 8px;
|
||
padding: 2px 6px;
|
||
transition: background-color 200ms ease;
|
||
}
|
||
|
||
.timed-preset-remaining:hover {
|
||
background: rgba(var(--rgb-primary-color, 33, 150, 243), 0.12);
|
||
}
|
||
|
||
/* Timed preset container locked state */
|
||
.timed-preset-container.locked {
|
||
opacity: 0.45;
|
||
pointer-events: none;
|
||
user-select: none;
|
||
}
|
||
|
||
.preset-label {
|
||
cursor: pointer;
|
||
user-select: none;
|
||
-webkit-tap-highlight-color: transparent;
|
||
display: flex;
|
||
position: relative;
|
||
align-items: center;
|
||
justify-content: flex-start;
|
||
overflow: hidden;
|
||
padding-top: 0px;
|
||
padding-bottom: 0px;
|
||
padding-left: 5px;
|
||
padding-right: 5px;
|
||
outline: 0px;
|
||
height: 48px;
|
||
color: var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87));
|
||
margin-left: 5px;
|
||
margin-right: 5px;
|
||
}
|
||
|
||
#left-infos {
|
||
z-index: 3;
|
||
position: absolute;
|
||
display: block;
|
||
width: auto;
|
||
justify-content: center;
|
||
padding-bottom: 0.2em;
|
||
left: 0%;
|
||
top: 15%;
|
||
}
|
||
#left-infos.no-presets {
|
||
top: 30%;
|
||
}
|
||
|
||
#right-lock {
|
||
z-index: 0;
|
||
position: absolute;
|
||
right: 0;
|
||
top: 15%;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: flex-end;
|
||
padding-right: 0.2em;
|
||
}
|
||
|
||
#left-infos > * {
|
||
color: var(--enabled-text-color);
|
||
}
|
||
|
||
.left-info-label {
|
||
-webkit-tap-highlight-color: transparent;
|
||
display: flex;
|
||
position: relative;
|
||
align-items: center;
|
||
justify-content: flex-start;
|
||
overflow: hidden;
|
||
padding: 0px 0px;
|
||
height: 30px;
|
||
}
|
||
|
||
.left-info-label input {
|
||
width: 40px;
|
||
}
|
||
|
||
.clickable-info-label {
|
||
cursor: pointer;
|
||
user-select: none;
|
||
-webkit-tap-highlight-color: transparent;
|
||
}
|
||
|
||
#vt-control-buttons {
|
||
z-index: 0;
|
||
position: absolute;
|
||
display: block;
|
||
width: auto;
|
||
justify-content: center;
|
||
padding-bottom: 0.2em;
|
||
left: 90%;
|
||
top: 35%;
|
||
}
|
||
|
||
#vt-control-buttons .button {
|
||
z-index: 0;
|
||
position: relative;
|
||
display: flex;
|
||
width: auto;
|
||
justify-content: center;
|
||
margin-bottom: 15px;
|
||
margin-left: -5px;
|
||
}
|
||
|
||
#modes > * {
|
||
color: var(--disabled-text-color);
|
||
cursor: pointer;
|
||
display: inline-block;
|
||
}
|
||
#modes .selected-icon {
|
||
color: var(--mode-color);
|
||
}
|
||
|
||
#shadowpath {
|
||
stroke: #e7e7e8;
|
||
}
|
||
|
||
#value {
|
||
fill: var(--mode-color);
|
||
r: 5;
|
||
z-index: 4 !important;
|
||
transition: r 0.3s ease-in-out, fill 0.6s ease-in-out;
|
||
}
|
||
|
||
#value,#current {
|
||
filter: drop-shadow(0px 0px 1px #000);
|
||
}
|
||
|
||
#value:hover, #value:active, #value:focus, #value.active {
|
||
r: 8 !important;
|
||
}
|
||
|
||
#current {
|
||
pointer-events: none;
|
||
fill: var(--label-badge-grey);
|
||
}
|
||
|
||
.status {
|
||
transition: fill 0.6s ease-in-out, filter 0.6s ease-in-out;
|
||
filter: none;
|
||
}
|
||
.status.active {
|
||
fill: var(--error-color);
|
||
filter: drop-shadow(0px 0px 6px var(--error-color));
|
||
}
|
||
|
||
.status.cooler.active {
|
||
fill: #03A9F4;
|
||
filter: drop-shadow(0px 0px 6px #03A9F4);
|
||
}
|
||
|
||
#bar {
|
||
stroke: var(--mode-color);
|
||
stroke-dasharray: 176;
|
||
stroke-dashoffset: 0;
|
||
transition: stroke-dashoffset 5.1s ease-in-out 0s, stroke 0.6s ease-in-out;
|
||
}
|
||
|
||
#bar.drag {
|
||
transition: none !important;
|
||
}
|
||
#c-minus,#c-plus {
|
||
cursor: pointer;
|
||
}
|
||
.control {
|
||
cursor: pointer;
|
||
pointer-events: none;
|
||
}
|
||
ha-icon-button {
|
||
transition: color 0.6s ease-in-out;
|
||
}
|
||
.eco ha-icon-button[title="heat"], .window_open ha-icon-button[title="heat"], .overpowering ha-icon-button[title="heat"] {
|
||
--mode-color: var(--disabled-text-color);
|
||
}
|
||
|
||
.icon-group {
|
||
cursor: pointer;
|
||
pointer-events: auto;
|
||
}
|
||
|
||
.window {
|
||
transition: fill 0.3s ease;
|
||
fill: var(--warning-color);
|
||
cursor: pointer;
|
||
pointer-events: all;
|
||
}
|
||
|
||
.auto-start-stop {
|
||
transition: fill 0.3s ease;
|
||
fill: var(--state-icon-color);
|
||
}
|
||
|
||
.overpowering {
|
||
transition: fill 0.3s ease;
|
||
fill: var(--error-color);
|
||
}
|
||
.presence {
|
||
transition: fill 0.3s ease;
|
||
fill: var(--success-color);
|
||
}
|
||
.motion {
|
||
transition: fill 0.3s ease;
|
||
fill: var(--info-color);
|
||
}
|
||
|
||
.windowByPass {
|
||
transition: fill 0.3s ease;
|
||
fill: var(--accent-color);
|
||
}
|
||
|
||
.lock-icon {
|
||
--mdc-icon-size: 24px;
|
||
}
|
||
|
||
.lock-icon.locked {
|
||
color: var(--error-color);
|
||
}
|
||
|
||
.lock-icon.unlocked {
|
||
color: var(--success-color);
|
||
}
|
||
|
||
line {
|
||
stroke: var(--disabled-text-color);
|
||
}
|
||
|
||
ha-icon-button[title="eco"] {
|
||
--mode-color: var(--energy-non-fossil-color) !important;
|
||
}
|
||
@container vt-card (max-width: 280px) {
|
||
.content {
|
||
top: calc(50% - 10px);
|
||
}
|
||
}
|
||
@container vt-card (max-width: 255px) {
|
||
#modes {
|
||
margin-top: -2em;
|
||
}
|
||
#presets {
|
||
margin-top: -1em;
|
||
}
|
||
ha-card {
|
||
padding-top: 2em;
|
||
}
|
||
}
|
||
/* Dialog Customization */
|
||
ha-dialog.digicode-dialog {
|
||
--mdc-dialog-min-width: 400px;
|
||
--mdc-dialog-max-width: 450px;
|
||
--mdc-theme-primary: var(--primary-color);
|
||
--mdc-theme-surface: var(--card-background-color);
|
||
}
|
||
|
||
/* Theme menu styles */
|
||
.theme-menu {
|
||
position: absolute;
|
||
right: 8px;
|
||
top: 36px;
|
||
background: var(--card-background-color, #fff);
|
||
border: 1px solid var(--divider-color, #e0e0e0);
|
||
border-radius: 4px;
|
||
box-shadow: 0 2px 10px rgba(0,0,0,0.2);
|
||
z-index: 10;
|
||
min-width: 160px;
|
||
max-height: 60vh;
|
||
overflow-y: auto;
|
||
box-sizing: border-box;
|
||
}
|
||
.theme-menu-header {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
padding: 8px 12px;
|
||
border-bottom: 1px solid var(--divider-color, #e0e0e0);
|
||
}
|
||
.theme-menu-title {
|
||
font-weight: 600;
|
||
cursor: pointer;
|
||
}
|
||
.menu-backdrop {
|
||
position: fixed;
|
||
left: 0;
|
||
top: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
z-index: 9;
|
||
background: transparent;
|
||
}
|
||
/* theme-menu-close removed: menu header no longer contains a close button */
|
||
.theme-menu-item {
|
||
padding: 8px 12px;
|
||
cursor: pointer;
|
||
}
|
||
.theme-menu-item:hover { background: var(--divider-color, #f1f1f1); }
|
||
|
||
/* Theme variations ------------------------------------------------- */
|
||
:host([theme="classic"]) vt-ha-control-circular-slider { display: block; }
|
||
:host([theme="classic"]) .disabled-circle-container { display: none !important; }
|
||
|
||
:host([theme="vtherm"]) vt-ha-control-circular-slider { display: none !important; }
|
||
:host([theme="vtherm"]) .disabled-circle-container { display: block !important; background: radial-gradient(var(--hvac-mode-color), transparent 50%); }
|
||
|
||
:host([theme="uncolored"]) vt-ha-control-circular-slider { display: none; }
|
||
:host([theme="uncolored"]) .disabled-circle-container { display: block !important; background: none !important; }
|
||
|
||
/* gunmalmg theme rules moved to src/themes/gunmalmg.ts */
|
||
|
||
|
||
.dialog-content {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
padding: 20px 0;
|
||
}
|
||
|
||
.dialog-title {
|
||
margin-top: 0;
|
||
margin-bottom: 40px;
|
||
font-size: 24px;
|
||
font-weight: 400;
|
||
text-align: center;
|
||
}
|
||
|
||
.error-message {
|
||
color: var(--error-color);
|
||
font-size: 14px;
|
||
height: 20px;
|
||
margin-top: 4px;
|
||
margin-bottom: 20px;
|
||
text-align: center;
|
||
opacity: 0;
|
||
transition: opacity 0.2s ease;
|
||
}
|
||
|
||
.error-message.visible {
|
||
opacity: 1;
|
||
}
|
||
|
||
.code-display {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 200px;
|
||
padding: 20px 0;
|
||
border-bottom: 1px solid var(--secondary-text-color);
|
||
}
|
||
|
||
.digit {
|
||
width: 12px;
|
||
height: 12px;
|
||
margin: 0 5px;
|
||
border-radius: 50%;
|
||
background-color: var(--secondary-text-color);
|
||
opacity: 0.3;
|
||
transition: all 0.2s ease;
|
||
}
|
||
|
||
.digit.filled {
|
||
opacity: 1;
|
||
background-color: var(--primary-text-color);
|
||
transform: scale(1.2);
|
||
}
|
||
|
||
.code-display.error {
|
||
animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
|
||
color: var(--error-color);
|
||
}
|
||
|
||
.keypad {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 16px;
|
||
width: 100%;
|
||
max-width: 320px;
|
||
}
|
||
|
||
.keypad-row {
|
||
display: flex;
|
||
justify-content: space-around;
|
||
gap: 16px;
|
||
}
|
||
|
||
.keypad-btn {
|
||
flex: 1;
|
||
--mdc-shape-small: 4px;
|
||
--mdc-typography-button-font-size: 24px;
|
||
--mdc-typography-button-font-weight: 400;
|
||
height: 64px;
|
||
--mdc-theme-primary: var(--primary-text-color);
|
||
--mdc-button-outline-color: transparent;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.keypad-btn.spacer {
|
||
visibility: hidden;
|
||
pointer-events: none;
|
||
}
|
||
|
||
@keyframes shake {
|
||
10%, 90% { transform: translate3d(-1px, 0, 0); }
|
||
20%, 80% { transform: translate3d(2px, 0, 0); }
|
||
30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
|
||
40%, 60% { transform: translate3d(4px, 0, 0); }
|
||
}
|
||
|
||
ha-card.has-preset-mod {
|
||
padding-bottom: 38px;
|
||
}
|
||
|
||
ha-card.has-regulation-chart {
|
||
padding-bottom: 38px;
|
||
}
|
||
|
||
ha-card.has-preset-mod.has-regulation-chart {
|
||
padding-bottom: 76px;
|
||
}
|
||
|
||
/* When bottom panels are active the card grows (auto-height/masonry layout).
|
||
top: 50% on .content shifts down by half the extra padding — compensate here. */
|
||
ha-card.has-preset-mod .content,
|
||
ha-card.has-regulation-chart .content {
|
||
top: calc(50% - 40px - 19px);
|
||
}
|
||
|
||
ha-card.has-preset-mod.has-regulation-chart .content {
|
||
top: calc(50% - 40px - 38px);
|
||
}
|
||
|
||
ha-card.has-preset-mod .content.no-presets,
|
||
ha-card.has-regulation-chart .content.no-presets {
|
||
top: calc(60% - 30px - 19px);
|
||
}
|
||
|
||
ha-card.has-preset-mod.has-regulation-chart .content.no-presets {
|
||
top: calc(60% - 30px - 38px);
|
||
}
|
||
|
||
/* ── Container commun pour les panneaux du bas ── */
|
||
.bottom-panels.in-card {
|
||
position: absolute;
|
||
bottom: 0;
|
||
left: 0;
|
||
right: 0;
|
||
background: var(--ha-card-background, var(--card-background-color, #fff));
|
||
border-radius: 0 0 var(--ha-card-border-radius, 12px) var(--ha-card-border-radius, 12px);
|
||
z-index: 4;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.bottom-panels.in-popup {
|
||
position: absolute;
|
||
bottom: 0;
|
||
left: 0;
|
||
right: 0;
|
||
background: var(--ha-card-background, var(--card-background-color, #fff));
|
||
border-radius: 0 0 12px 12px;
|
||
z-index: 4;
|
||
overflow: hidden;
|
||
}
|
||
|
||
/* ── Preset modification collapsible panel ── */
|
||
.preset-mod-panel {
|
||
box-sizing: border-box;
|
||
border-top: 1px solid var(--divider-color, #e0e0e0);
|
||
padding: 0 8px;
|
||
}
|
||
|
||
.preset-mod-header {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
cursor: pointer;
|
||
padding: 6px 4px;
|
||
user-select: none;
|
||
color: var(--secondary-text-color);
|
||
}
|
||
|
||
.preset-mod-header:hover {
|
||
color: var(--primary-text-color);
|
||
}
|
||
|
||
.preset-mod-title {
|
||
font-size: 12px;
|
||
font-weight: 500;
|
||
letter-spacing: 0.03em;
|
||
text-transform: uppercase;
|
||
}
|
||
|
||
.preset-mod-chevron {
|
||
--mdc-icon-size: 18px;
|
||
}
|
||
|
||
.preset-mod-chevron.open {
|
||
/* no rotation - icon is swapped directly */
|
||
}
|
||
|
||
.preset-mod-body {
|
||
padding: 4px 0 8px 0;
|
||
animation: fadeIn 0.15s ease;
|
||
}
|
||
|
||
@keyframes fadeIn {
|
||
from { opacity: 0; transform: translateY(-4px); }
|
||
to { opacity: 1; transform: translateY(0); }
|
||
}
|
||
|
||
.preset-mod-empty {
|
||
font-size: 12px;
|
||
color: var(--secondary-text-color);
|
||
text-align: center;
|
||
padding: 8px;
|
||
}
|
||
|
||
.preset-temp-table {
|
||
width: 100%;
|
||
border-collapse: collapse;
|
||
font-size: 12px;
|
||
}
|
||
|
||
.preset-temp-table th,
|
||
.preset-temp-table td {
|
||
padding: 3px 4px;
|
||
text-align: center;
|
||
vertical-align: middle;
|
||
}
|
||
|
||
.preset-temp-col-label {
|
||
font-weight: 600;
|
||
color: var(--secondary-text-color);
|
||
font-size: 11px;
|
||
text-transform: uppercase;
|
||
letter-spacing: 0.04em;
|
||
}
|
||
|
||
.preset-temp-row-label {
|
||
text-align: left !important;
|
||
color: var(--secondary-text-color);
|
||
font-size: 11px;
|
||
white-space: nowrap;
|
||
padding-right: 6px;
|
||
}
|
||
|
||
.preset-temp-cell.empty {
|
||
color: var(--disabled-text-color, #bbb);
|
||
}
|
||
|
||
.preset-temp-input {
|
||
width: 40px;
|
||
padding: 2px 1px;
|
||
border: 1px solid var(--divider-color, #ccc);
|
||
border-right: none;
|
||
border-radius: 4px 0 0 4px;
|
||
background: var(--card-background-color, #fff);
|
||
color: var(--primary-text-color);
|
||
font-size: 13px;
|
||
text-align: center;
|
||
-moz-appearance: textfield;
|
||
height: 40px;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.preset-temp-input::-webkit-outer-spin-button,
|
||
.preset-temp-input::-webkit-inner-spin-button {
|
||
-webkit-appearance: none;
|
||
margin: 0;
|
||
}
|
||
|
||
.preset-temp-input:focus {
|
||
outline: none;
|
||
border-color: var(--primary-color);
|
||
}
|
||
|
||
/* Stepper: input + vertical ± buttons */
|
||
.preset-temp-stepper {
|
||
display: inline-flex;
|
||
flex-direction: row;
|
||
align-items: stretch;
|
||
border-radius: 4px;
|
||
overflow: hidden;
|
||
}
|
||
|
||
/* Vertical stack for + and − */
|
||
.preset-step-btns {
|
||
display: flex;
|
||
flex-direction: column;
|
||
width: 24px;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.preset-step-btn {
|
||
flex: 1;
|
||
padding: 0;
|
||
border: 1px solid var(--divider-color, #ccc);
|
||
border-left: none;
|
||
background: var(--secondary-background-color, #f5f5f5);
|
||
color: var(--primary-text-color);
|
||
font-size: 14px;
|
||
font-weight: 700;
|
||
cursor: pointer;
|
||
user-select: none;
|
||
line-height: 1;
|
||
transition: background-color 150ms ease;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
min-height: 19px;
|
||
}
|
||
|
||
.preset-step-up {
|
||
border-bottom: 1px solid var(--divider-color, #ccc);
|
||
border-radius: 0 4px 0 0;
|
||
}
|
||
|
||
.preset-step-down {
|
||
border-top: none;
|
||
border-radius: 0 0 4px 0;
|
||
}
|
||
|
||
.preset-step-btn:hover {
|
||
background: var(--primary-color);
|
||
color: white;
|
||
}
|
||
|
||
.preset-step-btn:active {
|
||
opacity: 0.75;
|
||
}
|
||
|
||
/* Column colors */
|
||
.preset-temp-col-label.col-frost, .preset-temp-cell.preset-col-frost { color: #3a9ff2; }
|
||
.preset-temp-col-label.col-eco, .preset-temp-cell.preset-col-eco { color: #5dd461; }
|
||
.preset-temp-col-label.col-comfort, .preset-temp-cell.preset-col-comfort { color: #f9a21f; }
|
||
.preset-temp-col-label.col-boost, .preset-temp-cell.preset-col-boost { color: #f75252; }
|
||
|
||
.preset-col-frost .preset-step-btn { background: rgba(58,159,242,0.15); color: #3a9ff2; border-color: rgba(58,159,242,0.4); }
|
||
.preset-col-frost .preset-step-btn:hover { background: #3a9ff2; color: white; }
|
||
.preset-col-frost .preset-step-up { border-bottom-color: rgba(58,159,242,0.4); }
|
||
.preset-col-frost .preset-temp-input { border-color: rgba(58,159,242,0.4); }
|
||
|
||
.preset-col-eco .preset-step-btn { background: rgba(93,212,97,0.15); color: #5dd461; border-color: rgba(93,212,97,0.4); }
|
||
.preset-col-eco .preset-step-btn:hover { background: #5dd461; color: white; }
|
||
.preset-col-eco .preset-step-up { border-bottom-color: rgba(93,212,97,0.4); }
|
||
.preset-col-eco .preset-temp-input { border-color: rgba(93,212,97,0.4); }
|
||
|
||
.preset-col-comfort .preset-step-btn { background: rgba(249,162,31,0.15); color: #f9a21f; border-color: rgba(249,162,31,0.4); }
|
||
.preset-col-comfort .preset-step-btn:hover { background: #f9a21f; color: white; }
|
||
.preset-col-comfort .preset-step-up { border-bottom-color: rgba(249,162,31,0.4); }
|
||
.preset-col-comfort .preset-temp-input { border-color: rgba(249,162,31,0.4); }
|
||
|
||
.preset-col-boost .preset-step-btn { background: rgba(247,82,82,0.15); color: #f75252; border-color: rgba(247,82,82,0.4); }
|
||
.preset-col-boost .preset-step-btn:hover { background: #f75252; color: white; }
|
||
.preset-col-boost .preset-step-up { border-bottom-color: rgba(247,82,82,0.4); }
|
||
.preset-col-boost .preset-temp-input { border-color: rgba(247,82,82,0.4); }
|
||
|
||
/* Preset modification panel locked state */
|
||
.preset-mod-panel.locked {
|
||
opacity: 0.45;
|
||
pointer-events: none;
|
||
user-select: none;
|
||
}
|
||
|
||
/* ── Regulation chart collapsible panel ── */
|
||
.regulation-chart-panel {
|
||
box-sizing: border-box;
|
||
border-top: 1px solid var(--divider-color, #e0e0e0);
|
||
padding: 0 8px;
|
||
}
|
||
|
||
.regulation-chart-header {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
cursor: pointer;
|
||
padding: 6px 4px;
|
||
user-select: none;
|
||
color: var(--secondary-text-color);
|
||
}
|
||
|
||
.regulation-chart-header:hover {
|
||
color: var(--primary-text-color);
|
||
}
|
||
|
||
.regulation-chart-title {
|
||
font-size: 12px;
|
||
font-weight: 500;
|
||
letter-spacing: 0.03em;
|
||
text-transform: uppercase;
|
||
}
|
||
|
||
.regulation-chart-chevron {
|
||
--mdc-icon-size: 18px;
|
||
}
|
||
|
||
.regulation-chart-body {
|
||
padding: 4px 0 8px 0;
|
||
min-height: 60px;
|
||
animation: fadeIn 0.15s ease;
|
||
}
|
||
}
|
||
|
||
@keyframes shake {
|
||
10%, 90% { transform: translate3d(-1px, 0, 0); }
|
||
20%, 80% { transform: translate3d(2px, 0, 0); }
|
||
30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
|
||
40%, 60% { transform: translate3d(4px, 0, 0); }
|
||
}
|
||
|
||
.hvac-action-text-svg {
|
||
text-anchor: middle;
|
||
font-weight: var(--ha-font-weight-light);
|
||
font-size: 6px;
|
||
text-align: center;
|
||
display: -webkit-box;
|
||
-webkit-line-clamp: 2;
|
||
-webkit-box-orient: vertical;
|
||
overflow: hidden;
|
||
line-height: var(--ha-line-height-normal);
|
||
min-height: 1.5em;
|
||
white-space: nowrap;
|
||
filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.8));
|
||
}
|
||
.hvac-action-text-svg.heating {
|
||
fill: var(--hvac-mode-color, #f44336);
|
||
}
|
||
|
||
`,nr,sr],Ar.additionalThemeStyles=[sr],t([pt({attribute:!1})],Ar.prototype,"hass",void 0),t([pt({type:Number})],Ar.prototype,"value",void 0),t([mt()],Ar.prototype,"_selectTargetTemperature",void 0),t([pt({type:Number})],Ar.prototype,"current",void 0),t([pt({type:Number})],Ar.prototype,"humidity",void 0),t([pt({type:Number})],Ar.prototype,"temperature",void 0),t([pt({type:Number})],Ar.prototype,"min",void 0),t([pt({type:Number})],Ar.prototype,"max",void 0),t([pt({type:Number})],Ar.prototype,"step",void 0),t([pt({type:Number})],Ar.prototype,"powerPercent",void 0),t([pt({type:Number})],Ar.prototype,"meanCyclePower",void 0),t([pt({type:Number})],Ar.prototype,"valveOpenPercent",void 0),t([pt({type:Number})],Ar.prototype,"devicePower",void 0),t([pt({type:Number})],Ar.prototype,"regulatedTargetTemperature",void 0),t([pt({type:Boolean})],Ar.prototype,"isOn",void 0),t([pt({type:Boolean})],Ar.prototype,"window",void 0),t([pt({type:Boolean})],Ar.prototype,"windowByPass",void 0),t([pt({type:Boolean})],Ar.prototype,"presence",void 0),t([pt({type:Boolean})],Ar.prototype,"motion",void 0),t([pt({type:Boolean})],Ar.prototype,"overpowering",void 0),t([pt({type:Boolean})],Ar.prototype,"isDeviceActive",void 0),t([pt({type:Boolean})],Ar.prototype,"isSleeping",void 0),t([pt({type:Boolean})],Ar.prototype,"isRegulated",void 0),t([pt({type:Boolean})],Ar.prototype,"isRecalculateScheduled",void 0),t([pt({type:String})],Ar.prototype,"windowState",void 0),t([pt({type:String})],Ar.prototype,"windowAutoState",void 0),t([pt({type:String})],Ar.prototype,"overpoweringState",void 0),t([pt({type:String})],Ar.prototype,"presenceState",void 0),t([pt({type:String})],Ar.prototype,"motionState",void 0),t([pt({type:String})],Ar.prototype,"safetyState",void 0),t([pt({type:String})],Ar.prototype,"status",void 0),t([pt({type:String})],Ar.prototype,"hvacMode",void 0),t([pt({type:String})],Ar.prototype,"hvacAction",void 0),t([pt({type:String})],Ar.prototype,"preset",void 0),t([pt({type:String})],Ar.prototype,"autoRegulationMode",void 0),t([pt({type:String})],Ar.prototype,"currentAutoFanMode",void 0),t([pt({type:String})],Ar.prototype,"autoFanMode",void 0),t([pt({type:String})],Ar.prototype,"fanMode",void 0),t([pt({type:String})],Ar.prototype,"hvacModeReason",void 0),t([pt({type:Boolean,reflect:!0})],Ar.prototype,"dragging",void 0),t([pt({type:String})],Ar.prototype,"name",void 0),t([mt()],Ar.prototype,"changingHigh",void 0),t([mt()],Ar.prototype,"_hasError",void 0),t([mt()],Ar.prototype,"_config",void 0),t([mt()],Ar.prototype,"_showThemeMenu",void 0),t([mt()],Ar.prototype,"_showClassicPopup",void 0),t([pt({type:String})],Ar.prototype,"theme",void 0),t([mt()],Ar.prototype,"isLocked",void 0),t([mt()],Ar.prototype,"isUserLocked",void 0),t([mt()],Ar.prototype,"isAutomationLocked",void 0),t([mt()],Ar.prototype,"showDigicodeModal",void 0),t([mt()],Ar.prototype,"enteredCode",void 0),t([mt()],Ar.prototype,"codeError",void 0),t([mt()],Ar.prototype,"isLocking",void 0),t([mt()],Ar.prototype,"timedPresetDuration",void 0),t([mt()],Ar.prototype,"timedPresetActive",void 0),t([mt()],Ar.prototype,"timedPresetRemainingTime",void 0),t([mt()],Ar.prototype,"timedPresetPreset",void 0),t([mt()],Ar.prototype,"_presetsPanelOpen",void 0),t([mt()],Ar.prototype,"_regulationChartOpen",void 0),t([mt()],Ar.prototype,"_presetTempEntities",void 0),t([mt()],Ar.prototype,"_autoStartStopEditMode",void 0),Ar=t([dt("versatile-thermostat-ui-card")],Ar);const Er=(t,e,i)=>Math.max(Math.min(t,i),e);function Lr(t){return Er(Pr(2.55*t),0,255)}function $r(t){return Er(Pr(255*t),0,255)}function zr(t){return Er(Pr(t/2.55)/100,0,1)}function Or(t){return Er(Pr(100*t),0,100)}const Vr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Hr=[..."0123456789ABCDEF"],Ir=t=>Hr[15&t],Rr=t=>Hr[(240&t)>>4]+Hr[15&t],Fr=t=>(240&t)>>4==(15&t);function Nr(t){var e=(t=>Fr(t.r)&&Fr(t.g)&&Fr(t.b)&&Fr(t.a))(t)?Ir:Rr;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const jr=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Wr(t,e,i){const o=e*Math.min(i,1-i),a=(e,a=(e+t/30)%12)=>i-o*Math.max(Math.min(a-3,9-a,1),-1);return[a(0),a(8),a(4)]}function Br(t,e,i){const o=(o,a=(o+t/60)%6)=>i-i*e*Math.max(Math.min(a,4-a,1),0);return[o(5),o(3),o(1)]}function Ur(t,e,i){const o=Wr(t,1,.5);let a;for(e+i>1&&(a=1/(e+i),e*=a,i*=a),a=0;a<3;a++)o[a]*=1-e-i,o[a]+=e;return o}function Yr(t){const e=t.r/255,i=t.g/255,o=t.b/255,a=Math.max(e,i,o),n=Math.min(e,i,o),s=(a+n)/2;let r,l,c;return a!==n&&(c=a-n,l=s>.5?c/(2-a-n):c/(a+n),r=function(t,e,i,o,a){return t===a?(e-i)/o+(e<i?6:0):e===a?(i-t)/o+2:(t-e)/o+4}(e,i,o,c,a),r=60*r+.5),[0|r,l||0,s]}function qr(t,e,i,o){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,o)).map($r)}function Zr(t,e,i){return qr(Wr,t,e,i)}function Xr(t){return(t%360+360)%360}function Kr(t){const e=jr.exec(t);let i,o=255;if(!e)return;e[5]!==i&&(o=e[6]?Lr(+e[5]):$r(+e[5]));const a=Xr(+e[2]),n=+e[3]/100,s=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return qr(Ur,t,e,i)}(a,n,s):"hsv"===e[1]?function(t,e,i){return qr(Br,t,e,i)}(a,n,s):Zr(a,n,s),{r:i[0],g:i[1],b:i[2],a:o}}const Gr={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Qr={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let Jr;function tl(t){Jr||(Jr=function(){const t={},e=Object.keys(Qr),i=Object.keys(Gr);let o,a,n,s,r;for(o=0;o<e.length;o++){for(s=r=e[o],a=0;a<i.length;a++)n=i[a],r=r.replace(n,Gr[n]);n=parseInt(Qr[s],16),t[r]=[n>>16&255,n>>8&255,255&n]}return t}(),Jr.transparent=[0,0,0,0]);const e=Jr[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const el=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const il=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,ol=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function al(t,e,i){if(t){let o=Yr(t);o[e]=Math.max(0,Math.min(o[e]+o[e]*i,0===e?360:1)),o=Zr(o),t.r=o[0],t.g=o[1],t.b=o[2]}}function nl(t,e){return t?Object.assign(e||{},t):t}function sl(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=$r(t[3]))):(e=nl(t,{r:0,g:0,b:0,a:1})).a=$r(e.a),e}function rl(t){return"r"===t.charAt(0)?function(t){const e=el.exec(t);let i,o,a,n=255;if(e){if(e[7]!==i){const t=+e[7];n=e[8]?Lr(t):Er(255*t,0,255)}return i=+e[1],o=+e[3],a=+e[5],i=255&(e[2]?Lr(i):Er(i,0,255)),o=255&(e[4]?Lr(o):Er(o,0,255)),a=255&(e[6]?Lr(a):Er(a,0,255)),{r:i,g:o,b:a,a:n}}}(t):Kr(t)}class ll{constructor(t){if(t instanceof ll)return t;const e=typeof t;let i;var o,a,n;"object"===e?i=sl(t):"string"===e&&(n=(o=t).length,"#"===o[0]&&(4===n||5===n?a={r:255&17*Vr[o[1]],g:255&17*Vr[o[2]],b:255&17*Vr[o[3]],a:5===n?17*Vr[o[4]]:255}:7!==n&&9!==n||(a={r:Vr[o[1]]<<4|Vr[o[2]],g:Vr[o[3]]<<4|Vr[o[4]],b:Vr[o[5]]<<4|Vr[o[6]],a:9===n?Vr[o[7]]<<4|Vr[o[8]]:255})),i=a||tl(t)||rl(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=nl(this._rgb);return t&&(t.a=zr(t.a)),t}set rgb(t){this._rgb=sl(t)}rgbString(){return this._valid?function(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${zr(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}(this._rgb):void 0}hexString(){return this._valid?Nr(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=Yr(t),i=e[0],o=Or(e[1]),a=Or(e[2]);return t.a<255?`hsla(${i}, ${o}%, ${a}%, ${zr(t.a)})`:`hsl(${i}, ${o}%, ${a}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,o=t.rgb;let a;const n=e===a?.5:e,s=2*n-1,r=i.a-o.a,l=((s*r==-1?s:(s+r)/(1+s*r))+1)/2;a=1-l,i.r=255&l*i.r+a*o.r+.5,i.g=255&l*i.g+a*o.g+.5,i.b=255&l*i.b+a*o.b+.5,i.a=n*i.a+(1-n)*o.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const o=ol(zr(t.r)),a=ol(zr(t.g)),n=ol(zr(t.b));return{r:$r(il(o+i*(ol(zr(e.r))-o))),g:$r(il(a+i*(ol(zr(e.g))-a))),b:$r(il(n+i*(ol(zr(e.b))-n))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new ll(this.rgb)}alpha(t){return this._rgb.a=$r(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=Pr(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return al(this._rgb,2,t),this}darken(t){return al(this._rgb,2,-t),this}saturate(t){return al(this._rgb,1,t),this}desaturate(t){return al(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=Yr(t);i[0]=Xr(i[0]+e),i=Zr(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function cl(){}const dl=(()=>{let t=0;return()=>t++})();function hl(t){return null==t}function ul(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function pl(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function ml(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function _l(t,e){return ml(t)?t:e}function fl(t,e){return void 0===t?e:t}const gl=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function bl(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function vl(t,e,i,o){let a,n,s;if(ul(t))for(n=t.length,a=0;a<n;a++)e.call(i,t[a],a);else if(pl(t))for(s=Object.keys(t),n=s.length,a=0;a<n;a++)e.call(i,t[s[a]],s[a])}function yl(t,e){let i,o,a,n;if(!t||!e||t.length!==e.length)return!1;for(i=0,o=t.length;i<o;++i)if(a=t[i],n=e[i],a.datasetIndex!==n.datasetIndex||a.index!==n.index)return!1;return!0}function wl(t){if(ul(t))return t.map(wl);if(pl(t)){const e=Object.create(null),i=Object.keys(t),o=i.length;let a=0;for(;a<o;++a)e[i[a]]=wl(t[i[a]]);return e}return t}function xl(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function kl(t,e,i,o){if(!xl(t))return;const a=e[t],n=i[t];pl(a)&&pl(n)?Sl(a,n,o):e[t]=wl(n)}function Sl(t,e,i){const o=ul(e)?e:[e],a=o.length;if(!pl(t))return t;const n=(i=i||{}).merger||kl;let s;for(let e=0;e<a;++e){if(s=o[e],!pl(s))continue;const a=Object.keys(s);for(let e=0,o=a.length;e<o;++e)n(a[e],t,s,i)}return t}function Tl(t,e){return Sl(t,e,{merger:Ml})}function Ml(t,e,i){if(!xl(t))return;const o=e[t],a=i[t];pl(o)&&pl(a)?Tl(o,a):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=wl(a))}const Dl={"":t=>t,x:t=>t.x,y:t=>t.y};function Cl(t,e){const i=Dl[e]||(Dl[e]=function(t){const e=function(t){const e=t.split("."),i=[];let o="";for(const t of e)o+=t,o.endsWith("\\")?o=o.slice(0,-1)+".":(i.push(o),o="");return i}(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function Al(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Pl=t=>void 0!==t,El=t=>"function"==typeof t,Ll=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};const $l=Math.PI,zl=2*$l,Ol=zl+$l,Vl=Number.POSITIVE_INFINITY,Hl=$l/180,Il=$l/2,Rl=$l/4,Fl=2*$l/3,Nl=Math.log10,jl=Math.sign;function Wl(t,e,i){return Math.abs(t-e)<i}function Bl(t){const e=Math.round(t);t=Wl(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(Nl(t))),o=t/i;return(o<=1?1:o<=2?2:o<=5?5:10)*i}function Ul(t){return!function(t){return"symbol"==typeof t||"object"==typeof t&&null!==t&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function Yl(t,e,i){let o,a,n;for(o=0,a=t.length;o<a;o++)n=t[o][i],isNaN(n)||(e.min=Math.min(e.min,n),e.max=Math.max(e.max,n))}function ql(t){return t*($l/180)}function Zl(t){return t*(180/$l)}function Xl(t){if(!ml(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Kl(t,e){const i=e.x-t.x,o=e.y-t.y,a=Math.sqrt(i*i+o*o);let n=Math.atan2(o,i);return n<-.5*$l&&(n+=zl),{angle:n,distance:a}}function Gl(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Ql(t,e){return(t-e+Ol)%zl-$l}function Jl(t){return(t%zl+zl)%zl}function tc(t,e,i,o){const a=Jl(t),n=Jl(e),s=Jl(i),r=Jl(n-a),l=Jl(s-a),c=Jl(a-n),d=Jl(a-s);return a===n||a===s||o&&n===s||r>l&&c<d}function ec(t,e,i){return Math.max(e,Math.min(i,t))}function ic(t,e,i,o=1e-6){return t>=Math.min(e,i)-o&&t<=Math.max(e,i)+o}function oc(t,e,i){i=i||(i=>t[i]<e);let o,a=t.length-1,n=0;for(;a-n>1;)o=n+a>>1,i(o)?n=o:a=o;return{lo:n,hi:a}}const ac=(t,e,i,o)=>oc(t,i,o?o=>{const a=t[o][e];return a<i||a===i&&t[o+1][e]===i}:o=>t[o][e]<i),nc=(t,e,i)=>oc(t,i,(o=>t[o][e]>=i));const sc=["push","pop","shift","splice","unshift"];function rc(t,e){const i=t._chartjs;if(!i)return;const o=i.listeners,a=o.indexOf(e);-1!==a&&o.splice(a,1),o.length>0||(sc.forEach((e=>{delete t[e]})),delete t._chartjs)}function lc(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const cc="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function dc(t,e){let i=[],o=!1;return function(...a){i=a,o||(o=!0,cc.call(window,(()=>{o=!1,t.apply(e,i)})))}}const hc=t=>"start"===t?"left":"end"===t?"right":"center",uc=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function pc(t,e,i){const o=e.length;let a=0,n=o;if(t._sorted){const{iScale:s,vScale:r,_parsed:l}=t,c=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,d=s.axis,{min:h,max:u,minDefined:p,maxDefined:m}=s.getUserBounds();if(p){if(a=Math.min(ac(l,d,h).lo,i?o:ac(e,d,s.getPixelForValue(h)).lo),c){const t=l.slice(0,a+1).reverse().findIndex((t=>!hl(t[r.axis])));a-=Math.max(0,t)}a=ec(a,0,o-1)}if(m){let t=Math.max(ac(l,s.axis,u,!0).hi+1,i?0:ac(e,d,s.getPixelForValue(u),!0).hi+1);if(c){const e=l.slice(t-1).findIndex((t=>!hl(t[r.axis])));t+=Math.max(0,e)}n=ec(t,a,o)-a}else n=o-a}return{start:a,count:n}}function mc(t){const{xScale:e,yScale:i,_scaleRanges:o}=t,a={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!o)return t._scaleRanges=a,!0;const n=o.xmin!==e.min||o.xmax!==e.max||o.ymin!==i.min||o.ymax!==i.max;return Object.assign(o,a),n}const _c=t=>0===t||1===t,fc=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*zl/i),gc=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*zl/i)+1,bc={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*Il),easeOutSine:t=>Math.sin(t*Il),easeInOutSine:t=>-.5*(Math.cos($l*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>_c(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>_c(t)?t:fc(t,.075,.3),easeOutElastic:t=>_c(t)?t:gc(t,.075,.3),easeInOutElastic(t){const e=.1125;return _c(t)?t:t<.5?.5*fc(2*t,e,.45):.5+.5*gc(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-bc.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*bc.easeInBounce(2*t):.5*bc.easeOutBounce(2*t-1)+.5};function vc(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function yc(t){return vc(t)?t:new ll(t)}function wc(t){return vc(t)?t:new ll(t).saturate(.5).darken(.1).hexString()}const xc=["x","y","borderWidth","radius","tension"],kc=["color","borderColor","backgroundColor"];const Sc=new Map;function Tc(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let o=Sc.get(i);return o||(o=new Intl.NumberFormat(t,e),Sc.set(i,o)),o}(e,i).format(t)}const Mc={values:t=>ul(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const o=this.chart.options.locale;let a,n=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(a="scientific"),n=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const s=Nl(Math.abs(n)),r=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:a,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),Tc(t,o,l)},logarithmic(t,e,i){if(0===t)return"0";const o=i[e].significand||t/Math.pow(10,Math.floor(Nl(t)));return[1,2,3,5,10,15].includes(o)||e>.8*i.length?Mc.numeric.call(this,t,e,i):""}};var Dc={formatters:Mc};const Cc=Object.create(null),Ac=Object.create(null);function Pc(t,e){if(!e)return t;const i=e.split(".");for(let e=0,o=i.length;e<o;++e){const o=i[e];t=t[o]||(t[o]=Object.create(null))}return t}function Ec(t,e,i){return"string"==typeof e?Sl(Pc(t,e),i):Sl(Pc(t,""),e)}class Lc{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>wc(e.backgroundColor),this.hoverBorderColor=(t,e)=>wc(e.borderColor),this.hoverColor=(t,e)=>wc(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Ec(this,t,e)}get(t){return Pc(this,t)}describe(t,e){return Ec(Ac,t,e)}override(t,e){return Ec(Cc,t,e)}route(t,e,i,o){const a=Pc(this,t),n=Pc(this,i),s="_"+e;Object.defineProperties(a,{[s]:{value:a[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[s],e=n[o];return pl(t)?Object.assign({},e,t):fl(t,e)},set(t){this[s]=t}}})}apply(t){t.forEach((t=>t(this)))}}var $c=new Lc({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:kc},numbers:{type:"number",properties:xc}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Dc.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function zc(t,e,i,o,a){let n=e[a];return n||(n=e[a]=t.measureText(a).width,i.push(a)),n>o&&(o=n),o}function Oc(t,e,i,o){let a=(o=o||{}).data=o.data||{},n=o.garbageCollect=o.garbageCollect||[];o.font!==e&&(a=o.data={},n=o.garbageCollect=[],o.font=e),t.save(),t.font=e;let s=0;const r=i.length;let l,c,d,h,u;for(l=0;l<r;l++)if(h=i[l],null==h||ul(h)){if(ul(h))for(c=0,d=h.length;c<d;c++)u=h[c],null==u||ul(u)||(s=zc(t,a,n,s,u))}else s=zc(t,a,n,s,h);t.restore();const p=n.length/2;if(p>i.length){for(l=0;l<p;l++)delete a[n[l]];n.splice(0,p)}return s}function Vc(t,e,i){const o=t.currentDevicePixelRatio,a=0!==i?Math.max(i/2,.5):0;return Math.round((e-a)*o)/o+a}function Hc(t,e){(e||t)&&((e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function Ic(t,e,i,o){Rc(t,e,i,o,null)}function Rc(t,e,i,o,a){let n,s,r,l,c,d,h,u;const p=e.pointStyle,m=e.rotation,_=e.radius;let f=(m||0)*Hl;if(p&&"object"==typeof p&&(n=p.toString(),"[object HTMLImageElement]"===n||"[object HTMLCanvasElement]"===n))return t.save(),t.translate(i,o),t.rotate(f),t.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),void t.restore();if(!(isNaN(_)||_<=0)){switch(t.beginPath(),p){default:a?t.ellipse(i,o,a/2,_,0,0,zl):t.arc(i,o,_,0,zl),t.closePath();break;case"triangle":d=a?a/2:_,t.moveTo(i+Math.sin(f)*d,o-Math.cos(f)*_),f+=Fl,t.lineTo(i+Math.sin(f)*d,o-Math.cos(f)*_),f+=Fl,t.lineTo(i+Math.sin(f)*d,o-Math.cos(f)*_),t.closePath();break;case"rectRounded":c=.516*_,l=_-c,s=Math.cos(f+Rl)*l,h=Math.cos(f+Rl)*(a?a/2-c:l),r=Math.sin(f+Rl)*l,u=Math.sin(f+Rl)*(a?a/2-c:l),t.arc(i-h,o-r,c,f-$l,f-Il),t.arc(i+u,o-s,c,f-Il,f),t.arc(i+h,o+r,c,f,f+Il),t.arc(i-u,o+s,c,f+Il,f+$l),t.closePath();break;case"rect":if(!m){l=Math.SQRT1_2*_,d=a?a/2:l,t.rect(i-d,o-l,2*d,2*l);break}f+=Rl;case"rectRot":h=Math.cos(f)*(a?a/2:_),s=Math.cos(f)*_,r=Math.sin(f)*_,u=Math.sin(f)*(a?a/2:_),t.moveTo(i-h,o-r),t.lineTo(i+u,o-s),t.lineTo(i+h,o+r),t.lineTo(i-u,o+s),t.closePath();break;case"crossRot":f+=Rl;case"cross":h=Math.cos(f)*(a?a/2:_),s=Math.cos(f)*_,r=Math.sin(f)*_,u=Math.sin(f)*(a?a/2:_),t.moveTo(i-h,o-r),t.lineTo(i+h,o+r),t.moveTo(i+u,o-s),t.lineTo(i-u,o+s);break;case"star":h=Math.cos(f)*(a?a/2:_),s=Math.cos(f)*_,r=Math.sin(f)*_,u=Math.sin(f)*(a?a/2:_),t.moveTo(i-h,o-r),t.lineTo(i+h,o+r),t.moveTo(i+u,o-s),t.lineTo(i-u,o+s),f+=Rl,h=Math.cos(f)*(a?a/2:_),s=Math.cos(f)*_,r=Math.sin(f)*_,u=Math.sin(f)*(a?a/2:_),t.moveTo(i-h,o-r),t.lineTo(i+h,o+r),t.moveTo(i+u,o-s),t.lineTo(i-u,o+s);break;case"line":s=a?a/2:Math.cos(f)*_,r=Math.sin(f)*_,t.moveTo(i-s,o-r),t.lineTo(i+s,o+r);break;case"dash":t.moveTo(i,o),t.lineTo(i+Math.cos(f)*(a?a/2:_),o+Math.sin(f)*_);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function Fc(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function Nc(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function jc(t){t.restore()}function Wc(t,e,i,o,a){if(!e)return t.lineTo(i.x,i.y);if("middle"===a){const o=(e.x+i.x)/2;t.lineTo(o,e.y),t.lineTo(o,i.y)}else"after"===a!=!!o?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function Bc(t,e,i,o){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(o?e.cp1x:e.cp2x,o?e.cp1y:e.cp2y,o?i.cp2x:i.cp1x,o?i.cp2y:i.cp1y,i.x,i.y)}function Uc(t,e,i,o,a){if(a.strikethrough||a.underline){const n=t.measureText(o),s=e-n.actualBoundingBoxLeft,r=e+n.actualBoundingBoxRight,l=i-n.actualBoundingBoxAscent,c=i+n.actualBoundingBoxDescent,d=a.strikethrough?(l+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=a.decorationWidth||2,t.moveTo(s,d),t.lineTo(r,d),t.stroke()}}function Yc(t,e){const i=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=i}function qc(t,e,i,o,a,n={}){const s=ul(e)?e:[e],r=n.strokeWidth>0&&""!==n.strokeColor;let l,c;for(t.save(),t.font=a.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),hl(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,n),l=0;l<s.length;++l)c=s[l],n.backdrop&&Yc(t,n.backdrop),r&&(n.strokeColor&&(t.strokeStyle=n.strokeColor),hl(n.strokeWidth)||(t.lineWidth=n.strokeWidth),t.strokeText(c,i,o,n.maxWidth)),t.fillText(c,i,o,n.maxWidth),Uc(t,i,o,c,n),o+=Number(a.lineHeight);t.restore()}function Zc(t,e){const{x:i,y:o,w:a,h:n,radius:s}=e;t.arc(i+s.topLeft,o+s.topLeft,s.topLeft,1.5*$l,$l,!0),t.lineTo(i,o+n-s.bottomLeft),t.arc(i+s.bottomLeft,o+n-s.bottomLeft,s.bottomLeft,$l,Il,!0),t.lineTo(i+a-s.bottomRight,o+n),t.arc(i+a-s.bottomRight,o+n-s.bottomRight,s.bottomRight,Il,0,!0),t.lineTo(i+a,o+s.topRight),t.arc(i+a-s.topRight,o+s.topRight,s.topRight,0,-Il,!0),t.lineTo(i+s.topLeft,o)}const Xc=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Kc=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Gc(t,e){const i=(""+t).match(Xc);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}const Qc=t=>+t||0;function Jc(t,e){const i={},o=pl(e),a=o?Object.keys(e):e,n=pl(t)?o?i=>fl(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of a)i[t]=Qc(n(t));return i}function td(t){return Jc(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ed(t){return Jc(t,["topLeft","topRight","bottomLeft","bottomRight"])}function id(t){const e=td(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function od(t,e){t=t||{},e=e||$c.font;let i=fl(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let o=fl(t.style,e.style);o&&!(""+o).match(Kc)&&(console.warn('Invalid font style specified: "'+o+'"'),o=void 0);const a={family:fl(t.family,e.family),lineHeight:Gc(fl(t.lineHeight,e.lineHeight),i),size:i,style:o,weight:fl(t.weight,e.weight),string:""};return a.string=function(t){return!t||hl(t.size)||hl(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(a),a}function ad(t,e,i,o){let a,n,s;for(a=0,n=t.length;a<n;++a)if(s=t[a],void 0!==s&&void 0!==s)return s}function nd(t,e){return Object.assign(Object.create(t),e)}function sd(t,e=[""],i,o,a=(()=>t[0])){const n=i||t;void 0===o&&(o=gd("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:n,_fallback:o,_getTarget:a,override:i=>sd([i,...t],e,n,o)};return new Proxy(s,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,o)=>hd(i,o,(()=>function(t,e,i,o){let a;for(const n of e)if(a=gd(cd(n,t),i),void 0!==a)return dd(t,a)?_d(i,o,t,a):a}(o,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>bd(t).includes(e),ownKeys:t=>bd(t),set(t,e,i){const o=t._storage||(t._storage=a());return t[e]=o[e]=i,delete t._keys,!0}})}function rd(t,e,i,o){const a={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:ld(t,o),setContext:e=>rd(t,e,i,o),override:a=>rd(t.override(a),e,i,o)};return new Proxy(a,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>hd(t,e,(()=>function(t,e,i){const{_proxy:o,_context:a,_subProxy:n,_descriptors:s}=t;let r=o[e];El(r)&&s.isScriptable(e)&&(r=function(t,e,i,o){const{_proxy:a,_context:n,_subProxy:s,_stack:r}=i;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);r.add(t);let l=e(n,s||o);r.delete(t),dd(t,l)&&(l=_d(a._scopes,a,t,l));return l}(e,r,t,i));ul(r)&&r.length&&(r=function(t,e,i,o){const{_proxy:a,_context:n,_subProxy:s,_descriptors:r}=i;if(void 0!==n.index&&o(t))return e[n.index%e.length];if(pl(e[0])){const i=e,o=a._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=_d(o,a,t,l);e.push(rd(i,n,s&&s[t],r))}}return e}(e,r,t,s.isIndexable));dd(e,r)&&(r=rd(r,a,n&&n[e],s));return r}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,o)=>(t[i]=o,delete e[i],!0)})}function ld(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:o=e.indexable,_allKeys:a=e.allKeys}=t;return{allKeys:a,scriptable:i,indexable:o,isScriptable:El(i)?i:()=>i,isIndexable:El(o)?o:()=>o}}const cd=(t,e)=>t?t+Al(e):e,dd=(t,e)=>pl(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function hd(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const o=i();return t[e]=o,o}function ud(t,e,i){return El(t)?t(e,i):t}const pd=(t,e)=>!0===t?e:"string"==typeof t?Cl(e,t):void 0;function md(t,e,i,o,a){for(const n of e){const e=pd(i,n);if(e){t.add(e);const n=ud(e._fallback,i,a);if(void 0!==n&&n!==i&&n!==o)return n}else if(!1===e&&void 0!==o&&i!==o)return null}return!1}function _d(t,e,i,o){const a=e._rootScopes,n=ud(e._fallback,i,o),s=[...t,...a],r=new Set;r.add(o);let l=fd(r,s,i,n||i,o);return null!==l&&((void 0===n||n===i||(l=fd(r,s,n,l,o),null!==l))&&sd(Array.from(r),[""],a,n,(()=>function(t,e,i){const o=t._getTarget();e in o||(o[e]={});const a=o[e];if(ul(a)&&pl(i))return i;return a||{}}(e,i,o))))}function fd(t,e,i,o,a){for(;i;)i=md(t,e,i,o,a);return i}function gd(t,e){for(const i of e){if(!i)continue;const e=i[t];if(void 0!==e)return e}}function bd(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}function vd(t,e,i,o){const{iScale:a}=t,{key:n="r"}=this._parsing,s=new Array(o);let r,l,c,d;for(r=0,l=o;r<l;++r)c=r+i,d=e[c],s[r]={r:a.parse(Cl(d,n),c)};return s}const yd=Number.EPSILON||1e-14,wd=(t,e)=>e<t.length&&!t[e].skip&&t[e],xd=t=>"x"===t?"y":"x";function kd(t,e,i,o){const a=t.skip?e:t,n=e,s=i.skip?e:i,r=Gl(n,a),l=Gl(s,n);let c=r/(r+l),d=l/(r+l);c=isNaN(c)?0:c,d=isNaN(d)?0:d;const h=o*c,u=o*d;return{previous:{x:n.x-h*(s.x-a.x),y:n.y-h*(s.y-a.y)},next:{x:n.x+u*(s.x-a.x),y:n.y+u*(s.y-a.y)}}}function Sd(t,e="x"){const i=xd(e),o=t.length,a=Array(o).fill(0),n=Array(o);let s,r,l,c=wd(t,0);for(s=0;s<o;++s)if(r=l,l=c,c=wd(t,s+1),l){if(c){const t=c[e]-l[e];a[s]=0!==t?(c[i]-l[i])/t:0}n[s]=r?c?jl(a[s-1])!==jl(a[s])?0:(a[s-1]+a[s])/2:a[s-1]:a[s]}!function(t,e,i){const o=t.length;let a,n,s,r,l,c=wd(t,0);for(let d=0;d<o-1;++d)l=c,c=wd(t,d+1),l&&c&&(Wl(e[d],0,yd)?i[d]=i[d+1]=0:(a=i[d]/e[d],n=i[d+1]/e[d],r=Math.pow(a,2)+Math.pow(n,2),r<=9||(s=3/Math.sqrt(r),i[d]=a*s*e[d],i[d+1]=n*s*e[d])))}(t,a,n),function(t,e,i="x"){const o=xd(i),a=t.length;let n,s,r,l=wd(t,0);for(let c=0;c<a;++c){if(s=r,r=l,l=wd(t,c+1),!r)continue;const a=r[i],d=r[o];s&&(n=(a-s[i])/3,r[`cp1${i}`]=a-n,r[`cp1${o}`]=d-n*e[c]),l&&(n=(l[i]-a)/3,r[`cp2${i}`]=a+n,r[`cp2${o}`]=d+n*e[c])}}(t,n,e)}function Td(t,e,i){return Math.max(Math.min(t,i),e)}function Md(t,e,i,o,a){let n,s,r,l;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)Sd(t,a);else{let i=o?t[t.length-1]:t[0];for(n=0,s=t.length;n<s;++n)r=t[n],l=kd(i,r,t[Math.min(n+1,s-(o?0:1))%s],e.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,i=r}e.capBezierPoints&&function(t,e){let i,o,a,n,s,r=Fc(t[0],e);for(i=0,o=t.length;i<o;++i)s=n,n=r,r=i<o-1&&Fc(t[i+1],e),n&&(a=t[i],s&&(a.cp1x=Td(a.cp1x,e.left,e.right),a.cp1y=Td(a.cp1y,e.top,e.bottom)),r&&(a.cp2x=Td(a.cp2x,e.left,e.right),a.cp2y=Td(a.cp2y,e.top,e.bottom)))}(t,i)}function Dd(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Cd(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function Ad(t,e,i){let o;return"string"==typeof t?(o=parseInt(t,10),-1!==t.indexOf("%")&&(o=o/100*e.parentNode[i])):o=t,o}const Pd=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);const Ed=["top","right","bottom","left"];function Ld(t,e,i){const o={};i=i?"-"+i:"";for(let a=0;a<4;a++){const n=Ed[a];o[n]=parseFloat(t[e+"-"+n+i])||0}return o.width=o.left+o.right,o.height=o.top+o.bottom,o}const $d=(t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot);function zd(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:o}=e,a=Pd(i),n="border-box"===a.boxSizing,s=Ld(a,"padding"),r=Ld(a,"border","width"),{x:l,y:c,box:d}=function(t,e){const i=t.touches,o=i&&i.length?i[0]:t,{offsetX:a,offsetY:n}=o;let s,r,l=!1;if($d(a,n,t.target))s=a,r=n;else{const t=e.getBoundingClientRect();s=o.clientX-t.left,r=o.clientY-t.top,l=!0}return{x:s,y:r,box:l}}(t,i),h=s.left+(d&&r.left),u=s.top+(d&&r.top);let{width:p,height:m}=e;return n&&(p-=s.width+r.width,m-=s.height+r.height),{x:Math.round((l-h)/p*i.width/o),y:Math.round((c-u)/m*i.height/o)}}const Od=t=>Math.round(10*t)/10;function Vd(t,e,i,o){const a=Pd(t),n=Ld(a,"margin"),s=Ad(a.maxWidth,t,"clientWidth")||Vl,r=Ad(a.maxHeight,t,"clientHeight")||Vl,l=function(t,e,i){let o,a;if(void 0===e||void 0===i){const n=t&&Cd(t);if(n){const t=n.getBoundingClientRect(),s=Pd(n),r=Ld(s,"border","width"),l=Ld(s,"padding");e=t.width-l.width-r.width,i=t.height-l.height-r.height,o=Ad(s.maxWidth,n,"clientWidth"),a=Ad(s.maxHeight,n,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:o||Vl,maxHeight:a||Vl}}(t,e,i);let{width:c,height:d}=l;if("content-box"===a.boxSizing){const t=Ld(a,"border","width"),e=Ld(a,"padding");c-=e.width+t.width,d-=e.height+t.height}c=Math.max(0,c-n.width),d=Math.max(0,o?c/o:d-n.height),c=Od(Math.min(c,s,l.maxWidth)),d=Od(Math.min(d,r,l.maxHeight)),c&&!d&&(d=Od(c/2));return(void 0!==e||void 0!==i)&&o&&l.height&&d>l.height&&(d=l.height,c=Od(Math.floor(d*o))),{width:c,height:d}}function Hd(t,e,i){const o=e||1,a=Od(t.height*o),n=Od(t.width*o);t.height=Od(t.height),t.width=Od(t.width);const s=t.canvas;return s.style&&(i||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==o||s.height!==a||s.width!==n)&&(t.currentDevicePixelRatio=o,s.height=a,s.width=n,t.ctx.setTransform(o,0,0,o,0,0),!0)}const Id=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};Dd()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(t){}return t}();function Rd(t,e){const i=function(t,e){return Pd(t).getPropertyValue(e)}(t,e),o=i&&i.match(/^(\d+)(\.\d+)?px$/);return o?+o[1]:void 0}function Fd(t,e,i,o){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function Nd(t,e,i,o){return{x:t.x+i*(e.x-t.x),y:"middle"===o?i<.5?t.y:e.y:"after"===o?i<1?t.y:e.y:i>0?e.y:t.y}}function jd(t,e,i,o){const a={x:t.cp2x,y:t.cp2y},n={x:e.cp1x,y:e.cp1y},s=Fd(t,a,i),r=Fd(a,n,i),l=Fd(n,e,i),c=Fd(s,r,i),d=Fd(r,l,i);return Fd(c,d,i)}function Wd(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function Bd(t,e){let i,o;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,o=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=o)}function Ud(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Yd(t){return"angle"===t?{between:tc,compare:Ql,normalize:Jl}:{between:ic,compare:(t,e)=>t-e,normalize:t=>t}}function qd({start:t,end:e,count:i,loop:o,style:a}){return{start:t%i,end:e%i,loop:o&&(e-t+1)%i==0,style:a}}function Zd(t,e,i){if(!i)return[t];const{property:o,start:a,end:n}=i,s=e.length,{compare:r,between:l,normalize:c}=Yd(o),{start:d,end:h,loop:u,style:p}=function(t,e,i){const{property:o,start:a,end:n}=i,{between:s,normalize:r}=Yd(o),l=e.length;let c,d,{start:h,end:u,loop:p}=t;if(p){for(h+=l,u+=l,c=0,d=l;c<d&&s(r(e[h%l][o]),a,n);++c)h--,u--;h%=l,u%=l}return u<h&&(u+=l),{start:h,end:u,loop:p,style:t.style}}(t,e,i),m=[];let _,f,g,b=!1,v=null;const y=()=>b||l(a,g,_)&&0!==r(a,g),w=()=>!b||0===r(n,_)||l(n,g,_);for(let t=d,i=d;t<=h;++t)f=e[t%s],f.skip||(_=c(f[o]),_!==g&&(b=l(_,a,n),null===v&&y()&&(v=0===r(_,a)?t:i),null!==v&&w()&&(m.push(qd({start:v,end:t,loop:u,count:s,style:p})),v=null),i=t,g=_));return null!==v&&m.push(qd({start:v,end:h,loop:u,count:s,style:p})),m}function Xd(t,e){const i=[],o=t.segments;for(let a=0;a<o.length;a++){const n=Zd(o[a],t.points,e);n.length&&i.push(...n)}return i}function Kd(t,e,i,o){return o&&o.setContext&&i?function(t,e,i,o){const a=t._chart.getContext(),n=Gd(t.options),{_datasetIndex:s,options:{spanGaps:r}}=t,l=i.length,c=[];let d=n,h=e[0].start,u=h;function p(t,e,o,a){const n=r?-1:1;if(t!==e){for(t+=l;i[t%l].skip;)t-=n;for(;i[e%l].skip;)e+=n;t%l!=e%l&&(c.push({start:t%l,end:e%l,loop:o,style:a}),d=a,h=e%l)}}for(const t of e){h=r?h:t.start;let e,n=i[h%l];for(u=h+1;u<=t.end;u++){const r=i[u%l];e=Gd(o.setContext(nd(a,{type:"segment",p0:n,p1:r,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:s}))),Qd(e,d)&&p(h,u-1,t.loop,d),n=r,d=e}h<u-1&&p(h,u-1,t.loop,d)}return c}(t,e,i,o):e}function Gd(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Qd(t,e){if(!e)return!1;const i=[],o=function(t,e){return vc(e)?(i.includes(e)||i.push(e),i.indexOf(e)):e};return JSON.stringify(t,o)!==JSON.stringify(e,o)}function Jd(t,e,i){return t.options.clip?t[i]:e[i]}function th(t,e){const i=e._clip;if(i.disabled)return!1;const o=function(t,e){const{xScale:i,yScale:o}=t;return i&&o?{left:Jd(i,e,"left"),right:Jd(i,e,"right"),top:Jd(o,e,"top"),bottom:Jd(o,e,"bottom")}:e}(e,t.chartArea);return{left:!1===i.left?0:o.left-(!0===i.left?0:i.left),right:!1===i.right?t.width:o.right+(!0===i.right?0:i.right),top:!1===i.top?0:o.top-(!0===i.top?0:i.top),bottom:!1===i.bottom?t.height:o.bottom+(!0===i.bottom?0:i.bottom)}}class eh{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,o){const a=e.listeners[o],n=e.duration;a.forEach((o=>o({chart:t,initial:e.initial,numSteps:n,currentStep:Math.min(i-e.start,n)})))}_refresh(){this._request||(this._running=!0,this._request=cc.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,o)=>{if(!i.running||!i.items.length)return;const a=i.items;let n,s=a.length-1,r=!1;for(;s>=0;--s)n=a[s],n._active?(n._total>i.duration&&(i.duration=n._total),n.tick(t),r=!0):(a[s]=a[a.length-1],a.pop());r&&(o.draw(),this._notify(o,i,t,"progress")),a.length||(i.running=!1,this._notify(o,i,t,"complete"),i.initial=!1),e+=a.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let o=i.length-1;for(;o>=0;--o)i[o].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var ih=new eh;const oh="transparent",ah={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const o=yc(t||oh),a=o.valid&&yc(e||oh);return a&&a.valid?a.mix(o,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class nh{constructor(t,e,i,o){const a=e[i];o=ad([t.to,o,a,t.from]);const n=ad([t.from,a,o]);this._active=!0,this._fn=t.fn||ah[t.type||typeof n],this._easing=bc[t.easing]||bc.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=n,this._to=o,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const o=this._target[this._prop],a=i-this._start,n=this._duration-a;this._start=i,this._duration=Math.floor(Math.max(n,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=ad([t.to,e,o,t.from]),this._from=ad([t.from,o,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,o=this._prop,a=this._from,n=this._loop,s=this._to;let r;if(this._active=a!==s&&(n||e<i),!this._active)return this._target[o]=s,void this._notify(!0);e<0?this._target[o]=a:(r=e/i%2,r=n&&r>1?2-r:r,r=this._easing(Math.min(1,Math.max(0,r))),this._target[o]=this._fn(a,s,r))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t<i.length;t++)i[t][e]()}}class sh{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!pl(t))return;const e=Object.keys($c.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach((o=>{const a=t[o];if(!pl(a))return;const n={};for(const t of e)n[t]=a[t];(ul(a.properties)&&a.properties||[o]).forEach((t=>{t!==o&&i.has(t)||i.set(t,n)}))}))}_animateOptions(t,e){const i=e.options,o=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!o)return[];const a=this._createAnimations(o,i);return i.$shared&&function(t,e){const i=[],o=Object.keys(e);for(let e=0;e<o.length;e++){const a=t[o[e]];a&&a.active()&&i.push(a.wait())}return Promise.all(i)}(t.options.$animations,i).then((()=>{t.options=i}),(()=>{})),a}_createAnimations(t,e){const i=this._properties,o=[],a=t.$animations||(t.$animations={}),n=Object.keys(e),s=Date.now();let r;for(r=n.length-1;r>=0;--r){const l=n[r];if("$"===l.charAt(0))continue;if("options"===l){o.push(...this._animateOptions(t,e));continue}const c=e[l];let d=a[l];const h=i.get(l);if(d){if(h&&d.active()){d.update(h,c,s);continue}d.cancel()}h&&h.duration?(a[l]=d=new nh(h,t,l,c),o.push(d)):t[l]=c}return o}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(ih.add(this._chart,i),!0):void 0}}function rh(t,e){const i=t&&t.options||{},o=i.reverse,a=void 0===i.min?e:0,n=void 0===i.max?e:0;return{start:o?n:a,end:o?a:n}}function lh(t,e){const i=[],o=t._getSortedDatasetMetas(e);let a,n;for(a=0,n=o.length;a<n;++a)i.push(o[a].index);return i}function ch(t,e,i,o={}){const a=t.keys,n="single"===o.mode;let s,r,l,c;if(null===e)return;let d=!1;for(s=0,r=a.length;s<r;++s){if(l=+a[s],l===i){if(d=!0,o.all)continue;break}c=t.values[l],ml(c)&&(n||0===e||jl(e)===jl(c))&&(e+=c)}return d||o.all?e:0}function dh(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function hh(t,e,i){const o=t[e]||(t[e]={});return o[i]||(o[i]={})}function uh(t,e,i,o){for(const a of e.getMatchingVisibleMetas(o).reverse()){const e=t[a.index];if(i&&e>0||!i&&e<0)return a.index}return null}function ph(t,e){const{chart:i,_cachedMeta:o}=t,a=i._stacks||(i._stacks={}),{iScale:n,vScale:s,index:r}=o,l=n.axis,c=s.axis,d=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(n,s,o),h=e.length;let u;for(let t=0;t<h;++t){const i=e[t],{[l]:n,[c]:h}=i;u=(i._stacks||(i._stacks={}))[c]=hh(a,d,n),u[r]=h,u._top=uh(u,s,!0,o.type),u._bottom=uh(u,s,!1,o.type);(u._visualValues||(u._visualValues={}))[r]=h}}function mh(t,e){const i=t.scales;return Object.keys(i).filter((t=>i[t].axis===e)).shift()}function _h(t,e){const i=t.controller.index,o=t.vScale&&t.vScale.axis;if(o){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[o]||void 0===e[o][i])return;delete e[o][i],void 0!==e[o]._visualValues&&void 0!==e[o]._visualValues[i]&&delete e[o]._visualValues[i]}}}const fh=t=>"reset"===t||"none"===t,gh=(t,e)=>e?t:Object.assign({},t);class bh{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=dh(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&_h(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),o=(t,e,i,o)=>"x"===t?e:"r"===t?o:i,a=e.xAxisID=fl(i.xAxisID,mh(t,"x")),n=e.yAxisID=fl(i.yAxisID,mh(t,"y")),s=e.rAxisID=fl(i.rAxisID,mh(t,"r")),r=e.indexAxis,l=e.iAxisID=o(r,a,n,s),c=e.vAxisID=o(r,n,a,s);e.xScale=this.getScaleForId(a),e.yScale=this.getScaleForId(n),e.rScale=this.getScaleForId(s),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&rc(this._data,this),t._stacked&&_h(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(pl(e)){const t=this._cachedMeta;this._data=function(t,e){const{iScale:i,vScale:o}=e,a="x"===i.axis?"x":"y",n="x"===o.axis?"x":"y",s=Object.keys(t),r=new Array(s.length);let l,c,d;for(l=0,c=s.length;l<c;++l)d=s[l],r[l]={[a]:d,[n]:t[d]};return r}(e,t)}else if(i!==e){if(i){rc(i,this);const t=this._cachedMeta;_h(t),t._parsed=[]}e&&Object.isExtensible(e)&&function(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),sc.forEach((e=>{const i="_onData"+Al(e),o=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){const a=o.apply(this,e);return t._chartjs.listeners.forEach((t=>{"function"==typeof t[i]&&t[i](...e)})),a}})})))}(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let o=!1;this._dataCheck();const a=e._stacked;e._stacked=dh(e.vScale,e),e.stack!==i.stack&&(o=!0,_h(e),e.stack=i.stack),this._resyncElements(t),(o||a!==e._stacked)&&(ph(this,e._parsed),e._stacked=dh(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:o}=this,{iScale:a,_stacked:n}=i,s=a.axis;let r,l,c,d=0===t&&e===o.length||i._sorted,h=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=o,i._sorted=!0,c=o;else{c=ul(o[t])?this.parseArrayData(i,o,t,e):pl(o[t])?this.parseObjectData(i,o,t,e):this.parsePrimitiveData(i,o,t,e);const a=()=>null===l[s]||h&&l[s]<h[s];for(r=0;r<e;++r)i._parsed[r+t]=l=c[r],d&&(a()&&(d=!1),h=l);i._sorted=d}n&&ph(this,c)}parsePrimitiveData(t,e,i,o){const{iScale:a,vScale:n}=t,s=a.axis,r=n.axis,l=a.getLabels(),c=a===n,d=new Array(o);let h,u,p;for(h=0,u=o;h<u;++h)p=h+i,d[h]={[s]:c||a.parse(l[p],p),[r]:n.parse(e[p],p)};return d}parseArrayData(t,e,i,o){const{xScale:a,yScale:n}=t,s=new Array(o);let r,l,c,d;for(r=0,l=o;r<l;++r)c=r+i,d=e[c],s[r]={x:a.parse(d[0],c),y:n.parse(d[1],c)};return s}parseObjectData(t,e,i,o){const{xScale:a,yScale:n}=t,{xAxisKey:s="x",yAxisKey:r="y"}=this._parsing,l=new Array(o);let c,d,h,u;for(c=0,d=o;c<d;++c)h=c+i,u=e[h],l[c]={x:a.parse(Cl(u,s),h),y:n.parse(Cl(u,r),h)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const o=this.chart,a=this._cachedMeta,n=e[t.axis];return ch({keys:lh(o,!0),values:e._stacks[t.axis]._visualValues},n,a.index,{mode:i})}updateRangeFromParsed(t,e,i,o){const a=i[e.axis];let n=null===a?NaN:a;const s=o&&i._stacks[e.axis];o&&s&&(o.values=s,n=ch(o,a,this._cachedMeta.index)),t.min=Math.min(t.min,n),t.max=Math.max(t.max,n)}getMinMax(t,e){const i=this._cachedMeta,o=i._parsed,a=i._sorted&&t===i.iScale,n=o.length,s=this._getOtherScale(t),r=((t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:lh(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:d}=function(t){const{min:e,max:i,minDefined:o,maxDefined:a}=t.getUserBounds();return{min:o?e:Number.NEGATIVE_INFINITY,max:a?i:Number.POSITIVE_INFINITY}}(s);let h,u;function p(){u=o[h];const e=u[s.axis];return!ml(u[t.axis])||c>e||d<e}for(h=0;h<n&&(p()||(this.updateRangeFromParsed(l,t,u,r),!a));++h);if(a)for(h=n-1;h>=0;--h)if(!p()){this.updateRangeFromParsed(l,t,u,r);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let o,a,n;for(o=0,a=e.length;o<a;++o)n=e[o][t.axis],ml(n)&&i.push(n);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,o=e.vScale,a=this.getParsed(t);return{label:i?""+i.getLabelForValue(a[i.axis]):"",value:o?""+o.getLabelForValue(a[o.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,i,o,a;return pl(t)?(e=t.top,i=t.right,o=t.bottom,a=t.left):e=i=o=a=t,{top:e,right:i,bottom:o,left:a,disabled:!1===t}}(fl(this.options.clip,function(t,e,i){if(!1===i)return!1;const o=rh(t,i),a=rh(e,i);return{top:a.end,right:o.end,bottom:a.start,left:o.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,o=i.data||[],a=e.chartArea,n=[],s=this._drawStart||0,r=this._drawCount||o.length-s,l=this.options.drawActiveElementsOnTop;let c;for(i.dataset&&i.dataset.draw(t,a,s,r),c=s;c<s+r;++c){const e=o[c];e.hidden||(e.active&&l?n.push(e):e.draw(t,a))}for(c=0;c<n.length;++c)n[c].draw(t,a)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const o=this.getDataset();let a;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];a=e.$context||(e.$context=function(t,e,i){return nd(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),a.parsed=this.getParsed(t),a.raw=o.data[t],a.index=a.dataIndex=t}else a=this.$context||(this.$context=function(t,e){return nd(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),a.dataset=o,a.index=a.datasetIndex=this.index;return a.active=!!e,a.mode=i,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const o="active"===e,a=this._cachedDataOpts,n=t+"-"+e,s=a[n],r=this.enableOptionSharing&&Pl(i);if(s)return gh(s,r);const l=this.chart.config,c=l.datasetElementScopeKeys(this._type,t),d=o?[`${t}Hover`,"hover",t,""]:[t,""],h=l.getOptionScopes(this.getDataset(),c),u=Object.keys($c.elements[t]),p=l.resolveNamedOptions(h,u,(()=>this.getContext(i,o,e)),d);return p.$shared&&(p.$shared=r,a[n]=Object.freeze(gh(p,r))),p}_resolveAnimations(t,e,i){const o=this.chart,a=this._cachedDataOpts,n=`animation-${e}`,s=a[n];if(s)return s;let r;if(!1!==o.options.animation){const o=this.chart.config,a=o.datasetAnimationScopeKeys(this._type,e),n=o.getOptionScopes(this.getDataset(),a);r=o.createResolver(n,this.getContext(t,i,e))}const l=new sh(o,r&&r.animations);return r&&r._cacheable&&(a[n]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||fh(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),o=this._sharedOptions,a=this.getSharedOptions(i),n=this.includeOptions(e,a)||a!==o;return this.updateSharedOptions(a,e,i),{sharedOptions:a,includeOptions:n}}updateElement(t,e,i,o){fh(o)?Object.assign(t,i):this._resolveAnimations(e,o).update(t,i)}updateSharedOptions(t,e,i){t&&!fh(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,o){t.active=o;const a=this.getStyle(e,o);this._resolveAnimations(e,i,o).update(t,{options:!o&&this.getSharedOptions(a)||a})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const o=i.length,a=e.length,n=Math.min(a,o);n&&this.parse(0,n),a>o?this._insertElements(o,a-o,t):a<o&&this._removeElements(a,o-a)}_insertElements(t,e,i=!0){const o=this._cachedMeta,a=o.data,n=t+e;let s;const r=t=>{for(t.length+=e,s=t.length-1;s>=n;s--)t[s]=t[s-e]};for(r(a),s=t;s<n;++s)a[s]=new this.dataElementType;this._parsing&&r(o._parsed),this.parse(t,e),i&&this.updateElements(a,t,e,"reset")}updateElements(t,e,i,o){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const o=i._parsed.splice(t,e);i._stacked&&_h(i,o)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,o]=t;this[e](i,o)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function vh(t){const e=t.iScale,i=function(t,e){if(!t._cache.$bar){const i=t.getMatchingVisibleMetas(e);let o=[];for(let e=0,a=i.length;e<a;e++)o=o.concat(i[e].controller.getAllParsedValues(t));t._cache.$bar=lc(o.sort(((t,e)=>t-e)))}return t._cache.$bar}(e,t.type);let o,a,n,s,r=e._length;const l=()=>{32767!==n&&-32768!==n&&(Pl(s)&&(r=Math.min(r,Math.abs(n-s)||r)),s=n)};for(o=0,a=i.length;o<a;++o)n=e.getPixelForValue(i[o]),l();for(s=void 0,o=0,a=e.ticks.length;o<a;++o)n=e.getPixelForTick(o),l();return r}function yh(t,e,i,o){return ul(t)?function(t,e,i,o){const a=i.parse(t[0],o),n=i.parse(t[1],o),s=Math.min(a,n),r=Math.max(a,n);let l=s,c=r;Math.abs(s)>Math.abs(r)&&(l=r,c=s),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:a,end:n,min:s,max:r}}(t,e,i,o):e[i.axis]=i.parse(t,o),e}function wh(t,e,i,o){const a=t.iScale,n=t.vScale,s=a.getLabels(),r=a===n,l=[];let c,d,h,u;for(c=i,d=i+o;c<d;++c)u=e[c],h={},h[a.axis]=r||a.parse(s[c],c),l.push(yh(u,h,n,c));return l}function xh(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function kh(t,e,i,o){let a=e.borderSkipped;const n={};if(!a)return void(t.borderSkipped=n);if(!0===a)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:s,end:r,reverse:l,top:c,bottom:d}=function(t){let e,i,o,a,n;return t.horizontal?(e=t.base>t.x,i="left",o="right"):(e=t.base<t.y,i="bottom",o="top"),e?(a="end",n="start"):(a="start",n="end"),{start:i,end:o,reverse:e,top:a,bottom:n}}(t);"middle"===a&&i&&(t.enableBorderRadius=!0,(i._top||0)===o?a=c:(i._bottom||0)===o?a=d:(n[Sh(d,s,r,l)]=!0,a=c)),n[Sh(a,s,r,l)]=!0,t.borderSkipped=n}function Sh(t,e,i,o){var a,n,s;return o?(s=i,t=Th(t=(a=t)===(n=e)?s:a===s?n:a,i,e)):t=Th(t,e,i),t}function Th(t,e,i){return"start"===t?e:"end"===t?i:t}function Mh(t,{inflateAmount:e},i){t.inflateAmount="auto"===e?1===i?.33:0:e}class Dh extends bh{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,i,o){return wh(t,e,i,o)}parseArrayData(t,e,i,o){return wh(t,e,i,o)}parseObjectData(t,e,i,o){const{iScale:a,vScale:n}=t,{xAxisKey:s="x",yAxisKey:r="y"}=this._parsing,l="x"===a.axis?s:r,c="x"===n.axis?s:r,d=[];let h,u,p,m;for(h=i,u=i+o;h<u;++h)m=e[h],p={},p[a.axis]=a.parse(Cl(m,l),h),d.push(yh(Cl(m,c),p,n,h));return d}updateRangeFromParsed(t,e,i,o){super.updateRangeFromParsed(t,e,i,o);const a=i._custom;a&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:o}=e,a=this.getParsed(t),n=a._custom,s=xh(n)?"["+n.start+", "+n.end+"]":""+o.getLabelForValue(a[o.axis]);return{label:""+i.getLabelForValue(a[i.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,o){const a="reset"===o,{index:n,_cachedMeta:{vScale:s}}=this,r=s.getBasePixel(),l=s.isHorizontal(),c=this._getRuler(),{sharedOptions:d,includeOptions:h}=this._getSharedOptions(e,o);for(let u=e;u<e+i;u++){const e=this.getParsed(u),i=a||hl(e[s.axis])?{base:r,head:r}:this._calculateBarValuePixels(u),p=this._calculateBarIndexPixels(u,c),m=(e._stacks||{})[s.axis],_={horizontal:l,base:i.base,enableBorderRadius:!m||xh(e._custom)||n===m._top||n===m._bottom,x:l?i.head:p.center,y:l?p.center:i.head,height:l?p.size:Math.abs(i.size),width:l?Math.abs(i.size):p.size};h&&(_.options=d||this.resolveDataElementOptions(u,t[u].active?"active":o));const f=_.options||t[u].options;kh(_,f,m,n),Mh(_,f,c.ratio),this.updateElement(t[u],u,_,o)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,o=i.getMatchingVisibleMetas(this._type).filter((t=>t.controller.options.grouped)),a=i.options.stacked,n=[],s=this._cachedMeta.controller.getParsed(e),r=s&&s[i.axis],l=t=>{const e=t._parsed.find((t=>t[i.axis]===r)),o=e&&e[t.vScale.axis];if(hl(o)||isNaN(o))return!0};for(const i of o)if((void 0===e||!l(i))&&((!1===a||-1===n.indexOf(i.stack)||void 0===a&&void 0===i.stack)&&n.push(i.stack),i.index===t))break;return n.length||n.push(void 0),n}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter((i=>t[i].axis===e)).shift()}_getAxis(){const t={},e=this.getFirstScaleIdForIndexAxis();for(const i of this.chart.data.datasets)t[fl("x"===this.chart.options.indexAxis?i.xAxisID:i.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,i){const o=this._getStacks(t,i),a=void 0!==e?o.indexOf(e):-1;return-1===a?o.length-1:a}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,o=[];let a,n;for(a=0,n=e.data.length;a<n;++a)o.push(i.getPixelForValue(this.getParsed(a)[i.axis],a));const s=t.barThickness;return{min:s||vh(e),pixels:o,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:s?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:o},options:{base:a,minBarLength:n}}=this,s=a||0,r=this.getParsed(t),l=r._custom,c=xh(l);let d,h,u=r[e.axis],p=0,m=i?this.applyStack(e,r,i):u;m!==u&&(p=m-u,m=u),c&&(u=l.barStart,m=l.barEnd-l.barStart,0!==u&&jl(u)!==jl(l.barEnd)&&(p=0),p+=u);const _=hl(a)||c?p:a;let f=e.getPixelForValue(_);if(d=this.chart.getDataVisibility(t)?e.getPixelForValue(p+m):f,h=d-f,Math.abs(h)<n){h=function(t,e,i){return 0!==t?jl(t):(e.isHorizontal()?1:-1)*(e.min>=i?1:-1)}(h,e,s)*n,u===s&&(f-=h/2);const t=e.getPixelForDecimal(0),a=e.getPixelForDecimal(1),l=Math.min(t,a),p=Math.max(t,a);f=Math.max(Math.min(f,p),l),d=f+h,i&&!c&&(r._stacks[e.axis]._visualValues[o]=e.getValueForPixel(d)-e.getValueForPixel(f))}if(f===e.getPixelForValue(s)){const t=jl(h)*e.getLineWidthForValue(s)/2;f+=t,h-=t}return{size:h,base:f,head:d,center:d+h/2}}_calculateBarIndexPixels(t,e){const i=e.scale,o=this.options,a=o.skipNull,n=fl(o.maxBarThickness,1/0);let s,r;const l=this._getAxisCount();if(e.grouped){const i=a?this._getStackCount(t):e.stackCount,c="flex"===o.barThickness?function(t,e,i,o){const a=e.pixels,n=a[t];let s=t>0?a[t-1]:null,r=t<a.length-1?a[t+1]:null;const l=i.categoryPercentage;null===s&&(s=n-(null===r?e.end-e.start:r-n)),null===r&&(r=n+n-s);const c=n-(n-Math.min(s,r))/2*l;return{chunk:Math.abs(r-s)/2*l/o,ratio:i.barPercentage,start:c}}(t,e,o,i*l):function(t,e,i,o){const a=i.barThickness;let n,s;return hl(a)?(n=e.min*i.categoryPercentage,s=i.barPercentage):(n=a*o,s=1),{chunk:n/o,ratio:s,start:e.pixels[t]-n/2}}(t,e,o,i*l),d="x"===this.chart.options.indexAxis?this.getDataset().xAxisID:this.getDataset().yAxisID,h=this._getAxis().indexOf(fl(d,this.getFirstScaleIdForIndexAxis())),u=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0)+h;s=c.start+c.chunk*u+c.chunk/2,r=Math.min(n,c.chunk*c.ratio)}else s=i.getPixelForValue(this.getParsed(t)[i.axis],t),r=Math.min(n,e.min*e.ratio);return{base:s-r/2,head:s+r/2,center:s,size:r}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,o=i.length;let a=0;for(;a<o;++a)null===this.getParsed(a)[e.axis]||i[a].hidden||i[a].draw(this._ctx)}}class Ch extends bh{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,o){const a=super.parsePrimitiveData(t,e,i,o);for(let t=0;t<a.length;t++)a[t]._custom=this.resolveDataElementOptions(t+i).radius;return a}parseArrayData(t,e,i,o){const a=super.parseArrayData(t,e,i,o);for(let t=0;t<a.length;t++){const o=e[i+t];a[t]._custom=fl(o[2],this.resolveDataElementOptions(t+i).radius)}return a}parseObjectData(t,e,i,o){const a=super.parseObjectData(t,e,i,o);for(let t=0;t<a.length;t++){const o=e[i+t];a[t]._custom=fl(o&&o.r&&+o.r,this.resolveDataElementOptions(t+i).radius)}return a}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:o,yScale:a}=e,n=this.getParsed(t),s=o.getLabelForValue(n.x),r=a.getLabelForValue(n.y),l=n._custom;return{label:i[t]||"",value:"("+s+", "+r+(l?", "+l:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,o){const a="reset"===o,{iScale:n,vScale:s}=this._cachedMeta,{sharedOptions:r,includeOptions:l}=this._getSharedOptions(e,o),c=n.axis,d=s.axis;for(let h=e;h<e+i;h++){const e=t[h],i=!a&&this.getParsed(h),u={},p=u[c]=a?n.getPixelForDecimal(.5):n.getPixelForValue(i[c]),m=u[d]=a?s.getBasePixel():s.getPixelForValue(i[d]);u.skip=isNaN(p)||isNaN(m),l&&(u.options=r||this.resolveDataElementOptions(h,e.active?"active":o),a&&(u.options.radius=0)),this.updateElement(e,h,u,o)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let o=super.resolveDataElementOptions(t,e);o.$shared&&(o=Object.assign({},o,{$shared:!1}));const a=o.radius;return"active"!==e&&(o.radius=0),o.radius+=fl(i&&i._custom,a),o}}class Ah extends bh{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data,{labels:{pointStyle:i,textAlign:o,color:a,useBorderRadius:n,borderRadius:s}}=t.legend.options;return e.labels.length&&e.datasets.length?e.labels.map(((e,r)=>{const l=t.getDatasetMeta(0).controller.getStyle(r);return{text:e,fillStyle:l.backgroundColor,fontColor:a,hidden:!t.getDataVisibility(r),lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:l.borderWidth,strokeStyle:l.borderColor,textAlign:o,pointStyle:i,borderRadius:n&&(s||l.borderRadius),index:r}})):[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,o=this._cachedMeta;if(!1===this._parsing)o._parsed=i;else{let a,n,s=t=>+i[t];if(pl(i[t])){const{key:t="value"}=this._parsing;s=e=>+Cl(i[e],t)}for(a=t,n=t+e;a<n;++a)o._parsed[a]=s(a)}}_getRotation(){return ql(this.options.rotation-90)}_getCircumference(){return ql(this.options.circumference)}_getRotationExtents(){let t=zl,e=-zl;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const o=this.chart.getDatasetMeta(i).controller,a=o._getRotation(),n=o._getCircumference();t=Math.min(t,a),e=Math.max(e,a+n)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,o=this._cachedMeta,a=o.data,n=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,s=Math.max((Math.min(i.width,i.height)-n)/2,0),r=Math.min((l=this.options.cutout,c=s,"string"==typeof l&&l.endsWith("%")?parseFloat(l)/100:+l/c),1);var l,c;const d=this._getRingWeight(this.index),{circumference:h,rotation:u}=this._getRotationExtents(),{ratioX:p,ratioY:m,offsetX:_,offsetY:f}=function(t,e,i){let o=1,a=1,n=0,s=0;if(e<zl){const r=t,l=r+e,c=Math.cos(r),d=Math.sin(r),h=Math.cos(l),u=Math.sin(l),p=(t,e,o)=>tc(t,r,l,!0)?1:Math.max(e,e*i,o,o*i),m=(t,e,o)=>tc(t,r,l,!0)?-1:Math.min(e,e*i,o,o*i),_=p(0,c,h),f=p(Il,d,u),g=m($l,c,h),b=m($l+Il,d,u);o=(_-g)/2,a=(f-b)/2,n=-(_+g)/2,s=-(f+b)/2}return{ratioX:o,ratioY:a,offsetX:n,offsetY:s}}(u,h,r),g=(i.width-n)/p,b=(i.height-n)/m,v=Math.max(Math.min(g,b)/2,0),y=gl(this.options.radius,v),w=(y-Math.max(y*r,0))/this._getVisibleDatasetWeightTotal();this.offsetX=_*y,this.offsetY=f*y,o.total=this.calculateTotal(),this.outerRadius=y-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*d,0),this.updateElements(a,0,a.length,t)}_circumference(t,e){const i=this.options,o=this._cachedMeta,a=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===o._parsed[t]||o.data[t].hidden?0:this.calculateCircumference(o._parsed[t]*a/zl)}updateElements(t,e,i,o){const a="reset"===o,n=this.chart,s=n.chartArea,r=n.options.animation,l=(s.left+s.right)/2,c=(s.top+s.bottom)/2,d=a&&r.animateScale,h=d?0:this.innerRadius,u=d?0:this.outerRadius,{sharedOptions:p,includeOptions:m}=this._getSharedOptions(e,o);let _,f=this._getRotation();for(_=0;_<e;++_)f+=this._circumference(_,a);for(_=e;_<e+i;++_){const e=this._circumference(_,a),i=t[_],n={x:l+this.offsetX,y:c+this.offsetY,startAngle:f,endAngle:f+e,circumference:e,outerRadius:u,innerRadius:h};m&&(n.options=p||this.resolveDataElementOptions(_,i.active?"active":o)),f+=e,this.updateElement(i,_,n,o)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,o=0;for(i=0;i<e.length;i++){const a=t._parsed[i];null===a||isNaN(a)||!this.chart.getDataVisibility(i)||e[i].hidden||(o+=Math.abs(a))}return o}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?zl*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,o=i.data.labels||[],a=Tc(e._parsed[t],i.options.locale);return{label:o[t]||"",value:a}}getMaxBorderWidth(t){let e=0;const i=this.chart;let o,a,n,s,r;if(!t)for(o=0,a=i.data.datasets.length;o<a;++o)if(i.isDatasetVisible(o)){n=i.getDatasetMeta(o),t=n.data,s=n.controller;break}if(!t)return 0;for(o=0,a=t.length;o<a;++o)r=s.resolveDataElementOptions(o),"inner"!==r.borderAlign&&(e=Math.max(e,r.borderWidth||0,r.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,o=t.length;i<o;++i){const t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(fl(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class Ph extends bh{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:o=[],_dataset:a}=e,n=this.chart._animationsDisabled;let{start:s,count:r}=pc(e,o,n);this._drawStart=s,this._drawCount=r,mc(e)&&(s=0,r=o.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!a._decimated,i.points=o;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!n,options:l},t),this.updateElements(o,s,r,t)}updateElements(t,e,i,o){const a="reset"===o,{iScale:n,vScale:s,_stacked:r,_dataset:l}=this._cachedMeta,{sharedOptions:c,includeOptions:d}=this._getSharedOptions(e,o),h=n.axis,u=s.axis,{spanGaps:p,segment:m}=this.options,_=Ul(p)?p:Number.POSITIVE_INFINITY,f=this.chart._animationsDisabled||a||"none"===o,g=e+i,b=t.length;let v=e>0&&this.getParsed(e-1);for(let i=0;i<b;++i){const p=t[i],b=f?p:{};if(i<e||i>=g){b.skip=!0;continue}const y=this.getParsed(i),w=hl(y[u]),x=b[h]=n.getPixelForValue(y[h],i),k=b[u]=a||w?s.getBasePixel():s.getPixelForValue(r?this.applyStack(s,y,r):y[u],i);b.skip=isNaN(x)||isNaN(k)||w,b.stop=i>0&&Math.abs(y[h]-v[h])>_,m&&(b.parsed=y,b.raw=l.data[i]),d&&(b.options=c||this.resolveDataElementOptions(i,p.active?"active":o)),f||this.updateElement(p,i,b,o),v=y}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,o=t.data||[];if(!o.length)return i;const a=o[0].size(this.resolveDataElementOptions(0)),n=o[o.length-1].size(this.resolveDataElementOptions(o.length-1));return Math.max(i,a,n)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}class Eh extends bh{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:o}}=t.legend.options;return e.labels.map(((e,a)=>{const n=t.getDatasetMeta(0).controller.getStyle(a);return{text:e,fillStyle:n.backgroundColor,strokeStyle:n.borderColor,fontColor:o,lineWidth:n.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(a),index:a}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,o=i.data.labels||[],a=Tc(e._parsed[t].r,i.options.locale);return{label:o[t]||"",value:a}}parseObjectData(t,e,i,o){return vd.bind(this)(t,e,i,o)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach(((t,i)=>{const o=this.getParsed(i).r;!isNaN(o)&&this.chart.getDataVisibility(i)&&(o<e.min&&(e.min=o),o>e.max&&(e.max=o))})),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,o=Math.min(e.right-e.left,e.bottom-e.top),a=Math.max(o/2,0),n=(a-Math.max(i.cutoutPercentage?a/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=a-n*this.index,this.innerRadius=this.outerRadius-n}updateElements(t,e,i,o){const a="reset"===o,n=this.chart,s=n.options.animation,r=this._cachedMeta.rScale,l=r.xCenter,c=r.yCenter,d=r.getIndexAngle(0)-.5*$l;let h,u=d;const p=360/this.countVisibleElements();for(h=0;h<e;++h)u+=this._computeAngle(h,o,p);for(h=e;h<e+i;h++){const e=t[h];let i=u,m=u+this._computeAngle(h,o,p),_=n.getDataVisibility(h)?r.getDistanceFromCenterForValue(this.getParsed(h).r):0;u=m,a&&(s.animateScale&&(_=0),s.animateRotate&&(i=m=d));const f={x:l,y:c,innerRadius:0,outerRadius:_,startAngle:i,endAngle:m,options:this.resolveDataElementOptions(h,e.active?"active":o)};this.updateElement(e,h,f,o)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach(((t,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++})),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?ql(this.resolveDataElementOptions(t,e).angle||i):0}}class Lh extends Ah{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}class $h extends bh{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,o){return vd.bind(this)(t,e,i,o)}update(t){const e=this._cachedMeta,i=e.dataset,o=e.data||[],a=e.iScale.getLabels();if(i.points=o,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const n={_loop:!0,_fullLoop:a.length===o.length,options:e};this.updateElement(i,void 0,n,t)}this.updateElements(o,0,o.length,t)}updateElements(t,e,i,o){const a=this._cachedMeta.rScale,n="reset"===o;for(let s=e;s<e+i;s++){const e=t[s],i=this.resolveDataElementOptions(s,e.active?"active":o),r=a.getPointPositionForValue(s,this.getParsed(s).r),l=n?a.xCenter:r.x,c=n?a.yCenter:r.y,d={x:l,y:c,angle:r.angle,skip:isNaN(l)||isNaN(c),options:i};this.updateElement(e,s,d,o)}}}class zh extends bh{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:o,yScale:a}=e,n=this.getParsed(t),s=o.getLabelForValue(n.x),r=a.getLabelForValue(n.y);return{label:i[t]||"",value:"("+s+", "+r+")"}}update(t){const e=this._cachedMeta,{data:i=[]}=e,o=this.chart._animationsDisabled;let{start:a,count:n}=pc(e,i,o);if(this._drawStart=a,this._drawCount=n,mc(e)&&(a=0,n=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:a,_dataset:n}=e;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!n._decimated,a.points=i;const s=this.resolveDatasetElementOptions(t);s.segment=this.options.segment,this.updateElement(a,void 0,{animated:!o,options:s},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(i,a,n,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,o){const a="reset"===o,{iScale:n,vScale:s,_stacked:r,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,o),d=this.getSharedOptions(c),h=this.includeOptions(o,d),u=n.axis,p=s.axis,{spanGaps:m,segment:_}=this.options,f=Ul(m)?m:Number.POSITIVE_INFINITY,g=this.chart._animationsDisabled||a||"none"===o;let b=e>0&&this.getParsed(e-1);for(let c=e;c<e+i;++c){const e=t[c],i=this.getParsed(c),m=g?e:{},v=hl(i[p]),y=m[u]=n.getPixelForValue(i[u],c),w=m[p]=a||v?s.getBasePixel():s.getPixelForValue(r?this.applyStack(s,i,r):i[p],c);m.skip=isNaN(y)||isNaN(w)||v,m.stop=c>0&&Math.abs(i[u]-b[u])>f,_&&(m.parsed=i,m.raw=l.data[c]),h&&(m.options=d||this.resolveDataElementOptions(c,e.active?"active":o)),g||this.updateElement(e,c,m,o),b=i}this.updateSharedOptions(d,o,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}const i=t.dataset,o=i.options&&i.options.borderWidth||0;if(!e.length)return o;const a=e[0].size(this.resolveDataElementOptions(0)),n=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(o,a,n)/2}}var Oh=Object.freeze({__proto__:null,BarController:Dh,BubbleController:Ch,DoughnutController:Ah,LineController:Ph,PieController:Lh,PolarAreaController:Eh,RadarController:$h,ScatterController:zh});function Vh(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Hh{static override(t){Object.assign(Hh.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return Vh()}parse(){return Vh()}format(){return Vh()}add(){return Vh()}diff(){return Vh()}startOf(){return Vh()}endOf(){return Vh()}}var Ih={_date:Hh};function Rh(t,e,i,o){const{controller:a,data:n,_sorted:s}=t,r=a._cachedMeta.iScale,l=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(r&&e===r.axis&&"r"!==e&&s&&n.length){const s=r._reversePixels?nc:ac;if(!o){const o=s(n,e,i);if(l){const{vScale:e}=a._cachedMeta,{_parsed:i}=t,n=i.slice(0,o.lo+1).reverse().findIndex((t=>!hl(t[e.axis])));o.lo-=Math.max(0,n);const s=i.slice(o.hi).findIndex((t=>!hl(t[e.axis])));o.hi+=Math.max(0,s)}return o}if(a._sharedOptions){const t=n[0],o="function"==typeof t.getRange&&t.getRange(e);if(o){const t=s(n,e,i-o),a=s(n,e,i+o);return{lo:t.lo,hi:a.hi}}}}return{lo:0,hi:n.length-1}}function Fh(t,e,i,o,a){const n=t.getSortedVisibleDatasetMetas(),s=i[e];for(let t=0,i=n.length;t<i;++t){const{index:i,data:r}=n[t],{lo:l,hi:c}=Rh(n[t],e,s,a);for(let t=l;t<=c;++t){const e=r[t];e.skip||o(e,i,t)}}}function Nh(t,e,i,o,a){const n=[];if(!a&&!t.isPointInArea(e))return n;return Fh(t,i,e,(function(i,s,r){(a||Fc(i,t.chartArea,0))&&i.inRange(e.x,e.y,o)&&n.push({element:i,datasetIndex:s,index:r})}),!0),n}function jh(t,e,i,o,a,n){let s=[];const r=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,o){const a=e?Math.abs(t.x-o.x):0,n=i?Math.abs(t.y-o.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(n,2))}}(i);let l=Number.POSITIVE_INFINITY;return Fh(t,i,e,(function(i,c,d){const h=i.inRange(e.x,e.y,a);if(o&&!h)return;const u=i.getCenterPoint(a);if(!(!!n||t.isPointInArea(u))&&!h)return;const p=r(e,u);p<l?(s=[{element:i,datasetIndex:c,index:d}],l=p):p===l&&s.push({element:i,datasetIndex:c,index:d})})),s}function Wh(t,e,i,o,a,n){return n||t.isPointInArea(e)?"r"!==i||o?jh(t,e,i,o,a,n):function(t,e,i,o){let a=[];return Fh(t,i,e,(function(t,i,n){const{startAngle:s,endAngle:r}=t.getProps(["startAngle","endAngle"],o),{angle:l}=Kl(t,{x:e.x,y:e.y});tc(l,s,r)&&a.push({element:t,datasetIndex:i,index:n})})),a}(t,e,i,a):[]}function Bh(t,e,i,o,a){const n=[],s="x"===i?"inXRange":"inYRange";let r=!1;return Fh(t,i,e,((t,o,l)=>{t[s]&&t[s](e[i],a)&&(n.push({element:t,datasetIndex:o,index:l}),r=r||t.inRange(e.x,e.y,a))})),o&&!r?[]:n}var Uh={evaluateInteractionItems:Fh,modes:{index(t,e,i,o){const a=zd(e,t),n=i.axis||"x",s=i.includeInvisible||!1,r=i.intersect?Nh(t,a,n,o,s):Wh(t,a,n,!1,o,s),l=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=r[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})})),l):[]},dataset(t,e,i,o){const a=zd(e,t),n=i.axis||"xy",s=i.includeInvisible||!1;let r=i.intersect?Nh(t,a,n,o,s):Wh(t,a,n,!1,o,s);if(r.length>0){const e=r[0].datasetIndex,i=t.getDatasetMeta(e).data;r=[];for(let t=0;t<i.length;++t)r.push({element:i[t],datasetIndex:e,index:t})}return r},point:(t,e,i,o)=>Nh(t,zd(e,t),i.axis||"xy",o,i.includeInvisible||!1),nearest(t,e,i,o){const a=zd(e,t),n=i.axis||"xy",s=i.includeInvisible||!1;return Wh(t,a,n,i.intersect,o,s)},x:(t,e,i,o)=>Bh(t,zd(e,t),"x",i.intersect,o),y:(t,e,i,o)=>Bh(t,zd(e,t),"y",i.intersect,o)}};const Yh=["left","top","right","bottom"];function qh(t,e){return t.filter((t=>t.pos===e))}function Zh(t,e){return t.filter((t=>-1===Yh.indexOf(t.pos)&&t.box.axis===e))}function Xh(t,e){return t.sort(((t,i)=>{const o=e?i:t,a=e?t:i;return o.weight===a.weight?o.index-a.index:o.weight-a.weight}))}function Kh(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:o,stackWeight:a}=i;if(!t||!Yh.includes(o))continue;const n=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});n.count++,n.weight+=a}return e}(t),{vBoxMaxWidth:o,hBoxMaxHeight:a}=e;let n,s,r;for(n=0,s=t.length;n<s;++n){r=t[n];const{fullSize:s}=r.box,l=i[r.stack],c=l&&r.stackWeight/l.weight;r.horizontal?(r.width=c?c*o:s&&e.availableWidth,r.height=a):(r.width=o,r.height=c?c*a:s&&e.availableHeight)}return i}function Gh(t,e,i,o){return Math.max(t[i],e[i])+Math.max(t[o],e[o])}function Qh(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Jh(t,e,i,o){const{pos:a,box:n}=i,s=t.maxPadding;if(!pl(a)){i.size&&(t[a]-=i.size);const e=o[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?n.height:n.width),i.size=e.size/e.count,t[a]+=i.size}n.getPadding&&Qh(s,n.getPadding());const r=Math.max(0,e.outerWidth-Gh(s,t,"left","right")),l=Math.max(0,e.outerHeight-Gh(s,t,"top","bottom")),c=r!==t.w,d=l!==t.h;return t.w=r,t.h=l,i.horizontal?{same:c,other:d}:{same:d,other:c}}function tu(t,e){const i=e.maxPadding;function o(t){const o={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{o[t]=Math.max(e[t],i[t])})),o}return o(t?["left","right"]:["top","bottom"])}function eu(t,e,i,o){const a=[];let n,s,r,l,c,d;for(n=0,s=t.length,c=0;n<s;++n){r=t[n],l=r.box,l.update(r.width||e.w,r.height||e.h,tu(r.horizontal,e));const{same:s,other:h}=Jh(e,i,r,o);c|=s&&a.length,d=d||h,l.fullSize||a.push(r)}return c&&eu(a,e,i,o)||d}function iu(t,e,i,o,a){t.top=i,t.left=e,t.right=e+o,t.bottom=i+a,t.width=o,t.height=a}function ou(t,e,i,o){const a=i.padding;let{x:n,y:s}=e;for(const r of t){const t=r.box,l=o[r.stack]||{placed:0,weight:1},c=r.stackWeight/l.weight||1;if(r.horizontal){const o=e.w*c,n=l.size||t.height;Pl(l.start)&&(s=l.start),t.fullSize?iu(t,a.left,s,i.outerWidth-a.right-a.left,n):iu(t,e.left+l.placed,s,o,n),l.start=s,l.placed+=o,s=t.bottom}else{const o=e.h*c,s=l.size||t.width;Pl(l.start)&&(n=l.start),t.fullSize?iu(t,n,a.top,s,i.outerHeight-a.bottom-a.top):iu(t,n,e.top+l.placed,s,o),l.start=n,l.placed+=o,n=t.right}}e.x=n,e.y=s}var au={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,o){if(!t)return;const a=id(t.options.layout.padding),n=Math.max(e-a.width,0),s=Math.max(i-a.height,0),r=function(t){const e=function(t){const e=[];let i,o,a,n,s,r;for(i=0,o=(t||[]).length;i<o;++i)a=t[i],({position:n,options:{stack:s,stackWeight:r=1}}=a),e.push({index:i,box:a,pos:n,horizontal:a.isHorizontal(),weight:a.weight,stack:s&&n+s,stackWeight:r});return e}(t),i=Xh(e.filter((t=>t.box.fullSize)),!0),o=Xh(qh(e,"left"),!0),a=Xh(qh(e,"right")),n=Xh(qh(e,"top"),!0),s=Xh(qh(e,"bottom")),r=Zh(e,"x"),l=Zh(e,"y");return{fullSize:i,leftAndTop:o.concat(n),rightAndBottom:a.concat(l).concat(s).concat(r),chartArea:qh(e,"chartArea"),vertical:o.concat(a).concat(l),horizontal:n.concat(s).concat(r)}}(t.boxes),l=r.vertical,c=r.horizontal;vl(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const d=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,h=Object.freeze({outerWidth:e,outerHeight:i,padding:a,availableWidth:n,availableHeight:s,vBoxMaxWidth:n/2/d,hBoxMaxHeight:s/2}),u=Object.assign({},a);Qh(u,id(o));const p=Object.assign({maxPadding:u,w:n,h:s,x:a.left,y:a.top},a),m=Kh(l.concat(c),h);eu(r.fullSize,p,h,m),eu(l,p,h,m),eu(c,p,h,m)&&eu(l,p,h,m),function(t){const e=t.maxPadding;function i(i){const o=Math.max(e[i]-t[i],0);return t[i]+=o,o}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(p),ou(r.leftAndTop,p,h,m),p.x+=p.w,p.y+=p.h,ou(r.rightAndBottom,p,h,m),t.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},vl(r.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})}))}};class nu{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,o){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,o?Math.floor(e/o):i)}}isAttached(t){return!0}updateConfig(t){}}class su extends nu{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const ru="$chartjs",lu={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},cu=t=>null===t||""===t;const du=!!Id&&{passive:!0};function hu(t,e,i){t&&t.canvas&&t.canvas.removeEventListener(e,i,du)}function uu(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function pu(t,e,i){const o=t.canvas,a=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||uu(i.addedNodes,o),e=e&&!uu(i.removedNodes,o);e&&i()}));return a.observe(document,{childList:!0,subtree:!0}),a}function mu(t,e,i){const o=t.canvas,a=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||uu(i.removedNodes,o),e=e&&!uu(i.addedNodes,o);e&&i()}));return a.observe(document,{childList:!0,subtree:!0}),a}const _u=new Map;let fu=0;function gu(){const t=window.devicePixelRatio;t!==fu&&(fu=t,_u.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function bu(t,e,i){const o=t.canvas,a=o&&Cd(o);if(!a)return;const n=dc(((t,e)=>{const o=a.clientWidth;i(t,e),o<a.clientWidth&&i()}),window),s=new ResizeObserver((t=>{const e=t[0],i=e.contentRect.width,o=e.contentRect.height;0===i&&0===o||n(i,o)}));return s.observe(a),function(t,e){_u.size||window.addEventListener("resize",gu),_u.set(t,e)}(t,n),s}function vu(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){_u.delete(t),_u.size||window.removeEventListener("resize",gu)}(t)}function yu(t,e,i){const o=t.canvas,a=dc((e=>{null!==t.ctx&&i(function(t,e){const i=lu[t.type]||t.type,{x:o,y:a}=zd(t,e);return{type:i,chart:e,native:t,x:void 0!==o?o:null,y:void 0!==a?a:null}}(e,t))}),t);return function(t,e,i){t&&t.addEventListener(e,i,du)}(o,e,a),a}class wu extends nu{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,o=t.getAttribute("height"),a=t.getAttribute("width");if(t[ru]={initial:{height:o,width:a,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",cu(a)){const e=Rd(t,"width");void 0!==e&&(t.width=e)}if(cu(o))if(""===t.style.height)t.height=t.width/(e||2);else{const e=Rd(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[ru])return!1;const i=e[ru].initial;["height","width"].forEach((t=>{const o=i[t];hl(o)?e.removeAttribute(t):e.setAttribute(t,o)}));const o=i.style||{};return Object.keys(o).forEach((t=>{e.style[t]=o[t]})),e.width=e.width,delete e[ru],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const o=t.$proxies||(t.$proxies={}),a={attach:pu,detach:mu,resize:bu}[e]||yu;o[e]=a(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),o=i[e];if(!o)return;({attach:vu,detach:vu,resize:vu}[e]||hu)(t,e,o),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,o){return Vd(t,e,i,o)}isAttached(t){const e=t&&Cd(t);return!(!e||!e.isConnected)}}function xu(t){return!Dd()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?su:wu}class ku{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return Ul(this.x)&&Ul(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const o={};return t.forEach((t=>{o[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),o}}function Su(t,e){const i=t.options.ticks,o=function(t){const e=t.options.offset,i=t._tickSize(),o=t._length/i+(e?0:1),a=t._maxLength/i;return Math.floor(Math.min(o,a))}(t),a=Math.min(i.maxTicksLimit||o,o),n=i.major.enabled?function(t){const e=[];let i,o;for(i=0,o=t.length;i<o;i++)t[i].major&&e.push(i);return e}(e):[],s=n.length,r=n[0],l=n[s-1],c=[];if(s>a)return function(t,e,i,o){let a,n=0,s=i[0];for(o=Math.ceil(o),a=0;a<t.length;a++)a===s&&(e.push(t[a]),n++,s=i[n*o])}(e,c,n,s/a),c;const d=function(t,e,i){const o=function(t){const e=t.length;let i,o;if(e<2)return!1;for(o=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==o)return!1;return o}(t),a=e.length/i;if(!o)return Math.max(a,1);const n=function(t){const e=[],i=Math.sqrt(t);let o;for(o=1;o<i;o++)t%o==0&&(e.push(o),e.push(t/o));return i===(0|i)&&e.push(i),e.sort(((t,e)=>t-e)).pop(),e}(o);for(let t=0,e=n.length-1;t<e;t++){const e=n[t];if(e>a)return e}return Math.max(a,1)}(n,e,a);if(s>0){let t,i;const o=s>1?Math.round((l-r)/(s-1)):null;for(Tu(e,c,d,hl(o)?0:r-o,r),t=0,i=s-1;t<i;t++)Tu(e,c,d,n[t],n[t+1]);return Tu(e,c,d,l,hl(o)?e.length:l+o),c}return Tu(e,c,d),c}function Tu(t,e,i,o,a){const n=fl(o,0),s=Math.min(fl(a,t.length),t.length);let r,l,c,d=0;for(i=Math.ceil(i),a&&(r=a-o,i=r/Math.floor(r/i)),c=n;c<0;)d++,c=Math.round(n+d*i);for(l=Math.max(n,0);l<s;l++)l===c&&(e.push(t[l]),d++,c=Math.round(n+d*i))}const Mu=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i,Du=(t,e)=>Math.min(e||t,t);function Cu(t,e){const i=[],o=t.length/e,a=t.length;let n=0;for(;n<a;n+=o)i.push(t[Math.floor(n)]);return i}function Au(t,e,i){const o=t.ticks.length,a=Math.min(e,o-1),n=t._startPixel,s=t._endPixel,r=1e-6;let l,c=t.getPixelForTick(a);if(!(i&&(l=1===o?Math.max(c-n,s-c):0===e?(t.getPixelForTick(1)-c)/2:(c-t.getPixelForTick(a-1))/2,c+=a<e?l:-l,c<n-r||c>s+r)))return c}function Pu(t){return t.drawTicks?t.tickLength:0}function Eu(t,e){if(!t.display)return 0;const i=od(t.font,e),o=id(t.padding);return(ul(t.text)?t.text.length:1)*i.lineHeight+o.height}function Lu(t,e,i){let o=hc(t);return(i&&"right"!==e||!i&&"right"===e)&&(o=(t=>"left"===t?"right":"right"===t?"left":t)(o)),o}class $u extends ku{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:o}=this;return t=_l(t,Number.POSITIVE_INFINITY),e=_l(e,Number.NEGATIVE_INFINITY),i=_l(i,Number.POSITIVE_INFINITY),o=_l(o,Number.NEGATIVE_INFINITY),{min:_l(t,i),max:_l(e,o),minDefined:ml(t),maxDefined:ml(e)}}getMinMax(t){let e,{min:i,max:o,minDefined:a,maxDefined:n}=this.getUserBounds();if(a&&n)return{min:i,max:o};const s=this.getMatchingVisibleMetas();for(let r=0,l=s.length;r<l;++r)e=s[r].controller.getMinMax(this,t),a||(i=Math.min(i,e.min)),n||(o=Math.max(o,e.max));return i=n&&i>o?o:i,o=a&&i>o?i:o,{min:_l(i,_l(o,i)),max:_l(o,_l(i,o))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){bl(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:o,grace:a,ticks:n}=this.options,s=n.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:o,max:a}=t,n=gl(e,(a-o)/2),s=(t,e)=>i&&0===t?0:t+e;return{min:s(o,-Math.abs(n)),max:s(a,n)}}(this,a,o),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const r=s<this.ticks.length;this._convertTicksToLabels(r?Cu(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),n.display&&(n.autoSkip||"auto"===n.source)&&(this.ticks=Su(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),r&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,i=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,i=!i),this._startPixel=t,this._endPixel=e,this._reversePixels=i,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){bl(this.options.afterUpdate,[this])}beforeSetDimensions(){bl(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){bl(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),bl(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){bl(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,o,a;for(i=0,o=t.length;i<o;i++)a=t[i],a.label=bl(e.callback,[a.value,i,t],this)}afterTickToLabelConversion(){bl(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){bl(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=Du(this.ticks.length,t.ticks.maxTicksLimit),o=e.minRotation||0,a=e.maxRotation;let n,s,r,l=o;if(!this._isVisible()||!e.display||o>=a||i<=1||!this.isHorizontal())return void(this.labelRotation=o);const c=this._getLabelSizes(),d=c.widest.width,h=c.highest.height,u=ec(this.chart.width-d,0,this.maxWidth);n=t.offset?this.maxWidth/i:u/(i-1),d+6>n&&(n=u/(i-(t.offset?.5:1)),s=this.maxHeight-Pu(t.grid)-e.padding-Eu(t.title,this.chart.options.font),r=Math.sqrt(d*d+h*h),l=Zl(Math.min(Math.asin(ec((c.highest.height+6)/n,-1,1)),Math.asin(ec(s/r,-1,1))-Math.asin(ec(h/r,-1,1)))),l=Math.max(o,Math.min(a,l))),this.labelRotation=l}afterCalculateLabelRotation(){bl(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){bl(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:o,grid:a}}=this,n=this._isVisible(),s=this.isHorizontal();if(n){const n=Eu(o,e.options.font);if(s?(t.width=this.maxWidth,t.height=Pu(a)+n):(t.height=this.maxHeight,t.width=Pu(a)+n),i.display&&this.ticks.length){const{first:e,last:o,widest:a,highest:n}=this._getLabelSizes(),r=2*i.padding,l=ql(this.labelRotation),c=Math.cos(l),d=Math.sin(l);if(s){const e=i.mirror?0:d*a.width+c*n.height;t.height=Math.min(this.maxHeight,t.height+e+r)}else{const e=i.mirror?0:c*a.width+d*n.height;t.width=Math.min(this.maxWidth,t.width+e+r)}this._calculatePadding(e,o,d,c)}}this._handleMargins(),s?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,o){const{ticks:{align:a,padding:n},position:s}=this.options,r=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,h=0;r?l?(d=o*t.width,h=i*e.height):(d=i*t.height,h=o*e.width):"start"===a?h=e.width:"end"===a?d=t.width:"inner"!==a&&(d=t.width/2,h=e.width/2),this.paddingLeft=Math.max((d-s+n)*this.width/(this.width-s),0),this.paddingRight=Math.max((h-c+n)*this.width/(this.width-c),0)}else{let i=e.height/2,o=t.height/2;"start"===a?(i=0,o=t.height):"end"===a&&(i=e.height,o=0),this.paddingTop=i+n,this.paddingBottom=o+n}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){bl(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e<i;e++)hl(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=Cu(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){const{ctx:o,_longestTextCache:a}=this,n=[],s=[],r=Math.floor(e/Du(e,i));let l,c,d,h,u,p,m,_,f,g,b,v=0,y=0;for(l=0;l<e;l+=r){if(h=t[l].label,u=this._resolveTickFontOptions(l),o.font=p=u.string,m=a[p]=a[p]||{data:{},gc:[]},_=u.lineHeight,f=g=0,hl(h)||ul(h)){if(ul(h))for(c=0,d=h.length;c<d;++c)b=h[c],hl(b)||ul(b)||(f=zc(o,m.data,m.gc,f,b),g+=_)}else f=zc(o,m.data,m.gc,f,h),g=_;n.push(f),s.push(g),v=Math.max(f,v),y=Math.max(g,y)}!function(t,e){vl(t,(t=>{const i=t.gc,o=i.length/2;let a;if(o>e){for(a=0;a<o;++a)delete t.data[i[a]];i.splice(0,o)}}))}(a,e);const w=n.indexOf(v),x=s.indexOf(y),k=t=>({width:n[t]||0,height:s[t]||0});return{first:k(0),last:k(e-1),widest:k(w),highest:k(x),widths:n,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return ec(this._alignToPixels?Vc(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=function(t,e,i){return nd(t,{tick:i,index:e,type:"tick"})}(this.getContext(),t,i))}return this.$context||(this.$context=nd(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,e=ql(this.labelRotation),i=Math.abs(Math.cos(e)),o=Math.abs(Math.sin(e)),a=this._getLabelSizes(),n=t.autoSkipPadding||0,s=a?a.widest.width+n:0,r=a?a.highest.height+n:0;return this.isHorizontal()?r*i>s*o?s/i:r/o:r*o<s*i?r/i:s/o}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,o=this.options,{grid:a,position:n,border:s}=o,r=a.offset,l=this.isHorizontal(),c=this.ticks.length+(r?1:0),d=Pu(a),h=[],u=s.setContext(this.getContext()),p=u.display?u.width:0,m=p/2,_=function(t){return Vc(i,t,p)};let f,g,b,v,y,w,x,k,S,T,M,D;if("top"===n)f=_(this.bottom),w=this.bottom-d,k=f-m,T=_(t.top)+m,D=t.bottom;else if("bottom"===n)f=_(this.top),T=t.top,D=_(t.bottom)-m,w=f+m,k=this.top+d;else if("left"===n)f=_(this.right),y=this.right-d,x=f-m,S=_(t.left)+m,M=t.right;else if("right"===n)f=_(this.left),S=t.left,M=_(t.right)-m,y=f+m,x=this.left+d;else if("x"===e){if("center"===n)f=_((t.top+t.bottom)/2+.5);else if(pl(n)){const t=Object.keys(n)[0],e=n[t];f=_(this.chart.scales[t].getPixelForValue(e))}T=t.top,D=t.bottom,w=f+m,k=w+d}else if("y"===e){if("center"===n)f=_((t.left+t.right)/2);else if(pl(n)){const t=Object.keys(n)[0],e=n[t];f=_(this.chart.scales[t].getPixelForValue(e))}y=f-m,x=y-d,S=t.left,M=t.right}const C=fl(o.ticks.maxTicksLimit,c),A=Math.max(1,Math.ceil(c/C));for(g=0;g<c;g+=A){const t=this.getContext(g),e=a.setContext(t),o=s.setContext(t),n=e.lineWidth,c=e.color,d=o.dash||[],u=o.dashOffset,p=e.tickWidth,m=e.tickColor,_=e.tickBorderDash||[],f=e.tickBorderDashOffset;b=Au(this,g,r),void 0!==b&&(v=Vc(i,b,n),l?y=x=S=M=v:w=k=T=D=v,h.push({tx1:y,ty1:w,tx2:x,ty2:k,x1:S,y1:T,x2:M,y2:D,width:n,color:c,borderDash:d,borderDashOffset:u,tickWidth:p,tickColor:m,tickBorderDash:_,tickBorderDashOffset:f}))}return this._ticksLength=c,this._borderValue=f,h}_computeLabelItems(t){const e=this.axis,i=this.options,{position:o,ticks:a}=i,n=this.isHorizontal(),s=this.ticks,{align:r,crossAlign:l,padding:c,mirror:d}=a,h=Pu(i.grid),u=h+c,p=d?-c:u,m=-ql(this.labelRotation),_=[];let f,g,b,v,y,w,x,k,S,T,M,D,C="middle";if("top"===o)w=this.bottom-p,x=this._getXAxisLabelAlignment();else if("bottom"===o)w=this.top+p,x=this._getXAxisLabelAlignment();else if("left"===o){const t=this._getYAxisLabelAlignment(h);x=t.textAlign,y=t.x}else if("right"===o){const t=this._getYAxisLabelAlignment(h);x=t.textAlign,y=t.x}else if("x"===e){if("center"===o)w=(t.top+t.bottom)/2+u;else if(pl(o)){const t=Object.keys(o)[0],e=o[t];w=this.chart.scales[t].getPixelForValue(e)+u}x=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===o)y=(t.left+t.right)/2-u;else if(pl(o)){const t=Object.keys(o)[0],e=o[t];y=this.chart.scales[t].getPixelForValue(e)}x=this._getYAxisLabelAlignment(h).textAlign}"y"===e&&("start"===r?C="top":"end"===r&&(C="bottom"));const A=this._getLabelSizes();for(f=0,g=s.length;f<g;++f){b=s[f],v=b.label;const t=a.setContext(this.getContext(f));k=this.getPixelForTick(f)+a.labelOffset,S=this._resolveTickFontOptions(f),T=S.lineHeight,M=ul(v)?v.length:1;const e=M/2,i=t.color,r=t.textStrokeColor,c=t.textStrokeWidth;let h,u=x;if(n?(y=k,"inner"===x&&(u=f===g-1?this.options.reverse?"left":"right":0===f?this.options.reverse?"right":"left":"center"),D="top"===o?"near"===l||0!==m?-M*T+T/2:"center"===l?-A.highest.height/2-e*T+T:-A.highest.height+T/2:"near"===l||0!==m?T/2:"center"===l?A.highest.height/2-e*T:A.highest.height-M*T,d&&(D*=-1),0===m||t.showLabelBackdrop||(y+=T/2*Math.sin(m))):(w=k,D=(1-M)*T/2),t.showLabelBackdrop){const e=id(t.backdropPadding),i=A.heights[f],o=A.widths[f];let a=D-e.top,n=0-e.left;switch(C){case"middle":a-=i/2;break;case"bottom":a-=i}switch(x){case"center":n-=o/2;break;case"right":n-=o;break;case"inner":f===g-1?n-=o:f>0&&(n-=o/2)}h={left:n,top:a,width:o+e.width,height:i+e.height,color:t.backdropColor}}_.push({label:v,font:S,textOffset:D,options:{rotation:m,color:i,strokeColor:r,strokeWidth:c,textAlign:u,textBaseline:C,translation:[y,w],backdrop:h}})}return _}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-ql(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:o,padding:a}}=this.options,n=t+a,s=this._getLabelSizes().widest.width;let r,l;return"left"===e?o?(l=this.right+a,"near"===i?r="left":"center"===i?(r="center",l+=s/2):(r="right",l+=s)):(l=this.right-n,"near"===i?r="right":"center"===i?(r="center",l-=s/2):(r="left",l=this.left)):"right"===e?o?(l=this.left+a,"near"===i?r="right":"center"===i?(r="center",l-=s/2):(r="left",l-=s)):(l=this.left+n,"near"===i?r="left":"center"===i?(r="center",l+=s/2):(r="right",l=this.right)):r="right",{textAlign:r,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:o,width:a,height:n}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,o,a,n),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex((e=>e.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,o=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,n;const s=(t,e,o)=>{o.width&&o.color&&(i.save(),i.lineWidth=o.width,i.strokeStyle=o.color,i.setLineDash(o.borderDash||[]),i.lineDashOffset=o.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(a=0,n=o.length;a<n;++a){const t=o[a];e.drawOnChartArea&&s({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&s({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:i,grid:o}}=this,a=i.setContext(this.getContext()),n=i.display?a.width:0;if(!n)return;const s=o.setContext(this.getContext(0)).lineWidth,r=this._borderValue;let l,c,d,h;this.isHorizontal()?(l=Vc(t,this.left,n)-n/2,c=Vc(t,this.right,s)+s/2,d=h=r):(d=Vc(t,this.top,n)-n/2,h=Vc(t,this.bottom,s)+s/2,l=c=r),e.save(),e.lineWidth=a.width,e.strokeStyle=a.color,e.beginPath(),e.moveTo(l,d),e.lineTo(c,h),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,i=this._computeLabelArea();i&&Nc(e,i);const o=this.getLabelItems(t);for(const t of o){const i=t.options,o=t.font;qc(e,t.label,0,t.textOffset,o,i)}i&&jc(e)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:o}}=this;if(!i.display)return;const a=od(i.font),n=id(i.padding),s=i.align;let r=a.lineHeight/2;"bottom"===e||"center"===e||pl(e)?(r+=n.bottom,ul(i.text)&&(r+=a.lineHeight*(i.text.length-1))):r+=n.top;const{titleX:l,titleY:c,maxWidth:d,rotation:h}=function(t,e,i,o){const{top:a,left:n,bottom:s,right:r,chart:l}=t,{chartArea:c,scales:d}=l;let h,u,p,m=0;const _=s-a,f=r-n;if(t.isHorizontal()){if(u=uc(o,n,r),pl(i)){const t=Object.keys(i)[0],o=i[t];p=d[t].getPixelForValue(o)+_-e}else p="center"===i?(c.bottom+c.top)/2+_-e:Mu(t,i,e);h=r-n}else{if(pl(i)){const t=Object.keys(i)[0],o=i[t];u=d[t].getPixelForValue(o)-f+e}else u="center"===i?(c.left+c.right)/2-f+e:Mu(t,i,e);p=uc(o,s,a),m="left"===i?-Il:Il}return{titleX:u,titleY:p,maxWidth:h,rotation:m}}(this,r,e,s);qc(t,i.text,0,0,a,{color:i.color,maxWidth:d,rotation:h,textAlign:Lu(s,e,o),textBaseline:"middle",translation:[l,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=fl(t.grid&&t.grid.z,-1),o=fl(t.border&&t.border.z,0);return this._isVisible()&&this.draw===$u.prototype.draw?[{z:i,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:o,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",o=[];let a,n;for(a=0,n=e.length;a<n;++a){const n=e[a];n[i]!==this.id||t&&n.type!==t||o.push(n)}return o}_resolveTickFontOptions(t){return od(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class zu{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;(function(t){return"id"in t&&"defaults"in t})(e)&&(i=this.register(e));const o=this.items,a=t.id,n=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+t);return a in o||(o[a]=t,function(t,e,i){const o=Sl(Object.create(null),[i?$c.get(i):{},$c.get(e),t.defaults]);$c.set(e,o),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((i=>{const o=i.split("."),a=o.pop(),n=[t].concat(o).join("."),s=e[i].split("."),r=s.pop(),l=s.join(".");$c.route(n,a,l,r)}))}(e,t.defaultRoutes);t.descriptors&&$c.describe(e,t.descriptors)}(t,n,i),this.override&&$c.override(t.id,t.overrides)),n}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,o=this.scope;i in e&&delete e[i],o&&i in $c[o]&&(delete $c[o][i],this.override&&delete Cc[i])}}class Ou{constructor(){this.controllers=new zu(bh,"datasets",!0),this.elements=new zu(ku,"elements"),this.plugins=new zu(Object,"plugins"),this.scales=new zu($u,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const o=i||this._getRegistryForType(e);i||o.isForType(e)||o===this.plugins&&e.id?this._exec(t,o,e):vl(e,(e=>{const o=i||this._getRegistryForType(e);this._exec(t,o,e)}))}))}_exec(t,e,i){const o=Al(t);bl(i["before"+o],[],i),e[t](i),bl(i["after"+o],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const o=e.get(t);if(void 0===o)throw new Error('"'+t+'" is not a registered '+i+".");return o}}var Vu=new Ou;class Hu{constructor(){this._init=void 0}notify(t,e,i,o){if("beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),void 0===this._init)return;const a=o?this._descriptors(t).filter(o):this._descriptors(t),n=this._notify(a,t,e,i);return"afterDestroy"===e&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),n}_notify(t,e,i,o){o=o||{};for(const a of t){const t=a.plugin;if(!1===bl(t[i],[e,o,a.options],t)&&o.cancelable)return!1}return!0}invalidate(){hl(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,o=fl(i.options&&i.options.plugins,{}),a=function(t){const e={},i=[],o=Object.keys(Vu.plugins.items);for(let t=0;t<o.length;t++)i.push(Vu.getPlugin(o[t]));const a=t.plugins||[];for(let t=0;t<a.length;t++){const o=a[t];-1===i.indexOf(o)&&(i.push(o),e[o.id]=!0)}return{plugins:i,localIds:e}}(i);return!1!==o||e?function(t,{plugins:e,localIds:i},o,a){const n=[],s=t.getContext();for(const r of e){const e=r.id,l=Iu(o[e],a);null!==l&&n.push({plugin:r,options:Ru(t.config,{plugin:r,local:i[e]},l,s)})}return n}(t,a,o,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,o=(t,e)=>t.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(o(e,i),t,"stop"),this._notify(o(i,e),t,"start")}}function Iu(t,e){return e||!1!==t?!0===t?{}:t:null}function Ru(t,{plugin:e,local:i},o,a){const n=t.pluginScopeKeys(e),s=t.getOptionScopes(o,n);return i&&e.defaults&&s.push(e.defaults),t.createResolver(s,a,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Fu(t,e){const i=$c.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Nu(t){if("x"===t||"y"===t||"r"===t)return t}function ju(t,...e){if(Nu(t))return t;for(const o of e){const e=o.axis||("top"===(i=o.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.length>1&&Nu(t[0].toLowerCase());if(e)return e}var i;throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Wu(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function Bu(t,e){const i=Cc[t.type]||{scales:{}},o=e.scales||{},a=Fu(t.type,e),n=Object.create(null);return Object.keys(o).forEach((e=>{const s=o[e];if(!pl(s))return console.error(`Invalid scale configuration for scale: ${e}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const r=ju(e,s,function(t,e){if(e.data&&e.data.datasets){const i=e.data.datasets.filter((e=>e.xAxisID===t||e.yAxisID===t));if(i.length)return Wu(t,"x",i[0])||Wu(t,"y",i[0])}return{}}(e,t),$c.scales[s.type]),l=function(t,e){return t===e?"_index_":"_value_"}(r,a),c=i.scales||{};n[e]=Tl(Object.create(null),[{axis:r},s,c[r],c[l]])})),t.data.datasets.forEach((i=>{const a=i.type||t.type,s=i.indexAxis||Fu(a,e),r=(Cc[a]||{}).scales||{};Object.keys(r).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,s),a=i[e+"AxisID"]||e;n[a]=n[a]||Object.create(null),Tl(n[a],[{axis:e},o[a],r[t]])}))})),Object.keys(n).forEach((t=>{const e=n[t];Tl(e,[$c.scales[e.type],$c.scale])})),n}function Uu(t){const e=t.options||(t.options={});e.plugins=fl(e.plugins,{}),e.scales=Bu(t,e)}function Yu(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const qu=new Map,Zu=new Set;function Xu(t,e){let i=qu.get(t);return i||(i=e(),qu.set(t,i),Zu.add(i)),i}const Ku=(t,e,i)=>{const o=Cl(e,i);void 0!==o&&t.add(o)};class Gu{constructor(t){this._config=function(t){return(t=t||{}).data=Yu(t.data),Uu(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Yu(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Uu(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Xu(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Xu(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Xu(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return Xu(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let o=i.get(t);return o&&!e||(o=new Map,i.set(t,o)),o}getOptionScopes(t,e,i){const{options:o,type:a}=this,n=this._cachedScopes(t,i),s=n.get(e);if(s)return s;const r=new Set;e.forEach((e=>{t&&(r.add(t),e.forEach((e=>Ku(r,t,e)))),e.forEach((t=>Ku(r,o,t))),e.forEach((t=>Ku(r,Cc[a]||{},t))),e.forEach((t=>Ku(r,$c,t))),e.forEach((t=>Ku(r,Ac,t)))}));const l=Array.from(r);return 0===l.length&&l.push(Object.create(null)),Zu.has(e)&&n.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Cc[e]||{},$c.datasets[e]||{},{type:e},$c,Ac]}resolveNamedOptions(t,e,i,o=[""]){const a={$shared:!0},{resolver:n,subPrefixes:s}=Qu(this._resolverCache,t,o);let r=n;if(function(t,e){const{isScriptable:i,isIndexable:o}=ld(t);for(const a of e){const e=i(a),n=o(a),s=(n||e)&&t[a];if(e&&(El(s)||Ju(s))||n&&ul(s))return!0}return!1}(n,e)){a.$shared=!1;r=rd(n,i=El(i)?i():i,this.createResolver(t,i,s))}for(const t of e)a[t]=r[t];return a}createResolver(t,e,i=[""],o){const{resolver:a}=Qu(this._resolverCache,t,i);return pl(e)?rd(a,e,void 0,o):a}}function Qu(t,e,i){let o=t.get(e);o||(o=new Map,t.set(e,o));const a=i.join();let n=o.get(a);if(!n){n={resolver:sd(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},o.set(a,n)}return n}const Ju=t=>pl(t)&&Object.getOwnPropertyNames(t).some((e=>El(t[e])));const tp=["top","bottom","left","right","chartArea"];function ep(t,e){return"top"===t||"bottom"===t||-1===tp.indexOf(t)&&"x"===e}function ip(t,e){return function(i,o){return i[t]===o[t]?i[e]-o[e]:i[t]-o[t]}}function op(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),bl(i&&i.onComplete,[t],e)}function ap(t){const e=t.chart,i=e.options.animation;bl(i&&i.onProgress,[t],e)}function np(t){return Dd()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const sp={},rp=t=>{const e=np(t);return Object.values(sp).filter((t=>t.canvas===e)).pop()};function lp(t,e,i){const o=Object.keys(t);for(const a of o){const o=+a;if(o>=e){const n=t[a];delete t[a],(i>0||o>e)&&(t[o+i]=n)}}}class cp{static defaults=$c;static instances=sp;static overrides=Cc;static registry=Vu;static version="4.5.1";static getChart=rp;static register(...t){Vu.add(...t),dp()}static unregister(...t){Vu.remove(...t),dp()}constructor(t,e){const i=this.config=new Gu(e),o=np(t),a=rp(o);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const n=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||xu(o)),this.platform.updateConfig(i);const s=this.platform.acquireContext(o,n.aspectRatio),r=s&&s.canvas,l=r&&r.height,c=r&&r.width;this.id=dl(),this.ctx=s,this.canvas=r,this.width=c,this.height=l,this._options=n,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Hu,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...o){return e?(clearTimeout(i),i=setTimeout(t,e,o)):t.apply(this,o),e}}((t=>this.update(t)),n.resizeDelay||0),this._dataChanges=[],sp[this.id]=this,s&&r?(ih.listen(this,"complete",op),ih.listen(this,"progress",ap),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:o,_aspectRatio:a}=this;return hl(t)?e&&a?a:o?i/o:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Vu}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Hd(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Hc(this.canvas,this.ctx),this}stop(){return ih.stop(this),this}resize(t,e){ih.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,o=this.canvas,a=i.maintainAspectRatio&&this.aspectRatio,n=this.platform.getMaximumSize(o,t,e,a),s=i.devicePixelRatio||this.platform.getDevicePixelRatio(),r=this.width?"resize":"attach";this.width=n.width,this.height=n.height,this._aspectRatio=this.aspectRatio,Hd(this,s,!0)&&(this.notifyPlugins("resize",{size:n}),bl(i.onResize,[this,n],this),this.attached&&this._doResize(r)&&this.render())}ensureScalesHaveIDs(){vl(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,o=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let a=[];e&&(a=a.concat(Object.keys(e).map((t=>{const i=e[t],o=ju(t,i),a="r"===o,n="x"===o;return{options:i,dposition:a?"chartArea":n?"bottom":"left",dtype:a?"radialLinear":n?"category":"linear"}})))),vl(a,(e=>{const a=e.options,n=a.id,s=ju(n,a),r=fl(a.type,e.dtype);void 0!==a.position&&ep(a.position,s)===ep(e.dposition)||(a.position=e.dposition),o[n]=!0;let l=null;if(n in i&&i[n].type===r)l=i[n];else{l=new(Vu.getScale(r))({id:n,type:r,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(a,t)})),vl(o,((t,e)=>{t||delete i[e]})),vl(i,(t=>{au.configure(this,t,t.options),au.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;t<i;++t)this._destroyDatasetMeta(t);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(ip("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,o;for(this._removeUnreferencedMetasets(),i=0,o=e.length;i<o;i++){const o=e[i];let a=this.getDatasetMeta(i);const n=o.type||this.config.type;if(a.type&&a.type!==n&&(this._destroyDatasetMeta(i),a=this.getDatasetMeta(i)),a.type=n,a.indexAxis=o.indexAxis||Fu(n,this.options),a.order=o.order||0,a.index=i,a.label=""+o.label,a.visible=this.isDatasetVisible(i),a.controller)a.controller.updateIndex(i),a.controller.linkScales();else{const e=Vu.getController(n),{datasetElementType:o,dataElementType:s}=$c.datasets[n];Object.assign(e,{dataElementType:Vu.getElement(s),datasetElementType:o&&Vu.getElement(o)}),a.controller=new e(this,i),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){vl(this.data.datasets,((t,e)=>{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),o=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let n=0;for(let t=0,e=this.data.datasets.length;t<e;t++){const{controller:e}=this.getDatasetMeta(t),i=!o&&-1===a.indexOf(e);e.buildOrUpdateElements(i),n=Math.max(+e.getMaxOverflow(),n)}n=this._minPadding=i.layout.autoPadding?n:0,this._updateLayout(n),o||vl(a,(t=>{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(ip("z","_idx"));const{_active:s,_lastEvent:r}=this;r?this._eventHandler(r,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){vl(this.scales,(t=>{au.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);Ll(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:o,count:a}of e){lp(t,o,"_removeElements"===i?-a:a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),o=i(0);for(let t=1;t<e;t++)if(!Ll(o,i(t)))return;return Array.from(o).map((t=>t.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;au.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],vl(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,El(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),o={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",o)&&(i.controller._update(e),o.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",o))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(ih.has(this)?this.attached&&!ih.running(this)&&ih.start(this):(this.draw(),op({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(t,e)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let o,a;for(o=0,a=e.length;o<a;++o){const a=e[o];t&&!a.visible||i.push(a)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i={meta:t,index:t.index,cancelable:!0},o=th(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",i)&&(o&&Nc(e,o),t.controller.draw(),o&&jc(e),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(t){return Fc(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,o){const a=Uh.modes[e];return"function"==typeof a?a(this,t,i,o):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let o=i.filter((t=>t&&t._dataset===e)).pop();return o||(o={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(o)),o}getContext(){return this.$context||(this.$context=nd(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const o=i?"show":"hide",a=this.getDatasetMeta(t),n=a.controller._resolveAnimations(void 0,o);Pl(e)?(a.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),n.update(a,{visible:i}),this.update((e=>e.datasetIndex===t?o:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),ih.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Hc(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete sp[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(i,o)=>{e.addEventListener(this,i,o),t[i]=o},o=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};vl(this.options.events,(t=>i(t,o)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,o)=>{e.addEventListener(this,i,o),t[i]=o},o=(i,o)=>{t[i]&&(e.removeEventListener(this,i,o),delete t[i])},a=(t,e)=>{this.canvas&&this.resize(t,e)};let n;const s=()=>{o("attach",s),this.attached=!0,this.resize(),i("resize",a),i("detach",n)};n=()=>{this.attached=!1,o("resize",a),this._stop(),this._resize(0,0),i("attach",s)},e.isAttached(this.canvas)?s():n()}unbindEvents(){vl(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},vl(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const o=i?"set":"remove";let a,n,s,r;for("dataset"===e&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+o+"DatasetHoverStyle"]()),s=0,r=t.length;s<r;++s){n=t[s];const e=n&&this.getDatasetMeta(n.datasetIndex).controller;e&&e[o+"HoverStyle"](n.element,n.datasetIndex,n.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map((({datasetIndex:t,index:e})=>{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!yl(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return 1===this._plugins._cache.filter((e=>e.plugin.id===t)).length}_updateHoverStyles(t,e,i){const o=this.options.hover,a=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),n=a(e,t),s=i?t:a(t,e);n.length&&this.updateHoverStyle(n,o.mode,!1),s.length&&o.mode&&this.updateHoverStyle(s,o.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},o=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,o))return;const a=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,o),(a||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:o=[],options:a}=this,n=e,s=this._getActiveElements(t,o,i,n),r=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,i,o){return i&&"mouseout"!==t.type?o?e:t:null}(t,this._lastEvent,i,r);i&&(this._lastEvent=null,bl(a.onHover,[t,s,this],this),r&&bl(a.onClick,[t,s,this],this));const c=!yl(s,o);return(c||e)&&(this._active=s,this._updateHoverStyles(s,o,e)),this._lastEvent=l,c}_getActiveElements(t,e,i,o){if("mouseout"===t.type)return[];if(!i)return e;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,o)}}function dp(){return vl(cp.instances,(t=>t._plugins.invalidate()))}function hp(t,e,i,o){const a=Jc(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const n=(i-e)/2,s=Math.min(n,o*e/2),r=t=>{const e=(i-Math.min(n,t))*o/2;return ec(t,0,Math.min(n,e))};return{outerStart:r(a.outerStart),outerEnd:r(a.outerEnd),innerStart:ec(a.innerStart,0,s),innerEnd:ec(a.innerEnd,0,s)}}function up(t,e,i,o){return{x:i+t*Math.cos(e),y:o+t*Math.sin(e)}}function pp(t,e,i,o,a,n){const{x:s,y:r,startAngle:l,pixelMargin:c,innerRadius:d}=e,h=Math.max(e.outerRadius+o+i-c,0),u=d>0?d+o+i+c:0;let p=0;const m=a-l;if(o){const t=((d>0?d-o:0)+(h>0?h-o:0))/2;p=(m-(0!==t?m*t/(t+o):m))/2}const _=(m-Math.max(.001,m*h-i/$l)/h)/2,f=l+_+p,g=a-_-p,{outerStart:b,outerEnd:v,innerStart:y,innerEnd:w}=hp(e,u,h,g-f),x=h-b,k=h-v,S=f+b/x,T=g-v/k,M=u+y,D=u+w,C=f+y/M,A=g-w/D;if(t.beginPath(),n){const e=(S+T)/2;if(t.arc(s,r,h,S,e),t.arc(s,r,h,e,T),v>0){const e=up(k,T,s,r);t.arc(e.x,e.y,v,T,g+Il)}const i=up(D,g,s,r);if(t.lineTo(i.x,i.y),w>0){const e=up(D,A,s,r);t.arc(e.x,e.y,w,g+Il,A+Math.PI)}const o=(g-w/u+(f+y/u))/2;if(t.arc(s,r,u,g-w/u,o,!0),t.arc(s,r,u,o,f+y/u,!0),y>0){const e=up(M,C,s,r);t.arc(e.x,e.y,y,C+Math.PI,f-Il)}const a=up(x,f,s,r);if(t.lineTo(a.x,a.y),b>0){const e=up(x,S,s,r);t.arc(e.x,e.y,b,f-Il,S)}}else{t.moveTo(s,r);const e=Math.cos(S)*h+s,i=Math.sin(S)*h+r;t.lineTo(e,i);const o=Math.cos(T)*h+s,a=Math.sin(T)*h+r;t.lineTo(o,a)}t.closePath()}function mp(t,e,i,o,a){const{fullCircles:n,startAngle:s,circumference:r,options:l}=e,{borderWidth:c,borderJoinStyle:d,borderDash:h,borderDashOffset:u,borderRadius:p}=l,m="inner"===l.borderAlign;if(!c)return;t.setLineDash(h||[]),t.lineDashOffset=u,m?(t.lineWidth=2*c,t.lineJoin=d||"round"):(t.lineWidth=c,t.lineJoin=d||"bevel");let _=e.endAngle;if(n){pp(t,e,i,o,_,a);for(let e=0;e<n;++e)t.stroke();isNaN(r)||(_=s+(r%zl||zl))}m&&function(t,e,i){const{startAngle:o,pixelMargin:a,x:n,y:s,outerRadius:r,innerRadius:l}=e;let c=a/r;t.beginPath(),t.arc(n,s,r,o-c,i+c),l>a?(c=a/l,t.arc(n,s,l,i+c,o-c,!0)):t.arc(n,s,a,i+Il,o-Il),t.closePath(),t.clip()}(t,e,_),l.selfJoin&&_-s>=$l&&0===p&&"miter"!==d&&function(t,e,i){const{startAngle:o,x:a,y:n,outerRadius:s,innerRadius:r,options:l}=e,{borderWidth:c,borderJoinStyle:d}=l,h=Math.min(c/s,Jl(o-i));if(t.beginPath(),t.arc(a,n,s-c/2,o+h/2,i-h/2),r>0){const e=Math.min(c/r,Jl(o-i));t.arc(a,n,r+c/2,i-e/2,o+e/2,!0)}else{const e=Math.min(c/2,s*Jl(o-i));if("round"===d)t.arc(a,n,e,i-$l/2,o+$l/2,!0);else if("bevel"===d){const s=2*e*e,r=-s*Math.cos(i+$l/2)+a,l=-s*Math.sin(i+$l/2)+n,c=s*Math.cos(o+$l/2)+a,d=s*Math.sin(o+$l/2)+n;t.lineTo(r,l),t.lineTo(c,d)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}(t,e,_),n||(pp(t,e,i,o,_,a),t.stroke())}class _p extends ku{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const o=this.getProps(["x","y"],i),{angle:a,distance:n}=Kl(o,{x:t,y:e}),{startAngle:s,endAngle:r,innerRadius:l,outerRadius:c,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),h=(this.options.spacing+this.options.borderWidth)/2,u=fl(d,r-s),p=tc(a,s,r)&&s!==r,m=u>=zl||p,_=ic(n,l+h,c+h);return m&&_}getCenterPoint(t){const{x:e,y:i,startAngle:o,endAngle:a,innerRadius:n,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:r,spacing:l}=this.options,c=(o+a)/2,d=(n+s+l+r)/2;return{x:e+Math.cos(c)*d,y:i+Math.sin(c)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,o=(e.offset||0)/4,a=(e.spacing||0)/2,n=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>zl?Math.floor(i/zl):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();const s=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(s)*o,Math.sin(s)*o);const r=o*(1-Math.sin(Math.min($l,i||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,i,o,a){const{fullCircles:n,startAngle:s,circumference:r}=e;let l=e.endAngle;if(n){pp(t,e,i,o,l,a);for(let e=0;e<n;++e)t.fill();isNaN(r)||(l=s+(r%zl||zl))}pp(t,e,i,o,l,a),t.fill()}(t,this,r,a,n),mp(t,this,r,a,n),t.restore()}}function fp(t,e,i=e){t.lineCap=fl(i.borderCapStyle,e.borderCapStyle),t.setLineDash(fl(i.borderDash,e.borderDash)),t.lineDashOffset=fl(i.borderDashOffset,e.borderDashOffset),t.lineJoin=fl(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=fl(i.borderWidth,e.borderWidth),t.strokeStyle=fl(i.borderColor,e.borderColor)}function gp(t,e,i){t.lineTo(i.x,i.y)}function bp(t,e,i={}){const o=t.length,{start:a=0,end:n=o-1}=i,{start:s,end:r}=e,l=Math.max(a,s),c=Math.min(n,r),d=a<s&&n<s||a>r&&n>r;return{count:o,start:l,loop:e.loop,ilen:c<l&&!d?o+c-l:c-l}}function vp(t,e,i,o){const{points:a,options:n}=e,{count:s,start:r,loop:l,ilen:c}=bp(a,i,o),d=function(t){return t.stepped?Wc:t.tension||"monotone"===t.cubicInterpolationMode?Bc:gp}(n);let h,u,p,{move:m=!0,reverse:_}=o||{};for(h=0;h<=c;++h)u=a[(r+(_?c-h:h))%s],u.skip||(m?(t.moveTo(u.x,u.y),m=!1):d(t,p,u,_,n.stepped),p=u);return l&&(u=a[(r+(_?c:0))%s],d(t,p,u,_,n.stepped)),!!l}function yp(t,e,i,o){const a=e.points,{count:n,start:s,ilen:r}=bp(a,i,o),{move:l=!0,reverse:c}=o||{};let d,h,u,p,m,_,f=0,g=0;const b=t=>(s+(c?r-t:t))%n,v=()=>{p!==m&&(t.lineTo(f,m),t.lineTo(f,p),t.lineTo(f,_))};for(l&&(h=a[b(0)],t.moveTo(h.x,h.y)),d=0;d<=r;++d){if(h=a[b(d)],h.skip)continue;const e=h.x,i=h.y,o=0|e;o===u?(i<p?p=i:i>m&&(m=i),f=(g*f+e)/++g):(v(),t.lineTo(e,i),u=o,g=0,p=m=i),_=i}v()}function wp(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?yp:vp}const xp="function"==typeof Path2D;function kp(t,e,i,o){xp&&!e.options.segment?function(t,e,i,o){let a=e._path;a||(a=e._path=new Path2D,e.path(a,i,o)&&a.closePath()),fp(t,e.options),t.stroke(a)}(t,e,i,o):function(t,e,i,o){const{segments:a,options:n}=e,s=wp(e);for(const r of a)fp(t,n,r.style),t.beginPath(),s(t,e,r,{start:i,end:i+o-1})&&t.closePath(),t.stroke()}(t,e,i,o)}class Sp extends ku{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const o=i.spanGaps?this._loop:this._fullLoop;Md(this._points,i,t,o,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,o=t.options.spanGaps,a=i.length;if(!a)return[];const n=!!t._loop,{start:s,end:r}=function(t,e,i,o){let a=0,n=e-1;if(i&&!o)for(;a<e&&!t[a].skip;)a++;for(;a<e&&t[a].skip;)a++;for(a%=e,i&&(n+=a);n>a&&t[n%e].skip;)n--;return n%=e,{start:a,end:n}}(i,a,n,o);return Kd(t,!0===o?[{start:s,end:r,loop:n}]:function(t,e,i,o){const a=t.length,n=[];let s,r=e,l=t[e];for(s=e+1;s<=i;++s){const i=t[s%a];i.skip||i.stop?l.skip||(o=!1,n.push({start:e%a,end:(s-1)%a,loop:o}),e=r=i.stop?s:null):(r=s,l.skip&&(e=s)),l=i}return null!==r&&n.push({start:e%a,end:r%a,loop:o}),n}(i,s,r<s?r+a:r,!!t._fullLoop&&0===s&&r===a-1),i,e)}(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,o=t[e],a=this.points,n=Xd(this,{property:e,start:o,end:o});if(!n.length)return;const s=[],r=function(t){return t.stepped?Nd:t.tension||"monotone"===t.cubicInterpolationMode?jd:Fd}(i);let l,c;for(l=0,c=n.length;l<c;++l){const{start:c,end:d}=n[l],h=a[c],u=a[d];if(h===u){s.push(h);continue}const p=r(h,u,Math.abs((o-h[e])/(u[e]-h[e])),i.stepped);p[e]=t[e],s.push(p)}return 1===s.length?s[0]:s}pathSegment(t,e,i){return wp(this)(t,this,e,i)}path(t,e,i){const o=this.segments,a=wp(this);let n=this._loop;e=e||0,i=i||this.points.length-e;for(const s of o)n&=a(t,this,s,{start:e,end:e+i-1});return!!n}draw(t,e,i,o){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(t.save(),kp(t,this,i,o),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Tp(t,e,i,o){const a=t.options,{[i]:n}=t.getProps([i],o);return Math.abs(e-n)<a.radius+a.hitRadius}class Mp extends ku{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const o=this.options,{x:a,y:n}=this.getProps(["x","y"],i);return Math.pow(t-a,2)+Math.pow(e-n,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(t,e){return Tp(this,t,"x",e)}inYRange(t,e){return Tp(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0;e=Math.max(e,e&&t.hoverRadius||0);return 2*(e+(e&&t.borderWidth||0))}draw(t,e){const i=this.options;this.skip||i.radius<.1||!Fc(this,e,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,Ic(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function Dp(t,e){const{x:i,y:o,base:a,width:n,height:s}=t.getProps(["x","y","base","width","height"],e);let r,l,c,d,h;return t.horizontal?(h=s/2,r=Math.min(i,a),l=Math.max(i,a),c=o-h,d=o+h):(h=n/2,r=i-h,l=i+h,c=Math.min(o,a),d=Math.max(o,a)),{left:r,top:c,right:l,bottom:d}}function Cp(t,e,i,o){return t?0:ec(e,i,o)}function Ap(t){const e=Dp(t),i=e.right-e.left,o=e.bottom-e.top,a=function(t,e,i){const o=t.options.borderWidth,a=t.borderSkipped,n=td(o);return{t:Cp(a.top,n.top,0,i),r:Cp(a.right,n.right,0,e),b:Cp(a.bottom,n.bottom,0,i),l:Cp(a.left,n.left,0,e)}}(t,i/2,o/2),n=function(t,e,i){const{enableBorderRadius:o}=t.getProps(["enableBorderRadius"]),a=t.options.borderRadius,n=ed(a),s=Math.min(e,i),r=t.borderSkipped,l=o||pl(a);return{topLeft:Cp(!l||r.top||r.left,n.topLeft,0,s),topRight:Cp(!l||r.top||r.right,n.topRight,0,s),bottomLeft:Cp(!l||r.bottom||r.left,n.bottomLeft,0,s),bottomRight:Cp(!l||r.bottom||r.right,n.bottomRight,0,s)}}(t,i/2,o/2);return{outer:{x:e.left,y:e.top,w:i,h:o,radius:n},inner:{x:e.left+a.l,y:e.top+a.t,w:i-a.l-a.r,h:o-a.t-a.b,radius:{topLeft:Math.max(0,n.topLeft-Math.max(a.t,a.l)),topRight:Math.max(0,n.topRight-Math.max(a.t,a.r)),bottomLeft:Math.max(0,n.bottomLeft-Math.max(a.b,a.l)),bottomRight:Math.max(0,n.bottomRight-Math.max(a.b,a.r))}}}}function Pp(t,e,i,o){const a=null===e,n=null===i,s=t&&!(a&&n)&&Dp(t,o);return s&&(a||ic(e,s.left,s.right))&&(n||ic(i,s.top,s.bottom))}function Ep(t,e){t.rect(e.x,e.y,e.w,e.h)}function Lp(t,e,i={}){const o=t.x!==i.x?-e:0,a=t.y!==i.y?-e:0,n=(t.x+t.w!==i.x+i.w?e:0)-o,s=(t.y+t.h!==i.y+i.h?e:0)-a;return{x:t.x+o,y:t.y+a,w:t.w+n,h:t.h+s,radius:t.radius}}class $p extends ku{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:o}}=this,{inner:a,outer:n}=Ap(this),s=(r=n.radius).topLeft||r.topRight||r.bottomLeft||r.bottomRight?Zc:Ep;var r;t.save(),n.w===a.w&&n.h===a.h||(t.beginPath(),s(t,Lp(n,e,a)),t.clip(),s(t,Lp(a,-e,n)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),s(t,Lp(a,e)),t.fillStyle=o,t.fill(),t.restore()}inRange(t,e,i){return Pp(this,t,e,i)}inXRange(t,e){return Pp(this,t,null,e)}inYRange(t,e){return Pp(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:o,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{x:a?(e+o)/2:e,y:a?i:(i+o)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}var zp=Object.freeze({__proto__:null,ArcElement:_p,BarElement:$p,LineElement:Sp,PointElement:Mp});const Op=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Vp=Op.map((t=>t.replace("rgb(","rgba(").replace(")",", 0.5)")));function Hp(t){return Op[t%Op.length]}function Ip(t){return Vp[t%Vp.length]}function Rp(t){let e=0;return(i,o)=>{const a=t.getDatasetMeta(o).controller;a instanceof Ah?e=function(t,e){return t.backgroundColor=t.data.map((()=>Hp(e++))),e}(i,e):a instanceof Eh?e=function(t,e){return t.backgroundColor=t.data.map((()=>Ip(e++))),e}(i,e):a&&(e=function(t,e){return t.borderColor=Hp(e),t.backgroundColor=Ip(e),++e}(i,e))}}function Fp(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}var Np={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,i){if(!i.enabled)return;const{data:{datasets:o},options:a}=t.config,{elements:n}=a,s=Fp(o)||(r=a)&&(r.borderColor||r.backgroundColor)||n&&Fp(n)||"rgba(0,0,0,0.1)"!==$c.borderColor||"rgba(0,0,0,0.1)"!==$c.backgroundColor;var r;if(!i.forceOverride&&s)return;const l=Rp(t);o.forEach(l)}};function jp(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function Wp(t){t.data.datasets.forEach((t=>{jp(t)}))}var Bp={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void Wp(t);const o=t.width;t.data.datasets.forEach(((e,a)=>{const{_data:n,indexAxis:s}=e,r=t.getDatasetMeta(a),l=n||e.data;if("y"===ad([s,t.options.indexAxis]))return;if(!r.controller.supportsDecimation)return;const c=t.scales[r.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let{start:d,count:h}=function(t,e){const i=e.length;let o,a=0;const{iScale:n}=t,{min:s,max:r,minDefined:l,maxDefined:c}=n.getUserBounds();return l&&(a=ec(ac(e,n.axis,s).lo,0,i-1)),o=c?ec(ac(e,n.axis,r).hi+1,a,i)-a:i-a,{start:a,count:o}}(r,l);if(h<=(i.threshold||4*o))return void jp(e);let u;switch(hl(n)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":u=function(t,e,i,o,a){const n=a.samples||o;if(n>=i)return t.slice(e,e+i);const s=[],r=(i-2)/(n-2);let l=0;const c=e+i-1;let d,h,u,p,m,_=e;for(s[l++]=t[_],d=0;d<n-2;d++){let o,a=0,n=0;const c=Math.floor((d+1)*r)+1+e,f=Math.min(Math.floor((d+2)*r)+1,i)+e,g=f-c;for(o=c;o<f;o++)a+=t[o].x,n+=t[o].y;a/=g,n/=g;const b=Math.floor(d*r)+1+e,v=Math.min(Math.floor((d+1)*r)+1,i)+e,{x:y,y:w}=t[_];for(u=p=-1,o=b;o<v;o++)p=.5*Math.abs((y-a)*(t[o].y-w)-(y-t[o].x)*(n-w)),p>u&&(u=p,h=t[o],m=o);s[l++]=h,_=m}return s[l++]=t[c],s}(l,d,h,o,i);break;case"min-max":u=function(t,e,i,o){let a,n,s,r,l,c,d,h,u,p,m=0,_=0;const f=[],g=e+i-1,b=t[e].x,v=t[g].x-b;for(a=e;a<e+i;++a){n=t[a],s=(n.x-b)/v*o,r=n.y;const e=0|s;if(e===l)r<u?(u=r,c=a):r>p&&(p=r,d=a),m=(_*m+n.x)/++_;else{const i=a-1;if(!hl(c)&&!hl(d)){const e=Math.min(c,d),o=Math.max(c,d);e!==h&&e!==i&&f.push({...t[e],x:m}),o!==h&&o!==i&&f.push({...t[o],x:m})}a>0&&i!==h&&f.push(t[i]),f.push(n),l=e,_=0,u=p=r,c=d=h=a}}return f}(l,d,h,o);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=u}))},destroy(t){Wp(t)}};function Up(t,e,i,o){if(o)return;let a=e[t],n=i[t];return"angle"===t&&(a=Jl(a),n=Jl(n)),{property:t,start:a,end:n}}function Yp(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function qp(t,e,i,o){return t&&e?o(t[i],e[i]):t?t[i]:e?e[i]:0}function Zp(t,e){let i=[],o=!1;return ul(t)?(o=!0,i=t):i=function(t,e){const{x:i=null,y:o=null}=t||{},a=e.points,n=[];return e.segments.forEach((({start:t,end:e})=>{e=Yp(t,e,a);const s=a[t],r=a[e];null!==o?(n.push({x:s.x,y:o}),n.push({x:r.x,y:o})):null!==i&&(n.push({x:i,y:s.y}),n.push({x:i,y:r.y}))})),n}(t,e),i.length?new Sp({points:i,options:{tension:0},_loop:o,_fullLoop:o}):null}function Xp(t){return t&&!1!==t.fill}function Kp(t,e,i){let o=t[e].fill;const a=[e];let n;if(!i)return o;for(;!1!==o&&-1===a.indexOf(o);){if(!ml(o))return o;if(n=t[o],!n)return!1;if(n.visible)return o;a.push(o),o=n.fill}return!1}function Gp(t,e,i){const o=function(t){const e=t.options,i=e.fill;let o=fl(i&&i.target,i);void 0===o&&(o=!!e.backgroundColor);if(!1===o||null===o)return!1;if(!0===o)return"origin";return o}(t);if(pl(o))return!isNaN(o.value)&&o;let a=parseFloat(o);return ml(a)&&Math.floor(a)===a?function(t,e,i,o){"-"!==t&&"+"!==t||(i=e+i);if(i===e||i<0||i>=o)return!1;return i}(o[0],e,a,i):["origin","start","end","stack","shape"].indexOf(o)>=0&&o}function Qp(t,e,i){const o=[];for(let a=0;a<i.length;a++){const n=i[a],{first:s,last:r,point:l}=Jp(n,e,"x");if(!(!l||s&&r))if(s)o.unshift(l);else if(t.push(l),!r)break}t.push(...o)}function Jp(t,e,i){const o=t.interpolate(e,i);if(!o)return{};const a=o[i],n=t.segments,s=t.points;let r=!1,l=!1;for(let t=0;t<n.length;t++){const e=n[t],o=s[e.start][i],c=s[e.end][i];if(ic(a,o,c)){r=a===o,l=a===c;break}}return{first:r,last:l,point:o}}class tm{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:o,y:a,radius:n}=this;return e=e||{start:0,end:zl},t.arc(o,a,n,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:o}=this,a=t.angle;return{x:e+Math.cos(a)*o,y:i+Math.sin(a)*o,angle:a}}}function em(t){const{chart:e,fill:i,line:o}=t;if(ml(i))return function(t,e){const i=t.getDatasetMeta(e),o=i&&t.isDatasetVisible(e);return o?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:o}=t,a=[],n=o.segments,s=o.points,r=function(t,e){const i=[],o=t.getMatchingVisibleMetas("line");for(let t=0;t<o.length;t++){const a=o[t];if(a.index===e)break;a.hidden||i.unshift(a.dataset)}return i}(e,i);r.push(Zp({x:null,y:e.bottom},o));for(let t=0;t<n.length;t++){const e=n[t];for(let t=e.start;t<=e.end;t++)Qp(a,s[t],r)}return new Sp({points:a,options:{}})}(t);if("shape"===i)return!0;const a=function(t){const e=t.scale||{};if(e.getPointPositionForValue)return function(t){const{scale:e,fill:i}=t,o=e.options,a=e.getLabels().length,n=o.reverse?e.max:e.min,s=function(t,e,i){let o;return o="start"===t?i:"end"===t?e.options.reverse?e.min:e.max:pl(t)?t.value:e.getBaseValue(),o}(i,e,n),r=[];if(o.grid.circular){const t=e.getPointPositionForValue(0,n);return new tm({x:t.x,y:t.y,radius:e.getDistanceFromCenterForValue(s)})}for(let t=0;t<a;++t)r.push(e.getPointPositionForValue(t,s));return r}(t);return function(t){const{scale:e={},fill:i}=t,o=function(t,e){let i=null;return"start"===t?i=e.bottom:"end"===t?i=e.top:pl(t)?i=e.getPixelForValue(t.value):e.getBasePixel&&(i=e.getBasePixel()),i}(i,e);if(ml(o)){const t=e.isHorizontal();return{x:t?o:null,y:t?null:o}}return null}(t)}(t);return a instanceof tm?a:Zp(a,o)}function im(t,e,i){const o=em(e),{chart:a,index:n,line:s,scale:r,axis:l}=e,c=s.options,d=c.fill,h=c.backgroundColor,{above:u=h,below:p=h}=d||{},m=a.getDatasetMeta(n),_=th(a,m);o&&s.points.length&&(Nc(t,i),function(t,e){const{line:i,target:o,above:a,below:n,area:s,scale:r,clip:l}=e,c=i._loop?"angle":e.axis;t.save();let d=n;n!==a&&("x"===c?(om(t,o,s.top),nm(t,{line:i,target:o,color:a,scale:r,property:c,clip:l}),t.restore(),t.save(),om(t,o,s.bottom)):"y"===c&&(am(t,o,s.left),nm(t,{line:i,target:o,color:n,scale:r,property:c,clip:l}),t.restore(),t.save(),am(t,o,s.right),d=a));nm(t,{line:i,target:o,color:d,scale:r,property:c,clip:l}),t.restore()}(t,{line:s,target:o,above:u,below:p,area:i,scale:r,axis:l,clip:_}),jc(t))}function om(t,e,i){const{segments:o,points:a}=e;let n=!0,s=!1;t.beginPath();for(const r of o){const{start:o,end:l}=r,c=a[o],d=a[Yp(o,l,a)];n?(t.moveTo(c.x,c.y),n=!1):(t.lineTo(c.x,i),t.lineTo(c.x,c.y)),s=!!e.pathSegment(t,r,{move:s}),s?t.closePath():t.lineTo(d.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function am(t,e,i){const{segments:o,points:a}=e;let n=!0,s=!1;t.beginPath();for(const r of o){const{start:o,end:l}=r,c=a[o],d=a[Yp(o,l,a)];n?(t.moveTo(c.x,c.y),n=!1):(t.lineTo(i,c.y),t.lineTo(c.x,c.y)),s=!!e.pathSegment(t,r,{move:s}),s?t.closePath():t.lineTo(i,d.y)}t.lineTo(i,e.first().y),t.closePath(),t.clip()}function nm(t,e){const{line:i,target:o,property:a,color:n,scale:s,clip:r}=e,l=function(t,e,i){const o=t.segments,a=t.points,n=e.points,s=[];for(const t of o){let{start:o,end:r}=t;r=Yp(o,r,a);const l=Up(i,a[o],a[r],t.loop);if(!e.segments){s.push({source:t,target:l,start:a[o],end:a[r]});continue}const c=Xd(e,l);for(const e of c){const o=Up(i,n[e.start],n[e.end],e.loop),r=Zd(t,a,o);for(const t of r)s.push({source:t,target:e,start:{[i]:qp(l,o,"start",Math.max)},end:{[i]:qp(l,o,"end",Math.min)}})}}return s}(i,o,a);for(const{source:e,target:c,start:d,end:h}of l){const{style:{backgroundColor:l=n}={}}=e,u=!0!==o;t.save(),t.fillStyle=l,sm(t,s,r,u&&Up(a,d,h)),t.beginPath();const p=!!i.pathSegment(t,e);let m;if(u){p?t.closePath():rm(t,o,h,a);const e=!!o.pathSegment(t,c,{move:p,reverse:!0});m=p&&e,m||rm(t,o,d,a)}t.closePath(),t.fill(m?"evenodd":"nonzero"),t.restore()}}function sm(t,e,i,o){const a=e.chart.chartArea,{property:n,start:s,end:r}=o||{};if("x"===n||"y"===n){let e,o,l,c;"x"===n?(e=s,o=a.top,l=r,c=a.bottom):(e=a.left,o=s,l=a.right,c=r),t.beginPath(),i&&(e=Math.max(e,i.left),l=Math.min(l,i.right),o=Math.max(o,i.top),c=Math.min(c,i.bottom)),t.rect(e,o,l-e,c-o),t.clip()}}function rm(t,e,i,o){const a=e.interpolate(i,o);a&&t.lineTo(a.x,a.y)}var lm={id:"filler",afterDatasetsUpdate(t,e,i){const o=(t.data.datasets||[]).length,a=[];let n,s,r,l;for(s=0;s<o;++s)n=t.getDatasetMeta(s),r=n.dataset,l=null,r&&r.options&&r instanceof Sp&&(l={visible:t.isDatasetVisible(s),index:s,fill:Gp(r,s,o),chart:t,axis:n.controller.options.indexAxis,scale:n.vScale,line:r}),n.$filler=l,a.push(l);for(s=0;s<o;++s)l=a[s],l&&!1!==l.fill&&(l.fill=Kp(a,s,i.propagate))},beforeDraw(t,e,i){const o="beforeDraw"===i.drawTime,a=t.getSortedVisibleDatasetMetas(),n=t.chartArea;for(let e=a.length-1;e>=0;--e){const i=a[e].$filler;i&&(i.line.updateControlPoints(n,i.axis),o&&i.fill&&im(t.ctx,i,n))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const o=t.getSortedVisibleDatasetMetas();for(let e=o.length-1;e>=0;--e){const i=o[e].$filler;Xp(i)&&im(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const o=e.meta.$filler;Xp(o)&&"beforeDatasetDraw"===i.drawTime&&im(t.ctx,o,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const cm=(t,e)=>{let{boxHeight:i=e,boxWidth:o=e}=t;return t.usePointStyle&&(i=Math.min(i,e),o=t.pointStyleWidth||Math.min(o,e)),{boxWidth:o,boxHeight:i,itemHeight:Math.max(e,i)}};class dm extends ku{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=bl(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,o=od(i.font),a=o.size,n=this._computeTitleHeight(),{boxWidth:s,itemHeight:r}=cm(i,a);let l,c;e.font=o.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(n,a,s,r)+10):(c=this.maxHeight,l=this._fitCols(n,o,s,r)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,o){const{ctx:a,maxWidth:n,options:{labels:{padding:s}}}=this,r=this.legendHitBoxes=[],l=this.lineWidths=[0],c=o+s;let d=t;a.textAlign="left",a.textBaseline="middle";let h=-1,u=-c;return this.legendItems.forEach(((t,p)=>{const m=i+e/2+a.measureText(t.text).width;(0===p||l[l.length-1]+m+2*s>n)&&(d+=c,l[l.length-(p>0?0:1)]=0,u+=c,h++),r[p]={left:0,top:u,row:h,width:m,height:o},l[l.length-1]+=m+s})),d}_fitCols(t,e,i,o){const{ctx:a,maxHeight:n,options:{labels:{padding:s}}}=this,r=this.legendHitBoxes=[],l=this.columnSizes=[],c=n-t;let d=s,h=0,u=0,p=0,m=0;return this.legendItems.forEach(((t,n)=>{const{itemWidth:_,itemHeight:f}=function(t,e,i,o,a){const n=function(t,e,i,o){let a=t.text;a&&"string"!=typeof a&&(a=a.reduce(((t,e)=>t.length>e.length?t:e)));return e+i.size/2+o.measureText(a).width}(o,t,e,i),s=function(t,e,i){let o=t;"string"!=typeof e.text&&(o=hm(e,i));return o}(a,o,e.lineHeight);return{itemWidth:n,itemHeight:s}}(i,e,a,t,o);n>0&&u+f+2*s>c&&(d+=h+s,l.push({width:h,height:u}),p+=h+s,m++,h=u=0),r[n]={left:p,top:u,col:m,width:_,height:f},h=Math.max(h,_),u+=f+s})),d+=h,l.push({width:h,height:u}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:o},rtl:a}}=this,n=Wd(a,this.left,this.width);if(this.isHorizontal()){let a=0,s=uc(i,this.left+o,this.right-this.lineWidths[a]);for(const r of e)a!==r.row&&(a=r.row,s=uc(i,this.left+o,this.right-this.lineWidths[a])),r.top+=this.top+t+o,r.left=n.leftForLtr(n.x(s),r.width),s+=r.width+o}else{let a=0,s=uc(i,this.top+t+o,this.bottom-this.columnSizes[a].height);for(const r of e)r.col!==a&&(a=r.col,s=uc(i,this.top+t+o,this.bottom-this.columnSizes[a].height)),r.top=s,r.left+=this.left+o,r.left=n.leftForLtr(n.x(r.left),r.width),s+=r.height+o}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;Nc(t,this),this._draw(),jc(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:o}=this,{align:a,labels:n}=t,s=$c.color,r=Wd(t.rtl,this.left,this.width),l=od(n.font),{padding:c}=n,d=l.size,h=d/2;let u;this.drawTitle(),o.textAlign=r.textAlign("left"),o.textBaseline="middle",o.lineWidth=.5,o.font=l.string;const{boxWidth:p,boxHeight:m,itemHeight:_}=cm(n,d),f=this.isHorizontal(),g=this._computeTitleHeight();u=f?{x:uc(a,this.left+c,this.right-i[0]),y:this.top+c+g,line:0}:{x:this.left+c,y:uc(a,this.top+g+c,this.bottom-e[0].height),line:0},Bd(this.ctx,t.textDirection);const b=_+c;this.legendItems.forEach(((v,y)=>{o.strokeStyle=v.fontColor,o.fillStyle=v.fontColor;const w=o.measureText(v.text).width,x=r.textAlign(v.textAlign||(v.textAlign=n.textAlign)),k=p+h+w;let S=u.x,T=u.y;r.setWidth(this.width),f?y>0&&S+k+c>this.right&&(T=u.y+=b,u.line++,S=u.x=uc(a,this.left+c,this.right-i[u.line])):y>0&&T+b>this.bottom&&(S=u.x=S+e[u.line].width+c,u.line++,T=u.y=uc(a,this.top+g+c,this.bottom-e[u.line].height));if(function(t,e,i){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;o.save();const a=fl(i.lineWidth,1);if(o.fillStyle=fl(i.fillStyle,s),o.lineCap=fl(i.lineCap,"butt"),o.lineDashOffset=fl(i.lineDashOffset,0),o.lineJoin=fl(i.lineJoin,"miter"),o.lineWidth=a,o.strokeStyle=fl(i.strokeStyle,s),o.setLineDash(fl(i.lineDash,[])),n.usePointStyle){const s={radius:m*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:a},l=r.xPlus(t,p/2);Rc(o,s,l,e+h,n.pointStyleWidth&&p)}else{const n=e+Math.max((d-m)/2,0),s=r.leftForLtr(t,p),l=ed(i.borderRadius);o.beginPath(),Object.values(l).some((t=>0!==t))?Zc(o,{x:s,y:n,w:p,h:m,radius:l}):o.rect(s,n,p,m),o.fill(),0!==a&&o.stroke()}o.restore()}(r.x(S),T,v),S=((t,e,i,o)=>t===(o?"left":"right")?i:"center"===t?(e+i)/2:e)(x,S+p+h,f?S+k:this.right,t.rtl),function(t,e,i){qc(o,i.text,t,e+_/2,l,{strikethrough:i.hidden,textAlign:r.textAlign(i.textAlign)})}(r.x(S),T,v),f)u.x+=k+c;else if("string"!=typeof v.text){const t=l.lineHeight;u.y+=hm(v,t)+c}else u.y+=b})),Ud(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=od(e.font),o=id(e.padding);if(!e.display)return;const a=Wd(t.rtl,this.left,this.width),n=this.ctx,s=e.position,r=i.size/2,l=o.top+r;let c,d=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),c=this.top+l,d=uc(t.align,d,this.right-h);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);c=l+uc(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const u=uc(s,d,d+h);n.textAlign=a.textAlign(hc(s)),n.textBaseline="middle",n.strokeStyle=e.color,n.fillStyle=e.color,n.font=i.string,qc(n,e.text,u,c,i)}_computeTitleHeight(){const t=this.options.title,e=od(t.font),i=id(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,o,a;if(ic(t,this.left,this.right)&&ic(e,this.top,this.bottom))for(a=this.legendHitBoxes,i=0;i<a.length;++i)if(o=a[i],ic(t,o.left,o.left+o.width)&&ic(e,o.top,o.top+o.height))return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){if(("mousemove"===t||"mouseout"===t)&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){const o=this._hoveredItem,a=((t,e)=>null!==t&&null!==e&&t.datasetIndex===e.datasetIndex&&t.index===e.index)(o,i);o&&!a&&bl(e.onLeave,[t,o,this],this),this._hoveredItem=i,i&&!a&&bl(e.onHover,[t,i,this],this)}else i&&bl(e.onClick,[t,i,this],this)}}function hm(t,e){return e*(t.text?t.text.length:0)}var um={id:"legend",_element:dm,start(t,e,i){const o=t.legend=new dm({ctx:t.ctx,options:i,chart:t});au.configure(t,o,i),au.addBox(t,o)},stop(t){au.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const o=t.legend;au.configure(t,o,i),o.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const o=e.datasetIndex,a=i.chart;a.isDatasetVisible(o)?(a.hide(o),e.hidden=!0):(a.show(o),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:o,textAlign:a,color:n,useBorderRadius:s,borderRadius:r}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const l=t.controller.getStyle(i?0:void 0),c=id(l.borderWidth);return{text:e[t.index].label,fillStyle:l.backgroundColor,fontColor:n,hidden:!t.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:l.borderColor,pointStyle:o||l.pointStyle,rotation:l.rotation,textAlign:a||l.textAlign,borderRadius:s&&(r||l.borderRadius),datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class pm extends ku{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const o=ul(i.text)?i.text.length:1;this._padding=id(i.padding);const a=o*od(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:o,right:a,options:n}=this,s=n.align;let r,l,c,d=0;return this.isHorizontal()?(l=uc(s,i,a),c=e+t,r=a-i):("left"===n.position?(l=i+t,c=uc(s,o,e),d=-.5*$l):(l=a-t,c=uc(s,e,o),d=.5*$l),r=o-e),{titleX:l,titleY:c,maxWidth:r,rotation:d}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=od(e.font),o=i.lineHeight/2+this._padding.top,{titleX:a,titleY:n,maxWidth:s,rotation:r}=this._drawArgs(o);qc(t,e.text,0,0,i,{color:e.color,maxWidth:s,rotation:r,textAlign:hc(e.align),textBaseline:"middle",translation:[a,n]})}}var mm={id:"title",_element:pm,start(t,e,i){!function(t,e){const i=new pm({ctx:t.ctx,options:e,chart:t});au.configure(t,i,e),au.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;au.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const o=t.titleBlock;au.configure(t,o,i),o.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const _m=new WeakMap;var fm={id:"subtitle",start(t,e,i){const o=new pm({ctx:t.ctx,options:i,chart:t});au.configure(t,o,i),au.addBox(t,o),_m.set(t,o)},stop(t){au.removeBox(t,_m.get(t)),_m.delete(t)},beforeUpdate(t,e,i){const o=_m.get(t);au.configure(t,o,i),o.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const gm={average(t){if(!t.length)return!1;let e,i,o=new Set,a=0,n=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();o.add(t.x),a+=t.y,++n}}if(0===n||0===o.size)return!1;const s=[...o].reduce(((t,e)=>t+e))/o.size;return{x:s,y:a/n}},nearest(t,e){if(!t.length)return!1;let i,o,a,n=e.x,s=e.y,r=Number.POSITIVE_INFINITY;for(i=0,o=t.length;i<o;++i){const o=t[i].element;if(o&&o.hasValue()){const t=Gl(e,o.getCenterPoint());t<r&&(r=t,a=o)}}if(a){const t=a.tooltipPosition();n=t.x,s=t.y}return{x:n,y:s}}};function bm(t,e){return e&&(ul(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function vm(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function ym(t,e){const{element:i,datasetIndex:o,index:a}=e,n=t.getDatasetMeta(o).controller,{label:s,value:r}=n.getLabelAndValue(a);return{chart:t,label:s,parsed:n.getParsed(a),raw:t.data.datasets[o].data[a],formattedValue:r,dataset:n.getDataset(),dataIndex:a,datasetIndex:o,element:i}}function wm(t,e){const i=t.chart.ctx,{body:o,footer:a,title:n}=t,{boxWidth:s,boxHeight:r}=e,l=od(e.bodyFont),c=od(e.titleFont),d=od(e.footerFont),h=n.length,u=a.length,p=o.length,m=id(e.padding);let _=m.height,f=0,g=o.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(g+=t.beforeBody.length+t.afterBody.length,h&&(_+=h*c.lineHeight+(h-1)*e.titleSpacing+e.titleMarginBottom),g){_+=p*(e.displayColors?Math.max(r,l.lineHeight):l.lineHeight)+(g-p)*l.lineHeight+(g-1)*e.bodySpacing}u&&(_+=e.footerMarginTop+u*d.lineHeight+(u-1)*e.footerSpacing);let b=0;const v=function(t){f=Math.max(f,i.measureText(t).width+b)};return i.save(),i.font=c.string,vl(t.title,v),i.font=l.string,vl(t.beforeBody.concat(t.afterBody),v),b=e.displayColors?s+2+e.boxPadding:0,vl(o,(t=>{vl(t.before,v),vl(t.lines,v),vl(t.after,v)})),b=0,i.font=d.string,vl(t.footer,v),i.restore(),f+=m.width,{width:f,height:_}}function xm(t,e,i,o){const{x:a,width:n}=i,{width:s,chartArea:{left:r,right:l}}=t;let c="center";return"center"===o?c=a<=(r+l)/2?"left":"right":a<=n/2?c="left":a>=s-n/2&&(c="right"),function(t,e,i,o){const{x:a,width:n}=o,s=i.caretSize+i.caretPadding;return"left"===t&&a+n+s>e.width||"right"===t&&a-n-s<0||void 0}(c,t,e,i)&&(c="center"),c}function km(t,e,i){const o=i.yAlign||e.yAlign||function(t,e){const{y:i,height:o}=e;return i<o/2?"top":i>t.height-o/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||xm(t,e,i,o),yAlign:o}}function Sm(t,e,i,o){const{caretSize:a,caretPadding:n,cornerRadius:s}=t,{xAlign:r,yAlign:l}=i,c=a+n,{topLeft:d,topRight:h,bottomLeft:u,bottomRight:p}=ed(s);let m=function(t,e){let{x:i,width:o}=t;return"right"===e?i-=o:"center"===e&&(i-=o/2),i}(e,r);const _=function(t,e,i){let{y:o,height:a}=t;return"top"===e?o+=i:o-="bottom"===e?a+i:a/2,o}(e,l,c);return"center"===l?"left"===r?m+=c:"right"===r&&(m-=c):"left"===r?m-=Math.max(d,u)+a:"right"===r&&(m+=Math.max(h,p)+a),{x:ec(m,0,o.width-e.width),y:ec(_,0,o.height-e.height)}}function Tm(t,e,i){const o=id(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-o.right:t.x+o.left}function Mm(t){return bm([],vm(t))}function Dm(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}const Cm={beforeTitle:cl,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,o=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(o>0&&e.dataIndex<o)return i[e.dataIndex]}return""},afterTitle:cl,beforeBody:cl,beforeLabel:cl,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return hl(i)||(e+=i),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:cl,afterBody:cl,beforeFooter:cl,footer:cl,afterFooter:cl};function Am(t,e,i,o){const a=t[e].call(i,o);return void 0===a?Cm[e].call(i,o):a}class Pm extends ku{static positioners=gm;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),o=i.enabled&&e.options.animation&&i.animations,a=new sh(this.chart,o);return o._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=(t=this.chart.getContext(),e=this,i=this._tooltipItems,nd(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,o=Am(i,"beforeTitle",this,t),a=Am(i,"title",this,t),n=Am(i,"afterTitle",this,t);let s=[];return s=bm(s,vm(o)),s=bm(s,vm(a)),s=bm(s,vm(n)),s}getBeforeBody(t,e){return Mm(Am(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,o=[];return vl(t,(t=>{const e={before:[],lines:[],after:[]},a=Dm(i,t);bm(e.before,vm(Am(a,"beforeLabel",this,t))),bm(e.lines,Am(a,"label",this,t)),bm(e.after,vm(Am(a,"afterLabel",this,t))),o.push(e)})),o}getAfterBody(t,e){return Mm(Am(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,o=Am(i,"beforeFooter",this,t),a=Am(i,"footer",this,t),n=Am(i,"afterFooter",this,t);let s=[];return s=bm(s,vm(o)),s=bm(s,vm(a)),s=bm(s,vm(n)),s}_createItems(t){const e=this._active,i=this.chart.data,o=[],a=[],n=[];let s,r,l=[];for(s=0,r=e.length;s<r;++s)l.push(ym(this.chart,e[s]));return t.filter&&(l=l.filter(((e,o,a)=>t.filter(e,o,a,i)))),t.itemSort&&(l=l.sort(((e,o)=>t.itemSort(e,o,i)))),vl(l,(e=>{const i=Dm(t.callbacks,e);o.push(Am(i,"labelColor",this,e)),a.push(Am(i,"labelPointStyle",this,e)),n.push(Am(i,"labelTextColor",this,e))})),this.labelColors=o,this.labelPointStyles=a,this.labelTextColors=n,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),o=this._active;let a,n=[];if(o.length){const t=gm[i.position].call(this,o,this._eventPosition);n=this._createItems(i),this.title=this.getTitle(n,i),this.beforeBody=this.getBeforeBody(n,i),this.body=this.getBody(n,i),this.afterBody=this.getAfterBody(n,i),this.footer=this.getFooter(n,i);const e=this._size=wm(this,i),s=Object.assign({},t,e),r=km(this.chart,i,s),l=Sm(i,s,r,this.chart);this.xAlign=r.xAlign,this.yAlign=r.yAlign,a={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(a={opacity:0});this._tooltipItems=n,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,o){const a=this.getCaretPosition(t,i,o);e.lineTo(a.x1,a.y1),e.lineTo(a.x2,a.y2),e.lineTo(a.x3,a.y3)}getCaretPosition(t,e,i){const{xAlign:o,yAlign:a}=this,{caretSize:n,cornerRadius:s}=i,{topLeft:r,topRight:l,bottomLeft:c,bottomRight:d}=ed(s),{x:h,y:u}=t,{width:p,height:m}=e;let _,f,g,b,v,y;return"center"===a?(v=u+m/2,"left"===o?(_=h,f=_-n,b=v+n,y=v-n):(_=h+p,f=_+n,b=v-n,y=v+n),g=_):(f="left"===o?h+Math.max(r,c)+n:"right"===o?h+p-Math.max(l,d)-n:this.caretX,"top"===a?(b=u,v=b-n,_=f-n,g=f+n):(b=u+m,v=b+n,_=f+n,g=f-n),y=b),{x1:_,x2:f,x3:g,y1:b,y2:v,y3:y}}drawTitle(t,e,i){const o=this.title,a=o.length;let n,s,r;if(a){const l=Wd(i.rtl,this.x,this.width);for(t.x=Tm(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",n=od(i.titleFont),s=i.titleSpacing,e.fillStyle=i.titleColor,e.font=n.string,r=0;r<a;++r)e.fillText(o[r],l.x(t.x),t.y+n.lineHeight/2),t.y+=n.lineHeight+s,r+1===a&&(t.y+=i.titleMarginBottom-s)}}_drawColorBox(t,e,i,o,a){const n=this.labelColors[i],s=this.labelPointStyles[i],{boxHeight:r,boxWidth:l}=a,c=od(a.bodyFont),d=Tm(this,"left",a),h=o.x(d),u=r<c.lineHeight?(c.lineHeight-r)/2:0,p=e.y+u;if(a.usePointStyle){const e={radius:Math.min(l,r)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},i=o.leftForLtr(h,l)+l/2,c=p+r/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,Ic(t,e,i,c),t.strokeStyle=n.borderColor,t.fillStyle=n.backgroundColor,Ic(t,e,i,c)}else{t.lineWidth=pl(n.borderWidth)?Math.max(...Object.values(n.borderWidth)):n.borderWidth||1,t.strokeStyle=n.borderColor,t.setLineDash(n.borderDash||[]),t.lineDashOffset=n.borderDashOffset||0;const e=o.leftForLtr(h,l),i=o.leftForLtr(o.xPlus(h,1),l-2),s=ed(n.borderRadius);Object.values(s).some((t=>0!==t))?(t.beginPath(),t.fillStyle=a.multiKeyBackground,Zc(t,{x:e,y:p,w:l,h:r,radius:s}),t.fill(),t.stroke(),t.fillStyle=n.backgroundColor,t.beginPath(),Zc(t,{x:i,y:p+1,w:l-2,h:r-2,radius:s}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(e,p,l,r),t.strokeRect(e,p,l,r),t.fillStyle=n.backgroundColor,t.fillRect(i,p+1,l-2,r-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:o}=this,{bodySpacing:a,bodyAlign:n,displayColors:s,boxHeight:r,boxWidth:l,boxPadding:c}=i,d=od(i.bodyFont);let h=d.lineHeight,u=0;const p=Wd(i.rtl,this.x,this.width),m=function(i){e.fillText(i,p.x(t.x+u),t.y+h/2),t.y+=h+a},_=p.textAlign(n);let f,g,b,v,y,w,x;for(e.textAlign=n,e.textBaseline="middle",e.font=d.string,t.x=Tm(this,_,i),e.fillStyle=i.bodyColor,vl(this.beforeBody,m),u=s&&"right"!==_?"center"===n?l/2+c:l+2+c:0,v=0,w=o.length;v<w;++v){for(f=o[v],g=this.labelTextColors[v],e.fillStyle=g,vl(f.before,m),b=f.lines,s&&b.length&&(this._drawColorBox(e,t,v,p,i),h=Math.max(d.lineHeight,r)),y=0,x=b.length;y<x;++y)m(b[y]),h=d.lineHeight;vl(f.after,m)}u=0,h=d.lineHeight,vl(this.afterBody,m),t.y-=a}drawFooter(t,e,i){const o=this.footer,a=o.length;let n,s;if(a){const r=Wd(i.rtl,this.x,this.width);for(t.x=Tm(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=r.textAlign(i.footerAlign),e.textBaseline="middle",n=od(i.footerFont),e.fillStyle=i.footerColor,e.font=n.string,s=0;s<a;++s)e.fillText(o[s],r.x(t.x),t.y+n.lineHeight/2),t.y+=n.lineHeight+i.footerSpacing}}drawBackground(t,e,i,o){const{xAlign:a,yAlign:n}=this,{x:s,y:r}=t,{width:l,height:c}=i,{topLeft:d,topRight:h,bottomLeft:u,bottomRight:p}=ed(o.cornerRadius);e.fillStyle=o.backgroundColor,e.strokeStyle=o.borderColor,e.lineWidth=o.borderWidth,e.beginPath(),e.moveTo(s+d,r),"top"===n&&this.drawCaret(t,e,i,o),e.lineTo(s+l-h,r),e.quadraticCurveTo(s+l,r,s+l,r+h),"center"===n&&"right"===a&&this.drawCaret(t,e,i,o),e.lineTo(s+l,r+c-p),e.quadraticCurveTo(s+l,r+c,s+l-p,r+c),"bottom"===n&&this.drawCaret(t,e,i,o),e.lineTo(s+u,r+c),e.quadraticCurveTo(s,r+c,s,r+c-u),"center"===n&&"left"===a&&this.drawCaret(t,e,i,o),e.lineTo(s,r+d),e.quadraticCurveTo(s,r,s+d,r),e.closePath(),e.fill(),o.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,o=i&&i.x,a=i&&i.y;if(o||a){const i=gm[t.position].call(this,this._active,this._eventPosition);if(!i)return;const n=this._size=wm(this,t),s=Object.assign({},i,this._size),r=km(e,t,s),l=Sm(t,s,r,e);o._to===l.x&&a._to===l.y||(this.xAlign=r.xAlign,this.yAlign=r.yAlign,this.width=n.width,this.height=n.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const o={width:this.width,height:this.height},a={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const n=id(e.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&s&&(t.save(),t.globalAlpha=i,this.drawBackground(a,t,o,e),Bd(t,e.textDirection),a.y+=n.top,this.drawTitle(a,t,e),this.drawBody(a,t,e),this.drawFooter(a,t,e),Ud(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,o=t.map((({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),a=!yl(i,o),n=this._positionChanged(o,e);(a||n)&&(this._active=o,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const o=this.options,a=this._active||[],n=this._getActiveElements(t,a,e,i),s=this._positionChanged(n,t),r=e||!yl(n,a)||s;return r&&(this._active=n,(o.enabled||o.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_getActiveElements(t,e,i,o){const a=this.options;if("mouseout"===t.type)return[];if(!o)return e.filter((t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index)));const n=this.chart.getElementsAtEventForMode(t,a.mode,a,i);return a.reverse&&n.reverse(),n}_positionChanged(t,e){const{caretX:i,caretY:o,options:a}=this,n=gm[a.position].call(this,t,e);return!1!==n&&(i!==n.x||o!==n.y)}}var Em={id:"tooltip",_element:Pm,positioners:gm,afterInit(t,e,i){i&&(t.tooltip=new Pm({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Cm},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Lm=Object.freeze({__proto__:null,Colors:Np,Decimation:Bp,Filler:lm,Legend:um,SubTitle:fm,Title:mm,Tooltip:Em});function $m(t,e,i,o){const a=t.indexOf(e);if(-1===a)return((t,e,i,o)=>("string"==typeof e?(i=t.push(e)-1,o.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,o);return a!==t.lastIndexOf(e)?i:a}function zm(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class Om extends $u{static id="category";static defaults={ticks:{callback:zm}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:o}of e)t[i]===o&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(hl(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:ec(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:$m(i,t,fl(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:o}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(o=this.getLabels().length-1)),this.min=i,this.max=o}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,o=[];let a=this.getLabels();a=0===t&&e===a.length-1?a:a.slice(t,e+1),this._valueRange=Math.max(a.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)o.push({value:i});return o}getLabelForValue(t){return zm.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Vm(t,e){const i=[],{bounds:o,step:a,min:n,max:s,precision:r,count:l,maxTicks:c,maxDigits:d,includeBounds:h}=t,u=a||1,p=c-1,{min:m,max:_}=e,f=!hl(n),g=!hl(s),b=!hl(l),v=(_-m)/(d+1);let y,w,x,k,S=Bl((_-m)/p/u)*u;if(S<1e-14&&!f&&!g)return[{value:m},{value:_}];k=Math.ceil(_/S)-Math.floor(m/S),k>p&&(S=Bl(k*S/p/u)*u),hl(r)||(y=Math.pow(10,r),S=Math.ceil(S*y)/y),"ticks"===o?(w=Math.floor(m/S)*S,x=Math.ceil(_/S)*S):(w=m,x=_),f&&g&&a&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((s-n)/a,S/1e3)?(k=Math.round(Math.min((s-n)/S,c)),S=(s-n)/k,w=n,x=s):b?(w=f?n:w,x=g?s:x,k=l-1,S=(x-w)/k):(k=(x-w)/S,k=Wl(k,Math.round(k),S/1e3)?Math.round(k):Math.ceil(k));const T=Math.max(Xl(S),Xl(w));y=Math.pow(10,hl(r)?T:r),w=Math.round(w*y)/y,x=Math.round(x*y)/y;let M=0;for(f&&(h&&w!==n?(i.push({value:n}),w<n&&M++,Wl(Math.round((w+M*S)*y)/y,n,Hm(n,v,t))&&M++):w<n&&M++);M<k;++M){const t=Math.round((w+M*S)*y)/y;if(g&&t>s)break;i.push({value:t})}return g&&h&&x!==s?i.length&&Wl(i[i.length-1].value,s,Hm(s,v,t))?i[i.length-1].value=s:i.push({value:s}):g&&x!==s||i.push({value:x}),i}function Hm(t,e,{horizontal:i,minRotation:o}){const a=ql(o),n=(i?Math.sin(a):Math.cos(a))||.001,s=.75*e*(""+t).length;return Math.min(e/n,s)}class Im extends $u{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return hl(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:o,max:a}=this;const n=t=>o=e?o:t,s=t=>a=i?a:t;if(t){const t=jl(o),e=jl(a);t<0&&e<0?s(0):t>0&&e>0&&n(0)}if(o===a){let e=0===a?1:Math.abs(.05*a);s(a+e),t||n(o-e)}this.min=o,this.max=a}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:o}=t;return o?(e=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const o=Vm({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&Yl(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const o=(i-e)/Math.max(t.length-1,1)/2;e-=o,i+=o}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return Tc(t,this.chart.options.locale,this.options.ticks.format)}}class Rm extends Im{static id="linear";static defaults={ticks:{callback:Dc.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=ml(t)?t:0,this.max=ml(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=ql(this.options.ticks.minRotation),o=(t?Math.sin(i):Math.cos(i))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,a.lineHeight/o))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const Fm=t=>Math.floor(Nl(t)),Nm=(t,e)=>Math.pow(10,Fm(t)+e);function jm(t){return 1===t/Math.pow(10,Fm(t))}function Wm(t,e,i){const o=Math.pow(10,i),a=Math.floor(t/o);return Math.ceil(e/o)-a}function Bm(t,{min:e,max:i}){e=_l(t.min,e);const o=[],a=Fm(e);let n=function(t,e){let i=Fm(e-t);for(;Wm(t,e,i)>10;)i++;for(;Wm(t,e,i)<10;)i--;return Math.min(i,Fm(t))}(e,i),s=n<0?Math.pow(10,Math.abs(n)):1;const r=Math.pow(10,n),l=a>n?Math.pow(10,a):0,c=Math.round((e-l)*s)/s,d=Math.floor((e-l)/r/10)*r*10;let h=Math.floor((c-d)/Math.pow(10,n)),u=_l(t.min,Math.round((l+d+h*Math.pow(10,n))*s)/s);for(;u<i;)o.push({value:u,major:jm(u),significand:h}),h>=10?h=h<15?15:20:h++,h>=20&&(n++,h=2,s=n>=0?1:s),u=Math.round((l+d+h*Math.pow(10,n))*s)/s;const p=_l(t.max,u);return o.push({value:p,major:jm(p),significand:h}),o}class Um extends $u{static id="logarithmic";static defaults={ticks:{callback:Dc.formatters.logarithmic,major:{enabled:!0}}};constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Im.prototype.parse.apply(this,[t,e]);if(0!==i)return ml(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=ml(t)?Math.max(0,t):null,this.max=ml(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ml(this._userMin)&&(this.min=t===Nm(this.min,0)?Nm(this.min,-1):Nm(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,o=this.max;const a=e=>i=t?i:e,n=t=>o=e?o:t;i===o&&(i<=0?(a(1),n(10)):(a(Nm(i,-1)),n(Nm(o,1)))),i<=0&&a(Nm(o,-1)),o<=0&&n(Nm(i,1)),this.min=i,this.max=o}buildTicks(){const t=this.options,e=Bm({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&Yl(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":Tc(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Nl(t),this._valueRange=Nl(this.max)-Nl(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Nl(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function Ym(t){const e=t.ticks;if(e.display&&t.display){const t=id(e.backdropPadding);return fl(e.font&&e.font.size,$c.font.size)+t.height}return 0}function qm(t,e,i,o,a){return t===o||t===a?{start:e-i/2,end:e+i/2}:t<o||t>a?{start:e-i,end:e}:{start:e,end:e+i}}function Zm(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),o=[],a=[],n=t._pointLabels.length,s=t.options.pointLabels,r=s.centerPointLabels?$l/n:0;for(let h=0;h<n;h++){const n=s.setContext(t.getPointLabelContext(h));a[h]=n.padding;const u=t.getPointPosition(h,t.drawingArea+a[h],r),p=od(n.font),m=(l=t.ctx,c=p,d=ul(d=t._pointLabels[h])?d:[d],{w:Oc(l,c.string,d),h:d.length*c.lineHeight});o[h]=m;const _=Jl(t.getIndexAngle(h)+r),f=Math.round(Zl(_));Xm(i,e,_,qm(f,u.x,m.w,0,180),qm(f,u.y,m.h,90,270))}var l,c,d;t.setCenterPoint(e.l-i.l,i.r-e.r,e.t-i.t,i.b-e.b),t._pointLabelItems=function(t,e,i){const o=[],a=t._pointLabels.length,n=t.options,{centerPointLabels:s,display:r}=n.pointLabels,l={extra:Ym(n)/2,additionalAngle:s?$l/a:0};let c;for(let n=0;n<a;n++){l.padding=i[n],l.size=e[n];const a=Km(t,n,l);o.push(a),"auto"===r&&(a.visible=Gm(a,c),a.visible&&(c=a))}return o}(t,o,a)}function Xm(t,e,i,o,a){const n=Math.abs(Math.sin(i)),s=Math.abs(Math.cos(i));let r=0,l=0;o.start<e.l?(r=(e.l-o.start)/n,t.l=Math.min(t.l,e.l-r)):o.end>e.r&&(r=(o.end-e.r)/n,t.r=Math.max(t.r,e.r+r)),a.start<e.t?(l=(e.t-a.start)/s,t.t=Math.min(t.t,e.t-l)):a.end>e.b&&(l=(a.end-e.b)/s,t.b=Math.max(t.b,e.b+l))}function Km(t,e,i){const o=t.drawingArea,{extra:a,additionalAngle:n,padding:s,size:r}=i,l=t.getPointPosition(e,o+a+s,n),c=Math.round(Zl(Jl(l.angle+Il))),d=function(t,e,i){90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e);return t}(l.y,r.h,c),h=function(t){if(0===t||180===t)return"center";if(t<180)return"left";return"right"}(c),u=function(t,e,i){"right"===i?t-=e:"center"===i&&(t-=e/2);return t}(l.x,r.w,h);return{visible:!0,x:l.x,y:d,textAlign:h,left:u,top:d,right:u+r.w,bottom:d+r.h}}function Gm(t,e){if(!e)return!0;const{left:i,top:o,right:a,bottom:n}=t;return!(Fc({x:i,y:o},e)||Fc({x:i,y:n},e)||Fc({x:a,y:o},e)||Fc({x:a,y:n},e))}function Qm(t,e,i){const{left:o,top:a,right:n,bottom:s}=i,{backdropColor:r}=e;if(!hl(r)){const i=ed(e.borderRadius),l=id(e.backdropPadding);t.fillStyle=r;const c=o-l.left,d=a-l.top,h=n-o+l.width,u=s-a+l.height;Object.values(i).some((t=>0!==t))?(t.beginPath(),Zc(t,{x:c,y:d,w:h,h:u,radius:i}),t.fill()):t.fillRect(c,d,h,u)}}function Jm(t,e,i,o){const{ctx:a}=t;if(i)a.arc(t.xCenter,t.yCenter,e,0,zl);else{let i=t.getPointPosition(0,e);a.moveTo(i.x,i.y);for(let n=1;n<o;n++)i=t.getPointPosition(n,e),a.lineTo(i.x,i.y)}}class t_ extends Im{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Dc.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=id(Ym(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=ml(t)&&!isNaN(t)?t:0,this.max=ml(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ym(this.options))}generateTickLabels(t){Im.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map(((t,e)=>{const i=bl(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""})).filter(((t,e)=>this.chart.getDataVisibility(e)))}fit(){const t=this.options;t.display&&t.pointLabels.display?Zm(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,o){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-o)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,o))}getIndexAngle(t){return Jl(t*(zl/(this._pointLabels.length||1))+ql(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(hl(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(hl(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return function(t,e,i){return nd(t,{label:i,index:e,type:"pointLabel"})}(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const o=this.getIndexAngle(t)-Il+i;return{x:Math.cos(o)*e+this.xCenter,y:Math.sin(o)*e+this.yCenter,angle:o}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:o,bottom:a}=this._pointLabelItems[t];return{left:e,top:i,right:o,bottom:a}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),Jm(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:o,border:a}=e,n=this._pointLabels.length;let s,r,l;if(e.pointLabels.display&&function(t,e){const{ctx:i,options:{pointLabels:o}}=t;for(let a=e-1;a>=0;a--){const e=t._pointLabelItems[a];if(!e.visible)continue;const n=o.setContext(t.getPointLabelContext(a));Qm(i,n,e);const s=od(n.font),{x:r,y:l,textAlign:c}=e;qc(i,t._pointLabels[a],r,l+s.lineHeight/2,s,{color:n.color,textAlign:c,textBaseline:"middle"})}}(this,n),o.display&&this.ticks.forEach(((t,e)=>{if(0!==e||0===e&&this.min<0){r=this.getDistanceFromCenterForValue(t.value);const i=this.getContext(e),s=o.setContext(i),l=a.setContext(i);!function(t,e,i,o,a){const n=t.ctx,s=e.circular,{color:r,lineWidth:l}=e;!s&&!o||!r||!l||i<0||(n.save(),n.strokeStyle=r,n.lineWidth=l,n.setLineDash(a.dash||[]),n.lineDashOffset=a.dashOffset,n.beginPath(),Jm(t,i,s,o),n.closePath(),n.stroke(),n.restore())}(this,s,r,n,l)}})),i.display){for(t.save(),s=n-1;s>=0;s--){const o=i.setContext(this.getPointLabelContext(s)),{color:a,lineWidth:n}=o;n&&a&&(t.lineWidth=n,t.strokeStyle=a,t.setLineDash(o.borderDash),t.lineDashOffset=o.borderDashOffset,r=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),l=this.getPointPosition(s,r),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const o=this.getIndexAngle(0);let a,n;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(o),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((o,s)=>{if(0===s&&this.min>=0&&!e.reverse)return;const r=i.setContext(this.getContext(s)),l=od(r.font);if(a=this.getDistanceFromCenterForValue(this.ticks[s].value),r.showLabelBackdrop){t.font=l.string,n=t.measureText(o.label).width,t.fillStyle=r.backdropColor;const e=id(r.backdropPadding);t.fillRect(-n/2-e.left,-a-l.size/2-e.top,n+e.width,l.size+e.height)}qc(t,o.label,0,-a,l,{color:r.color,strokeColor:r.textStrokeColor,strokeWidth:r.textStrokeWidth})})),t.restore()}drawTitle(){}}const e_={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},i_=Object.keys(e_);function o_(t,e){return t-e}function a_(t,e){if(hl(e))return null;const i=t._adapter,{parser:o,round:a,isoWeekday:n}=t._parseOpts;let s=e;return"function"==typeof o&&(s=o(s)),ml(s)||(s="string"==typeof o?i.parse(s,o):i.parse(s)),null===s?null:(a&&(s="week"!==a||!Ul(n)&&!0!==n?i.startOf(s,a):i.startOf(s,"isoWeek",n)),+s)}function n_(t,e,i,o){const a=i_.length;for(let n=i_.indexOf(t);n<a-1;++n){const t=e_[i_[n]],a=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((i-e)/(a*t.size))<=o)return i_[n]}return i_[a-1]}function s_(t,e,i){if(i){if(i.length){const{lo:o,hi:a}=oc(i,e);t[i[o]>=e?i[o]:i[a]]=!0}}else t[e]=!0}function r_(t,e,i){const o=[],a={},n=e.length;let s,r;for(s=0;s<n;++s)r=e[s],a[r]=s,o.push({value:r,major:!1});return 0!==n&&i?function(t,e,i,o){const a=t._adapter,n=+a.startOf(e[0].value,o),s=e[e.length-1].value;let r,l;for(r=n;r<=s;r=+a.add(r,1,o))l=i[r],l>=0&&(e[l].major=!0);return e}(t,o,a,i):o}class l_ extends $u{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const i=t.time||(t.time={}),o=this._adapter=new Ih._date(t.adapters.date);o.init(e),Tl(i.displayFormats,o.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:a_(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:o,max:a,minDefined:n,maxDefined:s}=this.getUserBounds();function r(t){n||isNaN(t.min)||(o=Math.min(o,t.min)),s||isNaN(t.max)||(a=Math.max(a,t.max))}n&&s||(r(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||r(this.getMinMax(!1))),o=ml(o)&&!isNaN(o)?o:+e.startOf(Date.now(),i),a=ml(a)&&!isNaN(a)?a:+e.endOf(Date.now(),i)+1,this.min=Math.min(o,a-1),this.max=Math.max(o+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,o="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&o.length&&(this.min=this._userMin||o[0],this.max=this._userMax||o[o.length-1]);const a=this.min,n=function(t,e,i){let o=0,a=t.length;for(;o<a&&t[o]<e;)o++;for(;a>o&&t[a-1]>i;)a--;return o>0||a<t.length?t.slice(o,a):t}(o,a,this.max);return this._unit=e.unit||(i.autoSkip?n_(e.minUnit,this.min,this.max,this._getLabelCapacity(a)):function(t,e,i,o,a){for(let n=i_.length-1;n>=i_.indexOf(i);n--){const i=i_[n];if(e_[i].common&&t._adapter.diff(a,o,i)>=e-1)return i}return i_[i?i_.indexOf(i):0]}(this,n.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=i_.indexOf(t)+1,i=i_.length;e<i;++e)if(e_[i_[e]].common)return i_[e]}(this._unit):void 0,this.initOffsets(o),t.reverse&&n.reverse(),r_(this,n,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map((t=>+t.value)))}initOffsets(t=[]){let e,i,o=0,a=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),o=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),a=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);const n=t.length<3?.5:.25;o=ec(o,0,n),a=ec(a,0,n),this._offsets={start:o,end:a,factor:1/(o+1+a)}}_generate(){const t=this._adapter,e=this.min,i=this.max,o=this.options,a=o.time,n=a.unit||n_(a.minUnit,e,i,this._getLabelCapacity(e)),s=fl(o.ticks.stepSize,1),r="week"===n&&a.isoWeekday,l=Ul(r)||!0===r,c={};let d,h,u=e;if(l&&(u=+t.startOf(u,"isoWeek",r)),u=+t.startOf(u,l?"day":n),t.diff(i,e,n)>1e5*s)throw new Error(e+" and "+i+" are too far apart with stepSize of "+s+" "+n);const p="data"===o.ticks.source&&this.getDataTimestamps();for(d=u,h=0;d<i;d=+t.add(d,s,n),h++)s_(c,d,p);return d!==i&&"ticks"!==o.bounds&&1!==h||s_(c,d,p),Object.keys(c).sort(o_).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const i=this.options.time.displayFormats,o=this._unit,a=e||i[o];return this._adapter.format(t,a)}_tickFormatFunction(t,e,i,o){const a=this.options,n=a.ticks.callback;if(n)return bl(n,[t,e,i],this);const s=a.time.displayFormats,r=this._unit,l=this._majorUnit,c=r&&s[r],d=l&&s[l],h=i[e],u=l&&d&&h&&h.major;return this._adapter.format(t,o||(u?d:c))}generateTickLabels(t){let e,i,o;for(e=0,i=t.length;e<i;++e)o=t[e],o.label=this._tickFormatFunction(o.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,o=ql(this.isHorizontal()?e.maxRotation:e.minRotation),a=Math.cos(o),n=Math.sin(o),s=this._resolveTickFontOptions(0).size;return{w:i*a+s*n,h:i*n+s*a}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,o=i[e.unit]||i.millisecond,a=this._tickFormatFunction(t,0,r_(this,[t],this._majorUnit),o),n=this._getLabelSize(a),s=Math.floor(this.isHorizontal()?this.width/n.w:this.height/n.h)-1;return s>0?s:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const o=this.getMatchingVisibleMetas();if(this._normalized&&o.length)return this._cache.data=o[0].controller.getAllParsedValues(this);for(t=0,e=o.length;t<e;++t)i=i.concat(o[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const o=this.getLabels();for(e=0,i=o.length;e<i;++e)t.push(a_(this,o[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return lc(t.sort(o_))}}function c_(t,e,i){let o,a,n,s,r=0,l=t.length-1;i?(e>=t[r].pos&&e<=t[l].pos&&({lo:r,hi:l}=ac(t,"pos",e)),({pos:o,time:n}=t[r]),({pos:a,time:s}=t[l])):(e>=t[r].time&&e<=t[l].time&&({lo:r,hi:l}=ac(t,"time",e)),({time:o,pos:n}=t[r]),({time:a,pos:s}=t[l]));const c=a-o;return c?n+(s-n)*(e-o)/c:n}class d_ extends l_{static id="timeseries";static defaults=l_.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=c_(e,this.min),this._tableRange=c_(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,o=[],a=[];let n,s,r,l,c;for(n=0,s=t.length;n<s;++n)l=t[n],l>=e&&l<=i&&o.push(l);if(o.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(n=0,s=o.length;n<s;++n)c=o[n+1],r=o[n-1],l=o[n],Math.round((c+r)/2)!==l&&a.push({time:l,pos:n/(s-1)});return a}_generate(){const t=this.min,e=this.max;let i=super.getDataTimestamps();return i.includes(t)&&i.length||i.splice(0,0,t),i.includes(e)&&1!==i.length||i.push(e),i.sort(((t,e)=>t-e))}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(c_(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return c_(this._table,i*this._tableRange+this._minPos,!0)}}var h_=Object.freeze({__proto__:null,CategoryScale:Om,LinearScale:Rm,LogarithmicScale:Um,RadialLinearScale:t_,TimeScale:l_,TimeSeriesScale:d_});const u_=[Oh,zp,Lm,h_];var p_=Object.freeze({__proto__:null,Animation:nh,Animations:sh,ArcElement:_p,BarController:Dh,BarElement:$p,BasePlatform:nu,BasicPlatform:su,BubbleController:Ch,CategoryScale:Om,Chart:cp,Colors:Np,DatasetController:bh,Decimation:Bp,DomPlatform:wu,DoughnutController:Ah,Element:ku,Filler:lm,Interaction:Uh,Legend:um,LineController:Ph,LineElement:Sp,LinearScale:Rm,LogarithmicScale:Um,PieController:Lh,PointElement:Mp,PolarAreaController:Eh,RadarController:$h,RadialLinearScale:t_,Scale:$u,ScatterController:zh,SubTitle:fm,Ticks:Dc,TimeScale:l_,TimeSeriesScale:d_,Title:mm,Tooltip:Em,_adapters:Ih,_detectPlatform:xu,animator:ih,controllers:Oh,defaults:$c,elements:zp,layouts:au,plugins:Lm,registerables:u_,registry:Vu,scales:h_});function m_(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var __,f_={exports:{}};var g_,b_=(__||(__=1,g_=f_,function(t,e,i,o){var a,n=["","webkit","Moz","MS","ms","o"],s=e.createElement("div"),r="function",l=Math.round,c=Math.abs,d=Date.now;function h(t,e,i){return setTimeout(b(t,i),e)}function u(t,e,i){return!!Array.isArray(t)&&(p(t,i[e],i),!0)}function p(t,e,i){var a;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==o)for(a=0;a<t.length;)e.call(i,t[a],a,t),a++;else for(a in t)t.hasOwnProperty(a)&&e.call(i,t[a],a,t)}function m(e,i,o){var a="DEPRECATED METHOD: "+i+"\n"+o+" AT \n";return function(){var i=new Error("get-stack-trace"),o=i&&i.stack?i.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",n=t.console&&(t.console.warn||t.console.log);return n&&n.call(t.console,a,o),e.apply(this,arguments)}}a="function"!=typeof Object.assign?function(t){if(t===o||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var a=arguments[i];if(a!==o&&null!==a)for(var n in a)a.hasOwnProperty(n)&&(e[n]=a[n])}return e}:Object.assign;var _=m((function(t,e,i){for(var a=Object.keys(e),n=0;n<a.length;)(!i||i&&t[a[n]]===o)&&(t[a[n]]=e[a[n]]),n++;return t}),"extend","Use `assign`."),f=m((function(t,e){return _(t,e,!0)}),"merge","Use `assign`.");function g(t,e,i){var o,n=e.prototype;(o=t.prototype=Object.create(n)).constructor=t,o._super=n,i&&a(o,i)}function b(t,e){return function(){return t.apply(e,arguments)}}function v(t,e){return typeof t==r?t.apply(e&&e[0]||o,e):t}function y(t,e){return t===o?e:t}function w(t,e,i){p(T(e),(function(e){t.addEventListener(e,i,!1)}))}function x(t,e,i){p(T(e),(function(e){t.removeEventListener(e,i,!1)}))}function k(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function S(t,e){return t.indexOf(e)>-1}function T(t){return t.trim().split(/\s+/g)}function M(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var o=0;o<t.length;){if(i&&t[o][i]==e||!i&&t[o]===e)return o;o++}return-1}function D(t){return Array.prototype.slice.call(t,0)}function C(t,e,i){for(var o=[],a=[],n=0;n<t.length;){var s=t[n][e];M(a,s)<0&&o.push(t[n]),a[n]=s,n++}return o=o.sort((function(t,i){return t[e]>i[e]})),o}function A(t,e){for(var i,a,s=e[0].toUpperCase()+e.slice(1),r=0;r<n.length;){if((a=(i=n[r])?i+s:e)in t)return a;r++}return o}var P=1;function E(e){var i=e.ownerDocument||e;return i.defaultView||i.parentWindow||t}var L="ontouchstart"in t,$=A(t,"PointerEvent")!==o,z=L&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),O="touch",V="mouse",H=25,I=1,R=4,F=8,N=1,j=2,W=4,B=8,U=16,Y=j|W,q=B|U,Z=Y|q,X=["x","y"],K=["clientX","clientY"];function G(t,e){var i=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){v(t.options.enable,[t])&&i.handler(e)},this.init()}function Q(t,e,i){var a=i.pointers.length,n=i.changedPointers.length,s=e&I&&a-n==0,r=e&(R|F)&&a-n==0;i.isFirst=!!s,i.isFinal=!!r,s&&(t.session={}),i.eventType=e,function(t,e){var i=t.session,a=e.pointers,n=a.length;i.firstInput||(i.firstInput=J(e)),n>1&&!i.firstMultiple?i.firstMultiple=J(e):1===n&&(i.firstMultiple=!1);var s=i.firstInput,r=i.firstMultiple,l=r?r.center:s.center,h=e.center=tt(a);e.timeStamp=d(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=at(l,h),e.distance=ot(l,h),function(t,e){var i=e.center,o=t.offsetDelta||{},a=t.prevDelta||{},n=t.prevInput||{};e.eventType!==I&&n.eventType!==R||(a=t.prevDelta={x:n.deltaX||0,y:n.deltaY||0},o=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=a.x+(i.x-o.x),e.deltaY=a.y+(i.y-o.y)}(i,e),e.offsetDirection=it(e.deltaX,e.deltaY);var u,p,m=et(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=m.x,e.overallVelocityY=m.y,e.overallVelocity=c(m.x)>c(m.y)?m.x:m.y,e.scale=r?(u=r.pointers,ot((p=a)[0],p[1],K)/ot(u[0],u[1],K)):1,e.rotation=r?function(t,e){return at(e[1],e[0],K)+at(t[1],t[0],K)}(r.pointers,a):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,a,n,s,r=t.lastInterval||e,l=e.timeStamp-r.timeStamp;if(e.eventType!=F&&(l>H||r.velocity===o)){var d=e.deltaX-r.deltaX,h=e.deltaY-r.deltaY,u=et(l,d,h);a=u.x,n=u.y,i=c(u.x)>c(u.y)?u.x:u.y,s=it(d,h),t.lastInterval=e}else i=r.velocity,a=r.velocityX,n=r.velocityY,s=r.direction;e.velocity=i,e.velocityX=a,e.velocityY=n,e.direction=s}(i,e);var _=t.element;k(e.srcEvent.target,_)&&(_=e.srcEvent.target),e.target=_}(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function J(t){for(var e=[],i=0;i<t.pointers.length;)e[i]={clientX:l(t.pointers[i].clientX),clientY:l(t.pointers[i].clientY)},i++;return{timeStamp:d(),pointers:e,center:tt(e),deltaX:t.deltaX,deltaY:t.deltaY}}function tt(t){var e=t.length;if(1===e)return{x:l(t[0].clientX),y:l(t[0].clientY)};for(var i=0,o=0,a=0;a<e;)i+=t[a].clientX,o+=t[a].clientY,a++;return{x:l(i/e),y:l(o/e)}}function et(t,e,i){return{x:e/t||0,y:i/t||0}}function it(t,e){return t===e?N:c(t)>=c(e)?t<0?j:W:e<0?B:U}function ot(t,e,i){i||(i=X);var o=e[i[0]]-t[i[0]],a=e[i[1]]-t[i[1]];return Math.sqrt(o*o+a*a)}function at(t,e,i){i||(i=X);var o=e[i[0]]-t[i[0]],a=e[i[1]]-t[i[1]];return 180*Math.atan2(a,o)/Math.PI}G.prototype={handler:function(){},init:function(){this.evEl&&w(this.element,this.evEl,this.domHandler),this.evTarget&&w(this.target,this.evTarget,this.domHandler),this.evWin&&w(E(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&x(this.element,this.evEl,this.domHandler),this.evTarget&&x(this.target,this.evTarget,this.domHandler),this.evWin&&x(E(this.element),this.evWin,this.domHandler)}};var nt={mousedown:I,mousemove:2,mouseup:R},st="mousedown",rt="mousemove mouseup";function lt(){this.evEl=st,this.evWin=rt,this.pressed=!1,G.apply(this,arguments)}g(lt,G,{handler:function(t){var e=nt[t.type];e&I&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=R),this.pressed&&(e&R&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:V,srcEvent:t}))}});var ct={pointerdown:I,pointermove:2,pointerup:R,pointercancel:F,pointerout:F},dt={2:O,3:"pen",4:V,5:"kinect"},ht="pointerdown",ut="pointermove pointerup pointercancel";function pt(){this.evEl=ht,this.evWin=ut,G.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}t.MSPointerEvent&&!t.PointerEvent&&(ht="MSPointerDown",ut="MSPointerMove MSPointerUp MSPointerCancel"),g(pt,G,{handler:function(t){var e=this.store,i=!1,o=t.type.toLowerCase().replace("ms",""),a=ct[o],n=dt[t.pointerType]||t.pointerType,s=n==O,r=M(e,t.pointerId,"pointerId");a&I&&(0===t.button||s)?r<0&&(e.push(t),r=e.length-1):a&(R|F)&&(i=!0),r<0||(e[r]=t,this.callback(this.manager,a,{pointers:e,changedPointers:[t],pointerType:n,srcEvent:t}),i&&e.splice(r,1))}});var mt={touchstart:I,touchmove:2,touchend:R,touchcancel:F};function _t(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,G.apply(this,arguments)}function ft(t,e){var i=D(t.touches),o=D(t.changedTouches);return e&(R|F)&&(i=C(i.concat(o),"identifier")),[i,o]}g(_t,G,{handler:function(t){var e=mt[t.type];if(e===I&&(this.started=!0),this.started){var i=ft.call(this,t,e);e&(R|F)&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:O,srcEvent:t})}}});var gt={touchstart:I,touchmove:2,touchend:R,touchcancel:F},bt="touchstart touchmove touchend touchcancel";function vt(){this.evTarget=bt,this.targetIds={},G.apply(this,arguments)}function yt(t,e){var i=D(t.touches),o=this.targetIds;if(e&(2|I)&&1===i.length)return o[i[0].identifier]=!0,[i,i];var a,n,s=D(t.changedTouches),r=[],l=this.target;if(n=i.filter((function(t){return k(t.target,l)})),e===I)for(a=0;a<n.length;)o[n[a].identifier]=!0,a++;for(a=0;a<s.length;)o[s[a].identifier]&&r.push(s[a]),e&(R|F)&&delete o[s[a].identifier],a++;return r.length?[C(n.concat(r),"identifier"),r]:void 0}g(vt,G,{handler:function(t){var e=gt[t.type],i=yt.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:O,srcEvent:t})}});var wt=2500;function xt(){G.apply(this,arguments);var t=b(this.handler,this);this.touch=new vt(this.manager,t),this.mouse=new lt(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function kt(t,e){t&I?(this.primaryTouch=e.changedPointers[0].identifier,St.call(this,e)):t&(R|F)&&St.call(this,e)}function St(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var i={x:e.clientX,y:e.clientY};this.lastTouches.push(i);var o=this.lastTouches;setTimeout((function(){var t=o.indexOf(i);t>-1&&o.splice(t,1)}),wt)}}function Tt(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,o=0;o<this.lastTouches.length;o++){var a=this.lastTouches[o],n=Math.abs(e-a.x),s=Math.abs(i-a.y);if(n<=25&&s<=25)return!0}return!1}g(xt,G,{handler:function(t,e,i){var o=i.pointerType==O,a=i.pointerType==V;if(!(a&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(o)kt.call(this,e,i);else if(a&&Tt.call(this,i))return;this.callback(t,e,i)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var Mt=A(s.style,"touchAction"),Dt=Mt!==o,Ct="compute",At="auto",Pt="manipulation",Et="none",Lt="pan-x",$t="pan-y",zt=function(){if(!Dt)return!1;var e={},i=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(o){e[o]=!i||t.CSS.supports("touch-action",o)})),e}();function Ot(t,e){this.manager=t,this.set(e)}Ot.prototype={set:function(t){t==Ct&&(t=this.compute()),Dt&&this.manager.element.style&&zt[t]&&(this.manager.element.style[Mt]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return p(this.manager.recognizers,(function(e){v(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(S(t,Et))return Et;var e=S(t,Lt),i=S(t,$t);return e&&i?Et:e||i?e?Lt:$t:S(t,Pt)?Pt:At}(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,i=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var o=this.actions,a=S(o,Et)&&!zt[Et],n=S(o,$t)&&!zt[$t],s=S(o,Lt)&&!zt[Lt];if(a){var r=1===t.pointers.length,l=t.distance<2,c=t.deltaTime<250;if(r&&l&&c)return}if(!s||!n)return a||n&&i&Y||s&&i&q?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var Vt=1,Ht=32;function It(t){this.options=a({},this.defaults,t||{}),this.id=P++,this.manager=null,this.options.enable=y(this.options.enable,!0),this.state=Vt,this.simultaneous={},this.requireFail=[]}function Rt(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}function Ft(t){return t==U?"down":t==B?"up":t==j?"left":t==W?"right":""}function Nt(t,e){var i=e.manager;return i?i.get(t):t}function jt(){It.apply(this,arguments)}function Wt(){jt.apply(this,arguments),this.pX=null,this.pY=null}function Bt(){jt.apply(this,arguments)}function Ut(){It.apply(this,arguments),this._timer=null,this._input=null}function Yt(){jt.apply(this,arguments)}function qt(){jt.apply(this,arguments)}function Zt(){It.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Xt(t,e){return(e=e||{}).recognizers=y(e.recognizers,Xt.defaults.preset),new Kt(t,e)}function Kt(t,e){var i;this.options=a({},Xt.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((i=this).options.inputClass||($?pt:z?vt:L?xt:lt))(i,Q),this.touchAction=new Ot(this,this.options.touchAction),Gt(this,!0),p(this.options.recognizers,(function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])}),this)}function Gt(t,e){var i,o=t.element;o.style&&(p(t.options.cssProps,(function(a,n){i=A(o.style,n),e?(t.oldCssProps[i]=o.style[i],o.style[i]=a):o.style[i]=t.oldCssProps[i]||""})),e||(t.oldCssProps={}))}It.prototype={defaults:{},set:function(t){return a(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(u(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=Nt(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return u(t,"dropRecognizeWith",this)||(t=Nt(t,this),delete this.simultaneous[t.id]),this},requireFailure:function(t){if(u(t,"requireFailure",this))return this;var e=this.requireFail;return-1===M(e,t=Nt(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(u(t,"dropRequireFailure",this))return this;t=Nt(t,this);var e=M(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,i=this.state;function o(i){e.manager.emit(i,t)}i<8&&o(e.options.event+Rt(i)),o(e.options.event),t.additionalEvent&&o(t.additionalEvent),i>=8&&o(e.options.event+Rt(i))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=Ht},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(Ht|Vt)))return!1;t++}return!0},recognize:function(t){var e=a({},t);if(!v(this.options.enable,[this,e]))return this.reset(),void(this.state=Ht);56&this.state&&(this.state=Vt),this.state=this.process(e),30&this.state&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},g(jt,It,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,i=t.eventType,o=6&e,a=this.attrTest(t);return o&&(i&F||!a)?16|e:o||a?i&R?8|e:2&e?4|e:2:Ht}}),g(Wt,jt,{defaults:{event:"pan",threshold:10,pointers:1,direction:Z},getTouchAction:function(){var t=this.options.direction,e=[];return t&Y&&e.push($t),t&q&&e.push(Lt),e},directionTest:function(t){var e=this.options,i=!0,o=t.distance,a=t.direction,n=t.deltaX,s=t.deltaY;return a&e.direction||(e.direction&Y?(a=0===n?N:n<0?j:W,i=n!=this.pX,o=Math.abs(t.deltaX)):(a=0===s?N:s<0?B:U,i=s!=this.pY,o=Math.abs(t.deltaY))),t.direction=a,i&&o>e.threshold&&a&e.direction},attrTest:function(t){return jt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Ft(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),g(Bt,jt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Et]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),g(Ut,It,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[At]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distance<e.threshold,a=t.deltaTime>e.time;if(this._input=t,!o||!i||t.eventType&(R|F)&&!a)this.reset();else if(t.eventType&I)this.reset(),this._timer=h((function(){this.state=8,this.tryEmit()}),e.time,this);else if(t.eventType&R)return 8;return Ht},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&t.eventType&R?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=d(),this.manager.emit(this.options.event,this._input)))}}),g(Yt,jt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Et]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),g(qt,jt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Y|q,pointers:1},getTouchAction:function(){return Wt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(Y|q)?e=t.overallVelocity:i&Y?e=t.overallVelocityX:i&q&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&c(e)>this.options.velocity&&t.eventType&R},emit:function(t){var e=Ft(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),g(Zt,It,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Pt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distance<e.threshold,a=t.deltaTime<e.time;if(this.reset(),t.eventType&I&&0===this.count)return this.failTimeout();if(o&&a&&i){if(t.eventType!=R)return this.failTimeout();var n=!this.pTime||t.timeStamp-this.pTime<e.interval,s=!this.pCenter||ot(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,s&&n?this.count+=1:this.count=1,this._input=t,0==this.count%e.taps)return this.hasRequireFailures()?(this._timer=h((function(){this.state=8,this.tryEmit()}),e.interval,this),2):8}return Ht},failTimeout:function(){return this._timer=h((function(){this.state=Ht}),this.options.interval,this),Ht},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Xt.VERSION="2.0.7",Xt.defaults={domEvents:!1,touchAction:Ct,enable:!0,inputTarget:null,inputClass:null,preset:[[Yt,{enable:!1}],[Bt,{enable:!1},["rotate"]],[qt,{direction:Y}],[Wt,{direction:Y},["swipe"]],[Zt],[Zt,{event:"doubletap",taps:2},["tap"]],[Ut]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Kt.prototype={set:function(t){return a(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){var i;this.touchAction.preventDefaults(t);var o=this.recognizers,a=e.curRecognizer;(!a||a&&8&a.state)&&(a=e.curRecognizer=null);for(var n=0;n<o.length;)i=o[n],2===e.stopped||a&&i!=a&&!i.canRecognizeWith(a)?i.reset():i.recognize(t),!a&&14&i.state&&(a=e.curRecognizer=i),n++}},get:function(t){if(t instanceof It)return t;for(var e=this.recognizers,i=0;i<e.length;i++)if(e[i].options.event==t)return e[i];return null},add:function(t){if(u(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(u(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,i=M(e,t);-1!==i&&(e.splice(i,1),this.touchAction.update())}return this},on:function(t,e){if(t!==o&&e!==o){var i=this.handlers;return p(T(t),(function(t){i[t]=i[t]||[],i[t].push(e)})),this}},off:function(t,e){if(t!==o){var i=this.handlers;return p(T(t),(function(t){e?i[t]&&i[t].splice(M(i[t],e),1):delete i[t]})),this}},emit:function(t,i){this.options.domEvents&&function(t,i){var o=e.createEvent("Event");o.initEvent(t,!0,!0),o.gesture=i,i.target.dispatchEvent(o)}(t,i);var o=this.handlers[t]&&this.handlers[t].slice();if(o&&o.length){i.type=t,i.preventDefault=function(){i.srcEvent.preventDefault()};for(var a=0;a<o.length;)o[a](i),a++}},destroy:function(){this.element&&Gt(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},a(Xt,{INPUT_START:I,INPUT_MOVE:2,INPUT_END:R,INPUT_CANCEL:F,STATE_POSSIBLE:Vt,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:Ht,DIRECTION_NONE:N,DIRECTION_LEFT:j,DIRECTION_RIGHT:W,DIRECTION_UP:B,DIRECTION_DOWN:U,DIRECTION_HORIZONTAL:Y,DIRECTION_VERTICAL:q,DIRECTION_ALL:Z,Manager:Kt,Input:G,TouchAction:Ot,TouchInput:vt,MouseInput:lt,PointerEventInput:pt,TouchMouseInput:xt,SingleTouchInput:_t,Recognizer:It,AttrRecognizer:jt,Tap:Zt,Pan:Wt,Swipe:qt,Pinch:Bt,Rotate:Yt,Press:Ut,on:w,off:x,each:p,merge:f,extend:_,assign:a,inherit:g,bindFn:b,prefixed:A}),(void 0!==t?t:"undefined"!=typeof self?self:{}).Hammer=Xt,g_.exports?g_.exports=Xt:t.Hammer=Xt}(window,document)),f_.exports),v_=m_(b_);const y_=t=>t&&t.enabled&&t.modifierKey,w_=(t,e)=>t&&e[t+"Key"],x_=(t,e)=>t&&!e[t+"Key"];function k_(t,e,i){return void 0===t||("string"==typeof t?-1!==t.indexOf(e):"function"==typeof t&&-1!==t({chart:i}).indexOf(e))}function S_(t,e){return"function"==typeof t&&(t=t({chart:e})),"string"==typeof t?{x:-1!==t.indexOf("x"),y:-1!==t.indexOf("y")}:{x:!1,y:!1}}function T_(t,e,i){const{mode:o="xy",scaleMode:a,overScaleMode:n}=t||{},s=function({x:t,y:e},i){const o=i.scales,a=Object.keys(o);for(let i=0;i<a.length;i++){const n=o[a[i]];if(e>=n.top&&e<=n.bottom&&t>=n.left&&t<=n.right)return n}return null}(e,i),r=S_(o,i),l=S_(a,i);if(n){const t=S_(n,i);for(const e of["x","y"])t[e]&&(l[e]=r[e],r[e]=!1)}if(s&&l[s.axis])return[s];const c=[];return vl(i.scales,(function(t){r[t.axis]&&c.push(t)})),c}const M_=new WeakMap;function D_(t){let e=M_.get(t);return e||(e={originalScaleLimits:{},updatedScaleLimits:{},handlers:{},panDelta:{},dragging:!1,panning:!1},M_.set(t,e)),e}function C_(t,e,i,o){const a=Math.max(0,Math.min(1,(t-e)/i||0));return{min:o*a,max:o*(1-a)}}function A_(t,e){const i=t.isHorizontal()?e.x:e.y;return t.getValueForPixel(i)}function P_(t,e,i){const o=t.max-t.min,a=o*(e-1);return C_(A_(t,i),t.min,o,a)}function E_(t,e,i,o,a){let n=i[o];if("original"===n){const i=t.originalScaleLimits[e.id][o];n=fl(i.options,i.scale)}return fl(n,a)}function L_(t,{min:e,max:i},o,a=!1){const n=D_(t.chart),{options:s}=t,r=function(t,e){return e&&(e[t.id]||e[t.axis])||{}}(t,o),{minRange:l=0}=r,c=E_(n,t,r,"min",-1/0),d=E_(n,t,r,"max",1/0);if("pan"===a&&(e<c||i>d))return!0;const h=t.max-t.min,u=a?Math.max(i-e,l):h;if(a&&u===l&&h<=l)return!0;const p=function(t,{min:e,max:i,minLimit:o,maxLimit:a},n){const s=(t-i+e)/2;e-=s,i+=s;const r=n.min.options??n.min.scale,l=n.max.options??n.max.scale,c=t/1e6;return Wl(e,r,c)&&(e=r),Wl(i,l,c)&&(i=l),e<o?(e=o,i=Math.min(o+t,a)):i>a&&(i=a,e=Math.max(a-t,o)),{min:e,max:i}}(u,{min:e,max:i,minLimit:c,maxLimit:d},n.originalScaleLimits[t.id]);return s.min=p.min,s.max=p.max,n.updatedScaleLimits[t.id]=p,t.parse(p.min)!==t.min||t.parse(p.max)!==t.max}const $_=t=>0===t||isNaN(t)?0:t<0?Math.min(Math.round(t),-1):Math.max(Math.round(t),1);const z_={second:500,minute:3e4,hour:18e5,day:432e5,week:3024e5,month:1296e6,quarter:5184e6,year:157248e5};function O_(t,e,i,o=!1){const{min:a,max:n,options:s}=t,r=s.time&&s.time.round,l=z_[r]||0,c=t.getValueForPixel(t.getPixelForValue(a+l)-e),d=t.getValueForPixel(t.getPixelForValue(n+l)-e);return!(!isNaN(c)&&!isNaN(d))||L_(t,{min:c,max:d},i,!!o&&"pan")}function V_(t,e,i){return O_(t,e,i,!0)}const H_={category:function(t,e,i,o){const a=P_(t,e,i);return t.min===t.max&&e<1&&function(t){const e=t.getLabels().length-1;t.min>0&&(t.min-=1),t.max<e&&(t.max+=1)}(t),L_(t,{min:t.min+$_(a.min),max:t.max-$_(a.max)},o,!0)},default:function(t,e,i,o){const a=P_(t,e,i);return L_(t,{min:t.min+a.min,max:t.max-a.max},o,!0)},logarithmic:function(t,e,i,o){const a=function(t,e,i){const o=A_(t,i);if(void 0===o)return{min:t.min,max:t.max};const a=Math.log10(t.min),n=Math.log10(t.max),s=n-a,r=C_(Math.log10(o),a,s,s*(e-1));return{min:Math.pow(10,a+r.min),max:Math.pow(10,n-r.max)}}(t,e,i);return L_(t,a,o,!0)}},I_={default:function(t,e,i,o){L_(t,function(t,e,i){const o=t.getValueForPixel(e),a=t.getValueForPixel(i);return{min:Math.min(o,a),max:Math.max(o,a)}}(t,e,i),o,!0)}},R_={category:function(t,e,i){const o=t.getLabels().length-1;let{min:a,max:n}=t;const s=Math.max(n-a,1),r=Math.round(function(t){return t.isHorizontal()?t.width:t.height}(t)/Math.max(s,10)),l=Math.round(Math.abs(e/r));let c;return e<-r?(n=Math.min(n+l,o),a=1===s?n:n-s,c=n===o):e>r&&(a=Math.max(0,a-l),n=1===s?a:a+s,c=0===a),L_(t,{min:a,max:n},i)||c},default:O_,logarithmic:V_,timeseries:V_};function F_(t,e){vl(t,((i,o)=>{e[o]||delete t[o]}))}function N_(t,e){const{scales:i}=t,{originalScaleLimits:o,updatedScaleLimits:a}=e;return vl(i,(function(t){(function(t,e,i){const{id:o,options:{min:a,max:n}}=t;if(!e[o]||!i[o])return!0;const s=i[o];return s.min!==a||s.max!==n})(t,o,a)&&(o[t.id]={min:{scale:t.min,options:t.options.min},max:{scale:t.max,options:t.options.max}})})),F_(o,i),F_(a,i),o}function j_(t,e,i,o){bl(H_[t.type]||H_.default,[t,e,i,o])}function W_(t,e,i,o){bl(I_[t.type]||I_.default,[t,e,i,o])}function B_(t){const e=t.chartArea;return{x:(e.left+e.right)/2,y:(e.top+e.bottom)/2}}function U_(t,e,i="none",o="api"){const{x:a=1,y:n=1,focalPoint:s=B_(t)}="number"==typeof e?{x:e,y:e}:e,r=D_(t),{options:{limits:l,zoom:c}}=r;N_(t,r);const d=1!==a,h=1!==n;vl(T_(c,s,t)||t.scales,(function(t){t.isHorizontal()&&d?j_(t,a,s,l):!t.isHorizontal()&&h&&j_(t,n,s,l)})),t.update(i),bl(c.onZoom,[{chart:t,trigger:o}])}function Y_(t,e,i,o="none",a="api"){const n=D_(t),{options:{limits:s,zoom:r}}=n,{mode:l="xy"}=r;N_(t,n);const c=k_(l,"x",t),d=k_(l,"y",t);vl(t.scales,(function(t){t.isHorizontal()&&c?W_(t,e.x,i.x,s):!t.isHorizontal()&&d&&W_(t,e.y,i.y,s)})),t.update(o),bl(r.onZoom,[{chart:t,trigger:a}])}function q_(t,e,i,o="none",a="api"){const n=D_(t);N_(t,n);L_(t.scales[e],i,void 0,!0),t.update(o),bl(n.options.zoom?.onZoom,[{chart:t,trigger:a}])}function Z_(t,e="default"){const i=D_(t),o=N_(t,i);vl(t.scales,(function(t){const e=t.options;o[t.id]?(e.min=o[t.id].min.options,e.max=o[t.id].max.options):(delete e.min,delete e.max),delete i.updatedScaleLimits[t.id]})),t.update(e),bl(i.options.zoom.onZoomComplete,[{chart:t}])}function X_(t){const e=D_(t);let i=1,o=1;return vl(t.scales,(function(t){const a=function(t,e){const i=t.originalScaleLimits[e];if(!i)return;const{min:o,max:a}=i;return fl(a.options,a.scale)-fl(o.options,o.scale)}(e,t.id);if(a){const e=Math.round(a/(t.max-t.min)*100)/100;i=Math.min(i,e),o=Math.max(o,e)}})),i<1?i:o}function K_(t,e,i,o){const{panDelta:a}=o,n=a[t.id]||0;jl(n)===jl(e)&&(e+=n);bl(R_[t.type]||R_.default,[t,e,i])?a[t.id]=0:a[t.id]=e}function G_(t,e,i,o="none"){const{x:a=0,y:n=0}="number"==typeof e?{x:e,y:e}:e,s=D_(t),{options:{pan:r,limits:l}}=s,{onPan:c}=r||{};N_(t,s);const d=0!==a,h=0!==n;vl(i||t.scales,(function(t){t.isHorizontal()&&d?K_(t,a,l,s):!t.isHorizontal()&&h&&K_(t,n,l,s)})),t.update(o),bl(c,[{chart:t}])}function Q_(t){const e=D_(t);N_(t,e);const i={};for(const o of Object.keys(t.scales)){const{min:t,max:a}=e.originalScaleLimits[o]||{min:{},max:{}};i[o]={min:t.scale,max:a.scale}}return i}function J_(t){const e=D_(t);return e.panning||e.dragging}const tf=(t,e,i)=>Math.min(i,Math.max(e,t));function ef(t,e){const{handlers:i}=D_(t),o=i[e];o&&o.target&&(o.target.removeEventListener(e,o),delete i[e])}function of(t,e,i,o){const{handlers:a,options:n}=D_(t),s=a[i];if(s&&s.target===e)return;ef(t,i),a[i]=e=>o(t,e,n),a[i].target=e;const r="wheel"!==i&&void 0;e.addEventListener(i,a[i],{passive:r})}function af(t,e){const i=D_(t);i.dragStart&&(i.dragging=!0,i.dragEnd=e,t.update("none"))}function nf(t,e){const i=D_(t);i.dragStart&&"Escape"===e.key&&(ef(t,"keydown"),i.dragging=!1,i.dragStart=i.dragEnd=null,t.update("none"))}function sf(t,e){if(t.target!==e.canvas){const i=e.canvas.getBoundingClientRect();return{x:t.clientX-i.left,y:t.clientY-i.top}}return zd(t,e)}function rf(t,e,i){const{onZoomStart:o,onZoomRejected:a}=i;if(o){if(!1===bl(o,[{chart:t,event:e,point:sf(e,t)}]))return bl(a,[{chart:t,event:e}]),!1}}function lf(t,e){if(t.legend){if(Fc(zd(e,t),t.legend))return}const i=D_(t),{pan:o,zoom:a={}}=i.options;if(0!==e.button||w_(y_(o),e)||x_(y_(a.drag),e))return bl(a.onZoomRejected,[{chart:t,event:e}]);!1!==rf(t,e,a)&&(i.dragStart=e,of(t,t.canvas.ownerDocument,"mousemove",af),of(t,window.document,"keydown",nf))}function cf(t,e,i,{min:o,max:a,prop:n}){t[o]=tf(Math.min(i.begin[n],i.end[n]),e[o],e[a]),t[a]=tf(Math.max(i.begin[n],i.end[n]),e[o],e[a])}function df(t,e,i){const o={begin:sf(e.dragStart,t),end:sf(e.dragEnd,t)};if(i){!function({begin:t,end:e},i){let o=e.x-t.x,a=e.y-t.y;const n=Math.abs(o/a);n>i?o=Math.sign(o)*Math.abs(a*i):n<i&&(a=Math.sign(a)*Math.abs(o/i)),e.x=t.x+o,e.y=t.y+a}(o,t.chartArea.width/t.chartArea.height)}return o}function hf(t,e,i,o){const a=k_(e,"x",t),n=k_(e,"y",t),{top:s,left:r,right:l,bottom:c,width:d,height:h}=t.chartArea,u={top:s,left:r,right:l,bottom:c},p=df(t,i,o&&a&&n);a&&cf(u,t.chartArea,p,{min:"left",max:"right",prop:"x"}),n&&cf(u,t.chartArea,p,{min:"top",max:"bottom",prop:"y"});const m=u.right-u.left,_=u.bottom-u.top;return{...u,width:m,height:_,zoomX:a&&m?1+(d-m)/d:1,zoomY:n&&_?1+(h-_)/h:1}}function uf(t,e){const i=D_(t);if(!i.dragStart)return;ef(t,"mousemove");const{mode:o,onZoomComplete:a,drag:{threshold:n=0,maintainAspectRatio:s}}=i.options.zoom,r=hf(t,o,{dragStart:i.dragStart,dragEnd:e},s),l=k_(o,"x",t)?r.width:0,c=k_(o,"y",t)?r.height:0,d=Math.sqrt(l*l+c*c);if(i.dragStart=i.dragEnd=null,d<=n)return i.dragging=!1,void t.update("none");Y_(t,{x:r.left,y:r.top},{x:r.right,y:r.bottom},"zoom","drag"),i.dragging=!1,i.filterNextClick=!0,bl(a,[{chart:t}])}function pf(t,e){const{handlers:{onZoomComplete:i},options:{zoom:o}}=D_(t);if(!function(t,e,i){if(x_(y_(i.wheel),e))bl(i.onZoomRejected,[{chart:t,event:e}]);else if(!1!==rf(t,e,i)&&(e.cancelable&&e.preventDefault(),void 0!==e.deltaY))return!0}(t,e,o))return;const a=e.target.getBoundingClientRect(),n=o.wheel.speed,s=e.deltaY>=0?2-1/(1-n):1+n;U_(t,{x:s,y:s,focalPoint:{x:e.clientX-a.left,y:e.clientY-a.top}},"zoom","wheel"),bl(i,[{chart:t}])}function mf(t,e,i,o){i&&(D_(t).handlers[e]=function(t,e){let i;return function(){return clearTimeout(i),i=setTimeout(t,e),e}}((()=>bl(i,[{chart:t}])),o))}function _f(t,e){return function(i,o){const{pan:a,zoom:n={}}=e.options;if(!a||!a.enabled)return!1;const s=o&&o.srcEvent;return!s||(!(!e.panning&&"mouse"===o.pointerType&&(x_(y_(a),s)||w_(y_(n.drag),s)))||(bl(a.onPanRejected,[{chart:t,event:o}]),!1))}}function ff(t,e,i){if(e.scale){const{center:o,pointers:a}=i,n=1/e.scale*i.scale,s=i.target.getBoundingClientRect(),r=function(t,e){const i=Math.abs(t.clientX-e.clientX),o=Math.abs(t.clientY-e.clientY),a=i/o;let n,s;return a>.3&&a<1.7?n=s=!0:i>o?n=!0:s=!0,{x:n,y:s}}(a[0],a[1]),l=e.options.zoom.mode;U_(t,{x:r.x&&k_(l,"x",t)?n:1,y:r.y&&k_(l,"y",t)?n:1,focalPoint:{x:o.x-s.left,y:o.y-s.top}},"zoom","pinch"),e.scale=i.scale}}function gf(t,e,i){const o=e.delta;o&&(e.panning=!0,G_(t,{x:i.deltaX-o.x,y:i.deltaY-o.y},e.panScales),e.delta={x:i.deltaX,y:i.deltaY})}const bf=new WeakMap;function vf(t,e){const i=D_(t),o=t.canvas,{pan:a,zoom:n}=e,s=new v_.Manager(o);n&&n.pinch.enabled&&(s.add(new v_.Pinch),s.on("pinchstart",(e=>function(t,e,i){if(e.options.zoom.pinch.enabled){const o=zd(i,t);!1===bl(e.options.zoom.onZoomStart,[{chart:t,event:i,point:o}])?(e.scale=null,bl(e.options.zoom.onZoomRejected,[{chart:t,event:i}])):e.scale=1}}(t,i,e))),s.on("pinch",(e=>ff(t,i,e))),s.on("pinchend",(e=>function(t,e,i){e.scale&&(ff(t,e,i),e.scale=null,bl(e.options.zoom.onZoomComplete,[{chart:t}]))}(t,i,e)))),a&&a.enabled&&(s.add(new v_.Pan({threshold:a.threshold,enable:_f(t,i)})),s.on("panstart",(e=>function(t,e,i){const{enabled:o,onPanStart:a,onPanRejected:n}=e.options.pan;if(!o)return;const s=i.target.getBoundingClientRect(),r={x:i.center.x-s.left,y:i.center.y-s.top};if(!1===bl(a,[{chart:t,event:i,point:r}]))return bl(n,[{chart:t,event:i}]);e.panScales=T_(e.options.pan,r,t),e.delta={x:0,y:0},gf(t,e,i)}(t,i,e))),s.on("panmove",(e=>gf(t,i,e))),s.on("panend",(()=>function(t,e){e.delta=null,e.panning&&(e.panning=!1,e.filterNextClick=!0,bl(e.options.pan.onPanComplete,[{chart:t}]))}(t,i)))),bf.set(t,s)}function yf(t){const e=bf.get(t);e&&(e.remove("pinchstart"),e.remove("pinch"),e.remove("pinchend"),e.remove("panstart"),e.remove("pan"),e.remove("panend"),e.destroy(),bf.delete(t))}function wf(t,e,i){const o=i.zoom.drag,{dragStart:a,dragEnd:n}=D_(t);if(o.drawTime!==e||!n)return;const{left:s,top:r,width:l,height:c}=hf(t,i.zoom.mode,{dragStart:a,dragEnd:n},o.maintainAspectRatio),d=t.ctx;d.save(),d.beginPath(),d.fillStyle=o.backgroundColor||"rgba(225,225,225,0.3)",d.fillRect(s,r,l,c),o.borderWidth>0&&(d.lineWidth=o.borderWidth,d.strokeStyle=o.borderColor||"rgba(225,225,225)",d.strokeRect(s,r,l,c)),d.restore()}var xf={id:"zoom",version:"2.2.0",defaults:{pan:{enabled:!1,mode:"xy",threshold:10,modifierKey:null},zoom:{wheel:{enabled:!1,speed:.1,modifierKey:null},drag:{enabled:!1,drawTime:"beforeDatasetsDraw",modifierKey:null},pinch:{enabled:!1},mode:"xy"}},start:function(t,e,i){D_(t).options=i,Object.prototype.hasOwnProperty.call(i.zoom,"enabled")&&console.warn("The option `zoom.enabled` is no longer supported. Please use `zoom.wheel.enabled`, `zoom.drag.enabled`, or `zoom.pinch.enabled`."),(Object.prototype.hasOwnProperty.call(i.zoom,"overScaleMode")||Object.prototype.hasOwnProperty.call(i.pan,"overScaleMode"))&&console.warn("The option `overScaleMode` is deprecated. Please use `scaleMode` instead (and update `mode` as desired)."),v_&&vf(t,i),t.pan=(e,i,o)=>G_(t,e,i,o),t.zoom=(e,i)=>U_(t,e,i),t.zoomRect=(e,i,o)=>Y_(t,e,i,o),t.zoomScale=(e,i,o)=>q_(t,e,i,o),t.resetZoom=e=>Z_(t,e),t.getZoomLevel=()=>X_(t),t.getInitialScaleBounds=()=>Q_(t),t.getZoomedScaleBounds=()=>function(t){const e=D_(t),i={};for(const o of Object.keys(t.scales))i[o]=e.updatedScaleLimits[o];return i}(t),t.isZoomedOrPanned=()=>function(t){const e=Q_(t);for(const i of Object.keys(t.scales)){const{min:o,max:a}=e[i];if(void 0!==o&&t.scales[i].min!==o)return!0;if(void 0!==a&&t.scales[i].max!==a)return!0}return!1}(t),t.isZoomingOrPanning=()=>J_(t)},beforeEvent(t,{event:e}){if(J_(t))return!1;if("click"===e.type||"mouseup"===e.type){const e=D_(t);if(e.filterNextClick)return e.filterNextClick=!1,!1}},beforeUpdate:function(t,e,i){const o=D_(t),a=o.options;o.options=i,function(t,e){const{pan:i,zoom:o}=t,{pan:a,zoom:n}=e;return o?.zoom?.pinch?.enabled!==n?.zoom?.pinch?.enabled||i?.enabled!==a?.enabled||i?.threshold!==a?.threshold}(a,i)&&(yf(t),vf(t,i)),function(t,e){const i=t.canvas,{wheel:o,drag:a,onZoomComplete:n}=e.zoom;o.enabled?(of(t,i,"wheel",pf),mf(t,"onZoomComplete",n,250)):ef(t,"wheel"),a.enabled?(of(t,i,"mousedown",lf),of(t,i.ownerDocument,"mouseup",uf)):(ef(t,"mousedown"),ef(t,"mousemove"),ef(t,"mouseup"),ef(t,"keydown"))}(t,i)},beforeDatasetsDraw(t,e,i){wf(t,"beforeDatasetsDraw",i)},afterDatasetsDraw(t,e,i){wf(t,"afterDatasetsDraw",i)},beforeDraw(t,e,i){wf(t,"beforeDraw",i)},afterDraw(t,e,i){wf(t,"afterDraw",i)},stop:function(t){!function(t){ef(t,"mousedown"),ef(t,"mousemove"),ef(t,"mouseup"),ef(t,"wheel"),ef(t,"click"),ef(t,"keydown")}(t),v_&&yf(t),function(t){M_.delete(t)}(t)},panFunctions:R_,zoomFunctions:H_,zoomRectFunctions:I_},kf=Object.freeze({__proto__:null,default:xf,pan:G_,resetZoom:Z_,zoom:U_,zoomRect:Y_,zoomScale:q_});function Sf(t){const e=Object.prototype.toString.call(t);return t instanceof Date||"object"==typeof t&&"[object Date]"===e?new t.constructor(+t):"number"==typeof t||"[object Number]"===e||"string"==typeof t||"[object String]"===e?new Date(t):new Date(NaN)}function Tf(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}function Mf(t,e){const i=Sf(t);return isNaN(e)?Tf(t,NaN):e?(i.setDate(i.getDate()+e),i):i}function Df(t,e){const i=Sf(t);if(isNaN(e))return Tf(t,NaN);if(!e)return i;const o=i.getDate(),a=Tf(t,i.getTime());a.setMonth(i.getMonth()+e+1,0);return o>=a.getDate()?a:(i.setFullYear(a.getFullYear(),a.getMonth(),o),i)}function Cf(t,e){return Tf(t,+Sf(t)+e)}const Af=6048e5,Pf=864e5,Ef=6e4,Lf=36e5;let $f={};function zf(){return $f}function Of(t,e){const i=zf(),o=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,a=Sf(t),n=a.getDay(),s=(n<o?7:0)+n-o;return a.setDate(a.getDate()-s),a.setHours(0,0,0,0),a}function Vf(t){return Of(t,{weekStartsOn:1})}function Hf(t){const e=Sf(t),i=e.getFullYear(),o=Tf(t,0);o.setFullYear(i+1,0,4),o.setHours(0,0,0,0);const a=Vf(o),n=Tf(t,0);n.setFullYear(i,0,4),n.setHours(0,0,0,0);const s=Vf(n);return e.getTime()>=a.getTime()?i+1:e.getTime()>=s.getTime()?i:i-1}function If(t){const e=Sf(t);return e.setHours(0,0,0,0),e}function Rf(t){const e=Sf(t),i=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return i.setUTCFullYear(e.getFullYear()),+t-+i}function Ff(t,e){const i=If(t),o=If(e),a=+i-Rf(i),n=+o-Rf(o);return Math.round((a-n)/Pf)}function Nf(t,e){const i=Sf(t),o=Sf(e),a=i.getTime()-o.getTime();return a<0?-1:a>0?1:a}function jf(t){if(!(e=t,e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)||"number"==typeof t))return!1;var e;const i=Sf(t);return!isNaN(Number(i))}function Wf(t,e){const i=Sf(t),o=Sf(e),a=Bf(i,o),n=Math.abs(Ff(i,o));i.setDate(i.getDate()-a*n);const s=a*(n-Number(Bf(i,o)===-a));return 0===s?0:s}function Bf(t,e){const i=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return i<0?-1:i>0?1:i}function Uf(t){return e=>{const i=(t?Math[t]:Math.trunc)(e);return 0===i?0:i}}function Yf(t,e){return+Sf(t)-+Sf(e)}function qf(t){const e=Sf(t);return e.setHours(23,59,59,999),e}function Zf(t){const e=Sf(t),i=e.getMonth();return e.setFullYear(e.getFullYear(),i+1,0),e.setHours(23,59,59,999),e}function Xf(t,e){const i=Sf(t),o=Sf(e),a=Nf(i,o),n=Math.abs(function(t,e){const i=Sf(t),o=Sf(e);return 12*(i.getFullYear()-o.getFullYear())+(i.getMonth()-o.getMonth())}(i,o));let s;if(n<1)s=0;else{1===i.getMonth()&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-a*n);let e=Nf(i,o)===-a;(function(t){const e=Sf(t);return+qf(e)==+Zf(e)})(Sf(t))&&1===n&&1===Nf(t,o)&&(e=!1),s=a*(n-Number(e))}return 0===s?0:s}function Kf(t,e){const i=Sf(t),o=Sf(e),a=Nf(i,o),n=Math.abs(function(t,e){const i=Sf(t),o=Sf(e);return i.getFullYear()-o.getFullYear()}(i,o));i.setFullYear(1584),o.setFullYear(1584);const s=a*(n-+(Nf(i,o)===-a));return 0===s?0:s}function Gf(t){const e=Sf(t),i=Tf(t,0);return i.setFullYear(e.getFullYear(),0,1),i.setHours(0,0,0,0),i}const Qf={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Jf(t){return(e={})=>{const i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}const tg={date:Jf({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Jf({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Jf({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},eg={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function ig(t){return(e,i)=>{let o;if("formatting"===(i?.context?String(i.context):"standalone")&&t.formattingValues){const e=t.defaultFormattingWidth||t.defaultWidth,a=i?.width?String(i.width):e;o=t.formattingValues[a]||t.formattingValues[e]}else{const e=t.defaultWidth,a=i?.width?String(i.width):t.defaultWidth;o=t.values[a]||t.values[e]}return o[t.argumentCallback?t.argumentCallback(e):e]}}const og={ordinalNumber:(t,e)=>{const i=Number(t),o=i%100;if(o>20||o<10)switch(o%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},era:ig({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:ig({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:t=>t-1}),month:ig({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:ig({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:ig({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function ag(t){return(e,i={})=>{const o=i.width,a=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],n=e.match(a);if(!n)return null;const s=n[0],r=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(r)?function(t,e){for(let i=0;i<t.length;i++)if(e(t[i]))return i;return}(r,(t=>t.test(s))):function(t,e){for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&e(t[i]))return i;return}(r,(t=>t.test(s)));let c;c=t.valueCallback?t.valueCallback(l):l,c=i.valueCallback?i.valueCallback(c):c;return{value:c,rest:e.slice(s.length)}}}const ng={ordinalNumber:(sg={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:t=>parseInt(t,10)},(t,e={})=>{const i=t.match(sg.matchPattern);if(!i)return null;const o=i[0],a=t.match(sg.parsePattern);if(!a)return null;let n=sg.valueCallback?sg.valueCallback(a[0]):a[0];return n=e.valueCallback?e.valueCallback(n):n,{value:n,rest:t.slice(o.length)}}),era:ag({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:ag({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:t=>t+1}),month:ag({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:ag({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:ag({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var sg;const rg={code:"en-US",formatDistance:(t,e,i)=>{let o;const a=Qf[t];return o="string"==typeof a?a:1===e?a.one:a.other.replace("{{count}}",e.toString()),i?.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},formatLong:tg,formatRelative:(t,e,i,o)=>eg[t],localize:og,match:ng,options:{weekStartsOn:0,firstWeekContainsDate:1}};function lg(t){const e=Sf(t),i=+Vf(e)-+function(t){const e=Hf(t),i=Tf(t,0);return i.setFullYear(e,0,4),i.setHours(0,0,0,0),Vf(i)}(e);return Math.round(i/Af)+1}function cg(t,e){const i=Sf(t),o=i.getFullYear(),a=zf(),n=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,s=Tf(t,0);s.setFullYear(o+1,0,n),s.setHours(0,0,0,0);const r=Of(s,e),l=Tf(t,0);l.setFullYear(o,0,n),l.setHours(0,0,0,0);const c=Of(l,e);return i.getTime()>=r.getTime()?o+1:i.getTime()>=c.getTime()?o:o-1}function dg(t,e){const i=Sf(t),o=+Of(i,e)-+function(t,e){const i=zf(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=cg(t,e),n=Tf(t,0);return n.setFullYear(a,0,o),n.setHours(0,0,0,0),Of(n,e)}(i,e);return Math.round(o/Af)+1}function hg(t,e){return(t<0?"-":"")+Math.abs(t).toString().padStart(e,"0")}const ug={y(t,e){const i=t.getFullYear(),o=i>0?i:1-i;return hg("yy"===e?o%100:o,e.length)},M(t,e){const i=t.getMonth();return"M"===e?String(i+1):hg(i+1,2)},d:(t,e)=>hg(t.getDate(),e.length),a(t,e){const i=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];default:return"am"===i?"a.m.":"p.m."}},h:(t,e)=>hg(t.getHours()%12||12,e.length),H:(t,e)=>hg(t.getHours(),e.length),m:(t,e)=>hg(t.getMinutes(),e.length),s:(t,e)=>hg(t.getSeconds(),e.length),S(t,e){const i=e.length,o=t.getMilliseconds();return hg(Math.trunc(o*Math.pow(10,i-3)),e.length)}},pg="midnight",mg="noon",_g="morning",fg="afternoon",gg="evening",bg="night",vg={G:function(t,e,i){const o=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"});case"GGGGG":return i.era(o,{width:"narrow"});default:return i.era(o,{width:"wide"})}},y:function(t,e,i){if("yo"===e){const e=t.getFullYear(),o=e>0?e:1-e;return i.ordinalNumber(o,{unit:"year"})}return ug.y(t,e)},Y:function(t,e,i,o){const a=cg(t,o),n=a>0?a:1-a;if("YY"===e){return hg(n%100,2)}return"Yo"===e?i.ordinalNumber(n,{unit:"year"}):hg(n,e.length)},R:function(t,e){return hg(Hf(t),e.length)},u:function(t,e){return hg(t.getFullYear(),e.length)},Q:function(t,e,i){const o=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(o);case"QQ":return hg(o,2);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});default:return i.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,e,i){const o=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(o);case"qq":return hg(o,2);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});default:return i.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,e,i){const o=t.getMonth();switch(e){case"M":case"MM":return ug.M(t,e);case"Mo":return i.ordinalNumber(o+1,{unit:"month"});case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});default:return i.month(o,{width:"wide",context:"formatting"})}},L:function(t,e,i){const o=t.getMonth();switch(e){case"L":return String(o+1);case"LL":return hg(o+1,2);case"Lo":return i.ordinalNumber(o+1,{unit:"month"});case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});default:return i.month(o,{width:"wide",context:"standalone"})}},w:function(t,e,i,o){const a=dg(t,o);return"wo"===e?i.ordinalNumber(a,{unit:"week"}):hg(a,e.length)},I:function(t,e,i){const o=lg(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):hg(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getDate(),{unit:"date"}):ug.d(t,e)},D:function(t,e,i){const o=function(t){const e=Sf(t);return Ff(e,Gf(e))+1}(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):hg(o,e.length)},E:function(t,e,i){const o=t.getDay();switch(e){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},e:function(t,e,i,o){const a=t.getDay(),n=(a-o.weekStartsOn+8)%7||7;switch(e){case"e":return String(n);case"ee":return hg(n,2);case"eo":return i.ordinalNumber(n,{unit:"day"});case"eee":return i.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(a,{width:"short",context:"formatting"});default:return i.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,i,o){const a=t.getDay(),n=(a-o.weekStartsOn+8)%7||7;switch(e){case"c":return String(n);case"cc":return hg(n,e.length);case"co":return i.ordinalNumber(n,{unit:"day"});case"ccc":return i.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(a,{width:"narrow",context:"standalone"});case"cccccc":return i.day(a,{width:"short",context:"standalone"});default:return i.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,i){const o=t.getDay(),a=0===o?7:o;switch(e){case"i":return String(a);case"ii":return hg(a,e.length);case"io":return i.ordinalNumber(a,{unit:"day"});case"iii":return i.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},a:function(t,e,i){const o=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,e,i){const o=t.getHours();let a;switch(a=12===o?mg:0===o?pg:o/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(a,{width:"narrow",context:"formatting"});default:return i.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,i){const o=t.getHours();let a;switch(a=o>=17?gg:o>=12?fg:o>=4?_g:bg,e){case"B":case"BB":case"BBB":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(a,{width:"narrow",context:"formatting"});default:return i.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){let e=t.getHours()%12;return 0===e&&(e=12),i.ordinalNumber(e,{unit:"hour"})}return ug.h(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getHours(),{unit:"hour"}):ug.H(t,e)},K:function(t,e,i){const o=t.getHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):hg(o,e.length)},k:function(t,e,i){let o=t.getHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):hg(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getMinutes(),{unit:"minute"}):ug.m(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getSeconds(),{unit:"second"}):ug.s(t,e)},S:function(t,e){return ug.S(t,e)},X:function(t,e,i){const o=t.getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return wg(o);case"XXXX":case"XX":return xg(o);default:return xg(o,":")}},x:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"x":return wg(o);case"xxxx":case"xx":return xg(o);default:return xg(o,":")}},O:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+yg(o,":");default:return"GMT"+xg(o,":")}},z:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+yg(o,":");default:return"GMT"+xg(o,":")}},t:function(t,e,i){return hg(Math.trunc(t.getTime()/1e3),e.length)},T:function(t,e,i){return hg(t.getTime(),e.length)}};function yg(t,e=""){const i=t>0?"-":"+",o=Math.abs(t),a=Math.trunc(o/60),n=o%60;return 0===n?i+String(a):i+String(a)+e+hg(n,2)}function wg(t,e){if(t%60==0){return(t>0?"-":"+")+hg(Math.abs(t)/60,2)}return xg(t,e)}function xg(t,e=""){const i=t>0?"-":"+",o=Math.abs(t);return i+hg(Math.trunc(o/60),2)+e+hg(o%60,2)}const kg=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},Sg=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},Tg={p:Sg,P:(t,e)=>{const i=t.match(/(P+)(p+)?/)||[],o=i[1],a=i[2];if(!a)return kg(t,e);let n;switch(o){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",kg(o,e)).replace("{{time}}",Sg(a,e))}},Mg=/^D+$/,Dg=/^Y+$/,Cg=["D","DD","YY","YYYY"];function Ag(t){return Mg.test(t)}function Pg(t){return Dg.test(t)}function Eg(t,e,i){const o=function(t,e,i){const o="Y"===t[0]?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${o} to the input \`${i}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(t,e,i);if(console.warn(o),Cg.includes(t))throw new RangeError(o)}const Lg=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$g=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,zg=/^'([^]*?)'?$/,Og=/''/g,Vg=/[a-zA-Z]/;function Hg(t){const e=t.match(zg);return e?e[1].replace(Og,"'"):t}class Ig{subPriority=0;validate(t,e){return!0}}class Rg extends Ig{constructor(t,e,i,o,a){super(),this.value=t,this.validateValue=e,this.setValue=i,this.priority=o,a&&(this.subPriority=a)}validate(t,e){return this.validateValue(t,this.value,e)}set(t,e,i){return this.setValue(t,e,this.value,i)}}class Fg extends Ig{priority=10;subPriority=-1;set(t,e){return e.timestampIsSet?t:Tf(t,function(t,e){const i=e instanceof Date?Tf(e,0):new e(0);return i.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),i.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),i}(t,Date))}}class Ng{run(t,e,i,o){const a=this.parse(t,e,i,o);return a?{setter:new Rg(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(t,e,i){return!0}}const jg=/^(1[0-2]|0?\d)/,Wg=/^(3[0-1]|[0-2]?\d)/,Bg=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Ug=/^(5[0-3]|[0-4]?\d)/,Yg=/^(2[0-3]|[0-1]?\d)/,qg=/^(2[0-4]|[0-1]?\d)/,Zg=/^(1[0-1]|0?\d)/,Xg=/^(1[0-2]|0?\d)/,Kg=/^[0-5]?\d/,Gg=/^[0-5]?\d/,Qg=/^\d/,Jg=/^\d{1,2}/,tb=/^\d{1,3}/,eb=/^\d{1,4}/,ib=/^-?\d+/,ob=/^-?\d/,ab=/^-?\d{1,2}/,nb=/^-?\d{1,3}/,sb=/^-?\d{1,4}/,rb=/^([+-])(\d{2})(\d{2})?|Z/,lb=/^([+-])(\d{2})(\d{2})|Z/,cb=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,db=/^([+-])(\d{2}):(\d{2})|Z/,hb=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function ub(t,e){return t?{value:e(t.value),rest:t.rest}:t}function pb(t,e){const i=e.match(t);return i?{value:parseInt(i[0],10),rest:e.slice(i[0].length)}:null}function mb(t,e){const i=e.match(t);if(!i)return null;if("Z"===i[0])return{value:0,rest:e.slice(1)};const o="+"===i[1]?1:-1,a=i[2]?parseInt(i[2],10):0,n=i[3]?parseInt(i[3],10):0,s=i[5]?parseInt(i[5],10):0;return{value:o*(a*Lf+n*Ef+1e3*s),rest:e.slice(i[0].length)}}function _b(t){return pb(ib,t)}function fb(t,e){switch(t){case 1:return pb(Qg,e);case 2:return pb(Jg,e);case 3:return pb(tb,e);case 4:return pb(eb,e);default:return pb(new RegExp("^\\d{1,"+t+"}"),e)}}function gb(t,e){switch(t){case 1:return pb(ob,e);case 2:return pb(ab,e);case 3:return pb(nb,e);case 4:return pb(sb,e);default:return pb(new RegExp("^-?\\d{1,"+t+"}"),e)}}function bb(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function vb(t,e){const i=e>0,o=i?e:1-e;let a;if(o<=50)a=t||100;else{const e=o+50;a=t+100*Math.trunc(e/100)-(t>=e%100?100:0)}return i?a:1-a}function yb(t){return t%400==0||t%4==0&&t%100!=0}const wb=[31,28,31,30,31,30,31,31,30,31,30,31],xb=[31,29,31,30,31,30,31,31,30,31,30,31];function kb(t,e,i){const o=zf(),a=i?.weekStartsOn??i?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,n=Sf(t),s=n.getDay(),r=7-a;return Mf(n,e<0||e>6?e-(s+r)%7:((e%7+7)%7+r)%7-(s+r)%7)}function Sb(t,e){const i=Sf(t),o=function(t){let e=Sf(t).getDay();return 0===e&&(e=7),e}(i);return Mf(i,e-o)}const Tb={G:new class extends Ng{priority=140;parse(t,e,i){switch(e){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}}set(t,e,i){return e.era=i,t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]},y:new class extends Ng{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,e,i){const o=t=>({year:t,isTwoDigitYear:"yy"===e});switch(e){case"y":return ub(fb(4,t),o);case"yo":return ub(i.ordinalNumber(t,{unit:"year"}),o);default:return ub(fb(e.length,t),o)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,i){const o=t.getFullYear();if(i.isTwoDigitYear){const e=vb(i.year,o);return t.setFullYear(e,0,1),t.setHours(0,0,0,0),t}const a="era"in e&&1!==e.era?1-i.year:i.year;return t.setFullYear(a,0,1),t.setHours(0,0,0,0),t}},Y:new class extends Ng{priority=130;parse(t,e,i){const o=t=>({year:t,isTwoDigitYear:"YY"===e});switch(e){case"Y":return ub(fb(4,t),o);case"Yo":return ub(i.ordinalNumber(t,{unit:"year"}),o);default:return ub(fb(e.length,t),o)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,i,o){const a=cg(t,o);if(i.isTwoDigitYear){const e=vb(i.year,a);return t.setFullYear(e,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),Of(t,o)}const n="era"in e&&1!==e.era?1-i.year:i.year;return t.setFullYear(n,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),Of(t,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends Ng{priority=130;parse(t,e){return gb("R"===e?4:e.length,t)}set(t,e,i){const o=Tf(t,0);return o.setFullYear(i,0,4),o.setHours(0,0,0,0),Vf(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends Ng{priority=130;parse(t,e){return gb("u"===e?4:e.length,t)}set(t,e,i){return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},Q:new class extends Ng{priority=120;parse(t,e,i){switch(e){case"Q":case"QQ":return fb(e.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=1&&e<=4}set(t,e,i){return t.setMonth(3*(i-1),1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:new class extends Ng{priority=120;parse(t,e,i){switch(e){case"q":case"qq":return fb(e.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=1&&e<=4}set(t,e,i){return t.setMonth(3*(i-1),1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:new class extends Ng{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,e,i){const o=t=>t-1;switch(e){case"M":return ub(pb(jg,t),o);case"MM":return ub(fb(2,t),o);case"Mo":return ub(i.ordinalNumber(t,{unit:"month"}),o);case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=11}set(t,e,i){return t.setMonth(i,1),t.setHours(0,0,0,0),t}},L:new class extends Ng{priority=110;parse(t,e,i){const o=t=>t-1;switch(e){case"L":return ub(pb(jg,t),o);case"LL":return ub(fb(2,t),o);case"Lo":return ub(i.ordinalNumber(t,{unit:"month"}),o);case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=11}set(t,e,i){return t.setMonth(i,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:new class extends Ng{priority=100;parse(t,e,i){switch(e){case"w":return pb(Ug,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return fb(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,i,o){return Of(function(t,e,i){const o=Sf(t),a=dg(o,i)-e;return o.setDate(o.getDate()-7*a),o}(t,i,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:new class extends Ng{priority=100;parse(t,e,i){switch(e){case"I":return pb(Ug,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return fb(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,i){return Vf(function(t,e){const i=Sf(t),o=lg(i)-e;return i.setDate(i.getDate()-7*o),i}(t,i))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:new class extends Ng{priority=90;subPriority=1;parse(t,e,i){switch(e){case"d":return pb(Wg,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return fb(e.length,t)}}validate(t,e){const i=yb(t.getFullYear()),o=t.getMonth();return i?e>=1&&e<=xb[o]:e>=1&&e<=wb[o]}set(t,e,i){return t.setDate(i),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:new class extends Ng{priority=90;subpriority=1;parse(t,e,i){switch(e){case"D":case"DD":return pb(Bg,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return fb(e.length,t)}}validate(t,e){return yb(t.getFullYear())?e>=1&&e<=366:e>=1&&e<=365}set(t,e,i){return t.setMonth(0,i),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:new class extends Ng{priority=90;parse(t,e,i){switch(e){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,i,o){return(t=kb(t,i,o)).setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends Ng{priority=90;parse(t,e,i,o){const a=t=>{const e=7*Math.floor((t-1)/7);return(t+o.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return ub(fb(e.length,t),a);case"eo":return ub(i.ordinalNumber(t,{unit:"day"}),a);case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,i,o){return(t=kb(t,i,o)).setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:new class extends Ng{priority=90;parse(t,e,i,o){const a=t=>{const e=7*Math.floor((t-1)/7);return(t+o.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return ub(fb(e.length,t),a);case"co":return ub(i.ordinalNumber(t,{unit:"day"}),a);case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=6}set(t,e,i,o){return(t=kb(t,i,o)).setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:new class extends Ng{priority=90;parse(t,e,i){const o=t=>0===t?7:t;switch(e){case"i":case"ii":return fb(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return ub(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return ub(i.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return ub(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o);default:return ub(i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o)}}validate(t,e){return e>=1&&e<=7}set(t,e,i){return(t=Sb(t,i)).setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:new class extends Ng{priority=80;parse(t,e,i){switch(e){case"a":case"aa":case"aaa":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,i){return t.setHours(bb(i),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends Ng{priority=80;parse(t,e,i){switch(e){case"b":case"bb":case"bbb":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,i){return t.setHours(bb(i),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends Ng{priority=80;parse(t,e,i){switch(e){case"B":case"BB":case"BBB":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,i){return t.setHours(bb(i),0,0,0),t}incompatibleTokens=["a","b","t","T"]},h:new class extends Ng{priority=70;parse(t,e,i){switch(e){case"h":return pb(Xg,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return fb(e.length,t)}}validate(t,e){return e>=1&&e<=12}set(t,e,i){const o=t.getHours()>=12;return o&&i<12?t.setHours(i+12,0,0,0):o||12!==i?t.setHours(i,0,0,0):t.setHours(0,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]},H:new class extends Ng{priority=70;parse(t,e,i){switch(e){case"H":return pb(Yg,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return fb(e.length,t)}}validate(t,e){return e>=0&&e<=23}set(t,e,i){return t.setHours(i,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]},K:new class extends Ng{priority=70;parse(t,e,i){switch(e){case"K":return pb(Zg,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return fb(e.length,t)}}validate(t,e){return e>=0&&e<=11}set(t,e,i){return t.getHours()>=12&&i<12?t.setHours(i+12,0,0,0):t.setHours(i,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]},k:new class extends Ng{priority=70;parse(t,e,i){switch(e){case"k":return pb(qg,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return fb(e.length,t)}}validate(t,e){return e>=1&&e<=24}set(t,e,i){const o=i<=24?i%24:i;return t.setHours(o,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]},m:new class extends Ng{priority=60;parse(t,e,i){switch(e){case"m":return pb(Kg,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return fb(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,i){return t.setMinutes(i,0,0),t}incompatibleTokens=["t","T"]},s:new class extends Ng{priority=50;parse(t,e,i){switch(e){case"s":return pb(Gg,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return fb(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,i){return t.setSeconds(i,0),t}incompatibleTokens=["t","T"]},S:new class extends Ng{priority=30;parse(t,e){return ub(fb(e.length,t),(t=>Math.trunc(t*Math.pow(10,3-e.length))))}set(t,e,i){return t.setMilliseconds(i),t}incompatibleTokens=["t","T"]},X:new class extends Ng{priority=10;parse(t,e){switch(e){case"X":return mb(rb,t);case"XX":return mb(lb,t);case"XXXX":return mb(cb,t);case"XXXXX":return mb(hb,t);default:return mb(db,t)}}set(t,e,i){return e.timestampIsSet?t:Tf(t,t.getTime()-Rf(t)-i)}incompatibleTokens=["t","T","x"]},x:new class extends Ng{priority=10;parse(t,e){switch(e){case"x":return mb(rb,t);case"xx":return mb(lb,t);case"xxxx":return mb(cb,t);case"xxxxx":return mb(hb,t);default:return mb(db,t)}}set(t,e,i){return e.timestampIsSet?t:Tf(t,t.getTime()-Rf(t)-i)}incompatibleTokens=["t","T","X"]},t:new class extends Ng{priority=40;parse(t){return _b(t)}set(t,e,i){return[Tf(t,1e3*i),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends Ng{priority=20;parse(t){return _b(t)}set(t,e,i){return[Tf(t,i),{timestampIsSet:!0}]}incompatibleTokens="*"}},Mb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Db=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Cb=/^'([^]*?)'?$/,Ab=/''/g,Pb=/\S/,Eb=/[a-zA-Z]/;function Lb(t,e,i,o){const a=Object.assign({},zf()),n=o?.locale??a.locale??rg,s=o?.firstWeekContainsDate??o?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,r=o?.weekStartsOn??o?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0;if(""===e)return""===t?Sf(i):Tf(i,NaN);const l={firstWeekContainsDate:s,weekStartsOn:r,locale:n},c=[new Fg],d=e.match(Db).map((t=>{const e=t[0];if(e in Tg){return(0,Tg[e])(t,n.formatLong)}return t})).join("").match(Mb),h=[];for(let a of d){!o?.useAdditionalWeekYearTokens&&Pg(a)&&Eg(a,e,t),!o?.useAdditionalDayOfYearTokens&&Ag(a)&&Eg(a,e,t);const s=a[0],r=Tb[s];if(r){const{incompatibleTokens:e}=r;if(Array.isArray(e)){const t=h.find((t=>e.includes(t.token)||t.token===s));if(t)throw new RangeError(`The format string mustn't contain \`${t.fullToken}\` and \`${a}\` at the same time`)}else if("*"===r.incompatibleTokens&&h.length>0)throw new RangeError(`The format string mustn't contain \`${a}\` and any other token at the same time`);h.push({token:s,fullToken:a});const o=r.run(t,a,n.match,l);if(!o)return Tf(i,NaN);c.push(o.setter),t=o.rest}else{if(s.match(Eb))throw new RangeError("Format string contains an unescaped latin alphabet character `"+s+"`");if("''"===a?a="'":"'"===s&&(a=a.match(Cb)[1].replace(Ab,"'")),0!==t.indexOf(a))return Tf(i,NaN);t=t.slice(a.length)}}if(t.length>0&&Pb.test(t))return Tf(i,NaN);const u=c.map((t=>t.priority)).sort(((t,e)=>e-t)).filter(((t,e,i)=>i.indexOf(t)===e)).map((t=>c.filter((e=>e.priority===t)).sort(((t,e)=>e.subPriority-t.subPriority)))).map((t=>t[0]));let p=Sf(i);if(isNaN(p.getTime()))return Tf(i,NaN);const m={};for(const t of u){if(!t.validate(p,l))return Tf(i,NaN);const e=t.set(p,m,l);Array.isArray(e)?(p=e[0],Object.assign(m,e[1])):p=e}return Tf(i,p)}function $b(t,e){const i=e?.additionalDigits??2,o=function(t){const e={},i=t.split(zb.dateTimeDelimiter);let o;if(i.length>2)return e;/:/.test(i[0])?o=i[0]:(e.date=i[0],o=i[1],zb.timeZoneDelimiter.test(e.date)&&(e.date=t.split(zb.timeZoneDelimiter)[0],o=t.substr(e.date.length,t.length)));if(o){const t=zb.timezone.exec(o);t?(e.time=o.replace(t[1],""),e.timezone=t[1]):e.time=o}return e}(t);let a;if(o.date){const t=function(t,e){const i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),o=t.match(i);if(!o)return{year:NaN,restDateString:""};const a=o[1]?parseInt(o[1]):null,n=o[2]?parseInt(o[2]):null;return{year:null===n?a:100*n,restDateString:t.slice((o[1]||o[2]).length)}}(o.date,i);a=function(t,e){if(null===e)return new Date(NaN);const i=t.match(Ob);if(!i)return new Date(NaN);const o=!!i[4],a=Ib(i[1]),n=Ib(i[2])-1,s=Ib(i[3]),r=Ib(i[4]),l=Ib(i[5])-1;if(o)return function(t,e,i){return e>=1&&e<=53&&i>=0&&i<=6}(0,r,l)?function(t,e,i){const o=new Date(0);o.setUTCFullYear(t,0,4);const a=o.getUTCDay()||7,n=7*(e-1)+i+1-a;return o.setUTCDate(o.getUTCDate()+n),o}(e,r,l):new Date(NaN);{const t=new Date(0);return function(t,e,i){return e>=0&&e<=11&&i>=1&&i<=(Fb[e]||(Nb(t)?29:28))}(e,n,s)&&function(t,e){return e>=1&&e<=(Nb(t)?366:365)}(e,a)?(t.setUTCFullYear(e,n,Math.max(a,s)),t):new Date(NaN)}}(t.restDateString,t.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);const n=a.getTime();let s,r=0;if(o.time&&(r=function(t){const e=t.match(Vb);if(!e)return NaN;const i=Rb(e[1]),o=Rb(e[2]),a=Rb(e[3]);if(!function(t,e,i){if(24===t)return 0===e&&0===i;return i>=0&&i<60&&e>=0&&e<60&&t>=0&&t<25}(i,o,a))return NaN;return i*Lf+o*Ef+1e3*a}(o.time),isNaN(r)))return new Date(NaN);if(!o.timezone){const t=new Date(n+r),e=new Date(0);return e.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),e.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),e}return s=function(t){if("Z"===t)return 0;const e=t.match(Hb);if(!e)return 0;const i="+"===e[1]?-1:1,o=parseInt(e[2]),a=e[3]&&parseInt(e[3])||0;if(!function(t,e){return e>=0&&e<=59}(0,a))return NaN;return i*(o*Lf+a*Ef)}(o.timezone),isNaN(s)?new Date(NaN):new Date(n+r+s)}const zb={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Ob=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Vb=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Hb=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Ib(t){return t?parseInt(t):1}function Rb(t){return t&&parseFloat(t.replace(",","."))||0}const Fb=[31,null,31,30,31,30,31,31,30,31,30,31];function Nb(t){return t%400==0||t%4==0&&t%100!=0}const jb={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};Ih._date.override({_id:"date-fns",formats:function(){return jb},parse:function(t,e){if(null==t)return null;const i=typeof t;return"number"===i||t instanceof Date?t=Sf(t):"string"===i&&(t="string"==typeof e?Lb(t,e,new Date,this.options):$b(t,this.options)),jf(t)?t.getTime():null},format:function(t,e){return function(t,e,i){const o=zf(),a=i?.locale??o.locale??rg,n=i?.firstWeekContainsDate??i?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,s=i?.weekStartsOn??i?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,r=Sf(t);if(!jf(r))throw new RangeError("Invalid time value");let l=e.match($g).map((t=>{const e=t[0];return"p"===e||"P"===e?(0,Tg[e])(t,a.formatLong):t})).join("").match(Lg).map((t=>{if("''"===t)return{isToken:!1,value:"'"};const e=t[0];if("'"===e)return{isToken:!1,value:Hg(t)};if(vg[e])return{isToken:!0,value:t};if(e.match(Vg))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return{isToken:!1,value:t}}));a.localize.preprocessor&&(l=a.localize.preprocessor(r,l));const c={firstWeekContainsDate:n,weekStartsOn:s,locale:a};return l.map((o=>{if(!o.isToken)return o.value;const n=o.value;return(!i?.useAdditionalWeekYearTokens&&Pg(n)||!i?.useAdditionalDayOfYearTokens&&Ag(n))&&Eg(n,e,String(t)),(0,vg[n[0]])(r,n,a.localize,c)})).join("")}(t,e,this.options)},add:function(t,e,i){switch(i){case"millisecond":return Cf(t,e);case"second":return function(t,e){return Cf(t,1e3*e)}(t,e);case"minute":return function(t,e){return Cf(t,e*Ef)}(t,e);case"hour":return function(t,e){return Cf(t,e*Lf)}(t,e);case"day":return Mf(t,e);case"week":return function(t,e){return Mf(t,7*e)}(t,e);case"month":return Df(t,e);case"quarter":return function(t,e){return Df(t,3*e)}(t,e);case"year":return function(t,e){return Df(t,12*e)}(t,e);default:return t}},diff:function(t,e,i){switch(i){case"millisecond":return Yf(t,e);case"second":return function(t,e,i){const o=Yf(t,e)/1e3;return Uf(i?.roundingMethod)(o)}(t,e);case"minute":return function(t,e,i){const o=Yf(t,e)/Ef;return Uf(i?.roundingMethod)(o)}(t,e);case"hour":return function(t,e,i){const o=Yf(t,e)/Lf;return Uf(i?.roundingMethod)(o)}(t,e);case"day":return Wf(t,e);case"week":return function(t,e,i){const o=Wf(t,e)/7;return Uf(i?.roundingMethod)(o)}(t,e);case"month":return Xf(t,e);case"quarter":return function(t,e,i){const o=Xf(t,e)/3;return Uf(i?.roundingMethod)(o)}(t,e);case"year":return Kf(t,e);default:return 0}},startOf:function(t,e,i){switch(e){case"second":return function(t){const e=Sf(t);return e.setMilliseconds(0),e}(t);case"minute":return function(t){const e=Sf(t);return e.setSeconds(0,0),e}(t);case"hour":return function(t){const e=Sf(t);return e.setMinutes(0,0,0),e}(t);case"day":return If(t);case"week":return Of(t);case"isoWeek":return Of(t,{weekStartsOn:+i});case"month":return function(t){const e=Sf(t);return e.setDate(1),e.setHours(0,0,0,0),e}(t);case"quarter":return function(t){const e=Sf(t),i=e.getMonth(),o=i-i%3;return e.setMonth(o,1),e.setHours(0,0,0,0),e}(t);case"year":return Gf(t);default:return t}},endOf:function(t,e){switch(e){case"second":return function(t){const e=Sf(t);return e.setMilliseconds(999),e}(t);case"minute":return function(t){const e=Sf(t);return e.setSeconds(59,999),e}(t);case"hour":return function(t){const e=Sf(t);return e.setMinutes(59,59,999),e}(t);case"day":return qf(t);case"week":return function(t,e){const i=zf(),o=i.weekStartsOn??i.locale?.options?.weekStartsOn??0,a=Sf(t),n=a.getDay(),s=6+(n<o?-7:0)-(n-o);return a.setDate(a.getDate()+s),a.setHours(23,59,59,999),a}(t);case"month":return Zf(t);case"quarter":return function(t){const e=Sf(t),i=e.getMonth(),o=i-i%3+3;return e.setMonth(o,0),e.setHours(23,59,59,999),e}(t);case"year":return function(t){const e=Sf(t),i=e.getFullYear();return e.setFullYear(i+1,0,0),e.setHours(23,59,59,999),e}(t);default:return t}}});var Wb=Object.freeze({__proto__:null});const Bb=function(...t){const e="type"===t[0].type,i=t.map((t=>t.schema)),o=Object.assign({},...i);return e?Ua(o):ja(o)}(ja({index:Wa(Na()),view_index:Wa(Na()),view_layout:Ha(),type:Ba()}),ja({entity:Wa(Ba()),name:Wa(Ba()),icon:Wa(Ba()),autoStartStopEnableEntity:Wa(Ba()),autoStartStopStopModeEntity:Wa(Ba()),autoFanEnableEntity:Wa(Ba()),powerEntity:Wa(Ba()),visibility:Wa(Ha())}),ja({disable_name:Wa(Ra()),disable_window:Wa(Ra()),disable_autoStartStop:Wa(Ra()),disable_overpowering:Wa(Ra()),disable_heat:Wa(Ra()),disable_cool:Wa(Ra()),disable_heat_cool:Wa(Ra()),disable_auto:Wa(Ra()),disable_dry:Wa(Ra()),disable_fan_only:Wa(Ra()),disable_off:Wa(Ra()),disable_sleep:Wa(Ra()),disable_safety_warning:Wa(Ra()),disable_power_infos:Wa(Ra()),disable_auto_fan_infos:Wa(Ra()),disable_target_icon:Wa(Ra()),set_current_as_main:Wa(Ra()),eco_temperature:Wa(Na()),disable_menu:Wa(Ra()),disable_buttons:Wa(Ra()),allow_lock_toggle:Wa(Ra()),disable_presets:Wa(Ra()),theme:Wa(Ya([Fa("classic"),Fa("vtherm"),Fa("uncolored"),Fa("gunmalmg")])),disable_timed_preset:Wa(Ra()),use_manual_duration_input:Wa(Ra()),allow_preset_modification:Wa(Ra()),show_status_text:Wa(Ra()),show_background_gradient_on_active:Wa(Ra()),show_regulation_chart:Wa(Ra()),show_humidity:Wa(Ra())}));var Ub;const Yb=["icon_color","layout","fill_container","primary_info","secondary_info","icon_type","content_info","use_entity_picture","collapsible_controls","icon_animation"],qb=t=>{var e,i;customElements.get("ha-form")&&(customElements.get("hui-action-editor")||((t,e,i,o)=>{const[a,n,s]=t.split(".",3);return Number(a)>e||Number(a)===e&&(void 0===o?Number(n)>=i:Number(n)>i)||void 0!==o&&Number(a)===e&&Number(n)===i&&Number(s)>=o})(t,2022,11))||null===(e=customElements.get("hui-button-card"))||void 0===e||e.getConfigElement(),customElements.get("ha-entity-picker")||null===(i=customElements.get("hui-entities-card"))||void 0===i||i.getConfigElement()},Zb=["theme","autoStartStopEnableEntity","autoStartStopStopModeEntity","autoFanEnableEntity","powerEntity","section_all_themes","section_classic_only","disable_name","disable_window","disable_autoStartStop","disable_overpowering","disable_heat","disable_cool","disable_heat_cool","disable_auto","disable_dry","disable_fan_only","disable_off","disable_sleep","disable_menu","disable_safety_warning","disable_buttons","set_current_as_main","disable_power_infos","disable_auto_fan_infos","disable_target_icon","allow_lock_toggle","disable_presets","disable_timed_preset","use_manual_duration_input","allow_preset_modification","show_status_text","show_background_gradient_on_active","show_regulation_chart","show_humidity"],Xb=wa(((t,e)=>[{name:"entity",selector:{entity:{domain:["climate"]}}},{name:"name",selector:{text:{}}},{name:"theme",selector:{select:{options:t}}},{type:"grid",name:"",schema:[{name:"autoStartStopEnableEntity",selector:{entity:{domain:["switch"]}}},{name:"autoStartStopStopModeEntity",selector:{entity:{domain:["select"]}}},{name:"autoFanEnableEntity",selector:{entity:{domain:["switch"]}}},{name:"powerEntity",selector:{entity:{domain:["sensor","input_number"]}}}]},{type:"expandable",name:"section_all_themes",icon:"mdi:cog",schema:[{name:"disable_name",selector:{boolean:{}}},{name:"disable_safety_warning",selector:{boolean:{}}},{name:"set_current_as_main",selector:{boolean:{}}},{name:"allow_lock_toggle",selector:{boolean:{}}},{name:"disable_timed_preset",selector:{boolean:{}}},{name:"use_manual_duration_input",selector:{boolean:{}}},{name:"allow_preset_modification",selector:{boolean:{}}},{name:"show_regulation_chart",selector:{boolean:{}}},{name:"show_humidity",selector:{boolean:{}}}]},...e?[]:[{type:"expandable",name:"section_classic_only",icon:"mdi:palette-outline",schema:[{name:"disable_window",selector:{boolean:{}}},{name:"disable_autoStartStop",selector:{boolean:{}}},{name:"disable_overpowering",selector:{boolean:{}}},{name:"disable_heat",selector:{boolean:{}}},{name:"disable_cool",selector:{boolean:{}}},{name:"disable_heat_cool",selector:{boolean:{}}},{name:"disable_auto",selector:{boolean:{}}},{name:"disable_dry",selector:{boolean:{}}},{name:"disable_fan_only",selector:{boolean:{}}},{name:"disable_off",selector:{boolean:{}}},{name:"disable_sleep",selector:{boolean:{}}},{name:"disable_menu",selector:{boolean:{}}},{name:"disable_buttons",selector:{boolean:{}}},{name:"disable_power_infos",selector:{boolean:{}}},{name:"disable_auto_fan_infos",selector:{boolean:{}}},{name:"disable_target_icon",selector:{boolean:{}}},{name:"disable_presets",selector:{boolean:{}}},{name:"show_status_text",selector:{boolean:{}}},{name:"show_background_gradient_on_active",selector:{boolean:{}}}]}]]));let Kb=Ub=class extends lt{constructor(){super(...arguments),this._computeLabel=t=>{const e=fa(this.hass);return Yb.includes(t.name)?e(`editor.card.generic.${t.name}`):Zb.includes(t.name)?e(`editor.card.climate.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),qb(this.hass.connection.haVersion)}setConfig(t){za(t,Bb),this._config=t}render(){var t;if(!this.hass||!this._config)return W``;const e=fa(this.hass),i=[{value:"classic",label:e("editor.card.climate.theme_classic")||"Classic"},{value:"vtherm",label:e("editor.card.climate.theme_vtherm")||"VTherm"},{value:"uncolored",label:e("editor.card.climate.theme_uncolored")||"Uncolored"},{value:"gunmalmg",label:e("editor.card.climate.theme_gunmalmg")||"Gunmalmg"}],o="gunmalmg"===(null===(t=this._config)||void 0===t?void 0:t.theme),a=Xb(i,o),n=Object.assign({},this._config),s={};for(const t of Ub.ALL_THEMES_KEYS)void 0!==this._config[t]&&(s[t]=this._config[t]),delete n[t];if(n.section_all_themes=s,!o){const t={};for(const e of Ub.CLASSIC_ONLY_KEYS)void 0!==this._config[e]&&(t[e]=this._config[e]),delete n[e];n.section_classic_only=t}return W`
|
||
<ha-form
|
||
.hass=${this.hass}
|
||
.data=${n}
|
||
.schema=${a}
|
||
.computeLabel=${this._computeLabel}
|
||
@value-changed=${this._valueChanged}
|
||
></ha-form>
|
||
`}_valueChanged(t){const e=t.detail.value,{section_all_themes:i,section_classic_only:o}=e,a=function(t,e){var i={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(i[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(t);a<o.length;a++)e.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(t,o[a])&&(i[o[a]]=t[o[a]])}return i}(e,["section_all_themes","section_classic_only"]),n=Object.assign(Object.assign(Object.assign({},a),i||{}),o||{});n.theme||(n.theme="classic"),ka(this,"config-changed",{config:n}),ka(this,"hass",{config:n})}};Kb.ALL_THEMES_KEYS=["disable_name","disable_safety_warning","set_current_as_main","allow_lock_toggle","disable_timed_preset","use_manual_duration_input","allow_preset_modification","show_regulation_chart","show_humidity"],Kb.CLASSIC_ONLY_KEYS=["disable_window","disable_autoStartStop","disable_overpowering","disable_heat","disable_cool","disable_heat_cool","disable_auto","disable_dry","disable_fan_only","disable_off","disable_sleep","disable_menu","disable_buttons","disable_power_infos","disable_auto_fan_infos","disable_target_icon","disable_presets","show_status_text","show_background_gradient_on_active"],t([mt()],Kb.prototype,"_config",void 0),t([pt({attribute:!1})],Kb.prototype,"hass",void 0),Kb=Ub=t([dt("versatile-thermostat-ui-card-editor")],Kb);var Gb=Object.freeze({__proto__:null,get ClimateCardEditor(){return Kb}});export{Ar as VersatileThermostatUi,Mr as registerCustomCard};
|