homebridge-config-ui-x 5.9.1-beta.7 → 5.9.1-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/app.module.js +2 -0
- package/dist/app.module.js.map +1 -1
- package/dist/core/auth/auth.controller.d.ts +2 -1
- package/dist/core/config/config.interfaces.d.ts +8 -1
- package/dist/core/config/config.service.d.ts +2 -1
- package/dist/core/config/config.service.js +2 -1
- package/dist/core/config/config.service.js.map +1 -1
- package/dist/core/scheduler/scheduler.module.js +8 -0
- package/dist/core/scheduler/scheduler.module.js.map +1 -1
- package/dist/core/scheduler/scheduler.service.d.ts +12 -1
- package/dist/core/scheduler/scheduler.service.js +95 -2
- package/dist/core/scheduler/scheduler.service.js.map +1 -1
- package/dist/modules/config-editor/config-editor.controller.d.ts +6 -4
- package/dist/modules/config-editor/config-editor.controller.js +81 -15
- package/dist/modules/config-editor/config-editor.controller.js.map +1 -1
- package/dist/modules/config-editor/config-editor.dto.d.ts +6 -0
- package/dist/modules/config-editor/config-editor.dto.js +40 -0
- package/dist/modules/config-editor/config-editor.dto.js.map +1 -0
- package/dist/modules/config-editor/config-editor.service.d.ts +6 -3
- package/dist/modules/config-editor/config-editor.service.js +57 -8
- package/dist/modules/config-editor/config-editor.service.js.map +1 -1
- package/dist/modules/plugins/plugins.controller.d.ts +5 -0
- package/dist/modules/plugins/plugins.controller.js +51 -2
- package/dist/modules/plugins/plugins.controller.js.map +1 -1
- package/dist/modules/plugins/plugins.module.js +4 -0
- package/dist/modules/plugins/plugins.module.js.map +1 -1
- package/dist/modules/plugins/plugins.service.d.ts +13 -2
- package/dist/modules/plugins/plugins.service.js +136 -2
- package/dist/modules/plugins/plugins.service.js.map +1 -1
- package/package.json +3 -3
- package/public/{chunk-2YX52H6Q.js → chunk-2FMEK65B.js} +1 -1
- package/public/{chunk-M47TKQW6.js → chunk-3H4EJBIW.js} +1 -1
- package/public/{chunk-7YMV2SA4.js → chunk-4LSPQKBN.js} +1 -1
- package/public/chunk-4TJTW5NL.js +52 -0
- package/public/{chunk-ARZPXRWQ.js → chunk-56NTNN7A.js} +1 -1
- package/public/{chunk-DK3WPB4Y.js → chunk-5H4UKHQO.js} +1 -1
- package/public/{chunk-R3O7MEXH.js → chunk-7WBNDA43.js} +1 -1
- package/public/chunk-7X7GKRI7.js +1 -0
- package/public/{chunk-VZCCPP3I.js → chunk-7ZJON72I.js} +1 -1
- package/public/{chunk-3JH6JJYX.js → chunk-AYEBKGOW.js} +1 -1
- package/public/{chunk-H6F4BFNP.js → chunk-BYBEFFNH.js} +1 -1
- package/public/{chunk-LVPZTTN4.js → chunk-CXUQLNRT.js} +1 -1
- package/public/{chunk-IXCZMPRT.js → chunk-D34BHZAZ.js} +1 -1
- package/public/{chunk-CJRYAQAB.js → chunk-DFSYVZHS.js} +1 -1
- package/public/{chunk-WXLDWLEU.js → chunk-E7CHJVF6.js} +1 -1
- package/public/{chunk-HVQWBTKJ.js → chunk-FVPOFMFR.js} +1 -1
- package/public/{chunk-ZU4WD6NG.js → chunk-GD3BNYBL.js} +1 -1
- package/public/{chunk-O7GANMXK.js → chunk-GTGRW7SZ.js} +1 -1
- package/public/{chunk-BEVMKUD4.js → chunk-H7BN2MFG.js} +1 -1
- package/public/{chunk-GKUOVNOZ.js → chunk-HZMFFKYB.js} +1 -1
- package/public/{chunk-67U6NRFC.js → chunk-IIVVMKTD.js} +1 -1
- package/public/{chunk-UTSMS5QS.js → chunk-IJZ5PJH7.js} +1 -1
- package/public/{chunk-IRIGNUNN.js → chunk-JAGGIZOK.js} +1 -1
- package/public/{chunk-TOBCQ5B3.js → chunk-JJMZZNOU.js} +8 -8
- package/public/{chunk-SSIH2ICV.js → chunk-K6MP6J2I.js} +1 -1
- package/public/chunk-KGXF4YD5.js +1 -0
- package/public/{chunk-3K2UYZ53.js → chunk-LDVA4PGW.js} +1 -1
- package/public/{chunk-C27QSCMY.js → chunk-MGK3CCFB.js} +2 -2
- package/public/{chunk-T6U7OKUD.js → chunk-MNVMBPHV.js} +1 -1
- package/public/{chunk-MPDQ3XGG.js → chunk-N67N5JDK.js} +1 -1
- package/public/{chunk-4ZDGXNCW.js → chunk-NOBUYLGI.js} +1 -1
- package/public/chunk-NZIBUYDI.js +50 -0
- package/public/{chunk-7XETZDRS.js → chunk-OO2MVDGG.js} +1 -1
- package/public/{chunk-QYDR4DOT.js → chunk-OYP4E7LD.js} +1 -1
- package/public/chunk-P63CZWFM.js +1 -0
- package/public/{chunk-LSYC7RS2.js → chunk-PENFMOAM.js} +1 -1
- package/public/{chunk-SOUN4EFM.js → chunk-PMIKE7XO.js} +1 -1
- package/public/chunk-QC5TXGPR.js +1 -0
- package/public/{chunk-5BDKZBRM.js → chunk-QO7DKILC.js} +1 -1
- package/public/{chunk-6NYJSSLN.js → chunk-R3BLBHPZ.js} +1 -1
- package/public/{chunk-GQDSGFCV.js → chunk-RFF7LGZV.js} +1 -1
- package/public/{chunk-MSZWSUJN.js → chunk-RZY66DUH.js} +1 -1
- package/public/{chunk-ADZPEOBS.js → chunk-S6C7GUA2.js} +1 -1
- package/public/{chunk-A354KSZE.js → chunk-SOVE6NMG.js} +1 -1
- package/public/{chunk-BPBBQKYD.js → chunk-SQOLJ3VE.js} +1 -1
- package/public/chunk-T5MFQC3H.js +1 -0
- package/public/{chunk-H7P6VE6N.js → chunk-T5TGWWEW.js} +1 -1
- package/public/chunk-TJTVEZ2Q.js +1 -0
- package/public/{chunk-Q6YYN5VG.js → chunk-TUSDAICO.js} +1 -1
- package/public/{chunk-3M63ERVL.js → chunk-UQEYJ37C.js} +1 -1
- package/public/{chunk-3S4GXBQG.js → chunk-VAU7GXP6.js} +1 -1
- package/public/{chunk-3LCQQJW4.js → chunk-W6VJMRO6.js} +1 -1
- package/public/{chunk-OOQ26OFQ.js → chunk-WCXHI252.js} +1 -1
- package/public/{chunk-SBQCPYMX.js → chunk-WLNOOGPS.js} +1 -1
- package/public/{chunk-X2IYFUPJ.js → chunk-XTO2AHKJ.js} +1 -1
- package/public/{chunk-GT3HY5R3.js → chunk-Z473TWB3.js} +1 -1
- package/public/index.html +1 -1
- package/public/{main-XQXG3BMO.js → main-USYTEC3L.js} +1 -1
- package/public/chunk-54CTLX7P.js +0 -50
- package/public/chunk-5EUSNLP2.js +0 -1
- package/public/chunk-BMOYETPJ.js +0 -1
- package/public/chunk-E2NK4KHN.js +0 -1
- package/public/chunk-NGK52XOQ.js +0 -1
- package/public/chunk-OND5UHKE.js +0 -1
- package/public/chunk-QTJKJFXI.js +0 -52
- package/public/chunk-RLXU3LMU.js +0 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import{a as nt,b as Fe,c as K}from"./chunk-S6C7GUA2.js";import{m as X,n as J}from"./chunk-56NTNN7A.js";import{C as ee,a as ji,e as ie,l as ne}from"./chunk-KGXF4YD5.js";import{b as Ee}from"./chunk-VAU7GXP6.js";import{l as M}from"./chunk-RZY66DUH.js";import{$b as v,Ab as te,Bb as ae,Bc as Qt,Ca as Ei,Cb as ye,Db as Hi,Eb as Oi,Fa as Bi,H as Si,Ib as R,J as bi,La as Oe,Lb as C,Nb as f,P as Y,Qa as a,Rc as E,Sa as Ke,T as Ti,Ta as Vi,Xb as tt,Xc as Pe,Yb as bt,Za as Di,_a as St,_b as p,_c as we,ac as x,bc as O,cc as Ue,db as T,dc as Ni,ec as Tt,fb as Ai,fc as j,gb as Ii,gc as U,ha as Mi,hc as G,ia as wi,kc as $i,lc as he,mc as N,n as Q,na as w,nc as V,o as ki,oc as Mt,pb as y,pc as it,qb as _,qc as Ri,rb as k,rc as Wi,sa as D,sc as l,ta as A,tb as Li,tc as c,ua as B,ub as Pi,uc as le,va as I,vb as Fi,wb as u,xb as n,yb as s,zb as m}from"./chunk-RERUZJD4.js";var Qe=(function(e){return e.Range="range",e.Steps="steps",e.Positions="positions",e.Count="count",e.Values="values",e})(Qe||{}),Ae=(function(e){return e[e.None=-1]="None",e[e.NoValue=0]="NoValue",e[e.LargeValue=1]="LargeValue",e[e.SmallValue=2]="SmallValue",e})(Ae||{});function ur(e){return Et(e)&&typeof e.from=="function"}function Et(e){return typeof e=="object"&&typeof e.to=="function"}function Ui(e){e.parentElement.removeChild(e)}function Yt(e){return e!=null}function Gi(e){e.preventDefault()}function fr(e){return e.filter(function(o){return this[o]?!1:this[o]=!0},{})}function vr(e,o){return Math.round(e/o)*o}function gr(e,o){var t=e.getBoundingClientRect(),r=e.ownerDocument,i=r.documentElement,d=Ki(r);return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(d.x=0),o?t.top+d.y-i.clientTop:t.left+d.x-i.clientLeft}function Ne(e){return typeof e=="number"&&!isNaN(e)&&isFinite(e)}function zi(e,o,t){t>0&&(Be(e,o),setTimeout(function(){wt(e,o)},t))}function qi(e){return Math.max(Math.min(e,100),0)}function Bt(e){return Array.isArray(e)?e:[e]}function hr(e){e=String(e);var o=e.split(".");return o.length>1?o[1].length:0}function Be(e,o){e.classList&&!/\s/.test(o)?e.classList.add(o):e.className+=" "+o}function wt(e,o){e.classList&&!/\s/.test(o)?e.classList.remove(o):e.className=e.className.replace(new RegExp("(^|\\b)"+o.split(" ").join("|")+"(\\b|$)","gi")," ")}function Cr(e,o){return e.classList?e.classList.contains(o):new RegExp("\\b"+o+"\\b").test(e.className)}function Ki(e){var o=window.pageXOffset!==void 0,t=(e.compatMode||"")==="CSS1Compat",r=o?window.pageXOffset:t?e.documentElement.scrollLeft:e.body.scrollLeft,i=o?window.pageYOffset:t?e.documentElement.scrollTop:e.body.scrollTop;return{x:r,y:i}}function xr(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function yr(){var e=!1;try{var o=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,o)}catch{}return e}function _r(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function Jt(e,o){return 100/(o-e)}function Xt(e,o,t){return o*100/(e[t+1]-e[t])}function kr(e,o){return Xt(e,e[0]<0?o+Math.abs(e[0]):o-e[0],0)}function Sr(e,o){return o*(e[1]-e[0])/100+e[0]}function mt(e,o){for(var t=1;e>=o[t];)t+=1;return t}function br(e,o,t){if(t>=e.slice(-1)[0])return 100;var r=mt(t,e),i=e[r-1],d=e[r],h=o[r-1],Z=o[r];return h+kr([i,d],t)/Jt(h,Z)}function Tr(e,o,t){if(t>=100)return e.slice(-1)[0];var r=mt(t,o),i=e[r-1],d=e[r],h=o[r-1],Z=o[r];return Sr([i,d],(t-h)*Jt(h,Z))}function Mr(e,o,t,r){if(r===100)return r;var i=mt(r,e),d=e[i-1],h=e[i];return t?r-d>(h-d)/2?h:d:o[i-1]?e[i-1]+vr(r-e[i-1],o[i-1]):r}var wr=(function(){function e(o,t,r){this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[r||!1],this.xNumSteps=[!1],this.snap=t;var i,d=[];for(Object.keys(o).forEach(function(h){d.push([Bt(o[h]),h])}),d.sort(function(h,Z){return h[0][0]-Z[0][0]}),i=0;i<d.length;i++)this.handleEntryPoint(d[i][1],d[i][0]);for(this.xNumSteps=this.xSteps.slice(0),i=0;i<this.xNumSteps.length;i++)this.handleStepPoint(i,this.xNumSteps[i])}return e.prototype.getDistance=function(o){for(var t=[],r=0;r<this.xNumSteps.length-1;r++)t[r]=Xt(this.xVal,o,r);return t},e.prototype.getAbsoluteDistance=function(o,t,r){var i=0;if(o<this.xPct[this.xPct.length-1])for(;o>this.xPct[i+1];)i++;else o===this.xPct[this.xPct.length-1]&&(i=this.xPct.length-2);!r&&o===this.xPct[i+1]&&i++,t===null&&(t=[]);var d,h=1,Z=t[i],ce=0,W=0,re=0,ue=0;for(r?d=(o-this.xPct[i])/(this.xPct[i+1]-this.xPct[i]):d=(this.xPct[i+1]-o)/(this.xPct[i+1]-this.xPct[i]);Z>0;)ce=this.xPct[i+1+ue]-this.xPct[i+ue],t[i+ue]*h+100-d*100>100?(W=ce*d,h=(Z-100*d)/t[i+ue],d=1):(W=t[i+ue]*ce/100*h,h=0),r?(re=re-W,this.xPct.length+ue>=1&&ue--):(re=re+W,this.xPct.length-ue>=1&&ue++),Z=t[i+ue]*h;return o+re},e.prototype.toStepping=function(o){return o=br(this.xVal,this.xPct,o),o},e.prototype.fromStepping=function(o){return Tr(this.xVal,this.xPct,o)},e.prototype.getStep=function(o){return o=Mr(this.xPct,this.xSteps,this.snap,o),o},e.prototype.getDefaultStep=function(o,t,r){var i=mt(o,this.xPct);return(o===100||t&&o===this.xPct[i-1])&&(i=Math.max(i-1,1)),(this.xVal[i]-this.xVal[i-1])/r},e.prototype.getNearbySteps=function(o){var t=mt(o,this.xPct);return{stepBefore:{startValue:this.xVal[t-2],step:this.xNumSteps[t-2],highestStep:this.xHighestCompleteStep[t-2]},thisStep:{startValue:this.xVal[t-1],step:this.xNumSteps[t-1],highestStep:this.xHighestCompleteStep[t-1]},stepAfter:{startValue:this.xVal[t],step:this.xNumSteps[t],highestStep:this.xHighestCompleteStep[t]}}},e.prototype.countStepDecimals=function(){var o=this.xNumSteps.map(hr);return Math.max.apply(null,o)},e.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},e.prototype.convert=function(o){return this.getStep(this.toStepping(o))},e.prototype.handleEntryPoint=function(o,t){var r;if(o==="min"?r=0:o==="max"?r=100:r=parseFloat(o),!Ne(r)||!Ne(t[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(r),this.xVal.push(t[0]);var i=Number(t[1]);r?this.xSteps.push(isNaN(i)?!1:i):isNaN(i)||(this.xSteps[0]=i),this.xHighestCompleteStep.push(0)},e.prototype.handleStepPoint=function(o,t){if(t){if(this.xVal[o]===this.xVal[o+1]){this.xSteps[o]=this.xHighestCompleteStep[o]=this.xVal[o];return}this.xSteps[o]=Xt([this.xVal[o],this.xVal[o+1]],t,0)/Jt(this.xPct[o],this.xPct[o+1]);var r=(this.xVal[o+1]-this.xVal[o])/this.xNumSteps[o],i=Math.ceil(Number(r.toFixed(3))-1),d=this.xVal[o]+this.xNumSteps[o]*i;this.xHighestCompleteStep[o]=d}},e})(),Zi={to:function(e){return e===void 0?"":e.toFixed(2)},from:Number},Er={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},Ge={tooltips:".__tooltips",aria:".__aria"};function Br(e,o){if(!Ne(o))throw new Error("noUiSlider: 'step' is not numeric.");e.singleStep=o}function Vr(e,o){if(!Ne(o))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");e.keyboardPageMultiplier=o}function Dr(e,o){if(!Ne(o))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");e.keyboardMultiplier=o}function Ar(e,o){if(!Ne(o))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");e.keyboardDefaultStep=o}function Ir(e,o){if(typeof o!="object"||Array.isArray(o))throw new Error("noUiSlider: 'range' is not an object.");if(o.min===void 0||o.max===void 0)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");e.spectrum=new wr(o,e.snap||!1,e.singleStep)}function Lr(e,o){if(o=Bt(o),!Array.isArray(o)||!o.length)throw new Error("noUiSlider: 'start' option is incorrect.");e.handles=o.length,e.start=o}function Pr(e,o){if(typeof o!="boolean")throw new Error("noUiSlider: 'snap' option must be a boolean.");e.snap=o}function Fr(e,o){if(typeof o!="boolean")throw new Error("noUiSlider: 'animate' option must be a boolean.");e.animate=o}function Hr(e,o){if(typeof o!="number")throw new Error("noUiSlider: 'animationDuration' option must be a number.");e.animationDuration=o}function Qi(e,o){var t=[!1],r;if(o==="lower"?o=[!0,!1]:o==="upper"&&(o=[!1,!0]),o===!0||o===!1){for(r=1;r<e.handles;r++)t.push(o);t.push(!1)}else{if(!Array.isArray(o)||!o.length||o.length!==e.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");t=o}e.connect=t}function Or(e,o){switch(o){case"horizontal":e.ort=0;break;case"vertical":e.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function Yi(e,o){if(!Ne(o))throw new Error("noUiSlider: 'margin' option must be numeric.");o!==0&&(e.margin=e.spectrum.getDistance(o))}function Nr(e,o){if(!Ne(o))throw new Error("noUiSlider: 'limit' option must be numeric.");if(e.limit=e.spectrum.getDistance(o),!e.limit||e.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.")}function $r(e,o){var t;if(!Ne(o)&&!Array.isArray(o))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(o)&&!(o.length===2||Ne(o[0])||Ne(o[1])))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(o!==0){for(Array.isArray(o)||(o=[o,o]),e.padding=[e.spectrum.getDistance(o[0]),e.spectrum.getDistance(o[1])],t=0;t<e.spectrum.xNumSteps.length-1;t++)if(e.padding[0][t]<0||e.padding[1][t]<0)throw new Error("noUiSlider: 'padding' option must be a positive number(s).");var r=o[0]+o[1],i=e.spectrum.xVal[0],d=e.spectrum.xVal[e.spectrum.xVal.length-1];if(r/(d-i)>1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function Rr(e,o){switch(o){case"ltr":e.dir=0;break;case"rtl":e.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function Wr(e,o){if(typeof o!="string")throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var t=o.indexOf("tap")>=0,r=o.indexOf("drag")>=0,i=o.indexOf("fixed")>=0,d=o.indexOf("snap")>=0,h=o.indexOf("hover")>=0,Z=o.indexOf("unconstrained")>=0,ce=o.indexOf("invert-connects")>=0,W=o.indexOf("drag-all")>=0,re=o.indexOf("smooth-steps")>=0;if(i){if(e.handles!==2)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");Yi(e,e.start[1]-e.start[0])}if(ce&&e.handles!==2)throw new Error("noUiSlider: 'invert-connects' behaviour must be used with 2 handles");if(Z&&(e.margin||e.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");e.events={tap:t||d,drag:r,dragAll:W,smoothSteps:re,fixed:i,snap:d,hover:h,unconstrained:Z,invertConnects:ce}}function jr(e,o){if(o!==!1)if(o===!0||Et(o)){e.tooltips=[];for(var t=0;t<e.handles;t++)e.tooltips.push(o)}else{if(o=Bt(o),o.length!==e.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");o.forEach(function(r){if(typeof r!="boolean"&&!Et(r))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")}),e.tooltips=o}}function Ur(e,o){if(o.length!==e.handles)throw new Error("noUiSlider: must pass a attributes for all handles.");e.handleAttributes=o}function Gr(e,o){if(!Et(o))throw new Error("noUiSlider: 'ariaFormat' requires 'to' method.");e.ariaFormat=o}function zr(e,o){if(!ur(o))throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");e.format=o}function qr(e,o){if(typeof o!="boolean")throw new Error("noUiSlider: 'keyboardSupport' option must be a boolean.");e.keyboardSupport=o}function Zr(e,o){e.documentElement=o}function Kr(e,o){if(typeof o!="string"&&o!==!1)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");e.cssPrefix=o}function Qr(e,o){if(typeof o!="object")throw new Error("noUiSlider: 'cssClasses' must be an object.");typeof e.cssPrefix=="string"?(e.cssClasses={},Object.keys(o).forEach(function(t){e.cssClasses[t]=e.cssPrefix+o[t]})):e.cssClasses=o}function Xi(e){var o={margin:null,limit:null,padding:null,animate:!0,animationDuration:300,ariaFormat:Zi,format:Zi},t={step:{r:!1,t:Br},keyboardPageMultiplier:{r:!1,t:Vr},keyboardMultiplier:{r:!1,t:Dr},keyboardDefaultStep:{r:!1,t:Ar},start:{r:!0,t:Lr},connect:{r:!0,t:Qi},direction:{r:!0,t:Rr},snap:{r:!1,t:Pr},animate:{r:!1,t:Fr},animationDuration:{r:!1,t:Hr},range:{r:!0,t:Ir},orientation:{r:!1,t:Or},margin:{r:!1,t:Yi},limit:{r:!1,t:Nr},padding:{r:!1,t:$r},behaviour:{r:!0,t:Wr},ariaFormat:{r:!1,t:Gr},format:{r:!1,t:zr},tooltips:{r:!1,t:jr},keyboardSupport:{r:!0,t:qr},documentElement:{r:!1,t:Zr},cssPrefix:{r:!0,t:Kr},cssClasses:{r:!0,t:Qr},handleAttributes:{r:!1,t:Ur}},r={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:Er,keyboardPageMultiplier:5,keyboardMultiplier:1,keyboardDefaultStep:10};e.format&&!e.ariaFormat&&(e.ariaFormat=e.format),Object.keys(t).forEach(function(ce){if(!Yt(e[ce])&&r[ce]===void 0){if(t[ce].r)throw new Error("noUiSlider: '"+ce+"' is required.");return}t[ce].t(o,Yt(e[ce])?e[ce]:r[ce])}),o.pips=e.pips;var i=document.createElement("div"),d=i.style.msTransform!==void 0,h=i.style.transform!==void 0;o.transformRule=h?"transform":d?"msTransform":"webkitTransform";var Z=[["left","top"],["right","bottom"]];return o.style=Z[o.dir][o.ort],o}function Yr(e,o,t){var r=xr(),i=_r(),d=i&&yr(),h=e,Z,ce,W,re,ue,Te,se=o.spectrum,Re=[],fe=[],De=[],Pt=0,We={},ct=!1,et=e.ownerDocument,Ct=o.documentElement||et.documentElement,xt=et.body,$o=et.dir==="rtl"||o.ort===1?0:100;function je(g,S){var b=et.createElement("div");return S&&Be(b,S),g.appendChild(b),b}function Ro(g,S){var b=je(g,o.cssClasses.origin),L=je(b,o.cssClasses.handle);if(je(L,o.cssClasses.touchArea),L.setAttribute("data-handle",String(S)),o.keyboardSupport&&(L.setAttribute("tabindex","0"),L.addEventListener("keydown",function(F){return nr(F,S)})),o.handleAttributes!==void 0){var P=o.handleAttributes[S];Object.keys(P).forEach(function(F){L.setAttribute(F,P[F])})}return L.setAttribute("role","slider"),L.setAttribute("aria-orientation",o.ort?"vertical":"horizontal"),S===0?Be(L,o.cssClasses.handleLower):S===o.handles-1&&Be(L,o.cssClasses.handleUpper),b.handle=L,b}function Ft(g,S){return S?je(g,o.cssClasses.connect):!1}function Wo(g,S){ce=je(S,o.cssClasses.connects),W=[],re=[],re.push(Ft(ce,g[0]));for(var b=0;b<o.handles;b++)W.push(Ro(S,b)),De[b]=b,re.push(Ft(ce,g[b+1]))}function jo(g){Be(g,o.cssClasses.target),o.dir===0?Be(g,o.cssClasses.ltr):Be(g,o.cssClasses.rtl),o.ort===0?Be(g,o.cssClasses.horizontal):Be(g,o.cssClasses.vertical);var S=getComputedStyle(g).direction;return S==="rtl"?Be(g,o.cssClasses.textDirectionRtl):Be(g,o.cssClasses.textDirectionLtr),je(g,o.cssClasses.base)}function Uo(g,S){return!o.tooltips||!o.tooltips[S]?!1:je(g.firstChild,o.cssClasses.tooltip)}function si(){return h.hasAttribute("disabled")}function Ht(g){var S=W[g];return S.hasAttribute("disabled")}function Go(g){g!=null?(W[g].setAttribute("disabled",""),W[g].handle.removeAttribute("tabindex")):(h.setAttribute("disabled",""),W.forEach(function(S){S.handle.removeAttribute("tabindex")}))}function zo(g){g!=null?(W[g].removeAttribute("disabled"),W[g].handle.setAttribute("tabindex","0")):(h.removeAttribute("disabled"),W.forEach(function(S){S.removeAttribute("disabled"),S.handle.setAttribute("tabindex","0")}))}function Ot(){Te&&(pt("update"+Ge.tooltips),Te.forEach(function(g){g&&Ui(g)}),Te=null)}function li(){Ot(),Te=W.map(Uo),jt("update"+Ge.tooltips,function(g,S,b){if(!(!Te||!o.tooltips)&&Te[S]!==!1){var L=g[S];o.tooltips[S]!==!0&&(L=o.tooltips[S].to(b[S])),Te[S].innerHTML=L}})}function qo(){pt("update"+Ge.aria),jt("update"+Ge.aria,function(g,S,b,L,P){De.forEach(function(F){var z=W[F],$=yt(fe,F,0,!0,!0,!0),de=yt(fe,F,100,!0,!0,!0),me=P[F],ve=String(o.ariaFormat.to(b[F]));$=se.fromStepping($).toFixed(1),de=se.fromStepping(de).toFixed(1),me=se.fromStepping(me).toFixed(1),z.children[0].setAttribute("aria-valuemin",$),z.children[0].setAttribute("aria-valuemax",de),z.children[0].setAttribute("aria-valuenow",me),z.children[0].setAttribute("aria-valuetext",ve)})})}function Zo(g){if(g.mode===Qe.Range||g.mode===Qe.Steps)return se.xVal;if(g.mode===Qe.Count){if(g.values<2)throw new Error("noUiSlider: 'values' (>= 2) required for mode 'count'.");for(var S=g.values-1,b=100/S,L=[];S--;)L[S]=S*b;return L.push(100),ci(L,g.stepped)}return g.mode===Qe.Positions?ci(g.values,g.stepped):g.mode===Qe.Values?g.stepped?g.values.map(function(P){return se.fromStepping(se.getStep(se.toStepping(P)))}):g.values:[]}function ci(g,S){return g.map(function(b){return se.fromStepping(S?se.getStep(b):b)})}function Ko(g){function S(me,ve){return Number((me+ve).toFixed(7))}var b=Zo(g),L={},P=se.xVal[0],F=se.xVal[se.xVal.length-1],z=!1,$=!1,de=0;return b=fr(b.slice().sort(function(me,ve){return me-ve})),b[0]!==P&&(b.unshift(P),z=!0),b[b.length-1]!==F&&(b.push(F),$=!0),b.forEach(function(me,ve){var ge,pe,xe,Me=me,_e=b[ve+1],ke,zt,qt,Zt,xi,Kt,yi,_i=g.mode===Qe.Steps;for(_i&&(ge=se.xNumSteps[ve]),ge||(ge=_e-Me),_e===void 0&&(_e=Me),ge=Math.max(ge,1e-7),pe=Me;pe<=_e;pe=S(pe,ge)){for(ke=se.toStepping(pe),zt=ke-de,xi=zt/(g.density||1),Kt=Math.round(xi),yi=zt/Kt,xe=1;xe<=Kt;xe+=1)qt=de+xe*yi,L[qt.toFixed(5)]=[se.fromStepping(qt),0];Zt=b.indexOf(pe)>-1?Ae.LargeValue:_i?Ae.SmallValue:Ae.NoValue,!ve&&z&&pe!==_e&&(Zt=0),pe===_e&&$||(L[ke.toFixed(5)]=[pe,Zt]),de=ke}}),L}function Qo(g,S,b){var L,P,F=et.createElement("div"),z=(L={},L[Ae.None]="",L[Ae.NoValue]=o.cssClasses.valueNormal,L[Ae.LargeValue]=o.cssClasses.valueLarge,L[Ae.SmallValue]=o.cssClasses.valueSub,L),$=(P={},P[Ae.None]="",P[Ae.NoValue]=o.cssClasses.markerNormal,P[Ae.LargeValue]=o.cssClasses.markerLarge,P[Ae.SmallValue]=o.cssClasses.markerSub,P),de=[o.cssClasses.valueHorizontal,o.cssClasses.valueVertical],me=[o.cssClasses.markerHorizontal,o.cssClasses.markerVertical];Be(F,o.cssClasses.pips),Be(F,o.ort===0?o.cssClasses.pipsHorizontal:o.cssClasses.pipsVertical);function ve(pe,xe){var Me=xe===o.cssClasses.value,_e=Me?de:me,ke=Me?z:$;return xe+" "+_e[o.ort]+" "+ke[pe]}function ge(pe,xe,Me){if(Me=S?S(xe,Me):Me,Me!==Ae.None){var _e=je(F,!1);_e.className=ve(Me,o.cssClasses.marker),_e.style[o.style]=pe+"%",Me>Ae.NoValue&&(_e=je(F,!1),_e.className=ve(Me,o.cssClasses.value),_e.setAttribute("data-value",String(xe)),_e.style[o.style]=pe+"%",_e.innerHTML=String(b.to(xe)))}}return Object.keys(g).forEach(function(pe){ge(pe,g[pe][0],g[pe][1])}),F}function Nt(){ue&&(Ui(ue),ue=null)}function $t(g){Nt();var S=Ko(g),b=g.filter,L=g.format||{to:function(P){return String(Math.round(P))}};return ue=h.appendChild(Qo(S,b,L)),ue}function pi(){var g=Z.getBoundingClientRect(),S="offset"+["Width","Height"][o.ort];return o.ort===0?g.width||Z[S]:g.height||Z[S]}function qe(g,S,b,L){var P=function(z){var $=Yo(z,L.pageOffset,L.target||S);if(!$||si()&&!L.doNotReject||Cr(h,o.cssClasses.tap)&&!L.doNotReject||g===r.start&&$.buttons!==void 0&&$.buttons>1||L.hover&&$.buttons)return!1;d||$.preventDefault(),$.calcPoint=$.points[o.ort],b($,L)},F=[];return g.split(" ").forEach(function(z){S.addEventListener(z,P,d?{passive:!0}:!1),F.push([z,P])}),F}function Yo(g,S,b){var L=g.type.indexOf("touch")===0,P=g.type.indexOf("mouse")===0,F=g.type.indexOf("pointer")===0,z=0,$=0;if(g.type.indexOf("MSPointer")===0&&(F=!0),g.type==="mousedown"&&!g.buttons&&!g.touches)return!1;if(L){var de=function(ge){var pe=ge.target;return pe===b||b.contains(pe)||g.composed&&g.composedPath().shift()===b};if(g.type==="touchstart"){var me=Array.prototype.filter.call(g.touches,de);if(me.length>1)return!1;z=me[0].pageX,$=me[0].pageY}else{var ve=Array.prototype.find.call(g.changedTouches,de);if(!ve)return!1;z=ve.pageX,$=ve.pageY}}return S=S||Ki(et),(P||F)&&(z=g.clientX+S.x,$=g.clientY+S.y),g.pageOffset=S,g.points=[z,$],g.cursor=P||F,g}function di(g){var S=g-gr(Z,o.ort),b=S*100/pi();return b=qi(b),o.dir?100-b:b}function Xo(g){var S=100,b=!1;return W.forEach(function(L,P){if(!Ht(P)){var F=fe[P],z=Math.abs(F-g),$=z===100&&S===100,de=z<S,me=z<=S&&g>F;(de||me||$)&&(b=P,S=z)}}),b}function Jo(g,S){g.type==="mouseout"&&g.target.nodeName==="HTML"&&g.relatedTarget===null&&Rt(g,S)}function er(g,S){if(navigator.appVersion.indexOf("MSIE 9")===-1&&g.buttons===0&&S.buttonsProperty!==0)return Rt(g,S);var b=(o.dir?-1:1)*(g.calcPoint-S.startCalcPoint),L=b*100/S.baseSize;ui(b>0,L,S.locations,S.handleNumbers,S.connect)}function Rt(g,S){S.handle&&(wt(S.handle,o.cssClasses.active),Pt-=1),S.listeners.forEach(function(b){Ct.removeEventListener(b[0],b[1])}),Pt===0&&(wt(h,o.cssClasses.drag),Gt(),g.cursor&&(xt.style.cursor="",xt.removeEventListener("selectstart",Gi))),o.events.smoothSteps&&(S.handleNumbers.forEach(function(b){Ze(b,fe[b],!0,!0,!1,!1)}),S.handleNumbers.forEach(function(b){Ce("update",b)})),S.handleNumbers.forEach(function(b){Ce("change",b),Ce("set",b),Ce("end",b)})}function Wt(g,S){if(!S.handleNumbers.some(Ht)){var b;if(S.handleNumbers.length===1){var L=W[S.handleNumbers[0]];b=L.children[0],Pt+=1,Be(b,o.cssClasses.active)}g.stopPropagation();var P=[],F=qe(r.move,Ct,er,{target:g.target,handle:b,connect:S.connect,listeners:P,startCalcPoint:g.calcPoint,baseSize:pi(),pageOffset:g.pageOffset,handleNumbers:S.handleNumbers,buttonsProperty:g.buttons,locations:fe.slice()}),z=qe(r.end,Ct,Rt,{target:g.target,handle:b,listeners:P,doNotReject:!0,handleNumbers:S.handleNumbers}),$=qe("mouseout",Ct,Jo,{target:g.target,handle:b,listeners:P,doNotReject:!0,handleNumbers:S.handleNumbers});P.push.apply(P,F.concat(z,$)),g.cursor&&(xt.style.cursor=getComputedStyle(g.target).cursor,W.length>1&&Be(h,o.cssClasses.drag),xt.addEventListener("selectstart",Gi,!1)),S.handleNumbers.forEach(function(de){Ce("start",de)})}}function tr(g){g.stopPropagation();var S=di(g.calcPoint),b=Xo(S);b!==!1&&(o.events.snap||zi(h,o.cssClasses.tap,o.animationDuration),Ze(b,S,!0,!0),Gt(),Ce("slide",b,!0),Ce("update",b,!0),o.events.snap?Wt(g,{handleNumbers:[b]}):(Ce("change",b,!0),Ce("set",b,!0)))}function ir(g){var S=di(g.calcPoint),b=se.getStep(S),L=se.fromStepping(b);Object.keys(We).forEach(function(P){P.split(".")[0]==="hover"&&We[P].forEach(function(F){F.call(kt,L)})})}function nr(g,S){if(si()||Ht(S))return!1;var b=["Left","Right"],L=["Down","Up"],P=["PageDown","PageUp"],F=["Home","End"];o.dir&&!o.ort?b.reverse():o.ort&&!o.dir&&(L.reverse(),P.reverse());var z=g.key.replace("Arrow",""),$=z===P[0],de=z===P[1],me=z===L[0]||z===b[0]||$,ve=z===L[1]||z===b[1]||de,ge=z===F[0],pe=z===F[1];if(!me&&!ve&&!ge&&!pe)return!0;g.preventDefault();var xe;if(ve||me){var Me=me?0:1,_e=hi(S),ke=_e[Me];if(ke===null)return!1;ke===!1&&(ke=se.getDefaultStep(fe[S],me,o.keyboardDefaultStep)),de||$?ke*=o.keyboardPageMultiplier:ke*=o.keyboardMultiplier,ke=Math.max(ke,1e-7),ke=(me?-1:1)*ke,xe=Re[S]+ke}else pe?xe=o.spectrum.xVal[o.spectrum.xVal.length-1]:xe=o.spectrum.xVal[0];return Ze(S,se.toStepping(xe),!0,!0),Ce("slide",S),Ce("update",S),Ce("change",S),Ce("set",S),!1}function mi(g){g.fixed||W.forEach(function(S,b){qe(r.start,S.children[0],Wt,{handleNumbers:[b]})}),g.tap&&qe(r.start,Z,tr,{}),g.hover&&qe(r.move,Z,ir,{hover:!0}),g.drag&&re.forEach(function(S,b){if(!(S===!1||b===0||b===re.length-1)){var L=W[b-1],P=W[b],F=[S],z=[L,P],$=[b-1,b];Be(S,o.cssClasses.draggable),g.fixed&&(F.push(L.children[0]),F.push(P.children[0])),g.dragAll&&(z=W,$=De),F.forEach(function(de){qe(r.start,de,Wt,{handles:z,handleNumbers:$,connect:S})})}})}function jt(g,S){We[g]=We[g]||[],We[g].push(S),g.split(".")[0]==="update"&&W.forEach(function(b,L){Ce("update",L)})}function or(g){return g===Ge.aria||g===Ge.tooltips}function pt(g){var S=g&&g.split(".")[0],b=S?g.substring(S.length):g;Object.keys(We).forEach(function(L){var P=L.split(".")[0],F=L.substring(P.length);(!S||S===P)&&(!b||b===F)&&(!or(F)||b===F)&&delete We[L]})}function Ce(g,S,b){Object.keys(We).forEach(function(L){var P=L.split(".")[0];g===P&&We[L].forEach(function(F){F.call(kt,Re.map(o.format.to),S,Re.slice(),b||!1,fe.slice(),kt)})})}function yt(g,S,b,L,P,F,z){var $;return W.length>1&&!o.events.unconstrained&&(L&&S>0&&($=se.getAbsoluteDistance(g[S-1],o.margin,!1),b=Math.max(b,$)),P&&S<W.length-1&&($=se.getAbsoluteDistance(g[S+1],o.margin,!0),b=Math.min(b,$))),W.length>1&&o.limit&&(L&&S>0&&($=se.getAbsoluteDistance(g[S-1],o.limit,!1),b=Math.min(b,$)),P&&S<W.length-1&&($=se.getAbsoluteDistance(g[S+1],o.limit,!0),b=Math.max(b,$))),o.padding&&(S===0&&($=se.getAbsoluteDistance(0,o.padding[0],!1),b=Math.max(b,$)),S===W.length-1&&($=se.getAbsoluteDistance(100,o.padding[1],!0),b=Math.min(b,$))),z||(b=se.getStep(b)),b=qi(b),b===g[S]&&!F?!1:b}function Ut(g,S){var b=o.ort;return(b?S:g)+", "+(b?g:S)}function ui(g,S,b,L,P){var F=b.slice(),z=L[0],$=o.events.smoothSteps,de=[!g,g],me=[g,!g];L=L.slice(),g&&L.reverse(),L.length>1?L.forEach(function(ge,pe){var xe=yt(F,ge,F[ge]+S,de[pe],me[pe],!1,$);xe===!1?S=0:(S=xe-F[ge],F[ge]=xe)}):de=me=[!0];var ve=!1;L.forEach(function(ge,pe){ve=Ze(ge,b[ge]+S,de[pe],me[pe],!1,$)||ve}),ve&&(L.forEach(function(ge){Ce("update",ge),Ce("slide",ge)}),P!=null&&Ce("drag",z))}function fi(g,S){return o.dir?100-g-S:g}function rr(g,S){fe[g]=S,Re[g]=se.fromStepping(S);var b=fi(S,0)-$o,L="translate("+Ut(b+"%","0")+")";if(W[g].style[o.transformRule]=L,o.events.invertConnects&&fe.length>1){var P=fe.every(function(F,z,$){return z===0||F>=$[z-1]});if(ct!==!P){dr();return}}dt(g),dt(g+1),ct&&(dt(g-1),dt(g+2))}function Gt(){De.forEach(function(g){var S=fe[g]>50?-1:1,b=3+(W.length+S*g);W[g].style.zIndex=String(b)})}function Ze(g,S,b,L,P,F){return P||(S=yt(fe,g,S,b,L,!1,F)),S===!1?!1:(rr(g,S),!0)}function dt(g){if(re[g]){var S=fe.slice();ct&&S.sort(function($,de){return $-de});var b=0,L=100;g!==0&&(b=S[g-1]),g!==re.length-1&&(L=S[g]);var P=L-b,F="translate("+Ut(fi(b,P)+"%","0")+")",z="scale("+Ut(P/100,"1")+")";re[g].style[o.transformRule]=F+" "+z}}function vi(g,S){return g===null||g===!1||g===void 0||(typeof g=="number"&&(g=String(g)),g=o.format.from(g),g!==!1&&(g=se.toStepping(g)),g===!1||isNaN(g))?fe[S]:g}function _t(g,S,b){var L=Bt(g),P=fe[0]===void 0;S=S===void 0?!0:S,o.animate&&!P&&zi(h,o.cssClasses.tap,o.animationDuration),De.forEach(function($){Ze($,vi(L[$],$),!0,!1,b)});var F=De.length===1?0:1;if(P&&se.hasNoSize()&&(b=!0,fe[0]=0,De.length>1)){var z=100/(De.length-1);De.forEach(function($){fe[$]=$*z})}for(;F<De.length;++F)De.forEach(function($){Ze($,fe[$],!0,!0,b)});Gt(),De.forEach(function($){Ce("update",$),L[$]!==null&&S&&Ce("set",$)})}function ar(g){_t(o.start,g)}function sr(g,S,b,L){if(g=Number(g),!(g>=0&&g<De.length))throw new Error("noUiSlider: invalid handle number, got: "+g);Ze(g,vi(S,g),!0,!0,L),Ce("update",g),b&&Ce("set",g)}function gi(g){if(g===void 0&&(g=!1),g)return Re.length===1?Re[0]:Re.slice(0);var S=Re.map(o.format.to);return S.length===1?S[0]:S}function lr(){for(pt(Ge.aria),pt(Ge.tooltips),Object.keys(o.cssClasses).forEach(function(g){wt(h,o.cssClasses[g])});h.firstChild;)h.removeChild(h.firstChild);delete h.noUiSlider}function hi(g){var S=fe[g],b=se.getNearbySteps(S),L=Re[g],P=b.thisStep.step,F=null;if(o.snap)return[L-b.stepBefore.startValue||null,b.stepAfter.startValue-L||null];P!==!1&&L+P>b.stepAfter.startValue&&(P=b.stepAfter.startValue-L),L>b.thisStep.startValue?F=b.thisStep.step:b.stepBefore.step===!1?F=!1:F=L-b.stepBefore.highestStep,S===100?P=null:S===0&&(F=null);var z=se.countStepDecimals();return P!==null&&P!==!1&&(P=Number(P.toFixed(z))),F!==null&&F!==!1&&(F=Number(F.toFixed(z))),[F,P]}function cr(){return De.map(hi)}function pr(g,S){var b=gi(),L=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips","connect"];L.forEach(function(F){g[F]!==void 0&&(t[F]=g[F])});var P=Xi(t);L.forEach(function(F){g[F]!==void 0&&(o[F]=P[F])}),se=P.spectrum,o.margin=P.margin,o.limit=P.limit,o.padding=P.padding,o.pips?$t(o.pips):Nt(),o.tooltips?li():Ot(),fe=[],_t(Yt(g.start)?g.start:b,S),g.connect&&Ci()}function Ci(){for(;ce.firstChild;)ce.removeChild(ce.firstChild);for(var g=0;g<=o.handles;g++)re[g]=Ft(ce,o.connect[g]),dt(g);mi({drag:o.events.drag,fixed:!0})}function dr(){ct=!ct,Qi(o,o.connect.map(function(g){return!g})),Ci()}function mr(){Z=jo(h),Wo(o.connect,Z),mi(o.events),_t(o.start),o.pips&&$t(o.pips),o.tooltips&&li(),qo()}mr();var kt={destroy:lr,steps:cr,on:jt,off:pt,get:gi,set:_t,setHandle:sr,reset:ar,disable:Go,enable:zo,__moveHandles:function(g,S,b){ui(g,S,fe,b)},options:t,updateOptions:pr,target:h,removePips:Nt,removeTooltips:Ot,getPositions:function(){return fe.slice()},getTooltips:function(){return Te},getOrigins:function(){return W},pips:$t};return kt}function Ji(e,o){if(!e||!e.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+e);if(e.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");var t=Xi(o),r=Yr(e,t,o);return e.noUiSlider=r,r}var ei=class{to(o){return String(parseFloat(parseFloat(String(o)).toFixed(2)))}from(o){return parseFloat(o)}},oe=(()=>{class e{constructor(t,r,i){this.ngZone=t,this.el=r,this.renderer=i,this.handles=[],this.config={},this.change=new Ke(!0),this.update=new Ke(!0),this.slide=new Ke(!0),this.set=new Ke(!0),this.start=new Ke(!0),this.end=new Ke(!0),this.onChange=Function.prototype,this.cleanups=[],this.eventHandler=(d,h,Z,ce)=>{let W=this.toValues(h),re=!1;if(this.value===void 0){this.value=W;return}Array.isArray(W)&&this.value[Z]!=W[Z]&&(re=!0),!Array.isArray(W)&&this.value!=W&&(re=!0),re&&this.ngZone.run(()=>{d.observers.length>0&&d.emit(W),this.onChange(W)}),Array.isArray(W)?this.value[Z]=W[Z]:this.value=W},this.defaultKeyHandler=d=>{let h=this.slider.steps(),Z=parseInt(d.target.getAttribute("data-handle")),ce=1,W=1,re=0,ue=0;switch(d.which){case 34:W=this.config.pageSteps;break;case 40:case 37:ce=-1,re=h[Z][0],d.preventDefault();break;case 33:W=this.config.pageSteps;break;case 38:case 39:re=h[Z][1],d.preventDefault();break;default:break}ue=ce*W*re;let Te;Array.isArray(this.value)?(Te=[...this.value],Te[Z]=Te[Z]+ue):Te=this.value+ue,this.slider.set(Te)}}ngOnChanges(t){this.slider&&(t.min||t.max||t.step||t.range)&&this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.slider.updateOptions({range:Object.assign({},{min:this.min,max:this.max},this.range||{}),step:this.step})})})}ngOnDestroy(){for(this.slider.destroy();this.cleanups.length;)this.cleanups.pop()?.()}toValues(t){let r=t.map(this.config.format.from);return r.length==1?r[0]:r}writeValue(t){this.slider?this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.slider.set(t)})}):t!==null&&(this.value=t,this.createSlider(t))}registerOnChange(t){this.onChange=t}registerOnTouched(t){}setDisabledState(t){t?this.renderer.setAttribute(this.el.nativeElement.childNodes[0],"disabled","true"):this.renderer.removeAttribute(this.el.nativeElement.childNodes[0],"disabled")}createSlider(t){let r=JSON.parse(JSON.stringify({behaviour:this.behaviour,connect:this.connect,limit:this.limit,start:t,step:this.step,pageSteps:this.pageSteps,keyboard:this.keyboard,onKeydown:this.onKeydown,range:this.range||this.config.range||{min:this.min,max:this.max},tooltips:this.tooltips,snap:this.snap,animate:this.animate}));if(r.tooltips=this.tooltips||this.config.tooltips,r.format=this.format||this.config.format||new ei,this.ngZone.runOutsideAngular(()=>{this.slider=Ji(this.el.nativeElement.querySelector("div"),Object.assign(this.config,r))}),this.handles=[].slice.call(this.el.nativeElement.querySelectorAll(".noUi-handle")),this.config.keyboard){this.config.pageSteps===void 0&&(this.config.pageSteps=10);for(let i of this.handles){i.setAttribute("tabindex",0);let d=this.config.onKeydown||this.defaultKeyHandler;this.ngZone.runOutsideAngular(()=>{this.cleanups.push(this.renderer.listen(i,"keydown",d),this.renderer.listen(i,"click",()=>{i.focus()}))})}}this.slider.on("set",(i,d,h)=>{this.eventHandler(this.set,i,d,h)}),this.slider.on("update",(i,d,h)=>{this.update.observers.length>0&&this.ngZone.run(()=>{this.update.emit(this.toValues(i))})}),this.slider.on("change",(i,d,h)=>{this.change.observers.length>0&&this.ngZone.run(()=>{this.change.emit(this.toValues(i))})}),this.slider.on("slide",(i,d,h)=>{this.eventHandler(this.slide,i,d,h)}),this.slider.on("start",(i,d,h)=>{this.start.observers.length>0&&this.ngZone.run(()=>{this.start.emit(this.toValues(i))})}),this.slider.on("end",(i,d,h)=>{this.end.observers.length>0&&this.ngZone.run(()=>{this.end.emit(this.toValues(i))})})}}return e.\u0275fac=function(t){return new(t||e)(St(Vi),St(Bi),St(Di))},e.\u0275cmp=T({type:e,selectors:[["nouislider"]],hostVars:2,hostBindings:function(t,r){t&2&&bt("ng2-nouislider",!0)},inputs:{disabled:"disabled",behaviour:"behaviour",connect:"connect",limit:"limit",min:"min",max:"max",snap:"snap",animate:"animate",range:"range",step:"step",format:"format",pageSteps:"pageSteps",config:"config",keyboard:"keyboard",onKeydown:"onKeydown",tooltips:"tooltips"},outputs:{change:"change",update:"update",slide:"slide",set:"set",start:"start",end:"end"},features:[$i([{provide:ji,useExisting:Mi(()=>e),multi:!0}]),Ei],decls:1,vars:1,template:function(t,r){t&1&&ye(0,"div"),t&2&&y("disabled",r.disabled?!0:void 0)},styles:["[_nghost-%COMP%]{display:block;margin-top:1rem;margin-bottom:1rem}"]}),e})();var Vt=(e,o)=>({"fa-check-circle":e,"fa-blank":o});function Jr(e,o){if(e&1){let t=R();n(0,"button",6),C("click",function(i){D(t);let d=f(2);return A(d.setTargetMode(0,i))}),n(1,"div",7),m(2,"i",8),s(),p(3),l(4,"translate"),n(5,"div",9),m(6,"i",10),s()()}if(e&2){let t=f(2);a(2),u("ngClass",V(4,Vt,t.targetMode===0,t.targetMode!==0)),a(),x(" ",c(4,2,"accessories.control.manual")," ")}}function ea(e,o){if(e&1){let t=R();n(0,"button",6),C("click",function(i){D(t);let d=f(2);return A(d.setTargetMode(1,i))}),n(1,"div",7),m(2,"i",8),s(),p(3),l(4,"translate"),n(5,"div",9),m(6,"i",10),s()()}if(e&2){let t=f(2);a(2),u("ngClass",V(4,Vt,t.targetMode===1,t.targetMode!==1)),a(),x(" ",c(4,2,"accessories.control.auto")," ")}}function ta(e,o){if(e&1&&(n(0,"h6",12),p(1),l(2,"translate"),s(),n(3,"div",5),l(4,"translate"),_(5,Jr,7,7,"button",13),_(6,ea,7,7,"button",13),s()),e&2){let t=f();a(),v(c(2,4,"accessories.control.mode")),a(2),y("aria-label",c(4,6,"accessories.control.mode_control")),a(2),k(t.targetModeValidValues.includes(0)?5:-1),a(),k(t.targetModeValidValues.includes(1)?6:-1)}}function ia(e,o){if(e&1){let t=R();n(0,"h6",12),p(1),l(2,"translate"),s(),n(3,"nouislider",14),G("ngModelChange",function(i){D(t);let d=f();return U(d.targetRotationSpeed.value,i)||(d.targetRotationSpeed.value=i),A(i)}),C("ngModelChange",function(){D(t);let i=f();return A(i.onTargetRotationSpeedChange())}),s()}if(e&2){let t=f();a(),O("",c(2,6,"accessories.control.rotation_speed"),": ",t.targetRotationSpeed.value,"%"),a(2),u("min",t.targetRotationSpeed.min)("max",t.targetRotationSpeed.max)("step",t.targetRotationSpeed.step),j("ngModel",t.targetRotationSpeed.value)}}var en=(()=>{class e{$activeModal=w(X);service;$accessories;stateSubscription;targetState;targetMode;targetModeValidValues=[];targetRotationSpeed;targetRotationSpeedChanged=new Q;constructor(){this.targetRotationSpeedChanged.pipe(Y(500)).subscribe(()=>{this.service.getCharacteristic("RotationSpeed").setValue(this.targetRotationSpeed.value),this.targetRotationSpeed.value&&!this.targetState?(this.targetState=1,"Active"in this.service.values?this.service.getCharacteristic("Active").setValue(1):"On"in this.service.values&&this.service.getCharacteristic("On").setValue(!0)):!this.targetRotationSpeed.value&&this.targetState&&(this.targetState=0,"Active"in this.service.values?this.service.getCharacteristic("Active").setValue(0):"On"in this.service.values&&this.service.getCharacteristic("On").setValue(!1))})}ngOnInit(){this.targetState="Active"in this.service.values?this.service.values.Active:this.service.values.On?1:0,this.targetMode=this.service.values.TargetAirPurifierState,"TargetAirPurifierState"in this.service.values&&(this.targetModeValidValues=this.service.getCharacteristic("TargetAirPurifierState").validValues),this.loadRotationSpeed(),this.$accessories&&(this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetState="Active"in this.service.values?this.service.values.Active:this.service.values.On?1:0,this.targetMode=this.service.values.TargetAirPurifierState,this.targetRotationSpeed&&(this.targetRotationSpeed.value=this.service.getCharacteristic("RotationSpeed")?.value)}))}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setTargetState(t,r){this.targetState=t,"Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.targetState):"On"in this.service.values&&this.service.getCharacteristic("On").setValue(this.targetState===1),r.target.blur()}setTargetMode(t,r){this.targetMode=t,this.service.getCharacteristic("TargetAirPurifierState").setValue(this.targetMode),r.target.blur()}onTargetRotationSpeedChange(){this.targetRotationSpeedChanged.next(this.targetRotationSpeed.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadRotationSpeed(){let t=this.service.getCharacteristic("RotationSpeed");t&&(this.targetRotationSpeed={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(i=>{i.style.background="linear-gradient(to right, #add8e6, #416bdf)"})},10))}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:25,vars:23,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[1,"mt-4"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"div",5),l(7,"translate"),n(8,"button",6),C("click",function(h){return i.setTargetState(0,h)}),n(9,"div",7),m(10,"i",8),s(),p(11),l(12,"translate"),n(13,"div",9),m(14,"i",10),s()(),n(15,"button",6),C("click",function(h){return i.setTargetState(1,h)}),n(16,"div",7),m(17,"i",8),s(),p(18),l(19,"translate"),n(20,"div",9),m(21,"i",10),s()()(),_(22,ta,7,8),_(23,ia,4,8),s(),m(24,"div",11),s()),r&2&&(a(2),u("innerText",i.service.customName||i.service.serviceName),a(),y("aria-label",c(4,9,"form.button_close")),a(3),y("aria-label",c(7,11,"accessories.control.state_control")),a(4),u("ngClass",V(17,Vt,i.targetState===0,i.targetState!==0)),a(),x(" ",c(12,13,"accessories.control.off")," "),a(6),u("ngClass",V(20,Vt,i.targetState===1,i.targetState!==1)),a(),x(" ",c(19,15,"accessories.control.on")," "),a(4),k(i.targetModeValidValues.length?22:-1),a(),k(i.targetRotationSpeed?23:-1))},dependencies:[ee,ie,ne,oe,E,M],styles:[".purifying svg .air-wave{animation:_ngcontent-%COMP%_wave-motion 5s ease-in-out infinite;stroke:#1976d2;stroke-opacity:.5} .purifying svg .bottom-line{animation-delay:.4s}@keyframes _ngcontent-%COMP%_wave-motion{0%,to{transform:translateY(0);stroke-opacity:.5}50%{transform:translateY(2px);stroke-opacity:1}}"]})}return e})();var q=(()=>{class e{downTimeout;done=!1;touchInProgress=!1;touchStartTime=0;duration=350;longClick=Qt();shortClick=Qt();onEnter(t){this.shortClick.emit(t)}onMouseUp(t){!this.touchInProgress&&!this.isSyntheticEvent()&&(clearTimeout(this.downTimeout),this.done||(this.done=!0,this.shortClick.emit(t)))}onTouchEnd(t){clearTimeout(this.downTimeout),this.done||(this.done=!0,this.shortClick.emit(t)),setTimeout(()=>{this.touchInProgress=!1},150)}onMouseDown(t){if("touches"in t){this.touchInProgress=!0,this.done=!1,this.touchStartTime=Date.now(),t.cancelable&&this.isSafariMobile()&&t.preventDefault(),this.downTimeout=setTimeout(()=>{this.done||(this.done=!0,this.longClick.emit(t))},this.duration);return}!this.touchInProgress&&!this.isSyntheticEvent()&&t.button===0&&(this.done=!1,this.downTimeout=setTimeout(()=>{this.done||(this.done=!0,this.longClick.emit(t))},this.duration))}onMouseMove(){this.done=!0,clearTimeout(this.downTimeout)}isSyntheticEvent(){let t=Date.now()-this.touchStartTime;return this.touchInProgress&&t<300}isSafariMobile(){let t=navigator.userAgent;return/iPad|iPhone|iPod/.test(t)&&/Safari/.test(t)&&!/Chrome|CriOS|FxiOS|EdgiOS/.test(t)}ngOnDestroy(){clearTimeout(this.downTimeout),this.touchInProgress=!1}static \u0275fac=function(r){return new(r||e)};static \u0275dir=Ai({type:e,selectors:[["","shortClick",""],["","longClick",""]],hostBindings:function(r,i){r&1&&C("keyup.enter",function(h){return i.onEnter(h)})("mouseup",function(h){return i.onMouseUp(h)})("touchend",function(h){return i.onTouchEnd(h)})("touchstart",function(h){return i.onMouseDown(h)})("mousedown",function(h){return i.onMouseDown(h)})("mousemove",function(h){return i.onMouseMove(h)})("touchmove",function(h){return i.onMouseMove(h)})},inputs:{duration:"duration"},outputs:{longClick:"longClick",shortClick:"shortClick"}})}return e})();var na=(e,o)=>({"accessory-on":e,purifying:o});function oa(e,o){if(e&1&&(n(0,"div",18),p(1),s()),e&2){let t=f(2);a(),x("",t.service.values.RotationSpeed,"%")}}function ra(e,o){e&1&&(n(0,"div",18),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.on")))}function aa(e,o){if(e&1&&_(0,oa,2,1,"div",18)(1,ra,3,3,"div",18),e&2){let t=f();k("RotationSpeed"in t.service.values?0:1)}}function sa(e,o){e&1&&(n(0,"div",18),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.idle")))}function la(e,o){e&1&&(n(0,"div",18),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.off")))}var tn=(()=>{class e{$accessories=w(K);$modal=w(J);hasTargetValidValues=!1;service;readyForControl=!1;ngOnInit(){"TargetAirPurifierState"in this.service.values&&(this.hasTargetValidValues=this.service.getCharacteristic("TargetAirPurifierState").validValues.length>0)}onClick(){this.readyForControl&&("Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1):"On"in this.service.values&&this.service.getCharacteristic("On").setValue(!this.service.values.On))}onLongClick(){if(this.readyForControl&&(this.hasTargetValidValues||"RotationSpeed"in this.service.values)){let t=this.$modal.open(en,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-air-purifier"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:23,vars:9,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["d","M3,3.0706147 C3.28945166,3.8007217 5.978098,4.1773883 10.0660175,4.2006147 C12.5085124,4.2144929 18.5053297,1.8514837 22.4060749,1.1943647 C24.1588716,0.898084 26.5955382,1.1756219 28.716875,2.0221772","stroke","#7f7f7f","fill","transparent","stroke-width","1.5","stroke-linecap","round",1,"air-wave"],["d","M3,9.0706147 C3.28945166,9.8007217 5.978098,10.1773883 10.0660175,10.2006147 C12.5085124,10.2144929 18.5053297,7.8514837 22.4060749,7.1943647 C24.1588716,6.898084 26.5955382,7.1756219 28.716875,8.0221772","stroke","#7f7f7f","fill","transparent","stroke-width","1.5","stroke-linecap","round",1,"air-wave","bottom-line"],["x1","7","y1","14","x2","25","y2","14","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","7","y1","14","x2","2","y2","23","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","25","y1","14","x2","30","y2","23","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","8","y1","16.5","x2","24","y2","16.5","stroke","#7f7f7f","stroke-width","1","stroke-linecap","round"],["x1","7","y1","18.5","x2","25","y2","18.5","stroke","#7f7f7f","stroke-width","1","stroke-linecap","round"],["x1","6","y1","20.5","x2","26","y2","20.5","stroke","#7f7f7f","stroke-width","1","stroke-linecap","round"],["x1","2","y1","23","x2","30","y2","23","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","30","y1","23","x2","30","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","2","y1","23","x2","2","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["cx","15.5","cy","27","r","2.5","stroke","#7f7f7f","stroke-width","1","fill","#1976d2","fill-opacity","0.5"],["x1","2","y1","31","x2","30","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(r,i){r&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"path",4)(6,"path",5)(7,"line",6)(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"circle",15)(17,"line",16),s()(),I(),n(18,"div",17),p(19),s(),_(20,aa,2,1)(21,sa,3,3,"div",18)(22,la,3,3,"div",18),s()()),r&2&&(u("ngClass",V(6,na,i.service.values.Active&&!("CurrentAirPurifierState"in i.service.values)||i.service.values.Active&&"CurrentAirPurifierState"in i.service.values&&i.service.values.CurrentAirPurifierState!==0||i.service.values.On,i.service.values.Active&&!("CurrentAirPurifierState"in i.service.values)||i.service.values.Active&&"CurrentAirPurifierState"in i.service.values&&i.service.values.CurrentAirPurifierState===2||i.service.values.On)),a(2),y("aria-label",c(3,4,"accessories.core.air_purifier")),a(17),v(i.service.customName||i.service.serviceName),a(),k(i.service.values.Active&&!("CurrentAirPurifierState"in i.service.values)||i.service.values.Active&&"CurrentAirPurifierState"in i.service.values&&i.service.values.CurrentAirPurifierState===2||i.service.values.On?20:i.service.values.Active&&!("CurrentAirPurifierState"in i.service.values)||i.service.values.Active&&"CurrentAirPurifierState"in i.service.values&&i.service.values.CurrentAirPurifierState===1||i.service.values.On?21:22))},dependencies:[q,E,M],styles:[".purifying svg .air-wave{animation:_ngcontent-%COMP%_wave-motion 5s ease-in-out infinite;stroke:#1976d2;stroke-opacity:.5} .purifying svg .bottom-line{animation-delay:.4s}@keyframes _ngcontent-%COMP%_wave-motion{0%,to{transform:translateY(0);stroke-opacity:.5}50%{transform:translateY(2px);stroke-opacity:1}}"]})}return e})();var ca=()=>[3,4],pa=()=>[1,2],da=(e,o,t,r)=>({"accessory-on":e,"fill-red":o,"fill-orange":t,"fill-green":r}),ma=(e,o)=>({"grey-text":e,"red-text":o}),nn=(()=>{class e{service;labels=["Unknown","Excellent","Good","Fair","Inferior","Poor"];static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-air-quality-sensor"]],inputs:{service:"service"},decls:25,vars:17,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["transform","translate(5.1, 3) scale(0.68)"],["fill","#7f7f7f","d","M10.1435881,25.4905179 C10.286009,26.7050605 10.531254,27.9706077 10.8919121,29.2887103 C6.25942062,27.4175104 3.57173247,24.180341 2.39781526,19.889403 C1.54190101,16.760839 1.56931096,13.3702525 2.13724518,10.1783222 C2.1501971,10.1055292 2.17646546,9.96330988 2.17646546,9.96330988 C2.17646546,9.96330988 2.33770347,10.0208429 2.92620872,10.2769757 C4.60998953,11.0098007 6.29364519,11.9318703 7.85704035,13.0517448 C9.19214306,14.0080913 10.3087445,15.0188915 11.223018,16.0899229 L11.223018,16.0899229 C10.426841,18.1910249 9.96797687,20.5297906 9.99206994,23.1241613 L5.43414987,14.7605739 C5.30203551,14.5181498 4.99858593,14.4288208 4.75637627,14.5610522 C4.51416661,14.6932836 4.42491674,14.9970019 4.5570311,15.2394261 L10.1435881,25.4905179 Z M13.0333542,29.4136738 C10.9912074,19.9059085 11.088992,14.922477 21.5133004,6.73565972 C23.6127007,5.0868782 25.9746706,4.01306759 28.2881453,3.03596757 C29.0967374,2.69445726 29.3182746,2.61774651 29.3182746,2.61774651 C29.3182746,2.61774651 29.3543667,2.80737221 29.3721623,2.90442957 C30.1524904,7.1603367 30.190151,11.6811187 29.0141452,15.8525373 C27.1508473,22.4618551 22.5118613,27.1961122 14.1841552,29.413553 L25.4116309,9.74806947 C25.5485147,9.50831075 25.46529,9.20288341 25.2257434,9.06587843 C24.9861969,8.92887344 24.6810398,9.01217181 24.544156,9.25193053 L13.0333542,29.4136738 Z M13.4880693,32 C38.9655056,25.5 30.755735,0 30.755735,0 C30.755735,0 17.0308715,3.72274828 11.9893965,14.5 C7.99293593,9 0.873098889,8 0.873098889,8 C-3.99644586,30.5 13.4880693,32 13.4880693,32 Z",1,"leaves"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label",3,"ngClass"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4),n(6,"g",5),m(7,"path",6),s(),m(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19),s()(),I(),n(21,"div",20),p(22),s(),n(23,"div",21),p(24),s()()()),r&2&&(u("ngClass",it(9,da,i.service.values.AirQuality===5,i.service.values.AirQuality===5,he(7,ca).includes(i.service.values.AirQuality),he(8,pa).includes(i.service.values.AirQuality))),a(2),y("aria-label",c(3,5,"accessories.core.air_quality_sensor")),a(20),v(i.service.customName||i.service.serviceName),a(),u("ngClass",V(14,ma,i.service.values.AirQuality<5,i.service.values.AirQuality===5)),a(),x(" ",i.labels[i.service.values.AirQuality||0]," "))},dependencies:[E,M],styles:[".fill-red svg .leaves{fill:#d32f2f!important;fill-opacity:.5!important} .fill-orange svg .leaves{fill:#ff9800!important;fill-opacity:.5!important} .fill-green svg .leaves{fill:#4caf50!important;fill-opacity:.5!important}"]})}return e})();var ua=e=>({"accessory-on":e});function fa(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.battery_notcharging")," ")}function va(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.battery_charging")," ")}function ga(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.battery_notchargeable")," ")}function ha(e,o){e&1&&(n(0,"span",10),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.battery_low")))}function Ca(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.battery_charged")," ")}var on=(()=>{class e{service;Math=Math;static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-battery"]],inputs:{service:"service"},decls:18,vars:12,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","5","height","13","rx","2","stroke","none","stroke-width","0"],["x","29.5","y","8","width","2","height","7","rx","2","stroke","none","fill","#7f7f7f","stroke-width","1"],["x","1","y","5","width","29","height","13","rx","2","stroke","#7f7f7f","fill","none","stroke-width","0.75"],["x","16","y","28","font-size","9","text-anchor","middle","fill","#7f7f7f","font-family","Arial, sans-serif"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"red-text"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4)(6,"rect",5)(7,"rect",6),n(8,"text",7),p(9),s()()(),I(),n(10,"div",8),p(11),s(),n(12,"div",9),_(13,fa,2,3)(14,va,2,3)(15,ga,2,3)(16,ha,3,3,"span",10)(17,Ca,2,3),s()()()),r&2&&(u("ngClass",N(10,ua,i.service.values.ChargingState===1)),a(2),y("aria-label",c(3,8,"accessories.core.battery")),a(3),y("width",i.Math.round(29/100*(i.service.values.BatteryLevel||0)))("fill",i.service.values.ChargingState===1?"#4caf50":i.service.values.StatusLowBattery===1?"#e69533":"#808080")("fill-opacity",i.service.values.ChargingState===1||i.service.values.StatusLowBattery===1?"0.5":"1"),a(4),x(" ",i.service.values.BatteryLevel||0,"% "),a(2),v(i.service.customName||i.service.serviceName),a(2),k(i.service.values.ChargingState===0?13:i.service.values.ChargingState===1?14:i.service.values.ChargingState===2?15:i.service.values.StatusLowBattery===1||i.service.values.BatteryLevel===0?16:17))},dependencies:[E,M],styles:['.batterylevel-battery[_ngcontent-%COMP%]{position:relative;width:75px;height:30px;border:1px solid rgb(128,128,128);border-radius:4px;margin-bottom:6px;text-align:center;display:flex;align-items:center;justify-content:center;color:#d3d3d3;font-size:14px}.batterylevel-battery[_ngcontent-%COMP%]:after{content:"";position:absolute;top:7px;right:-6px;width:6px;height:13px;background-color:gray;border-radius:2px}.batterylevel-battery[_ngcontent-%COMP%] .battery-level-fill[_ngcontent-%COMP%]{position:absolute;top:0;left:0;height:100%;background-color:gray;z-index:1;transition:width .3s ease-in-out}.batterylevel-battery[_ngcontent-%COMP%] .battery-text[_ngcontent-%COMP%]{position:relative;z-index:2}.batterylevel-battery[_ngcontent-%COMP%] .battery-over[_ngcontent-%COMP%]{color:#d3d3d3}.batterylevel-battery[_ngcontent-%COMP%] .battery-under[_ngcontent-%COMP%]{color:gray}@media (max-width: 575px){.batterylevel-battery[_ngcontent-%COMP%]{width:50px;height:25px;font-size:12px}.batterylevel-battery[_ngcontent-%COMP%]:after{top:4px}}.lowbattery[_ngcontent-%COMP%] .battery-level-fill[_ngcontent-%COMP%]{background-color:#e69533}.charging[_ngcontent-%COMP%] .battery-level-fill[_ngcontent-%COMP%]{background-color:#4caf50}']})}return e})();var xa=e=>({"accessory-on":e});function ya(e,o){e&1&&(n(0,"div",16),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.detected")))}function _a(e,o){e&1&&(n(0,"div",17),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.not_detected")))}var rn=(()=>{class e{service;static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-carbon-dioxide-sensor"]],inputs:{service:"service"},decls:21,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","30","height","12","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.25"],["text-anchor","middle","dominant-baseline","middle","font-family","Arial","font-size","7.5","x","16","y","7.7","fill","#7f7f7f","stroke-width","0.6","font-weight","900",1,"type"],["x1","6","y1","14.5","x2","25.5","y2","14.5","stroke","#1976d2","stroke-opacity","0.5","stroke-width","2"],["stroke-linecap","round","x1","5","y1","13","x2","6.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","11","y1","13","x2","11","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","15.5","y1","13","x2","15.5","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","20","y1","13","x2","20","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","26","y1","13","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","6.5","y1","16","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["d","M3,24.0706147 C3.28945166,24.8007217 5.978098,25.1773883 10.0660175,25.2006147 C12.5085124,25.2144929 18.5053297,22.8514837 22.4060749,22.1943647 C24.1588716,21.898084 26.5955382,22.1756219 28.716875,23.0221772","stroke","#7f7f7f","fill","transparent","stroke-width","1.5","stroke-linecap","round",1,"air-line"],["d","M3,30.0706147 C3.28945166,30.8007217 5.978098,31.1773883 10.0660175,31.2006147 C12.5085124,31.2144929 18.5053297,28.8514837 22.4060749,28.1943647 C24.1588716,27.898084 26.5955382,28.1756219 28.716875,29.0221772","stroke","#7f7f7f","fill","transparent","stroke-width","1.5","stroke-linecap","round",1,"air-line"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4),n(6,"text",5),p(7," CO2 "),s(),m(8,"line",6)(9,"line",7)(10,"line",8)(11,"line",9)(12,"line",10)(13,"line",11)(14,"line",12)(15,"path",13)(16,"path",14),s()(),I(),n(17,"div",15),p(18),s(),_(19,ya,3,3,"div",16)(20,_a,3,3,"div",17),s()()),r&2&&(u("ngClass",N(6,xa,i.service.values.CarbonDioxideDetected)),a(2),y("aria-label",c(3,4,"accessories.core.carbon_dioxide_sensor")),a(16),v(i.service.customName||i.service.serviceName),a(),k(i.service.values.CarbonDioxideDetected?19:20))},dependencies:[E,M],styles:[".accessory-on svg .air-line{stroke:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite} .accessory-on svg .type{fill:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{opacity:1}50%{opacity:.2}}"]})}return e})();var ka=e=>({"accessory-on":e});function Sa(e,o){e&1&&(n(0,"div",16),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.detected")))}function ba(e,o){e&1&&(n(0,"div",17),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.not_detected")))}var an=(()=>{class e{service;static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-carbon-monoxide-sensor"]],inputs:{service:"service"},decls:21,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","30","height","12","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.25"],["text-anchor","middle","dominant-baseline","middle","font-family","Arial","font-size","7.5","x","16","y","7.7","fill","#7f7f7f","stroke-width","0.6","font-weight","900",1,"type"],["x1","6","y1","14.5","x2","25.5","y2","14.5","stroke","#1976d2","stroke-opacity","0.5","stroke-width","2"],["stroke-linecap","round","x1","5","y1","13","x2","6.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","11","y1","13","x2","11","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","15.5","y1","13","x2","15.5","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","20","y1","13","x2","20","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","26","y1","13","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","6.5","y1","16","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["d","M3,23 C6,25 9,21 12,23 C15,25 18,21 21,23 C24,25 27,21 30,23","stroke","#7f7f7f","fill","transparent","stroke-width","1.5","stroke-linecap","round",1,"air-line"],["d","M3,30 C6,32 9,28 12,30 C15,32 18,28 21,30 C24,32 27,28 30,30","stroke","#7f7f7f","fill","transparent","stroke-width","1.5","stroke-linecap","round",1,"air-line"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4),n(6,"text",5),p(7," CO "),s(),m(8,"line",6)(9,"line",7)(10,"line",8)(11,"line",9)(12,"line",10)(13,"line",11)(14,"line",12)(15,"path",13)(16,"path",14),s()(),I(),n(17,"div",15),p(18),s(),_(19,Sa,3,3,"div",16)(20,ba,3,3,"div",17),s()()),r&2&&(u("ngClass",N(6,ka,i.service.values.CarbonMonoxideDetected)),a(2),y("aria-label",c(3,4,"accessories.core.carbon_monoxide_sensor")),a(16),v(i.service.customName||i.service.serviceName),a(),k(i.service.values.CarbonMonoxideDetected?19:20))},dependencies:[E,M],styles:[".accessory-on svg .air-line{stroke:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite} .accessory-on svg .type{fill:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{opacity:1}50%{opacity:.2}}"]})}return e})();var Ta=e=>({"accessory-on":e});function Ma(e,o){e&1&&(n(0,"div",9),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.open")))}function wa(e,o){e&1&&(n(0,"div",10),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.closed")))}var sn=(()=>{class e{service;static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-contact-sensor"]],inputs:{service:"service"},decls:13,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","15","height","30","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.5",1,"left-object"],["x","16","y","1","width","15","height","30","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.5",1,"right-object"],["x","10","y","11","width","6","height","10","rx","1","stroke","#7f7f7f","fill","#4caf50","fill-opacity","0.5","stroke-width","0.5",1,"left-sensor"],["x","16","y","11","width","6","height","10","rx","1","stroke","#7f7f7f","fill","#4caf50","fill-opacity","0.5","stroke-width","0.5",1,"right-sensor"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7),s()(),I(),n(9,"div",8),p(10),s(),_(11,Ma,3,3,"div",9)(12,wa,3,3,"div",10),s()()),r&2&&(u("ngClass",N(6,Ta,i.service.values.ContactSensorState)),a(2),y("aria-label",c(3,4,"accessories.core.contact_sensor")),a(8),v(i.service.customName||i.service.serviceName),a(),k(i.service.values.ContactSensorState?11:12))},dependencies:[E,M],styles:[".accessory-on svg .left-sensor{fill:#ff9800;fill-opacity:.5} .accessory-on svg .right-object{x:24px} .accessory-on svg .right-sensor{x:24px;fill:#ff9800;fill-opacity:.5}"]})}return e})();function Ea(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.closed")," ")}function Ba(e,o){if(e&1&&(p(0),l(1,"translate")),e&2){let t=f(2);O(" ",c(1,2,"accessories.control.open")," ",t.service.getCharacteristic("CurrentPosition").value,"% ")}}function Va(e,o){if(e&1&&_(0,Ea,2,3)(1,Ba,2,4),e&2){let t=f();k(t.service.values.CurrentPosition===0?0:1)}}function Da(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.opening"),"... ")}function Aa(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.closing"),"... ")}var ln=(()=>{class e{$activeModal=w(X);service;$accessories;stateSubscription;targetMode;targetPositionChanged=new Q;targetPosition;constructor(){this.targetPositionChanged.pipe(Y(500)).subscribe(()=>{this.service.getCharacteristic("CurrentPosition").value<this.targetPosition.value?this.service.values.PositionState=1:this.service.getCharacteristic("CurrentPosition").value>this.targetPosition.value&&(this.service.values.PositionState=0),this.service.getCharacteristic("TargetPosition").setValue(this.targetPosition.value)})}ngOnInit(){this.targetMode=this.service.values.On,this.loadTargetPosition(),this.$accessories&&(this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetMode=this.service.values.On,this.targetPosition&&(this.targetPosition.value=this.service.getCharacteristic("TargetPosition")?.value)}))}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}onTargetPositionChange(){this.targetPositionChanged.next(this.targetPosition.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadTargetPosition(){let t=this.service.getCharacteristic("TargetPosition");t&&(this.targetPosition={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(i=>{i.style.background="linear-gradient(to right, #242424, #ffd6aa)"})},10))}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:34,vars:34,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"d-flex","justify-content-center","mb-0","p-0"],[1,"mb-0","mx-0","p-3","btn-read","w-100"],[1,"mt-4"],[1,"mb-1",3,"ngModelChange","min","max","step","ngModel"],[1,"d-flex","justify-content-between","align-items-center","mt-0","mb-1"],[1,"grey-text","small"],[1,"mb-1",3,"ngModelChange","min","max","step","disabled","ngModel"],[1,"modal-footer"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"div",5)(7,"div",6),_(8,Va,2,1)(9,Da,2,3)(10,Aa,2,3),s()(),n(11,"h6",7),p(12),l(13,"translate"),s(),n(14,"nouislider",8),G("ngModelChange",function(h){return U(i.targetPosition.value,h)||(i.targetPosition.value=h),h}),C("ngModelChange",function(){return i.onTargetPositionChange()}),s(),n(15,"div",9)(16,"span",10),p(17),l(18,"translate"),s(),n(19,"span",10),p(20),l(21,"translate"),s()(),n(22,"h6",7),p(23),l(24,"translate"),s(),n(25,"nouislider",11),G("ngModelChange",function(h){return U(i.service.getCharacteristic("CurrentPosition").value,h)||(i.service.getCharacteristic("CurrentPosition").value=h),h}),s(),n(26,"div",9)(27,"span",10),p(28),l(29,"translate"),s(),n(30,"span",10),p(31),l(32,"translate"),s()()(),m(33,"div",12),s()),r&2&&(a(2),u("innerText",i.service.customName||i.service.serviceName),a(),y("aria-label",c(4,20,"form.button_close")),a(5),k(i.service.values.PositionState===2?8:i.service.values.PositionState===1?9:i.service.values.PositionState===0?10:-1),a(4),O("",c(13,22,"accessories.control.target"),": ",i.targetPosition.value,"%"),a(2),u("min",i.targetPosition.min)("max",i.targetPosition.max)("step",i.targetPosition.step),j("ngModel",i.targetPosition.value),a(3),v(c(18,24,"accessories.control.closed")),a(3),v(c(21,26,"accessories.control.open")),a(3),O(" ",c(24,28,"accessories.control.current"),": ",i.service.getCharacteristic("CurrentPosition").value,"% "),a(2),u("min",0)("max",100)("step",1)("disabled",!0),j("ngModel",i.service.getCharacteristic("CurrentPosition").value),a(3),v(c(29,30,"accessories.control.closed")),a(3),v(c(32,32,"accessories.control.open")))},dependencies:[oe,ee,ie,ne,M],encapsulation:2})}return e})();var Ia=e=>({"accessory-on":e});function La(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.closed")," ")}function Pa(e,o){if(e&1&&(p(0),l(1,"translate")),e&2){let t=f(2);O(" ",c(1,2,"accessories.control.open")," ",t.service.values.CurrentPosition,"% ")}}function Fa(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.open")," ")}function Ha(e,o){if(e&1&&(n(0,"div",11),_(1,La,2,3),_(2,Pa,2,4),_(3,Fa,2,3),s()),e&2){let t=f();a(),k(t.service.values.CurrentPosition===0?1:-1),a(),k(t.service.values.CurrentPosition>0&&t.service.values.CurrentPosition<100?2:-1),a(),k(t.service.values.CurrentPosition===100?3:-1)}}function Oa(e,o){e&1&&(n(0,"div",12),p(1),l(2,"translate"),s()),e&2&&(a(),x("",c(2,1,"accessories.control.opening"),"..."))}function Na(e,o){e&1&&(n(0,"div",12),p(1),l(2,"translate"),s()),e&2&&(a(),x("",c(2,1,"accessories.control.closing"),"..."))}var cn=(()=>{class e{$accessories=w(K);$modal=w(J);service;readyForControl=!1;onClick(){this.readyForControl&&(this.service.values.TargetPosition?this.service.getCharacteristic("TargetPosition").setValue(0):this.service.getCharacteristic("TargetPosition").setValue(100))}onLongClick(){if(!this.readyForControl)return;let t=this.$modal.open(ln,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-door"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:16,vars:8,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","7.8","y","0.8","width","16.4","height","30.2","rx","0.5","stroke","#7f7f7f","fill","none","stroke-width","1.5"],["x","9.6","y","2.6","width","12.8","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1",1,"outline"],["x","11.2","y","4.2","width","9.6","height","10.8","stroke","#7f7f7f","fill-opacity","0","stroke-width","0.5","rx","0.25",1,"panel"],["x","11.2","y","16.8","width","9.6","height","10.8","stroke","#7f7f7f","fill-opacity","0","stroke-width","0.5","rx","0.25",1,"panel"],["x1","0","y1","31","x2","32","y2","31","stroke","#7f7f7f","stroke-width","1.5"],["x","19.25","y","15.87","width","1.55","height","0.05","stroke","#1976d2","fill","none","stroke-width","0.5","rx","10",1,"handle"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","red-text"]],template:function(r,i){r&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7)(9,"line",8)(10,"rect",9),s()(),I(),n(11,"div",10),p(12),s(),_(13,Ha,4,3,"div",11)(14,Oa,3,3,"div",12)(15,Na,3,3,"div",12),s()()),r&2&&(u("ngClass",N(6,Ia,i.service.values.CurrentPosition)),a(2),y("aria-label",c(3,4,"accessories.core.door")),a(10),v(i.service.customName||i.service.serviceName),a(),k(i.service.values.PositionState===2?13:i.service.values.PositionState===1?14:i.service.values.PositionState===0?15:-1))},dependencies:[q,E,M],styles:["svg .outline{transition:width 3s ease;width:12.8px} svg .panel{transition:width 3s ease;width:9.6px} svg .handle{visibility:visible;opacity:1;transition:opacity 3s ease,visibility 0s linear 3s} .accessory-on svg .outline{transition:width 3s ease;width:3.8px} .accessory-on svg .panel{transition:width 3s ease;width:.6px} .accessory-on svg .handle{visibility:hidden;opacity:0;transition:opacity 3s ease,visibility 0s linear 0s}"]})}return e})();var Ye=(e,o)=>({"fa-check-circle":e,"fa-blank":o});function $a(e,o){if(e&1){let t=R();n(0,"div",5),l(1,"translate"),n(2,"button",7),C("click",function(i){D(t);let d=f();return A(d.setActive(0,i))}),n(3,"div",8),m(4,"i",9),s(),p(5),l(6,"translate"),n(7,"div",10),m(8,"i",11),s()(),n(9,"button",7),C("click",function(i){D(t);let d=f();return A(d.setActive(1,i))}),n(10,"div",8),m(11,"i",9),s(),p(12),l(13,"translate"),n(14,"div",10),m(15,"i",11),s()()()}if(e&2){let t=f();y("aria-label",c(1,5,"accessories.control.mode_control")),a(4),u("ngClass",V(11,Ye,t.service.values.Active===0,t.service.values.Active!==0)),a(),x(" ",c(6,7,"accessories.control.off")," "),a(6),u("ngClass",V(14,Ye,t.service.values.Active===1,t.service.values.Active!==1)),a(),x(" ",c(13,9,"accessories.control.on")," ")}}function Ra(e,o){if(e&1){let t=R();n(0,"div",5),l(1,"translate"),n(2,"button",7),C("click",function(i){D(t);let d=f();return A(d.setTargetState(0,i))}),n(3,"div",8),m(4,"i",9),s(),p(5),l(6,"translate"),n(7,"div",10),m(8,"i",11),s()(),n(9,"button",7),C("click",function(i){D(t);let d=f();return A(d.setTargetState(1,i))}),n(10,"div",8),m(11,"i",9),s(),p(12),l(13,"translate"),n(14,"div",10),m(15,"i",11),s()(),n(16,"button",7),C("click",function(i){D(t);let d=f();return A(d.setTargetState(2,i))}),n(17,"div",8),m(18,"i",9),s(),p(19),l(20,"translate"),n(21,"div",10),m(22,"i",11),s()()()}if(e&2){let t=f();y("aria-label",c(1,7,"accessories.control.media_control")),a(4),u("ngClass",V(15,Ye,t.service.values.CurrentMediaState===0,t.service.values.CurrentMediaState!==0)),a(),x(" ",c(6,9,"accessories.control.play")," "),a(6),u("ngClass",V(18,Ye,t.service.values.CurrentMediaState===1,t.service.values.CurrentMediaState!==1)),a(),x(" ",c(13,11,"accessories.control.pause")," "),a(6),u("ngClass",V(21,Ye,t.service.values.CurrentMediaState===2,t.service.values.CurrentMediaState!==2)),a(),x(" ",c(20,13,"accessories.control.stop")," ")}}function Wa(e,o){if(e&1){let t=R();n(0,"h6"),p(1),l(2,"translate"),s(),n(3,"div",12),l(4,"translate"),n(5,"button",7),C("click",function(i){D(t);let d=f();return A(d.setTargetMode(!1,i))}),n(6,"div",8),m(7,"i",9),s(),p(8),l(9,"translate"),n(10,"div",10),m(11,"i",11),s()(),n(12,"button",7),C("click",function(i){D(t);let d=f();return A(d.setTargetMode(!0,i))}),n(13,"div",8),m(14,"i",9),s(),p(15),l(16,"translate"),n(17,"div",10),m(18,"i",11),s()()()}if(e&2){let t=f();a(),x(" ",c(2,6,"Active"in t.service.values||"TargetMediaState"in t.service.values?"accessories.control.speaker_volume":"menu.label_status")," "),a(2),y("aria-label",c(4,8,"accessories.control.mute_control")),a(4),u("ngClass",V(14,Ye,!t.targetMode,t.targetMode)),a(),x(" ",c(9,10,"accessories.control.not_mute")," "),a(6),u("ngClass",V(17,Ye,t.targetMode,!t.targetMode)),a(),x(" ",c(16,12,"accessories.control.mute")," ")}}function ja(e,o){if(e&1){let t=R();n(0,"h6",13),p(1),l(2,"translate"),s(),n(3,"nouislider",14),G("ngModelChange",function(i){D(t);let d=f();return U(d.targetVolume.value,i)||(d.targetVolume.value=i),A(i)}),C("ngModelChange",function(){D(t);let i=f();return A(i.onVolumeStateChange())}),s()}if(e&2){let t=f();a(),O("",c(2,6,"accessories.control.speaker_volume"),": ",t.targetVolume.value,"%"),a(2),u("min",t.targetVolume.min)("max",t.targetVolume.max)("step",t.targetVolume.step),j("ngModel",t.targetVolume.value)}}var pn=(()=>{class e{$activeModal=w(X);service;$accessories;stateSubscription;targetMode;targetVolume;targetVolumeChanged=new Q;constructor(){this.targetVolumeChanged.pipe(Y(500)).subscribe(()=>{this.service.getCharacteristic("Volume").setValue(this.targetVolume.value)})}ngOnInit(){this.targetMode=this.service.values.Mute,this.loadTargetVolume(),this.$accessories&&(this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetMode=this.service.values.Mute,this.targetVolume&&(this.targetVolume.value=this.service.getCharacteristic("Volume")?.value)}))}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setTargetMode(t,r){this.targetMode=t,this.service.getCharacteristic("Mute").setValue(this.targetMode),r.target.blur()}setActive(t,r){this.service.getCharacteristic("Active").setValue(t),r.target.blur()}setTargetState(t,r){this.service.getCharacteristic("TargetMediaState").setValue(t),r.target.blur()}onVolumeStateChange(){this.targetVolumeChanged.next(this.targetVolume.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadTargetVolume(){let t=this.service.getCharacteristic("Volume");t&&(this.targetVolume={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(i=>{i.style.background="linear-gradient(to right, #ffffff, #ffd966, #ff0000)"})},10))}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:11,vars:7,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],[1,"modal-footer"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],[1,"mt-4","mb-0"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4),_(6,$a,16,17,"div",5)(7,Ra,23,24,"div",5),_(8,Wa,19,20),_(9,ja,4,8),s(),m(10,"div",6),s()),r&2&&(a(2),u("innerText",i.service.customName||i.service.serviceName),a(),y("aria-label",c(4,5,"form.button_close")),a(3),k("Active"in i.service.values?6:"TargetMediaState"in i.service.values?7:-1),a(2),k("Mute"in i.service.values?8:-1),a(),k(i.targetVolume?9:-1))},dependencies:[ee,ie,ne,oe,E,M],encapsulation:2})}return e})();var Ua=()=>[0,1],Ga=(e,o)=>({"accessory-on":e,paused:o}),za=()=>["Speaker","SmartSpeaker"];function qa(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.play")," ")}function Za(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.pause")," ")}function Ka(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.stop")," ")}function Qa(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" \xB7 ",c(1,1,"accessories.control.mute")," ")}function Ya(e,o){if(e&1&&p(0),e&2){let t=f(3);x(" \xB7 ",t.service.values.Volume,"% ")}}function Xa(e,o){if(e&1&&_(0,Ya,1,1),e&2){let t=f(2);k("Volume"in t.service.values?0:-1)}}function Ja(e,o){if(e&1&&(n(0,"div",7),_(1,qa,2,3)(2,Za,2,3)(3,Ka,2,3),_(4,Qa,2,3)(5,Xa,1,1),s()),e&2){let t,r=f();a(),k((t=r.service.values.CurrentMediaState)===0?1:t===1?2:t===2?3:-1),a(3),k("Mute"in r.service.values&&r.service.values.Mute?4:5)}}function es(e,o){e&1&&(m(0,"div",8),l(1,"translate")),e&2&&u("innerText",c(1,1,"accessories.control.off"))}function ts(e,o){e&1&&(m(0,"div",8),l(1,"translate")),e&2&&u("innerText",c(1,1,"accessories.control.mute"))}function is(e,o){if(e&1&&(n(0,"div",7),p(1),s()),e&2){let t=f();a(),x("",t.service.values.Volume,"%")}}function ns(e,o){e&1&&(n(0,"div",7),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.on")))}function os(e,o){e&1&&(n(0,"div",7),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.core.doorbell")))}var dn=(()=>{class e{$accessories=w(K);$modal=w(J);service;readyForControl=!1;onClick(){this.readyForControl&&("Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active===0?1:0):"TargetMediaState"in this.service.values?this.service.getCharacteristic("TargetMediaState").setValue(this.service.values.TargetMediaState===0?1:0):"Mute"in this.service.values&&this.service.getCharacteristic("Mute").setValue(!this.service.values.Mute))}onLongClick(){if(this.readyForControl&&("Active"in this.service.values||"TargetMediaState"in this.service.values||"Volume"in this.service.values||"Mute"in this.service.values)){let t=this.$modal.open(pn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-doorbell"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:15,vars:11,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","6","y","1","width","18","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","2"],["cx","15","cy","16","r","5","stroke","#7f7f7f","stroke-width","2","fill","#1976d2","fill-opacity","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(r,i){r&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4)(6,"circle",5),s()(),I(),n(7,"div",6),p(8),s(),_(9,Ja,6,2,"div",7)(10,es,2,3,"div",8)(11,ts,2,3,"div",8)(12,is,2,1,"div",7)(13,ns,3,3,"div",7)(14,os,3,3,"div",7),s()()),r&2&&(u("ngClass",V(7,Ga,"Active"in i.service.values?i.service.values.Active:"CurrentMediaState"in i.service.values?he(6,Ua).includes(i.service.values.CurrentMediaState):"Mute"in i.service.values&&"Volume"in i.service.values?!i.service.values.Mute&&i.service.values.Volume>0:"Mute"in i.service.values&&!i.service.values.Mute,"CurrentMediaState"in i.service.values&&i.service.values.CurrentMediaState===1)),a(2),y("aria-label",c(3,4,"accessories.core.doorbell")),a(6),v(i.service.customName||i.service.serviceName),a(),k("CurrentMediaState"in i.service.values?9:"Active"in i.service.values&&!i.service.values.Active?10:"Mute"in i.service.values&&i.service.values.Mute?11:"Volume"in i.service.values?12:he(10,za).includes(i.service.customType||i.service.type)?13:14))},dependencies:[q,E,M],encapsulation:2})}return e})();var Dt=(e,o)=>({"fa-check-circle":e,"fa-blank":o});function rs(e,o){if(e&1){let t=R();n(0,"h6",12),p(1),l(2,"translate"),s(),n(3,"div",13),l(4,"translate"),n(5,"button",6),C("click",function(i){D(t);let d=f();return A(d.setRotationDirection(0,i))}),n(6,"div",7),m(7,"i",8),s(),p(8),l(9,"translate"),n(10,"div",9),m(11,"i",10),s()(),n(12,"button",6),C("click",function(i){D(t);let d=f();return A(d.setRotationDirection(1,i))}),n(13,"div",7),m(14,"i",8),s(),p(15),l(16,"translate"),n(17,"div",9),m(18,"i",10),s()()()}if(e&2){let t=f();a(),v(c(2,6,"accessories.control.rotation_direction")),a(2),y("aria-label",c(4,8,"accessories.control.direction_control")),a(4),u("ngClass",V(14,Dt,t.service.values.RotationDirection===0,t.service.values.RotationDirection!==0)),a(),x(" ",c(9,10,"accessories.control.rotation_clockwise")," "),a(6),u("ngClass",V(17,Dt,t.service.values.RotationDirection===1,t.service.values.RotationDirection!==1)),a(),x(" ",c(16,12,"accessories.control.rotation_c_clockwise")," ")}}function as(e,o){e&1&&p(0,"%")}function ss(e,o){if(e&1){let t=R();n(0,"h6",12),p(1),l(2,"translate"),_(3,as,1,0),s(),n(4,"nouislider",14),G("ngModelChange",function(i){D(t);let d=f();return U(d.targetRotationSpeed.value,i)||(d.targetRotationSpeed.value=i),A(i)}),C("ngModelChange",function(){D(t);let i=f();return A(i.onTargetRotationSpeedChange())}),s()}if(e&2){let t=f();a(),O(" ",c(2,7,"accessories.control.rotation_speed"),": ",t.targetRotationSpeed.value),a(2),k(t.targetRotationSpeed.unit==="percentage"?3:-1),a(),u("min",t.targetRotationSpeed.min)("max",t.targetRotationSpeed.max)("step",t.targetRotationSpeed.step),j("ngModel",t.targetRotationSpeed.value)}}var mn=(()=>{class e{$activeModal=w(X);service;$accessories;stateSubscription;targetMode;targetRotationSpeed;targetRotationSpeedChanged=new Q;hasRotationDirection=!1;constructor(){this.targetRotationSpeedChanged.pipe(Y(500)).subscribe(()=>{this.service.getCharacteristic("RotationSpeed").setValue(this.targetRotationSpeed.value),this.targetRotationSpeed.value&&!this.targetMode?(this.targetMode=!0,"On"in this.service.values?this.service.getCharacteristic("On").setValue(this.targetMode):"Active"in this.service.values&&this.service.getCharacteristic("Active").setValue(this.targetMode?1:0)):!this.targetRotationSpeed.value&&this.targetMode&&(this.targetMode=!1,"On"in this.service.values?this.service.getCharacteristic("On").setValue(this.targetMode):"Active"in this.service.values&&this.service.getCharacteristic("Active").setValue(this.targetMode?1:0))})}ngOnInit(){this.targetMode="On"in this.service.values?this.service.values.On:this.service.values.Active===1,this.loadRotationSpeed(),"RotationDirection"in this.service.values&&(this.hasRotationDirection=!0),this.$accessories&&(this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetMode="On"in this.service.values?this.service.values.On:this.service.values.Active===1,this.targetRotationSpeed&&(this.targetRotationSpeed.value=this.service.getCharacteristic("RotationSpeed")?.value)}))}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setTargetMode(t,r){this.targetMode=t,"On"in this.service.values?this.service.getCharacteristic("On").setValue(this.targetMode):"Active"in this.service.values&&this.service.getCharacteristic("Active").setValue(this.targetMode?1:0),this.targetMode&&this.targetRotationSpeed&&!this.targetRotationSpeed.value&&(this.targetRotationSpeed.value=this.service.getCharacteristic("RotationSpeed").maxValue),r.target.blur()}onTargetRotationSpeedChange(){this.targetRotationSpeedChanged.next(this.targetRotationSpeed.value)}setRotationDirection(t,r){this.service.getCharacteristic("RotationDirection").setValue(t),r.target.blur()}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadRotationSpeed(){let t=this.service.getCharacteristic("RotationSpeed");t&&(this.targetRotationSpeed={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep,unit:t.unit},setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(i=>{i.style.background="linear-gradient(to right, #add8e6, #416bdf)"})},10))}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:25,vars:23,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[1,"mt-4"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"div",5),l(7,"translate"),n(8,"button",6),C("click",function(h){return i.setTargetMode(!1,h)}),n(9,"div",7),m(10,"i",8),s(),p(11),l(12,"translate"),n(13,"div",9),m(14,"i",10),s()(),n(15,"button",6),C("click",function(h){return i.setTargetMode(!0,h)}),n(16,"div",7),m(17,"i",8),s(),p(18),l(19,"translate"),n(20,"div",9),m(21,"i",10),s()()(),_(22,rs,19,20),_(23,ss,5,9),s(),m(24,"div",11),s()),r&2&&(a(2),u("innerText",i.service.customName||i.service.serviceName),a(),y("aria-label",c(4,9,"form.button_close")),a(3),y("aria-label",c(7,11,"accessories.control.mode_control")),a(4),u("ngClass",V(17,Dt,!i.targetMode,i.targetMode)),a(),x(" ",c(12,13,"accessories.control.off")," "),a(6),u("ngClass",V(20,Dt,i.targetMode,!i.targetMode)),a(),x(" ",c(19,15,"accessories.control.on")," "),a(4),k(i.hasRotationDirection?22:-1),a(),k(i.targetRotationSpeed?23:-1))},dependencies:[ee,ie,ne,oe,E,M],encapsulation:2})}return e})();var ls=e=>({"accessory-on":e}),cs=(e,o)=>({spin:e,"spin-counter":o});function ps(e,o){if(e&1&&(n(0,"div",8),p(1),s()),e&2){let t=f();a(),O("",t.service.values.RotationSpeed,"",t.rotationSpeedUnit)}}function ds(e,o){if(e&1&&(m(0,"div",9),l(1,"translate")),e&2){let t=f();u("innerText",c(1,1,t.service.values.On||t.service.values.Active?"accessories.control.on":"accessories.control.off"))}}var un=(()=>{class e{$accessories=w(K);$modal=w(J);service;readyForControl=!1;rotationSpeedUnit="";hasRotationDirection=!1;ngOnInit(){"RotationSpeed"in this.service.values&&this.service.serviceCharacteristics.find(r=>r.type==="RotationSpeed").unit==="percentage"&&(this.rotationSpeedUnit="%"),"RotationDirection"in this.service.values&&(this.hasRotationDirection=!0)}onClick(){this.readyForControl&&("On"in this.service.values?this.service.getCharacteristic("On").setValue(!this.service.values.On):"Active"in this.service.values&&this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1),"RotationSpeed"in this.service.values&&!this.service.values.On&&!this.service.values.RotationSpeed&&(this.service.values.RotationSpeed=this.service.getCharacteristic("RotationSpeed").maxValue))}onLongClick(){if(this.readyForControl&&("RotationSpeed"in this.service.values||"RotationDirection"in this.service.values)){let t=this.$modal.open(mn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-fan"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:12,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg",3,"ngClass"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["transform","translate(-0.85, 0.2) scale(0.99)"],["fill","#7f7f7f","fill-rule","evenodd","clip-rule","evenodd","d","M20.988 10.265c.382-.596.951-1.424 1.844-2.71C25.462 3.61 23.456 0 18 0c-6.263 0-10.09 5.649-6.835 11.923-.594-.382-1.416-.948-2.682-1.826-3.945-2.63-7.555-.625-7.555 4.832 0 6.308 5.73 10.145 12.057 6.763-.383.599-.958 1.436-1.872 2.753C8.485 28.39 10.49 32 15.947 32c6.267 0 10.095-5.655 6.83-11.932.593.382 1.412.946 2.668 1.818 3.945 2.63 7.555.625 7.555-4.832 0-6.293-5.703-10.127-12.012-6.788Zm-.407 2.602C26.101 8.924 31 11.805 31 17.053c0 3.877-1.845 4.902-4.445 3.169-2.525-1.761-3.46-2.385-4.406-2.763a7.87 7.87 0 0 0-1.01-.317c.105-.382.161-.785.161-1.2 0-1.327-.919-3.134-.919-3.134ZM18.405 10.85c.378-.946 1.001-1.88 2.763-4.405C22.902 3.845 21.877 2 18 2c-5.247 0-8.129 4.899-4.186 10.419 0 0 1.89-.919 3.186-.919.398 0 .783.052 1.15.149.064-.269.149-.533.255-.798ZM11.78 14.524c-.946-.378-1.88-1.001-4.405-2.763-2.6-1.734-4.445-.709-4.445 3.168 0 5.247 4.899 8.129 10.419 4.186 0 0-.848-1.812-.848-3.115 0-.416.057-.819.163-1.201a7.81 7.81 0 0 0-1.183-.275Zm3.763 6.625c-.378.946-1.001 1.88-2.763 4.405-1.734 2.6-.709 4.445 3.168 4.445 5.248 0 8.13-4.899 4.187-10.419 0 0-1.831.919-3.133.919-.416 0-.819-.057-1.201-.162a7.802 7.802 0 0 0-.258.812ZM17 19.5c-1.933 0-3.5-1.567-3.5-3.5s1.567-3.5 3.5-3.5 3.5 1.567 3.5 3.5-1.567 3.5-3.5 3.5Z",1,"fan-blades"],["cx","16","cy","16","r","3.6","stroke","#7f7f7f","stroke-width","2","fill","#1976d2","fill-opacity","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(r,i){r&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3)(5,"g",4),m(6,"path",5),s(),m(7,"circle",6),s()(),I(),n(8,"div",7),p(9),s(),_(10,ps,2,2,"div",8)(11,ds,2,3,"div",9),s()()),r&2&&(u("ngClass",N(7,ls,i.service.values.On||i.service.values.Active)),a(2),u("ngClass",V(9,cs,(i.service.values.On||i.service.values.Active)&&(!i.hasRotationDirection||i.hasRotationDirection&&i.service.values.RotationDirection===0),(i.service.values.On||i.service.values.Active)&&i.hasRotationDirection&&i.service.values.RotationDirection===1)),y("aria-label",c(3,5,"accessories.core.fan")),a(7),v(i.service.customName||i.service.serviceName),a(),k(i.service.values.On&&i.service.values.RotationSpeed?10:11))},dependencies:[q,E,M],styles:[".spin svg g .fan-blades{animation:_ngcontent-%COMP%_fa-spin 2s infinite linear;transform-origin:53.5% 50%} .spin-counter svg g .fan-blades{animation:_ngcontent-%COMP%_fa-spin-counter 2s infinite linear;transform-origin:53.5% 50%}@keyframes _ngcontent-%COMP%_fa-spin{0%{transform:rotate(0)}to{transform:rotate(359deg)}}@keyframes _ngcontent-%COMP%_fa-spin-counter{0%{transform:rotate(0)}to{transform:rotate(-359deg)}}"]})}return e})();var fn=(()=>{class e{$activeModal=w(X);service;$accessories;stateSubscription;targetMode;ngOnInit(){setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(r=>{r.style.background="linear-gradient(to right, #d32f2f, #e69533, #42d672, #42d672)"})},10),this.$accessories&&(this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{}))}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}resetFilterLife(t){this.service.getCharacteristic("ResetFilterIndication").setValue(1),t.target.blur()}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:16,vars:19,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"mb-4"],[3,"ngModelChange","min","max","step","disabled","ngModel"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mt-5","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"modal-footer"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"h6",5),p(7),l(8,"translate"),s(),n(9,"nouislider",6),G("ngModelChange",function(h){return U(i.service.values.FilterLifeLevel,h)||(i.service.values.FilterLifeLevel=h),h}),s(),n(10,"div",7),l(11,"translate"),n(12,"button",8),C("click",function(h){return i.resetFilterLife(h)}),p(13),l(14,"translate"),s()()(),m(15,"div",9),s()),r&2&&(a(2),u("innerText",i.service.customName||i.service.serviceName),a(),y("aria-label",c(4,11,"form.button_close")),a(4),O("",c(8,13,"accessories.control.filter_level"),": ",i.service.values.FilterLifeLevel,"%"),a(2),u("min",0)("max",100)("step",1)("disabled",!0),j("ngModel",i.service.values.FilterLifeLevel),a(),y("aria-label",c(11,15,"accessories.core.filter_maintenance")),a(3),x(" ",c(14,17,"form.button_reset")," "))},dependencies:[ee,ie,ne,oe,M],encapsulation:2})}return e})();var ms=(e,o)=>({replace:e,dirty:o}),us=e=>({"red-text":e});function fs(e,o){e&1&&(p(0," \xB7 "),n(1,"span",28),p(2),l(3,"translate"),s()),e&2&&(a(2),v(c(3,1,"accessories.control.replace")))}var vn=(()=>{class e{$accessories=w(K);$modal=w(J);service;readyForControl=!1;onClick(){if(!this.readyForControl)return;let t=this.$modal.open(fn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-filter-maintenance"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:32,vars:13,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["cx","16","cy","7","rx","11","ry","5","stroke","#7f7f7f","stroke-width","1.75","fill","#4caf50","fill-opacity","0.5",1,"status"],["cx","16","cy","7","rx","6","ry","2","stroke","#7f7f7f","stroke-width","1","fill","#e0e0e0","fill-opacity","1",1,"back"],["x1","5","y1","7","x2","5","y2","27.7","stroke","#7f7f7f","stroke-width","1.75"],["x1","27","y1","7","x2","27","y2","27.7","stroke","#7f7f7f","stroke-width","1.75"],["d","M4.7,27 A13,6.9 0 0,0 27.3,27","stroke","#7f7f7f","stroke-width","1.75","fill","none"],["x1","7","y1","10","x2","7","y2","29","stroke","#7f7f7f","stroke-width","1"],["x1","9","y1","11","x2","9","y2","29","stroke","#7f7f7f","stroke-width","1"],["x1","11","y1","12","x2","11","y2","30","stroke","#7f7f7f","stroke-width","1"],["x1","13","y1","12","x2","13","y2","30","stroke","#7f7f7f","stroke-width","1"],["x1","15","y1","12","x2","15","y2","30","stroke","#7f7f7f","stroke-width","1"],["x1","17","y1","12","x2","17","y2","30","stroke","#7f7f7f","stroke-width","1"],["x1","19","y1","12","x2","19","y2","30","stroke","#7f7f7f","stroke-width","1"],["x1","21","y1","12","x2","21","y2","30","stroke","#7f7f7f","stroke-width","1"],["x1","23","y1","11","x2","23","y2","29","stroke","#7f7f7f","stroke-width","1"],["x1","25","y1","10","x2","25","y2","29","stroke","#7f7f7f","stroke-width","1"],["x1","11","y1","6","x2","11","y2","8","stroke","#7f7f7f","stroke-width","1"],["x1","13","y1","5","x2","13","y2","9","stroke","#7f7f7f","stroke-width","1"],["x1","15","y1","5","x2","15","y2","9","stroke","#7f7f7f","stroke-width","1"],["x1","17","y1","5","x2","17","y2","9","stroke","#7f7f7f","stroke-width","1"],["x1","19","y1","5","x2","19","y2","9","stroke","#7f7f7f","stroke-width","1"],["x1","21","y1","6","x2","21","y2","8","stroke","#7f7f7f","stroke-width","1"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[3,"ngClass"],[1,"red-text"]],template:function(r,i){r&1&&(n(0,"div",0),C("longClick",function(){return i.onClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"ellipse",4)(6,"ellipse",5)(7,"line",6)(8,"line",7)(9,"path",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20)(22,"line",21)(23,"line",22)(24,"line",23)(25,"line",24),s()(),I(),n(26,"div",25),p(27),s(),n(28,"div",26)(29,"span",27),p(30),s(),_(31,fs,4,3),s()()()),r&2&&(u("ngClass",V(8,ms,i.service.values.FilterChangeIndication===1||i.service.values.FilterLifeLevel<10,i.service.values.FilterChangeIndication!==1&&i.service.values.FilterLifeLevel<50)),a(2),y("aria-label",c(3,6,"accessories.core.filter_maintenance")),a(25),v(i.service.customName||i.service.serviceName),a(2),u("ngClass",N(11,us,i.service.values.FilterChangeIndication===1)),a(),x(" ",i.service.values.FilterLifeLevel,"% "),a(),k(i.service.values.FilterChangeIndication===1?31:-1))},dependencies:[E,q,M],styles:[".dirty svg .status{fill:#e69533!important} .replace svg .status{fill:#d32f2f!important} body.dark-mode svg .back{fill:#2b2b2b!important}"]})}return e})();var vs=()=>[0,2,3,4],gs=(e,o,t,r,i,d,h)=>({"accessory-on":e,opening:o,open:t,closing:r,closed:i,stopped:d,obstructed:h});function hs(e,o){e&1&&(n(0,"div",30),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.obstructed")))}function Cs(e,o){e&1&&(n(0,"div",30),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.open")))}function xs(e,o){e&1&&(n(0,"div",31),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.closed")))}function ys(e,o){e&1&&(n(0,"div",30),p(1),l(2,"translate"),s()),e&2&&(a(),x("",c(2,1,"accessories.control.opening"),"..."))}function _s(e,o){e&1&&(n(0,"div",30),p(1),l(2,"translate"),s()),e&2&&(a(),x("",c(2,1,"accessories.control.closing"),"..."))}function ks(e,o){e&1&&(n(0,"div",30),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.stopped")))}function Ss(e,o){if(e&1&&_(0,Cs,3,3,"div",30)(1,xs,3,3,"div",31)(2,ys,3,3,"div",30)(3,_s,3,3,"div",30)(4,ks,3,3,"div",30),e&2){let t,r=f();k((t=r.service.values.CurrentDoorState)===0?0:t===1?1:t===2?2:t===3?3:t===4?4:-1)}}function bs(e,o){e&1&&(n(0,"div",30),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.open")))}function Ts(e,o){e&1&&(n(0,"div",31),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.closed")))}function Ms(e,o){if(e&1&&_(0,bs,3,3,"div",30)(1,Ts,3,3,"div",31),e&2){let t=f();k(t.service.values.On||t.service.values.Active?0:1)}}var gn=(()=>{class e{service;readyForControl=!1;onClick(){this.readyForControl&&("TargetDoorState"in this.service.values?this.service.getCharacteristic("TargetDoorState").setValue(this.service.values.TargetDoorState?0:1):"On"in this.service.values?this.service.getCharacteristic("On").setValue(!this.service.values.On):"Active"in this.service.values&&this.service.getCharacteristic("Active").setValue(!this.service.values.Active))}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-garage-door-opener"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:35,vars:15,consts:[["tabindex","0",1,"accessory-box",3,"shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["cx","15.5","cy","10.25","r","3","stroke","#7f7f7f","stroke-width","0.5","fill","#1976d2","fill-opacity","0.5",1,"window"],["x1","1","y1","12","x2","15","y2","1","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","31","y1","12","x2","16","y2","1","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["cx","15.5","cy","1.3","r","0.5","stroke","#7f7f7f","stroke-width","1.5"],["x1","3","y1","11","x2","3","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","29","y1","11","x2","29","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","3","y1","31","x2","6","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","26","y1","31","x2","29","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","6","y1","17","x2","6","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap",""],["x1","26","y1","17","x2","26","y2","31","stroke","#7f7f7f","stroke-width","1.5"],["x1","5.25","y1","17","x2","26.75","y2","17","stroke","#7f7f7f","stroke-width","1"],["x1","6.75","y1","18","x2","25.25","y2","18","stroke","#1976d2","stroke-width","1","stroke-opacity","0.5",1,"line","line1"],["x1","5.25","y1","19","x2","26.75","y2","19","stroke","#7f7f7f","stroke-width","1",1,"line","line2"],["x1","6.75","y1","20","x2","25.25","y2","20","stroke","#1976d2","stroke-width","1","stroke-opacity","0.5",1,"line","line3"],["x1","5.25","y1","21","x2","26.75","y2","21","stroke","#7f7f7f","stroke-width","1",1,"line","line4"],["x1","6.75","y1","22","x2","25.25","y2","22","stroke","#1976d2","stroke-width","1","stroke-opacity","0.5",1,"line","line5"],["x1","5.25","y1","23","x2","26.75","y2","23","stroke","#7f7f7f","stroke-width","1",1,"line","line6"],["x1","6.75","y1","24","x2","25.25","y2","24","stroke","#1976d2","stroke-width","1","stroke-opacity","0.5",1,"line","line7"],["x1","5.25","y1","25","x2","26.75","y2","25","stroke","#7f7f7f","stroke-width","1",1,"line","line8"],["x1","6.75","y1","26","x2","25.25","y2","26","stroke","#1976d2","stroke-width","1","stroke-opacity","0.5",1,"line","line9"],["x1","5.25","y1","27","x2","26.75","y2","27","stroke","#7f7f7f","stroke-width","1",1,"line","line10"],["x1","6.75","y1","28","x2","25.25","y2","28","stroke","#1976d2","stroke-width","1","stroke-opacity","0.5",1,"line","line11"],["x1","5.25","y1","29","x2","26.75","y2","29","stroke","#7f7f7f","stroke-width","1",1,"line","line12"],["x1","6.75","y1","30","x2","25.25","y2","30","stroke","#1976d2","stroke-width","1","stroke-opacity","0.5",1,"line","line13"],["x1","5.25","y1","31","x2","26.75","y2","31","stroke","#7f7f7f","stroke-width","1",1,"line","line14"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(r,i){r&1&&(n(0,"div",0),C("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"circle",4)(6,"line",5)(7,"line",6)(8,"circle",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20)(22,"line",21)(23,"line",22)(24,"line",23)(25,"line",24)(26,"line",25)(27,"line",26)(28,"line",27)(29,"line",28),s()(),I(),n(30,"div",29),p(31),s(),_(32,hs,3,3,"div",30)(33,Ss,5,1)(34,Ms,2,1),s()()),r&2&&(u("ngClass",Wi(7,gs,i.service.values.ObstructionDetected||he(6,vs).includes(i.service.values.CurrentDoorState)||i.service.values.On||i.service.values.Active,i.service.values.CurrentDoorState===2&&!i.service.values.ObstructionDetected,i.service.values.CurrentDoorState===0&&!i.service.values.ObstructionDetected,i.service.values.CurrentDoorState===3&&!i.service.values.ObstructionDetected,i.service.values.CurrentDoorState===1&&!i.service.values.ObstructionDetected,i.service.values.CurrentDoorState===4&&!i.service.values.ObstructionDetected,i.service.values.ObstructionDetected)),a(2),y("aria-label",c(3,4,"accessories.core.garage_door_opener")),a(29),v(i.service.customName||i.service.serviceName),a(),k(i.service.values.ObstructionDetected?32:"CurrentDoorState"in i.service.values?33:34))},dependencies:[q,E,M],styles:[".opening svg .window{fill:#ff9800!important;fill-opacity:.5!important} .opening svg .line{animation:_ngcontent-%COMP%_fade-out .5s ease-in-out forwards} .opening svg .line1{animation-delay:9.282s} .opening svg .line2{animation-delay:8.568s} .opening svg .line3{animation-delay:7.854s} .opening svg .line4{animation-delay:7.14s} .opening svg .line5{animation-delay:6.426s} .opening svg .line6{animation-delay:5.712s} .opening svg .line7{animation-delay:4.998s} .opening svg .line8{animation-delay:4.284s} .opening svg .line9{animation-delay:3.57s} .opening svg .line10{animation-delay:2.856s} .opening svg .line11{animation-delay:2.142s} .opening svg .line12{animation-delay:1.428s} .opening svg .line13{animation-delay:.714s} .opening svg .line14{animation-delay:0s}@keyframes _ngcontent-%COMP%_fade-out{to{opacity:0}} .open .window{fill:#d32f2f!important;fill-opacity:.5!important} .open .line{opacity:0} .closing svg .window{fill:#ff9800!important;fill-opacity:.5!important} .closing svg .line{opacity:0;animation:_ngcontent-%COMP%_fade-in .5s ease-in-out forwards} .closing svg .line1{animation-delay:0s} .closing svg .line2{animation-delay:.714s} .closing svg .line3{animation-delay:1.428s} .closing svg .line4{animation-delay:2.142s} .closing svg .line5{animation-delay:2.856s} .closing svg .line6{animation-delay:3.57s} .closing svg .line7{animation-delay:4.284s} .closing svg .line8{animation-delay:4.998s} .closing svg .line9{animation-delay:5.712s} .closing svg .line10{animation-delay:6.426s} .closing svg .line11{animation-delay:7.14s} .closing svg .line12{animation-delay:7.854s} .closing svg .line13{animation-delay:8.568s} .closing svg .line14{animation-delay:9.282s}@keyframes _ngcontent-%COMP%_fade-in{to{opacity:1}} .closed .window{fill:#4caf50!important;fill-opacity:.5!important} .closed .line{opacity:1} .stopped .window{fill:#d32f2f!important} .stopped .line7, .stopped .line8, .stopped .line9, .stopped .line10, .stopped .line11, .stopped .line12, .stopped .line13, .stopped .line14{opacity:0} .obstructed .window{animation:_ngcontent-%COMP%_flash 2s infinite;fill:#d32f2f!important}@keyframes _ngcontent-%COMP%_flash{0%,to{fill-opacity:.5}50%{fill-opacity:.1}} .obstructed .line7, .obstructed .line8, .obstructed .line9, .obstructed .line10, .obstructed .line11, .obstructed .line12, .obstructed .line13, .obstructed .line14{opacity:0}"]})}return e})();var ut=(e,o)=>({"fa-check-circle":e,"fa-blank":o});function ws(e,o){if(e&1){let t=R();n(0,"button",8),C("click",function(i){D(t);let d=f(2);return A(d.setTargetMode(0,i))}),n(1,"div",9),m(2,"i",10),s(),p(3),l(4,"translate"),n(5,"div",11),m(6,"i",12),s()()}if(e&2){let t=f(2);a(2),u("ngClass",V(4,ut,t.targetMode===0,t.targetMode!==0)),a(),x(" ",c(4,2,"accessories.control.auto")," ")}}function Es(e,o){if(e&1){let t=R();n(0,"button",8),C("click",function(i){D(t);let d=f(2);return A(d.setTargetMode(1,i))}),n(1,"div",9),m(2,"i",10),s(),p(3),l(4,"translate"),n(5,"div",11),m(6,"i",12),s()()}if(e&2){let t=f(2);a(2),u("ngClass",V(4,ut,t.targetMode===1,t.targetMode!==1)),a(),x(" ",c(4,2,"accessories.control.heat")," ")}}function Bs(e,o){if(e&1){let t=R();n(0,"button",8),C("click",function(i){D(t);let d=f(2);return A(d.setTargetMode(2,i))}),n(1,"div",9),m(2,"i",10),s(),p(3),l(4,"translate"),n(5,"div",11),m(6,"i",12),s()()}if(e&2){let t=f(2);a(2),u("ngClass",V(4,ut,t.targetMode===2,t.targetMode!==2)),a(),x(" ",c(4,2,"accessories.control.cool")," ")}}function Vs(e,o){if(e&1&&(n(0,"h6",14),p(1),l(2,"translate"),s(),n(3,"div",15),l(4,"translate"),_(5,ws,7,7,"button",16),_(6,Es,7,7,"button",16),_(7,Bs,7,7,"button",16),s()),e&2){let t=f();a(),v(c(2,5,"accessories.control.mode")),a(2),y("aria-label",c(4,7,"accessories.control.mode_control")),a(2),k(t.targetStateValidValues.includes(0)?5:-1),a(),k(t.targetStateValidValues.includes(1)?6:-1),a(),k(t.targetStateValidValues.includes(2)?7:-1)}}function Ds(e,o){if(e&1){let t=R();n(0,"h6",17),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),l(6,"convertTemp"),l(7,"number"),l(8,"uppercase"),s(),n(9,"nouislider",18),G("ngModelChange",function(i){D(t);let d=f(2);return U(d.autoTemp,i)||(d.autoTemp=i),A(i)}),C("ngModelChange",function(){D(t);let i=f(2);return A(i.onAutoTemperatureStateChange())}),s()}if(e&2){let t=f(2);a(),Tt(" ",c(2,9,"accessories.control.target_auto"),": ",le(4,13,c(3,11,t.autoTemp[0]),"1.0-1"),"\xB0",c(5,16,t.temperatureUnits)," - ",le(7,20,c(6,18,t.autoTemp[1]),"1.0-1"),"\xB0",c(8,23,t.temperatureUnits)," "),a(8),u("min",t.HeatingThresholdTemperature.minValue)("max",t.CoolingThresholdTemperature.maxValue)("step",t.CoolingThresholdTemperature.minStep),j("ngModel",t.autoTemp)}}function As(e,o){if(e&1){let t=R();n(0,"h6",14),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),s(),n(6,"nouislider",18),G("ngModelChange",function(i){D(t);let d=f(2);return U(d.targetHeatingTemp,i)||(d.targetHeatingTemp=i),A(i)}),C("ngModelChange",function(){D(t);let i=f(2);return A(i.onTemperatureStateChange())}),s()}if(e&2){let t=f(2);a(),Ue(" ",c(2,7,"accessories.control.target_auto"),": ",le(4,11,c(3,9,t.targetHeatingTemp),"1.0-1"),"\xB0",c(5,14,t.temperatureUnits)," "),a(5),u("min",t.HeatingThresholdTemperature.minValue)("max",t.HeatingThresholdTemperature.maxValue)("step",t.HeatingThresholdTemperature.minStep),j("ngModel",t.targetHeatingTemp)}}function Is(e,o){if(e&1){let t=R();n(0,"h6",14),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),s(),n(6,"nouislider",18),G("ngModelChange",function(i){D(t);let d=f(2);return U(d.targetCoolingTemp,i)||(d.targetCoolingTemp=i),A(i)}),C("ngModelChange",function(){D(t);let i=f(2);return A(i.onTemperatureStateChange())}),s()}if(e&2){let t=f(2);a(),Ue(" ",c(2,7,"accessories.control.target_auto"),": ",le(4,11,c(3,9,t.targetCoolingTemp),"1.0-1"),"\xB0",c(5,14,t.temperatureUnits)," "),a(5),u("min",t.CoolingThresholdTemperature.minValue)("max",t.CoolingThresholdTemperature.maxValue)("step",t.CoolingThresholdTemperature.minStep),j("ngModel",t.targetCoolingTemp)}}function Ls(e,o){if(e&1&&_(0,Ds,10,25)(1,As,7,16)(2,Is,7,16),e&2){let t=f();k(t.HeatingThresholdTemperature&&t.CoolingThresholdTemperature?0:t.HeatingThresholdTemperature&&!t.CoolingThresholdTemperature?1:!t.HeatingThresholdTemperature&&t.CoolingThresholdTemperature?2:-1)}}var hn=(()=>{class e{$activeModal=w(X);$settings=w(Ee);service;type;$accessories;stateSubscription;temperatureUnits=this.$settings.env.temperatureUnits;targetState;targetMode;targetTemperatureChanged=new Q;targetStateValidValues=[];CoolingThresholdTemperature;HeatingThresholdTemperature;targetCoolingTemp;targetHeatingTemp;autoTemp;constructor(){this.targetTemperatureChanged.pipe(Y(500)).subscribe(()=>{this.HeatingThresholdTemperature&&this.service.getCharacteristic("HeatingThresholdTemperature").setValue(this.targetHeatingTemp),this.CoolingThresholdTemperature&&this.service.getCharacteristic("CoolingThresholdTemperature").setValue(this.targetCoolingTemp)})}ngOnInit(){this.targetState=this.service.values.Active,this.targetMode=this.service.values.TargetHeaterCoolerState,this.CoolingThresholdTemperature=this.service.getCharacteristic("CoolingThresholdTemperature"),this.HeatingThresholdTemperature=this.service.getCharacteristic("HeatingThresholdTemperature"),this.targetStateValidValues=this.service.getCharacteristic("TargetHeaterCoolerState").validValues,this.loadTargetTemperature(),setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(r=>{r.style.background="linear-gradient(to right, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))"})},10),this.$accessories&&(this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetState=this.service.values.Active,this.targetMode=this.service.values.TargetHeaterCoolerState,this.targetCoolingTemp=this.service.getCharacteristic("CoolingThresholdTemperature")?.value,this.targetHeatingTemp=this.service.getCharacteristic("HeatingThresholdTemperature")?.value,this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp]}))}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setTargetState(t,r){this.targetState=t,this.service.getCharacteristic("Active").setValue(this.targetState),this.loadTargetTemperature(),r.target.blur()}setTargetMode(t,r){this.targetMode=t,this.service.getCharacteristic("TargetHeaterCoolerState").setValue(this.targetMode),this.loadTargetTemperature(),r.target.blur()}onTemperatureStateChange(){this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp],this.targetTemperatureChanged.next(void 0)}onAutoTemperatureStateChange(){this.targetHeatingTemp=this.autoTemp[0],this.targetCoolingTemp=this.autoTemp[1],this.targetTemperatureChanged.next(void 0)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadTargetTemperature(){this.targetCoolingTemp=this.service.getCharacteristic("CoolingThresholdTemperature")?.value,this.targetHeatingTemp=this.service.getCharacteristic("HeatingThresholdTemperature")?.value,this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp]}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service",type:"type",$accessories:"$accessories"},decls:31,vars:34,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"mt-2","mb-4","fs-4"],[1,"fas","fa-temperature-full"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[1,"mt-4"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control"],[1,"mt-4","mb-1"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"h6",5),m(7,"i",6),p(8),l(9,"convertTemp"),l(10,"number"),l(11,"uppercase"),s(),n(12,"div",7),l(13,"translate"),n(14,"button",8),C("click",function(h){return i.setTargetState(0,h)}),n(15,"div",9),m(16,"i",10),s(),p(17),l(18,"translate"),n(19,"div",11),m(20,"i",12),s()(),n(21,"button",8),C("click",function(h){return i.setTargetState(1,h)}),n(22,"div",9),m(23,"i",10),s(),p(24),l(25,"translate"),n(26,"div",11),m(27,"i",12),s()()(),_(28,Vs,8,9),_(29,Ls,3,1),s(),m(30,"div",13),s()),r&2&&(a(2),u("innerText",i.service.customName||i.service.serviceName),a(),y("aria-label",c(4,13,"form.button_close")),a(4),tt("color",i.service.values.CurrentHeaterCoolerState===3&&i.service.values.Active===1||i.type==="cooler"&&(i.service.values.Active||i.service.values.On)?"#1e8bbd":i.service.values.CurrentHeaterCoolerState===2&&i.service.values.Active===1||i.type==="heater"&&(i.service.values.Active||i.service.values.On)?"#e69533":i.service.values.Active||i.service.values.On?"#42d672":"#7b7b7b"),a(),O("",le(10,17,c(9,15,i.service.values.CurrentTemperature),"1.0-1"),"\xB0",c(11,20,i.temperatureUnits)," "),a(4),y("aria-label",c(13,22,"accessories.control.state_control")),a(4),u("ngClass",V(28,ut,i.targetState===0,i.targetState!==0)),a(),x(" ",c(18,24,"accessories.control.off")," "),a(6),u("ngClass",V(31,ut,i.targetState===1,i.targetState!==1)),a(),x(" ",c(25,26,"accessories.control.on")," "),a(4),k(i.targetStateValidValues.length?28:-1),a(),k(i.targetStateValidValues.includes(0)?29:-1))},dependencies:[E,ee,ie,ne,oe,we,M,Fe,Pe],encapsulation:2})}return e})();var Ps=e=>({"accessory-on":e});function Fs(e,o){if(e&1&&(B(),n(0,"text",23),p(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase"),s()),e&2){let t=f();a(),O(" ",le(3,4,c(2,2,t.service.values.CurrentTemperature),"1.0-1"),"\xB0",c(4,7,t.temperatureUnits)," ")}}function Hs(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.off")," ")}function Os(e,o){if(e&1&&(m(0,"i",26),p(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase"),l(5,"convertTemp"),l(6,"number"),l(7,"uppercase")),e&2){let t=f(2);a(),Ni(" ",le(3,6,c(2,4,t.service.values.HeatingThresholdTemperature),"1.0-1"),"\xB0",c(4,9,t.temperatureUnits)," - ",le(6,13,c(5,11,t.service.values.CoolingThresholdTemperature),"1.0-1"),"\xB0",c(7,16,t.temperatureUnits)," ")}}function Ns(e,o){if(e&1&&(m(0,"i",26),p(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase")),e&2){let t=f(2);a(),O(" ",le(3,4,c(2,2,t.service.values.HeatingThresholdTemperature),"1.0-1"),"\xB0",c(4,7,t.temperatureUnits)," ")}}function $s(e,o){if(e&1&&(m(0,"i",26),p(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase")),e&2){let t=f(2);a(),O(" ",le(3,4,c(2,2,t.service.values.CoolingThresholdTemperature),"1.0-1"),"\xB0",c(4,7,t.temperatureUnits)," ")}}function Rs(e,o){if(e&1&&_(0,Os,8,18)(1,Ns,5,9)(2,$s,5,9),e&2){let t=f();k(t.hasHeating&&t.hasCooling?0:t.hasHeating&&!t.hasCooling?1:!t.hasHeating&&t.hasCooling?2:-1)}}function Ws(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.heat")," ")}function js(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.cool")," ")}function Us(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.on")," ")}var Cn=(()=>{class e{$modal=w(J);$settings=w(Ee);$accessories=w(K);service;readyForControl=!1;type;temperatureUnits=this.$settings.env.temperatureUnits;hasHeating=!1;hasCooling=!1;ngOnInit(){this.hasHeating="HeatingThresholdTemperature"in this.service.values,this.hasCooling="CoolingThresholdTemperature"in this.service.values}onClick(){this.readyForControl&&("Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1):"On"in this.service.values&&this.service.getCharacteristic("On").setValue(!this.service.values.On))}onLongClick(){if(this.readyForControl&&"TargetHeaterCoolerState"in this.service.values){let t=this.$modal.open(hn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.type=this.type,t.componentInstance.$accessories=this.$accessories}}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-heater-cooler"]],inputs:{service:"service",readyForControl:"readyForControl",type:"type"},decls:36,vars:10,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["id","coolingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#1e8bbd"],["attributeName","stop-color","values","#1e8bbd;#66d6d6;#1e8bbd","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#66d6d6"],["attributeName","stop-color","values","#66d6d6;#1e8bbd;#66d6d6","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#1e8bbd"],["id","heatingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#cc5e00"],["attributeName","stop-color","values","#cc5e00;#e69533;#cc5e00;#e69533","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#e69533"],["attributeName","stop-color","values","#e69533;#cc5e00;#e69533;#cc5e00","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#cc5e00"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x1","8","y1","7","x2","8","y2","16","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","12","y1","7","x2","12","y2","16","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","16","y1","7","x2","16","y2","16","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","20","y1","7","x2","20","y2","16","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","24","y1","7","x2","24","y2","16","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x","3.5","y","4","width","25","height","15","rx","0","stroke","#7f7f7f","stroke-width","1.2","fill-opacity","0.5"],["x","16","y","27.5","font-size","7","text-anchor","middle","fill","#7f7f7f","font-family","Arial, sans-serif"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"fa","fas","fa-bullseye"]],template:function(r,i){r&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3)(5,"defs")(6,"linearGradient",4)(7,"stop",5),m(8,"animate",6),s(),n(9,"stop",7),m(10,"animate",8),s(),n(11,"stop",9),m(12,"animate",6),s()(),n(13,"linearGradient",10)(14,"stop",11),m(15,"animate",12),s(),n(16,"stop",13),m(17,"animate",14),s(),n(18,"stop",15),m(19,"animate",12),s()()(),m(20,"rect",16)(21,"line",17)(22,"line",18)(23,"line",19)(24,"line",20)(25,"line",21)(26,"rect",22),_(27,Fs,5,9,":svg:text",23),s()(),I(),n(28,"div",24),p(29),s(),n(30,"div",25),_(31,Hs,2,3)(32,Rs,3,1)(33,Ws,2,3)(34,js,2,3)(35,Us,2,3),s()()()),r&2&&(u("ngClass",N(8,Ps,i.service.values.Active||i.service.values.On)),a(2),y("aria-label",c(3,6,"accessories.core.heater_cooler")),a(24),y("fill",i.service.values.CurrentHeaterCoolerState===3&&i.service.values.Active===1||i.type==="cooler"&&(i.service.values.Active||i.service.values.On)?"url(#coolingGradient)":i.service.values.CurrentHeaterCoolerState===2&&i.service.values.Active===1||i.type==="heater"&&(i.service.values.Active||i.service.values.On)?"url(#heatingGradient)":i.service.values.Active||i.service.values.On?"#42d672":"#7b7b7b"),a(),k("CurrentTemperature"in i.service.values?27:-1),a(2),v(i.service.customName||i.service.serviceName),a(2),k("Active"in i.service.values&&!i.service.values.Active||"On"in i.service.values&&!i.service.values.On?31:i.service.values.TargetHeaterCoolerState===0&&(i.hasHeating||i.hasCooling)?32:i.service.values.TargetHeaterCoolerState===1?33:i.service.values.TargetHeaterCoolerState===2?34:35))},dependencies:[q,E,we,M,Fe,Pe],encapsulation:2})}return e})();var ft=(e,o)=>({"fa-check-circle":e,"fa-blank":o});function Gs(e,o){if(e&1){let t=R();n(0,"button",8),C("click",function(i){D(t);let d=f(2);return A(d.setTargetMode(0,i))}),n(1,"div",9),m(2,"i",10),s(),p(3),l(4,"translate"),n(5,"div",11),m(6,"i",12),s()()}if(e&2){let t=f(2);a(2),u("ngClass",V(4,ft,t.targetMode===0,t.targetMode!==0)),a(),x(" ",c(4,2,"accessories.control.auto")," ")}}function zs(e,o){if(e&1){let t=R();n(0,"button",8),C("click",function(i){D(t);let d=f(2);return A(d.setTargetMode(1,i))}),n(1,"div",9),m(2,"i",10),s(),p(3),l(4,"translate"),n(5,"div",11),m(6,"i",12),s()()}if(e&2){let t=f(2);a(2),u("ngClass",V(4,ft,t.targetMode===1,t.targetMode!==1)),a(),x(" ",c(4,2,"accessories.control.humidify")," ")}}function qs(e,o){if(e&1){let t=R();n(0,"button",8),C("click",function(i){D(t);let d=f(2);return A(d.setTargetMode(2,i))}),n(1,"div",9),m(2,"i",10),s(),p(3),l(4,"translate"),n(5,"div",11),m(6,"i",12),s()()}if(e&2){let t=f(2);a(2),u("ngClass",V(4,ft,t.targetMode===2,t.targetMode!==2)),a(),x(" ",c(4,2,"accessories.control.dehumidify")," ")}}function Zs(e,o){if(e&1&&(n(0,"h6",14),p(1),l(2,"translate"),s(),n(3,"div",15),l(4,"translate"),_(5,Gs,7,7,"button",16),_(6,zs,7,7,"button",16),_(7,qs,7,7,"button",16),s()),e&2){let t=f();a(),v(c(2,5,"accessories.control.mode")),a(2),y("aria-label",c(4,7,"accessories.control.mode_control")),a(2),k(t.targetStateValidValues.includes(0)?5:-1),a(),k(t.targetStateValidValues.includes(1)?6:-1),a(),k(t.targetStateValidValues.includes(2)?7:-1)}}function Ks(e,o){if(e&1){let t=R();n(0,"h6",14),p(1),l(2,"translate"),s(),n(3,"nouislider",17),G("ngModelChange",function(i){D(t);let d=f(2);return U(d.autoHumidity,i)||(d.autoHumidity=i),A(i)}),C("ngModelChange",function(){D(t);let i=f(2);return A(i.onAutoHumidityStateChange())}),s()}if(e&2){let t=f(2);a(),Ue(" ",c(2,7,"accessories.control.target_auto"),": ",t.autoHumidity[0],"% - ",t.autoHumidity[1],"% "),a(2),u("min",t.RelativeHumidityHumidifierThreshold.minValue)("max",t.RelativeHumidityDehumidifierThreshold.maxValue)("step",t.RelativeHumidityDehumidifierThreshold.minStep),j("ngModel",t.autoHumidity)}}function Qs(e,o){if(e&1){let t=R();n(0,"h6",14),p(1),l(2,"translate"),s(),n(3,"nouislider",17),G("ngModelChange",function(i){D(t);let d=f(2);return U(d.targetHumidifierHumidity,i)||(d.targetHumidifierHumidity=i),A(i)}),C("ngModelChange",function(){D(t);let i=f(2);return A(i.onHumidityStateChange())}),s()}if(e&2){let t=f(2);a(),O("",c(2,6,"accessories.control.target_auto"),": ",t.targetHumidifierHumidity,"%"),a(2),u("min",t.RelativeHumidityHumidifierThreshold.minValue)("max",t.RelativeHumidityHumidifierThreshold.maxValue)("step",t.RelativeHumidityHumidifierThreshold.minStep),j("ngModel",t.targetHumidifierHumidity)}}function Ys(e,o){if(e&1){let t=R();n(0,"h6",14),p(1),l(2,"translate"),s(),n(3,"nouislider",17),G("ngModelChange",function(i){D(t);let d=f(2);return U(d.targetDehumidifierHumidity,i)||(d.targetDehumidifierHumidity=i),A(i)}),C("ngModelChange",function(){D(t);let i=f(2);return A(i.onHumidityStateChange())}),s()}if(e&2){let t=f(2);a(),O("",c(2,6,"accessories.control.target_auto"),": ",t.targetDehumidifierHumidity,"%"),a(2),u("min",t.RelativeHumidityDehumidifierThreshold.minValue)("max",t.RelativeHumidityDehumidifierThreshold.maxValue)("step",t.RelativeHumidityDehumidifierThreshold.minStep),j("ngModel",t.targetDehumidifierHumidity)}}function Xs(e,o){if(e&1&&_(0,Ks,4,9)(1,Qs,4,8)(2,Ys,4,8),e&2){let t=f();k(t.RelativeHumidityHumidifierThreshold&&t.RelativeHumidityDehumidifierThreshold?0:t.RelativeHumidityHumidifierThreshold&&!t.RelativeHumidityDehumidifierThreshold?1:!t.RelativeHumidityHumidifierThreshold&&t.RelativeHumidityDehumidifierThreshold?2:-1)}}var xn=(()=>{class e{$activeModal=w(X);service;type;$accessories;stateSubscription;targetState;targetMode;targetHumidityChanged=new Q;targetStateValidValues=[];RelativeHumidityDehumidifierThreshold;RelativeHumidityHumidifierThreshold;targetDehumidifierHumidity;targetHumidifierHumidity;autoHumidity;constructor(){this.targetHumidityChanged.pipe(Y(500)).subscribe(()=>{this.RelativeHumidityHumidifierThreshold&&this.service.getCharacteristic("RelativeHumidityHumidifierThreshold").setValue(this.targetHumidifierHumidity),this.RelativeHumidityDehumidifierThreshold&&this.service.getCharacteristic("RelativeHumidityDehumidifierThreshold").setValue(this.targetDehumidifierHumidity)})}ngOnInit(){this.targetState=this.service.values.Active,this.targetMode=this.service.values.TargetHumidifierDehumidifierState,this.RelativeHumidityDehumidifierThreshold=this.service.getCharacteristic("RelativeHumidityDehumidifierThreshold"),this.RelativeHumidityHumidifierThreshold=this.service.getCharacteristic("RelativeHumidityHumidifierThreshold"),this.targetStateValidValues=this.service.getCharacteristic("TargetHumidifierDehumidifierState").validValues,this.loadTargetHumidity(),setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(r=>{r.style.background="linear-gradient(to left, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))"})},10),this.$accessories&&(this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetState=this.service.values.Active,this.targetMode=this.service.values.TargetHumidifierDehumidifierState,this.targetDehumidifierHumidity=this.service.getCharacteristic("RelativeHumidityDehumidifierThreshold")?.value,this.targetHumidifierHumidity=this.service.getCharacteristic("RelativeHumidityHumidifierThreshold")?.value,this.autoHumidity=[this.targetHumidifierHumidity,this.targetDehumidifierHumidity]}))}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}loadTargetHumidity(){this.targetDehumidifierHumidity=this.service.getCharacteristic("RelativeHumidityDehumidifierThreshold")?.value,this.targetHumidifierHumidity=this.service.getCharacteristic("RelativeHumidityHumidifierThreshold")?.value,this.autoHumidity=[this.targetHumidifierHumidity,this.targetDehumidifierHumidity]}setTargetState(t,r){this.targetState=t,this.service.getCharacteristic("Active").setValue(this.targetState),this.loadTargetHumidity(),r.target.blur()}setTargetMode(t,r){this.targetMode=t,this.service.getCharacteristic("TargetHumidifierDehumidifierState").setValue(this.targetMode),this.loadTargetHumidity(),r.target.blur()}onHumidityStateChange(){this.autoHumidity=[this.targetHumidifierHumidity,this.targetDehumidifierHumidity],this.targetHumidityChanged.next(void 0)}onAutoHumidityStateChange(){this.targetHumidifierHumidity=this.autoHumidity[0],this.targetDehumidifierHumidity=this.autoHumidity[1],this.targetHumidityChanged.next(void 0)}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service",type:"type",$accessories:"$accessories"},decls:28,vars:26,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"mt-2","mb-4","fs-4"],[1,"fas","fa-temperature-full"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[1,"mt-4"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"h6",5),m(7,"i",6),p(8),s(),n(9,"div",7),l(10,"translate"),n(11,"button",8),C("click",function(h){return i.setTargetState(0,h)}),n(12,"div",9),m(13,"i",10),s(),p(14),l(15,"translate"),n(16,"div",11),m(17,"i",12),s()(),n(18,"button",8),C("click",function(h){return i.setTargetState(1,h)}),n(19,"div",9),m(20,"i",10),s(),p(21),l(22,"translate"),n(23,"div",11),m(24,"i",12),s()()(),_(25,Zs,8,9),_(26,Xs,3,1),s(),m(27,"div",13),s()),r&2&&(a(2),u("innerText",i.service.customName||i.service.serviceName),a(),y("aria-label",c(4,12,"form.button_close")),a(4),tt("color",i.service.values.CurrentHumidifierDehumidifierState===2&&i.service.values.Active===1||i.type==="humidifier"&&(i.service.values.Active||i.service.values.On)?"#1e8bbd":i.service.values.CurrentHumidifierDehumidifierState===3&&i.service.values.Active===1||i.type==="dehumidifier"&&(i.service.values.Active||i.service.values.On)?"#e69533":i.service.values.Active||i.service.values.On?"#42d672":"#7b7b7b"),a(),x("",i.service.values.CurrentRelativeHumidity,"% "),a(),y("aria-label",c(10,14,"accessories.control.state_control")),a(4),u("ngClass",V(20,ft,i.targetState===0,i.targetState!==0)),a(),x(" ",c(15,16,"accessories.control.off")," "),a(6),u("ngClass",V(23,ft,i.targetState===1,i.targetState!==1)),a(),x(" ",c(22,18,"accessories.control.on")," "),a(4),k(i.targetStateValidValues.length?25:-1),a(),k(i.targetStateValidValues.includes(0)?26:-1))},dependencies:[E,ee,ie,ne,oe,M],encapsulation:2})}return e})();var Js=e=>({"accessory-on":e});function el(e,o){if(e&1&&(B(),n(0,"text",36),p(1),s()),e&2){let t=f();a(),x(" ",t.service.values.CurrentRelativeHumidity,"% ")}}function tl(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.off")," ")}function il(e,o){if(e&1&&(m(0,"i",39),p(1)),e&2){let t=f(2);a(),O(" ",t.service.values.RelativeHumidityHumidifierThreshold,"% - ",t.service.values.RelativeHumidityDehumidifierThreshold,"% ")}}function nl(e,o){if(e&1&&(m(0,"i",39),p(1)),e&2){let t=f(2);a(),x(" ",t.service.values.RelativeHumidityHumidifierThreshold,"% ")}}function ol(e,o){if(e&1&&(m(0,"i",39),p(1)),e&2){let t=f(2);a(),x(" ",t.service.values.RelativeHumidityDehumidifierThreshold,"% ")}}function rl(e,o){if(e&1&&_(0,il,2,2)(1,nl,2,1)(2,ol,2,1),e&2){let t=f();k(t.hasHumidifier&&t.hasDehumidifier?0:t.hasHumidifier&&!t.hasDehumidifier?1:!t.hasHumidifier&&t.hasDehumidifier?2:-1)}}function al(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.humidify")," ")}function sl(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.dehumidify")," ")}function ll(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.on")," ")}function cl(e,o){if(e&1&&_(0,sl,2,3)(1,ll,2,3),e&2){let t=f();k(t.service.values.TargetHumidifierDehumidifierState===2?0:1)}}var yn=(()=>{class e{$accessories=w(K);$modal=w(J);service;readyForControl=!1;type;hasHumidifier=!1;hasDehumidifier=!1;ngOnInit(){this.hasHumidifier="RelativeHumidityHumidifierThreshold"in this.service.values,this.hasDehumidifier="RelativeHumidityDehumidifierThreshold"in this.service.values}onClick(){this.readyForControl&&("Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1):"On"in this.service.values&&this.service.getCharacteristic("On").setValue(!this.service.values.On))}onLongClick(){if(this.readyForControl&&"TargetHumidifierDehumidifierState"in this.service.values){let t=this.$modal.open(xn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.type=this.type,t.componentInstance.$accessories=this.$accessories}}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-humidifier-dehumidifier"]],inputs:{service:"service",readyForControl:"readyForControl",type:"type"},decls:48,vars:10,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["id","humidifyingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#1e8bbd"],["attributeName","stop-color","values","#1e8bbd;#66d6d6;#1e8bbd","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#66d6d6"],["attributeName","stop-color","values","#66d6d6;#1e8bbd;#66d6d6","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#1e8bbd"],["id","dehumidifyingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#cc5e00"],["attributeName","stop-color","values","#cc5e00;#e69533;#cc5e00;#e69533","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#e69533"],["attributeName","stop-color","values","#e69533;#cc5e00;#e69533;#cc5e00","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#cc5e00"],["x","1","y","3.5","width","30","height","25","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x1","6","y1","10","x2","6","y2","10","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","6","y1","12","x2","6","y2","12","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","6","y1","14","x2","6","y2","14","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","10","y1","10","x2","10","y2","10","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","10","y1","12","x2","10","y2","12","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","10","y1","14","x2","10","y2","14","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","14","y1","10","x2","14","y2","10","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","14","y1","12","x2","14","y2","12","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","14","y1","14","x2","14","y2","14","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","18","y1","10","x2","18","y2","10","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","18","y1","12","x2","18","y2","12","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","18","y1","14","x2","18","y2","14","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","22","y1","10","x2","22","y2","10","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","22","y1","12","x2","22","y2","12","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","22","y1","14","x2","22","y2","14","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","26","y1","10","x2","26","y2","10","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","26","y1","12","x2","26","y2","12","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","26","y1","14","x2","26","y2","14","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x","1","y","7","width","30","height","10","rx","0","stroke","#7f7f7f","stroke-width","1.2","fill-opacity","0.5"],["x","16.5","y","25.5","font-size","7","text-anchor","middle","fill","#7f7f7f","font-family","Arial, sans-serif"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"fa","fas","fa-bullseye"]],template:function(r,i){r&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3)(5,"defs")(6,"linearGradient",4)(7,"stop",5),m(8,"animate",6),s(),n(9,"stop",7),m(10,"animate",8),s(),n(11,"stop",9),m(12,"animate",6),s()(),n(13,"linearGradient",10)(14,"stop",11),m(15,"animate",12),s(),n(16,"stop",13),m(17,"animate",14),s(),n(18,"stop",15),m(19,"animate",12),s()()(),m(20,"rect",16)(21,"line",17)(22,"line",18)(23,"line",19)(24,"line",20)(25,"line",21)(26,"line",22)(27,"line",23)(28,"line",24)(29,"line",25)(30,"line",26)(31,"line",27)(32,"line",28)(33,"line",29)(34,"line",30)(35,"line",31)(36,"line",32)(37,"line",33)(38,"line",34)(39,"rect",35),_(40,el,2,1,":svg:text",36),s()(),I(),n(41,"div",37),p(42),s(),n(43,"div",38),_(44,tl,2,3)(45,rl,3,1)(46,al,2,3)(47,cl,2,1),s()()()),r&2&&(u("ngClass",N(8,Js,i.service.values.Active||i.service.values.On)),a(2),y("aria-label",c(3,6,"accessories.core.humidifier_dehumidifier")),a(37),y("fill",i.service.values.CurrentHumidifierDehumidifierState===2&&i.service.values.Active===1||i.type==="humidifier"&&(i.service.values.Active||i.service.values.On)?"url(#humidifyingGradient)":i.service.values.CurrentHumidifierDehumidifierState===3&&i.service.values.Active===1||i.type==="dehumidifier"&&(i.service.values.Active||i.service.values.On)?"url(#dehumidifyingGradient)":i.service.values.Active||i.service.values.On?"#42d672":"#7b7b7b"),a(),k("CurrentRelativeHumidity"in i.service.values?40:-1),a(2),v(i.service.customName||i.service.serviceName),a(2),k("Active"in i.service.values&&!i.service.values.Active||"On"in i.service.values&&!i.service.values.On?44:i.service.values.TargetHumidifierDehumidifierState===0&&(i.hasHumidifier||i.hasDehumidifier)?45:i.service.values.TargetHumidifierDehumidifierState===1?46:47))},dependencies:[q,E,M],encapsulation:2})}return e})();function pl(e,o){if(e&1&&p(0),e&2){let t=f();x(" ",t.service.values.CurrentRelativeHumidity,"% ")}}function dl(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.no_data")," ")}var _n=(()=>{class e{service;static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-humidity-sensor"]],inputs:{service:"service"},decls:26,vars:5,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["transform","translate(1.8, -4.3), scale(0.85)"],["d","M23.61 24.58C23.61 28.67 20.44 31.99 16.56 31.99C12.68 31.99 9.52 28.67 9.52 24.58C9.52 20.49 12.68 17.13 16.56 10.87C20.44 17.13 23.61 20.49 23.61 24.58Z","fill","#1976d2","fill-opacity","0.4","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(r,i){r&1&&(te(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),te(4,"svg",3),ye(5,"rect",4),te(6,"g",5),ye(7,"path",6),ae(),ye(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19),ae()(),I(),te(21,"div",20),p(22),ae(),te(23,"div",21),_(24,pl,1,1)(25,dl,2,3),ae()()()),r&2&&(a(2),y("aria-label",c(3,3,"accessories.core.humidity_sensor")),a(20),v(i.service.customName||i.service.serviceName),a(2),k("CurrentRelativeHumidity"in i.service.values?24:25))},dependencies:[M],styles:[".humidity-drop[_ngcontent-%COMP%]{position:relative;display:inline-block;width:50px;height:50px;line-height:42px;border-radius:5% 55% 70%;font-size:14px;text-align:center;margin-bottom:6px;margin-top:9px;background-color:gray;color:#d3d3d3;transform:rotate(45deg)}@media (max-width: 575px){.humidity-drop-collapse[_ngcontent-%COMP%]{width:31px;height:31px;line-height:28px;font-size:10px;margin-bottom:7px;margin-top:5px}.humidity-drop-collapse[_ngcontent-%COMP%] .humidity-drop-text[_ngcontent-%COMP%]{margin-left:-2px}}.humidity-drop-text[_ngcontent-%COMP%]{transform:rotate(-45deg);margin-left:-5px}"]})}return e})();var ml=e=>({"accessory-on":e});function ul(e,o){e&1&&(n(0,"div",14),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.running")))}function fl(e,o){e&1&&(n(0,"div",14),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.off")))}var kn=(()=>{class e{service;static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-irrigation-system"]],inputs:{service:"service"},decls:18,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32","height","32","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","9","y","1","width","14","height","6.5","rx","2","fill","#1976d2","stroke","#7b7b7b","stroke-width","0.5","fill-opacity","0.5"],["x1","16","y1","8","x2","16","y2","31","stroke","#7f7f7f","stroke-width","1","stroke-linecap","round",1,"pipe"],["x1","1","y1","9","x2","31","y2","9","stroke","#7f7f7f","stroke-width","1","stroke-linecap","round",1,"pipe"],["x1","1","y1","20","x2","31","y2","20","stroke","#7f7f7f","stroke-width","1","stroke-linecap","round",1,"pipe"],["x1","1","y1","31","x2","31","y2","31","stroke","#7f7f7f","stroke-width","1","stroke-linecap","round",1,"pipe"],["x","1","y","10","width","14","height","9","rx","0","fill","#7f7f7f","stroke-width","0","fill-opacity","0.5",1,"field"],["x","17","y","10","width","14","height","9","rx","0","fill","#7f7f7f","stroke-width","0","fill-opacity","0.5",1,"field"],["x","1","y","21","width","14","height","9","rx","0","fill","#7f7f7f","stroke-width","0","fill-opacity","0.5",1,"field"],["x","17","y","21","width","14","height","9","rx","0","fill","#7f7f7f","stroke-width","0","fill-opacity","0.5",1,"field"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"line",8)(10,"rect",9)(11,"rect",10)(12,"rect",11)(13,"rect",12),s()(),I(),n(14,"div",13),p(15),s(),_(16,ul,3,3,"div",14)(17,fl,3,3,"div",14),s()()),r&2&&(u("ngClass",N(6,ml,i.service.values.InUse)),a(2),y("aria-label",c(3,4,"accessories.core.irrigation_system")),a(13),x(" ",i.service.customName||i.service.values.ConfiguredName||i.service.serviceName," "),a(),k(i.service.values.InUse?16:17))},dependencies:[E,M],styles:[".accessory-on svg .field{fill:#4caf50} .accessory-on svg .pipe{animation:_ngcontent-%COMP%_pulse 5s infinite}@keyframes _ngcontent-%COMP%_pulse{0%,to{stroke:#7f7f7f;stroke-opacity:.5}50%{stroke:#1976d2;stroke-opacity:1}}"]})}return e})();var vl=e=>({"accessory-on":e});function gl(e,o){e&1&&(n(0,"div",23),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.detected")))}function hl(e,o){e&1&&(n(0,"div",24),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.not_detected")))}var Sn=(()=>{class e{service;static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-leak-sensor"]],inputs:{service:"service"},decls:28,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2",1,"red-outline"],["transform","translate(7, 0), scale(0.35)"],["d","M23.61 24.58C23.61 28.67 20.44 31.99 16.56 31.99C12.68 31.99 9.52 28.67 9.52 24.58C9.52 20.49 12.68 17.13 16.56 10.87C20.44 17.13 23.61 20.49 23.61 24.58Z","fill","#1976d2","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","1"],["transform","translate(13, 7), scale(0.35)"],["cx","16","cy","22","rx","10","ry","2","fill","#1976d2","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","0.35"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4),n(6,"g",5),m(7,"path",6),s(),n(8,"g",7),m(9,"path",6),s(),m(10,"ellipse",8)(11,"line",9)(12,"line",10)(13,"line",11)(14,"line",12)(15,"line",13)(16,"line",14)(17,"line",15)(18,"line",16)(19,"line",17)(20,"line",18)(21,"line",19)(22,"line",20)(23,"line",21),s()(),I(),n(24,"div",22),p(25),s(),_(26,gl,3,3,"div",23)(27,hl,3,3,"div",24),s()()),r&2&&(u("ngClass",N(6,vl,i.service.values.LeakDetected)),a(2),y("aria-label",c(3,4,"accessories.core.leak_sensor")),a(23),v(i.service.customName||i.service.serviceName),a(),k(i.service.values.LeakDetected?26:27))},dependencies:[E,M],styles:[".accessory-on svg .red-outline{stroke:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{stroke-opacity:.8}50%{stroke-opacity:.2}}"]})}return e})();function Cl(e,o){if(e&1&&(te(0,"div",28),p(1),l(2,"number"),ae()),e&2){let t=f();a(),x("",le(2,1,t.service.values.CurrentAmbientLightLevel,"0.1-1")," lux")}}function xl(e,o){if(e&1&&(te(0,"div",28),p(1),l(2,"number"),ae()),e&2){let t=f();a(),x("",le(2,1,t.service.values.CurrentAmbientLightLevel,"1.0-0")," lux")}}var bn=(()=>{class e{service;static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-light-sensor"]],inputs:{service:"service"},decls:32,vars:5,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["cx","16","cy","13.75","r","5","stroke","#ff9800","fill","none","stroke-width","1.2","stroke-opacity","0.5"],["x1","16","y1","3","x2","16","y2","7","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","23.5","y1","6","x2","20.5","y2","9","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","22.75","y1","13.5","x2","26.75","y2","13.5","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","20.75","y1","18.25","x2","23.75","y2","21.25","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","16","y1","20.5","x2","16","y2","24.5","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","11.25","y1","18.25","x2","8.25","y2","21.25","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","5.25","y1","13.5","x2","9.25","y2","13.5","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","8.5","y1","6","x2","11.5","y2","9","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(r,i){r&1&&(te(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),te(4,"svg",3),ye(5,"rect",4)(6,"circle",5)(7,"line",6)(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20)(22,"line",21)(23,"line",22)(24,"line",23)(25,"line",24)(26,"line",25)(27,"line",26),ae()(),I(),te(28,"div",27),p(29),ae(),_(30,Cl,3,4,"div",28)(31,xl,3,4,"div",28),ae()()),r&2&&(a(2),y("aria-label",c(3,3,"accessories.core.light_sensor")),a(27),v(i.service.customName||i.service.serviceName),a(),k(i.service.values.CurrentAmbientLightLevel<1?30:31))},dependencies:[we,M],encapsulation:2})}return e})();var $e=(()=>{class e{miredToKelvin(t){return Math.round(1e6/t)}kelvinToMired(t){return Math.round(1e6/t)}kelvinToHsl(t){let r=t/100,i,d,h;r<=66?(i=255,d=Math.min(99.4708025861*Math.log(r)-161.1195681661,255),h=r<=19?0:Math.min(138.5177312231*Math.log(r-10)-305.0447927307,255)):(i=Math.min(329.698727446*(r-60)**-.1332047592,255),d=Math.min(288.1221695283*(r-60)**-.0755148492,255),h=255),i/=255,d/=255,h/=255;let Z=Math.max(i,d,h),ce=Math.min(i,d,h),W=Z-ce,re=0;W!==0&&(Z===i?re=(d-h)/W%6:Z===d?re=(h-i)/W+2:re=(i-d)/W+4,re=Math.round(re*60),re<0&&(re+=360));let ue=(Z+ce)/2,Te=W===0?0:W/(1-Math.abs(2*ue-1));return`hsl(${Math.round(re)}, ${Math.round(Te*100)}%, ${Math.round(ue*100)}%)`}static \u0275fac=function(r){return new(r||e)};static \u0275prov=wi({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var Tn=(e,o)=>({"fa-check-circle":e,"fa-blank":o}),yl=(e,o)=>({"off-text":e,"on-text":o}),ti=(e,o)=>({"mb-1":e,"":o});function _l(e,o){e&1&&m(0,"div")}function kl(e,o){if(e&1&&(n(0,"div",11)(1,"div",13)(2,"div",7),m(3,"i",14),s(),p(4),l(5,"translate"),n(6,"div",9),m(7,"i",10),s()()()),e&2){let t=f();a(3),u("ngClass",V(5,yl,!t.isAdaptiveLightingEnabled,t.isAdaptiveLightingEnabled)),a(),O(" ",c(5,3,"accessories.control.adaptive_lighting"),": ",t.isAdaptiveLightingEnabled?"ON":"OFF"," ")}}function Sl(e,o){if(e&1){let t=R();n(0,"h6",15),p(1),l(2,"translate"),s(),n(3,"nouislider",16),G("ngModelChange",function(i){D(t);let d=f();return U(d.targetBrightness.value,i)||(d.targetBrightness.value=i),A(i)}),C("ngModelChange",function(){D(t);let i=f();return A(i.onBrightnessStateChange())}),s()}if(e&2){let t=f();a(),O("",c(2,6,"accessories.control.brightness"),": ",t.targetBrightness.value,"%"),a(2),u("min",t.targetBrightness.min)("max",t.targetBrightness.max)("step",t.targetBrightness.step),j("ngModel",t.targetBrightness.value)}}function bl(e,o){e&1&&(n(0,"div",18)(1,"span",19),p(2),l(3,"translate"),s()()),e&2&&(a(2),v(c(3,1,"accessories.control.adaptive_lighting_note")))}function Tl(e,o){if(e&1){let t=R();n(0,"h6",15),p(1),l(2,"translate"),s(),n(3,"nouislider",17),G("ngModelChange",function(i){D(t);let d=f();return U(d.targetHue.value,i)||(d.targetHue.value=i),A(i)}),C("ngModelChange",function(){D(t);let i=f();return A(i.onHueStateChange())}),s(),_(4,bl,4,3,"div",18)}if(e&2){let t=f();a(),O("",c(2,8,"accessories.control.hue"),": ",t.targetHue.value,"\xB0"),a(2),u("min",0)("max",360)("step",1),j("ngModel",t.targetHue.value),u("ngClass",V(10,ti,t.isAdaptiveLightingEnabled,!t.isAdaptiveLightingEnabled)),a(),k(t.isAdaptiveLightingEnabled?4:-1)}}function Ml(e,o){e&1&&(n(0,"div",18)(1,"span",19),p(2),l(3,"translate"),s()()),e&2&&(a(2),v(c(3,1,"accessories.control.adaptive_lighting_note")))}function wl(e,o){if(e&1){let t=R();n(0,"h6",15),p(1),l(2,"translate"),s(),n(3,"nouislider",17),G("ngModelChange",function(i){D(t);let d=f();return U(d.targetSaturation.value,i)||(d.targetSaturation.value=i),A(i)}),C("ngModelChange",function(){D(t);let i=f();return A(i.onSaturationStateChange())}),s(),_(4,Ml,4,3,"div",18)}if(e&2){let t=f();a(),O("",c(2,8,"accessories.control.saturation"),": ",t.targetSaturation.value,"%"),a(2),u("min",0)("max",100)("step",1),j("ngModel",t.targetSaturation.value),u("ngClass",V(10,ti,t.isAdaptiveLightingEnabled,!t.isAdaptiveLightingEnabled)),a(),k(t.isAdaptiveLightingEnabled?4:-1)}}function El(e,o){e&1&&(n(0,"div",18)(1,"span",19),p(2),l(3,"translate"),s()()),e&2&&(a(2),v(c(3,1,"accessories.control.adaptive_lighting_note")))}function Bl(e,o){if(e&1){let t=R();n(0,"h6",15),p(1),l(2,"translate"),l(3,"convertMired"),s(),n(4,"nouislider",17),G("ngModelChange",function(i){D(t);let d=f();return U(d.targetColorTemperature.value,i)||(d.targetColorTemperature.value=i),A(i)}),C("ngModelChange",function(){D(t);let i=f();return A(i.onColorTemperatureStateChange())}),s(),_(5,El,4,3,"div",18)}if(e&2){let t=f();a(),O(" ",c(2,8,"accessories.control.color_temperature"),": ",c(3,10,t.targetColorTemperature.mired)," "),a(3),u("min",t.targetColorTemperature.min)("max",t.targetColorTemperature.max)("step",t.targetColorTemperature.step),j("ngModel",t.targetColorTemperature.value),u("ngClass",V(12,ti,t.isAdaptiveLightingEnabled,!t.isAdaptiveLightingEnabled)),a(),k(t.isAdaptiveLightingEnabled?5:-1)}}var Mn=(()=>{class e{$activeModal=w(X);$colour=w($e);service;$accessories;isAdaptiveLightingEnabled$;stateSubscription;targetMode;targetBrightness;targetBrightnessChanged=new Q;targetHue;targetHueChanged=new Q;targetSaturation;targetSaturationChanged=new Q;targetColorTemperature;targetColorTemperatureChanged=new Q;hasAdaptiveLighting=!1;isAdaptiveLightingEnabled=!1;sliderIndex=0;constructor(){this.targetBrightnessChanged.pipe(Y(500)).subscribe(()=>{this.service.getCharacteristic("Brightness").setValue(this.targetBrightness.value),this.targetBrightness.value&&!this.service.values.On?(this.targetMode=!0,this.service.getCharacteristic("On").setValue(this.targetMode)):!this.targetBrightness.value&&this.service.values.On&&(this.targetMode=!1,this.service.getCharacteristic("On").setValue(this.targetMode))}),this.targetHueChanged.pipe(Y(500)).subscribe(()=>{this.service.getCharacteristic("Hue").setValue(this.targetHue.value)}),this.targetSaturationChanged.pipe(Y(500)).subscribe(()=>{this.service.getCharacteristic("Saturation").setValue(this.targetSaturation.value)}),this.targetColorTemperatureChanged.pipe(Y(500)).subscribe(t=>{this.service.getCharacteristic("ColorTemperature").setValue(t)})}ngOnInit(){this.targetMode=this.service.values.On,this.loadTargetBrightness(),this.loadTargetHue(),this.loadTargetSaturation(),this.loadTargetColorTemperature(),this.$accessories&&(this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{if(this.targetMode=this.service.values.On,this.targetBrightness&&(this.targetBrightness.value=this.service.getCharacteristic("Brightness")?.value),this.targetHue&&(this.targetHue.value=this.service.getCharacteristic("Hue")?.value),this.targetSaturation&&(this.targetSaturation.value=this.service.getCharacteristic("Saturation")?.value),this.targetColorTemperature){let t=this.service.getCharacteristic("ColorTemperature")?.value;this.targetColorTemperature.value=this.$colour.miredToKelvin(t),this.targetColorTemperature.mired=t}}))}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setTargetMode(t,r){this.targetMode=t,this.service.getCharacteristic("On").setValue(this.targetMode),this.targetMode&&this.targetBrightness&&!this.targetBrightness.value&&(this.targetBrightness.value=this.service.getCharacteristic("Brightness").maxValue),r.target.blur()}onBrightnessStateChange(){this.targetBrightnessChanged.next(this.targetBrightness.value)}onHueStateChange(){this.targetHueChanged.next(this.targetHue.value);let t=document.querySelectorAll(".noUi-target")[this.sliderIndex-1];if(t){let r=this.targetHue.value;t.style.background=`linear-gradient(to right,
|
|
2
|
+
hsl(${r}, 0%, 50%),
|
|
3
|
+
hsl(${r}, 100%, 50%))`}}onSaturationStateChange(){this.targetSaturationChanged.next(this.targetSaturation.value)}onColorTemperatureStateChange(){let t=this.$colour.kelvinToMired(this.targetColorTemperature.value);this.targetColorTemperature.mired=t,this.targetColorTemperatureChanged.next(t)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadTargetBrightness(){let t=this.service.getCharacteristic("Brightness");t&&(this.targetBrightness={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},setTimeout(()=>{let r=document.querySelectorAll(".noUi-target")[this.sliderIndex];r&&(r.style.background="linear-gradient(to right, #242424, #ffd6aa)",this.sliderIndex+=1)},10))}loadTargetHue(){this.service.getCharacteristic("Hue")&&(this.targetHue={value:this.service.getCharacteristic("Hue").value},setTimeout(()=>{let r=document.querySelectorAll(".noUi-target")[this.sliderIndex];r&&(r.style.background=`linear-gradient(to right,
|
|
4
|
+
hsl(0, 100%, 50%),
|
|
5
|
+
hsl(60, 100%, 50%),
|
|
6
|
+
hsl(120, 100%, 50%),
|
|
7
|
+
hsl(180, 100%, 50%),
|
|
8
|
+
hsl(240, 100%, 50%),
|
|
9
|
+
hsl(300, 100%, 50%),
|
|
10
|
+
hsl(360, 100%, 50%))`),this.sliderIndex+=1},10))}loadTargetSaturation(){this.service.getCharacteristic("Saturation")&&(this.targetSaturation={value:this.service.getCharacteristic("Saturation").value},setTimeout(()=>{let r=document.querySelectorAll(".noUi-target")[this.sliderIndex];if(r){let i=this.targetHue.value||0;r.style.background=`linear-gradient(to right,
|
|
11
|
+
hsl(${i}, 0%, 50%),
|
|
12
|
+
hsl(${i}, 100%, 50%))`}this.sliderIndex+=1},10))}loadTargetColorTemperature(){let t=this.service.getCharacteristic("ColorTemperature");t&&(this.targetColorTemperature={value:this.$colour.miredToKelvin(t.value),mired:t.value,min:this.$colour.miredToKelvin(t.maxValue),max:this.$colour.miredToKelvin(t.minValue),step:t.minStep},setTimeout(()=>{let r=document.querySelectorAll(".noUi-target")[this.sliderIndex];if(r){let i=this.$colour.kelvinToHsl(this.targetColorTemperature.min),d=this.$colour.kelvinToHsl(this.targetColorTemperature.max);r.style.background=`linear-gradient(to right, ${i}, ${d})`}},10),this.isAdaptiveLightingEnabled$&&(this.hasAdaptiveLighting=!0,this.isAdaptiveLightingEnabled$.subscribe(r=>{this.isAdaptiveLightingEnabled=r})))}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories",isAdaptiveLightingEnabled$:"isAdaptiveLightingEnabled$"},decls:29,vars:27,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"d-flex","justify-content-center","mb-0","p-0","mt-0","grey-outline"],[1,"modal-footer"],[1,"mb-0","mx-0","p-3","btn-read","w-100","no-round-top"],[1,"fas","fa-xl","fa-sun",3,"ngClass"],[1,"mt-4"],[3,"ngModelChange","min","max","step","ngModel"],[3,"ngModelChange","min","max","step","ngModel","ngClass"],[1,"d-flex","text-center","mt-0","mb-1"],[1,"grey-text","small"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"div",5),l(7,"translate"),n(8,"button",6),C("click",function(h){return i.setTargetMode(!1,h)}),n(9,"div",7),m(10,"i",8),s(),p(11),l(12,"translate"),n(13,"div",9),m(14,"i",10),s()(),n(15,"button",6),C("click",function(h){return i.setTargetMode(!0,h)}),n(16,"div",7),m(17,"i",8),s(),p(18),l(19,"translate"),n(20,"div",9),m(21,"i",10),s()(),_(22,_l,1,0,"div"),s(),_(23,kl,8,8,"div",11),_(24,Sl,4,8),_(25,Tl,5,13),_(26,wl,5,13),_(27,Bl,6,15),s(),m(28,"div",12),s()),r&2&&(a(2),u("innerText",i.service.customName||i.service.serviceName),a(),y("aria-label",c(4,13,"form.button_close")),a(3),y("aria-label",c(7,15,"accessories.control.mode_control")),a(4),u("ngClass",V(21,Tn,!i.targetMode,i.targetMode)),a(),x(" ",c(12,17,"accessories.control.off")," "),a(6),u("ngClass",V(24,Tn,i.targetMode,!i.targetMode)),a(),x(" ",c(19,19,"accessories.control.on")," "),a(4),k(i.hasAdaptiveLighting?22:-1),a(),k(i.hasAdaptiveLighting?23:-1),a(),k(i.targetBrightness?24:-1),a(),k(i.targetHue?25:-1),a(),k(i.targetSaturation?26:-1),a(),k(i.targetColorTemperature?27:-1))},dependencies:[ee,ie,ne,oe,E,M,nt],encapsulation:2})}return e})();var Vl=e=>({"accessory-on":e});function Dl(e,o){if(e&1&&(m(0,"div",10),l(1,"translate")),e&2){let t=f();u("innerHTML",t.service.values.On?t.service.values.Brightness+"%"+(t.hasAdaptiveLighting?" \xB7 <i class='fa fa-sun "+(t.isAdaptiveLightingEnabled?"on-text":"grey-text")+"'></i>":""):c(1,1,"accessories.control.off"),Oe)}}function Al(e,o){if(e&1&&(m(0,"div",10),l(1,"translate")),e&2){let t=f();u("innerHTML",c(1,1,t.service.values.On||t.service.values.Active?"accessories.control.on"+(t.hasAdaptiveLighting?" \xB7 <i class='fa fa-sun "+(t.isAdaptiveLightingEnabled?"on-text":"grey-text")+"'></i>":""):"accessories.control.off"),Oe)}}var wn=(()=>{class e{$accessories=w(K);$modal=w(J);intervalId;$colour=w($e);service;readyForControl=!1;hasAdaptiveLighting=!1;isAdaptiveLightingEnabled=!1;isAdaptiveLightingEnabled$=new ki(!1);ngOnInit(){this.loadAdaptiveLighting()}ngOnDestroy(){this.intervalId&&clearInterval(this.intervalId)}onClick(){this.readyForControl&&("On"in this.service.values?this.service.getCharacteristic("On").setValue(!this.service.values.On):"Active"in this.service.values&&this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1),"Brightness"in this.service.values&&!this.service.values.On&&!this.service.values.Brightness&&(this.service.values.Brightness=this.service.getCharacteristic("Brightness").maxValue))}onLongClick(){if(this.readyForControl&&("Brightness"in this.service.values||"Hue"in this.service.values||"Saturation"in this.service.values||"ColorTemperature"in this.service.values)){let t=this.$modal.open(Mn,{size:"md",backdrop:"static"});if(t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories,this.hasAdaptiveLighting){t.componentInstance.isAdaptiveLightingEnabled$=this.isAdaptiveLightingEnabled$,this.intervalId&&clearInterval(this.intervalId),this.intervalId=setInterval(()=>{this.isAdaptiveLightingEnabled$.next(!!this.service.values.CharacteristicValueActiveTransitionCount)},3e3);let r=this.isAdaptiveLightingEnabled$.subscribe(i=>{this.isAdaptiveLightingEnabled=i});t.result.finally(()=>{this.intervalId&&clearInterval(this.intervalId),r.unsubscribe(),this.intervalId=setInterval(()=>{this.isAdaptiveLightingEnabled$.next(!!this.service.values.CharacteristicValueActiveTransitionCount)},3e4)})}}}kelvinToHex(t){t=Math.max(1e3,Math.min(4e4,t));let r=t/100,i,d,h;return r<=66?(i=255,d=r,d=99.4708025861*Math.log(d)-161.1195681661,h=r<=19?0:138.5177312231*Math.log(r-10)-305.0447927307):(i=329.698727446*(r-60)**-.1332047592,d=288.1221695283*(r-60)**-.0755148492,h=255),i=Math.round(Math.min(Math.max(i,0),255)),d=Math.round(Math.min(Math.max(d,0),255)),h=Math.round(Math.min(Math.max(h,0),255)),`#${i.toString(16).padStart(2,"0")}${d.toString(16).padStart(2,"0")}${h.toString(16).padStart(2,"0")}`}loadAdaptiveLighting(){"CharacteristicValueActiveTransitionCount"in this.service.values&&(this.hasAdaptiveLighting=!0,this.isAdaptiveLightingEnabled$.next(!!this.service.values.CharacteristicValueActiveTransitionCount),this.intervalId=setInterval(()=>{this.isAdaptiveLightingEnabled$.next(!!this.service.values.CharacteristicValueActiveTransitionCount)},3e4),this.isAdaptiveLightingEnabled$.subscribe(t=>{this.isAdaptiveLightingEnabled=t}))}Math=Math;static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-lightbulb"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:14,vars:10,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["stroke","#7f7f7f","stroke-width","1.5","d","M8 21c-2.8-2.2-4.5-5.4-4.5-9 0-6.1 5-11 11.5-11S27.5 5.9 27.5 12c0 3.5-1.7 6.7-4.5 8.9-1.2 1-1.8 4.8-3 7.3-.9 2-2.2 2.7-4.5 2.7s-3.6-.7-4.5-2.7c-1.2-2.5-1.8-6.3-3-7.3z"],["stroke","#7f7f7f","stroke-width","1.5","x1","8","y1","21.5","x2","23","y2","21.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","23","x2","21","y2","24"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","25.5","x2","21","y2","26.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","11","y1","28","x2","20","y2","29"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerHTML"]],template:function(r,i){r&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"path",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"line",8),s()(),I(),n(10,"div",9),p(11),s(),_(12,Dl,2,3,"div",10)(13,Al,2,3,"div",10),s()()),r&2&&(u("ngClass",N(8,Vl,i.service.values.On||i.service.values.Active)),a(2),y("aria-label",c(3,6,"accessories.core.lightbulb")),a(3),y("fill",i.service.values.On||i.service.values.Active?"Hue"in i.service.values?"hsl("+i.service.values.Hue+", "+i.service.values.Saturation+"%, 50%)":"ColorTemperature"in i.service.values?i.$colour.kelvinToHsl(i.$colour.miredToKelvin(i.service.values.ColorTemperature)):"#ffcf55":"none")("fill-opacity","Brightness"in i.service.values?.25+i.service.values.Brightness/100*.5:.75),a(6),v(i.service.customName||i.service.serviceName),a(),k(i.service.values.Brightness?12:13))},dependencies:[q,E,M],encapsulation:2})}return e})();var At=(()=>{class e{transform(t){if(typeof t!="number"||Number.isNaN(t))return"";let r=Math.floor(t/60),i=t%60;return[r>0?`${r.toString()}m`:"",i>0?`${i.toString()}s`:""].filter(Boolean).join(" ")}static \u0275fac=function(r){return new(r||e)};static \u0275pipe=Ii({name:"duration",type:e,pure:!0})}return e})();var En=(e,o)=>({"fa-check-circle":e,"fa-blank":o});function Il(e,o){if(e&1){let t=R();n(0,"h6",12),p(1),l(2,"translate"),l(3,"duration"),s(),n(4,"nouislider",13),G("ngModelChange",function(i){D(t);let d=f();return U(d.targetLockManagementAutoSecurityTimeout.value,i)||(d.targetLockManagementAutoSecurityTimeout.value=i),A(i)}),C("ngModelChange",function(){D(t);let i=f();return A(i.onLockManagementAutoSecurityTimeoutStateChange())}),s()}if(e&2){let t=f();a(),O(" ",c(2,6,"accessories.control.lock_auto"),": ",t.targetLockManagementAutoSecurityTimeout.value===0?"\u221E":c(3,8,t.targetLockManagementAutoSecurityTimeout.value)," "),a(3),u("min",t.targetLockManagementAutoSecurityTimeout.min)("max",t.targetLockManagementAutoSecurityTimeout.max)("step",10),j("ngModel",t.targetLockManagementAutoSecurityTimeout.value)}}var Bn=(()=>{class e{$activeModal=w(X);lockTimeout;service;$accessories;stateSubscription;serviceManagement;targetMode;targetLockManagementAutoSecurityTimeout;targetLockManagementAutoSecurityTimeoutChanged=new Q;ngOnInit(){this.targetMode=this.service.values.LockTargetState,this.service.linkedServices&&(this.serviceManagement=Object.values(this.service.linkedServices).find(t=>t.type==="LockManagement")),this.serviceManagement&&(this.targetLockManagementAutoSecurityTimeoutChanged.pipe(Y(300),Ti()).subscribe(()=>{this.serviceManagement.getCharacteristic("LockManagementAutoSecurityTimeout").setValue(this.targetLockManagementAutoSecurityTimeout.value)}),this.loadTargetLockManagementAutoSecurityTimeout()),this.$accessories&&(this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetMode=this.service.values.LockTargetState,this.targetLockManagementAutoSecurityTimeout&&this.serviceManagement&&(this.targetLockManagementAutoSecurityTimeout.value=this.serviceManagement.getCharacteristic("LockManagementAutoSecurityTimeout")?.value)}))}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setTargetMode(t,r){this.targetMode=t,this.service.getCharacteristic("LockTargetState").setValue(this.targetMode),this.lockTimeout&&(clearTimeout(this.lockTimeout),this.lockTimeout=null),this.targetMode===0&&this.targetLockManagementAutoSecurityTimeout?.value>0&&(this.lockTimeout=setTimeout(()=>{this.targetMode=1},(this.targetLockManagementAutoSecurityTimeout.value+.3)*1e3)),r.target.blur()}onLockManagementAutoSecurityTimeoutStateChange(){this.targetLockManagementAutoSecurityTimeoutChanged.next(this.targetLockManagementAutoSecurityTimeout.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadTargetLockManagementAutoSecurityTimeout(){let t=this.serviceManagement.getCharacteristic("LockManagementAutoSecurityTimeout");t&&(this.targetLockManagementAutoSecurityTimeout={value:t.value||0,min:t.minValue||0,max:t.maxValue||3600,step:t.minStep||10},setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(i=>{i.style.background="linear-gradient(to right, #ffffff, #ffd966, #ff0000)"})},10))}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:24,vars:22,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[1,"mt-4"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"div",5),l(7,"translate"),n(8,"button",6),C("click",function(h){return i.setTargetMode(1,h)}),n(9,"div",7),m(10,"i",8),s(),p(11),l(12,"translate"),n(13,"div",9),m(14,"i",10),s()(),n(15,"button",6),C("click",function(h){return i.setTargetMode(0,h)}),n(16,"div",7),m(17,"i",8),s(),p(18),l(19,"translate"),n(20,"div",9),m(21,"i",10),s()()(),_(22,Il,5,10),s(),m(23,"div",11),s()),r&2&&(a(2),u("innerText",i.service.customName||i.service.serviceName),a(),y("aria-label",c(4,8,"form.button_close")),a(3),y("aria-label",c(7,10,"accessories.control.mode_control")),a(4),u("ngClass",V(16,En,i.targetMode===1,i.targetMode!==1)),a(),x(" ",c(12,12,"accessories.control.locked")," "),a(6),u("ngClass",V(19,En,i.targetMode===0,i.targetMode!==0)),a(),x(" ",c(19,14,"accessories.control.unlocked")," "),a(4),k(i.serviceManagement?22:-1))},dependencies:[ee,ie,ne,oe,E,M,At],encapsulation:2})}return e})();var Ll=(e,o,t,r)=>({"accessory-on":e,unlocked:o,jammed:t,error:r}),Pl=(e,o)=>({"red-text":e,"grey-text":o});function Fl(e,o){if(e&1&&(m(0,"div",9),l(1,"translate")),e&2){let t=f();u("innerText",c(1,2,t.service.values.LockCurrentState?"accessories.control.locked":"accessories.control.unlocked"))("ngClass",V(4,Pl,!t.service.values.LockCurrentState,t.service.values.LockCurrentState))}}function Hl(e,o){e&1&&(n(0,"div",10),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.jammed")))}function Ol(e,o){e&1&&(n(0,"div",10),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.unknown")))}var Vn=(()=>{class e{$accessories=w(K);$modal=w(J);service;readyForControl=!1;onClick(){this.readyForControl&&("LockTargetState"in this.service.values?this.service.getCharacteristic("LockTargetState").setValue(this.service.values.LockTargetState?0:1):"On"in this.service.values&&this.service.getCharacteristic("On").setValue(!this.service.values.On))}onLongClick(){if(this.readyForControl&&"LockTargetState"in this.service.values){let t=this.$modal.open(Bn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-lock-mechanism"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:14,vars:11,consts:[["tabindex","0",1,"accessory-box",3,"shortClick","longClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["d","M8 16 C6 -4, 26 -4, 24 16","fill","none","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"shackle-locked"],["d","M8 16 C6 -2, 22 -2, 24 7","fill","none","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","stroke-opacity","0",1,"shackle-unlocked"],["x","5","y","16","width","22","height","15","rx","3","fill","none","stroke","#7f7f7f","stroke-width","2"],["cx","16","cy","23.5","r","3","stroke","#7f7f7f","stroke-width","0.5","fill","#4caf50","fill-opacity","0.5",1,"keyhole"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerText","ngClass"],[1,"accessory-label","red-text"]],template:function(r,i){r&1&&(n(0,"div",0),C("shortClick",function(){return i.onClick()})("longClick",function(){return i.onLongClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"path",4)(6,"path",5)(7,"rect",6)(8,"circle",7),s()(),I(),n(9,"div",8),p(10),s(),_(11,Fl,2,7,"div",9)(12,Hl,3,3,"div",10)(13,Ol,3,3,"div",10),s()()),r&2&&(u("ngClass",it(6,Ll,"LockCurrentState"in i.service.values&&i.service.values.LockCurrentState!==1||i.service.values.On===1,i.service.values.LockCurrentState===0||i.service.values.On===1,i.service.values.LockCurrentState===2,i.service.values.LockCurrentState===3)),a(2),y("aria-label",c(3,4,"accessories.core.lock_mechanism")),a(8),v(i.service.customName||i.service.serviceName),a(),k(i.service.values.LockCurrentState<2?11:i.service.values.LockCurrentState===2?12:i.service.values.LockCurrentState===3?13:-1))},dependencies:[q,E,M],styles:["@keyframes _ngcontent-%COMP%_blink{0%,to{fill-opacity:1}50%{fill-opacity:.2}} .unlocked svg .shackle-locked{stroke-opacity:0!important} .unlocked svg .shackle-unlocked{stroke-opacity:1!important} .unlocked svg .keyhole{fill:#ff9800!important} .jammed svg .shackle-locked{stroke-opacity:0!important} .jammed svg .shackle-unlocked{stroke-opacity:1!important} .jammed svg .keyhole{fill:#d32f2f!important;animation:_ngcontent-%COMP%_blink 1s infinite} .error svg .shackle-locked{stroke-opacity:0!important} .error svg .shackle-unlocked{stroke-opacity:1!important} .error svg .keyhole{fill:#d32f2f!important;animation:_ngcontent-%COMP%_blink 1s infinite}"]})}return e})();var Xe=(e,o)=>({"fa-check-circle":e,"fa-blank":o});function Nl(e,o){if(e&1){let t=R();n(0,"div",5),l(1,"translate"),n(2,"button",7),C("click",function(i){D(t);let d=f();return A(d.setActive(0,i))}),n(3,"div",8),m(4,"i",9),s(),p(5),l(6,"translate"),n(7,"div",10),m(8,"i",11),s()(),n(9,"button",7),C("click",function(i){D(t);let d=f();return A(d.setActive(1,i))}),n(10,"div",8),m(11,"i",9),s(),p(12),l(13,"translate"),n(14,"div",10),m(15,"i",11),s()()()}if(e&2){let t=f();y("aria-label",c(1,5,"accessories.control.mode_control")),a(4),u("ngClass",V(11,Xe,t.service.values.Active===0,t.service.values.Active!==0)),a(),x(" ",c(6,7,"accessories.control.off")," "),a(6),u("ngClass",V(14,Xe,t.service.values.Active===1,t.service.values.Active!==1)),a(),x(" ",c(13,9,"accessories.control.on")," ")}}function $l(e,o){if(e&1){let t=R();n(0,"div",5),l(1,"translate"),n(2,"button",7),C("click",function(i){D(t);let d=f();return A(d.setTargetState(0,i))}),n(3,"div",8),m(4,"i",9),s(),p(5),l(6,"translate"),n(7,"div",10),m(8,"i",11),s()(),n(9,"button",7),C("click",function(i){D(t);let d=f();return A(d.setTargetState(1,i))}),n(10,"div",8),m(11,"i",9),s(),p(12),l(13,"translate"),n(14,"div",10),m(15,"i",11),s()(),n(16,"button",7),C("click",function(i){D(t);let d=f();return A(d.setTargetState(2,i))}),n(17,"div",8),m(18,"i",9),s(),p(19),l(20,"translate"),n(21,"div",10),m(22,"i",11),s()()()}if(e&2){let t=f();y("aria-label",c(1,7,"accessories.control.media_control")),a(4),u("ngClass",V(15,Xe,t.service.values.CurrentMediaState===0,t.service.values.CurrentMediaState!==0)),a(),x(" ",c(6,9,"accessories.control.play")," "),a(6),u("ngClass",V(18,Xe,t.service.values.CurrentMediaState===1,t.service.values.CurrentMediaState!==1)),a(),x(" ",c(13,11,"accessories.control.pause")," "),a(6),u("ngClass",V(21,Xe,t.service.values.CurrentMediaState===2,t.service.values.CurrentMediaState!==2)),a(),x(" ",c(20,13,"accessories.control.stop")," ")}}function Rl(e,o){if(e&1){let t=R();n(0,"h6"),p(1),l(2,"translate"),s(),n(3,"div",12),l(4,"translate"),n(5,"button",7),C("click",function(i){D(t);let d=f();return A(d.setTargetMode(!1,i))}),n(6,"div",8),m(7,"i",9),s(),p(8),l(9,"translate"),n(10,"div",10),m(11,"i",11),s()(),n(12,"button",7),C("click",function(i){D(t);let d=f();return A(d.setTargetMode(!0,i))}),n(13,"div",8),m(14,"i",9),s(),p(15),l(16,"translate"),n(17,"div",10),m(18,"i",11),s()()()}if(e&2){let t=f();a(),x(" ",c(2,6,"Active"in t.service.values||"TargetMediaState"in t.service.values?"accessories.control.speaker_volume":"menu.label_status")," "),a(2),y("aria-label",c(4,8,"accessories.control.mute_control")),a(4),u("ngClass",V(14,Xe,!t.targetMode,t.targetMode)),a(),x(" ",c(9,10,"accessories.control.not_mute")," "),a(6),u("ngClass",V(17,Xe,t.targetMode,!t.targetMode)),a(),x(" ",c(16,12,"accessories.control.mute")," ")}}function Wl(e,o){if(e&1){let t=R();n(0,"h6",13),p(1),l(2,"translate"),s(),n(3,"nouislider",14),G("ngModelChange",function(i){D(t);let d=f();return U(d.targetVolume.value,i)||(d.targetVolume.value=i),A(i)}),C("ngModelChange",function(){D(t);let i=f();return A(i.onVolumeStateChange())}),s()}if(e&2){let t=f();a(),O("",c(2,6,"accessories.control.speaker_volume"),": ",t.targetVolume.value,"%"),a(2),u("min",t.targetVolume.min)("max",t.targetVolume.max)("step",t.targetVolume.step),j("ngModel",t.targetVolume.value)}}var Dn=(()=>{class e{$activeModal=w(X);service;$accessories;stateSubscription;targetMode;targetVolume;targetVolumeChanged=new Q;constructor(){this.targetVolumeChanged.pipe(Y(500)).subscribe(()=>{this.service.getCharacteristic("Volume").setValue(this.targetVolume.value)})}ngOnInit(){this.targetMode=this.service.values.Mute,this.loadTargetVolume(),this.$accessories&&(this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetMode=this.service.values.Mute,this.targetVolume&&(this.targetVolume.value=this.service.getCharacteristic("Volume")?.value)}))}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setTargetMode(t,r){this.targetMode=t,this.service.getCharacteristic("Mute").setValue(this.targetMode),r.target.blur()}setActive(t,r){this.service.getCharacteristic("Active").setValue(t),r.target.blur()}setTargetState(t,r){this.service.getCharacteristic("TargetMediaState").setValue(t),r.target.blur()}onVolumeStateChange(){this.targetVolumeChanged.next(this.targetVolume.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadTargetVolume(){let t=this.service.getCharacteristic("Volume");t&&(this.targetVolume={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(i=>{i.style.background="linear-gradient(to right, #ffffff, #ffd966, #ff0000)"})},10))}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:11,vars:7,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],[1,"modal-footer"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],[1,"mt-4","mb-0"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4),_(6,Nl,16,17,"div",5)(7,$l,23,24,"div",5),_(8,Rl,19,20),_(9,Wl,4,8),s(),m(10,"div",6),s()),r&2&&(a(2),u("innerText",i.service.customName||i.service.serviceName),a(),y("aria-label",c(4,5,"form.button_close")),a(3),k("Active"in i.service.values?6:"TargetMediaState"in i.service.values?7:-1),a(2),k("Mute"in i.service.values?8:-1),a(),k(i.targetVolume?9:-1))},dependencies:[ee,ie,ne,oe,E,M],encapsulation:2})}return e})();var jl=()=>[0,1],Ul=(e,o)=>({"accessory-on":e,paused:o}),Gl=()=>["Speaker","SmartSpeaker"];function zl(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.play")," ")}function ql(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.pause")," ")}function Zl(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.stop")," ")}function Kl(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" \xB7 ",c(1,1,"accessories.control.mute")," ")}function Ql(e,o){if(e&1&&p(0),e&2){let t=f(3);x(" \xB7 ",t.service.values.Volume,"% ")}}function Yl(e,o){if(e&1&&_(0,Ql,1,1),e&2){let t=f(2);k("Volume"in t.service.values?0:-1)}}function Xl(e,o){if(e&1&&(n(0,"div",10),_(1,zl,2,3)(2,ql,2,3)(3,Zl,2,3),_(4,Kl,2,3)(5,Yl,1,1),s()),e&2){let t,r=f();a(),k((t=r.service.values.CurrentMediaState)===0?1:t===1?2:t===2?3:-1),a(3),k("Mute"in r.service.values&&r.service.values.Mute?4:5)}}function Jl(e,o){e&1&&(m(0,"div",11),l(1,"translate")),e&2&&u("innerText",c(1,1,"accessories.control.off"))}function ec(e,o){e&1&&(m(0,"div",11),l(1,"translate")),e&2&&u("innerText",c(1,1,"accessories.control.mute"))}function tc(e,o){if(e&1&&(n(0,"div",10),p(1),s()),e&2){let t=f();a(),x("",t.service.values.Volume,"%")}}function ic(e,o){e&1&&(n(0,"div",10),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.on")))}function nc(e,o){e&1&&(n(0,"div",10),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.microphone")))}var An=(()=>{class e{$accessories=w(K);$modal=w(J);service;readyForControl=!1;onClick(){this.readyForControl&&("Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active===0?1:0):"TargetMediaState"in this.service.values?this.service.getCharacteristic("TargetMediaState").setValue(this.service.values.TargetMediaState===0?1:0):"Mute"in this.service.values&&this.service.getCharacteristic("Mute").setValue(!this.service.values.Mute))}onLongClick(){if(this.readyForControl&&("Active"in this.service.values||"TargetMediaState"in this.service.values||"Volume"in this.service.values||"Mute"in this.service.values)){let t=this.$modal.open(Dn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-microphone"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:18,vars:11,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","6","y","1","width","18","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","2"],["stroke-linecap","round","x1","10","y1","6","x2","20","y2","6","stroke","#7f7f7f","stroke-width","2"],["stroke-linecap","round","x1","10","y1","10","x2","20","y2","10","stroke","#7f7f7f","stroke-width","2"],["stroke-linecap","round","x1","10","y1","14","x2","20","y2","14","stroke","#7f7f7f","stroke-width","2"],["cx","15","cy","23","r","3","stroke","#7f7f7f","stroke-width","2","fill","#1976d2","fill-opacity","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(r,i){r&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"circle",8),s()(),I(),n(10,"div",9),p(11),s(),_(12,Xl,6,2,"div",10)(13,Jl,2,3,"div",11)(14,ec,2,3,"div",11)(15,tc,2,1,"div",10)(16,ic,3,3,"div",10)(17,nc,3,3,"div",10),s()()),r&2&&(u("ngClass",V(7,Ul,"Active"in i.service.values?i.service.values.Active:"CurrentMediaState"in i.service.values?he(6,jl).includes(i.service.values.CurrentMediaState):"Mute"in i.service.values&&"Volume"in i.service.values?!i.service.values.Mute&&i.service.values.Volume>0:"Mute"in i.service.values&&!i.service.values.Mute,"CurrentMediaState"in i.service.values&&i.service.values.CurrentMediaState===1)),a(2),y("aria-label",c(3,4,"accessories.core.microphone")),a(9),v(i.service.customName||i.service.serviceName),a(),k("CurrentMediaState"in i.service.values?12:"Active"in i.service.values&&!i.service.values.Active?13:"Mute"in i.service.values&&i.service.values.Mute?14:"Volume"in i.service.values?15:he(10,Gl).includes(i.service.customType||i.service.type)?16:17))},dependencies:[q,E,M],encapsulation:2})}return e})();var oc=e=>({"accessory-on":e});function rc(e,o){e&1&&(n(0,"div",25),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.detected")))}function ac(e,o){e&1&&(n(0,"div",26),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.not_detected")))}var In=(()=>{class e{service;static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-motion-sensor"]],inputs:{service:"service"},decls:29,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2",1,"orange-outline"],["transform","translate(7, -0.75), scale(0.075)"],["d","M190.85 83.94C190.85 70.36 180.09 59.24 166.93 59.24C153.78 59.24 143.02 70.36 143.02 83.94C143.02 97.53 153.78 108.65 166.93 108.65C180.09 108.65 190.85 97.53 190.85 83.94Z","fill","#1976d2","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","7"],["d","M232.24 175.95C210.12 175.95 190.98 163.6 180.22 145.69C179.08 143.72 169.99 127.91 168.86 125.93C164.67 118.52 156.9 114.2 148.53 114.2C145.54 114.2 142.55 114.81 139.56 116.05C135.37 117.82 114.45 126.67 76.78 142.6L76.78 200.66L100.69 200.66L100.69 159.28L121.62 150.02L88.73 324.17L113.85 324.17L134.78 225.36L160.49 250.06L160.49 324.17L184.4 324.17L184.4 230.92L159.89 205.6C164.19 183.36 166.59 171.01 167.06 168.54C182.61 188.3 205.93 200.66 232.24 200.66C232.24 195.72 232.24 178.42 232.24 175.95Z","fill","#1976d2","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","7"],["x","9","y","9","width","2","height","1","rx","0.2","stroke","#7f7f7f","fill","#1976d2","fill-opacity","0.25","stroke-width","0.25"],["x","7","y","13","width","3","height","1","rx","0.2","stroke","#7f7f7f","fill","#1976d2","fill-opacity","0.25","stroke-width","0.25"],["x","8","y","17","width","4","height","1","rx","0.2","stroke","#7f7f7f","fill","#1976d2","fill-opacity","0.25","stroke-width","0.25"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4),n(6,"g",5),m(7,"path",6)(8,"path",7),s(),m(9,"rect",8)(10,"rect",9)(11,"rect",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20)(22,"line",21)(23,"line",22)(24,"line",23),s()(),I(),n(25,"div",24),p(26),s(),_(27,rc,3,3,"div",25)(28,ac,3,3,"div",26),s()()),r&2&&(u("ngClass",N(6,oc,i.service.values.MotionDetected)),a(2),y("aria-label",c(3,4,"accessories.core.motion_sensor")),a(24),v(i.service.customName||i.service.serviceName),a(),k(i.service.values.MotionDetected?27:28))},dependencies:[E,M],styles:[".accessory-on svg .orange-outline{stroke:#ff9800;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{stroke-opacity:.8}50%{stroke-opacity:.2}}"]})}return e})();var sc=e=>({"accessory-on":e});function lc(e,o){e&1&&(n(0,"div",22),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.detected")))}function cc(e,o){e&1&&(n(0,"div",23),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.not_detected")))}var Ln=(()=>{class e{service;static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-occupancy-sensor"]],inputs:{service:"service"},decls:26,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2",1,"orange-outline"],["transform","translate(4.75, -0.75), scale(0.075)"],["d","M190.85 83.94C190.85 70.36 180.09 59.24 166.93 59.24C153.78 59.24 143.02 70.36 143.02 83.94C143.02 97.53 153.78 108.65 166.93 108.65C180.09 108.65 190.85 97.53 190.85 83.94Z","fill","#ff9800","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","7"],["d","M232.24 175.95C210.12 175.95 190.98 163.6 180.22 145.69C179.08 143.72 169.99 127.91 168.86 125.93C164.67 118.52 156.9 114.2 148.53 114.2C145.54 114.2 142.55 114.81 139.56 116.05C135.37 117.82 114.45 126.67 76.78 142.6L76.78 200.66L100.69 200.66L100.69 159.28L121.62 150.02L88.73 324.17L113.85 324.17L134.78 225.36L160.49 250.06L160.49 324.17L184.4 324.17L184.4 230.92L159.89 205.6C164.19 183.36 166.59 171.01 167.06 168.54C182.61 188.3 205.93 200.66 232.24 200.66C232.24 195.72 232.24 178.42 232.24 175.95Z","fill","#ff9800","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","7"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4),n(6,"g",5),m(7,"path",6)(8,"path",7),s(),m(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20),s()(),I(),n(22,"div",21),p(23),s(),_(24,lc,3,3,"div",22)(25,cc,3,3,"div",23),s()()),r&2&&(u("ngClass",N(6,sc,i.service.values.OccupancyDetected)),a(2),y("aria-label",c(3,4,"accessories.core.occupancy_sensor")),a(21),v(i.service.customName||i.service.serviceName),a(),k(i.service.values.OccupancyDetected?24:25))},dependencies:[E,M],styles:[".accessory-on svg .orange-outline{stroke:#ff9800;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{stroke-opacity:.8}50%{stroke-opacity:.2}}"]})}return e})();var Pn=()=>[0,2],pc=e=>({"accessory-on":e});function dc(e,o){e&1&&(B(),m(0,"line",8)(1,"line",9)(2,"line",10))}function mc(e,o){e&1&&(B(),m(0,"line",11)(1,"line",12)(2,"line",13))}function uc(e,o){e&1&&(B(),m(0,"line",13)(1,"line",14)(2,"line",15))}var Fn=(()=>{class e{$settings=w(Ee);service;readyForControl=!1;browserLang=this.$settings.browserLang;onClick(){this.readyForControl&&("On"in this.service.values?this.service.getCharacteristic("On").setValue(!this.service.values.On):"Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1):"LockTargetState"in this.service.values?this.service.getCharacteristic("LockTargetState").setValue(this.service.values.LockTargetState?0:1):"TargetDoorState"in this.service.values&&this.service.getCharacteristic("TargetDoorState").setValue(this.service.values.TargetDoorState?0:1))}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-outlet"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:14,vars:13,consts:[["tabindex","0",1,"accessory-box",3,"shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32","height","32","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","30","height","30","rx","6","ry","6","fill","none","stroke","#7f7f7f","stroke-width","1.5",1,"outer"],["cx","16","cy","16","r","10","fill","none","stroke","#7f7f7f","stroke-width","1.5",1,"inner"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerText"],["x1","16","y1","10","x2","16","y2","13","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","10","y1","19","x2","13","y2","19","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","19","y1","19","x2","22","y2","19","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","11.5","y1","14.5","x2","13.5","y2","11.5","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","18.5","y1","11.5","x2","20.5","y2","14.5","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","16","y1","19","x2","16","y2","22","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","10","y1","14","x2","13","y2","14","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","19","y1","14","x2","22","y2","14","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"]],template:function(r,i){r&1&&(n(0,"div",0),C("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4)(6,"circle",5),_(7,dc,3,0)(8,mc,3,0)(9,uc,3,0),s()(),I(),n(10,"div",6),p(11),s(),m(12,"div",7),l(13,"translate"),s()()),r&2&&(u("ngClass",N(10,pc,i.service.values.On||i.service.values.Active||"LockTargetState"in i.service.values&&!i.service.values.LockTargetState||"CurrentDoorState"in i.service.values&&he(9,Pn).includes(i.service.values.CurrentDoorState))),a(2),y("aria-label",c(3,5,"accessories.core.outlet")),a(5),k(i.browserLang==="en-GB"?7:i.browserLang==="en-AU"||i.browserLang==="en-NZ"?8:9),a(4),v(i.service.customName||i.service.serviceName),a(),u("innerText",c(13,7,i.service.values.On||i.service.values.Active||"LockTargetState"in i.service.values&&!i.service.values.LockTargetState||"CurrentDoorState"in i.service.values&&he(12,Pn).includes(i.service.values.CurrentDoorState)?"accessories.control.on":"accessories.control.off")))},dependencies:[q,E,M],styles:[".accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] .outer[_ngcontent-%COMP%]{stroke:#1976d2;stroke-opacity:.75;stroke-width:2.5}.accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%]{stroke:#1976d2;stroke-opacity:.75}"]})}return e})();var fc=e=>({"accessory-on":e}),Hn=(()=>{class e{service;readyForControl=!1;onClick(){this.readyForControl&&("On"in this.service.values?this.service.getCharacteristic("On").setValue(!this.service.values.On):"Active"in this.service.values&&this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1))}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-robot-vacuum"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:36,vars:10,consts:[["tabindex","0",1,"accessory-box",3,"shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["id","motionClip"],["x","0","y","-0.5","width","32","height","8"],["transform","translate(0, 5)"],["cx","16","cy","10","rx","14","ry","8.4","stroke","#7f7f7f","stroke-width","1.75","fill","none"],["x1","2","y1","10","x2","2","y2","16","stroke","#7f7f7f","stroke-width","1.75"],["x1","30","y1","10","x2","30","y2","16","stroke","#7f7f7f","stroke-width","1.75"],["d","M2,16 A14,6.9 0 0,0 30,16","stroke","#7f7f7f","stroke-width","1.75","fill","none"],["cx","16","cy","10","rx","4.2","ry","2.5","stroke","#7f7f7f","stroke-width","1","fill","#1976d2","fill-opacity","0.5"],["cx","16","cy","15","r","0.9","fill","#7f7f7f"],["x1","2","y1","16","x2","0.5","y2","18.5","stroke","#7f7f7f","stroke-width","1"],["x1","2","y1","16","x2","0.5","y2","14","stroke","#7f7f7f","stroke-width","1"],["x1","30","y1","16","x2","31.5","y2","18.5","stroke","#7f7f7f","stroke-width","1"],["x1","30","y1","16","x2","31.5","y2","14","stroke","#7f7f7f","stroke-width","1"],["clip-path","url(#motionClip)","stroke","#7f7f7f","stroke-linecap","round",1,"motion-lines",2,"display","none"],["x1","12","y1","8","x2","12","y2","14","stroke-width","2.1","opacity","0"],["attributeName","y1","values","8;0","dur","3s","begin","0.3s","repeatCount","indefinite"],["attributeName","y2","values","14;6","dur","3s","begin","0.3s","repeatCount","indefinite"],["attributeName","opacity","values","0;1;1;0","keyTimes","0;0.2;0.8;1","dur","3s","begin","0.3s","repeatCount","indefinite"],["x1","16","y1","8","x2","16","y2","14","stroke-width","2.5","opacity","0"],["attributeName","y1","values","8;0","dur","3s","begin","0.6s","repeatCount","indefinite"],["attributeName","y2","values","14;6","dur","3s","begin","0.6s","repeatCount","indefinite"],["attributeName","opacity","values","0;1;1;0","keyTimes","0;0.2;0.8;1","dur","3s","begin","0.6s","repeatCount","indefinite"],["x1","20","y1","8","x2","20","y2","14","stroke-width","2.1","opacity","0"],["attributeName","y1","values","8;0","dur","3s","begin","0.9s","repeatCount","indefinite"],["attributeName","y2","values","14;6","dur","3s","begin","0.9s","repeatCount","indefinite"],["attributeName","opacity","values","0;1;1;0","keyTimes","0;0.2;0.8;1","dur","3s","begin","0.9s","repeatCount","indefinite"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(r,i){r&1&&(n(0,"div",0),C("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3)(5,"defs")(6,"clipPath",4),m(7,"rect",5),s()(),n(8,"g",6),m(9,"ellipse",7)(10,"line",8)(11,"line",9)(12,"path",10)(13,"ellipse",11)(14,"circle",12)(15,"line",13)(16,"line",14)(17,"line",15)(18,"line",16),s(),n(19,"g",17)(20,"line",18),m(21,"animate",19)(22,"animate",20)(23,"animate",21),s(),n(24,"line",22),m(25,"animate",23)(26,"animate",24)(27,"animate",25),s(),n(28,"line",26),m(29,"animate",27)(30,"animate",28)(31,"animate",29),s()()()(),I(),n(32,"div",30),p(33),s(),m(34,"div",31),l(35,"translate"),s()()),r&2&&(u("ngClass",N(8,fc,i.service.values.On||i.service.values.Active)),a(2),y("aria-label",c(3,4,"accessories.core.robot_vacuum")),a(31),v(i.service.customName||i.service.serviceName),a(),u("innerText",c(35,6,i.service.values.On||i.service.values.Active?"accessories.control.on":"accessories.control.off")))},dependencies:[q,E,M],styles:[".accessory-on svg .motion-lines{display:inline!important}"]})}return e})();var It=(e,o)=>({"fa-check-circle":e,"fa-blank":o});function vc(e,o){if(e&1){let t=R();n(0,"button",8),C("click",function(i){D(t);let d=f();return A(d.setTargetMode(3,i))}),n(1,"div",9),m(2,"i",10),s(),p(3),l(4,"translate"),n(5,"div",11),m(6,"i",12),s()()}if(e&2){let t=f();a(2),u("ngClass",V(4,It,t.targetMode===3,t.targetMode!==3)),a(),x(" ",c(4,2,"accessories.control.off")," ")}}function gc(e,o){if(e&1){let t=R();n(0,"button",8),C("click",function(i){D(t);let d=f();return A(d.setTargetMode(0,i))}),n(1,"div",9),m(2,"i",10),s(),p(3),l(4,"translate"),n(5,"div",11),m(6,"i",12),s()()}if(e&2){let t=f();a(2),u("ngClass",V(4,It,t.targetMode===0,t.targetMode!==0)),a(),x(" ",c(4,2,"accessories.control.home")," ")}}function hc(e,o){if(e&1){let t=R();n(0,"button",8),C("click",function(i){D(t);let d=f();return A(d.setTargetMode(1,i))}),n(1,"div",9),m(2,"i",10),s(),p(3),l(4,"translate"),n(5,"div",11),m(6,"i",12),s()()}if(e&2){let t=f();a(2),u("ngClass",V(4,It,t.targetMode===1,t.targetMode!==1)),a(),x(" ",c(4,2,"accessories.control.away")," ")}}function Cc(e,o){if(e&1){let t=R();n(0,"button",8),C("click",function(i){D(t);let d=f();return A(d.setTargetMode(2,i))}),n(1,"div",9),m(2,"i",10),s(),p(3),l(4,"translate"),n(5,"div",11),m(6,"i",12),s()()}if(e&2){let t=f();a(2),u("ngClass",V(4,It,t.targetMode===2,t.targetMode!==2)),a(),x(" ",c(4,2,"accessories.control.night")," ")}}var On=(()=>{class e{$activeModal=w(X);service;$accessories;targetMode;targetModeValidValues=[];stateSubscription;ngOnInit(){this.targetMode=this.service.values.SecuritySystemTargetState,this.targetModeValidValues=this.service.getCharacteristic("SecuritySystemTargetState").validValues,this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetMode=this.service.values.SecuritySystemTargetState})}setTargetMode(t,r){this.targetMode=t,this.service.getCharacteristic("SecuritySystemTargetState").setValue(this.targetMode),r.target.blur()}dismissModal(){this.$activeModal.dismiss("Dismiss")}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:13,vars:11,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control"],[1,"modal-footer"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"div",5),l(7,"translate"),_(8,vc,7,7,"button",6),_(9,gc,7,7,"button",6),_(10,hc,7,7,"button",6),_(11,Cc,7,7,"button",6),s()(),m(12,"div",7),s()),r&2&&(a(2),u("innerText",i.service.customName||i.service.serviceName),a(),y("aria-label",c(4,7,"form.button_close")),a(3),y("aria-label",c(7,9,"accessories.control.mode_control")),a(2),k(i.targetModeValidValues.includes(3)?8:-1),a(),k(i.targetModeValidValues.includes(0)?9:-1),a(),k(i.targetModeValidValues.includes(1)?10:-1),a(),k(i.targetModeValidValues.includes(2)?11:-1))},dependencies:[ee,E,M],encapsulation:2})}return e})();var xc=(e,o,t,r,i)=>({"accessory-on":e,home:o,away:t,night:r,triggered:i});function yc(e,o){e&1&&(n(0,"div",10),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.home")))}function _c(e,o){e&1&&(n(0,"div",10),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.away")))}function kc(e,o){e&1&&(n(0,"div",10),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.night")))}function Sc(e,o){e&1&&(n(0,"div",11),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.off")))}function bc(e,o){e&1&&(n(0,"div",11),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.triggered")))}var Nn=(()=>{class e{$accessories=w(K);$modal=w(J);service;readyForControl=!1;onClick(){if(!this.readyForControl)return;let t=this.$modal.open(On,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-security-system"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:17,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32","height","32","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["d","M7 18 C7 5, 25 5, 25 18 V26 H7 V18 Z","fill","none","stroke","#7f7f7f","stroke-width","1.5","fill-opacity","0.5",1,"dome"],["x","2","y","26","width","28","height","4","fill","none","stroke","#7f7f7f","stroke-width","1.5","rx","1"],["x1","6","y1","3","x2","10","y2","7","stroke-width","3",1,"ray"],["x1","16","y1","0","x2","16","y2","5","stroke-width","3",1,"ray"],["x1","26","y1","3","x2","22","y2","7","stroke-width","3",1,"ray"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","red-text"]],template:function(r,i){if(r&1&&(n(0,"div",0),C("longClick",function(){return i.onClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"path",4)(6,"rect",5)(7,"line",6)(8,"line",7)(9,"line",8),s()(),I(),n(10,"div",9),p(11),s(),_(12,yc,3,3,"div",10)(13,_c,3,3,"div",10)(14,kc,3,3,"div",10)(15,Sc,3,3,"div",11)(16,bc,3,3,"div",11),s()()),r&2){let d;u("ngClass",Ri(6,xc,i.service.values.SecuritySystemCurrentState!==3,i.service.values.SecuritySystemCurrentState===0,i.service.values.SecuritySystemCurrentState===1,i.service.values.SecuritySystemCurrentState===2,i.service.values.SecuritySystemCurrentState===4)),a(2),y("aria-label",c(3,4,"accessories.core.security_system")),a(9),v(i.service.customName||i.service.serviceName),a(),k((d=i.service.values.SecuritySystemCurrentState)===0?12:d===1?13:d===2?14:d===3?15:d===4?16:-1)}},dependencies:[q,E,M],styles:[".home svg .dome{fill:#1976d2!important} .away svg .dome{fill:#ff9800!important} .night svg .dome{fill:#673ab7!important} .triggered svg .dome{fill:#d32f2f!important} .triggered svg .ray{stroke:#d32f2f;stroke-opacity:.5;animation:_ngcontent-%COMP%_blink 1s infinite}@keyframes _ngcontent-%COMP%_blink{0%,to{stroke-opacity:1}50%{stroke-opacity:.2}}"]})}return e})();var Tc=e=>({"accessory-on":e});function Mc(e,o){e&1&&(n(0,"div",17),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.detected")))}function wc(e,o){e&1&&(n(0,"div",18),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.not_detected")))}var $n=(()=>{class e{service;static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-smoke-sensor"]],inputs:{service:"service"},decls:22,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","30","height","12","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.25"],["text-anchor","middle","dominant-baseline","middle","font-family","Arial","font-size","7.5","x","16","y","7.7","fill","#7f7f7f","stroke-width","0.6","font-weight","900",1,"type"],["x1","6","y1","14.5","x2","25.5","y2","14.5","stroke","#1976d2","stroke-opacity","0.5","stroke-width","2"],["stroke-linecap","round","x1","5","y1","13","x2","6.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","11","y1","13","x2","11","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","15.5","y1","13","x2","15.5","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","20","y1","13","x2","20","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","26","y1","13","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","6.5","y1","16","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","11","y1","21","x2","6","y2","27","stroke","#7f7f7f","stroke-width","1.25",1,"air-line"],["stroke-linecap","round","x1","16","y1","21","x2","16","y2","31","stroke","#7f7f7f","stroke-width","1.25",1,"air-line"],["stroke-linecap","round","x1","21","y1","21","x2","26","y2","27","stroke","#7f7f7f","stroke-width","1.25",1,"air-line"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4),n(6,"text",5),p(7," SMOKE "),s(),m(8,"line",6)(9,"line",7)(10,"line",8)(11,"line",9)(12,"line",10)(13,"line",11)(14,"line",12)(15,"line",13)(16,"line",14)(17,"line",15),s()(),I(),n(18,"div",16),p(19),s(),_(20,Mc,3,3,"div",17)(21,wc,3,3,"div",18),s()()),r&2&&(u("ngClass",N(6,Tc,i.service.values.SmokeDetected)),a(2),y("aria-label",c(3,4,"accessories.core.smoke_sensor")),a(17),v(i.service.customName||i.service.serviceName),a(),k(i.service.values.SmokeDetected?20:21))},dependencies:[E,M],styles:[".accessory-on svg .air-line{stroke:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite} .accessory-on svg .type{fill:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{opacity:1}50%{opacity:.2}}"]})}return e})();var Je=(e,o)=>({"fa-check-circle":e,"fa-blank":o});function Ec(e,o){if(e&1){let t=R();n(0,"div",5),l(1,"translate"),n(2,"button",7),C("click",function(i){D(t);let d=f();return A(d.setActive(0,i))}),n(3,"div",8),m(4,"i",9),s(),p(5),l(6,"translate"),n(7,"div",10),m(8,"i",11),s()(),n(9,"button",7),C("click",function(i){D(t);let d=f();return A(d.setActive(1,i))}),n(10,"div",8),m(11,"i",9),s(),p(12),l(13,"translate"),n(14,"div",10),m(15,"i",11),s()()()}if(e&2){let t=f();y("aria-label",c(1,5,"accessories.control.mode_control")),a(4),u("ngClass",V(11,Je,t.service.values.Active===0,t.service.values.Active!==0)),a(),x(" ",c(6,7,"accessories.control.off")," "),a(6),u("ngClass",V(14,Je,t.service.values.Active===1,t.service.values.Active!==1)),a(),x(" ",c(13,9,"accessories.control.on")," ")}}function Bc(e,o){if(e&1){let t=R();n(0,"div",5),l(1,"translate"),n(2,"button",7),C("click",function(i){D(t);let d=f();return A(d.setTargetState(0,i))}),n(3,"div",8),m(4,"i",9),s(),p(5),l(6,"translate"),n(7,"div",10),m(8,"i",11),s()(),n(9,"button",7),C("click",function(i){D(t);let d=f();return A(d.setTargetState(1,i))}),n(10,"div",8),m(11,"i",9),s(),p(12),l(13,"translate"),n(14,"div",10),m(15,"i",11),s()(),n(16,"button",7),C("click",function(i){D(t);let d=f();return A(d.setTargetState(2,i))}),n(17,"div",8),m(18,"i",9),s(),p(19),l(20,"translate"),n(21,"div",10),m(22,"i",11),s()()()}if(e&2){let t=f();y("aria-label",c(1,7,"accessories.control.media_control")),a(4),u("ngClass",V(15,Je,t.service.values.CurrentMediaState===0,t.service.values.CurrentMediaState!==0)),a(),x(" ",c(6,9,"accessories.control.play")," "),a(6),u("ngClass",V(18,Je,t.service.values.CurrentMediaState===1,t.service.values.CurrentMediaState!==1)),a(),x(" ",c(13,11,"accessories.control.pause")," "),a(6),u("ngClass",V(21,Je,t.service.values.CurrentMediaState===2,t.service.values.CurrentMediaState!==2)),a(),x(" ",c(20,13,"accessories.control.stop")," ")}}function Vc(e,o){if(e&1){let t=R();n(0,"h6"),p(1),l(2,"translate"),s(),n(3,"div",12),l(4,"translate"),n(5,"button",7),C("click",function(i){D(t);let d=f();return A(d.setTargetMode(!1,i))}),n(6,"div",8),m(7,"i",9),s(),p(8),l(9,"translate"),n(10,"div",10),m(11,"i",11),s()(),n(12,"button",7),C("click",function(i){D(t);let d=f();return A(d.setTargetMode(!0,i))}),n(13,"div",8),m(14,"i",9),s(),p(15),l(16,"translate"),n(17,"div",10),m(18,"i",11),s()()()}if(e&2){let t=f();a(),x(" ",c(2,6,"Active"in t.service.values||"TargetMediaState"in t.service.values?"accessories.control.speaker_volume":"menu.label_status")," "),a(2),y("aria-label",c(4,8,"accessories.control.mute_control")),a(4),u("ngClass",V(14,Je,!t.targetMode,t.targetMode)),a(),x(" ",c(9,10,"accessories.control.not_mute")," "),a(6),u("ngClass",V(17,Je,t.targetMode,!t.targetMode)),a(),x(" ",c(16,12,"accessories.control.mute")," ")}}function Dc(e,o){if(e&1){let t=R();n(0,"h6",13),p(1),l(2,"translate"),s(),n(3,"nouislider",14),G("ngModelChange",function(i){D(t);let d=f();return U(d.targetVolume.value,i)||(d.targetVolume.value=i),A(i)}),C("ngModelChange",function(){D(t);let i=f();return A(i.onVolumeStateChange())}),s()}if(e&2){let t=f();a(),O("",c(2,6,"accessories.control.speaker_volume"),": ",t.targetVolume.value,"%"),a(2),u("min",t.targetVolume.min)("max",t.targetVolume.max)("step",t.targetVolume.step),j("ngModel",t.targetVolume.value)}}var Rn=(()=>{class e{$activeModal=w(X);service;$accessories;targetMode;targetVolume;targetVolumeChanged=new Q;stateSubscription;constructor(){this.targetVolumeChanged.pipe(Y(500)).subscribe(()=>{this.service.getCharacteristic("Volume").setValue(this.targetVolume.value)})}ngOnInit(){this.targetMode=this.service.values.Mute,this.loadTargetVolume(),this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetMode=this.service.values.Mute,this.targetVolume&&"Volume"in this.service.values&&(this.targetVolume.value=this.service.getCharacteristic("Volume").value)})}setTargetMode(t,r){this.targetMode=t,this.service.getCharacteristic("Mute").setValue(this.targetMode),r.target.blur()}setActive(t,r){this.service.getCharacteristic("Active").setValue(t),r.target.blur()}setTargetState(t,r){this.service.getCharacteristic("TargetMediaState").setValue(t),r.target.blur()}onVolumeStateChange(){this.targetVolumeChanged.next(this.targetVolume.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}loadTargetVolume(){let t=this.service.getCharacteristic("Volume");t&&(this.targetVolume={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(i=>{i.style.background="linear-gradient(to right, #ffffff, #ffd966, #ff0000)"})},10))}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:11,vars:7,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],[1,"modal-footer"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],[1,"mt-4","mb-0"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4),_(6,Ec,16,17,"div",5)(7,Bc,23,24,"div",5),_(8,Vc,19,20),_(9,Dc,4,8),s(),m(10,"div",6),s()),r&2&&(a(2),u("innerText",i.service.customName||i.service.serviceName),a(),y("aria-label",c(4,5,"form.button_close")),a(3),k("Active"in i.service.values?6:"TargetMediaState"in i.service.values?7:-1),a(2),k("Mute"in i.service.values?8:-1),a(),k(i.targetVolume?9:-1))},dependencies:[ee,ie,ne,oe,E,M],encapsulation:2})}return e})();var Ac=()=>[0,1],Ic=(e,o,t)=>({"accessory-on":e,paused:o,muted:t}),Lc=()=>["Speaker","SmartSpeaker"];function Pc(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.play")," ")}function Fc(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.pause")," ")}function Hc(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.stop")," ")}function Oc(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" \xB7 ",c(1,1,"accessories.control.mute")," ")}function Nc(e,o){if(e&1&&p(0),e&2){let t=f(3);x(" \xB7 ",t.service.values.Volume,"% ")}}function $c(e,o){if(e&1&&_(0,Nc,1,1),e&2){let t=f(2);k("Volume"in t.service.values?0:-1)}}function Rc(e,o){if(e&1&&(n(0,"div",14),_(1,Pc,2,3)(2,Fc,2,3)(3,Hc,2,3),_(4,Oc,2,3)(5,$c,1,1),s()),e&2){let t,r=f();a(),k((t=r.service.values.CurrentMediaState)===0?1:t===1?2:t===2?3:-1),a(3),k("Mute"in r.service.values&&r.service.values.Mute?4:5)}}function Wc(e,o){e&1&&(m(0,"div",15),l(1,"translate")),e&2&&u("innerText",c(1,1,"accessories.control.off"))}function jc(e,o){e&1&&(m(0,"div",15),l(1,"translate")),e&2&&u("innerText",c(1,1,"accessories.control.mute"))}function Uc(e,o){if(e&1&&(n(0,"div",14),p(1),s()),e&2){let t=f();a(),x("",t.service.values.Volume,"%")}}function Gc(e,o){e&1&&(n(0,"div",14),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.on")))}function zc(e,o){e&1&&(n(0,"div",14),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.speaker")))}var Wn=(()=>{class e{$accessories=w(K);$modal=w(J);service;readyForControl=!1;onClick(){this.readyForControl&&("Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active===0?1:0):"TargetMediaState"in this.service.values?this.service.getCharacteristic("TargetMediaState").setValue(this.service.values.TargetMediaState===0?1:0):"Mute"in this.service.values&&this.service.getCharacteristic("Mute").setValue(!this.service.values.Mute))}onLongClick(){if(this.readyForControl&&("Active"in this.service.values||"TargetMediaState"in this.service.values||"Volume"in this.service.values||"Mute"in this.service.values)){let t=this.$modal.open(Rn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-speaker"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:22,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","6","y","1","width","20","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1"],["cx","16","cy","9","r","4.5","stroke","#7f7f7f","stroke-width","0","fill","#7f7f7f"],["cx","16","cy","9","r","1.5","stroke","#7f7f7f","stroke-width","0","fill","#e1e1e1",1,"inner"],["cx","16","cy","22","r","6","stroke","#7f7f7f","stroke-width","0","fill","#7f7f7f"],["cx","16","cy","22","r","2","stroke","#7f7f7f","stroke-width","0","fill","#e1e1e1",1,"inner"],["d","M4,12 Q1,16 4,20","stroke","#1976d2","fill","none","stroke-width","1","stroke-opacity","0",1,"wave-inner"],["d","M3,10 Q-2,16 3,22","stroke","#1976d2","fill","none","stroke-width","1","stroke-opacity","0",1,"wave-outer"],["d","M28,12 Q31,16 28,20","stroke","#1976d2","fill","none","stroke-width","1","stroke-opacity","0",1,"wave-inner"],["d","M29,10 Q34,16 29,22","stroke","#1976d2","fill","none","stroke-width","1","stroke-opacity","0",1,"wave-outer"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(r,i){r&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4)(6,"circle",5)(7,"circle",6)(8,"circle",7)(9,"circle",8)(10,"path",9)(11,"path",10)(12,"path",11)(13,"path",12),s()(),I(),n(14,"div",13),p(15),s(),_(16,Rc,6,2,"div",14)(17,Wc,2,3,"div",15)(18,jc,2,3,"div",15)(19,Uc,2,1,"div",14)(20,Gc,3,3,"div",14)(21,zc,3,3,"div",14),s()()),r&2&&(u("ngClass",Mt(7,Ic,"Active"in i.service.values?i.service.values.Active:"CurrentMediaState"in i.service.values?he(6,Ac).includes(i.service.values.CurrentMediaState):"Mute"in i.service.values&&"Volume"in i.service.values?!i.service.values.Mute&&i.service.values.Volume>0:"Mute"in i.service.values&&!i.service.values.Mute,"CurrentMediaState"in i.service.values&&i.service.values.CurrentMediaState===1,"Mute"in i.service.values&&i.service.values.Mute)),a(2),y("aria-label",c(3,4,"accessories.core.speaker")),a(13),v(i.service.customName||i.service.serviceName),a(),k("CurrentMediaState"in i.service.values?16:"Active"in i.service.values&&!i.service.values.Active?17:"Mute"in i.service.values&&i.service.values.Mute?18:"Volume"in i.service.values?19:he(11,Lc).includes(i.service.customType||i.service.type)?20:21))},dependencies:[q,E,M],styles:[".accessory-on:not(.paused):not(.muted) svg .wave-inner{animation:_ngcontent-%COMP%_pulse-inner 2s infinite} .accessory-on:not(.paused):not(.muted) svg .wave-outer{animation:_ngcontent-%COMP%_pulse-outer 2s infinite}@keyframes _ngcontent-%COMP%_pulse-inner{0%{stroke-opacity:.5}50%{stroke-opacity:1}to{stroke-opacity:.5}}@keyframes _ngcontent-%COMP%_pulse-outer{0%{stroke-opacity:.3}50%{stroke-opacity:.8}to{stroke-opacity:.3}} body.dark-mode div.accessory-box:not(.accessory-on) svg .inner{fill:#2b2b2b!important}"]})}return e})();var qc=(e,o,t)=>({"press-single":e,"press-double":o,"press-long":t}),jn=(()=>{class e{service;static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-stateless-programmable-switch"]],inputs:{service:"service"},decls:17,vars:12,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","30","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","2"],["cx","8.5","cy","9.5","r","5","stroke","#7f7f7f","stroke-width","1","fill","none","fill-opacity","0.5",1,"single"],["cx","23.5","cy","9.5","r","5","stroke","#7f7f7f","stroke-width","1","fill","none","fill-opacity","0.5",1,"double"],["cx","23.5","cy","9.5","r","3","stroke","#7f7f7f","stroke-width","1","fill","none"],["cx","16","cy","23.5","r","5","stroke","#7f7f7f","stroke-width","1","fill","none","fill-opacity","0.5",1,"long"],["x1","5","y1","23.5","x2","11","y2","23.5","stroke","#7f7f7f","stroke-width","0.5","stroke-linecap","round"],["x1","21","y1","23.5","x2","27","y2","23.5","stroke","#7f7f7f","stroke-width","0.5","stroke-linecap","round"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4)(6,"circle",5)(7,"circle",6)(8,"circle",7)(9,"circle",8)(10,"line",9)(11,"line",10),s()(),I(),n(12,"div",11),p(13),s(),n(14,"div",12),p(15),l(16,"translate"),s()()()),r&2&&(u("ngClass",Mt(8,qc,i.service.values.ProgrammableSwitchEvent===0,i.service.values.ProgrammableSwitchEvent===1,i.service.values.ProgrammableSwitchEvent===2)),a(2),y("aria-label",c(3,4,"accessories.core.stateless_programmable_switch")),a(11),v(i.service.customName||i.service.serviceName),a(2),v(c(16,6,"accessories.control.stateless")))},dependencies:[E,M],styles:[".press-single svg .single{fill:#1976d2!important} .press-double svg .double{fill:#1976d2!important} .press-long svg .long{fill:#1976d2!important}"]})}return e})();var Un=()=>[0,2],Zc=e=>({"accessory-on":e}),Gn=(()=>{class e{service;readyForControl=!1;onClick(){this.readyForControl&&("On"in this.service.values?this.service.getCharacteristic("On").setValue(!this.service.values.On):"Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1):"LockTargetState"in this.service.values?this.service.getCharacteristic("LockTargetState").setValue(this.service.values.LockTargetState?0:1):"TargetDoorState"in this.service.values&&this.service.getCharacteristic("TargetDoorState").setValue(this.service.values.TargetDoorState?0:1))}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-switch"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:12,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["cx","16","cy","16","r","14","fill","none","stroke","#7f7f7f","stroke-width","2"],["x1","16","y1","8","x2","16","y2","14","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["fill","#7f7f7f","d",`M21.4589329,9.49999998
|
|
13
|
+
C21,9.97698687 21.1735519,10.8351 21.4589326,11.2029426
|
|
14
|
+
C22.4505994,12.4811551 23,14.065977 23,15.7447101
|
|
15
|
+
C23,19.7640218 19.8532802,23 16,23
|
|
16
|
+
C12.1467198,23 9,19.7640218 9,15.7447101
|
|
17
|
+
C9,14.0415493 9.56560927,12.4352187 10.5838497,11.1483389
|
|
18
|
+
C10.8725653,10.7834523 11,9.9670534 10.5,9.49999999
|
|
19
|
+
C10,9.03294657 9.01543812,9.9073372 9.01543812,9.9073372
|
|
20
|
+
C7.75536735,11.4998488 7,13.5315645 7,15.7447101
|
|
21
|
+
C7,20.8562656 11.0294373,25 16,25
|
|
22
|
+
C20.9705627,25 25,20.8562656 25,15.7447101
|
|
23
|
+
C25,13.5637007 24.2664101,11.5588905 23.0391328,9.97698685
|
|
24
|
+
C23.0391328,9.97698685 21.9178658,9.0230131 21.4589329,9.49999998 Z`],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(r,i){r&1&&(n(0,"div",0),C("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"circle",4)(6,"line",5)(7,"path",6),s()(),I(),n(8,"div",7),p(9),s(),m(10,"div",8),l(11,"translate"),s()()),r&2&&(u("ngClass",N(9,Zc,i.service.values.On||i.service.values.Active||"LockTargetState"in i.service.values&&!i.service.values.LockTargetState||"CurrentDoorState"in i.service.values&&he(8,Un).includes(i.service.values.CurrentDoorState))),a(2),y("aria-label",c(3,4,"accessories.core.switch")),a(7),v(i.service.customName||i.service.serviceName),a(),u("innerText",c(11,6,i.service.values.On||i.service.values.Active||"LockTargetState"in i.service.values&&!i.service.values.LockTargetState||"CurrentDoorState"in i.service.values&&he(11,Un).includes(i.service.values.CurrentDoorState)?"accessories.control.on":"accessories.control.off")))},dependencies:[q,E,M],styles:[".accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]{stroke:#1976d2;stroke-opacity:.75;stroke-width:2.5}.accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] line[_ngcontent-%COMP%]{stroke:#1976d2;stroke-opacity:.75}.accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:#1976d2;fill-opacity:.75}"]})}return e})();var Kc=(e,o)=>({"mb-4":e,"mb-0":o}),ii=(e,o)=>({"fa-check-circle":e,"fa-blank":o});function Qc(e,o){if(e&1){let t=R();n(0,"div",5),l(1,"translate"),n(2,"button",7),C("click",function(i){D(t);let d=f();return A(d.setActive(0,i))}),n(3,"div",8),m(4,"i",9),s(),p(5),l(6,"translate"),n(7,"div",10),m(8,"i",11),s()(),n(9,"button",7),C("click",function(i){D(t);let d=f();return A(d.setActive(1,i))}),n(10,"div",8),m(11,"i",9),s(),p(12),l(13,"translate"),n(14,"div",10),m(15,"i",11),s()()()}if(e&2){let t=f();u("ngClass",V(12,Kc,t.sourceList.length,!t.sourceList.length)),y("aria-label",c(1,6,"accessories.control.mode_control")),a(4),u("ngClass",V(15,ii,t.service.values.Active===0,t.service.values.Active!==0)),a(),x(" ",c(6,8,"accessories.control.off")," "),a(6),u("ngClass",V(18,ii,t.service.values.Active===1,t.service.values.Active!==1)),a(),x(" ",c(13,10,"accessories.control.on")," ")}}function Yc(e,o){e&1&&(n(0,"h6"),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.input")))}function Xc(e,o){if(e&1){let t=R();n(0,"button",7),C("click",function(i){let d=D(t).$implicit,h=f(2);return A(h.setInput(d.identifier,i))}),n(1,"div",8),m(2,"i",9),s(),p(3),n(4,"div",10),m(5,"i",11),s()()}if(e&2){let t=o.$implicit,r=f(2);a(2),u("ngClass",V(2,ii,r.service.values.ActiveIdentifier===t.identifier,r.service.values.ActiveIdentifier!==t.identifier)),a(),x(" ",t.name," ")}}function Jc(e,o){if(e&1&&(_(0,Yc,3,3,"h6"),n(1,"div",12),l(2,"translate"),Pi(3,Xc,6,5,"button",13,Li),s()),e&2){let t=f();k(t.hasActive?0:-1),a(),y("aria-label",c(2,2,"accessories.control.input_control")),a(2),Fi(t.sourceList)}}var zn=(()=>{class e{$activeModal=w(X);service;inputList;$accessories;hasActive=!1;sourceList=[];stateSubscription;ngOnInit(){"Active"in this.service.values&&(this.hasActive=!0),Object.keys(this.inputList).length&&Object.entries(this.inputList).forEach(([t,r])=>{this.sourceList.push({identifier:Number.parseInt(t,10),name:r})}),this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{"Active"in this.service.values&&(this.hasActive=!0)})}setActive(t,r){this.service.getCharacteristic("Active").setValue(t),r.target.blur()}setInput(t,r){this.service.getCharacteristic("ActiveIdentifier").setValue(t),r.target.blur()}dismissModal(){this.$activeModal.dismiss("Dismiss")}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service",inputList:"inputList",$accessories:"$accessories"},decls:9,vars:6,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0",3,"ngClass"],[1,"modal-footer"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4),_(6,Qc,16,21,"div",5),_(7,Jc,5,4),s(),m(8,"div",6),s()),r&2&&(a(2),u("innerText",i.service.customName||i.service.serviceName),a(),y("aria-label",c(4,4,"form.button_close")),a(3),k(i.hasActive?6:-1),a(),k(i.sourceList.length?7:-1))},dependencies:[ee,E,M],encapsulation:2})}return e})();var e0=e=>({"accessory-on":e});function t0(e,o){if(e&1&&(n(0,"div",7),p(1),l(2,"translate"),s()),e&2){let t=f();a(),x(" ",t.channelList[t.service.values.ActiveIdentifier]||c(2,1,"accessories.control.on")," ")}}function i0(e,o){e&1&&(n(0,"div",7),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.off")))}var qn=(()=>{class e{$accessories=w(K);$modal=w(J);service;readyForControl=!1;channelList={};ngOnInit(){if(this.service.linkedServices)for(let[,t]of Object.entries(this.service.linkedServices))t.type==="InputSource"&&(this.channelList[t.values.Identifier]=t.values.ConfiguredName||`Input ${t.values.Identifier}`)}onClick(){this.readyForControl&&("Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1):"On"in this.service.values&&this.service.getCharacteristic("On").setValue(!this.service.values.On))}onLongClick(){if(this.readyForControl&&("Active"in this.service.values||Object.keys(this.channelList).length)){let t=this.$modal.open(zn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.inputList=this.channelList,t.componentInstance.$accessories=this.$accessories}}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-television"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:11,vars:8,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x1","10","y1","27.25","x2","22","y2","27.25","stroke","#d32f2f","stroke-width","4","stroke-linecap","round","stroke-opacity","0.75",1,"stand"],["x","1","y","6","width","30","height","20","rx","2","stroke","#7f7f7f","fill","#808080","stroke-width","1.5",1,"screen"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(r,i){r&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"line",4)(6,"rect",5),s()(),I(),n(7,"div",6),p(8),s(),_(9,t0,3,3,"div",7)(10,i0,3,3,"div",7),s()()),r&2&&(u("ngClass",N(6,e0,i.service.values.Active||i.service.values.On)),a(2),y("aria-label",c(3,4,"accessories.core.television")),a(6),x(" ",i.service.customName||i.service.values.ConfiguredName||i.service.serviceName," "),a(),k(i.service.values.On||i.service.values.Active?9:10))},dependencies:[q,E,M],styles:["body.dark-mode .screen{fill:#2b2b2b;stroke:#7f7f7f} .accessory-on svg .screen{animation:_ngcontent-%COMP%_color-change 3s infinite alternate} .accessory-on svg .stand{stroke:#7f7f7f;stroke-opacity:1}@keyframes _ngcontent-%COMP%_color-change{0%{fill:#4fc3f7}to{fill:#0288d1}}"]})}return e})();function n0(e,o){if(e&1&&(p(0),l(1,"convertTemp"),l(2,"number"),l(3,"uppercase")),e&2){let t=f();O(" ",le(2,4,c(1,2,t.service.values.CurrentTemperature),"1.0-1"),"\xB0",c(3,7,t.temperatureUnits)," ")}}function o0(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.no_data")," ")}var Zn=(()=>{class e{$settings=w(Ee);service;temperatureUnits=this.$settings.env.temperatureUnits;static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-temperature-sensor"]],inputs:{service:"service"},decls:34,vars:5,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x1","16","y1","5","x2","16","y2","17","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["cx","16","cy","20","r","3","stroke","#7f7f7f","stroke-width","1.2","fill","#1976d2","fill-opacity","0.5"],["x1","9","y1","6","x2","13","y2","6","stroke","#7f7f7f","stroke-width","0.8"],["x1","9","y1","9","x2","13","y2","9","stroke","#7f7f7f","stroke-width","0.8"],["x1","9","y1","12","x2","13","y2","12","stroke","#7f7f7f","stroke-width","0.8"],["x1","9","y1","15","x2","13","y2","15","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","6","x2","23","y2","6","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","9","x2","23","y2","9","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","12","x2","23","y2","12","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","15","x2","23","y2","15","stroke","#7f7f7f","stroke-width","0.8"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(r,i){r&1&&(te(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),te(4,"svg",3),ye(5,"rect",4)(6,"line",5)(7,"circle",6)(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20)(22,"line",21)(23,"line",22)(24,"line",23)(25,"line",24)(26,"line",25)(27,"line",26)(28,"line",27),ae()(),I(),te(29,"div",28),p(30),ae(),te(31,"div",29),_(32,n0,4,9)(33,o0,2,3),ae()()()),r&2&&(a(2),y("aria-label",c(3,3,"accessories.core.temperature_sensor")),a(28),v(i.service.customName||i.service.serviceName),a(2),k("CurrentTemperature"in i.service.values?32:33))},dependencies:[we,Fe,Pe,M],styles:[".temperature-circle[_ngcontent-%COMP%]{position:relative;display:inline-block;width:50px;height:50px;line-height:50px;border-radius:50%;font-size:14px;text-align:center;margin-bottom:6px;background-color:gray;color:#d3d3d3}@media (max-width: 575px){.temperature-circle-collapse[_ngcontent-%COMP%]{width:31px;height:31px;line-height:31px;font-size:10px;margin-bottom:7px}}"]})}return e})();var Lt=(e,o)=>({"fa-check-circle":e,"fa-blank":o});function r0(e,o){if(e&1&&p(0),e&2){let t=f();x(" \xB7 ",t.service.values.CurrentRelativeHumidity,"% ")}}function a0(e,o){if(e&1){let t=R();n(0,"button",10),C("click",function(i){D(t);let d=f();return A(d.setTargetMode(0,i))}),n(1,"div",11),m(2,"i",12),s(),p(3),l(4,"translate"),n(5,"div",13),m(6,"i",14),s()()}if(e&2){let t=f();a(2),u("ngClass",V(4,Lt,t.targetMode===0,t.targetMode!==0)),a(),x(" ",c(4,2,"accessories.control.off")," ")}}function s0(e,o){if(e&1){let t=R();n(0,"button",10),C("click",function(i){D(t);let d=f();return A(d.setTargetMode(3,i))}),n(1,"div",11),m(2,"i",12),s(),p(3),l(4,"translate"),n(5,"div",13),m(6,"i",14),s()()}if(e&2){let t=f();a(2),u("ngClass",V(4,Lt,t.targetMode===3,t.targetMode!==3)),a(),x(" ",c(4,2,"accessories.control.auto")," ")}}function l0(e,o){if(e&1){let t=R();n(0,"button",10),C("click",function(i){D(t);let d=f();return A(d.setTargetMode(1,i))}),n(1,"div",11),m(2,"i",12),s(),p(3),l(4,"translate"),n(5,"div",13),m(6,"i",14),s()()}if(e&2){let t=f();a(2),u("ngClass",V(4,Lt,t.targetMode===1,t.targetMode!==1)),a(),x(" ",c(4,2,"accessories.control.heat")," ")}}function c0(e,o){if(e&1){let t=R();n(0,"button",10),C("click",function(i){D(t);let d=f();return A(d.setTargetMode(2,i))}),n(1,"div",11),m(2,"i",12),s(),p(3),l(4,"translate"),n(5,"div",13),m(6,"i",14),s()()}if(e&2){let t=f();a(2),u("ngClass",V(4,Lt,t.targetMode===2,t.targetMode!==2)),a(),x(" ",c(4,2,"accessories.control.cool")," ")}}function p0(e,o){if(e&1){let t=R();n(0,"h6",15),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),s(),n(6,"nouislider",16),G("ngModelChange",function(i){D(t);let d=f();return U(d.targetTemperature.value,i)||(d.targetTemperature.value=i),A(i)}),C("ngModelChange",function(){D(t);let i=f();return A(i.onTemperatureStateChange())}),s()}if(e&2){let t=f();a(),Ue(" ",c(2,7,"accessories.control.target"),": ",le(4,11,c(3,9,t.targetTemperature.value),"1.0-1"),"\xB0",c(5,14,t.temperatureUnits)," "),a(5),u("min",t.targetTemperature.min)("max",t.targetTemperature.max)("step",t.targetTemperature.step),j("ngModel",t.targetTemperature.value)}}function d0(e,o){if(e&1){let t=R();n(0,"h6",17),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),l(6,"convertTemp"),l(7,"number"),l(8,"uppercase"),s(),n(9,"nouislider",16),G("ngModelChange",function(i){D(t);let d=f(2);return U(d.autoTemp,i)||(d.autoTemp=i),A(i)}),C("ngModelChange",function(){D(t);let i=f(2);return A(i.onAutoThresholdStateChange())}),s()}if(e&2){let t=f(2);a(),Tt(" ",c(2,9,"accessories.control.threshold_auto"),": ",le(4,13,c(3,11,t.autoTemp[0]),"1.0-1"),"\xB0",c(5,16,t.temperatureUnits)," - ",le(7,20,c(6,18,t.autoTemp[1]),"1.0-1"),"\xB0",c(8,23,t.temperatureUnits)," "),a(8),u("min",t.HeatingThresholdTemperature.minValue)("max",t.CoolingThresholdTemperature.maxValue)("step",t.CoolingThresholdTemperature.minStep),j("ngModel",t.autoTemp)}}function m0(e,o){if(e&1){let t=R();n(0,"h6",15),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),s(),n(6,"nouislider",16),G("ngModelChange",function(i){D(t);let d=f(2);return U(d.targetHeatingTemp,i)||(d.targetHeatingTemp=i),A(i)}),C("ngModelChange",function(){D(t);let i=f(2);return A(i.onThresholdStateChange())}),s()}if(e&2){let t=f(2);a(),Ue(" ",c(2,7,"accessories.control.threshold_auto"),": ",le(4,11,c(3,9,t.targetHeatingTemp),"1.0-1"),"\xB0",c(5,14,t.temperatureUnits)," "),a(5),u("min",t.HeatingThresholdTemperature.minValue)("max",t.HeatingThresholdTemperature.maxValue)("step",t.HeatingThresholdTemperature.minStep),j("ngModel",t.targetHeatingTemp)}}function u0(e,o){if(e&1){let t=R();n(0,"h6",15),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),s(),n(6,"nouislider",16),G("ngModelChange",function(i){D(t);let d=f(2);return U(d.targetCoolingTemp,i)||(d.targetCoolingTemp=i),A(i)}),C("ngModelChange",function(){D(t);let i=f(2);return A(i.onThresholdStateChange())}),s()}if(e&2){let t=f(2);a(),Ue(" ",c(2,7,"accessories.control.threshold_auto"),": ",le(4,11,c(3,9,t.targetCoolingTemp),"1.0-1"),"\xB0",c(5,14,t.temperatureUnits)," "),a(5),u("min",t.CoolingThresholdTemperature.minValue)("max",t.CoolingThresholdTemperature.maxValue)("step",t.CoolingThresholdTemperature.minStep),j("ngModel",t.targetCoolingTemp)}}function f0(e,o){if(e&1&&_(0,d0,10,25)(1,m0,7,16)(2,u0,7,16),e&2){let t=f();k(t.HeatingThresholdTemperature&&t.CoolingThresholdTemperature?0:t.HeatingThresholdTemperature&&!t.CoolingThresholdTemperature?1:!t.HeatingThresholdTemperature&&t.CoolingThresholdTemperature?2:-1)}}var Kn=(()=>{class e{$activeModal=w(X);$settings=w(Ee);service;$accessories;targetMode;targetTemperature;targetTemperatureChanged=new Q;targetThresholdChanged=new Q;targetStateValidValues=[];CoolingThresholdTemperature;HeatingThresholdTemperature;targetCoolingTemp;targetHeatingTemp;autoTemp;hasHumidity=!1;temperatureUnits=this.$settings.env.temperatureUnits;stateSubscription;constructor(){this.targetTemperatureChanged.pipe(Y(500)).subscribe(()=>{this.service.getCharacteristic("TargetTemperature").setValue(this.targetTemperature.value)}),this.targetThresholdChanged.pipe(Y(500)).subscribe(()=>{this.HeatingThresholdTemperature&&this.service.getCharacteristic("HeatingThresholdTemperature").setValue(this.targetHeatingTemp),this.CoolingThresholdTemperature&&this.service.getCharacteristic("CoolingThresholdTemperature").setValue(this.targetCoolingTemp)})}ngOnInit(){this.targetMode=this.service.values.TargetHeatingCoolingState,this.CoolingThresholdTemperature=this.service.getCharacteristic("CoolingThresholdTemperature"),this.HeatingThresholdTemperature=this.service.getCharacteristic("HeatingThresholdTemperature"),this.targetStateValidValues=this.service.getCharacteristic("TargetHeatingCoolingState").validValues,this.loadTargetTemperature(),this.service.getCharacteristic("CurrentRelativeHumidity")&&(this.hasHumidity=!0),setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(r=>{r.style.background="linear-gradient(to right, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))"})},10),this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetMode=this.service.values.TargetHeatingCoolingState,this.targetTemperature&&(this.targetTemperature.value=this.service.getCharacteristic("TargetTemperature").value),this.CoolingThresholdTemperature&&(this.targetCoolingTemp=this.service.getCharacteristic("CoolingThresholdTemperature").value),this.HeatingThresholdTemperature&&(this.targetHeatingTemp=this.service.getCharacteristic("HeatingThresholdTemperature").value),this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp]})}setTargetMode(t,r){this.targetMode=t,this.service.getCharacteristic("TargetHeatingCoolingState").setValue(this.targetMode),r.target.blur()}onTemperatureStateChange(){this.targetTemperatureChanged.next(this.targetTemperature.value)}onThresholdStateChange(){this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp],this.targetThresholdChanged.next(void 0)}onAutoThresholdStateChange(){this.targetHeatingTemp=this.autoTemp[0],this.targetCoolingTemp=this.autoTemp[1],this.targetThresholdChanged.next(void 0)}dismissModal(){this.$activeModal.dismiss("Dismiss")}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}loadTargetTemperature(){let t=this.service.getCharacteristic("TargetTemperature");this.targetTemperature={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep||.5},this.targetCoolingTemp=this.service.getCharacteristic("CoolingThresholdTemperature")?.value,this.targetHeatingTemp=this.service.getCharacteristic("HeatingThresholdTemperature")?.value,this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp]}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:22,vars:25,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"mt-2","mb-4","fs-4"],[1,"fas","fa-temperature-full"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control"],[1,"modal-footer"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"mt-4"],[3,"ngModelChange","min","max","step","ngModel"],[1,"mt-4","mb-1"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"h6",5),m(7,"i",6),p(8),l(9,"convertTemp"),l(10,"number"),l(11,"uppercase"),_(12,r0,1,1),s(),n(13,"div",7),l(14,"translate"),_(15,a0,7,7,"button",8),_(16,s0,7,7,"button",8),_(17,l0,7,7,"button",8),_(18,c0,7,7,"button",8),s(),_(19,p0,7,16),_(20,f0,3,1),s(),m(21,"div",9),s()),r&2&&(a(2),u("innerText",i.service.customName||i.service.serviceName),a(),y("aria-label",c(4,14,"form.button_close")),a(4),tt("color",i.service.values.CurrentHeatingCoolingState===2?"#1e8bbd":i.service.values.CurrentHeatingCoolingState===1?"#e69533":i.service.values.TargetHeatingCoolingState===3?"#42d672":"#7b7b7b"),a(),O("",le(10,18,c(9,16,i.service.values.CurrentTemperature),"1.0-1"),"\xB0",c(11,21,i.temperatureUnits)," "),a(4),k(i.hasHumidity?12:-1),a(),y("aria-label",c(14,23,"accessories.control.mode_control")),a(2),k(i.targetStateValidValues.includes(0)?15:-1),a(),k(i.targetStateValidValues.includes(3)?16:-1),a(),k(i.targetStateValidValues.includes(1)?17:-1),a(),k(i.targetStateValidValues.includes(2)?18:-1),a(),k("TargetTemperature"in i.service.values?19:-1),a(),k(i.targetStateValidValues.includes(3)?20:-1))},dependencies:[E,ee,ie,ne,oe,we,M,Fe,Pe],encapsulation:2})}return e})();var v0=e=>({"accessory-on":e});function g0(e,o){if(e&1&&(B(),n(0,"text",18),p(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase"),s()),e&2){let t=f();a(),O(" ",le(3,4,c(2,2,t.service.values.CurrentTemperature),"1.0-1"),"\xB0",c(4,7,t.temperatureUnits)," ")}}function h0(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.off")," ")}function C0(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.heat")," ")}function x0(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.cool")," ")}function y0(e,o){if(e&1&&(m(0,"i",21),p(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase")),e&2){let t=f();a(),O(" ",le(3,4,c(2,2,t.service.values.TargetTemperature),"1.0-1"),"\xB0",c(4,7,t.temperatureUnits)," ")}}var Qn=(()=>{class e{$modal=w(J);$settings=w(Ee);$accessories=w(K);service;readyForControl=!1;temperatureUnits=this.$settings.env.temperatureUnits;onClick(){if(!this.readyForControl)return;let t=this.$modal.open(Kn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-thermostat"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:30,vars:10,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["id","coolingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#1e8bbd"],["attributeName","stop-color","values","#1e8bbd;#66d6d6;#1e8bbd","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#66d6d6"],["attributeName","stop-color","values","#66d6d6;#1e8bbd;#66d6d6","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#1e8bbd"],["id","heatingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#cc5e00"],["attributeName","stop-color","values","#cc5e00;#e69533;#cc5e00;#e69533","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#e69533"],["attributeName","stop-color","values","#e69533;#cc5e00;#e69533;#cc5e00","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#cc5e00"],["x","1","y","1","width","30","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x","1","y","19","width","30","height","8","rx","0","stroke","#7f7f7f","stroke-width","0.75","fill-opacity","0.5"],["x","16","y","13","font-size","8","text-anchor","middle","fill","#7f7f7f","font-family","Arial, sans-serif"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"fa","fas","fa-bullseye"]],template:function(r,i){r&1&&(n(0,"div",0),C("longClick",function(){return i.onClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3)(5,"defs")(6,"linearGradient",4)(7,"stop",5),m(8,"animate",6),s(),n(9,"stop",7),m(10,"animate",8),s(),n(11,"stop",9),m(12,"animate",6),s()(),n(13,"linearGradient",10)(14,"stop",11),m(15,"animate",12),s(),n(16,"stop",13),m(17,"animate",14),s(),n(18,"stop",15),m(19,"animate",12),s()()(),m(20,"rect",16)(21,"rect",17),_(22,g0,5,9,":svg:text",18),s()(),I(),n(23,"div",19),p(24),s(),n(25,"div",20),_(26,h0,2,3)(27,C0,2,3)(28,x0,2,3)(29,y0,5,9),s()()()),r&2&&(u("ngClass",N(8,v0,i.service.values.TargetHeatingCoolingState>0)),a(2),y("aria-label",c(3,6,"accessories.core.thermostat")),a(19),y("fill",i.service.values.CurrentHeatingCoolingState===2?"url(#coolingGradient)":i.service.values.CurrentHeatingCoolingState===1?"url(#heatingGradient)":i.service.values.TargetHeatingCoolingState===3?"#42d672":"#7b7b7b"),a(),k("CurrentTemperature"in i.service.values?22:-1),a(2),v(i.service.customName||i.service.serviceName),a(2),k(i.service.values.TargetHeatingCoolingState===0?26:i.service.values.CurrentHeatingCoolingState===1?27:i.service.values.CurrentHeatingCoolingState===2?28:i.service.values.TargetHeatingCoolingState===3?29:-1))},dependencies:[q,E,we,M,Fe,Pe],encapsulation:2})}return e})();var Yn=(()=>{class e{service;static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-unknown"]],inputs:{service:"service"},decls:10,vars:3,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["cx","16","cy","16","r","14","fill","none","stroke","#7f7f7f","stroke-width","1.5"],["d",`M12.2575393,17.7112593
|
|
25
|
+
L12.1868707,17.7112593
|
|
26
|
+
C11.0779698,17.7112593 10.6478221,16.9467914 11.2212184,16.0037726
|
|
27
|
+
L16.4805582,7.35415962
|
|
28
|
+
C17.67876,5.38357359 18.0624739,5.55948915 17.3376772,7.746963
|
|
29
|
+
L15.7252918,12.6132252
|
|
30
|
+
C15.3772095,13.6637556 15.9942825,14.5048291 17.0992511,14.5048291
|
|
31
|
+
L20.1977772,14.5048291
|
|
32
|
+
L20.1846183,14.5177121
|
|
33
|
+
L20.2552868,14.5177121
|
|
34
|
+
C21.3641878,14.5177121 21.7943355,15.2821799 21.2209392,16.2251988
|
|
35
|
+
L16.1844844,24.5082506
|
|
36
|
+
C14.864477,26.6791606 14.4411534,26.4839632 15.241777,24.0676402
|
|
37
|
+
L16.7168658,19.6157462
|
|
38
|
+
C17.0649481,18.5652158 16.447875,17.7241422 15.3429064,17.7241422
|
|
39
|
+
L12.2443804,17.7241422
|
|
40
|
+
L12.2575393,17.7112593 Z`,"fill","#7f7f7f"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(r,i){r&1&&(te(0,"div",0)(1,"div",1)(2,"div",2),B(),te(3,"svg",3),ye(4,"circle",4)(5,"path",5),ae()(),I(),te(6,"div",6),p(7),ae(),te(8,"div",7),p(9),ae()()()),r&2&&(a(2),y("aria-label",i.service.humanType),a(5),v(i.service.customName||i.service.serviceName),a(2),v(i.service.humanType))},encapsulation:2})}return e})();var Xn=(e,o)=>({"fa-check-circle":e,"fa-blank":o});function _0(e,o){if(e&1){let t=R();n(0,"h6"),p(1),l(2,"translate"),l(3,"duration"),s(),n(4,"nouislider",12),G("ngModelChange",function(i){D(t);let d=f();return U(d.targetSetDuration.value,i)||(d.targetSetDuration.value=i),A(i)}),C("ngModelChange",function(){D(t);let i=f();return A(i.onSetDurationStateChange())}),s()}if(e&2){let t=f();a(),O(" ",c(2,6,"accessories.control.set_duration"),": ",t.targetSetDuration.value===0?"\u221E":c(3,8,t.targetSetDuration.value)," "),a(3),u("min",t.targetSetDuration.min)("max",t.targetSetDuration.max)("step",15),j("ngModel",t.targetSetDuration.value)}}var Jn=(()=>{class e{$activeModal=w(X);service;$accessories;targetMode;targetSetDuration;targetSetDurationChanged=new Q;stateSubscription;constructor(){this.targetSetDurationChanged.pipe(Y(500)).subscribe(()=>{this.service.getCharacteristic("SetDuration").setValue(this.targetSetDuration.value)})}ngOnInit(){this.targetMode=this.service.values.Active,this.loadTargetSetDuration(),this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetMode=this.service.values.Active,this.targetSetDuration&&"SetDuration"in this.service.values&&(this.targetSetDuration.value=this.service.getCharacteristic("SetDuration").value)})}setTargetMode(t,r){this.targetMode=t,this.service.getCharacteristic("Active").setValue(this.targetMode),r.target.blur()}onSetDurationStateChange(){this.targetSetDurationChanged.next(this.targetSetDuration.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}loadTargetSetDuration(){let t=this.service.getCharacteristic("SetDuration");t&&(this.targetSetDuration={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},setTimeout(()=>{let r=document.querySelectorAll(".noUi-target")[0];r&&(r.style.background="linear-gradient(to right, #add8e6, #416bdf)")},10))}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:24,vars:22,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"div",5),l(7,"translate"),n(8,"button",6),C("click",function(h){return i.setTargetMode(!1,h)}),n(9,"div",7),m(10,"i",8),s(),p(11),l(12,"translate"),n(13,"div",9),m(14,"i",10),s()(),n(15,"button",6),C("click",function(h){return i.setTargetMode(!0,h)}),n(16,"div",7),m(17,"i",8),s(),p(18),l(19,"translate"),n(20,"div",9),m(21,"i",10),s()()(),_(22,_0,5,10),s(),m(23,"div",11),s()),r&2&&(a(2),u("innerText",i.service.customName||i.service.serviceName),a(),y("aria-label",c(4,8,"form.button_close")),a(3),y("aria-label",c(7,10,"accessories.control.mode_control")),a(4),u("ngClass",V(16,Xn,!i.targetMode,i.targetMode)),a(),x(" ",c(12,12,"accessories.control.off")," "),a(6),u("ngClass",V(19,Xn,i.targetMode,!i.targetMode)),a(),x(" ",c(19,14,"accessories.control.on")," "),a(4),k(i.targetSetDuration?22:-1))},dependencies:[ee,ie,ne,oe,E,M,At],encapsulation:2})}return e})();var k0=e=>({"accessory-on":e});function S0(e,o){e&1&&(n(0,"div",2),l(1,"translate"),B(),n(2,"svg",5),m(3,"line",6)(4,"line",7)(5,"line",8)(6,"line",9)(7,"circle",10)(8,"circle",11)(9,"circle",12)(10,"circle",13)(11,"circle",14)(12,"circle",15),s()()),e&2&&y("aria-label",c(1,1,"accessories.core.generic_valve"))}function b0(e,o){e&1&&(n(0,"div",2),l(1,"translate"),B(),n(2,"svg",5),m(3,"circle",16)(4,"circle",17)(5,"circle",18)(6,"circle",19)(7,"circle",20)(8,"circle",21)(9,"circle",22)(10,"circle",23)(11,"circle",24)(12,"circle",25)(13,"line",26)(14,"line",27)(15,"line",28),s()()),e&2&&y("aria-label",c(1,1,"accessories.core.irrigation_valve"))}function T0(e,o){e&1&&(n(0,"div",2),l(1,"translate"),B(),n(2,"svg",5),m(3,"line",29)(4,"line",30)(5,"line",31)(6,"path",32)(7,"line",33)(8,"circle",34)(9,"circle",35)(10,"circle",36)(11,"circle",37)(12,"circle",38)(13,"circle",39)(14,"circle",40)(15,"circle",41)(16,"circle",42)(17,"circle",43)(18,"circle",44)(19,"circle",45),s()()),e&2&&y("aria-label",c(1,1,"accessories.core.shower_head_valve"))}function M0(e,o){e&1&&(n(0,"div",2),l(1,"translate"),B(),n(2,"svg",5),m(3,"rect",46)(4,"line",47)(5,"line",48)(6,"rect",49)(7,"path",50)(8,"line",51)(9,"line",52),s()()),e&2&&y("aria-label",c(1,1,"accessories.core.faucet_valve"))}function w0(e,o){if(e&1&&(n(0,"div",4),p(1),s()),e&2){let t=f();a(),v(t.remainingDuration)}}function E0(e,o){e&1&&(n(0,"div",4),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.running")))}function B0(e,o){e&1&&(n(0,"div",4),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.off")))}var eo=(()=>{class e{$accessories=w(K);$modal=w(J);service;readyForControl=!1;secondsActive=0;remainingDuration;remainingDurationInterval=Si(1e3).pipe(bi(()=>this.isActive()));remainingDurationSubscription;ngOnInit(){"SetDuration"in this.service.values&&this.setupRemainingDurationCounter()}onClick(){this.readyForControl&&("Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1):"On"in this.service.values&&this.service.getCharacteristic("On").setValue(!this.service.values.On))}onLongClick(){if(this.readyForControl&&"SetDuration"in this.service.values){let t=this.$modal.open(Jn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}}ngOnDestroy(){this.remainingDurationSubscription&&this.remainingDurationSubscription.unsubscribe()}isActive(){return this.service.values.Active?!0:(this.resetRemainingDuration(),!1)}setupRemainingDurationCounter(){this.remainingDurationSubscription=this.remainingDurationInterval.subscribe(()=>{this.secondsActive++;let t=this.service.getCharacteristic("RemainingDuration").value-this.secondsActive;t>0?this.remainingDuration=t<3600?new Date(t*1e3).toISOString().substring(14,19):new Date(t*1e3).toISOString().substring(11,19):this.remainingDuration=""})}resetRemainingDuration(){this.secondsActive=0,this.service.getCharacteristic("RemainingDuration")&&(this.remainingDuration="")}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-valve"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:11,vars:6,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],["width","32","height","32","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x1","8","y1","3","x2","14","y2","3","stroke","#7f7f7f","stroke-width","3","stroke-linecap","round"],["x1","11","y1","8","x2","11","y2","3","stroke","#7f7f7f","stroke-width","3","stroke-linecap","round"],["x1","0","y1","9","x2","21","y2","9","stroke","#7f7f7f","stroke-width","4","stroke-linecap","round"],["x1","21","y1","9","x2","21","y2","14","stroke","#7f7f7f","stroke-width","4","stroke-linecap","round"],["fill","#1976d2","fill-opacity","0","cx","21","cy","19","r","1.5",1,"drop","drop-top"],["fill","#1976d2","fill-opacity","0","cx","17","cy","24","r","1.5",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","25","cy","24","r","1.5",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","13","cy","29","r","1.5",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","21","cy","29","r","1.5",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","29","cy","29","r","1.5",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","1","cy","16","r","1",1,"drop","drop-out"],["fill","#1976d2","fill-opacity","0","cx","6","cy","8","r","1",1,"drop","drop-out"],["fill","#1976d2","fill-opacity","0","cx","16","cy","4","r","1",1,"drop","drop-out"],["fill","#1976d2","fill-opacity","0","cx","26","cy","8","r","1",1,"drop","drop-out"],["fill","#1976d2","fill-opacity","0","cx","31","cy","16","r","1",1,"drop","drop-out"],["fill","#1976d2","fill-opacity","0","cx","7","cy","16","r","1.5",1,"drop","drop-in"],["fill","#1976d2","fill-opacity","0","cx","25","cy","16","r","1.5",1,"drop","drop-in"],["fill","#1976d2","fill-opacity","0","cx","10.5","cy","11.5","r","1.5",1,"drop","drop-in"],["fill","#1976d2","fill-opacity","0","cx","21.5","cy","11.5","r","1.5",1,"drop","drop-in"],["fill","#1976d2","fill-opacity","0","cx","16","cy","9","r","1.5",1,"drop","drop-in"],["x1","16","y1","16","x2","16","y2","31","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["x1","14","y1","16","x2","18","y2","16","stroke","#7f7f7f","stroke-width","4","stroke-linecap","round"],["x1","4","y1","31","x2","28","y2","31","stroke","#7f7f7f","stroke-opacity","0.5","stroke-width","10","stroke-linecap","round",1,"grass"],["x1","1","y1","1","x2","16","y2","1","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["x1","1","y1","1","x2","1","y2","31","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["x1","16","y1","1","x2","16","y2","3","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["d","M8 11 A8 7 0 0 1 24 11","fill","none","stroke","#7f7f7f","stroke-width","2"],["x1","7","y1","11","x2","25","y2","11","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["fill","#1976d2","fill-opacity","0","cx","8","cy","16","r","1.25",1,"drop","drop-top"],["fill","#1976d2","fill-opacity","0","cx","13.3","cy","16","r","1.25",1,"drop","drop-top"],["fill","#1976d2","fill-opacity","0","cx","18.6","cy","16","r","1.25",1,"drop","drop-top"],["fill","#1976d2","fill-opacity","0","cx","24","cy","16","r","1.25",1,"drop","drop-top"],["fill","#1976d2","fill-opacity","0","cx","8","cy","22","r","1",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","13.3","cy","22","r","1",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","18.6","cy","22","r","1",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","24","cy","22","r","1",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","8","cy","28","r","0.75",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","13.3","cy","28","r","0.75",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","18.6","cy","28","r","0.75",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","24","cy","28","r","0.75",1,"drop","drop-bottom"],["x","-3","y","28","width","21","height","6.5","fill","#7f7f7f","stroke-width","0","fill-opacity","0.5",1,"sink"],["stroke-linecap","round","x1","24","y1","18","x2","26","y2","18","stroke","#1976d2","stroke-width","3","stroke-opacity","0.5"],["stroke-linecap","round","x1","20","y1","18","x2","22","y2","18","stroke","#d32f2f","stroke-width","3","stroke-opacity","0.5"],["x","19","y","16.5","rx","1","width","8","height","3","fill","none","stroke-width","1","stroke","#7f7f7f"],["d","M10 9 C10 -1, 23 -1, 23 10 V26","fill","none","stroke","#7f7f7f","stroke-width","2"],["x1","10","y1","9","x2","10","y2","28","stroke","#1976d2","stroke-opacity","0","stroke-width","1.5",1,"stream"],["x1","20","y1","31","x2","26","y2","31","stroke","#7f7f7f","stroke-width","10","stroke-linecap","round"]],template:function(r,i){r&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1),_(2,S0,13,3,"div",2)(3,b0,16,3,"div",2)(4,T0,20,3,"div",2)(5,M0,10,3,"div",2),n(6,"div",3),p(7),s(),_(8,w0,2,1,"div",4)(9,E0,3,3,"div",4)(10,B0,3,3,"div",4),s()()),r&2&&(u("ngClass",N(4,k0,i.service.values.Active||i.service.values.On)),a(2),k(i.service.values.ValveType===0||!i.service.values.ValveType?2:i.service.values.ValveType===1?3:i.service.values.ValveType===2?4:i.service.values.ValveType===3?5:-1),a(5),x(" ",i.service.customName||i.service.values.ConfiguredName||i.service.serviceName," "),a(),k(i.service.values.Active&&i.remainingDuration?8:i.service.values.Active&&!i.remainingDuration||i.service.values.On?9:10))},dependencies:[q,E,M],styles:[".accessory-on svg .grass{stroke:#4caf50!important} .accessory-on svg .drop{fill-opacity:.5} .accessory-on svg .drop-in{animation:_ngcontent-%COMP%_blink 1.5s infinite} .accessory-on svg .drop-out{animation:_ngcontent-%COMP%_blink 1.5s infinite;animation-delay:.75s} .accessory-on svg .drop-top{animation:_ngcontent-%COMP%_blink 1.5s infinite} .accessory-on svg .drop-middle{animation:_ngcontent-%COMP%_blink 1.5s infinite;animation-delay:.5s} .accessory-on svg .drop-bottom{animation:_ngcontent-%COMP%_blink 1.5s infinite;animation-delay:1s}@keyframes _ngcontent-%COMP%_blink{0%,to{opacity:1}50%{opacity:0}}@keyframes _ngcontent-%COMP%_blink-on-off{0%,to{opacity:1}50%{opacity:.5}} .accessory-on svg .stream{stroke-opacity:.5;animation:_ngcontent-%COMP%_blink-on-off 4s infinite} .accessory-on svg .sink{fill:#1976d2}"]})}return e})();var V0=e=>({"accessory-on":e}),to=(()=>{class e{service;readyForControl=!1;onClick(){this.readyForControl&&("On"in this.service.values?this.service.getCharacteristic("On").setValue(!this.service.values.On):"Active"in this.service.values&&this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1))}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-washing-machine"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:22,vars:10,consts:[["tabindex","0",1,"accessory-box",3,"shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3","y","1","width","25","height","30","rx","2","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x","6","y","4","width","5","rx","0.5","height","4","stroke","#7f7f7f","fill","none","stroke-width","0.5"],["x","7","y","6","width","3","rx","0.25","height","1","stroke","#7f7f7f","fill","none","stroke-width","0.25"],["x","14","y","4","width","11","height","4","rx","0.5","fill","none","stroke","#7f7f7f","stroke-width","0.5"],["x","19","y","5","width","5","height","2","rx","0.25","fill","#1976d2","fill-opacity","0.5","stroke","#7f7f7f","stroke-width","0.25"],["x","15","y","5","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","16","y","5","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","17","y","5","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","15","y","6","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","16","y","6","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","17","y","6","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","19","y","15.5","rx","1","width","3","height","3","fill","#7f7f7f",1,"handle"],["cx","15.5","cy","17","r","6.5","stroke","#7f7f7f","fill","none","stroke-width","1.2"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(r,i){r&1&&(n(0,"div",0),C("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7)(9,"rect",8)(10,"rect",9)(11,"rect",10)(12,"rect",11)(13,"rect",12)(14,"rect",13)(15,"rect",14)(16,"rect",15)(17,"circle",16),s()(),I(),n(18,"div",17),p(19),s(),m(20,"div",18),l(21,"translate"),s()()),r&2&&(u("ngClass",N(8,V0,i.service.values.On||i.service.values.Active)),a(2),y("aria-label",c(3,4,"accessories.core.washing_machine")),a(17),v(i.service.customName||i.service.serviceName),a(),u("innerText",c(21,6,i.service.values.On||i.service.values.Active?"accessories.control.on":"accessories.control.off")))},dependencies:[q,E,M],styles:[".accessory-on svg .handle{fill:#1976d2;fill-opacity:.5;transform-origin:48% 53%;animation:_ngcontent-%COMP%_rotate-handle 2s linear infinite}@keyframes _ngcontent-%COMP%_rotate-handle{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"]})}return e})();function D0(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.closed")," ")}function A0(e,o){if(e&1&&(p(0),l(1,"translate")),e&2){let t=f(2);O(" ",c(1,2,"accessories.control.open")," ",t.service.getCharacteristic("CurrentPosition").value,"% ")}}function I0(e,o){if(e&1&&_(0,D0,2,3)(1,A0,2,4),e&2){let t=f();k(t.service.values.CurrentPosition===0?0:1)}}function L0(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.opening"),"... ")}function P0(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.closing"),"... ")}var io=(()=>{class e{$activeModal=w(X);service;$accessories;targetMode;targetPositionChanged=new Q;targetPosition;stateSubscription;constructor(){this.targetPositionChanged.pipe(Y(500)).subscribe(()=>{this.service.getCharacteristic("CurrentPosition").value<this.targetPosition.value?this.service.values.PositionState=1:this.service.getCharacteristic("CurrentPosition").value>this.targetPosition.value&&(this.service.values.PositionState=0),this.service.getCharacteristic("TargetPosition").setValue(this.targetPosition.value)})}ngOnInit(){this.targetMode=this.service.values.On,this.loadTargetPosition(),this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetMode=this.service.values.On,this.targetPosition&&"TargetPosition"in this.service.values&&(this.targetPosition.value=this.service.getCharacteristic("TargetPosition").value)})}onTargetPositionChange(){this.targetPositionChanged.next(this.targetPosition.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}loadTargetPosition(){let t=this.service.getCharacteristic("TargetPosition");t&&(this.targetPosition={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(i=>{i.style.background="linear-gradient(to right, #242424, #ffd6aa)"})},10))}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:34,vars:34,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"d-flex","justify-content-center","mb-0","p-0"],[1,"mb-0","mx-0","p-3","btn-read","w-100"],[1,"mt-4"],[1,"mb-1",3,"ngModelChange","min","max","step","ngModel"],[1,"d-flex","justify-content-between","align-items-center","mt-0","mb-1"],[1,"grey-text","small"],[1,"mb-1",3,"ngModelChange","min","max","step","disabled","ngModel"],[1,"modal-footer"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"div",5)(7,"div",6),_(8,I0,2,1)(9,L0,2,3)(10,P0,2,3),s()(),n(11,"h6",7),p(12),l(13,"translate"),s(),n(14,"nouislider",8),G("ngModelChange",function(h){return U(i.targetPosition.value,h)||(i.targetPosition.value=h),h}),C("ngModelChange",function(){return i.onTargetPositionChange()}),s(),n(15,"div",9)(16,"span",10),p(17),l(18,"translate"),s(),n(19,"span",10),p(20),l(21,"translate"),s()(),n(22,"h6",7),p(23),l(24,"translate"),s(),n(25,"nouislider",11),G("ngModelChange",function(h){return U(i.service.getCharacteristic("CurrentPosition").value,h)||(i.service.getCharacteristic("CurrentPosition").value=h),h}),s(),n(26,"div",9)(27,"span",10),p(28),l(29,"translate"),s(),n(30,"span",10),p(31),l(32,"translate"),s()()(),m(33,"div",12),s()),r&2&&(a(2),u("innerText",i.service.customName||i.service.serviceName),a(),y("aria-label",c(4,20,"form.button_close")),a(5),k(i.service.values.PositionState===2?8:i.service.values.PositionState===1?9:i.service.values.PositionState===0?10:-1),a(4),O("",c(13,22,"accessories.control.target"),": ",i.targetPosition.value,"%"),a(2),u("min",i.targetPosition.min)("max",i.targetPosition.max)("step",i.targetPosition.step),j("ngModel",i.targetPosition.value),a(3),v(c(18,24,"accessories.control.closed")),a(3),v(c(21,26,"accessories.control.open")),a(3),O(" ",c(24,28,"accessories.control.current"),": ",i.service.getCharacteristic("CurrentPosition").value,"% "),a(2),u("min",0)("max",100)("step",1)("disabled",!0),j("ngModel",i.service.getCharacteristic("CurrentPosition").value),a(3),v(c(29,30,"accessories.control.closed")),a(3),v(c(32,32,"accessories.control.open")))},dependencies:[oe,ee,ie,ne,M],encapsulation:2})}return e})();var F0=e=>({"accessory-on":e});function H0(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.closed")," ")}function O0(e,o){if(e&1&&(p(0),l(1,"translate")),e&2){let t=f(2);O(" ",c(1,2,"accessories.control.open")," ",t.service.values.CurrentPosition,"% ")}}function N0(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.open")," ")}function $0(e,o){if(e&1&&(n(0,"div",12),_(1,H0,2,3),_(2,O0,2,4),_(3,N0,2,3),s()),e&2){let t=f();a(),k(t.service.values.CurrentPosition===0?1:-1),a(),k(t.service.values.CurrentPosition>0&&t.service.values.CurrentPosition<100?2:-1),a(),k(t.service.values.CurrentPosition===100?3:-1)}}function R0(e,o){e&1&&(n(0,"div",13),p(1),l(2,"translate"),s()),e&2&&(a(),x("",c(2,1,"accessories.control.opening"),"..."))}function W0(e,o){e&1&&(n(0,"div",13),p(1),l(2,"translate"),s()),e&2&&(a(),x("",c(2,1,"accessories.control.closing"),"..."))}var no=(()=>{class e{$accessories=w(K);$modal=w(J);service;readyForControl=!1;onClick(){this.readyForControl&&(this.service.values.TargetPosition?this.service.getCharacteristic("TargetPosition").setValue(0):this.service.getCharacteristic("TargetPosition").setValue(100))}onLongClick(){if(!this.readyForControl)return;let t=this.$modal.open(io,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-window-covering"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:17,vars:8,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","0.8","width","30","height","30.2","rx","0.5","stroke","#7f7f7f","fill","none","stroke-width","1.5"],["x","2.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1"],["x","3.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","rx","2"],["x","16.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1"],["x","17.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","rx","2"],["x","2.3","y","2.1","width","27.4","height","27.6","stroke","#808080","fill","#808080","stroke-width","0.5","stroke-opacity","0.9","fill-opacity","0.9",1,"c-blinds"],["x","2.05","y","29.9","width","27.9","height","0","stroke","#ffffff","fill","#ffffff","stroke-width","0.5","stroke-opacity","0","fill-opacity","0.5",1,"c-light"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","red-text"]],template:function(r,i){r&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7)(9,"rect",8)(10,"rect",9)(11,"rect",10),s()(),I(),n(12,"div",11),p(13),s(),_(14,$0,4,3,"div",12)(15,R0,3,3,"div",13)(16,W0,3,3,"div",13),s()()),r&2&&(u("ngClass",N(6,F0,i.service.values.CurrentPosition)),a(2),y("aria-label",c(3,4,"accessories.core.window_covering")),a(11),v(i.service.customName||i.service.serviceName),a(),k(i.service.values.PositionState===2?14:i.service.values.PositionState===1?15:i.service.values.PositionState===0?16:-1))},dependencies:[q,E,M],styles:["body.dark-mode .c-blinds{fill:#2b2b2b;stroke:#2b2b2b;stroke-opacity:.8;fill-opacity:.8} svg .c-blinds{transition:height 3s ease;height:27.6px} svg .c-light{transition:y 3s ease,height 3s ease;y:29.9px;height:0} .accessory-on svg .c-blinds{transition:height 3s ease;height:.3px} .accessory-on svg .c-light{transition:y 3s ease,height 3s ease;y:2.65px;height:27.3px}"]})}return e})();function j0(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.closed")," ")}function U0(e,o){if(e&1&&(p(0),l(1,"translate")),e&2){let t=f(2);O(" ",c(1,2,"accessories.control.open")," ",t.service.getCharacteristic("CurrentPosition").value,"% ")}}function G0(e,o){if(e&1&&_(0,j0,2,3)(1,U0,2,4),e&2){let t=f();k(t.service.values.CurrentPosition===0?0:1)}}function z0(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.opening"),"... ")}function q0(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.closing"),"... ")}var oo=(()=>{class e{$activeModal=w(X);service;$accessories;targetMode;targetPositionChanged=new Q;targetPosition;stateSubscription;constructor(){this.targetPositionChanged.pipe(Y(500)).subscribe(()=>{this.service.getCharacteristic("CurrentPosition").value<this.targetPosition.value?this.service.values.PositionState=1:this.service.getCharacteristic("CurrentPosition").value>this.targetPosition.value&&(this.service.values.PositionState=0),this.service.getCharacteristic("TargetPosition").setValue(this.targetPosition.value)})}ngOnInit(){this.targetMode=this.service.values.On,this.loadTargetPosition(),this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetMode=this.service.values.On,this.targetPosition&&"TargetPosition"in this.service.values&&(this.targetPosition.value=this.service.getCharacteristic("TargetPosition").value)})}onTargetPositionChange(){this.targetPositionChanged.next(this.targetPosition.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}loadTargetPosition(){let t=this.service.getCharacteristic("TargetPosition");t&&(this.targetPosition={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(i=>{i.style.background="linear-gradient(to right, #242424, #ffd6aa)"})},10))}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:34,vars:34,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"d-flex","justify-content-center","mb-0","p-0"],[1,"mb-0","mx-0","p-3","btn-read","w-100"],[1,"mt-4"],[1,"mb-1",3,"ngModelChange","min","max","step","ngModel"],[1,"d-flex","justify-content-between","align-items-center","mt-0","mb-1"],[1,"grey-text","small"],[1,"mb-1",3,"ngModelChange","min","max","step","disabled","ngModel"],[1,"modal-footer"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"div",5)(7,"div",6),_(8,G0,2,1)(9,z0,2,3)(10,q0,2,3),s()(),n(11,"h6",7),p(12),l(13,"translate"),s(),n(14,"nouislider",8),G("ngModelChange",function(h){return U(i.targetPosition.value,h)||(i.targetPosition.value=h),h}),C("ngModelChange",function(){return i.onTargetPositionChange()}),s(),n(15,"div",9)(16,"span",10),p(17),l(18,"translate"),s(),n(19,"span",10),p(20),l(21,"translate"),s()(),n(22,"h6",7),p(23),l(24,"translate"),s(),n(25,"nouislider",11),G("ngModelChange",function(h){return U(i.service.getCharacteristic("CurrentPosition").value,h)||(i.service.getCharacteristic("CurrentPosition").value=h),h}),s(),n(26,"div",9)(27,"span",10),p(28),l(29,"translate"),s(),n(30,"span",10),p(31),l(32,"translate"),s()()(),m(33,"div",12),s()),r&2&&(a(2),u("innerText",i.service.customName||i.service.serviceName),a(),y("aria-label",c(4,20,"form.button_close")),a(5),k(i.service.values.PositionState===2?8:i.service.values.PositionState===1?9:i.service.values.PositionState===0?10:-1),a(4),O("",c(13,22,"accessories.control.target"),": ",i.targetPosition.value,"%"),a(2),u("min",i.targetPosition.min)("max",i.targetPosition.max)("step",i.targetPosition.step),j("ngModel",i.targetPosition.value),a(3),v(c(18,24,"accessories.control.closed")),a(3),v(c(21,26,"accessories.control.open")),a(3),O(" ",c(24,28,"accessories.control.current"),": ",i.service.getCharacteristic("CurrentPosition").value,"% "),a(2),u("min",0)("max",100)("step",1)("disabled",!0),j("ngModel",i.service.getCharacteristic("CurrentPosition").value),a(3),v(c(29,30,"accessories.control.closed")),a(3),v(c(32,32,"accessories.control.open")))},dependencies:[oe,ee,ie,ne,M],encapsulation:2})}return e})();var Z0=e=>({"accessory-on":e});function K0(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.closed")," ")}function Q0(e,o){if(e&1&&(p(0),l(1,"translate")),e&2){let t=f(2);O(" ",c(1,2,"accessories.control.open")," ",t.service.values.CurrentPosition,"% ")}}function Y0(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.open")," ")}function X0(e,o){if(e&1&&(n(0,"div",12),_(1,K0,2,3),_(2,Q0,2,4),_(3,Y0,2,3),s()),e&2){let t=f();a(),k(t.service.values.CurrentPosition===0?1:-1),a(),k(t.service.values.CurrentPosition>0&&t.service.values.CurrentPosition<100?2:-1),a(),k(t.service.values.CurrentPosition===100?3:-1)}}function J0(e,o){e&1&&(n(0,"div",13),p(1),l(2,"translate"),s()),e&2&&(a(),x("",c(2,1,"accessories.control.opening"),"..."))}function ep(e,o){e&1&&(n(0,"div",13),p(1),l(2,"translate"),s()),e&2&&(a(),x("",c(2,1,"accessories.control.closing"),"..."))}var ro=(()=>{class e{$accessories=w(K);$modal=w(J);service;readyForControl=!1;onClick(){this.readyForControl&&(this.service.values.TargetPosition?this.service.getCharacteristic("TargetPosition").setValue(0):this.service.getCharacteristic("TargetPosition").setValue(100))}onLongClick(){if(!this.readyForControl)return;let t=this.$modal.open(oo,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-window"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:17,vars:8,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","0.8","width","30","height","30.2","rx","0.5","stroke","#7f7f7f","fill","none","stroke-width","1.5"],["x","2.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1",1,"outline-left"],["x","3.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","ry","2",1,"divider-left"],["x","15.16","y","13.6","width","0.1","height","4.6","stroke","#1976d2","fill","none","stroke-width","0.5","ry","2",1,"handle-left"],["x","16.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1",1,"outline-right"],["x","17.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","ry","2",1,"divider-right"],["x","16.76","y","13.6","width","0.1","height","4.6","stroke","#1976d2","fill","none","stroke-width","0.5","ry","2",1,"handle-right"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","red-text"]],template:function(r,i){r&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7)(9,"rect",8)(10,"rect",9)(11,"rect",10),s()(),I(),n(12,"div",11),p(13),s(),_(14,X0,4,3,"div",12)(15,J0,3,3,"div",13)(16,ep,3,3,"div",13),s()()),r&2&&(u("ngClass",N(6,Z0,i.service.values.CurrentPosition)),a(2),y("aria-label",c(3,4,"accessories.core.window")),a(11),v(i.service.customName||i.service.serviceName),a(),k(i.service.values.PositionState===2?14:i.service.values.PositionState===1?15:i.service.values.PositionState===0?16:-1))},dependencies:[q,E,M],styles:["svg .outline-left{x:2.8px;width:12.4px} svg .divider-left{x:3.66px;width:10.68px} svg .handle-left{x:15.16px;width:.1px} svg .outline-right{x:16.8px;width:12.4px} svg .divider-right{x:17.66px;width:10.68px} svg .handle-right{x:16.76px;width:.1px} .accessory-on svg .outline-left{x:2.8px;width:2.4px} .accessory-on svg .divider-left{x:3.66px;width:.68px} .accessory-on svg .handle-left{x:5.16px;width:.1px} .accessory-on svg .outline-right{x:26.8px;width:2.4px} .accessory-on svg .divider-right{x:27.66px;width:.68px} .accessory-on svg .handle-right{x:26.76px;width:.1px}"]})}return e})();var vt={OnOffLight:"OnOffLight",OnOffLightSwitch:"OnOffLightSwitch",OnOffPlugInUnit:"OnOffPlugInUnit",DimmableLight:"DimmableLight",ColorTemperatureLight:"ColorTemperatureLight",ExtendedColorLight:"ExtendedColorLight",RoboticVacuumCleaner:"RoboticVacuumCleaner",ContactSensor:"ContactSensor",OccupancySensor:"OccupancySensor",LightSensor:"LightSensor",TemperatureSensor:"TemperatureSensor",HumiditySensor:"HumiditySensor",SmokeCoAlarm:"SmokeCoAlarm",WaterLeakDetector:"WaterLeakDetector",AirQualitySensor:"AirQualitySensor"},Ve=(function(e){return e[e.Stopped=0]="Stopped",e[e.Running=1]="Running",e[e.Paused=2]="Paused",e[e.Error=3]="Error",e[e.SeekingCharger=64]="SeekingCharger",e[e.Charging=65]="Charging",e[e.Docked=66]="Docked",e})(Ve||{}),ni=(function(e){return e[e.Idle=0]="Idle",e[e.Cleaning=1]="Cleaning",e})(ni||{}),be={Min:0,Max:254},ot={MinMired:147,MaxMired:500};function ao(e){return e.deviceType===vt.OnOffLight||e.deviceType===vt.OnOffLightSwitch||e.deviceType===vt.OnOffPlugInUnit}function oi(e){return e.deviceType===vt.RoboticVacuumCleaner}function ri(e){return e.clusters?.rvcOperationalState?.operationalState??Ve.Stopped}function tp(e){let o=ri(e);return o===Ve.Running||o===Ve.Paused}function ip(e){let o=ri(e);if(o===Ve.Running){let t=e.getCluster?.("rvcOperationalState");t&&t.setAttributes({operationalState:Ve.Paused}).catch(r=>{console.error("Failed to pause Matter robotic vacuum:",r)})}else if(o===Ve.Paused){let t=e.getCluster?.("rvcOperationalState");t&&t.setAttributes({operationalState:Ve.Running}).catch(r=>{console.error("Failed to resume Matter robotic vacuum:",r)})}else{let t=e.getCluster?.("rvcRunMode");t?t.setAttributes({currentMode:ni.Cleaning}).catch(r=>{console.error("Failed to start Matter robotic vacuum:",r)}):console.error("RvcRunMode cluster not found")}}function np(e){let t=!(e.clusters?.onOff?.onOff??!1),r=e.getCluster?.("onOff");r&&r.setAttributes({onOff:t}).catch(i=>{console.error("Failed to control Matter device:",i)})}function Le(e){return e.clusters?.onOff?.onOff??!1}function op(e){return e.clusters?.levelControl!==void 0}function Ie(e){if(oi(e))return tp(e);if(op(e)){let o=Le(e),t=He(e)>0;return o&&t}return Le(e)}function ze(e){oi(e)?ip(e):np(e)}function rp(e){switch(ri(e)){case Ve.Running:return"accessories.control.cleaning";case Ve.Paused:return"accessories.control.paused";case Ve.SeekingCharger:return"Seeking Charger";case Ve.Charging:return"Charging";case Ve.Docked:return"Docked";case Ve.Stopped:default:return"accessories.control.stopped"}}function ap(e){return Le(e)?"accessories.control.on":"accessories.control.off"}function so(e){return oi(e)?rp(e):ap(e)}function He(e){return e.clusters?.levelControl?.currentLevel??be.Min}function rt(e){let o=He(e);return Math.round(o/be.Max*100)}function at(e){return Math.round(e/be.Max*100)}function st(e){let o=He(e);if(Le(e)){let r=e.getCluster?.("onOff");r&&r.setAttributes({onOff:!1}).catch(i=>{console.error("Failed to turn Matter light off:",i)})}else{let r=o||be.Max,i=e.getCluster?.("levelControl");i&&i.setAttributes({currentLevel:r}).catch(d=>{console.error("Failed to turn Matter light on:",d)})}}function lt(e){return e.clusters?.colorControl?.colorTemperatureMireds??250}function lo(e){return e.clusters?.colorControl?.colorTemperatureMireds!==void 0}function gt(e){return e.clusters?.colorControl?.currentHue??0}function ht(e){return e.clusters?.colorControl?.currentSaturation??0}function co(e){return!(e.clusters?.booleanState?.stateValue??!1)}function po(e){return e.clusters?.occupancySensing?.occupancy?.occupied??!1}function mo(e){let o=e.clusters?.illuminanceMeasurement?.measuredValue??0;return o===0||o===null?0:10**((o-1)/1e4)}function uo(e){let o=e.clusters?.temperatureMeasurement?.measuredValue;return o==null?null:o/100}function fo(e){let o=e.clusters?.relativeHumidityMeasurement?.measuredValue;return o==null?null:o/100}function sp(e){return e.clusters?.smokeCoAlarm?.smokeState??0}function lp(e){return e.clusters?.smokeCoAlarm?.coState??0}function vo(e){let o=sp(e),t=lp(e);return o>0||t>0}function go(e){return e.clusters?.booleanState?.stateValue??!1}function ho(e){return e.clusters?.airQuality?.airQuality??0}var cp=()=>[3,4],pp=()=>[1,2],dp=(e,o,t,r)=>({"accessory-on":e,"fill-red":o,"fill-orange":t,"fill-green":r}),mp=(e,o)=>({"grey-text":e,"red-text":o}),Co=(()=>{class e{service;labels=["Unknown","Good","Fair","Moderate","Poor","Very Poor","Extremely Poor"];get airQuality(){return ho(this.service)}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-matter-air-quality-sensor"]],inputs:{service:"service"},decls:25,vars:17,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["transform","translate(5.1, 3) scale(0.68)"],["fill","#7f7f7f","d","M10.1435881,25.4905179 C10.286009,26.7050605 10.531254,27.9706077 10.8919121,29.2887103 C6.25942062,27.4175104 3.57173247,24.180341 2.39781526,19.889403 C1.54190101,16.760839 1.56931096,13.3702525 2.13724518,10.1783222 C2.1501971,10.1055292 2.17646546,9.96330988 2.17646546,9.96330988 C2.17646546,9.96330988 2.33770347,10.0208429 2.92620872,10.2769757 C4.60998953,11.0098007 6.29364519,11.9318703 7.85704035,13.0517448 C9.19214306,14.0080913 10.3087445,15.0188915 11.223018,16.0899229 L11.223018,16.0899229 C10.426841,18.1910249 9.96797687,20.5297906 9.99206994,23.1241613 L5.43414987,14.7605739 C5.30203551,14.5181498 4.99858593,14.4288208 4.75637627,14.5610522 C4.51416661,14.6932836 4.42491674,14.9970019 4.5570311,15.2394261 L10.1435881,25.4905179 Z M13.0333542,29.4136738 C10.9912074,19.9059085 11.088992,14.922477 21.5133004,6.73565972 C23.6127007,5.0868782 25.9746706,4.01306759 28.2881453,3.03596757 C29.0967374,2.69445726 29.3182746,2.61774651 29.3182746,2.61774651 C29.3182746,2.61774651 29.3543667,2.80737221 29.3721623,2.90442957 C30.1524904,7.1603367 30.190151,11.6811187 29.0141452,15.8525373 C27.1508473,22.4618551 22.5118613,27.1961122 14.1841552,29.413553 L25.4116309,9.74806947 C25.5485147,9.50831075 25.46529,9.20288341 25.2257434,9.06587843 C24.9861969,8.92887344 24.6810398,9.01217181 24.544156,9.25193053 L13.0333542,29.4136738 Z M13.4880693,32 C38.9655056,25.5 30.755735,0 30.755735,0 C30.755735,0 17.0308715,3.72274828 11.9893965,14.5 C7.99293593,9 0.873098889,8 0.873098889,8 C-3.99644586,30.5 13.4880693,32 13.4880693,32 Z",1,"leaves"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label",3,"ngClass"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4),n(6,"g",5),m(7,"path",6),s(),m(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19),s()(),I(),n(21,"div",20),p(22),s(),n(23,"div",21),p(24),s()()()),r&2&&(u("ngClass",it(9,dp,i.airQuality===5,i.airQuality===5,he(7,cp).includes(i.airQuality),he(8,pp).includes(i.airQuality))),a(2),y("aria-label",c(3,5,"accessories.core.air_quality_sensor")),a(20),v(i.service.customName||i.service.displayName),a(),u("ngClass",V(14,mp,i.airQuality<5,i.airQuality===5)),a(),x(" ",i.labels[i.airQuality||0]," "))},dependencies:[E,M],styles:[".fill-red svg .leaves{fill:#d32f2f!important;fill-opacity:.5!important} .fill-orange svg .leaves{fill:#ff9800!important;fill-opacity:.5!important} .fill-green svg .leaves{fill:#4caf50!important;fill-opacity:.5!important}"]})}return e})();var xo=(e,o)=>({"fa-check-circle":e,"fa-blank":o}),yo=(()=>{class e{$activeModal=w(X);$colour=w($e);service;$accessories;targetMode;targetBrightness;targetBrightnessChanged=new Q;targetColorTemperature;targetColorTemperatureChanged=new Q;sliderIndex=0;stateSubscription;constructor(){this.targetBrightnessChanged.pipe(Y(300)).subscribe(()=>{if(this.targetBrightness.value===be.Min){let t=this.service.getCluster?.("onOff");t&&t.setAttributes({onOff:!1}).catch(r=>{console.error("Failed to turn Matter light off:",r)})}else{let t=this.service.getCluster?.("levelControl");t&&t.setAttributes({currentLevel:this.targetBrightness.value}).catch(r=>{console.error("Failed to set Matter light brightness:",r)})}this.targetMode=this.targetBrightness.value>0}),this.targetColorTemperatureChanged.pipe(Y(300)).subscribe(t=>{let r=this.service.getCluster?.("colorControl");r&&r.setAttributes({colorTemperatureMireds:t}).catch(i=>{console.error("Failed to set Matter light color temperature:",i)})})}ngOnInit(){this.targetMode=Le(this.service),this.loadTargetBrightness(),this.loadTargetColorTemperature(),this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetMode=Le(this.service),this.targetBrightness.value=He(this.service);let t=lt(this.service);this.targetColorTemperature.mired=t,this.targetColorTemperature.value=this.$colour.miredToKelvin(t)})}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setTargetMode(t,r){if(this.targetMode=t,t){let d=this.targetBrightness.value||this.targetBrightness.max;this.targetBrightness.value=d;let h=this.service.getCluster?.("levelControl");h&&h.setAttributes({currentLevel:d}).catch(Z=>{console.error("Failed to turn Matter light on:",Z)})}else{let d=this.service.getCluster?.("onOff");d&&d.setAttributes({onOff:!1}).catch(h=>{console.error("Failed to turn Matter light off:",h)})}r.target.blur()}onBrightnessStateChange(){this.targetBrightnessChanged.next(this.targetBrightness.value)}onColorTemperatureStateChange(){let t=this.$colour.kelvinToMired(this.targetColorTemperature.value);this.targetColorTemperature.mired=t,this.targetColorTemperatureChanged.next(t)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadTargetBrightness(){let t=He(this.service);this.targetBrightness={value:t,min:be.Min,max:be.Max,step:1},setTimeout(()=>{let r=document.querySelectorAll(".noUi-target")[this.sliderIndex];r&&(r.style.background="linear-gradient(to right, #242424, #ffd6aa)",this.sliderIndex+=1)},10)}loadTargetColorTemperature(){let t=lt(this.service);this.targetColorTemperature={value:this.$colour.miredToKelvin(t),mired:t,min:this.$colour.miredToKelvin(ot.MaxMired),max:this.$colour.miredToKelvin(ot.MinMired),step:10},setTimeout(()=>{let r=document.querySelectorAll(".noUi-target")[this.sliderIndex];if(r){let i=this.$colour.kelvinToHsl(this.targetColorTemperature.min),d=this.$colour.kelvinToHsl(this.targetColorTemperature.max);r.style.background=`linear-gradient(to right, ${i}, ${d})`}},10)}get brightnessPercentage(){return at(this.targetBrightness.value)}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:32,vars:39,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"mt-4"],[3,"ngModelChange","min","max","step","ngModel"],[1,"modal-footer"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"div",5),l(7,"translate"),n(8,"button",6),C("click",function(h){return i.setTargetMode(!1,h)}),n(9,"div",7),m(10,"i",8),s(),p(11),l(12,"translate"),n(13,"div",9),m(14,"i",10),s()(),n(15,"button",6),C("click",function(h){return i.setTargetMode(!0,h)}),n(16,"div",7),m(17,"i",8),s(),p(18),l(19,"translate"),n(20,"div",9),m(21,"i",10),s()()(),n(22,"h6",11),p(23),l(24,"translate"),s(),n(25,"nouislider",12),G("ngModelChange",function(h){return U(i.targetBrightness.value,h)||(i.targetBrightness.value=h),h}),C("ngModelChange",function(){return i.onBrightnessStateChange()}),s(),n(26,"h6",11),p(27),l(28,"translate"),l(29,"convertMired"),s(),n(30,"nouislider",12),G("ngModelChange",function(h){return U(i.targetColorTemperature.value,h)||(i.targetColorTemperature.value=h),h}),C("ngModelChange",function(){return i.onColorTemperatureStateChange()}),s()(),m(31,"div",13),s()),r&2&&(a(2),u("innerText",i.service.customName||i.service.serviceName||i.service.displayName),a(),y("aria-label",c(4,19,"form.button_close")),a(3),y("aria-label",c(7,21,"accessories.control.mode_control")),a(4),u("ngClass",V(33,xo,!i.targetMode,i.targetMode)),a(),x(" ",c(12,23,"accessories.control.off")," "),a(6),u("ngClass",V(36,xo,i.targetMode,!i.targetMode)),a(),x(" ",c(19,25,"accessories.control.on")," "),a(5),O("",c(24,27,"accessories.control.brightness"),": ",i.brightnessPercentage,"%"),a(2),u("min",i.targetBrightness.min)("max",i.targetBrightness.max)("step",i.targetBrightness.step),j("ngModel",i.targetBrightness.value),a(2),O(" ",c(28,29,"accessories.control.color_temperature"),": ",c(29,31,i.targetColorTemperature.mired)," "),a(3),u("min",i.targetColorTemperature.min)("max",i.targetColorTemperature.max)("step",i.targetColorTemperature.step),j("ngModel",i.targetColorTemperature.value))},dependencies:[ee,ie,ne,oe,E,M,nt],encapsulation:2})}return e})();var up=e=>({"accessory-on":e}),_o=(()=>{class e{$accessories=w(K);$modal=w(J);$colour=w($e);service;readyForControl=!1;onClick(){this.readyForControl&&st(this.service)}onLongClick(){if(!this.readyForControl)return;let t=this.$modal.open(yo,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}get isOn(){return Ie(this.service)}get brightness(){return rt(this.service)}kelvinToHex(t){t=Math.max(1e3,Math.min(4e4,t));let r=t/100,i,d,h;return r<=66?(i=255,d=r,d=99.4708025861*Math.log(d)-161.1195681661,h=r<=19?0:138.5177312231*Math.log(r-10)-305.0447927307):(i=329.698727446*(r-60)**-.1332047592,d=288.1221695283*(r-60)**-.0755148492,h=255),i=Math.round(Math.min(Math.max(i,0),255)),d=Math.round(Math.min(Math.max(d,0),255)),h=Math.round(Math.min(Math.max(h,0),255)),`#${i.toString(16).padStart(2,"0")}${d.toString(16).padStart(2,"0")}${h.toString(16).padStart(2,"0")}`}Math=Math;static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-color-temperature-light"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:14,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["stroke","#7f7f7f","stroke-width","1.5","d","M8 21c-2.8-2.2-4.5-5.4-4.5-9 0-6.1 5-11 11.5-11S27.5 5.9 27.5 12c0 3.5-1.7 6.7-4.5 8.9-1.2 1-1.8 4.8-3 7.3-.9 2-2.2 2.7-4.5 2.7s-3.6-.7-4.5-2.7c-1.2-2.5-1.8-6.3-3-7.3z"],["stroke","#7f7f7f","stroke-width","1.5","x1","8","y1","21.5","x2","23","y2","21.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","23","x2","21","y2","24"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","25.5","x2","21","y2","26.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","11","y1","28","x2","20","y2","29"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerHTML"]],template:function(r,i){r&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"path",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"line",8),s()(),I(),n(10,"div",9),p(11),s(),m(12,"div",10),l(13,"translate"),s()()),r&2&&(u("ngClass",N(10,up,i.isOn)),a(2),y("aria-label",c(3,6,"accessories.core.lightbulb")),a(3),y("fill",i.isOn?i.kelvinToHex(i.$colour.miredToKelvin((i.service.clusters==null||i.service.clusters.colorControl==null?null:i.service.clusters.colorControl.colorTemperatureMireds)||250)):"none")("fill-opacity",.25+i.brightness/100*.5),a(6),v(i.service.customName||i.service.serviceName||i.service.displayName),a(),u("innerHTML",i.isOn?i.brightness+"%":c(13,8,"accessories.control.off"),Oe))},dependencies:[q,E,M],encapsulation:2})}return e})();var fp=e=>({"accessory-on":e});function vp(e,o){e&1&&(n(0,"div",9),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.open")))}function gp(e,o){e&1&&(n(0,"div",10),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.closed")))}var ko=(()=>{class e{service;get isOpen(){return co(this.service)}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-matter-contact-sensor"]],inputs:{service:"service"},decls:13,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","15","height","30","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.5",1,"left-object"],["x","16","y","1","width","15","height","30","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.5",1,"right-object"],["x","10","y","11","width","6","height","10","rx","1","stroke","#7f7f7f","fill","#4caf50","fill-opacity","0.5","stroke-width","0.5",1,"left-sensor"],["x","16","y","11","width","6","height","10","rx","1","stroke","#7f7f7f","fill","#4caf50","fill-opacity","0.5","stroke-width","0.5",1,"right-sensor"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7),s()(),I(),n(9,"div",8),p(10),s(),_(11,vp,3,3,"div",9)(12,gp,3,3,"div",10),s()()),r&2&&(u("ngClass",N(6,fp,i.isOpen)),a(2),y("aria-label",c(3,4,"accessories.core.contact_sensor")),a(8),v(i.service.customName||i.service.serviceName),a(),k(i.isOpen?11:12))},dependencies:[E,M],styles:[".accessory-on svg .left-sensor{fill:#ff9800;fill-opacity:.5} .accessory-on svg .right-object{x:24px} .accessory-on svg .right-sensor{x:24px;fill:#ff9800;fill-opacity:.5}"]})}return e})();var So=(e,o)=>({"fa-check-circle":e,"fa-blank":o}),bo=(()=>{class e{$activeModal=w(X);service;$accessories;targetMode;targetBrightness;targetBrightnessChanged=new Q;stateSubscription;constructor(){this.targetBrightnessChanged.pipe(Y(300)).subscribe(()=>{if(this.targetBrightness.value===be.Min){let t=this.service.getCluster?.("onOff");t&&t.setAttributes({onOff:!1}).catch(r=>{console.error("Failed to turn Matter light off:",r)})}else{let t=this.service.getCluster?.("levelControl");t&&t.setAttributes({currentLevel:this.targetBrightness.value}).catch(r=>{console.error("Failed to set Matter light brightness:",r)})}this.targetMode=this.targetBrightness.value>0})}ngOnInit(){this.targetMode=Le(this.service),this.loadTargetBrightness(),this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.targetMode=Le(this.service),this.targetBrightness.value=He(this.service)})}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setTargetMode(t,r){if(this.targetMode=t,t){let d=this.targetBrightness.value||this.targetBrightness.max;this.targetBrightness.value=d;let h=this.service.getCluster?.("levelControl");h&&h.setAttributes({currentLevel:d}).catch(Z=>{console.error("Failed to turn Matter light on:",Z)})}else{let d=this.service.getCluster?.("onOff");d&&d.setAttributes({onOff:!1}).catch(h=>{console.error("Failed to turn Matter light off:",h)})}r.target.blur()}onBrightnessStateChange(){this.targetBrightnessChanged.next(this.targetBrightness.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadTargetBrightness(){let t=He(this.service);this.targetBrightness={value:t,min:be.Min,max:be.Max,step:1},setTimeout(()=>{let r=document.querySelector(".noUi-target");r&&(r.style.background="linear-gradient(to right, #242424, #ffd6aa)")},10)}get brightnessPercentage(){return at(this.targetBrightness.value)}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:27,vars:29,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"mt-4"],[3,"ngModelChange","min","max","step","ngModel"],[1,"modal-footer"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"div",5),l(7,"translate"),n(8,"button",6),C("click",function(h){return i.setTargetMode(!1,h)}),n(9,"div",7),m(10,"i",8),s(),p(11),l(12,"translate"),n(13,"div",9),m(14,"i",10),s()(),n(15,"button",6),C("click",function(h){return i.setTargetMode(!0,h)}),n(16,"div",7),m(17,"i",8),s(),p(18),l(19,"translate"),n(20,"div",9),m(21,"i",10),s()()(),n(22,"h6",11),p(23),l(24,"translate"),s(),n(25,"nouislider",12),G("ngModelChange",function(h){return U(i.targetBrightness.value,h)||(i.targetBrightness.value=h),h}),C("ngModelChange",function(){return i.onBrightnessStateChange()}),s()(),m(26,"div",13),s()),r&2&&(a(2),u("innerText",i.service.customName||i.service.serviceName||i.service.displayName),a(),y("aria-label",c(4,13,"form.button_close")),a(3),y("aria-label",c(7,15,"accessories.control.mode_control")),a(4),u("ngClass",V(23,So,!i.targetMode,i.targetMode)),a(),x(" ",c(12,17,"accessories.control.off")," "),a(6),u("ngClass",V(26,So,i.targetMode,!i.targetMode)),a(),x(" ",c(19,19,"accessories.control.on")," "),a(5),O("",c(24,21,"accessories.control.brightness"),": ",i.brightnessPercentage,"%"),a(2),u("min",i.targetBrightness.min)("max",i.targetBrightness.max)("step",i.targetBrightness.step),j("ngModel",i.targetBrightness.value))},dependencies:[ee,ie,ne,oe,E,M],encapsulation:2})}return e})();var hp=e=>({"accessory-on":e}),To=(()=>{class e{$accessories=w(K);$modal=w(J);service;readyForControl=!1;onClick(){this.readyForControl&&st(this.service)}onLongClick(){if(!this.readyForControl)return;let t=this.$modal.open(bo,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}get isOn(){return Ie(this.service)}get brightness(){return rt(this.service)}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-dimmable-light"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:14,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["stroke","#7f7f7f","stroke-width","1.5","d","M8 21c-2.8-2.2-4.5-5.4-4.5-9 0-6.1 5-11 11.5-11S27.5 5.9 27.5 12c0 3.5-1.7 6.7-4.5 8.9-1.2 1-1.8 4.8-3 7.3-.9 2-2.2 2.7-4.5 2.7s-3.6-.7-4.5-2.7c-1.2-2.5-1.8-6.3-3-7.3z"],["stroke","#7f7f7f","stroke-width","1.5","x1","8","y1","21.5","x2","23","y2","21.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","23","x2","21","y2","24"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","25.5","x2","21","y2","26.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","11","y1","28","x2","20","y2","29"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerHTML"]],template:function(r,i){r&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"path",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"line",8),s()(),I(),n(10,"div",9),p(11),s(),m(12,"div",10),l(13,"translate"),s()()),r&2&&(u("ngClass",N(10,hp,i.isOn)),a(2),y("aria-label",c(3,6,"accessories.core.lightbulb")),a(3),y("fill",i.isOn?"#ffcf55":"none")("fill-opacity",.25+i.brightness/100*.5),a(6),v(i.service.customName||i.service.serviceName||i.service.displayName),a(),u("innerHTML",i.isOn?i.brightness+"%":c(13,8,"accessories.control.off"),Oe))},dependencies:[q,E,M],encapsulation:2})}return e})();var Mo=(e,o)=>({"fa-check-circle":e,"fa-blank":o});function Cp(e,o){if(e&1){let t=R();n(0,"h6",11),p(1),l(2,"translate"),l(3,"convertMired"),s(),n(4,"nouislider",12),G("ngModelChange",function(i){D(t);let d=f();return U(d.targetColorTemperature.value,i)||(d.targetColorTemperature.value=i),A(i)}),C("ngModelChange",function(){D(t);let i=f();return A(i.onColorTemperatureStateChange())}),s()}if(e&2){let t=f();a(),O(" ",c(2,6,"accessories.control.color_temperature"),": ",c(3,8,t.targetColorTemperature.mired)," "),a(3),u("min",t.targetColorTemperature.min)("max",t.targetColorTemperature.max)("step",t.targetColorTemperature.step),j("ngModel",t.targetColorTemperature.value)}}var wo=(()=>{class e{$activeModal=w(X);$colour=w($e);service;$accessories;targetMode;targetBrightness;targetBrightnessChanged=new Q;targetColorTemperature;targetColorTemperatureChanged=new Q;targetHue;targetHueChanged=new Q;targetSaturation;targetSaturationChanged=new Q;sliderIndex=0;stateSubscription;constructor(){this.targetBrightnessChanged.pipe(Y(300)).subscribe(()=>{if(this.targetBrightness.value===be.Min){let t=this.service.getCluster?.("onOff");t&&t.setAttributes({onOff:!1}).catch(r=>{console.error("Failed to turn Matter light off:",r)})}else{let t=this.service.getCluster?.("levelControl");t&&t.setAttributes({currentLevel:this.targetBrightness.value}).catch(r=>{console.error("Failed to set Matter light brightness:",r)})}this.targetMode=this.targetBrightness.value>0}),this.targetColorTemperatureChanged.pipe(Y(300)).subscribe(t=>{let r=this.service.getCluster?.("colorControl");r&&r.setAttributes({colorTemperatureMireds:t}).catch(i=>{console.error("Failed to set Matter light color temperature:",i)})}),this.targetHueChanged.pipe(Y(300)).subscribe(()=>{let t=this.service.getCluster?.("colorControl");t&&t.setAttributes({currentHue:this.targetHue.value,currentSaturation:this.targetSaturation.value}).catch(r=>{console.error("Failed to set Matter light hue:",r)})}),this.targetSaturationChanged.pipe(Y(300)).subscribe(()=>{let t=this.service.getCluster?.("colorControl");t&&t.setAttributes({currentHue:this.targetHue.value,currentSaturation:this.targetSaturation.value}).catch(r=>{console.error("Failed to set Matter light saturation:",r)})})}ngOnInit(){this.targetMode=Le(this.service),this.loadTargetBrightness(),this.supportsColorTemperature&&this.loadTargetColorTemperature(),this.loadTargetHueSaturation(),this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{if(this.targetMode=Le(this.service),this.targetBrightness.value=He(this.service),this.supportsColorTemperature){let r=lt(this.service);this.targetColorTemperature.mired=r,this.targetColorTemperature.value=this.$colour.miredToKelvin(r)}let t=gt(this.service);this.targetHue.value!==t&&(this.targetHue.value=t,this.updateSaturationSliderGradient()),this.targetSaturation.value=ht(this.service)})}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setTargetMode(t,r){if(this.targetMode=t,t){let d=this.targetBrightness.value||this.targetBrightness.max;this.targetBrightness.value=d;let h=this.service.getCluster?.("levelControl");h&&h.setAttributes({currentLevel:d}).catch(Z=>{console.error("Failed to turn Matter light on:",Z)})}else{let d=this.service.getCluster?.("onOff");d&&d.setAttributes({onOff:!1}).catch(h=>{console.error("Failed to turn Matter light off:",h)})}r.target.blur()}onBrightnessStateChange(){this.targetBrightnessChanged.next(this.targetBrightness.value)}onColorTemperatureStateChange(){let t=this.$colour.kelvinToMired(this.targetColorTemperature.value);this.targetColorTemperature.mired=t,this.targetColorTemperatureChanged.next(t)}onHueStateChange(){this.targetHueChanged.next(this.targetHue.value),this.updateSaturationSliderGradient()}onSaturationStateChange(){this.targetSaturationChanged.next(this.targetSaturation.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadTargetBrightness(){let t=He(this.service);this.targetBrightness={value:t,min:be.Min,max:be.Max,step:1},setTimeout(()=>{let r=document.querySelectorAll(".noUi-target")[this.sliderIndex];r&&(r.style.background="linear-gradient(to right, #242424, #ffd6aa)",this.sliderIndex+=1)},10)}loadTargetColorTemperature(){let t=lt(this.service);this.targetColorTemperature={value:this.$colour.miredToKelvin(t),mired:t,min:this.$colour.miredToKelvin(ot.MaxMired),max:this.$colour.miredToKelvin(ot.MinMired),step:10},setTimeout(()=>{let r=document.querySelectorAll(".noUi-target")[this.sliderIndex];if(r){let i=this.$colour.kelvinToHsl(this.targetColorTemperature.min),d=this.$colour.kelvinToHsl(this.targetColorTemperature.max);r.style.background=`linear-gradient(to right, ${i}, ${d})`,this.sliderIndex+=1}},10)}loadTargetHueSaturation(){let t=gt(this.service),r=ht(this.service);this.targetHue={value:t,min:0,max:254,step:1},this.targetSaturation={value:r,min:0,max:254,step:1},setTimeout(()=>{let i=document.querySelectorAll(".noUi-target")[this.sliderIndex];i&&(i.style.background="linear-gradient(to right, hsl(0, 100%, 50%), hsl(60, 100%, 50%), hsl(120, 100%, 50%), hsl(180, 100%, 50%), hsl(240, 100%, 50%), hsl(300, 100%, 50%), hsl(360, 100%, 50%))",this.sliderIndex+=1)},10),setTimeout(()=>{let i=document.querySelectorAll(".noUi-target")[this.sliderIndex];if(i){let d=t/254*360;i.style.background=`linear-gradient(to right, hsl(${d}, 0%, 50%), hsl(${d}, 100%, 50%))`,this.sliderIndex+=1}},10)}get brightnessPercentage(){return at(this.targetBrightness.value)}get huePercentage(){return Math.round(this.targetHue.value/254*100)}get saturationPercentage(){return Math.round(this.targetSaturation.value/254*100)}get previewColor(){let t=this.targetHue.value/254*360,r=this.targetSaturation.value/254*100;return`hsl(${t}, ${r}%, 50%)`}get supportsColorTemperature(){return lo(this.service)}updateSaturationSliderGradient(){let t=this.supportsColorTemperature?3:2,r=document.querySelectorAll(".noUi-target")[t];if(r){let i=this.targetHue.value/254*360;r.style.background=`linear-gradient(to right, hsl(${i}, 0%, 50%), hsl(${i}, 100%, 50%))`}}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:36,vars:46,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"mt-4"],[3,"ngModelChange","min","max","step","ngModel"],[1,"mt-3"],[1,"modal-footer"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"div",5),l(7,"translate"),n(8,"button",6),C("click",function(h){return i.setTargetMode(!1,h)}),n(9,"div",7),m(10,"i",8),s(),p(11),l(12,"translate"),n(13,"div",9),m(14,"i",10),s()(),n(15,"button",6),C("click",function(h){return i.setTargetMode(!0,h)}),n(16,"div",7),m(17,"i",8),s(),p(18),l(19,"translate"),n(20,"div",9),m(21,"i",10),s()()(),n(22,"h6",11),p(23),l(24,"translate"),s(),n(25,"nouislider",12),G("ngModelChange",function(h){return U(i.targetBrightness.value,h)||(i.targetBrightness.value=h),h}),C("ngModelChange",function(){return i.onBrightnessStateChange()}),s(),_(26,Cp,5,10),n(27,"h6",13),p(28),l(29,"translate"),s(),n(30,"nouislider",12),G("ngModelChange",function(h){return U(i.targetHue.value,h)||(i.targetHue.value=h),h}),C("ngModelChange",function(){return i.onHueStateChange()}),s(),n(31,"h6",13),p(32),l(33,"translate"),s(),n(34,"nouislider",12),G("ngModelChange",function(h){return U(i.targetSaturation.value,h)||(i.targetSaturation.value=h),h}),C("ngModelChange",function(){return i.onSaturationStateChange()}),s()(),m(35,"div",14),s()),r&2&&(a(2),u("innerText",i.service.customName||i.service.serviceName||i.service.displayName),a(),y("aria-label",c(4,26,"form.button_close")),a(3),y("aria-label",c(7,28,"accessories.control.mode_control")),a(4),u("ngClass",V(40,Mo,!i.targetMode,i.targetMode)),a(),x(" ",c(12,30,"accessories.control.off")," "),a(6),u("ngClass",V(43,Mo,i.targetMode,!i.targetMode)),a(),x(" ",c(19,32,"accessories.control.on")," "),a(5),O("",c(24,34,"accessories.control.brightness"),": ",i.brightnessPercentage,"%"),a(2),u("min",i.targetBrightness.min)("max",i.targetBrightness.max)("step",i.targetBrightness.step),j("ngModel",i.targetBrightness.value),a(),k(i.supportsColorTemperature?26:-1),a(2),O("",c(29,36,"accessories.control.hue"),": ",i.huePercentage,"%"),a(2),u("min",i.targetHue.min)("max",i.targetHue.max)("step",i.targetHue.step),j("ngModel",i.targetHue.value),a(2),O("",c(33,38,"accessories.control.saturation"),": ",i.saturationPercentage,"%"),a(2),u("min",i.targetSaturation.min)("max",i.targetSaturation.max)("step",i.targetSaturation.step),j("ngModel",i.targetSaturation.value))},dependencies:[ee,ie,ne,oe,E,M,nt],encapsulation:2})}return e})();var xp=e=>({"accessory-on":e}),Eo=(()=>{class e{$accessories=w(K);$modal=w(J);service;readyForControl=!1;onClick(){this.readyForControl&&st(this.service)}onLongClick(){if(!this.readyForControl)return;let t=this.$modal.open(wo,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}get isOn(){return Ie(this.service)}get brightness(){return rt(this.service)}get lightColor(){let t=gt(this.service),r=ht(this.service),i=t/254*360,d=r/254*100;return`hsl(${i}, ${d}%, 50%)`}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-extended-color-light"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:14,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["stroke","#7f7f7f","stroke-width","1.5","d","M8 21c-2.8-2.2-4.5-5.4-4.5-9 0-6.1 5-11 11.5-11S27.5 5.9 27.5 12c0 3.5-1.7 6.7-4.5 8.9-1.2 1-1.8 4.8-3 7.3-.9 2-2.2 2.7-4.5 2.7s-3.6-.7-4.5-2.7c-1.2-2.5-1.8-6.3-3-7.3z"],["stroke","#7f7f7f","stroke-width","1.5","x1","8","y1","21.5","x2","23","y2","21.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","23","x2","21","y2","24"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","25.5","x2","21","y2","26.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","11","y1","28","x2","20","y2","29"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerHTML"]],template:function(r,i){r&1&&(n(0,"div",0),C("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"path",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"line",8),s()(),I(),n(10,"div",9),p(11),s(),m(12,"div",10),l(13,"translate"),s()()),r&2&&(u("ngClass",N(10,xp,i.isOn)),a(2),y("aria-label",c(3,6,"accessories.core.lightbulb")),a(3),y("fill",i.isOn?i.lightColor:"none")("fill-opacity",.25+i.brightness/100*.5),a(6),v(i.service.customName||i.service.serviceName||i.service.displayName),a(),u("innerHTML",i.isOn?i.brightness+"%":c(13,8,"accessories.control.off"),Oe))},dependencies:[q,E,M],encapsulation:2})}return e})();function yp(e,o){if(e&1&&p(0),e&2){let t=f();x(" ",t.humidity,"% ")}}function _p(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.no_data")," ")}var Bo=(()=>{class e{service;get humidity(){return fo(this.service)}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-matter-humidity-sensor"]],inputs:{service:"service"},decls:26,vars:5,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["transform","translate(1.8, -4.3), scale(0.85)"],["d","M23.61 24.58C23.61 28.67 20.44 31.99 16.56 31.99C12.68 31.99 9.52 28.67 9.52 24.58C9.52 20.49 12.68 17.13 16.56 10.87C20.44 17.13 23.61 20.49 23.61 24.58Z","fill","#1976d2","fill-opacity","0.4","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(r,i){r&1&&(te(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),te(4,"svg",3),ye(5,"rect",4),te(6,"g",5),ye(7,"path",6),ae(),ye(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19),ae()(),I(),te(21,"div",20),p(22),ae(),te(23,"div",21),_(24,yp,1,1)(25,_p,2,3),ae()()()),r&2&&(a(2),y("aria-label",c(3,3,"accessories.core.humidity_sensor")),a(20),v(i.service.customName||i.service.serviceName),a(2),k(i.humidity!==null?24:25))},dependencies:[M],encapsulation:2})}return e})();function kp(e,o){if(e&1&&(te(0,"div",28),p(1),l(2,"number"),ae()),e&2){let t=f();a(),x("",le(2,1,t.illuminance,"0.1-1")," lux")}}function Sp(e,o){if(e&1&&(te(0,"div",28),p(1),l(2,"number"),ae()),e&2){let t=f();a(),x("",le(2,1,t.illuminance,"1.0-0")," lux")}}var Vo=(()=>{class e{service;get illuminance(){return mo(this.service)}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-matter-light-sensor"]],inputs:{service:"service"},decls:32,vars:5,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["cx","16","cy","13.75","r","5","stroke","#ff9800","fill","none","stroke-width","1.2","stroke-opacity","0.5"],["x1","16","y1","3","x2","16","y2","7","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","23.5","y1","6","x2","20.5","y2","9","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","22.75","y1","13.5","x2","26.75","y2","13.5","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","20.75","y1","18.25","x2","23.75","y2","21.25","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","16","y1","20.5","x2","16","y2","24.5","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","11.25","y1","18.25","x2","8.25","y2","21.25","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","5.25","y1","13.5","x2","9.25","y2","13.5","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","8.5","y1","6","x2","11.5","y2","9","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(r,i){r&1&&(te(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),te(4,"svg",3),ye(5,"rect",4)(6,"circle",5)(7,"line",6)(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20)(22,"line",21)(23,"line",22)(24,"line",23)(25,"line",24)(26,"line",25)(27,"line",26),ae()(),I(),te(28,"div",27),p(29),ae(),_(30,kp,3,4,"div",28)(31,Sp,3,4,"div",28),ae()()),r&2&&(a(2),y("aria-label",c(3,3,"accessories.core.light_sensor")),a(27),v(i.service.customName||i.service.serviceName),a(),k(i.illuminance<1?30:31))},dependencies:[we,M],encapsulation:2})}return e})();var bp=e=>({"accessory-on":e});function Tp(e,o){e&1&&(n(0,"div",22),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.detected")))}function Mp(e,o){e&1&&(n(0,"div",23),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.not_detected")))}var Do=(()=>{class e{service;get isOccupied(){return po(this.service)}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-matter-occupancy-sensor"]],inputs:{service:"service"},decls:26,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2",1,"orange-outline"],["transform","translate(4.75, -0.75), scale(0.075)"],["d","M190.85 83.94C190.85 70.36 180.09 59.24 166.93 59.24C153.78 59.24 143.02 70.36 143.02 83.94C143.02 97.53 153.78 108.65 166.93 108.65C180.09 108.65 190.85 97.53 190.85 83.94Z","fill","#ff9800","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","7"],["d","M232.24 175.95C210.12 175.95 190.98 163.6 180.22 145.69C179.08 143.72 169.99 127.91 168.86 125.93C164.67 118.52 156.9 114.2 148.53 114.2C145.54 114.2 142.55 114.81 139.56 116.05C135.37 117.82 114.45 126.67 76.78 142.6L76.78 200.66L100.69 200.66L100.69 159.28L121.62 150.02L88.73 324.17L113.85 324.17L134.78 225.36L160.49 250.06L160.49 324.17L184.4 324.17L184.4 230.92L159.89 205.6C164.19 183.36 166.59 171.01 167.06 168.54C182.61 188.3 205.93 200.66 232.24 200.66C232.24 195.72 232.24 178.42 232.24 175.95Z","fill","#ff9800","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","7"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4),n(6,"g",5),m(7,"path",6)(8,"path",7),s(),m(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20),s()(),I(),n(22,"div",21),p(23),s(),_(24,Tp,3,3,"div",22)(25,Mp,3,3,"div",23),s()()),r&2&&(u("ngClass",N(6,bp,i.isOccupied)),a(2),y("aria-label",c(3,4,"accessories.core.occupancy_sensor")),a(21),v(i.service.customName||i.service.serviceName),a(),k(i.isOccupied?24:25))},dependencies:[E,M],styles:[".accessory-on svg .orange-outline{stroke:#ff9800;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{stroke-opacity:.8}50%{stroke-opacity:.2}}"]})}return e})();var wp=e=>({"accessory-on":e}),Ao=(()=>{class e{service;readyForControl=!1;onClick(){this.readyForControl&&ze(this.service)}get isOn(){return Ie(this.service)}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-on-off-light-switch"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:12,vars:10,consts:[["tabindex","0",1,"accessory-box",3,"click","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["cx","16","cy","16","r","14","fill","none","stroke","#7f7f7f","stroke-width","2"],["x1","16","y1","8","x2","16","y2","14","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["fill","#7f7f7f","d",`M21.4589329,9.49999998
|
|
41
|
+
C21,9.97698687 21.1735519,10.8351 21.4589326,11.2029426
|
|
42
|
+
C22.4505994,12.4811551 23,14.065977 23,15.7447101
|
|
43
|
+
C23,19.7640218 19.8532802,23 16,23
|
|
44
|
+
C12.1467198,23 9,19.7640218 9,15.7447101
|
|
45
|
+
C9,14.0415493 9.56560927,12.4352187 10.5838497,11.1483389
|
|
46
|
+
C10.8725653,10.7834523 11,9.9670534 10.5,9.49999999
|
|
47
|
+
C10,9.03294657 9.01543812,9.9073372 9.01543812,9.9073372
|
|
48
|
+
C7.75536735,11.4998488 7,13.5315645 7,15.7447101
|
|
49
|
+
C7,20.8562656 11.0294373,25 16,25
|
|
50
|
+
C20.9705627,25 25,20.8562656 25,15.7447101
|
|
51
|
+
C25,13.5637007 24.2664101,11.5588905 23.0391328,9.97698685
|
|
52
|
+
C23.0391328,9.97698685 21.9178658,9.0230131 21.4589329,9.49999998 Z`],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(r,i){r&1&&(n(0,"div",0),C("click",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"circle",4)(6,"line",5)(7,"path",6),s()(),I(),n(8,"div",7),p(9),s(),m(10,"div",8),l(11,"translate"),s()()),r&2&&(u("ngClass",N(8,wp,i.isOn)),a(2),y("aria-label",c(3,4,"accessories.core.switch")),a(7),v(i.service.customName||i.service.serviceName||i.service.displayName),a(),u("innerText",c(11,6,i.isOn?"accessories.control.on":"accessories.control.off")))},dependencies:[E,M],encapsulation:2})}return e})();var Ep=e=>({"accessory-on":e}),Io=(()=>{class e{service;readyForControl=!1;onClick(){this.readyForControl&&ze(this.service)}get isOn(){return Ie(this.service)}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-on-off-light"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:14,vars:11,consts:[["tabindex","0",1,"accessory-box",3,"click","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["fill-opacity","0.75","stroke","#7f7f7f","stroke-width","1.5","d","M8 21c-2.8-2.2-4.5-5.4-4.5-9 0-6.1 5-11 11.5-11S27.5 5.9 27.5 12c0 3.5-1.7 6.7-4.5 8.9-1.2 1-1.8 4.8-3 7.3-.9 2-2.2 2.7-4.5 2.7s-3.6-.7-4.5-2.7c-1.2-2.5-1.8-6.3-3-7.3z"],["stroke","#7f7f7f","stroke-width","1.5","x1","8","y1","21.5","x2","23","y2","21.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","23","x2","21","y2","24"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","25.5","x2","21","y2","26.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","11","y1","28","x2","20","y2","29"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerHTML"]],template:function(r,i){r&1&&(n(0,"div",0),C("click",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"path",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"line",8),s()(),I(),n(10,"div",9),p(11),s(),m(12,"div",10),l(13,"translate"),s()()),r&2&&(u("ngClass",N(9,Ep,i.isOn)),a(2),y("aria-label",c(3,5,"accessories.core.lightbulb")),a(3),y("fill",i.isOn?"#ffcf55":"none"),a(6),v(i.service.customName||i.service.serviceName||i.service.displayName),a(),u("innerHTML",c(13,7,i.isOn?"accessories.control.on":"accessories.control.off"),Oe))},dependencies:[E,M],encapsulation:2})}return e})();var Bp=e=>({"accessory-on":e});function Vp(e,o){e&1&&(B(),m(0,"line",8)(1,"line",9)(2,"line",10))}function Dp(e,o){e&1&&(B(),m(0,"line",11)(1,"line",12)(2,"line",13))}function Ap(e,o){e&1&&(B(),m(0,"line",13)(1,"line",14)(2,"line",15))}var Lo=(()=>{class e{$settings=w(Ee);service;readyForControl=!1;browserLang=this.$settings.browserLang;onClick(){this.readyForControl&&ze(this.service)}get isOn(){return Ie(this.service)}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-on-off-plug-in-unit"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:14,vars:11,consts:[["tabindex","0",1,"accessory-box",3,"click","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32","height","32","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","30","height","30","rx","6","ry","6","fill","none","stroke","#7f7f7f","stroke-width","1.5",1,"outer"],["cx","16","cy","16","r","10","fill","none","stroke","#7f7f7f","stroke-width","1.5",1,"inner"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerText"],["x1","16","y1","10","x2","16","y2","13","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","10","y1","19","x2","13","y2","19","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","19","y1","19","x2","22","y2","19","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","11.5","y1","14.5","x2","13.5","y2","11.5","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","18.5","y1","11.5","x2","20.5","y2","14.5","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","16","y1","19","x2","16","y2","22","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","10","y1","14","x2","13","y2","14","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","19","y1","14","x2","22","y2","14","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"]],template:function(r,i){r&1&&(n(0,"div",0),C("click",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4)(6,"circle",5),_(7,Vp,3,0)(8,Dp,3,0)(9,Ap,3,0),s()(),I(),n(10,"div",6),p(11),s(),m(12,"div",7),l(13,"translate"),s()()),r&2&&(u("ngClass",N(9,Bp,i.isOn)),a(2),y("aria-label",c(3,5,"accessories.core.outlet")),a(5),k(i.browserLang==="en-GB"?7:i.browserLang==="en-AU"||i.browserLang==="en-NZ"?8:9),a(4),v(i.service.customName||i.service.serviceName||i.service.displayName),a(),u("innerText",c(13,7,i.isOn?"accessories.control.on":"accessories.control.off")))},dependencies:[E,M],styles:[".accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] .outer[_ngcontent-%COMP%]{stroke:#1976d2;stroke-opacity:.75;stroke-width:2.5}.accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%]{stroke:#1976d2;stroke-opacity:.75}"]})}return e})();var ai=(e,o)=>({"fa-check-circle":e,"fa-blank":o}),Po=(()=>{class e{$activeModal=w(X);service;$accessories;currentMode=0;stateSubscription;ngOnInit(){this.updateModeFromService(),this.stateSubscription=this.$accessories.accessoryData.subscribe(()=>{this.updateModeFromService()})}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}updateModeFromService(){let t=this.service.clusters?.rvcOperationalState?.operationalState??0;t===1?this.currentMode=1:t===2?this.currentMode=2:this.currentMode=0}setMode(t,r){if(t===2&&this.currentMode===0)return;if(this.currentMode=t,t===0){let d=this.service.getCluster?.("rvcRunMode");d&&d.setAttributes({currentMode:0}).catch(h=>{console.error("Failed to stop robotic vacuum:",h)})}else if(t===1){let d=this.service.getCluster?.("rvcRunMode");d&&d.setAttributes({currentMode:1}).catch(h=>{console.error("Failed to start robotic vacuum:",h)})}else if(t===2){let d=this.service.getCluster?.("rvcOperationalState");d&&d.setAttributes({operationalState:2}).catch(h=>{console.error("Failed to pause robotic vacuum:",h)})}r.target.blur()}dismissModal(){this.$activeModal.dismiss("Dismiss")}get isPauseDisabled(){return this.currentMode===0}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:30,vars:30,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1),m(2,"h5",2),n(3,"button",3),l(4,"translate"),C("click",function(){return i.dismissModal()}),s()(),n(5,"div",4)(6,"div",5),l(7,"translate"),n(8,"button",6),C("click",function(h){return i.setMode(0,h)}),n(9,"div",7),m(10,"i",8),s(),p(11),l(12,"translate"),n(13,"div",9),m(14,"i",10),s()(),n(15,"button",6),C("click",function(h){return i.setMode(2,h)}),n(16,"div",7),m(17,"i",8),s(),p(18),l(19,"translate"),n(20,"div",9),m(21,"i",10),s()(),n(22,"button",6),C("click",function(h){return i.setMode(1,h)}),n(23,"div",7),m(24,"i",8),s(),p(25),l(26,"translate"),n(27,"div",9),m(28,"i",10),s()()()(),m(29,"div",11),s()),r&2&&(a(2),u("innerText",i.service.customName||i.service.serviceName),a(),y("aria-label",c(4,11,"form.button_close")),a(3),y("aria-label",c(7,13,"accessories.control.mode_control")),a(4),u("ngClass",V(21,ai,i.currentMode===0,i.currentMode!==0)),a(),x(" ",c(12,15,"accessories.control.stopped")," "),a(4),bt("btn-pause-disabled",i.isPauseDisabled),a(2),u("ngClass",V(24,ai,i.currentMode===2,i.currentMode!==2)),a(),x(" ",c(19,17,"accessories.control.paused")," "),a(6),u("ngClass",V(27,ai,i.currentMode===1,i.currentMode!==1)),a(),x(" ",c(26,19,"accessories.control.cleaning")," "))},dependencies:[E,M],styles:[".btn-control.btn-pause-disabled[_ngcontent-%COMP%]{opacity:.5;cursor:not-allowed!important;pointer-events:auto!important}.btn-control.btn-pause-disabled[_ngcontent-%COMP%]:hover{cursor:not-allowed!important}"]})}return e})();var Ip=e=>({"accessory-on":e}),Fo=(()=>{class e{$accessories=w(K);$modal=w(J);service;readyForControl=!1;onClick(){if(!this.readyForControl){console.warn("Robotic vacuum: Not ready for control");return}ze(this.service)}onLongClick(){if(!this.readyForControl||!this.canShowModal)return;let t=this.$modal.open(Po,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}get isActive(){return Ie(this.service)}get statusText(){return so(this.service)}get canShowModal(){return!ao(this.service)}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-robotic-vacuum-cleaner"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:36,vars:10,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["id","motionClip"],["x","0","y","-0.5","width","32","height","8"],["transform","translate(0, 5)"],["cx","16","cy","10","rx","14","ry","8.4","stroke","#7f7f7f","stroke-width","1.75","fill","none"],["x1","2","y1","10","x2","2","y2","16","stroke","#7f7f7f","stroke-width","1.75"],["x1","30","y1","10","x2","30","y2","16","stroke","#7f7f7f","stroke-width","1.75"],["d","M2,16 A14,6.9 0 0,0 30,16","stroke","#7f7f7f","stroke-width","1.75","fill","none"],["cx","16","cy","10","rx","4.2","ry","2.5","stroke","#7f7f7f","stroke-width","1","fill","#1976d2","fill-opacity","0.5"],["cx","16","cy","15","r","0.9","fill","#7f7f7f"],["x1","2","y1","16","x2","0.5","y2","18.5","stroke","#7f7f7f","stroke-width","1"],["x1","2","y1","16","x2","0.5","y2","14","stroke","#7f7f7f","stroke-width","1"],["x1","30","y1","16","x2","31.5","y2","18.5","stroke","#7f7f7f","stroke-width","1"],["x1","30","y1","16","x2","31.5","y2","14","stroke","#7f7f7f","stroke-width","1"],["clip-path","url(#motionClip)","stroke","#7f7f7f","stroke-linecap","round",1,"motion-lines",2,"display","none"],["x1","12","y1","8","x2","12","y2","14","stroke-width","2.1","opacity","0"],["attributeName","y1","values","8;0","dur","3s","begin","0.3s","repeatCount","indefinite"],["attributeName","y2","values","14;6","dur","3s","begin","0.3s","repeatCount","indefinite"],["attributeName","opacity","values","0;1;1;0","keyTimes","0;0.2;0.8;1","dur","3s","begin","0.3s","repeatCount","indefinite"],["x1","16","y1","8","x2","16","y2","14","stroke-width","2.5","opacity","0"],["attributeName","y1","values","8;0","dur","3s","begin","0.6s","repeatCount","indefinite"],["attributeName","y2","values","14;6","dur","3s","begin","0.6s","repeatCount","indefinite"],["attributeName","opacity","values","0;1;1;0","keyTimes","0;0.2;0.8;1","dur","3s","begin","0.6s","repeatCount","indefinite"],["x1","20","y1","8","x2","20","y2","14","stroke-width","2.1","opacity","0"],["attributeName","y1","values","8;0","dur","3s","begin","0.9s","repeatCount","indefinite"],["attributeName","y2","values","14;6","dur","3s","begin","0.9s","repeatCount","indefinite"],["attributeName","opacity","values","0;1;1;0","keyTimes","0;0.2;0.8;1","dur","3s","begin","0.9s","repeatCount","indefinite"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(r,i){r&1&&(n(0,"div",0),C("longClick",function(){return i.canShowModal&&i.onLongClick()})("shortClick",function(){return i.onClick()}),n(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3)(5,"defs")(6,"clipPath",4),m(7,"rect",5),s()(),n(8,"g",6),m(9,"ellipse",7)(10,"line",8)(11,"line",9)(12,"path",10)(13,"ellipse",11)(14,"circle",12)(15,"line",13)(16,"line",14)(17,"line",15)(18,"line",16),s(),n(19,"g",17)(20,"line",18),m(21,"animate",19)(22,"animate",20)(23,"animate",21),s(),n(24,"line",22),m(25,"animate",23)(26,"animate",24)(27,"animate",25),s(),n(28,"line",26),m(29,"animate",27)(30,"animate",28)(31,"animate",29),s()()()(),I(),n(32,"div",30),p(33),s(),m(34,"div",31),l(35,"translate"),s()()),r&2&&(u("ngClass",N(8,Ip,i.isActive)),a(2),y("aria-label",c(3,4,"accessories.core.robotic_vacuum_cleaner")),a(31),v(i.service.customName||i.service.serviceName),a(),u("innerText",c(35,6,i.statusText)))},dependencies:[q,E,M],styles:[".accessory-box.accessory-on[_ngcontent-%COMP%] .motion-lines[_ngcontent-%COMP%]{display:block!important}"]})}return e})();var Lp=e=>({"accessory-on":e});function Pp(e,o){e&1&&(n(0,"div",17),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.detected")))}function Fp(e,o){e&1&&(n(0,"div",18),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.not_detected")))}var Ho=(()=>{class e{service;get isTriggered(){return vo(this.service)}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-matter-smoke-co-alarm"]],inputs:{service:"service"},decls:22,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","30","height","12","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.25"],["text-anchor","middle","dominant-baseline","middle","font-family","Arial","font-size","7.5","x","16","y","7.7","fill","#7f7f7f","stroke-width","0.6","font-weight","900",1,"type"],["x1","6","y1","14.5","x2","25.5","y2","14.5","stroke","#1976d2","stroke-opacity","0.5","stroke-width","2"],["stroke-linecap","round","x1","5","y1","13","x2","6.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","11","y1","13","x2","11","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","15.5","y1","13","x2","15.5","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","20","y1","13","x2","20","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","26","y1","13","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","6.5","y1","16","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","11","y1","21","x2","6","y2","27","stroke","#7f7f7f","stroke-width","1.25",1,"air-line"],["stroke-linecap","round","x1","16","y1","21","x2","16","y2","31","stroke","#7f7f7f","stroke-width","1.25",1,"air-line"],["stroke-linecap","round","x1","21","y1","21","x2","26","y2","27","stroke","#7f7f7f","stroke-width","1.25",1,"air-line"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4),n(6,"text",5),p(7," ALARM "),s(),m(8,"line",6)(9,"line",7)(10,"line",8)(11,"line",9)(12,"line",10)(13,"line",11)(14,"line",12)(15,"line",13)(16,"line",14)(17,"line",15),s()(),I(),n(18,"div",16),p(19),s(),_(20,Pp,3,3,"div",17)(21,Fp,3,3,"div",18),s()()),r&2&&(u("ngClass",N(6,Lp,i.isTriggered)),a(2),y("aria-label",c(3,4,"accessories.core.smoke_sensor")),a(17),v(i.service.customName||i.service.serviceName),a(),k(i.isTriggered?20:21))},dependencies:[E,M],styles:[".accessory-on svg .air-line{stroke:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite} .accessory-on svg .type{fill:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{opacity:1}50%{opacity:.2}}"]})}return e})();function Hp(e,o){if(e&1&&(p(0),l(1,"convertTemp"),l(2,"number"),l(3,"uppercase")),e&2){let t=f();O(" ",le(2,4,c(1,2,t.temperature),"1.0-1"),"\xB0",c(3,7,t.temperatureUnits)," ")}}function Op(e,o){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.no_data")," ")}var Oo=(()=>{class e{$settings=w(Ee);service;temperatureUnits=this.$settings.env.temperatureUnits;get temperature(){return uo(this.service)}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-matter-temperature-sensor"]],inputs:{service:"service"},decls:34,vars:5,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x1","16","y1","5","x2","16","y2","17","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["cx","16","cy","20","r","3","stroke","#7f7f7f","stroke-width","1.2","fill","#1976d2","fill-opacity","0.5"],["x1","9","y1","6","x2","13","y2","6","stroke","#7f7f7f","stroke-width","0.8"],["x1","9","y1","9","x2","13","y2","9","stroke","#7f7f7f","stroke-width","0.8"],["x1","9","y1","12","x2","13","y2","12","stroke","#7f7f7f","stroke-width","0.8"],["x1","9","y1","15","x2","13","y2","15","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","6","x2","23","y2","6","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","9","x2","23","y2","9","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","12","x2","23","y2","12","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","15","x2","23","y2","15","stroke","#7f7f7f","stroke-width","0.8"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(r,i){r&1&&(te(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),te(4,"svg",3),ye(5,"rect",4)(6,"line",5)(7,"circle",6)(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20)(22,"line",21)(23,"line",22)(24,"line",23)(25,"line",24)(26,"line",25)(27,"line",26)(28,"line",27),ae()(),I(),te(29,"div",28),p(30),ae(),te(31,"div",29),_(32,Hp,4,9)(33,Op,2,3),ae()()()),r&2&&(a(2),y("aria-label",c(3,3,"accessories.core.temperature_sensor")),a(28),v(i.service.customName||i.service.serviceName),a(2),k(i.temperature!==null?32:33))},dependencies:[we,Fe,Pe,M],encapsulation:2})}return e})();var Np=e=>({"accessory-on":e});function $p(e,o){e&1&&(n(0,"div",23),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.detected")))}function Rp(e,o){e&1&&(n(0,"div",24),p(1),l(2,"translate"),s()),e&2&&(a(),v(c(2,1,"accessories.control.not_detected")))}var No=(()=>{class e{service;get isLeaking(){return go(this.service)}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-matter-water-leak-detector"]],inputs:{service:"service"},decls:28,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2",1,"red-outline"],["transform","translate(7, 0), scale(0.35)"],["d","M23.61 24.58C23.61 28.67 20.44 31.99 16.56 31.99C12.68 31.99 9.52 28.67 9.52 24.58C9.52 20.49 12.68 17.13 16.56 10.87C20.44 17.13 23.61 20.49 23.61 24.58Z","fill","#1976d2","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","1"],["transform","translate(13, 7), scale(0.35)"],["cx","16","cy","22","rx","10","ry","2","fill","#1976d2","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","0.35"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(r,i){r&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),B(),n(4,"svg",3),m(5,"rect",4),n(6,"g",5),m(7,"path",6),s(),n(8,"g",7),m(9,"path",6),s(),m(10,"ellipse",8)(11,"line",9)(12,"line",10)(13,"line",11)(14,"line",12)(15,"line",13)(16,"line",14)(17,"line",15)(18,"line",16)(19,"line",17)(20,"line",18)(21,"line",19)(22,"line",20)(23,"line",21),s()(),I(),n(24,"div",22),p(25),s(),_(26,$p,3,3,"div",23)(27,Rp,3,3,"div",24),s()()),r&2&&(u("ngClass",N(6,Np,i.isLeaking)),a(2),y("aria-label",c(3,4,"accessories.core.leak_sensor")),a(23),v(i.service.customName||i.service.serviceName),a(),k(i.isLeaking?26:27))},dependencies:[E,M],styles:[".accessory-on svg .red-outline{stroke:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{stroke-opacity:.8}50%{stroke-opacity:.2}}"]})}return e})();function Wp(e,o){if(e&1){let t=R();n(0,"a",2),C("click",function(){D(t);let i=f();return A(i.$accessories.showAccessoryInformation(i.service))}),m(1,"i",3),s()}}function jp(e,o){e&1&&m(0,"i",1)}function Up(e,o){if(e&1&&(n(0,"app-on-off-light",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.matterReadyForControl),a(),v(c(2,3,"accessories.core.on_off_light"))}}function Gp(e,o){if(e&1&&(n(0,"app-dimmable-light",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.matterReadyForControl),a(),v(c(2,3,"accessories.core.dimmable_light"))}}function zp(e,o){if(e&1&&(n(0,"app-color-temperature-light",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.matterReadyForControl),a(),v(c(2,3,"accessories.core.color_temperature_light"))}}function qp(e,o){if(e&1&&(n(0,"app-extended-color-light",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.matterReadyForControl),a(),v(c(2,3,"accessories.core.extended_color_light"))}}function Zp(e,o){if(e&1&&(n(0,"app-on-off-plug-in-unit",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.matterReadyForControl),a(),v(c(2,3,"accessories.core.on_off_plug_in_unit"))}}function Kp(e,o){if(e&1&&(n(0,"app-on-off-light-switch",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.matterReadyForControl),a(),v(c(2,3,"accessories.core.on_off_light_switch"))}}function Qp(e,o){if(e&1&&(n(0,"app-robotic-vacuum-cleaner",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.matterReadyForControl),a(),v(c(2,3,"accessories.core.robotic_vacuum_cleaner"))}}function Yp(e,o){if(e&1&&(n(0,"app-matter-contact-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),a(),v(c(2,2,"accessories.core.contact_sensor"))}}function Xp(e,o){if(e&1&&(n(0,"app-matter-occupancy-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),a(),v(c(2,2,"accessories.core.occupancy_sensor"))}}function Jp(e,o){if(e&1&&(n(0,"app-matter-light-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),a(),v(c(2,2,"accessories.core.light_sensor"))}}function ed(e,o){if(e&1&&(n(0,"app-matter-temperature-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),a(),v(c(2,2,"accessories.core.temperature_sensor"))}}function td(e,o){if(e&1&&(n(0,"app-matter-humidity-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),a(),v(c(2,2,"accessories.core.humidity_sensor"))}}function id(e,o){if(e&1&&(n(0,"app-matter-smoke-co-alarm",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),a(),v(c(2,2,"accessories.core.smoke_co_alarm"))}}function nd(e,o){if(e&1&&(n(0,"app-matter-water-leak-detector",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),a(),v(c(2,2,"accessories.core.leak_sensor"))}}function od(e,o){if(e&1&&(n(0,"app-matter-air-quality-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),a(),v(c(2,2,"accessories.core.air_quality_sensor"))}}function rd(e,o){if(e&1&&(n(0,"app-unknown",5),p(1),s()),e&2){let t=f(2);u("service",t.service),a(),v(t.service.humanType)}}function ad(e,o){if(e&1&&_(0,Up,3,5,"app-on-off-light",4)(1,Gp,3,5,"app-dimmable-light",4)(2,zp,3,5,"app-color-temperature-light",4)(3,qp,3,5,"app-extended-color-light",4)(4,Zp,3,5,"app-on-off-plug-in-unit",4)(5,Kp,3,5,"app-on-off-light-switch",4)(6,Qp,3,5,"app-robotic-vacuum-cleaner",4)(7,Yp,3,4,"app-matter-contact-sensor",5)(8,Xp,3,4,"app-matter-occupancy-sensor",5)(9,Jp,3,4,"app-matter-light-sensor",5)(10,ed,3,4,"app-matter-temperature-sensor",5)(11,td,3,4,"app-matter-humidity-sensor",5)(12,id,3,4,"app-matter-smoke-co-alarm",5)(13,nd,3,4,"app-matter-water-leak-detector",5)(14,od,3,4,"app-matter-air-quality-sensor",5)(15,rd,2,2,"app-unknown",5),e&2){let t,r=f();k((t=r.service.customType||r.service.deviceType)==="OnOffLight"?0:t==="DimmableLight"?1:t==="ColorTemperatureLight"?2:t==="ExtendedColorLight"?3:t==="OnOffPlugInUnit"?4:t==="OnOffLightSwitch"?5:t==="RoboticVacuumCleaner"?6:t==="ContactSensor"?7:t==="OccupancySensor"?8:t==="LightSensor"?9:t==="TemperatureSensor"?10:t==="HumiditySensor"?11:t==="SmokeCoAlarm"?12:t==="WaterLeakDetector"?13:t==="AirQualitySensor"?14:15)}}function sd(e,o){if(e&1&&(n(0,"app-switch",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),a(),v(c(2,3,"accessories.core.switch"))}}function ld(e,o){if(e&1&&(n(0,"app-thermostat",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),a(),v(c(2,3,"accessories.core.thermostat"))}}function cd(e,o){if(e&1&&(n(0,"app-outlet",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),a(),v(c(2,3,"accessories.core.outlet"))}}function pd(e,o){if(e&1&&(n(0,"app-fan",6),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),a(),v(c(2,3,"accessories.core.fan"))}}function dd(e,o){if(e&1&&(n(0,"app-fan",6),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),a(),v(c(2,3,"accessories.core.fan"))}}function md(e,o){if(e&1&&(n(0,"app-air-purifier",6),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),a(),v(c(2,3,"accessories.core.air_purifier"))}}function ud(e,o){if(e&1&&(n(0,"app-lightbulb",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),a(),v(c(2,3,"accessories.core.lightbulb"))}}function fd(e,o){if(e&1&&(n(0,"app-light-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),a(),v(c(2,2,"accessories.core.light_sensor"))}}function vd(e,o){if(e&1&&(n(0,"app-lock-mechanism",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),a(),v(c(2,3,"accessories.core.lock_mechanism"))}}function gd(e,o){if(e&1&&(n(0,"app-temperature-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),a(),v(c(2,2,"accessories.core.temperature_sensor"))}}function hd(e,o){if(e&1&&(n(0,"app-garage-door-opener",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),a(),v(c(2,3,"accessories.core.garage_door_opener"))}}function Cd(e,o){if(e&1&&(n(0,"app-motion-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),a(),v(c(2,2,"accessories.core.motion_sensor"))}}function xd(e,o){if(e&1&&(n(0,"app-occupancy-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),a(),v(c(2,2,"accessories.core.occupancy_sensor"))}}function yd(e,o){if(e&1&&(n(0,"app-contact-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),a(),v(c(2,2,"accessories.core.contact_sensor"))}}function _d(e,o){if(e&1&&(n(0,"app-humidity-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),a(),v(c(2,2,"accessories.core.humidity_sensor"))}}function kd(e,o){if(e&1&&(n(0,"app-air-quality-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),a(),v(c(2,2,"accessories.core.air_quality_sensor"))}}function Sd(e,o){if(e&1&&(n(0,"app-window-covering",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),a(),v(c(2,3,"accessories.core.window_covering"))}}function bd(e,o){if(e&1&&(n(0,"app-window",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),a(),v(c(2,3,"accessories.core.window"))}}function Td(e,o){if(e&1&&(n(0,"app-door",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),a(),v(c(2,3,"accessories.core.door"))}}function Md(e,o){if(e&1&&(n(0,"app-television",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),a(),v(c(2,3,"accessories.core.television"))}}function wd(e,o){if(e&1&&(n(0,"app-battery",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),a(),v(c(2,2,"accessories.core.battery"))}}function Ed(e,o){if(e&1&&(n(0,"app-battery",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),a(),v(c(2,2,"accessories.core.battery"))}}function Bd(e,o){if(e&1&&(n(0,"app-speaker",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),a(),v(c(2,3,"accessories.core.speaker"))}}function Vd(e,o){if(e&1&&(n(0,"app-speaker",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),a(),v(c(2,3,"accessories.core.speaker"))}}function Dd(e,o){if(e&1&&(n(0,"app-doorbell",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),a(),v(c(2,3,"accessories.core.doorbell"))}}function Ad(e,o){if(e&1&&(n(0,"app-microphone",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),a(),v(c(2,3,"accessories.core.microphone"))}}function Id(e,o){if(e&1&&(n(0,"app-security-system",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),a(),v(c(2,3,"accessories.core.security_system"))}}function Ld(e,o){if(e&1&&(n(0,"app-leak-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),a(),v(c(2,2,"accessories.core.leak_sensor"))}}function Pd(e,o){if(e&1&&(n(0,"app-smoke-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),a(),v(c(2,2,"accessories.core.smoke_sensor"))}}function Fd(e,o){if(e&1&&(n(0,"app-carbon-monoxide-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),a(),v(c(2,2,"accessories.core.carbon_monoxide_sensor"))}}function Hd(e,o){if(e&1&&(n(0,"app-carbon-dioxide-sensor",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),a(),v(c(2,2,"accessories.core.carbon_dioxide_sensor"))}}function Od(e,o){if(e&1&&(n(0,"app-valve",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),a(),v(c(2,3,"accessories.core.valve"))}}function Nd(e,o){if(e&1&&(n(0,"app-irrigation-system",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),a(),v(c(2,2,"accessories.core.irrigation_system"))}}function $d(e,o){if(e&1&&(n(0,"app-heater-cooler",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),a(),v(c(2,3,"accessories.core.heater_cooler"))}}function Rd(e,o){if(e&1&&(n(0,"app-heater-cooler",7),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("type","heater")("readyForControl",t.$accessories.hapReadyForControl),a(),v(c(2,4,"accessories.core.heater"))}}function Wd(e,o){if(e&1&&(n(0,"app-heater-cooler",7),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("type","cooler")("readyForControl",t.$accessories.hapReadyForControl),a(),v(c(2,4,"accessories.core.cooler"))}}function jd(e,o){if(e&1&&(n(0,"app-humidifier-dehumidifier",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),a(),v(c(2,3,"accessories.core.humidifier_dehumidifier"))}}function Ud(e,o){if(e&1&&(n(0,"app-humidifier-dehumidifier",7),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("type","humidifier")("readyForControl",t.$accessories.hapReadyForControl),a(),v(c(2,4,"accessories.core.humidifier"))}}function Gd(e,o){if(e&1&&(n(0,"app-humidifier-dehumidifier",7),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("type","dehumidifier")("readyForControl",t.$accessories.hapReadyForControl),a(),v(c(2,4,"accessories.core.dehumidifier"))}}function zd(e,o){if(e&1&&(n(0,"app-stateless-programmable-switch",5),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service),a(),v(c(2,2,"accessories.core.stateless_programmable_switch"))}}function qd(e,o){if(e&1&&(n(0,"app-filter-maintenance",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),a(),v(c(2,3,"accessories.core.filter_maintenance"))}}function Zd(e,o){if(e&1&&(n(0,"app-robot-vacuum",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),a(),v(c(2,3,"accessories.core.robot_vacuum"))}}function Kd(e,o){if(e&1&&(n(0,"app-washing-machine",4),p(1),l(2,"translate"),s()),e&2){let t=f(2);u("service",t.service)("readyForControl",t.$accessories.hapReadyForControl),a(),v(c(2,3,"accessories.core.washing_machine"))}}function Qd(e,o){if(e&1&&(n(0,"app-unknown",5),p(1),s()),e&2){let t=f(2);u("service",t.service),a(),v(t.service.humanType)}}function Yd(e,o){if(e&1&&_(0,sd,3,5,"app-switch",4)(1,ld,3,5,"app-thermostat",4)(2,cd,3,5,"app-outlet",4)(3,pd,3,5,"app-fan",6)(4,dd,3,5,"app-fan",6)(5,md,3,5,"app-air-purifier",6)(6,ud,3,5,"app-lightbulb",4)(7,fd,3,4,"app-light-sensor",5)(8,vd,3,5,"app-lock-mechanism",4)(9,gd,3,4,"app-temperature-sensor",5)(10,hd,3,5,"app-garage-door-opener",4)(11,Cd,3,4,"app-motion-sensor",5)(12,xd,3,4,"app-occupancy-sensor",5)(13,yd,3,4,"app-contact-sensor",5)(14,_d,3,4,"app-humidity-sensor",5)(15,kd,3,4,"app-air-quality-sensor",5)(16,Sd,3,5,"app-window-covering",4)(17,bd,3,5,"app-window",4)(18,Td,3,5,"app-door",4)(19,Md,3,5,"app-television",4)(20,wd,3,4,"app-battery",5)(21,Ed,3,4,"app-battery",5)(22,Bd,3,5,"app-speaker",4)(23,Vd,3,5,"app-speaker",4)(24,Dd,3,5,"app-doorbell",4)(25,Ad,3,5,"app-microphone",4)(26,Id,3,5,"app-security-system",4)(27,Ld,3,4,"app-leak-sensor",5)(28,Pd,3,4,"app-smoke-sensor",5)(29,Fd,3,4,"app-carbon-monoxide-sensor",5)(30,Hd,3,4,"app-carbon-dioxide-sensor",5)(31,Od,3,5,"app-valve",4)(32,Nd,3,4,"app-irrigation-system",5)(33,$d,3,5,"app-heater-cooler",4)(34,Rd,3,6,"app-heater-cooler",7)(35,Wd,3,6,"app-heater-cooler",7)(36,jd,3,5,"app-humidifier-dehumidifier",4)(37,Ud,3,6,"app-humidifier-dehumidifier",7)(38,Gd,3,6,"app-humidifier-dehumidifier",7)(39,zd,3,4,"app-stateless-programmable-switch",5)(40,qd,3,5,"app-filter-maintenance",4)(41,Zd,3,5,"app-robot-vacuum",4)(42,Kd,3,5,"app-washing-machine",4)(43,Qd,2,2,"app-unknown",5),e&2){let t,r=f();k((t=r.service.customType||r.service.type||r.service.deviceType)==="Switch"?0:t==="Thermostat"?1:t==="Outlet"?2:t==="Fan"?3:t==="Fanv2"?4:t==="AirPurifier"?5:t==="Lightbulb"?6:t==="LightSensor"?7:t==="LockMechanism"?8:t==="TemperatureSensor"?9:t==="GarageDoorOpener"?10:t==="MotionSensor"?11:t==="OccupancySensor"?12:t==="ContactSensor"?13:t==="HumiditySensor"?14:t==="AirQualitySensor"?15:t==="WindowCovering"?16:t==="Window"?17:t==="Door"?18:t==="Television"?19:t==="Battery"?20:t==="BatteryService"?21:t==="Speaker"?22:t==="SmartSpeaker"?23:t==="Doorbell"?24:t==="Microphone"?25:t==="SecuritySystem"?26:t==="LeakSensor"?27:t==="SmokeSensor"?28:t==="CarbonMonoxideSensor"?29:t==="CarbonDioxideSensor"?30:t==="Valve"?31:t==="IrrigationSystem"?32:t==="HeaterCooler"?33:t==="Heater"?34:t==="Cooler"?35:t==="HumidifierDehumidifier"?36:t==="Humidifier"?37:t==="Dehumidifier"?38:t==="StatelessProgrammableSwitch"?39:t==="FilterMaintenance"?40:t==="RobotVacuum"?41:t==="WashingMachine"?42:43)}}var a7=(()=>{class e{$accessories=w(K);service;static \u0275fac=function(r){return new(r||e)};static \u0275cmp=T({type:e,selectors:[["app-accessory-tile"]],inputs:{service:"service"},decls:5,vars:2,consts:[["href","javascript:void(0)",1,"manage-accessory-button"],[1,"fas","fa-spin","fa-sync-alt","refreshing-accessory-status-icon","grey-text"],["href","javascript:void(0)",1,"manage-accessory-button",3,"click"],[1,"fas","fa-bars","grey-text"],[3,"service","readyForControl"],[3,"service"],[1,"w-100",3,"service","readyForControl"],[3,"service","type","readyForControl"]],template:function(r,i){r&1&&(Hi(0),_(1,Wp,2,0,"a",0)(2,jp,1,0,"i",1),_(3,ad,16,1)(4,Yd,44,1),Oi()),r&2&&(a(),k(i.service.protocol==="matter"&&i.$accessories.matterReadyForControl||i.service.protocol!=="matter"&&i.$accessories.hapReadyForControl?1:2),a(2),k(i.service.protocol==="matter"?3:4))},dependencies:[Gn,Qn,Fn,un,tn,wn,bn,Vn,Zn,gn,In,Ln,sn,_n,nn,no,ro,cn,qn,on,Wn,Nn,Sn,$n,an,rn,eo,kn,Cn,yn,jn,vn,dn,Yn,An,Hn,to,Io,Lo,Ao,To,_o,Eo,Fo,ko,Do,Vo,Oo,Bo,Ho,No,Co,M],encapsulation:2})}return e})();export{a7 as a};
|