UNPKG

iobroker.lovelace

Version:

With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI

52 lines 62.3 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[68473],{72487:function(e,t,a){a.a(e,async function(e,i){try{a.d(t,{CA:function(){return x},Mi:function(){return T},Pm:function(){return L},Wq:function(){return b},Yq:function(){return d},bl:function(){return z},c2:function(){return _},fr:function(){return f},gu:function(){return A},kz:function(){return c},m9:function(){return F},sl:function(){return g},ur:function(){return Z},zB:function(){return p}});a(18111),a(20116);var o=a(74487),r=a(22786),n=a(46927),l=a(8480),s=e([o,l]);[o,l]=s.then?(await s)():s;(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"long",month:"long",day:"numeric",timeZone:(0,l.wj)(e.time_zone,t)}));const d=(e,t,a)=>h(t,a.time_zone).format(e),h=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"long",day:"numeric",timeZone:(0,l.wj)(e.time_zone,t)})),c=(e,t,a)=>u(t,a.time_zone).format(e),u=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"short",day:"numeric",timeZone:(0,l.wj)(e.time_zone,t)})),p=(e,t,a)=>{var i,o,r,l;const s=m(t,a.time_zone);if(t.date_format===n.ow.language||t.date_format===n.ow.system)return s.format(e);const d=s.formatToParts(e),h=null===(i=d.find(e=>"literal"===e.type))||void 0===i?void 0:i.value,c=null===(o=d.find(e=>"day"===e.type))||void 0===o?void 0:o.value,u=null===(r=d.find(e=>"month"===e.type))||void 0===r?void 0:r.value,p=null===(l=d.find(e=>"year"===e.type))||void 0===l?void 0:l.value,g=d[d.length-1];let v="literal"===(null==g?void 0:g.type)?null==g?void 0:g.value:"";"bg"===t.language&&t.date_format===n.ow.YMD&&(v="");return{[n.ow.DMY]:`${c}${h}${u}${h}${p}${v}`,[n.ow.MDY]:`${u}${h}${c}${h}${p}${v}`,[n.ow.YMD]:`${p}${h}${u}${h}${c}${v}`}[t.date_format]},m=(0,r.A)((e,t)=>{const a=e.date_format===n.ow.system?void 0:e.language;return e.date_format===n.ow.language||(e.date_format,n.ow.system),new Intl.DateTimeFormat(a,{year:"numeric",month:"numeric",day:"numeric",timeZone:(0,l.wj)(e.time_zone,t)})}),g=(e,t,a)=>v(t,a.time_zone).format(e),v=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{day:"numeric",month:"short",timeZone:(0,l.wj)(e.time_zone,t)})),f=(e,t,a)=>y(t,a.time_zone).format(e),y=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{month:"long",year:"numeric",timeZone:(0,l.wj)(e.time_zone,t)})),b=(e,t,a)=>w(t,a.time_zone).format(e),w=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{month:"long",timeZone:(0,l.wj)(e.time_zone,t)})),_=(e,t,a)=>C(t,a.time_zone).format(e),C=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{month:"short",timeZone:(0,l.wj)(e.time_zone,t)})),L=(e,t,a)=>$(t,a.time_zone).format(e),$=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",timeZone:(0,l.wj)(e.time_zone,t)})),x=(e,t,a)=>M(t,a.time_zone).format(e),M=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"long",timeZone:(0,l.wj)(e.time_zone,t)})),A=(e,t,a)=>S(t,a.time_zone).format(e),S=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"short",timeZone:(0,l.wj)(e.time_zone,t)})),T=(e,t,a)=>k(t,a.time_zone).format(e),k=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"short",month:"short",day:"numeric",timeZone:(0,l.wj)(e.time_zone,t)})),Z=(e,t,a)=>E(t,a.time_zone).format(e),E=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"short",month:"short",day:"numeric",year:"numeric",timeZone:(0,l.wj)(e.time_zone,t)})),z=(e,t,a)=>{const i=(0,l.wj)(t.time_zone,a.time_zone);return new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"2-digit",day:"2-digit",timeZone:i}).format(e)},F=(e,t,a,i)=>`${z(e,a,i)}/${z(t,a,i)}`;i()}catch(d){i(d)}})},95747:function(e,t,a){a.a(e,async function(e,i){try{a.d(t,{CL:function(){return b},GH:function(){return C},Rl:function(){return p},ZS:function(){return f},aQ:function(){return g},r6:function(){return c},yg:function(){return w}});var o=a(74487),r=a(22786),n=a(72487),l=a(30162),s=a(8480),d=a(69543),h=e([o,s,n,l]);[o,s,n,l]=h.then?(await h)():h;const c=(e,t,a)=>u(t,a.time_zone).format(e),u=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"long",day:"numeric",hour:(0,d.J)(e)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,d.J)(e)?"h12":"h23",timeZone:(0,s.wj)(e.time_zone,t)})),p=e=>m().format(e),m=(0,r.A)(()=>new Intl.DateTimeFormat(void 0,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})),g=(e,t,a)=>v(t,a.time_zone).format(e),v=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"short",day:"numeric",hour:(0,d.J)(e)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,d.J)(e)?"h12":"h23",timeZone:(0,s.wj)(e.time_zone,t)})),f=(e,t,a)=>y(t,a.time_zone).format(e),y=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{month:"short",day:"numeric",hour:(0,d.J)(e)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,d.J)(e)?"h12":"h23",timeZone:(0,s.wj)(e.time_zone,t)})),b=(e,t,a)=>(new Date).getFullYear()===e.getFullYear()?f(e,t,a):g(e,t,a),w=(e,t,a)=>_(t,a.time_zone).format(e),_=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"long",day:"numeric",hour:(0,d.J)(e)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hourCycle:(0,d.J)(e)?"h12":"h23",timeZone:(0,s.wj)(e.time_zone,t)})),C=(e,t,a)=>`${(0,n.zB)(e,t,a)}, ${(0,l.fU)(e,t,a)}`;i()}catch(c){i(c)}})},30162:function(e,t,a){a.a(e,async function(e,i){try{a.d(t,{LW:function(){return g},Xs:function(){return p},fU:function(){return d},ie:function(){return c}});var o=a(74487),r=a(22786),n=a(8480),l=a(69543),s=e([o,n]);[o,n]=s.then?(await s)():s;const d=(e,t,a)=>h(t,a.time_zone).format(e),h=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{hour:"numeric",minute:"2-digit",hourCycle:(0,l.J)(e)?"h12":"h23",timeZone:(0,n.wj)(e.time_zone,t)})),c=(e,t,a)=>u(t,a.time_zone).format(e),u=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{hour:(0,l.J)(e)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hourCycle:(0,l.J)(e)?"h12":"h23",timeZone:(0,n.wj)(e.time_zone,t)})),p=(e,t,a)=>m(t,a.time_zone).format(e),m=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"long",hour:(0,l.J)(e)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,l.J)(e)?"h12":"h23",timeZone:(0,n.wj)(e.time_zone,t)})),g=(e,t,a)=>v(t,a.time_zone).format(e),v=(0,r.A)((e,t)=>new Intl.DateTimeFormat("en-GB",{hour:"numeric",minute:"2-digit",hour12:!1,timeZone:(0,n.wj)(e.time_zone,t)}));i()}catch(d){i(d)}})},98975:function(e,t,a){a.a(e,async function(e,i){try{a.d(t,{K:function(){return d}});var o=a(74487),r=a(22786),n=a(63927),l=e([o,n]);[o,n]=l.then?(await l)():l;const s=(0,r.A)(e=>new Intl.RelativeTimeFormat(e.language,{numeric:"auto"})),d=(e,t,a,i=!0)=>{const o=(0,n.x)(e,a,t);return i?s(t).format(o.value,o.unit):Intl.NumberFormat(t.language,{style:"unit",unit:o.unit,unitDisplay:"long"}).format(Math.abs(o.value))};i()}catch(s){i(s)}})},47129:function(e,t,a){a.d(t,{a:function(){return r}});a(74423);var i=a(22675),o=a(71727);function r(e,t){const a=(0,o.m)(e.entity_id),r=void 0!==t?t:null==e?void 0:e.state;if(["button","event","infrared","input_button","radio_frequency","scene"].includes(a))return r!==i.Hh;if(r===i.Hh||r===i.HV)return!1;if("off"===r&&"alert"!==a)return!1;switch(a){case"alarm_control_panel":return"disarmed"!==r;case"alert":return"idle"!==r;case"cover":case"valve":return"closed"!==r;case"device_tracker":case"person":return"not_home"!==r;case"lawn_mower":return!["docked","paused"].includes(r);case"lock":return"locked"!==r;case"media_player":return"standby"!==r;case"vacuum":return!["idle","docked","paused"].includes(r);case"plant":return"problem"===r;case"group":return["on","home","open","locked","problem"].includes(r);case"timer":return"active"===r;case"camera":return"streaming"===r}return!0}},52658:function(e,t,a){a.d(t,{ZK:function(){return u},gf:function(){return c},mT:function(){return m},Se:function(){return h},mg:function(){return p}});a(44114),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698),a(62953);var i=a(22675),o=a(68287),r=a(86030),n=a(80880);var l=a(71727),s=a(47129);const d=new Set(["alarm_control_panel","alert","automation","binary_sensor","calendar","camera","climate","cover","device_tracker","fan","group","humidifier","input_boolean","lawn_mower","light","lock","media_player","person","plant","remote","schedule","script","siren","sun","switch","timer","update","vacuum","valve","water_heater","weather"]),h=(e,t)=>{if((void 0!==t?t:null==e?void 0:e.state)===i.Hh)return"var(--state-unavailable-color)";const a=p(e,t);return a?(0,r.B)(a):void 0},c=(e,t,a)=>{const i=void 0!==a?a:t.state,o=(0,s.a)(t,a);return u(e,t.attributes.device_class,i,o)},u=(e,t,a,i)=>{const o=[],r=(0,n.Y)(a,"_"),l=i?"active":"inactive";return t&&o.push(`--state-${e}-${t}-${r}-color`),o.push(`--state-${e}-${r}-color`,`--state-${e}-${l}-color`,`--state-${l}-color`),o},p=(e,t)=>{const a=void 0!==t?t:null==e?void 0:e.state,i=(0,l.m)(e.entity_id),r=e.attributes.device_class;if("sensor"===i&&"battery"===r){const e=(e=>{const t=Number(e);if(!isNaN(t))return t>=70?"--state-sensor-battery-high-color":t>=30?"--state-sensor-battery-medium-color":"--state-sensor-battery-low-color"})(a);if(e)return[e]}if("group"===i){const a=(0,o.z)(e);if(a&&d.has(a))return c(a,e,t)}if(d.has(i))return c(i,e,t)},m=e=>{if(e.attributes.brightness&&"plant"!==(0,l.m)(e.entity_id)){return`brightness(${(e.attributes.brightness+245)/5}%)`}return""}},52943:function(e,t,a){a.d(t,{Z:function(){return i}});const i=e=>e.charAt(0).toUpperCase()+e.slice(1)},22682:function(e,t,a){a.d(t,{$:function(){return n}});a(84864),a(57465),a(27495);const i="^\\d{4}-(0[1-9]|1[0-2])-([12]\\d|0[1-9]|3[01])",o=new RegExp(i+"$"),r=new RegExp(i),n=(e,t=!1)=>t?r.test(e):o.test(e)},80880:function(e,t,a){a.d(t,{Y:function(){return i}});a(84864),a(57465),a(27495),a(25440);const i=(e,t="_")=>{const a="àáâäæãåāăąабçćčđďдèéêëēėęěеёэфğǵгḧхîïíīįìıİийкłлḿмñńǹňнôöòóœøōõőоṕпŕřрßśšşșсťțтûüùúūǘůűųувẃẍÿýыžźżз·",i=`aaaaaaaaaaabcccdddeeeeeeeeeeefggghhiiiiiiiiijkllmmnnnnnoooooooooopprrrsssssstttuuuuuuuuuuvwxyyyzzzz${t}`,o=new RegExp(a.split("").join("|"),"g"),r={"ж":"zh","х":"kh","ц":"ts","ч":"ch","ш":"sh","щ":"shch","ю":"iu","я":"ia"};let n;return""===e?n="":(n=e.toString().toLowerCase().replace(o,e=>i.charAt(a.indexOf(e))).replace(/[а-я]/g,e=>r[e]||"").replace(/(\d),(?=\d)/g,"$1").replace(/[^a-z0-9]+/g,t).replace(new RegExp(`(${t})\\1+`,"g"),"$1").replace(new RegExp(`^${t}+`),"").replace(new RegExp(`${t}+$`),""),""===n&&(n="unknown")),n}},10087:function(e,t,a){a.a(e,async function(e,i){try{a.d(t,{h:function(){return d}});var o=a(92913),r=a(52640),n=a(22786),l=a(72487),s=e([l]);l=(s.then?(await s)():s)[0];const d=(0,n.A)((e,t)=>Array.from({length:7},(a,i)=>(0,l.CA)((0,o.f)((0,r.k)(new Date),i),e,t)));i()}catch(d){i(d)}})},3031:function(e,t,a){a.a(e,async function(e,i){try{a.d(t,{d:function(){return d}});var o=a(81977),r=a(33977),n=a(22786),l=a(72487),s=e([l]);l=(s.then?(await s)():s)[0];const d=(0,n.A)((e,t)=>Array.from({length:12},(a,i)=>(0,l.Wq)((0,o.P)((0,r.D)(new Date),i),e,t)));i()}catch(d){i(d)}})},63927:function(e,t,a){a.a(e,async function(e,i){try{a.d(t,{x:function(){return p}});var o=a(6946),r=a(52640),n=a(38684),l=a(380),s=e([l]);l=(s.then?(await s)():s)[0];const h=1e3,c=60,u=60*c;function p(e,t=Date.now(),a,i={}){const s=Object.assign(Object.assign({},m),i||{}),d=(+e-+t)/h;if(Math.abs(d)<s.second)return{value:Math.round(d),unit:"second"};const p=d/c;if(Math.abs(p)<s.minute)return{value:Math.round(p),unit:"minute"};const g=d/u;if(Math.abs(g)<s.hour)return{value:Math.round(g),unit:"hour"};const v=new Date(e),f=new Date(t);v.setHours(0,0,0,0),f.setHours(0,0,0,0);const y=(0,o.c)(v,f);if(0===y)return{value:Math.round(g),unit:"hour"};if(Math.abs(y)<s.day)return{value:y,unit:"day"};const b=(0,l.P)(a),w=(0,r.k)(v,{weekStartsOn:b}),_=(0,r.k)(f,{weekStartsOn:b}),C=(0,n.I)(w,_);if(0===C)return{value:y,unit:"day"};if(Math.abs(C)<s.week)return{value:C,unit:"week"};const L=v.getFullYear()-f.getFullYear(),$=12*L+v.getMonth()-f.getMonth();return 0===$?{value:C,unit:"week"}:Math.abs($)<s.month||0===L?{value:$,unit:"month"}:{value:Math.round(L),unit:"year"}}const m={second:59,minute:59,hour:22,day:5,week:4,month:11};i()}catch(d){i(d)}})},32656:function(e,t,a){a.a(e,async function(e,t){try{a(74423),a(62953);var i=a(40445),o=a(5124),r=a(67576),n=a(63672),l=a(1087),s=a(57237),d=a(26300),h=(a(3449),a(606)),c=a(91485),u=e([d,h,c]);[d,h,c]=u.then?(await u)():u;let p,m,g,v,f,y,b,w,_,C,L,$=e=>e;const x="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";class M extends o.WF{reportValidity(){const e=this._inputs;return!e||[...e].every(e=>e.reportValidity())}render(){return(0,o.qy)(p||(p=$` ${0} <div class="time-input-wrap-wrap"> <div class="time-input-wrap"> ${0} <ha-input id="hour" type="number" inputmode="numeric" .value="${0}" .label="${0}" .placeholder="${0}" name="hours" @change="${0}" @focusin="${0}" without-spin-buttons .required="${0}" .autoValidate="${0}" maxlength="2" max="${0}" min="0" .disabled="${0}"> </ha-input> <div class="time-separator">:</div> <ha-input id="min" type="number" inputmode="numeric" .value="${0}" .label="${0}" .placeholder="${0}" @change="${0}" @focusin="${0}" name="minutes" without-spin-buttons .required="${0}" .autoValidate="${0}" maxlength="2" max="59" min="0" .disabled="${0}"> </ha-input> ${0} ${0} ${0} ${0} ${0} </div> </div> ${0} `),this.label?(0,o.qy)(m||(m=$`<label>${0}${0}</label>`),this.label,this.required?" *":""):o.s6,this.enableDay?(0,o.qy)(g||(g=$` <ha-input id="day" type="number" inputmode="numeric" .value="${0}" .label="${0}" .placeholder="${0}" name="days" @change="${0}" @focusin="${0}" without-spin-buttons .required="${0}" .autoValidate="${0}" min="0" .disabled="${0}"> </ha-input> <div class="time-separator">:</div> `),this.days.toFixed(),this.placeholderLabels?"":this.dayLabel,this.placeholderLabels?this.dayLabel:"",this._valueChanged,this._onFocus,this.required,this.autoValidate,this.disabled):o.s6,this.hours.toFixed(),this.placeholderLabels?"":this.hourLabel,this.placeholderLabels?this.hourLabel:"",this._valueChanged,this._onFocus,this.required,this.autoValidate,(0,n.J)(this._hourMax),this.disabled,this._formatValue(this.minutes),this.placeholderLabels?"":this.minLabel,this.placeholderLabels?this.minLabel:"",this._valueChanged,this._onFocus,this.required,this.autoValidate,this.disabled,this.enableSecond?(0,o.qy)(v||(v=$`<div class="time-separator">:</div>`)):o.s6,this.enableSecond?(0,o.qy)(f||(f=$`<ha-input id="sec" type="number" inputmode="decimal" step="any" .value="${0}" .label="${0}" .placeholder="${0}" @change="${0}" @focusin="${0}" name="seconds" without-spin-buttons .required="${0}" .autoValidate="${0}" max="59" min="0" .disabled="${0}"> </ha-input> ${0}`),this._formatValue(this.seconds),this.placeholderLabels?"":this.secLabel,this.placeholderLabels?this.secLabel:"",this._valueChanged,this._onFocus,this.required,this.autoValidate,this.disabled,this.enableMillisecond?(0,o.qy)(y||(y=$`<div class="time-separator">:</div>`)):o.s6):o.s6,this.enableMillisecond?(0,o.qy)(b||(b=$`<ha-input id="millisec" type="number" .value="${0}" .label="${0}" .placeholder="${0}" @change="${0}" @focusin="${0}" name="milliseconds" without-spin-buttons .required="${0}" .autoValidate="${0}" maxlength="3" max="999" min="0" .disabled="${0}"> </ha-input>`),this._formatValue(this.milliseconds,3),this.placeholderLabels?"":this.millisecLabel,this.placeholderLabels?this.millisecLabel:"",this._valueChanged,this._onFocus,this.required,this.autoValidate,this.disabled):o.s6,24===this.format?o.s6:(0,o.qy)(w||(w=$`<ha-select .required="${0}" .value="${0}" .disabled="${0}" .name="${0}" @selected="${0}" @wa-after-hide="${0}" @wa-hide="${0}" .options="${0}"> </ha-select>`),this.required,this.amPm,this.disabled,"amPm",this._valueChanged,s.d,s.d,["AM","PM"]),!this.clearable||this.required||this.disabled?o.s6:(0,o.qy)(_||(_=$`<ha-icon-button label="clear" @click="${0}" .path="${0}"></ha-icon-button>`),this._clearValue,x),this.helper?(0,o.qy)(C||(C=$`<ha-input-helper-text .disabled="${0}">${0}</ha-input-helper-text>`),this.disabled,this.helper):o.s6)}_clearValue(){(0,l.r)(this,"value-changed")}_valueChanged(e){const t=e.currentTarget;this[t.name||""]="amPm"===t.name?e.detail.value:Number(t.value);const a={hours:this.hours,minutes:this.minutes,seconds:this.seconds,milliseconds:this.milliseconds};this.enableDay&&(a.days=this.days),12===this.format&&(a.amPm=this.amPm),(0,l.r)(this,"value-changed",{value:a})}_onFocus(e){e.currentTarget.select()}_formatValue(e,t=2){const a=e.toString();return a.includes(".")?a:a.padStart(t,"0")}get _hourMax(){if(!this.noHoursLimit)return 12===this.format?12:23}constructor(...e){super(...e),this.autoValidate=!1,this.required=!1,this.format=12,this.disabled=!1,this.days=0,this.hours=0,this.minutes=0,this.seconds=0,this.milliseconds=0,this.dayLabel="",this.hourLabel="",this.minLabel="",this.secLabel="",this.millisecLabel="",this.enableSecond=!1,this.enableMillisecond=!1,this.enableDay=!1,this.noHoursLimit=!1,this.amPm="AM",this.placeholderLabels=!1}}M.shadowRootOptions=Object.assign(Object.assign({},o.WF.shadowRootOptions),{},{delegatesFocus:!0}),M.styles=(0,o.AH)(L||(L=$`:host([clearable]){position:relative}.time-input-wrap-wrap{display:flex}.time-input-wrap{display:flex;flex:var(--time-input-flex,unset);border-radius:var(--mdc-shape-small,var(--ha-border-radius-sm)) var(--mdc-shape-small,var(--ha-border-radius-sm)) var(--ha-border-radius-square) var(--ha-border-radius-square);overflow:hidden;position:relative;direction:ltr;padding-right:3px}ha-input{height:56px;padding:0;width:60px;flex-grow:1}ha-input:first-child{--text-field-border-top-left-radius:var(--mdc-shape-medium)}ha-input:last-child{--text-field-border-top-right-radius:var(--mdc-shape-medium)}ha-input::part(wa-base){padding:var(--ha-space-1)}ha-input:first-child::part(wa-base){padding-inline-start:var(--ha-space-4)}ha-input:last-child::part(wa-base){padding-inline-end:var(--ha-space-4)}ha-input::part(wa-hint){height:0}ha-input::part(wa-input){text-align:center}.time-separator,ha-icon-button{background-color:var(--ha-color-form-background);color:var(--ha-color-text-secondary);border-bottom:1px solid var(--ha-color-border-neutral-loud);box-sizing:border-box;height:56px;margin-inline-start:calc(var(--ha-space-1) * -1)}.time-separator{width:12px;margin-inline-end:calc(var(--ha-space-1) * -1);display:flex;align-items:center;justify-content:center}:host([clearable]) .mdc-select__anchor{padding-inline-end:var(--select-selected-text-padding-end,12px)}ha-icon-button{position:relative;--ha-icon-button-size:36px;border-start-end-radius:var(--ha-border-radius-sm);--mdc-icon-size:20px;direction:var(--direction);display:flex;align-items:center}ha-select{margin-inline:calc(var(--ha-space-1) * -1)}label{-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);-webkit-font-smoothing:var(--ha-font-smoothing);font-family:var(
        --mdc-typography-body2-font-family,
        var(--mdc-typography-font-family, var(--ha-font-family-body))
      );font-size:var(--mdc-typography-body2-font-size, var(--ha-font-size-s));line-height:var(
        --mdc-typography-body2-line-height,
        var(--ha-line-height-condensed)
      );font-weight:var(--mdc-typography-body2-font-weight,var(--ha-font-weight-normal));letter-spacing:var(
        --mdc-typography-body2-letter-spacing,
        .0178571429em
      );text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:var(--mdc-typography-body2-text-transform,inherit);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87));padding-left:4px;padding-inline-start:4px;padding-inline-end:initial}ha-input-helper-text{padding-top:8px;line-height:var(--ha-line-height-condensed)}`)),(0,i.Cg)([(0,r.MZ)()],M.prototype,"label",void 0),(0,i.Cg)([(0,r.MZ)()],M.prototype,"helper",void 0),(0,i.Cg)([(0,r.MZ)({attribute:"auto-validate",type:Boolean})],M.prototype,"autoValidate",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean})],M.prototype,"required",void 0),(0,i.Cg)([(0,r.MZ)({type:Number})],M.prototype,"format",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean})],M.prototype,"disabled",void 0),(0,i.Cg)([(0,r.MZ)({type:Number})],M.prototype,"days",void 0),(0,i.Cg)([(0,r.MZ)({type:Number})],M.prototype,"hours",void 0),(0,i.Cg)([(0,r.MZ)({type:Number})],M.prototype,"minutes",void 0),(0,i.Cg)([(0,r.MZ)({type:Number})],M.prototype,"seconds",void 0),(0,i.Cg)([(0,r.MZ)({type:Number})],M.prototype,"milliseconds",void 0),(0,i.Cg)([(0,r.MZ)({type:String,attribute:"day-label"})],M.prototype,"dayLabel",void 0),(0,i.Cg)([(0,r.MZ)({type:String,attribute:"hour-label"})],M.prototype,"hourLabel",void 0),(0,i.Cg)([(0,r.MZ)({type:String,attribute:"min-label"})],M.prototype,"minLabel",void 0),(0,i.Cg)([(0,r.MZ)({type:String,attribute:"sec-label"})],M.prototype,"secLabel",void 0),(0,i.Cg)([(0,r.MZ)({type:String,attribute:"ms-label"})],M.prototype,"millisecLabel",void 0),(0,i.Cg)([(0,r.MZ)({attribute:"enable-second",type:Boolean})],M.prototype,"enableSecond",void 0),(0,i.Cg)([(0,r.MZ)({attribute:"enable-millisecond",type:Boolean})],M.prototype,"enableMillisecond",void 0),(0,i.Cg)([(0,r.MZ)({attribute:"enable-day",type:Boolean})],M.prototype,"enableDay",void 0),(0,i.Cg)([(0,r.MZ)({attribute:"no-hours-limit",type:Boolean})],M.prototype,"noHoursLimit",void 0),(0,i.Cg)([(0,r.MZ)({attribute:!1})],M.prototype,"amPm",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],M.prototype,"clearable",void 0),(0,i.Cg)([(0,r.MZ)({attribute:"placeholder-labels",type:Boolean})],M.prototype,"placeholderLabels",void 0),(0,i.Cg)([(0,r.YG)("ha-input")],M.prototype,"_inputs",void 0),M=(0,i.Cg)([(0,r.EM)("ha-base-time-input")],M),t()}catch(p){t(p)}})},19463:function(e,t,a){a.a(e,async function(e,t){try{a(74423),a(3362),a(62953);var i=a(40445),o=a(5124),r=a(67576),n=a(380),l=a(72487),s=a(1087),d=a(46927),h=(a(67094),a(91485)),c=e([h,l,n]);[h,l,n]=c.then?(await c)():c;let u,p,m=e=>e;const g="M19,19H5V8H19M16,1V3H8V1H6V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3H18V1M17,12H12V17H17V12Z",v=()=>Promise.all([a.e(80827),a.e(17481),a.e(24077)]).then(a.bind(a,64080)),f=(e,t)=>{(0,s.r)(e,"show-dialog",{dialogTag:"ha-dialog-date-picker",dialogImport:v,dialogParams:t})};class y extends o.WF{reportValidity(){var e,t;return null===(e=null===(t=this._input)||void 0===t?void 0:t.reportValidity())||void 0===e||e}render(){var e,t;return(0,o.qy)(u||(u=m`<ha-input .label="${0}" .hint="${0}" .disabled="${0}" readonly="readonly" @click="${0}" @keydown="${0}" .value="${0}" .required="${0}"> <ha-svg-icon slot="end" .path="${0}"></ha-svg-icon> </ha-input>`),null!==(e=this.label)&&void 0!==e?e:"",null!==(t=this.helper)&&void 0!==t?t:"",this.disabled,this._openDialog,this._keyDown,this.value?(0,l.zB)(new Date(`${this.value.split("T")[0]}T00:00:00`),Object.assign(Object.assign({},this.locale),{},{time_zone:d.Wj.local}),{}):"",this.required,g)}_openDialog(){this.disabled||f(this,{min:this.min||"1970-01-01",max:this.max,value:this.value,canClear:this.canClear,onChange:e=>this._valueChanged(e),locale:this.locale.language,firstWeekday:(0,n.P)(this.locale)})}_keyDown(e){if(["Space","Enter"].includes(e.code))return e.preventDefault(),e.stopPropagation(),void this._openDialog();this.canClear&&["Backspace","Delete"].includes(e.key)&&this._valueChanged(void 0)}_valueChanged(e){this.value!==e&&(this.value=e,(0,s.r)(this,"change"),(0,s.r)(this,"value-changed",{value:e}))}constructor(...e){super(...e),this.disabled=!1,this.required=!1,this.canClear=!1}}y.styles=(0,o.AH)(p||(p=m`:host{min-width:0px}ha-svg-icon{color:var(--secondary-text-color)}`)),(0,i.Cg)([(0,r.MZ)({attribute:!1})],y.prototype,"locale",void 0),(0,i.Cg)([(0,r.MZ)()],y.prototype,"value",void 0),(0,i.Cg)([(0,r.MZ)()],y.prototype,"min",void 0),(0,i.Cg)([(0,r.MZ)()],y.prototype,"max",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean})],y.prototype,"disabled",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean})],y.prototype,"required",void 0),(0,i.Cg)([(0,r.MZ)()],y.prototype,"label",void 0),(0,i.Cg)([(0,r.MZ)()],y.prototype,"helper",void 0),(0,i.Cg)([(0,r.MZ)({attribute:"can-clear",type:Boolean})],y.prototype,"canClear",void 0),(0,i.Cg)([(0,r.P)("ha-input",!0)],y.prototype,"_input",void 0),y=(0,i.Cg)([(0,r.EM)("ha-date-input")],y),t()}catch(u){t(u)}})},93444:function(e,t,a){var i=a(40445),o=a(5124),r=a(67576);let n,l,s=e=>e;class d extends o.WF{render(){return(0,o.qy)(n||(n=s` <footer> <slot name="secondaryAction"></slot> <slot name="primaryAction"></slot> </footer> `))}static get styles(){return[(0,o.AH)(l||(l=s`footer{display:flex;gap:var(--ha-space-3);justify-content:flex-end;align-items:center;width:100%}`))]}}d=(0,i.Cg)([(0,r.EM)("ha-dialog-footer")],d)},76538:function(e,t,a){a(62953);var i=a(40445),o=a(5124),r=a(67576);let n,l,s,d,h,c,u=e=>e;class p extends o.WF{render(){const e=(0,o.qy)(n||(n=u`<div class="header-title"> <slot name="title"></slot> </div>`)),t=(0,o.qy)(l||(l=u`<div class="header-subtitle"> <slot name="subtitle"></slot> </div>`));return(0,o.qy)(s||(s=u` <header class="header"> <div class="header-bar"> <section class="header-navigation-icon"> <slot name="navigationIcon"></slot> </section> <section class="header-content"> ${0} </section> <section class="header-action-items"> <slot name="actionItems"></slot> </section> </div> <slot></slot> </header> `),"above"===this.subtitlePosition?(0,o.qy)(d||(d=u`${0}${0}`),t,e):(0,o.qy)(h||(h=u`${0}${0}`),e,t))}static get styles(){return[(0,o.AH)(c||(c=u`:host{display:block}:host([show-border]){border-bottom:1px solid var(--mdc-dialog-scroll-divider-color,rgba(0,0,0,.12))}.header-bar{display:flex;flex-direction:row;align-items:center;padding:0 var(--ha-space-1);box-sizing:border-box}.header-content{flex:1;padding:10px var(--ha-space-1);display:flex;flex-direction:column;justify-content:center;min-height:var(--ha-space-12);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.header-title{height:var(--ha-dialog-header-title-height,calc(var(--ha-font-size-xl) + var(--ha-space-1)));font-size:var(--ha-font-size-xl);line-height:var(--ha-line-height-condensed);font-weight:var(--ha-font-weight-medium);color:var(--ha-dialog-header-title-color,var(--primary-text-color))}.header-subtitle{font-size:var(--ha-font-size-m);line-height:var(--ha-line-height-normal);color:var(--ha-dialog-header-subtitle-color,var(--secondary-text-color))}@media all and (min-width:450px) and (min-height:500px){.header-bar{padding:0 var(--ha-space-2)}}.header-navigation-icon{flex:none;min-width:var(--ha-space-2);height:100%;display:flex;flex-direction:row}.header-action-items{flex:none;min-width:var(--ha-space-2);height:100%;display:flex;flex-direction:row}`))]}constructor(...e){super(...e),this.subtitlePosition="below",this.showBorder=!1}}(0,i.Cg)([(0,r.MZ)({type:String,attribute:"subtitle-position"})],p.prototype,"subtitlePosition",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean,reflect:!0,attribute:"show-border"})],p.prototype,"showBorder",void 0),p=(0,i.Cg)([(0,r.EM)("ha-dialog-header")],p)},72554:function(e,t,a){a.a(e,async function(e,t){try{a(3362),a(62953),a(49255);var i=a(40445),o=a(93900),r=a(35211),n=a(5124),l=a(67576),s=a(63672),d=a(1087),h=a(64481),c=a(22792),u=a(59992),p=a(14503),m=a(22348),g=(a(76538),a(26300)),v=e([o,g,u]);[o,g,u]=v.then?(await v)():v;let f,y,b,w,_,C,L,$=e=>e;const x="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";class M extends((0,u.V)(n.WF)){connectedCallback(){super.connectedCallback(),this.addEventListener("dialog-set-fullscreen",this._handleFullscreenChanged)}get scrollableElement(){return this.bodyContainer}updated(e){super.updated(e),e.has("open")&&(this._open=this.open)}render(){var e,t,a;return(0,n.qy)(f||(f=$` <wa-dialog .open="${0}" .lightDismiss="${0}" without-header aria-labelledby="${0}" aria-describedby="${0}" @keydown="${0}" @wa-hide="${0}" @wa-show="${0}" @wa-after-show="${0}" @wa-after-hide="${0}"> ${0} <div class="content-wrapper"> <div class="body ha-scrollbar" @scroll="${0}"> <slot></slot> </div> ${0} </div> <slot name="footer" slot="footer"></slot> </wa-dialog> `),this._open,!this.preventScrimClose,(0,s.J)(this.ariaLabelledBy||(void 0!==this.headerTitle?"ha-dialog-title":void 0)),(0,s.J)(this.ariaDescribedBy),this._handleKeyDown,this._handleHide,this._handleShow,this._handleAfterShow,this._handleAfterHide,this.withoutHeader?n.s6:(0,n.qy)(y||(y=$`<slot name="header"> <ha-dialog-header .subtitlePosition="${0}" .showBorder="${0}"> <slot name="headerNavigationIcon" slot="navigationIcon"> <ha-icon-button data-dialog="close" .label="${0}" .path="${0}"></ha-icon-button> </slot> ${0} ${0} <slot name="headerActionItems" slot="actionItems"></slot> </ha-dialog-header> </slot>`),this.headerSubtitlePosition,this._bodyScrolled,null!==(e=null===(t=this._i18n)||void 0===t||null===(a=t.localize)||void 0===a?void 0:a.call(t,"ui.common.close"))&&void 0!==e?e:"Close",x,void 0!==this.headerTitle?(0,n.qy)(b||(b=$`<span slot="title" class="title" id="ha-dialog-title"> ${0} </span>`),this.headerTitle):(0,n.qy)(w||(w=$`<slot name="headerTitle" slot="title"></slot>`)),void 0!==this.headerSubtitle?(0,n.qy)(_||(_=$`<span slot="subtitle">${0}</span>`),this.headerSubtitle):(0,n.qy)(C||(C=$`<slot name="headerSubtitle" slot="subtitle"></slot>`))),this._handleBodyScroll,this.renderScrollableFades())}disconnectedCallback(){this.removeEventListener("dialog-set-fullscreen",this._handleFullscreenChanged),this._setFullscreen(!1),super.disconnectedCallback(),this._open=!1}_handleFullscreenChanged(e){this._open?(0,h.J)(()=>{this._setFullscreen(e.detail)}):this._setFullscreen(e.detail)}_setFullscreen(e){this.toggleAttribute("fullscreen",e)}_handleBodyScroll(e){this._bodyScrolled=e.target.scrollTop>0}_handleKeyDown(e){"Escape"===e.key&&(this._escapePressed=!0,this.preventScrimClose&&e.preventDefault(),e.stopPropagation(),e.currentTarget.open=!1)}_handleHide(e){var t;const a=(null===(t=e.detail)||void 0===t?void 0:t.source)===e.target.dialog;this.preventScrimClose&&this._escapePressed&&a&&e.preventDefault(),this._escapePressed=!1}static get styles(){return[...super.styles,p.dp,(0,n.AH)(L||(L=$`wa-dialog{--full-width:var(
            --ha-dialog-width-full,
            min(95vw, var(--safe-width))
          );--width:min(var(--ha-dialog-width-md, 580px), var(--full-width));--spacing:var(--dialog-content-padding, var(--ha-space-6));--show-duration:var(--ha-dialog-show-duration, 200ms);--hide-duration:var(--ha-dialog-hide-duration, 200ms);--wa-color-surface-raised:var(
            --ha-dialog-surface-background,
            var(--card-background-color, var(--ha-color-surface-default))
          );--wa-panel-border-radius:var(
            --ha-dialog-border-radius,
            var(--ha-border-radius-3xl)
          );max-width:var(--ha-dialog-max-width,var(--safe-width))}@media (prefers-reduced-motion:reduce){wa-dialog{--show-duration:0ms;--hide-duration:0ms}}:host([width=small]) wa-dialog{--width:min(var(--ha-dialog-width-sm, 320px), var(--full-width))}:host([width=large]) wa-dialog{--width:min(var(--ha-dialog-width-lg, 1024px), var(--full-width))}:host([fullscreen]) wa-dialog,:host([width=full]) wa-dialog{--width:var(--full-width)}:host([fullscreen]) wa-dialog::part(dialog){min-height:var(--safe-height);max-height:var(--safe-height);margin-top:0;transform:none}:host([fullscreen]) .content-wrapper{overflow:hidden}:host([fullscreen]) .body{overflow:hidden;padding:0}wa-dialog::part(dialog){-webkit-backdrop-filter:var(--ha-dialog-surface-backdrop-filter,none);backdrop-filter:var(--ha-dialog-surface-backdrop-filter,none);box-shadow:var(--dialog-box-shadow,var(--wa-shadow-l));color:var(--primary-text-color);min-width:var(--width,var(--full-width));max-width:var(--width,var(--full-width));max-height:var(--ha-dialog-max-height,calc(var(--safe-height) - var(--ha-space-20)));min-height:var(--ha-dialog-min-height);margin-top:var(--dialog-surface-margin-top,auto);transform:translate(calc(var(--safe-area-offset-left,0px) - var(--safe-area-offset-right,0px)),calc(var(--safe-area-offset-top,0px) - var(--safe-area-offset-bottom,0px)));display:flex;flex-direction:column;overflow:hidden}wa-dialog::part(dialog)::backdrop{-webkit-backdrop-filter:var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none));backdrop-filter:var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none));background-color:var(--mdc-dialog-scrim-color,none)}@media all and (max-width:450px),all and (max-height:500px){:host([type=standard]){--ha-dialog-border-radius:0}:host([type=standard]) wa-dialog{--full-width:var(--ha-dialog-width-full, 100vw);--width:var(--full-width)}:host([type=standard]) wa-dialog::part(dialog){min-height:var(--ha-dialog-min-height,100vh);min-height:var(--ha-dialog-min-height,100dvh);max-height:var(--ha-dialog-max-height,100vh);max-height:var(--ha-dialog-max-height,100dvh);margin-top:0;margin-bottom:0;padding-top:var(--safe-area-inset-top);padding-bottom:var(--safe-area-inset-bottom);padding-left:var(--safe-area-inset-left);padding-right:var(--safe-area-inset-right);transform:none}}.header-title-container{display:flex;align-items:center}.header-title{margin:0;margin-bottom:0;color:var(--ha-dialog-header-title-color,var(--primary-text-color));font-size:var(
            --ha-dialog-header-title-font-size,
            var(--ha-font-size-2xl)
          );line-height:var(
            --ha-dialog-header-title-line-height,
            var(--ha-line-height-condensed)
          );font-weight:var(--ha-dialog-header-title-font-weight,var(--ha-font-weight-normal));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:var(--ha-space-3)}wa-dialog::part(body){padding:0;display:flex;flex-direction:column;max-width:100%;overflow:hidden}.content-wrapper{position:relative;flex:1;display:flex;flex-direction:column;min-height:0}.body{position:var(--dialog-content-position,relative);padding:var(--dialog-content-padding,0 var(--ha-space-6) var(--ha-space-6) var(--ha-space-6));overflow:auto;flex-grow:1}:host([flexcontent]) .body{max-width:100%;flex:1;display:flex;flex-direction:column}wa-dialog::part(footer){padding:0}::slotted([slot=footer]){display:flex;padding:var(--ha-space-3) var(--ha-space-4) var(--ha-space-4) var(--ha-space-4);gap:var(--ha-space-3);justify-content:flex-end;align-items:center;width:100%}`))]}constructor(...e){super(...e),this.open=!1,this.type="standard",this.width="medium",this.preventScrimClose=!1,this.headerSubtitlePosition="below",this.flexContent=!1,this.withoutHeader=!1,this._open=!1,this._bodyScrolled=!1,this._escapePressed=!1,this._handleShow=async e=>{e.eventPhase===Event.AT_TARGET&&(this._open=!0,(0,d.r)(this,"opened"),await this.updateComplete,requestAnimationFrame(()=>{var e,t;if(null!==(e=this._hassConfig)&&void 0!==e&&e.auth.external&&(0,m.V)(this._hassConfig.auth.external)){const e=this.querySelector("[autofocus]");return void(null!==e&&(e.id||(e.id="ha-dialog-autofocus"),this._hassConfig.auth.external.fireMessage({type:"focus_element",payload:{element_id:e.id}})))}null===(t=this.querySelector("[autofocus]"))||void 0===t||t.focus()}))},this._handleAfterShow=e=>{e.eventPhase===Event.AT_TARGET&&(0,d.r)(this,"after-show")},this._handleAfterHide=e=>{e.eventPhase===Event.AT_TARGET&&(this._open=!1,this._setFullscreen(!1),(0,d.r)(this,"closed"))}}}(0,i.Cg)([(0,l.MZ)({attribute:"aria-labelledby"})],M.prototype,"ariaLabelledBy",void 0),(0,i.Cg)([(0,l.MZ)({attribute:"aria-describedby"})],M.prototype,"ariaDescribedBy",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean,reflect:!0})],M.prototype,"open",void 0),(0,i.Cg)([(0,l.MZ)({reflect:!0})],M.prototype,"type",void 0),(0,i.Cg)([(0,l.MZ)({type:String,reflect:!0,attribute:"width"})],M.prototype,"width",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],M.prototype,"preventScrimClose",void 0),(0,i.Cg)([(0,l.MZ)({attribute:"header-title"})],M.prototype,"headerTitle",void 0),(0,i.Cg)([(0,l.MZ)({attribute:"header-subtitle"})],M.prototype,"headerSubtitle",void 0),(0,i.Cg)([(0,l.MZ)({type:String,attribute:"header-subtitle-position"})],M.prototype,"headerSubtitlePosition",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],M.prototype,"flexContent",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean,attribute:"without-header"})],M.prototype,"withoutHeader",void 0),(0,i.Cg)([(0,l.wk)()],M.prototype,"_open",void 0),(0,i.Cg)([(0,l.P)(".body")],M.prototype,"bodyContainer",void 0),(0,i.Cg)([(0,l.wk)(),(0,r.Fg)({context:c.D5,subscribe:!0})],M.prototype,"_i18n",void 0),(0,i.Cg)([(0,l.wk)(),(0,r.Fg)({context:c.WF,subscribe:!0})],M.prototype,"_hassConfig",void 0),(0,i.Cg)([(0,l.wk)()],M.prototype,"_bodyScrolled",void 0),(0,i.Cg)([(0,l.Ls)({passive:!0})],M.prototype,"_handleBodyScroll",null),M=(0,i.Cg)([(0,l.EM)("ha-dialog")],M),t()}catch(f){t(f)}})},54276:function(e,t,a){a(62953);var i=a(40445),o=a(76482),r=a(91382),n=a(96245),l=a(5124),s=a(67576);let d;class h extends r.n{attach(e){super.attach(e),this.attachableTouchController.attach(e)}disconnectedCallback(){super.disconnectedCallback(),this.hovered=!1,this.pressed=!1}detach(){super.detach(),this.attachableTouchController.detach()}_onTouchControlChange(e,t){null==e||e.removeEventListener("touchend",this._handleTouchEnd),null==t||t.addEventListener("touchend",this._handleTouchEnd)}constructor(...e){super(...e),this.attachableTouchController=new o.i(this,this._onTouchControlChange.bind(this)),this._handleTouchEnd=()=>{this.disabled||super.endPressAnimation()}}}h.styles=[n.R,(0,l.AH)(d||(d=(e=>e)`:host{--md-ripple-hover-opacity:var(--ha-ripple-hover-opacity, 0.08);--md-ripple-pressed-opacity:var(--ha-ripple-pressed-opacity, 0.12);--md-ripple-hover-color:var(
          --ha-ripple-hover-color,
          var(--ha-ripple-color, var(--secondary-text-color))
        );--md-ripple-pressed-color:var(
          --ha-ripple-pressed-color,
          var(--ha-ripple-color, var(--secondary-text-color))
        )}`))],h=(0,i.Cg)([(0,s.EM)("ha-ripple")],h)},606:function(e,t,a){a.a(e,async function(e,t){try{a(74423),a(18111),a(61701),a(62953);var i=a(40445),o=a(5124),r=a(67576),n=a(63672),l=a(22786),s=a(1087),d=a(29823),h=(a(70947),a(3449),a(88285)),c=(a(67094),e([d,h]));[d,h]=c.then?(await c)():c;let u,p,m,g,v,f,y,b,w,_=e=>e;class C extends o.WF{render(){return this.disabled?(0,o.qy)(u||(u=_`${0}${0}`),this._renderField(),this._renderHelper()):(0,o.qy)(p||(p=_` <ha-dropdown placement="bottom" @wa-select="${0}" @wa-show="${0}" @wa-hide="${0}"> ${0} ${0} </ha-dropdown> ${0} `),this._handleSelect,this._handleShow,this._handleHide,this._renderField(),this.options?this.options.map(e=>{var t;const a=["string","number"].includes(typeof e);return(0,o.qy)(m||(m=_` <ha-dropdown-item .value="${0}" .disabled="${0}" .selected="${0}"> ${0} <div class="content"> ${0} ${0} </div> </ha-dropdown-item> `),a?e:e.value,!a&&(null!==(t=e.disabled)&&void 0!==t&&t),this.value===(a?e:e.value),e.iconPath?(0,o.qy)(g||(g=_`<ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon>`),e.iconPath):o.s6,a?e:e.label||e.value,e.secondary?(0,o.qy)(v||(v=_`<div class="secondary">${0}</div>`),e.secondary):o.s6)}):(0,o.qy)(f||(f=_`<slot></slot>`)),this._renderHelper())}_renderField(){const e=this._getValueLabel(this.options,this.value);return(0,o.qy)(y||(y=_` <ha-picker-field slot="trigger" type="button" class="${0}" compact="compact" aria-label="${0}" @clear="${0}" .label="${0}" .value="${0}" .required="${0}" .disabled="${0}" .hideClearIcon="${0}"> </ha-picker-field> `),this._opened?"opened":"",(0,n.J)(this.label),this._clearValue,this.label,e,this.required,this.disabled,!this.clearable||this.required||this.disabled||!String(this.value))}_renderHelper(){return this.helper?(0,o.qy)(b||(b=_`<ha-input-helper-text .disabled="${0}">${0}</ha-input-helper-text>`),this.disabled,this.helper):o.s6}_handleSelect(e){e.stopPropagation();const t=e.detail.item.value;t!==this.value&&(0,s.r)(this,"selected",{value:t})}_clearValue(){!this.disabled&&this.value&&(0,s.r)(this,"selected",{value:void 0})}_handleShow(){this.style.setProperty("--select-menu-width",`${this._triggerField.offsetWidth}px`),this._opened=!0}_handleHide(){this._opened=!1}constructor(...e){super(...e),this.clearable=!1,this.required=!1,this.disabled=!1,this._opened=!1,this._getValueLabel=(0,l.A)((e,t)=>{const a=void 0!==t?String(t):void 0;if(!e||!a)return a;for(const i of e){const e=["string","number"].includes(typeof i);if(e&&i===a||!e&&String(i.value)===a)return e?i:i.label||i.value}return a})}}C.styles=(0,o.AH)(w||(w=_`:host{position:relative}ha-picker-field.opened{--mdc-text-field-idle-line-color:var(--primary-color)}ha-dropdown-item .content{display:flex;gap:var(--ha-space-1);flex-direction:column}ha-dropdown-item .secondary{font-size:var(--ha-font-size-s);color:var(--ha-color-text-secondary)}ha-dropdown::part(menu){min-width:var(--select-menu-width)}ha-input-helper-text{display:block;margin:var(--ha-space-2) 0 0}`)),(0,i.Cg)([(0,r.MZ)({type:Boolean})],C.prototype,"clearable",void 0),(0,i.Cg)([(0,r.MZ)({attribute:!1})],C.prototype,"options",void 0),(0,i.Cg)([(0,r.MZ)()],C.prototype,"label",void 0),(0,i.Cg)([(0,r.MZ)()],C.prototype,"helper",void 0),(0,i.Cg)([(0,r.MZ)()],C.prototype,"value",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean})],C.prototype,"required",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean})],C.prototype,"disabled",void 0),(0,i.Cg)([(0,r.wk)()],C.prototype,"_opened",void 0),(0,i.Cg)([(0,r.P)("ha-picker-field")],C.prototype,"_triggerField",void 0),C=(0,i.Cg)([(0,r.EM)("ha-select")],C),t()}catch(u){t(u)}})},50286:function(e,t,a){a.a(e,async function(e,t){try{a(62953);var i=a(40445),o=a(5124),r=a(67576),n=a(69543),l=a(1087),s=a(32656),d=e([s]);s=(d.then?(await d)():d)[0];let h,c=e=>e;class u extends o.WF{reportValidity(){var e,t;return null===(e=null===(t=this._input)||void 0===t?void 0:t.reportValidity())||void 0===e||e}render(){const e=(0,n.J)(this.locale);let t=NaN,a=NaN,i=NaN,r=0;if(this.value){var l;const o=(null===(l=this.value)||void 0===l?void 0:l.split(":"))||[];a=o[1]?Number(o[1]):0,i=o[2]?Number(o[2]):0,t=o[0]?Number(o[0]):0,r=t,r&&e&&r>12&&r<24&&(t=r-12),e&&0===r&&(t=12)}return(0,o.qy)(h||(h=c` <ha-base-time-input .label="${0}" .hours="${0}" .minutes="${0}" .seconds="${0}" .format="${0}" .amPm="${0}" .disabled="${0}" @value-changed="${0}" .enableSecond="${0}" .required="${0}" .clearable="${0}" .helper="${0}" .placeholderLabels="${0}" .autoValidate="${0}" day-label="dd" hour-label="hh" min-label="mm" sec-label="ss" ms-label="ms"></ha-base-time-input> `),this.label,t,a,i,e?12:24,e&&r>=12?"PM":"AM",this.disabled,this._timeChanged,this.enableSecond,this.required,this.clearable&&void 0!==this.value,this.helper,this.placeholderLabels,this.autoValidate)}_timeChanged(e){e.stopPropagation();const t=e.detail.value,a=(0,n.J)(this.locale);let i,o=0;if(!(void 0===t||isNaN(t.hours)&&isNaN(t.minutes)&&isNaN(t.seconds))){let e=t.hours||0;t&&a&&(o=e>=12&&e<24?e-12:0===e?12:0,"PM"===t.amPm&&e<12&&(e+=12),"AM"===t.amPm&&12===e&&(e=0)),i=`${e.toString().padStart(2,"0")}:${t.minutes?t.minutes.toString().padStart(2,"0"):"00"}:${t.seconds?t.seconds.toString().padStart(2,"0"):"00"}`}o&&this.updateComplete.then(()=>{const e=this._input;e&&(e.hours=o)}),i!==this.value&&(this.value=i,(0,l.r)(this,"change"),(0,l.r)(this,"value-changed",{value:i}))}constructor(...e){super(...e),this.disabled=!1,this.required=!1,this.autoValidate=!1,this.enableSecond=!1,this.placeholderLabels=!1}}(0,i.Cg)([(0,r.MZ)({attribute:!1})],u.prototype,"locale",void 0),(0,i.Cg)([(0,r.MZ)()],u.prototype,"value",void 0),(0,i.Cg)([(0,r.MZ)()],u.prototype,"label",void 0),(0,i.Cg)([(0,r.MZ)()],u.prototype,"helper",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean})],u.prototype,"disabled",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean})],u.prototype,"required",void 0),(0,i.Cg)([(0,r.MZ)({attribute:"auto-validate",type:Boolean})],u.prototype,"autoValidate",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean,attribute:"enable-second"})],u.prototype,"enableSecond",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],u.prototype,"clearable",void 0),(0,i.Cg)([(0,r.MZ)({attribute:"placeholder-labels",type:Boolean})],u.prototype,"placeholderLabels",void 0),(0,i.Cg)([(0,r.P)("ha-base-time-input")],u.prototype,"_input",void 0),u=(0,i.Cg)([(0,r.EM)("ha-time-input")],u),t()}catch(h){t(h)}})},34127:function(e,t,a){a.a(e,async function(e,t){try{a(62953);var i=a(40445),o=a(52630),r=a(5124),n=a(67576),l=e([o]);o=(l.then?(await l)():l)[0];let s,d=e=>e;class h extends o.A{static get styles(){return[o.A.styles,(0,r.AH)(s||(s=d`:host{--wa-tooltip-background-color:var(
            --ha-tooltip-background-color,
            var(--ha-color-surface-default)
          );--wa-tooltip-content-color:var(
            --ha-tooltip-text-color,
            var(--primary-text-color)
          );--wa-tooltip-font-family:var(
            --ha-tooltip-font-family,
            var(--ha-font-family-body)
          );--wa-tooltip-font-size:var(
            --ha-tooltip-font-size,
            var(--ha-font-size-m)
          );--wa-tooltip-font-weight:var(
            --ha-tooltip-font-weight,
            var(--ha-font-weight-medium)
          );--wa-tooltip-line-height:var(
            --ha-tooltip-line-height,
            var(--ha-line-height-condensed)
          );--wa-tooltip-padding:var(--ha-tooltip-padding, var(--ha-space-2));--wa-tooltip-border-radius:var(
            --ha-tooltip-border-radius,
            var(--ha-border-radius-md)
          );--wa-tooltip-arrow-size:var(--ha-tooltip-arrow-size, 0px);--wa-tooltip-border-width:0px;--wa-z-index-tooltip:1000}.tooltip::part(popup){animation-duration:var(--ha-tooltip-animation-duration, 0)}.body{box-shadow:var(--ha-tooltip-box-shadow,var(--ha-box-shadow-m))}`))]}constructor(...e){super(...e),this.showDelay=350,this.hideDelay=150}}(0,i.Cg)([(0,n.MZ)({attribute:"show-delay",type:Number})],h.prototype,"showDelay",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"hide-delay",type:Number})],h.prototype,"hideDelay",void 0),h=(0,i.Cg)([(0,n.EM)("ha-tooltip")],h),t()}catch(s){t(s)}})},82e3:function(e,t,a){a.d(t,{D5:function(){return i},Fy:function(){return c},Gk:function(){return m},Hg:function(){return o},TJ:function(){return n},UQ:function(){return h},Y_:function(){return g},ds:function(){return p},e0:function(){return r},ec:function(){return u},go:function(){return s},n2:function(){return d},sq:function(){return l}});a(74423),a(18111),a(61701),a(33110),a(3362);const i=14881==a.j?`${location.protocol}//${location.host}`:null,o=e=>e.map(e=>{if("string"!==e.type)return e;switch(e.name){case"username":return Object.assign(Object.assign({},e),{},{autocomplete:"username",autofocus:!0});case"password":return Object.assign(Object.assign({},e),{},{autocomplete:"current-password"});case"code":return Object.assign(Object.assign({},e),{},{autocomplete:"one-time-code",autofocus:!0});default:return e}}),r=(e,t)=>e.callWS({type:"auth/sign_path",path:t}),n=()=>fetch("/auth/providers",{credentials:"same-origin"}),l=(e,t,a)=>fetch("/auth/login_flow",{method:"POST",credentials:"same-origin",body:JSON.stringify({client_id:e,handler:a,redirect_uri:t})}),s=(e,t)=>fetch(`/auth/login_flow/${e}`,{method:"POST",credentials:"same-origin",body:JSON.stringify(t)}),d=e=>fetch(`/auth/login_flow/${e}`,{method:"DELETE",credentials:"same-origin"}),h=(e,t,a,i)=>{e.includes("?")?e.endsWith("&")||(e+="&"):e+="?",e+=`code=${encodeURIComponent(t)}`,a&&(e+=`&state=${encodeURIComponent(a)}`),i&&(e+="&storeToken=true"),document.location.assign(e)},c=async(e,t,a,i)=>e.callWS({type:"config/auth_provider/homeassistant/create",user_id:t,username:a,password:i}),u=(e,t,a)=>e.callWS({type:"config/auth_provider/homeassistant/change_password",current_password:t,new_password:a}),p=(e,t,a)=>e.callWS({type:"config/auth_provider/homeassistant/admin_change_password",user_id:t,password:a}),m=(e,t,a)=>e.callWS({type:"config/auth_provider/homeassistant/admin_change_username",user_id:t,username:a}),g=(e,t,a)=>e.callWS({type:"auth/delete_all_refresh_tokens",token_type:t,delete_current_token:a})},10897:function(e,t,a){a.d(t,{C4:function(){return d},CK:function(){return s},FX:function(){return g},UC:function(){return p},_Z:function(){return b},bT:function(){return w},j4:function(){return f},sd:function(){return r},su:function(){return l},vc:function(){return y},w8:function(){return u},wv:function(){return c},y3:function(){return m},zS:function(){return n}});a(3362);var i=a(3931),o=a(82e3);const r=[1,2,3,4,6,8],n="web_rtc",l=(e,t,a)=>`${e}&width=${t}&height=${a}`,s=e=>e.attributes.access_token?`/api/camera_proxy_stream/${e.entity_id}?token=${e.attributes.access_token}`:void 0,d=async(e,t,a,o)=>{const r=await(0,i.U)("_cameraTmbUrl",9e3,h,e,t);return l(r,a,o)},h=async(e,t)=>{const a=await(0,o.e0)(e,`/api/camera_proxy/${t}`);return e.hassUrl(a.path)},c=async(e,t,a)=>{const i={type:"camera/stream",entity_id:t};a&&(i.format=a);const o=await e.callWS(i);return o.url=e.hassUrl(o.url),o},u=(e,t,a,i)=>e.connection.subscribeMessage(i,{type:"camera/webrtc/offer",entity_id:t,offer:a}),p=(e,t,a,i)=>e.callWS({type:"camera/webrtc/candidate",entity_id:t,session_id:a,candidate:i}),m=(e,t)=>e.callWS({type:"camera/get_prefs",entity_id:t}),g=(e,t,a)=>e.callWS(Object.assign({type:"camera/update_prefs",entity_id:t},a)),v="media-source://camera/",f=e=>e.startsWith(v),y=e=>e.substring(22),b=async(e,t)=>e.callWS({type:"camera/capabilities",entity_id:t}),w=async(e,t)=>e.callWS({type:"camera/webrtc/get_client_config",entity_id:t})},38279:function(e,t,a){a.d(t,{$2:function(){return i},VV:function(){return r},on:function(){return s},sx:function(){return n}});a(72712);var i=function(e){return e[e.TARGET_TEMPERATURE=1]="TARGET_TEMPERATURE",e[e.TARGET_TEMPERATURE_RANGE=2]="TARGET_TEMPERATURE_RANGE",e[e.TARGET_HUMIDITY=4]="TARGET_HUMIDITY",e[e.FAN_MODE=8]="FAN_MODE",e[e.PRESET_MODE=16]="PRESET_MODE",e[e.SWING_MODE=32]="SWING_MODE",e[e.AUX_HEAT=64]="AUX_HEAT",e[e.TURN_OFF=128]="TURN_OFF",e[e.TURN_ON=256]="TURN_ON",e[e.SWING_HORIZONTAL_MODE=512]="SWING_HORIZONTAL_MODE",e}({});const o=["auto","heat_cool","heat","cool","dry","fan_only","off"].reduce((e,t,a)=>(e[t]=a,e),{}),r=(e,t)=>o[e]-o[t],n={cooling:"cool",defrosting:"heat",drying:"dry",fan:"fan_only",heating:"heat",idle:"off",off:"off",preheating:"heat"},l={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",dry:"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",fan_only:"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",auto:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22C12.4 22 12.7 22 13.1 21.9L15.4 15.3L14.8 14.7C15.5 14 16 13 16 11.9C16 11.2 15.8 10.5 15.4 9.9L17.6 7.7C18.5 9 19 10.4 19 12H20C20.3 12 20.6 12.1 20.8 12.2C20.8 12.2 20.9 12.2 20.9 12.3C21.3 12.5 21.7 12.9 21.9 13.4C22 12.9 22 12.5 22 12C22 6.5 17.5 2 12 2M14 8.6C13.4 8.2 12.7 8 12 8C9.8 8 8 9.8 8 12C8 13.1 8.4 14.1 9.2 14.8L7.1 16.9C5.8 15.7 5 13.9 5 12C5 8.1 8.1 5 12 5C13.6 5 15 5.5 16.2 6.4L14 8.6M20 14H18L14.8 23H16.7L17.4 21H20.6L21.3 23H23.2L20 14M17.8 19.7L19 16L20.2 19.7H17.8Z",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",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",heat_cool:"M12.92 1.58L11.18 2.58L12.39 4.67L11.8 6.85L9 7.6L7.38 6L7.42 3.59L5.43 3.59L5.43 5.42L3.59 5.42L3.6 7.42L6 7.42L7.65 9.03L6.9 11.82L4.68 12.4L2.59 11.2L1.59 12.93L3.17 13.84L2.26 15.42L4 16.42L5.19 14.33L7.42 13.75L7.92 14.26L9.32 12.86L8.78 12.32L9.53 9.54L12.32 8.78L12.85 9.32L14.26 7.91L13.73 7.37L14.32 5.19L16.41 4L15.41 2.25L13.83 3.16L12.92 1.58M20.72 4L4 20.72L5.27 22L10.16 17.11C10.63 17.43 11.15 17.68 11.71 17.83C14.38 18.55 17.12 16.96 17.83 14.29C18.22 12.86 17.93 11.36 17.11 10.16L22 5.27L20.72 4M18.74 9C19.18 9.63 19.53 10.38 19.75 11.19C19.97 12 20.03 12.81 19.96 13.61L22.65 10.41L18.74 9M19.32 15.95C19 16.67 18.5 17.35 17.93 17.94C17.34 18.53 16.66 19 15.96 19.34L20.05 20.06L19.32 15.95M9 18.71L10.41 22.66L13.59 19.95C12.81 20 12 19.97 11.19 19.76C10.36 19.54 9.62 19.17 9 18.71Z"},s=e=>l[e]||"M16.95,16.95L14.83,14.83C15.55,14.1 16,13.1 16,12C16,11.26 15.79,10.57 15.43,10L17.6,7.81C18.5,9 19,10.43 19,12C19,13.93 18.22,15.68 16.95,16.95M12,5C13.57,5 15,5.5 16.19,6.4L14,8.56C13.43,8.21 12.74,8 12,8A4,4 0 0,0 8,12C8,13.1 8.45,14.1 9.17,14.83L7.05,16.95C5.78,15.68 5,13.93 5,12A7,7 0 0,1 12,5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z"},68287:function(e,t,a){a.d(t,{z:function(){return o}});a(18111),a(61701),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698),a(62953);var i=a(71727);const o=e=>{const t=e.attributes.entity_id||[],a=[...new Set(t.map(e=>(0,i.m)(e)))];return 1===a.length?a[0]:void 0}},59992:function(e,t,a){a.a(e,async function(e,i){try{a.d(t,{V:function(){return m}});a(62953);var o=a(40445),r=a(88696),n=a(5124),l=a(6412),s=a(67576),d=e([r]);r=(d.then?(await d)():d)[0];let h,c,u=e=>e;const p=e=>void 0===e?[]:Array.isArray(e)?e:[e],m=e=>{class t extends e{get scrollableElement(){return t.DEFAULT_SCROLLABLE_ELEMENT}firstUpdated(e){var t;null===(t=super.firstUpdated)||void 0===t||t.call(this,e),this.scrollableElement&&this._updateScrollableState(this.scrollableElement),this._attachScrollableElement()}updated(e){var t;null===(t=super.updated)||void 0===t||t.call(this,e),this._attachScrollableElement()}disconnectedCallback(){this._detachScrollableElement(),this._contentScrolled=!1,this._contentScrollable=!1,super.disconnectedCallback()}renderScrollableFades(e=!1){return(0,n.qy)(h||(h=u` <div class="${0}"></div> <div class="${0}"></div> `),(0,l.H)({"fade-top":!0,rounded:e,visible:this._contentScrolled}),(0,l.H)({"fade-bottom":!0,rounded:e,visible:this._contentScrollable}))}static get styles(){var e;const t=Object.getPrototypeOf(this);return[...p(null!==(e=null==t?void 0:t.styles)&&void 0!==e?e:[]),(0,n.AH)(c||(c=u`.fade-bottom,.fade-top{position:absolute;left:0;right:0;height:var(--ha-space-2);pointer-events:none;transition:opacity 180ms ease-in-out;border-radius:var(--ha-border-radius-square);opacity:0;background:linear-gradient(to bottom,var(--ha-color-shadow-scrollable-fade),transparent)}.fade-top{top:0}.fade-bottom{bottom:0;transform:rotate(180deg)}.fade-bottom.visible,.fade-top.visible{opacity:1}.fade-bottom.rounded,.fade-top.rounded{border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}.fade-top.rounded{border-top-left-radius:var(--ha-border-radius-square);border-top-right-radius:var(--ha-border-radius-square)}.fade-bottom.rounded{border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}`))]}_attachScrollableElement(){const e=this.scrollableElement;e!==this._scrollTarget&&(this._detachScrollableElement(),e&&(this._scrollTarget=e,e.addEventListener("scroll",this._onScroll,{passive:!0}),this._resize.observe(e),this._updateScrollableState(e)))}_detachScrollableElement(){var e,t;this._scrollTarget&&(this._scrollTarget.removeEventListener("scroll",this._onScroll),null===(e=(t=this._resize).unobserve)||void 0===e||e.call(t,this._scrollTarget),this._scrollTarget=void 0)}_updateScrollableState(e){const t=parseFloat(getComputedStyle(e).getPropertyValue("--safe-area-inset-bottom"))||0,{scrollHeight:a=0,clientHeight:i=0,scrollTop:o=0}=e;this._contentScrollable=a-i>o+t+this.scrollFadeSafeAreaPadding}constructor(...e){super(...e),this._contentScrolled=!1,this._contentScrollable=!1,this._onScroll=e=>{var t;const a=e.currentTarget;this._contentScrolled=(null!==(t=a.scrollTop)&&void 0!==t?t:0)>this.scrollFadeThreshold,this._updateScrollableState(a)},this._resize=new r.P(this,{target:null,callback:e=>{var t;const a=null===(t=e[0])||void 0===t?void 0:t.target;a&&this._updateScrollableState(a)}}),this.scrollFadeSafeAreaPadding=4,this.scrollFadeThreshold=4}}return t.DEFAULT_SCROLLABLE_ELEMENT=null,(0,o.Cg)([(0,s.wk)()],t.prototype,"_contentScrolled",void 0),(0,o.Cg)([(0,s.wk)()],t.prototype,"_contentScrollable",void 0),t};i()}catch(h){i(h)}})},55666:function(e,t,a){a.a(e,async function(e,i){try{a.d(t,{AZ:function(){return w},OS:function(){return M},S_:function(){return Z},VJ:function(){return $},Wt:function(){return k},cH:function(){return x},et:function(){return b},j9:function(){return T},jz:function(){return S},mH:function(){return _},zw:function(){return C}});a(44114),a(18111),a(61701),a(62953);var o=a(56434),r=a(81977),n=a(66465),l=a(92913),s=a(71152),d=a(70741),h=a(76529),c=a(31810),u=a(41821),p=a(72487),m=a(52943),g=a(10087),v=a(3031),f=e([u,g,v,p]);[u,g,v,p]=f.then?(await f)():f;const b={none:1,yearly:5,monthly:12,weekly:13,daily:30};function w(e){const t=new Date,a=b[e];switch(e){case"yearly":return(0,o.e)(t,a);case"monthly":return(0,r.P)(t,a);case"weekly":return(0,n.J)(t,a);default:return(0,l.f)(t,a)}}const _=e=>{switch(e){case u.jN.YEARLY:return"yearly";case u.jN.MONTHLY:return"monthly";case u.jN.WEEKLY:return"weekly";case u.jN.DAILY:return"daily";default:return}},C=e=>{switch(e){case"yearly":return u.jN.YEARLY;case"monthly":return u.jN.MONTHLY;case"weekly":return u.jN.WEEKLY;case"daily":return u.jN.DAILY;default:return}},L=[u.p3.SU,u.p3.MO,u.p3.TU,u.p3.WE,u.p3.TH,u.p3.FR,u.p3.SA];function $(e){let t=(0,s.P)(e)-1;return t<0&&(t+=7),t}function x(e){if(void 0===e||0===e)return L;let t=e;const a=[...L];for(;t>0;)a.push(a.shift()),t-=1;return a}function M(e){return Array.from(e).map(e=>{switch(e){case"MO":default:return u.p3.MO;case"TU":return u.p3.TU;case"WE":return u.p3.WE;case"TH":return u.p3.TH;case"FR":return u.p3.FR;case"SA":return u.p3.SA;case"SU":return u.p3.SU}})}function A(e){const t=$(e),a=(0,d.p)(e),i=Math.floor((a-1)/7)+1,o=!(0,h.t)(e,(0,l.f)(e,7)),r=[];return(!o||a<=28)&&r.push(new u.Bw(t,i)),o&&r.push(new u.Bw(t,-1)),r}function S(e,t,a){const i=a=>Z(e,`FREQ=MONTHLY;INTERVAL=${t};${a}`),o=[{value:`BYMONTHDAY=${(0,d.p)(a)}`,label:i(`BYMONTHDAY=${(0,d.p)(a)}`)},...A(a).map(e=>({value:`BYDAY=${e.toString()}`,byday:e,label:i(`BYDAY=${e.toString()}`)}))];return(0,c.c)(a)&&o.push({value:"BYMONTHDAY=-1",bymonthday:-1,label:i("BYMONTHDAY=-1")}),o}function T(e){if(e.freq===u.jN.MONTHLY)return e.byweekday&&Array.isArray(e.byweekday)&&1===e.byweekday.length&&e.byweekday[0]instanceof u.Bw?e.byweekday[0]:void 0}function k(e){if(e.freq===u.jN.MONTHLY&&e.bymonthday)return Array.isArray(e.bymonthday)?e.bymonthday[0]:e.bymonthday}function Z(e,t){const a=u.p3.fromString(`RRULE:${t}`);if(a.isFullyConvertibleToText())return(0,m.Z)(a.toText(t=>"string"==typeof t?e.localize(`ui.components.calendar.event.rrule.${t}`):"",{dayNames:(0,g.h)(e.locale,e.config),monthNames:(0,v.d)(e.locale,e.config),tokens:{}},(t,a,i)=>{if(!t||!a||!i)return"";const o=new Date;return o.setFullYear(t),o.setMonth((0,v.d)(e.locale,e.config).indexOf(a)),o.setDate(i),(0,p.Yq)(o,e.locale,e.config)}))}i()}catch(y){i(y)}})},50954:function(e,t,a){a.d(t,{Q:function(){return r}});a(3362),a(62953);var i=a(1087);const o=()=>a.e(31785).then(a.bind(a,53456)),r=(e,t)=>new Promise(a=>{const r=t.confirm,n=t.cancel;(0,i.r)(e,"show-dialog",{dialogTag:"confirm-event-dialog-box",dialogImport:o,dialogParams:Object.assign(Object.assign({},t),{},{confirm:e=>{a(e),r&&r(e)},cancel:()=>{a(void 0),n&&n()}}),addHistory:!1})})},86030:function(e,t,a){a.d(t,{B:function(){return i},a:function(){return o}});a(72712),a(94490),a(18111),a(18237),a(42762),a(62953);function i(e){return Array.isArray(e)?e.reverse().reduce((e,t)=>`var(${t}${e?`, ${e}`:""})`,void 0):`var(${e})`}function o(e,t){if(Array.isArray(e))for(const a of e){const e=o(a,t);if(e)return e}else if(e.endsWith("-color"))return t.getPropertyValue(e).trim()||void 0}},22348:function(e,t,a){a.d(t,{V:function(){return o}});var i=a(37177);const o=e=>!!e&&i.n},37177:function(e,t,a){a.d(t,{n:function(){return i}});a(27495);const i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)},88438:function(e,t,a){a.d(t,{C:function(){return i}});const i="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}}]);