7 files
This commit is contained in:
1 parent
4d4f27e6e4
commit
42fb66ead3
7 files changed
+91
-76
No files matched your search
@@ -1 +1 @@
|
||||
const _0x376e89=_0x24d9;(function(_0x5c9712,_0x407a7a){const _0x1af3c9=_0x24d9,_0x17290f=_0x5c9712();while(!![]){try{const _0x424049=-parseInt(_0x1af3c9(0x46e))/0x1*(parseInt(_0x1af3c9(0xdc1))/0x2)+parseInt(_0x1af3c9(0x789))/0x3*(parseInt(_0x1af3c9(0xdc7))/0x4)+-parseInt(_0x1af3c9(0xbf8))/0x5*(-parseInt(_0x1af3c9(0x24a))/0x6)+parseInt(_0x1af3c9(0x28a))/0x7+-parseInt(_0x1af3c9(0x773))/0x8+-parseInt(_0x1af3c9(0xc6c))/0x9*(-parseInt(_0x1af3c9(0x8cc))/0xa)+-parseInt(_0x1af3c9(0x15d))/0xb;if(_0x424049===_0x407a7a)break;else _0x17290f['push'](_0x17290f['shift']());}catch(_0x1e009f){_0x17290f['push'](_0x17290f['shift']());}}}(_0x1a11,0x7bf60));const VERSION=_0x376e89(0x15f),INTERVAL_PICKER_OPTIONS=Object['freeze']([{'hours':0x1,'label':'1H'},{'hours':0x2,'label':'2H'},{'hours':0x4,'label':'4H'},{'hours':0x8,'label':'8H'},{'hours':0xc,'label':'12H'},{'hours':0x18,'label':_0x376e89(0x76c)},{'hours':0x48,'label':'3D'},{'hours':0xa8,'label':'7D'},{'hours':0x150,'label':_0x376e89(0x3fc)},{'hours':0x2d0,'label':_0x376e89(0xd54)},{'hours':0x870,'label':_0x376e89(0xb23)},{'hours':0x10e0,'label':'6M'},{'hours':0x2238,'label':'1Y'}]),INTERVAL_PICKER_DEFAULT_LABELS=Object['freeze'](['1H','2H','4H','8H',_0x376e89(0xde7),_0x376e89(0x76c),'7D']),DATE_PICKER_VALID_MODES=Object[_0x376e89(0x4ff)](['day','week','month',_0x376e89(0x39c)]),DATE_PICKER_RELATIVE_MODES=Object[_0x376e89(0x4ff)]({'last_24h':{'hours':0x18,'label':_0x376e89(0xc7d),'btn':_0x376e89(0x76c)},'last_3d':{'days':0x3,'label':_0x376e89(0x3ea),'btn':'3D'},'last_7d':{'days':0x7,'label':_0x376e89(0x36f),'btn':'7D'},'last_15d':{'days':0xf,'label':_0x376e89(0x1cb),'btn':_0x376e89(0x9f5)},'last_30d':{'days':0x1e,'label':_0x376e89(0xa43),'btn':'30D'},'last_90d':{'days':0x5a,'label':'Last\x2090\x20days','btn':_0x376e89(0xb23)},'last_180d':{'days':0xb4,'label':'Last\x20180\x20days','btn':'180D'},'last_12m':{'months':0xc,'label':_0x376e89(0x26c),'btn':'12M'}}),LIVE_FLUSH_DEBOUNCE_MS=0x3e8,LIVE_SLIDE_INTERVAL_MS=0x7530,CARD_DEFAULTS=Object[_0x376e89(0x4ff)]({'card_header':'','card_icon':null,'card_icon_color':null,'card_icon_image':null,'card_header_size':null,'card_background_color':null,'card_shadow':!![],'card_border':!![],'card_padding':null,'card_border_radius':null,'card_border_color':null,'card_border_width':null,'card_background_image':null,'card_background_blur':null,'card_header_color':null,'card_header_weight':null,'card_header_letter_spacing':null,'card_icon_size':null,'card_icon_position':_0x376e89(0x8fa),'align_header':_0x376e89(0x8fa),'chart_mode':'timeline','chart_align':'center','sparkline':![],'height':0x96,'animate_graph':![],'brush_zoom':!![],'drill_down':![],'stacked':![],'enable_zoom':!![],'hours_to_show':0x18,'points_per_hour':0x2,'auto_scale_points':![],'group_by':_0x376e89(0xb9f),'time_zone':_0x376e89(0xb6d),'language':_0x376e89(0xb6d),'update_interval':null,'cache':!![],'graph_start':null,'graph_start_hour':null,'graph_end_hour':null,'show_full_period':![],'max_visible_interval':null,'extended_window_multiplier':null,'scroll_mode':'scrollbar','show_grid':!![],'show_cell_values':!![],'show_tooltip':!![],'show_tooltip_total':!![],'tooltip_stacked_total':!![],'show_x_axis':!![],'show_y_axis':!![],'show_y2_axis':![],'show_x_ticks':![],'show_y_ticks':![],'logarithmic':![],'lower_bound':null,'upper_bound':null,'lower_bound_secondary':null,'upper_bound_secondary':null,'min_bound_range':null,'min_bound_range_secondary':null,'y_axis_ticks':null,'y_axis_decimals':null,'y_axis_number_format':'system','y_axis_round_ticks':!![],'y_axis_label':null,'y2_axis_label':null,'show_y_axis_label':![],'y_axis_font_size':null,'y_axis_font_opacity':null,'y_axis_color':null,'x_axis_font_size':null,'x_axis_font_opacity':null,'x_axis_color':null,'x_axis_date_color':null,'x_axis_interval':null,'datetime_format':_0x376e89(0x5b7),'x_axis_datetime_format':null,'x_grid_color':null,'x_grid_width':null,'x_grid_style':null,'x_grid_opacity':0.15,'y_grid_color':null,'y_grid_width':null,'y_grid_style':null,'y_grid_opacity':0.15,'bar_spacing':0x4,'period_highlight':![],'period_highlight_color':null,'state_timeline_corner_radius':0x3,'state_timeline_show_labels':!![],'state_timeline_label_font_size':null,'show_export':![],'pie_style':'donut','pie_spacing':0x0,'pie_3d':![],'pie_label_font_size':null,'pie_label_color':null,'pie_label_format':_0x376e89(0xda1),'pie_center_font_size':null,'pie_center_color':null,'show_legend':![],'legend_position':_0x376e89(0xa1b),'show_interval_picker':![],'interval_picker_position':_0x376e89(0x8fa),'show_attribute_list':![],'attribute_list_position':'left','show_pph_picker':![],'pph_picker_position':_0x376e89(0x8fa),'show_group_by_picker':![],'group_by_picker_position':_0x376e89(0x8fa),'pph_picker_group':null,'group_by_picker_group':null,'show_date_picker':![],'date_picker_position':_0x376e89(0x751),'date_picker_nav_position':_0x376e89(0x8fa),'date_picker_shortcuts_position':_0x376e89(0x51b),'auto_hide_entities':![],'y_axis_format':'','y2_axis_format':'','duraLine truncated
|
||||
const _0x160929=_0x53a5;(function(_0x14e4d7,_0x4b2248){const _0x1d0daf=_0x53a5,_0x4c622a=_0x14e4d7();while(!![]){try{const _0x22f39b=-parseInt(_0x1d0daf(0x3dd))/0x1+-parseInt(_0x1d0daf(0xc34))/0x2+parseInt(_0x1d0daf(0x69f))/0x3*(parseInt(_0x1d0daf(0x705))/0x4)+parseInt(_0x1d0daf(0x7a4))/0x5*(-parseInt(_0x1d0daf(0xd2e))/0x6)+parseInt(_0x1d0daf(0x579))/0x7*(parseInt(_0x1d0daf(0x2ee))/0x8)+parseInt(_0x1d0daf(0xe14))/0x9+-parseInt(_0x1d0daf(0x595))/0xa;if(_0x22f39b===_0x4b2248)break;else _0x4c622a['push'](_0x4c622a['shift']());}catch(_0x2a17a0){_0x4c622a['push'](_0x4c622a['shift']());}}}(_0x3ef4,0x566c6));const VERSION=_0x160929(0x847),INTERVAL_PICKER_OPTIONS=Object[_0x160929(0x77b)]([{'hours':0x1,'label':'1H'},{'hours':0x2,'label':'2H'},{'hours':0x4,'label':'4H'},{'hours':0x8,'label':'8H'},{'hours':0xc,'label':_0x160929(0x50c)},{'hours':0x18,'label':_0x160929(0x1da)},{'hours':0x48,'label':'3D'},{'hours':0xa8,'label':'7D'},{'hours':0x150,'label':'14D'},{'hours':0x2d0,'label':_0x160929(0x871)},{'hours':0x870,'label':'90D'},{'hours':0x10e0,'label':'6M'},{'hours':0x2238,'label':'1Y'}]),INTERVAL_PICKER_DEFAULT_LABELS=Object['freeze'](['1H','2H','4H','8H',_0x160929(0x50c),_0x160929(0x1da),'7D']),DATE_PICKER_VALID_MODES=Object[_0x160929(0x77b)](['day',_0x160929(0x26d),_0x160929(0x4e2),_0x160929(0x4f9)]),DATE_PICKER_RELATIVE_MODES=Object[_0x160929(0x77b)]({'last_24h':{'hours':0x18,'label':_0x160929(0xa10),'btn':_0x160929(0x1da)},'last_3d':{'days':0x3,'label':_0x160929(0xb7b),'btn':'3D'},'last_7d':{'days':0x7,'label':_0x160929(0x528),'btn':'7D'},'last_15d':{'days':0xf,'label':_0x160929(0xdaf),'btn':'15D'},'last_30d':{'days':0x1e,'label':'Last\x2030\x20days','btn':'30D'},'last_90d':{'days':0x5a,'label':'Last\x2090\x20days','btn':_0x160929(0xbf4)},'last_180d':{'days':0xb4,'label':_0x160929(0x615),'btn':'180D'},'last_12m':{'months':0xc,'label':'Last\x2012\x20months','btn':_0x160929(0x7f0)}}),LIVE_FLUSH_DEBOUNCE_MS=0x3e8,LIVE_SLIDE_INTERVAL_MS=0x7530,CARD_DEFAULTS=Object['freeze']({'card_header':'','card_icon':null,'card_icon_color':null,'card_icon_image':null,'card_header_size':null,'card_background_color':null,'card_shadow':!![],'card_border':!![],'card_padding':null,'card_border_radius':null,'card_border_color':null,'card_border_width':null,'card_background_image':null,'card_background_blur':null,'card_header_color':null,'card_header_weight':null,'card_header_letter_spacing':null,'card_icon_size':null,'card_icon_position':_0x160929(0xa36),'align_header':_0x160929(0xa36),'chart_mode':_0x160929(0xa73),'chart_align':'center','sparkline':![],'height':0x96,'animate_graph':![],'brush_zoom':!![],'drill_down':![],'stacked':![],'enable_zoom':!![],'hours_to_show':0x18,'points_per_hour':0x2,'auto_scale_points':![],'group_by':_0x160929(0x6e0),'time_zone':'auto','language':_0x160929(0x959),'update_interval':null,'cache':!![],'graph_start':null,'graph_start_hour':null,'graph_end_hour':null,'show_full_period':![],'max_visible_interval':null,'extended_window_multiplier':null,'scroll_mode':_0x160929(0x920),'show_grid':!![],'show_cell_values':!![],'show_tooltip':!![],'show_tooltip_total':!![],'tooltip_stacked_total':!![],'show_x_axis':!![],'show_y_axis':!![],'show_y2_axis':![],'show_x_ticks':![],'show_y_ticks':![],'logarithmic':![],'lower_bound':null,'upper_bound':null,'lower_bound_secondary':null,'upper_bound_secondary':null,'min_bound_range':null,'min_bound_range_secondary':null,'y_axis_ticks':null,'y_axis_decimals':null,'y_axis_number_format':_0x160929(0xbd5),'y_axis_round_ticks':!![],'y_axis_label':null,'y2_axis_label':null,'show_y_axis_label':![],'y_axis_font_size':null,'y_axis_font_opacity':null,'y_axis_color':null,'x_axis_font_size':null,'x_axis_font_opacity':null,'x_axis_color':null,'x_axis_date_color':null,'x_axis_interval':null,'datetime_format':_0x160929(0xbd5),'x_axis_datetime_format':null,'x_grid_color':null,'x_grid_width':null,'x_grid_style':null,'x_grid_opacity':0.15,'y_grid_color':null,'y_grid_width':null,'y_grid_style':null,'y_grid_opacity':0.15,'bar_spacing':0x4,'period_highlight':![],'period_highlight_color':null,'state_timeline_corner_radius':0x3,'state_timeline_show_labels':!![],'state_timeline_label_font_size':null,'show_export':![],'pie_style':_0x160929(0x797),'pie_spacing':0x0,'pie_3d':![],'pie_label_font_size':null,'pie_label_color':null,'pie_label_format':_0x160929(0xe91),'pie_center_font_size':null,'pie_center_color':null,'show_legend':![],'legend_position':'center','show_interval_picker':![],'interval_picker_position':_0x160929(0xa36),'show_attribute_list':![],'attribute_list_position':'left','show_pph_picker':![],'pph_picker_position':_0x160929(0xa36),'show_group_by_picker':![],'group_by_picker_position':_0x160929(0xa36),'pph_picker_group':null,'group_by_picker_group':null,'show_date_picker':![],'date_picker_position':_0x160929(0x70d),'date_picker_nav_position':_0x160929(0xa36),'date_picker_shortcuts_position':_0x160929(0x785),'auto_hide_entities':![],'y_axis_format':'','y2_axis_format':'','duration_unit':'sLine truncated
|
||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
export const T_VERSION = "4.00";
|
||||
export const T_VERSION = "4.01";
|
||||
|
||||
export const LANG_NAMES = Object.freeze({
|
||||
en: "English", cs: "Čeština", da: "Dansk", de: "Deutsch", es: "Español",
|
||||
|
||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,a=Symbol(),i=new WeakMap;let n=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==a)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const a=this.t;if(t&&void 0===e){const t=void 0!==a&&1===a.length;t&&(e=i.get(a)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),t&&i.set(a,e))}return e}toString(){return this.cssText}};const o=(e,...t)=>{const i=1===e.length?e[0]:t.reduce(((t,a,i)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(a)+e[i+1]),e[0]);return new n(i,e,a)},r=t?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const a of e.cssRules)t+=a.cssText;return(e=>new n("string"==typeof e?e:e+"",void 0,a))(t)})(e):e,{is:s,defineProperty:l,getOwnPropertyDescriptor:d,getOwnPropertyNames:_,getOwnPropertySymbols:c,getPrototypeOf:u}=Object,m=globalThis,h=m.trustedTypes,p=h?h.emptyScript:"",g=m.reactiveElementPolyfillSupport,y=(e,t)=>e,v={toAttribute(e,t){switch(t){case Boolean:e=e?p:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let a=e;switch(t){case Boolean:a=null!==e;break;case Number:a=null===e?null:Number(e);break;case Object:case Array:try{a=JSON.parse(e)}catch(e){a=null}}return a}},f=(e,t)=>!s(e,t),k={attribute:!0,type:String,converter:v,reflect:!1,useDefault:!1,hasChanged:f};Symbol.metadata??=Symbol("metadata"),m.litPropertyMetadata??=new WeakMap;let w=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=k){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const a=Symbol(),i=this.getPropertyDescriptor(e,a,t);void 0!==i&&l(this.prototype,e,i)}}static getPropertyDescriptor(e,t,a){const{get:i,set:n}=d(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:i,set(t){const o=i?.call(this);n?.call(this,t),this.requestUpdate(e,o,a)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??k}static _$Ei(){if(this.hasOwnProperty(y("elementProperties")))return;const e=u(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(y("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(y("properties"))){const e=this.properties,t=[..._(e),...c(e)];for(const a of t)this.createProperty(a,e[a])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,a]of t)this.elementProperties.set(e,a)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const a=this._$Eu(e,t);void 0!==a&&this._$Eh.set(a,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const a=new Set(e.flat(1/0).reverse());for(const e of a)t.unshift(r(e))}else void 0!==e&&t.push(r(e));return t}static _$Eu(e,t){const a=t.attribute;return!1===a?void 0:"string"==typeof a?a:"string"==typeof e?e.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((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const a of t.keys())this.hasOwnProperty(a)&&(e.set(a,this[a]),delete this[a]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const a=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((a,i)=>{if(t)a.adoptedStyleSheets=i.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const t of i){const i=document.createElement("style"),n=e.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=t.cssText,a.appendChild(i)}})(a,this.constructor.elementStyles),a}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,a){this._$AK(e,a)}_$ET(e,t){const a=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,a);if(void 0!==i&&!0===a.reflect){const n=(void 0!==a.converter?.toAttribute?a.converter:v).toAttribute(t,a.type);this._$Em=e,null==n?thisLine truncated
|
||||
const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,a=Symbol(),i=new WeakMap;let n=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==a)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const a=this.t;if(t&&void 0===e){const t=void 0!==a&&1===a.length;t&&(e=i.get(a)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),t&&i.set(a,e))}return e}toString(){return this.cssText}};const o=(e,...t)=>{const i=1===e.length?e[0]:t.reduce(((t,a,i)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(a)+e[i+1]),e[0]);return new n(i,e,a)},r=t?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const a of e.cssRules)t+=a.cssText;return(e=>new n("string"==typeof e?e:e+"",void 0,a))(t)})(e):e,{is:s,defineProperty:l,getOwnPropertyDescriptor:d,getOwnPropertyNames:_,getOwnPropertySymbols:c,getPrototypeOf:u}=Object,m=globalThis,h=m.trustedTypes,p=h?h.emptyScript:"",g=m.reactiveElementPolyfillSupport,y=(e,t)=>e,v={toAttribute(e,t){switch(t){case Boolean:e=e?p:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let a=e;switch(t){case Boolean:a=null!==e;break;case Number:a=null===e?null:Number(e);break;case Object:case Array:try{a=JSON.parse(e)}catch(e){a=null}}return a}},f=(e,t)=>!s(e,t),k={attribute:!0,type:String,converter:v,reflect:!1,useDefault:!1,hasChanged:f};Symbol.metadata??=Symbol("metadata"),m.litPropertyMetadata??=new WeakMap;let w=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=k){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const a=Symbol(),i=this.getPropertyDescriptor(e,a,t);void 0!==i&&l(this.prototype,e,i)}}static getPropertyDescriptor(e,t,a){const{get:i,set:n}=d(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:i,set(t){const o=i?.call(this);n?.call(this,t),this.requestUpdate(e,o,a)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??k}static _$Ei(){if(this.hasOwnProperty(y("elementProperties")))return;const e=u(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(y("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(y("properties"))){const e=this.properties,t=[..._(e),...c(e)];for(const a of t)this.createProperty(a,e[a])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,a]of t)this.elementProperties.set(e,a)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const a=this._$Eu(e,t);void 0!==a&&this._$Eh.set(a,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const a=new Set(e.flat(1/0).reverse());for(const e of a)t.unshift(r(e))}else void 0!==e&&t.push(r(e));return t}static _$Eu(e,t){const a=t.attribute;return!1===a?void 0:"string"==typeof a?a:"string"==typeof e?e.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((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const a of t.keys())this.hasOwnProperty(a)&&(e.set(a,this[a]),delete this[a]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const a=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((a,i)=>{if(t)a.adoptedStyleSheets=i.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const t of i){const i=document.createElement("style"),n=e.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=t.cssText,a.appendChild(i)}})(a,this.constructor.elementStyles),a}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,a){this._$AK(e,a)}_$ET(e,t){const a=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,a);if(void 0!==i&&!0===a.reflect){const n=(void 0!==a.converter?.toAttribute?a.converter:v).toAttribute(t,a.type);this._$Em=e,null==n?thisLine truncated
|
||||
/* ===== CORE CONTAINER STYLES ===== */
|
||||
|
||||
:host {
|
||||
@@ -600,7 +600,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
`;function $i(e){e.style.opacity="0",e.style.transition=`opacity ${fe}ms ease-out`,setTimeout((()=>{e.parentNode&&(e.parentNode.removeChild(e),Ie("Removed hold indicator"))}),fe)}const ji=1,xi=2,Yi=e=>(...t)=>({_$litDirective$:e,values:t});let Li=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,a){this._$Ct=e,this._$AM=t,this._$Ci=a}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};const Ei=Yi(class extends Li{constructor(e){if(super(e),e.type!==ji||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){if(void 0===this.st){this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(t)}const a=e.element.classList;for(const e of this.st)e in t||(a.remove(e),this.st.delete(e));for(const e in t){const i=!!t[e];i===this.st.has(e)||this.nt?.has(e)||(i?(a.add(e),this.st.add(e)):(a.remove(e),this.st.delete(e)))}return N}}),Ai="important",Ci=" !"+Ai,Hi=Yi(class extends Li{constructor(e){if(super(e),e.type!==ji||"style"!==e.name||e.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce(((t,a)=>{const i=e[a];return null==i?t:t+`${a=a.includes("-")?a:a.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(e,[t]){const{style:a}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(t)),this.render(t);for(const e of this.ft)null==t[e]&&(this.ft.delete(e),e.includes("-")?a.removeProperty(e):a[e]=null);for(const e in t){const i=t[e];if(null!=i){this.ft.add(e);const t="string"==typeof i&&i.endsWith(Ci);e.includes("-")||t?a.setProperty(e,t?i.slice(0,-11):i,t?Ai:""):a[e]=i}}return N}}),{I:Pi}=ae,Vi=()=>document.createComment(""),Fi=(e,t,a)=>{const i=e._$AA.parentNode,n=void 0===t?e._$AB:t._$AA;if(void 0===a){const t=i.insertBefore(Vi(),n),o=i.insertBefore(Vi(),n);a=new Pi(t,o,e,e.options)}else{const t=a._$AB.nextSibling,o=a._$AM,r=o!==e;if(r){let t;a._$AQ?.(e),a._$AM=e,void 0!==a._$AP&&(t=e._$AU)!==o._$AU&&a._$AP(t)}if(t!==n||r){let e=a._$AA;for(;e!==t;){const t=e.nextSibling;i.insertBefore(e,n),e=t}}}return a},Oi=(e,t,a=e)=>(e._$AI(t,a),e),Ii={},Ni=(e,t=Ii)=>e._$AH=t,Wi=e=>{e._$AR(),e._$AA.remove()},Ki=(e,t,a)=>{const i=new Map;for(let n=t;n<=a;n++)i.set(e[n],n);return i},Ri=Yi(class extends Li{constructor(e){if(super(e),e.type!==xi)throw Error("repeat() can only be used in text expressions")}dt(e,t,a){let i;void 0===a?a=t:void 0!==t&&(i=t);const n=[],o=[];let r=0;for(const t of e)n[r]=i?i(t,r):r,o[r]=a(t,r),r++;return{values:o,keys:n}}render(e,t,a){return this.dt(e,t,a).values}update(e,[t,a,i]){const n=(e=>e._$AH)(e),{values:o,keys:r}=this.dt(t,a,i);if(!Array.isArray(n))return this.ut=r,o;const s=this.ut??=[],l=[];let d,_,c=0,u=n.length-1,m=0,h=o.length-1;for(;c<=u&&m<=h;)if(null===n[c])c++;else if(null===n[u])u--;else if(s[c]===r[m])l[m]=Oi(n[c],o[m]),c++,m++;else if(s[u]===r[h])l[h]=Oi(n[u],o[h]),u--,h--;else if(s[c]===r[h])l[h]=Oi(n[c],o[h]),Fi(e,l[h+1],n[c]),c++,h--;else if(s[u]===r[m])l[m]=Oi(n[u],o[m]),Fi(e,n[c],n[u]),u--,m++;else if(void 0===d&&(d=Ki(r,m,h),_=Ki(s,c,u)),d.has(s[c]))if(d.has(s[u])){const t=_.get(r[m]),a=void 0!==t?n[t]:null;if(null===a){const t=Fi(e,n[c]);Oi(t,o[m]),l[m]=t}else l[m]=Oi(a,o[m]),Fi(e,n[c],a),n[t]=null;m++}else Wi(n[u]),u--;else Wi(n[c]),c++;for(;m<=h;){const t=Fi(e,l[h+1]);Oi(t,o[m]),l[m++]=t}for(;c<=u;){const e=n[c++];null!==e&&Wi(e)}return this.ut=r,Ni(e,l),N}});function Ui(e,t){const a={};return e&&Array.isArray(e)?(e.forEach((e=>{if(!e.datetime)return;let i,n,o;"hourly"===t?(o=new Date(e.datetime),n=o.getHours(),i=`${Ga(o)}_${n}`):(o=new Date(e.datetime),i=Ga(o));const r=function(e,t){const a=void 0!==t&&(t>=18||t<6);if(a&&Ji[e])return Ji[e];return Bi[e]||"mdi:weather-cloudy-alert"}(e.condition,n);a[i]={icon:r,condition:e.condition,temperature:Math.round(e.temperature),templow:void 0!==e.templow?Math.round(e.templow):void 0,datetime:e.datetime,hour:n,precipitation:e.precipitation,precipitation_probability:e.precipitation_probability,uv_index:void 0!==e.uv_index?Math.round(e.uv_index):void 0}})),a):a}const Bi={"clear-night":"mdi:weather-night",cloudy:"mdi:weather-cloudy",fog:"mdi:weather-fog",hail:"mdi:weather-hail",lightning:"mdi:weather-lightning","lightning-rainy":"mdi:weather-lightning-rainy",partlycloudy:"mdi:weather-partly-cloudy",pouring:"mdi:weather-pouring",rainy:"mdi:weather-rainy",snowy:"mdi:weather-snowy","snowy-rainy":"mdi:weather-snowy-rainy",sunny:"mdi:weather-sunny",windy:"mdi:weather-windy","windy-variant":"mdi:weather-windy-variant",exceptional:"mdi:weather-cloudy-alert"},Ji={sunny:"mdi:weather-night",partlycloudy:"mdi:weather-night-partly-cloudy","lightning-rainy":"mdi
Line truncated
|
||||
`;function Yi(e){e.style.opacity="0",e.style.transition=`opacity ${fe}ms ease-out`,setTimeout((()=>{e.parentNode&&(e.parentNode.removeChild(e),Ie("Removed hold indicator"))}),fe)}const Li=1,Ei=2,Ai=e=>(...t)=>({_$litDirective$:e,values:t});let Ci=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,a){this._$Ct=e,this._$AM=t,this._$Ci=a}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};const Hi=Ai(class extends Ci{constructor(e){if(super(e),e.type!==Li||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){if(void 0===this.st){this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(t)}const a=e.element.classList;for(const e of this.st)e in t||(a.remove(e),this.st.delete(e));for(const e in t){const i=!!t[e];i===this.st.has(e)||this.nt?.has(e)||(i?(a.add(e),this.st.add(e)):(a.remove(e),this.st.delete(e)))}return N}}),Pi="important",Vi=" !"+Pi,Fi=Ai(class extends Ci{constructor(e){if(super(e),e.type!==Li||"style"!==e.name||e.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce(((t,a)=>{const i=e[a];return null==i?t:t+`${a=a.includes("-")?a:a.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(e,[t]){const{style:a}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(t)),this.render(t);for(const e of this.ft)null==t[e]&&(this.ft.delete(e),e.includes("-")?a.removeProperty(e):a[e]=null);for(const e in t){const i=t[e];if(null!=i){this.ft.add(e);const t="string"==typeof i&&i.endsWith(Vi);e.includes("-")||t?a.setProperty(e,t?i.slice(0,-11):i,t?Pi:""):a[e]=i}}return N}}),{I:Oi}=ae,Ii=()=>document.createComment(""),Ni=(e,t,a)=>{const i=e._$AA.parentNode,n=void 0===t?e._$AB:t._$AA;if(void 0===a){const t=i.insertBefore(Ii(),n),o=i.insertBefore(Ii(),n);a=new Oi(t,o,e,e.options)}else{const t=a._$AB.nextSibling,o=a._$AM,r=o!==e;if(r){let t;a._$AQ?.(e),a._$AM=e,void 0!==a._$AP&&(t=e._$AU)!==o._$AU&&a._$AP(t)}if(t!==n||r){let e=a._$AA;for(;e!==t;){const t=e.nextSibling;i.insertBefore(e,n),e=t}}}return a},Wi=(e,t,a=e)=>(e._$AI(t,a),e),Ki={},Ri=(e,t=Ki)=>e._$AH=t,Ui=e=>{e._$AR(),e._$AA.remove()},Bi=(e,t,a)=>{const i=new Map;for(let n=t;n<=a;n++)i.set(e[n],n);return i},Ji=Ai(class extends Ci{constructor(e){if(super(e),e.type!==Ei)throw Error("repeat() can only be used in text expressions")}dt(e,t,a){let i;void 0===a?a=t:void 0!==t&&(i=t);const n=[],o=[];let r=0;for(const t of e)n[r]=i?i(t,r):r,o[r]=a(t,r),r++;return{values:o,keys:n}}render(e,t,a){return this.dt(e,t,a).values}update(e,[t,a,i]){const n=(e=>e._$AH)(e),{values:o,keys:r}=this.dt(t,a,i);if(!Array.isArray(n))return this.ut=r,o;const s=this.ut??=[],l=[];let d,_,c=0,u=n.length-1,m=0,h=o.length-1;for(;c<=u&&m<=h;)if(null===n[c])c++;else if(null===n[u])u--;else if(s[c]===r[m])l[m]=Wi(n[c],o[m]),c++,m++;else if(s[u]===r[h])l[h]=Wi(n[u],o[h]),u--,h--;else if(s[c]===r[h])l[h]=Wi(n[c],o[h]),Ni(e,l[h+1],n[c]),c++,h--;else if(s[u]===r[m])l[m]=Wi(n[u],o[m]),Ni(e,n[c],n[u]),u--,m++;else if(void 0===d&&(d=Bi(r,m,h),_=Bi(s,c,u)),d.has(s[c]))if(d.has(s[u])){const t=_.get(r[m]),a=void 0!==t?n[t]:null;if(null===a){const t=Ni(e,n[c]);Wi(t,o[m]),l[m]=t}else l[m]=Wi(a,o[m]),Ni(e,n[c],a),n[t]=null;m++}else Ui(n[u]),u--;else Ui(n[c]),c++;for(;m<=h;){const t=Ni(e,l[h+1]);Wi(t,o[m]),l[m++]=t}for(;c<=u;){const e=n[c++];null!==e&&Ui(e)}return this.ut=r,Ri(e,l),N}});function Zi(e,t){const a={};return e&&Array.isArray(e)?(e.forEach((e=>{if(!e.datetime)return;let i,n,o;"hourly"===t?(o=new Date(e.datetime),n=o.getHours(),i=`${Xa(o)}_${n}`):(o=new Date(e.datetime),i=Xa(o));const r=function(e,t){const a=void 0!==t&&(t>=18||t<6);if(a&&qi[e])return qi[e];return Gi[e]||"mdi:weather-cloudy-alert"}(e.condition,n);a[i]={icon:r,condition:e.condition,temperature:Math.round(e.temperature),templow:void 0!==e.templow?Math.round(e.templow):void 0,datetime:e.datetime,hour:n,precipitation:e.precipitation,precipitation_probability:e.precipitation_probability,uv_index:void 0!==e.uv_index?Math.round(e.uv_index):void 0}})),a):a}const Gi={"clear-night":"mdi:weather-night",cloudy:"mdi:weather-cloudy",fog:"mdi:weather-fog",hail:"mdi:weather-hail",lightning:"mdi:weather-lightning","lightning-rainy":"mdi:weather-lightning-rainy",partlycloudy:"mdi:weather-partly-cloudy",pouring:"mdi:weather-pouring",rainy:"mdi:weather-rainy",snowy:"mdi:weather-snowy","snowy-rainy":"mdi:weather-snowy-rainy",sunny:"mdi:weather-sunny",windy:"mdi:weather-windy","windy-variant":"mdi:weather-windy-variant",exceptional:"mdi:weather-cloudy-alert"},qi={sunny:"mdi:weather-night",partlycloudy:"mdi:weather-night-partly-cloudy","lightning-rainy":"mdi
Line truncated
|
||||
<div class="calendar-card">
|
||||
<div class="loading">${a.loading}</div>
|
||||
</div>
|
||||
@@ -608,24 +608,24 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
||||
<div class="calendar-card">
|
||||
<div class="error">${a.error}</div>
|
||||
</div>
|
||||
`}function qi(e,t,a,i="day"){const n=parseFloat(a.day_spacing);if("day"===i)return{borderTopWidth:e,borderTopColor:t,borderTopStyle:"solid",marginTop:"0px",marginBottom:`${n}px`};let o=we.WEEK;"month"===i&&(o=we.MONTH);const r=n*o;return{borderTopWidth:e,borderTopColor:t,borderTopStyle:"solid",marginTop:`${r}px`,marginBottom:`${r}px`}}function Qi(e,t,a,i,n=!1,o="day"){if("0px"===e||n)return W;const r=qi(e,t,i,o);return I`<div class="${a}" style=${Hi(r)}></div>`}function Xi(e){return Qi(e.month_separator_width,e.month_separator_color,"month-separator",e,!1,"month")}function en(e,t=!1){return Qi(e.week_separator_width,e.week_separator_color,"week-separator",e,t,"week")}function tn(e,t){if(!e.today_indicator||!t)return W;const a=e.today_indicator,i=function(e){if(void 0===e||!1===e)return"none";if(!0===e)return"dot";if("string"==typeof e)return"pulse"===e||"glow"===e?e:gt(e)?"mdi":e.startsWith("/")||e.includes(".png")||e.includes(".jpg")||e.includes(".svg")||e.includes(".webp")||e.includes(".gif")?"image":/[\p{Emoji}]/u.test(e)?"emoji":"dot";return"none"}(a);if("none"===i)return W;const n=function(e){const t={position:"absolute",transform:"translate(-50%, -50%)"},a=e.trim().split(/\s+/);return a.length>=1&&(t.left=a[0]),a.length>=2?t.top=a[1]:t.top="50%",t}(e.today_indicator_position);return I`
|
||||
`}function en(e,t,a,i="day"){const n=parseFloat(a.day_spacing);if("day"===i)return{borderTopWidth:e,borderTopColor:t,borderTopStyle:"solid",marginTop:"0px",marginBottom:`${n}px`};let o=we.WEEK;"month"===i&&(o=we.MONTH);const r=n*o;return{borderTopWidth:e,borderTopColor:t,borderTopStyle:"solid",marginTop:`${r}px`,marginBottom:`${r}px`}}function tn(e,t,a,i,n=!1,o="day"){if("0px"===e||n)return W;const r=en(e,t,i,o);return I`<div class="${a}" style=${Fi(r)}></div>`}function an(e){return tn(e.month_separator_width,e.month_separator_color,"month-separator",e,!1,"month")}function nn(e,t=!1){return tn(e.week_separator_width,e.week_separator_color,"week-separator",e,t,"week")}function on(e,t){if(!e.today_indicator||!t)return W;const a=e.today_indicator,i=function(e){if(void 0===e||!1===e)return"none";if(!0===e)return"dot";if("string"==typeof e)return"pulse"===e||"glow"===e?e:ft(e)?"mdi":e.startsWith("/")||e.includes(".png")||e.includes(".jpg")||e.includes(".svg")||e.includes(".webp")||e.includes(".gif")?"image":/[\p{Emoji}]/u.test(e)?"emoji":"dot";return"none"}(a);if("none"===i)return W;const n=function(e){const t={position:"absolute",transform:"translate(-50%, -50%)"},a=e.trim().split(/\s+/);return a.length>=1&&(t.left=a[0]),a.length>=2?t.top=a[1]:t.top="50%",t}(e.today_indicator_position);return I`
|
||||
<div class="today-indicator-container">
|
||||
${function(e,t,a){let i="";switch(e){case"dot":case"pulse":case"glow":i="mdi:circle";break;case"mdi":i="string"==typeof t?t:"mdi:circle";break;case"image":return"string"==typeof t?I`
|
||||
<img
|
||||
src="${t}"
|
||||
class="today-indicator image"
|
||||
style=${Hi(a)}
|
||||
style=${Fi(a)}
|
||||
alt="Today">
|
||||
</img>`:W;case"emoji":return"string"==typeof t?I` <span class="today-indicator emoji" style=${Hi(a)}>
|
||||
</img>`:W;case"emoji":return"string"==typeof t?I` <span class="today-indicator emoji" style=${Fi(a)}>
|
||||
${t}
|
||||
</span>`:W;default:return W}if(i)return I` <ha-icon
|
||||
icon="${i}"
|
||||
class="today-indicator ${e}"
|
||||
style=${Hi(a)}
|
||||
style=${Fi(a)}
|
||||
>
|
||||
</ha-icon>`;return W}(i,a,n)}
|
||||
</div>
|
||||
`}function an(e,t,a,i,n){var o,r,s,l,d;const _=0===e.getDay()||6===e.getDay();let c=t.weekday_color,u=t.day_color,m=t.month_color;_&&(c=t.weekend_weekday_color||c,u=t.weekend_day_color||u,m=t.weekend_month_color||m),i&&(c=t.today_weekday_color||c,u=t.today_day_color||u,m=t.today_month_color||m);const h=ht(a),p=h.daysOfWeek[e.getDay()],g=e.getDate(),y=h.months[e.getMonth()],v=("date"===(null==(o=t.weather)?void 0:o.position)||"both"===(null==(r=t.weather)?void 0:r.position))&&(null==(s=t.weather)?void 0:s.entity);let f=W;if(v&&(null==n?void 0:n.daily)){const a=function(e,t){if(!t)return;return t[Ga(e)]}(e,n.daily);if(a){const e=(null==(l=t.weather)?void 0:l.date)||{},i=!1!==e.show_conditions,n=!1!==e.show_high_temp,o=!0===e.show_uv_index&&void 0!==a.uv_index&&a.uv_index>=(null!=(d=e.uv_index_threshold)?d:0),r=!0===e.show_low_temp&&!o&&void 0!==a.templow,s=e.icon_size||"14px",_=e.font_size||"12px",c=e.color||"var(--primary-text-color)";f=I`
|
||||
`}function rn(e,t,a,i,n){var o,r,s,l,d;const _=0===e.getDay()||6===e.getDay();let c=t.weekday_color,u=t.day_color,m=t.month_color;_&&(c=t.weekend_weekday_color||c,u=t.weekend_day_color||u,m=t.weekend_month_color||m),i&&(c=t.today_weekday_color||c,u=t.today_day_color||u,m=t.today_month_color||m);const h=pt(a),p=h.daysOfWeek[e.getDay()],g=e.getDate(),y=h.months[e.getMonth()],v=("date"===(null==(o=t.weather)?void 0:o.position)||"both"===(null==(r=t.weather)?void 0:r.position))&&(null==(s=t.weather)?void 0:s.entity);let f=W;if(v&&(null==n?void 0:n.daily)){const a=function(e,t){if(!t)return;return t[Xa(e)]}(e,n.daily);if(a){const e=(null==(l=t.weather)?void 0:l.date)||{},i=!1!==e.show_conditions,n=!1!==e.show_high_temp,o=!0===e.show_uv_index&&void 0!==a.uv_index&&a.uv_index>=(null!=(d=e.uv_index_threshold)?d:0),r=!0===e.show_low_temp&&!o&&void 0!==a.templow,s=e.icon_size||"14px",_=e.font_size||"12px",c=e.color||"var(--primary-text-color)";f=I`
|
||||
<div class="weather" style="font-size: ${_}; color: ${c};">
|
||||
${i?I`
|
||||
<ha-icon
|
||||
@@ -640,31 +640,31 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
||||
`}}return I`
|
||||
<div
|
||||
class="weekday"
|
||||
style=${Hi({"font-size":t.weekday_font_size,color:c})}
|
||||
style=${Fi({"font-size":t.weekday_font_size,color:c})}
|
||||
>
|
||||
${p}
|
||||
</div>
|
||||
<div
|
||||
class="day"
|
||||
style=${Hi({"font-size":t.day_font_size,color:u})}
|
||||
style=${Fi({"font-size":t.day_font_size,color:u})}
|
||||
>
|
||||
${g}
|
||||
</div>
|
||||
${t.show_month?I`
|
||||
<div
|
||||
class="month"
|
||||
style=${Hi({"font-size":t.month_font_size,color:m})}
|
||||
style=${Fi({"font-size":t.month_font_size,color:m})}
|
||||
>
|
||||
${y}
|
||||
</div>
|
||||
`:W}
|
||||
${f}
|
||||
`}function nn(e,t,a,i,n,o,r){const s=new Date,l=new Date(s.getFullYear(),s.getMonth(),s.getDate()),d=new Date(e.timestamp).toDateString(),_=d===l.toDateString(),c=new Date(l);c.setDate(c.getDate()+1);const u=d===c.toDateString();let m=W;const h=(null==n?void 0:n.isNewMonth)||!1,p=(null==n?void 0:n.isNewWeek)||!1,g=h&&"0px"!==t.month_separator_width,y=p&&(null!==t.show_week_numbers||"0px"!==t.week_separator_width),v=t.day_separator_width,f=t.day_separator_color;if(i&&"0px"!==v&&!g&&!y){const e=qi(v,f,t,"day");m=I`<div class="separator" style=${Hi(e)}></div>`}return I`
|
||||
`}function sn(e,t,a,i,n,o,r){const s=new Date,l=new Date(s.getFullYear(),s.getMonth(),s.getDate()),d=new Date(e.timestamp).toDateString(),_=d===l.toDateString(),c=new Date(l);c.setDate(c.getDate()+1);const u=d===c.toDateString();let m=W;const h=(null==n?void 0:n.isNewMonth)||!1,p=(null==n?void 0:n.isNewWeek)||!1,g=h&&"0px"!==t.month_separator_width,y=p&&(null!==t.show_week_numbers||"0px"!==t.week_separator_width),v=t.day_separator_width,f=t.day_separator_color;if(i&&"0px"!==v&&!g&&!y){const e=en(v,f,t,"day");m=I`<div class="separator" style=${Fi(e)}></div>`}return I`
|
||||
${m}
|
||||
<table
|
||||
class=${Ei({"day-table":!0,today:_,tomorrow:u,"future-day":!_})}
|
||||
class=${Hi({"day-table":!0,today:_,tomorrow:u,"future-day":!_})}
|
||||
>
|
||||
${Ri(e.events,((e,t)=>`${e._entityId}-${e.summary}-${t}`),((i,n)=>function(e,t,a,i,n,o,r,s){var l;const d=Boolean(e._isEmptyDay),_=new Date(t.timestamp),c=function(e){const t=e.getDay();return 0===t||6===t}(_),u=new Date,m=new Date(u.getFullYear(),u.getMonth(),u.getDate()),h=new Date(m);h.setDate(h.getDate()+1);let p=!1;if(!d){if(!e.start.dateTime){let t=e.end.date?Za(e.end.date):null;if(t){const e=new Date(t);e.setDate(e.getDate()-1),t=e}p=null!==t&&m>t}else{const t=e.end.dateTime?new Date(e.end.dateTime):null;p=null!==t&&u>t}}const g=yi(e._entityId,i,void 0,e),y=i.event_background_opacity>0?i.event_background_opacity:0,v=y>0?yi(e._entityId,i,y,e):"",f=null!=(l=fi(e._entityId,"show_time",i,e))?l:i.show_time,k=!e.start.dateTime,w=k&&e.time&&(e.time.includes(ht(n).multiDay)||e.time.includes(ht(n).endsTomorrow)||e.time.includes(ht(n).endsToday)),b=f&&!(k&&!w&&!i.show_single_allday_time)&&!d;let M=null;!i.show_countdown||d||p||(M=Ra(e,n));const z=ki(e),T=z&&i.show_progress_bar?function(e){if(!ki(e))return null;const t=new Date,a=new Date(e.start.dateTime),i=new Date(e.end.dateTime).getTime()-a.getTime(),n=t.getTime()-a.getTime();return Math.min(100,Math.max(0,Math.floor(n/i*100)))}(e):null,D=Ka(e,i,n,s),S=e.location||"",$=e.description||"",j=0===a,x=a===t.events.length-1,Y={event:!0,"event-first":j,"event-middle":!j&&!x,"event-last":x,"past-event":p};return I`
|
||||
${Ji(e.events,((e,t)=>`${e._entityId}-${e.summary}-${t}`),((i,n)=>function(e,t,a,i,n,o,r,s){var l;const d=Boolean(e._isEmptyDay),_=new Date(t.timestamp),c=function(e){const t=e.getDay();return 0===t||6===t}(_),u=new Date,m=new Date(u.getFullYear(),u.getMonth(),u.getDate()),h=new Date(m);h.setDate(h.getDate()+1);let p=!1;if(!d){if(!e.start.dateTime){let t=e.end.date?Qa(e.end.date):null;if(t){const e=new Date(t);e.setDate(e.getDate()-1),t=e}p=null!==t&&m>t}else{const t=e.end.dateTime?new Date(e.end.dateTime):null;p=null!==t&&u>t}}const g=ki(e._entityId,i,void 0,e),y=i.event_background_opacity>0?i.event_background_opacity:0,v=y>0?ki(e._entityId,i,y,e):"",f=null!=(l=bi(e._entityId,"show_time",i,e))?l:i.show_time,k=!e.start.dateTime,w=k&&e.time&&(e.time.includes(pt(n).multiDay)||e.time.includes(pt(n).endsTomorrow)||e.time.includes(pt(n).endsToday)),b=f&&!(k&&!w&&!i.show_single_allday_time)&&!d;let M=null;!i.show_countdown||k&&!i.show_countdown_allday||d||p||(M=Ja(e,n));const z=Mi(e),T=z&&i.show_progress_bar?function(e){if(!Mi(e))return null;const t=new Date,a=new Date(e.start.dateTime),i=new Date(e.end.dateTime).getTime()-a.getTime(),n=t.getTime()-a.getTime();return Math.min(100,Math.max(0,Math.floor(n/i*100)))}(e):null,D=Ba(e,i,n,s),j=e.location||"",S=e.description||"",$=0===a,x=a===t.events.length-1,Y={event:!0,"event-first":$,"event-middle":!$&&!x,"event-last":x,"past-event":p};return I`
|
||||
<tr>
|
||||
${0===a?I`
|
||||
<td
|
||||
@@ -672,19 +672,19 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
||||
rowspan="${t.events.length}"
|
||||
style="position: relative;"
|
||||
>
|
||||
${an(_,i,n,o,r)}
|
||||
${tn(i,o)}
|
||||
${rn(_,i,n,o,r)}
|
||||
${on(i,o)}
|
||||
</td>
|
||||
`:""}
|
||||
<td
|
||||
class=${Ei(Y)}
|
||||
class=${Hi(Y)}
|
||||
style="border-inline-start: var(--calendar-card-line-width-vertical) solid ${g}; background-color: ${v};"
|
||||
>
|
||||
<div class="event-content">
|
||||
${function(e,t,a){var i,n;const o=!!e._isEmptyDay,r=o?"var(--calendar-card-empty-day-color)":(null==(i=e._matchedConfig)?void 0:i.color)||t.event_color,s=vi(e._entityId,t,e),l=null==(n=e._matchedConfig)?void 0:n.label_icon_color;return I`
|
||||
${function(e,t,a){var i,n;const o=!!e._isEmptyDay,r=o?"var(--calendar-card-empty-day-color)":(null==(i=e._matchedConfig)?void 0:i.color)||t.event_color,s=wi(e._entityId,t,e),l=null==(n=e._matchedConfig)?void 0:n.label_icon_color;return I`
|
||||
<div class="summary-row">
|
||||
<div class="summary">
|
||||
${s?function(e,t){if(!e)return W;const a=t?`color: ${t};`:W;return gt(e)?I`<ha-icon icon="${e}" class="label-icon" style=${a}></ha-icon>`:e.startsWith("/local/")||/\.(jpg|jpeg|png|gif|svg|webp)$/i.test(e)?I`<img src="${e}" class="label-image"></img>`:I`<span class="calendar-label">${e}</span>`}(s,l):W}
|
||||
${s?function(e,t){if(!e)return W;const a=t?`color: ${t};`:W;return ft(e)?I`<ha-icon icon="${e}" class="label-icon" style=${a}></ha-icon>`:e.startsWith("/local/")||/\.(jpg|jpeg|png|gif|svg|webp)$/i.test(e)?I`<img src="${e}" class="label-image"></img>`:I`<span class="calendar-label">${e}</span>`}(s,l):W}
|
||||
<span
|
||||
class="event-title ${o?"empty-day-title":""}"
|
||||
style="color: ${r}"
|
||||
@@ -692,14 +692,14 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
||||
${o?`✓ ${e.summary}`:e.summary}
|
||||
</span>
|
||||
</div>
|
||||
${function(e,t,a){var i,n,o,r;const s=(null==(i=t.weather)?void 0:i.entity)&&("event"===t.weather.position||"both"===t.weather.position);if(!s||!(null==a?void 0:a.hourly))return I``;if(null==(n=e.end)?void 0:n.dateTime){const t=new Date;if(new Date(e.end.dateTime)<t)return I``}const l=function(e,t,a){if(e.start.date&&!e.start.dateTime&&a)return a[Ga(Za(e.start.date))];if(!e.start.dateTime||!t)return;const i=new Date(e.start.dateTime),n=Ga(i),o=i.getHours(),r=t[`${n}_${o}`];if(r)return r;let s=-1,l=24;return Object.keys(t).forEach((e=>{if(e.startsWith(n)){const t=e.split("_")[1],a=parseInt(t);if(!isNaN(a)){const e=Math.abs(a-o);e<l&&(l=e,s=a)}}})),s>=0?t[`${n}_${s}`]:void 0}(e,a.hourly,a.daily);if(!l)return I``;const d=(null==(o=t.weather)?void 0:o.event)||{},_=!1!==d.show_conditions,c=!1!==d.show_temp,u=!0===d.show_uv_index&&void 0!==l.uv_index&&l.uv_index>=(null!=(r=d.uv_index_threshold)?r:0),m=d.icon_size||"14px",h=d.font_size||"12px",p=d.color||"var(--secondary-text-color)";return I`
|
||||
${function(e,t,a){var i,n,o,r;const s=(null==(i=t.weather)?void 0:i.entity)&&("event"===t.weather.position||"both"===t.weather.position);if(!s||!(null==a?void 0:a.hourly))return I``;if(null==(n=e.end)?void 0:n.dateTime){const t=new Date;if(new Date(e.end.dateTime)<t)return I``}const l=(null==(o=t.weather)?void 0:o.event)||{},d=function(e,t,a,i=!1){if(e.start.date&&!e.start.dateTime&&a)return a[Xa(Qa(e.start.date))];if(!e.start.dateTime)return;const n=new Date(e.start.dateTime),o=Xa(n),r=n.getHours();if(t){const e=t[`${o}_${r}`];if(e)return e;let a=-1,i=24;if(Object.keys(t).forEach((e=>{if(e.startsWith(o)){const t=e.split("_")[1],n=parseInt(t);if(!isNaN(n)){const e=Math.abs(n-r);e<i&&(i=e,a=n)}}})),a>=0)return t[`${o}_${a}`]}return i&&a?a[o]:void 0}(e,a.hourly,a.daily,!1!==l.daily_forecast_fallback);if(!d)return I``;const _=!1!==l.show_conditions,c=!1!==l.show_temp,u=!0===l.show_uv_index&&void 0!==d.uv_index&&d.uv_index>=(null!=(r=l.uv_index_threshold)?r:0),m=l.icon_size||"14px",h=l.font_size||"12px",p=l.color||"var(--secondary-text-color)";return I`
|
||||
<div class="event-weather">
|
||||
${_?I`<ha-icon .icon=${l.icon} style="--mdc-icon-size: ${m};"></ha-icon>`:W}
|
||||
${_?I`<ha-icon .icon=${d.icon} style="--mdc-icon-size: ${m};"></ha-icon>`:W}
|
||||
${c?I`<span style="font-size: ${h}; color: ${p};">
|
||||
${l.temperature}°
|
||||
${d.temperature}°
|
||||
</span>`:W}
|
||||
${u?I`<span class="weather-uv-index" style="font-size: ${h}; color: ${p};">
|
||||
UV${l.uv_index}
|
||||
UV${d.uv_index}
|
||||
</span>`:W}
|
||||
</div>
|
||||
`}(e,t,a)}
|
||||
@@ -737,16 +737,16 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
||||
</div>
|
||||
</div>
|
||||
`:W}
|
||||
${S?I`
|
||||
${j?I`
|
||||
<div class="location">
|
||||
<ha-icon icon="mdi:map-marker-outline"></ha-icon>
|
||||
<span>${S}</span>
|
||||
<span>${j}</span>
|
||||
</div>
|
||||
`:""}
|
||||
${$?I`
|
||||
${S?I`
|
||||
<div class="description">
|
||||
<ha-icon icon="mdi:information-outline"></ha-icon>
|
||||
<span>${$}</span>
|
||||
<span>${S}</span>
|
||||
</div>
|
||||
`:""}
|
||||
</div>
|
||||
@@ -755,23 +755,23 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
||||
</tr>
|
||||
`}(i,e,n,t,a,_,o,r)))}
|
||||
</table>
|
||||
`}function on(e,t,a,i,n){return I`
|
||||
${e.map(((o,r)=>{var s;const l=r>0?e[r-1]:void 0,d=null!=(s=o.weekNumber)?s:null;let _=!1;if(l){_=o.weekNumber!==l.weekNumber}else _=!0;const c=l&&o.monthNumber!==l.monthNumber,u=0===r,m={isNewWeek:_,isNewMonth:Boolean(c)};let h=W;return!c||"0px"===t.month_separator_width||_&&null!==t.show_week_numbers?_&&(h=u&&null!==t.show_week_numbers&&!t.show_current_week_number?c?Xi(t):en(t,u):null!==t.show_week_numbers?function(e,t,a,i=!1){if(null===e)return W;const n=parseFloat(a.day_spacing),o=n*(t?we.MONTH:we.WEEK)/2,r={marginTop:(i?0:o-n)+"px",marginBottom:`${o}px`},s={};return i?s["--separator-display"]="none":t&&"0px"!==a.month_separator_width?(s["--separator-border-width"]=a.month_separator_width,s["--separator-border-color"]=a.month_separator_color,s["--separator-display"]="block"):"0px"!==a.week_separator_width?(s["--separator-border-width"]=a.week_separator_width,s["--separator-border-color"]=a.week_separator_color,s["--separator-display"]="block"):s["--separator-display"]="none",I`
|
||||
<table class="week-row-table" style=${Hi(r)}>
|
||||
`}function ln(e,t,a,i,n){return I`
|
||||
${e.map(((o,r)=>{var s;const l=r>0?e[r-1]:void 0,d=null!=(s=o.weekNumber)?s:null;let _=!1;if(l){_=o.weekNumber!==l.weekNumber}else _=!0;const c=l&&o.monthNumber!==l.monthNumber,u=0===r,m={isNewWeek:_,isNewMonth:Boolean(c)};let h=W;return!c||"0px"===t.month_separator_width||_&&null!==t.show_week_numbers?_&&(h=u&&null!==t.show_week_numbers&&!t.show_current_week_number?c?an(t):nn(t,u):null!==t.show_week_numbers?function(e,t,a,i=!1){if(null===e)return W;const n=parseFloat(a.day_spacing),o=n*(t?we.MONTH:we.WEEK)/2,r={marginTop:(i?0:o-n)+"px",marginBottom:`${o}px`},s={};return i?s["--separator-display"]="none":t&&"0px"!==a.month_separator_width?(s["--separator-border-width"]=a.month_separator_width,s["--separator-border-color"]=a.month_separator_color,s["--separator-display"]="block"):"0px"!==a.week_separator_width?(s["--separator-border-width"]=a.week_separator_width,s["--separator-border-color"]=a.week_separator_color,s["--separator-display"]="block"):s["--separator-display"]="none",I`
|
||||
<table class="week-row-table" style=${Fi(r)}>
|
||||
<tr>
|
||||
<td class="week-number-cell">
|
||||
<div class="week-number">${e}</div>
|
||||
</td>
|
||||
<td class="separator-cell" style=${Hi(s)}>
|
||||
<td class="separator-cell" style=${Fi(s)}>
|
||||
<div class="separator-line"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
`}(d,Boolean(c),t,u):en(t,u)):h=Xi(t),I`
|
||||
`}(d,Boolean(c),t,u):nn(t,u)):h=an(t),I`
|
||||
${h}
|
||||
${nn(o,t,a,l,m,i,n)}
|
||||
${sn(o,t,a,l,m,i,n)}
|
||||
`}))}
|
||||
`}const rn=Symbol.for(""),sn=e=>{if(e?.r===rn)return e?._$litStatic$},ln=(e,...t)=>({_$litStatic$:t.reduce(((t,a,i)=>t+(e=>{if(void 0!==e._$litStatic$)return e._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(a)+e[i+1]),e[0]),r:rn}),dn=new Map,_n=(e=>(t,...a)=>{const i=a.length;let n,o;const r=[],s=[];let l,d=0,_=!1;for(;d<i;){for(l=t[d];d<i&&void 0!==(o=a[d],n=sn(o));)l+=n+t[++d],_=!0;d!==i&&s.push(o),r.push(l),d++}if(d===i&&r.push(t[i]),_){const e=r.join("$$lit$$");void 0===(t=dn.get(e))&&(r.raw=r,dn.set(e,t=r)),a=s}return e(t,...a)})(I);var cn=o`
|
||||
`}const dn=Symbol.for(""),_n=e=>{if(e?.r===dn)return e?._$litStatic$},cn=(e,...t)=>({_$litStatic$:t.reduce(((t,a,i)=>t+(e=>{if(void 0!==e._$litStatic$)return e._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(a)+e[i+1]),e[0]),r:dn}),un=new Map,mn=(e=>(t,...a)=>{const i=a.length;let n,o;const r=[],s=[];let l,d=0,_=!1;for(;d<i;){for(l=t[d];d<i&&void 0!==(o=a[d],n=_n(o));)l+=n+t[++d],_=!0;d!==i&&s.push(o),r.push(l),d++}if(d===i&&r.push(t[i]),_){const e=r.join("$$lit$$");void 0===(t=un.get(e))&&(r.raw=r,un.set(e,t=r)),a=s}return e(t,...a)})(I);var hn=o`
|
||||
ha-textfield,
|
||||
ha-select,
|
||||
ha-formfield,
|
||||
@@ -893,7 +893,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
||||
.date-field input[type='date']:hover {
|
||||
border-bottom-color: var(--primary-text-color);
|
||||
}
|
||||
`,un=Object.defineProperty,mn=Object.getOwnPropertySymbols,hn=Object.prototype.hasOwnProperty,pn=Object.prototype.propertyIsEnumerable,gn=(e,t,a)=>t in e?un(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,yn=(e,t)=>{for(var a in t||(t={}))hn.call(t,a)&&gn(e,a,t[a]);if(mn)for(var a of mn(t))pn.call(t,a)&&gn(e,a,t[a]);return e},vn=(e,t,a,i)=>{for(var n,o=void 0,r=e.length-1;r>=0;r--)(n=e[r])&&(o=n(t,a,o)||o);return o&&un(t,a,o),o};let fn;function kn(){if(void 0!==fn)return fn;if(customElements.get("ha-input"))fn=ln`ha-input`;else{if(!customElements.get("ha-textfield"))return ln`ha-input`;fn=ln`ha-textfield`}return fn}const wn={max_events_to_show:"compact_events_to_show",vertical_line_color:"accent_color",horizontal_line_width:"day_separator_width",horizontal_line_color:"day_separator_color"},bn={max_events_to_show:"compact_events_to_show"};class Mn extends oe{static get styles(){return cn}connectedCallback(){super.connectedCallback(),this._loadCustomElements()}async _loadCustomElements(){if(!customElements.get("ha-entity-picker"))try{const e=customElements.get("hui-entities-card");e&&"function"==typeof e.getConfigElement?await e.getConfigElement():console.warn("Could not load ha-entity-picker: getConfigElement not available")}catch(e){console.warn("Could not load ha-entity-picker",e)}}setConfig(e){this._config=yn(yn({},Ke),e)}getConfigValue(e,t){var a;if(!this._config)return t;if(!e.includes(".")){let i=null!=(a=this._config[e])?a:t;if("time_24h"===e){if(!0===i)return"true";if(!1===i)return"false"}return i}const i=e.split(".");let n=this._config;for(const e of i){if(null==n)return t;if(/^\d+$/.test(e)){const a=parseInt(e,10);if(Array.isArray(n)&&a>=0&&a<n.length){n=n[a];continue}return t}if("object"!=typeof n||null===n||!(e in n))return t;n=n[e]}return null!=n?n:t}setConfigValue(e,t){if(!this._config)return;"time_24h"===e&&("true"===t?t=!0:"false"===t&&(t=!1));const a=JSON.parse(JSON.stringify(this._config));if(!e.includes("."))return void 0===t?delete a[e]:a[e]=t,void this._fireConfigChanged(a);const i=e.split("."),n=i.pop();let o=a;for(const e of i)if(/^\d+$/.test(e)){const t=parseInt(e,10);for(Array.isArray(o)||(o=[]);o.length<=t;)o.push({});o[t]&&"object"==typeof o[t]||(o[t]={}),o=o[t]}else Object.prototype.hasOwnProperty.call(o,e)&&"object"==typeof o[e]||(o[e]={}),o=o[e];void 0===t?delete o[n]:o[n]=t,this._fireConfigChanged(a)}_fireConfigChanged(e){const t=kt(e,Ke);this._config=e,this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:t}}))}_findDeprecatedParams(e){return Object.keys(wn).filter((t=>t in e))}_findDeprecatedEntityParams(e){const t=[];return e.forEach(((e,a)=>{"object"==typeof e&&null!==e&&Object.keys(bn).forEach((i=>{i in e&&t.push({index:a,param:i})}))})),t}_upgradeConfig(){const e=yn({},this._config);let t=!1;for(const[a,i]of Object.entries(wn))a in e&&(e[i]=e[a],delete e[a],t=!0);Array.isArray(e.entities)&&(e.entities=e.entities.map((e=>{if("object"==typeof e&&null!==e){const a=yn({},e);for(const[e,i]of Object.entries(bn))e in a&&(a[i]=a[e],delete a[e],t=!0);return a}return e}))),t&&this._fireConfigChanged(e)}_getTranslation(e){var t,a,i;const n=(null==(t=this._config)?void 0:t.language)||(null==(i=null==(a=this.hass)?void 0:a.locale)?void 0:i.language)||"en",o=e.includes(".")?e:`editor.${e}`;return function(e,t,a){const i=ht(e);if("string"==typeof t&&t.includes(".")){const[e,n]=t.split(".");if("editor"===e&&i.editor&&n in i.editor){const e=i.editor[n];if("string"==typeof e||Array.isArray(e))return e}return void 0!==a?a:n}if(t in i){const e=i[t];if("string"==typeof e||Array.isArray(e))return e}return void 0!==a?a:t}(o.startsWith("editor.")&&!function(e){const t=ht(e);return Boolean((null==t?void 0:t.editor)&&Object.keys(t.editor).length>0)}(n)?"en":n,o,e)}_valueChanged(e){if(!e.target)return;e.stopPropagation();const t=e.target,a=t.getAttribute("name");let i=t.value;if(a)if("language_mode"!==a){if("height_mode"===a){const e=t.value,a=this.getConfigValue("height"),i=this.getConfigValue("max_height");return this.setConfigValue("height",void 0),this.setConfigValue("max_height",void 0),void("fixed"===e?this.setConfigValue("height",a&&"auto"!==a?a:"300px"):"maximum"===e&&this.setConfigValue("max_height",i&&"none"!==i?i:"300px"))}if("start_date_mode"!==a){if("start_date_fixed"===a||"start_date_offset"===a){if("start_date_offset"===a&&"change"!==e.type)return;return this.setConfigValue("start_date",t.value),void this.requestUpdate()}"remove_location_country_selector"!==a&&("show_week_numbers"===a&&"null"===i&&(i=null),"HA-SWITCH"===t.tagName&&(i=t.checked),"number"===t.getAttribute("type")&&""!==i&&(i=parseFloat(i)),this.setConfigValue(a,i))}else this._handleStartDateModeChange(t.value)}else{const e=t.value;"system"===e?this.setConfigValue("language",void 0):"custom"===e&&(this.getConfigValue("language")||this.setConfigValue("language","en"))}}_selectChanged(e){var t,a;if(!e.target)return;e.stopPropagation();const i=e.target.getAttribute("name"),n=null!=(a=null==(t
Line truncated
|
||||
`,pn=Object.defineProperty,gn=Object.getOwnPropertySymbols,yn=Object.prototype.hasOwnProperty,vn=Object.prototype.propertyIsEnumerable,fn=(e,t,a)=>t in e?pn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,kn=(e,t)=>{for(var a in t||(t={}))yn.call(t,a)&&fn(e,a,t[a]);if(gn)for(var a of gn(t))vn.call(t,a)&&fn(e,a,t[a]);return e},wn=(e,t,a,i)=>{for(var n,o=void 0,r=e.length-1;r>=0;r--)(n=e[r])&&(o=n(t,a,o)||o);return o&&pn(t,a,o),o};let bn;function Mn(){if(void 0!==bn)return bn;if(customElements.get("ha-input"))bn=cn`ha-input`;else{if(!customElements.get("ha-textfield"))return cn`ha-input`;bn=cn`ha-textfield`}return bn}const zn={max_events_to_show:"compact_events_to_show",vertical_line_color:"accent_color",horizontal_line_width:"day_separator_width",horizontal_line_color:"day_separator_color"},Tn={max_events_to_show:"compact_events_to_show"};class Dn extends oe{static get styles(){return hn}connectedCallback(){super.connectedCallback(),this._loadCustomElements()}async _loadCustomElements(){if(!customElements.get("ha-entity-picker"))try{const e=customElements.get("hui-entities-card");e&&"function"==typeof e.getConfigElement?await e.getConfigElement():console.warn("Could not load ha-entity-picker: getConfigElement not available")}catch(e){console.warn("Could not load ha-entity-picker",e)}}setConfig(e){this._config=kn(kn({},Ke),e)}getConfigValue(e,t){var a;if(!this._config)return t;if(!e.includes(".")){let i=null!=(a=this._config[e])?a:t;if("time_24h"===e){if(!0===i)return"true";if(!1===i)return"false"}return i}const i=e.split(".");let n=this._config;for(const e of i){if(null==n)return t;if(/^\d+$/.test(e)){const a=parseInt(e,10);if(Array.isArray(n)&&a>=0&&a<n.length){n=n[a];continue}return t}if("object"!=typeof n||null===n||!(e in n))return t;n=n[e]}return null!=n?n:t}setConfigValue(e,t){if(!this._config)return;"time_24h"===e&&("true"===t?t=!0:"false"===t&&(t=!1));const a=JSON.parse(JSON.stringify(this._config));if(!e.includes("."))return void 0===t?delete a[e]:a[e]=t,void this._fireConfigChanged(a);const i=e.split("."),n=i.pop();let o=a;for(const e of i)if(/^\d+$/.test(e)){const t=parseInt(e,10);for(Array.isArray(o)||(o=[]);o.length<=t;)o.push({});o[t]&&"object"==typeof o[t]||(o[t]={}),o=o[t]}else Object.prototype.hasOwnProperty.call(o,e)&&"object"==typeof o[e]||(o[e]={}),o=o[e];void 0===t?delete o[n]:o[n]=t,this._fireConfigChanged(a)}_fireConfigChanged(e){const t=Mt(e,Ke);this._config=e,this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:t}}))}_findDeprecatedParams(e){return Object.keys(zn).filter((t=>t in e))}_findDeprecatedEntityParams(e){const t=[];return e.forEach(((e,a)=>{"object"==typeof e&&null!==e&&Object.keys(Tn).forEach((i=>{i in e&&t.push({index:a,param:i})}))})),t}_getCompactModeWarnings(){var e;const t=e=>null!=e&&""!==e,a=this.getConfigValue("compact_days_to_show"),i=this.getConfigValue("compact_events_to_show"),n=(null!=(e=this.getConfigValue("entities"))?e:[]).some((e=>"object"==typeof e&&null!==e&&t(e.compact_events_to_show))),o=["tap_action","hold_action"].some((e=>"expand"===this.getConfigValue(`${e}.action`))),r=Number(this.getConfigValue("days_to_show")),s=Number(a);return{noLimits:o&&!t(a)&&!t(i)&&!n,daysInert:t(a)&&Number.isFinite(s)&&Number.isFinite(r)&&s>=r}}_upgradeConfig(){const e=kn({},this._config);let t=!1;for(const[a,i]of Object.entries(zn))a in e&&(e[i]=e[a],delete e[a],t=!0);Array.isArray(e.entities)&&(e.entities=e.entities.map((e=>{if("object"==typeof e&&null!==e){const a=kn({},e);for(const[e,i]of Object.entries(Tn))e in a&&(a[i]=a[e],delete a[e],t=!0);return a}return e}))),t&&this._fireConfigChanged(e)}_getTranslation(e){var t,a,i;const n=(null==(t=this._config)?void 0:t.language)||(null==(i=null==(a=this.hass)?void 0:a.locale)?void 0:i.language)||"en",o=e.includes(".")?e:`editor.${e}`;return function(e,t,a){const i=pt(e);if("string"==typeof t&&t.includes(".")){const[e,n]=t.split(".");if("editor"===e&&i.editor&&n in i.editor){const e=i.editor[n];if("string"==typeof e||Array.isArray(e))return e}return void 0!==a?a:n}if(t in i){const e=i[t];if("string"==typeof e||Array.isArray(e))return e}return void 0!==a?a:t}(o.startsWith("editor.")&&!function(e){const t=pt(e);return Boolean((null==t?void 0:t.editor)&&Object.keys(t.editor).length>0)}(n)?"en":n,o,e)}_valueChanged(e){if(!e.target)return;e.stopPropagation();const t=e.target,a=t.getAttribute("name");let i=t.value;if(a)if("language_mode"!==a){if("height_mode"===a){const e=t.value,a=this.getConfigValue("height"),i=this.getConfigValue("max_height");return this.setConfigValue("height",void 0),this.setConfigValue("max_height",void 0),void("fixed"===e?this.setConfigValue("height",a&&"auto"!==a?a:"300px"):"maximum"===e&&this.setConfigValue("max_height",i&&"none"!==i?i:"300px"))}if("start_date_mode"!==a){if("start_date_fixed"===a||"start_date_offset"===a){if("start_date_offset"===a&&"change"!==e.type)return;return this.setConfigValue("start_date",t.value),void this.requestUpdate()}"remove_location_country_
Line truncated
|
||||
<div style="border-radius: 8px; overflow: hidden;">
|
||||
<ha-alert alert-type="warning">
|
||||
<div style="height: 6px"></div>
|
||||
@@ -910,7 +910,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
||||
</div>
|
||||
</ha-alert>
|
||||
</div>
|
||||
`:null;return I`
|
||||
`:null,o=this._getCompactModeWarnings();return I`
|
||||
${n}
|
||||
<div class="card-config">
|
||||
<!-- CALENDAR ENTITIES -->
|
||||
@@ -932,8 +932,19 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
||||
<!-- Compact Mode -->
|
||||
<h3>${this._getTranslation("compact_mode")}</h3>
|
||||
<div class="helper-text">${this._getTranslation("compact_mode_note")}</div>
|
||||
${o.noLimits?I`
|
||||
<ha-alert alert-type="warning">
|
||||
${this._getTranslation("compact_no_limits_warning")}
|
||||
</ha-alert>
|
||||
`:null}
|
||||
${this.addTextField("compact_days_to_show",this._getTranslation("compact_days_to_show"),"number")}
|
||||
${o.daysInert?I`
|
||||
<ha-alert alert-type="warning">
|
||||
${this._getTranslation("compact_days_inert_warning")}
|
||||
</ha-alert>
|
||||
`:null}
|
||||
${this.addTextField("compact_events_to_show",this._getTranslation("compact_events_to_show"),"number")}
|
||||
<div class="helper-text">${this._getTranslation("compact_events_to_show_note")}</div>
|
||||
${this.addBooleanField("compact_events_complete_days",this._getTranslation("compact_events_complete_days"))}
|
||||
<div class="helper-text">
|
||||
${this._getTranslation("compact_events_complete_days_note")}
|
||||
@@ -944,6 +955,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
||||
${this.addBooleanField("show_past_events",this._getTranslation("show_past_events"))}
|
||||
${this.addBooleanField("show_empty_days",this._getTranslation("show_empty_days"))}
|
||||
${this.addBooleanField("filter_duplicates",this._getTranslation("filter_duplicates"))}
|
||||
<div class="helper-text">${this._getTranslation("filter_duplicates_note")}</div>
|
||||
|
||||
<!-- Language & Time Formats -->
|
||||
<h3>${this._getTranslation("language_time_formats")}</h3>
|
||||
@@ -1106,7 +1118,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
||||
${this.addTextField("location_color",this._getTranslation("location_color"))}
|
||||
${this.addTextField("location_icon_size",this._getTranslation("location_icon_size"))}
|
||||
${this.addSelectField("remove_location_country_selector",this._getTranslation("remove_location_country"),[{value:"false",label:this._getTranslation("none")},{value:"true",label:this._getTranslation("simple")},{value:"custom",label:this._getTranslation("custom")}],!1,(()=>{if(!this._config||!this._config.hasOwnProperty("remove_location_country"))return"false";const e=this._config.remove_location_country;return!0===e||"true"===e?"true":!1===e||"false"===e?"false":"string"==typeof e?"custom":"false"})(),(e=>{"true"===e?this.setConfigValue("remove_location_country",!0):"false"===e?this.setConfigValue("remove_location_country",!1):"custom"===e&&this._config&&"custom"!==this._config.remove_location_country&&"string"!=typeof this._config.remove_location_country&&this.setConfigValue("remove_location_country","USA|United States|Canada")}))}
|
||||
${(()=>{if(!this._config||!this._config.hasOwnProperty("remove_location_country")||!0===this._config.remove_location_country||!1===this._config.remove_location_country||"true"===this._config.remove_location_country||"false"===this._config.remove_location_country)return I``;const e=this._config.remove_location_country;if("string"==typeof e&&"true"!==e&&"false"!==e){const t=kn();return _n`
|
||||
${(()=>{if(!this._config||!this._config.hasOwnProperty("remove_location_country")||!0===this._config.remove_location_country||!1===this._config.remove_location_country||"true"===this._config.remove_location_country||"false"===this._config.remove_location_country)return I``;const e=this._config.remove_location_country;if("string"==typeof e&&"true"!==e&&"false"!==e){const t=Mn();return mn`
|
||||
<${t}
|
||||
label="${this._getTranslation("custom_country_pattern")}"
|
||||
.value="${e}"
|
||||
@@ -1135,6 +1147,9 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
||||
<!-- Progress Indicators -->
|
||||
<h3>${this._getTranslation("progress_indicators")}</h3>
|
||||
${this.addBooleanField("show_countdown",this._getTranslation("show_countdown"))}
|
||||
${(()=>!0!==this.getConfigValue("show_countdown")?I``:I`
|
||||
${this.addBooleanField("show_countdown_allday",this._getTranslation("show_countdown_allday"))}
|
||||
`)()}
|
||||
${this.addBooleanField("show_progress_bar",this._getTranslation("show_progress_bar"))}
|
||||
${(()=>!0!==this.getConfigValue("show_progress_bar")?I``:I`
|
||||
${this.addTextField("progress_bar_color",this._getTranslation("progress_bar_color"))}
|
||||
@@ -1178,6 +1193,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
||||
${this.addBooleanField("weather.event.show_temp",this._getTranslation("show_temp"))}
|
||||
${this.addBooleanField("weather.event.show_uv_index",this._getTranslation("show_uv_index"))}
|
||||
${!0===this.getConfigValue("weather.event.show_uv_index")?this.addTextField("weather.event.uv_index_threshold",this._getTranslation("uv_index_threshold")):W}
|
||||
${this.addBooleanField("weather.event.daily_forecast_fallback",this._getTranslation("daily_forecast_fallback"))}
|
||||
${this.addTextField("weather.event.icon_size",this._getTranslation("icon_size"))}
|
||||
${this.addTextField("weather.event.font_size",this._getTranslation("font_size"))}
|
||||
${this.addTextField("weather.event.color",this._getTranslation("color"))}
|
||||
@@ -1202,7 +1218,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
||||
${this.addBooleanField("refresh_on_navigate",this._getTranslation("refresh_on_navigate"))}
|
||||
`)}
|
||||
</div>
|
||||
`}addTextField(e,t,a,i){let n=this.getConfigValue(e,i);void 0===n&&(n="");const o=kn();return _n`
|
||||
`}addTextField(e,t,a,i){let n=this.getConfigValue(e,i);void 0===n&&(n="");const o=Mn();return mn`
|
||||
<${o}
|
||||
name="${e}"
|
||||
label="${null!=t?t:this._getTranslation(e)}"
|
||||
@@ -1353,7 +1369,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
||||
`}_renderCalendarEntities(){var e;const t=(null==(e=this._config)?void 0:e.entities)||[];return I`
|
||||
${t.map(((e,t)=>this._renderCalendarEntity(e,t)))}
|
||||
${this.addButton(this._getTranslation("add_calendar"),"mdi:plus",(()=>this._addCalendarEntity()))}
|
||||
`}_addCalendarEntity(){var e;const t=[...(null==(e=this._config)?void 0:e.entities)||[]];t.push({entity:"calendar.calendar"}),this.setConfigValue("entities",t)}_removeCalendarEntity(e){var t;const a=[...(null==(t=this._config)?void 0:t.entities)||[]];a.splice(e,1),this.setConfigValue("entities",a)}_convertEntityToObject(e){var t;const a=[...(null==(t=this._config)?void 0:t.entities)||[]],i=a[e];a[e]={entity:i},this.setConfigValue("entities",a)}_renderActionConfig(e){const t=this.getConfigValue(e,{action:"none"}),a=t.action||"none",i=kn();return I`
|
||||
`}_addCalendarEntity(){var e;const t=[...(null==(e=this._config)?void 0:e.entities)||[]];t.push({entity:"calendar.calendar"}),this.setConfigValue("entities",t)}_removeCalendarEntity(e){var t;const a=[...(null==(t=this._config)?void 0:t.entities)||[]];a.splice(e,1),this.setConfigValue("entities",a)}_convertEntityToObject(e){var t;const a=[...(null==(t=this._config)?void 0:t.entities)||[]],i=a[e];a[e]={entity:i},this.setConfigValue("entities",a)}_renderActionConfig(e){const t=this.getConfigValue(e,{action:"none"}),a=t.action||"none",i=Mn();return I`
|
||||
<div class="action-config">
|
||||
<ha-select
|
||||
name="${e}.action"
|
||||
@@ -1363,7 +1379,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
||||
>
|
||||
</ha-select>
|
||||
|
||||
${"navigate"===a?_n`
|
||||
${"navigate"===a?mn`
|
||||
<${i}
|
||||
name="${e}.navigation_path"
|
||||
.value="${t.navigation_path||""}"
|
||||
@@ -1371,7 +1387,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
||||
@change="${this._valueChanged}"
|
||||
></${i}>
|
||||
`:I``}
|
||||
${"url"===a?_n`
|
||||
${"url"===a?mn`
|
||||
<${i}
|
||||
name="${e}.url_path"
|
||||
.value="${t.url_path||""}"
|
||||
@@ -1379,7 +1395,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
||||
@change="${this._valueChanged}"
|
||||
></${i}>
|
||||
`:I``}
|
||||
${"call-service"===a?_n`
|
||||
${"call-service"===a?mn`
|
||||
<${i}
|
||||
name="${e}.service"
|
||||
.value="${t.service||""}"
|
||||
@@ -1394,7 +1410,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
||||
></${i}>
|
||||
`:I``}
|
||||
</div>
|
||||
`}getValueType(e,t="label"){return e&&!1!==e?!0===e?"indicator"===t?"dot":"none":"string"==typeof e?gt(e)?"icon":e.startsWith("/")||/\.(jpg|jpeg|png|gif|svg|webp)$/i.test(e)?"image":"indicator"===t?["dot","pulse","glow"].includes(e)?e:"emoji":"text":"none":"none"}_handleValueTypeChange(e,t,a,i="label"){var n;e.stopPropagation();const o=null==(n=e.detail)?void 0:n.value;let r;"none"===o?r="indicator"!==i&&void 0:"icon"===o?r="string"==typeof a&>(a)?a:"indicator"===i?"mdi:star":"mdi:calendar":"image"===o?r="string"==typeof a&&(a.startsWith("/")||/\.(jpg|jpeg|png|gif|svg|webp)$/i.test(a))?a:"indicator"===i?"/local/image.jpg":"/local/calendar.jpg":"indicator"===i?["dot","pulse","glow"].includes(o)?r=o:"emoji"===o&&(r="string"!=typeof a||a.startsWith("mdi:")||/\.(jpg|jpeg|png|gif|svg|webp)$/i.test(a)||/^\/local\//i.test(a)||["dot","pulse","glow"].includes(a)?"🗓️":a):"text"===o&&(r="string"==typeof a&&"text"===this.getValueType(a,"label")?a:"📅"),this.setConfigValue(t,r)}_renderTypeSelector(e,t,a,i="label"){const n=this.getConfigValue(e),o=this.getValueType(n,i);return I`
|
||||
`}getValueType(e,t="label"){return e&&!1!==e?!0===e?"indicator"===t?"dot":"none":"string"==typeof e?ft(e)?"icon":e.startsWith("/")||/\.(jpg|jpeg|png|gif|svg|webp)$/i.test(e)?"image":"indicator"===t?["dot","pulse","glow"].includes(e)?e:"emoji":"text":"none":"none"}_handleValueTypeChange(e,t,a,i="label"){var n;e.stopPropagation();const o=null==(n=e.detail)?void 0:n.value;let r;"none"===o?r="indicator"!==i&&void 0:"icon"===o?r="string"==typeof a&&ft(a)?a:"indicator"===i?"mdi:star":"mdi:calendar":"image"===o?r="string"==typeof a&&(a.startsWith("/")||/\.(jpg|jpeg|png|gif|svg|webp)$/i.test(a))?a:"indicator"===i?"/local/image.jpg":"/local/calendar.jpg":"indicator"===i?["dot","pulse","glow"].includes(o)?r=o:"emoji"===o&&(r="string"!=typeof a||a.startsWith("mdi:")||/\.(jpg|jpeg|png|gif|svg|webp)$/i.test(a)||/^\/local\//i.test(a)||["dot","pulse","glow"].includes(a)?"🗓️":a):"text"===o&&(r="string"==typeof a&&"text"===this.getValueType(a,"label")?a:"📅"),this.setConfigValue(t,r)}_renderTypeSelector(e,t,a,i="label"){const n=this.getConfigValue(e),o=this.getValueType(n,i);return I`
|
||||
<div class="type-selector-field">
|
||||
<ha-select
|
||||
name="${e}_type"
|
||||
@@ -1415,7 +1431,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
||||
@value-changed="${e=>{const a=e.detail.value;a?this.setConfigValue(t,a):this.setConfigValue(t,"indicator"===i?"dot":"")}}"
|
||||
></ha-icon-picker>
|
||||
</div>
|
||||
`;if("emoji"===e||"text"===e){const i="emoji"===e?this._getTranslation("emoji_value"):this._getTranslation("text_value"),n="emoji"===e?this._getTranslation("emoji_indicator_note"):this._getTranslation("text_label_note"),o=kn();return _n`
|
||||
`;if("emoji"===e||"text"===e){const i="emoji"===e?this._getTranslation("emoji_value"):this._getTranslation("text_value"),n="emoji"===e?this._getTranslation("emoji_indicator_note"):this._getTranslation("text_label_note"),o=Mn();return mn`
|
||||
<${o}
|
||||
name="${t}"
|
||||
label="${i}"
|
||||
@@ -1423,7 +1439,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
||||
@change="${this._valueChanged}"
|
||||
></${o}>
|
||||
<div class="helper-text">${n}</div>
|
||||
`}if("image"===e){const e=kn();return _n`
|
||||
`}if("image"===e){const e=Mn();return mn`
|
||||
<${e}
|
||||
name="${t}"
|
||||
label="${this._getTranslation("image_path")}"
|
||||
@@ -1431,10 +1447,10 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
||||
@change="${this._valueChanged}"
|
||||
></${e}>
|
||||
<div class="helper-text">${this._getTranslation("image_indicator_note")}</div>
|
||||
`}return I``}}vn([de({attribute:!1})],Mn.prototype,"hass"),vn([de({attribute:!1})],Mn.prototype,"_config");var zn=Object.defineProperty,Tn=Object.defineProperties,Dn=Object.getOwnPropertyDescriptor,Sn=Object.getOwnPropertyDescriptors,$n=Object.getOwnPropertySymbols,jn=Object.prototype.hasOwnProperty,xn=Object.prototype.propertyIsEnumerable,Yn=(e,t,a)=>t in e?zn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Ln=(e,t)=>{for(var a in t||(t={}))jn.call(t,a)&&Yn(e,a,t[a]);if($n)for(var a of $n(t))xn.call(t,a)&&Yn(e,a,t[a]);return e},En=(e,t)=>Tn(e,Sn(t)),An=(e,t,a,i)=>{for(var n,o=i>1?void 0:i?Dn(t,a):t,r=e.length-1;r>=0;r--)(n=e[r])&&(o=(i?n(t,a,o):n(o))||o);return i&&o&&zn(t,a,o),o};let Cn=class extends oe{constructor(){super(),this.config=Ln({},Ke),this.events=[],this.isInitialLoad=!0,this.isLoading=!1,this.isExpanded=!1,this.weatherForecasts={daily:{},hourly:{}},this._instanceId=yt(),this._language="",this._lastUpdateTime=0,this._weatherUnsubscribers=[],this._weatherSetupVersion=0,this._weatherSetupPending=!1,this._activePointerId=null,this._holdTriggered=!1,this._holdTimer=null,this._holdIndicator=null,this._handleVisibilityChange=()=>{if("visible"===document.visibilityState){Date.now()-this._lastUpdateTime>ke&&(Ie("Visibility changed to visible, updating events"),this.updateEvents())}},this._instanceId=yt(),Pe(_e)}static getConfigElement(){return document.createElement("calendar-card-pro-editor")}get safeHass(){return this.hass||null}get effectiveLanguage(){return!this._language&&this.hass&&(this._language=mt(this.config.language,this.hass.locale)),this._language||"en"}get groupedEvents(){return ci(this.events,this.config,this.isExpanded,this.effectiveLanguage)}static get styles(){return Si}connectedCallback(){super.connectedCallback(),Ie("Component connected"),this.startRefreshTimer(),this.updateEvents(),this._scheduleWeatherSetup(),document.addEventListener("visibilitychange",this._handleVisibilityChange)}disconnectedCallback(){super.disconnectedCallback(),this._weatherSetupVersion++,this._weatherSetupPending=!1,this._cleanupWeatherSubscriptions(),this._refreshTimerId&&clearTimeout(this._refreshTimerId),this._initialLoadRetryId&&(clearTimeout(this._initialLoadRetryId),this._initialLoadRetryId=void 0),this._holdTimer&&(clearTimeout(this._holdTimer),this._holdTimer=null),this._holdIndicator&&($i(this._holdIndicator),this._holdIndicator=null),document.removeEventListener("visibilitychange",this._handleVisibilityChange),Ie("Component disconnected")}updated(e){var t,a,i,n,o,r,s,l,d;e.has("hass")&&this.hass&&!e.get("hass")&&this.updateEvents(!0),(e.has("hass")&&(null==(t=this.hass)?void 0:t.locale)||e.has("config")&&(null==(a=e.get("config"))?void 0:a.language)!==this.config.language)&&(this._language=mt(this.config.language,null==(i=this.hass)?void 0:i.locale));const _=e.has("hass")&&this.hass&&!e.get("hass"),c=e.get("config"),u=e.has("config")&&((null==(o=null==(n=this.config)?void 0:n.weather)?void 0:o.entity)!==(null==(r=null==c?void 0:c.weather)?void 0:r.entity)||(null==(l=null==(s=this.config)?void 0:s.weather)?void 0:l.position)!==(null==(d=null==c?void 0:c.weather)?void 0:d.position));(_||u)&&this._scheduleWeatherSetup()}getCustomStyles(){return function(e){var t,a,i,n,o,r,s,l,d,_,c,u;const m={"--calendar-card-background-color":e.background_color,"--calendar-card-font-size-weekday":e.weekday_font_size,"--calendar-card-font-size-day":e.day_font_size,"--calendar-card-font-size-month":e.month_font_size,"--calendar-card-font-size-event":e.event_font_size,"--calendar-card-font-size-time":e.time_font_size,"--calendar-card-font-size-location":e.location_font_size,"--calendar-card-font-size-description":e.description_font_size,"--calendar-card-color-weekday":e.weekday_color,"--calendar-card-color-day":e.day_color,"--calendar-card-color-month":e.month_color,"--calendar-card-color-event":e.event_color,"--calendar-card-color-time":e.time_color,"--calendar-card-color-location":e.location_color,"--calendar-card-color-description":e.description_color,"--calendar-card-line-color-vertical":e.accent_color,"--calendar-card-line-width-vertical":e.vertical_line_width,"--calendar-card-day-spacing":e.day_spacing,"--calendar-card-event-spacing":e.event_spacing,"--calendar-card-spacing-additional":e.additional_card_spacing,"--calendar-card-height":e.height||"auto","--calendar-card-max-height":e.max_height,"--calendar-card-progress-bar-color":e.progress_bar_color,"--calendar-card-progress-bar-height":e.progress_bar_height,"--calendar-card-progress-bar-width":e.progress_bar_width,"--calendar-card-icon-size-time":e.time_icon_size||"14px","--calendar-card-icon-size-location":e.location_icon_size||"14px","--calendar-card-icon-size-description":e.description_icon_size||"14px","--calendar-card-description-max-lines":e.description_max_lines>0?String(e.description_max_lines):"none","--calendar-card-date-column-width":1.75*parseFloat(e.day_font_size)+"px","--calendar-card-date-column-vertical-alignment":e.date_v
Line truncated
|
||||
`}return I``}}wn([de({attribute:!1})],Dn.prototype,"hass"),wn([de({attribute:!1})],Dn.prototype,"_config");var jn=Object.defineProperty,Sn=Object.defineProperties,$n=Object.getOwnPropertyDescriptor,xn=Object.getOwnPropertyDescriptors,Yn=Object.getOwnPropertySymbols,Ln=Object.prototype.hasOwnProperty,En=Object.prototype.propertyIsEnumerable,An=(e,t,a)=>t in e?jn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Cn=(e,t)=>{for(var a in t||(t={}))Ln.call(t,a)&&An(e,a,t[a]);if(Yn)for(var a of Yn(t))En.call(t,a)&&An(e,a,t[a]);return e},Hn=(e,t)=>Sn(e,xn(t)),Pn=(e,t,a,i)=>{for(var n,o=i>1?void 0:i?$n(t,a):t,r=e.length-1;r>=0;r--)(n=e[r])&&(o=(i?n(t,a,o):n(o))||o);return i&&o&&jn(t,a,o),o};let Vn=class extends oe{constructor(){super(),this.config=Cn({},Ke),this.events=[],this.isInitialLoad=!0,this.isLoading=!1,this.isExpanded=!1,this.weatherForecasts={daily:{},hourly:{}},this._instanceId=kt(),this._language="",this._lastUpdateTime=0,this._weatherUnsubscribers=[],this._weatherSetupVersion=0,this._weatherSetupPending=!1,this._activePointerId=null,this._holdTriggered=!1,this._holdTimer=null,this._holdIndicator=null,this._handleVisibilityChange=()=>{if("visible"===document.visibilityState){Date.now()-this._lastUpdateTime>ke&&(Ie("Visibility changed to visible, updating events"),this.updateEvents())}},this._instanceId=kt(),Pe(_e)}static getConfigElement(){return document.createElement("calendar-card-pro-editor")}get safeHass(){return this.hass||null}get effectiveLanguage(){return!this._language&&this.hass&&(this._language=ht(this.config.language,this.hass.locale)),this._language||"en"}get groupedEvents(){return hi(this.events,this.config,this.isExpanded,this.effectiveLanguage)}static get styles(){return xi}connectedCallback(){super.connectedCallback(),Ie("Component connected"),this.startRefreshTimer(),this.updateEvents(),this._scheduleWeatherSetup(),document.addEventListener("visibilitychange",this._handleVisibilityChange)}disconnectedCallback(){super.disconnectedCallback(),this._weatherSetupVersion++,this._weatherSetupPending=!1,this._cleanupWeatherSubscriptions(),this._refreshTimerId&&clearTimeout(this._refreshTimerId),this._initialLoadRetryId&&(clearTimeout(this._initialLoadRetryId),this._initialLoadRetryId=void 0),this._holdTimer&&(clearTimeout(this._holdTimer),this._holdTimer=null),this._holdIndicator&&(Yi(this._holdIndicator),this._holdIndicator=null),document.removeEventListener("visibilitychange",this._handleVisibilityChange),Ie("Component disconnected")}updated(e){var t,a,i,n,o,r,s,l,d;e.has("hass")&&this.hass&&!e.get("hass")&&this.updateEvents(!0),(e.has("hass")&&(null==(t=this.hass)?void 0:t.locale)||e.has("config")&&(null==(a=e.get("config"))?void 0:a.language)!==this.config.language)&&(this._language=ht(this.config.language,null==(i=this.hass)?void 0:i.locale));const _=e.has("hass")&&this.hass&&!e.get("hass"),c=e.get("config"),u=e.has("config")&&((null==(o=null==(n=this.config)?void 0:n.weather)?void 0:o.entity)!==(null==(r=null==c?void 0:c.weather)?void 0:r.entity)||(null==(l=null==(s=this.config)?void 0:s.weather)?void 0:l.position)!==(null==(d=null==c?void 0:c.weather)?void 0:d.position));(_||u)&&this._scheduleWeatherSetup()}getCustomStyles(){return function(e){var t,a,i,n,o,r,s,l,d,_,c,u;const m={"--calendar-card-background-color":e.background_color,"--calendar-card-font-size-weekday":e.weekday_font_size,"--calendar-card-font-size-day":e.day_font_size,"--calendar-card-font-size-month":e.month_font_size,"--calendar-card-font-size-event":e.event_font_size,"--calendar-card-font-size-time":e.time_font_size,"--calendar-card-font-size-location":e.location_font_size,"--calendar-card-font-size-description":e.description_font_size,"--calendar-card-color-weekday":e.weekday_color,"--calendar-card-color-day":e.day_color,"--calendar-card-color-month":e.month_color,"--calendar-card-color-event":e.event_color,"--calendar-card-color-time":e.time_color,"--calendar-card-color-location":e.location_color,"--calendar-card-color-description":e.description_color,"--calendar-card-line-color-vertical":e.accent_color,"--calendar-card-line-width-vertical":e.vertical_line_width,"--calendar-card-day-spacing":e.day_spacing,"--calendar-card-event-spacing":e.event_spacing,"--calendar-card-spacing-additional":e.additional_card_spacing,"--calendar-card-height":e.height||"auto","--calendar-card-max-height":e.max_height,"--calendar-card-progress-bar-color":e.progress_bar_color,"--calendar-card-progress-bar-height":e.progress_bar_height,"--calendar-card-progress-bar-width":e.progress_bar_width,"--calendar-card-icon-size-time":e.time_icon_size||"14px","--calendar-card-icon-size-location":e.location_icon_size||"14px","--calendar-card-icon-size-description":e.description_icon_size||"14px","--calendar-card-description-max-lines":e.description_max_lines>0?String(e.description_max_lines):"none","--calendar-card-date-column-width":1.75*parseFloat(e.day_font_size)+"px","--calendar-card-date-column-vertical-alignment":e.date_v
Line truncated
|
||||
<ha-card
|
||||
class="calendar-card-pro ${n?"max-height-set":""}"
|
||||
style=${Hi(e)}
|
||||
style=${Fi(e)}
|
||||
tabindex="0"
|
||||
aria-busy=${o?"true":"false"}
|
||||
@keydown=${i.keyDown}
|
||||
@@ -1459,5 +1475,4 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
||||
<!-- Content container is always present -->
|
||||
<div class="content-container">${a}</div>
|
||||
</ha-card>
|
||||
`}(e,this.config.title,a,t,!1,this.isLoading)}};Cn.getStubConfig=Re,An([de({attribute:!1})],Cn.prototype,"hass",2),An([de({attribute:!1})],Cn.prototype,"config",2),An([de({attribute:!1})],Cn.prototype,"events",2),An([de({attribute:!1})],Cn.prototype,"isInitialLoad",2),An([de({attribute:!1})],Cn.prototype,"isLoading",2),An([de({attribute:!1})],Cn.prototype,"isExpanded",2),An([de({attribute:!1})],Cn.prototype,"weatherForecasts",2),Cn=An([(e=>(t,a)=>{void 0!==a?a.addInitializer((()=>{customElements.define(e,t)})):customElements.define(e,t)})("calendar-card-pro")],Cn),customElements.define("calendar-card-pro-editor",Mn);const Hn=customElements.get("calendar-card-pro");Hn&&(Hn.getStubConfig=Re),window.customCards=window.customCards||[],window.customCards.push({type:"calendar-card-pro",name:"Calendar Card Pro",preview:!0,description:"A calendar card that supports multiple calendars with individual styling.",documentationURL:"https://github.com/alexpfau/calendar-card-pro"});
|
||||
//# sourceMappingURL=calendar-card-pro.js.map
|
||||
`}(e,this.config.title,a,t,!1,this.isLoading)}};Vn.getStubConfig=Ue,Pn([de({attribute:!1})],Vn.prototype,"hass",2),Pn([de({attribute:!1})],Vn.prototype,"config",2),Pn([de({attribute:!1})],Vn.prototype,"events",2),Pn([de({attribute:!1})],Vn.prototype,"isInitialLoad",2),Pn([de({attribute:!1})],Vn.prototype,"isLoading",2),Pn([de({attribute:!1})],Vn.prototype,"isExpanded",2),Pn([de({attribute:!1})],Vn.prototype,"weatherForecasts",2),Vn=Pn([(e=>(t,a)=>{void 0!==a?a.addInitializer((()=>{customElements.define(e,t)})):customElements.define(e,t)})("calendar-card-pro")],Vn),customElements.define("calendar-card-pro-editor",Dn);const Fn=customElements.get("calendar-card-pro");Fn&&(Fn.getStubConfig=Ue),window.customCards=window.customCards||[],window.customCards.push({type:"calendar-card-pro",name:"Calendar Card Pro",preview:!0,description:"A calendar card that supports multiple calendars with individual styling.",documentationURL:"https://github.com/alexpfau/calendar-card-pro"});
|
||||
Binary file not shown.
+26
-26
@@ -4,10 +4,10 @@
|
||||
"state": "ON",
|
||||
"led_brightness": 100,
|
||||
"countdown_to_turn_off": 0,
|
||||
"voltage": 120.4,
|
||||
"voltage": 121,
|
||||
"countdown_to_turn_on": 0,
|
||||
"ac_frequency": 60,
|
||||
"power_factor": 0.14,
|
||||
"power_factor": 0.11,
|
||||
"update": {
|
||||
"state": "idle",
|
||||
"installed_version": 268513381,
|
||||
@@ -15,21 +15,21 @@
|
||||
"latest_source": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images/ThirdReality/SmartPlug_Zigbee_PROD_OTA_V101_1.01.01.ota",
|
||||
"latest_release_notes": null
|
||||
},
|
||||
"power": 0.4,
|
||||
"power": 0.5,
|
||||
"linkquality": 116,
|
||||
"current": 0.03,
|
||||
"power_on_behavior": "on"
|
||||
},
|
||||
"0xffffb40e0607af27": {
|
||||
"state": "ON",
|
||||
"voltage": 120.4,
|
||||
"voltage": 120.1,
|
||||
"ac_frequency": 60,
|
||||
"led_brightness": 100,
|
||||
"countdown_to_turn_off": 0,
|
||||
"countdown_to_turn_on": 0,
|
||||
"power": 2.1,
|
||||
"current": 0.11,
|
||||
"energy": 27.67,
|
||||
"current": 0.12,
|
||||
"energy": 27.68,
|
||||
"power_factor": 0.15,
|
||||
"update": {
|
||||
"state": "idle",
|
||||
@@ -45,9 +45,9 @@
|
||||
"state": "ON",
|
||||
"led_brightness": 100,
|
||||
"countdown_to_turn_off": 0,
|
||||
"voltage": 120,
|
||||
"voltage": 120.8,
|
||||
"countdown_to_turn_on": 0,
|
||||
"energy": 51.49,
|
||||
"energy": 51.5,
|
||||
"power_factor": 0.2,
|
||||
"ac_frequency": 60,
|
||||
"update": {
|
||||
@@ -74,13 +74,13 @@
|
||||
"led_brightness": 100,
|
||||
"countdown_to_turn_off": 0,
|
||||
"countdown_to_turn_on": 0,
|
||||
"voltage": 121.7,
|
||||
"voltage": 121.9,
|
||||
"state": "ON",
|
||||
"ac_frequency": 60,
|
||||
"energy": 105.48,
|
||||
"power": 109.1,
|
||||
"current": 0.98,
|
||||
"power_factor": 0.94,
|
||||
"energy": 105.51,
|
||||
"power": 106.2,
|
||||
"current": 0.93,
|
||||
"power_factor": 0.95,
|
||||
"update": {
|
||||
"state": "idle",
|
||||
"installed_version": 268513381,
|
||||
@@ -95,13 +95,13 @@
|
||||
"led_brightness": 100,
|
||||
"countdown_to_turn_off": 0,
|
||||
"countdown_to_turn_on": 0,
|
||||
"voltage": 119.4,
|
||||
"energy": 45.46,
|
||||
"voltage": 120,
|
||||
"energy": 45.47,
|
||||
"state": "ON",
|
||||
"power": 38.8,
|
||||
"power": 38.7,
|
||||
"current": 0.43,
|
||||
"ac_frequency": 60,
|
||||
"power_factor": 0.81,
|
||||
"power_factor": 0.72,
|
||||
"update": {
|
||||
"state": "idle",
|
||||
"installed_version": 268513381,
|
||||
@@ -114,12 +114,12 @@
|
||||
},
|
||||
"0xffffb40e060895b3": {
|
||||
"state": "ON",
|
||||
"voltage": 120.2,
|
||||
"voltage": 120.8,
|
||||
"ac_frequency": 60,
|
||||
"energy": 6.99,
|
||||
"current": 0.02,
|
||||
"power": 0.1,
|
||||
"power_factor": 0.11,
|
||||
"current": 0.01,
|
||||
"power": 0.2,
|
||||
"power_factor": 0.2,
|
||||
"linkquality": 123,
|
||||
"update": {
|
||||
"state": "idle",
|
||||
@@ -136,7 +136,7 @@
|
||||
"0xffffb40e0608864e": {
|
||||
"led_brightness": 100,
|
||||
"countdown_to_turn_off": 0,
|
||||
"voltage": 121.2,
|
||||
"voltage": 122.2,
|
||||
"energy": 17.47,
|
||||
"countdown_to_turn_on": 0,
|
||||
"state": "ON",
|
||||
@@ -172,7 +172,7 @@
|
||||
"0xffffb40e060893d8": {
|
||||
"state": "ON",
|
||||
"led_brightness": 100,
|
||||
"voltage": 121.5,
|
||||
"voltage": 122,
|
||||
"countdown_to_turn_off": 0,
|
||||
"countdown_to_turn_on": 0,
|
||||
"energy": 3.05,
|
||||
@@ -187,12 +187,12 @@
|
||||
"latest_source": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images/ThirdReality/SmartPlug_Zigbee_PROD_OTA_V101_1.01.01.ota",
|
||||
"latest_release_notes": null
|
||||
},
|
||||
"power_factor": 0,
|
||||
"power": 0.3
|
||||
"power_factor": 0.06,
|
||||
"power": 0
|
||||
},
|
||||
"0xa4c1380d0679ffff": {
|
||||
"battery": 100,
|
||||
"temperature": 27.4,
|
||||
"temperature": 27.3,
|
||||
"temperature_units": "celsius",
|
||||
"temperature_calibration": 0,
|
||||
"update": {
|
||||
|
||||
Reference in new issue
Block a user