homebridge-config-ui-x 5.9.1-beta.3 → 5.9.1-beta.5

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.
Files changed (64) hide show
  1. package/dist/core/feature-flags/feature-flags.registry.js +1 -1
  2. package/dist/modules/accessories/accessories.controller.d.ts +0 -10
  3. package/dist/modules/accessories/accessories.controller.js +1 -20
  4. package/dist/modules/accessories/accessories.controller.js.map +1 -1
  5. package/dist/modules/accessories/accessories.service.d.ts +2 -4
  6. package/dist/modules/accessories/accessories.service.js +25 -39
  7. package/dist/modules/accessories/accessories.service.js.map +1 -1
  8. package/package.json +1 -1
  9. package/public/{chunk-MR4KWEYX.js → chunk-2B5OWSC3.js} +1 -1
  10. package/public/{chunk-SKPO4EWV.js → chunk-2FJR6XQC.js} +1 -1
  11. package/public/{chunk-BCEDAADS.js → chunk-3HBGELYS.js} +1 -1
  12. package/public/{chunk-IUQ7ORI6.js → chunk-44XYFBM5.js} +1 -1
  13. package/public/{chunk-YNS6PU44.js → chunk-6ERM546T.js} +1 -1
  14. package/public/{chunk-VIZSJCWC.js → chunk-77M3IZ4C.js} +1 -1
  15. package/public/{chunk-2GNLGHLF.js → chunk-7D4XQLSJ.js} +1 -1
  16. package/public/{chunk-QXD3PZRU.js → chunk-7TBAQWUN.js} +1 -1
  17. package/public/{chunk-KWPPPGZJ.js → chunk-AIYX4NS4.js} +1 -1
  18. package/public/{chunk-FE2HKRWO.js → chunk-AKJJLD5T.js} +1 -1
  19. package/public/{chunk-JAJWHRVE.js → chunk-BKXKUPVG.js} +1 -1
  20. package/public/{chunk-YTHSUAFP.js → chunk-BRRZPIGK.js} +1 -1
  21. package/public/{chunk-OIVQXH76.js → chunk-CH5DGMHT.js} +1 -1
  22. package/public/{chunk-YKEI23UT.js → chunk-DH2TJW4L.js} +1 -1
  23. package/public/{chunk-QUV4XDKI.js → chunk-DSXYG3CG.js} +1 -1
  24. package/public/{chunk-HL3SPLOS.js → chunk-DTNTNUUT.js} +1 -1
  25. package/public/{chunk-BDNVTHRF.js → chunk-FJ6GKAK4.js} +1 -1
  26. package/public/{chunk-P6WEUVOG.js → chunk-G35SECWL.js} +1 -1
  27. package/public/{chunk-QQ44GPGJ.js → chunk-GJ66SKPM.js} +1 -1
  28. package/public/{chunk-UGGLMYE3.js → chunk-GNRQH4AB.js} +1 -1
  29. package/public/{chunk-PHWOE6AS.js → chunk-HKXJR5KL.js} +1 -1
  30. package/public/{chunk-4YBRFABH.js → chunk-JJETSLQ4.js} +1 -1
  31. package/public/{chunk-EGWCQPNN.js → chunk-JWTK75HO.js} +1 -1
  32. package/public/{chunk-M2ITW35G.js → chunk-KBJV7WLE.js} +1 -1
  33. package/public/{chunk-ALZYHHJS.js → chunk-KGWI6FZF.js} +1 -1
  34. package/public/{chunk-EKECA5VY.js → chunk-KW5P4NKW.js} +1 -1
  35. package/public/{chunk-BB37SSD3.js → chunk-L42PLXOO.js} +1 -1
  36. package/public/{chunk-2KS3Z2IQ.js → chunk-LYJSUZOK.js} +1 -1
  37. package/public/{chunk-CWBKN6DK.js → chunk-MYK6NVJR.js} +1 -1
  38. package/public/{chunk-6EINUQIR.js → chunk-OCKA6D3S.js} +1 -1
  39. package/public/{chunk-AYCYJZ5K.js → chunk-P46GPSHG.js} +1 -1
  40. package/public/{chunk-HADRZRRW.js → chunk-PLJKUNE6.js} +1 -1
  41. package/public/{chunk-WTOIGZHP.js → chunk-PTULVU2C.js} +1 -1
  42. package/public/{chunk-WZKMLQSX.js → chunk-QF6D3UP6.js} +1 -1
  43. package/public/{chunk-MYPS3TAE.js → chunk-R7I7Q4BB.js} +1 -1
  44. package/public/{chunk-REL5VGL4.js → chunk-RENHBVOU.js} +1 -1
  45. package/public/{chunk-CCHNU62C.js → chunk-ROPHWVQU.js} +1 -1
  46. package/public/{chunk-HYNETRJU.js → chunk-RUAPRNAM.js} +1 -1
  47. package/public/chunk-SBZRBLBH.js +1 -0
  48. package/public/{chunk-TLUCE4J6.js → chunk-UOYJA7SU.js} +1 -1
  49. package/public/{chunk-UAQZWGFR.js → chunk-V27MEAG5.js} +1 -1
  50. package/public/{chunk-GXXBQUDX.js → chunk-V7BTNFCD.js} +1 -1
  51. package/public/{chunk-3P242I3M.js → chunk-W73PY2KW.js} +1 -1
  52. package/public/{chunk-KSPJ7LBC.js → chunk-WLYALIGF.js} +1 -1
  53. package/public/{chunk-JEJRRXX6.js → chunk-XJDB5XC2.js} +1 -1
  54. package/public/{chunk-46IO6OQW.js → chunk-XJSITZKB.js} +1 -1
  55. package/public/{chunk-M5QYCMMI.js → chunk-Y47OP5SR.js} +1 -1
  56. package/public/{chunk-FQFDF7NL.js → chunk-YOVO5YUA.js} +2 -2
  57. package/public/{chunk-ZCINSOSK.js → chunk-Z4UZ2NAI.js} +1 -1
  58. package/public/{chunk-2HB77JUL.js → chunk-Z6FXBWOZ.js} +1 -1
  59. package/public/{chunk-US2WKTPG.js → chunk-ZP5N6LI4.js} +1 -1
  60. package/public/{chunk-66WFX4Q7.js → chunk-ZVFO7MWG.js} +1 -1
  61. package/public/{chunk-M4SSS7AE.js → chunk-ZX25HUUL.js} +1 -1
  62. package/public/index.html +1 -1
  63. package/public/{main-RHTU6HFP.js → main-3XD7WEKJ.js} +1 -1
  64. package/public/chunk-6UJ7GY5J.js +0 -1
@@ -1,4 +1,4 @@
1
- import{a as Ti,b as Ie,c as He}from"./chunk-BCEDAADS.js";import{m as Y,n as X}from"./chunk-5SJKGEVE.js";import{B as Q,a as bi,e as oe,l as re}from"./chunk-PJNMYOLO.js";import{b as Te}from"./chunk-SKPO4EWV.js";import{l as w}from"./chunk-KSPJ7LBC.js";import{$b as g,Ab as fe,Bb as Ce,Bc as Ft,Ca as li,Cb as Ee,Db as hi,Eb as Ci,Fa as ci,H as ni,Ib as O,J as oi,La as qe,Lb as y,Nb as m,P as te,Qa as r,Rc as V,Sa as We,T as ri,Ta as pi,Xb as Ze,Xc as Ae,Yb as _i,Za as di,_a as at,_b as p,_c as Ve,ac as x,bc as R,cc as Le,db as T,dc as xi,ec as st,fb as mi,fc as G,gb as ui,gc as z,ha as ai,hc as q,ia as si,kc as yi,lc as he,mc as j,n as ee,na as D,nc as I,o as ii,oc as lt,pb as S,pc as ct,qb as C,qc as ki,rb as _,rc as Si,sa as M,sc as l,ta as E,tb as fi,tc as c,ua as A,ub as vi,uc as ce,va as L,vb as gi,wb as f,xb as o,yb as s,zb as u}from"./chunk-EQP5UP7Q.js";var je=(function(e){return e.Range="range",e.Steps="steps",e.Positions="positions",e.Count="count",e.Values="values",e})(je||{}),we=(function(e){return e[e.None=-1]="None",e[e.NoValue=0]="NoValue",e[e.LargeValue=1]="LargeValue",e[e.SmallValue=2]="SmallValue",e})(we||{});function _o(e){return dt(e)&&typeof e.from=="function"}function dt(e){return typeof e=="object"&&typeof e.to=="function"}function wi(e){e.parentElement.removeChild(e)}function Pt(e){return e!=null}function Mi(e){e.preventDefault()}function xo(e){return e.filter(function(n){return this[n]?!1:this[n]=!0},{})}function yo(e,n){return Math.round(e/n)*n}function ko(e,n){var t=e.getBoundingClientRect(),a=e.ownerDocument,i=a.documentElement,d=Ai(a);return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(d.x=0),n?t.top+d.y-i.clientTop:t.left+d.x-i.clientLeft}function Be(e){return typeof e=="number"&&!isNaN(e)&&isFinite(e)}function Ei(e,n,t){t>0&&(Se(e,n),setTimeout(function(){pt(e,n)},t))}function Vi(e){return Math.max(Math.min(e,100),0)}function mt(e){return Array.isArray(e)?e:[e]}function So(e){e=String(e);var n=e.split(".");return n.length>1?n[1].length:0}function Se(e,n){e.classList&&!/\s/.test(n)?e.classList.add(n):e.className+=" "+n}function pt(e,n){e.classList&&!/\s/.test(n)?e.classList.remove(n):e.className=e.className.replace(new RegExp("(^|\\b)"+n.split(" ").join("|")+"(\\b|$)","gi")," ")}function bo(e,n){return e.classList?e.classList.contains(n):new RegExp("\\b"+n+"\\b").test(e.className)}function Ai(e){var n=window.pageXOffset!==void 0,t=(e.compatMode||"")==="CSS1Compat",a=n?window.pageXOffset:t?e.documentElement.scrollLeft:e.body.scrollLeft,i=n?window.pageYOffset:t?e.documentElement.scrollTop:e.body.scrollTop;return{x:a,y:i}}function To(){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 wo(){var e=!1;try{var n=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,n)}catch{}return e}function Mo(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function Ht(e,n){return 100/(n-e)}function Lt(e,n,t){return n*100/(e[t+1]-e[t])}function Eo(e,n){return Lt(e,e[0]<0?n+Math.abs(e[0]):n-e[0],0)}function Vo(e,n){return n*(e[1]-e[0])/100+e[0]}function Xe(e,n){for(var t=1;e>=n[t];)t+=1;return t}function Bo(e,n,t){if(t>=e.slice(-1)[0])return 100;var a=Xe(t,e),i=e[a-1],d=e[a],b=n[a-1],Z=n[a];return b+Eo([i,d],t)/Ht(b,Z)}function Ao(e,n,t){if(t>=100)return e.slice(-1)[0];var a=Xe(t,n),i=e[a-1],d=e[a],b=n[a-1],Z=n[a];return Vo([i,d],(t-b)*Ht(b,Z))}function Io(e,n,t,a){if(a===100)return a;var i=Xe(a,e),d=e[i-1],b=e[i];return t?a-d>(b-d)/2?b:d:n[i-1]?e[i-1]+yo(a-e[i-1],n[i-1]):a}var Do=(function(){function e(n,t,a){this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[a||!1],this.xNumSteps=[!1],this.snap=t;var i,d=[];for(Object.keys(n).forEach(function(b){d.push([mt(n[b]),b])}),d.sort(function(b,Z){return b[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(n){for(var t=[],a=0;a<this.xNumSteps.length-1;a++)t[a]=Lt(this.xVal,n,a);return t},e.prototype.getAbsoluteDistance=function(n,t,a){var i=0;if(n<this.xPct[this.xPct.length-1])for(;n>this.xPct[i+1];)i++;else n===this.xPct[this.xPct.length-1]&&(i=this.xPct.length-2);!a&&n===this.xPct[i+1]&&i++,t===null&&(t=[]);var d,b=1,Z=t[i],ie=0,W=0,K=0,pe=0;for(a?d=(n-this.xPct[i])/(this.xPct[i+1]-this.xPct[i]):d=(this.xPct[i+1]-n)/(this.xPct[i+1]-this.xPct[i]);Z>0;)ie=this.xPct[i+1+pe]-this.xPct[i+pe],t[i+pe]*b+100-d*100>100?(W=ie*d,b=(Z-100*d)/t[i+pe],d=1):(W=t[i+pe]*ie/100*b,b=0),a?(K=K-W,this.xPct.length+pe>=1&&pe--):(K=K+W,this.xPct.length-pe>=1&&pe++),Z=t[i+pe]*b;return n+K},e.prototype.toStepping=function(n){return n=Bo(this.xVal,this.xPct,n),n},e.prototype.fromStepping=function(n){return Ao(this.xVal,this.xPct,n)},e.prototype.getStep=function(n){return n=Io(this.xPct,this.xSteps,this.snap,n),n},e.prototype.getDefaultStep=function(n,t,a){var i=Xe(n,this.xPct);return(n===100||t&&n===this.xPct[i-1])&&(i=Math.max(i-1,1)),(this.xVal[i]-this.xVal[i-1])/a},e.prototype.getNearbySteps=function(n){var t=Xe(n,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 n=this.xNumSteps.map(So);return Math.max.apply(null,n)},e.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},e.prototype.convert=function(n){return this.getStep(this.toStepping(n))},e.prototype.handleEntryPoint=function(n,t){var a;if(n==="min"?a=0:n==="max"?a=100:a=parseFloat(n),!Be(a)||!Be(t[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(a),this.xVal.push(t[0]);var i=Number(t[1]);a?this.xSteps.push(isNaN(i)?!1:i):isNaN(i)||(this.xSteps[0]=i),this.xHighestCompleteStep.push(0)},e.prototype.handleStepPoint=function(n,t){if(t){if(this.xVal[n]===this.xVal[n+1]){this.xSteps[n]=this.xHighestCompleteStep[n]=this.xVal[n];return}this.xSteps[n]=Lt([this.xVal[n],this.xVal[n+1]],t,0)/Ht(this.xPct[n],this.xPct[n+1]);var a=(this.xVal[n+1]-this.xVal[n])/this.xNumSteps[n],i=Math.ceil(Number(a.toFixed(3))-1),d=this.xVal[n]+this.xNumSteps[n]*i;this.xHighestCompleteStep[n]=d}},e})(),Bi={to:function(e){return e===void 0?"":e.toFixed(2)},from:Number},Fo={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"},Oe={tooltips:".__tooltips",aria:".__aria"};function Po(e,n){if(!Be(n))throw new Error("noUiSlider: 'step' is not numeric.");e.singleStep=n}function Lo(e,n){if(!Be(n))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");e.keyboardPageMultiplier=n}function Ho(e,n){if(!Be(n))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");e.keyboardMultiplier=n}function Oo(e,n){if(!Be(n))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");e.keyboardDefaultStep=n}function No(e,n){if(typeof n!="object"||Array.isArray(n))throw new Error("noUiSlider: 'range' is not an object.");if(n.min===void 0||n.max===void 0)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");e.spectrum=new Do(n,e.snap||!1,e.singleStep)}function Ro(e,n){if(n=mt(n),!Array.isArray(n)||!n.length)throw new Error("noUiSlider: 'start' option is incorrect.");e.handles=n.length,e.start=n}function Wo(e,n){if(typeof n!="boolean")throw new Error("noUiSlider: 'snap' option must be a boolean.");e.snap=n}function jo(e,n){if(typeof n!="boolean")throw new Error("noUiSlider: 'animate' option must be a boolean.");e.animate=n}function $o(e,n){if(typeof n!="number")throw new Error("noUiSlider: 'animationDuration' option must be a number.");e.animationDuration=n}function Ii(e,n){var t=[!1],a;if(n==="lower"?n=[!0,!1]:n==="upper"&&(n=[!1,!0]),n===!0||n===!1){for(a=1;a<e.handles;a++)t.push(n);t.push(!1)}else{if(!Array.isArray(n)||!n.length||n.length!==e.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");t=n}e.connect=t}function Uo(e,n){switch(n){case"horizontal":e.ort=0;break;case"vertical":e.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function Di(e,n){if(!Be(n))throw new Error("noUiSlider: 'margin' option must be numeric.");n!==0&&(e.margin=e.spectrum.getDistance(n))}function Go(e,n){if(!Be(n))throw new Error("noUiSlider: 'limit' option must be numeric.");if(e.limit=e.spectrum.getDistance(n),!e.limit||e.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.")}function zo(e,n){var t;if(!Be(n)&&!Array.isArray(n))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(n)&&!(n.length===2||Be(n[0])||Be(n[1])))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(n!==0){for(Array.isArray(n)||(n=[n,n]),e.padding=[e.spectrum.getDistance(n[0]),e.spectrum.getDistance(n[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 a=n[0]+n[1],i=e.spectrum.xVal[0],d=e.spectrum.xVal[e.spectrum.xVal.length-1];if(a/(d-i)>1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function qo(e,n){switch(n){case"ltr":e.dir=0;break;case"rtl":e.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function Zo(e,n){if(typeof n!="string")throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var t=n.indexOf("tap")>=0,a=n.indexOf("drag")>=0,i=n.indexOf("fixed")>=0,d=n.indexOf("snap")>=0,b=n.indexOf("hover")>=0,Z=n.indexOf("unconstrained")>=0,ie=n.indexOf("invert-connects")>=0,W=n.indexOf("drag-all")>=0,K=n.indexOf("smooth-steps")>=0;if(i){if(e.handles!==2)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");Di(e,e.start[1]-e.start[0])}if(ie&&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:a,dragAll:W,smoothSteps:K,fixed:i,snap:d,hover:b,unconstrained:Z,invertConnects:ie}}function Ko(e,n){if(n!==!1)if(n===!0||dt(n)){e.tooltips=[];for(var t=0;t<e.handles;t++)e.tooltips.push(n)}else{if(n=mt(n),n.length!==e.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");n.forEach(function(a){if(typeof a!="boolean"&&!dt(a))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")}),e.tooltips=n}}function Qo(e,n){if(n.length!==e.handles)throw new Error("noUiSlider: must pass a attributes for all handles.");e.handleAttributes=n}function Yo(e,n){if(!dt(n))throw new Error("noUiSlider: 'ariaFormat' requires 'to' method.");e.ariaFormat=n}function Xo(e,n){if(!_o(n))throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");e.format=n}function Jo(e,n){if(typeof n!="boolean")throw new Error("noUiSlider: 'keyboardSupport' option must be a boolean.");e.keyboardSupport=n}function er(e,n){e.documentElement=n}function tr(e,n){if(typeof n!="string"&&n!==!1)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");e.cssPrefix=n}function ir(e,n){if(typeof n!="object")throw new Error("noUiSlider: 'cssClasses' must be an object.");typeof e.cssPrefix=="string"?(e.cssClasses={},Object.keys(n).forEach(function(t){e.cssClasses[t]=e.cssPrefix+n[t]})):e.cssClasses=n}function Fi(e){var n={margin:null,limit:null,padding:null,animate:!0,animationDuration:300,ariaFormat:Bi,format:Bi},t={step:{r:!1,t:Po},keyboardPageMultiplier:{r:!1,t:Lo},keyboardMultiplier:{r:!1,t:Ho},keyboardDefaultStep:{r:!1,t:Oo},start:{r:!0,t:Ro},connect:{r:!0,t:Ii},direction:{r:!0,t:qo},snap:{r:!1,t:Wo},animate:{r:!1,t:jo},animationDuration:{r:!1,t:$o},range:{r:!0,t:No},orientation:{r:!1,t:Uo},margin:{r:!1,t:Di},limit:{r:!1,t:Go},padding:{r:!1,t:zo},behaviour:{r:!0,t:Zo},ariaFormat:{r:!1,t:Yo},format:{r:!1,t:Xo},tooltips:{r:!1,t:Ko},keyboardSupport:{r:!0,t:Jo},documentElement:{r:!1,t:er},cssPrefix:{r:!0,t:tr},cssClasses:{r:!0,t:ir},handleAttributes:{r:!1,t:Qo}},a={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:Fo,keyboardPageMultiplier:5,keyboardMultiplier:1,keyboardDefaultStep:10};e.format&&!e.ariaFormat&&(e.ariaFormat=e.format),Object.keys(t).forEach(function(ie){if(!Pt(e[ie])&&a[ie]===void 0){if(t[ie].r)throw new Error("noUiSlider: '"+ie+"' is required.");return}t[ie].t(n,Pt(e[ie])?e[ie]:a[ie])}),n.pips=e.pips;var i=document.createElement("div"),d=i.style.msTransform!==void 0,b=i.style.transform!==void 0;n.transformRule=b?"transform":d?"msTransform":"webkitTransform";var Z=[["left","top"],["right","bottom"]];return n.style=Z[n.dir][n.ort],n}function nr(e,n,t){var a=To(),i=Mo(),d=i&&wo(),b=e,Z,ie,W,K,pe,ye,J=n.spectrum,De=[],de=[],be=[],_t=0,Fe={},Ke=!1,ze=e.ownerDocument,tt=n.documentElement||ze.documentElement,it=ze.body,Gn=ze.dir==="rtl"||n.ort===1?0:100;function Pe(v,h){var k=ze.createElement("div");return h&&Se(k,h),v.appendChild(k),k}function zn(v,h){var k=Pe(v,n.cssClasses.origin),B=Pe(k,n.cssClasses.handle);if(Pe(B,n.cssClasses.touchArea),B.setAttribute("data-handle",String(h)),n.keyboardSupport&&(B.setAttribute("tabindex","0"),B.addEventListener("keydown",function(P){return lo(P,h)})),n.handleAttributes!==void 0){var F=n.handleAttributes[h];Object.keys(F).forEach(function(P){B.setAttribute(P,F[P])})}return B.setAttribute("role","slider"),B.setAttribute("aria-orientation",n.ort?"vertical":"horizontal"),h===0?Se(B,n.cssClasses.handleLower):h===n.handles-1&&Se(B,n.cssClasses.handleUpper),k.handle=B,k}function xt(v,h){return h?Pe(v,n.cssClasses.connect):!1}function qn(v,h){ie=Pe(h,n.cssClasses.connects),W=[],K=[],K.push(xt(ie,v[0]));for(var k=0;k<n.handles;k++)W.push(zn(h,k)),be[k]=k,K.push(xt(ie,v[k+1]))}function Zn(v){Se(v,n.cssClasses.target),n.dir===0?Se(v,n.cssClasses.ltr):Se(v,n.cssClasses.rtl),n.ort===0?Se(v,n.cssClasses.horizontal):Se(v,n.cssClasses.vertical);var h=getComputedStyle(v).direction;return h==="rtl"?Se(v,n.cssClasses.textDirectionRtl):Se(v,n.cssClasses.textDirectionLtr),Pe(v,n.cssClasses.base)}function Kn(v,h){return!n.tooltips||!n.tooltips[h]?!1:Pe(v.firstChild,n.cssClasses.tooltip)}function Wt(){return b.hasAttribute("disabled")}function yt(v){var h=W[v];return h.hasAttribute("disabled")}function Qn(v){v!=null?(W[v].setAttribute("disabled",""),W[v].handle.removeAttribute("tabindex")):(b.setAttribute("disabled",""),W.forEach(function(h){h.handle.removeAttribute("tabindex")}))}function Yn(v){v!=null?(W[v].removeAttribute("disabled"),W[v].handle.setAttribute("tabindex","0")):(b.removeAttribute("disabled"),W.forEach(function(h){h.removeAttribute("disabled"),h.handle.setAttribute("tabindex","0")}))}function kt(){ye&&(Qe("update"+Oe.tooltips),ye.forEach(function(v){v&&wi(v)}),ye=null)}function jt(){kt(),ye=W.map(Kn),Mt("update"+Oe.tooltips,function(v,h,k){if(!(!ye||!n.tooltips)&&ye[h]!==!1){var B=v[h];n.tooltips[h]!==!0&&(B=n.tooltips[h].to(k[h])),ye[h].innerHTML=B}})}function Xn(){Qe("update"+Oe.aria),Mt("update"+Oe.aria,function(v,h,k,B,F){be.forEach(function(P){var $=W[P],H=nt(de,P,0,!0,!0,!0),se=nt(de,P,100,!0,!0,!0),le=F[P],me=String(n.ariaFormat.to(k[P]));H=J.fromStepping(H).toFixed(1),se=J.fromStepping(se).toFixed(1),le=J.fromStepping(le).toFixed(1),$.children[0].setAttribute("aria-valuemin",H),$.children[0].setAttribute("aria-valuemax",se),$.children[0].setAttribute("aria-valuenow",le),$.children[0].setAttribute("aria-valuetext",me)})})}function Jn(v){if(v.mode===je.Range||v.mode===je.Steps)return J.xVal;if(v.mode===je.Count){if(v.values<2)throw new Error("noUiSlider: 'values' (>= 2) required for mode 'count'.");for(var h=v.values-1,k=100/h,B=[];h--;)B[h]=h*k;return B.push(100),$t(B,v.stepped)}return v.mode===je.Positions?$t(v.values,v.stepped):v.mode===je.Values?v.stepped?v.values.map(function(F){return J.fromStepping(J.getStep(J.toStepping(F)))}):v.values:[]}function $t(v,h){return v.map(function(k){return J.fromStepping(h?J.getStep(k):k)})}function eo(v){function h(le,me){return Number((le+me).toFixed(7))}var k=Jn(v),B={},F=J.xVal[0],P=J.xVal[J.xVal.length-1],$=!1,H=!1,se=0;return k=xo(k.slice().sort(function(le,me){return le-me})),k[0]!==F&&(k.unshift(F),$=!0),k[k.length-1]!==P&&(k.push(P),H=!0),k.forEach(function(le,me){var ue,ne,ge,ke=le,_e=k[me+1],xe,Bt,At,It,Jt,Dt,ei,ti=v.mode===je.Steps;for(ti&&(ue=J.xNumSteps[me]),ue||(ue=_e-ke),_e===void 0&&(_e=ke),ue=Math.max(ue,1e-7),ne=ke;ne<=_e;ne=h(ne,ue)){for(xe=J.toStepping(ne),Bt=xe-se,Jt=Bt/(v.density||1),Dt=Math.round(Jt),ei=Bt/Dt,ge=1;ge<=Dt;ge+=1)At=se+ge*ei,B[At.toFixed(5)]=[J.fromStepping(At),0];It=k.indexOf(ne)>-1?we.LargeValue:ti?we.SmallValue:we.NoValue,!me&&$&&ne!==_e&&(It=0),ne===_e&&H||(B[xe.toFixed(5)]=[ne,It]),se=xe}}),B}function to(v,h,k){var B,F,P=ze.createElement("div"),$=(B={},B[we.None]="",B[we.NoValue]=n.cssClasses.valueNormal,B[we.LargeValue]=n.cssClasses.valueLarge,B[we.SmallValue]=n.cssClasses.valueSub,B),H=(F={},F[we.None]="",F[we.NoValue]=n.cssClasses.markerNormal,F[we.LargeValue]=n.cssClasses.markerLarge,F[we.SmallValue]=n.cssClasses.markerSub,F),se=[n.cssClasses.valueHorizontal,n.cssClasses.valueVertical],le=[n.cssClasses.markerHorizontal,n.cssClasses.markerVertical];Se(P,n.cssClasses.pips),Se(P,n.ort===0?n.cssClasses.pipsHorizontal:n.cssClasses.pipsVertical);function me(ne,ge){var ke=ge===n.cssClasses.value,_e=ke?se:le,xe=ke?$:H;return ge+" "+_e[n.ort]+" "+xe[ne]}function ue(ne,ge,ke){if(ke=h?h(ge,ke):ke,ke!==we.None){var _e=Pe(P,!1);_e.className=me(ke,n.cssClasses.marker),_e.style[n.style]=ne+"%",ke>we.NoValue&&(_e=Pe(P,!1),_e.className=me(ke,n.cssClasses.value),_e.setAttribute("data-value",String(ge)),_e.style[n.style]=ne+"%",_e.innerHTML=String(k.to(ge)))}}return Object.keys(v).forEach(function(ne){ue(ne,v[ne][0],v[ne][1])}),P}function St(){pe&&(wi(pe),pe=null)}function bt(v){St();var h=eo(v),k=v.filter,B=v.format||{to:function(F){return String(Math.round(F))}};return pe=b.appendChild(to(h,k,B)),pe}function Ut(){var v=Z.getBoundingClientRect(),h="offset"+["Width","Height"][n.ort];return n.ort===0?v.width||Z[h]:v.height||Z[h]}function Ne(v,h,k,B){var F=function($){var H=io($,B.pageOffset,B.target||h);if(!H||Wt()&&!B.doNotReject||bo(b,n.cssClasses.tap)&&!B.doNotReject||v===a.start&&H.buttons!==void 0&&H.buttons>1||B.hover&&H.buttons)return!1;d||H.preventDefault(),H.calcPoint=H.points[n.ort],k(H,B)},P=[];return v.split(" ").forEach(function($){h.addEventListener($,F,d?{passive:!0}:!1),P.push([$,F])}),P}function io(v,h,k){var B=v.type.indexOf("touch")===0,F=v.type.indexOf("mouse")===0,P=v.type.indexOf("pointer")===0,$=0,H=0;if(v.type.indexOf("MSPointer")===0&&(P=!0),v.type==="mousedown"&&!v.buttons&&!v.touches)return!1;if(B){var se=function(ue){var ne=ue.target;return ne===k||k.contains(ne)||v.composed&&v.composedPath().shift()===k};if(v.type==="touchstart"){var le=Array.prototype.filter.call(v.touches,se);if(le.length>1)return!1;$=le[0].pageX,H=le[0].pageY}else{var me=Array.prototype.find.call(v.changedTouches,se);if(!me)return!1;$=me.pageX,H=me.pageY}}return h=h||Ai(ze),(F||P)&&($=v.clientX+h.x,H=v.clientY+h.y),v.pageOffset=h,v.points=[$,H],v.cursor=F||P,v}function Gt(v){var h=v-ko(Z,n.ort),k=h*100/Ut();return k=Vi(k),n.dir?100-k:k}function no(v){var h=100,k=!1;return W.forEach(function(B,F){if(!yt(F)){var P=de[F],$=Math.abs(P-v),H=$===100&&h===100,se=$<h,le=$<=h&&v>P;(se||le||H)&&(k=F,h=$)}}),k}function oo(v,h){v.type==="mouseout"&&v.target.nodeName==="HTML"&&v.relatedTarget===null&&Tt(v,h)}function ro(v,h){if(navigator.appVersion.indexOf("MSIE 9")===-1&&v.buttons===0&&h.buttonsProperty!==0)return Tt(v,h);var k=(n.dir?-1:1)*(v.calcPoint-h.startCalcPoint),B=k*100/h.baseSize;qt(k>0,B,h.locations,h.handleNumbers,h.connect)}function Tt(v,h){h.handle&&(pt(h.handle,n.cssClasses.active),_t-=1),h.listeners.forEach(function(k){tt.removeEventListener(k[0],k[1])}),_t===0&&(pt(b,n.cssClasses.drag),Vt(),v.cursor&&(it.style.cursor="",it.removeEventListener("selectstart",Mi))),n.events.smoothSteps&&(h.handleNumbers.forEach(function(k){Re(k,de[k],!0,!0,!1,!1)}),h.handleNumbers.forEach(function(k){ve("update",k)})),h.handleNumbers.forEach(function(k){ve("change",k),ve("set",k),ve("end",k)})}function wt(v,h){if(!h.handleNumbers.some(yt)){var k;if(h.handleNumbers.length===1){var B=W[h.handleNumbers[0]];k=B.children[0],_t+=1,Se(k,n.cssClasses.active)}v.stopPropagation();var F=[],P=Ne(a.move,tt,ro,{target:v.target,handle:k,connect:h.connect,listeners:F,startCalcPoint:v.calcPoint,baseSize:Ut(),pageOffset:v.pageOffset,handleNumbers:h.handleNumbers,buttonsProperty:v.buttons,locations:de.slice()}),$=Ne(a.end,tt,Tt,{target:v.target,handle:k,listeners:F,doNotReject:!0,handleNumbers:h.handleNumbers}),H=Ne("mouseout",tt,oo,{target:v.target,handle:k,listeners:F,doNotReject:!0,handleNumbers:h.handleNumbers});F.push.apply(F,P.concat($,H)),v.cursor&&(it.style.cursor=getComputedStyle(v.target).cursor,W.length>1&&Se(b,n.cssClasses.drag),it.addEventListener("selectstart",Mi,!1)),h.handleNumbers.forEach(function(se){ve("start",se)})}}function ao(v){v.stopPropagation();var h=Gt(v.calcPoint),k=no(h);k!==!1&&(n.events.snap||Ei(b,n.cssClasses.tap,n.animationDuration),Re(k,h,!0,!0),Vt(),ve("slide",k,!0),ve("update",k,!0),n.events.snap?wt(v,{handleNumbers:[k]}):(ve("change",k,!0),ve("set",k,!0)))}function so(v){var h=Gt(v.calcPoint),k=J.getStep(h),B=J.fromStepping(k);Object.keys(Fe).forEach(function(F){F.split(".")[0]==="hover"&&Fe[F].forEach(function(P){P.call(rt,B)})})}function lo(v,h){if(Wt()||yt(h))return!1;var k=["Left","Right"],B=["Down","Up"],F=["PageDown","PageUp"],P=["Home","End"];n.dir&&!n.ort?k.reverse():n.ort&&!n.dir&&(B.reverse(),F.reverse());var $=v.key.replace("Arrow",""),H=$===F[0],se=$===F[1],le=$===B[0]||$===k[0]||H,me=$===B[1]||$===k[1]||se,ue=$===P[0],ne=$===P[1];if(!le&&!me&&!ue&&!ne)return!0;v.preventDefault();var ge;if(me||le){var ke=le?0:1,_e=Yt(h),xe=_e[ke];if(xe===null)return!1;xe===!1&&(xe=J.getDefaultStep(de[h],le,n.keyboardDefaultStep)),se||H?xe*=n.keyboardPageMultiplier:xe*=n.keyboardMultiplier,xe=Math.max(xe,1e-7),xe=(le?-1:1)*xe,ge=De[h]+xe}else ne?ge=n.spectrum.xVal[n.spectrum.xVal.length-1]:ge=n.spectrum.xVal[0];return Re(h,J.toStepping(ge),!0,!0),ve("slide",h),ve("update",h),ve("change",h),ve("set",h),!1}function zt(v){v.fixed||W.forEach(function(h,k){Ne(a.start,h.children[0],wt,{handleNumbers:[k]})}),v.tap&&Ne(a.start,Z,ao,{}),v.hover&&Ne(a.move,Z,so,{hover:!0}),v.drag&&K.forEach(function(h,k){if(!(h===!1||k===0||k===K.length-1)){var B=W[k-1],F=W[k],P=[h],$=[B,F],H=[k-1,k];Se(h,n.cssClasses.draggable),v.fixed&&(P.push(B.children[0]),P.push(F.children[0])),v.dragAll&&($=W,H=be),P.forEach(function(se){Ne(a.start,se,wt,{handles:$,handleNumbers:H,connect:h})})}})}function Mt(v,h){Fe[v]=Fe[v]||[],Fe[v].push(h),v.split(".")[0]==="update"&&W.forEach(function(k,B){ve("update",B)})}function co(v){return v===Oe.aria||v===Oe.tooltips}function Qe(v){var h=v&&v.split(".")[0],k=h?v.substring(h.length):v;Object.keys(Fe).forEach(function(B){var F=B.split(".")[0],P=B.substring(F.length);(!h||h===F)&&(!k||k===P)&&(!co(P)||k===P)&&delete Fe[B]})}function ve(v,h,k){Object.keys(Fe).forEach(function(B){var F=B.split(".")[0];v===F&&Fe[B].forEach(function(P){P.call(rt,De.map(n.format.to),h,De.slice(),k||!1,de.slice(),rt)})})}function nt(v,h,k,B,F,P,$){var H;return W.length>1&&!n.events.unconstrained&&(B&&h>0&&(H=J.getAbsoluteDistance(v[h-1],n.margin,!1),k=Math.max(k,H)),F&&h<W.length-1&&(H=J.getAbsoluteDistance(v[h+1],n.margin,!0),k=Math.min(k,H))),W.length>1&&n.limit&&(B&&h>0&&(H=J.getAbsoluteDistance(v[h-1],n.limit,!1),k=Math.min(k,H)),F&&h<W.length-1&&(H=J.getAbsoluteDistance(v[h+1],n.limit,!0),k=Math.max(k,H))),n.padding&&(h===0&&(H=J.getAbsoluteDistance(0,n.padding[0],!1),k=Math.max(k,H)),h===W.length-1&&(H=J.getAbsoluteDistance(100,n.padding[1],!0),k=Math.min(k,H))),$||(k=J.getStep(k)),k=Vi(k),k===v[h]&&!P?!1:k}function Et(v,h){var k=n.ort;return(k?h:v)+", "+(k?v:h)}function qt(v,h,k,B,F){var P=k.slice(),$=B[0],H=n.events.smoothSteps,se=[!v,v],le=[v,!v];B=B.slice(),v&&B.reverse(),B.length>1?B.forEach(function(ue,ne){var ge=nt(P,ue,P[ue]+h,se[ne],le[ne],!1,H);ge===!1?h=0:(h=ge-P[ue],P[ue]=ge)}):se=le=[!0];var me=!1;B.forEach(function(ue,ne){me=Re(ue,k[ue]+h,se[ne],le[ne],!1,H)||me}),me&&(B.forEach(function(ue){ve("update",ue),ve("slide",ue)}),F!=null&&ve("drag",$))}function Zt(v,h){return n.dir?100-v-h:v}function po(v,h){de[v]=h,De[v]=J.fromStepping(h);var k=Zt(h,0)-Gn,B="translate("+Et(k+"%","0")+")";if(W[v].style[n.transformRule]=B,n.events.invertConnects&&de.length>1){var F=de.every(function(P,$,H){return $===0||P>=H[$-1]});if(Ke!==!F){ho();return}}Ye(v),Ye(v+1),Ke&&(Ye(v-1),Ye(v+2))}function Vt(){be.forEach(function(v){var h=de[v]>50?-1:1,k=3+(W.length+h*v);W[v].style.zIndex=String(k)})}function Re(v,h,k,B,F,P){return F||(h=nt(de,v,h,k,B,!1,P)),h===!1?!1:(po(v,h),!0)}function Ye(v){if(K[v]){var h=de.slice();Ke&&h.sort(function(H,se){return H-se});var k=0,B=100;v!==0&&(k=h[v-1]),v!==K.length-1&&(B=h[v]);var F=B-k,P="translate("+Et(Zt(k,F)+"%","0")+")",$="scale("+Et(F/100,"1")+")";K[v].style[n.transformRule]=P+" "+$}}function Kt(v,h){return v===null||v===!1||v===void 0||(typeof v=="number"&&(v=String(v)),v=n.format.from(v),v!==!1&&(v=J.toStepping(v)),v===!1||isNaN(v))?de[h]:v}function ot(v,h,k){var B=mt(v),F=de[0]===void 0;h=h===void 0?!0:h,n.animate&&!F&&Ei(b,n.cssClasses.tap,n.animationDuration),be.forEach(function(H){Re(H,Kt(B[H],H),!0,!1,k)});var P=be.length===1?0:1;if(F&&J.hasNoSize()&&(k=!0,de[0]=0,be.length>1)){var $=100/(be.length-1);be.forEach(function(H){de[H]=H*$})}for(;P<be.length;++P)be.forEach(function(H){Re(H,de[H],!0,!0,k)});Vt(),be.forEach(function(H){ve("update",H),B[H]!==null&&h&&ve("set",H)})}function mo(v){ot(n.start,v)}function uo(v,h,k,B){if(v=Number(v),!(v>=0&&v<be.length))throw new Error("noUiSlider: invalid handle number, got: "+v);Re(v,Kt(h,v),!0,!0,B),ve("update",v),k&&ve("set",v)}function Qt(v){if(v===void 0&&(v=!1),v)return De.length===1?De[0]:De.slice(0);var h=De.map(n.format.to);return h.length===1?h[0]:h}function fo(){for(Qe(Oe.aria),Qe(Oe.tooltips),Object.keys(n.cssClasses).forEach(function(v){pt(b,n.cssClasses[v])});b.firstChild;)b.removeChild(b.firstChild);delete b.noUiSlider}function Yt(v){var h=de[v],k=J.getNearbySteps(h),B=De[v],F=k.thisStep.step,P=null;if(n.snap)return[B-k.stepBefore.startValue||null,k.stepAfter.startValue-B||null];F!==!1&&B+F>k.stepAfter.startValue&&(F=k.stepAfter.startValue-B),B>k.thisStep.startValue?P=k.thisStep.step:k.stepBefore.step===!1?P=!1:P=B-k.stepBefore.highestStep,h===100?F=null:h===0&&(P=null);var $=J.countStepDecimals();return F!==null&&F!==!1&&(F=Number(F.toFixed($))),P!==null&&P!==!1&&(P=Number(P.toFixed($))),[P,F]}function vo(){return be.map(Yt)}function go(v,h){var k=Qt(),B=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips","connect"];B.forEach(function(P){v[P]!==void 0&&(t[P]=v[P])});var F=Fi(t);B.forEach(function(P){v[P]!==void 0&&(n[P]=F[P])}),J=F.spectrum,n.margin=F.margin,n.limit=F.limit,n.padding=F.padding,n.pips?bt(n.pips):St(),n.tooltips?jt():kt(),de=[],ot(Pt(v.start)?v.start:k,h),v.connect&&Xt()}function Xt(){for(;ie.firstChild;)ie.removeChild(ie.firstChild);for(var v=0;v<=n.handles;v++)K[v]=xt(ie,n.connect[v]),Ye(v);zt({drag:n.events.drag,fixed:!0})}function ho(){Ke=!Ke,Ii(n,n.connect.map(function(v){return!v})),Xt()}function Co(){Z=Zn(b),qn(n.connect,Z),zt(n.events),ot(n.start),n.pips&&bt(n.pips),n.tooltips&&jt(),Xn()}Co();var rt={destroy:fo,steps:vo,on:Mt,off:Qe,get:Qt,set:ot,setHandle:uo,reset:mo,disable:Qn,enable:Yn,__moveHandles:function(v,h,k){qt(v,h,de,k)},options:t,updateOptions:go,target:b,removePips:St,removeTooltips:kt,getPositions:function(){return de.slice()},getTooltips:function(){return ye},getOrigins:function(){return W},pips:bt};return rt}function Pi(e,n){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=Fi(n),a=nr(e,t,n);return e.noUiSlider=a,a}var Ot=class{to(n){return String(parseFloat(parseFloat(String(n)).toFixed(2)))}from(n){return parseFloat(n)}},ae=(()=>{class e{constructor(t,a,i){this.ngZone=t,this.el=a,this.renderer=i,this.handles=[],this.config={},this.change=new We(!0),this.update=new We(!0),this.slide=new We(!0),this.set=new We(!0),this.start=new We(!0),this.end=new We(!0),this.onChange=Function.prototype,this.cleanups=[],this.eventHandler=(d,b,Z,ie)=>{let W=this.toValues(b),K=!1;if(this.value===void 0){this.value=W;return}Array.isArray(W)&&this.value[Z]!=W[Z]&&(K=!0),!Array.isArray(W)&&this.value!=W&&(K=!0),K&&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 b=this.slider.steps(),Z=parseInt(d.target.getAttribute("data-handle")),ie=1,W=1,K=0,pe=0;switch(d.which){case 34:W=this.config.pageSteps;break;case 40:case 37:ie=-1,K=b[Z][0],d.preventDefault();break;case 33:W=this.config.pageSteps;break;case 38:case 39:K=b[Z][1],d.preventDefault();break;default:break}pe=ie*W*K;let ye;Array.isArray(this.value)?(ye=[...this.value],ye[Z]=ye[Z]+pe):ye=this.value+pe,this.slider.set(ye)}}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 a=t.map(this.config.format.from);return a.length==1?a[0]:a}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 a=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(a.tooltips=this.tooltips||this.config.tooltips,a.format=this.format||this.config.format||new Ot,this.ngZone.runOutsideAngular(()=>{this.slider=Pi(this.el.nativeElement.querySelector("div"),Object.assign(this.config,a))}),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,b)=>{this.eventHandler(this.set,i,d,b)}),this.slider.on("update",(i,d,b)=>{this.update.observers.length>0&&this.ngZone.run(()=>{this.update.emit(this.toValues(i))})}),this.slider.on("change",(i,d,b)=>{this.change.observers.length>0&&this.ngZone.run(()=>{this.change.emit(this.toValues(i))})}),this.slider.on("slide",(i,d,b)=>{this.eventHandler(this.slide,i,d,b)}),this.slider.on("start",(i,d,b)=>{this.start.observers.length>0&&this.ngZone.run(()=>{this.start.emit(this.toValues(i))})}),this.slider.on("end",(i,d,b)=>{this.end.observers.length>0&&this.ngZone.run(()=>{this.end.emit(this.toValues(i))})})}}return e.\u0275fac=function(t){return new(t||e)(at(pi),at(ci),at(di))},e.\u0275cmp=T({type:e,selectors:[["nouislider"]],hostVars:2,hostBindings:function(t,a){t&2&&_i("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:[yi([{provide:bi,useExisting:ai(()=>e),multi:!0}]),li],decls:1,vars:1,template:function(t,a){t&1&&Ee(0,"div"),t&2&&S("disabled",a.disabled?!0:void 0)},styles:["[_nghost-%COMP%]{display:block;margin-top:1rem;margin-bottom:1rem}"]}),e})();var ut=(e,n)=>({"fa-check-circle":e,"fa-blank":n});function rr(e,n){if(e&1){let t=O();o(0,"button",6),y("click",function(i){M(t);let d=m(2);return E(d.setTargetMode(0,i))}),o(1,"div",7),u(2,"i",8),s(),p(3),l(4,"translate"),o(5,"div",9),u(6,"i",10),s()()}if(e&2){let t=m(2);r(2),f("ngClass",I(4,ut,t.targetMode===0,t.targetMode!==0)),r(),x(" ",c(4,2,"accessories.control.manual")," ")}}function ar(e,n){if(e&1){let t=O();o(0,"button",6),y("click",function(i){M(t);let d=m(2);return E(d.setTargetMode(1,i))}),o(1,"div",7),u(2,"i",8),s(),p(3),l(4,"translate"),o(5,"div",9),u(6,"i",10),s()()}if(e&2){let t=m(2);r(2),f("ngClass",I(4,ut,t.targetMode===1,t.targetMode!==1)),r(),x(" ",c(4,2,"accessories.control.auto")," ")}}function sr(e,n){if(e&1&&(o(0,"h6",12),p(1),l(2,"translate"),s(),o(3,"div",5),l(4,"translate"),C(5,rr,7,7,"button",13),C(6,ar,7,7,"button",13),s()),e&2){let t=m();r(),g(c(2,4,"accessories.control.mode")),r(2),S("aria-label",c(4,6,"accessories.control.mode_control")),r(2),_(t.targetModeValidValues.includes(0)?5:-1),r(),_(t.targetModeValidValues.includes(1)?6:-1)}}function lr(e,n){if(e&1){let t=O();o(0,"h6",12),p(1),l(2,"translate"),s(),o(3,"nouislider",14),q("ngModelChange",function(i){M(t);let d=m();return z(d.targetRotationSpeed.value,i)||(d.targetRotationSpeed.value=i),E(i)}),y("ngModelChange",function(){M(t);let i=m();return E(i.onTargetRotationSpeedChange())}),s()}if(e&2){let t=m();r(),R("",c(2,6,"accessories.control.rotation_speed"),": ",t.targetRotationSpeed.value,"%"),r(2),f("min",t.targetRotationSpeed.min)("max",t.targetRotationSpeed.max)("step",t.targetRotationSpeed.step),G("ngModel",t.targetRotationSpeed.value)}}var Li=(()=>{class e{$activeModal=D(Y);service;targetState;targetMode;targetModeValidValues=[];targetRotationSpeed;targetRotationSpeedChanged=new ee;constructor(){this.targetRotationSpeedChanged.pipe(te(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()}setTargetState(t,a){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),a.target.blur()}setTargetMode(t,a){this.targetMode=t,this.service.getCharacteristic("TargetAirPurifierState").setValue(this.targetMode),a.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(a){return new(a||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service"},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(a,i){a&1&&(o(0,"div",0)(1,"div",1),u(2,"h5",2),o(3,"button",3),l(4,"translate"),y("click",function(){return i.dismissModal()}),s()(),o(5,"div",4)(6,"div",5),l(7,"translate"),o(8,"button",6),y("click",function(b){return i.setTargetState(0,b)}),o(9,"div",7),u(10,"i",8),s(),p(11),l(12,"translate"),o(13,"div",9),u(14,"i",10),s()(),o(15,"button",6),y("click",function(b){return i.setTargetState(1,b)}),o(16,"div",7),u(17,"i",8),s(),p(18),l(19,"translate"),o(20,"div",9),u(21,"i",10),s()()(),C(22,sr,7,8),C(23,lr,4,8),s(),u(24,"div",11),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,9,"form.button_close")),r(3),S("aria-label",c(7,11,"accessories.control.state_control")),r(4),f("ngClass",I(17,ut,i.targetState===0,i.targetState!==0)),r(),x(" ",c(12,13,"accessories.control.off")," "),r(6),f("ngClass",I(20,ut,i.targetState===1,i.targetState!==1)),r(),x(" ",c(19,15,"accessories.control.on")," "),r(4),_(i.targetModeValidValues.length?22:-1),r(),_(i.targetRotationSpeed?23:-1))},dependencies:[Q,oe,re,ae,V,w],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 U=(()=>{class e{downTimeout;done=!1;touchInProgress=!1;touchStartTime=0;duration=350;longClick=Ft();shortClick=Ft();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(a){return new(a||e)};static \u0275dir=mi({type:e,selectors:[["","shortClick",""],["","longClick",""]],hostBindings:function(a,i){a&1&&y("keyup.enter",function(b){return i.onEnter(b)})("mouseup",function(b){return i.onMouseUp(b)})("touchend",function(b){return i.onTouchEnd(b)})("touchstart",function(b){return i.onMouseDown(b)})("mousedown",function(b){return i.onMouseDown(b)})("mousemove",function(b){return i.onMouseMove(b)})("touchmove",function(b){return i.onMouseMove(b)})},inputs:{duration:"duration"},outputs:{longClick:"longClick",shortClick:"shortClick"}})}return e})();var cr=(e,n)=>({"accessory-on":e,purifying:n});function pr(e,n){if(e&1&&(o(0,"div",18),p(1),s()),e&2){let t=m(2);r(),x("",t.service.values.RotationSpeed,"%")}}function dr(e,n){e&1&&(o(0,"div",18),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.on")))}function mr(e,n){if(e&1&&C(0,pr,2,1,"div",18)(1,dr,3,3,"div",18),e&2){let t=m();_("RotationSpeed"in t.service.values?0:1)}}function ur(e,n){e&1&&(o(0,"div",18),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.idle")))}function fr(e,n){e&1&&(o(0,"div",18),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.off")))}var Hi=(()=>{class e{$modal=D(X);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(Li,{size:"md",backdrop:"static"});t.componentInstance.service=this.service}}static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0),y("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(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()(),L(),o(18,"div",17),p(19),s(),C(20,mr,2,1)(21,ur,3,3,"div",18)(22,fr,3,3,"div",18),s()()),a&2&&(f("ngClass",I(6,cr,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)),r(2),S("aria-label",c(3,4,"accessories.core.air_purifier")),r(17),g(i.service.customName||i.service.serviceName),r(),_(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:[U,V,w],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 vr=()=>[3,4],gr=()=>[1,2],hr=(e,n,t,a)=>({"accessory-on":e,"fill-red":n,"fill-orange":t,"fill-green":a}),Cr=(e,n)=>({"grey-text":e,"red-text":n}),Oi=(()=>{class e{service;labels=["Unknown","Excellent","Good","Fair","Inferior","Poor"];static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(5,"rect",4),o(6,"g",5),u(7,"path",6),s(),u(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()(),L(),o(21,"div",20),p(22),s(),o(23,"div",21),p(24),s()()()),a&2&&(f("ngClass",ct(9,hr,i.service.values.AirQuality===5,i.service.values.AirQuality===5,he(7,vr).includes(i.service.values.AirQuality),he(8,gr).includes(i.service.values.AirQuality))),r(2),S("aria-label",c(3,5,"accessories.core.air_quality_sensor")),r(20),g(i.service.customName||i.service.serviceName),r(),f("ngClass",I(14,Cr,i.service.values.AirQuality<5,i.service.values.AirQuality===5)),r(),x(" ",i.labels[i.service.values.AirQuality||0]," "))},dependencies:[V,w],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 _r=e=>({"accessory-on":e});function xr(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.battery_notcharging")," ")}function yr(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.battery_charging")," ")}function kr(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.battery_notchargeable")," ")}function Sr(e,n){e&1&&(o(0,"span",10),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.battery_low")))}function br(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.battery_charged")," ")}var Ni=(()=>{class e{service;Math=Math;static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(5,"rect",4)(6,"rect",5)(7,"rect",6),o(8,"text",7),p(9),s()()(),L(),o(10,"div",8),p(11),s(),o(12,"div",9),C(13,xr,2,3)(14,yr,2,3)(15,kr,2,3)(16,Sr,3,3,"span",10)(17,br,2,3),s()()()),a&2&&(f("ngClass",j(10,_r,i.service.values.ChargingState===1)),r(2),S("aria-label",c(3,8,"accessories.core.battery")),r(3),S("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"),r(4),x(" ",i.service.values.BatteryLevel||0,"% "),r(2),g(i.service.customName||i.service.serviceName),r(2),_(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:[V,w],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 Tr=e=>({"accessory-on":e});function wr(e,n){e&1&&(o(0,"div",16),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.detected")))}function Mr(e,n){e&1&&(o(0,"div",17),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.not_detected")))}var Ri=(()=>{class e{service;static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(5,"rect",4),o(6,"text",5),p(7," CO2 "),s(),u(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()(),L(),o(17,"div",15),p(18),s(),C(19,wr,3,3,"div",16)(20,Mr,3,3,"div",17),s()()),a&2&&(f("ngClass",j(6,Tr,i.service.values.CarbonDioxideDetected)),r(2),S("aria-label",c(3,4,"accessories.core.carbon_dioxide_sensor")),r(16),g(i.service.customName||i.service.serviceName),r(),_(i.service.values.CarbonDioxideDetected?19:20))},dependencies:[V,w],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 Er=e=>({"accessory-on":e});function Vr(e,n){e&1&&(o(0,"div",16),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.detected")))}function Br(e,n){e&1&&(o(0,"div",17),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.not_detected")))}var Wi=(()=>{class e{service;static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(5,"rect",4),o(6,"text",5),p(7," CO "),s(),u(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()(),L(),o(17,"div",15),p(18),s(),C(19,Vr,3,3,"div",16)(20,Br,3,3,"div",17),s()()),a&2&&(f("ngClass",j(6,Er,i.service.values.CarbonMonoxideDetected)),r(2),S("aria-label",c(3,4,"accessories.core.carbon_monoxide_sensor")),r(16),g(i.service.customName||i.service.serviceName),r(),_(i.service.values.CarbonMonoxideDetected?19:20))},dependencies:[V,w],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 Ar=e=>({"accessory-on":e});function Ir(e,n){e&1&&(o(0,"div",9),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.open")))}function Dr(e,n){e&1&&(o(0,"div",10),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.closed")))}var ji=(()=>{class e{service;static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7),s()(),L(),o(9,"div",8),p(10),s(),C(11,Ir,3,3,"div",9)(12,Dr,3,3,"div",10),s()()),a&2&&(f("ngClass",j(6,Ar,i.service.values.ContactSensorState)),r(2),S("aria-label",c(3,4,"accessories.core.contact_sensor")),r(8),g(i.service.customName||i.service.serviceName),r(),_(i.service.values.ContactSensorState?11:12))},dependencies:[V,w],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 Fr(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.closed")," ")}function Pr(e,n){if(e&1&&(p(0),l(1,"translate")),e&2){let t=m(2);R(" ",c(1,2,"accessories.control.open")," ",t.service.getCharacteristic("CurrentPosition").value,"% ")}}function Lr(e,n){if(e&1&&C(0,Fr,2,3)(1,Pr,2,4),e&2){let t=m();_(t.service.values.CurrentPosition===0?0:1)}}function Hr(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.opening"),"... ")}function Or(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.closing"),"... ")}var $i=(()=>{class e{$activeModal=D(Y);service;targetMode;targetPositionChanged=new ee;targetPosition;constructor(){this.targetPositionChanged.pipe(te(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()}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(a){return new(a||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service"},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(a,i){a&1&&(o(0,"div",0)(1,"div",1),u(2,"h5",2),o(3,"button",3),l(4,"translate"),y("click",function(){return i.dismissModal()}),s()(),o(5,"div",4)(6,"div",5)(7,"div",6),C(8,Lr,2,1)(9,Hr,2,3)(10,Or,2,3),s()(),o(11,"h6",7),p(12),l(13,"translate"),s(),o(14,"nouislider",8),q("ngModelChange",function(b){return z(i.targetPosition.value,b)||(i.targetPosition.value=b),b}),y("ngModelChange",function(){return i.onTargetPositionChange()}),s(),o(15,"div",9)(16,"span",10),p(17),l(18,"translate"),s(),o(19,"span",10),p(20),l(21,"translate"),s()(),o(22,"h6",7),p(23),l(24,"translate"),s(),o(25,"nouislider",11),q("ngModelChange",function(b){return z(i.service.getCharacteristic("CurrentPosition").value,b)||(i.service.getCharacteristic("CurrentPosition").value=b),b}),s(),o(26,"div",9)(27,"span",10),p(28),l(29,"translate"),s(),o(30,"span",10),p(31),l(32,"translate"),s()()(),u(33,"div",12),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,20,"form.button_close")),r(5),_(i.service.values.PositionState===2?8:i.service.values.PositionState===1?9:i.service.values.PositionState===0?10:-1),r(4),R("",c(13,22,"accessories.control.target"),": ",i.targetPosition.value,"%"),r(2),f("min",i.targetPosition.min)("max",i.targetPosition.max)("step",i.targetPosition.step),G("ngModel",i.targetPosition.value),r(3),g(c(18,24,"accessories.control.closed")),r(3),g(c(21,26,"accessories.control.open")),r(3),R(" ",c(24,28,"accessories.control.current"),": ",i.service.getCharacteristic("CurrentPosition").value,"% "),r(2),f("min",0)("max",100)("step",1)("disabled",!0),G("ngModel",i.service.getCharacteristic("CurrentPosition").value),r(3),g(c(29,30,"accessories.control.closed")),r(3),g(c(32,32,"accessories.control.open")))},dependencies:[ae,Q,oe,re,w],encapsulation:2})}return e})();var Nr=e=>({"accessory-on":e});function Rr(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.closed")," ")}function Wr(e,n){if(e&1&&(p(0),l(1,"translate")),e&2){let t=m(2);R(" ",c(1,2,"accessories.control.open")," ",t.service.values.CurrentPosition,"% ")}}function jr(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.open")," ")}function $r(e,n){if(e&1&&(o(0,"div",11),C(1,Rr,2,3),C(2,Wr,2,4),C(3,jr,2,3),s()),e&2){let t=m();r(),_(t.service.values.CurrentPosition===0?1:-1),r(),_(t.service.values.CurrentPosition>0&&t.service.values.CurrentPosition<100?2:-1),r(),_(t.service.values.CurrentPosition===100?3:-1)}}function Ur(e,n){e&1&&(o(0,"div",12),p(1),l(2,"translate"),s()),e&2&&(r(),x("",c(2,1,"accessories.control.opening"),"..."))}function Gr(e,n){e&1&&(o(0,"div",12),p(1),l(2,"translate"),s()),e&2&&(r(),x("",c(2,1,"accessories.control.closing"),"..."))}var Ui=(()=>{class e{$modal=D(X);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($i,{size:"md",backdrop:"static"});t.componentInstance.service=this.service}static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0),y("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7)(9,"line",8)(10,"rect",9),s()(),L(),o(11,"div",10),p(12),s(),C(13,$r,4,3,"div",11)(14,Ur,3,3,"div",12)(15,Gr,3,3,"div",12),s()()),a&2&&(f("ngClass",j(6,Nr,i.service.values.CurrentPosition)),r(2),S("aria-label",c(3,4,"accessories.core.door")),r(10),g(i.service.customName||i.service.serviceName),r(),_(i.service.values.PositionState===2?13:i.service.values.PositionState===1?14:i.service.values.PositionState===0?15:-1))},dependencies:[U,V,w],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 $e=(e,n)=>({"fa-check-circle":e,"fa-blank":n});function zr(e,n){if(e&1){let t=O();o(0,"div",5),l(1,"translate"),o(2,"button",7),y("click",function(i){M(t);let d=m();return E(d.setActive(0,i))}),o(3,"div",8),u(4,"i",9),s(),p(5),l(6,"translate"),o(7,"div",10),u(8,"i",11),s()(),o(9,"button",7),y("click",function(i){M(t);let d=m();return E(d.setActive(1,i))}),o(10,"div",8),u(11,"i",9),s(),p(12),l(13,"translate"),o(14,"div",10),u(15,"i",11),s()()()}if(e&2){let t=m();S("aria-label",c(1,5,"accessories.control.mode_control")),r(4),f("ngClass",I(11,$e,t.service.values.Active===0,t.service.values.Active!==0)),r(),x(" ",c(6,7,"accessories.control.off")," "),r(6),f("ngClass",I(14,$e,t.service.values.Active===1,t.service.values.Active!==1)),r(),x(" ",c(13,9,"accessories.control.on")," ")}}function qr(e,n){if(e&1){let t=O();o(0,"div",5),l(1,"translate"),o(2,"button",7),y("click",function(i){M(t);let d=m();return E(d.setTargetState(0,i))}),o(3,"div",8),u(4,"i",9),s(),p(5),l(6,"translate"),o(7,"div",10),u(8,"i",11),s()(),o(9,"button",7),y("click",function(i){M(t);let d=m();return E(d.setTargetState(1,i))}),o(10,"div",8),u(11,"i",9),s(),p(12),l(13,"translate"),o(14,"div",10),u(15,"i",11),s()(),o(16,"button",7),y("click",function(i){M(t);let d=m();return E(d.setTargetState(2,i))}),o(17,"div",8),u(18,"i",9),s(),p(19),l(20,"translate"),o(21,"div",10),u(22,"i",11),s()()()}if(e&2){let t=m();S("aria-label",c(1,7,"accessories.control.media_control")),r(4),f("ngClass",I(15,$e,t.service.values.CurrentMediaState===0,t.service.values.CurrentMediaState!==0)),r(),x(" ",c(6,9,"accessories.control.play")," "),r(6),f("ngClass",I(18,$e,t.service.values.CurrentMediaState===1,t.service.values.CurrentMediaState!==1)),r(),x(" ",c(13,11,"accessories.control.pause")," "),r(6),f("ngClass",I(21,$e,t.service.values.CurrentMediaState===2,t.service.values.CurrentMediaState!==2)),r(),x(" ",c(20,13,"accessories.control.stop")," ")}}function Zr(e,n){if(e&1){let t=O();o(0,"h6"),p(1),l(2,"translate"),s(),o(3,"div",12),l(4,"translate"),o(5,"button",7),y("click",function(i){M(t);let d=m();return E(d.setTargetMode(!1,i))}),o(6,"div",8),u(7,"i",9),s(),p(8),l(9,"translate"),o(10,"div",10),u(11,"i",11),s()(),o(12,"button",7),y("click",function(i){M(t);let d=m();return E(d.setTargetMode(!0,i))}),o(13,"div",8),u(14,"i",9),s(),p(15),l(16,"translate"),o(17,"div",10),u(18,"i",11),s()()()}if(e&2){let t=m();r(),x(" ",c(2,6,"Active"in t.service.values||"TargetMediaState"in t.service.values?"accessories.control.speaker_volume":"menu.label_status")," "),r(2),S("aria-label",c(4,8,"accessories.control.mute_control")),r(4),f("ngClass",I(14,$e,!t.targetMode,t.targetMode)),r(),x(" ",c(9,10,"accessories.control.not_mute")," "),r(6),f("ngClass",I(17,$e,t.targetMode,!t.targetMode)),r(),x(" ",c(16,12,"accessories.control.mute")," ")}}function Kr(e,n){if(e&1){let t=O();o(0,"h6",13),p(1),l(2,"translate"),s(),o(3,"nouislider",14),q("ngModelChange",function(i){M(t);let d=m();return z(d.targetVolume.value,i)||(d.targetVolume.value=i),E(i)}),y("ngModelChange",function(){M(t);let i=m();return E(i.onVolumeStateChange())}),s()}if(e&2){let t=m();r(),R("",c(2,6,"accessories.control.speaker_volume"),": ",t.targetVolume.value,"%"),r(2),f("min",t.targetVolume.min)("max",t.targetVolume.max)("step",t.targetVolume.step),G("ngModel",t.targetVolume.value)}}var Gi=(()=>{class e{$activeModal=D(Y);service;targetMode;targetVolume;targetVolumeChanged=new ee;constructor(){this.targetVolumeChanged.pipe(te(500)).subscribe(()=>{this.service.getCharacteristic("Volume").setValue(this.targetVolume.value)})}ngOnInit(){this.targetMode=this.service.values.Mute,this.loadTargetVolume()}setTargetMode(t,a){this.targetMode=t,this.service.getCharacteristic("Mute").setValue(this.targetMode),a.target.blur()}setActive(t,a){this.service.getCharacteristic("Active").setValue(t),a.target.blur()}setTargetState(t,a){this.service.getCharacteristic("TargetMediaState").setValue(t),a.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(a){return new(a||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service"},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(a,i){a&1&&(o(0,"div",0)(1,"div",1),u(2,"h5",2),o(3,"button",3),l(4,"translate"),y("click",function(){return i.dismissModal()}),s()(),o(5,"div",4),C(6,zr,16,17,"div",5)(7,qr,23,24,"div",5),C(8,Zr,19,20),C(9,Kr,4,8),s(),u(10,"div",6),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,5,"form.button_close")),r(3),_("Active"in i.service.values?6:"TargetMediaState"in i.service.values?7:-1),r(2),_("Mute"in i.service.values?8:-1),r(),_(i.targetVolume?9:-1))},dependencies:[Q,oe,re,ae,V,w],encapsulation:2})}return e})();var Qr=()=>[0,1],Yr=(e,n)=>({"accessory-on":e,paused:n}),Xr=()=>["Speaker","SmartSpeaker"];function Jr(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.play")," ")}function ea(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.pause")," ")}function ta(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.stop")," ")}function ia(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" \xB7 ",c(1,1,"accessories.control.mute")," ")}function na(e,n){if(e&1&&p(0),e&2){let t=m(3);x(" \xB7 ",t.service.values.Volume,"% ")}}function oa(e,n){if(e&1&&C(0,na,1,1),e&2){let t=m(2);_("Volume"in t.service.values?0:-1)}}function ra(e,n){if(e&1&&(o(0,"div",7),C(1,Jr,2,3)(2,ea,2,3)(3,ta,2,3),C(4,ia,2,3)(5,oa,1,1),s()),e&2){let t,a=m();r(),_((t=a.service.values.CurrentMediaState)===0?1:t===1?2:t===2?3:-1),r(3),_("Mute"in a.service.values&&a.service.values.Mute?4:5)}}function aa(e,n){e&1&&(u(0,"div",8),l(1,"translate")),e&2&&f("innerText",c(1,1,"accessories.control.off"))}function sa(e,n){e&1&&(u(0,"div",8),l(1,"translate")),e&2&&f("innerText",c(1,1,"accessories.control.mute"))}function la(e,n){if(e&1&&(o(0,"div",7),p(1),s()),e&2){let t=m();r(),x("",t.service.values.Volume,"%")}}function ca(e,n){e&1&&(o(0,"div",7),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.on")))}function pa(e,n){e&1&&(o(0,"div",7),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.core.doorbell")))}var zi=(()=>{class e{$modal=D(X);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(Gi,{size:"md",backdrop:"static"});t.componentInstance.service=this.service}}static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0),y("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(5,"rect",4)(6,"circle",5),s()(),L(),o(7,"div",6),p(8),s(),C(9,ra,6,2,"div",7)(10,aa,2,3,"div",8)(11,sa,2,3,"div",8)(12,la,2,1,"div",7)(13,ca,3,3,"div",7)(14,pa,3,3,"div",7),s()()),a&2&&(f("ngClass",I(7,Yr,"Active"in i.service.values?i.service.values.Active:"CurrentMediaState"in i.service.values?he(6,Qr).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)),r(2),S("aria-label",c(3,4,"accessories.core.doorbell")),r(6),g(i.service.customName||i.service.serviceName),r(),_("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,Xr).includes(i.service.customType||i.service.type)?13:14))},dependencies:[U,V,w],encapsulation:2})}return e})();var ft=(e,n)=>({"fa-check-circle":e,"fa-blank":n});function da(e,n){if(e&1){let t=O();o(0,"h6",12),p(1),l(2,"translate"),s(),o(3,"div",13),l(4,"translate"),o(5,"button",6),y("click",function(i){M(t);let d=m();return E(d.setRotationDirection(0,i))}),o(6,"div",7),u(7,"i",8),s(),p(8),l(9,"translate"),o(10,"div",9),u(11,"i",10),s()(),o(12,"button",6),y("click",function(i){M(t);let d=m();return E(d.setRotationDirection(1,i))}),o(13,"div",7),u(14,"i",8),s(),p(15),l(16,"translate"),o(17,"div",9),u(18,"i",10),s()()()}if(e&2){let t=m();r(),g(c(2,6,"accessories.control.rotation_direction")),r(2),S("aria-label",c(4,8,"accessories.control.direction_control")),r(4),f("ngClass",I(14,ft,t.service.values.RotationDirection===0,t.service.values.RotationDirection!==0)),r(),x(" ",c(9,10,"accessories.control.rotation_clockwise")," "),r(6),f("ngClass",I(17,ft,t.service.values.RotationDirection===1,t.service.values.RotationDirection!==1)),r(),x(" ",c(16,12,"accessories.control.rotation_c_clockwise")," ")}}function ma(e,n){e&1&&p(0,"%")}function ua(e,n){if(e&1){let t=O();o(0,"h6",12),p(1),l(2,"translate"),C(3,ma,1,0),s(),o(4,"nouislider",14),q("ngModelChange",function(i){M(t);let d=m();return z(d.targetRotationSpeed.value,i)||(d.targetRotationSpeed.value=i),E(i)}),y("ngModelChange",function(){M(t);let i=m();return E(i.onTargetRotationSpeedChange())}),s()}if(e&2){let t=m();r(),R(" ",c(2,7,"accessories.control.rotation_speed"),": ",t.targetRotationSpeed.value),r(2),_(t.targetRotationSpeed.unit==="percentage"?3:-1),r(),f("min",t.targetRotationSpeed.min)("max",t.targetRotationSpeed.max)("step",t.targetRotationSpeed.step),G("ngModel",t.targetRotationSpeed.value)}}var qi=(()=>{class e{$activeModal=D(Y);service;targetMode;targetRotationSpeed;targetRotationSpeedChanged=new ee;hasRotationDirection=!1;constructor(){this.targetRotationSpeedChanged.pipe(te(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)}setTargetMode(t,a){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),a.target.blur()}onTargetRotationSpeedChange(){this.targetRotationSpeedChanged.next(this.targetRotationSpeed.value)}setRotationDirection(t,a){this.service.getCharacteristic("RotationDirection").setValue(t),a.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(a){return new(a||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service"},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(a,i){a&1&&(o(0,"div",0)(1,"div",1),u(2,"h5",2),o(3,"button",3),l(4,"translate"),y("click",function(){return i.dismissModal()}),s()(),o(5,"div",4)(6,"div",5),l(7,"translate"),o(8,"button",6),y("click",function(b){return i.setTargetMode(!1,b)}),o(9,"div",7),u(10,"i",8),s(),p(11),l(12,"translate"),o(13,"div",9),u(14,"i",10),s()(),o(15,"button",6),y("click",function(b){return i.setTargetMode(!0,b)}),o(16,"div",7),u(17,"i",8),s(),p(18),l(19,"translate"),o(20,"div",9),u(21,"i",10),s()()(),C(22,da,19,20),C(23,ua,5,9),s(),u(24,"div",11),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,9,"form.button_close")),r(3),S("aria-label",c(7,11,"accessories.control.mode_control")),r(4),f("ngClass",I(17,ft,!i.targetMode,i.targetMode)),r(),x(" ",c(12,13,"accessories.control.off")," "),r(6),f("ngClass",I(20,ft,i.targetMode,!i.targetMode)),r(),x(" ",c(19,15,"accessories.control.on")," "),r(4),_(i.hasRotationDirection?22:-1),r(),_(i.targetRotationSpeed?23:-1))},dependencies:[Q,oe,re,ae,V,w],encapsulation:2})}return e})();var fa=e=>({"accessory-on":e}),va=(e,n)=>({spin:e,"spin-counter":n});function ga(e,n){if(e&1&&(o(0,"div",8),p(1),s()),e&2){let t=m();r(),R("",t.service.values.RotationSpeed,"",t.rotationSpeedUnit)}}function ha(e,n){if(e&1&&(u(0,"div",9),l(1,"translate")),e&2){let t=m();f("innerText",c(1,1,t.service.values.On||t.service.values.Active?"accessories.control.on":"accessories.control.off"))}}var Zi=(()=>{class e{$modal=D(X);service;readyForControl=!1;rotationSpeedUnit="";hasRotationDirection=!1;ngOnInit(){"RotationSpeed"in this.service.values&&this.service.serviceCharacteristics.find(a=>a.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(qi,{size:"md",backdrop:"static"});t.componentInstance.service=this.service}}static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0),y("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3)(5,"g",4),u(6,"path",5),s(),u(7,"circle",6),s()(),L(),o(8,"div",7),p(9),s(),C(10,ga,2,2,"div",8)(11,ha,2,3,"div",9),s()()),a&2&&(f("ngClass",j(7,fa,i.service.values.On||i.service.values.Active)),r(2),f("ngClass",I(9,va,(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)),S("aria-label",c(3,5,"accessories.core.fan")),r(7),g(i.service.customName||i.service.serviceName),r(),_(i.service.values.On&&i.service.values.RotationSpeed?10:11))},dependencies:[U,V,w],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 Ki=(()=>{class e{$activeModal=D(Y);service;targetMode;ngOnInit(){setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(a=>{a.style.background="linear-gradient(to right, #d32f2f, #e69533, #42d672, #42d672)"})},10)}resetFilterLife(t){this.service.getCharacteristic("ResetFilterIndication").setValue(1),t.target.blur()}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service"},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(a,i){a&1&&(o(0,"div",0)(1,"div",1),u(2,"h5",2),o(3,"button",3),l(4,"translate"),y("click",function(){return i.dismissModal()}),s()(),o(5,"div",4)(6,"h6",5),p(7),l(8,"translate"),s(),o(9,"nouislider",6),q("ngModelChange",function(b){return z(i.service.values.FilterLifeLevel,b)||(i.service.values.FilterLifeLevel=b),b}),s(),o(10,"div",7),l(11,"translate"),o(12,"button",8),y("click",function(b){return i.resetFilterLife(b)}),p(13),l(14,"translate"),s()()(),u(15,"div",9),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,11,"form.button_close")),r(4),R("",c(8,13,"accessories.control.filter_level"),": ",i.service.values.FilterLifeLevel,"%"),r(2),f("min",0)("max",100)("step",1)("disabled",!0),G("ngModel",i.service.values.FilterLifeLevel),r(),S("aria-label",c(11,15,"accessories.core.filter_maintenance")),r(3),x(" ",c(14,17,"form.button_reset")," "))},dependencies:[Q,oe,re,ae,w],encapsulation:2})}return e})();var Ca=(e,n)=>({replace:e,dirty:n}),_a=e=>({"red-text":e});function xa(e,n){e&1&&(p(0," \xB7 "),o(1,"span",28),p(2),l(3,"translate"),s()),e&2&&(r(2),g(c(3,1,"accessories.control.replace")))}var Qi=(()=>{class e{$modal=D(X);service;readyForControl=!1;onClick(){if(!this.readyForControl)return;let t=this.$modal.open(Ki,{size:"md",backdrop:"static"});t.componentInstance.service=this.service}static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0),y("longClick",function(){return i.onClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(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()(),L(),o(26,"div",25),p(27),s(),o(28,"div",26)(29,"span",27),p(30),s(),C(31,xa,4,3),s()()()),a&2&&(f("ngClass",I(8,Ca,i.service.values.FilterChangeIndication===1||i.service.values.FilterLifeLevel<10,i.service.values.FilterChangeIndication!==1&&i.service.values.FilterLifeLevel<50)),r(2),S("aria-label",c(3,6,"accessories.core.filter_maintenance")),r(25),g(i.service.customName||i.service.serviceName),r(2),f("ngClass",j(11,_a,i.service.values.FilterChangeIndication===1)),r(),x(" ",i.service.values.FilterLifeLevel,"% "),r(),_(i.service.values.FilterChangeIndication===1?31:-1))},dependencies:[V,U,w],styles:[".dirty svg .status{fill:#e69533!important} .replace svg .status{fill:#d32f2f!important} body.dark-mode svg .back{fill:#2b2b2b!important}"]})}return e})();var ya=()=>[0,2,3,4],ka=(e,n,t,a,i,d,b)=>({"accessory-on":e,opening:n,open:t,closing:a,closed:i,stopped:d,obstructed:b});function Sa(e,n){e&1&&(o(0,"div",30),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.obstructed")))}function ba(e,n){e&1&&(o(0,"div",30),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.open")))}function Ta(e,n){e&1&&(o(0,"div",31),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.closed")))}function wa(e,n){e&1&&(o(0,"div",30),p(1),l(2,"translate"),s()),e&2&&(r(),x("",c(2,1,"accessories.control.opening"),"..."))}function Ma(e,n){e&1&&(o(0,"div",30),p(1),l(2,"translate"),s()),e&2&&(r(),x("",c(2,1,"accessories.control.closing"),"..."))}function Ea(e,n){e&1&&(o(0,"div",30),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.stopped")))}function Va(e,n){if(e&1&&C(0,ba,3,3,"div",30)(1,Ta,3,3,"div",31)(2,wa,3,3,"div",30)(3,Ma,3,3,"div",30)(4,Ea,3,3,"div",30),e&2){let t,a=m();_((t=a.service.values.CurrentDoorState)===0?0:t===1?1:t===2?2:t===3?3:t===4?4:-1)}}function Ba(e,n){e&1&&(o(0,"div",30),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.open")))}function Aa(e,n){e&1&&(o(0,"div",31),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.closed")))}function Ia(e,n){if(e&1&&C(0,Ba,3,3,"div",30)(1,Aa,3,3,"div",31),e&2){let t=m();_(t.service.values.On||t.service.values.Active?0:1)}}var Yi=(()=>{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(a){return new(a||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(a,i){a&1&&(o(0,"div",0),y("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(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()(),L(),o(30,"div",29),p(31),s(),C(32,Sa,3,3,"div",30)(33,Va,5,1)(34,Ia,2,1),s()()),a&2&&(f("ngClass",Si(7,ka,i.service.values.ObstructionDetected||he(6,ya).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)),r(2),S("aria-label",c(3,4,"accessories.core.garage_door_opener")),r(29),g(i.service.customName||i.service.serviceName),r(),_(i.service.values.ObstructionDetected?32:"CurrentDoorState"in i.service.values?33:34))},dependencies:[U,V,w],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 Je=(e,n)=>({"fa-check-circle":e,"fa-blank":n});function Da(e,n){if(e&1){let t=O();o(0,"button",8),y("click",function(i){M(t);let d=m(2);return E(d.setTargetMode(0,i))}),o(1,"div",9),u(2,"i",10),s(),p(3),l(4,"translate"),o(5,"div",11),u(6,"i",12),s()()}if(e&2){let t=m(2);r(2),f("ngClass",I(4,Je,t.targetMode===0,t.targetMode!==0)),r(),x(" ",c(4,2,"accessories.control.auto")," ")}}function Fa(e,n){if(e&1){let t=O();o(0,"button",8),y("click",function(i){M(t);let d=m(2);return E(d.setTargetMode(1,i))}),o(1,"div",9),u(2,"i",10),s(),p(3),l(4,"translate"),o(5,"div",11),u(6,"i",12),s()()}if(e&2){let t=m(2);r(2),f("ngClass",I(4,Je,t.targetMode===1,t.targetMode!==1)),r(),x(" ",c(4,2,"accessories.control.heat")," ")}}function Pa(e,n){if(e&1){let t=O();o(0,"button",8),y("click",function(i){M(t);let d=m(2);return E(d.setTargetMode(2,i))}),o(1,"div",9),u(2,"i",10),s(),p(3),l(4,"translate"),o(5,"div",11),u(6,"i",12),s()()}if(e&2){let t=m(2);r(2),f("ngClass",I(4,Je,t.targetMode===2,t.targetMode!==2)),r(),x(" ",c(4,2,"accessories.control.cool")," ")}}function La(e,n){if(e&1&&(o(0,"h6",14),p(1),l(2,"translate"),s(),o(3,"div",15),l(4,"translate"),C(5,Da,7,7,"button",16),C(6,Fa,7,7,"button",16),C(7,Pa,7,7,"button",16),s()),e&2){let t=m();r(),g(c(2,5,"accessories.control.mode")),r(2),S("aria-label",c(4,7,"accessories.control.mode_control")),r(2),_(t.targetStateValidValues.includes(0)?5:-1),r(),_(t.targetStateValidValues.includes(1)?6:-1),r(),_(t.targetStateValidValues.includes(2)?7:-1)}}function Ha(e,n){if(e&1){let t=O();o(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(),o(9,"nouislider",18),q("ngModelChange",function(i){M(t);let d=m(2);return z(d.autoTemp,i)||(d.autoTemp=i),E(i)}),y("ngModelChange",function(){M(t);let i=m(2);return E(i.onAutoTemperatureStateChange())}),s()}if(e&2){let t=m(2);r(),st(" ",c(2,9,"accessories.control.target_auto"),": ",ce(4,13,c(3,11,t.autoTemp[0]),"1.0-1"),"\xB0",c(5,16,t.temperatureUnits)," - ",ce(7,20,c(6,18,t.autoTemp[1]),"1.0-1"),"\xB0",c(8,23,t.temperatureUnits)," "),r(8),f("min",t.HeatingThresholdTemperature.minValue)("max",t.CoolingThresholdTemperature.maxValue)("step",t.CoolingThresholdTemperature.minStep),G("ngModel",t.autoTemp)}}function Oa(e,n){if(e&1){let t=O();o(0,"h6",14),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),s(),o(6,"nouislider",18),q("ngModelChange",function(i){M(t);let d=m(2);return z(d.targetHeatingTemp,i)||(d.targetHeatingTemp=i),E(i)}),y("ngModelChange",function(){M(t);let i=m(2);return E(i.onTemperatureStateChange())}),s()}if(e&2){let t=m(2);r(),Le(" ",c(2,7,"accessories.control.target_auto"),": ",ce(4,11,c(3,9,t.targetHeatingTemp),"1.0-1"),"\xB0",c(5,14,t.temperatureUnits)," "),r(5),f("min",t.HeatingThresholdTemperature.minValue)("max",t.HeatingThresholdTemperature.maxValue)("step",t.HeatingThresholdTemperature.minStep),G("ngModel",t.targetHeatingTemp)}}function Na(e,n){if(e&1){let t=O();o(0,"h6",14),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),s(),o(6,"nouislider",18),q("ngModelChange",function(i){M(t);let d=m(2);return z(d.targetCoolingTemp,i)||(d.targetCoolingTemp=i),E(i)}),y("ngModelChange",function(){M(t);let i=m(2);return E(i.onTemperatureStateChange())}),s()}if(e&2){let t=m(2);r(),Le(" ",c(2,7,"accessories.control.target_auto"),": ",ce(4,11,c(3,9,t.targetCoolingTemp),"1.0-1"),"\xB0",c(5,14,t.temperatureUnits)," "),r(5),f("min",t.CoolingThresholdTemperature.minValue)("max",t.CoolingThresholdTemperature.maxValue)("step",t.CoolingThresholdTemperature.minStep),G("ngModel",t.targetCoolingTemp)}}function Ra(e,n){if(e&1&&C(0,Ha,10,25)(1,Oa,7,16)(2,Na,7,16),e&2){let t=m();_(t.HeatingThresholdTemperature&&t.CoolingThresholdTemperature?0:t.HeatingThresholdTemperature&&!t.CoolingThresholdTemperature?1:!t.HeatingThresholdTemperature&&t.CoolingThresholdTemperature?2:-1)}}var Xi=(()=>{class e{$activeModal=D(Y);$settings=D(Te);service;type;temperatureUnits=this.$settings.env.temperatureUnits;targetState;targetMode;targetTemperatureChanged=new ee;targetStateValidValues=[];CoolingThresholdTemperature;HeatingThresholdTemperature;targetCoolingTemp;targetHeatingTemp;autoTemp;constructor(){this.targetTemperatureChanged.pipe(te(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(a=>{a.style.background="linear-gradient(to right, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))"})},10)}setTargetState(t,a){this.targetState=t,this.service.getCharacteristic("Active").setValue(this.targetState),this.loadTargetTemperature(),a.target.blur()}setTargetMode(t,a){this.targetMode=t,this.service.getCharacteristic("TargetHeaterCoolerState").setValue(this.targetMode),this.loadTargetTemperature(),a.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(a){return new(a||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service",type:"type"},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(a,i){a&1&&(o(0,"div",0)(1,"div",1),u(2,"h5",2),o(3,"button",3),l(4,"translate"),y("click",function(){return i.dismissModal()}),s()(),o(5,"div",4)(6,"h6",5),u(7,"i",6),p(8),l(9,"convertTemp"),l(10,"number"),l(11,"uppercase"),s(),o(12,"div",7),l(13,"translate"),o(14,"button",8),y("click",function(b){return i.setTargetState(0,b)}),o(15,"div",9),u(16,"i",10),s(),p(17),l(18,"translate"),o(19,"div",11),u(20,"i",12),s()(),o(21,"button",8),y("click",function(b){return i.setTargetState(1,b)}),o(22,"div",9),u(23,"i",10),s(),p(24),l(25,"translate"),o(26,"div",11),u(27,"i",12),s()()(),C(28,La,8,9),C(29,Ra,3,1),s(),u(30,"div",13),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,13,"form.button_close")),r(4),Ze("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"),r(),R("",ce(10,17,c(9,15,i.service.values.CurrentTemperature),"1.0-1"),"\xB0",c(11,20,i.temperatureUnits)," "),r(4),S("aria-label",c(13,22,"accessories.control.state_control")),r(4),f("ngClass",I(28,Je,i.targetState===0,i.targetState!==0)),r(),x(" ",c(18,24,"accessories.control.off")," "),r(6),f("ngClass",I(31,Je,i.targetState===1,i.targetState!==1)),r(),x(" ",c(25,26,"accessories.control.on")," "),r(4),_(i.targetStateValidValues.length?28:-1),r(),_(i.targetStateValidValues.includes(0)?29:-1))},dependencies:[V,Q,oe,re,ae,Ve,w,Ie,Ae],encapsulation:2})}return e})();var Wa=e=>({"accessory-on":e});function ja(e,n){if(e&1&&(A(),o(0,"text",23),p(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase"),s()),e&2){let t=m();r(),R(" ",ce(3,4,c(2,2,t.service.values.CurrentTemperature),"1.0-1"),"\xB0",c(4,7,t.temperatureUnits)," ")}}function $a(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.off")," ")}function Ua(e,n){if(e&1&&(u(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=m(2);r(),xi(" ",ce(3,6,c(2,4,t.service.values.HeatingThresholdTemperature),"1.0-1"),"\xB0",c(4,9,t.temperatureUnits)," - ",ce(6,13,c(5,11,t.service.values.CoolingThresholdTemperature),"1.0-1"),"\xB0",c(7,16,t.temperatureUnits)," ")}}function Ga(e,n){if(e&1&&(u(0,"i",26),p(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase")),e&2){let t=m(2);r(),R(" ",ce(3,4,c(2,2,t.service.values.HeatingThresholdTemperature),"1.0-1"),"\xB0",c(4,7,t.temperatureUnits)," ")}}function za(e,n){if(e&1&&(u(0,"i",26),p(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase")),e&2){let t=m(2);r(),R(" ",ce(3,4,c(2,2,t.service.values.CoolingThresholdTemperature),"1.0-1"),"\xB0",c(4,7,t.temperatureUnits)," ")}}function qa(e,n){if(e&1&&C(0,Ua,8,18)(1,Ga,5,9)(2,za,5,9),e&2){let t=m();_(t.hasHeating&&t.hasCooling?0:t.hasHeating&&!t.hasCooling?1:!t.hasHeating&&t.hasCooling?2:-1)}}function Za(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.heat")," ")}function Ka(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.cool")," ")}function Qa(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.on")," ")}var Ji=(()=>{class e{$modal=D(X);$settings=D(Te);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(Xi,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.type=this.type}}static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0),y("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3)(5,"defs")(6,"linearGradient",4)(7,"stop",5),u(8,"animate",6),s(),o(9,"stop",7),u(10,"animate",8),s(),o(11,"stop",9),u(12,"animate",6),s()(),o(13,"linearGradient",10)(14,"stop",11),u(15,"animate",12),s(),o(16,"stop",13),u(17,"animate",14),s(),o(18,"stop",15),u(19,"animate",12),s()()(),u(20,"rect",16)(21,"line",17)(22,"line",18)(23,"line",19)(24,"line",20)(25,"line",21)(26,"rect",22),C(27,ja,5,9,":svg:text",23),s()(),L(),o(28,"div",24),p(29),s(),o(30,"div",25),C(31,$a,2,3)(32,qa,3,1)(33,Za,2,3)(34,Ka,2,3)(35,Qa,2,3),s()()()),a&2&&(f("ngClass",j(8,Wa,i.service.values.Active||i.service.values.On)),r(2),S("aria-label",c(3,6,"accessories.core.heater_cooler")),r(24),S("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"),r(),_("CurrentTemperature"in i.service.values?27:-1),r(2),g(i.service.customName||i.service.serviceName),r(2),_("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:[U,V,Ve,w,Ie,Ae],encapsulation:2})}return e})();var et=(e,n)=>({"fa-check-circle":e,"fa-blank":n});function Ya(e,n){if(e&1){let t=O();o(0,"button",8),y("click",function(i){M(t);let d=m(2);return E(d.setTargetMode(0,i))}),o(1,"div",9),u(2,"i",10),s(),p(3),l(4,"translate"),o(5,"div",11),u(6,"i",12),s()()}if(e&2){let t=m(2);r(2),f("ngClass",I(4,et,t.targetMode===0,t.targetMode!==0)),r(),x(" ",c(4,2,"accessories.control.auto")," ")}}function Xa(e,n){if(e&1){let t=O();o(0,"button",8),y("click",function(i){M(t);let d=m(2);return E(d.setTargetMode(1,i))}),o(1,"div",9),u(2,"i",10),s(),p(3),l(4,"translate"),o(5,"div",11),u(6,"i",12),s()()}if(e&2){let t=m(2);r(2),f("ngClass",I(4,et,t.targetMode===1,t.targetMode!==1)),r(),x(" ",c(4,2,"accessories.control.humidify")," ")}}function Ja(e,n){if(e&1){let t=O();o(0,"button",8),y("click",function(i){M(t);let d=m(2);return E(d.setTargetMode(2,i))}),o(1,"div",9),u(2,"i",10),s(),p(3),l(4,"translate"),o(5,"div",11),u(6,"i",12),s()()}if(e&2){let t=m(2);r(2),f("ngClass",I(4,et,t.targetMode===2,t.targetMode!==2)),r(),x(" ",c(4,2,"accessories.control.dehumidify")," ")}}function es(e,n){if(e&1&&(o(0,"h6",14),p(1),l(2,"translate"),s(),o(3,"div",15),l(4,"translate"),C(5,Ya,7,7,"button",16),C(6,Xa,7,7,"button",16),C(7,Ja,7,7,"button",16),s()),e&2){let t=m();r(),g(c(2,5,"accessories.control.mode")),r(2),S("aria-label",c(4,7,"accessories.control.mode_control")),r(2),_(t.targetStateValidValues.includes(0)?5:-1),r(),_(t.targetStateValidValues.includes(1)?6:-1),r(),_(t.targetStateValidValues.includes(2)?7:-1)}}function ts(e,n){if(e&1){let t=O();o(0,"h6",14),p(1),l(2,"translate"),s(),o(3,"nouislider",17),q("ngModelChange",function(i){M(t);let d=m(2);return z(d.autoHumidity,i)||(d.autoHumidity=i),E(i)}),y("ngModelChange",function(){M(t);let i=m(2);return E(i.onAutoHumidityStateChange())}),s()}if(e&2){let t=m(2);r(),Le(" ",c(2,7,"accessories.control.target_auto"),": ",t.autoHumidity[0],"% - ",t.autoHumidity[1],"% "),r(2),f("min",t.RelativeHumidityHumidifierThreshold.minValue)("max",t.RelativeHumidityDehumidifierThreshold.maxValue)("step",t.RelativeHumidityDehumidifierThreshold.minStep),G("ngModel",t.autoHumidity)}}function is(e,n){if(e&1){let t=O();o(0,"h6",14),p(1),l(2,"translate"),s(),o(3,"nouislider",17),q("ngModelChange",function(i){M(t);let d=m(2);return z(d.targetHumidifierHumidity,i)||(d.targetHumidifierHumidity=i),E(i)}),y("ngModelChange",function(){M(t);let i=m(2);return E(i.onHumidityStateChange())}),s()}if(e&2){let t=m(2);r(),R("",c(2,6,"accessories.control.target_auto"),": ",t.targetHumidifierHumidity,"%"),r(2),f("min",t.RelativeHumidityHumidifierThreshold.minValue)("max",t.RelativeHumidityHumidifierThreshold.maxValue)("step",t.RelativeHumidityHumidifierThreshold.minStep),G("ngModel",t.targetHumidifierHumidity)}}function ns(e,n){if(e&1){let t=O();o(0,"h6",14),p(1),l(2,"translate"),s(),o(3,"nouislider",17),q("ngModelChange",function(i){M(t);let d=m(2);return z(d.targetDehumidifierHumidity,i)||(d.targetDehumidifierHumidity=i),E(i)}),y("ngModelChange",function(){M(t);let i=m(2);return E(i.onHumidityStateChange())}),s()}if(e&2){let t=m(2);r(),R("",c(2,6,"accessories.control.target_auto"),": ",t.targetDehumidifierHumidity,"%"),r(2),f("min",t.RelativeHumidityDehumidifierThreshold.minValue)("max",t.RelativeHumidityDehumidifierThreshold.maxValue)("step",t.RelativeHumidityDehumidifierThreshold.minStep),G("ngModel",t.targetDehumidifierHumidity)}}function os(e,n){if(e&1&&C(0,ts,4,9)(1,is,4,8)(2,ns,4,8),e&2){let t=m();_(t.RelativeHumidityHumidifierThreshold&&t.RelativeHumidityDehumidifierThreshold?0:t.RelativeHumidityHumidifierThreshold&&!t.RelativeHumidityDehumidifierThreshold?1:!t.RelativeHumidityHumidifierThreshold&&t.RelativeHumidityDehumidifierThreshold?2:-1)}}var en=(()=>{class e{$activeModal=D(Y);service;type;targetState;targetMode;targetHumidityChanged=new ee;targetStateValidValues=[];RelativeHumidityDehumidifierThreshold;RelativeHumidityHumidifierThreshold;targetDehumidifierHumidity;targetHumidifierHumidity;autoHumidity;constructor(){this.targetHumidityChanged.pipe(te(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(a=>{a.style.background="linear-gradient(to left, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))"})},10)}loadTargetHumidity(){this.targetDehumidifierHumidity=this.service.getCharacteristic("RelativeHumidityDehumidifierThreshold")?.value,this.targetHumidifierHumidity=this.service.getCharacteristic("RelativeHumidityHumidifierThreshold")?.value,this.autoHumidity=[this.targetHumidifierHumidity,this.targetDehumidifierHumidity]}setTargetState(t,a){this.targetState=t,this.service.getCharacteristic("Active").setValue(this.targetState),this.loadTargetHumidity(),a.target.blur()}setTargetMode(t,a){this.targetMode=t,this.service.getCharacteristic("TargetHumidifierDehumidifierState").setValue(this.targetMode),this.loadTargetHumidity(),a.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(a){return new(a||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service",type:"type"},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(a,i){a&1&&(o(0,"div",0)(1,"div",1),u(2,"h5",2),o(3,"button",3),l(4,"translate"),y("click",function(){return i.dismissModal()}),s()(),o(5,"div",4)(6,"h6",5),u(7,"i",6),p(8),s(),o(9,"div",7),l(10,"translate"),o(11,"button",8),y("click",function(b){return i.setTargetState(0,b)}),o(12,"div",9),u(13,"i",10),s(),p(14),l(15,"translate"),o(16,"div",11),u(17,"i",12),s()(),o(18,"button",8),y("click",function(b){return i.setTargetState(1,b)}),o(19,"div",9),u(20,"i",10),s(),p(21),l(22,"translate"),o(23,"div",11),u(24,"i",12),s()()(),C(25,es,8,9),C(26,os,3,1),s(),u(27,"div",13),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,12,"form.button_close")),r(4),Ze("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"),r(),x("",i.service.values.CurrentRelativeHumidity,"% "),r(),S("aria-label",c(10,14,"accessories.control.state_control")),r(4),f("ngClass",I(20,et,i.targetState===0,i.targetState!==0)),r(),x(" ",c(15,16,"accessories.control.off")," "),r(6),f("ngClass",I(23,et,i.targetState===1,i.targetState!==1)),r(),x(" ",c(22,18,"accessories.control.on")," "),r(4),_(i.targetStateValidValues.length?25:-1),r(),_(i.targetStateValidValues.includes(0)?26:-1))},dependencies:[V,Q,oe,re,ae,w],encapsulation:2})}return e})();var rs=e=>({"accessory-on":e});function as(e,n){if(e&1&&(A(),o(0,"text",36),p(1),s()),e&2){let t=m();r(),x(" ",t.service.values.CurrentRelativeHumidity,"% ")}}function ss(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.off")," ")}function ls(e,n){if(e&1&&(u(0,"i",39),p(1)),e&2){let t=m(2);r(),R(" ",t.service.values.RelativeHumidityHumidifierThreshold,"% - ",t.service.values.RelativeHumidityDehumidifierThreshold,"% ")}}function cs(e,n){if(e&1&&(u(0,"i",39),p(1)),e&2){let t=m(2);r(),x(" ",t.service.values.RelativeHumidityHumidifierThreshold,"% ")}}function ps(e,n){if(e&1&&(u(0,"i",39),p(1)),e&2){let t=m(2);r(),x(" ",t.service.values.RelativeHumidityDehumidifierThreshold,"% ")}}function ds(e,n){if(e&1&&C(0,ls,2,2)(1,cs,2,1)(2,ps,2,1),e&2){let t=m();_(t.hasHumidifier&&t.hasDehumidifier?0:t.hasHumidifier&&!t.hasDehumidifier?1:!t.hasHumidifier&&t.hasDehumidifier?2:-1)}}function ms(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.humidify")," ")}function us(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.dehumidify")," ")}function fs(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.on")," ")}function vs(e,n){if(e&1&&C(0,us,2,3)(1,fs,2,3),e&2){let t=m();_(t.service.values.TargetHumidifierDehumidifierState===2?0:1)}}var tn=(()=>{class e{$modal=D(X);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(en,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.type=this.type}}static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0),y("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3)(5,"defs")(6,"linearGradient",4)(7,"stop",5),u(8,"animate",6),s(),o(9,"stop",7),u(10,"animate",8),s(),o(11,"stop",9),u(12,"animate",6),s()(),o(13,"linearGradient",10)(14,"stop",11),u(15,"animate",12),s(),o(16,"stop",13),u(17,"animate",14),s(),o(18,"stop",15),u(19,"animate",12),s()()(),u(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),C(40,as,2,1,":svg:text",36),s()(),L(),o(41,"div",37),p(42),s(),o(43,"div",38),C(44,ss,2,3)(45,ds,3,1)(46,ms,2,3)(47,vs,2,1),s()()()),a&2&&(f("ngClass",j(8,rs,i.service.values.Active||i.service.values.On)),r(2),S("aria-label",c(3,6,"accessories.core.humidifier_dehumidifier")),r(37),S("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"),r(),_("CurrentRelativeHumidity"in i.service.values?40:-1),r(2),g(i.service.customName||i.service.serviceName),r(2),_("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:[U,V,w],encapsulation:2})}return e})();function gs(e,n){if(e&1&&p(0),e&2){let t=m();x(" ",t.service.values.CurrentRelativeHumidity,"% ")}}function hs(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.no_data")," ")}var nn=(()=>{class e{service;static \u0275fac=function(a){return new(a||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(a,i){a&1&&(fe(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),A(),fe(4,"svg",3),Ee(5,"rect",4),fe(6,"g",5),Ee(7,"path",6),Ce(),Ee(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),Ce()(),L(),fe(21,"div",20),p(22),Ce(),fe(23,"div",21),C(24,gs,1,1)(25,hs,2,3),Ce()()()),a&2&&(r(2),S("aria-label",c(3,3,"accessories.core.humidity_sensor")),r(20),g(i.service.customName||i.service.serviceName),r(2),_("CurrentRelativeHumidity"in i.service.values?24:25))},dependencies:[w],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 Cs=e=>({"accessory-on":e});function _s(e,n){e&1&&(o(0,"div",14),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.running")))}function xs(e,n){e&1&&(o(0,"div",14),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.off")))}var on=(()=>{class e{service;static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(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()(),L(),o(14,"div",13),p(15),s(),C(16,_s,3,3,"div",14)(17,xs,3,3,"div",14),s()()),a&2&&(f("ngClass",j(6,Cs,i.service.values.InUse)),r(2),S("aria-label",c(3,4,"accessories.core.irrigation_system")),r(13),x(" ",i.service.customName||i.service.values.ConfiguredName||i.service.serviceName," "),r(),_(i.service.values.InUse?16:17))},dependencies:[V,w],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 ys=e=>({"accessory-on":e});function ks(e,n){e&1&&(o(0,"div",23),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.detected")))}function Ss(e,n){e&1&&(o(0,"div",24),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.not_detected")))}var rn=(()=>{class e{service;static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(5,"rect",4),o(6,"g",5),u(7,"path",6),s(),o(8,"g",7),u(9,"path",6),s(),u(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()(),L(),o(24,"div",22),p(25),s(),C(26,ks,3,3,"div",23)(27,Ss,3,3,"div",24),s()()),a&2&&(f("ngClass",j(6,ys,i.service.values.LeakDetected)),r(2),S("aria-label",c(3,4,"accessories.core.leak_sensor")),r(23),g(i.service.customName||i.service.serviceName),r(),_(i.service.values.LeakDetected?26:27))},dependencies:[V,w],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 bs(e,n){if(e&1&&(fe(0,"div",28),p(1),l(2,"number"),Ce()),e&2){let t=m();r(),x("",ce(2,1,t.service.values.CurrentAmbientLightLevel,"0.1-1")," lux")}}function Ts(e,n){if(e&1&&(fe(0,"div",28),p(1),l(2,"number"),Ce()),e&2){let t=m();r(),x("",ce(2,1,t.service.values.CurrentAmbientLightLevel,"1.0-0")," lux")}}var an=(()=>{class e{service;static \u0275fac=function(a){return new(a||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(a,i){a&1&&(fe(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),A(),fe(4,"svg",3),Ee(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),Ce()(),L(),fe(28,"div",27),p(29),Ce(),C(30,bs,3,4,"div",28)(31,Ts,3,4,"div",28),Ce()()),a&2&&(r(2),S("aria-label",c(3,3,"accessories.core.light_sensor")),r(27),g(i.service.customName||i.service.serviceName),r(),_(i.service.values.CurrentAmbientLightLevel<1?30:31))},dependencies:[Ve,w],encapsulation:2})}return e})();var vt=(()=>{class e{miredToKelvin(t){return Math.round(1e6/t)}kelvinToMired(t){return Math.round(1e6/t)}kelvinToHsl(t){let a=t/100,i,d,b;a<=66?(i=255,d=Math.min(99.4708025861*Math.log(a)-161.1195681661,255),b=a<=19?0:Math.min(138.5177312231*Math.log(a-10)-305.0447927307,255)):(i=Math.min(329.698727446*(a-60)**-.1332047592,255),d=Math.min(288.1221695283*(a-60)**-.0755148492,255),b=255),i/=255,d/=255,b/=255;let Z=Math.max(i,d,b),ie=Math.min(i,d,b),W=Z-ie,K=0;W!==0&&(Z===i?K=(d-b)/W%6:Z===d?K=(b-i)/W+2:K=(i-d)/W+4,K=Math.round(K*60),K<0&&(K+=360));let pe=(Z+ie)/2,ye=W===0?0:W/(1-Math.abs(2*pe-1));return`hsl(${Math.round(K)}, ${Math.round(ye*100)}%, ${Math.round(pe*100)}%)`}static \u0275fac=function(a){return new(a||e)};static \u0275prov=si({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var sn=(e,n)=>({"fa-check-circle":e,"fa-blank":n}),ws=(e,n)=>({"off-text":e,"on-text":n}),Nt=(e,n)=>({"mb-1":e,"":n});function Ms(e,n){e&1&&u(0,"div")}function Es(e,n){if(e&1&&(o(0,"div",11)(1,"div",13)(2,"div",7),u(3,"i",14),s(),p(4),l(5,"translate"),o(6,"div",9),u(7,"i",10),s()()()),e&2){let t=m();r(3),f("ngClass",I(5,ws,!t.isAdaptiveLightingEnabled,t.isAdaptiveLightingEnabled)),r(),R(" ",c(5,3,"accessories.control.adaptive_lighting"),": ",t.isAdaptiveLightingEnabled?"ON":"OFF"," ")}}function Vs(e,n){if(e&1){let t=O();o(0,"h6",15),p(1),l(2,"translate"),s(),o(3,"nouislider",16),q("ngModelChange",function(i){M(t);let d=m();return z(d.targetBrightness.value,i)||(d.targetBrightness.value=i),E(i)}),y("ngModelChange",function(){M(t);let i=m();return E(i.onBrightnessStateChange())}),s()}if(e&2){let t=m();r(),R("",c(2,6,"accessories.control.brightness"),": ",t.targetBrightness.value,"%"),r(2),f("min",t.targetBrightness.min)("max",t.targetBrightness.max)("step",t.targetBrightness.step),G("ngModel",t.targetBrightness.value)}}function Bs(e,n){e&1&&(o(0,"div",18)(1,"span",19),p(2),l(3,"translate"),s()()),e&2&&(r(2),g(c(3,1,"accessories.control.adaptive_lighting_note")))}function As(e,n){if(e&1){let t=O();o(0,"h6",15),p(1),l(2,"translate"),s(),o(3,"nouislider",17),q("ngModelChange",function(i){M(t);let d=m();return z(d.targetHue.value,i)||(d.targetHue.value=i),E(i)}),y("ngModelChange",function(){M(t);let i=m();return E(i.onHueStateChange())}),s(),C(4,Bs,4,3,"div",18)}if(e&2){let t=m();r(),R("",c(2,8,"accessories.control.hue"),": ",t.targetHue.value,"\xB0"),r(2),f("min",0)("max",360)("step",1),G("ngModel",t.targetHue.value),f("ngClass",I(10,Nt,t.isAdaptiveLightingEnabled,!t.isAdaptiveLightingEnabled)),r(),_(t.isAdaptiveLightingEnabled?4:-1)}}function Is(e,n){e&1&&(o(0,"div",18)(1,"span",19),p(2),l(3,"translate"),s()()),e&2&&(r(2),g(c(3,1,"accessories.control.adaptive_lighting_note")))}function Ds(e,n){if(e&1){let t=O();o(0,"h6",15),p(1),l(2,"translate"),s(),o(3,"nouislider",17),q("ngModelChange",function(i){M(t);let d=m();return z(d.targetSaturation.value,i)||(d.targetSaturation.value=i),E(i)}),y("ngModelChange",function(){M(t);let i=m();return E(i.onSaturationStateChange())}),s(),C(4,Is,4,3,"div",18)}if(e&2){let t=m();r(),R("",c(2,8,"accessories.control.saturation"),": ",t.targetSaturation.value,"%"),r(2),f("min",0)("max",100)("step",1),G("ngModel",t.targetSaturation.value),f("ngClass",I(10,Nt,t.isAdaptiveLightingEnabled,!t.isAdaptiveLightingEnabled)),r(),_(t.isAdaptiveLightingEnabled?4:-1)}}function Fs(e,n){e&1&&(o(0,"div",18)(1,"span",19),p(2),l(3,"translate"),s()()),e&2&&(r(2),g(c(3,1,"accessories.control.adaptive_lighting_note")))}function Ps(e,n){if(e&1){let t=O();o(0,"h6",15),p(1),l(2,"translate"),l(3,"convertMired"),s(),o(4,"nouislider",17),q("ngModelChange",function(i){M(t);let d=m();return z(d.targetColorTemperature.value,i)||(d.targetColorTemperature.value=i),E(i)}),y("ngModelChange",function(){M(t);let i=m();return E(i.onColorTemperatureStateChange())}),s(),C(5,Fs,4,3,"div",18)}if(e&2){let t=m();r(),R(" ",c(2,8,"accessories.control.color_temperature"),": ",c(3,10,t.targetColorTemperature.mired)," "),r(3),f("min",t.targetColorTemperature.min)("max",t.targetColorTemperature.max)("step",t.targetColorTemperature.step),G("ngModel",t.targetColorTemperature.value),f("ngClass",I(12,Nt,t.isAdaptiveLightingEnabled,!t.isAdaptiveLightingEnabled)),r(),_(t.isAdaptiveLightingEnabled?5:-1)}}var ln=(()=>{class e{$activeModal=D(Y);$colour=D(vt);service;isAdaptiveLightingEnabled$;targetMode;targetBrightness;targetBrightnessChanged=new ee;targetHue;targetHueChanged=new ee;targetSaturation;targetSaturationChanged=new ee;targetColorTemperature;targetColorTemperatureChanged=new ee;hasAdaptiveLighting=!1;isAdaptiveLightingEnabled=!1;sliderIndex=0;constructor(){this.targetBrightnessChanged.pipe(te(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(te(500)).subscribe(()=>{this.service.getCharacteristic("Hue").setValue(this.targetHue.value)}),this.targetSaturationChanged.pipe(te(500)).subscribe(()=>{this.service.getCharacteristic("Saturation").setValue(this.targetSaturation.value)}),this.targetColorTemperatureChanged.pipe(te(500)).subscribe(t=>{this.service.getCharacteristic("ColorTemperature").setValue(t)})}ngOnInit(){this.targetMode=this.service.values.On,this.loadTargetBrightness(),this.loadTargetHue(),this.loadTargetSaturation(),this.loadTargetColorTemperature()}setTargetMode(t,a){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),a.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 a=this.targetHue.value;t.style.background=`linear-gradient(to right,
1
+ import{a as Ti,b as Ie,c as He}from"./chunk-3HBGELYS.js";import{m as Y,n as X}from"./chunk-5SJKGEVE.js";import{B as Q,a as bi,e as oe,l as re}from"./chunk-PJNMYOLO.js";import{b as Te}from"./chunk-2FJR6XQC.js";import{l as w}from"./chunk-WLYALIGF.js";import{$b as g,Ab as fe,Bb as Ce,Bc as Ft,Ca as li,Cb as Ee,Db as hi,Eb as Ci,Fa as ci,H as ni,Ib as O,J as oi,La as qe,Lb as y,Nb as m,P as te,Qa as r,Rc as V,Sa as We,T as ri,Ta as pi,Xb as Ze,Xc as Ae,Yb as _i,Za as di,_a as at,_b as p,_c as Ve,ac as x,bc as R,cc as Le,db as T,dc as xi,ec as st,fb as mi,fc as G,gb as ui,gc as z,ha as ai,hc as q,ia as si,kc as yi,lc as he,mc as j,n as ee,na as D,nc as I,o as ii,oc as lt,pb as S,pc as ct,qb as C,qc as ki,rb as _,rc as Si,sa as M,sc as l,ta as E,tb as fi,tc as c,ua as A,ub as vi,uc as ce,va as L,vb as gi,wb as f,xb as o,yb as s,zb as u}from"./chunk-EQP5UP7Q.js";var je=(function(e){return e.Range="range",e.Steps="steps",e.Positions="positions",e.Count="count",e.Values="values",e})(je||{}),we=(function(e){return e[e.None=-1]="None",e[e.NoValue=0]="NoValue",e[e.LargeValue=1]="LargeValue",e[e.SmallValue=2]="SmallValue",e})(we||{});function _o(e){return dt(e)&&typeof e.from=="function"}function dt(e){return typeof e=="object"&&typeof e.to=="function"}function wi(e){e.parentElement.removeChild(e)}function Pt(e){return e!=null}function Mi(e){e.preventDefault()}function xo(e){return e.filter(function(n){return this[n]?!1:this[n]=!0},{})}function yo(e,n){return Math.round(e/n)*n}function ko(e,n){var t=e.getBoundingClientRect(),a=e.ownerDocument,i=a.documentElement,d=Ai(a);return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(d.x=0),n?t.top+d.y-i.clientTop:t.left+d.x-i.clientLeft}function Be(e){return typeof e=="number"&&!isNaN(e)&&isFinite(e)}function Ei(e,n,t){t>0&&(Se(e,n),setTimeout(function(){pt(e,n)},t))}function Vi(e){return Math.max(Math.min(e,100),0)}function mt(e){return Array.isArray(e)?e:[e]}function So(e){e=String(e);var n=e.split(".");return n.length>1?n[1].length:0}function Se(e,n){e.classList&&!/\s/.test(n)?e.classList.add(n):e.className+=" "+n}function pt(e,n){e.classList&&!/\s/.test(n)?e.classList.remove(n):e.className=e.className.replace(new RegExp("(^|\\b)"+n.split(" ").join("|")+"(\\b|$)","gi")," ")}function bo(e,n){return e.classList?e.classList.contains(n):new RegExp("\\b"+n+"\\b").test(e.className)}function Ai(e){var n=window.pageXOffset!==void 0,t=(e.compatMode||"")==="CSS1Compat",a=n?window.pageXOffset:t?e.documentElement.scrollLeft:e.body.scrollLeft,i=n?window.pageYOffset:t?e.documentElement.scrollTop:e.body.scrollTop;return{x:a,y:i}}function To(){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 wo(){var e=!1;try{var n=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,n)}catch{}return e}function Mo(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function Ht(e,n){return 100/(n-e)}function Lt(e,n,t){return n*100/(e[t+1]-e[t])}function Eo(e,n){return Lt(e,e[0]<0?n+Math.abs(e[0]):n-e[0],0)}function Vo(e,n){return n*(e[1]-e[0])/100+e[0]}function Xe(e,n){for(var t=1;e>=n[t];)t+=1;return t}function Bo(e,n,t){if(t>=e.slice(-1)[0])return 100;var a=Xe(t,e),i=e[a-1],d=e[a],b=n[a-1],Z=n[a];return b+Eo([i,d],t)/Ht(b,Z)}function Ao(e,n,t){if(t>=100)return e.slice(-1)[0];var a=Xe(t,n),i=e[a-1],d=e[a],b=n[a-1],Z=n[a];return Vo([i,d],(t-b)*Ht(b,Z))}function Io(e,n,t,a){if(a===100)return a;var i=Xe(a,e),d=e[i-1],b=e[i];return t?a-d>(b-d)/2?b:d:n[i-1]?e[i-1]+yo(a-e[i-1],n[i-1]):a}var Do=(function(){function e(n,t,a){this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[a||!1],this.xNumSteps=[!1],this.snap=t;var i,d=[];for(Object.keys(n).forEach(function(b){d.push([mt(n[b]),b])}),d.sort(function(b,Z){return b[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(n){for(var t=[],a=0;a<this.xNumSteps.length-1;a++)t[a]=Lt(this.xVal,n,a);return t},e.prototype.getAbsoluteDistance=function(n,t,a){var i=0;if(n<this.xPct[this.xPct.length-1])for(;n>this.xPct[i+1];)i++;else n===this.xPct[this.xPct.length-1]&&(i=this.xPct.length-2);!a&&n===this.xPct[i+1]&&i++,t===null&&(t=[]);var d,b=1,Z=t[i],ie=0,W=0,K=0,pe=0;for(a?d=(n-this.xPct[i])/(this.xPct[i+1]-this.xPct[i]):d=(this.xPct[i+1]-n)/(this.xPct[i+1]-this.xPct[i]);Z>0;)ie=this.xPct[i+1+pe]-this.xPct[i+pe],t[i+pe]*b+100-d*100>100?(W=ie*d,b=(Z-100*d)/t[i+pe],d=1):(W=t[i+pe]*ie/100*b,b=0),a?(K=K-W,this.xPct.length+pe>=1&&pe--):(K=K+W,this.xPct.length-pe>=1&&pe++),Z=t[i+pe]*b;return n+K},e.prototype.toStepping=function(n){return n=Bo(this.xVal,this.xPct,n),n},e.prototype.fromStepping=function(n){return Ao(this.xVal,this.xPct,n)},e.prototype.getStep=function(n){return n=Io(this.xPct,this.xSteps,this.snap,n),n},e.prototype.getDefaultStep=function(n,t,a){var i=Xe(n,this.xPct);return(n===100||t&&n===this.xPct[i-1])&&(i=Math.max(i-1,1)),(this.xVal[i]-this.xVal[i-1])/a},e.prototype.getNearbySteps=function(n){var t=Xe(n,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 n=this.xNumSteps.map(So);return Math.max.apply(null,n)},e.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},e.prototype.convert=function(n){return this.getStep(this.toStepping(n))},e.prototype.handleEntryPoint=function(n,t){var a;if(n==="min"?a=0:n==="max"?a=100:a=parseFloat(n),!Be(a)||!Be(t[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(a),this.xVal.push(t[0]);var i=Number(t[1]);a?this.xSteps.push(isNaN(i)?!1:i):isNaN(i)||(this.xSteps[0]=i),this.xHighestCompleteStep.push(0)},e.prototype.handleStepPoint=function(n,t){if(t){if(this.xVal[n]===this.xVal[n+1]){this.xSteps[n]=this.xHighestCompleteStep[n]=this.xVal[n];return}this.xSteps[n]=Lt([this.xVal[n],this.xVal[n+1]],t,0)/Ht(this.xPct[n],this.xPct[n+1]);var a=(this.xVal[n+1]-this.xVal[n])/this.xNumSteps[n],i=Math.ceil(Number(a.toFixed(3))-1),d=this.xVal[n]+this.xNumSteps[n]*i;this.xHighestCompleteStep[n]=d}},e})(),Bi={to:function(e){return e===void 0?"":e.toFixed(2)},from:Number},Fo={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"},Oe={tooltips:".__tooltips",aria:".__aria"};function Po(e,n){if(!Be(n))throw new Error("noUiSlider: 'step' is not numeric.");e.singleStep=n}function Lo(e,n){if(!Be(n))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");e.keyboardPageMultiplier=n}function Ho(e,n){if(!Be(n))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");e.keyboardMultiplier=n}function Oo(e,n){if(!Be(n))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");e.keyboardDefaultStep=n}function No(e,n){if(typeof n!="object"||Array.isArray(n))throw new Error("noUiSlider: 'range' is not an object.");if(n.min===void 0||n.max===void 0)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");e.spectrum=new Do(n,e.snap||!1,e.singleStep)}function Ro(e,n){if(n=mt(n),!Array.isArray(n)||!n.length)throw new Error("noUiSlider: 'start' option is incorrect.");e.handles=n.length,e.start=n}function Wo(e,n){if(typeof n!="boolean")throw new Error("noUiSlider: 'snap' option must be a boolean.");e.snap=n}function jo(e,n){if(typeof n!="boolean")throw new Error("noUiSlider: 'animate' option must be a boolean.");e.animate=n}function $o(e,n){if(typeof n!="number")throw new Error("noUiSlider: 'animationDuration' option must be a number.");e.animationDuration=n}function Ii(e,n){var t=[!1],a;if(n==="lower"?n=[!0,!1]:n==="upper"&&(n=[!1,!0]),n===!0||n===!1){for(a=1;a<e.handles;a++)t.push(n);t.push(!1)}else{if(!Array.isArray(n)||!n.length||n.length!==e.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");t=n}e.connect=t}function Uo(e,n){switch(n){case"horizontal":e.ort=0;break;case"vertical":e.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function Di(e,n){if(!Be(n))throw new Error("noUiSlider: 'margin' option must be numeric.");n!==0&&(e.margin=e.spectrum.getDistance(n))}function Go(e,n){if(!Be(n))throw new Error("noUiSlider: 'limit' option must be numeric.");if(e.limit=e.spectrum.getDistance(n),!e.limit||e.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.")}function zo(e,n){var t;if(!Be(n)&&!Array.isArray(n))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(n)&&!(n.length===2||Be(n[0])||Be(n[1])))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(n!==0){for(Array.isArray(n)||(n=[n,n]),e.padding=[e.spectrum.getDistance(n[0]),e.spectrum.getDistance(n[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 a=n[0]+n[1],i=e.spectrum.xVal[0],d=e.spectrum.xVal[e.spectrum.xVal.length-1];if(a/(d-i)>1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function qo(e,n){switch(n){case"ltr":e.dir=0;break;case"rtl":e.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function Zo(e,n){if(typeof n!="string")throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var t=n.indexOf("tap")>=0,a=n.indexOf("drag")>=0,i=n.indexOf("fixed")>=0,d=n.indexOf("snap")>=0,b=n.indexOf("hover")>=0,Z=n.indexOf("unconstrained")>=0,ie=n.indexOf("invert-connects")>=0,W=n.indexOf("drag-all")>=0,K=n.indexOf("smooth-steps")>=0;if(i){if(e.handles!==2)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");Di(e,e.start[1]-e.start[0])}if(ie&&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:a,dragAll:W,smoothSteps:K,fixed:i,snap:d,hover:b,unconstrained:Z,invertConnects:ie}}function Ko(e,n){if(n!==!1)if(n===!0||dt(n)){e.tooltips=[];for(var t=0;t<e.handles;t++)e.tooltips.push(n)}else{if(n=mt(n),n.length!==e.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");n.forEach(function(a){if(typeof a!="boolean"&&!dt(a))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")}),e.tooltips=n}}function Qo(e,n){if(n.length!==e.handles)throw new Error("noUiSlider: must pass a attributes for all handles.");e.handleAttributes=n}function Yo(e,n){if(!dt(n))throw new Error("noUiSlider: 'ariaFormat' requires 'to' method.");e.ariaFormat=n}function Xo(e,n){if(!_o(n))throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");e.format=n}function Jo(e,n){if(typeof n!="boolean")throw new Error("noUiSlider: 'keyboardSupport' option must be a boolean.");e.keyboardSupport=n}function er(e,n){e.documentElement=n}function tr(e,n){if(typeof n!="string"&&n!==!1)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");e.cssPrefix=n}function ir(e,n){if(typeof n!="object")throw new Error("noUiSlider: 'cssClasses' must be an object.");typeof e.cssPrefix=="string"?(e.cssClasses={},Object.keys(n).forEach(function(t){e.cssClasses[t]=e.cssPrefix+n[t]})):e.cssClasses=n}function Fi(e){var n={margin:null,limit:null,padding:null,animate:!0,animationDuration:300,ariaFormat:Bi,format:Bi},t={step:{r:!1,t:Po},keyboardPageMultiplier:{r:!1,t:Lo},keyboardMultiplier:{r:!1,t:Ho},keyboardDefaultStep:{r:!1,t:Oo},start:{r:!0,t:Ro},connect:{r:!0,t:Ii},direction:{r:!0,t:qo},snap:{r:!1,t:Wo},animate:{r:!1,t:jo},animationDuration:{r:!1,t:$o},range:{r:!0,t:No},orientation:{r:!1,t:Uo},margin:{r:!1,t:Di},limit:{r:!1,t:Go},padding:{r:!1,t:zo},behaviour:{r:!0,t:Zo},ariaFormat:{r:!1,t:Yo},format:{r:!1,t:Xo},tooltips:{r:!1,t:Ko},keyboardSupport:{r:!0,t:Jo},documentElement:{r:!1,t:er},cssPrefix:{r:!0,t:tr},cssClasses:{r:!0,t:ir},handleAttributes:{r:!1,t:Qo}},a={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:Fo,keyboardPageMultiplier:5,keyboardMultiplier:1,keyboardDefaultStep:10};e.format&&!e.ariaFormat&&(e.ariaFormat=e.format),Object.keys(t).forEach(function(ie){if(!Pt(e[ie])&&a[ie]===void 0){if(t[ie].r)throw new Error("noUiSlider: '"+ie+"' is required.");return}t[ie].t(n,Pt(e[ie])?e[ie]:a[ie])}),n.pips=e.pips;var i=document.createElement("div"),d=i.style.msTransform!==void 0,b=i.style.transform!==void 0;n.transformRule=b?"transform":d?"msTransform":"webkitTransform";var Z=[["left","top"],["right","bottom"]];return n.style=Z[n.dir][n.ort],n}function nr(e,n,t){var a=To(),i=Mo(),d=i&&wo(),b=e,Z,ie,W,K,pe,ye,J=n.spectrum,De=[],de=[],be=[],_t=0,Fe={},Ke=!1,ze=e.ownerDocument,tt=n.documentElement||ze.documentElement,it=ze.body,Gn=ze.dir==="rtl"||n.ort===1?0:100;function Pe(v,h){var k=ze.createElement("div");return h&&Se(k,h),v.appendChild(k),k}function zn(v,h){var k=Pe(v,n.cssClasses.origin),B=Pe(k,n.cssClasses.handle);if(Pe(B,n.cssClasses.touchArea),B.setAttribute("data-handle",String(h)),n.keyboardSupport&&(B.setAttribute("tabindex","0"),B.addEventListener("keydown",function(P){return lo(P,h)})),n.handleAttributes!==void 0){var F=n.handleAttributes[h];Object.keys(F).forEach(function(P){B.setAttribute(P,F[P])})}return B.setAttribute("role","slider"),B.setAttribute("aria-orientation",n.ort?"vertical":"horizontal"),h===0?Se(B,n.cssClasses.handleLower):h===n.handles-1&&Se(B,n.cssClasses.handleUpper),k.handle=B,k}function xt(v,h){return h?Pe(v,n.cssClasses.connect):!1}function qn(v,h){ie=Pe(h,n.cssClasses.connects),W=[],K=[],K.push(xt(ie,v[0]));for(var k=0;k<n.handles;k++)W.push(zn(h,k)),be[k]=k,K.push(xt(ie,v[k+1]))}function Zn(v){Se(v,n.cssClasses.target),n.dir===0?Se(v,n.cssClasses.ltr):Se(v,n.cssClasses.rtl),n.ort===0?Se(v,n.cssClasses.horizontal):Se(v,n.cssClasses.vertical);var h=getComputedStyle(v).direction;return h==="rtl"?Se(v,n.cssClasses.textDirectionRtl):Se(v,n.cssClasses.textDirectionLtr),Pe(v,n.cssClasses.base)}function Kn(v,h){return!n.tooltips||!n.tooltips[h]?!1:Pe(v.firstChild,n.cssClasses.tooltip)}function Wt(){return b.hasAttribute("disabled")}function yt(v){var h=W[v];return h.hasAttribute("disabled")}function Qn(v){v!=null?(W[v].setAttribute("disabled",""),W[v].handle.removeAttribute("tabindex")):(b.setAttribute("disabled",""),W.forEach(function(h){h.handle.removeAttribute("tabindex")}))}function Yn(v){v!=null?(W[v].removeAttribute("disabled"),W[v].handle.setAttribute("tabindex","0")):(b.removeAttribute("disabled"),W.forEach(function(h){h.removeAttribute("disabled"),h.handle.setAttribute("tabindex","0")}))}function kt(){ye&&(Qe("update"+Oe.tooltips),ye.forEach(function(v){v&&wi(v)}),ye=null)}function jt(){kt(),ye=W.map(Kn),Mt("update"+Oe.tooltips,function(v,h,k){if(!(!ye||!n.tooltips)&&ye[h]!==!1){var B=v[h];n.tooltips[h]!==!0&&(B=n.tooltips[h].to(k[h])),ye[h].innerHTML=B}})}function Xn(){Qe("update"+Oe.aria),Mt("update"+Oe.aria,function(v,h,k,B,F){be.forEach(function(P){var $=W[P],H=nt(de,P,0,!0,!0,!0),se=nt(de,P,100,!0,!0,!0),le=F[P],me=String(n.ariaFormat.to(k[P]));H=J.fromStepping(H).toFixed(1),se=J.fromStepping(se).toFixed(1),le=J.fromStepping(le).toFixed(1),$.children[0].setAttribute("aria-valuemin",H),$.children[0].setAttribute("aria-valuemax",se),$.children[0].setAttribute("aria-valuenow",le),$.children[0].setAttribute("aria-valuetext",me)})})}function Jn(v){if(v.mode===je.Range||v.mode===je.Steps)return J.xVal;if(v.mode===je.Count){if(v.values<2)throw new Error("noUiSlider: 'values' (>= 2) required for mode 'count'.");for(var h=v.values-1,k=100/h,B=[];h--;)B[h]=h*k;return B.push(100),$t(B,v.stepped)}return v.mode===je.Positions?$t(v.values,v.stepped):v.mode===je.Values?v.stepped?v.values.map(function(F){return J.fromStepping(J.getStep(J.toStepping(F)))}):v.values:[]}function $t(v,h){return v.map(function(k){return J.fromStepping(h?J.getStep(k):k)})}function eo(v){function h(le,me){return Number((le+me).toFixed(7))}var k=Jn(v),B={},F=J.xVal[0],P=J.xVal[J.xVal.length-1],$=!1,H=!1,se=0;return k=xo(k.slice().sort(function(le,me){return le-me})),k[0]!==F&&(k.unshift(F),$=!0),k[k.length-1]!==P&&(k.push(P),H=!0),k.forEach(function(le,me){var ue,ne,ge,ke=le,_e=k[me+1],xe,Bt,At,It,Jt,Dt,ei,ti=v.mode===je.Steps;for(ti&&(ue=J.xNumSteps[me]),ue||(ue=_e-ke),_e===void 0&&(_e=ke),ue=Math.max(ue,1e-7),ne=ke;ne<=_e;ne=h(ne,ue)){for(xe=J.toStepping(ne),Bt=xe-se,Jt=Bt/(v.density||1),Dt=Math.round(Jt),ei=Bt/Dt,ge=1;ge<=Dt;ge+=1)At=se+ge*ei,B[At.toFixed(5)]=[J.fromStepping(At),0];It=k.indexOf(ne)>-1?we.LargeValue:ti?we.SmallValue:we.NoValue,!me&&$&&ne!==_e&&(It=0),ne===_e&&H||(B[xe.toFixed(5)]=[ne,It]),se=xe}}),B}function to(v,h,k){var B,F,P=ze.createElement("div"),$=(B={},B[we.None]="",B[we.NoValue]=n.cssClasses.valueNormal,B[we.LargeValue]=n.cssClasses.valueLarge,B[we.SmallValue]=n.cssClasses.valueSub,B),H=(F={},F[we.None]="",F[we.NoValue]=n.cssClasses.markerNormal,F[we.LargeValue]=n.cssClasses.markerLarge,F[we.SmallValue]=n.cssClasses.markerSub,F),se=[n.cssClasses.valueHorizontal,n.cssClasses.valueVertical],le=[n.cssClasses.markerHorizontal,n.cssClasses.markerVertical];Se(P,n.cssClasses.pips),Se(P,n.ort===0?n.cssClasses.pipsHorizontal:n.cssClasses.pipsVertical);function me(ne,ge){var ke=ge===n.cssClasses.value,_e=ke?se:le,xe=ke?$:H;return ge+" "+_e[n.ort]+" "+xe[ne]}function ue(ne,ge,ke){if(ke=h?h(ge,ke):ke,ke!==we.None){var _e=Pe(P,!1);_e.className=me(ke,n.cssClasses.marker),_e.style[n.style]=ne+"%",ke>we.NoValue&&(_e=Pe(P,!1),_e.className=me(ke,n.cssClasses.value),_e.setAttribute("data-value",String(ge)),_e.style[n.style]=ne+"%",_e.innerHTML=String(k.to(ge)))}}return Object.keys(v).forEach(function(ne){ue(ne,v[ne][0],v[ne][1])}),P}function St(){pe&&(wi(pe),pe=null)}function bt(v){St();var h=eo(v),k=v.filter,B=v.format||{to:function(F){return String(Math.round(F))}};return pe=b.appendChild(to(h,k,B)),pe}function Ut(){var v=Z.getBoundingClientRect(),h="offset"+["Width","Height"][n.ort];return n.ort===0?v.width||Z[h]:v.height||Z[h]}function Ne(v,h,k,B){var F=function($){var H=io($,B.pageOffset,B.target||h);if(!H||Wt()&&!B.doNotReject||bo(b,n.cssClasses.tap)&&!B.doNotReject||v===a.start&&H.buttons!==void 0&&H.buttons>1||B.hover&&H.buttons)return!1;d||H.preventDefault(),H.calcPoint=H.points[n.ort],k(H,B)},P=[];return v.split(" ").forEach(function($){h.addEventListener($,F,d?{passive:!0}:!1),P.push([$,F])}),P}function io(v,h,k){var B=v.type.indexOf("touch")===0,F=v.type.indexOf("mouse")===0,P=v.type.indexOf("pointer")===0,$=0,H=0;if(v.type.indexOf("MSPointer")===0&&(P=!0),v.type==="mousedown"&&!v.buttons&&!v.touches)return!1;if(B){var se=function(ue){var ne=ue.target;return ne===k||k.contains(ne)||v.composed&&v.composedPath().shift()===k};if(v.type==="touchstart"){var le=Array.prototype.filter.call(v.touches,se);if(le.length>1)return!1;$=le[0].pageX,H=le[0].pageY}else{var me=Array.prototype.find.call(v.changedTouches,se);if(!me)return!1;$=me.pageX,H=me.pageY}}return h=h||Ai(ze),(F||P)&&($=v.clientX+h.x,H=v.clientY+h.y),v.pageOffset=h,v.points=[$,H],v.cursor=F||P,v}function Gt(v){var h=v-ko(Z,n.ort),k=h*100/Ut();return k=Vi(k),n.dir?100-k:k}function no(v){var h=100,k=!1;return W.forEach(function(B,F){if(!yt(F)){var P=de[F],$=Math.abs(P-v),H=$===100&&h===100,se=$<h,le=$<=h&&v>P;(se||le||H)&&(k=F,h=$)}}),k}function oo(v,h){v.type==="mouseout"&&v.target.nodeName==="HTML"&&v.relatedTarget===null&&Tt(v,h)}function ro(v,h){if(navigator.appVersion.indexOf("MSIE 9")===-1&&v.buttons===0&&h.buttonsProperty!==0)return Tt(v,h);var k=(n.dir?-1:1)*(v.calcPoint-h.startCalcPoint),B=k*100/h.baseSize;qt(k>0,B,h.locations,h.handleNumbers,h.connect)}function Tt(v,h){h.handle&&(pt(h.handle,n.cssClasses.active),_t-=1),h.listeners.forEach(function(k){tt.removeEventListener(k[0],k[1])}),_t===0&&(pt(b,n.cssClasses.drag),Vt(),v.cursor&&(it.style.cursor="",it.removeEventListener("selectstart",Mi))),n.events.smoothSteps&&(h.handleNumbers.forEach(function(k){Re(k,de[k],!0,!0,!1,!1)}),h.handleNumbers.forEach(function(k){ve("update",k)})),h.handleNumbers.forEach(function(k){ve("change",k),ve("set",k),ve("end",k)})}function wt(v,h){if(!h.handleNumbers.some(yt)){var k;if(h.handleNumbers.length===1){var B=W[h.handleNumbers[0]];k=B.children[0],_t+=1,Se(k,n.cssClasses.active)}v.stopPropagation();var F=[],P=Ne(a.move,tt,ro,{target:v.target,handle:k,connect:h.connect,listeners:F,startCalcPoint:v.calcPoint,baseSize:Ut(),pageOffset:v.pageOffset,handleNumbers:h.handleNumbers,buttonsProperty:v.buttons,locations:de.slice()}),$=Ne(a.end,tt,Tt,{target:v.target,handle:k,listeners:F,doNotReject:!0,handleNumbers:h.handleNumbers}),H=Ne("mouseout",tt,oo,{target:v.target,handle:k,listeners:F,doNotReject:!0,handleNumbers:h.handleNumbers});F.push.apply(F,P.concat($,H)),v.cursor&&(it.style.cursor=getComputedStyle(v.target).cursor,W.length>1&&Se(b,n.cssClasses.drag),it.addEventListener("selectstart",Mi,!1)),h.handleNumbers.forEach(function(se){ve("start",se)})}}function ao(v){v.stopPropagation();var h=Gt(v.calcPoint),k=no(h);k!==!1&&(n.events.snap||Ei(b,n.cssClasses.tap,n.animationDuration),Re(k,h,!0,!0),Vt(),ve("slide",k,!0),ve("update",k,!0),n.events.snap?wt(v,{handleNumbers:[k]}):(ve("change",k,!0),ve("set",k,!0)))}function so(v){var h=Gt(v.calcPoint),k=J.getStep(h),B=J.fromStepping(k);Object.keys(Fe).forEach(function(F){F.split(".")[0]==="hover"&&Fe[F].forEach(function(P){P.call(rt,B)})})}function lo(v,h){if(Wt()||yt(h))return!1;var k=["Left","Right"],B=["Down","Up"],F=["PageDown","PageUp"],P=["Home","End"];n.dir&&!n.ort?k.reverse():n.ort&&!n.dir&&(B.reverse(),F.reverse());var $=v.key.replace("Arrow",""),H=$===F[0],se=$===F[1],le=$===B[0]||$===k[0]||H,me=$===B[1]||$===k[1]||se,ue=$===P[0],ne=$===P[1];if(!le&&!me&&!ue&&!ne)return!0;v.preventDefault();var ge;if(me||le){var ke=le?0:1,_e=Yt(h),xe=_e[ke];if(xe===null)return!1;xe===!1&&(xe=J.getDefaultStep(de[h],le,n.keyboardDefaultStep)),se||H?xe*=n.keyboardPageMultiplier:xe*=n.keyboardMultiplier,xe=Math.max(xe,1e-7),xe=(le?-1:1)*xe,ge=De[h]+xe}else ne?ge=n.spectrum.xVal[n.spectrum.xVal.length-1]:ge=n.spectrum.xVal[0];return Re(h,J.toStepping(ge),!0,!0),ve("slide",h),ve("update",h),ve("change",h),ve("set",h),!1}function zt(v){v.fixed||W.forEach(function(h,k){Ne(a.start,h.children[0],wt,{handleNumbers:[k]})}),v.tap&&Ne(a.start,Z,ao,{}),v.hover&&Ne(a.move,Z,so,{hover:!0}),v.drag&&K.forEach(function(h,k){if(!(h===!1||k===0||k===K.length-1)){var B=W[k-1],F=W[k],P=[h],$=[B,F],H=[k-1,k];Se(h,n.cssClasses.draggable),v.fixed&&(P.push(B.children[0]),P.push(F.children[0])),v.dragAll&&($=W,H=be),P.forEach(function(se){Ne(a.start,se,wt,{handles:$,handleNumbers:H,connect:h})})}})}function Mt(v,h){Fe[v]=Fe[v]||[],Fe[v].push(h),v.split(".")[0]==="update"&&W.forEach(function(k,B){ve("update",B)})}function co(v){return v===Oe.aria||v===Oe.tooltips}function Qe(v){var h=v&&v.split(".")[0],k=h?v.substring(h.length):v;Object.keys(Fe).forEach(function(B){var F=B.split(".")[0],P=B.substring(F.length);(!h||h===F)&&(!k||k===P)&&(!co(P)||k===P)&&delete Fe[B]})}function ve(v,h,k){Object.keys(Fe).forEach(function(B){var F=B.split(".")[0];v===F&&Fe[B].forEach(function(P){P.call(rt,De.map(n.format.to),h,De.slice(),k||!1,de.slice(),rt)})})}function nt(v,h,k,B,F,P,$){var H;return W.length>1&&!n.events.unconstrained&&(B&&h>0&&(H=J.getAbsoluteDistance(v[h-1],n.margin,!1),k=Math.max(k,H)),F&&h<W.length-1&&(H=J.getAbsoluteDistance(v[h+1],n.margin,!0),k=Math.min(k,H))),W.length>1&&n.limit&&(B&&h>0&&(H=J.getAbsoluteDistance(v[h-1],n.limit,!1),k=Math.min(k,H)),F&&h<W.length-1&&(H=J.getAbsoluteDistance(v[h+1],n.limit,!0),k=Math.max(k,H))),n.padding&&(h===0&&(H=J.getAbsoluteDistance(0,n.padding[0],!1),k=Math.max(k,H)),h===W.length-1&&(H=J.getAbsoluteDistance(100,n.padding[1],!0),k=Math.min(k,H))),$||(k=J.getStep(k)),k=Vi(k),k===v[h]&&!P?!1:k}function Et(v,h){var k=n.ort;return(k?h:v)+", "+(k?v:h)}function qt(v,h,k,B,F){var P=k.slice(),$=B[0],H=n.events.smoothSteps,se=[!v,v],le=[v,!v];B=B.slice(),v&&B.reverse(),B.length>1?B.forEach(function(ue,ne){var ge=nt(P,ue,P[ue]+h,se[ne],le[ne],!1,H);ge===!1?h=0:(h=ge-P[ue],P[ue]=ge)}):se=le=[!0];var me=!1;B.forEach(function(ue,ne){me=Re(ue,k[ue]+h,se[ne],le[ne],!1,H)||me}),me&&(B.forEach(function(ue){ve("update",ue),ve("slide",ue)}),F!=null&&ve("drag",$))}function Zt(v,h){return n.dir?100-v-h:v}function po(v,h){de[v]=h,De[v]=J.fromStepping(h);var k=Zt(h,0)-Gn,B="translate("+Et(k+"%","0")+")";if(W[v].style[n.transformRule]=B,n.events.invertConnects&&de.length>1){var F=de.every(function(P,$,H){return $===0||P>=H[$-1]});if(Ke!==!F){ho();return}}Ye(v),Ye(v+1),Ke&&(Ye(v-1),Ye(v+2))}function Vt(){be.forEach(function(v){var h=de[v]>50?-1:1,k=3+(W.length+h*v);W[v].style.zIndex=String(k)})}function Re(v,h,k,B,F,P){return F||(h=nt(de,v,h,k,B,!1,P)),h===!1?!1:(po(v,h),!0)}function Ye(v){if(K[v]){var h=de.slice();Ke&&h.sort(function(H,se){return H-se});var k=0,B=100;v!==0&&(k=h[v-1]),v!==K.length-1&&(B=h[v]);var F=B-k,P="translate("+Et(Zt(k,F)+"%","0")+")",$="scale("+Et(F/100,"1")+")";K[v].style[n.transformRule]=P+" "+$}}function Kt(v,h){return v===null||v===!1||v===void 0||(typeof v=="number"&&(v=String(v)),v=n.format.from(v),v!==!1&&(v=J.toStepping(v)),v===!1||isNaN(v))?de[h]:v}function ot(v,h,k){var B=mt(v),F=de[0]===void 0;h=h===void 0?!0:h,n.animate&&!F&&Ei(b,n.cssClasses.tap,n.animationDuration),be.forEach(function(H){Re(H,Kt(B[H],H),!0,!1,k)});var P=be.length===1?0:1;if(F&&J.hasNoSize()&&(k=!0,de[0]=0,be.length>1)){var $=100/(be.length-1);be.forEach(function(H){de[H]=H*$})}for(;P<be.length;++P)be.forEach(function(H){Re(H,de[H],!0,!0,k)});Vt(),be.forEach(function(H){ve("update",H),B[H]!==null&&h&&ve("set",H)})}function mo(v){ot(n.start,v)}function uo(v,h,k,B){if(v=Number(v),!(v>=0&&v<be.length))throw new Error("noUiSlider: invalid handle number, got: "+v);Re(v,Kt(h,v),!0,!0,B),ve("update",v),k&&ve("set",v)}function Qt(v){if(v===void 0&&(v=!1),v)return De.length===1?De[0]:De.slice(0);var h=De.map(n.format.to);return h.length===1?h[0]:h}function fo(){for(Qe(Oe.aria),Qe(Oe.tooltips),Object.keys(n.cssClasses).forEach(function(v){pt(b,n.cssClasses[v])});b.firstChild;)b.removeChild(b.firstChild);delete b.noUiSlider}function Yt(v){var h=de[v],k=J.getNearbySteps(h),B=De[v],F=k.thisStep.step,P=null;if(n.snap)return[B-k.stepBefore.startValue||null,k.stepAfter.startValue-B||null];F!==!1&&B+F>k.stepAfter.startValue&&(F=k.stepAfter.startValue-B),B>k.thisStep.startValue?P=k.thisStep.step:k.stepBefore.step===!1?P=!1:P=B-k.stepBefore.highestStep,h===100?F=null:h===0&&(P=null);var $=J.countStepDecimals();return F!==null&&F!==!1&&(F=Number(F.toFixed($))),P!==null&&P!==!1&&(P=Number(P.toFixed($))),[P,F]}function vo(){return be.map(Yt)}function go(v,h){var k=Qt(),B=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips","connect"];B.forEach(function(P){v[P]!==void 0&&(t[P]=v[P])});var F=Fi(t);B.forEach(function(P){v[P]!==void 0&&(n[P]=F[P])}),J=F.spectrum,n.margin=F.margin,n.limit=F.limit,n.padding=F.padding,n.pips?bt(n.pips):St(),n.tooltips?jt():kt(),de=[],ot(Pt(v.start)?v.start:k,h),v.connect&&Xt()}function Xt(){for(;ie.firstChild;)ie.removeChild(ie.firstChild);for(var v=0;v<=n.handles;v++)K[v]=xt(ie,n.connect[v]),Ye(v);zt({drag:n.events.drag,fixed:!0})}function ho(){Ke=!Ke,Ii(n,n.connect.map(function(v){return!v})),Xt()}function Co(){Z=Zn(b),qn(n.connect,Z),zt(n.events),ot(n.start),n.pips&&bt(n.pips),n.tooltips&&jt(),Xn()}Co();var rt={destroy:fo,steps:vo,on:Mt,off:Qe,get:Qt,set:ot,setHandle:uo,reset:mo,disable:Qn,enable:Yn,__moveHandles:function(v,h,k){qt(v,h,de,k)},options:t,updateOptions:go,target:b,removePips:St,removeTooltips:kt,getPositions:function(){return de.slice()},getTooltips:function(){return ye},getOrigins:function(){return W},pips:bt};return rt}function Pi(e,n){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=Fi(n),a=nr(e,t,n);return e.noUiSlider=a,a}var Ot=class{to(n){return String(parseFloat(parseFloat(String(n)).toFixed(2)))}from(n){return parseFloat(n)}},ae=(()=>{class e{constructor(t,a,i){this.ngZone=t,this.el=a,this.renderer=i,this.handles=[],this.config={},this.change=new We(!0),this.update=new We(!0),this.slide=new We(!0),this.set=new We(!0),this.start=new We(!0),this.end=new We(!0),this.onChange=Function.prototype,this.cleanups=[],this.eventHandler=(d,b,Z,ie)=>{let W=this.toValues(b),K=!1;if(this.value===void 0){this.value=W;return}Array.isArray(W)&&this.value[Z]!=W[Z]&&(K=!0),!Array.isArray(W)&&this.value!=W&&(K=!0),K&&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 b=this.slider.steps(),Z=parseInt(d.target.getAttribute("data-handle")),ie=1,W=1,K=0,pe=0;switch(d.which){case 34:W=this.config.pageSteps;break;case 40:case 37:ie=-1,K=b[Z][0],d.preventDefault();break;case 33:W=this.config.pageSteps;break;case 38:case 39:K=b[Z][1],d.preventDefault();break;default:break}pe=ie*W*K;let ye;Array.isArray(this.value)?(ye=[...this.value],ye[Z]=ye[Z]+pe):ye=this.value+pe,this.slider.set(ye)}}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 a=t.map(this.config.format.from);return a.length==1?a[0]:a}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 a=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(a.tooltips=this.tooltips||this.config.tooltips,a.format=this.format||this.config.format||new Ot,this.ngZone.runOutsideAngular(()=>{this.slider=Pi(this.el.nativeElement.querySelector("div"),Object.assign(this.config,a))}),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,b)=>{this.eventHandler(this.set,i,d,b)}),this.slider.on("update",(i,d,b)=>{this.update.observers.length>0&&this.ngZone.run(()=>{this.update.emit(this.toValues(i))})}),this.slider.on("change",(i,d,b)=>{this.change.observers.length>0&&this.ngZone.run(()=>{this.change.emit(this.toValues(i))})}),this.slider.on("slide",(i,d,b)=>{this.eventHandler(this.slide,i,d,b)}),this.slider.on("start",(i,d,b)=>{this.start.observers.length>0&&this.ngZone.run(()=>{this.start.emit(this.toValues(i))})}),this.slider.on("end",(i,d,b)=>{this.end.observers.length>0&&this.ngZone.run(()=>{this.end.emit(this.toValues(i))})})}}return e.\u0275fac=function(t){return new(t||e)(at(pi),at(ci),at(di))},e.\u0275cmp=T({type:e,selectors:[["nouislider"]],hostVars:2,hostBindings:function(t,a){t&2&&_i("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:[yi([{provide:bi,useExisting:ai(()=>e),multi:!0}]),li],decls:1,vars:1,template:function(t,a){t&1&&Ee(0,"div"),t&2&&S("disabled",a.disabled?!0:void 0)},styles:["[_nghost-%COMP%]{display:block;margin-top:1rem;margin-bottom:1rem}"]}),e})();var ut=(e,n)=>({"fa-check-circle":e,"fa-blank":n});function rr(e,n){if(e&1){let t=O();o(0,"button",6),y("click",function(i){M(t);let d=m(2);return E(d.setTargetMode(0,i))}),o(1,"div",7),u(2,"i",8),s(),p(3),l(4,"translate"),o(5,"div",9),u(6,"i",10),s()()}if(e&2){let t=m(2);r(2),f("ngClass",I(4,ut,t.targetMode===0,t.targetMode!==0)),r(),x(" ",c(4,2,"accessories.control.manual")," ")}}function ar(e,n){if(e&1){let t=O();o(0,"button",6),y("click",function(i){M(t);let d=m(2);return E(d.setTargetMode(1,i))}),o(1,"div",7),u(2,"i",8),s(),p(3),l(4,"translate"),o(5,"div",9),u(6,"i",10),s()()}if(e&2){let t=m(2);r(2),f("ngClass",I(4,ut,t.targetMode===1,t.targetMode!==1)),r(),x(" ",c(4,2,"accessories.control.auto")," ")}}function sr(e,n){if(e&1&&(o(0,"h6",12),p(1),l(2,"translate"),s(),o(3,"div",5),l(4,"translate"),C(5,rr,7,7,"button",13),C(6,ar,7,7,"button",13),s()),e&2){let t=m();r(),g(c(2,4,"accessories.control.mode")),r(2),S("aria-label",c(4,6,"accessories.control.mode_control")),r(2),_(t.targetModeValidValues.includes(0)?5:-1),r(),_(t.targetModeValidValues.includes(1)?6:-1)}}function lr(e,n){if(e&1){let t=O();o(0,"h6",12),p(1),l(2,"translate"),s(),o(3,"nouislider",14),q("ngModelChange",function(i){M(t);let d=m();return z(d.targetRotationSpeed.value,i)||(d.targetRotationSpeed.value=i),E(i)}),y("ngModelChange",function(){M(t);let i=m();return E(i.onTargetRotationSpeedChange())}),s()}if(e&2){let t=m();r(),R("",c(2,6,"accessories.control.rotation_speed"),": ",t.targetRotationSpeed.value,"%"),r(2),f("min",t.targetRotationSpeed.min)("max",t.targetRotationSpeed.max)("step",t.targetRotationSpeed.step),G("ngModel",t.targetRotationSpeed.value)}}var Li=(()=>{class e{$activeModal=D(Y);service;targetState;targetMode;targetModeValidValues=[];targetRotationSpeed;targetRotationSpeedChanged=new ee;constructor(){this.targetRotationSpeedChanged.pipe(te(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()}setTargetState(t,a){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),a.target.blur()}setTargetMode(t,a){this.targetMode=t,this.service.getCharacteristic("TargetAirPurifierState").setValue(this.targetMode),a.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(a){return new(a||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service"},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(a,i){a&1&&(o(0,"div",0)(1,"div",1),u(2,"h5",2),o(3,"button",3),l(4,"translate"),y("click",function(){return i.dismissModal()}),s()(),o(5,"div",4)(6,"div",5),l(7,"translate"),o(8,"button",6),y("click",function(b){return i.setTargetState(0,b)}),o(9,"div",7),u(10,"i",8),s(),p(11),l(12,"translate"),o(13,"div",9),u(14,"i",10),s()(),o(15,"button",6),y("click",function(b){return i.setTargetState(1,b)}),o(16,"div",7),u(17,"i",8),s(),p(18),l(19,"translate"),o(20,"div",9),u(21,"i",10),s()()(),C(22,sr,7,8),C(23,lr,4,8),s(),u(24,"div",11),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,9,"form.button_close")),r(3),S("aria-label",c(7,11,"accessories.control.state_control")),r(4),f("ngClass",I(17,ut,i.targetState===0,i.targetState!==0)),r(),x(" ",c(12,13,"accessories.control.off")," "),r(6),f("ngClass",I(20,ut,i.targetState===1,i.targetState!==1)),r(),x(" ",c(19,15,"accessories.control.on")," "),r(4),_(i.targetModeValidValues.length?22:-1),r(),_(i.targetRotationSpeed?23:-1))},dependencies:[Q,oe,re,ae,V,w],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 U=(()=>{class e{downTimeout;done=!1;touchInProgress=!1;touchStartTime=0;duration=350;longClick=Ft();shortClick=Ft();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(a){return new(a||e)};static \u0275dir=mi({type:e,selectors:[["","shortClick",""],["","longClick",""]],hostBindings:function(a,i){a&1&&y("keyup.enter",function(b){return i.onEnter(b)})("mouseup",function(b){return i.onMouseUp(b)})("touchend",function(b){return i.onTouchEnd(b)})("touchstart",function(b){return i.onMouseDown(b)})("mousedown",function(b){return i.onMouseDown(b)})("mousemove",function(b){return i.onMouseMove(b)})("touchmove",function(b){return i.onMouseMove(b)})},inputs:{duration:"duration"},outputs:{longClick:"longClick",shortClick:"shortClick"}})}return e})();var cr=(e,n)=>({"accessory-on":e,purifying:n});function pr(e,n){if(e&1&&(o(0,"div",18),p(1),s()),e&2){let t=m(2);r(),x("",t.service.values.RotationSpeed,"%")}}function dr(e,n){e&1&&(o(0,"div",18),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.on")))}function mr(e,n){if(e&1&&C(0,pr,2,1,"div",18)(1,dr,3,3,"div",18),e&2){let t=m();_("RotationSpeed"in t.service.values?0:1)}}function ur(e,n){e&1&&(o(0,"div",18),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.idle")))}function fr(e,n){e&1&&(o(0,"div",18),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.off")))}var Hi=(()=>{class e{$modal=D(X);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(Li,{size:"md",backdrop:"static"});t.componentInstance.service=this.service}}static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0),y("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(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()(),L(),o(18,"div",17),p(19),s(),C(20,mr,2,1)(21,ur,3,3,"div",18)(22,fr,3,3,"div",18),s()()),a&2&&(f("ngClass",I(6,cr,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)),r(2),S("aria-label",c(3,4,"accessories.core.air_purifier")),r(17),g(i.service.customName||i.service.serviceName),r(),_(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:[U,V,w],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 vr=()=>[3,4],gr=()=>[1,2],hr=(e,n,t,a)=>({"accessory-on":e,"fill-red":n,"fill-orange":t,"fill-green":a}),Cr=(e,n)=>({"grey-text":e,"red-text":n}),Oi=(()=>{class e{service;labels=["Unknown","Excellent","Good","Fair","Inferior","Poor"];static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(5,"rect",4),o(6,"g",5),u(7,"path",6),s(),u(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()(),L(),o(21,"div",20),p(22),s(),o(23,"div",21),p(24),s()()()),a&2&&(f("ngClass",ct(9,hr,i.service.values.AirQuality===5,i.service.values.AirQuality===5,he(7,vr).includes(i.service.values.AirQuality),he(8,gr).includes(i.service.values.AirQuality))),r(2),S("aria-label",c(3,5,"accessories.core.air_quality_sensor")),r(20),g(i.service.customName||i.service.serviceName),r(),f("ngClass",I(14,Cr,i.service.values.AirQuality<5,i.service.values.AirQuality===5)),r(),x(" ",i.labels[i.service.values.AirQuality||0]," "))},dependencies:[V,w],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 _r=e=>({"accessory-on":e});function xr(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.battery_notcharging")," ")}function yr(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.battery_charging")," ")}function kr(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.battery_notchargeable")," ")}function Sr(e,n){e&1&&(o(0,"span",10),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.battery_low")))}function br(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.battery_charged")," ")}var Ni=(()=>{class e{service;Math=Math;static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(5,"rect",4)(6,"rect",5)(7,"rect",6),o(8,"text",7),p(9),s()()(),L(),o(10,"div",8),p(11),s(),o(12,"div",9),C(13,xr,2,3)(14,yr,2,3)(15,kr,2,3)(16,Sr,3,3,"span",10)(17,br,2,3),s()()()),a&2&&(f("ngClass",j(10,_r,i.service.values.ChargingState===1)),r(2),S("aria-label",c(3,8,"accessories.core.battery")),r(3),S("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"),r(4),x(" ",i.service.values.BatteryLevel||0,"% "),r(2),g(i.service.customName||i.service.serviceName),r(2),_(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:[V,w],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 Tr=e=>({"accessory-on":e});function wr(e,n){e&1&&(o(0,"div",16),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.detected")))}function Mr(e,n){e&1&&(o(0,"div",17),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.not_detected")))}var Ri=(()=>{class e{service;static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(5,"rect",4),o(6,"text",5),p(7," CO2 "),s(),u(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()(),L(),o(17,"div",15),p(18),s(),C(19,wr,3,3,"div",16)(20,Mr,3,3,"div",17),s()()),a&2&&(f("ngClass",j(6,Tr,i.service.values.CarbonDioxideDetected)),r(2),S("aria-label",c(3,4,"accessories.core.carbon_dioxide_sensor")),r(16),g(i.service.customName||i.service.serviceName),r(),_(i.service.values.CarbonDioxideDetected?19:20))},dependencies:[V,w],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 Er=e=>({"accessory-on":e});function Vr(e,n){e&1&&(o(0,"div",16),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.detected")))}function Br(e,n){e&1&&(o(0,"div",17),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.not_detected")))}var Wi=(()=>{class e{service;static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(5,"rect",4),o(6,"text",5),p(7," CO "),s(),u(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()(),L(),o(17,"div",15),p(18),s(),C(19,Vr,3,3,"div",16)(20,Br,3,3,"div",17),s()()),a&2&&(f("ngClass",j(6,Er,i.service.values.CarbonMonoxideDetected)),r(2),S("aria-label",c(3,4,"accessories.core.carbon_monoxide_sensor")),r(16),g(i.service.customName||i.service.serviceName),r(),_(i.service.values.CarbonMonoxideDetected?19:20))},dependencies:[V,w],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 Ar=e=>({"accessory-on":e});function Ir(e,n){e&1&&(o(0,"div",9),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.open")))}function Dr(e,n){e&1&&(o(0,"div",10),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.closed")))}var ji=(()=>{class e{service;static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7),s()(),L(),o(9,"div",8),p(10),s(),C(11,Ir,3,3,"div",9)(12,Dr,3,3,"div",10),s()()),a&2&&(f("ngClass",j(6,Ar,i.service.values.ContactSensorState)),r(2),S("aria-label",c(3,4,"accessories.core.contact_sensor")),r(8),g(i.service.customName||i.service.serviceName),r(),_(i.service.values.ContactSensorState?11:12))},dependencies:[V,w],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 Fr(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.closed")," ")}function Pr(e,n){if(e&1&&(p(0),l(1,"translate")),e&2){let t=m(2);R(" ",c(1,2,"accessories.control.open")," ",t.service.getCharacteristic("CurrentPosition").value,"% ")}}function Lr(e,n){if(e&1&&C(0,Fr,2,3)(1,Pr,2,4),e&2){let t=m();_(t.service.values.CurrentPosition===0?0:1)}}function Hr(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.opening"),"... ")}function Or(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.closing"),"... ")}var $i=(()=>{class e{$activeModal=D(Y);service;targetMode;targetPositionChanged=new ee;targetPosition;constructor(){this.targetPositionChanged.pipe(te(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()}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(a){return new(a||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service"},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(a,i){a&1&&(o(0,"div",0)(1,"div",1),u(2,"h5",2),o(3,"button",3),l(4,"translate"),y("click",function(){return i.dismissModal()}),s()(),o(5,"div",4)(6,"div",5)(7,"div",6),C(8,Lr,2,1)(9,Hr,2,3)(10,Or,2,3),s()(),o(11,"h6",7),p(12),l(13,"translate"),s(),o(14,"nouislider",8),q("ngModelChange",function(b){return z(i.targetPosition.value,b)||(i.targetPosition.value=b),b}),y("ngModelChange",function(){return i.onTargetPositionChange()}),s(),o(15,"div",9)(16,"span",10),p(17),l(18,"translate"),s(),o(19,"span",10),p(20),l(21,"translate"),s()(),o(22,"h6",7),p(23),l(24,"translate"),s(),o(25,"nouislider",11),q("ngModelChange",function(b){return z(i.service.getCharacteristic("CurrentPosition").value,b)||(i.service.getCharacteristic("CurrentPosition").value=b),b}),s(),o(26,"div",9)(27,"span",10),p(28),l(29,"translate"),s(),o(30,"span",10),p(31),l(32,"translate"),s()()(),u(33,"div",12),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,20,"form.button_close")),r(5),_(i.service.values.PositionState===2?8:i.service.values.PositionState===1?9:i.service.values.PositionState===0?10:-1),r(4),R("",c(13,22,"accessories.control.target"),": ",i.targetPosition.value,"%"),r(2),f("min",i.targetPosition.min)("max",i.targetPosition.max)("step",i.targetPosition.step),G("ngModel",i.targetPosition.value),r(3),g(c(18,24,"accessories.control.closed")),r(3),g(c(21,26,"accessories.control.open")),r(3),R(" ",c(24,28,"accessories.control.current"),": ",i.service.getCharacteristic("CurrentPosition").value,"% "),r(2),f("min",0)("max",100)("step",1)("disabled",!0),G("ngModel",i.service.getCharacteristic("CurrentPosition").value),r(3),g(c(29,30,"accessories.control.closed")),r(3),g(c(32,32,"accessories.control.open")))},dependencies:[ae,Q,oe,re,w],encapsulation:2})}return e})();var Nr=e=>({"accessory-on":e});function Rr(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.closed")," ")}function Wr(e,n){if(e&1&&(p(0),l(1,"translate")),e&2){let t=m(2);R(" ",c(1,2,"accessories.control.open")," ",t.service.values.CurrentPosition,"% ")}}function jr(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.open")," ")}function $r(e,n){if(e&1&&(o(0,"div",11),C(1,Rr,2,3),C(2,Wr,2,4),C(3,jr,2,3),s()),e&2){let t=m();r(),_(t.service.values.CurrentPosition===0?1:-1),r(),_(t.service.values.CurrentPosition>0&&t.service.values.CurrentPosition<100?2:-1),r(),_(t.service.values.CurrentPosition===100?3:-1)}}function Ur(e,n){e&1&&(o(0,"div",12),p(1),l(2,"translate"),s()),e&2&&(r(),x("",c(2,1,"accessories.control.opening"),"..."))}function Gr(e,n){e&1&&(o(0,"div",12),p(1),l(2,"translate"),s()),e&2&&(r(),x("",c(2,1,"accessories.control.closing"),"..."))}var Ui=(()=>{class e{$modal=D(X);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($i,{size:"md",backdrop:"static"});t.componentInstance.service=this.service}static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0),y("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7)(9,"line",8)(10,"rect",9),s()(),L(),o(11,"div",10),p(12),s(),C(13,$r,4,3,"div",11)(14,Ur,3,3,"div",12)(15,Gr,3,3,"div",12),s()()),a&2&&(f("ngClass",j(6,Nr,i.service.values.CurrentPosition)),r(2),S("aria-label",c(3,4,"accessories.core.door")),r(10),g(i.service.customName||i.service.serviceName),r(),_(i.service.values.PositionState===2?13:i.service.values.PositionState===1?14:i.service.values.PositionState===0?15:-1))},dependencies:[U,V,w],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 $e=(e,n)=>({"fa-check-circle":e,"fa-blank":n});function zr(e,n){if(e&1){let t=O();o(0,"div",5),l(1,"translate"),o(2,"button",7),y("click",function(i){M(t);let d=m();return E(d.setActive(0,i))}),o(3,"div",8),u(4,"i",9),s(),p(5),l(6,"translate"),o(7,"div",10),u(8,"i",11),s()(),o(9,"button",7),y("click",function(i){M(t);let d=m();return E(d.setActive(1,i))}),o(10,"div",8),u(11,"i",9),s(),p(12),l(13,"translate"),o(14,"div",10),u(15,"i",11),s()()()}if(e&2){let t=m();S("aria-label",c(1,5,"accessories.control.mode_control")),r(4),f("ngClass",I(11,$e,t.service.values.Active===0,t.service.values.Active!==0)),r(),x(" ",c(6,7,"accessories.control.off")," "),r(6),f("ngClass",I(14,$e,t.service.values.Active===1,t.service.values.Active!==1)),r(),x(" ",c(13,9,"accessories.control.on")," ")}}function qr(e,n){if(e&1){let t=O();o(0,"div",5),l(1,"translate"),o(2,"button",7),y("click",function(i){M(t);let d=m();return E(d.setTargetState(0,i))}),o(3,"div",8),u(4,"i",9),s(),p(5),l(6,"translate"),o(7,"div",10),u(8,"i",11),s()(),o(9,"button",7),y("click",function(i){M(t);let d=m();return E(d.setTargetState(1,i))}),o(10,"div",8),u(11,"i",9),s(),p(12),l(13,"translate"),o(14,"div",10),u(15,"i",11),s()(),o(16,"button",7),y("click",function(i){M(t);let d=m();return E(d.setTargetState(2,i))}),o(17,"div",8),u(18,"i",9),s(),p(19),l(20,"translate"),o(21,"div",10),u(22,"i",11),s()()()}if(e&2){let t=m();S("aria-label",c(1,7,"accessories.control.media_control")),r(4),f("ngClass",I(15,$e,t.service.values.CurrentMediaState===0,t.service.values.CurrentMediaState!==0)),r(),x(" ",c(6,9,"accessories.control.play")," "),r(6),f("ngClass",I(18,$e,t.service.values.CurrentMediaState===1,t.service.values.CurrentMediaState!==1)),r(),x(" ",c(13,11,"accessories.control.pause")," "),r(6),f("ngClass",I(21,$e,t.service.values.CurrentMediaState===2,t.service.values.CurrentMediaState!==2)),r(),x(" ",c(20,13,"accessories.control.stop")," ")}}function Zr(e,n){if(e&1){let t=O();o(0,"h6"),p(1),l(2,"translate"),s(),o(3,"div",12),l(4,"translate"),o(5,"button",7),y("click",function(i){M(t);let d=m();return E(d.setTargetMode(!1,i))}),o(6,"div",8),u(7,"i",9),s(),p(8),l(9,"translate"),o(10,"div",10),u(11,"i",11),s()(),o(12,"button",7),y("click",function(i){M(t);let d=m();return E(d.setTargetMode(!0,i))}),o(13,"div",8),u(14,"i",9),s(),p(15),l(16,"translate"),o(17,"div",10),u(18,"i",11),s()()()}if(e&2){let t=m();r(),x(" ",c(2,6,"Active"in t.service.values||"TargetMediaState"in t.service.values?"accessories.control.speaker_volume":"menu.label_status")," "),r(2),S("aria-label",c(4,8,"accessories.control.mute_control")),r(4),f("ngClass",I(14,$e,!t.targetMode,t.targetMode)),r(),x(" ",c(9,10,"accessories.control.not_mute")," "),r(6),f("ngClass",I(17,$e,t.targetMode,!t.targetMode)),r(),x(" ",c(16,12,"accessories.control.mute")," ")}}function Kr(e,n){if(e&1){let t=O();o(0,"h6",13),p(1),l(2,"translate"),s(),o(3,"nouislider",14),q("ngModelChange",function(i){M(t);let d=m();return z(d.targetVolume.value,i)||(d.targetVolume.value=i),E(i)}),y("ngModelChange",function(){M(t);let i=m();return E(i.onVolumeStateChange())}),s()}if(e&2){let t=m();r(),R("",c(2,6,"accessories.control.speaker_volume"),": ",t.targetVolume.value,"%"),r(2),f("min",t.targetVolume.min)("max",t.targetVolume.max)("step",t.targetVolume.step),G("ngModel",t.targetVolume.value)}}var Gi=(()=>{class e{$activeModal=D(Y);service;targetMode;targetVolume;targetVolumeChanged=new ee;constructor(){this.targetVolumeChanged.pipe(te(500)).subscribe(()=>{this.service.getCharacteristic("Volume").setValue(this.targetVolume.value)})}ngOnInit(){this.targetMode=this.service.values.Mute,this.loadTargetVolume()}setTargetMode(t,a){this.targetMode=t,this.service.getCharacteristic("Mute").setValue(this.targetMode),a.target.blur()}setActive(t,a){this.service.getCharacteristic("Active").setValue(t),a.target.blur()}setTargetState(t,a){this.service.getCharacteristic("TargetMediaState").setValue(t),a.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(a){return new(a||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service"},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(a,i){a&1&&(o(0,"div",0)(1,"div",1),u(2,"h5",2),o(3,"button",3),l(4,"translate"),y("click",function(){return i.dismissModal()}),s()(),o(5,"div",4),C(6,zr,16,17,"div",5)(7,qr,23,24,"div",5),C(8,Zr,19,20),C(9,Kr,4,8),s(),u(10,"div",6),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,5,"form.button_close")),r(3),_("Active"in i.service.values?6:"TargetMediaState"in i.service.values?7:-1),r(2),_("Mute"in i.service.values?8:-1),r(),_(i.targetVolume?9:-1))},dependencies:[Q,oe,re,ae,V,w],encapsulation:2})}return e})();var Qr=()=>[0,1],Yr=(e,n)=>({"accessory-on":e,paused:n}),Xr=()=>["Speaker","SmartSpeaker"];function Jr(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.play")," ")}function ea(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.pause")," ")}function ta(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.stop")," ")}function ia(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" \xB7 ",c(1,1,"accessories.control.mute")," ")}function na(e,n){if(e&1&&p(0),e&2){let t=m(3);x(" \xB7 ",t.service.values.Volume,"% ")}}function oa(e,n){if(e&1&&C(0,na,1,1),e&2){let t=m(2);_("Volume"in t.service.values?0:-1)}}function ra(e,n){if(e&1&&(o(0,"div",7),C(1,Jr,2,3)(2,ea,2,3)(3,ta,2,3),C(4,ia,2,3)(5,oa,1,1),s()),e&2){let t,a=m();r(),_((t=a.service.values.CurrentMediaState)===0?1:t===1?2:t===2?3:-1),r(3),_("Mute"in a.service.values&&a.service.values.Mute?4:5)}}function aa(e,n){e&1&&(u(0,"div",8),l(1,"translate")),e&2&&f("innerText",c(1,1,"accessories.control.off"))}function sa(e,n){e&1&&(u(0,"div",8),l(1,"translate")),e&2&&f("innerText",c(1,1,"accessories.control.mute"))}function la(e,n){if(e&1&&(o(0,"div",7),p(1),s()),e&2){let t=m();r(),x("",t.service.values.Volume,"%")}}function ca(e,n){e&1&&(o(0,"div",7),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.on")))}function pa(e,n){e&1&&(o(0,"div",7),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.core.doorbell")))}var zi=(()=>{class e{$modal=D(X);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(Gi,{size:"md",backdrop:"static"});t.componentInstance.service=this.service}}static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0),y("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(5,"rect",4)(6,"circle",5),s()(),L(),o(7,"div",6),p(8),s(),C(9,ra,6,2,"div",7)(10,aa,2,3,"div",8)(11,sa,2,3,"div",8)(12,la,2,1,"div",7)(13,ca,3,3,"div",7)(14,pa,3,3,"div",7),s()()),a&2&&(f("ngClass",I(7,Yr,"Active"in i.service.values?i.service.values.Active:"CurrentMediaState"in i.service.values?he(6,Qr).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)),r(2),S("aria-label",c(3,4,"accessories.core.doorbell")),r(6),g(i.service.customName||i.service.serviceName),r(),_("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,Xr).includes(i.service.customType||i.service.type)?13:14))},dependencies:[U,V,w],encapsulation:2})}return e})();var ft=(e,n)=>({"fa-check-circle":e,"fa-blank":n});function da(e,n){if(e&1){let t=O();o(0,"h6",12),p(1),l(2,"translate"),s(),o(3,"div",13),l(4,"translate"),o(5,"button",6),y("click",function(i){M(t);let d=m();return E(d.setRotationDirection(0,i))}),o(6,"div",7),u(7,"i",8),s(),p(8),l(9,"translate"),o(10,"div",9),u(11,"i",10),s()(),o(12,"button",6),y("click",function(i){M(t);let d=m();return E(d.setRotationDirection(1,i))}),o(13,"div",7),u(14,"i",8),s(),p(15),l(16,"translate"),o(17,"div",9),u(18,"i",10),s()()()}if(e&2){let t=m();r(),g(c(2,6,"accessories.control.rotation_direction")),r(2),S("aria-label",c(4,8,"accessories.control.direction_control")),r(4),f("ngClass",I(14,ft,t.service.values.RotationDirection===0,t.service.values.RotationDirection!==0)),r(),x(" ",c(9,10,"accessories.control.rotation_clockwise")," "),r(6),f("ngClass",I(17,ft,t.service.values.RotationDirection===1,t.service.values.RotationDirection!==1)),r(),x(" ",c(16,12,"accessories.control.rotation_c_clockwise")," ")}}function ma(e,n){e&1&&p(0,"%")}function ua(e,n){if(e&1){let t=O();o(0,"h6",12),p(1),l(2,"translate"),C(3,ma,1,0),s(),o(4,"nouislider",14),q("ngModelChange",function(i){M(t);let d=m();return z(d.targetRotationSpeed.value,i)||(d.targetRotationSpeed.value=i),E(i)}),y("ngModelChange",function(){M(t);let i=m();return E(i.onTargetRotationSpeedChange())}),s()}if(e&2){let t=m();r(),R(" ",c(2,7,"accessories.control.rotation_speed"),": ",t.targetRotationSpeed.value),r(2),_(t.targetRotationSpeed.unit==="percentage"?3:-1),r(),f("min",t.targetRotationSpeed.min)("max",t.targetRotationSpeed.max)("step",t.targetRotationSpeed.step),G("ngModel",t.targetRotationSpeed.value)}}var qi=(()=>{class e{$activeModal=D(Y);service;targetMode;targetRotationSpeed;targetRotationSpeedChanged=new ee;hasRotationDirection=!1;constructor(){this.targetRotationSpeedChanged.pipe(te(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)}setTargetMode(t,a){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),a.target.blur()}onTargetRotationSpeedChange(){this.targetRotationSpeedChanged.next(this.targetRotationSpeed.value)}setRotationDirection(t,a){this.service.getCharacteristic("RotationDirection").setValue(t),a.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(a){return new(a||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service"},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(a,i){a&1&&(o(0,"div",0)(1,"div",1),u(2,"h5",2),o(3,"button",3),l(4,"translate"),y("click",function(){return i.dismissModal()}),s()(),o(5,"div",4)(6,"div",5),l(7,"translate"),o(8,"button",6),y("click",function(b){return i.setTargetMode(!1,b)}),o(9,"div",7),u(10,"i",8),s(),p(11),l(12,"translate"),o(13,"div",9),u(14,"i",10),s()(),o(15,"button",6),y("click",function(b){return i.setTargetMode(!0,b)}),o(16,"div",7),u(17,"i",8),s(),p(18),l(19,"translate"),o(20,"div",9),u(21,"i",10),s()()(),C(22,da,19,20),C(23,ua,5,9),s(),u(24,"div",11),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,9,"form.button_close")),r(3),S("aria-label",c(7,11,"accessories.control.mode_control")),r(4),f("ngClass",I(17,ft,!i.targetMode,i.targetMode)),r(),x(" ",c(12,13,"accessories.control.off")," "),r(6),f("ngClass",I(20,ft,i.targetMode,!i.targetMode)),r(),x(" ",c(19,15,"accessories.control.on")," "),r(4),_(i.hasRotationDirection?22:-1),r(),_(i.targetRotationSpeed?23:-1))},dependencies:[Q,oe,re,ae,V,w],encapsulation:2})}return e})();var fa=e=>({"accessory-on":e}),va=(e,n)=>({spin:e,"spin-counter":n});function ga(e,n){if(e&1&&(o(0,"div",8),p(1),s()),e&2){let t=m();r(),R("",t.service.values.RotationSpeed,"",t.rotationSpeedUnit)}}function ha(e,n){if(e&1&&(u(0,"div",9),l(1,"translate")),e&2){let t=m();f("innerText",c(1,1,t.service.values.On||t.service.values.Active?"accessories.control.on":"accessories.control.off"))}}var Zi=(()=>{class e{$modal=D(X);service;readyForControl=!1;rotationSpeedUnit="";hasRotationDirection=!1;ngOnInit(){"RotationSpeed"in this.service.values&&this.service.serviceCharacteristics.find(a=>a.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(qi,{size:"md",backdrop:"static"});t.componentInstance.service=this.service}}static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0),y("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3)(5,"g",4),u(6,"path",5),s(),u(7,"circle",6),s()(),L(),o(8,"div",7),p(9),s(),C(10,ga,2,2,"div",8)(11,ha,2,3,"div",9),s()()),a&2&&(f("ngClass",j(7,fa,i.service.values.On||i.service.values.Active)),r(2),f("ngClass",I(9,va,(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)),S("aria-label",c(3,5,"accessories.core.fan")),r(7),g(i.service.customName||i.service.serviceName),r(),_(i.service.values.On&&i.service.values.RotationSpeed?10:11))},dependencies:[U,V,w],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 Ki=(()=>{class e{$activeModal=D(Y);service;targetMode;ngOnInit(){setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(a=>{a.style.background="linear-gradient(to right, #d32f2f, #e69533, #42d672, #42d672)"})},10)}resetFilterLife(t){this.service.getCharacteristic("ResetFilterIndication").setValue(1),t.target.blur()}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service"},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(a,i){a&1&&(o(0,"div",0)(1,"div",1),u(2,"h5",2),o(3,"button",3),l(4,"translate"),y("click",function(){return i.dismissModal()}),s()(),o(5,"div",4)(6,"h6",5),p(7),l(8,"translate"),s(),o(9,"nouislider",6),q("ngModelChange",function(b){return z(i.service.values.FilterLifeLevel,b)||(i.service.values.FilterLifeLevel=b),b}),s(),o(10,"div",7),l(11,"translate"),o(12,"button",8),y("click",function(b){return i.resetFilterLife(b)}),p(13),l(14,"translate"),s()()(),u(15,"div",9),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,11,"form.button_close")),r(4),R("",c(8,13,"accessories.control.filter_level"),": ",i.service.values.FilterLifeLevel,"%"),r(2),f("min",0)("max",100)("step",1)("disabled",!0),G("ngModel",i.service.values.FilterLifeLevel),r(),S("aria-label",c(11,15,"accessories.core.filter_maintenance")),r(3),x(" ",c(14,17,"form.button_reset")," "))},dependencies:[Q,oe,re,ae,w],encapsulation:2})}return e})();var Ca=(e,n)=>({replace:e,dirty:n}),_a=e=>({"red-text":e});function xa(e,n){e&1&&(p(0," \xB7 "),o(1,"span",28),p(2),l(3,"translate"),s()),e&2&&(r(2),g(c(3,1,"accessories.control.replace")))}var Qi=(()=>{class e{$modal=D(X);service;readyForControl=!1;onClick(){if(!this.readyForControl)return;let t=this.$modal.open(Ki,{size:"md",backdrop:"static"});t.componentInstance.service=this.service}static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0),y("longClick",function(){return i.onClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(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()(),L(),o(26,"div",25),p(27),s(),o(28,"div",26)(29,"span",27),p(30),s(),C(31,xa,4,3),s()()()),a&2&&(f("ngClass",I(8,Ca,i.service.values.FilterChangeIndication===1||i.service.values.FilterLifeLevel<10,i.service.values.FilterChangeIndication!==1&&i.service.values.FilterLifeLevel<50)),r(2),S("aria-label",c(3,6,"accessories.core.filter_maintenance")),r(25),g(i.service.customName||i.service.serviceName),r(2),f("ngClass",j(11,_a,i.service.values.FilterChangeIndication===1)),r(),x(" ",i.service.values.FilterLifeLevel,"% "),r(),_(i.service.values.FilterChangeIndication===1?31:-1))},dependencies:[V,U,w],styles:[".dirty svg .status{fill:#e69533!important} .replace svg .status{fill:#d32f2f!important} body.dark-mode svg .back{fill:#2b2b2b!important}"]})}return e})();var ya=()=>[0,2,3,4],ka=(e,n,t,a,i,d,b)=>({"accessory-on":e,opening:n,open:t,closing:a,closed:i,stopped:d,obstructed:b});function Sa(e,n){e&1&&(o(0,"div",30),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.obstructed")))}function ba(e,n){e&1&&(o(0,"div",30),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.open")))}function Ta(e,n){e&1&&(o(0,"div",31),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.closed")))}function wa(e,n){e&1&&(o(0,"div",30),p(1),l(2,"translate"),s()),e&2&&(r(),x("",c(2,1,"accessories.control.opening"),"..."))}function Ma(e,n){e&1&&(o(0,"div",30),p(1),l(2,"translate"),s()),e&2&&(r(),x("",c(2,1,"accessories.control.closing"),"..."))}function Ea(e,n){e&1&&(o(0,"div",30),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.stopped")))}function Va(e,n){if(e&1&&C(0,ba,3,3,"div",30)(1,Ta,3,3,"div",31)(2,wa,3,3,"div",30)(3,Ma,3,3,"div",30)(4,Ea,3,3,"div",30),e&2){let t,a=m();_((t=a.service.values.CurrentDoorState)===0?0:t===1?1:t===2?2:t===3?3:t===4?4:-1)}}function Ba(e,n){e&1&&(o(0,"div",30),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.open")))}function Aa(e,n){e&1&&(o(0,"div",31),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.closed")))}function Ia(e,n){if(e&1&&C(0,Ba,3,3,"div",30)(1,Aa,3,3,"div",31),e&2){let t=m();_(t.service.values.On||t.service.values.Active?0:1)}}var Yi=(()=>{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(a){return new(a||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(a,i){a&1&&(o(0,"div",0),y("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(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()(),L(),o(30,"div",29),p(31),s(),C(32,Sa,3,3,"div",30)(33,Va,5,1)(34,Ia,2,1),s()()),a&2&&(f("ngClass",Si(7,ka,i.service.values.ObstructionDetected||he(6,ya).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)),r(2),S("aria-label",c(3,4,"accessories.core.garage_door_opener")),r(29),g(i.service.customName||i.service.serviceName),r(),_(i.service.values.ObstructionDetected?32:"CurrentDoorState"in i.service.values?33:34))},dependencies:[U,V,w],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 Je=(e,n)=>({"fa-check-circle":e,"fa-blank":n});function Da(e,n){if(e&1){let t=O();o(0,"button",8),y("click",function(i){M(t);let d=m(2);return E(d.setTargetMode(0,i))}),o(1,"div",9),u(2,"i",10),s(),p(3),l(4,"translate"),o(5,"div",11),u(6,"i",12),s()()}if(e&2){let t=m(2);r(2),f("ngClass",I(4,Je,t.targetMode===0,t.targetMode!==0)),r(),x(" ",c(4,2,"accessories.control.auto")," ")}}function Fa(e,n){if(e&1){let t=O();o(0,"button",8),y("click",function(i){M(t);let d=m(2);return E(d.setTargetMode(1,i))}),o(1,"div",9),u(2,"i",10),s(),p(3),l(4,"translate"),o(5,"div",11),u(6,"i",12),s()()}if(e&2){let t=m(2);r(2),f("ngClass",I(4,Je,t.targetMode===1,t.targetMode!==1)),r(),x(" ",c(4,2,"accessories.control.heat")," ")}}function Pa(e,n){if(e&1){let t=O();o(0,"button",8),y("click",function(i){M(t);let d=m(2);return E(d.setTargetMode(2,i))}),o(1,"div",9),u(2,"i",10),s(),p(3),l(4,"translate"),o(5,"div",11),u(6,"i",12),s()()}if(e&2){let t=m(2);r(2),f("ngClass",I(4,Je,t.targetMode===2,t.targetMode!==2)),r(),x(" ",c(4,2,"accessories.control.cool")," ")}}function La(e,n){if(e&1&&(o(0,"h6",14),p(1),l(2,"translate"),s(),o(3,"div",15),l(4,"translate"),C(5,Da,7,7,"button",16),C(6,Fa,7,7,"button",16),C(7,Pa,7,7,"button",16),s()),e&2){let t=m();r(),g(c(2,5,"accessories.control.mode")),r(2),S("aria-label",c(4,7,"accessories.control.mode_control")),r(2),_(t.targetStateValidValues.includes(0)?5:-1),r(),_(t.targetStateValidValues.includes(1)?6:-1),r(),_(t.targetStateValidValues.includes(2)?7:-1)}}function Ha(e,n){if(e&1){let t=O();o(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(),o(9,"nouislider",18),q("ngModelChange",function(i){M(t);let d=m(2);return z(d.autoTemp,i)||(d.autoTemp=i),E(i)}),y("ngModelChange",function(){M(t);let i=m(2);return E(i.onAutoTemperatureStateChange())}),s()}if(e&2){let t=m(2);r(),st(" ",c(2,9,"accessories.control.target_auto"),": ",ce(4,13,c(3,11,t.autoTemp[0]),"1.0-1"),"\xB0",c(5,16,t.temperatureUnits)," - ",ce(7,20,c(6,18,t.autoTemp[1]),"1.0-1"),"\xB0",c(8,23,t.temperatureUnits)," "),r(8),f("min",t.HeatingThresholdTemperature.minValue)("max",t.CoolingThresholdTemperature.maxValue)("step",t.CoolingThresholdTemperature.minStep),G("ngModel",t.autoTemp)}}function Oa(e,n){if(e&1){let t=O();o(0,"h6",14),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),s(),o(6,"nouislider",18),q("ngModelChange",function(i){M(t);let d=m(2);return z(d.targetHeatingTemp,i)||(d.targetHeatingTemp=i),E(i)}),y("ngModelChange",function(){M(t);let i=m(2);return E(i.onTemperatureStateChange())}),s()}if(e&2){let t=m(2);r(),Le(" ",c(2,7,"accessories.control.target_auto"),": ",ce(4,11,c(3,9,t.targetHeatingTemp),"1.0-1"),"\xB0",c(5,14,t.temperatureUnits)," "),r(5),f("min",t.HeatingThresholdTemperature.minValue)("max",t.HeatingThresholdTemperature.maxValue)("step",t.HeatingThresholdTemperature.minStep),G("ngModel",t.targetHeatingTemp)}}function Na(e,n){if(e&1){let t=O();o(0,"h6",14),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),s(),o(6,"nouislider",18),q("ngModelChange",function(i){M(t);let d=m(2);return z(d.targetCoolingTemp,i)||(d.targetCoolingTemp=i),E(i)}),y("ngModelChange",function(){M(t);let i=m(2);return E(i.onTemperatureStateChange())}),s()}if(e&2){let t=m(2);r(),Le(" ",c(2,7,"accessories.control.target_auto"),": ",ce(4,11,c(3,9,t.targetCoolingTemp),"1.0-1"),"\xB0",c(5,14,t.temperatureUnits)," "),r(5),f("min",t.CoolingThresholdTemperature.minValue)("max",t.CoolingThresholdTemperature.maxValue)("step",t.CoolingThresholdTemperature.minStep),G("ngModel",t.targetCoolingTemp)}}function Ra(e,n){if(e&1&&C(0,Ha,10,25)(1,Oa,7,16)(2,Na,7,16),e&2){let t=m();_(t.HeatingThresholdTemperature&&t.CoolingThresholdTemperature?0:t.HeatingThresholdTemperature&&!t.CoolingThresholdTemperature?1:!t.HeatingThresholdTemperature&&t.CoolingThresholdTemperature?2:-1)}}var Xi=(()=>{class e{$activeModal=D(Y);$settings=D(Te);service;type;temperatureUnits=this.$settings.env.temperatureUnits;targetState;targetMode;targetTemperatureChanged=new ee;targetStateValidValues=[];CoolingThresholdTemperature;HeatingThresholdTemperature;targetCoolingTemp;targetHeatingTemp;autoTemp;constructor(){this.targetTemperatureChanged.pipe(te(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(a=>{a.style.background="linear-gradient(to right, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))"})},10)}setTargetState(t,a){this.targetState=t,this.service.getCharacteristic("Active").setValue(this.targetState),this.loadTargetTemperature(),a.target.blur()}setTargetMode(t,a){this.targetMode=t,this.service.getCharacteristic("TargetHeaterCoolerState").setValue(this.targetMode),this.loadTargetTemperature(),a.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(a){return new(a||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service",type:"type"},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(a,i){a&1&&(o(0,"div",0)(1,"div",1),u(2,"h5",2),o(3,"button",3),l(4,"translate"),y("click",function(){return i.dismissModal()}),s()(),o(5,"div",4)(6,"h6",5),u(7,"i",6),p(8),l(9,"convertTemp"),l(10,"number"),l(11,"uppercase"),s(),o(12,"div",7),l(13,"translate"),o(14,"button",8),y("click",function(b){return i.setTargetState(0,b)}),o(15,"div",9),u(16,"i",10),s(),p(17),l(18,"translate"),o(19,"div",11),u(20,"i",12),s()(),o(21,"button",8),y("click",function(b){return i.setTargetState(1,b)}),o(22,"div",9),u(23,"i",10),s(),p(24),l(25,"translate"),o(26,"div",11),u(27,"i",12),s()()(),C(28,La,8,9),C(29,Ra,3,1),s(),u(30,"div",13),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,13,"form.button_close")),r(4),Ze("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"),r(),R("",ce(10,17,c(9,15,i.service.values.CurrentTemperature),"1.0-1"),"\xB0",c(11,20,i.temperatureUnits)," "),r(4),S("aria-label",c(13,22,"accessories.control.state_control")),r(4),f("ngClass",I(28,Je,i.targetState===0,i.targetState!==0)),r(),x(" ",c(18,24,"accessories.control.off")," "),r(6),f("ngClass",I(31,Je,i.targetState===1,i.targetState!==1)),r(),x(" ",c(25,26,"accessories.control.on")," "),r(4),_(i.targetStateValidValues.length?28:-1),r(),_(i.targetStateValidValues.includes(0)?29:-1))},dependencies:[V,Q,oe,re,ae,Ve,w,Ie,Ae],encapsulation:2})}return e})();var Wa=e=>({"accessory-on":e});function ja(e,n){if(e&1&&(A(),o(0,"text",23),p(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase"),s()),e&2){let t=m();r(),R(" ",ce(3,4,c(2,2,t.service.values.CurrentTemperature),"1.0-1"),"\xB0",c(4,7,t.temperatureUnits)," ")}}function $a(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.off")," ")}function Ua(e,n){if(e&1&&(u(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=m(2);r(),xi(" ",ce(3,6,c(2,4,t.service.values.HeatingThresholdTemperature),"1.0-1"),"\xB0",c(4,9,t.temperatureUnits)," - ",ce(6,13,c(5,11,t.service.values.CoolingThresholdTemperature),"1.0-1"),"\xB0",c(7,16,t.temperatureUnits)," ")}}function Ga(e,n){if(e&1&&(u(0,"i",26),p(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase")),e&2){let t=m(2);r(),R(" ",ce(3,4,c(2,2,t.service.values.HeatingThresholdTemperature),"1.0-1"),"\xB0",c(4,7,t.temperatureUnits)," ")}}function za(e,n){if(e&1&&(u(0,"i",26),p(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase")),e&2){let t=m(2);r(),R(" ",ce(3,4,c(2,2,t.service.values.CoolingThresholdTemperature),"1.0-1"),"\xB0",c(4,7,t.temperatureUnits)," ")}}function qa(e,n){if(e&1&&C(0,Ua,8,18)(1,Ga,5,9)(2,za,5,9),e&2){let t=m();_(t.hasHeating&&t.hasCooling?0:t.hasHeating&&!t.hasCooling?1:!t.hasHeating&&t.hasCooling?2:-1)}}function Za(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.heat")," ")}function Ka(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.cool")," ")}function Qa(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.on")," ")}var Ji=(()=>{class e{$modal=D(X);$settings=D(Te);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(Xi,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.type=this.type}}static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0),y("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3)(5,"defs")(6,"linearGradient",4)(7,"stop",5),u(8,"animate",6),s(),o(9,"stop",7),u(10,"animate",8),s(),o(11,"stop",9),u(12,"animate",6),s()(),o(13,"linearGradient",10)(14,"stop",11),u(15,"animate",12),s(),o(16,"stop",13),u(17,"animate",14),s(),o(18,"stop",15),u(19,"animate",12),s()()(),u(20,"rect",16)(21,"line",17)(22,"line",18)(23,"line",19)(24,"line",20)(25,"line",21)(26,"rect",22),C(27,ja,5,9,":svg:text",23),s()(),L(),o(28,"div",24),p(29),s(),o(30,"div",25),C(31,$a,2,3)(32,qa,3,1)(33,Za,2,3)(34,Ka,2,3)(35,Qa,2,3),s()()()),a&2&&(f("ngClass",j(8,Wa,i.service.values.Active||i.service.values.On)),r(2),S("aria-label",c(3,6,"accessories.core.heater_cooler")),r(24),S("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"),r(),_("CurrentTemperature"in i.service.values?27:-1),r(2),g(i.service.customName||i.service.serviceName),r(2),_("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:[U,V,Ve,w,Ie,Ae],encapsulation:2})}return e})();var et=(e,n)=>({"fa-check-circle":e,"fa-blank":n});function Ya(e,n){if(e&1){let t=O();o(0,"button",8),y("click",function(i){M(t);let d=m(2);return E(d.setTargetMode(0,i))}),o(1,"div",9),u(2,"i",10),s(),p(3),l(4,"translate"),o(5,"div",11),u(6,"i",12),s()()}if(e&2){let t=m(2);r(2),f("ngClass",I(4,et,t.targetMode===0,t.targetMode!==0)),r(),x(" ",c(4,2,"accessories.control.auto")," ")}}function Xa(e,n){if(e&1){let t=O();o(0,"button",8),y("click",function(i){M(t);let d=m(2);return E(d.setTargetMode(1,i))}),o(1,"div",9),u(2,"i",10),s(),p(3),l(4,"translate"),o(5,"div",11),u(6,"i",12),s()()}if(e&2){let t=m(2);r(2),f("ngClass",I(4,et,t.targetMode===1,t.targetMode!==1)),r(),x(" ",c(4,2,"accessories.control.humidify")," ")}}function Ja(e,n){if(e&1){let t=O();o(0,"button",8),y("click",function(i){M(t);let d=m(2);return E(d.setTargetMode(2,i))}),o(1,"div",9),u(2,"i",10),s(),p(3),l(4,"translate"),o(5,"div",11),u(6,"i",12),s()()}if(e&2){let t=m(2);r(2),f("ngClass",I(4,et,t.targetMode===2,t.targetMode!==2)),r(),x(" ",c(4,2,"accessories.control.dehumidify")," ")}}function es(e,n){if(e&1&&(o(0,"h6",14),p(1),l(2,"translate"),s(),o(3,"div",15),l(4,"translate"),C(5,Ya,7,7,"button",16),C(6,Xa,7,7,"button",16),C(7,Ja,7,7,"button",16),s()),e&2){let t=m();r(),g(c(2,5,"accessories.control.mode")),r(2),S("aria-label",c(4,7,"accessories.control.mode_control")),r(2),_(t.targetStateValidValues.includes(0)?5:-1),r(),_(t.targetStateValidValues.includes(1)?6:-1),r(),_(t.targetStateValidValues.includes(2)?7:-1)}}function ts(e,n){if(e&1){let t=O();o(0,"h6",14),p(1),l(2,"translate"),s(),o(3,"nouislider",17),q("ngModelChange",function(i){M(t);let d=m(2);return z(d.autoHumidity,i)||(d.autoHumidity=i),E(i)}),y("ngModelChange",function(){M(t);let i=m(2);return E(i.onAutoHumidityStateChange())}),s()}if(e&2){let t=m(2);r(),Le(" ",c(2,7,"accessories.control.target_auto"),": ",t.autoHumidity[0],"% - ",t.autoHumidity[1],"% "),r(2),f("min",t.RelativeHumidityHumidifierThreshold.minValue)("max",t.RelativeHumidityDehumidifierThreshold.maxValue)("step",t.RelativeHumidityDehumidifierThreshold.minStep),G("ngModel",t.autoHumidity)}}function is(e,n){if(e&1){let t=O();o(0,"h6",14),p(1),l(2,"translate"),s(),o(3,"nouislider",17),q("ngModelChange",function(i){M(t);let d=m(2);return z(d.targetHumidifierHumidity,i)||(d.targetHumidifierHumidity=i),E(i)}),y("ngModelChange",function(){M(t);let i=m(2);return E(i.onHumidityStateChange())}),s()}if(e&2){let t=m(2);r(),R("",c(2,6,"accessories.control.target_auto"),": ",t.targetHumidifierHumidity,"%"),r(2),f("min",t.RelativeHumidityHumidifierThreshold.minValue)("max",t.RelativeHumidityHumidifierThreshold.maxValue)("step",t.RelativeHumidityHumidifierThreshold.minStep),G("ngModel",t.targetHumidifierHumidity)}}function ns(e,n){if(e&1){let t=O();o(0,"h6",14),p(1),l(2,"translate"),s(),o(3,"nouislider",17),q("ngModelChange",function(i){M(t);let d=m(2);return z(d.targetDehumidifierHumidity,i)||(d.targetDehumidifierHumidity=i),E(i)}),y("ngModelChange",function(){M(t);let i=m(2);return E(i.onHumidityStateChange())}),s()}if(e&2){let t=m(2);r(),R("",c(2,6,"accessories.control.target_auto"),": ",t.targetDehumidifierHumidity,"%"),r(2),f("min",t.RelativeHumidityDehumidifierThreshold.minValue)("max",t.RelativeHumidityDehumidifierThreshold.maxValue)("step",t.RelativeHumidityDehumidifierThreshold.minStep),G("ngModel",t.targetDehumidifierHumidity)}}function os(e,n){if(e&1&&C(0,ts,4,9)(1,is,4,8)(2,ns,4,8),e&2){let t=m();_(t.RelativeHumidityHumidifierThreshold&&t.RelativeHumidityDehumidifierThreshold?0:t.RelativeHumidityHumidifierThreshold&&!t.RelativeHumidityDehumidifierThreshold?1:!t.RelativeHumidityHumidifierThreshold&&t.RelativeHumidityDehumidifierThreshold?2:-1)}}var en=(()=>{class e{$activeModal=D(Y);service;type;targetState;targetMode;targetHumidityChanged=new ee;targetStateValidValues=[];RelativeHumidityDehumidifierThreshold;RelativeHumidityHumidifierThreshold;targetDehumidifierHumidity;targetHumidifierHumidity;autoHumidity;constructor(){this.targetHumidityChanged.pipe(te(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(a=>{a.style.background="linear-gradient(to left, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))"})},10)}loadTargetHumidity(){this.targetDehumidifierHumidity=this.service.getCharacteristic("RelativeHumidityDehumidifierThreshold")?.value,this.targetHumidifierHumidity=this.service.getCharacteristic("RelativeHumidityHumidifierThreshold")?.value,this.autoHumidity=[this.targetHumidifierHumidity,this.targetDehumidifierHumidity]}setTargetState(t,a){this.targetState=t,this.service.getCharacteristic("Active").setValue(this.targetState),this.loadTargetHumidity(),a.target.blur()}setTargetMode(t,a){this.targetMode=t,this.service.getCharacteristic("TargetHumidifierDehumidifierState").setValue(this.targetMode),this.loadTargetHumidity(),a.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(a){return new(a||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service",type:"type"},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(a,i){a&1&&(o(0,"div",0)(1,"div",1),u(2,"h5",2),o(3,"button",3),l(4,"translate"),y("click",function(){return i.dismissModal()}),s()(),o(5,"div",4)(6,"h6",5),u(7,"i",6),p(8),s(),o(9,"div",7),l(10,"translate"),o(11,"button",8),y("click",function(b){return i.setTargetState(0,b)}),o(12,"div",9),u(13,"i",10),s(),p(14),l(15,"translate"),o(16,"div",11),u(17,"i",12),s()(),o(18,"button",8),y("click",function(b){return i.setTargetState(1,b)}),o(19,"div",9),u(20,"i",10),s(),p(21),l(22,"translate"),o(23,"div",11),u(24,"i",12),s()()(),C(25,es,8,9),C(26,os,3,1),s(),u(27,"div",13),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,12,"form.button_close")),r(4),Ze("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"),r(),x("",i.service.values.CurrentRelativeHumidity,"% "),r(),S("aria-label",c(10,14,"accessories.control.state_control")),r(4),f("ngClass",I(20,et,i.targetState===0,i.targetState!==0)),r(),x(" ",c(15,16,"accessories.control.off")," "),r(6),f("ngClass",I(23,et,i.targetState===1,i.targetState!==1)),r(),x(" ",c(22,18,"accessories.control.on")," "),r(4),_(i.targetStateValidValues.length?25:-1),r(),_(i.targetStateValidValues.includes(0)?26:-1))},dependencies:[V,Q,oe,re,ae,w],encapsulation:2})}return e})();var rs=e=>({"accessory-on":e});function as(e,n){if(e&1&&(A(),o(0,"text",36),p(1),s()),e&2){let t=m();r(),x(" ",t.service.values.CurrentRelativeHumidity,"% ")}}function ss(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.off")," ")}function ls(e,n){if(e&1&&(u(0,"i",39),p(1)),e&2){let t=m(2);r(),R(" ",t.service.values.RelativeHumidityHumidifierThreshold,"% - ",t.service.values.RelativeHumidityDehumidifierThreshold,"% ")}}function cs(e,n){if(e&1&&(u(0,"i",39),p(1)),e&2){let t=m(2);r(),x(" ",t.service.values.RelativeHumidityHumidifierThreshold,"% ")}}function ps(e,n){if(e&1&&(u(0,"i",39),p(1)),e&2){let t=m(2);r(),x(" ",t.service.values.RelativeHumidityDehumidifierThreshold,"% ")}}function ds(e,n){if(e&1&&C(0,ls,2,2)(1,cs,2,1)(2,ps,2,1),e&2){let t=m();_(t.hasHumidifier&&t.hasDehumidifier?0:t.hasHumidifier&&!t.hasDehumidifier?1:!t.hasHumidifier&&t.hasDehumidifier?2:-1)}}function ms(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.humidify")," ")}function us(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.dehumidify")," ")}function fs(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.on")," ")}function vs(e,n){if(e&1&&C(0,us,2,3)(1,fs,2,3),e&2){let t=m();_(t.service.values.TargetHumidifierDehumidifierState===2?0:1)}}var tn=(()=>{class e{$modal=D(X);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(en,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.type=this.type}}static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0),y("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3)(5,"defs")(6,"linearGradient",4)(7,"stop",5),u(8,"animate",6),s(),o(9,"stop",7),u(10,"animate",8),s(),o(11,"stop",9),u(12,"animate",6),s()(),o(13,"linearGradient",10)(14,"stop",11),u(15,"animate",12),s(),o(16,"stop",13),u(17,"animate",14),s(),o(18,"stop",15),u(19,"animate",12),s()()(),u(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),C(40,as,2,1,":svg:text",36),s()(),L(),o(41,"div",37),p(42),s(),o(43,"div",38),C(44,ss,2,3)(45,ds,3,1)(46,ms,2,3)(47,vs,2,1),s()()()),a&2&&(f("ngClass",j(8,rs,i.service.values.Active||i.service.values.On)),r(2),S("aria-label",c(3,6,"accessories.core.humidifier_dehumidifier")),r(37),S("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"),r(),_("CurrentRelativeHumidity"in i.service.values?40:-1),r(2),g(i.service.customName||i.service.serviceName),r(2),_("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:[U,V,w],encapsulation:2})}return e})();function gs(e,n){if(e&1&&p(0),e&2){let t=m();x(" ",t.service.values.CurrentRelativeHumidity,"% ")}}function hs(e,n){e&1&&(p(0),l(1,"translate")),e&2&&x(" ",c(1,1,"accessories.control.no_data")," ")}var nn=(()=>{class e{service;static \u0275fac=function(a){return new(a||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(a,i){a&1&&(fe(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),A(),fe(4,"svg",3),Ee(5,"rect",4),fe(6,"g",5),Ee(7,"path",6),Ce(),Ee(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),Ce()(),L(),fe(21,"div",20),p(22),Ce(),fe(23,"div",21),C(24,gs,1,1)(25,hs,2,3),Ce()()()),a&2&&(r(2),S("aria-label",c(3,3,"accessories.core.humidity_sensor")),r(20),g(i.service.customName||i.service.serviceName),r(2),_("CurrentRelativeHumidity"in i.service.values?24:25))},dependencies:[w],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 Cs=e=>({"accessory-on":e});function _s(e,n){e&1&&(o(0,"div",14),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.running")))}function xs(e,n){e&1&&(o(0,"div",14),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.off")))}var on=(()=>{class e{service;static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(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()(),L(),o(14,"div",13),p(15),s(),C(16,_s,3,3,"div",14)(17,xs,3,3,"div",14),s()()),a&2&&(f("ngClass",j(6,Cs,i.service.values.InUse)),r(2),S("aria-label",c(3,4,"accessories.core.irrigation_system")),r(13),x(" ",i.service.customName||i.service.values.ConfiguredName||i.service.serviceName," "),r(),_(i.service.values.InUse?16:17))},dependencies:[V,w],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 ys=e=>({"accessory-on":e});function ks(e,n){e&1&&(o(0,"div",23),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.detected")))}function Ss(e,n){e&1&&(o(0,"div",24),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.not_detected")))}var rn=(()=>{class e{service;static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(5,"rect",4),o(6,"g",5),u(7,"path",6),s(),o(8,"g",7),u(9,"path",6),s(),u(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()(),L(),o(24,"div",22),p(25),s(),C(26,ks,3,3,"div",23)(27,Ss,3,3,"div",24),s()()),a&2&&(f("ngClass",j(6,ys,i.service.values.LeakDetected)),r(2),S("aria-label",c(3,4,"accessories.core.leak_sensor")),r(23),g(i.service.customName||i.service.serviceName),r(),_(i.service.values.LeakDetected?26:27))},dependencies:[V,w],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 bs(e,n){if(e&1&&(fe(0,"div",28),p(1),l(2,"number"),Ce()),e&2){let t=m();r(),x("",ce(2,1,t.service.values.CurrentAmbientLightLevel,"0.1-1")," lux")}}function Ts(e,n){if(e&1&&(fe(0,"div",28),p(1),l(2,"number"),Ce()),e&2){let t=m();r(),x("",ce(2,1,t.service.values.CurrentAmbientLightLevel,"1.0-0")," lux")}}var an=(()=>{class e{service;static \u0275fac=function(a){return new(a||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(a,i){a&1&&(fe(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),A(),fe(4,"svg",3),Ee(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),Ce()(),L(),fe(28,"div",27),p(29),Ce(),C(30,bs,3,4,"div",28)(31,Ts,3,4,"div",28),Ce()()),a&2&&(r(2),S("aria-label",c(3,3,"accessories.core.light_sensor")),r(27),g(i.service.customName||i.service.serviceName),r(),_(i.service.values.CurrentAmbientLightLevel<1?30:31))},dependencies:[Ve,w],encapsulation:2})}return e})();var vt=(()=>{class e{miredToKelvin(t){return Math.round(1e6/t)}kelvinToMired(t){return Math.round(1e6/t)}kelvinToHsl(t){let a=t/100,i,d,b;a<=66?(i=255,d=Math.min(99.4708025861*Math.log(a)-161.1195681661,255),b=a<=19?0:Math.min(138.5177312231*Math.log(a-10)-305.0447927307,255)):(i=Math.min(329.698727446*(a-60)**-.1332047592,255),d=Math.min(288.1221695283*(a-60)**-.0755148492,255),b=255),i/=255,d/=255,b/=255;let Z=Math.max(i,d,b),ie=Math.min(i,d,b),W=Z-ie,K=0;W!==0&&(Z===i?K=(d-b)/W%6:Z===d?K=(b-i)/W+2:K=(i-d)/W+4,K=Math.round(K*60),K<0&&(K+=360));let pe=(Z+ie)/2,ye=W===0?0:W/(1-Math.abs(2*pe-1));return`hsl(${Math.round(K)}, ${Math.round(ye*100)}%, ${Math.round(pe*100)}%)`}static \u0275fac=function(a){return new(a||e)};static \u0275prov=si({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var sn=(e,n)=>({"fa-check-circle":e,"fa-blank":n}),ws=(e,n)=>({"off-text":e,"on-text":n}),Nt=(e,n)=>({"mb-1":e,"":n});function Ms(e,n){e&1&&u(0,"div")}function Es(e,n){if(e&1&&(o(0,"div",11)(1,"div",13)(2,"div",7),u(3,"i",14),s(),p(4),l(5,"translate"),o(6,"div",9),u(7,"i",10),s()()()),e&2){let t=m();r(3),f("ngClass",I(5,ws,!t.isAdaptiveLightingEnabled,t.isAdaptiveLightingEnabled)),r(),R(" ",c(5,3,"accessories.control.adaptive_lighting"),": ",t.isAdaptiveLightingEnabled?"ON":"OFF"," ")}}function Vs(e,n){if(e&1){let t=O();o(0,"h6",15),p(1),l(2,"translate"),s(),o(3,"nouislider",16),q("ngModelChange",function(i){M(t);let d=m();return z(d.targetBrightness.value,i)||(d.targetBrightness.value=i),E(i)}),y("ngModelChange",function(){M(t);let i=m();return E(i.onBrightnessStateChange())}),s()}if(e&2){let t=m();r(),R("",c(2,6,"accessories.control.brightness"),": ",t.targetBrightness.value,"%"),r(2),f("min",t.targetBrightness.min)("max",t.targetBrightness.max)("step",t.targetBrightness.step),G("ngModel",t.targetBrightness.value)}}function Bs(e,n){e&1&&(o(0,"div",18)(1,"span",19),p(2),l(3,"translate"),s()()),e&2&&(r(2),g(c(3,1,"accessories.control.adaptive_lighting_note")))}function As(e,n){if(e&1){let t=O();o(0,"h6",15),p(1),l(2,"translate"),s(),o(3,"nouislider",17),q("ngModelChange",function(i){M(t);let d=m();return z(d.targetHue.value,i)||(d.targetHue.value=i),E(i)}),y("ngModelChange",function(){M(t);let i=m();return E(i.onHueStateChange())}),s(),C(4,Bs,4,3,"div",18)}if(e&2){let t=m();r(),R("",c(2,8,"accessories.control.hue"),": ",t.targetHue.value,"\xB0"),r(2),f("min",0)("max",360)("step",1),G("ngModel",t.targetHue.value),f("ngClass",I(10,Nt,t.isAdaptiveLightingEnabled,!t.isAdaptiveLightingEnabled)),r(),_(t.isAdaptiveLightingEnabled?4:-1)}}function Is(e,n){e&1&&(o(0,"div",18)(1,"span",19),p(2),l(3,"translate"),s()()),e&2&&(r(2),g(c(3,1,"accessories.control.adaptive_lighting_note")))}function Ds(e,n){if(e&1){let t=O();o(0,"h6",15),p(1),l(2,"translate"),s(),o(3,"nouislider",17),q("ngModelChange",function(i){M(t);let d=m();return z(d.targetSaturation.value,i)||(d.targetSaturation.value=i),E(i)}),y("ngModelChange",function(){M(t);let i=m();return E(i.onSaturationStateChange())}),s(),C(4,Is,4,3,"div",18)}if(e&2){let t=m();r(),R("",c(2,8,"accessories.control.saturation"),": ",t.targetSaturation.value,"%"),r(2),f("min",0)("max",100)("step",1),G("ngModel",t.targetSaturation.value),f("ngClass",I(10,Nt,t.isAdaptiveLightingEnabled,!t.isAdaptiveLightingEnabled)),r(),_(t.isAdaptiveLightingEnabled?4:-1)}}function Fs(e,n){e&1&&(o(0,"div",18)(1,"span",19),p(2),l(3,"translate"),s()()),e&2&&(r(2),g(c(3,1,"accessories.control.adaptive_lighting_note")))}function Ps(e,n){if(e&1){let t=O();o(0,"h6",15),p(1),l(2,"translate"),l(3,"convertMired"),s(),o(4,"nouislider",17),q("ngModelChange",function(i){M(t);let d=m();return z(d.targetColorTemperature.value,i)||(d.targetColorTemperature.value=i),E(i)}),y("ngModelChange",function(){M(t);let i=m();return E(i.onColorTemperatureStateChange())}),s(),C(5,Fs,4,3,"div",18)}if(e&2){let t=m();r(),R(" ",c(2,8,"accessories.control.color_temperature"),": ",c(3,10,t.targetColorTemperature.mired)," "),r(3),f("min",t.targetColorTemperature.min)("max",t.targetColorTemperature.max)("step",t.targetColorTemperature.step),G("ngModel",t.targetColorTemperature.value),f("ngClass",I(12,Nt,t.isAdaptiveLightingEnabled,!t.isAdaptiveLightingEnabled)),r(),_(t.isAdaptiveLightingEnabled?5:-1)}}var ln=(()=>{class e{$activeModal=D(Y);$colour=D(vt);service;isAdaptiveLightingEnabled$;targetMode;targetBrightness;targetBrightnessChanged=new ee;targetHue;targetHueChanged=new ee;targetSaturation;targetSaturationChanged=new ee;targetColorTemperature;targetColorTemperatureChanged=new ee;hasAdaptiveLighting=!1;isAdaptiveLightingEnabled=!1;sliderIndex=0;constructor(){this.targetBrightnessChanged.pipe(te(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(te(500)).subscribe(()=>{this.service.getCharacteristic("Hue").setValue(this.targetHue.value)}),this.targetSaturationChanged.pipe(te(500)).subscribe(()=>{this.service.getCharacteristic("Saturation").setValue(this.targetSaturation.value)}),this.targetColorTemperatureChanged.pipe(te(500)).subscribe(t=>{this.service.getCharacteristic("ColorTemperature").setValue(t)})}ngOnInit(){this.targetMode=this.service.values.On,this.loadTargetBrightness(),this.loadTargetHue(),this.loadTargetSaturation(),this.loadTargetColorTemperature()}setTargetMode(t,a){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),a.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 a=this.targetHue.value;t.style.background=`linear-gradient(to right,
2
2
  hsl(${a}, 0%, 50%),
3
3
  hsl(${a}, 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 a=document.querySelectorAll(".noUi-target")[this.sliderIndex];a&&(a.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 a=document.querySelectorAll(".noUi-target")[this.sliderIndex];a&&(a.style.background=`linear-gradient(to right,
4
4
  hsl(0, 100%, 50%),
@@ -9,7 +9,7 @@ import{a as Ti,b as Ie,c as He}from"./chunk-BCEDAADS.js";import{m as Y,n as X}fr
9
9
  hsl(300, 100%, 50%),
10
10
  hsl(360, 100%, 50%))`),this.sliderIndex+=1},10))}loadTargetSaturation(){this.service.getCharacteristic("Saturation")&&(this.targetSaturation={value:this.service.getCharacteristic("Saturation").value},setTimeout(()=>{let a=document.querySelectorAll(".noUi-target")[this.sliderIndex];if(a){let i=this.targetHue.value||0;a.style.background=`linear-gradient(to right,
11
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 a=document.querySelectorAll(".noUi-target")[this.sliderIndex];if(a){let i=this.$colour.kelvinToHsl(this.targetColorTemperature.min),d=this.$colour.kelvinToHsl(this.targetColorTemperature.max);a.style.background=`linear-gradient(to right, ${i}, ${d})`}},10),this.isAdaptiveLightingEnabled$&&(this.hasAdaptiveLighting=!0,this.isAdaptiveLightingEnabled$.subscribe(a=>{this.isAdaptiveLightingEnabled=a})))}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service",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(a,i){a&1&&(o(0,"div",0)(1,"div",1),u(2,"h5",2),o(3,"button",3),l(4,"translate"),y("click",function(){return i.dismissModal()}),s()(),o(5,"div",4)(6,"div",5),l(7,"translate"),o(8,"button",6),y("click",function(b){return i.setTargetMode(!1,b)}),o(9,"div",7),u(10,"i",8),s(),p(11),l(12,"translate"),o(13,"div",9),u(14,"i",10),s()(),o(15,"button",6),y("click",function(b){return i.setTargetMode(!0,b)}),o(16,"div",7),u(17,"i",8),s(),p(18),l(19,"translate"),o(20,"div",9),u(21,"i",10),s()(),C(22,Ms,1,0,"div"),s(),C(23,Es,8,8,"div",11),C(24,Vs,4,8),C(25,As,5,13),C(26,Ds,5,13),C(27,Ps,6,15),s(),u(28,"div",12),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,13,"form.button_close")),r(3),S("aria-label",c(7,15,"accessories.control.mode_control")),r(4),f("ngClass",I(21,sn,!i.targetMode,i.targetMode)),r(),x(" ",c(12,17,"accessories.control.off")," "),r(6),f("ngClass",I(24,sn,i.targetMode,!i.targetMode)),r(),x(" ",c(19,19,"accessories.control.on")," "),r(4),_(i.hasAdaptiveLighting?22:-1),r(),_(i.hasAdaptiveLighting?23:-1),r(),_(i.targetBrightness?24:-1),r(),_(i.targetHue?25:-1),r(),_(i.targetSaturation?26:-1),r(),_(i.targetColorTemperature?27:-1))},dependencies:[Q,oe,re,ae,V,w,Ti],encapsulation:2})}return e})();var Ls=e=>({"accessory-on":e});function Hs(e,n){if(e&1&&(u(0,"div",10),l(1,"translate")),e&2){let t=m();f("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"),qe)}}function Os(e,n){if(e&1&&(u(0,"div",10),l(1,"translate")),e&2){let t=m();f("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"),qe)}}var cn=(()=>{class e{$modal=D(X);intervalId;$colour=D(vt);service;readyForControl=!1;hasAdaptiveLighting=!1;isAdaptiveLightingEnabled=!1;isAdaptiveLightingEnabled$=new ii(!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(ln,{size:"md",backdrop:"static"});if(t.componentInstance.service=this.service,this.hasAdaptiveLighting){t.componentInstance.isAdaptiveLightingEnabled$=this.isAdaptiveLightingEnabled$,this.intervalId&&clearInterval(this.intervalId),this.intervalId=setInterval(()=>{this.isAdaptiveLightingEnabled$.next(!!this.service.values.CharacteristicValueActiveTransitionCount)},3e3);let a=this.isAdaptiveLightingEnabled$.subscribe(i=>{this.isAdaptiveLightingEnabled=i});t.result.finally(()=>{this.intervalId&&clearInterval(this.intervalId),a.unsubscribe(),this.intervalId=setInterval(()=>{this.isAdaptiveLightingEnabled$.next(!!this.service.values.CharacteristicValueActiveTransitionCount)},3e4)})}}}kelvinToHex(t){t=Math.max(1e3,Math.min(4e4,t));let a=t/100,i,d,b;return a<=66?(i=255,d=a,d=99.4708025861*Math.log(d)-161.1195681661,b=a<=19?0:138.5177312231*Math.log(a-10)-305.0447927307):(i=329.698727446*(a-60)**-.1332047592,d=288.1221695283*(a-60)**-.0755148492,b=255),i=Math.round(Math.min(Math.max(i,0),255)),d=Math.round(Math.min(Math.max(d,0),255)),b=Math.round(Math.min(Math.max(b,0),255)),`#${i.toString(16).padStart(2,"0")}${d.toString(16).padStart(2,"0")}${b.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(a){return new(a||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(a,i){a&1&&(o(0,"div",0),y("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(5,"path",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"line",8),s()(),L(),o(10,"div",9),p(11),s(),C(12,Hs,2,3,"div",10)(13,Os,2,3,"div",10),s()()),a&2&&(f("ngClass",j(8,Ls,i.service.values.On||i.service.values.Active)),r(2),S("aria-label",c(3,6,"accessories.core.lightbulb")),r(3),S("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),r(6),g(i.service.customName||i.service.serviceName),r(),_(i.service.values.Brightness?12:13))},dependencies:[U,V,w],encapsulation:2})}return e})();var gt=(()=>{class e{transform(t){if(typeof t!="number"||Number.isNaN(t))return"";let a=Math.floor(t/60),i=t%60;return[a>0?`${a.toString()}m`:"",i>0?`${i.toString()}s`:""].filter(Boolean).join(" ")}static \u0275fac=function(a){return new(a||e)};static \u0275pipe=ui({name:"duration",type:e,pure:!0})}return e})();var pn=(e,n)=>({"fa-check-circle":e,"fa-blank":n});function Ns(e,n){if(e&1){let t=O();o(0,"h6",12),p(1),l(2,"translate"),l(3,"duration"),s(),o(4,"nouislider",13),q("ngModelChange",function(i){M(t);let d=m();return z(d.targetLockManagementAutoSecurityTimeout.value,i)||(d.targetLockManagementAutoSecurityTimeout.value=i),E(i)}),y("ngModelChange",function(){M(t);let i=m();return E(i.onLockManagementAutoSecurityTimeoutStateChange())}),s()}if(e&2){let t=m();r(),R(" ",c(2,6,"accessories.control.lock_auto"),": ",t.targetLockManagementAutoSecurityTimeout.value===0?"\u221E":c(3,8,t.targetLockManagementAutoSecurityTimeout.value)," "),r(3),f("min",t.targetLockManagementAutoSecurityTimeout.min)("max",t.targetLockManagementAutoSecurityTimeout.max)("step",10),G("ngModel",t.targetLockManagementAutoSecurityTimeout.value)}}var dn=(()=>{class e{$activeModal=D(Y);lockTimeout;service;serviceManagement;targetMode;targetLockManagementAutoSecurityTimeout;targetLockManagementAutoSecurityTimeoutChanged=new ee;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(te(300),ri()).subscribe(()=>{this.serviceManagement.getCharacteristic("LockManagementAutoSecurityTimeout").setValue(this.targetLockManagementAutoSecurityTimeout.value)}),this.loadTargetLockManagementAutoSecurityTimeout())}setTargetMode(t,a){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)),a.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(a){return new(a||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service"},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(a,i){a&1&&(o(0,"div",0)(1,"div",1),u(2,"h5",2),o(3,"button",3),l(4,"translate"),y("click",function(){return i.dismissModal()}),s()(),o(5,"div",4)(6,"div",5),l(7,"translate"),o(8,"button",6),y("click",function(b){return i.setTargetMode(1,b)}),o(9,"div",7),u(10,"i",8),s(),p(11),l(12,"translate"),o(13,"div",9),u(14,"i",10),s()(),o(15,"button",6),y("click",function(b){return i.setTargetMode(0,b)}),o(16,"div",7),u(17,"i",8),s(),p(18),l(19,"translate"),o(20,"div",9),u(21,"i",10),s()()(),C(22,Ns,5,10),s(),u(23,"div",11),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,8,"form.button_close")),r(3),S("aria-label",c(7,10,"accessories.control.mode_control")),r(4),f("ngClass",I(16,pn,i.targetMode===1,i.targetMode!==1)),r(),x(" ",c(12,12,"accessories.control.locked")," "),r(6),f("ngClass",I(19,pn,i.targetMode===0,i.targetMode!==0)),r(),x(" ",c(19,14,"accessories.control.unlocked")," "),r(4),_(i.serviceManagement?22:-1))},dependencies:[Q,oe,re,ae,V,w,gt],encapsulation:2})}return e})();var Rs=(e,n,t,a)=>({"accessory-on":e,unlocked:n,jammed:t,error:a}),Ws=(e,n)=>({"red-text":e,"grey-text":n});function js(e,n){if(e&1&&(u(0,"div",9),l(1,"translate")),e&2){let t=m();f("innerText",c(1,2,t.service.values.LockCurrentState?"accessories.control.locked":"accessories.control.unlocked"))("ngClass",I(4,Ws,!t.service.values.LockCurrentState,t.service.values.LockCurrentState))}}function $s(e,n){e&1&&(o(0,"div",10),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.jammed")))}function Us(e,n){e&1&&(o(0,"div",10),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.unknown")))}var mn=(()=>{class e{$modal=D(X);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(dn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service}}static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0),y("shortClick",function(){return i.onClick()})("longClick",function(){return i.onLongClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(5,"path",4)(6,"path",5)(7,"rect",6)(8,"circle",7),s()(),L(),o(9,"div",8),p(10),s(),C(11,js,2,7,"div",9)(12,$s,3,3,"div",10)(13,Us,3,3,"div",10),s()()),a&2&&(f("ngClass",ct(6,Rs,"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)),r(2),S("aria-label",c(3,4,"accessories.core.lock_mechanism")),r(8),g(i.service.customName||i.service.serviceName),r(),_(i.service.values.LockCurrentState<2?11:i.service.values.LockCurrentState===2?12:i.service.values.LockCurrentState===3?13:-1))},dependencies:[U,V,w],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 Gs=e=>({"accessory-on":e});function zs(e,n){if(e&1&&(u(0,"div",10),l(1,"translate")),e&2){let t=m();f("innerHTML",t.isOn?t.brightness+"%":c(1,1,"accessories.control.off"),qe)}}function qs(e,n){if(e&1&&(u(0,"div",10),l(1,"translate")),e&2){let t=m();f("innerHTML",c(1,1,t.isOn?"accessories.control.on":"accessories.control.off"),qe)}}var un=(()=>{class e{$accessories=D(He);service;readyForControl=!1;onClick(){if(!this.readyForControl)return;let a=!(this.service.clusters?.onOff?.onOff??!1);this.$accessories.controlMatterAccessory(this.service.uuid,"onOff",{onOff:a},this.service.bridge?.username,this.service.partId).catch(i=>{console.error("Failed to control Matter lightbulb:",i)})}get isOn(){return this.service.clusters?.onOff?.onOff??!1}get brightness(){let t=this.service.clusters?.levelControl?.currentLevel??0;return Math.round(t/254*100)}get hasBrightness(){return!!this.service.clusters?.levelControl}get hasColor(){return!!this.service.clusters?.colorControl}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=T({type:e,selectors:[["app-matter-lightbulb"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:14,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"],["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(a,i){a&1&&(o(0,"div",0),y("click",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(5,"path",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"line",8),s()(),L(),o(10,"div",9),p(11),s(),C(12,zs,2,3,"div",10)(13,qs,2,3,"div",10),s()()),a&2&&(f("ngClass",j(8,Gs,i.isOn)),r(2),S("aria-label",c(3,6,"accessories.core.lightbulb")),r(3),S("fill",i.isOn?"#ffcf55":"none")("fill-opacity",i.brightness!==void 0?.25+i.brightness/100*.5:.75),r(6),g(i.service.customName||i.service.serviceName||i.service.displayName),r(),_(i.hasBrightness?12:13))},dependencies:[V,w],encapsulation:2})}return e})();var Zs=e=>({"accessory-on":e});function Ks(e,n){e&1&&(A(),u(0,"line",8)(1,"line",9)(2,"line",10))}function Qs(e,n){e&1&&(A(),u(0,"line",11)(1,"line",12)(2,"line",13))}function Ys(e,n){e&1&&(A(),u(0,"line",13)(1,"line",14)(2,"line",15))}var fn=(()=>{class e{$accessories=D(He);$settings=D(Te);service;readyForControl=!1;browserLang=this.$settings.browserLang;onClick(){if(!this.readyForControl)return;let a=!(this.service.clusters?.onOff?.onOff??!1);this.$accessories.controlMatterAccessory(this.service.uuid,"onOff",{onOff:a},this.service.bridge?.username,this.service.partId).catch(i=>{console.error("Failed to control Matter outlet:",i)})}get isOn(){return this.service.clusters?.onOff?.onOff??!1}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=T({type:e,selectors:[["app-matter-outlet"]],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(a,i){a&1&&(o(0,"div",0),y("click",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(5,"rect",4)(6,"circle",5),C(7,Ks,3,0)(8,Qs,3,0)(9,Ys,3,0),s()(),L(),o(10,"div",6),p(11),s(),u(12,"div",7),l(13,"translate"),s()()),a&2&&(f("ngClass",j(9,Zs,i.isOn)),r(2),S("aria-label",c(3,5,"accessories.core.outlet")),r(5),_(i.browserLang==="en-GB"?7:i.browserLang==="en-AU"||i.browserLang==="en-NZ"?8:9),r(4),g(i.service.customName||i.service.serviceName||i.service.displayName),r(),f("innerText",c(13,7,i.isOn?"accessories.control.on":"accessories.control.off")))},dependencies:[V,w],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 Xs=e=>({"accessory-on":e}),vn=(()=>{class e{$accessories=D(He);service;readyForControl=!1;onClick(){if(!this.readyForControl)return;let a=!(this.service.clusters?.onOff?.onOff??!1);this.$accessories.controlMatterAccessory(this.service.uuid,"onOff",{onOff:a},this.service.bridge?.username,this.service.partId).catch(i=>{console.error("Failed to control Matter switch:",i)})}get isOn(){return this.service.clusters?.onOff?.onOff??!1}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=T({type:e,selectors:[["app-matter-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
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 a=document.querySelectorAll(".noUi-target")[this.sliderIndex];if(a){let i=this.$colour.kelvinToHsl(this.targetColorTemperature.min),d=this.$colour.kelvinToHsl(this.targetColorTemperature.max);a.style.background=`linear-gradient(to right, ${i}, ${d})`}},10),this.isAdaptiveLightingEnabled$&&(this.hasAdaptiveLighting=!0,this.isAdaptiveLightingEnabled$.subscribe(a=>{this.isAdaptiveLightingEnabled=a})))}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service",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(a,i){a&1&&(o(0,"div",0)(1,"div",1),u(2,"h5",2),o(3,"button",3),l(4,"translate"),y("click",function(){return i.dismissModal()}),s()(),o(5,"div",4)(6,"div",5),l(7,"translate"),o(8,"button",6),y("click",function(b){return i.setTargetMode(!1,b)}),o(9,"div",7),u(10,"i",8),s(),p(11),l(12,"translate"),o(13,"div",9),u(14,"i",10),s()(),o(15,"button",6),y("click",function(b){return i.setTargetMode(!0,b)}),o(16,"div",7),u(17,"i",8),s(),p(18),l(19,"translate"),o(20,"div",9),u(21,"i",10),s()(),C(22,Ms,1,0,"div"),s(),C(23,Es,8,8,"div",11),C(24,Vs,4,8),C(25,As,5,13),C(26,Ds,5,13),C(27,Ps,6,15),s(),u(28,"div",12),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,13,"form.button_close")),r(3),S("aria-label",c(7,15,"accessories.control.mode_control")),r(4),f("ngClass",I(21,sn,!i.targetMode,i.targetMode)),r(),x(" ",c(12,17,"accessories.control.off")," "),r(6),f("ngClass",I(24,sn,i.targetMode,!i.targetMode)),r(),x(" ",c(19,19,"accessories.control.on")," "),r(4),_(i.hasAdaptiveLighting?22:-1),r(),_(i.hasAdaptiveLighting?23:-1),r(),_(i.targetBrightness?24:-1),r(),_(i.targetHue?25:-1),r(),_(i.targetSaturation?26:-1),r(),_(i.targetColorTemperature?27:-1))},dependencies:[Q,oe,re,ae,V,w,Ti],encapsulation:2})}return e})();var Ls=e=>({"accessory-on":e});function Hs(e,n){if(e&1&&(u(0,"div",10),l(1,"translate")),e&2){let t=m();f("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"),qe)}}function Os(e,n){if(e&1&&(u(0,"div",10),l(1,"translate")),e&2){let t=m();f("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"),qe)}}var cn=(()=>{class e{$modal=D(X);intervalId;$colour=D(vt);service;readyForControl=!1;hasAdaptiveLighting=!1;isAdaptiveLightingEnabled=!1;isAdaptiveLightingEnabled$=new ii(!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(ln,{size:"md",backdrop:"static"});if(t.componentInstance.service=this.service,this.hasAdaptiveLighting){t.componentInstance.isAdaptiveLightingEnabled$=this.isAdaptiveLightingEnabled$,this.intervalId&&clearInterval(this.intervalId),this.intervalId=setInterval(()=>{this.isAdaptiveLightingEnabled$.next(!!this.service.values.CharacteristicValueActiveTransitionCount)},3e3);let a=this.isAdaptiveLightingEnabled$.subscribe(i=>{this.isAdaptiveLightingEnabled=i});t.result.finally(()=>{this.intervalId&&clearInterval(this.intervalId),a.unsubscribe(),this.intervalId=setInterval(()=>{this.isAdaptiveLightingEnabled$.next(!!this.service.values.CharacteristicValueActiveTransitionCount)},3e4)})}}}kelvinToHex(t){t=Math.max(1e3,Math.min(4e4,t));let a=t/100,i,d,b;return a<=66?(i=255,d=a,d=99.4708025861*Math.log(d)-161.1195681661,b=a<=19?0:138.5177312231*Math.log(a-10)-305.0447927307):(i=329.698727446*(a-60)**-.1332047592,d=288.1221695283*(a-60)**-.0755148492,b=255),i=Math.round(Math.min(Math.max(i,0),255)),d=Math.round(Math.min(Math.max(d,0),255)),b=Math.round(Math.min(Math.max(b,0),255)),`#${i.toString(16).padStart(2,"0")}${d.toString(16).padStart(2,"0")}${b.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(a){return new(a||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(a,i){a&1&&(o(0,"div",0),y("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(5,"path",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"line",8),s()(),L(),o(10,"div",9),p(11),s(),C(12,Hs,2,3,"div",10)(13,Os,2,3,"div",10),s()()),a&2&&(f("ngClass",j(8,Ls,i.service.values.On||i.service.values.Active)),r(2),S("aria-label",c(3,6,"accessories.core.lightbulb")),r(3),S("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),r(6),g(i.service.customName||i.service.serviceName),r(),_(i.service.values.Brightness?12:13))},dependencies:[U,V,w],encapsulation:2})}return e})();var gt=(()=>{class e{transform(t){if(typeof t!="number"||Number.isNaN(t))return"";let a=Math.floor(t/60),i=t%60;return[a>0?`${a.toString()}m`:"",i>0?`${i.toString()}s`:""].filter(Boolean).join(" ")}static \u0275fac=function(a){return new(a||e)};static \u0275pipe=ui({name:"duration",type:e,pure:!0})}return e})();var pn=(e,n)=>({"fa-check-circle":e,"fa-blank":n});function Ns(e,n){if(e&1){let t=O();o(0,"h6",12),p(1),l(2,"translate"),l(3,"duration"),s(),o(4,"nouislider",13),q("ngModelChange",function(i){M(t);let d=m();return z(d.targetLockManagementAutoSecurityTimeout.value,i)||(d.targetLockManagementAutoSecurityTimeout.value=i),E(i)}),y("ngModelChange",function(){M(t);let i=m();return E(i.onLockManagementAutoSecurityTimeoutStateChange())}),s()}if(e&2){let t=m();r(),R(" ",c(2,6,"accessories.control.lock_auto"),": ",t.targetLockManagementAutoSecurityTimeout.value===0?"\u221E":c(3,8,t.targetLockManagementAutoSecurityTimeout.value)," "),r(3),f("min",t.targetLockManagementAutoSecurityTimeout.min)("max",t.targetLockManagementAutoSecurityTimeout.max)("step",10),G("ngModel",t.targetLockManagementAutoSecurityTimeout.value)}}var dn=(()=>{class e{$activeModal=D(Y);lockTimeout;service;serviceManagement;targetMode;targetLockManagementAutoSecurityTimeout;targetLockManagementAutoSecurityTimeoutChanged=new ee;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(te(300),ri()).subscribe(()=>{this.serviceManagement.getCharacteristic("LockManagementAutoSecurityTimeout").setValue(this.targetLockManagementAutoSecurityTimeout.value)}),this.loadTargetLockManagementAutoSecurityTimeout())}setTargetMode(t,a){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)),a.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(a){return new(a||e)};static \u0275cmp=T({type:e,selectors:[["ng-component"]],inputs:{service:"service"},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(a,i){a&1&&(o(0,"div",0)(1,"div",1),u(2,"h5",2),o(3,"button",3),l(4,"translate"),y("click",function(){return i.dismissModal()}),s()(),o(5,"div",4)(6,"div",5),l(7,"translate"),o(8,"button",6),y("click",function(b){return i.setTargetMode(1,b)}),o(9,"div",7),u(10,"i",8),s(),p(11),l(12,"translate"),o(13,"div",9),u(14,"i",10),s()(),o(15,"button",6),y("click",function(b){return i.setTargetMode(0,b)}),o(16,"div",7),u(17,"i",8),s(),p(18),l(19,"translate"),o(20,"div",9),u(21,"i",10),s()()(),C(22,Ns,5,10),s(),u(23,"div",11),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,8,"form.button_close")),r(3),S("aria-label",c(7,10,"accessories.control.mode_control")),r(4),f("ngClass",I(16,pn,i.targetMode===1,i.targetMode!==1)),r(),x(" ",c(12,12,"accessories.control.locked")," "),r(6),f("ngClass",I(19,pn,i.targetMode===0,i.targetMode!==0)),r(),x(" ",c(19,14,"accessories.control.unlocked")," "),r(4),_(i.serviceManagement?22:-1))},dependencies:[Q,oe,re,ae,V,w,gt],encapsulation:2})}return e})();var Rs=(e,n,t,a)=>({"accessory-on":e,unlocked:n,jammed:t,error:a}),Ws=(e,n)=>({"red-text":e,"grey-text":n});function js(e,n){if(e&1&&(u(0,"div",9),l(1,"translate")),e&2){let t=m();f("innerText",c(1,2,t.service.values.LockCurrentState?"accessories.control.locked":"accessories.control.unlocked"))("ngClass",I(4,Ws,!t.service.values.LockCurrentState,t.service.values.LockCurrentState))}}function $s(e,n){e&1&&(o(0,"div",10),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.jammed")))}function Us(e,n){e&1&&(o(0,"div",10),p(1),l(2,"translate"),s()),e&2&&(r(),g(c(2,1,"accessories.control.unknown")))}var mn=(()=>{class e{$modal=D(X);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(dn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service}}static \u0275fac=function(a){return new(a||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(a,i){a&1&&(o(0,"div",0),y("shortClick",function(){return i.onClick()})("longClick",function(){return i.onLongClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(5,"path",4)(6,"path",5)(7,"rect",6)(8,"circle",7),s()(),L(),o(9,"div",8),p(10),s(),C(11,js,2,7,"div",9)(12,$s,3,3,"div",10)(13,Us,3,3,"div",10),s()()),a&2&&(f("ngClass",ct(6,Rs,"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)),r(2),S("aria-label",c(3,4,"accessories.core.lock_mechanism")),r(8),g(i.service.customName||i.service.serviceName),r(),_(i.service.values.LockCurrentState<2?11:i.service.values.LockCurrentState===2?12:i.service.values.LockCurrentState===3?13:-1))},dependencies:[U,V,w],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 Gs=e=>({"accessory-on":e});function zs(e,n){if(e&1&&(u(0,"div",10),l(1,"translate")),e&2){let t=m();f("innerHTML",t.isOn?t.brightness+"%":c(1,1,"accessories.control.off"),qe)}}function qs(e,n){if(e&1&&(u(0,"div",10),l(1,"translate")),e&2){let t=m();f("innerHTML",c(1,1,t.isOn?"accessories.control.on":"accessories.control.off"),qe)}}var un=(()=>{class e{$accessories=D(He);service;readyForControl=!1;onClick(){if(!this.readyForControl)return;let a=!(this.service.clusters?.onOff?.onOff??!1),i=this.service.getCluster?.("onOff");i&&i.setAttributes({onOff:a}).catch(d=>{console.error("Failed to control Matter lightbulb:",d)})}get isOn(){return this.service.clusters?.onOff?.onOff??!1}get brightness(){let t=this.service.clusters?.levelControl?.currentLevel??0;return Math.round(t/254*100)}get hasBrightness(){return!!this.service.clusters?.levelControl}get hasColor(){return!!this.service.clusters?.colorControl}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=T({type:e,selectors:[["app-matter-lightbulb"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:14,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"],["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(a,i){a&1&&(o(0,"div",0),y("click",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(5,"path",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"line",8),s()(),L(),o(10,"div",9),p(11),s(),C(12,zs,2,3,"div",10)(13,qs,2,3,"div",10),s()()),a&2&&(f("ngClass",j(8,Gs,i.isOn)),r(2),S("aria-label",c(3,6,"accessories.core.lightbulb")),r(3),S("fill",i.isOn?"#ffcf55":"none")("fill-opacity",i.brightness!==void 0?.25+i.brightness/100*.5:.75),r(6),g(i.service.customName||i.service.serviceName||i.service.displayName),r(),_(i.hasBrightness?12:13))},dependencies:[V,w],encapsulation:2})}return e})();var Zs=e=>({"accessory-on":e});function Ks(e,n){e&1&&(A(),u(0,"line",8)(1,"line",9)(2,"line",10))}function Qs(e,n){e&1&&(A(),u(0,"line",11)(1,"line",12)(2,"line",13))}function Ys(e,n){e&1&&(A(),u(0,"line",13)(1,"line",14)(2,"line",15))}var fn=(()=>{class e{$accessories=D(He);$settings=D(Te);service;readyForControl=!1;browserLang=this.$settings.browserLang;onClick(){if(!this.readyForControl)return;let a=!(this.service.clusters?.onOff?.onOff??!1),i=this.service.getCluster?.("onOff");i&&i.setAttributes({onOff:a}).catch(d=>{console.error("Failed to control Matter outlet:",d)})}get isOn(){return this.service.clusters?.onOff?.onOff??!1}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=T({type:e,selectors:[["app-matter-outlet"]],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(a,i){a&1&&(o(0,"div",0),y("click",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),A(),o(4,"svg",3),u(5,"rect",4)(6,"circle",5),C(7,Ks,3,0)(8,Qs,3,0)(9,Ys,3,0),s()(),L(),o(10,"div",6),p(11),s(),u(12,"div",7),l(13,"translate"),s()()),a&2&&(f("ngClass",j(9,Zs,i.isOn)),r(2),S("aria-label",c(3,5,"accessories.core.outlet")),r(5),_(i.browserLang==="en-GB"?7:i.browserLang==="en-AU"||i.browserLang==="en-NZ"?8:9),r(4),g(i.service.customName||i.service.serviceName||i.service.displayName),r(),f("innerText",c(13,7,i.isOn?"accessories.control.on":"accessories.control.off")))},dependencies:[V,w],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 Xs=e=>({"accessory-on":e}),vn=(()=>{class e{$accessories=D(He);service;readyForControl=!1;onClick(){if(!this.readyForControl)return;let a=!(this.service.clusters?.onOff?.onOff??!1),i=this.service.getCluster?.("onOff");i&&i.setAttributes({onOff:a}).catch(d=>{console.error("Failed to control Matter switch:",d)})}get isOn(){return this.service.clusters?.onOff?.onOff??!1}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=T({type:e,selectors:[["app-matter-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
13
13
  C21,9.97698687 21.1735519,10.8351 21.4589326,11.2029426
14
14
  C22.4505994,12.4811551 23,14.065977 23,15.7447101
15
15
  C23,19.7640218 19.8532802,23 16,23