fixed look of hvac hvag systems
This commit is contained in:
1 parent
9b2fcfd4cc
commit
8a248bb861
6 files changed
+876
-793
No files matched your search
@@ -1,7 +1,7 @@
|
||||
/*! NextFloor, MIT licence. Includes three.js (MIT) and Lit (BSD-3-Clause); see LICENSE and THIRD_PARTY_NOTICES.md */
|
||||
var Z=globalThis,J=Z.ShadowRoot&&(Z.ShadyCSS===void 0||Z.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Q=Symbol(),yt=new WeakMap,U=class{constructor(t,n,e){if(this._$cssResult$=!0,e!==Q)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=n}get styleSheet(){let t=this.o,n=this.t;if(J&&t===void 0){let e=n!==void 0&&n.length===1;e&&(t=yt.get(n)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&yt.set(n,t))}return t}toString(){return this.cssText}},vt=i=>new U(typeof i=="string"?i:i+"",void 0,Q),x=(i,...t)=>{let n=i.length===1?i[0]:t.reduce((e,r,s)=>e+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+i[s+1],i[0]);return new U(n,i,Q)},xt=(i,t)=>{if(J)i.adoptedStyleSheets=t.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(let n of t){let e=document.createElement("style"),r=Z.litNonce;r!==void 0&&e.setAttribute("nonce",r),e.textContent=n.cssText,i.appendChild(e)}},tt=J?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let n="";for(let e of t.cssRules)n+=e.cssText;return vt(n)})(i):i;var{is:It,defineProperty:Wt,getOwnPropertyDescriptor:Kt,getOwnPropertyNames:qt,getOwnPropertySymbols:Zt,getPrototypeOf:Jt}=Object,Y=globalThis,$t=Y.trustedTypes,Yt=$t?$t.emptyScript:"",Xt=Y.reactiveElementPolyfillSupport,z=(i,t)=>i,et={toAttribute(i,t){switch(t){case Boolean:i=i?Yt:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let n=i;switch(t){case Boolean:n=i!==null;break;case Number:n=i===null?null:Number(i);break;case Object:case Array:try{n=JSON.parse(i)}catch{n=null}}return n}},wt=(i,t)=>!It(i,t),_t={attribute:!0,type:String,converter:et,reflect:!1,useDefault:!1,hasChanged:wt};Symbol.metadata??=Symbol("metadata"),Y.litPropertyMetadata??=new WeakMap;var w=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,n=_t){if(n.state&&(n.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((n=Object.create(n)).wrapped=!0),this.elementProperties.set(t,n),!n.noAccessor){let e=Symbol(),r=this.getPropertyDescriptor(t,e,n);r!==void 0&&Wt(this.prototype,t,r)}}static getPropertyDescriptor(t,n,e){let{get:r,set:s}=Kt(this.prototype,t)??{get(){return this[n]},set(o){this[n]=o}};return{get:r,set(o){let c=r?.call(this);s?.call(this,o),this.requestUpdate(t,c,e)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??_t}static _$Ei(){if(this.hasOwnProperty(z("elementProperties")))return;let t=Jt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(z("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(z("properties"))){let n=this.properties,e=[...qt(n),...Zt(n)];for(let r of e)this.createProperty(r,n[r])}let t=this[Symbol.metadata];if(t!==null){let n=litPropertyMetadata.get(t);if(n!==void 0)for(let[e,r]of n)this.elementProperties.set(e,r)}this._$Eh=new Map;for(let[n,e]of this.elementProperties){let r=this._$Eu(n,e);r!==void 0&&this._$Eh.set(r,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let n=[];if(Array.isArray(t)){let e=new Set(t.flat(1/0).reverse());for(let r of e)n.unshift(tt(r))}else t!==void 0&&n.push(tt(t));return n}static _$Eu(t,n){let e=n.attribute;return e===!1?void 0:typeof e=="string"?e:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,n=this.constructor.elementProperties;for(let e of n.keys())this.hasOwnProperty(e)&&(t.set(e,this[e]),delete this[e]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return xt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,n,e){this._$AK(t,e)}_$ET(t,n){let e=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,e);if(r!==void 0&&e.reflect===!0){let s=(e.converter?.toAttribute!==void 0?e.converter:et).toAttribute(n,e.type);this._$Em=t,s==null?this.removeAttribute(r):this.setAttributeLine truncated
|
||||
\f\r]`,L=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Et=/-->/g,kt=/>/g,S=RegExp(`>|${nt}(?:([^\\s"'>=/]+)(${nt}*=${nt}*(?:[^
|
||||
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ht=/'/g,Ct=/"/g,Mt=/^(?:script|style|textarea|title)$/i,dt=i=>(t,...n)=>({_$litType$:i,strings:t,values:n}),p=dt(1),pe=dt(2),fe=dt(3),H=Symbol.for("lit-noChange"),a=Symbol.for("lit-nothing"),Rt=new WeakMap,E=k.createTreeWalker(k,129);function Ot(i,t){if(!ct(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return St!==void 0?St.createHTML(t):t}var te=(i,t)=>{let n=i.length-1,e=[],r,s=t===2?"<svg>":t===3?"<math>":"",o=L;for(let c=0;c<n;c++){let l=i[c],u,h,d=-1,f=0;for(;f<l.length&&(o.lastIndex=f,h=o.exec(l),h!==null);)f=o.lastIndex,o===L?h[1]==="!--"?o=Et:h[1]!==void 0?o=kt:h[2]!==void 0?(Mt.test(h[2])&&(r=RegExp("</"+h[2],"g")),o=S):h[3]!==void 0&&(o=S):o===S?h[0]===">"?(o=r??L,d=-1):h[1]===void 0?d=-2:(d=o.lastIndex-h[2].length,u=h[1],o=h[3]===void 0?S:h[3]==='"'?Ct:Ht):o===Ct||o===Ht?o=S:o===Et||o===kt?o=L:(o=S,r=void 0);let v=o===S&&i[c+1].startsWith("/>")?" ":"";s+=o===L?l+Gt:d>=0?(e.push(u),l.slice(0,d)+Pt+l.slice(d)+A+v):l+A+(d===-2?c:v)}return[Ot(i,s+(i[n]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),e]},j=class i{constructor({strings:t,_$litType$:n},e){let r;this.parts=[];let s=0,o=0,c=t.length-1,l=this.parts,[u,h]=te(t,n);if(this.el=i.createElement(u,e),E.currentNode=this.el.content,n===2||n===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(r=E.nextNode())!==null&&l.length<c;){if(r.nodeType===1){if(r.hasAttributes())for(let d of r.getAttributeNames())if(d.endsWith(Pt)){let f=h[o++],v=r.getAttribute(d).split(A),_=/([.?@])?(.*)/.exec(f);l.push({type:1,index:s,name:_[2],strings:v,ctor:_[1]==="."?rt:_[1]==="?"?st:_[1]==="@"?ot:P}),r.removeAttribute(d)}else d.startsWith(A)&&(l.push({type:6,index:s}),r.removeAttribute(d));if(Mt.test(r.tagName)){let d=r.textContent.split(A),f=d.length-1;if(f>0){r.textContent=X?X.emptyScript:"";for(let v=0;v<f;v++)r.append(d[v],D()),E.nextNode(),l.push({type:2,index:++s});r.append(d[f],D())}}}else if(r.nodeType===8)if(r.data===Nt)l.push({type:2,index:s});else{let d=-1;for(;(d=r.data.indexOf(A,d+1))!==-1;)l.push({type:7,index:s}),d+=A.length-1}s++}}static createElement(t,n){let e=k.createElement("template");return e.innerHTML=t,e}};function R(i,t,n=i,e){if(t===H)return t;let r=e!==void 0?n._$Co?.[e]:n._$Cl,s=F(t)?void 0:t._$litDirective$;return r?.constructor!==s&&(r?._$AO?.(!1),s===void 0?r=void 0:(r=new s(i),r._$AT(i,n,e)),e!==void 0?(n._$Co??=[])[e]=r:n._$Cl=r),r!==void 0&&(t=R(i,r._$AS(i,t.values),r,e)),t}var it=class{constructor(t,n){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:n},parts:e}=this._$AD,r=(t?.creationScope??k).importNode(n,!0);E.currentNode=r;let s=E.nextNode(),o=0,c=0,l=e[0];for(;l!==void 0;){if(o===l.index){let u;l.type===2?u=new V(s,s.nextSibling,this,t):l.type===1?u=new l.ctor(s,l.name,l.strings,this,t):l.type===6&&(u=new at(s,this,t)),this._$AV.push(u),l=e[++c]}o!==l?.index&&(s=E.nextNode(),o++)}return E.currentNode=k,r}p(t){let n=0;for(let e of this._$AV)e!==void 0&&(e.strings!==void 0?(e._$AI(t,e,n),n+=e.strings.length-2):e._$AI(t[n])),n++}},V=class i{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,n,e,r){this.type=2,this._$AH=a,this._$AN=void 0,this._$AA=t,this._$AB=n,this._$AM=e,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,n=this._$AM;return n!==void 0&&t?.nodeType===11&&(t=n.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,n=this){t=R(this,t,n),F(t)?t===a||t==null||t===""?(this._$AH!==a&&this._$AR(),this._$AH=a):t!==this._$AH&&t!==H&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Qt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==a&&F(this._$AH)?this._$AA.nextSibling.data=t:this.T(k.createTextNode(t)),this._$AH=t}$(t){let{values:n,_$litType$:e}=t,r=typeof e=="number"?this._$AC(t):(e.el===void 0&&(e.el=j.createElement(Ot(e.h,e.h[0]),this.options)),e);if(this._$AH?._$AD===r)this._$AH.p(n);else{let s=new it(r,this),o=s.u(this.options);s.p(n),this.T(o),this._$AH=s}}_$AC(t){let n=Rt.get(t.strings);return n===void 0&&Rt.set(t.strings,n=new j(t)),n}k(t){ct(this._$AH)||(this._$AH=[],this._$AR());let n=this._$AH,e,r=0;for(let s of t)r===n.length?n.push(e=new i(this.O(D()),this.O(D()),this,this.options)):e=n[r],e._$AI(s),r++;r<n.length&&(this._$AR(e&&e._$AB.nextSibling,r),n.length=r)}_$AR(t=this._$AA.nextSibling,n){for(this._$AP?.(!1,!0,n);t!==this._$AB;){let e=At(t).nextSibling;At(t).remove(),t=e}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},P=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,n,e,r,s){this.type=1,this._$AH=a,this._$AN=void 0,this.element=t,this.name=n,this._$AM=r,this.options=s,e.length>2||e[0]!==""||e[1]!==""?(this._$AH=Array(e.length-1).fill(new String),this.strings=e)Line truncated
|
||||
var Y=globalThis,G=Y.ShadowRoot&&(Y.ShadyCSS===void 0||Y.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,nt=Symbol(),_t=new WeakMap,D=class{constructor(t,n,i){if(this._$cssResult$=!0,i!==nt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=n}get styleSheet(){let t=this.o,n=this.t;if(G&&t===void 0){let i=n!==void 0&&n.length===1;i&&(t=_t.get(n)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&_t.set(n,t))}return t}toString(){return this.cssText}},wt=r=>new D(typeof r=="string"?r:r+"",void 0,nt),y=(r,...t)=>{let n=r.length===1?r[0]:t.reduce((i,e,o)=>i+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(e)+r[o+1],r[0]);return new D(n,r,nt)},St=(r,t)=>{if(G)r.adoptedStyleSheets=t.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(let n of t){let i=document.createElement("style"),e=Y.litNonce;e!==void 0&&i.setAttribute("nonce",e),i.textContent=n.cssText,r.appendChild(i)}},it=G?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let n="";for(let i of t.cssRules)n+=i.cssText;return wt(n)})(r):r;var{is:Jt,defineProperty:Xt,getOwnPropertyDescriptor:Yt,getOwnPropertyNames:Gt,getOwnPropertySymbols:Qt,getPrototypeOf:te}=Object,Q=globalThis,At=Q.trustedTypes,ee=At?At.emptyScript:"",ne=Q.reactiveElementPolyfillSupport,V=(r,t)=>r,rt={toAttribute(r,t){switch(t){case Boolean:r=r?ee:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let n=r;switch(t){case Boolean:n=r!==null;break;case Number:n=r===null?null:Number(r);break;case Object:case Array:try{n=JSON.parse(r)}catch{n=null}}return n}},Ht=(r,t)=>!Jt(r,t),Et={attribute:!0,type:String,converter:rt,reflect:!1,useDefault:!1,hasChanged:Ht};Symbol.metadata??=Symbol("metadata"),Q.litPropertyMetadata??=new WeakMap;var w=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,n=Et){if(n.state&&(n.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((n=Object.create(n)).wrapped=!0),this.elementProperties.set(t,n),!n.noAccessor){let i=Symbol(),e=this.getPropertyDescriptor(t,i,n);e!==void 0&&Xt(this.prototype,t,e)}}static getPropertyDescriptor(t,n,i){let{get:e,set:o}=Yt(this.prototype,t)??{get(){return this[n]},set(s){this[n]=s}};return{get:e,set(s){let c=e?.call(this);o?.call(this,s),this.requestUpdate(t,c,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Et}static _$Ei(){if(this.hasOwnProperty(V("elementProperties")))return;let t=te(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(V("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(V("properties"))){let n=this.properties,i=[...Gt(n),...Qt(n)];for(let e of i)this.createProperty(e,n[e])}let t=this[Symbol.metadata];if(t!==null){let n=litPropertyMetadata.get(t);if(n!==void 0)for(let[i,e]of n)this.elementProperties.set(i,e)}this._$Eh=new Map;for(let[n,i]of this.elementProperties){let e=this._$Eu(n,i);e!==void 0&&this._$Eh.set(e,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let n=[];if(Array.isArray(t)){let i=new Set(t.flat(1/0).reverse());for(let e of i)n.unshift(it(e))}else t!==void 0&&n.push(it(t));return n}static _$Eu(t,n){let i=n.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,n=this.constructor.elementProperties;for(let i of n.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return St(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,n,i){this._$AK(t,i)}_$ET(t,n){let i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(e!==void 0&&i.reflect===!0){let o=(i.converter?.toAttribute!==void 0?i.converter:rt).toAttribute(n,i.type);this._$Em=t,o==null?this.removeAttribute(e):this.setAttriLine truncated
|
||||
\f\r]`,j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Rt=/-->/g,Nt=/>/g,k=RegExp(`>|${ot}(?:([^\\s"'>=/]+)(${ot}*=${ot}*(?:[^
|
||||
\f\r"'\`<>=]|("|')|))|$)`,"g"),Pt=/'/g,Mt=/"/g,zt=/^(?:script|style|textarea|title)$/i,pt=r=>(t,...n)=>({_$litType$:r,strings:t,values:n}),d=pt(1),ye=pt(2),ve=pt(3),N=Symbol.for("lit-noChange"),a=Symbol.for("lit-nothing"),Tt=new WeakMap,C=R.createTreeWalker(R,129);function Ut(r,t){if(!ht(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ct!==void 0?Ct.createHTML(t):t}var oe=(r,t)=>{let n=r.length-1,i=[],e,o=t===2?"<svg>":t===3?"<math>":"",s=j;for(let c=0;c<n;c++){let l=r[c],h,p,u=-1,m=0;for(;m<l.length&&(s.lastIndex=m,p=s.exec(l),p!==null);)m=s.lastIndex,s===j?p[1]==="!--"?s=Rt:p[1]!==void 0?s=Nt:p[2]!==void 0?(zt.test(p[2])&&(e=RegExp("</"+p[2],"g")),s=k):p[3]!==void 0&&(s=k):s===k?p[0]===">"?(s=e??j,u=-1):p[1]===void 0?u=-2:(u=s.lastIndex-p[2].length,h=p[1],s=p[3]===void 0?k:p[3]==='"'?Mt:Pt):s===Mt||s===Pt?s=k:s===Rt||s===Nt?s=j:(s=k,e=void 0);let $=s===k&&r[c+1].startsWith("/>")?" ":"";o+=s===j?l+ie:u>=0?(i.push(h),l.slice(0,u)+Ot+l.slice(u)+A+$):l+A+(u===-2?c:$)}return[Ut(r,o+(r[n]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]},K=class r{constructor({strings:t,_$litType$:n},i){let e;this.parts=[];let o=0,s=0,c=t.length-1,l=this.parts,[h,p]=oe(t,n);if(this.el=r.createElement(h,i),C.currentNode=this.el.content,n===2||n===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(e=C.nextNode())!==null&&l.length<c;){if(e.nodeType===1){if(e.hasAttributes())for(let u of e.getAttributeNames())if(u.endsWith(Ot)){let m=p[s++],$=e.getAttribute(u).split(A),_=/([.?@])?(.*)/.exec(m);l.push({type:1,index:o,name:_[2],strings:$,ctor:_[1]==="."?at:_[1]==="?"?lt:_[1]==="@"?ct:M}),e.removeAttribute(u)}else u.startsWith(A)&&(l.push({type:6,index:o}),e.removeAttribute(u));if(zt.test(e.tagName)){let u=e.textContent.split(A),m=u.length-1;if(m>0){e.textContent=tt?tt.emptyScript:"";for(let $=0;$<m;$++)e.append(u[$],B()),C.nextNode(),l.push({type:2,index:++o});e.append(u[m],B())}}}else if(e.nodeType===8)if(e.data===Ft)l.push({type:2,index:o});else{let u=-1;for(;(u=e.data.indexOf(A,u+1))!==-1;)l.push({type:7,index:o}),u+=A.length-1}o++}}static createElement(t,n){let i=R.createElement("template");return i.innerHTML=t,i}};function P(r,t,n=r,i){if(t===N)return t;let e=i!==void 0?n._$Co?.[i]:n._$Cl,o=I(t)?void 0:t._$litDirective$;return e?.constructor!==o&&(e?._$AO?.(!1),o===void 0?e=void 0:(e=new o(r),e._$AT(r,n,i)),i!==void 0?(n._$Co??=[])[i]=e:n._$Cl=e),e!==void 0&&(t=P(r,e._$AS(r,t.values),e,i)),t}var st=class{constructor(t,n){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:n},parts:i}=this._$AD,e=(t?.creationScope??R).importNode(n,!0);C.currentNode=e;let o=C.nextNode(),s=0,c=0,l=i[0];for(;l!==void 0;){if(s===l.index){let h;l.type===2?h=new W(o,o.nextSibling,this,t):l.type===1?h=new l.ctor(o,l.name,l.strings,this,t):l.type===6&&(h=new ut(o,this,t)),this._$AV.push(h),l=i[++c]}s!==l?.index&&(o=C.nextNode(),s++)}return C.currentNode=R,e}p(t){let n=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,n),n+=i.strings.length-2):i._$AI(t[n])),n++}},W=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,n,i,e){this.type=2,this._$AH=a,this._$AN=void 0,this._$AA=t,this._$AB=n,this._$AM=i,this.options=e,this._$Cv=e?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,n=this._$AM;return n!==void 0&&t?.nodeType===11&&(t=n.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,n=this){t=P(this,t,n),I(t)?t===a||t==null||t===""?(this._$AH!==a&&this._$AR(),this._$AH=a):t!==this._$AH&&t!==N&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):re(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==a&&I(this._$AH)?this._$AA.nextSibling.data=t:this.T(R.createTextNode(t)),this._$AH=t}$(t){let{values:n,_$litType$:i}=t,e=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=K.createElement(Ut(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===e)this._$AH.p(n);else{let o=new st(e,this),s=o.u(this.options);o.p(n),this.T(s),this._$AH=o}}_$AC(t){let n=Tt.get(t.strings);return n===void 0&&Tt.set(t.strings,n=new K(t)),n}k(t){ht(this._$AH)||(this._$AH=[],this._$AR());let n=this._$AH,i,e=0;for(let o of t)e===n.length?n.push(i=new r(this.O(B()),this.O(B()),this,this.options)):i=n[e],i._$AI(o),e++;e<n.length&&(this._$AR(i&&i._$AB.nextSibling,e),n.length=e)}_$AR(t=this._$AA.nextSibling,n){for(this._$AP?.(!1,!0,n);t!==this._$AB;){let i=kt(t).nextSibling;kt(t).remove(),t=i}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},M=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,n,i,e,o){this.type=1,this._$AH=a,this._$AN=void 0,this.element=t,this.name=n,this._$AM=e,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=Line truncated
|
||||
:host {
|
||||
--nf-text: var(--primary-text-color, #e1e1e1);
|
||||
--nf-muted: var(--secondary-text-color, #9b9b9b);
|
||||
@@ -29,7 +29,7 @@ var Z=globalThis,J=Z.ShadowRoot&&(Z.ShadyCSS===void 0||Z.ShadyCSS.nativeShadow)&
|
||||
font-family: var(--nf-font);
|
||||
color: var(--nf-text);
|
||||
}
|
||||
`,Me=x`
|
||||
`,Ve=y`
|
||||
:host([readable]) {
|
||||
--secondary-text-color: var(--primary-text-color, #e1e1e1);
|
||||
--divider-color: color-mix(in srgb, var(--primary-text-color, #e1e1e1) 40%, transparent);
|
||||
@@ -40,7 +40,7 @@ var Z=globalThis,J=Z.ShadowRoot&&(Z.ShadyCSS===void 0||Z.ShadyCSS.nativeShadow)&
|
||||
:host([readable]) .nf-overlay {
|
||||
zoom: 1.2;
|
||||
}
|
||||
`,Oe=x`
|
||||
`,je=y`
|
||||
/* a group of switches: one rounded pill, the active one tinted with the accent */
|
||||
.nf-seg {
|
||||
display: inline-flex;
|
||||
@@ -203,30 +203,32 @@ var Z=globalThis,J=Z.ShadowRoot&&(Z.ShadyCSS===void 0||Z.ShadyCSS.nativeShadow)&
|
||||
min-height: 40px;
|
||||
}
|
||||
}
|
||||
`;function pt(i,t){let n=new Set;return t.flatMap(e=>{let r=String(i?.states[e]?.attributes.symcon_source_entity||e),s=i?.states[r]?.attributes,o=Number(s?.symcon_id);return!o||!s?.symcon_archive||n.has(o)?[]:(n.add(o),[r])})}var zt,ft=class extends b{static properties={hass:{attribute:!1},ids:{attribute:!1},label:{attribute:!1},busy:{state:!0},error:{state:!0}};constructor(){super(),this.ids=[],this.label="",this.busy=!1,this.error=""}async open(t){t.stopPropagation(),this.busy=!0,this.error="";try{let n=new URL("./nextfloor-trend.js?v=84417e0b2573",import.meta.url).href;await(await(zt??=import(n).catch(r=>{throw zt=void 0,r}))).openTrend(this.hass,this.ids,this.label)}catch(n){this.error=n instanceof Error?n.message:String(n)}finally{this.busy=!1}}render(){if(!pt(this.hass,this.ids).length)return a;let t=this.label?`Trend anzeigen: ${this.label}`:"Trend anzeigen";return p`<button type="button" title=${t} aria-label=${t} aria-haspopup="dialog" ?disabled=${this.busy} @pointerdown=${n=>n.stopPropagation()} @click=${n=>{this.open(n)}}>
|
||||
`;function gt(r,t){let n=new Set;return t.flatMap(i=>{let e=String(r?.states[i]?.attributes.symcon_source_entity||i),o=r?.states[e]?.attributes,s=Number(o?.symcon_id);return!s||!o?.symcon_archive||n.has(s)?[]:(n.add(s),[e])})}var Vt,bt=class extends v{static properties={hass:{attribute:!1},ids:{attribute:!1},label:{attribute:!1},busy:{state:!0},error:{state:!0}};constructor(){super(),this.ids=[],this.label="",this.busy=!1,this.error=""}async open(t){t.stopPropagation(),this.busy=!0,this.error="";try{let n=new URL("./nextfloor-trend.js?v=84417e0b2573",import.meta.url).href;await(await(Vt??=import(n).catch(e=>{throw Vt=void 0,e}))).openTrend(this.hass,this.ids,this.label)}catch(n){this.error=n instanceof Error?n.message:String(n)}finally{this.busy=!1}}render(){if(!gt(this.hass,this.ids).length)return a;let t=this.label?`Trend anzeigen: ${this.label}`:"Trend anzeigen";return d`<button type="button" title=${t} aria-label=${t} aria-haspopup="dialog" ?disabled=${this.busy} @pointerdown=${n=>n.stopPropagation()} @click=${n=>{this.open(n)}}>
|
||||
<svg width="12" height="12" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 2v15h15M5 13l4-5 4 2 4-6"/></svg>
|
||||
</button>${this.error?p`<span role="alert">${this.error}</span>`:a}`}static styles=x`:host{position:relative;display:inline-flex;flex:0 0 18px;width:18px;height:18px;vertical-align:middle;margin-left:3px;font-weight:normal;line-height:0}button{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;padding:2px;border:0;border-radius:3px;background:transparent;color:var(--nf-accent,#40c8ff);opacity:.8;cursor:pointer}svg{display:block;flex-shrink:0}button:hover,button:focus-visible{opacity:1;background:#40c8ff18}button:focus-visible{outline:1px solid currentColor;outline-offset:1px}button:disabled{opacity:.4}span{position:absolute;right:0;top:22px;z-index:10;box-sizing:border-box;width:200px;padding:8px;border:1px solid #ff9b9b50;border-radius:6px;background:var(--nf-chrome-solid,#1c1c1c);font:12px/1.4 system-ui;color:#ff9b9b;white-space:normal}`};customElements.get("nf-trend-button")||customElements.define("nf-trend-button",ft);function G(i,t,n=""){let e=pt(i,t);return e.length?p`<nf-trend-button .hass=${i} .ids=${e} .label=${n}></nf-trend-button>`:a}var ae={heating_manifold:"Heiz-/K\xFChlkreisverteiler",buffer_tank:"Pufferspeicher",freshwater_station:"Frischwasserstation"},Dt=i=>i.name||ae[i.type],Ft=i=>i.name||{heating:"Heizkreis",cooling:"K\xFChlkreis",changeover:"Heizen / K\xFChlen",pump:"Vorschubpumpe"}[i.kind],jt=(i,t)=>t.kind==="pump"?"Pumpenkreis":t.kind==="cooling"?"K\xFChlen":t.kind==="heating"?"Heizen":m(t.mode_entity)&&g(i.states[t.mode_entity])===null?"Betriebsart \u2013":Number(m(t.mode_entity)?g(i.states[t.mode_entity]):0)===(t.cooling_value??1)?"K\xFChlen":"Heizen",bt=(i,t,n)=>[$(i,"Vorlauf",t),$(i,"R\xFCcklauf",n)].filter(e=>e!==null),Lt=(i,t,n)=>{let e=C(i,t),r=C(i,n);return e===null||r===null?a:p`<div class="reading delta"><span>ΔT · VL − RL</span><b>${(e-r).toLocaleString(i.language,{maximumFractionDigits:1})} K</b></div>`};function Vt(i,t){let n=N(t),e=bt(i,n.flow,n.return);if(t.type==="buffer_tank"&&e.unshift(...[...n.sensors??[]].sort((r,s)=>s.level-r.level).flatMap(r=>{let s=$(i,r.name||"F\xFChler",r.entity);return s?[s]:[]})),t.type==="freshwater_station")for(let[r,s]of[["Zirkulation",n.circulation_temperature],["Trinkwarmwasser",n.hot_water]]){let o=$(i,r,s);o&&e.push(o)}for(let r of t.values??[]){let s=$(i,r.label||String(r.entity&&i.states[r.entity]?.attributes.friendly_name||"Wert"),r.entity);s&&e.push({...s,icon:r.icon})}return e}var T=(i,t)=>p`<div class="reading" data-source=${t.id}><span>${t.icon?.startsWith("mdi:")?p`<ha-icon icon=${t.icon}></ha-icon>`:t.icon||a} ${t.label}</span><b>${t.text}${G(i,[t.id],t.label)}</b></div>`;function q(i,t,n){let e=O(i,n);return e.id?p`<div class="reading" data-source=${e.id}><span>${t}<small>${e.feedback?"Ist":"Soll"}</small></span><b><i class="lamp" style=${`background:${e.running===null?"#888":e.running?"#6fe1a2":"#465361"}`}></i>${K(i.states[e.id])}${G(i,[e.id],t)}</b></div>`:a}var Bt=x`
|
||||
</button>${this.error?d`<span role="alert">${this.error}</span>`:a}`}static styles=y`:host{position:relative;display:inline-flex;flex:0 0 18px;width:18px;height:18px;vertical-align:middle;margin-left:3px;font-weight:normal;line-height:0}button{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;padding:2px;border:0;border-radius:3px;background:transparent;color:var(--nf-accent,#40c8ff);opacity:.8;cursor:pointer}svg{display:block;flex-shrink:0}button:hover,button:focus-visible{opacity:1;background:#40c8ff18}button:focus-visible{outline:1px solid currentColor;outline-offset:1px}button:disabled{opacity:.4}span{position:absolute;right:0;top:22px;z-index:10;box-sizing:border-box;width:200px;padding:8px;border:1px solid #ff9b9b50;border-radius:6px;background:var(--nf-chrome-solid,#1c1c1c);font:12px/1.4 system-ui;color:#ff9b9b;white-space:normal}`};customElements.get("nf-trend-button")||customElements.define("nf-trend-button",bt);function X(r,t,n=""){let i=gt(r,t);return i.length?d`<nf-trend-button .hass=${r} .ids=${i} .label=${n}></nf-trend-button>`:a}var pe={heating_manifold:"Heiz-/K\xFChlkreisverteiler",buffer_tank:"Pufferspeicher",freshwater_station:"Frischwasserstation"},Bt=r=>r.name||pe[r.type],It=r=>r.name||{heating:"Heizkreis",cooling:"K\xFChlkreis",changeover:"Heizen / K\xFChlen",pump:"Vorschubpumpe"}[r.kind],Kt=(r,t)=>t.kind==="pump"?"Pumpenkreis":t.kind==="cooling"?"K\xFChlen":t.kind==="heating"?"Heizen":g(t.mode_entity)&&b(r.states[t.mode_entity])===null?"Betriebsart \u2013":Number(g(t.mode_entity)?b(r.states[t.mode_entity]):0)===(t.cooling_value??1)?"K\xFChlen":"Heizen",et=(r,t,n)=>[f(r,"Vorlauf",t),f(r,"R\xFCcklauf",n)].filter(i=>i!==null),yt=(r,t,n)=>{let i=E(r,t),e=E(r,n);return i===null||e===null?a:d`<div class="reading delta"><span>ΔT · VL − RL</span><b>${(i-e).toLocaleString(r.language,{maximumFractionDigits:1})} K</b></div>`};function Wt(r,t){let n=F(t),i=t.type==="freshwater_station"?[]:et(r,n.flow,n.return);if(t.type==="buffer_tank"&&i.unshift(...[...n.sensors??[]].sort((e,o)=>o.level-e.level).flatMap(e=>{let o=f(r,e.name||"F\xFChler",e.entity);return o?[o]:[]})),t.type==="freshwater_station"){let e=f(r,"Zirkulation",n.circulation_temperature);e&&i.push(e)}for(let e of t.values??[]){let o=f(r,e.label||String(e.entity&&r.states[e.entity]?.attributes.friendly_name||"Wert"),e.entity);o&&i.push({...o,icon:e.icon})}return i}function qt(r,t){return[...et(r,t.flow,t.return),...[["Kaltwasser",t.cold_water],["Trinkwarmwasser",t.hot_water],["Pumpenleistung",t.power]].flatMap(([n,i])=>{let e=f(r,n,i);return e?[e]:[]})]}var vt=(r,t)=>`K${t+1} \xB7 ${r.name||`Station ${t+1}`}`,H=(r,t)=>d`<div class="reading" data-source=${t.id}><span>${t.icon?.startsWith("mdi:")?d`<ha-icon icon=${t.icon}></ha-icon>`:t.icon||a} ${t.label}</span><b>${t.text}${X(r,[t.id],t.label)}</b></div>`;function L(r,t,n){let i=S(r,n);return i.id?d`<div class="reading" data-source=${i.id}><span>${t}<small>${i.feedback?"Ist":"Soll"}</small></span><b><i class="lamp" style=${`background:${i.running===null?"#888":i.running?"#6fe1a2":"#465361"}`}></i>${U(r.states[i.id])}${X(r,[i.id],t)}</b></div>`:a}var Zt=y`
|
||||
:host{display:block;color:var(--nf-text);font:12px/1.4 system-ui,sans-serif;min-width:170px;max-width:300px}
|
||||
button{font:inherit;color:inherit;background:var(--nf-fill,#ffffff10);border:1px solid var(--nf-line);border-radius:7px;padding:5px 8px;cursor:pointer}button:disabled,input:disabled{opacity:.45;cursor:default}button:focus-visible,input:focus-visible{outline:2px solid var(--nf-accent);outline-offset:2px}
|
||||
.title{display:block;width:100%;padding:0 0 5px;border:0;background:none;font-weight:600;text-align:left;white-space:normal}.content{max-height:250px;overflow:auto;overscroll-behavior:contain}.circuit{border-top:1px solid var(--nf-line);padding:5px 0}.circuit-name{font-size:11px;font-weight:600;margin-bottom:3px}.reading{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;min-height:22px}.reading>span{color:var(--nf-muted);white-space:normal}.reading b{display:flex;align-items:center;justify-content:flex-end;white-space:nowrap;font-variant-numeric:tabular-nums;font-weight:500}.reading small{font-size:9px;margin-left:5px;opacity:.75}.delta{font-size:10px}.lamp{display:inline-block;flex:none;width:6px;height:6px;border-radius:50%;margin-right:5px}.empty{color:var(--nf-muted);font-size:11px;white-space:normal;margin:5px 0}nf-trend-button{margin-left:3px}
|
||||
.circuit-name small,h3 small{font-size:10px;color:var(--nf-muted);font-weight:normal;margin-left:5px}
|
||||
ha-icon{--mdc-icon-size:13px;width:13px;height:13px;vertical-align:middle}
|
||||
dialog{box-sizing:border-box;width:min(620px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 24px);padding:0;color:var(--nf-text);background:var(--nf-chrome-solid,#1c1c1c);border:1px solid var(--nf-line);border-radius:14px;box-shadow:0 20px 70px #0008;font:13px/1.4 system-ui,sans-serif}dialog::backdrop{background:#050b16a6;backdrop-filter:blur(3px)}header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 18px;border-bottom:1px solid var(--nf-line)}h2{font-size:17px;margin:0}.body{padding:12px 18px;max-height:calc(100dvh - 120px);overflow:auto;overscroll-behavior:contain}h3{font-size:13px;margin:12px 0 7px}fieldset{min-width:0;margin:8px 0;padding:10px;border:1px solid var(--nf-line);border-radius:9px}legend{font-size:12px;color:var(--nf-muted)}.command{display:flex;align-items:center;gap:12px;margin-top:8px}.command input[type=range]{flex:1;min-width:0;accent-color:var(--nf-accent)}.command input[type=number]{width:90px;box-sizing:border-box;background:var(--nf-fill,#ffffff10);border:1px solid var(--nf-line);border-radius:6px;color:inherit;padding:5px}.command output{font-variant-numeric:tabular-nums;min-width:45px;text-align:right}.error{color:#ff9b9b}.readonly{color:var(--nf-muted);font-size:11px;margin:4px 0}.body .reading{padding:4px 0}.body .circuit{padding-bottom:12px}
|
||||
`,mt=class extends b{static properties={hass:{attribute:!1},item:{attribute:!1},readOnly:{type:Boolean}};render(){if(!this.hass||!this.item)return a;let t=N(this.item),n=Vt(this.hass,this.item);return p`<button class="title" @click=${()=>le(this.hass,this.item,this.readOnly)} aria-haspopup="dialog">${Dt(this.item)} ⚙</button><div class="content">
|
||||
${this.item.type==="heating_manifold"?(t.circuits??[]).map(e=>p`<section class="circuit"><div class="circuit-name">${Ft(e)} <small>${jt(this.hass,e)}</small></div>${B(e)?q(this.hass,"Pumpe",e.pump):a}${I(e)?q(this.hass,"Ventil",e.valve):a}${bt(this.hass,e.flow,e.return).map(r=>T(this.hass,r))}${$(this.hass,"Leistung",e.power)?T(this.hass,$(this.hass,"Leistung",e.power)):a}</section>`):a}
|
||||
${n.map(e=>T(this.hass,e))}${this.item.type==="freshwater_station"?p`${q(this.hass,"Ladepumpe",t.pump)}${q(this.hass,"Zirkulationspumpe",t.circulation)}`:a}
|
||||
${this.item.type!=="heating_manifold"&&!n.length?p`<p class="empty">Noch keine Fühler verknüpft</p>`:a}
|
||||
</div>`}static styles=[ht,Bt]},gt=class extends b{static properties={hass:{attribute:!1},item:{attribute:!1},readOnly:{type:Boolean},pending:{state:!0},error:{state:!0}};constructor(){super(),this.pending=new Set,this.error="",this.readOnly=!1}async show(){await this.updateComplete,this.shadowRoot.querySelector("dialog").showModal()}async send(t,n){let e=this.hass.states[t];if(!(this.readOnly||!e?.attributes.symcon_has_action||g(e)===null||this.pending.has(t))){this.pending=new Set([...this.pending,t]),this.error="";try{await this.hass.callService("symcon","set_value",{entity_id:t,value:n})}catch(r){this.error=r instanceof Error?r.message:String(r)}finally{this.pending=new Set([...this.pending].filter(r=>r!==t))}}}control(t,n){if(!m(n?.command)&&!m(n?.feedback))return a;let e=m(n?.command)?n.command:null,r=e?this.hass.states[e]:void 0,s=r?.attributes,o=g(r),c=!!e&&!!s?.symcon_has_action&&o!==null&&!this.readOnly&&!this.pending.has(e),l=Number(s?.symcon_min??0),u=Number(s?.symcon_max??100),h=Number(s?.symcon_step||(s?.symcon_variable_type===1?1:.1)),d=M(r),f=v=>{let _=v.target;e&&_.value.trim()&&_.checkValidity()&&Number.isFinite(_.valueAsNumber)&&this.send(e,_.valueAsNumber)};return p`<fieldset data-control=${t}><legend>${t}</legend>${q(this.hass,t,n)}
|
||||
${e?p`<div class="reading"><span>Befehl / Sollwert</span><b>${K(r)}${G(this.hass,[e],`${t} \xB7 Sollwert`)}</b></div>
|
||||
${s?.symcon_variable_type===0?p`<div class="command"><button data-command=${e} ?disabled=${!c} @click=${()=>{this.send(e,!W(r))}}>${W(r)?"Ausschalten / Schlie\xDFen":"Einschalten / \xD6ffnen"}</button></div>`:[1,2].includes(Number(s?.symcon_variable_type))?p`<div class="command"><input type="range" aria-label=${`${t} Sollwert`} data-command=${e} min=${l} max=${u} step=${h} .value=${String(d??l)} ?disabled=${!c} @change=${f}/><input type="number" aria-label=${`${t} nativer Sollwert`} min=${l} max=${u} step=${h} .value=${d===null?"":String(d)} ?disabled=${!c} @change=${f}/></div>`:a}
|
||||
${this.readOnly?p`<p class="readonly">Historische Ansicht · nur Anzeige</p>`:s?.symcon_has_action?a:p`<p class="readonly">Nur Anzeige · keine Symcon-Schaltaktion hinterlegt</p>`}`:a}
|
||||
</fieldset>`}render(){if(!this.hass||!this.item)return a;let t=N(this.item),n=Vt(this.hass,this.item);return p`<dialog @close=${()=>{this.remove(),y===this&&(y=null)}} @keydown=${e=>e.stopPropagation()}><header><h2>${Dt(this.item)}</h2><button aria-label="Schließen" @click=${()=>this.shadowRoot.querySelector("dialog").close()}>×</button></header><div class="body">
|
||||
${this.item.type==="heating_manifold"?(t.circuits??[]).map(e=>p`<section class="circuit" data-circuit=${e.id}><h3>${Ft(e)} <small>${jt(this.hass,e)}</small></h3>${B(e)?this.control("Pumpe",e.pump):a}${I(e)?this.control("Ventil",e.valve):a}${bt(this.hass,e.flow,e.return).map(r=>T(this.hass,r))}${Lt(this.hass,e.flow,e.return)}${$(this.hass,"Pumpenleistung",e.power)?T(this.hass,$(this.hass,"Pumpenleistung",e.power)):a}</section>`):a}
|
||||
${n.map(e=>T(this.hass,e))}${this.item.type!=="heating_manifold"?Lt(this.hass,t.flow,t.return):a}
|
||||
${this.item.type==="freshwater_station"?p`${this.control("Ladepumpe",t.pump)}${this.control("Zirkulationspumpe",t.circulation)}`:a}
|
||||
${!n.length&&this.item.type!=="heating_manifold"?p`<p class="empty">Die Fühler lassen sich im Editor über den Objektbaum zuweisen.</p>`:a}
|
||||
${this.error?p`<p class="error" role="alert">${this.error}</p>`:a}
|
||||
</div></dialog>`}static styles=[ht,Bt,x`:host{max-width:none;min-width:0}`]},y=null;function Ke(){y?.remove(),y=null}async function le(i,t,n=!1){y?.remove();let e=document.createElement("nf-hydronic-dialog");y=e,Object.assign(e,{hass:i,item:t,readOnly:n}),document.body.append(e),await e.show()}function qe(i,t,n=!1){if(!y)return;let e=t.floors.flatMap(r=>r.furniture).find(r=>r.id===y.item.id);if(!e||!Ut(e.type)){y.remove(),y=null;return}Object.assign(y,{hass:i,item:e,readOnly:n})}customElements.get("nf-hydronic-card")||customElements.define("nf-hydronic-card",mt);customElements.get("nf-hydronic-dialog")||customElements.define("nf-hydronic-dialog",gt);export{Ke as closeHydronic,oe as hydronicVisual,le as openHydronic,qe as refreshHydronic};
|
||||
`,xt=class extends v{static properties={hass:{attribute:!1},item:{attribute:!1},readOnly:{type:Boolean}};render(){if(!this.hass||!this.item)return a;let t=F(this.item),n=Wt(this.hass,this.item),i=this.item.type==="freshwater_station"?O(this.item):[];return d`<button class="title" @click=${()=>jt(this.hass,this.item,this.readOnly)} aria-haspopup="dialog">${Bt(this.item)} ⚙</button><div class="content">
|
||||
${this.item.type==="heating_manifold"?(t.circuits??[]).map(e=>d`<section class="circuit"><div class="circuit-name">${It(e)} <small>${Kt(this.hass,e)}</small></div>${q(e)?L(this.hass,"Pumpe",e.pump):a}${Z(e)?L(this.hass,"Ventil",e.valve):a}${et(this.hass,e.flow,e.return).map(o=>H(this.hass,o))}${f(this.hass,"Leistung",e.power)?H(this.hass,f(this.hass,"Leistung",e.power)):a}</section>`):a}
|
||||
${i.length>1?d`<small class="cascade-count">Kaskade · ${i.length} Stationen</small>${i.map((e,o)=>{let s=S(this.hass,e.pump),c=f(this.hass,"Trinkwarmwasser",e.hot_water)||f(this.hass,"Vorlauf",e.flow);return d`<div class="station-summary" data-station=${e.id}><button class="station-name" @click=${()=>jt(this.hass,this.item,this.readOnly,e.id)}><i class="lamp" title=${`Pumpe: ${s.id?U(this.hass.states[s.id]):"\u2013"}`} style=${`background:${s.running===null?"#888":s.running?"#6fe1a2":"#a82638"}`}></i>${vt(e,o)}</button><b>${c?.text||"\u2013"}</b>${c?X(this.hass,[c.id],`${vt(e,o)} \xB7 ${c.label}`):a}</div>`})}`:i.map(e=>d`<section class="circuit">${qt(this.hass,e).map(o=>H(this.hass,o))}${L(this.hass,"Ladepumpe",e.pump)}${T(e)?L(this.hass,"Kaskadenventil",e.valve):a}</section>`)}
|
||||
${n.map(e=>H(this.hass,e))}${this.item.type==="freshwater_station"?L(this.hass,"Zirkulationspumpe",t.circulation):a}
|
||||
${this.item.type!=="heating_manifold"&&this.item.type!=="freshwater_station"&&!n.length?d`<p class="empty">Noch keine Fühler verknüpft</p>`:a}
|
||||
</div>`}static styles=[mt,Zt,y`.cascade-count{color:var(--nf-muted)}.station-summary{display:grid;grid-template-columns:minmax(0,1fr) auto 18px;align-items:center;gap:6px;width:100%;padding:5px 0;font-size:11px}.station-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;background:none;border:0;text-align:left}.station-summary b{white-space:nowrap;font-variant-numeric:tabular-nums}`]},$t=class extends v{static properties={hass:{attribute:!1},item:{attribute:!1},readOnly:{type:Boolean},focusStation:{attribute:!1},pending:{state:!0},error:{state:!0}};constructor(){super(),this.pending=new Set,this.error="",this.readOnly=!1}async show(){await this.updateComplete,this.shadowRoot.querySelector("dialog").showModal(),this.focusStation&&this.shadowRoot.querySelector(`[data-station="${CSS.escape(this.focusStation)}"]`)?.scrollIntoView({block:"start"})}async send(t,n){let i=this.hass.states[t];if(!(this.readOnly||!i?.attributes.symcon_has_action||b(i)===null||this.pending.has(t))){this.pending=new Set([...this.pending,t]),this.error="";try{await this.hass.callService("symcon","set_value",{entity_id:t,value:n})}catch(e){this.error=e instanceof Error?e.message:String(e)}finally{this.pending=new Set([...this.pending].filter(e=>e!==t))}}}control(t,n){if(!g(n?.command)&&!g(n?.feedback))return a;let i=g(n?.command)?n.command:null,e=i?this.hass.states[i]:void 0,o=e?.attributes,s=b(e),c=!!i&&!!o?.symcon_has_action&&s!==null&&!this.readOnly&&!this.pending.has(i),l=Number(o?.symcon_min??0),h=Number(o?.symcon_max??100),p=Number(o?.symcon_step||(o?.symcon_variable_type===1?1:.1)),u=z(e),m=$=>{let _=$.target;i&&_.value.trim()&&_.checkValidity()&&Number.isFinite(_.valueAsNumber)&&this.send(i,_.valueAsNumber)};return d`<fieldset data-control=${t}><legend>${t}</legend>${L(this.hass,t,n)}
|
||||
${i?d`<div class="reading"><span>Befehl / Sollwert</span><b>${U(e)}${X(this.hass,[i],`${t} \xB7 Sollwert`)}</b></div>
|
||||
${o?.symcon_variable_type===0?d`<div class="command"><button data-command=${i} ?disabled=${!c} @click=${()=>{this.send(i,!J(e))}}>${J(e)?"Ausschalten / Schlie\xDFen":"Einschalten / \xD6ffnen"}</button></div>`:[1,2].includes(Number(o?.symcon_variable_type))?d`<div class="command"><input type="range" aria-label=${`${t} Sollwert`} data-command=${i} min=${l} max=${h} step=${p} .value=${String(u??l)} ?disabled=${!c} @change=${m}/><input type="number" aria-label=${`${t} nativer Sollwert`} min=${l} max=${h} step=${p} .value=${u===null?"":String(u)} ?disabled=${!c} @change=${m}/></div>`:a}
|
||||
${this.readOnly?d`<p class="readonly">Historische Ansicht · nur Anzeige</p>`:o?.symcon_has_action?a:d`<p class="readonly">Nur Anzeige · keine Symcon-Schaltaktion hinterlegt</p>`}`:a}
|
||||
</fieldset>`}render(){if(!this.hass||!this.item)return a;let t=F(this.item),n=Wt(this.hass,this.item),i=this.item.type==="freshwater_station"?O(this.item):[];return d`<dialog @close=${()=>{this.remove(),x===this&&(x=null)}} @keydown=${e=>e.stopPropagation()}><header><h2>${Bt(this.item)}</h2><button aria-label="Schließen" @click=${()=>this.shadowRoot.querySelector("dialog").close()}>×</button></header><div class="body">
|
||||
${this.item.type==="heating_manifold"?(t.circuits??[]).map(e=>d`<section class="circuit" data-circuit=${e.id}><h3>${It(e)} <small>${Kt(this.hass,e)}</small></h3>${q(e)?this.control("Pumpe",e.pump):a}${Z(e)?this.control("Ventil",e.valve):a}${et(this.hass,e.flow,e.return).map(o=>H(this.hass,o))}${yt(this.hass,e.flow,e.return)}${f(this.hass,"Pumpenleistung",e.power)?H(this.hass,f(this.hass,"Pumpenleistung",e.power)):a}</section>`):a}
|
||||
${i.map((e,o)=>d`<details class="freshwater-unit" data-station=${e.id} ?open=${o===0||this.focusStation===e.id}><summary>${vt(e,o)}</summary>${qt(this.hass,e).map(s=>H(this.hass,s))}${yt(this.hass,e.flow,e.return)}${this.control("Ladepumpe",e.pump)}${T(e)?this.control("Kaskadenventil",e.valve):a}</details>`)}
|
||||
${n.map(e=>H(this.hass,e))}${this.item.type==="buffer_tank"?yt(this.hass,t.flow,t.return):a}
|
||||
${this.item.type==="freshwater_station"?this.control("Zirkulationspumpe",t.circulation):a}
|
||||
${!n.length&&this.item.type!=="heating_manifold"&&this.item.type!=="freshwater_station"?d`<p class="empty">Die Fühler lassen sich im Editor über den Objektbaum zuweisen.</p>`:a}
|
||||
${this.error?d`<p class="error" role="alert">${this.error}</p>`:a}
|
||||
</div></dialog>`}static styles=[mt,Zt,y`:host{max-width:none;min-width:0}.freshwater-unit{border-bottom:1px solid var(--nf-line);padding:8px 0}.freshwater-unit>summary{cursor:pointer;font-weight:600;padding:4px 0}`]},x=null;function en(){x?.remove(),x=null}async function jt(r,t,n=!1,i){x?.remove();let e=document.createElement("nf-hydronic-dialog");x=e,Object.assign(e,{hass:r,item:t,readOnly:n,focusStation:i}),document.body.append(e),await e.show()}function nn(r,t,n=!1){if(!x)return;let i=t.floors.flatMap(e=>e.furniture).find(e=>e.id===x.item.id);if(!i||!Dt(i.type)){x.remove(),x=null;return}Object.assign(x,{hass:r,item:i,readOnly:n})}customElements.get("nf-hydronic-card")||customElements.define("nf-hydronic-card",xt);customElements.get("nf-hydronic-dialog")||customElements.define("nf-hydronic-dialog",$t);export{en as closeHydronic,he as hydronicVisual,jt as openHydronic,nn as refreshHydronic};
|
||||
/*! Bundled license information:
|
||||
|
||||
@lit/reactive-element/css-tag.js:
|
||||
|
||||
Reference in new issue
Block a user