UNPKG

iobroker.lovelace

Version:

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

25 lines 29.9 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[40033],{90433:function(t,e,o){o.d(e,{Vy:function(){return r},fI:function(){return s},ux:function(){return l}});var a=o(22786),i=o(79468);const n=54;function r(t,e){const o=t%n+1;return e.getPropertyValue(`--color-${o}`)}function s(t,e){const o=e.getPropertyValue(`--graph-color-${t+1}`)||r(t,e);return(0,i.RQ)(o)}const l=(0,a.A)(t=>Array.from({length:n},(e,o)=>s(o,t)),(t,e)=>t[0].getPropertyValue("--graph-color-1")===e[0].getPropertyValue("--graph-color-1")&&t[0].getPropertyValue("--color-1")===e[0].getPropertyValue("--color-1"))},72487:function(t,e,o){o.a(t,async function(t,a){try{o.d(e,{CA:function(){return M},Mi:function(){return S},Pm:function(){return C},Wq:function(){return y},Yq:function(){return c},bl:function(){return D},c2:function(){return _},fr:function(){return b},gu:function(){return $},kz:function(){return u},m9:function(){return Z},sl:function(){return g},ur:function(){return j},zB:function(){return p}});o(18111),o(20116);var i=o(74487),n=o(22786),r=o(46927),s=o(8480),l=t([i,s]);[i,s]=l.then?(await l)():l;(0,n.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"long",month:"long",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)}));const c=(t,e,o)=>h(e,o.time_zone).format(t),h=(0,n.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),u=(t,e,o)=>d(e,o.time_zone).format(t),d=(0,n.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"short",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),p=(t,e,o)=>{var a,i,n,s;const l=f(e,o.time_zone);if(e.date_format===r.ow.language||e.date_format===r.ow.system)return l.format(t);const c=l.formatToParts(t),h=null===(a=c.find(t=>"literal"===t.type))||void 0===a?void 0:a.value,u=null===(i=c.find(t=>"day"===t.type))||void 0===i?void 0:i.value,d=null===(n=c.find(t=>"month"===t.type))||void 0===n?void 0:n.value,p=null===(s=c.find(t=>"year"===t.type))||void 0===s?void 0:s.value,g=c[c.length-1];let m="literal"===(null==g?void 0:g.type)?null==g?void 0:g.value:"";"bg"===e.language&&e.date_format===r.ow.YMD&&(m="");return{[r.ow.DMY]:`${u}${h}${d}${h}${p}${m}`,[r.ow.MDY]:`${d}${h}${u}${h}${p}${m}`,[r.ow.YMD]:`${p}${h}${d}${h}${u}${m}`}[e.date_format]},f=(0,n.A)((t,e)=>{const o=t.date_format===r.ow.system?void 0:t.language;return t.date_format===r.ow.language||(t.date_format,r.ow.system),new Intl.DateTimeFormat(o,{year:"numeric",month:"numeric",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})}),g=(t,e,o)=>m(e,o.time_zone).format(t),m=(0,n.A)((t,e)=>new Intl.DateTimeFormat(t.language,{day:"numeric",month:"short",timeZone:(0,s.wj)(t.time_zone,e)})),b=(t,e,o)=>v(e,o.time_zone).format(t),v=(0,n.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"long",year:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),y=(t,e,o)=>w(e,o.time_zone).format(t),w=(0,n.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"long",timeZone:(0,s.wj)(t.time_zone,e)})),_=(t,e,o)=>x(e,o.time_zone).format(t),x=(0,n.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"short",timeZone:(0,s.wj)(t.time_zone,e)})),C=(t,e,o)=>z(e,o.time_zone).format(t),z=(0,n.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),M=(t,e,o)=>k(e,o.time_zone).format(t),k=(0,n.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"long",timeZone:(0,s.wj)(t.time_zone,e)})),$=(t,e,o)=>A(e,o.time_zone).format(t),A=(0,n.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"short",timeZone:(0,s.wj)(t.time_zone,e)})),S=(t,e,o)=>P(e,o.time_zone).format(t),P=(0,n.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"short",month:"short",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),j=(t,e,o)=>H(e,o.time_zone).format(t),H=(0,n.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"short",month:"short",day:"numeric",year:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),D=(t,e,o)=>{const a=(0,s.wj)(e.time_zone,o.time_zone);return new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"2-digit",day:"2-digit",timeZone:a}).format(t)},Z=(t,e,o,a)=>`${D(t,o,a)}/${D(e,o,a)}`;a()}catch(c){a(c)}})},30162:function(t,e,o){o.a(t,async function(t,a){try{o.d(e,{LW:function(){return g},Xs:function(){return p},fU:function(){return c},ie:function(){return u}});var i=o(74487),n=o(22786),r=o(8480),s=o(69543),l=t([i,r]);[i,r]=l.then?(await l)():l;const c=(t,e,o)=>h(e,o.time_zone).format(t),h=(0,n.A)((t,e)=>new Intl.DateTimeFormat(t.language,{hour:"numeric",minute:"2-digit",hourCycle:(0,s.J)(t)?"h12":"h23",timeZone:(0,r.wj)(t.time_zone,e)})),u=(t,e,o)=>d(e,o.time_zone).format(t),d=(0,n.A)((t,e)=>new Intl.DateTimeFormat(t.language,{hour:(0,s.J)(t)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hourCycle:(0,s.J)(t)?"h12":"h23",timeZone:(0,r.wj)(t.time_zone,e)})),p=(t,e,o)=>f(e,o.time_zone).format(t),f=(0,n.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"long",hour:(0,s.J)(t)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,s.J)(t)?"h12":"h23",timeZone:(0,r.wj)(t.time_zone,e)})),g=(t,e,o)=>m(e,o.time_zone).format(t),m=(0,n.A)((t,e)=>new Intl.DateTimeFormat("en-GB",{hour:"numeric",minute:"2-digit",hour12:!1,timeZone:(0,r.wj)(t.time_zone,e)}));a()}catch(c){a(c)}})},8480:function(t,e,o){o.a(t,async function(t,a){try{o.d(e,{fL:function(){return p},n2:function(){return f},wj:function(){return g}});var i,n,r,s=o(74487),l=o(29079),c=o(46927),h=t([s]);s=(h.then?(await h)():h)[0];const u=null===(i=Intl.DateTimeFormat)||void 0===i||null===(n=(r=i.call(Intl)).resolvedOptions)||void 0===n?void 0:n.call(r).timeZone,d=u&&("UTC"===u||"Etc/UTC"===u||u in l)?u:void 0,p=14881==o.j?void 0!==d:null,f=null!=d?d:"UTC",g=(t,e)=>t===c.Wj.local&&d?f:e;a()}catch(u){a(u)}})},69543:function(t,e,o){o.d(e,{J:function(){return n}});o(74423);var a=o(22786),i=o(46927);const n=(0,a.A)(t=>{if(t.time_format===i.Hg.language||t.time_format===i.Hg.system){const e=t.time_format===i.Hg.language?t.language:void 0;return new Date("January 1, 2023 22:00:00").toLocaleString(e).includes("10")}return t.time_format===i.Hg.am_pm})},32172:function(t,e,o){o.d(e,{p:function(){return a}});o(16280),o(18111),o(7588),o(45367),o(92731),o(17642),o(58004),o(33853),o(45876),o(32475),o(15024),o(31698),o(62953);function a(t){return(e,o)=>{if("object"==typeof o)throw new Error("This decorator does not support this compilation type.");const a=String(o),i=e;if(i._transformers){if(!i.hasOwnProperty("_transformers")){const t=i._transformers;i._transformers=new Map,t.forEach((t,e)=>i._transformers.set(e,t))}}else{i._transformers=new Map,i._watching=new Map;const t=i.willUpdate;i.willUpdate=function(e){t.call(this,e);const o=new Set;e.forEach((t,e)=>{const a=this._watching.get(e);void 0!==a&&a.forEach(t=>o.add(t))}),o.forEach(t=>{this[t]=this[`__original_${String(t)}`]})}}i._transformers.set(o,t.transformer),t.watch&&t.watch.forEach(t=>{let e=i._watching.get(t);e||(e=new Set,i._watching.set(t,e)),e.add(o)});const n=Object.getOwnPropertyDescriptor(e,o);let r;if(void 0===n)r={get(){return this[`__transform_${a}`]},set(t){const e=this[`__transform_${a}`],o=this._transformers.get(a);this[`__transform_${a}`]=o?o.call(this,t):t,this[`__original_${a}`]=t,this.requestUpdate(a,e)},configurable:!0,enumerable:!0};else{const t=n.set;r=Object.assign(Object.assign({},n),{},{set(e){const o=this[`__transform_${a}`],i=this._transformers.get(a);this[`__transform_${a}`]=i?i.call(this,e):e,this[`__original_${a}`]=e,this.requestUpdate(a,o),null==t||t.call(this,e)}})}Object.defineProperty(e,o,r)}}},76774:function(t,e,o){o.d(e,{q:function(){return a}});const a=(t,e)=>{const o=t.area_id;return o?e[o]:void 0}},19459:function(t,e,o){o.d(e,{b:function(){return a}});o(45367),o(92731),o(84864),o(57465),o(27495),o(69479),o(17642),o(58004),o(33853),o(45876),o(32475),o(15024),o(31698),o(62953);const a=(t,e,o)=>{if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;let i,n;if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(i=n;0!==i--;)if(!a(t[i],e[i],o))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!a(i[1],e.get(i[0]),o))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(n=t.length,n!==e.length)return!1;for(i=n;0!==i--;)if(t[i]!==e[i])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();const r=Object.keys(t);if(n=r.length,n!==Object.keys(e).length)return!1;for(i=n;0!==i--;)if(!Object.prototype.hasOwnProperty.call(e,r[i]))return!1;for(i=n;0!==i--;){const n=r[i];if(!a(t[n],e[n],o))return!1}if(null!=o&&o.compareSymbols){const i=Object.getOwnPropertySymbols(t),n=Object.getOwnPropertySymbols(e);if(i.length!==n.length)return!1;for(const r of i){if(!Object.prototype.hasOwnProperty.call(e,r))return!1;if(!a(t[r],e[r],o))return!1}}return!0}return t!=t&&e!=e}},29961:function(t,e,o){o.a(t,async function(t,a){try{o.d(e,{d:function(){return l},n:function(){return c}});var i=o(72487),n=o(30162),r=t([i,n]);function l(t,e,o){return"month"===t?{formatter:t=>{const a=new Date(t);return 0===a.getMonth()?`{bold|${(0,i.fr)(a,e,o)}}`:(0,i.Wq)(a,e,o)}}:"year"===t?{formatter:t=>(0,i.Pm)(new Date(t),e,o)}:void 0}function c(t,e,o,a){const r=a/60/24,s=new Date(t);if(r>88)return 0===s.getMonth()?`{bold|${(0,i.fr)(s,e,o)}}`:(0,i.Wq)(s,e,o);if(r>35)return 1===s.getDate()?`{bold|${(0,i.sl)(s,e,o)}}`:(0,i.sl)(s,e,o);if(r>7){const t=(0,i.sl)(s,e,o);return 1===s.getDate()?`{bold|${t}}`:t}return r>2?(0,i.gu)(s,e,o):a&&a<5?(0,n.ie)(s,e,o):0===s.getHours()&&0===s.getMinutes()&&0===s.getSeconds()?`{bold|${(0,i.sl)(s,e,o)}}`:(0,n.fU)(s,e,o)}[i,n]=r.then?(await r)():r,a()}catch(s){a(s)}})},34218:function(t,e,o){o.d(e,{P:function(){return a}});o(44114),o(72712),o(18111),o(18237),o(45367),o(92731),o(62953);function a(t,e,o,a,n=!1){if(!t)return[];if(t.length<=e)return t;const r=null!=o?o:i(t[0])[0],s=null!=a?a:i(t[t.length-1])[0],l=Math.ceil((s-r)/Math.floor(e)),c=new Map;for(const u of t){const t=i(u);if(!Array.isArray(t))continue;const e=Number(t[0]),o=Number(t[1]);if(isNaN(e)||isNaN(o))continue;const a=Math.floor((e-r)/l),n=c.get(a);n?n.push({point:u,x:e,y:o}):c.set(a,[{point:u,x:e,y:o}])}const h=[];if(n)for(const[u,d]of c){const t=d.reduce((t,e)=>t+e.y,0)/d.length,e=d.reduce((t,e)=>t+e.x,0)/d.length,o=i(d[0].point),a=Array.isArray(o)?[e,t]:{value:[e,t]};h.push(a)}else for(const[i,u]of c){let t=u[0],e=u[0];for(const o of u)o.y<t.y&&(t=o),o.y>e.y&&(e=o);t.x>e.x&&h.push(e.point),h.push(t.point),t.x<e.x&&h.push(e.point)}return h}function i(t){return t&&"object"==typeof t&&"value"in t?t.value:t}},7358:function(t,e,o){o.a(t,async function(t,e){try{o(74423),o(44114),o(18111),o(22489),o(20116),o(7588),o(61701),o(3362),o(17642),o(58004),o(33853),o(45876),o(32475),o(15024),o(31698),o(62953);var a=o(40445),i=o(5124),n=o(67576),r=o(22786),s=o(71769),l=o(44439),c=o(54706),h=o(19459),u=t([l]);l=(u.then?(await u)():u)[0];let d,p,f=t=>t;const g="M9.6,14L12,7.7L14.4,14M11,5L5.5,19H7.7L8.8,16H15L16.1,19H18.3L13,5H11Z",m="M5,10A2,2 0 0,0 3,12C3,13.11 3.9,14 5,14C6.11,14 7,13.11 7,12A2,2 0 0,0 5,10M5,16A4,4 0 0,1 1,12A4,4 0 0,1 5,8A4,4 0 0,1 9,12A4,4 0 0,1 5,16M10.5,11H14V8L18,12L14,16V13H10.5V11M5,6C4.55,6 4.11,6.05 3.69,6.14C5.63,3.05 9.08,1 13,1C19.08,1 24,5.92 24,12C24,18.08 19.08,23 13,23C9.08,23 5.63,20.95 3.69,17.86C4.11,17.95 4.55,18 5,18C5.8,18 6.56,17.84 7.25,17.56C8.71,19.07 10.74,20 13,20A8,8 0 0,0 21,12A8,8 0 0,0 13,4C10.74,4 8.71,4.93 7.25,6.44C6.56,6.16 5.8,6 5,6Z",b=512;let v;class y extends((0,c.E)(i.WF)){hassSubscribe(){return[(0,s.m)("(prefers-reduced-motion)",t=>{this._reducedMotion!==t&&(this._reducedMotion=t)})]}willUpdate(t){var e;super.willUpdate(t),void 0===this._physicsEnabled&&(null===(e=this.data)||void 0===e||null===(e=e.nodes)||void 0===e?void 0:e.length)>1&&(this._physicsEnabled=this.data.nodes.length<=b)}render(){var t,e,o;if(!v||null===(t=this.data.nodes)||void 0===t||!t.length)return i.s6;const a=window.matchMedia("all and (max-width: 450px), all and (max-height: 500px)").matches,n=this._highlightedNodes&&this._highlightedNodes.size>0;return(0,i.qy)(d||(d=f`<ha-chart-base .hass="${0}" .data="${0}" .options="${0}" height="100%" .extraComponents="${0}"> <slot name="search" slot="search"></slot> <slot name="button" slot="button"></slot> <ha-icon-button slot="button" class="${0}" .path="${0}" @click="${0}" label="${0}"></ha-icon-button> <ha-icon-button slot="button" class="${0}" .path="${0}" @click="${0}" label="${0}"></ha-icon-button> </ha-chart-base>`),this.hass,this._getSeries(this.data,null!==(e=this._physicsEnabled)&&void 0!==e&&e,this._reducedMotion,this._showLabels,a,n),this._createOptions(null===(o=this.data)||void 0===o?void 0:o.categories),[v],this._physicsEnabled?"active":"inactive",m,this._togglePhysics,this.hass.localize("ui.panel.config.common.graph.toggle_physics"),this._showLabels?"active":"inactive",g,this._toggleLabels,this.hass.localize("ui.panel.config.common.graph.toggle_labels"))}updated(t){if(super.updated(t),t.has("searchFilter")){const t=this.searchFilter;if(t){const e=t.toLowerCase(),o=new Set;for(const t of this.data.nodes)this._nodeMatchesFilter(t,e)&&o.add(t.id);this._highlightedNodes=o}else this._highlightedNodes=void 0;this._applyHighlighting(),this._updateMouseoverHandler()}}_nodeMatchesFilter(t,e){var o,a,i;if(null!==(o=t.name)&&void 0!==o&&o.toLowerCase().includes(e))return!0;if(null!==(a=t.context)&&void 0!==a&&a.toLowerCase().includes(e))return!0;if(null!==(i=t.id)&&void 0!==i&&i.toLowerCase().includes(e))return!0;if(this.searchableAttributes){const o=this.searchableAttributes(t.id);for(const t of o)if(null!=t&&t.toLowerCase().includes(e))return!0}return!1}_getPositionedNodes(t,e,o){const a=this.clientWidth,i=this.clientHeight,n=t.map(t=>Object.assign({},t));return n.forEach(t=>{o[t.id]&&(t.x=o[t.id].x,t.y=o[t.id].y),0===t.polarDistance&&(null==t.x&&null==t.y&&(t.x=a/2,t.y=i/2),this._positionNodeNeighbors(t,n,e,o))}),n.forEach(t=>{if(t.polarDistance&&null==t.x&&null==t.y){const e=2*Math.random()*Math.PI;t.x=Math.cos(e)*a/2*t.polarDistance+a/2,t.y=Math.sin(e)*i/2*t.polarDistance+i/2,this._nodePositions[t.id]={x:t.x,y:t.y}}}),n}_positionNodeNeighbors(t,e,o,a,i,n=0,r=2*Math.PI){const s=o.map(o=>o.source!==t.id||o.target===i||o.ignoreForceLayout?o.target!==t.id||o.source===i||o.ignoreForceLayout?null:e.find(t=>t.id===o.source):e.find(t=>t.id===o.target)).filter(Boolean);if(!s.length)return;const l=Math.abs(r-n)/s.length,c=[];s.forEach((e,o)=>{if(null==e.x&&null==e.y){const i=n+l*o+l/2;c.push({neighbor:e,angle:i}),a[e.id]?(e.x=a[e.id].x,e.y=a[e.id].y):(e.x=t.x+Math.cos(i)*this.clientWidth/4,e.y=t.y+Math.sin(i)*this.clientHeight/4)}}),c.forEach(({neighbor:i,angle:n})=>{this._positionNodeNeighbors(i,e,o,a,t.id,n-Math.PI/2,n+Math.PI/2)})}_applyHighlighting(){var t;const e=null===(t=this._baseChart)||void 0===t?void 0:t.chart;if(!e)return;e.dispatchAction({type:"downplay"});const o=this._highlightedNodes;if(!o||0===o.size)return;const a=[];this.data.nodes.forEach((t,e)=>{o.has(t.id)&&a.push(e)}),a.length>0&&e.dispatchAction({type:"highlight",dataIndex:a})}_updateMouseoverHandler(){var t;const e=null===(t=this._baseChart)||void 0===t?void 0:t.chart;if(e)if(this._highlightedNodes&&this._highlightedNodes.size>0){if(this._emphasisGuardHandler)return;this._emphasisGuardHandler=()=>{this._applyHighlighting()},e.on("mouseover",this._emphasisGuardHandler),e.on("mouseout",this._emphasisGuardHandler)}else{if(!this._emphasisGuardHandler)return;e.off("mouseover",this._emphasisGuardHandler),e.off("mouseout",this._emphasisGuardHandler),this._emphasisGuardHandler=void 0}}disconnectedCallback(){var t,e;(super.disconnectedCallback(),this._emphasisGuardHandler)&&(null===(t=this._baseChart)||void 0===t||null===(t=t.chart)||void 0===t||t.off("mouseover",this._emphasisGuardHandler),null===(e=this._baseChart)||void 0===e||null===(e=e.chart)||void 0===e||e.off("mouseout",this._emphasisGuardHandler),this._emphasisGuardHandler=void 0)}_togglePhysics(){this._saveNodePositions(),this._physicsEnabled=!this._physicsEnabled}_toggleLabels(){this._showLabels=!this._showLabels}_saveNodePositions(){var t;const e={};null!==(t=this._baseChart)&&void 0!==t&&t.chart&&this._baseChart.chart.getModel().getSeriesByIndex(0).getGraph().eachNode(t=>{const o=t.getLayout();o&&(e[t.id]={x:o[0],y:o[1]})}),this._nodePositions=e}constructor(){super(),this.searchFilter="",this._reducedMotion=!1,this._showLabels=!0,this._nodePositions={},this._createOptions=(0,r.A)(t=>({tooltip:{trigger:"item",confine:!0,formatter:this.tooltipFormatter},legend:{show:!(null==t||!t.length),data:null==t?void 0:t.map(t=>Object.assign(Object.assign({},t),{},{icon:t.symbol})),bottom:8},dataZoom:{type:"inside",filterMode:"none"}}),h.b),this._getSeries=(0,r.A)((t,e,o,a,i,n)=>({id:"network",type:"graph",layout:e?"force":"none",draggable:!0,roam:!0,roamTrigger:"global",selectedMode:"single",label:{show:a,position:"right",formatter:t=>{var e;const o=t.data;var a;return o.context?`{primary|${null!==(a=o.name)&&void 0!==a?a:""}}\n{secondary|${o.context}}`:null!==(e=o.name)&&void 0!==e?e:""},rich:{primary:{fontSize:12},secondary:{fontSize:12,color:getComputedStyle(document.body).getPropertyValue("--secondary-text-color"),lineHeight:16}}},emphasis:{focus:n?"self":i?"none":"adjacency"},force:{repulsion:[400,600],edgeLength:[200,350],gravity:.05,layoutAnimation:!o&&t.nodes.length<100},edgeSymbol:["none","arrow"],edgeSymbolSize:10,data:this._getSeriesData(t.nodes,t.links,this._nodePositions),links:t.links.map(t=>{var e;return Object.assign(Object.assign({},t),{},{value:t.reverseValue?Math.max(null!==(e=t.value)&&void 0!==e?e:0,t.reverseValue):t.value,symbolSize:t.reverseValue?1:t.symbolSize})}),categories:t.categories||[]}),h.b),this._getSeriesData=(0,r.A)((t,e,o)=>this._getPositionedNodes(t,e,o).map(t=>({id:t.id,name:t.name,context:t.context,category:t.category,value:t.value,symbolSize:t.symbolSize||30,symbol:t.symbol||"circle",itemStyle:t.itemStyle||{},fixed:t.fixed,x:t.x,y:t.y})),h.b),v||Promise.all([o.e(37552),o.e(77072),o.e(53771),o.e(9970),o.e(72701),o.e(89190)]).then(o.bind(o,52164)).then(t=>{v=t,this.requestUpdate()})}}y.styles=(0,i.AH)(p||(p=f`:host{display:block;position:relative}ha-chart-base{height:100%;--chart-max-height:100%}::slotted(ha-icon-button),ha-icon-button{margin-right:12px}`)),(0,a.Cg)([(0,n.MZ)({attribute:!1})],y.prototype,"data",void 0),(0,a.Cg)([(0,n.MZ)({attribute:!1})],y.prototype,"tooltipFormatter",void 0),(0,a.Cg)([(0,n.MZ)({attribute:!1})],y.prototype,"searchableAttributes",void 0),(0,a.Cg)([(0,n.MZ)({attribute:!1})],y.prototype,"searchFilter",void 0),(0,a.Cg)([(0,n.wk)()],y.prototype,"_highlightedNodes",void 0),(0,a.Cg)([(0,n.wk)()],y.prototype,"_reducedMotion",void 0),(0,a.Cg)([(0,n.wk)()],y.prototype,"_physicsEnabled",void 0),(0,a.Cg)([(0,n.wk)()],y.prototype,"_showLabels",void 0),(0,a.Cg)([(0,n.P)("ha-chart-base")],y.prototype,"_baseChart",void 0),y=(0,a.Cg)([(0,n.EM)("ha-network-graph")],y),e()}catch(d){e(d)}})},34296:function(t,e,o){o(62953);var a=o(40445),i=o(96229),n=o(26069),r=o(91735),s=o(42034),l=o(5124),c=o(67576);let h,u,d,p,f=t=>t;class g extends i.k{renderOutline(){return this.filled?(0,l.qy)(h||(h=f`<span class="filled"></span>`)):super.renderOutline()}getContainerClasses(){return Object.assign(Object.assign({},super.getContainerClasses()),{},{active:this.active})}renderPrimaryContent(){return(0,l.qy)(u||(u=f` <span class="leading icon" aria-hidden="true"> ${0} </span> <span class="label">${0}</span> <span class="touch"></span> <span class="trailing leading icon" aria-hidden="true"> ${0} </span> `),this.renderLeadingIcon(),this.label,this.renderTrailingIcon())}renderTrailingIcon(){return(0,l.qy)(d||(d=f`<slot name="trailing-icon"></slot>`))}constructor(...t){super(...t),this.filled=!1,this.active=!1}}g.styles=[r.R,s.R,n.R,(0,l.AH)(p||(p=f`:host{--md-sys-color-primary:var(--primary-text-color);--md-sys-color-on-surface:var(--primary-text-color);--md-assist-chip-container-shape:var( --ha-assist-chip-container-shape, 16px );--md-assist-chip-outline-color:var(--outline-color);--md-assist-chip-label-text-weight:400}.filled{display:flex;pointer-events:none;border-radius:inherit;inset:0;position:absolute;background-color:var(--ha-assist-chip-filled-container-color)}::slotted([slot=icon]),::slotted([slot=trailing-icon]){display:flex;--mdc-icon-size:var(--md-input-chip-icon-size, 18px);font-size:var(--_label-text-size)!important}.trailing.icon ::slotted(*),.trailing.icon svg{margin-inline-end:unset;margin-inline-start:var(--_icon-label-space)}::before{background:var(--ha-assist-chip-container-color,transparent);opacity:var(--ha-assist-chip-container-opacity, 1)}:where(.active)::before{background:var(--ha-assist-chip-active-container-color);opacity:var(--ha-assist-chip-active-container-opacity)}.label{font-family:var(--ha-font-family-body)}`))],(0,a.Cg)([(0,c.MZ)({type:Boolean,reflect:!0})],g.prototype,"filled",void 0),(0,a.Cg)([(0,c.MZ)({type:Boolean})],g.prototype,"active",void 0),g=(0,a.Cg)([(0,c.EM)("ha-assist-chip")],g)},34127:function(t,e,o){o.a(t,async function(t,e){try{o(62953);var a=o(40445),i=o(52630),n=o(5124),r=o(67576),s=t([i]);i=(s.then?(await s)():s)[0];let l,c=t=>t;class h extends i.A{static get styles(){return[i.A.styles,(0,n.AH)(l||(l=c`: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(...t){super(...t),this.showDelay=350,this.hideDelay=150}}(0,a.Cg)([(0,r.MZ)({attribute:"show-delay",type:Number})],h.prototype,"showDelay",void 0),(0,a.Cg)([(0,r.MZ)({attribute:"hide-delay",type:Number})],h.prototype,"hideDelay",void 0),h=(0,a.Cg)([(0,r.EM)("ha-tooltip")],h),e()}catch(l){e(l)}})},36866:function(t,e,o){o.a(t,async function(t,e){try{o(62953);var a=o(40445),i=o(5124),n=o(67576),r=o(91485),s=t([r]);r=(s.then?(await s)():s)[0];let l,c,h=t=>t;const u="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z";class d extends r.U{willUpdate(t){var e,o;(super.willUpdate(t),this.label||this.placeholder||this.hasUpdated&&!t.has("_i18n"))||(this.placeholder=(null===(e=this.i18n)||void 0===e||null===(o=e.localize)||void 0===o?void 0:o.call(e,"ui.common.search"))||"Search")}renderStartDefault(){return(0,i.qy)(l||(l=h`<ha-svg-icon slot="start" .path="${0}"></ha-svg-icon>`),u)}constructor(){super(),this.withClear=!0,this.autocomplete=this.autocomplete||"off"}}d.styles=[...r.U.styles,(0,i.AH)(c||(c=h`:host([appearance=outlined]) wa-input.no-label::part(base){height:40px}`))],d=(0,a.Cg)([(0,n.EM)("ha-input-search")],d),e()}catch(l){e(l)}})},81310:function(t,e,o){o.a(t,async function(t,e){try{o(62953);var a=o(40445),i=o(5124),n=o(67576),r=o(6412),s=o(26218),l=o(91926),c=o(90248),h=o(2054),u=o(14503),d=t([c,h]);[c,h]=d.then?(await d)():d;let p,f,g,m,b,v=t=>t;class y extends i.WF{render(){var t;return(0,i.qy)(p||(p=v` <div class="toolbar ${0}"> <div class="toolbar-content"> ${0} <div class="main-title"> <slot name="header">${0}</slot> </div> <slot name="toolbar-icon"></slot> </div> </div> <div class="${0}" @scroll="${0}"> <slot></slot> </div> <div id="fab"> <slot name="fab"></slot> </div> `),(0,r.H)({narrow:this.narrow}),this.mainPage||null!==(t=history.state)&&void 0!==t&&t.root?(0,i.qy)(f||(f=v` <ha-menu-button .hass="${0}" .narrow="${0}"></ha-menu-button> `),this.hass,this.narrow):this.backPath?(0,i.qy)(g||(g=v` <ha-icon-button-arrow-prev href="${0}" .hass="${0}"></ha-icon-button-arrow-prev> `),this.backPath,this.hass):(0,i.qy)(m||(m=v` <ha-icon-button-arrow-prev .hass="${0}" @click="${0}"></ha-icon-button-arrow-prev> `),this.hass,this._backTapped),this.header,(0,r.H)({content:!0,"ha-scrollbar":this.scrollable,"not-scrollable":!this.scrollable}),this._saveScrollPos)}_saveScrollPos(t){this._savedScrollPos=t.target.scrollTop}_backTapped(){this.backCallback?this.backCallback():(0,l.OE)()}static get styles(){return[u.dp,(0,i.AH)(b||(b=v`:host{display:block;height:100%;background-color:var(--primary-background-color);overflow:hidden;position:relative}:host([narrow]){width:100%;position:fixed}.toolbar{background-color:var(--app-header-background-color);padding-top:var(--safe-area-inset-top);padding-right:var(--safe-area-inset-right)}:host([narrow]) .toolbar{padding-left:var(--safe-area-inset-left)}.toolbar-content{display:flex;align-items:center;font-size:var(--ha-font-size-xl);height:var(--header-height);font-weight:var(--ha-font-weight-normal);color:var(--app-header-text-color,#fff);border-bottom:var(--app-header-border-bottom,none);box-sizing:border-box;padding:8px 12px}.toolbar a{color:var(--sidebar-text-color);text-decoration:none}::slotted([slot=toolbar-icon]),ha-icon-button-arrow-prev,ha-menu-button{display:flex;align-items:center;pointer-events:auto;color:var(--sidebar-icon-color)}.main-title{margin-inline-start:var(--ha-space-6);line-height:var(--ha-line-height-normal);min-width:0;flex-grow:1;overflow-wrap:break-word;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.narrow .main-title{margin-inline-start:var(--ha-space-2)}.content{position:relative;width:calc(100% - var(--safe-area-inset-right,0px));height:calc(100% - 1px - var(--header-height,0px) - var(--safe-area-inset-top,0px) - var(--safe-area-inset-bottom,0px));padding-bottom:var(--safe-area-inset-bottom,0px);margin-right:var(--safe-area-inset-right);overflow-y:auto;overflow:auto;-webkit-overflow-scrolling:touch}.content.not-scrollable{overflow:hidden;display:flex;flex-direction:column}:host([narrow]) .content{width:calc(100% - var(--safe-area-inset-left,0px) - var(--safe-area-inset-right,0px));margin-left:var(--safe-area-inset-left)}#fab{position:absolute;right:calc(16px + var(--safe-area-inset-right,0px));inset-inline-end:calc(16px + var(--safe-area-inset-right,0px));inset-inline-start:initial;bottom:calc(16px + var(--safe-area-inset-bottom,0px));z-index:1;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--ha-space-2);--ha-button-box-shadow:var(--ha-box-shadow-l)}:host([narrow]) #fab.tabs{bottom:calc(84px + var(--safe-area-inset-bottom,0px))}#fab[is-wide]{bottom:calc(24px + var(--safe-area-inset-bottom,0px));right:calc(24px + var(--safe-area-inset-right,0px));inset-inline-end:calc(24px + var(--safe-area-inset-right,0px));inset-inline-start:initial}`))]}constructor(...t){super(...t),this.mainPage=!1,this.narrow=!1,this.scrollable=!0}}(0,a.Cg)([(0,n.MZ)({attribute:!1})],y.prototype,"hass",void 0),(0,a.Cg)([(0,n.MZ)()],y.prototype,"header",void 0),(0,a.Cg)([(0,n.MZ)({type:Boolean,attribute:"main-page"})],y.prototype,"mainPage",void 0),(0,a.Cg)([(0,n.MZ)({type:String,attribute:"back-path"})],y.prototype,"backPath",void 0),(0,a.Cg)([(0,n.MZ)({attribute:!1})],y.prototype,"backCallback",void 0),(0,a.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],y.prototype,"narrow",void 0),(0,a.Cg)([(0,n.MZ)({type:Boolean})],y.prototype,"scrollable",void 0),(0,a.Cg)([(0,s.a)(".content")],y.prototype,"_savedScrollPos",void 0),(0,a.Cg)([(0,n.Ls)({passive:!0})],y.prototype,"_saveScrollPos",null),y=(0,a.Cg)([(0,n.EM)("hass-subpage")],y),e()}catch(p){e(p)}})},54706:function(t,e,o){o.d(e,{E:function(){return n}});o(74423),o(18111),o(13579),o(3362),o(62953);var a=o(40445),i=o(67576);const n=t=>{class e extends t{connectedCallback(){super.connectedCallback(),this._checkSubscribed()}disconnectedCallback(){if(super.disconnectedCallback(),this.__unsubs){for(;this.__unsubs.length;){const t=this.__unsubs.pop();t instanceof Promise?t.then(t=>t()):t()}this.__unsubs=void 0}}updated(t){if(super.updated(t),t.has("hass"))this._checkSubscribed();else if(this.hassSubscribeRequiredHostProps)for(const e of t.keys())if(this.hassSubscribeRequiredHostProps.includes(e))return void this._checkSubscribed()}hassSubscribe(){return[]}_checkSubscribed(){var t;void 0!==this.__unsubs||!this.isConnected||void 0===this.hass||null!==(t=this.hassSubscribeRequiredHostProps)&&void 0!==t&&t.some(t=>void 0===this[t])||(this.__unsubs=this.hassSubscribe())}}return(0,a.Cg)([(0,i.MZ)({attribute:!1})],e.prototype,"hass",void 0),e}},69235:function(t,e,o){o.a(t,async function(t,e){try{o(3362),o(62953);"function"!=typeof window.ResizeObserver&&(window.ResizeObserver=(await o.e(71055).then(o.bind(o,52370))).default),e()}catch(a){e(a)}},1)}}]);