homebridge-config-ui-x
Version:
A web based management, configuration and control platform for Homebridge.
67 lines • 568 kB
JavaScript
import {F as Fe}from'./chunk-A2dLPk2u.js';import {m,v}from'./chunk-CG3i5q02.js';import {R,p}from'./chunk-BWu8OGjA.js';import {d as dr$1}from'./chunk-KTYlT6lA.js';import {p as p$1,x as x$1,c,r,s,F,M,a}from'./chunk-WUyBXYN7.js';import {g,ag as we,a as ae,n as ne,Z as m$1,ah as si,a1 as M0,a2 as bf,aF as $$1,W,E,ai as ty,a5 as x,a4 as w,aP as Is$1,A as An,F as Fn,ae as C,av as fe,aN as lc$1,J as Ja$1,bJ as xt$1,z as zt$1,an as PH,aE as I,H as Hf,c3 as _e,aO as oe,ay as Qe,am as Ii$1,c4 as gi$1,c5 as i_,c6 as b,c7 as Ls$1,aU as _n,aQ as LH,bI as Sn,aH as X,ao as ei,r as rp$1,aL as Lr$1,a_ as Ln,a3 as TD,c8 as Ct$1,c9 as Vt$1,K as Kn,b7 as Xn$1,b8 as Yn,Y as Ye,ba as Mt,bb as Vt$2,e as Hn,be as ln,ca as OS,k as K8,m as La$1,s as At$1,R as Rd$1,t as f_,q as rc$1,o as dy,Q as KC,u as Re$1,bt as Fy,b1 as dT,bv as lT,a6 as vr$1,y as ie$1,I as Rt,G as h_,D as ly,N as Ny,T as JC,O as Oe,bu as ky,b4 as fT,az as ke,c2 as ah,aC as Dr$1,aA as Je$1,cb as ch,x as Cy,bn as Xa$1,cc as _S,a8 as nc$1,cd as Mi,a9 as Go$1,aa as Wo$1,aB as _i,aD as bi,a7 as s_,bo as xy,ce as oc$1,w as Kt$1,bm as kS,bl as NS,aw as Qt,bk as g_,bL as Od$1,bM as tc$1,U as ye$1,cf as Ot$1,by as t_,V as Ha$1,cg as Ry,bz as Ay,ch as Oy}from'./main-ONDCASUV.js';var Zn={AccessoryFlags:{1:"REQUIRES_ADDITIONAL_SETUP_BIT_MASK"},Active:{0:"INACTIVE",1:"ACTIVE"},AirParticulateSize:{0:"_2_5_M",1:"_10_M"},AirQuality:{0:"UNKNOWN",1:"EXCELLENT",2:"GOOD",3:"FAIR",4:"INFERIOR",5:"POOR"},CameraOperatingModeIndicator:{0:"DISABLE",1:"ENABLE"},CarbonDioxideDetected:{0:"CO2_LEVELS_NORMAL",1:"CO2_LEVELS_ABNORMAL"},CarbonMonoxideDetected:{0:"CO_LEVELS_NORMAL",1:"CO_LEVELS_ABNORMAL"},ChargingState:{0:"NOT_CHARGING",1:"CHARGING",2:"NOT_CHARGEABLE"},ClosedCaptions:{0:"DISABLED",1:"ENABLED"},ContactSensorState:{0:"CONTACT_DETECTED",1:"CONTACT_NOT_DETECTED"},CurrentAirPurifierState:{0:"INACTIVE",1:"IDLE",2:"PURIFYING_AIR"},CurrentDoorState:{0:"OPEN",1:"CLOSED",2:"OPENING",3:"CLOSING",4:"STOPPED"},CurrentFanState:{0:"INACTIVE",1:"IDLE",2:"BLOWING_AIR"},CurrentHeaterCoolerState:{0:"INACTIVE",1:"IDLE",2:"HEATING",3:"COOLING"},CurrentHeatingCoolingState:{0:"OFF",1:"HEAT",2:"COOL"},CurrentHumidifierDehumidifierState:{0:"INACTIVE",1:"IDLE",2:"HUMIDIFYING",3:"DEHUMIDIFYING"},CurrentMediaState:{0:"PLAY",1:"PAUSE",2:"STOP",4:"LOADING",5:"INTERRUPTED"},CurrentSlatState:{0:"FIXED",1:"JAMMED",2:"SWINGING"},CurrentVisibilityState:{0:"SHOWN",1:"HIDDEN"},EventSnapshotsActive:{0:"DISABLE",1:"ENABLE"},FilterChangeIndication:{0:"FILTER_OK",1:"CHANGE_FILTER"},HomeKitCameraActive:{0:"OFF",1:"ON"},InputDeviceType:{0:"OTHER",1:"TV",2:"RECORDING",3:"TUNER",4:"PLAYBACK",5:"AUDIO_SYSTEM"},InputSourceType:{0:"OTHER",1:"HOME_SCREEN",2:"TUNER",3:"HDMI",4:"COMPOSITE_VIDEO",5:"S_VIDEO",6:"COMPONENT_VIDEO",7:"DVI",8:"AIRPLAY",9:"USB",10:"APPLICATION"},InUse:{0:"NOT_IN_USE",1:"IN_USE"},IsConfigured:{0:"NOT_CONFIGURED",1:"CONFIGURED"},LeakDetected:{0:"LEAK_NOT_DETECTED",1:"LEAK_DETECTED"},LockCurrentState:{0:"UNSECURED",1:"SECURED",2:"JAMMED",3:"UNKNOWN"},LockLastKnownAction:{0:"SECURED_PHYSICALLY_INTERIOR",1:"UNSECURED_PHYSICALLY_INTERIOR",2:"SECURED_PHYSICALLY_EXTERIOR",3:"UNSECURED_PHYSICALLY_EXTERIOR",4:"SECURED_BY_KEYPAD",5:"UNSECURED_BY_KEYPAD",6:"SECURED_REMOTELY",7:"UNSECURED_REMOTELY",8:"SECURED_BY_AUTO_SECURE_TIMEOUT",9:"SECURED_PHYSICALLY",10:"UNSECURED_PHYSICALLY"},LockPhysicalControls:{0:"CONTROL_LOCK_DISABLED",1:"CONTROL_LOCK_ENABLED"},LockTargetState:{0:"UNSECURED",1:"SECURED"},ManagedNetworkEnable:{0:"DISABLED",1:"ENABLED"},ManuallyDisabled:{0:"ENABLED",1:"DISABLED"},OccupancyDetected:{0:"OCCUPANCY_NOT_DETECTED",1:"OCCUPANCY_DETECTED"},PeriodicSnapshotsActive:{0:"DISABLE",1:"ENABLE"},PictureMode:{0:"OTHER",1:"STANDARD",2:"CALIBRATED",3:"CALIBRATED_DARK",4:"VIVID",5:"GAME",6:"COMPUTER",7:"CUSTOM"},PositionState:{0:"DECREASING",1:"INCREASING",2:"STOPPED"},PowerModeSelection:{0:"SHOW",1:"HIDE"},ProgrammableSwitchEvent:{0:"SINGLE_PRESS",1:"DOUBLE_PRESS",2:"LONG_PRESS"},ProgramMode:{0:"NO_PROGRAM_SCHEDULED",1:"PROGRAM_SCHEDULED",2:"PROGRAM_SCHEDULED_MANUAL_MODE"},RecordingAudioActive:{0:"DISABLE",1:"ENABLE"},RemoteKey:{0:"REWIND",1:"FAST_FORWARD",2:"NEXT_TRACK",3:"PREVIOUS_TRACK",4:"ARROW_UP",5:"ARROW_DOWN",6:"ARROW_LEFT",7:"ARROW_RIGHT",8:"SELECT",9:"BACK",10:"EXIT",11:"PLAY_PAUSE",15:"INFORMATION"},RotationDirection:{0:"CLOCKWISE",1:"COUNTER_CLOCKWISE"},RouterStatus:{0:"READY",1:"NOT_READY"},SecuritySystemAlarmType:{0:"NO_ALARM",1:"UNKNOWN"},SecuritySystemCurrentState:{0:"STAY_ARM",1:"AWAY_ARM",2:"NIGHT_ARM",3:"DISARMED",4:"ALARM_TRIGGERED"},SecuritySystemTargetState:{0:"STAY_ARM",1:"AWAY_ARM",2:"NIGHT_ARM",3:"DISARM"},ServiceLabelNamespace:{0:"DOTS",1:"ARABIC_NUMERALS"},SiriInputType:{0:"PUSH_BUTTON_TRIGGERED_APPLE_TV"},SlatType:{0:"HORIZONTAL",1:"VERTICAL"},SleepDiscoveryMode:{0:"NOT_DISCOVERABLE",1:"ALWAYS_DISCOVERABLE"},SmokeDetected:{0:"SMOKE_NOT_DETECTED",1:"SMOKE_DETECTED"},StatusFault:{0:"NO_FAULT",1:"GENERAL_FAULT"},StatusJammed:{0:"NOT_JAMMED",1:"JAMMED"},StatusLowBattery:{0:"BATTERY_LEVEL_NORMAL",1:"BATTERY_LEVEL_LOW"},StatusTampered:{0:"NOT_TAMPERED",1:"TAMPERED"},SwingMode:{0:"SWING_DISABLED",1:"SWING_ENABLED"},TargetAirPurifierState:{0:"MANUAL",1:"AUTO"},TargetDoorState:{0:"OPEN",1:"CLOSED"},TargetFanState:{0:"MANUAL",1:"AUTO"},TargetHeaterCoolerState:{0:"AUTO",1:"HEAT",2:"COOL"},TargetHeatingCoolingState:{0:"OFF",1:"HEAT",2:"COOL",3:"AUTO"},TargetHumidifierDehumidifierState:{0:"HUMIDIFIER_OR_DEHUMIDIFIER",1:"HUMIDIFIER",2:"DEHUMIDIFIER"},TargetMediaState:{0:"PLAY",1:"PAUSE",2:"STOP"},TargetVisibilityState:{0:"SHOWN",1:"HIDDEN"},TemperatureDisplayUnits:{0:"CELSIUS",1:"FAHRENHEIT"},ThirdPartyCameraActive:{0:"OFF",1:"ON"},ValveType:{0:"GENERIC_VALVE",1:"IRRIGATION",2:"SHOWER_HEAD",3:"WATER_FAUCET"},VolumeControlType:{0:"NONE",1:"RELATIVE",2:"RELATIVE_WITH_CURRENT",3:"ABSOLUTE"},VolumeSelector:{0:"INCREMENT",1:"DECREMENT"},WiFiSatelliteStatus:{0:"UNKNOWN",1:"CONNECTED",2:"NOT_CONNECTED"}};var Ct=(()=>{class e{transform(t){if(typeof t!="number")return t;let o=1e6/t,i=Math.round(t),c=Math.round(o);return `${i}M (${c}K)`}static \u0275fac=function(o){return new(o||e)};static \u0275pipe=xt$1({name:"convertMired",type:e,pure:true})}return e})();var Re=(()=>{class e{$settings=g(zt$1);transform(t,o=this.$settings.env.temperatureUnits){return o==="f"?Math.round((t*1.8+32)*10)/10:Math.round(t*10)/10}static \u0275fac=function(o){return new(o||e)};static \u0275pipe=xt$1({name:"convertTemp",type:e,pure:true})}return e})();var Jn=(()=>{class e{transform(t){return typeof t!="string"?t:t.replace(p$1," ").replace(x$1,"$1 $2").toLowerCase().replace(c,o=>o.toUpperCase()).trim()}static \u0275fac=function(o){return new(o||e)};static \u0275pipe=xt$1({name:"prettify",type:e,pure:true})}return e})();var Xn=(()=>{class e{transform(t){return typeof t!="string"||!t?t:t==="SmartSpeaker"?"accessories.core.speaker":`accessories.core.${t.replace(r,i=>i.toLowerCase()).replace(s,i=>`_${i.toLowerCase()}`)}`}static \u0275fac=function(o){return new(o||e)};static \u0275pipe=xt$1({name:"serviceToTranslationString",type:e,pure:true})}return e})();var z0=(e,r)=>r.name,K0=(e,r)=>r.key;function Y0(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" (",h_(1,1,"settings.display.menu_default"),") ");}function Q0(e,r){if(e&1&&(La$1(0,"option",30),At$1(1),f_(2,"serviceToTranslationString"),f_(3,"translate"),Re$1(4,Y0,2,3),Rd$1()),e&2){let t=r.$implicit,o=ye$1(2);ly("value",t),ie$1(),Rt(" ",h_(3,5,h_(2,3,t))," "),ie$1(3),Oe(o.isDefaultType(t)?4:-1);}}function Z0(e,r){if(e&1){let t=nc$1();La$1(0,"li",8)(1,"label",28),At$1(2),f_(3,"translate"),Rd$1(),La$1(4,"div",10)(5,"select",29),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1();return t_(c.localService.customType,i)||(c.localService.customType=i),Wo$1(i)}),dT(6,Q0,5,7,"option",30,lT),Rd$1(),KC(),Rd$1()();}if(e&2){let t=ye$1();ie$1(2),Ny(h_(3,2,"accessories.custom_type")),ie$1(3),ky("ngModel",t.localService.customType),JC(),ie$1(),fT(t.customTypeList.sort());}}function J0(e,r){if(e&1){let t=nc$1();La$1(0,"li",12)(1,"span",13),At$1(2),f_(3,"translate"),Rd$1(),La$1(4,"div",14)(5,"input",31),f_(6,"translate"),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1();return t_(c.localService.onDashboard,i)||(c.localService.onDashboard=i),Wo$1(i)}),rc$1("ngModelChange",function(){Go$1(t);let i=ye$1();return Wo$1(i.onDashboardChange())}),Rd$1(),KC(),dy(7,"label",32),Rd$1()();}if(e&2){let t=ye$1();ie$1(2),Ny(h_(3,3,"accessories.show_on_dashboard")),ie$1(3),ky("ngModel",t.localService.onDashboard),vr$1("aria-label",h_(6,5,"accessories.show_on_dashboard")),JC();}}function X0(e,r){if(e&1&&(La$1(0,"small"),At$1(1),Rd$1()),e&2){let t=ye$1().$implicit,o=ye$1(3);ie$1(),Ny(o.JSON.stringify(t.value,null,2));}}function ea(e,r){if(e&1&&At$1(0),e&2){let t=ye$1().$implicit;Rt(" ",t.value," ");}}function ta(e,r){if(e&1&&(La$1(0,"li",34)(1,"span",35),At$1(2),f_(3,"prettify"),Rd$1(),La$1(4,"span",22),Re$1(5,X0,2,1,"small")(6,ea,1,1),Rd$1()()),e&2){let t=r.$implicit;ie$1(2),Ny(h_(3,2,t.key)),ie$1(3),Oe(typeof t.value=="object"?5:6);}}function ia(e,r){if(e&1&&(La$1(0,"li",18)(1,"span",33),At$1(2),f_(3,"prettify"),Rd$1()(),dT(4,ta,7,4,"li",34,K0),f_(6,"keyvalue")),e&2){let t=r.$implicit;ie$1(2),Ny(h_(3,1,t.name)),ie$1(2),fT(h_(6,3,t.attributes));}}function na(e,r){if(e&1&&(La$1(0,"li",18)(1,"h6",19),At$1(2),f_(3,"translate"),Rd$1()(),dT(4,ia,7,5,null,null,z0)),e&2){let t=ye$1();ie$1(2),Ny(h_(3,1,"accessories.service_info")),ie$1(2),fT(t.clusterInfo);}}function oa(e,r){if(e&1){let t=nc$1();La$1(0,"span",42),rc$1("click",function(){Go$1(t);let i=ye$1().$implicit,c=ye$1(2);return Wo$1(c.toggleDetailsVisibility(i))})("keydown.enter",function(){Go$1(t);let i=ye$1().$implicit,c=ye$1(2);return Wo$1(c.toggleDetailsVisibility(i))}),At$1(1),Rd$1();}if(e&2){let t=ye$1().$implicit,o=ye$1(2);vr$1("aria-expanded",o.isDetailsVisible[t.uuid]),ie$1(),Ny(t.description);}}function ra(e,r){if(e&1&&(La$1(0,"span",38),At$1(1),Rd$1()),e&2){let t=ye$1().$implicit;ie$1(),Ny(t.description);}}function aa(e,r){if(e&1&&(La$1(0,"div"),At$1(1),Rd$1()),e&2){let t=ye$1(2).$implicit;ie$1(),Rt("Step: ",t.minStep);}}function sa(e,r){if(e&1&&(La$1(0,"div"),At$1(1),Rd$1()),e&2){let t=ye$1(2).$implicit;ie$1(),Rt("Min: ",t.minValue);}}function la(e,r){if(e&1&&(La$1(0,"div"),At$1(1),Rd$1()),e&2){let t=ye$1(2).$implicit;ie$1(),Rt("Max: ",t.maxValue);}}function ca(e,r){e&1&&At$1(0," \xB7 ");}function da(e,r){if(e&1&&(At$1(0),Re$1(1,ca,1,0)),e&2){let t=r.$implicit,o=r.$index,i=r.$count;Rt(" ",t," "),ie$1(),Oe(o!==i-1?1:-1);}}function pa(e,r){if(e&1&&(La$1(0,"div"),At$1(1," Valid: "),dT(2,da,2,2,null,null,lT),Rd$1()),e&2){let t=ye$1(2).$implicit;ie$1(2),fT(t.validValues);}}function ma(e,r){if(e&1&&(La$1(0,"div",39),Re$1(1,aa,2,1,"div"),Re$1(2,sa,2,1,"div"),Re$1(3,la,2,1,"div"),Re$1(4,pa,4,0,"div"),Rd$1()),e&2){let t=ye$1().$implicit;ie$1(),Oe("minStep"in t?1:-1),ie$1(),Oe("minValue"in t?2:-1),ie$1(),Oe("maxValue"in t?3:-1),ie$1(),Oe("validValues"in t?4:-1);}}function ua(e,r){e&1&&At$1(0," Value: ");}function fa(e,r){if(e&1&&At$1(0),e&2){let t=ye$1().$implicit;Rt(" ",t.value,"% ");}}function ga(e,r){if(e&1&&(At$1(0),f_(1,"convertTemp")),e&2){let t=ye$1().$implicit,o=ye$1(2);Rt(" ",h_(1,1,o.Number(t.value)),"\xB0 ");}}function va(e,r){if(e&1&&(At$1(0),f_(1,"convertMired")),e&2){let t=ye$1(2).$implicit;Rt(" ",h_(1,1,t.value)," ");}}function ha(e,r){if(e&1&&At$1(0),e&2){let t=ye$1(2).$implicit;Rt(" ",t.value," ");}}function Ca(e,r){if(e&1&&Re$1(0,va,2,3)(1,ha,1,1),e&2){let o=ye$1().$implicit;Oe((o.type)==="ColorTemperature"?0:1);}}function _a(e,r){if(e&1&&(At$1(0),f_(1,"prettify")),e&2){let t=ye$1().$implicit,o=ye$1(2);Rt(" (",h_(1,1,o.getEnumLabel(t.type,t.value)),") ");}}function ya(e,r){if(e&1&&(At$1(0),f_(1,"translate")),e&2){let t=ye$1().$implicit;Rt(" (",h_(1,1,t.value?"status.widget.info.yes":"status.widget.info.no"),") ");}}function xa(e,r){if(e&1&&At$1(0),e&2){let t=ye$1().$implicit;Rt(" ",t.value,"% ");}}function Sa(e,r){if(e&1&&(At$1(0),f_(1,"convertTemp")),e&2){let t=ye$1().$implicit,o=ye$1(2);Rt(" ",h_(1,1,o.Number(t.value)),"\xB0 ");}}function ka(e,r){if(e&1&&(At$1(0),f_(1,"convertMired")),e&2){let t=ye$1(2).$implicit;Rt(" ",h_(1,1,t.value)," ");}}function Ma(e,r){if(e&1&&At$1(0),e&2){let t=ye$1(2).$implicit;Rt(" ",t.value," ");}}function Ta(e,r){if(e&1&&Re$1(0,ka,2,3)(1,Ma,1,1),e&2){let o=ye$1().$implicit;Oe((o.type)==="ColorTemperature"?0:1);}}function ba(e,r){if(e&1&&(At$1(0),f_(1,"prettify")),e&2){let t=ye$1().$implicit,o=ye$1(2);Rt(" (",h_(1,1,o.getEnumLabel(t.type,t.value)),") ");}}function Ba(e,r){if(e&1&&(At$1(0),f_(1,"translate")),e&2){let t=ye$1().$implicit;Rt(" (",h_(1,1,t.value?"status.widget.info.yes":"status.widget.info.no"),") ");}}function wa(e,r){if(e&1&&(La$1(0,"li",20)(1,"span",36),Re$1(2,oa,2,2,"span",37)(3,ra,2,1,"span",38),Re$1(4,ma,5,4,"div",39),La$1(5,"div",40),Re$1(6,ua,1,0),Re$1(7,fa,1,1)(8,ga,2,3)(9,Ca,2,1),Re$1(10,_a,2,3)(11,ya,2,3),Rd$1()(),La$1(12,"span",41),Re$1(13,xa,1,1)(14,Sa,2,3)(15,Ta,2,1),Re$1(16,ba,2,3)(17,Ba,2,3),Rd$1()()),e&2){let t,o,i=r.$implicit,c=ye$1(2);ie$1(2),Oe("minStep"in i||"minValue"in i||"maxValue"in i||"validValues"in i?2:3),ie$1(2),Oe(c.isDetailsVisible[i.uuid]?4:-1),ie$1(2),Oe(c.isDetailsVisible[i.uuid]?6:-1),ie$1(),Oe((t=i.unit)==="percentage"?7:t==="celsius"?8:9),ie$1(3),Oe(c.getEnumLabel(i.type,i.value)?10:i.format==="bool"?11:-1),ie$1(3),Oe((o=i.unit)==="percentage"?13:o==="celsius"?14:15),ie$1(3),Oe(c.getEnumLabel(i.type,i.value)?16:i.format==="bool"?17:-1);}}function Ea(e,r){if(e&1&&(La$1(0,"li",18)(1,"h6",19),At$1(2),f_(3,"translate"),Rd$1()(),La$1(4,"li",20)(5,"span",21),At$1(6),f_(7,"translate"),Rd$1(),La$1(8,"span",22),At$1(9),Rd$1()(),La$1(10,"li",20)(11,"span",21),At$1(12),f_(13,"translate"),Rd$1(),La$1(14,"span",22),At$1(15),Rd$1()(),dT(16,wa,18,7,"li",20,lT)),e&2){let t=ye$1();ie$1(2),Ny(h_(3,5,"accessories.service_info")),ie$1(4),Ny(h_(7,7,"accessories.service")),ie$1(3),Ny(t.localService.humanType),ie$1(3),Ny(h_(13,9,"accessories.name")),ie$1(3),Ny(t.localService.serviceName),ie$1(),fT(t.localService.serviceCharacteristics);}}function Da(e,r){if(e&1){let t=nc$1();La$1(0,"span",44),rc$1("click",function(){Go$1(t);let i=ye$1().$implicit,c=ye$1(2);return Wo$1(c.toggleDetailsVisibility(i))})("keydown.enter",function(){Go$1(t);let i=ye$1().$implicit,c=ye$1(2);return Wo$1(c.toggleDetailsVisibility(i))}),At$1(1),Rd$1();}if(e&2){let t=ye$1().$implicit,o=ye$1(2);vr$1("aria-expanded",o.isDetailsVisible[t.uuid]),ie$1(),Ny(t.description);}}function Aa(e,r){if(e&1&&At$1(0),e&2){let t=ye$1().$implicit;Rt(" ",t.description," ");}}function Pa(e,r){if(e&1&&(La$1(0,"div"),At$1(1),Rd$1()),e&2){let t=ye$1(2).$implicit;ie$1(),Rt("Step: ",t.minStep);}}function Fa(e,r){if(e&1&&(La$1(0,"div"),At$1(1),Rd$1()),e&2){let t=ye$1(2).$implicit;ie$1(),Rt("Min: ",t.minValue);}}function Oa(e,r){if(e&1&&(La$1(0,"div"),At$1(1),Rd$1()),e&2){let t=ye$1(2).$implicit;ie$1(),Rt("Max: ",t.maxValue);}}function Ia(e,r){e&1&&At$1(0," \xB7 ");}function La(e,r){if(e&1&&(At$1(0),Re$1(1,Ia,1,0)),e&2){let t=r.$implicit,o=r.$index,i=r.$count;Rt(" ",t," "),ie$1(),Oe(o!==i-1?1:-1);}}function Va(e,r){if(e&1&&(La$1(0,"div"),At$1(1," Valid: "),dT(2,La,2,2,null,null,lT),Rd$1()),e&2){let t=ye$1(2).$implicit;ie$1(2),fT(t.validValues);}}function Na(e,r){if(e&1&&(La$1(0,"div",39),Re$1(1,Pa,2,1,"div"),Re$1(2,Fa,2,1,"div"),Re$1(3,Oa,2,1,"div"),Re$1(4,Va,4,0,"div"),Rd$1()),e&2){let t=ye$1().$implicit;ie$1(),Oe("minStep"in t?1:-1),ie$1(),Oe("minValue"in t?2:-1),ie$1(),Oe("maxValue"in t?3:-1),ie$1(),Oe("validValues"in t?4:-1);}}function Ha(e,r){e&1&&At$1(0," Value: ");}function Ra(e,r){if(e&1&&At$1(0),e&2){let t=ye$1().$implicit;Rt(" ",t.value,"% ");}}function $a(e,r){if(e&1&&(At$1(0),f_(1,"convertTemp")),e&2){let t=ye$1().$implicit,o=ye$1(2);Rt(" ",h_(1,1,o.Number(t.value)),"\xB0 ");}}function Ua(e,r){if(e&1&&(At$1(0),f_(1,"convertMired")),e&2){let t=ye$1(2).$implicit;Rt(" ",h_(1,1,t.value)," ");}}function Wa(e,r){if(e&1&&At$1(0),e&2){let t=ye$1(2).$implicit;Rt(" ",t.value," ");}}function ja(e,r){if(e&1&&Re$1(0,Ua,2,3)(1,Wa,1,1),e&2){let o=ye$1().$implicit;Oe((o.type)==="ColorTemperature"?0:1);}}function Ga(e,r){if(e&1&&(At$1(0),f_(1,"prettify")),e&2){let t=ye$1().$implicit,o=ye$1(2);Rt(" (",h_(1,1,o.getEnumLabel(t.type,t.value)),") ");}}function qa(e,r){if(e&1&&(At$1(0),f_(1,"translate")),e&2){let t=ye$1().$implicit;Rt(" (",h_(1,1,t.value?"status.widget.info.yes":"status.widget.info.no"),") ");}}function za(e,r){if(e&1&&At$1(0),e&2){let t=ye$1().$implicit;Rt(" ",t.value,"% ");}}function Ka(e,r){if(e&1&&(At$1(0),f_(1,"convertTemp")),e&2){let t=ye$1().$implicit,o=ye$1(2);Rt(" ",h_(1,1,o.Number(t.value)),"\xB0 ");}}function Ya(e,r){if(e&1&&(At$1(0),f_(1,"convertMired")),e&2){let t=ye$1(2).$implicit;Rt(" ",h_(1,1,t.value)," ");}}function Qa(e,r){if(e&1&&At$1(0),e&2){let t=ye$1(2).$implicit;Rt(" ",t.value," ");}}function Za(e,r){if(e&1&&Re$1(0,Ya,2,3)(1,Qa,1,1),e&2){let o=ye$1().$implicit;Oe((o.type)==="ColorTemperature"?0:1);}}function Ja(e,r){if(e&1&&(At$1(0),f_(1,"prettify")),e&2){let t=ye$1().$implicit,o=ye$1(2);Rt(" (",h_(1,1,o.getEnumLabel(t.type,t.value)),") ");}}function Xa(e,r){if(e&1&&(At$1(0),f_(1,"translate")),e&2){let t=ye$1().$implicit;Rt(" (",h_(1,1,t.value?"status.widget.info.yes":"status.widget.info.no"),") ");}}function es(e,r){if(e&1&&(La$1(0,"li",20)(1,"span"),Re$1(2,Da,2,2,"span",43)(3,Aa,1,1),Re$1(4,Na,5,4,"div",39),La$1(5,"div",40),Re$1(6,Ha,1,0),Re$1(7,Ra,1,1)(8,$a,2,3)(9,ja,2,1),Re$1(10,Ga,2,3)(11,qa,2,3),Rd$1()(),La$1(12,"span",41),Re$1(13,za,1,1)(14,Ka,2,3)(15,Za,2,1),Re$1(16,Ja,2,3)(17,Xa,2,3),Rd$1()()),e&2){let t,o,i=r.$implicit,c=ye$1(2);ie$1(2),Oe("minStep"in i||"minValue"in i||"maxValue"in i||"validValues"in i?2:3),ie$1(2),Oe(c.isDetailsVisible[i.uuid]?4:-1),ie$1(2),Oe(c.isDetailsVisible[i.uuid]?6:-1),ie$1(),Oe((t=i.unit)==="percentage"?7:t==="celsius"?8:9),ie$1(3),Oe(c.getEnumLabel(i.type,i.value)?10:i.format==="bool"?11:-1),ie$1(3),Oe((o=i.unit)==="percentage"?13:o==="celsius"?14:15),ie$1(3),Oe(c.getEnumLabel(i.type,i.value)?16:i.format==="bool"?17:-1);}}function ts(e,r){if(e&1&&(La$1(0,"ul",5)(1,"li",18)(2,"h6",19),At$1(3),f_(4,"translate"),Rd$1()(),La$1(5,"li",20)(6,"span",21),At$1(7),f_(8,"translate"),Rd$1(),La$1(9,"span",22),At$1(10),Rd$1()(),La$1(11,"li",20)(12,"span",21),At$1(13),f_(14,"translate"),Rd$1(),La$1(15,"span",22),At$1(16),Rd$1()(),dT(17,es,18,7,"li",20,lT),Rd$1()),e&2){let t=r.$implicit;ie$1(3),Ny(h_(4,5,"accessories.service_info")),ie$1(4),Ny(h_(8,7,"accessories.service")),ie$1(3),Ny(t.humanType),ie$1(3),Ny(h_(14,9,"accessories.name")),ie$1(3),Ny(t.serviceName),ie$1(),fT(t.serviceCharacteristics);}}function is(e,r){if(e&1&&(La$1(0,"li",20)(1,"span",21),At$1(2),f_(3,"translate"),Rd$1(),La$1(4,"span",22),At$1(5),Rd$1()()),e&2){let t=ye$1(2);ie$1(2),Ny(h_(3,2,"child_bridge.config.platform")),ie$1(3),Ny(t.matchedCachedAccessory.platform);}}function ns(e,r){if(e&1&&(La$1(0,"li",20)(1,"span",21),At$1(2),f_(3,"translate"),Rd$1(),La$1(4,"span",22),At$1(5),Rd$1()()),e&2){let t=ye$1(2);ie$1(2),Ny(h_(3,2,"child_bridge.config.accessory")),ie$1(3),Ny(t.matchedCachedAccessory.accessory);}}function os(e,r){if(e&1&&(La$1(0,"li",20)(1,"span",21),At$1(2),f_(3,"translate"),Rd$1(),La$1(4,"span",22),At$1(5),Rd$1()(),Re$1(6,is,6,4,"li",20),Re$1(7,ns,6,4,"li",20)),e&2){let t=ye$1();ie$1(2),Ny(h_(3,4,"accessories.plugin")),ie$1(3),Ny(t.matchedCachedAccessory.plugin),ie$1(),Oe(t.matchedCachedAccessory.platform?6:-1),ie$1(),Oe(t.matchedCachedAccessory.accessory?7:-1);}}function rs(e,r){if(e&1&&(La$1(0,"li",20)(1,"span",21),At$1(2),Rd$1(),La$1(3,"span",22),At$1(4),Rd$1()()),e&2){let t=r.$implicit;ie$1(2),Ny(t.key),ie$1(2),Ny(t.value);}}function as(e,r){if(e&1&&(La$1(0,"li",20)(1,"span",21),At$1(2,"Bridge"),Rd$1(),La$1(3,"span",22),At$1(4),Rd$1()()),e&2){let t=ye$1();ie$1(4),Ny(t.localService.instance.name);}}function ss(e,r){if(e&1&&(La$1(0,"li",20)(1,"span",21),At$1(2),f_(3,"translate"),Rd$1(),La$1(4,"span",22),At$1(5),Rd$1()()),e&2){let t=ye$1();ie$1(2),Ny(h_(3,2,"child_bridge.config.name")),ie$1(3),Ny(t.matchedCachedAccessory.bridge);}}function ls(e,r){e&1&&dy(0,"i",49);}function cs(e,r){e&1&&dy(0,"i",50);}function ds(e,r){e&1&&(La$1(0,"span",51),At$1(1),f_(2,"translate"),Rd$1()),e&2&&(ie$1(),Rt(" ",h_(2,1,"common.a11y.copied")," "));}function ps(e,r){if(e&1){let t=nc$1();La$1(0,"li",20)(1,"span",21),At$1(2),f_(3,"translate"),Rd$1(),La$1(4,"span",22),At$1(5),Rd$1()(),La$1(6,"li",20)(7,"span",21),At$1(8),f_(9,"translate"),Rd$1(),La$1(10,"span",22),At$1(11),Rd$1()(),La$1(12,"li",20)(13,"span",45),At$1(14,"HAP UID"),Rd$1(),La$1(15,"span",46)(16,"span",47),At$1(17),Rd$1(),La$1(18,"button",48),f_(19,"translate"),rc$1("click",function(){Go$1(t);let i=ye$1();return Wo$1(i.copyUniqueIdToClipboard())}),Re$1(20,ls,1,0,"i",49)(21,cs,1,0,"i",50),Rd$1(),Re$1(22,ds,3,3,"span",51),Rd$1()(),La$1(23,"li",20)(24,"span",52),At$1(25,"aid"),Rd$1(),La$1(26,"span",22),At$1(27),Rd$1()(),La$1(28,"li",20)(29,"span",52),At$1(30,"iid"),Rd$1(),La$1(31,"span",22),At$1(32),Rd$1()();}if(e&2){let t=ye$1();ie$1(2),Ny(h_(3,10,"accessories.bridge_ip")),ie$1(3),Ny(t.localService.instance.ipAddress),ie$1(3),Ny(h_(9,12,"accessories.bridge_port")),ie$1(3),Ny(t.localService.instance.port),ie$1(6),Ny(t.service.uniqueId),ie$1(),vr$1("aria-label",h_(19,14,"common.a11y.copy_to_clipboard")),ie$1(2),Oe(t.uniqueIdCopied()?20:21),ie$1(2),Oe(t.uniqueIdCopied()?22:-1),ie$1(5),Ny(t.localService.aid),ie$1(5),Ny(t.localService.iid);}}function ms(e,r){e&1&&dy(0,"i",49);}function us(e,r){e&1&&dy(0,"i",50);}function fs(e,r){e&1&&(La$1(0,"span",51),At$1(1),f_(2,"translate"),Rd$1()),e&2&&(ie$1(),Rt(" ",h_(2,1,"common.a11y.copied")," "));}function gs(e,r){if(e&1){let t=nc$1();La$1(0,"li",20)(1,"span",53),At$1(2,"UUID"),Rd$1(),La$1(3,"span",46)(4,"span",47),At$1(5),Rd$1(),La$1(6,"button",48),f_(7,"translate"),rc$1("click",function(){Go$1(t);let i=ye$1();return Wo$1(i.copyUUIDToClipboard())}),Re$1(8,ms,1,0,"i",49)(9,us,1,0,"i",50),Rd$1(),Re$1(10,fs,3,3,"span",51),Rd$1()(),La$1(11,"li",54)(12,"span",13),At$1(13),f_(14,"translate"),Rd$1(),La$1(15,"button",55),f_(16,"translate"),rc$1("click",function(){Go$1(t);let i=ye$1();return Wo$1(i.removeSingleCachedAccessories())}),dy(17,"i",56),Rd$1()();}if(e&2){let t=ye$1();ie$1(5),Ny(t.matchedCachedAccessory.UUID),ie$1(),vr$1("aria-label",h_(7,6,"common.a11y.copy_to_clipboard")),ie$1(2),Oe(t.uuidCopied()?8:9),ie$1(2),Oe(t.uuidCopied()?10:-1),ie$1(3),Ny(h_(14,8,"accessories.button_remove")),ie$1(2),vr$1("aria-label",h_(16,10,"accessories.button_remove"));}}var eo=(()=>{class e{$activeModal=g(fe);$cdr=g(lc$1);$modal=g(si);modalData=g(R);injector=g(we);copyTimeouts=new Map;hapCustomTypeList=[["AirPurifier","Switch","Outlet","Fan","Lightbulb","Heater","Cooler","Humidifier","Dehumidifier","Television","Valve","RobotVacuum","WashingMachine"],["Switch","Outlet","LockMechanism"],["Switch","Outlet","GarageDoorOpener"],["Door","Window","WindowCovering"],["Switch","Outlet","Doorbell","Speaker","SmartSpeaker","Microphone"]];matterCustomTypeList=[["OnOffLight","OnOffLightSwitch","OnOffPlugInUnit","RoboticVacuumCleaner"],["Door","Window","WindowCovering"],["Fan"],["Thermostat"]];accessoryCache=this.modalData.accessoryCache;pairingCache=this.modalData.pairingCache;service=this.modalData.service;localAccessoryCache=[];localPairingCache=[];localService;isDetailsVisible={};accessoryInformation;extraServices=[];matchedCachedAccessory=null;enums=Zn;customTypeList=[];isMatterAccessory=false;clusterInfo=[];uniqueIdCopied=W(false);uuidCopied=W(false);getEnumLabel(t,o){return this.enums[t]?.[String(o)]}originalCustomName;originalCustomType;originalHidden;originalOnDashboard;ngOnInit(){let t=this.accessoryCache,o=this.pairingCache,i=this.service;if(!t||!o||!i){console.error("AccessoryInfoComponent: required data not provided"),this.$activeModal.dismiss("Missing required data");return}if(this.localAccessoryCache=t,this.localPairingCache=o,this.localService=i,this.isMatterAccessory=this.localService.protocol==="matter",this.isMatterAccessory){this.customTypeList=[...new Set(this.matterCustomTypeList.filter(f=>this.localService.deviceType&&f.includes(this.localService.deviceType)).flat())];let c=this.localService.clusters||{};this.clusterInfo=Object.entries(c).map(([f,T])=>({name:f,attributes:T})),this.accessoryInformation=Object.entries(this.localService.accessoryInformation||{}).map(([f,T])=>({key:f,value:T})),this.accessoryInformation.unshift({key:"Device Type",value:this.localService.deviceType||"Unknown"}),this.localService.customType||(this.localService.customType=this.localService.deviceType);}else this.customTypeList=[...new Set(this.hapCustomTypeList.filter(c=>c.includes(this.localService.type)).flat())],this.localService.type==="SmartSpeaker"?this.customTypeList=this.customTypeList.filter(c=>c!=="Speaker"):(this.customTypeList=this.customTypeList.filter(c=>c!=="SmartSpeaker"),this.localService.customType==="SmartSpeaker"&&(this.localService.customType="Speaker")),this.accessoryInformation=Object.entries(this.localService.accessoryInformation).map(([c,f])=>({key:c,value:f})),this.matchedCachedAccessory=this.matchToCachedAccessory(),this.localService.type==="LockMechanism"&&this.localService.linkedServices&&Object.values(this.localService.linkedServices).filter(c=>c.type==="LockManagement").forEach(c=>this.extraServices.push(c)),this.localService.customType||(this.localService.customType=this.localService.type);this.originalCustomName=this.localService.customName,this.originalCustomType=this.localService.customType,this.originalHidden=this.localService.hidden,this.originalOnDashboard=this.localService.onDashboard;}ngOnDestroy(){this.copyTimeouts.forEach(t=>clearTimeout(t)),this.copyTimeouts.clear();}removeSingleCachedAccessories(){this.$activeModal.close();let t=ty([{provide:p,useValue:{selectedBridge:this.localService.instance.username.replaceAll(":",""),highlightUuid:this.matchedCachedAccessory?.UUID,highlightCacheFile:this.matchedCachedAccessory?.$cacheFile}}],this.injector);this.$modal.open(Fe,{size:"lg",backdrop:"static",injector:t});}isDefaultType(t){return this.isMatterAccessory?t===this.localService.deviceType:t===this.localService.type}toggleDetailsVisibility(t){("minStep"in t||"minValue"in t||"maxValue"in t||"validValues"in t)&&(this.isDetailsVisible[t.uuid]=!this.isDetailsVisible[t.uuid]);}dismissModal(){this.localService.customName=this.originalCustomName,this.localService.customType=this.originalCustomType,this.localService.hidden=this.originalHidden,this.localService.onDashboard=this.originalOnDashboard,this.$activeModal.dismiss("Dismiss");}saveModal(){this.$activeModal.close({customName:this.localService.customName,customType:this.localService.customType,hidden:this.localService.hidden,onDashboard:this.localService.onDashboard});}isFormUnchanged(){return this.localService.customName===this.originalCustomName&&this.localService.customType===this.originalCustomType&&this.localService.hidden===this.originalHidden&&this.localService.onDashboard===this.originalOnDashboard}onHiddenChange(){this.localService.hidden&&(this.localService.onDashboard=false),this.$cdr.markForCheck();}onDashboardChange(){this.$cdr.markForCheck();}copyUniqueIdToClipboard(){return E(this,null,function*(){let t=this.service.uniqueId;t&&(yield this.copyToClipboard(t,this.uniqueIdCopied));})}copyUUIDToClipboard(){return E(this,null,function*(){let t=this.matchedCachedAccessory?.UUID;t&&(yield this.copyToClipboard(t,this.uuidCopied));})}copyToClipboard(t,o){return E(this,null,function*(){try{yield navigator.clipboard.writeText(t);}catch(f){this.fallbackCopyToClipboard(t);}o.set(true);let i=this.copyTimeouts.get(o);i&&clearTimeout(i);let c=setTimeout(()=>{o.set(false),this.copyTimeouts.delete(o);},3e3);this.copyTimeouts.set(o,c);})}fallbackCopyToClipboard(t){let o=document.createElement("textarea");o.value=t,o.style.position="fixed",o.style.left="-999999px",o.style.top="-999999px",document.body.appendChild(o),o.focus(),o.select();try{document.execCommand("copy");}catch(i){console.error("Fallback: Could not copy text",i);}document.body.removeChild(o);}matchToCachedAccessory(){let t=this.localService.instance.username,o=this.localPairingCache.find(i=>i._username===t);if(o){let i=o._main?"cachedAccessories":`cachedAccessories.${o._id}`,c=this.localAccessoryCache.filter(f=>f.$cacheFile===i);if(c.length){let f=this.localService.accessoryInformation.Name,T=this.localService.accessoryInformation["Serial Number"],P=c.filter(O=>{let R=O.services.find(_e=>_e.constructorName==="AccessoryInformation"),se=R?.characteristics.find(_e=>_e.displayName==="Name"),Se=R?.characteristics.find(_e=>_e.displayName==="Serial Number");return se?.value===f&&Se?.value===T});if(P.length===1)return x(w({},P[0]),{bridge:o.name})}}return null}Number=Number;JSON=JSON;static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-accessory-info"]],decls:71,vars:54,consts:[["role","dialog","aria-modal","true",1,"modal-content"],[1,"modal-header"],["id","accessory-info-modal-title",1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"list-group","list-group-box","mb-3"],[1,"list-group-item","text-center","grey-text","small"],[3,"innerHTML"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","text","id","form-name","autocomplete","off",1,"form-control","custom-input",3,"ngModelChange","ngModel"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],["aria-hidden","true",1,"text-start"],[1,"text-end","grey-text","d-flex","align-items-center"],["type","checkbox","id","hide-accessory",1,"rendux-input",3,"ngModelChange","ngModel"],["for","hide-accessory","aria-hidden","true",1,"rendux-label","ms-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item"],[1,"mb-0","text-center"],[1,"list-group-item","d-flex","justify-content-between","align-items-left","flex-column","flex-md-row"],[1,"text-start"],[1,"text-start","text-md-end","grey-text","font-monospace"],[1,"modal-footer","justify-content-between"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button",1,"btn","btn-primary",3,"click","disabled"],["for","custom-type",1,"mb-2","mb-md-0","w-100","w-md-50"],["id","custom-type",1,"custom-select",3,"ngModelChange","ngModel"],[3,"value"],["type","checkbox","id","show-on-dashboard",1,"rendux-input","mb-0",3,"ngModelChange","ngModel"],["for","show-on-dashboard","aria-hidden","true",1,"rendux-label","ms-3"],[1,"fw-bold"],[1,"list-group-item","d-flex","justify-content-between","align-items-start","align-items-md-center","flex-column","flex-md-row"],[1,"text-start","me-2"],[1,"me-3"],["role","button","tabindex","0",1,"hover-pointer","text-nowrap"],[1,"text-nowrap"],[1,"grey-text","m-0","p-0","font-monospace"],[1,"d-block","d-md-none","font-monospace","grey-text","text-break-all"],[1,"text-start","text-md-end","grey-text","font-monospace","d-none","d-md-block","align-content-center","text-break-all"],["role","button","tabindex","0",1,"hover-pointer","text-nowrap",3,"click","keydown.enter"],["role","button","tabindex","0",1,"hover-pointer"],["role","button","tabindex","0",1,"hover-pointer",3,"click","keydown.enter"],[1,"text-start","align-self-md-center","text-nowrap"],[1,"text-start","text-md-end","grey-text","font-monospace","d-flex","justify-content-between","align-items-center","ms-md-2"],[1,"text-break-all"],["type","button",1,"btn","btn-link","p-0","ms-2","text-primary","flex-shrink-0","align-baseline",3,"click"],["aria-hidden","true",1,"fas","fa-check","green-text"],["aria-hidden","true",1,"fas","fa-copy"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"text-start","font-monospace"],[1,"text-start","align-self-md-center","font-monospace","text-nowrap"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-primary","m-0","ms-3","py-1",3,"click"],["aria-hidden","true",1,"fas","fa-arrow-right"]],template:function(o,i){o&1&&(La$1(0,"div",0)(1,"div",1)(2,"h5",2),At$1(3),Rd$1(),La$1(4,"button",3),f_(5,"translate"),rc$1("click",function(){return i.dismissModal()}),Rd$1()(),La$1(6,"div",4)(7,"ul",5)(8,"li",6),dy(9,"span",7),f_(10,"translate"),dy(11,"br")(12,"span",7),f_(13,"translate"),Rd$1(),La$1(14,"li",8)(15,"label",9),At$1(16),f_(17,"translate"),Rd$1(),La$1(18,"div",10)(19,"input",11),rc$1("ngModelChange",function(f){return i.localService.customName=f}),Rd$1(),KC(),Rd$1()(),Re$1(20,Z0,8,4,"li",8),La$1(21,"li",12)(22,"span",13),At$1(23),f_(24,"translate"),Rd$1(),La$1(25,"div",14)(26,"input",15),f_(27,"translate"),Fy("ngModelChange",function(f){return t_(i.localService.hidden,f)||(i.localService.hidden=f),f}),rc$1("ngModelChange",function(){return i.onHiddenChange()}),Rd$1(),KC(),dy(28,"label",16),Rd$1()(),Re$1(29,J0,8,7,"li",12),Rd$1(),La$1(30,"ul",5),Re$1(31,na,6,3)(32,Ea,18,11),Rd$1(),dT(33,ts,19,11,"ul",5,lT),La$1(35,"ul",17)(36,"li",18)(37,"h6",19),At$1(38),f_(39,"translate"),Rd$1()(),La$1(40,"li",20)(41,"span",21),At$1(42),f_(43,"translate"),Rd$1(),La$1(44,"span",22),At$1(45),Rd$1()(),Re$1(46,os,8,6),dT(47,rs,5,2,"li",20,lT),Re$1(49,as,5,1,"li",20),La$1(50,"li",20)(51,"span",21),At$1(52),f_(53,"translate"),Rd$1(),La$1(54,"span",22),At$1(55),Rd$1()(),Re$1(56,ss,6,4,"li",20),Re$1(57,ps,33,16),Re$1(58,gs,18,12),Rd$1()(),La$1(59,"div",23)(60,"div",21)(61,"button",24),f_(62,"translate"),rc$1("click",function(){return i.dismissModal()}),At$1(63),f_(64,"translate"),Rd$1()(),dy(65,"div",25),La$1(66,"div",26)(67,"button",27),f_(68,"translate"),rc$1("click",function(){return i.saveModal()}),At$1(69),f_(70,"translate"),Rd$1()()()()),o&2&&(vr$1("aria-labelledby","accessory-info-modal-title"),ie$1(3),Rt(" ",i.localService.customName||i.localService.serviceName," "),ie$1(),vr$1("aria-label",h_(5,28,"form.button_close")),ie$1(5),ly("innerHTML",h_(10,30,"accessories.only_ui"),Ha$1),ie$1(3),ly("innerHTML",h_(13,32,"accessories.only_ui_2"),Ha$1),ie$1(4),Ny(h_(17,34,"accessories.custom_name")),ie$1(3),ly("ngModel",i.localService.customName||i.localService.serviceName),JC(),ie$1(),Oe(i.customTypeList.length?20:-1),ie$1(3),Ny(h_(24,36,"accessories.hide_this_accessory")),ie$1(3),ky("ngModel",i.localService.hidden),vr$1("aria-label",h_(27,38,"accessories.hide_this_accessory")),JC(),ie$1(3),Oe(i.localService.hidden?-1:29),ie$1(2),Oe(i.isMatterAccessory?31:32),ie$1(2),fT(i.extraServices),ie$1(5),Ny(h_(39,40,"accessories.accessory_info")),ie$1(4),Ny(h_(43,42,"accessories.protocol")),ie$1(3),Rt(" ",i.isMatterAccessory?"Matter":"HAP"," "),ie$1(),Oe(i.matchedCachedAccessory?46:-1),ie$1(),fT(i.accessoryInformation),ie$1(2),Oe(i.isMatterAccessory?49:-1),ie$1(3),Ny(h_(53,44,"users.label_username")),ie$1(3),Ny(i.localService.instance.username),ie$1(),Oe(i.matchedCachedAccessory?56:-1),ie$1(),Oe(i.isMatterAccessory?-1:57),ie$1(),Oe(i.matchedCachedAccessory?58:-1),ie$1(3),vr$1("aria-label",h_(62,46,"form.button_close")),ie$1(2),Rt(" ",h_(64,48,"form.button_close")," "),ie$1(4),ly("disabled",i.isFormUnchanged()),vr$1("aria-label",h_(68,50,"form.button_save")),ie$1(2),Rt(" ",h_(70,52,"form.button_save")," "));},dependencies:[Kn,Xn$1,Yn,Ye,Mt,Vt$2,Hn,ln,OS,K8,Re,Jn,Ct,Xn],encapsulation:2})}return e})();var le=(()=>{class e{injector=g(we);$accessoryCache=g(m);$pairingsCache=g(v);$auth=g(ae);$destroyRef=g(ne);$errors=g(m$1);$modal=g(si);$toastr=g(M0);$translate=g(bf);$ws=g(dr$1);accessoryCache=[];pairingCache=[];customAttributesApplied=new Set;combinedServiceIds=new Set;io;stop$=new $$1;sessionActive=false;hiddenTypes=new Set(["InputSource","LockManagement","CameraRTPStreamManagement","ProtocolInformation","NFCAccess","BridgedNode","History"]);layoutSaved=new $$1;accessoryData=new $$1;hapReadyForControl=false;matterReadyForControl=false;accessories={services:[]};accessoryLayout;originalLayout;availableBridges=W([]);selectedBridges=W(null);bridgeUsernameToNameMap=new Map;rooms=W([]);constructor(){this.$auth.user.admin&&this.loadCachedData();}loadCachedData(){return E(this,null,function*(){let t=false,o=i=>{console.error(i),t||(t=true,this.$toastr.warning(this.$errors.toToastMessage(i),this.$translate.instant("toast.title_warning")));};try{this.accessoryCache=yield this.$accessoryCache.getHap();}catch(i){o(i);}try{this.pairingCache=yield this.$pairingsCache.get();}catch(i){o(i);}})}showAccessoryInformation(t){return E(this,null,function*(){let o=ty([{provide:R,useValue:{service:t,accessoryCache:this.accessoryCache,pairingCache:this.pairingCache}}],this.injector),i=this.$modal.open(eo,{size:"lg",backdrop:"static",injector:o});try{let c=yield i.result,T=this.rooms().flatMap(R=>R.services).find(R=>R.uniqueId===t.uniqueId)||t,P=x(w({},T),{customName:c.customName,customType:c.customType,hidden:c.hidden,onDashboard:c.onDashboard}),O=this.accessories.services.findIndex(R=>R.uniqueId===P.uniqueId);O!==-1&&(this.accessories.services[O]=P),this.rooms.update(R=>R.map(se=>x(w({},se),{services:se.services.map(Se=>Se.uniqueId===P.uniqueId?P:Se)}))),this.saveLayout();}catch(c){}return false})}stop(){this.stop$.next(),this.stop$.complete(),this.sessionActive=false,this.io?.end?.(),this.rooms.set([]),this.accessories={services:[]},this.customAttributesApplied.clear(),this.combinedServiceIds.clear(),this.accessoryLayout=void 0,this.originalLayout=void 0,this.stop$=new $$1;}start(){return E(this,null,function*(){this.hapReadyForControl=false,this.matterReadyForControl=false,this.sessionActive=true,this.io=this.$ws.connectToNamespace("accessories"),yield this.loadLayout(),this.io.connected.pipe(Is$1(this.stop$)).subscribe(()=>{this.io.socket.emit("get-accessories");}),this.io.socket.on("accessories-data",t=>{this.sessionActive&&(this.parseServices(t),this.combineRelatedServices(),this.generateHelpers(),this.sortIntoRooms(),this.orderRooms(),this.refreshRoomsForChangeDetection(),this.applyCustomAttributes(),this.accessoryData.next(t));}),this.io.socket.on("accessories-reload-required",()=>{this.io.socket.emit("accessory-control",{refresh:true});}),this.io.socket.on("matter-accessories-reload-required",()=>E(this,null,function*(){this.matterReadyForControl=false,this.io.socket.emit("accessory-control",{refresh:true});})),this.io.socket.on("accessory-control-failure",t=>{console.error(t),this.$toastr.error(t,this.$translate.instant("toast.title_error"));}),this.io.socket.on("hap-accessories-ready-for-control",()=>{this.hapReadyForControl=true;}),this.io.socket.on("matter-accessories-ready-for-control",()=>{this.matterReadyForControl=true;});})}saveLayout(){let t=this.rooms().map(i=>({name:i.name,isDefault:i.isDefault,services:i.services.map(c=>({uniqueId:c.uniqueId,nameBasedUniqueId:c.nameBasedUniqueId||void 0,name:c.serviceName,serial:c.accessoryInformation?.["Serial Number"],bridge:c.instance?.username,aid:c.aid,iid:c.iid,uuid:c.uuid,customName:c.customName||void 0,customType:c.customType||void 0,hidden:c.hidden||void 0,onDashboard:c.onDashboard||void 0}))}));!t.some(i=>i.isDefault===true)&&t.length>0&&(t[0].isDefault=true),this.accessoryLayout=this.mergeWithUndiscoveredServices(t),this.io.request("save-layout",{user:this.$auth.user.username,layout:this.accessoryLayout}).pipe(Is$1(this.stop$),An(this.$destroyRef)).subscribe({next:()=>this.layoutSaved.next(void 0),error:i=>{console.error(i),this.$toastr.error(this.$errors.toToastMessage(i),this.$translate.instant("toast.title_error"));}});}loadLayout(){return E(this,null,function*(){if(this.accessoryLayout=yield Fn(this.io.request("get-layout",{user:this.$auth.user.username})),this.originalLayout=JSON.parse(JSON.stringify(this.accessoryLayout)),!this.accessoryLayout.some(o=>o.isDefault)&&this.accessoryLayout.length>0){let o=this.accessoryLayout.findIndex(c=>c.name==="Default Room"),i=o!==-1?o:0;this.accessoryLayout[i].isDefault=true;}this.rooms.set(this.accessoryLayout.map(o=>({name:o.name,isDefault:o.isDefault,services:[]})));})}servicesMatch(t,o){return o.protocol==="matter"||o.uniqueId?.startsWith("matter:")?t.uniqueId===o.uniqueId&&t.bridge===(o.instance?.username||o.bridge):t.nameBasedUniqueId&&o.nameBasedUniqueId?t.nameBasedUniqueId===o.nameBasedUniqueId:t.uniqueId===o.uniqueId?true:t.name===(o.serviceName||o.name)&&t.serial===(o.accessoryInformation?.["Serial Number"]||o.serial)&&t.bridge===(o.instance?.username||o.bridge)&&t.uuid===o.uuid}findInLayout(t){for(let o of this.accessoryLayout)for(let i of o.services)if(i.name&&this.servicesMatch(i,t))return {room:o,service:i};return null}mergeWithUndiscoveredServices(t){if(!this.originalLayout)return t;let o=JSON.parse(JSON.stringify(t)),i=new Set;for(let c of o)for(let f of c.services)for(let T of this.originalLayout){for(let P of T.services)if(P.name&&this.servicesMatch(P,f)){i.add(this.getServiceKey(P));break}if(i.has(this.getServiceKey(f)))break}for(let c of this.originalLayout)for(let f of c.services){if(i.has(this.getServiceKey(f))||!f.name)continue;let T=o.find(P=>P.name===c.name);!T&&(T=o.find(P=>P.isDefault),!T)||T.services.push({uniqueId:f.uniqueId,nameBasedUniqueId:f.nameBasedUniqueId,name:f.name,bridge:f.bridge,serial:f.serial,aid:f.aid,iid:f.iid,uuid:f.uuid,customName:f.customName,customType:f.customType,hidden:f.hidden,onDashboard:f.onDashboard});}return o.filter(c=>c.services.length>0||t.some(f=>f.name===c.name))}getServiceKey(t){return t.nameBasedUniqueId||t.uniqueId}parseServices(t){if(!this.accessories.services.length){this.accessories.services=t;return}t.forEach(o=>{let i=this.accessories.services.findIndex(c=>c.uniqueId===o.uniqueId);o.type==="LockMechanism"&&this.attachLockManagementToMechanism(o),i!==-1?(this.accessories.services[i]=o,this.customAttributesApplied.delete(o.uniqueId)):this.accessories.services.push(o);});}sortIntoRooms(){this.accessories.services.forEach(t=>{if(this.hiddenTypes.has(t.type)||this.hiddenTypes.has(t.deviceType)||this.combinedServiceIds.has(t.uniqueId))return;if(t.linked&&(t.linkedServices={},t.linked.forEach(i=>{t.linkedServices[i]=this.accessories.services.find(c=>c.aid===t.aid&&c.iid===i&&c.instance.username===t.instance.username);})),!this.rooms().find(i=>i.services.find(c=>c.uniqueId===t.uniqueId))){let i=this.findInLayout(t);if(i){let c=t;i.service.customType&&(c.customType=i.service.customType),i.service.customName&&(c.customName=i.service.customName),i.service.hidden&&(c.hidden=i.service.hidden),i.service.onDashboard&&(c.onDashboard=i.service.onDashboard),this.customAttributesApplied.add(t.uniqueId),this.rooms.update(f=>f.map(T=>T.name===i.room.name?x(w({},T),{services:[...T.services,t]}):T));}else {this.customAttributesApplied.add(t.uniqueId);let c=this.rooms().find(f=>f.isDefault===true)||this.rooms().find(f=>f.name==="Default Room");c?this.rooms.update(f=>f.map(T=>T.name===c.name?x(w({},T),{services:[...T.services,t]}):T)):this.rooms.update(f=>[...f,{name:"Default Room",isDefault:true,services:[t]}]);}}});}orderRooms(){this.rooms.update(t=>t.map(o=>{let i=this.accessoryLayout.find(f=>f.name===o.name);if(!i)return o;let c=o.services.toSorted((f,T)=>{let P=i.services.findIndex(R=>this.servicesMatch(R,f)),O=i.services.findIndex(R=>this.servicesMatch(R,T));return P-O});return x(w({},o),{services:c})}));}refreshRoomsForChangeDetection(){this.rooms.update(t=>t.map(o=>x(w({},o),{services:o.services.map(i=>this.accessories.services.find(f=>f.uniqueId===i.uniqueId)||i)})));}applyCustomAttributes(){this.rooms().forEach(t=>{t.services.forEach(o=>{if(this.customAttributesApplied.has(o.uniqueId))return;let i=this.findInLayout(o);if(!i)return;let c=o;i.service.customType&&(c.customType=i.service.customType),i.service.customName&&(c.customName=i.service.customName),i.service.hidden&&(c.hidden=i.service.hidden),i.service.onDashboard&&(c.onDashboard=i.service.onDashboard),this.customAttributesApplied.add(o.uniqueId);});});}generateHelpers(){this.accessories.services.forEach(t=>{let o=t;o.protocol==="matter"?o.getCluster||(o.getCluster=i=>{let c=o.clusters||{};return c[i]?{attributes:c[i],setAttributes:f=>new Promise(T=>this.matterReadyForControl?(this.io.socket.emit("accessory-control",{set:{uniqueId:t.uniqueId,cluster:i,attributes:f}}),T(void 0)):(console.warn("Matter control attempted but not ready for control:",{matterReadyForControl:this.matterReadyForControl,uniqueId:t.uniqueId,cluster:i}),T(void 0)))}:null}):t.getCharacteristic||(t.getCharacteristic=i=>{let c=t.serviceCharacteristics.find(f=>f.type===i);return c?(c.setValue=f=>new Promise(T=>(this.hapReadyForControl&&this.io.socket.emit("accessory-control",{set:{uniqueId:t.uniqueId,aid:t.aid,siid:t.iid,iid:c.iid,value:f}}),T(void 0))),c):null});});}isSameAccessory(t,o){return t.accessoryInformation.Name===o.accessoryInformation.Name&&t.accessoryInformation["Serial Number"]===o.accessoryInformation["Serial Number"]&&t.instance.username===o.instance.username}attachLockManagementToMechanism(t){let o=[],i=[];for(let c of this.accessories.services)c.type==="LockMechanism"&&this.isSameAccessory(c,t)?o.push(c):c.type==="LockManagement"&&this.isSameAccessory(c,t)&&i.push(c);if(o.length===1&&i.length===1){let c=i[0];t.linkedServices||(t.linkedServices={}),t.linkedServices[c.iid]=c;}}attachFanToHeaterCooler(t){let o=[],i=[];for(let c of this.accessories.services)this.isSameAccessory(c,t)&&(c.type==="HeaterCooler"?o.push(c):(c.type==="Fan"||c.type==="Fanv2")&&i.push(c));if(o.length===1&&i.length===1){let c=i[0];t.linkedServices||(t.linkedServices={}),t.linkedServices[c.iid]=c,this.combinedServiceIds.add(c.uniqueId);}}attachFanToHumidifierDehumidifier(t){let o=[],i=[];for(let c of this.accessories.services)this.isSameAccessory(c,t)&&(c.type==="HumidifierDehumidifier"?o.push(c):(c.type==="Fan"||c.type==="Fanv2")&&i.push(c));if(o.length===1&&i.length===1){let c=i[0];t.linkedServices||(t.linkedServices={}),t.linkedServices[c.iid]=c,this.combinedServiceIds.add(c.uniqueId);}}combineRelatedServices(){this.combinedServiceIds.clear();for(let t of this.accessories.services)t.type==="HeaterCooler"?this.attachFanToHeaterCooler(t):t.type==="HumidifierDehumidifier"&&this.attachFanToHumidifierDehumidifier(t);this.rooms.update(t=>t.map(o=>x(w({},o),{services:o.services.filter(i=>!this.combinedServiceIds.has(i.uniqueId))})));}static \u0275fac=function(o){return new(o||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var to=(()=>{class e{service=PH.required();readyForControl=PH(false);static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-access-code"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:18,vars:7,consts:[["tabindex","0",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","6","y","1","width","18","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","2"],["x","9","y","5","width","12","height","3","rx","1","stroke","#7f7f7f","stroke-width","1","fill","#1976d2","fill-opacity","0.5"],["x","9","y","11","width","12","height","16","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1"],["x1","13","y1","11","x2","13","y2","27","stroke","#7f7f7f","stroke-width","1"],["x1","17","y1","11","x2","17","y2","27","stroke","#7f7f7f","stroke-width","1"],["x1","9","y1","15","x2","21","y2","15","stroke","#7f7f7f","stroke-width","1"],["x1","9","y1","19","x2","21","y2","19","stroke","#7f7f7f","stroke-width","1"],["x1","9","y1","23","x2","21","y2","23","stroke","#7f7f7f","stroke-width","1"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(ke(0,"div",0)(1,"div",1)(2,"div",2),f_(3,"translate"),ah(),ke(4,"svg",3),Dr$1(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11),Je$1()(),ch(),ke(13,"div",12),At$1(14),Je$1(),ke(15,"div",13),At$1(16),f_(17,"translate"),Je$1()()()),o&2&&(ie$1(2),vr$1("aria-label",h_(3,3,"accessories.core.access_code")),ie$1(12),Ny(i.service().customName||i.service().serviceName),ie$1(2),Ny(h_(17,5,"accessories.core.access_code")));},dependencies:[K8],encapsulation:2})}return e})();var ce=new I("AccessoryManageModalData"),me=(()=>{class e{destroyRef=g(ne);$activeModal=g(fe);cdr=g(lc$1);$errors=g(m$1);$toastr=g(M0);$translate=g(bf);showGenericErrorToast(t){t!==void 0&&console.error(t),this.$toastr.error(this.$errors.toToastMessage(t),this.$translate.instant("toast.title_error"));}modalData=g(ce);service;$accessories;ngOnInit(){if(!this.modalData.service||!this.modalData.$accessories){console.error("BaseManageComponent: service or $accessories not provided"),this.$activeModal.dismiss("Missing required data");return}this.service=this.modalData.service,this.$accessories=this.modalData.$accessories,this.setupComponent(),this.subscribeToAccessoryUpdates();}dismissModal(){this.$activeModal.dismiss("Dismiss");}subscribeToAccessoryUpdates(){this.$accessories&&this.$accessories.accessoryData.pipe(An(this.destroyRef)).subscribe(()=>{let t=this.$accessories.accessories.services.find(o=>o.uniqueId===this.service.uniqueId);t&&(this.service=t),this.handleAccessoryUpdate(),this.cdr.markForCheck();});}createDebouncedSubscription(t,o,i=500){t.pipe(Hf(i),An(this.destroyRef)).subscribe(o);}applySliderGradient(t,o=".noUi-target"){requestAnimationFrame(()=>{document.querySelectorAll(o).forEach(c=>{c.style.background=t;});});}blurTarget(t){t.target.blur();}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-base-manage"]],decls:0,vars:0,template:function(o,i){},encapsulation:2})}return e})();var Tt=(function(e){return e.Range="range",e.Steps="steps",e.Positions="positions",e.Count="count",e.Values="values",e})(Tt||{}),et=(function(e){return e[e.None=-1]="None",e[e.NoValue=0]="NoValue",e[e.LargeValue=1]="LargeValue",e[e.SmallValue=2]="SmallValue",e})(et||{});function vs(e){return pi(e)&&typeof e.from=="function"}function pi(e){return typeof e=="object"&&typeof e.to=="function"}function io(e){e.parentElement.removeChild(e);}function Ii(e){return e!=null}function no(e){e.preventDefault();}function hs(e){return e.filter(function(r){return this[r]?false:this[r]=true},{})}function Cs(e,r){return Math.round(e/r)*r}function _s(e,r){var t=e.getBoundingClientRect(),o=e.ownerDocument,i=o.documentElement,c=so(o);return /webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(c.x=0),r?t.top+c.y-i.clientTop:t.left+c.x-i.clientLeft}function at(e){return typeof e=="number"&&!isNaN(e)&&isFinite(e)}function oo(e,r,t){t>0&&(ze(e,r),setTimeout(function(){di(e,r);},t));}function ro(e){return Math.max(Math.min(e,100),0)}function mi(e){return Array.isArray(e)?e:[e]}function ys(e){e=String(e);var r=e.split(".");return r.length>1?r[1].length:0}function ze(e,r){e.classList&&!/\s/.test(r)?e.classList.add(r):e.className+=" "+r;}function di(e,r){e.classList&&!/\s/.test(r)?e.classList.remove(r):e.className=e.className.replace(new RegExp("(^|\\b)"+r.split(" ").join("|")+"(\\b|$)","gi")," ");}function xs(e,r){return e.classList?e.classList.contains(r):new RegExp("\\b"+r+"\\b").test(e.className)}function so(e){var r=window.pageXOffset!==void 0,t=(e.compatMode||"")==="CSS1Compat",o=r?window.pageXOffset:t?e.documentElement.scrollLeft:e.body.scrollLeft,i=r?window.pageYOffset:t?e.documentElement.scrollTop:e.body.scrollTop;return {x:o,y:i}}function Ss(){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 ks(){var e=false;try{var r=Object.defineProperty({},"passive",{get:function(){e=!0;}});window.addEventListener("test",null,r);}catch(t){}return e}function Ms(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function Vi(e,r){return 100/(r-e)}function Li(e,r,t){return r*100/(e[t+1]-e[t])}function Ts(e,r){return Li(e,e[0]<0?r+Math.abs(e[0]):r-e[0],0)}function bs(e,r){return r*(e[1]-e[0])/100+e[0]}function jt(e,r){for(var t=1;e>=r[t];)t+=1;return t}function Bs(e,r,t){if(t>=e.slice(-1)[0])return 100;var o=jt(t,e),i=e[o-1],c=e[o],f=r[o-1],T=r[o];return f+Ts([i,c],t)/Vi(f,T)}function ws(e,r,t){if(t>=100)return e.slice(-1)[0];var o=jt(t,r),i=e[o-1],c=e[o],f=r[o-1],T=r[o];return bs([i,c],(t-f)*Vi(f,T))}function Es(e,r,t,o){if(o===100)return o;var i=jt(o,e),c=e[i-1],f=e[i];return t?o-c>(f-c)/2?f:c:r[i-1]?e[i-1]+Cs(o-e[i-1],r[i-1]):o}var Ds=(function(){function e(r,t,o){this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[o||false],this.xNumSteps=[false],this.snap=t;var i,c=[];for(Object.keys(r).forEach(function(f){c.push([mi(r[f]),f]);}),c.sort(function(f,T){return f[0][0]-T[0][0]}),i=0;i<c.length;i++)this.handleEntryPoint(c[i][1],c[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(r){for(var t=[],o=0;o<this.xNumSteps.length-1;o++)t[o]=Li(this.xVal,r,o);return t},e.prototype.getAbsoluteDistance=function(r,t,o){var i=0;if(r<this.xPct[this.xPct.length-1])for(;r>this.xPct[i+1];)i++;else r===this.xPct[this.xPct.length-1]&&(i=this.xPct.length-2);!o&&r===this.xPct[i+1]&&i++,t===null&&(t=[]);var c,f=1,T=t[i],P=0,O=0,R=0,se=0;for(o?c=(r-this.xPct[i])/(this.xPct[i+1]-this.xPct[i]):c=(this.xPct[i+1]-r)/(this.xPct[i+1]-this.xPct[i]);T>0;)P=this.xPct[i+1+se]-this.xPct[i+se],t[i+se]*f+100-c*100>100?(O=P*c,f=(T-100*c)/t[i+se],c=1):(O=t[i+se]*P/100*f,f=0),o?(R=R-O,this.xPct.length+se>=1&&se--):(R=R+O,this.xPct.length-se>=1&&se++),T=t[i+se]*f;return r+R},e.prototype.toStepping=function(r){return r=Bs(this.xVal,this.xPct,r),r},e.prototype.fromStepping=function(r){return ws(this.xVal,this.xPct,r)},e.prototype.getStep=function(r){return r=Es(this.xPct,this.xSteps,this.snap,r),r},e.prototype.getDefaultStep=function(r,t,o){var i=jt(r,this.xPct);return (r===100||t&&r===this.xPct[i-1])&&(i=Math.max(i-1,1)),(this.xVal[i]-this.xVal[i-1])/o},e.prototype.getNearbySteps=function(r){var t=jt(r,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 r=this.xNumSteps.map(ys);return Math.max.apply(null,r)},e.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},e.prototype.convert=function(r){return this.getStep(this.toStepping(r))},e.prototype.handleEntryPoint=function(r,t){var o;if(r==="min"?o=0:r==="max"?o=100:o=parseFloat(r),!at(o)||!at(t[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(o),this.xVal.push(t[0]);var i=Number(t[1]);o?this.xSteps.push(isNaN(i)?false:i):isNaN(i)||(this.xSteps[0]=i),this.xHighestCompleteStep.push(0);},e.prototype.handleStepPoint=function(r,t){if(t){if(this.xVal[r]===this.xVal[r+1]){this.xSteps[r]=this.xHighestCompleteStep[r]=this.xVal[r];return}this.xSteps[r]=Li([this.xVal[r],this.xVal[r+1]],t,0)/Vi(this.xPct[r],this.xPct[r+1]);var o=(this.xVal[r+1]-this.xVal[r])/this.xNumSteps[r],i=Math.ceil(Number(o.toFixed(3))-1),c=this.xVal[r]+this.xNumSteps[r]*i;this.xHighestCompleteStep[r]=c;}},e})(),ao={to:function(e){return e===void 0?"":e.toFixed(2)},from:Number},As={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"},_t={tooltips:".__tooltips",aria:".__aria"};function Ps(e,r){if(!at(r))throw new Error("noUiSlider: 'step' is not numeric.");e.singleStep=r;}function Fs(e,r){if(!at(r))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");e.keyboardPageMultiplier=r;}function Os(e,r){if(!at(r))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");e.keyboardMultiplier=r;}function Is(e,r){if(!at(r))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");e.keyboardDefaultStep=r;}function Ls(e,r){if(typeof r!="object"||Array.isArray(r))throw new Error("noUiSlider: 'range' is not an object.");if(r.min===void 0||r.max===void 0)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");e.spectrum=new Ds(r,e.snap||false,e.singleStep);}function Vs(e,r){if(r=mi(r),!Array.isArray(r)||!r.length)throw new Error("noUiSlider: 'start' option is incorrect.");e.handles=r.length,e.start=r;}function Ns(e,r){if(typeof r!="boolean")throw new Error("noUiSlider: 'snap' option must be a boolean.");e.snap=r;}function Hs(e,r){if(typeof r!="boolean")throw new Error("noUiSlider: 'animate' option must be a boolean.");e.animate=r;}function Rs(e,r){if(typeof r!="number")throw new Error("noUiSlider: 'animationDuration' option must be a number.");e.animationDuration=r;}function lo(e,r){var t=[false],o;if(r==="lower"?r=[true,false]:r==="upper"&&(r=[false,true]),r===true||r===false){for(o=1;o<e.handles;o++)t.push(r);t.push(false);}else {if(!Array.isArray(r)||!r.length||r.length!==e.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");t=r;}e.connect=t;}function $s(e,r){switch(r){case "horizontal":e.ort=0;break;case "vertical":e.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function co(e,r){if(!at(r))throw new Error("noUiSlider: 'margin' option must be numeric.");r!==0&&(e.margin=e.spectrum.getDistance(r));}function Us(e,r){if(!at(r))throw new Error("noUiSlider: 'limit' option must be numeric.");if(e.limit=e.spectrum.getDistance(r),!e.limit||e.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.")}function Ws(e,r){var t;if(!at(r)&&!Array.isArray(r))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(r)&&!(r.length===2||at(r[0])||at(r[1])))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(r!==0){for(Array.isArray(r)||(r=[r,r]),e.padding=[e.spectrum.getDistance(r[0]),e.spectrum.getDistance(r[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 o=r[0]+r[1],i=e.spectrum.xVal[0],c=e.spectrum.xVal[e.spectrum.xVal.length-1];if(o/(c-i)>1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function js(e,r){switch(r){case "ltr":e.dir=0;break;case "rtl":e.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function Gs(e,r){if(typeof r!="string")throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var t=r.indexOf("tap")>=0,o=r.indexOf("drag")>=0,i=r.indexOf("fixed")>=0,c=r.indexOf("snap")>=0,f=r.indexOf("hover")>=0,T=r.indexOf("unconstrained")>=0,P=r.indexOf("invert-connects")>=0,O=r.indexOf("drag-all")>=0,R=r.indexOf("smooth-steps")>=0;if(i){if(e.handles!==2)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");co(e,e.start[1]-e.start[0]);}if(P&&e.handles!==2)throw new Error("noUiSlider: 'invert-connects' behaviour must be used with 2 handles");if(T&&(e.margin||e.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");e.events={tap:t||c,drag:o,dragAll:O,smoothSteps:R,fixed:i,snap:c,hover:f,unconstrained:T,invertConnects:P};}function qs(e,r){if(r!==false)if(r===true||pi(r)){e.tooltips=[];for(var t=0;t<e.handles;t++)e.tooltips.push(r);}else {if(r=mi(r),r.length!==e.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");r.forEach(function(o){if(typeof o!="boolean"&&!pi(o))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")}),e.tooltips=r;}}function zs(e,r){if(r.length!==e.handles)throw new Error("noUiSlider: must pass a attributes for all handles.");e.handleAttributes=r;}function Ks(e,r){if(!pi(r))throw new Error("noUiSlider: 'ariaFormat' requires 'to' method.");e.ariaFormat=r;}function Ys(e,r){if(!vs(r))throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");e.format=r;}function Qs(e,r){if(typeof r!="boolean")throw new Error("noUiSlider: 'keyboardSupport' option must be a boolean.");e.keyboardSupport=r;}function Zs(e,r){e.documentElement=r;}function Js(e,r){if(typeof r!="string"&&r!==false)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");e.cssPrefix=r;}function Xs(e,r){if(typeof r!="object")throw new Error("noUiSlider: 'cssClasses' must be an object.");typeof e.cssPrefix=="string"?(e.cssClasses={},Object.keys(r).forEach(function(t){e.cssClasses[t]=e.cssPrefix+r[t];})):e.cssClasses=r;}function po(e){var r={margin:null,limit:null,padding:null,animate:true,animationDuration:300,ariaFormat:ao,format:ao},t={step:{r:false,t:Ps},keyboardPageMultiplier:{r:false,t:Fs},keyboardMultiplier:{r:false,t:Os},keyboardDefaultStep:{r:false,t:Is},start:{r:true,t:Vs},connect:{r:true,t:lo},direction:{r:true,t:js},snap:{r:false,t:Ns},animate:{r:false,t:Hs},animationDuration:{r:false,t:Rs},range:{r:true,t:Ls},orientation:{r:false,t:$s},margin:{r:false,t:co},limit:{r:false,t:Us},padding:{r:false,t:Ws},behaviour:{r:true,t:Gs},ariaFormat:{r:false,t:Ks},format:{r:false,t:Ys},tooltips:{r:false,t:qs},keyboardSupport:{r:true,t:Qs},documentElement:{r:false,t:Zs},cssPrefix:{r:true,t:Js},cssClasses:{r:true,t:Xs},handleAttributes:{r:false,t:zs}},o={connect:false,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:true,cssPrefix:"noUi-",cssClasses:As,keyboardPageMultiplier:5,keyboardMultiplier:1,keyboardDefaultStep:10};e.format&&!e.ariaFormat&&(e.ariaFormat=e.format),Object.keys(t).forEach(function(P){if(!Ii(e[P])&&o[P]===void 0){if(t[P].r)throw new Error("noUiSlider: '"+P+"' is required.");return}t[P].t(r,Ii(e[P])?e[P]:o[P]);}),r.pips=e.pips;var i=document.createElement("div"),c=i.style.msTransform!==void 0,f=i.style.transform!==void 0;r.transformRule=f?"transform":c?"msTransform":"webkitTransform";var T=[["left","top"],["right","bottom"]];return r.style=T[r.dir][r.ort],r}function el(e,r,t){var o=Ss(),i=Ms(),c=i&&ks(),f=e,T,P,O,R,se,Se,_e=r.spectrum,Ke=[],we=[],$e=[],_i=0,mt={},Rt=false,Et=e.ownerDocument,Yt=r.documentElement||Et.documentElement,Qt=Et.body,y0=Et.dir==="rtl"||r.ort===1?0:100;function ut(x,w){var F=Et.createElement("div");return w&&ze(F,w),x.appendChild(F),F}function x0(x,w){var F=ut(x,r.cssClasses.origin),W=ut(F,r.cssClasses.handle);if(ut(W,r.cssClasses.touchArea),W.setAttribute("data-handle",String(w)),r.keyboardSupport&&(W.setAttribute("tabindex","0"),W.addEventListener("keydown",function(z){return V0(z,w)})),r.handleAttributes!==void 0){var q=r.handleAttributes[w];Object.keys(q).forEach(function(z){W.setAttribute(z,q[z]);});}return W.setAttribute("role","slider"),W.setAttribute("aria-orientation",r.ort?"vertical":"horizontal"),w===0?ze(W,r.cssClasses.handleLower):w===r.handles-1&&ze(W,r.cssClasses.handleUpper),F.handle=W,F}function yi(x,w){return w?ut(x,r.cssClasses.connect):false}function S0(x,w){P=ut(w,r.cssClasses.connects),O=[],R=[],R.push(yi(P,x[0]));for(var F=0;F<r.handles;F++)O.push(x0(w,F)),$e[F]=F,R.push(yi(P,x[F+1]));}function k0(x){ze(x,r.cssClasses.target),r.dir===0?ze(x,r.cssClasses.ltr):ze(x,r.cssClasses.rtl),r.ort===0?ze(x,r.cssClasses.horizontal):ze(x,r.cssClasses.vertical);var w=getComputedStyle(x).direction;return w==="rtl"?ze(x,r.cssClasses.textDirectionRtl):ze(x,r.cssClasses.textDirectionLtr),ut(x,r.cssClasses.base)}function M0(x,w){return !r.tooltips||!r.tooltips[w]?false:ut(x.firstChild,r.cssClasses.tooltip)}function Zi(){return f.hasAttribute("disabled")}function xi(x){var w=O[x];return w.hasAttribute("disabled")}function T0(x){x!=null?(O[x].setAttribute("disabled",""),O[x].handle.removeAttribute("tabindex")):(f.setAttribute("disabled",""),O.forEach(function(w){w.handle.removeAttribute("tabindex");}));}function b0(x){x!=null?(O[x].removeAttribute("disabled"),O[x].handle.setAttribute("tabindex","0")):(f.removeAttribute("disabled"),O.forEach(function(w){w.removeAttribute("disabled"),w.handle.setAttribute("tabindex","0");}));}function Si(){Se&&($t("update"+_t.tooltips),Se.forEach(function(x){x&&io(x);}),Se=null);}function Ji(){Si(),Se=O.map(M0),Bi("update"+_t.tooltips,function(x,w,F){if(!(!Se||!r.tooltips)&&Se[w]!==false){var W=x[w];r.tooltips[w]!==true&&(W=r.tooltips[w].to(F[w])),Se[w].innerHTML=W;}});}function B0(){$t("update"+_t.aria),Bi("update"+_t.aria,function(x,w,F,W,q){$e.forEach(function(z){var fe=O[z],Z=Zt(we,z,0,true,true,true),Me=Zt(we,z,100,true,true,true),Te=q[z],Ee=String(r.ariaFormat.to(F[z]));Z=_e.fromStepping(Z).toFixed(1),Me=_e.fromStepping(Me).toFixed(1),Te=_e.fromStepping(Te).toFixed(1),fe.children[0].setAttribute("aria-valuemin",Z),fe.children[0].setAttribute("aria-valuemax",Me),fe.children[0].setAttribute("aria-valuenow",Te),fe.children[0].setAttribute("aria-valuetext",Ee);});});}function w0(x){if(x.mode===Tt.Range||x.mode===Tt.Steps)return _e.xVal;if(x.mode===Tt.Count){if(x.values<2)throw new Error("noUiSlider: 'values' (>= 2) required for mode 'count'.");for(var w=x.values-1,F=100/w,W=[];w--;)W[w]=w*F;return W.push(100),Xi(W,x.stepped)}return x.mode===Tt.Positions?Xi(x.values,x.stepped):x.mode===Tt.Values?x.stepped?x.values.map(function(q){return _e.fromStepping(_e.getStep(_e.toStepping(q)))}):x.values:[]}function Xi(x,w){return x.map(function(F){return _e.fromStepping(w?_e.getStep(F):F)})}function E0(x){function w(Te,Ee){return Number((Te+Ee).toFixed(7))}var F=w0(x),W={},q=_e.xVal[0],z=_e.xVal[_e.xVal.length-1],fe=false,Z=false,Me=0;return F=hs(F.slice().sort(function(Te,Ee){return Te-Ee})),F[0]!==q&&(F.unshift(q),fe=true),F[F.length-1]!==z&&(F.push(z),Z=true),F.forEach(function(Te,Ee){var De,ke,Le,Ge=Te,He=F[Ee+1],Ue,Di,Ai,Pi,dn,Fi,pn,mn=x.mode===Tt.Steps;for(mn&&(De=_e.xNumSteps[Ee]),De||(De=He-Ge),He===void 0&&(He=Ge),De=Math.max(De,1e-7),ke=Ge;ke<=He;ke=w(ke,De)){for(Ue=_e.toStepping(ke),Di=Ue-Me,dn=Di/(x.density||1),Fi=Math.round(dn),pn=Di/Fi,Le=1;Le<=Fi;Le+=1)Ai=Me+Le*pn,W[Ai.toFixed(5)]=[_e.fromStepping(Ai),0];Pi=F.indexOf(ke)>-1?et.LargeValue:mn?et.SmallValue:et.NoValue,!Ee&&fe&&ke!==He&&(Pi=0),ke===He&&Z||(W[Ue.toFixed(5)]=[ke,Pi]),Me=Ue;}}),W}function D0(x,w,F){var W,q,z=Et.createElement("div"),fe=(W={},W[et.None]="",W[et.NoValue]=r.cssClasses.valueNormal,W[et.LargeValue]=r.cssClasses.valueLarge,W[et.SmallValue]=r.cssClasses.valueSub,W),Z=(q={},q[et.None]="",q[et.NoValue]=r.cssClasses.markerNormal,q[et.LargeValue]=r.cssClasses.markerLarge,q[et.SmallValue]=r.cssClasses.markerSub,q),Me=[r.cssClasses.valueHorizontal,r.cssClasses.valueVertical],Te=[r.cssClasses.markerHorizontal,r.cssClasses.markerVertical];ze(z,r.cssClasses.pips),ze(z,r.ort===0?r.cssClasses.pipsHorizontal:r.cssClasses.pipsVertical);function Ee(ke,Le){var Ge=Le===r.cssClasses.value,He=Ge?Me:Te,Ue=Ge?fe:Z;return Le+" "+He[r.ort]+" "+Ue[ke]}function De(ke,Le,Ge){if(Ge=w?w(Le,Ge):Ge,Ge!==et.None){var He=ut(z,false);He.className=Ee(Ge,r.cssClasses.marker),He.style[r.style]=ke+"%",Ge>et.NoValue&&(He=ut(z,false),He.className=Ee(Ge,r.cssClasses.value),He.setAttribute("data-value",String(Le)),He.style[r.style]=ke+"%",He.innerHTML=String(F.to(Le)));}}return Object.keys(x).forEach(function(ke){De(ke,x[ke][0],x[ke][1]);}),z}function ki(){se&&(io(se),se=null);}function Mi(x){ki();var w=E0(x),F=x.filter,W=x.format||{to:function(q){return String(Math.round(q))}};return se=f.appendChild(D0(w,F,W)),se}function en(){var x=T.getBoundingClientRect(),w="offset"+["Width","Height"][r.ort];return r.ort===0?x.width||T[w]:x.height||T[w]}function St(x,w,F,W){var q=function(fe){var Z=A0(fe,W.pageOffset,W.target||w);if(!Z||Zi()&&!W.doNotReject||xs(f,r.cssClasses.tap)&&!W.doNotReject||x===o.start&&Z.buttons!==void 0&&Z.buttons>1||W.hover&&Z.buttons)return false;c||Z.preventDefault(),Z.calcPoint=Z.points[r.ort],F(Z,W);},z=[];return x.split(" ").forEach(function(fe){w.addEventListener(fe,q,c?{passive:true}:false),z.push([fe,q]);}),z}function A0(x,w,F){var W=x.type.indexOf("touch")===0,q=x.type.indexOf("mouse")===0,z=x.type.indexOf("pointer")===0,fe=0,Z=0;if(x.type.indexOf("MSPointer")===0&&(z=true),x.type==="mousedown"&&!x.buttons&&!x.touches)return false;if(W){var Me=function(De){var ke=De.target;return ke===F||F.contains(ke)||x.composed&&x.composedPath().shift()===F};if(x.type==="touchstart"){var Te=Array.prototype.filter.call(x.touches,Me);if(Te.length>1)return false;fe=Te[0].pageX,Z=Te[0].pageY;}else {var Ee=Array.prototype.find.call(x.changedTouches,Me);if(!Ee)return false;fe=Ee.pageX,Z=Ee.pageY;}}return w=w||so(Et),(q||z)&&(fe=x.clientX+w.x,Z=x.clientY+w.y),x.pageOffset=w,x.points=[fe,Z],x.cursor=q||z,x}function tn(x){var w=x-_s(T,r.ort),F=w*100/en();return F=ro(F),r.dir?100-F:F}function P0(x){var w=100,F=false;return O.forEach(function(W,q){if(!xi(q)){var z=we[q],fe=Math.abs(z-x),Z=fe===100&&w===100,Me=fe<w,Te=fe<=w&&x>z;(Me||Te||Z)&&(F=q,w=fe);}}),F}function F0(x,w){x.type==="mouseout"&&x.target.nodeName==="HTML"&&x.relatedTarget===null&&Ti(x,w);}function O0(x,w){if(navigator.appVersion.indexOf("MSIE 9")===-1&&x.buttons===0&&w.buttonsProperty!==0)return Ti(x,w);var F=(r.dir?-1:1)*(x.calcPoint-w.startCalcPoint),W=F*100/w.baseSize;on(F>0,W,w.locations,w.handleNumbers,w.connect);}function Ti(x,w){w.handle&&(di(w.handle,r.cssClasses.active),_i-=1),w.listeners.forEach(function(F){Yt.removeEventListener(F[0],F[1]);}),_i===0&&(di(f,r.cssClasses.drag),Ei(),x.cursor&&(Qt.style.cursor="",Qt.removeEventListener("selectstart",no))),r.events.smoothSteps&&(w.handleNumbers.forEach(function(F){kt(F,we[F],true,true,false,false);}),w.handleNumbers.forEach(function(F){Oe("update",F);})),w.handleNumbers.forEach(function(F){Oe("change",F),Oe("set",F),Oe("end",F);});}function bi(x,w){if(!w.handleNumbers.some(xi)){var F;if(w.handleNumbers.length===1){var W=O[w.handleNumbers[0]];F=W.children[0],_i+=1,ze(F,r.cssClasses.active);}x.stopPropagation();var q=[],z=St(o.move,Yt,O0,{target:x.target,handle:F,connect:w.connect,listeners:q,startCalcPoint:x.calcPoint,baseSize:en(),pageOffset:x.pageOffset,handleNumbers:w.handleNumbers,buttonsProperty:x.buttons,locations:we.slice()}),fe=St(o.end,Yt,Ti,{target:x.target,handle:F,listeners:q,doNotReject:true,handleNumbers:w.handleNumbers}),Z=St("mouseout",Yt,F0,{target:x.target,handle:F,listeners:q,doNotReject:true,handleNumbers:w.handleNumbers});q.push.apply(q,z.concat(fe,Z)),x.cursor&&(Qt.style.cursor=getComputedStyle(x.target).cursor,O.length>1&&ze(f,r.cssClasses.drag),Qt.addEventListener("selectstart",no,false)),w.handleNumbers.forEach(function(Me){Oe("start",Me);});}}function I0(x){x.stopPropagation();var w=tn(x.calcPoint),F=P0(w);F!==false&&(r.events.snap||oo(f,r.cssClasses.tap,r.animationDuration),kt(F,w,true,true),Ei(),Oe("slide",F,true),Oe("update",F,true),r.events.snap?bi(x,{handleNumbers:[F]}):(Oe("change",F,true),Oe("set",F,true)));}function L0(x){var w=tn(x.calcPoint),F=_e.getStep(w),W=_e.fromStepping(F);Object.keys(mt).forEach(function(q){q.split(".")[0]==="hover"&&mt[q].forEach(function(z){z.call(Xt,W);});});}function V0(x,w){if(Zi()||xi(w))return false;var F=["Left","Right"],W=["Down","Up"],q=["PageDown","PageUp"],z=["Home","End"];r.dir&&!r.ort?F.reverse():r.ort&&!r.dir&&(W.reverse(),q.reverse());var fe=x.key.replace("Arrow",""),Z=fe===q[0],Me=fe===q[1],Te=fe===W[0]||fe===F[0]||Z,Ee=fe===W[1]||fe===F[1]||Me,De=fe===z[0],ke=fe===z[1];if(!Te&&!Ee&&!De&&!ke)return true;x.preventDefault();var Le;if(Ee||Te){var Ge=Te?0:1,He=ln(w),Ue=He[Ge];if(Ue===null)return false;Ue===false&&(Ue=_e.getDefaultStep(we[w],Te,r.keyboardDefaultStep)),Me||Z?Ue*=r.keyboardPageMultiplier:Ue*=r.keyboardMultiplier,Ue=Math.max(Ue,1e-7),Ue=(Te?-1:1)*Ue,Le=Ke[w]+Ue;}else ke?Le=r.spectrum.xVal[r.spectrum.xVal.length-1]:Le=r.spectrum.xVal[0];return kt(w,_e.toStepping(Le),true,true),Oe("slide",w),Oe("update",w),Oe("change",w),Oe("set",w),false}function nn(x){x.fixed||O.forEach(function(w,F){St(o.start,w.children[0],bi,{handleNumbers:[F]});}),x.tap&&St(o.start,T,I0,{}),x.hover&&St(o.move,T,L0,{hover:true}),x.drag&&R.forEach(function(w,F){if(!(w===false||F===0||F===R.length-1)){var W=O[F-1],q=O[F],z=[w],fe=[W,q],Z=[F-1,F];ze(w,r.cssClasses.draggable),x.fixed&&(z.push(W.children[0]),z.push(q.children[0])),x.dragAll&&(fe=O,Z=$e),z.forEach(function(Me){St(o.start,Me,bi,{handles:fe,handleNumbers:Z,connect:w});});}});}function Bi(x,w){mt[x]=mt[x]||[],mt[x].push(w),x.split(".")[0]==="update"&&O.forEach(function(F,W){Oe("update",W);});}function N0(x){return x===_t.aria||x===_t.tooltips}function $t(x){var w=x&&x.split(".")[0],F=w?x.substring(w.length):x;Object.keys(mt).forEach(function(W){var q=W.split(".")[0],z=W.substring(q.length);(!w||w===q)&&(!F||F===z)&&(!N0(z)||F===z)&&delete mt[W];});}function Oe(x,w,F){Object.keys(mt).forEach(function(W){var q=W.split(".")[0];x===q&&mt[W].forEach(function(z){z.call(Xt,Ke.map(r.format.to),w,Ke.slice(),F||false,we.slice(),Xt);});});}function Zt(x,w,F,W,q,z,fe){var Z;return O.length>1&&!r.events.unconstrained&&(W&&w>0&&(Z=_e.getAbsoluteDistance(x[w-1],r.margin,false),F=Math.max(F,Z)),q&&w<O.length-1&&(Z=_e.getAbsoluteDistance(x[w+1],r.margin,true),F=Math.min(F,Z))),O.length>1&&r.limit&&(W&&w>0&&(Z=_e.getAbsoluteDistance(x[w-1],r.limit,false),F=Math.min(F,Z)),q&&w<O.length-1&&(Z=_e.getAbsoluteDistance(x[w+1],r.limit,true),F=Math.max(F,Z))),r.padding&&(w===0&&(Z=_e.getAbsoluteDistance(0,r.padding[0],false),F=Math.max(F,Z)),w===O.length-1&&(Z=_e.getAbsoluteDistance(100,r.padding[1],true),F=Math.min(F,Z))),fe||(F=_e.getStep(F)),F=ro(F),F===x[w]&&!z?false:F}function wi(x,w){var F=r.ort;return (F?w:x)+", "+(F?x:w)}function on(x,w,F,W,q){var z=F.slice(),fe=W[0],Z=r.events.smoothSteps,Me=[!x,x],Te=[x,!x];W=W.slice(),x&&W.reverse(),W.length>1?W.forEach(function(De,ke){var Le=Zt(z,De,z[De]+w,Me[ke],Te[ke],false,Z);Le===false?w=0:(w=Le-z[De],z[De]=Le);}):Me=Te=[true];var Ee=false;W.forEach(function(De,ke){Ee=kt(De,F[De]+w,Me[ke],Te[ke],false,Z)||Ee;}),Ee&&(W.forEach(function(De){Oe("update",De),Oe("slide",De);}),q!=null&&Oe("drag",fe));}function rn(x,w){return r.dir?100-x-w:x}function H0(x,w){we[x]=w,Ke[x]=_e.fromStepping(w);var F=rn(w,0)-y0,W="translate("+wi(F+"%","0")+")";if(O[x].style[r.transformRule]=W,r.events.invertConnects&&we.length>1){var q=we.every(function(z,fe,Z){return fe===0||z>=Z[fe-1]});if(Rt!==!q){G0();return}}Ut(x),Ut(x+1),Rt&&(Ut(x-1),Ut(x+2));}function Ei(){$e.forEach(function(x){var w=we[x]>50?-1:1,F=3+(O.length+w*x);O[x].style.zIndex=String(F);});}function kt(x,w,F,W,q,z){return q||(w=Zt(we,x,w,F,W,false,z)),w===false?false:(H0(x,w),true)}function Ut(x){if(R[x]){var w=we.slice();Rt&&w.sort(function(Z,Me){return Z-Me});var F=0,W=100;x!==0&&(F=w[x-1]),x!==R.length-1&&(W=w[x]);var q=W-F,z="translate("+wi(rn(F,q)+"%","0")+")",fe="scale("+wi(q/100,"1")+")";R[x].style[r.transformRule]=z+" "+fe;}}function an(x,w){return x===null||x===false||x===void 0||(typeof x=="number"&&(x=String(x)),x=r.format.from(x),x!==false&&(x=_e.toStepping(x)),x===false||isNaN(x))?we[w]:x}function Jt(x,w,F){var W=mi(x),q=we[0]===void 0;w=w===void 0?true:w,r.animate&&!q&&oo(f,r.cssClasses.tap,r.animationDuration),$e.forEach(function(Z){kt(Z,an(W[Z],Z),true,false,F);});var z=$e.length===1?0:1;if(q&&_e.hasNoSize()&&(F=true,we[0]=0,$e.length>1)){var fe=100/($e.length-1);$e.forEach(function(Z){we[Z]=Z*fe;});}for(;z<$e.length;++z)$e.forEach(function(Z){kt(Z,we[Z],true,true,F);});Ei(),$e.forEach(function(Z){Oe("update",Z),W[Z]!==null&&w&&Oe("set",Z);});}function R0(x){Jt(r.start,x);}function $0(x,w,F,W){if(x=Number(x),!(x>=0&&x<$e.length))throw new Error("noUiSlider: invalid handle number, got: "+x);kt(x,an(w,x),true,true,W),Oe("update",x),F&&Oe("set",x);}function sn(x){if(x===void 0&&(x=false),x)return Ke.length===1?Ke[0]:Ke.slice(0);var w=Ke.map(r.format.to);return w.length===1?w[0]:w}function U0(){for($t(_t.aria),$t(_t.tooltips),Object.keys(r.cssClasses).forEach(function(x){di(f,r.cssClasses[x]);});f.firstChild;)f.removeChild(f.firstChild);delete f.noUiSlider;}function ln(x){var w=we[x],F=_e.getNearbySteps(w),W=Ke[x],q=F.thisStep.step,z=null;if(r.snap)return [W-F.stepBefore.startValue||null,F.stepAfter.startValue-W||null];q!==false&&W+q>F.stepAfter.startValue&&(q=F.stepAfter.startValue-W),W>F.thisStep.startValue?z=F.thisStep.step:F.stepBefore.step===false?z=false:z=W-F.stepBefore.highestStep,w===100?q=null:w===0&&(z=null);var fe=_e.countStepDecimals();return q!==null&&q!==false&&(q=Number(q.toFixed(fe))),z!==null&&z!==false&&(z=Number(z.toFixed(fe))),[z,q]}function W0(){return $e.map(ln)}function j0(x,w){var F=sn(),W=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips","connect"];W.forEach(function(z){x[z]!==void 0&&(t[z]=x[z]);});var q=po(t);W.forEach(function(z){x[z]!==void 0&&(r[z]=q[z]);}),_e=q.spectrum,r.margin=q.margin,r.limit=q.limit,r.padding=q.padding,r.pips?Mi(r.pips):ki(),r.tooltips?Ji():Si(),we=[],Jt(Ii(x.start)?x.start:F,w),x.connect&&cn();}function cn(){for(;P.firstChild;)P.removeChild(P.firstChild);for(var x=0;x<=r.handles;x++)R[x]=yi(P,r.connect[x]),Ut(x);nn({drag:r.events.drag,fixed:true});}function G0(){Rt=!Rt,lo(r,r.connect.map(function(x){return !x})),cn();}function q0(){T=k0(f),S0(r.connect,T),nn(r.events),Jt(r.start),r.pips&&Mi(r.pips),r.tooltips&&Ji(),B0();}q0();var Xt={destroy:U0,steps:W0,on:Bi,off:$t,get:sn,set:Jt,setHandle:$0,reset:R0,disable:T0,enable:b0,__moveHandles:function(x,w,F){on(x,w,we,F);},options:t,updateOptions:j0,target:f,removePips:ki,removeTooltips:Si,getPositions:function(){return we.slice()},getTooltips:function(){return Se},getOrigins:function(){return O},pips:Mi};return Xt}function mo(e,r){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=po(r),o=el(e,t,r);return e.noUiSlider=o,o}var Ni=class{to(r){return String(parseFloat(parseFloat(String(r)).toFixed(2)))}from(r){return parseFloat(r)}},ye=(()=>{class e{constructor(t,o,i){this.ngZone=t,this.el=o,this.renderer=i,this.handles=[],this.config={},this.change=new Vt$1(true),this.update=new Vt$1(true),this.slide=new Vt$1(true),this.set=new Vt$1(true),this.start=new Vt$1(true),this.end=new Vt$1(true),this.onChange=Function.prototype,this.cleanups=[],this.eventHandler=(c,f,T,P)=>{let O=this.toValues(f),R=false;if(this.value===void 0){this.value=O;return}Array.isArray(O)&&this.value[T]!=O[T]&&(R=true),!Array.isArray(O)&&this.value!=O&&(R=true),R&&this.ngZone.run(()=>{c.observers.length>0&&c.emit(O),this.onChange(O);}),Array.isArray(O)?this.value[T]=O[T]:this.value=O;},this.defaultKeyHandler=c=>{let f=this.slider.steps(),T=parseInt(c.target.getAttribute("data-handle")),P=1,O=1,R=0,se=0;switch(c.which){case 34:O=this.config.pageSteps;break;case 40:case 37:P=-1,R=f[T][0],c.preventDefault();break;case 33:O=this.config.pageSteps;break;case 38:case 39:R=f[T][1],c.preventDefault();break;}se=P*O*R;let Se;Array.isArray(this.value)?(Se=[...this.value],Se[T]=Se[T]+se):Se=this.value+se,this.slider.set(Se);};}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 o=t.map(this.config.format.from);return o.length==1?o[0]:o}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 o=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(o.tooltips=this.tooltips||this.config.tooltips,o.format=this.format||this.config.format||new Ni,this.ngZone.runOutsideAngular(()=>{this.slider=mo(this.el.nativeElement.querySelector("div"),Object.assign(this.config,o));}),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 c=this.config.onKeydown||this.defaultKeyHandler;this.ngZone.runOutsideAngular(()=>{this.cleanups.push(this.renderer.listen(i,"keydown",c),this.renderer.listen(i,"click",()=>{i.focus();}));});}}this.slider.on("set",(i,c,f)=>{this.eventHandler(this.set,i,c,f);}),this.slider.on("update",(i,c,f)=>{this.update.observers.length>0&&this.ngZone.run(()=>{this.update.emit(this.toValues(i));});}),this.slider.on("change",(i,c,f)=>{this.change.observers.length>0&&this.ngZone.run(()=>{this.change.emit(this.toValues(i));});}),this.slider.on("slide",(i,c,f)=>{this.eventHandler(this.slide,i,c,f);}),this.slider.on("start",(i,c,f)=>{this.start.observers.length>0&&this.ngZone.run(()=>{this.start.emit(this.toValues(i));});}),this.slider.on("end",(i,c,f)=>{this.end.observers.length>0&&this.ngZone.run(()=>{this.end.emit(this.toValues(i));});});}}return e.\u0275fac=function(t){return new(t||e)(_e(oe),_e(Qe),_e(Ii$1))},e.\u0275cmp=Ja$1({type:e,selectors:[["nouislider"]],hostVars:2,hostBindings:function(t,o){t&2&&Cy("ng2-nouislider",true);},inputs:{disabled:"disabled",behaviour:"behaviour",connect:"connect",limit:"limit",min:"min",max:"max",snap:"snap",animate:"animate",range:"range",step:"step",format:"format",pageSteps:"pageSteps",config:"config",keyboard:"keyboard",onKeydown:"onKeydown",tooltips:"tooltips"},outputs:{change:"change",update:"update",slide:"slide",set:"set",start:"start",end:"end"},features:[i_([{provide:b,useExisting:Ls$1(()=>e),multi:true}]),gi$1],decls:1,vars:1,template:function(t,o){t&1&&Dr$1(0,"div"),t&2&&vr$1("disabled",o.disabled?true:void 0);},styles:["[_nghost-%COMP%]{display:block;margin-top:1rem;margin-bottom:1rem}"],changeDetection:1}),e})();function il(e,r){if(e&1){let t=nc$1();La$1(0,"button",6),rc$1("click",function(i){Go$1(t);let c=ye$1(2);return Wo$1(c.setTargetMode(0,i))}),La$1(1,"div",7),dy(2,"i",8),Rd$1(),At$1(3),f_(4,"translate"),La$1(5,"div",9),dy(6,"i",10),Rd$1()();}if(e&2){let t=ye$1(2);ie$1(2),Cy("fa-check-circle",t.targetMode===0)("fa-blank",t.targetMode!==0),ie$1(),Rt(" ",h_(4,5,"accessories.control.manual")," ");}}function nl(e,r){if(e&1){let t=nc$1();La$1(0,"button",6),rc$1("click",function(i){Go$1(t);let c=ye$1(2);return Wo$1(c.setTargetMode(1,i))}),La$1(1,"div",7),dy(2,"i",8),Rd$1(),At$1(3),f_(4,"translate"),La$1(5,"div",9),dy(6,"i",10),Rd$1()();}if(e&2){let t=ye$1(2);ie$1(2),Cy("fa-check-circle",t.targetMode===1)("fa-blank",t.targetMode!==1),ie$1(),Rt(" ",h_(4,5,"accessories.control.auto")," ");}}function ol(e,r){if(e&1&&(La$1(0,"h6",12),At$1(1),f_(2,"translate"),Rd$1(),La$1(3,"div",5),f_(4,"translate"),Re$1(5,il,7,7,"button",13),Re$1(6,nl,7,7,"button",13),Rd$1()),e&2){let t=ye$1();ie$1(),Ny(h_(2,4,"accessories.control.mode")),ie$1(2),vr$1("aria-label",h_(4,6,"accessories.control.mode_control")),ie$1(2),Oe(t.targetModeValidValues.includes(0)?5:-1),ie$1(),Oe(t.targetModeValidValues.includes(1)?6:-1);}}function rl(e,r){if(e&1){let t=nc$1();La$1(0,"h6",12),At$1(1),f_(2,"translate"),Rd$1(),La$1(3,"nouislider",14),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1();return t_(c.targetRotationSpeed.value,i)||(c.targetRotationSpeed.value=i),Wo$1(i)}),rc$1("ngModelChange",function(){Go$1(t);let i=ye$1();return Wo$1(i.onTargetRotationSpeedChange())}),Rd$1(),KC();}if(e&2){let t=ye$1();ie$1(),xy("",h_(2,6,"accessories.control.rotation_speed"),": ",t.targetRotationSpeed.value,"%"),ie$1(2),ly("min",t.targetRotationSpeed.min)("max",t.targetRotationSpeed.max)("step",t.targetRotationSpeed.step),ky("ngModel",t.targetRotationSpeed.value),JC();}}var uo=(()=>{class e extends me{targetState;targetMode;targetModeValidValues=[];targetRotationSpeed;targetRotationSpeedChanged=new $$1;setupComponent(){this.createDebouncedSubscription(this.targetRotationSpeedChanged,()=>{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(true)):!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(false));}),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();}handleAccessoryUpdate(){this.targetState="Active"in this.service.values?this.service.values.Active:this.service.values.On?1:0,this.targetMode=this.service.values.TargetAirPurifierState,this.targetRotationSpeed&&(this.targetRotationSpeed.value=this.service.getCharacteristic("RotationSpeed")?.value);}setTargetState(t,o){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),this.blurTarget(o);}setTargetMode(t,o){this.targetMode=t,this.service.getCharacteristic("TargetAirPurifierState").setValue(this.targetMode),this.blurTarget(o);}onTargetRotationSpeedChange(){this.targetRotationSpeedChanged.next(this.targetRotationSpeed.value);}loadRotationSpeed(){let t=this.service.getCharacteristic("RotationSpeed");t&&(this.targetRotationSpeed={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},this.applySliderGradient("linear-gradient(to right, #add8e6, #416bdf)"));}static \u0275fac=(()=>{let t;return function(i){return (t||(t=_n(e)))(i||e)}})();static \u0275cmp=Ja$1({type:e,selectors:[["app-air-purifier-manage"]],features:[Xa$1],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"],[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(o,i){o&1&&(La$1(0,"div",0)(1,"div",1),dy(2,"h5",2),La$1(3,"button",3),f_(4,"translate"),rc$1("click",function(){return i.dismissModal()}),Rd$1()(),La$1(5,"div",4)(6,"div",5),f_(7,"translate"),La$1(8,"button",6),rc$1("click",function(f){return i.setTargetState(0,f)}),La$1(9,"div",7),dy(10,"i",8),Rd$1(),At$1(11),f_(12,"translate"),La$1(13,"div",9),dy(14,"i",10),Rd$1()(),La$1(15,"button",6),rc$1("click",function(f){return i.setTargetState(1,f)}),La$1(16,"div",7),dy(17,"i",8),Rd$1(),At$1(18),f_(19,"translate"),La$1(20,"div",9),dy(21,"i",10),Rd$1()()(),Re$1(22,ol,7,8),Re$1(23,rl,4,8),Rd$1(),dy(24,"div",11),Rd$1()),o&2&&(ie$1(2),ly("innerText",i.service.customName||i.service.serviceName),ie$1(),vr$1("aria-label",h_(4,15,"form.button_close")),ie$1(3),vr$1("aria-label",h_(7,17,"accessories.control.state_control")),ie$1(4),Cy("fa-check-circle",i.targetState===0)("fa-blank",i.targetState!==0),ie$1(),Rt(" ",h_(12,19,"accessories.control.off")," "),ie$1(6),Cy("fa-check-circle",i.targetState===1)("fa-blank",i.targetState!==1),ie$1(),Rt(" ",h_(19,21,"accessories.control.on")," "),ie$1(4),Oe(i.targetModeValidValues.length?22:-1),ie$1(),Oe(i.targetRotationSpeed?23:-1));},dependencies:[Kn,Hn,ln,ye,K8],styles:[".purifying[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .air-wave[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_wave-motion 5s ease-in-out infinite;stroke:#1976d2;stroke-opacity:.5}.purifying[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .bottom-line[_ngcontent-%COMP%]{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 ie=(()=>{class e{downTimeout;done=false;touchInProgress=false;touchStartTime=0;duration=PH(350);longClick=LH();shortClick=LH();onEnter(t){this.shortClick.emit(t);}onMouseUp(t){!this.touchInProgress&&!this.isSyntheticEvent()&&(clearTimeout(this.downTimeout),this.done||(this.done=true,this.shortClick.emit(t)));}onTouchEnd(t){clearTimeout(this.downTimeout),this.done||(this.done=true,this.shortClick.emit(t)),setTimeout(()=>{this.touchInProgress=false;},150);}onMouseDown(t){if("touches"in t){this.touchInProgress=true,this.done=false,this.touchStartTime=Date.now(),t.cancelable&&this.isSafariMobile()&&t.preventDefault(),this.downTimeout=setTimeout(()=>{this.done||(this.done=true,this.longClick.emit(t));},this.duration());return}!this.touchInProgress&&!this.isSyntheticEvent()&&t.button===0&&(this.done=false,this.downTimeout=setTimeout(()=>{this.done||(this.done=true,this.longClick.emit(t));},this.duration()));}onMouseMove(){this.done=true,clearTimeout(this.downTimeout);}isSyntheticEvent(){let t=Date.now()-this.touchStartTime;return this.touchInProgress&&t<300}isSafariMobile(){let t=navigator.userAgent;return F.test(t)&&M.test(t)&&!a.test(t)}ngOnDestroy(){clearTimeout(this.downTimeout),this.touchInProgress=false;}static \u0275fac=function(o){return new(o||e)};static \u0275dir=Sn({type:e,selectors:[["","shortClick",""],["","longClick",""]],hostBindings:function(o,i){o&1&&rc$1("keyup.enter",function(f){return i.onEnter(f)})("mouseup",function(f){return i.onMouseUp(f)})("touchend",function(f){return i.onTouchEnd(f)})("touchstart",function(f){return i.onMouseDown(f)})("mousedown",function(f){return i.onMouseDown(f)})("mousemove",function(){return i.onMouseMove()})("touchmove",function(){return i.onMouseMove()});},inputs:{duration:[1,"duration"]},outputs:{longClick:"longClick",shortClick:"shortClick"}})}return e})();function al(e,r){if(e&1&&At$1(0),e&2){let t=ye$1();Rt(" \xB7 ",t.currentConsumption(),"W ");}}var fo=(()=>{class e{$accessories=g(le);injector=g(we);$modal=g(si);hasTargetValidValues=false;service=PH.required();readyForControl=PH(false);ngOnInit(){"TargetAirPurifierState"in this.service().values&&(this.hasTargetValidValues=this.service().getCharacteristic("TargetAirPurifierState").validValues.length>0);}isOn(){let t=this.service().values;return !!(t?.Active&&!("CurrentAirPurifierState"in t)||t?.Active&&"CurrentAirPurifierState"in t&&t?.CurrentAirPurifierState!==0||t?.On)}isPurifying(){let t=this.service().values;return !!(t?.Active&&!("CurrentAirPurifierState"in t)||t?.Active&&"CurrentAirPurifierState"in t&&t?.CurrentAirPurifierState===2||t?.On)}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=ty([{provide:ce,useValue:{service:this.service(),$accessories:this.$accessories}}],this.injector);this.$modal.open(uo,{size:"md",backdrop:"static",injector:t});}}hasCurrentConsumption(){return "Consumption"in this.service().values}currentConsumption(){if(this.hasCurrentConsumption())return this.service().values.Consumption}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-air-purifier"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:33,vars:23,consts:[["role","button","tabindex","0",1,"accessory-box",3,"longClick","shortClick","keydown.enter","keydown.space"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["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"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","grey-text"]],template:function(o,i){if(o&1){let c=nc$1();Mi(0),f_(1,"translate"),f_(2,"translate"),f_(3,"translate"),Mi(4),f_(5,"translate"),Mi(6),f_(7,"lowercase"),f_(8,"lowercase"),La$1(9,"div",0),rc$1("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()})("keydown.enter",function(){return i.onClick()})("keydown.space",function(T){return Go$1(c),T.preventDefault(),Wo$1(i.onClick())}),La$1(10,"span",1),At$1(11),Rd$1(),La$1(12,"div",2)(13,"div",3),ah(),La$1(14,"svg",4),dy(15,"path",5)(16,"path",6)(17,"line",7)(18,"line",8)(19,"line",9)(20,"line",10)(21,"line",11)(22,"line",12)(23,"line",13)(24,"line",14)(25,"line",15)(26,"circle",16)(27,"line",17),Rd$1()(),ch(),La$1(28,"div",18),At$1(29),Rd$1(),La$1(30,"div",19),At$1(31),Re$1(32,al,1,1),Rd$1()()();}if(o&2){let c=i.service().values,f="CurrentAirPurifierState"in c,T="RotationSpeed"in c,P=i.isOn(),O=i.isPurifying(),R=c?.Active&&f&&c?.CurrentAirPurifierState===1&&!O,se=T?`${c?.RotationSpeed}%`:"",Se=O?T?se:h_(1,11,"accessories.control.on"):R?h_(2,13,"accessories.control.idle"):h_(3,15,"accessories.control.off"),_e=(i.service().customName||i.service().serviceName||"").trim(),Ke=h_(5,17,"accessories.core.air_purifier"),we=!h_(7,19,_e).includes(h_(8,21,Ke)),$e=`${_e+(we?`, ${Ke}`:"")}, ${Se}`;ie$1(9),Cy("accessory-on",P)("purifying",O)("cursor-pointer",i.readyForControl()),vr$1("aria-label",$e),ie$1(2),Rt(" ",$e," "),ie$1(18),Ny(i.service().customName||i.service().serviceName),ie$1(2),Rt(" ",Se," "),ie$1(),Oe(P&&i.hasCurrentConsumption()?32:-1);}},dependencies:[ie,_S,K8],styles:[".purifying[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .air-wave[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_wave-motion 5s ease-in-out infinite;stroke:#1976d2;stroke-opacity:.5}.purifying[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .bottom-line[_ngcontent-%COMP%]{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 sl=()=>[1,2],ll=()=>[3,4];function cl(e,r){if(e&1&&(ke(0,"li",9)(1,"span"),At$1(2),f_(3,"translate"),Je$1(),ke(4,"span",10),At$1(5),Je$1()()),e&2){let t=ye$1(2);ie$1(2),Ny(h_(3,2,"accessories.control.pm25")),ie$1(3),Rt("",t.pm25," \xB5g/m\xB3");}}function dl(e,r){if(e&1&&(ke(0,"li",9)(1,"span"),At$1(2),f_(3,"translate"),Je$1(),ke(4,"span",10),At$1(5),Je$1()()),e&2){let t=ye$1(2);ie$1(2),Ny(h_(3,2,"accessories.control.pm10")),ie$1(3),Rt("",t.pm10," \xB5g/m\xB3");}}function pl(e,r){if(e&1&&(ke(0,"li",9)(1,"span"),At$1(2),f_(3,"translate"),Je$1(),ke(4,"span",10),At$1(5),Je$1()()),e&2){let t=ye$1(2);ie$1(2),Ny(h_(3,2,"accessories.control.ozone")),ie$1(3),Rt("",t.ozone," \xB5g/m\xB3");}}function ml(e,r){if(e&1&&(ke(0,"li",9)(1,"span"),At$1(2),f_(3,"translate"),Je$1(),ke(4,"span",10),At$1(5),Je$1()()),e&2){let t=ye$1(2);ie$1(2),Ny(h_(3,2,"accessories.control.nitrogen_dioxide")),ie$1(3),Rt("",t.no2," \xB5g/m\xB3");}}function ul(e,r){if(e&1&&(ke(0,"li",9)(1,"span"),At$1(2),f_(3,"translate"),Je$1(),ke(4,"span",10),At$1(5),Je$1()()),e&2){let t=ye$1(2);ie$1(2),Ny(h_(3,2,"accessories.control.sulphur_dioxide")),ie$1(3),Rt("",t.so2," \xB5g/m\xB3");}}function fl(e,r){if(e&1&&(ke(0,"li",9)(1,"span"),At$1(2),f_(3,"translate"),Je$1(),ke(4,"span",10),At$1(5),Je$1()()),e&2){let t=ye$1(2);ie$1(2),Ny(h_(3,2,"accessories.control.voc")),ie$1(3),Rt("",t.voc," \xB5g/m\xB3");}}function gl(e,r){if(e&1&&(ke(0,"ul",7),Re$1(1,cl,6,4,"li",9),Re$1(2,dl,6,4,"li",9),Re$1(3,pl,6,4,"li",9),Re$1(4,ml,6,4,"li",9),Re$1(5,ul,6,4,"li",9),Re$1(6,fl,6,4,"li",9),Je$1()),e&2){let t=ye$1();ie$1(),Oe(t.pm25!==null?1:-1),ie$1(),Oe(t.pm10!==null?2:-1),ie$1(),Oe(t.ozone!==null?3:-1),ie$1(),Oe(t.no2!==null?4:-1),ie$1(),Oe(t.so2!==null?5:-1),ie$1(),Oe(t.voc!==null?6:-1);}}var go=(()=>{class e extends me{labels=["Unknown","Excellent","Good","Fair","Inferior","Poor"];airQuality=0;pm25=null;pm10=null;ozone=null;no2=null;so2=null;voc=null;setupComponent(){this.updateFromService();}handleAccessoryUpdate(){this.updateFromService();}updateFromService(){this.airQuality=this.service.values?.AirQuality??0,this.pm25=this.service.values?.PM2_5Density??null,this.pm10=this.service.values?.PM10Density??null,this.ozone=this.service.values?.OzoneDensity??null,this.no2=this.service.values?.NitrogenDioxideDensity??null,this.so2=this.service.values?.SulphurDioxideDensity??null,this.voc=this.service.values?.VOCDensity??null;}get hasReadings(){return this.pm25!==null||this.pm10!==null||this.ozone!==null||this.no2!==null||this.so2!==null||this.voc!==null}static \u0275fac=(()=>{let t;return function(i){return (t||(t=_n(e)))(i||e)}})();static \u0275cmp=Ja$1({type:e,selectors:[["app-air-quality-sensor-manage"]],features:[Xa$1],decls:11,vars:14,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","px-4"],[1,"text-center","mb-3"],[1,"badge","rounded-pill","fs-6"],[1,"list-group","list-group-box","mb-0"],[1,"modal-footer"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"grey-text"]],template:function(o,i){o&1&&(ke(0,"div",0)(1,"div",1),Dr$1(2,"h5",2),ke(3,"button",3),f_(4,"translate"),_i("click",function(){return i.dismissModal()}),Je$1()(),ke(5,"div",4)(6,"div",5)(7,"span",6),At$1(8),Je$1()(),Re$1(9,gl,7,6,"ul",7),Je$1(),Dr$1(10,"div",8),Je$1()),o&2&&(ie$1(2),bi("innerText",i.service.customName||i.service.serviceName||i.service.displayName),ie$1(),vr$1("aria-label",h_(4,10,"form.button_close")),ie$1(4),Cy("bg-success",s_(12,sl).includes(i.airQuality))("bg-warning",s_(13,ll).includes(i.airQuality))("bg-danger",i.airQuality>=5),ie$1(),Rt(" ",i.labels[i.airQuality||0]," "),ie$1(),Oe(i.hasReadings?9:-1));},dependencies:[K8],encapsulation:2})}return e})();var vl=()=>[3,4],hl=()=>[1,2],vo=(()=>{class e{$accessories=g(le);injector=g(we);$modal=g(si);service=PH.required();labels=["Unknown","Excellent","Good","Fair","Inferior","Poor"];canShowModal=X(()=>{let t=this.service().values;return t?.PM2_5Density!==void 0||t?.PM10Density!==void 0||t?.OzoneDensity!==void 0||t?.NitrogenDioxideDensity!==void 0||t?.SulphurDioxideDensity!==void 0||t?.VOCDensity!==void 0});onLongClick(){if(!this.canShowModal())return;let t=ty([{provide:ce,useValue:{service:this.service(),$accessories:this.$accessories}}],this.injector);this.$modal.open(go,{size:"md",backdrop:"static",injector:t});}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-air-quality-sensor"]],inputs:{service:[1,"service"]},decls:31,vars:28,consts:[["appLongClick","",1,"accessory-box",3,"longClick","keydown.enter","keydown.space"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["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"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label"]],template:function(o,i){if(o&1&&(Mi(0),f_(1,"translate"),Mi(2),f_(3,"lowercase"),f_(4,"lowercase"),La$1(5,"div",0),rc$1("longClick",function(){return i.onLongClick()})("keydown.enter",function(){return i.canShowModal()&&i.onLongClick()})("keydown.space",function(){return i.canShowModal()&&i.onLongClick()}),La$1(6,"span",1),At$1(7),Rd$1(),La$1(8,"div",2)(9,"div",3),ah(),La$1(10,"svg",4),dy(11,"rect",5),La$1(12,"g",6),dy(13,"path",7),Rd$1(),dy(14,"line",8)(15,"line",9)(16,"line",10)(17,"line",11)(18,"line",12)(19,"line",13)(20,"line",14)(21,"line",15)(22,"line",16)(23,"line",17)(24,"line",18)(25,"line",19)(26,"line",20),Rd$1()(),ch(),La$1(27,"div",21),At$1(28),Rd$1(),La$1(29,"div",22),At$1(30),Rd$1()()()),o&2){let c=i.service().values?.AirQuality||0,f=i.labels[c],T=(i.service().customName||i.service().serviceName||"").trim(),P=h_(1,20,"accessories.core.air_quality_sensor"),O=!h_(3,22,T).includes(h_(4,24,P)),R=`${T+(O?`, ${P}`:"")}, ${f}`;ie$1(5),Cy("cursor-pointer",i.canShowModal())("accessory-on",c===5)("fill-red",c===5)("fill-orange",s_(26,vl).includes(c))("fill-green",s_(27,hl).includes(c)),vr$1("role",i.canShowModal()?"button":null)("tabindex",i.canShowModal()?0:null)("aria-label",i.canShowModal()?R:null),ie$1(2),Rt(" ",R," "),ie$1(21),Ny(i.service().customName||i.service().serviceName),ie$1(),Cy("grey-text",c<5)("red-text",c===5),ie$1(),Rt(" ",f," ");}},dependencies:[ie,_S,K8],styles:[".fill-red[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .leaves[_ngcontent-%COMP%]{fill:#d32f2f!important;fill-opacity:.5!important}.fill-orange[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .leaves[_ngcontent-%COMP%]{fill:#ff9800!important;fill-opacity:.5!important}.fill-green[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .leaves[_ngcontent-%COMP%]{fill:#4caf50!important;fill-opacity:.5!important}"]})}return e})();function Cl(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.battery_notcharging")," ");}function _l(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.battery_charging")," ");}function yl(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.battery_notchargeable")," ");}function xl(e,r){e&1&&(ke(0,"span",11),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.battery_low")));}function Sl(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.battery_charged")," ");}function kl(e,r){if(e&1&&Re$1(0,yl,2,3)(1,xl,3,3,"span",11)(2,Sl,2,3),e&2){let t=ye$1(2);Oe(t.service().values?.ChargingState===2?0:t.service().values?.StatusLowBattery===1||t.service().values?.BatteryLevel===0?1:2);}}function Ml(e,r){if(e&1&&Re$1(0,_l,2,3)(1,kl,3,1),e&2){let t=ye$1();Oe(t.service().values?.ChargingState===1?0:1);}}var ho=(()=>{class e{service=PH.required();Math=Math;static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-battery"]],inputs:{service:[1,"service"]},decls:27,vars:25,consts:[[1,"accessory-box"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["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"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","grey-text"],[1,"red-text"]],template:function(o,i){if(o&1&&(Mi(0),f_(1,"translate"),f_(2,"translate"),f_(3,"translate"),f_(4,"translate"),f_(5,"translate"),Mi(6),f_(7,"translate"),Mi(8),f_(9,"lowercase"),f_(10,"lowercase"),ke(11,"div",0)(12,"span",1),At$1(13),Je$1(),ke(14,"div",2)(15,"div",3),ah(),ke(16,"svg",4),Dr$1(17,"rect",5)(18,"rect",6)(19,"rect",7),ke(20,"text",8),At$1(21),Je$1()()(),ch(),ke(22,"div",9),At$1(23),Je$1(),ke(24,"div",10),Re$1(25,Cl,2,3)(26,Ml,2,1),Je$1()()()),o&2){let c=i.service().values?.BatteryLevel??0,f=i.service().values?.ChargingState===1,T=i.service().values?.StatusLowBattery===1||c===0,P=i.service().values?.ChargingState===0?h_(1,9,"accessories.control.battery_notcharging"):i.service().values?.ChargingState===1?h_(2,11,"accessories.control.battery_charging"):i.service().values?.ChargingState===2?h_(3,13,"accessories.control.battery_notchargeable"):T?h_(4,15,"accessories.control.battery_low"):h_(5,17,"accessories.control.battery_charged"),O=(i.service().customName||i.service().serviceName||"").trim(),R=h_(7,19,"accessories.core.battery"),se=!h_(9,21,O).includes(h_(10,23,R)),Se=`${O+(se?`, ${R}`:"")}, ${c}%, ${P}`;ie$1(11),Cy("accessory-on",f),ie$1(2),Rt(" ",Se," "),ie$1(4),vr$1("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"),ie$1(4),Rt(" ",i.service().values?.BatteryLevel||0,"% "),ie$1(2),Ny(i.service().customName||i.service().serviceName),ie$1(2),Oe(i.service().values?.ChargingState===0?25:26);}},dependencies:[_S,K8],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})();function Tl(e,r){e&1&&(ke(0,"div",17),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.detected")));}function bl(e,r){e&1&&(ke(0,"div",18),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Rt(" ",h_(2,1,"accessories.control.not_detected")," "));}var Co=(()=>{class e{service=PH.required();static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-carbon-dioxide-sensor"]],inputs:{service:[1,"service"]},decls:30,vars:15,consts:[[1,"accessory-box"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["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"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","red-text"],["aria-hidden","true",1,"accessory-label","grey-text"]],template:function(o,i){if(o&1&&(Mi(0),f_(1,"translate"),f_(2,"translate"),Mi(3),f_(4,"translate"),Mi(5),f_(6,"lowercase"),f_(7,"lowercase"),ke(8,"div",0)(9,"span",1),At$1(10),Je$1(),ke(11,"div",2)(12,"div",3),ah(),ke(13,"svg",4),Dr$1(14,"rect",5),ke(15,"text",6),At$1(16," CO2 "),Je$1(),Dr$1(17,"line",7)(18,"line",8)(19,"line",9)(20,"line",10)(21,"line",11)(22,"line",12)(23,"line",13)(24,"path",14)(25,"path",15),Je$1()(),ch(),ke(26,"div",16),At$1(27),Je$1(),Re$1(28,Tl,3,3,"div",17)(29,bl,3,3,"div",18),Je$1()()),o&2){let c=!!i.service().values?.CarbonDioxideDetected,f=c?h_(1,5,"accessories.control.detected"):h_(2,7,"accessories.control.not_detected"),T=(i.service().customName||i.service().serviceName||"").trim(),P=h_(4,9,"accessories.core.carbon_dioxide_sensor"),O=!h_(6,11,T).includes(h_(7,13,P)),R=`${T+(O?`, ${P}`:"")}, ${f}`;ie$1(8),Cy("accessory-on",c),ie$1(2),Rt(" ",R," "),ie$1(17),Ny(i.service().customName||i.service().serviceName),ie$1(),Oe(c?28:29);}},dependencies:[_S,K8],styles:[".accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .air-line[_ngcontent-%COMP%]{stroke:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}.accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .type[_ngcontent-%COMP%]{fill:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{opacity:1}50%{opacity:.2}}"]})}return e})();function Bl(e,r){e&1&&(ke(0,"div",17),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.detected")));}function wl(e,r){e&1&&(ke(0,"div",18),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Rt(" ",h_(2,1,"accessories.control.not_detected")," "));}var _o=(()=>{class e{service=PH.required();static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-carbon-monoxide-sensor"]],inputs:{service:[1,"service"]},decls:30,vars:15,consts:[[1,"accessory-box"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["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"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","red-text"],["aria-hidden","true",1,"accessory-label","grey-text"]],template:function(o,i){if(o&1&&(Mi(0),f_(1,"translate"),f_(2,"translate"),Mi(3),f_(4,"translate"),Mi(5),f_(6,"lowercase"),f_(7,"lowercase"),ke(8,"div",0)(9,"span",1),At$1(10),Je$1(),ke(11,"div",2)(12,"div",3),ah(),ke(13,"svg",4),Dr$1(14,"rect",5),ke(15,"text",6),At$1(16," CO "),Je$1(),Dr$1(17,"line",7)(18,"line",8)(19,"line",9)(20,"line",10)(21,"line",11)(22,"line",12)(23,"line",13)(24,"path",14)(25,"path",15),Je$1()(),ch(),ke(26,"div",16),At$1(27),Je$1(),Re$1(28,Bl,3,3,"div",17)(29,wl,3,3,"div",18),Je$1()()),o&2){let c=!!i.service().values?.CarbonMonoxideDetected,f=c?h_(1,5,"accessories.control.detected"):h_(2,7,"accessories.control.not_detected"),T=(i.service().customName||i.service().serviceName||"").trim(),P=h_(4,9,"accessories.core.carbon_monoxide_sensor"),O=!h_(6,11,T).includes(h_(7,13,P)),R=`${T+(O?`, ${P}`:"")}, ${f}`;ie$1(8),Cy("accessory-on",c),ie$1(2),Rt(" ",R," "),ie$1(17),Ny(i.service().customName||i.service().serviceName),ie$1(),Oe(c?28:29);}},dependencies:[_S,K8],styles:[".accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .air-line[_ngcontent-%COMP%]{stroke:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}.accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .type[_ngcontent-%COMP%]{fill:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{opacity:1}50%{opacity:.2}}"]})}return e})();function El(e,r){e&1&&(ke(0,"div",10),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.open")));}function Dl(e,r){e&1&&(ke(0,"div",11),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.closed")));}var yo=(()=>{class e{service=PH.required();static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-contact-sensor"]],inputs:{service:[1,"service"]},decls:22,vars:15,consts:[[1,"accessory-box"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["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"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","red-text"],["aria-hidden","true",1,"accessory-label","grey-text"]],template:function(o,i){if(o&1&&(Mi(0),f_(1,"translate"),f_(2,"translate"),Mi(3),f_(4,"translate"),Mi(5),f_(6,"lowercase"),f_(7,"lowercase"),ke(8,"div",0)(9,"span",1),At$1(10),Je$1(),ke(11,"div",2)(12,"div",3),ah(),ke(13,"svg",4),Dr$1(14,"rect",5)(15,"rect",6)(16,"rect",7)(17,"rect",8),Je$1()(),ch(),ke(18,"div",9),At$1(19),Je$1(),Re$1(20,El,3,3,"div",10)(21,Dl,3,3,"div",11),Je$1()()),o&2){let c=!!i.service().values?.ContactSensorState,f=c?h_(1,5,"accessories.control.open"):h_(2,7,"accessories.control.closed"),T=(i.service().customName||i.service().serviceName||"").trim(),P=h_(4,9,"accessories.core.contact_sensor"),O=!h_(6,11,T).includes(h_(7,13,P)),R=`${T+(O?`, ${P}`:"")}, ${f}`;ie$1(8),Cy("accessory-on",c),ie$1(2),Rt(" ",R," "),ie$1(9),Ny(i.service().customName||i.service().serviceName),ie$1(),Oe(c?20:21);}},dependencies:[_S,K8],styles:[".accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .left-sensor[_ngcontent-%COMP%]{fill:#ff9800;fill-opacity:.5}.accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .right-object[_ngcontent-%COMP%]{x:24px}.accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .right-sensor[_ngcontent-%COMP%]{x:24px;fill:#ff9800;fill-opacity:.5}"]})}return e})();function Al(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.closed")," ");}function Pl(e,r){if(e&1&&(At$1(0),f_(1,"translate")),e&2){let t=ye$1(2);xy(" ",h_(1,2,"accessories.control.open")," ",t.service.getCharacteristic("CurrentPosition").value,"% ");}}function Fl(e,r){if(e&1&&Re$1(0,Al,2,3)(1,Pl,2,4),e&2){let t=ye$1();Oe(t.service.values?.CurrentPosition===0?0:1);}}function Ol(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.opening"),"... ");}function Il(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.closing"),"... ");}var xo=(()=>{class e extends me{targetMode;targetPositionChanged=new $$1;targetPosition;setupComponent(){this.createDebouncedSubscription(this.targetPositionChanged,()=>{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);}),this.targetMode=this.service.values.On,this.loadTargetPosition();}handleAccessoryUpdate(){this.targetMode=this.service.values.On,this.targetPosition&&(this.targetPosition.value=this.service.getCharacteristic("TargetPosition")?.value);}onTargetPositionChange(){this.targetPositionChanged.next(this.targetPosition.value);}loadTargetPosition(){let t=this.service.getCharacteristic("TargetPosition");t&&(this.targetPosition={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},this.applySliderGradient("linear-gradient(to right, #242424, #ffd6aa)"));}static \u0275fac=(()=>{let t;return function(i){return (t||(t=_n(e)))(i||e)}})();static \u0275cmp=Ja$1({type:e,selectors:[["app-door-manage"]],features:[Xa$1],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"],["role","status","aria-live","polite","aria-atomic","true",1,"mb-0","mx-0","p-3","btn-read","w-100"],["aria-hidden","true",1,"mt-4"],[1,"mb-1",3,"ngModelChange","min","max","step","ngModel"],["aria-hidden","true",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(o,i){o&1&&(La$1(0,"div",0)(1,"div",1),dy(2,"h5",2),La$1(3,"button",3),f_(4,"translate"),rc$1("click",function(){return i.dismissModal()}),Rd$1()(),La$1(5,"div",4)(6,"div",5)(7,"div",6),Re$1(8,Fl,2,1)(9,Ol,2,3)(10,Il,2,3),Rd$1()(),La$1(11,"h6",7),At$1(12),f_(13,"translate"),Rd$1(),La$1(14,"nouislider",8),Fy("ngModelChange",function(f){return t_(i.targetPosition.value,f)||(i.targetPosition.value=f),f}),rc$1("ngModelChange",function(){return i.onTargetPositionChange()}),Rd$1(),KC(),La$1(15,"div",9)(16,"span",10),At$1(17),f_(18,"translate"),Rd$1(),La$1(19,"span",10),At$1(20),f_(21,"translate"),Rd$1()(),La$1(22,"h6",7),At$1(23),f_(24,"translate"),Rd$1(),La$1(25,"nouislider",11),Fy("ngModelChange",function(f){return t_(i.service.getCharacteristic("CurrentPosition").value,f)||(i.service.getCharacteristic("CurrentPosition").value=f),f}),Rd$1(),KC(),La$1(26,"div",9)(27,"span",10),At$1(28),f_(29,"translate"),Rd$1(),La$1(30,"span",10),At$1(31),f_(32,"translate"),Rd$1()()(),dy(33,"div",12),Rd$1()),o&2&&(ie$1(2),ly("innerText",i.service.customName||i.service.serviceName),ie$1(),vr$1("aria-label",h_(4,20,"form.button_close")),ie$1(5),Oe(i.service.values?.PositionState===2?8:i.service.values?.PositionState===1?9:i.service.values?.PositionState===0?10:-1),ie$1(4),xy("",h_(13,22,"accessories.control.target"),": ",i.targetPosition.value,"%"),ie$1(2),ly("min",i.targetPosition.min)("max",i.targetPosition.max)("step",i.targetPosition.step),ky("ngModel",i.targetPosition.value),JC(),ie$1(3),Ny(h_(18,24,"accessories.control.closed")),ie$1(3),Ny(h_(21,26,"accessories.control.open")),ie$1(3),xy(" ",h_(24,28,"accessories.control.current"),": ",i.service.getCharacteristic("CurrentPosition").value,"% "),ie$1(2),ly("min",0)("max",100)("step",1)("disabled",true),ky("ngModel",i.service.getCharacteristic("CurrentPosition").value),JC(),ie$1(3),Ny(h_(29,30,"accessories.control.closed")),ie$1(3),Ny(h_(32,32,"accessories.control.open")));},dependencies:[ye,Kn,Hn,ln,K8],encapsulation:2})}return e})();function Ll(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.closed")," ");}function Vl(e,r){if(e&1&&(At$1(0),f_(1,"translate")),e&2){ye$1(2);let t=Ot$1(0);xy(" ",h_(1,2,"accessories.control.open")," ",t,"% ");}}function Nl(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.open")," ");}function Hl(e,r){if(e&1&&(La$1(0,"div",12),Re$1(1,Ll,2,3),Re$1(2,Vl,2,4),Re$1(3,Nl,2,3),Rd$1()),e&2){ye$1();let t=Ot$1(0);ie$1(),Oe(t===0?1:-1),ie$1(),Oe(t>0&&t<100?2:-1),ie$1(),Oe(t===100?3:-1);}}function Rl(e,r){e&1&&(La$1(0,"div",13),At$1(1),f_(2,"translate"),Rd$1()),e&2&&(ie$1(),Rt("",h_(2,1,"accessories.control.opening"),"..."));}function $l(e,r){e&1&&(La$1(0,"div",13),At$1(1),f_(2,"translate"),Rd$1()),e&2&&(ie$1(),Rt("",h_(2,1,"accessories.control.closing"),"..."));}var So=(()=>{class e{$accessories=g(le);injector=g(we);$modal=g(si);service=PH.required();readyForControl=PH(false);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=ty([{provide:ce,useValue:{service:this.service(),$accessories:this.$accessories}}],this.injector);this.$modal.open(xo,{size:"md",backdrop:"static",injector:t});}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-door"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:29,vars:27,consts:[["role","button","tabindex","0",1,"accessory-box",3,"longClick","shortClick","keydown.enter","keydown.space"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["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"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","grey-text"],["aria-hidden","true",1,"accessory-label","red-text"]],template:function(o,i){if(o&1){let c=nc$1();Mi(0)(1),f_(2,"translate"),f_(3,"translate"),f_(4,"translate"),f_(5,"translate"),f_(6,"translate"),Mi(7),f_(8,"translate"),Mi(9),f_(10,"lowercase"),f_(11,"lowercase"),La$1(12,"div",0),rc$1("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()})("keydown.enter",function(){return i.onClick()})("keydown.space",function(T){return Go$1(c),T.preventDefault(),Wo$1(i.onClick())}),La$1(13,"span",1),At$1(14),Rd$1(),La$1(15,"div",2)(16,"div",3),ah(),La$1(17,"svg",4),dy(18,"rect",5)(19,"rect",6)(20,"rect",7)(21,"rect",8)(22,"line",9)(23,"rect",10),Rd$1()(),ch(),La$1(24,"div",11),At$1(25),Rd$1(),Re$1(26,Hl,4,3,"div",12)(27,Rl,3,3,"div",13)(28,$l,3,3,"div",13),Rd$1()();}if(o&2){let c=i.service().values,f=oc$1(c?.CurrentPosition),T=c?.PositionState,P=T===1?h_(2,11,"accessories.control.opening"):T===0?h_(3,13,"accessories.control.closing"):f===0?h_(4,15,"accessories.control.closed"):f===100?h_(5,17,"accessories.control.open"):`${h_(6,19,"accessories.control.open")} ${f}%`,O=(i.service().customName||i.service().serviceName||"").trim(),R=h_(8,21,"accessories.core.door"),se=!h_(10,23,O).includes(h_(11,25,R)),Se=`${O+(se?`, ${R}`:"")}, ${P}`;ie$1(12),Kt$1("--position",(f??0)/100),Cy("accessory-on",f)("cursor-pointer",i.readyForControl()),vr$1("aria-label",Se),ie$1(2),Rt(" ",Se," "),ie$1(11),Ny(i.service().customName||i.service().serviceName),ie$1(),Oe(T===2?26:T===1?27:T===0?28:-1);}},dependencies:[ie,_S,K8],styles:["svg[_ngcontent-%COMP%] .outline[_ngcontent-%COMP%]{transition:width 3s ease;width:calc(12.8px - 9px * var(--position, 0))}svg[_ngcontent-%COMP%] .panel[_ngcontent-%COMP%]{transition:width 3s ease;width:calc(9.6px - 9px * var(--position, 0))}svg[_ngcontent-%COMP%] .handle[_ngcontent-%COMP%]{opacity:calc(1 - var(--position, 0));transition:opacity 3s ease}"]})}return e})();function Ul(e,r){if(e&1){let t=nc$1();La$1(0,"div",5),f_(1,"translate"),La$1(2,"button",7),rc$1("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setActive(0,i))}),La$1(3,"div",8),dy(4,"i",9),Rd$1(),At$1(5),f_(6,"translate"),La$1(7,"div",10),dy(8,"i",11),Rd$1()(),La$1(9,"button",7),rc$1("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setActive(1,i))}),La$1(10,"div",8),dy(11,"i",9),Rd$1(),At$1(12),f_(13,"translate"),La$1(14,"div",10),dy(15,"i",11),Rd$1()()();}if(e&2){let t=ye$1();vr$1("aria-label",h_(1,11,"accessories.control.mode_control")),ie$1(4),Cy("fa-check-circle",t.service.values?.Active===0)("fa-blank",t.service.values?.Active!==0),ie$1(),Rt(" ",h_(6,13,"accessories.control.off")," "),ie$1(6),Cy("fa-check-circle",t.service.values?.Active===1)("fa-blank",t.service.values?.Active!==1),ie$1(),Rt(" ",h_(13,15,"accessories.control.on")," ");}}function Wl(e,r){if(e&1){let t=nc$1();La$1(0,"div",5),f_(1,"translate"),La$1(2,"button",7),rc$1("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setTargetState(0,i))}),La$1(3,"div",8),dy(4,"i",9),Rd$1(),At$1(5),f_(6,"translate"),La$1(7,"div",10),dy(8,"i",11),Rd$1()(),La$1(9,"button",7),rc$1("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setTargetState(1,i))}),La$1(10,"div",8),dy(11,"i",9),Rd$1(),At$1(12),f_(13,"translate"),La$1(14,"div",10),dy(15,"i",11),Rd$1()(),La$1(16,"button",7),rc$1("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setTargetState(2,i))}),La$1(17,"div",8),dy(18,"i",9),Rd$1(),At$1(19),f_(20,"translate"),La$1(21,"div",10),dy(22,"i",11),Rd$1()()();}if(e&2){let t=ye$1();vr$1("aria-label",h_(1,16,"accessories.control.media_control")),ie$1(4),Cy("fa-check-circle",t.service.values?.CurrentMediaState===0)("fa-blank",t.service.values?.CurrentMediaState!==0),ie$1(),Rt(" ",h_(6,18,"accessories.control.play")," "),ie$1(6),Cy("fa-check-circle",t.service.values?.CurrentMediaState===1)("fa-blank",t.service.values?.CurrentMediaState!==1),ie$1(),Rt(" ",h_(13,20,"accessories.control.pause")," "),ie$1(6),Cy("fa-check-circle",t.service.values?.CurrentMediaState===2)("fa-blank",t.service.values?.CurrentMediaState!==2),ie$1(),Rt(" ",h_(20,22,"accessories.control.stop")," ");}}function jl(e,r){if(e&1){let t=nc$1();La$1(0,"h6"),At$1(1),f_(2,"translate"),Rd$1(),La$1(3,"div",12),f_(4,"translate"),La$1(5,"button",7),rc$1("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setTargetMode(false,i))}),La$1(6,"div",8),dy(7,"i",9),Rd$1(),At$1(8),f_(9,"translate"),La$1(10,"div",10),dy(11,"i",11),Rd$1()(),La$1(12,"button",7),rc$1("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setTargetMode(true,i))}),La$1(13,"div",8),dy(14,"i",9),Rd$1(),At$1(15),f_(16,"translate"),La$1(17,"div",10),dy(18,"i",11),Rd$1()()();}if(e&2){let t=ye$1();ie$1(),Rt(" ",h_(2,12,"Active"in t.service.values||"TargetMediaState"in t.service.values?"accessories.control.speaker_volume":"menu.label_status")," "),ie$1(2),vr$1("aria-label",h_(4,14,"accessories.control.mute_control")),ie$1(4),Cy("fa-check-circle",!t.targetMode)("fa-blank",t.targetMode),ie$1(),Rt(" ",h_(9,16,"accessories.control.not_mute")," "),ie$1(6),Cy("fa-check-circle",t.targetMode)("fa-blank",!t.targetMode),ie$1(),Rt(" ",h_(16,18,"accessories.control.mute")," ");}}function Gl(e,r){if(e&1){let t=nc$1();La$1(0,"h6",13),At$1(1),f_(2,"translate"),Rd$1(),La$1(3,"nouislider",14),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1();return t_(c.targetVolume.value,i)||(c.targetVolume.value=i),Wo$1(i)}),rc$1("ngModelChange",function(){Go$1(t);let i=ye$1();return Wo$1(i.onVolumeStateChange())}),Rd$1(),KC();}if(e&2){let t=ye$1();ie$1(),xy("",h_(2,6,"accessories.control.speaker_volume"),": ",t.targetVolume.value,"%"),ie$1(2),ly("min",t.targetVolume.min)("max",t.targetVolume.max)("step",t.targetVolume.step),ky("ngModel",t.targetVolume.value),JC();}}var ko=(()=>{class e extends me{targetMode;targetVolume;targetVolumeChanged=new $$1;setupComponent(){this.createDebouncedSubscription(this.targetVolumeChanged,()=>{this.service.getCharacteristic("Volume").setValue(this.targetVolume.value);}),this.targetMode=this.service.values.Mute,this.loadTargetVolume();}handleAccessoryUpdate(){this.targetMode=this.service.values.Mute,this.targetVolume&&(this.targetVolume.value=this.service.getCharacteristic("Volume")?.value);}setTargetMode(t,o){this.targetMode=t,this.service.getCharacteristic("Mute").setValue(this.targetMode),this.blurTarget(o);}setActive(t,o){this.service.getCharacteristic("Active").setValue(t),this.blurTarget(o);}setTargetState(t,o){this.service.getCharacteristic("TargetMediaState").setValue(t),this.blurTarget(o);}onVolumeStateChange(){this.targetVolumeChanged.next(this.targetVolume.value);}loadTargetVolume(){let t=this.service.getCharacteristic("Volume");t&&(this.targetVolume={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},this.applySliderGradient("linear-gradient(to right, #ffffff, #ffd966, #ff0000)"));}static \u0275fac=(()=>{let t;return function(i){return (t||(t=_n(e)))(i||e)}})();static \u0275cmp=Ja$1({type:e,selectors:[["app-doorbell-manage"]],features:[Xa$1],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"],[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(o,i){o&1&&(La$1(0,"div",0)(1,"div",1),dy(2,"h5",2),La$1(3,"button",3),f_(4,"translate"),rc$1("click",function(){return i.dismissModal()}),Rd$1()(),La$1(5,"div",4),Re$1(6,Ul,16,17,"div",5)(7,Wl,23,24,"div",5),Re$1(8,jl,19,20),Re$1(9,Gl,4,8),Rd$1(),dy(10,"div",6),Rd$1()),o&2&&(ie$1(2),ly("innerText",i.service.customName||i.service.serviceName),ie$1(),vr$1("aria-label",h_(4,5,"form.button_close")),ie$1(3),Oe("Active"in i.service.values?6:"TargetMediaState"in i.service.values?7:-1),ie$1(2),Oe("Mute"in i.service.values?8:-1),ie$1(),Oe(i.targetVolume?9:-1));},dependencies:[Kn,Hn,ln,ye,K8],encapsulation:2})}return e})();var ql=()=>["Speaker","SmartSpeaker"];function zl(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.playing")," ");}function Kl(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.paused")," ");}function Yl(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.stopped")," ");}function Ql(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" \xB7 ",h_(1,1,"accessories.control.mute")," ");}function Zl(e,r){if(e&1&&At$1(0),e&2){let t=ye$1(3);Rt(" \xB7 ",t.service().values?.Volume,"% ");}}function Jl(e,r){if(e&1&&Re$1(0,Zl,1,1),e&2){let t=ye$1(2);Oe("Volume"in t.service().values?0:-1);}}function Xl(e,r){if(e&1&&(La$1(0,"div",7),Re$1(1,zl,2,3)(2,Kl,2,3)(3,Yl,2,3),Re$1(4,Ql,2,3)(5,Jl,1,1),Rd$1()),e&2){let t,o=ye$1();ie$1(),Oe((t=o.service().values?.CurrentMediaState)===0?1:t===1?2:t===2?3:-1),ie$1(3),Oe("Mute"in o.service().values&&o.service().values?.Mute?4:5);}}function ec(e,r){e&1&&(dy(0,"div",8),f_(1,"translate")),e&2&&ly("innerText",h_(1,1,"accessories.control.off"));}function tc(e,r){e&1&&(dy(0,"div",8),f_(1,"translate")),e&2&&ly("innerText",h_(1,1,"accessories.control.mute"));}function ic(e,r){if(e&1&&(La$1(0,"div",7),At$1(1),Rd$1()),e&2){let t=ye$1();ie$1(),Rt("",t.service().values?.Volume,"%");}}function nc(e,r){e&1&&(La$1(0,"div",7),At$1(1),f_(2,"translate"),Rd$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.on")));}function oc(e,r){e&1&&(La$1(0,"div",7),At$1(1),f_(2,"translate"),Rd$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.core.doorbell")));}var Mo=(()=>{class e{$accessories=g(le);injector=g(we);$modal=g(si);service=PH.required();readyForControl=PH(false);isOn(){let t=this.service().values;return "On"in t?!!t?.On:"Active"in t?!!t?.Active:"CurrentMediaState"in t?[0,1].includes(t?.CurrentMediaState):"Mute"in t&&"Volume"in t?!t?.Mute&&t?.Volume>0:"Mute"in t&&!t?.Mute}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: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=ty([{provide:ce,useValue:{service:this.service(),$accessories:this.$accessories}}],this.injector);this.$modal.open(ko,{size:"md",backdrop:"static",injector:t});}}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-doorbell"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:15,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[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(o,i){o&1&&(La$1(0,"div",0),rc$1("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),La$1(1,"div",1)(2,"div",2),f_(3,"translate"),ah(),La$1(4,"svg",3),dy(5,"rect",4)(6,"circle",5),Rd$1()(),ch(),La$1(7,"div",6),At$1(8),Rd$1(),Re$1(9,Xl,6,2,"div",7)(10,ec,2,3,"div",8)(11,tc,2,3,"div",8)(12,ic,2,1,"div",7)(13,nc,3,3,"div",7)(14,oc,3,3,"div",7),Rd$1()()),o&2&&(Cy("accessory-on",i.isOn())("paused","CurrentMediaState"in i.service().values&&i.service().values?.CurrentMediaState===1)("cursor-pointer",i.readyForControl()),ie$1(2),vr$1("aria-label",h_(3,9,"accessories.core.doorbell")),ie$1(6),Ny(i.service().customName||i.service().serviceName),ie$1(),Oe("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:s_(11,ql).includes(i.service().customType||i.service().type)?13:14));},dependencies:[ie,K8],encapsulation:2})}return e})();function rc(e,r){if(e&1){let t=nc$1();La$1(0,"h6",12),At$1(1),f_(2,"translate"),Rd$1(),La$1(3,"div",13),f_(4,"translate"),La$1(5,"button",6),rc$1("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setRotationDirection(0,i))}),La$1(6,"div",7),dy(7,"i",8),Rd$1(),At$1(8),f_(9,"translate"),La$1(10,"div",9),dy(11,"i",10),Rd$1()(),La$1(12,"button",6),rc$1("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setRotationDirection(1,i))}),La$1(13,"div",7),dy(14,"i",8),Rd$1(),At$1(15),f_(16,"translate"),La$1(17,"div",9),dy(18,"i",10),Rd$1()()();}if(e&2){let t=ye$1();ie$1(),Ny(h_(2,12,"accessories.control.rotation_direction")),ie$1(2),vr$1("aria-label",h_(4,14,"accessories.control.direction_control")),ie$1(4),Cy("fa-check-circle",t.service.values?.RotationDirection===0)("fa-blank",t.service.values?.RotationDirection!==0),ie$1(),Rt(" ",h_(9,16,"accessories.control.rotation_clockwise")," "),ie$1(6),Cy("fa-check-circle",t.service.values?.RotationDirection===1)("fa-blank",t.service.values?.RotationDirection!==1),ie$1(),Rt(" ",h_(16,18,"accessories.control.rotation_c_clockwise")," ");}}function ac(e,r){e&1&&At$1(0," % ");}function sc(e,r){if(e&1){let t=nc$1();La$1(0,"h6",12),At$1(1),f_(2,"translate"),Re$1(3,ac,1,0),Rd$1(),La$1(4,"nouislider",14),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1();return t_(c.targetRotationSpeed.value,i)||(c.targetRotationSpeed.value=i),Wo$1(i)}),rc$1("ngModelChange",function(){Go$1(t);let i=ye$1();return Wo$1(i.onTargetRotationSpeedChange())}),Rd$1(),KC();}if(e&2){let t=ye$1();ie$1(),xy(" ",h_(2,7,"accessories.control.rotation_speed"),": ",t.targetRotationSpeed.value," "),ie$1(2),Oe(t.targetRotationSpeed.unit==="percentage"?3:-1),ie$1(),ly("min",t.targetRotationSpeed.min)("max",t.targetRotationSpeed.max)("step",t.targetRotationSpeed.step),ky("ngModel",t.targetRotationSpeed.value),JC();}}var To=(()=>{class e extends me{targetMode;targetRotationSpeed;targetRotationSpeedChanged=new $$1;hasRotationDirection=false;setupComponent(){this.createDebouncedSubscription(this.targetRotationSpeedChanged,()=>{this.service.getCharacteristic("RotationSpeed").setValue(this.targetRotationSpeed.value),this.targetRotationSpeed.value&&!this.targetMode?(this.targetMode=true,"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=false,"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="On"in this.service.values?this.service.values.On:this.service.values.Active===1,this.loadRotationSpeed(),"RotationDirection"in this.service.values&&(this.hasRotationDirection=true);}handleAccessoryUpdate(){this.targetMode="On"in this.service.values?this.service.values.On:this.service.values.Active===1,this.targetRotationSpeed&&(this.targetRotationSpeed.value=this.service.getCharacteristic("RotationSpeed")?.value);}setTargetMode(t,o){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),this.blurTarget(o);}onTargetRotationSpeedChange(){this.targetRotationSpeedChanged.next(this.targetRotationSpeed.value);}setRotationDirection(t,o){this.service.getCharacteristic("RotationDirection").setValue(t),this.blurTarget(o);}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},this.applySliderGradient("linear-gradient(to right, #add8e6, #416bdf)"));}static \u0275fac=(()=>{let t;return function(i){return (t||(t=_n(e)))(i||e)}})();static \u0275cmp=Ja$1({type:e,selectors:[["app-fan-manage"]],features:[Xa$1],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"],[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(o,i){o&1&&(La$1(0,"div",0)(1,"div",1),dy(2,"h5",2),La$1(3,"button",3),f_(4,"translate"),rc$1("click",function(){return i.dismissModal()}),Rd$1()(),La$1(5,"div",4)(6,"div",5),f_(7,"translate"),La$1(8,"button",6),rc$1("click",function(f){return i.setTargetMode(false,f)}),La$1(9,"div",7),dy(10,"i",8),Rd$1(),At$1(11),f_(12,"translate"),La$1(13,"div",9),dy(14,"i",10),Rd$1()(),La$1(15,"button",6),rc$1("click",function(f){return i.setTargetMode(true,f)}),La$1(16,"div",7),dy(17,"i",8),Rd$1(),At$1(18),f_(19,"translate"),La$1(20,"div",9),dy(21,"i",10),Rd$1()()(),Re$1(22,rc,19,20),Re$1(23,sc,5,9),Rd$1(),dy(24,"div",11),Rd$1()),o&2&&(ie$1(2),ly("innerText",i.service.customName||i.service.serviceName),ie$1(),vr$1("aria-label",h_(4,15,"form.button_close")),ie$1(3),vr$1("aria-label",h_(7,17,"accessories.control.mode_control")),ie$1(4),Cy("fa-check-circle",!i.targetMode)("fa-blank",i.targetMode),ie$1(),Rt(" ",h_(12,19,"accessories.control.off")," "),ie$1(6),Cy("fa-check-circle",i.targetMode)("fa-blank",!i.targetMode),ie$1(),Rt(" ",h_(19,21,"accessories.control.on")," "),ie$1(4),Oe(i.hasRotationDirection?22:-1),ie$1(),Oe(i.targetRotationSpeed?23:-1));},dependencies:[Kn,Hn,ln,ye,K8],encapsulation:2})}return e})();function lc(e,r){if(e&1&&(La$1(0,"div",8),At$1(1),Rd$1()),e&2){let t=ye$1();ie$1(),xy("",t.service().values?.RotationSpeed,"",t.rotationSpeedUnit);}}function cc(e,r){if(e&1&&At$1(0),e&2){let t=ye$1(2);Rt(" \xB7 ",t.currentConsumption(),"W ");}}function dc(e,r){if(e&1&&(La$1(0,"div",8),At$1(1),f_(2,"translate"),Re$1(3,cc,1,1),Rd$1()),e&2){let t=ye$1();ie$1(),Rt(" ",h_(2,2,t.service().values?.On||t.service().values?.Active?"accessories.control.on":"accessories.control.off")," "),ie$1(2),Oe((t.service().values?.On||t.service().values?.Active)&&t.hasCurrentConsumption()?3:-1);}}var bo=(()=>{class e{$accessories=g(le);injector=g(we);$modal=g(si);service=PH.required();readyForControl=PH(false);rotationSpeedUnit="";hasRotationDirection=false;ngOnInit(){"RotationSpeed"in this.service().values&&this.service().serviceCharacteristics.find(o=>o.type==="RotationSpeed")?.unit==="percentage"&&(this.rotationSpeedUnit="%"),"RotationDirection"in this.service().values&&(this.hasRotationDirection=true);}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=ty([{provide:ce,useValue:{service:this.service(),$accessories:this.$accessories}}],this.injector);this.$modal.open(To,{size:"md",backdrop:"static",injector:t});}}hasCurrentConsumption(){return "Consumption"in this.service().values}currentConsumption(){if(this.hasCurrentConsumption())return this.service().values.Consumption}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-fan"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:12,vars:13,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[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"],["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"]],template:function(o,i){o&1&&(La$1(0,"div",0),rc$1("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),La$1(1,"div",1)(2,"div",2),f_(3,"translate"),ah(),La$1(4,"svg",3)(5,"g",4),dy(6,"path",5),Rd$1(),dy(7,"circle",6),Rd$1()(),ch(),La$1(8,"div",7),At$1(9),Rd$1(),Re$1(10,lc,2,2,"div",8)(11,dc,4,4,"div",8),Rd$1()()),o&2&&(Cy("accessory-on",i.service().values.On||i.service().values.Active)("cursor-pointer",i.readyForControl()),ie$1(2),Cy("spin",(i.service().values?.On||i.service().values?.Active)&&(!i.hasRotationDirection||i.hasRotationDirection&&i.service().values?.RotationDirection===0))("spin-counter",(i.service().values?.On||i.service().values?.Active)&&i.hasRotationDirection&&i.service().values?.RotationDirection===1),vr$1("aria-label",h_(3,11,"accessories.core.fan")),ie$1(7),Ny(i.service().customName||i.service().serviceName),ie$1(),Oe(i.service().values?.On&&i.service().values?.RotationSpeed?10:11));},dependencies:[ie,K8],styles:[".spin[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] g[_ngcontent-%COMP%] .fan-blades[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_fa-spin 2s infinite linear;transform-origin:53.5% 50%}.spin-counter[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] g[_ngcontent-%COMP%] .fan-blades[_ngcontent-%COMP%]{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 Bo=(()=>{class e extends me{targetMode;setupComponent(){this.applySliderGradient("linear-gradient(to right, #d32f2f, #e69533, #42d672, #42d672)");}handleAccessoryUpdate(){}resetFilterLife(t){this.service.getCharacteristic("ResetFilterIndication").setValue(1),this.blurTarget(t);}static \u0275fac=(()=>{let t;return function(i){return (t||(t=_n(e)))(i||e)}})();static \u0275cmp=Ja$1({type:e,selectors:[["app-filter-maintenance-manage"]],features:[Xa$1],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,"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(o,i){o&1&&(La$1(0,"div",0)(1,"div",1),dy(2,"h5",2),La$1(3,"button",3),f_(4,"translate"),rc$1("click",function(){return i.dismissModal()}),Rd$1()(),La$1(5,"div",4)(6,"h6",5),At$1(7),f_(8,"translate"),Rd$1(),dy(9,"nouislider",6),KC(),La$1(10,"div",7),f_(11,"translate"),La$1(12,"button",8),rc$1("click",function(f){return i.resetFilterLife(f)}),At$1(13),f_(14,"translate"),Rd$1()()(),dy(15,"div",9),Rd$1()),o&2&&(ie$1(2),ly("innerText",i.service.customName||i.service.serviceName),ie$1(),vr$1("aria-label",h_(4,11,"form.button_close")),ie$1(4),xy("",h_(8,13,"accessories.control.filter_level"),": ",i.service.values?.FilterLifeLevel,"%"),ie$1(2),ly("min",0)("max",100)("step",1)("disabled",true)("ngModel",i.service.values?.FilterLifeLevel),JC(),ie$1(),vr$1("aria-label",h_(11,15,"accessories.core.filter_maintenance")),ie$1(3),Rt(" ",h_(14,17,"form.button_reset")," "));},dependencies:[Kn,Hn,ln,ye,K8],encapsulation:2})}return e})();function pc(e,r){e&1&&(At$1(0," \xB7 "),La$1(1,"span",27),At$1(2),f_(3,"translate"),Rd$1()),e&2&&(ie$1(2),Ny(h_(3,1,"accessories.control.replace")));}var wo=(()=>{class e{$accessories=g(le);injector=g(we);$modal=g(si);service=PH.required();readyForControl=PH(false);onClick(){if(!this.readyForControl())return;let t=ty([{provide:ce,useValue:{service:this.service(),$accessories:this.$accessories}}],this.injector);this.$modal.open(Bo,{size:"md",backdrop:"static",injector:t});}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-filter-maintenance"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:32,vars:14,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[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"],[1,"red-text"]],template:function(o,i){o&1&&(La$1(0,"div",0),rc$1("longClick",function(){return i.onClick()})("shortClick",function(){return i.onClick()}),La$1(1,"div",1)(2,"div",2),f_(3,"translate"),ah(),La$1(4,"svg",3),dy(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),Rd$1()(),ch(),La$1(26,"div",25),At$1(27),Rd$1(),La$1(28,"div",26)(29,"span"),At$1(30),Rd$1(),Re$1(31,pc,4,3),Rd$1()()()),o&2&&(Cy("replace",i.service().values?.FilterChangeIndication===1||i.service().values?.FilterLifeLevel<10)("dirty",i.service().values?.FilterChangeIndication!==1&&i.service().values?.FilterLifeLevel<50)("cursor-pointer",i.readyForControl()),ie$1(2),vr$1("aria-label",h_(3,12,"accessories.core.filter_maintenance")),ie$1(25),Ny(i.service().customName||i.service().serviceName),ie$1(2),Cy("red-text",i.service().values?.FilterChangeIndication===1),ie$1(),Rt(" ",i.service().values?.FilterLifeLevel,"% "),ie$1(),Oe(i.service().values?.FilterChangeIndication===1?31:-1));},dependencies:[ie,K8],styles:[".dirty[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{fill:#e69533!important}.replace[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{fill:#d32f2f!important}body.dark-mode[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .back[_ngcontent-%COMP%]{fill:#2b2b2b!important}"]})}return e})();function mc(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.open")," ");}function uc(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.closed")," ");}function fc(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.opening"),"... ");}function gc(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.closing"),"... ");}function vc(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.stopped")," ");}function hc(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" (",h_(1,1,"accessories.control.obstructed"),") ");}var Eo=(()=>{class e extends me{targetState;lastMovingDirection;setupComponent(){this.targetState=this.resolveTargetState(this.service.values.CurrentDoorState);}handleAccessoryUpdate(){this.targetState=this.resolveTargetState(this.service.values.CurrentDoorState);}resolveTargetState(t){return (t===2||t===3)&&(this.lastMovingDirection=t),t===4&&this.lastMovingDirection!==void 0?this.lastMovingDirection===3?0:1:t}setTargetState(t,o){this.service.getCharacteristic("TargetDoorState").setValue(t),this.blurTarget(o);}static \u0275fac=(()=>{let t;return function(i){return (t||(t=_n(e)))(i||e)}})();static \u0275cmp=Ja$1({type:e,selectors:[["app-garage-door-opener-manage"]],features:[Xa$1],decls:31,vars:25,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"d-flex","justify-content-center","mb-4","p-0"],["role","status","aria-live","polite","aria-atomic","true",1,"mb-0","mx-0","p-3","btn-read","w-100"],["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"],["aria-hidden","true",1,"float-start","primary-text"],[1,"fas","fa-xl"],["aria-hidden","true",1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"]],template:function(o,i){if(o&1&&(ke(0,"div",0)(1,"div",1),Dr$1(2,"h5",2),ke(3,"button",3),f_(4,"translate"),_i("click",function(){return i.dismissModal()}),Je$1()(),ke(5,"div",4)(6,"div",5)(7,"div",6),Re$1(8,mc,2,3)(9,uc,2,3)(10,fc,2,3)(11,gc,2,3)(12,vc,2,3),Re$1(13,hc,2,3),Je$1()(),ke(14,"div",7),f_(15,"translate"),ke(16,"button",8),_i("click",function(f){return i.setTargetState(0,f)}),ke(17,"div",9),Dr$1(18,"i",10),Je$1(),At$1(19),f_(20,"translate"),ke(21,"div",11),Dr$1(22,"i",12),Je$1()(),ke(23,"button",8),_i("click",function(f){return i.setTargetState(1,f)}),ke(24,"div",9),Dr$1(25,"i",10),Je$1(),At$1(26),f_(27,"translate"),ke(28,"div",11),Dr$1(29,"i",12),Je$1()()()(),Dr$1(30,"div",13),Je$1()),o&2){let c;ie$1(2),bi("innerText",i.service.customName||i.service.serviceName),ie$1(),vr$1("aria-label",h_(4,17,"form.button_close")),ie$1(5),Oe((c=i.service.values?.CurrentDoorState)===0?8:c===1?9:c===2?10:c===3?11:c===4?12:-1),ie$1(5),Oe(i.service.values?.ObstructionDetected?13:-1),ie$1(),vr$1("aria-label",h_(15,19,"accessories.control.state_control")),ie$1(2),vr$1("aria-pressed",i.targetState===0),ie$1(2),Cy("fa-check-circle",i.targetState===0)("fa-blank",i.targetState!==0),ie$1(),Rt(" ",h_(20,21,"accessories.control.open")," "),ie$1(4),vr$1("aria-pressed",i.targetState===1),ie$1(2),Cy("fa-check-circle",i.targetState===1)("fa-blank",i.targetState!==1),ie$1(),Rt(" ",h_(27,23,"accessories.control.close")," ");}},dependencies:[K8],encapsulation:2})}return e})();var Cc=()=>[0,2,3,4];function _c(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" (",h_(1,1,"accessories.control.obstructed"),") ");}function yc(e,r){if(e&1&&(La$1(0,"div",32),At$1(1),f_(2,"translate"),Re$1(3,_c,2,3),Rd$1()),e&2){ye$1(2);let t=Ot$1(2);ie$1(),Rt(" ",h_(2,2,"accessories.control.open")," "),ie$1(2),Oe(t?3:-1);}}function xc(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" (",h_(1,1,"accessories.control.obstructed"),") ");}function Sc(e,r){if(e&1&&(La$1(0,"div",34),At$1(1),f_(2,"translate"),Re$1(3,xc,2,3),Rd$1()),e&2){ye$1(2);let t=Ot$1(2);Cy("grey-text",!t)("red-text",t),ie$1(),Rt(" ",h_(2,6,"accessories.control.closed")," "),ie$1(2),Oe(t?3:-1);}}function kc(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" (",h_(1,1,"accessories.control.obstructed"),") ");}function Mc(e,r){if(e&1&&(La$1(0,"div",32),At$1(1),f_(2,"translate"),Re$1(3,kc,2,3),Rd$1()),e&2){ye$1(2);let t=Ot$1(2);ie$1(),Rt(" ",h_(2,2,"accessories.control.opening"),"... "),ie$1(2),Oe(t?3:-1);}}function Tc(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" (",h_(1,1,"accessories.control.obstructed"),") ");}function bc(e,r){if(e&1&&(La$1(0,"div",32),At$1(1),f_(2,"translate"),Re$1(3,Tc,2,3),Rd$1()),e&2){ye$1(2);let t=Ot$1(2);ie$1(),Rt(" ",h_(2,2,"accessories.control.closing"),"... "),ie$1(2),Oe(t?3:-1);}}function Bc(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" (",h_(1,1,"accessories.control.obstructed"),") ");}function wc(e,r){if(e&1&&(La$1(0,"div",32),At$1(1),f_(2,"translate"),Re$1(3,Bc,2,3),Rd$1()),e&2){ye$1(2);let t=Ot$1(2);ie$1(),Rt(" ",h_(2,2,"accessories.control.stopped")," "),ie$1(2),Oe(t?3:-1);}}function Ec(e,r){if(e&1&&Re$1(0,yc,4,4,"div",32)(1,Sc,4,8,"div",33)(2,Mc,4,4,"div",32)(3,bc,4,4,"div",32)(4,wc,4,4,"div",32),e&2){let t;ye$1();let o=Ot$1(1);Oe((t=o)===0?0:t===1?1:t===2?2:t===3?3:t===4?4:-1);}}function Dc(e,r){if(e&1&&At$1(0),e&2){let t=ye$1(3);Rt(" \xB7 ",t.currentConsumption(),"W ");}}function Ac(e,r){if(e&1&&(La$1(0,"div",32),At$1(1),f_(2,"translate"),Re$1(3,Dc,1,1),Rd$1()),e&2){let t=ye$1(2);ie$1(),Rt(" ",h_(2,2,"accessories.control.open")," "),ie$1(2),Oe(t.hasCurrentConsumption()?3:-1);}}function Pc(e,r){e&1&&(La$1(0,"div",35),At$1(1),f_(2,"translate"),Rd$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.closed")));}function Fc(e,r){if(e&1&&Re$1(0,Ac,4,4,"div",32)(1,Pc,3,3,"div",35),e&2){ye$1();let t=Ot$1(0);Oe(t?.On||t?.Active?0:1);}}var Do=(()=>{class e{$accessories=g(le);injector=g(we);$modal=g(si);service=PH.required();readyForControl=PH(false);fromStopped=W(false);lastDoorState=void 0;lastMovingDirection=void 0;constructor(){ei(()=>{let t=this.service().values?.CurrentDoorState;if(t!==this.lastDoorState){let o=this.lastDoorState===4;this.fromStopped.set(o&&(t===2||t===3)),(t===2||t===3)&&(this.lastMovingDirection=t),this.lastDoorState=t;}});}onClick(){if(this.readyForControl())if("TargetDoorState"in this.service().values){let t=this.service().values.CurrentDoorState;t===4?this.service().getCharacteristic("TargetDoorState").setValue(this.lastMovingDirection===3?0:1):t===1||t===3?this.service().getCharacteristic("TargetDoorState").setValue(0):this.service().getCharacteristic("TargetDoorState").setValue(1);}else "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);}onLongClick(){if(this.readyForControl()&&"TargetDoorState"in this.service().values){let t=ty([{provide:ce,useValue:{service:this.service(),$accessories:this.$accessories}}],this.injector);this.$modal.open(Eo,{size:"md",backdrop:"static",injector:t});}}hasCurrentConsumption(){return "Consumption"in this.service().values}currentConsumption(){if(this.hasCurrentConsumption())return this.service().values.Consumption}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-garage-door-opener"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:54,vars:48,consts:[["role","button","tabindex","0",1,"accessory-box",3,"longClick","shortClick","keydown.enter","keydown.space"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["cx","15.5","cy","10.25","r","3","fill","#1976d2","fill-opacity","0.5",1,"window"],["cx","15.5","cy","10.25","r","3","stroke","#7f7f7f","stroke-width","0.5","fill","none"],["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"],["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"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","red-text"],["aria-hidden","true",1,"accessory-label",3,"grey-text","red-text"],["aria-hidden","true",1,"accessory-label"],["aria-hidden","true",1,"accessory-label","grey-text"]],template:function(o,i){if(o&1){let c=nc$1();Mi(0)(1)(2)(3),f_(4,"translate"),f_(5,"translate"),f_(6,"translate"),f_(7,"translate"),f_(8,"translate"),f_(9,"translate"),f_(10,"translate"),Mi(11),f_(12,"translate"),Mi(13),f_(14,"translate"),Mi(15),f_(16,"lowercase"),f_(17,"lowercase"),La$1(18,"div",0),rc$1("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()})("keydown.enter",function(){return i.onClick()})("keydown.space",function(T){return Go$1(c),T.preventDefault(),Wo$1(i.onClick())}),La$1(19,"span",1),At$1(20),Rd$1(),La$1(21,"div",2)(22,"div",3),ah(),La$1(23,"svg",4),dy(24,"circle",5)(25,"circle",6)(26,"line",7)(27,"line",8)(28,"circle",9)(29,"line",10)(30,"line",11)(31,"line",12)(32,"line",13)(33,"line",14)(34,"line",15)(35,"line",16)(36,"line",17)(37,"line",18)(38,"line",19)(39,"line",20)(40,"line",21)(41,"line",22)(42,"line",23)(43,"line",24)(44,"line",25)(45,"line",26)(46,"line",27)(47,"line",28)(48,"line",29)(49,"line",30),Rd$1()(),ch(),La$1(50,"div",31),At$1(51),Rd$1(),Re$1(52,Ec,5,1)(53,Fc,2,1),Rd$1()();}if(o&2){let c=oc$1(i.service().values);ie$1();let f=oc$1(c?.CurrentDoorState),T="CurrentDoorState"in c;ie$1();let P=oc$1(!!c?.ObstructionDetected),O=T?f===0?h_(4,25,"accessories.control.open"):f===1?h_(5,27,"accessories.control.closed"):f===2?h_(6,29,"accessories.control.opening"):f===3?h_(7,31,"accessories.control.closing"):f===4?h_(8,33,"accessories.control.stopped"):"":c?.On||c?.Active?h_(9,35,"accessories.control.open"):h_(10,37,"accessories.control.closed"),R=P?`${O} (${h_(12,39,"accessories.control.obstructed")})`:O,se=(i.service().customName||i.service().serviceName||"").trim(),Se=h_(14,41,"accessories.core.garage_door_opener"),_e=!h_(16,43,se).includes(h_(17,45,Se)),Ke=`${se+(_e?`, ${Se}`:"")}, ${R}`;ie$1(16),Cy("accessory-on",c?.ObstructionDetected||s_(47,Cc).includes(f)||c?.On||c?.Active)("opening",f===2)("open",f===0)("closing",f===3)("closed",f===1)("stopped",f===4)("from-stopped",i.fromStopped())("obstructed",P)("cursor-pointer",i.readyForControl()),vr$1("aria-label",Ke),ie$1(2),Rt(" ",Ke," "),ie$1(31),Ny(i.service().customName||i.service().serviceName),ie$1(),Oe(T?52:53);}},dependencies:[ie,_S,K8],styles:[".opening[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .window[_ngcontent-%COMP%]{fill:#ff9800!important;fill-opacity:.5!important}.opening[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_fade-out .5s ease-in-out forwards}.opening[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line1[_ngcontent-%COMP%]{animation-delay:9.282s}.opening[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line2[_ngcontent-%COMP%]{animation-delay:8.568s}.opening[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line3[_ngcontent-%COMP%]{animation-delay:7.854s}.opening[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line4[_ngcontent-%COMP%]{animation-delay:7.14s}.opening[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line5[_ngcontent-%COMP%]{animation-delay:6.426s}.opening[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line6[_ngcontent-%COMP%]{animation-delay:5.712s}.opening[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line7[_ngcontent-%COMP%]{animation-delay:4.998s}.opening[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line8[_ngcontent-%COMP%]{animation-delay:4.284s}.opening[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line9[_ngcontent-%COMP%]{animation-delay:3.57s}.opening[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line10[_ngcontent-%COMP%]{animation-delay:2.856s}.opening[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line11[_ngcontent-%COMP%]{animation-delay:2.142s}.opening[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line12[_ngcontent-%COMP%]{animation-delay:1.428s}.opening[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line13[_ngcontent-%COMP%]{animation-delay:.714s}.opening[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line14[_ngcontent-%COMP%]{animation-delay:0s}@keyframes _ngcontent-%COMP%_fade-out{to{opacity:0}}.opening.from-stopped[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line7[_ngcontent-%COMP%], .opening.from-stopped[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line8[_ngcontent-%COMP%], .opening.from-stopped[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line9[_ngcontent-%COMP%], .opening.from-stopped[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line10[_ngcontent-%COMP%], .opening.from-stopped[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line11[_ngcontent-%COMP%], .opening.from-stopped[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line12[_ngcontent-%COMP%], .opening.from-stopped[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line13[_ngcontent-%COMP%], .opening.from-stopped[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line14[_ngcontent-%COMP%]{animation:none!important;opacity:0}.opening.from-stopped[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line6[_ngcontent-%COMP%]{animation-delay:0s!important}.opening.from-stopped[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line5[_ngcontent-%COMP%]{animation-delay:.714s!important}.opening.from-stopped[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line4[_ngcontent-%COMP%]{animation-delay:1.428s!important}.opening.from-stopped[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line3[_ngcontent-%COMP%]{animation-delay:2.142s!important}.opening.from-stopped[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line2[_ngcontent-%COMP%]{animation-delay:2.856s!important}.opening.from-stopped[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line1[_ngcontent-%COMP%]{animation-delay:3.57s!important}.closing.from-stopped[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line1[_ngcontent-%COMP%], .closing.from-stopped[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line2[_ngcontent-%COMP%], .closing.from-stopped[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line3[_ngcontent-%COMP%], .closing.from-stopped[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line4[_ngcontent-%COMP%], .closing.from-stopped[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line5[_ngcontent-%COMP%], .closing.from-stopped[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line6[_ngcontent-%COMP%]{animation:none!important;opacity:1}.closing.from-stopped[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line7[_ngcontent-%COMP%]{animation-delay:0s!important}.closing.from-stopped[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line8[_ngcontent-%COMP%]{animation-delay:.714s!important}.closing.from-stopped[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line9[_ngcontent-%COMP%]{animation-delay:1.428s!important}.closing.from-stopped[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line10[_ngcontent-%COMP%]{animation-delay:2.142s!important}.closing.from-stopped[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line11[_ngcontent-%COMP%]{animation-delay:2.856s!important}.closing.from-stopped[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line12[_ngcontent-%COMP%]{animation-delay:3.57s!important}.closing.from-stopped[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line13[_ngcontent-%COMP%]{animation-delay:4.284s!important}.closing.from-stopped[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line14[_ngcontent-%COMP%]{animation-delay:4.998s!important}.open[_ngcontent-%COMP%] .window[_ngcontent-%COMP%]{fill:#d32f2f!important;fill-opacity:.5!important}.open[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{opacity:0}.closing[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .window[_ngcontent-%COMP%]{fill:#ff9800!important;fill-opacity:.5!important}.closing[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{opacity:0;animation:_ngcontent-%COMP%_fade-in .5s ease-in-out forwards}.closing[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line1[_ngcontent-%COMP%]{animation-delay:0s}.closing[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line2[_ngcontent-%COMP%]{animation-delay:.714s}.closing[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line3[_ngcontent-%COMP%]{animation-delay:1.428s}.closing[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line4[_ngcontent-%COMP%]{animation-delay:2.142s}.closing[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line5[_ngcontent-%COMP%]{animation-delay:2.856s}.closing[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line6[_ngcontent-%COMP%]{animation-delay:3.57s}.closing[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line7[_ngcontent-%COMP%]{animation-delay:4.284s}.closing[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line8[_ngcontent-%COMP%]{animation-delay:4.998s}.closing[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line9[_ngcontent-%COMP%]{animation-delay:5.712s}.closing[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line10[_ngcontent-%COMP%]{animation-delay:6.426s}.closing[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line11[_ngcontent-%COMP%]{animation-delay:7.14s}.closing[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line12[_ngcontent-%COMP%]{animation-delay:7.854s}.closing[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line13[_ngcontent-%COMP%]{animation-delay:8.568s}.closing[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .line14[_ngcontent-%COMP%]{animation-delay:9.282s}@keyframes _ngcontent-%COMP%_fade-in{to{opacity:1}}.closed[_ngcontent-%COMP%] .window[_ngcontent-%COMP%]{fill:#4caf50!important;fill-opacity:.5!important}.closed[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{opacity:1}.stopped[_ngcontent-%COMP%] .window[_ngcontent-%COMP%]{fill:#d32f2f!important}.stopped[_ngcontent-%COMP%] .line7[_ngcontent-%COMP%], .stopped[_ngcontent-%COMP%] .line8[_ngcontent-%COMP%], .stopped[_ngcontent-%COMP%] .line9[_ngcontent-%COMP%], .stopped[_ngcontent-%COMP%] .line10[_ngcontent-%COMP%], .stopped[_ngcontent-%COMP%] .line11[_ngcontent-%COMP%], .stopped[_ngcontent-%COMP%] .line12[_ngcontent-%COMP%], .stopped[_ngcontent-%COMP%] .line13[_ngcontent-%COMP%], .stopped[_ngcontent-%COMP%] .line14[_ngcontent-%COMP%]{opacity:0}.obstructed[_ngcontent-%COMP%] .window[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_flash 2s infinite;fill:#d32f2f!important}@keyframes _ngcontent-%COMP%_flash{0%,to{opacity:1}50%{opacity:.2}}"]})}return e})();function Oc(e,r){if(e&1){let t=nc$1();La$1(0,"button",7),rc$1("click",function(i){Go$1(t);let c=ye$1(2);return Wo$1(c.setTargetMode(0,i))}),La$1(1,"div",8),dy(2,"i",9),Rd$1(),At$1(3),f_(4,"translate"),La$1(5,"div",10),dy(6,"i",11),Rd$1()();}if(e&2){let t=ye$1(2);ie$1(2),Cy("fa-check-circle",t.targetMode===0)("fa-blank",t.targetMode!==0),ie$1(),Rt(" ",h_(4,5,"accessories.control.auto")," ");}}function Ic(e,r){if(e&1){let t=nc$1();La$1(0,"button",7),rc$1("click",function(i){Go$1(t);let c=ye$1(2);return Wo$1(c.setTargetMode(1,i))}),La$1(1,"div",8),dy(2,"i",9),Rd$1(),At$1(3),f_(4,"translate"),La$1(5,"div",10),dy(6,"i",11),Rd$1()();}if(e&2){let t=ye$1(2);ie$1(2),Cy("fa-check-circle",t.targetMode===1)("fa-blank",t.targetMode!==1),ie$1(),Rt(" ",h_(4,5,"accessories.control.heat")," ");}}function Lc(e,r){if(e&1){let t=nc$1();La$1(0,"button",7),rc$1("click",function(i){Go$1(t);let c=ye$1(2);return Wo$1(c.setTargetMode(2,i))}),La$1(1,"div",8),dy(2,"i",9),Rd$1(),At$1(3),f_(4,"translate"),La$1(5,"div",10),dy(6,"i",11),Rd$1()();}if(e&2){let t=ye$1(2);ie$1(2),Cy("fa-check-circle",t.targetMode===2)("fa-blank",t.targetMode!==2),ie$1(),Rt(" ",h_(4,5,"accessories.control.cool")," ");}}function Vc(e,r){if(e&1&&(La$1(0,"h6",13),At$1(1),f_(2,"translate"),Rd$1(),La$1(3,"div",14),f_(4,"translate"),Re$1(5,Oc,7,7,"button",15),Re$1(6,Ic,7,7,"button",15),Re$1(7,Lc,7,7,"button",15),Rd$1()),e&2){let t=ye$1();ie$1(),Ny(h_(2,5,"accessories.control.mode")),ie$1(2),vr$1("aria-label",h_(4,7,"accessories.control.mode_control")),ie$1(2),Oe(t.targetStateValidValues.includes(0)?5:-1),ie$1(),Oe(t.targetStateValidValues.includes(1)?6:-1),ie$1(),Oe(t.targetStateValidValues.includes(2)?7:-1);}}function Nc(e,r){if(e&1){let t=nc$1();La$1(0,"h6",16),At$1(1),f_(2,"translate"),f_(3,"convertTemp"),f_(4,"number"),f_(5,"uppercase"),f_(6,"convertTemp"),f_(7,"number"),f_(8,"uppercase"),Rd$1(),La$1(9,"div",17)(10,"nouislider",18),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1(2);return t_(c.autoTemp,i)||(c.autoTemp=i),Wo$1(i)}),rc$1("ngModelChange",function(){Go$1(t);let i=ye$1(2);return Wo$1(i.onAutoTemperatureStateChange())}),Rd$1(),KC(),Rd$1();}if(e&2){let t=ye$1(2);ie$1(),Oy(" ",h_(2,9,"accessories.control.temperature_thresholds"),": ",g_(4,13,h_(3,11,t.autoTemp[0]),"1.0-1"),"\xB0",h_(5,16,t.temperatureUnits)," - ",g_(7,20,h_(6,18,t.autoTemp[1]),"1.0-1"),"\xB0",h_(8,23,t.temperatureUnits)," "),ie$1(9),ly("min",t.HeatingThresholdTemperature.minValue)("max",t.CoolingThresholdTemperature.maxValue)("step",t.CoolingThresholdTemperature.minStep),ky("ngModel",t.autoTemp),JC();}}function Hc(e,r){if(e&1){let t=nc$1();La$1(0,"h6",13),At$1(1),f_(2,"translate"),f_(3,"convertTemp"),f_(4,"number"),f_(5,"uppercase"),Rd$1(),La$1(6,"div",17)(7,"nouislider",18),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1(2);return t_(c.targetHeatingTemp,i)||(c.targetHeatingTemp=i),Wo$1(i)}),rc$1("ngModelChange",function(){Go$1(t);let i=ye$1(2);return Wo$1(i.onTemperatureStateChange())}),Rd$1(),KC(),Rd$1();}if(e&2){let t=ye$1(2);ie$1(),Ay(" ",h_(2,7,"accessories.control.heating_threshold"),": ",g_(4,11,h_(3,9,t.targetHeatingTemp),"1.0-1"),"\xB0",h_(5,14,t.temperatureUnits)," "),ie$1(6),ly("min",t.HeatingThresholdTemperature.minValue)("max",t.HeatingThresholdTemperature.maxValue)("step",t.HeatingThresholdTemperature.minStep),ky("ngModel",t.targetHeatingTemp),JC();}}function Rc(e,r){if(e&1){let t=nc$1();La$1(0,"h6",13),At$1(1),f_(2,"translate"),f_(3,"convertTemp"),f_(4,"number"),f_(5,"uppercase"),Rd$1(),La$1(6,"div",17)(7,"nouislider",18),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1(2);return t_(c.targetCoolingTemp,i)||(c.targetCoolingTemp=i),Wo$1(i)}),rc$1("ngModelChange",function(){Go$1(t);let i=ye$1(2);return Wo$1(i.onTemperatureStateChange())}),Rd$1(),KC(),Rd$1();}if(e&2){let t=ye$1(2);ie$1(),Ay(" ",h_(2,7,"accessories.control.cooling_threshold"),": ",g_(4,11,h_(3,9,t.targetCoolingTemp),"1.0-1"),"\xB0",h_(5,14,t.temperatureUnits)," "),ie$1(6),ly("min",t.CoolingThresholdTemperature.minValue)("max",t.CoolingThresholdTemperature.maxValue)("step",t.CoolingThresholdTemperature.minStep),ky("ngModel",t.targetCoolingTemp),JC();}}function $c(e,r){if(e&1&&Re$1(0,Nc,11,25)(1,Hc,8,16)(2,Rc,8,16),e&2){let t=ye$1();Oe(t.targetMode===0&&t.HeatingThresholdTemperature&&t.CoolingThresholdTemperature?0:t.HeatingThresholdTemperature&&(t.targetMode===1||t.targetMode===0&&!t.CoolingThresholdTemperature)?1:t.CoolingThresholdTemperature&&(t.targetMode===2||t.targetMode===0&&!t.HeatingThresholdTemperature)?2:-1);}}function Uc(e,r){e&1&&At$1(0," % ");}function Wc(e,r){if(e&1){let t=nc$1();La$1(0,"h6",13),At$1(1),f_(2,"translate"),Re$1(3,Uc,1,0),Rd$1(),La$1(4,"div",19)(5,"nouislider",18),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1();return t_(c.targetRotationSpeed.value,i)||(c.targetRotationSpeed.value=i),Wo$1(i)}),rc$1("ngModelChange",function(){Go$1(t);let i=ye$1();return Wo$1(i.onTargetRotationSpeedChange())}),Rd$1(),KC(),Rd$1();}if(e&2){let t=ye$1();ie$1(),xy(" ",h_(2,7,"accessories.control.rotation_speed"),": ",t.targetRotationSpeed.value," "),ie$1(2),Oe(t.targetRotationSpeed.unit==="percentage"?3:-1),ie$1(2),ly("min",t.targetRotationSpeed.min)("max",t.targetRotationSpeed.max)("step",t.targetRotationSpeed.step),ky("ngModel",t.targetRotationSpeed.value),JC();}}var Ao=(()=>{class e extends me{$settings=g(zt$1);type;temperatureUnits=this.$settings.env.temperatureUnits;targetState;targetMode;targetTemperatureChanged=new $$1;targetStateValidValues=[];CoolingThresholdTemperature;HeatingThresholdTemperature;targetCoolingTemp;targetHeatingTemp;autoTemp;serviceFan;targetRotationSpeed;targetRotationSpeedChanged=new $$1;setupComponent(){this.createDebouncedSubscription(this.targetTemperatureChanged,()=>{this.HeatingThresholdTemperature&&this.service.getCharacteristic("HeatingThresholdTemperature").setValue(this.targetHeatingTemp),this.CoolingThresholdTemperature&&this.service.getCharacteristic("CoolingThresholdTemperature").setValue(this.targetCoolingTemp);}),this.createDebouncedSubscription(this.targetRotationSpeedChanged,()=>{this.serviceFan&&this.serviceFan.getCharacteristic("RotationSpeed").setValue(this.targetRotationSpeed.value);}),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.targetStateValidValues.includes(1)&&!this.targetStateValidValues.includes(2)?this.type="heater":this.targetStateValidValues.includes(2)&&!this.targetStateValidValues.includes(1)&&(this.type="cooler"),this.loadTargetTemperature(),this.service.linkedServices&&(this.serviceFan=Object.values(this.service.linkedServices).find(t=>t.type==="Fan"||t.type==="Fanv2")),this.serviceFan&&this.loadRotationSpeed(),this.applyAllGradients();}handleAccessoryUpdate(){this.targetState=this.service.values.Active,this.targetMode=this.service.values.TargetHeaterCoolerState,this.targetCoolingTemp=this.service.getCharacteristic("CoolingThresholdTemperature")?.value,this.targetHeatingTemp=this.service.getCharacteristic("HeatingThresholdTemperature")?.value,this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp],this.targetRotationSpeed&&this.serviceFan&&(this.targetRotationSpeed.value=this.serviceFan.getCharacteristic("RotationSpeed")?.value),this.applyAllGradients();}getStatusClass(){let t=this.service.values,o=t?.Active||t?.On,i=t?.CurrentHeaterCoolerState===3&&t?.Active===1||this.type==="cooler"&&o,c=t?.CurrentHeaterCoolerState===2&&t?.Active===1||this.type==="heater"&&o;return i?"status-color-cooling":c?"status-color-heating":o?"status-color-active":"status-color-inactive"}setTargetState(t,o){this.targetState=t,this.service.getCharacteristic("Active").setValue(this.targetState),this.loadTargetTemperature(),this.applyAllGradients(),this.blurTarget(o);}setTargetMode(t,o){this.targetMode=t,this.service.getCharacteristic("TargetHeaterCoolerState").setValue(this.targetMode),this.loadTargetTemperature(),this.blurTarget(o),this.applyAllGradients();}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);}onTargetRotationSpeedChange(){this.targetRotationSpeedChanged.next(this.targetRotationSpeed.value);}loadRotationSpeed(){let t=this.serviceFan.getCharacteristic("RotationSpeed");t&&(this.targetRotationSpeed={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep,unit:t.unit});}loadTargetTemperature(){this.targetCoolingTemp=this.service.getCharacteristic("CoolingThresholdTemperature")?.value,this.targetHeatingTemp=this.service.getCharacteristic("HeatingThresholdTemperature")?.value,this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp];}getFanSliderGradient(){if(!this.targetState)return "linear-gradient(to right, #c0c0c0, #7b7b7b)";switch(this.targetMode){case 2:return "linear-gradient(to right, #add8e6, #416bdf)";case 1:return "linear-gradient(to right, #ffb978, #e05a33)";default:return "linear-gradient(to right, #90ee90, #2d8659)"}}applyAllGradients(){this.applySliderGradient("linear-gradient(to right, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))",".temp-slider .noUi-target"),this.serviceFan&&this.applySliderGradient(this.getFanSliderGradient(),".fan-slider .noUi-target");}static \u0275fac=(()=>{let t;return function(i){return (t||(t=_n(e)))(i||e)}})();static \u0275cmp=Ja$1({type:e,selectors:[["app-heater-cooler-manage"]],features:[Xa$1],decls:32,vars:35,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"],["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"],[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"],[1,"temp-slider"],[3,"ngModelChange","min","max","step","ngModel"],[1,"fan-slider"]],template:function(o,i){o&1&&(La$1(0,"div",0)(1,"div",1),dy(2,"h5",2),La$1(3,"button",3),f_(4,"translate"),rc$1("click",function(){return i.dismissModal()}),Rd$1()(),La$1(5,"div",4)(6,"h6",5),dy(7,"i"),At$1(8),f_(9,"convertTemp"),f_(10,"number"),f_(11,"uppercase"),Rd$1(),La$1(12,"div",6),f_(13,"translate"),La$1(14,"button",7),rc$1("click",function(f){return i.setTargetState(0,f)}),La$1(15,"div",8),dy(16,"i",9),Rd$1(),At$1(17),f_(18,"translate"),La$1(19,"div",10),dy(20,"i",11),Rd$1()(),La$1(21,"button",7),rc$1("click",function(f){return i.setTargetState(1,f)}),La$1(22,"div",8),dy(23,"i",9),Rd$1(),At$1(24),f_(25,"translate"),La$1(26,"div",10),dy(27,"i",11),Rd$1()()(),Re$1(28,Vc,8,9),Re$1(29,$c,3,1),Re$1(30,Wc,6,9),Rd$1(),dy(31,"div",12),Rd$1()),o&2&&(ie$1(2),ly("innerText",i.service.customName||i.service.serviceName),ie$1(),vr$1("aria-label",h_(4,20,"form.button_close")),ie$1(4),Qt(`fas fa-temperature-full ${i.getStatusClass()}`),ie$1(),xy("",g_(10,24,h_(9,22,i.service.values?.CurrentTemperature),"1.0-1"),"\xB0",h_(11,27,i.temperatureUnits)," "),ie$1(4),vr$1("aria-label",h_(13,29,"accessories.control.state_control")),ie$1(4),Cy("fa-check-circle",i.targetState===0)("fa-blank",i.targetState!==0),ie$1(),Rt(" ",h_(18,31,"accessories.control.off")," "),ie$1(6),Cy("fa-check-circle",i.targetState===1)("fa-blank",i.targetState!==1),ie$1(),Rt(" ",h_(25,33,"accessories.control.on")," "),ie$1(4),Oe(i.targetStateValidValues.length?28:-1),ie$1(),Oe(i.targetStateValidValues.includes(0)?29:-1),ie$1(),Oe(i.targetRotationSpeed?30:-1));},dependencies:[Kn,Hn,ln,ye,kS,K8,Re,NS],encapsulation:2})}return e})();function jc(e,r){if(e&1&&(ah(),La$1(0,"text",23),At$1(1),f_(2,"convertTemp"),f_(3,"number"),f_(4,"uppercase"),Rd$1()),e&2){let t=ye$1();ie$1(),xy(" ",g_(3,4,h_(2,2,t.service().values?.CurrentTemperature),"1.0-1"),"\xB0",h_(4,7,t.temperatureUnits)," ");}}function Gc(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.off")," ");}function qc(e,r){if(e&1&&(dy(0,"i",26),At$1(1),f_(2,"convertTemp"),f_(3,"number"),f_(4,"uppercase"),f_(5,"convertTemp"),f_(6,"number"),f_(7,"uppercase")),e&2){let t=ye$1(2);ie$1(),Ry(" ",g_(3,6,h_(2,4,t.service().values?.HeatingThresholdTemperature),"1.0-1"),"\xB0",h_(4,9,t.temperatureUnits)," - ",g_(6,13,h_(5,11,t.service().values?.CoolingThresholdTemperature),"1.0-1"),"\xB0",h_(7,16,t.temperatureUnits)," ");}}function zc(e,r){if(e&1&&(dy(0,"i",26),At$1(1),f_(2,"convertTemp"),f_(3,"number"),f_(4,"uppercase")),e&2){let t=ye$1(2);ie$1(),xy(" ",g_(3,4,h_(2,2,t.service().values?.HeatingThresholdTemperature),"1.0-1"),"\xB0",h_(4,7,t.temperatureUnits)," ");}}function Kc(e,r){if(e&1&&(dy(0,"i",26),At$1(1),f_(2,"convertTemp"),f_(3,"number"),f_(4,"uppercase")),e&2){let t=ye$1(2);ie$1(),xy(" ",g_(3,4,h_(2,2,t.service().values?.CoolingThresholdTemperature),"1.0-1"),"\xB0",h_(4,7,t.temperatureUnits)," ");}}function Yc(e,r){if(e&1&&Re$1(0,qc,8,18)(1,zc,5,9)(2,Kc,5,9),e&2){let t=ye$1();Oe(t.hasHeating()&&t.hasCooling()?0:t.hasHeating()&&!t.hasCooling()?1:!t.hasHeating()&&t.hasCooling()?2:-1);}}function Qc(e,r){if(e&1&&(dy(0,"i",26),At$1(1),f_(2,"convertTemp"),f_(3,"number"),f_(4,"uppercase")),e&2){let t=ye$1();ie$1(),xy(" ",g_(3,4,h_(2,2,t.service().values?.HeatingThresholdTemperature),"1.0-1"),"\xB0",h_(4,7,t.temperatureUnits)," ");}}function Zc(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.heat")," ");}function Jc(e,r){if(e&1&&(dy(0,"i",26),At$1(1),f_(2,"convertTemp"),f_(3,"number"),f_(4,"uppercase")),e&2){let t=ye$1();ie$1(),xy(" ",g_(3,4,h_(2,2,t.service().values?.CoolingThresholdTemperature),"1.0-1"),"\xB0",h_(4,7,t.temperatureUnits)," ");}}function Xc(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.cool")," ");}function ed(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.on")," ");}function td(e,r){if(e&1&&At$1(0),e&2){let t=ye$1();Rt(" \xB7 ",t.currentConsumption(),"W ");}}var Po=(()=>{class e{$modal=g(si);injector=g(we);$settings=g(zt$1);$accessories=g(le);service=PH.required();readyForControl=PH(false);type=PH();temperatureUnits=this.$settings.env.temperatureUnits;hasHeating=W(false);hasCooling=W(false);ngOnInit(){this.hasHeating.set("HeatingThresholdTemperature"in this.service().values),this.hasCooling.set("CoolingThresholdTemperature"in this.service().values);}getStatusFill(){let t=this.service().values,o=t?.Active||t?.On,i=t?.CurrentHeaterCoolerState===3&&t?.Active===1||this.type()==="cooler"&&o,c=t?.CurrentHeaterCoolerState===2&&t?.Active===1||this.type()==="heater"&&o;return i?"url(#coolingGradient)":c?"url(#heatingGradient)":o?"#42d672":"#7b7b7b"}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=ty([{provide:ce,useValue:{service:this.service(),$accessories:this.$accessories}}],this.injector);this.$modal.open(Ao,{size:"md",backdrop:"static",injector:t});}}hasCurrentConsumption(){return "Consumption"in this.service().values}currentConsumption(){if(this.hasCurrentConsumption())return this.service().values.Consumption}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-heater-cooler"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"],type:[1,"type"]},decls:39,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[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(o,i){o&1&&(La$1(0,"div",0),rc$1("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),La$1(1,"div",1)(2,"div",2),f_(3,"translate"),ah(),La$1(4,"svg",3)(5,"defs")(6,"linearGradient",4)(7,"stop",5),dy(8,"animate",6),Rd$1(),La$1(9,"stop",7),dy(10,"animate",8),Rd$1(),La$1(11,"stop",9),dy(12,"animate",6),Rd$1()(),La$1(13,"linearGradient",10)(14,"stop",11),dy(15,"animate",12),Rd$1(),La$1(16,"stop",13),dy(17,"animate",14),Rd$1(),La$1(18,"stop",15),dy(19,"animate",12),Rd$1()()(),dy(20,"rect",16)(21,"line",17)(22,"line",18)(23,"line",19)(24,"line",20)(25,"line",21)(26,"rect",22),Re$1(27,jc,5,9,":svg:text",23),Rd$1()(),ch(),La$1(28,"div",24),At$1(29),Rd$1(),La$1(30,"div",25),Re$1(31,Gc,2,3)(32,Yc,3,1)(33,Qc,5,9)(34,Zc,2,3)(35,Jc,5,9)(36,Xc,2,3)(37,ed,2,3),Re$1(38,td,1,1),Rd$1()()()),o&2&&(Cy("accessory-on",i.service().values.Active||i.service().values.On)("cursor-pointer",i.readyForControl()),ie$1(2),vr$1("aria-label",h_(3,10,"accessories.core.heater_cooler")),ie$1(24),vr$1("fill",i.getStatusFill()),ie$1(),Oe("CurrentTemperature"in i.service().values?27:-1),ie$1(2),Ny(i.service().customName||i.service().serviceName),ie$1(2),Oe("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&&i.hasHeating()?33:i.service().values?.TargetHeaterCoolerState===1?34:i.service().values?.TargetHeaterCoolerState===2&&i.hasCooling()?35:i.service().values?.TargetHeaterCoolerState===2?36:37),ie$1(7),Oe((i.service().values?.Active||i.service().values?.On)&&i.hasCurrentConsumption()?38:-1));},dependencies:[ie,kS,K8,Re,NS],encapsulation:2})}return e})();function id(e,r){if(e&1){let t=nc$1();La$1(0,"button",7),rc$1("click",function(i){Go$1(t);let c=ye$1(2);return Wo$1(c.setTargetMode(0,i))}),La$1(1,"div",8),dy(2,"i",9),Rd$1(),At$1(3),f_(4,"translate"),La$1(5,"div",10),dy(6,"i",11),Rd$1()();}if(e&2){let t=ye$1(2);ie$1(2),Cy("fa-check-circle",t.targetMode===0)("fa-blank",t.targetMode!==0),ie$1(),Rt(" ",h_(4,5,"accessories.control.auto")," ");}}function nd(e,r){if(e&1){let t=nc$1();La$1(0,"button",7),rc$1("click",function(i){Go$1(t);let c=ye$1(2);return Wo$1(c.setTargetMode(1,i))}),La$1(1,"div",8),dy(2,"i",9),Rd$1(),At$1(3),f_(4,"translate"),La$1(5,"div",10),dy(6,"i",11),Rd$1()();}if(e&2){let t=ye$1(2);ie$1(2),Cy("fa-check-circle",t.targetMode===1)("fa-blank",t.targetMode!==1),ie$1(),Rt(" ",h_(4,5,"accessories.control.humidify")," ");}}function od(e,r){if(e&1){let t=nc$1();La$1(0,"button",7),rc$1("click",function(i){Go$1(t);let c=ye$1(2);return Wo$1(c.setTargetMode(2,i))}),La$1(1,"div",8),dy(2,"i",9),Rd$1(),At$1(3),f_(4,"translate"),La$1(5,"div",10),dy(6,"i",11),Rd$1()();}if(e&2){let t=ye$1(2);ie$1(2),Cy("fa-check-circle",t.targetMode===2)("fa-blank",t.targetMode!==2),ie$1(),Rt(" ",h_(4,5,"accessories.control.dehumidify")," ");}}function rd(e,r){if(e&1&&(La$1(0,"h6",13),At$1(1),f_(2,"translate"),Rd$1(),La$1(3,"div",14),f_(4,"translate"),Re$1(5,id,7,7,"button",15),Re$1(6,nd,7,7,"button",15),Re$1(7,od,7,7,"button",15),Rd$1()),e&2){let t=ye$1();ie$1(),Ny(h_(2,5,"accessories.control.mode")),ie$1(2),vr$1("aria-label",h_(4,7,"accessories.control.mode_control")),ie$1(2),Oe(t.targetStateValidValues.includes(0)?5:-1),ie$1(),Oe(t.targetStateValidValues.includes(1)?6:-1),ie$1(),Oe(t.targetStateValidValues.includes(2)?7:-1);}}function ad(e,r){if(e&1){let t=nc$1();La$1(0,"h6",13),At$1(1),f_(2,"translate"),Rd$1(),La$1(3,"div",16)(4,"nouislider",17),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1(2);return t_(c.autoHumidity,i)||(c.autoHumidity=i),Wo$1(i)}),rc$1("ngModelChange",function(){Go$1(t);let i=ye$1(2);return Wo$1(i.onAutoHumidityStateChange())}),Rd$1(),KC(),Rd$1();}if(e&2){let t=ye$1(2);ie$1(),Ay(" ",h_(2,7,"accessories.control.humidity_thresholds"),": ",t.autoHumidity[0],"% - ",t.autoHumidity[1],"% "),ie$1(3),ly("min",t.RelativeHumidityHumidifierThreshold.minValue)("max",t.RelativeHumidityDehumidifierThreshold.maxValue)("step",t.RelativeHumidityDehumidifierThreshold.minStep),ky("ngModel",t.autoHumidity),JC();}}function sd(e,r){if(e&1){let t=nc$1();La$1(0,"h6",13),At$1(1),f_(2,"translate"),Rd$1(),La$1(3,"div",16)(4,"nouislider",17),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1(2);return t_(c.targetHumidifierHumidity,i)||(c.targetHumidifierHumidity=i),Wo$1(i)}),rc$1("ngModelChange",function(){Go$1(t);let i=ye$1(2);return Wo$1(i.onHumidityStateChange())}),Rd$1(),KC(),Rd$1();}if(e&2){let t=ye$1(2);ie$1(),xy(" ",h_(2,6,"accessories.control.humidifier_threshold"),": ",t.targetHumidifierHumidity,"% "),ie$1(3),ly("min",t.RelativeHumidityHumidifierThreshold.minValue)("max",t.RelativeHumidityHumidifierThreshold.maxValue)("step",t.RelativeHumidityHumidifierThreshold.minStep),ky("ngModel",t.targetHumidifierHumidity),JC();}}function ld(e,r){if(e&1){let t=nc$1();La$1(0,"h6",13),At$1(1),f_(2,"translate"),Rd$1(),La$1(3,"div",16)(4,"nouislider",17),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1(2);return t_(c.targetDehumidifierHumidity,i)||(c.targetDehumidifierHumidity=i),Wo$1(i)}),rc$1("ngModelChange",function(){Go$1(t);let i=ye$1(2);return Wo$1(i.onHumidityStateChange())}),Rd$1(),KC(),Rd$1();}if(e&2){let t=ye$1(2);ie$1(),xy(" ",h_(2,6,"accessories.control.dehumidifier_threshold"),": ",t.targetDehumidifierHumidity,"% "),ie$1(3),ly("min",t.RelativeHumidityDehumidifierThreshold.minValue)("max",t.RelativeHumidityDehumidifierThreshold.maxValue)("step",t.RelativeHumidityDehumidifierThreshold.minStep),ky("ngModel",t.targetDehumidifierHumidity),JC();}}function cd(e,r){if(e&1&&Re$1(0,ad,5,9)(1,sd,5,8)(2,ld,5,8),e&2){let t=ye$1();Oe(t.targetMode===0&&t.RelativeHumidityHumidifierThreshold&&t.RelativeHumidityDehumidifierThreshold?0:t.RelativeHumidityHumidifierThreshold&&(t.targetMode===1||t.targetMode===0&&!t.RelativeHumidityDehumidifierThreshold)?1:t.RelativeHumidityDehumidifierThreshold&&(t.targetMode===2||t.targetMode===0&&!t.RelativeHumidityHumidifierThreshold)?2:-1);}}function dd(e,r){e&1&&At$1(0," % ");}function pd(e,r){if(e&1){let t=nc$1();La$1(0,"h6",13),At$1(1),f_(2,"translate"),Re$1(3,dd,1,0),Rd$1(),La$1(4,"div",18)(5,"nouislider",17),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1();return t_(c.targetRotationSpeed.value,i)||(c.targetRotationSpeed.value=i),Wo$1(i)}),rc$1("ngModelChange",function(){Go$1(t);let i=ye$1();return Wo$1(i.onTargetRotationSpeedChange())}),Rd$1(),KC(),Rd$1();}if(e&2){let t=ye$1();ie$1(),xy(" ",h_(2,7,"accessories.control.rotation_speed"),": ",t.targetRotationSpeed.value," "),ie$1(2),Oe(t.targetRotationSpeed.unit==="percentage"?3:-1),ie$1(2),ly("min",t.targetRotationSpeed.min)("max",t.targetRotationSpeed.max)("step",t.targetRotationSpeed.step),ky("ngModel",t.targetRotationSpeed.value),JC();}}var Fo=(()=>{class e extends me{type;targetState;targetMode;targetHumidityChanged=new $$1;targetStateValidValues=[];RelativeHumidityDehumidifierThreshold;RelativeHumidityHumidifierThreshold;targetDehumidifierHumidity;targetHumidifierHumidity;autoHumidity;serviceFan;targetRotationSpeed;targetRotationSpeedChanged=new $$1;setupComponent(){this.createDebouncedSubscription(this.targetHumidityChanged,()=>{this.RelativeHumidityHumidifierThreshold&&this.service.getCharacteristic("RelativeHumidityHumidifierThreshold").setValue(this.targetHumidifierHumidity),this.RelativeHumidityDehumidifierThreshold&&this.service.getCharacteristic("RelativeHumidityDehumidifierThreshold").setValue(this.targetDehumidifierHumidity);}),this.createDebouncedSubscription(this.targetRotationSpeedChanged,()=>{this.serviceFan&&this.serviceFan.getCharacteristic("RotationSpeed").setValue(this.targetRotationSpeed.value);}),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.targetStateValidValues.includes(1)&&!this.targetStateValidValues.includes(2)?this.type="humidifier":this.targetStateValidValues.includes(2)&&!this.targetStateValidValues.includes(1)&&(this.type="dehumidifier"),this.loadTargetHumidity(),this.service.linkedServices&&(this.serviceFan=Object.values(this.service.linkedServices).find(t=>t.type==="Fan"||t.type==="Fanv2")),this.serviceFan&&this.loadRotationSpeed(),this.applyAllGradients();}handleAccessoryUpdate(){this.targetState=this.service.values.Active,this.targetMode=this.service.values.TargetHumidifierDehumidifierState,this.targetDehumidifierHumidity=this.service.getCharacteristic("RelativeHumidityDehumidifierThreshold")?.value,this.targetHumidifierHumidity=this.service.getCharacteristic("RelativeHumidityHumidifierThreshold")?.value,this.autoHumidity=[this.targetHumidifierHumidity,this.targetDehumidifierHumidity],this.targetRotationSpeed&&this.serviceFan&&(this.targetRotationSpeed.value=this.serviceFan.getCharacteristic("RotationSpeed")?.value),this.applyAllGradients();}getStatusClass(){let t=this.service.values,o=t?.Active||t?.On,i=t?.CurrentHumidifierDehumidifierState===2&&t?.Active===1||this.type==="humidifier"&&o,c=t?.CurrentHumidifierDehumidifierState===3&&t?.Active===1||this.type==="dehumidifier"&&o;return i?"status-color-cooling":c?"status-color-heating":o?"status-color-active":"status-color-inactive"}loadTargetHumidity(){this.targetDehumidifierHumidity=this.service.getCharacteristic("RelativeHumidityDehumidifierThreshold")?.value,this.targetHumidifierHumidity=this.service.getCharacteristic("RelativeHumidityHumidifierThreshold")?.value,this.autoHumidity=[this.targetHumidifierHumidity,this.targetDehumidifierHumidity];}setTargetState(t,o){this.targetState=t,this.service.getCharacteristic("Active").setValue(this.targetState),this.loadTargetHumidity(),this.applyAllGradients(),this.blurTarget(o);}setTargetMode(t,o){this.targetMode=t,this.service.getCharacteristic("TargetHumidifierDehumidifierState").setValue(this.targetMode),this.loadTargetHumidity(),this.blurTarget(o),this.applyAllGradients();}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);}onTargetRotationSpeedChange(){this.targetRotationSpeedChanged.next(this.targetRotationSpeed.value);}loadRotationSpeed(){let t=this.serviceFan.getCharacteristic("RotationSpeed");t&&(this.targetRotationSpeed={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep,unit:t.unit});}getFanSliderGradient(){if(!this.targetState)return "linear-gradient(to right, #c0c0c0, #7b7b7b)";switch(this.targetMode){case 1:return "linear-gradient(to right, #add8e6, #416bdf)";case 2:return "linear-gradient(to right, #ffb978, #e05a33)";default:return "linear-gradient(to right, #90ee90, #2d8659)"}}applyAllGradients(){this.applySliderGradient("linear-gradient(to left, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))",".humidity-slider .noUi-target"),this.serviceFan&&this.applySliderGradient(this.getFanSliderGradient(),".fan-slider .noUi-target");}static \u0275fac=(()=>{let t;return function(i){return (t||(t=_n(e)))(i||e)}})();static \u0275cmp=Ja$1({type:e,selectors:[["app-humidifier-dehumidifier-manage"]],features:[Xa$1],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"],[1,"mt-2","mb-4","fs-4"],["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"],[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,"humidity-slider"],[3,"ngModelChange","min","max","step","ngModel"],[1,"fan-slider"]],template:function(o,i){o&1&&(La$1(0,"div",0)(1,"div",1),dy(2,"h5",2),La$1(3,"button",3),f_(4,"translate"),rc$1("click",function(){return i.dismissModal()}),Rd$1()(),La$1(5,"div",4)(6,"h6",5),dy(7,"i"),At$1(8),Rd$1(),La$1(9,"div",6),f_(10,"translate"),La$1(11,"button",7),rc$1("click",function(f){return i.setTargetState(0,f)}),La$1(12,"div",8),dy(13,"i",9),Rd$1(),At$1(14),f_(15,"translate"),La$1(16,"div",10),dy(17,"i",11),Rd$1()(),La$1(18,"button",7),rc$1("click",function(f){return i.setTargetState(1,f)}),La$1(19,"div",8),dy(20,"i",9),Rd$1(),At$1(21),f_(22,"translate"),La$1(23,"div",10),dy(24,"i",11),Rd$1()()(),Re$1(25,rd,8,9),Re$1(26,cd,3,1),Re$1(27,pd,6,9),Rd$1(),dy(28,"div",12),Rd$1()),o&2&&(ie$1(2),ly("innerText",i.service.customName||i.service.serviceName),ie$1(),vr$1("aria-label",h_(4,19,"form.button_close")),ie$1(4),Qt(`fas fa-temperature-full ${i.getStatusClass()}`),ie$1(),Rt("",i.service.values?.CurrentRelativeHumidity,"% "),ie$1(),vr$1("aria-label",h_(10,21,"accessories.control.state_control")),ie$1(4),Cy("fa-check-circle",i.targetState===0)("fa-blank",i.targetState!==0),ie$1(),Rt(" ",h_(15,23,"accessories.control.off")," "),ie$1(6),Cy("fa-check-circle",i.targetState===1)("fa-blank",i.targetState!==1),ie$1(),Rt(" ",h_(22,25,"accessories.control.on")," "),ie$1(4),Oe(i.targetStateValidValues.length?25:-1),ie$1(),Oe(i.targetStateValidValues.includes(0)?26:-1),ie$1(),Oe(i.targetRotationSpeed?27:-1));},dependencies:[Kn,Hn,ln,ye,K8],encapsulation:2})}return e})();function md(e,r){if(e&1&&(ah(),La$1(0,"text",36),At$1(1),Rd$1()),e&2){let t=ye$1();ie$1(),Rt(" ",t.service().values?.CurrentRelativeHumidity,"% ");}}function ud(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.off")," ");}function fd(e,r){if(e&1&&(dy(0,"i",39),At$1(1)),e&2){let t=ye$1(2);ie$1(),xy(" ",t.service().values?.RelativeHumidityHumidifierThreshold,"% - ",t.service().values?.RelativeHumidityDehumidifierThreshold,"% ");}}function gd(e,r){if(e&1&&(dy(0,"i",39),At$1(1)),e&2){let t=ye$1(2);ie$1(),Rt(" ",t.service().values?.RelativeHumidityHumidifierThreshold,"% ");}}function vd(e,r){if(e&1&&(dy(0,"i",39),At$1(1)),e&2){let t=ye$1(2);ie$1(),Rt(" ",t.service().values?.RelativeHumidityDehumidifierThreshold,"% ");}}function hd(e,r){if(e&1&&Re$1(0,fd,2,2)(1,gd,2,1)(2,vd,2,1),e&2){let t=ye$1();Oe(t.hasHumidifier&&t.hasDehumidifier?0:t.hasHumidifier&&!t.hasDehumidifier?1:!t.hasHumidifier&&t.hasDehumidifier?2:-1);}}function Cd(e,r){if(e&1&&(dy(0,"i",39),At$1(1)),e&2){let t=ye$1();ie$1(),Rt(" ",t.service().values?.RelativeHumidityHumidifierThreshold,"% ");}}function _d(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.humidify")," ");}function yd(e,r){if(e&1&&(dy(0,"i",39),At$1(1)),e&2){let t=ye$1();ie$1(),Rt(" ",t.service().values?.RelativeHumidityDehumidifierThreshold,"% ");}}function xd(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.dehumidify")," ");}function Sd(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.on")," ");}function kd(e,r){if(e&1&&At$1(0),e&2){let t=ye$1();Rt(" \xB7 ",t.currentConsumption(),"W ");}}var Oo=(()=>{class e{$accessories=g(le);injector=g(we);$modal=g(si);service=PH.required();readyForControl=PH(false);type=PH();hasHumidifier=false;hasDehumidifier=false;ngOnInit(){this.hasHumidifier="RelativeHumidityHumidifierThreshold"in this.service().values,this.hasDehumidifier="RelativeHumidityDehumidifierThreshold"in this.service().values;}getStatusFill(){let t=this.service().values,o=t?.Active||t?.On,i=t?.CurrentHumidifierDehumidifierState===2&&t?.Active===1||this.type()==="humidifier"&&o,c=t?.CurrentHumidifierDehumidifierState===3&&t?.Active===1||this.type()==="dehumidifier"&&o;return i?"url(#humidifyingGradient)":c?"url(#dehumidifyingGradient)":o?"#42d672":"#7b7b7b"}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=ty([{provide:ce,useValue:{service:this.service(),$accessories:this.$accessories}}],this.injector);this.$modal.open(Fo,{size:"md",backdrop:"static",injector:t});}}hasCurrentConsumption(){return "Consumption"in this.service().values}currentConsumption(){if(this.hasCurrentConsumption())return this.service().values.Consumption}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-humidifier-dehumidifier"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"],type:[1,"type"]},decls:52,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[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(o,i){o&1&&(La$1(0,"div",0),rc$1("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),La$1(1,"div",1)(2,"div",2),f_(3,"translate"),ah(),La$1(4,"svg",3)(5,"defs")(6,"linearGradient",4)(7,"stop",5),dy(8,"animate",6),Rd$1(),La$1(9,"stop",7),dy(10,"animate",8),Rd$1(),La$1(11,"stop",9),dy(12,"animate",6),Rd$1()(),La$1(13,"linearGradient",10)(14,"stop",11),dy(15,"animate",12),Rd$1(),La$1(16,"stop",13),dy(17,"animate",14),Rd$1(),La$1(18,"stop",15),dy(19,"animate",12),Rd$1()()(),dy(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),Re$1(40,md,2,1,":svg:text",36),Rd$1()(),ch(),La$1(41,"div",37),At$1(42),Rd$1(),La$1(43,"div",38),Re$1(44,ud,2,3)(45,hd,3,1)(46,Cd,2,1)(47,_d,2,3)(48,yd,2,1)(49,xd,2,3)(50,Sd,2,3),Re$1(51,kd,1,1),Rd$1()()()),o&2&&(Cy("accessory-on",i.service().values.Active||i.service().values.On)("cursor-pointer",i.readyForControl()),ie$1(2),vr$1("aria-label",h_(3,10,"accessories.core.humidifier_dehumidifier")),ie$1(37),vr$1("fill",i.getStatusFill()),ie$1(),Oe("CurrentRelativeHumidity"in i.service().values?40:-1),ie$1(2),Ny(i.service().customName||i.service().serviceName),ie$1(2),Oe("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&&i.hasHumidifier?46:i.service().values?.TargetHumidifierDehumidifierState===1?47:i.service().values?.TargetHumidifierDehumidifierState===2&&i.hasDehumidifier?48:i.service().values?.TargetHumidifierDehumidifierState===2?49:50),ie$1(7),Oe((i.service().values?.Active||i.service().values?.On)&&i.hasCurrentConsumption()?51:-1));},dependencies:[ie,K8],encapsulation:2})}return e})();function Md(e,r){if(e&1&&At$1(0),e&2){let t=ye$1();Rt(" ",t.service().values?.CurrentRelativeHumidity,"% ");}}function Td(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.no_data")," ");}var Io=(()=>{class e{service=PH.required();static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-humidity-sensor"]],inputs:{service:[1,"service"]},decls:34,vars:11,consts:[[1,"accessory-box"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["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"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","grey-text"]],template:function(o,i){if(o&1&&(Mi(0),f_(1,"translate"),Mi(2),f_(3,"translate"),Mi(4),f_(5,"lowercase"),f_(6,"lowercase"),ke(7,"div",0)(8,"span",1),At$1(9),Je$1(),ke(10,"div",2)(11,"div",3),ah(),ke(12,"svg",4),Dr$1(13,"rect",5),ke(14,"g",6),Dr$1(15,"path",7),Je$1(),Dr$1(16,"line",8)(17,"line",9)(18,"line",10)(19,"line",11)(20,"line",12)(21,"line",13)(22,"line",14)(23,"line",15)(24,"line",16)(25,"line",17)(26,"line",18)(27,"line",19)(28,"line",20),Je$1()(),ch(),ke(29,"div",21),At$1(30),Je$1(),ke(31,"div",22),Re$1(32,Md,1,1)(33,Td,2,3),Je$1()()()),o&2){let c="CurrentRelativeHumidity"in i.service().values,f=c?`${i.service().values?.CurrentRelativeHumidity}%`:h_(1,3,"accessories.control.no_data"),T=(i.service().customName||i.service().serviceName||"").trim(),P=h_(3,5,"accessories.core.humidity_sensor"),O=!h_(5,7,T).includes(h_(6,9,P)),R=`${T+(O?`, ${P}`:"")}, ${f}`;ie$1(9),Rt(" ",R," "),ie$1(21),Ny(i.service().customName||i.service().serviceName),ie$1(2),Oe(c?32:33);}},dependencies:[_S,K8],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})();function bd(e,r){e&1&&(ke(0,"div",14),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.running")));}function Bd(e,r){e&1&&(ke(0,"div",14),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.off")));}var Lo=(()=>{class e{service=PH.required();static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-irrigation-system"]],inputs:{service:[1,"service"]},decls:18,vars:7,consts:[[1,"accessory-box"],[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(o,i){o&1&&(ke(0,"div",0)(1,"div",1)(2,"div",2),f_(3,"translate"),ah(),ke(4,"svg",3),Dr$1(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),Je$1()(),ch(),ke(14,"div",13),At$1(15),Je$1(),Re$1(16,bd,3,3,"div",14)(17,Bd,3,3,"div",14),Je$1()()),o&2&&(Cy("accessory-on",i.service().values?.InUse),ie$1(2),vr$1("aria-label",h_(3,5,"accessories.core.irrigation_system")),ie$1(13),Rt(" ",i.service().customName||i.service().values?.ConfiguredName||i.service().serviceName," "),ie$1(),Oe(i.service().values?.InUse?16:17));},dependencies:[K8],styles:[".accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .field[_ngcontent-%COMP%]{fill:#4caf50}.accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .pipe[_ngcontent-%COMP%]{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})();function wd(e,r){e&1&&(ke(0,"div",24),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.detected")));}function Ed(e,r){e&1&&(ke(0,"div",25),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Rt(" ",h_(2,1,"accessories.control.not_detected")," "));}var Vo=(()=>{class e{service=PH.required();static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-leak-sensor"]],inputs:{service:[1,"service"]},decls:37,vars:15,consts:[[1,"accessory-box"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["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"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","red-text"],["aria-hidden","true",1,"accessory-label","grey-text"]],template:function(o,i){if(o&1&&(Mi(0),f_(1,"translate"),f_(2,"translate"),Mi(3),f_(4,"translate"),Mi(5),f_(6,"lowercase"),f_(7,"lowercase"),ke(8,"div",0)(9,"span",1),At$1(10),Je$1(),ke(11,"div",2)(12,"div",3),ah(),ke(13,"svg",4),Dr$1(14,"rect",5),ke(15,"g",6),Dr$1(16,"path",7),Je$1(),ke(17,"g",8),Dr$1(18,"path",7),Je$1(),Dr$1(19,"ellipse",9)(20,"line",10)(21,"line",11)(22,"line",12)(23,"line",13)(24,"line",14)(25,"line",15)(26,"line",16)(27,"line",17)(28,"line",18)(29,"line",19)(30,"line",20)(31,"line",21)(32,"line",22),Je$1()(),ch(),ke(33,"div",23),At$1(34),Je$1(),Re$1(35,wd,3,3,"div",24)(36,Ed,3,3,"div",25),Je$1()()),o&2){let c=!!i.service().values?.LeakDetected,f=c?h_(1,5,"accessories.control.detected"):h_(2,7,"accessories.control.not_detected"),T=(i.service().customName||i.service().serviceName||"").trim(),P=h_(4,9,"accessories.core.leak_sensor"),O=!h_(6,11,T).includes(h_(7,13,P)),R=`${T+(O?`, ${P}`:"")}, ${f}`;ie$1(8),Cy("accessory-on",c),ie$1(2),Rt(" ",R," "),ie$1(24),Ny(i.service().customName||i.service().serviceName),ie$1(),Oe(c?35:36);}},dependencies:[_S,K8],styles:[".accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .red-outline[_ngcontent-%COMP%]{stroke:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{stroke-opacity:.8}50%{stroke-opacity:.2}}"]})}return e})();function Dd(e,r){if(e&1&&(ke(0,"div",29),At$1(1),f_(2,"number"),Je$1()),e&2){ye$1(2);let t=Ot$1(0);ie$1(),Rt("",g_(2,1,t,"0.1-1")," lux");}}function Ad(e,r){if(e&1&&(ke(0,"div",29),At$1(1),f_(2,"number"),Je$1()),e&2){ye$1(2);let t=Ot$1(0);ie$1(),Rt("",g_(2,1,t,"1.0-0")," lux");}}function Pd(e,r){if(e&1&&Re$1(0,Dd,3,4,"div",29)(1,Ad,3,4,"div",29),e&2){ye$1();let t=Ot$1(0);Oe(t<1?0:1);}}function Fd(e,r){e&1&&(ke(0,"div",29),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Rt(" ",h_(2,1,"accessories.control.no_data")," "));}var No=(()=>{class e{service=PH.required();static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-light-sensor"]],inputs:{service:[1,"service"]},decls:43,vars:18,consts:[[1,"accessory-box"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["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"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","grey-text"]],template:function(o,i){if(o&1&&(Mi(0)(1),f_(2,"number"),f_(3,"number"),f_(4,"translate"),Mi(5),f_(6,"translate"),Mi(7),f_(8,"lowercase"),f_(9,"lowercase"),ke(10,"div",0)(11,"span",1),At$1(12),Je$1(),ke(13,"div",2)(14,"div",3),ah(),ke(15,"svg",4),Dr$1(16,"rect",5)(17,"circle",6)(18,"line",7)(19,"line",8)(20,"line",9)(21,"line",10)(22,"line",11)(23,"line",12)(24,"line",13)(25,"line",14)(26,"line",15)(27,"line",16)(28,"line",17)(29,"line",18)(30,"line",19)(31,"line",20)(32,"line",21)(33,"line",22)(34,"line",23)(35,"line",24)(36,"line",25)(37,"line",26)(38,"line",27),Je$1()(),ch(),ke(39,"div",28),At$1(40),Je$1(),Re$1(41,Pd,2,1)(42,Fd,3,3,"div",29),Je$1()()),o&2){let c="CurrentAmbientLightLevel"in i.service().values,f=oc$1(i.service().values?.CurrentAmbientLightLevel),T=c?`${f<1?g_(2,4,f,"0.1-1"):g_(3,7,f,"1.0-0")} lux`:h_(4,10,"accessories.control.no_data"),P=(i.service().customName||i.service().serviceName||"").trim(),O=h_(6,12,"accessories.core.light_sensor"),R=!h_(8,14,P).includes(h_(9,16,O)),se=`${P+(R?`, ${O}`:"")}, ${T}`;ie$1(12),Rt(" ",se," "),ie$1(28),Ny(i.service().customName||i.service().serviceName),ie$1(),Oe(c?41:42);}},dependencies:[kS,_S,K8],encapsulation:2})}return e})();var nt=(()=>{class e{miredToKelvin(t){return Math.round(1e6/t)}kelvinToMired(t){return Math.round(1e6/t)}kelvinToHex(t){t=Math.max(1e3,Math.min(4e4,t));let o=t/100,i,c,f;return o<=66?(i=255,c=o,c=99.4708025861*Math.log(c)-161.1195681661,f=o<=19?0:138.5177312231*Math.log(o-10)-305.0447927307):(i=329.698727446*(o-60)**-0.1332047592,c=288.1221695283*(o-60)**-0.0755148492,f=255),i=Math.round(Math.min(Math.max(i,0),255)),c=Math.round(Math.min(Math.max(c,0),255)),f=Math.round(Math.min(Math.max(f,0),255)),`#${i.toString(16).padStart(2,"0")}${c.toString(16).padStart(2,"0")}${f.toString(16).padStart(2,"0")}`}kelvinToHsl(t){let o=t/100,i,c,f;o<=66?(i=255,c=Math.min(99.4708025861*Math.log(o)-161.1195681661,255),f=o<=19?0:Math.min(138.5177312231*Math.log(o-10)-305.0447927307,255)):(i=Math.min(329.698727446*(o-60)**-0.1332047592,255),c=Math.min(288.1221695283*(o-60)**-0.0755148492,255),f=255),i/=255,c/=255,f/=255;let T=Math.max(i,c,f),P=Math.min(i,c,f),O=T-P,R=0;O!==0&&(T===i?R=(c-f)/O%6:T===c?R=(f-i)/O+2:R=(i-c)/O+4,R=Math.round(R*60),R<0&&(R+=360));let se=(T+P)/2,Se=O===0?0:O/(1-Math.abs(2*se-1));return `hsl(${Math.round(R)}, ${Math.round(Se*100)}%, ${Math.round(se*100)}%)`}static \u0275fac=function(o){return new(o||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Od(e,r){e&1&&dy(0,"div");}function Id(e,r){if(e&1&&(La$1(0,"div",11)(1,"div",13)(2,"div",7),dy(3,"i",14),Rd$1(),At$1(4),f_(5,"translate"),La$1(6,"div",9),dy(7,"i",10),Rd$1()()()),e&2){let t=ye$1();ie$1(3),Cy("off-text",!t.adaptiveLightingSignal?.())("on-text",t.adaptiveLightingSignal?.()),ie$1(),xy(" ",h_(5,6,"accessories.control.adaptive_lighting"),": ",t.adaptiveLightingSignal?.()?"ON":"OFF"," ");}}function Ld(e,r){if(e&1){let t=nc$1();La$1(0,"h6",15),At$1(1),f_(2,"translate"),Rd$1(),La$1(3,"div",16)(4,"nouislider",17),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1();return t_(c.targetBrightness.value,i)||(c.targetBrightness.value=i),Wo$1(i)}),rc$1("ngModelChange",function(){Go$1(t);let i=ye$1();return Wo$1(i.onBrightnessStateChange())}),Rd$1(),KC(),Rd$1();}if(e&2){let t=ye$1();ie$1(),xy("",h_(2,6,"accessories.control.brightness"),": ",t.targetBrightness.value,"%"),ie$1(3),ly("min",t.targetBrightness.min)("max",t.targetBrightness.max)("step",t.targetBrightness.step),ky("ngModel",t.targetBrightness.value),JC();}}function Vd(e,r){e&1&&(La$1(0,"div",19)(1,"span",20),At$1(2),f_(3,"translate"),Rd$1()()),e&2&&(ie$1(2),Ny(h_(3,1,"accessories.control.adaptive_lighting_note")));}function Nd(e,r){if(e&1){let t=nc$1();La$1(0,"h6",15),At$1(1),f_(2,"translate"),Rd$1(),La$1(3,"div",18)(4,"nouislider",17),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1();return t_(c.targetHue.value,i)||(c.targetHue.value=i),Wo$1(i)}),rc$1("ngModelChange",function(){Go$1(t);let i=ye$1();return Wo$1(i.onHueStateChange())}),Rd$1(),KC(),Rd$1(),Re$1(5,Vd,4,3,"div",19);}if(e&2){let t=ye$1();ie$1(),xy("",h_(2,9,"accessories.control.hue"),": ",t.targetHue.value,"\xB0"),ie$1(3),Cy("mb-1",t.adaptiveLightingSignal?.()),ly("min",0)("max",360)("step",1),ky("ngModel",t.targetHue.value),JC(),ie$1(),Oe(t.adaptiveLightingSignal?.()?5:-1);}}function Hd(e,r){e&1&&(La$1(0,"div",19)(1,"span",20),At$1(2),f_(3,"translate"),Rd$1()()),e&2&&(ie$1(2),Ny(h_(3,1,"accessories.control.adaptive_lighting_note")));}function Rd(e,r){if(e&1){let t=nc$1();La$1(0,"h6",15),At$1(1),f_(2,"translate"),Rd$1(),La$1(3,"div",21)(4,"nouislider",17),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1();return t_(c.targetSaturation.value,i)||(c.targetSaturation.value=i),Wo$1(i)}),rc$1("ngModelChange",function(){Go$1(t);let i=ye$1();return Wo$1(i.onSaturationStateChange())}),Rd$1(),KC(),Rd$1(),Re$1(5,Hd,4,3,"div",19);}if(e&2){let t=ye$1();ie$1(),xy("",h_(2,9,"accessories.control.saturation"),": ",t.targetSaturation.value,"%"),ie$1(3),Cy("mb-1",t.adaptiveLightingSignal?.()),ly("min",0)("max",100)("step",1),ky("ngModel",t.targetSaturation.value),JC(),ie$1(),Oe(t.adaptiveLightingSignal?.()?5:-1);}}function $d(e,r){e&1&&(La$1(0,"div",19)(1,"span",20),At$1(2),f_(3,"translate"),Rd$1()()),e&2&&(ie$1(2),Ny(h_(3,1,"accessories.control.adaptive_lighting_note")));}function Ud(e,r){if(e&1){let t=nc$1();La$1(0,"h6",15),At$1(1),f_(2,"translate"),f_(3,"convertMired"),Rd$1(),La$1(4,"div",22)(5,"nouislider",17),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1();return t_(c.targetColorTemperature.value,i)||(c.targetColorTemperature.value=i),Wo$1(i)}),rc$1("ngModelChange",function(){Go$1(t);let i=ye$1();return Wo$1(i.onColorTemperatureStateChange())}),Rd$1(),KC(),Rd$1(),Re$1(6,$d,4,3,"div",19);}if(e&2){let t=ye$1();ie$1(),xy(" ",h_(2,9,"accessories.control.color_temperature"),": ",h_(3,11,t.targetColorTemperature.mired)," "),ie$1(4),Cy("mb-1",t.adaptiveLightingSignal?.()),ly("min",t.targetColorTemperature.min)("max",t.targetColorTemperature.max)("step",t.targetColorTemperature.step),ky("ngModel",t.targetColorTemperature.value),JC(),ie$1(),Oe(t.adaptiveLightingSignal?.()?6:-1);}}var Hi=new I("LightbulbAdaptiveLighting",{factory:()=>{}}),Ho=(()=>{class e extends me{$colour=g(nt);adaptiveLightingSignal=g(Hi);hasAdaptiveLighting=!!this.adaptiveLightingSignal;targetMode;targetBrightness;targetBrightnessChanged=new $$1;targetHue;targetHueChanged=new $$1;targetSaturation;targetSaturationChanged=new $$1;targetColorTemperature;targetColorTemperatureChanged=new $$1;setupComponent(){this.createDebouncedSubscription(this.targetBrightnessChanged,()=>{this.service.getCharacteristic("Brightness").setValue(this.targetBrightness.value),this.targetBrightness.value&&!this.service.values.On?(this.targetMode=true,this.service.getCharacteristic("On").setValue(this.targetMode)):!this.targetBrightness.value&&this.service.values.On&&(this.targetMode=false,this.service.getCharacteristic("On").setValue(this.targetMode));}),this.createDebouncedSubscription(this.targetHueChanged,()=>{this.service.getCharacteristic("Hue").setValue(this.targetHue.value);}),this.createDebouncedSubscription(this.targetSaturationChanged,()=>{this.service.getCharacteristic("Saturation").setValue(this.targetSaturation.value);}),this.createDebouncedSubscription(this.targetColorTemperatureChanged,t=>{this.service.getCharacteristic("ColorTemperature").setValue(t);}),this.targetMode=this.service.values.On,this.loadTargetBrightness(),this.loadTargetHue(),this.loadTargetSaturation(),this.loadTargetColorTemperature();}handleAccessoryUpdate(){if(this.targetMode=this.service.values.On,this.targetBrightness&&(this.targetBrightness.value=this.service.getCharacteristic("Brightness").value),this.targetHue&&(this.targetHue.value=this.service.getCharacteristic("Hue").value),this.targetSaturation&&(this.targetSaturation.value=this.service.getCharacteristic("Saturation").value),this.targetColorTemperature){let t=this.service.getCharacteristic("ColorTemperature").value;this.targetColorTemperature.value=this.$colour.miredToKelvin(t),this.targetColorTemperature.mired=t;}}setTargetMode(t,o){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),this.blurTarget(o);}onBrightnessStateChange(){this.targetBrightnessChanged.next(this.targetBrightness.value);}onHueStateChange(){this.targetHueChanged.next(this.targetHue.value),this.applySaturationGradient();}onSaturationStateChange(){this.targetSaturationChanged.next(this.targetSaturation.value);}onColorTemperatureStateChange(){let t=this.$colour.kelvinToMired(this.targetColorTemperature.value);this.targetColorTemperature.mired=t,this.targetColorTemperatureChanged.next(t);}loadTargetBrightness(){let t=this.service.getCharacteristic("Brightness");t&&(this.targetBrightness={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},this.applySliderGradient("linear-gradient(to right, #242424, #ffd6aa)",".brightness-slider .noUi-target"));}loadTargetHue(){let t=this.service.getCharacteristic("Hue");t&&(this.targetHue={value:t.value},this.applySliderGradient(`linear-gradient(to right,
hsl(0, 100%, 50%),
hsl(60, 100%, 50%),
hsl(120, 100%, 50%),
hsl(180, 100%, 50%),
hsl(240, 100%, 50%),
hsl(300, 100%, 50%),
hsl(360, 100%, 50%))`,".hue-slider .noUi-target"));}loadTargetSaturation(){let t=this.service.getCharacteristic("Saturation");t&&(this.targetSaturation={value:t.value},this.applySaturationGradient());}loadTargetColorTemperature(){let t=this.service.getCharacteristic("ColorTemperature");if(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};let o=this.$colour.kelvinToHsl(this.targetColorTemperature.min),i=this.$colour.kelvinToHsl(this.targetColorTemperature.max);this.applySliderGradient(`linear-gradient(to right, ${o}, ${i})`,".color-temp-slider .noUi-target");}}applySaturationGradient(){let t=this.targetHue?.value||0;this.applySliderGradient(`linear-gradient(to right,
hsl(${t}, 0%, 50%),
hsl(${t}, 100%, 50%))`,".saturation-slider .noUi-target");}static \u0275fac=(()=>{let t;return function(i){return (t||(t=_n(e)))(i||e)}})();static \u0275cmp=Ja$1({type:e,selectors:[["app-lightbulb-manage"]],features:[Xa$1],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"],[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"],[1,"mt-4"],[1,"brightness-slider"],[3,"ngModelChange","min","max","step","ngModel"],[1,"hue-slider"],[1,"d-flex","text-center","mt-0","mb-1"],[1,"grey-text","small"],[1,"saturation-slider"],[1,"color-temp-slider"]],template:function(o,i){o&1&&(La$1(0,"div",0)(1,"div",1),dy(2,"h5",2),La$1(3,"button",3),f_(4,"translate"),rc$1("click",function(){return i.dismissModal()}),Rd$1()(),La$1(5,"div",4)(6,"div",5),f_(7,"translate"),La$1(8,"button",6),rc$1("click",function(f){return i.setTargetMode(false,f)}),La$1(9,"div",7),dy(10,"i",8),Rd$1(),At$1(11),f_(12,"translate"),La$1(13,"div",9),dy(14,"i",10),Rd$1()(),La$1(15,"button",6),rc$1("click",function(f){return i.setTargetMode(true,f)}),La$1(16,"div",7),dy(17,"i",8),Rd$1(),At$1(18),f_(19,"translate"),La$1(20,"div",9),dy(21,"i",10),Rd$1()(),Re$1(22,Od,1,0,"div"),Rd$1(),Re$1(23,Id,8,8,"div",11),Re$1(24,Ld,5,8),Re$1(25,Nd,6,11),Re$1(26,Rd,6,11),Re$1(27,Ud,7,13),Rd$1(),dy(28,"div",12),Rd$1()),o&2&&(ie$1(2),ly("innerText",i.service.customName||i.service.serviceName),ie$1(),vr$1("aria-label",h_(4,19,"form.button_close")),ie$1(3),vr$1("aria-label",h_(7,21,"accessories.control.mode_control")),ie$1(4),Cy("fa-check-circle",!i.targetMode)("fa-blank",i.targetMode),ie$1(),Rt(" ",h_(12,23,"accessories.control.off")," "),ie$1(6),Cy("fa-check-circle",i.targetMode)("fa-blank",!i.targetMode),ie$1(),Rt(" ",h_(19,25,"accessories.control.on")," "),ie$1(4),Oe(i.hasAdaptiveLighting?22:-1),ie$1(),Oe(i.hasAdaptiveLighting?23:-1),ie$1(),Oe(i.targetBrightness?24:-1),ie$1(),Oe(i.targetHue?25:-1),ie$1(),Oe(i.targetSaturation?26:-1),ie$1(),Oe(i.targetColorTemperature?27:-1));},dependencies:[Kn,Hn,ln,ye,K8,Ct],encapsulation:2})}return e})();function Wd(e,r){if(e&1&&(dy(0,"div",10),f_(1,"translate")),e&2){let t=ye$1();ly("innerHTML",t.service().values?.On?t.getBrightnessLabel():h_(1,1,"accessories.control.off"),Ha$1);}}function jd(e,r){if(e&1&&(dy(0,"div",10),f_(1,"translate")),e&2){let t=ye$1();ly("innerHTML",h_(1,1,t.service().values?.On||t.service().values?.Active?"accessories.control.on":"accessories.control.off")+t.getOnOffLabel(),Ha$1);}}var Ro=(()=>{class e{destroyRef=g(ne);injector=g(we);$accessories=g(le);$modal=g(si);pollingRate$=new $$1;$colour=g(nt);service=PH.required();readyForControl=PH(false);hasAdaptiveLighting=W(false);isAdaptiveLightingEnabled=W(false);ngOnInit(){this.loadAdaptiveLighting();}getBulbFill(){let t=this.service().values;return t?.On||t?.Active?"Hue"in t?`hsl(${t?.Hue}, ${t?.Saturation}%, 50%)`:"ColorTemperature"in t?this.$colour.kelvinToHsl(this.$colour.miredToKelvin(t?.ColorTemperature)):"#ffcf55":"none"}getBrightnessLabel(){let t=this.service().values;if(!t?.On)return "";let o=`${t?.Brightness}%`;if(this.hasAdaptiveLighting()){let i=this.isAdaptiveLightingEnabled()?"on-text":"grey-text";o+=` · <i class='fas fa-sun ${i}'></i>`;}return this.hasCurrentConsumption()&&(o+=` · ${this.currentConsumption()}W`),o}getOnOffLabel(){let t=this.service().values;if(!(t?.On||t?.Active))return "";let i="";if(this.hasAdaptiveLighting()){let c=this.isAdaptiveLightingEnabled()?"on-text":"grey-text";i+=` · <i class='fas fa-sun ${c}'></i>`;}return this.hasCurrentConsumption()&&(i+=` · ${this.currentConsumption()}W`),i}hasCurrentConsumption(){return "Consumption"in this.service().values}currentConsumption(){if(this.hasCurrentConsumption())return this.service().values.Consumption}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(){return E(this,null,function*(){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=[{provide:ce,useValue:{service:this.service(),$accessories:this.$accessories}}];this.hasAdaptiveLighting()&&t.push({provide:Hi,useValue:this.isAdaptiveLightingEnabled});let o=ty(t,this.injector),i=this.$modal.open(Ho,{size:"md",backdrop:"static",injector:o});if(this.hasAdaptiveLighting()){this.pollingRate$.next(3e3);try{yield i.result;}catch(c){}finally{this.pollingRate$.next(3e4);}}}})}loadAdaptiveLighting(){"CharacteristicValueActiveTransitionCount"in this.service().values&&(this.hasAdaptiveLighting.set(true),this.isAdaptiveLightingEnabled.set(!!this.service().values.CharacteristicValueActiveTransitionCount),this.pollingRate$.pipe(rp$1(3e4),Lr$1(t=>TD(t)),An(this.destroyRef)).subscribe(()=>{this.isAdaptiveLightingEnabled.set(!!this.service().values.CharacteristicValueActiveTransitionCount);}));}Math=Math;static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-lightbulb"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:14,vars:11,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[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(o,i){o&1&&(La$1(0,"div",0),rc$1("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),La$1(1,"div",1)(2,"div",2),f_(3,"translate"),ah(),La$1(4,"svg",3),dy(5,"path",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"line",8),Rd$1()(),ch(),La$1(10,"div",9),At$1(11),Rd$1(),Re$1(12,Wd,2,3,"div",10)(13,jd,2,3,"div",10),Rd$1()()),o&2&&(Cy("accessory-on",i.service().values.On||i.service().values.Active)("cursor-pointer",i.readyForControl()),ie$1(2),vr$1("aria-label",h_(3,9,"accessories.core.lightbulb")),ie$1(3),vr$1("fill",i.getBulbFill())("fill-opacity","Brightness"in i.service().values?.25+i.service().values?.Brightness/100*.5:.75),ie$1(6),Ny(i.service().customName||i.service().serviceName),ie$1(),Oe(i.service().values?.Brightness?12:13));},dependencies:[ie,K8],encapsulation:2})}return e})();var ui=(()=>{class e{transform(t){if(typeof t!="number"||Number.isNaN(t))return "";let o=Math.floor(t/60),i=t%60;return [o>0?`${o.toString()}m`:"",i>0?`${i.toString()}s`:""].filter(Boolean).join(" ")}static \u0275fac=function(o){return new(o||e)};static \u0275pipe=xt$1({name:"duration",type:e,pure:true})}return e})();function Gd(e,r){if(e&1){let t=nc$1();La$1(0,"h6",12),At$1(1),f_(2,"translate"),f_(3,"duration"),Rd$1(),La$1(4,"nouislider",13),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1();return t_(c.targetLockManagementAutoSecurityTimeout.value,i)||(c.targetLockManagementAutoSecurityTimeout.value=i),Wo$1(i)}),rc$1("ngModelChange",function(){Go$1(t);let i=ye$1();return Wo$1(i.onLockManagementAutoSecurityTimeoutStateChange())}),Rd$1(),KC();}if(e&2){let t=ye$1();ie$1(),xy(" ",h_(2,6,"accessories.control.lock_auto"),": ",t.targetLockManagementAutoSecurityTimeout.value===0?"\u221E":h_(3,8,t.targetLockManagementAutoSecurityTimeout.value)," "),ie$1(3),ly("min",t.targetLockManagementAutoSecurityTimeout.min)("max",t.targetLockManagementAutoSecurityTimeout.max)("step",10),ky("ngModel",t.targetLockManagementAutoSecurityTimeout.value),JC();}}var $o=(()=>{class e extends me{cancelLockTimer$=new $$1;serviceManagement;targetMode;targetLockManagementAutoSecurityTimeout;targetLockManagementAutoSecurityTimeoutChanged=new $$1;setupComponent(){this.targetMode=this.service.values.LockTargetState,this.service.linkedServices&&(this.serviceManagement=Object.values(this.service.linkedServices).find(t=>t.type==="LockManagement")),this.serviceManagement&&(this.createDebouncedSubscription(this.targetLockManagementAutoSecurityTimeoutChanged,()=>{this.serviceManagement.getCharacteristic("LockManagementAutoSecurityTimeout").setValue(this.targetLockManagementAutoSecurityTimeout.value);},300),this.loadTargetLockManagementAutoSecurityTimeout());}handleAccessoryUpdate(){this.targetMode=this.service.values.LockTargetState,this.targetLockManagementAutoSecurityTimeout&&this.serviceManagement&&(this.targetLockManagementAutoSecurityTimeout.value=this.serviceManagement.getCharacteristic("LockManagementAutoSecurityTimeout")?.value);}setTargetMode(t,o){this.targetMode=t,this.service.getCharacteristic("LockTargetState").setValue(this.targetMode),this.cancelLockTimer$.next(),this.targetMode===0&&this.targetLockManagementAutoSecurityTimeout?.value>0&&Ln((this.targetLockManagementAutoSecurityTimeout.value+.3)*1e3).pipe(Is$1(this.cancelLockTimer$),An(this.destroyRef)).subscribe(()=>{this.targetMode=1,this.cdr.markForCheck();}),this.blurTarget(o);}onLockManagementAutoSecurityTimeoutStateChange(){this.targetLockManagementAutoSecurityTimeoutChanged.next(this.targetLockManagementAutoSecurityTimeout.value);}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},this.applySliderGradient("linear-gradient(to right, #ffffff, #ffd966, #ff0000)"));}static \u0275fac=(()=>{let t;return function(i){return (t||(t=_n(e)))(i||e)}})();static \u0275cmp=Ja$1({type:e,selectors:[["app-lock-mechanism-manage"]],features:[Xa$1],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"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[1,"mt-4"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(o,i){o&1&&(La$1(0,"div",0)(1,"div",1),dy(2,"h5",2),La$1(3,"button",3),f_(4,"translate"),rc$1("click",function(){return i.dismissModal()}),Rd$1()(),La$1(5,"div",4)(6,"div",5),f_(7,"translate"),La$1(8,"button",6),rc$1("click",function(f){return i.setTargetMode(1,f)}),La$1(9,"div",7),dy(10,"i",8),Rd$1(),At$1(11),f_(12,"translate"),La$1(13,"div",9),dy(14,"i",10),Rd$1()(),La$1(15,"button",6),rc$1("click",function(f){return i.setTargetMode(0,f)}),La$1(16,"div",7),dy(17,"i",8),Rd$1(),At$1(18),f_(19,"translate"),La$1(20,"div",9),dy(21,"i",10),Rd$1()()(),Re$1(22,Gd,5,10),Rd$1(),dy(23,"div",11),Rd$1()),o&2&&(ie$1(2),ly("innerText",i.service.customName||i.service.serviceName),ie$1(),vr$1("aria-label",h_(4,14,"form.button_close")),ie$1(3),vr$1("aria-label",h_(7,16,"accessories.control.mode_control")),ie$1(4),Cy("fa-check-circle",i.targetMode===1)("fa-blank",i.targetMode!==1),ie$1(),Rt(" ",h_(12,18,"accessories.control.lock")," "),ie$1(6),Cy("fa-check-circle",i.targetMode===0)("fa-blank",i.targetMode!==0),ie$1(),Rt(" ",h_(19,20,"accessories.control.unlock")," "),ie$1(4),Oe(i.serviceManagement?22:-1));},dependencies:[Kn,Hn,ln,ye,K8,ui],encapsulation:2})}return e})();function qd(e,r){if(e&1&&At$1(0),e&2){let t=ye$1(2);Rt(" \xB7 ",t.currentConsumption(),"W ");}}function zd(e,r){if(e&1&&(La$1(0,"div",11),At$1(1),f_(2,"translate"),Re$1(3,qd,1,1),Rd$1()),e&2){let t=ye$1();Cy("red-text",!t.service().values?.LockCurrentState)("grey-text",t.service().values?.LockCurrentState),ie$1(),Rt(" ",h_(2,6,t.service().values?.LockCurrentState?"accessories.control.locked":"accessories.control.unlocked")," "),ie$1(2),Oe(!t.service().values?.LockCurrentState&&t.hasCurrentConsumption()?3:-1);}}function Kd(e,r){e&1&&(La$1(0,"div",10),At$1(1),f_(2,"translate"),Rd$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.jammed")));}function Yd(e,r){e&1&&(La$1(0,"div",10),At$1(1),f_(2,"translate"),Rd$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.unknown")));}var Uo=(()=>{class e{$accessories=g(le);injector=g(we);$modal=g(si);service=PH.required();readyForControl=PH(false);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=ty([{provide:ce,useValue:{service:this.service(),$accessories:this.$accessories}}],this.injector);this.$modal.open($o,{size:"md",backdrop:"static",injector:t});}}hasCurrentConsumption(){return "Consumption"in this.service().values}currentConsumption(){if(this.hasCurrentConsumption())return this.service().values.Consumption}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-lock-mechanism"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:14,vars:15,consts:[["tabindex","0",1,"accessory-box",3,"shortClick","longClick"],[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,"red-text","grey-text"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(La$1(0,"div",0),rc$1("shortClick",function(){return i.onClick()})("longClick",function(){return i.onLongClick()}),La$1(1,"div",1)(2,"div",2),f_(3,"translate"),ah(),La$1(4,"svg",3),dy(5,"path",4)(6,"path",5)(7,"rect",6)(8,"circle",7),Rd$1()(),ch(),La$1(9,"div",8),At$1(10),Rd$1(),Re$1(11,zd,4,8,"div",9)(12,Kd,3,3,"div",10)(13,Yd,3,3,"div",10),Rd$1()()),o&2&&(Cy("accessory-on","LockCurrentState"in i.service().values&&i.service().values?.LockCurrentState!==1||i.service().values?.On===1)("unlocked",i.service().values?.LockCurrentState===0||i.service().values?.On===1)("jammed",i.service().values?.LockCurrentState===2)("error",i.service().values?.LockCurrentState===3)("cursor-pointer",i.readyForControl()),ie$1(2),vr$1("aria-label",h_(3,13,"accessories.core.lock_mechanism")),ie$1(8),Ny(i.service().customName||i.service().serviceName),ie$1(),Oe(i.service().values?.LockCurrentState<2?11:i.service().values?.LockCurrentState===2?12:i.service().values?.LockCurrentState===3?13:-1));},dependencies:[ie,K8],styles:["@keyframes _ngcontent-%COMP%_blink{0%,to{fill-opacity:1}50%{fill-opacity:.2}}.unlocked[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .shackle-locked[_ngcontent-%COMP%]{stroke-opacity:0!important}.unlocked[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .shackle-unlocked[_ngcontent-%COMP%]{stroke-opacity:1!important}.unlocked[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .keyhole[_ngcontent-%COMP%]{fill:#ff9800!important}.jammed[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .shackle-locked[_ngcontent-%COMP%]{stroke-opacity:0!important}.jammed[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .shackle-unlocked[_ngcontent-%COMP%]{stroke-opacity:1!important}.jammed[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .keyhole[_ngcontent-%COMP%]{fill:#d32f2f!important;animation:_ngcontent-%COMP%_blink 1s infinite}.error[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .shackle-locked[_ngcontent-%COMP%]{stroke-opacity:0!important}.error[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .shackle-unlocked[_ngcontent-%COMP%]{stroke-opacity:1!important}.error[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .keyhole[_ngcontent-%COMP%]{fill:#d32f2f!important;animation:_ngcontent-%COMP%_blink 1s infinite}"]})}return e})();function Qd(e,r){if(e&1){let t=nc$1();La$1(0,"div",5),f_(1,"translate"),La$1(2,"button",7),rc$1("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setActive(0,i))}),La$1(3,"div",8),dy(4,"i",9),Rd$1(),At$1(5),f_(6,"translate"),La$1(7,"div",10),dy(8,"i",11),Rd$1()(),La$1(9,"button",7),rc$1("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setActive(1,i))}),La$1(10,"div",8),dy(11,"i",9),Rd$1(),At$1(12),f_(13,"translate"),La$1(14,"div",10),dy(15,"i",11),Rd$1()()();}if(e&2){let t=ye$1();vr$1("aria-label",h_(1,11,"accessories.control.mode_control")),ie$1(4),Cy("fa-check-circle",t.service.values?.Active===0)("fa-blank",t.service.values?.Active!==0),ie$1(),Rt(" ",h_(6,13,"accessories.control.off")," "),ie$1(6),Cy("fa-check-circle",t.service.values?.Active===1)("fa-blank",t.service.values?.Active!==1),ie$1(),Rt(" ",h_(13,15,"accessories.control.on")," ");}}function Zd(e,r){if(e&1){let t=nc$1();La$1(0,"div",5),f_(1,"translate"),La$1(2,"button",7),rc$1("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setTargetState(0,i))}),La$1(3,"div",8),dy(4,"i",9),Rd$1(),At$1(5),f_(6,"translate"),La$1(7,"div",10),dy(8,"i",11),Rd$1()(),La$1(9,"button",7),rc$1("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setTargetState(1,i))}),La$1(10,"div",8),dy(11,"i",9),Rd$1(),At$1(12),f_(13,"translate"),La$1(14,"div",10),dy(15,"i",11),Rd$1()(),La$1(16,"button",7),rc$1("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setTargetState(2,i))}),La$1(17,"div",8),dy(18,"i",9),Rd$1(),At$1(19),f_(20,"translate"),La$1(21,"div",10),dy(22,"i",11),Rd$1()()();}if(e&2){let t=ye$1();vr$1("aria-label",h_(1,16,"accessories.control.media_control")),ie$1(4),Cy("fa-check-circle",t.service.values?.CurrentMediaState===0)("fa-blank",t.service.values?.CurrentMediaState!==0),ie$1(),Rt(" ",h_(6,18,"accessories.control.play")," "),ie$1(6),Cy("fa-check-circle",t.service.values?.CurrentMediaState===1)("fa-blank",t.service.values?.CurrentMediaState!==1),ie$1(),Rt(" ",h_(13,20,"accessories.control.pause")," "),ie$1(6),Cy("fa-check-circle",t.service.values?.CurrentMediaState===2)("fa-blank",t.service.values?.CurrentMediaState!==2),ie$1(),Rt(" ",h_(20,22,"accessories.control.stop")," ");}}function Jd(e,r){if(e&1){let t=nc$1();La$1(0,"h6"),At$1(1),f_(2,"translate"),Rd$1(),La$1(3,"div",12),f_(4,"translate"),La$1(5,"button",7),rc$1("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setTargetMode(false,i))}),La$1(6,"div",8),dy(7,"i",9),Rd$1(),At$1(8),f_(9,"translate"),La$1(10,"div",10),dy(11,"i",11),Rd$1()(),La$1(12,"button",7),rc$1("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setTargetMode(true,i))}),La$1(13,"div",8),dy(14,"i",9),Rd$1(),At$1(15),f_(16,"translate"),La$1(17,"div",10),dy(18,"i",11),Rd$1()()();}if(e&2){let t=ye$1();ie$1(),Rt(" ",h_(2,12,"Active"in t.service.values||"TargetMediaState"in t.service.values?"accessories.control.speaker_volume":"menu.label_status")," "),ie$1(2),vr$1("aria-label",h_(4,14,"accessories.control.mute_control")),ie$1(4),Cy("fa-check-circle",!t.targetMode)("fa-blank",t.targetMode),ie$1(),Rt(" ",h_(9,16,"accessories.control.not_mute")," "),ie$1(6),Cy("fa-check-circle",t.targetMode)("fa-blank",!t.targetMode),ie$1(),Rt(" ",h_(16,18,"accessories.control.mute")," ");}}function Xd(e,r){if(e&1){let t=nc$1();La$1(0,"h6",13),At$1(1),f_(2,"translate"),Rd$1(),La$1(3,"nouislider",14),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1();return t_(c.targetVolume.value,i)||(c.targetVolume.value=i),Wo$1(i)}),rc$1("ngModelChange",function(){Go$1(t);let i=ye$1();return Wo$1(i.onVolumeStateChange())}),Rd$1(),KC();}if(e&2){let t=ye$1();ie$1(),xy("",h_(2,6,"accessories.control.speaker_volume"),": ",t.targetVolume.value,"%"),ie$1(2),ly("min",t.targetVolume.min)("max",t.targetVolume.max)("step",t.targetVolume.step),ky("ngModel",t.targetVolume.value),JC();}}var Wo=(()=>{class e extends me{targetMode;targetVolume;targetVolumeChanged=new $$1;setupComponent(){this.createDebouncedSubscription(this.targetVolumeChanged,()=>{this.service.getCharacteristic("Volume").setValue(this.targetVolume.value);}),this.targetMode=this.service.values.Mute,this.loadTargetVolume();}handleAccessoryUpdate(){this.targetMode=this.service.values.Mute,this.targetVolume&&(this.targetVolume.value=this.service.getCharacteristic("Volume")?.value);}setTargetMode(t,o){this.targetMode=t,this.service.getCharacteristic("Mute").setValue(this.targetMode),this.blurTarget(o);}setActive(t,o){this.service.getCharacteristic("Active").setValue(t),this.blurTarget(o);}setTargetState(t,o){this.service.getCharacteristic("TargetMediaState").setValue(t),this.blurTarget(o);}onVolumeStateChange(){this.targetVolumeChanged.next(this.targetVolume.value);}loadTargetVolume(){let t=this.service.getCharacteristic("Volume");t&&(this.targetVolume={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},this.applySliderGradient("linear-gradient(to right, #ffffff, #ffd966, #ff0000)"));}static \u0275fac=(()=>{let t;return function(i){return (t||(t=_n(e)))(i||e)}})();static \u0275cmp=Ja$1({type:e,selectors:[["app-microphone-manage"]],features:[Xa$1],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"],[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(o,i){o&1&&(La$1(0,"div",0)(1,"div",1),dy(2,"h5",2),La$1(3,"button",3),f_(4,"translate"),rc$1("click",function(){return i.dismissModal()}),Rd$1()(),La$1(5,"div",4),Re$1(6,Qd,16,17,"div",5)(7,Zd,23,24,"div",5),Re$1(8,Jd,19,20),Re$1(9,Xd,4,8),Rd$1(),dy(10,"div",6),Rd$1()),o&2&&(ie$1(2),ly("innerText",i.service.customName||i.service.serviceName),ie$1(),vr$1("aria-label",h_(4,5,"form.button_close")),ie$1(3),Oe("Active"in i.service.values?6:"TargetMediaState"in i.service.values?7:-1),ie$1(2),Oe("Mute"in i.service.values?8:-1),ie$1(),Oe(i.targetVolume?9:-1));},dependencies:[Kn,Hn,ln,ye,K8],encapsulation:2})}return e})();var e1=()=>["Speaker","SmartSpeaker"];function t1(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.playing")," ");}function i1(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.paused")," ");}function n1(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.stopped")," ");}function o1(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" \xB7 ",h_(1,1,"accessories.control.mute")," ");}function r1(e,r){if(e&1&&At$1(0),e&2){let t=ye$1(3);Rt(" \xB7 ",t.service().values?.Volume,"% ");}}function a1(e,r){if(e&1&&Re$1(0,r1,1,1),e&2){let t=ye$1(2);Oe("Volume"in t.service().values?0:-1);}}function s1(e,r){if(e&1&&(La$1(0,"div",10),Re$1(1,t1,2,3)(2,i1,2,3)(3,n1,2,3),Re$1(4,o1,2,3)(5,a1,1,1),Rd$1()),e&2){let t,o=ye$1();ie$1(),Oe((t=o.service().values?.CurrentMediaState)===0?1:t===1?2:t===2?3:-1),ie$1(3),Oe("Mute"in o.service().values&&o.service().values?.Mute?4:5);}}function l1(e,r){e&1&&(dy(0,"div",11),f_(1,"translate")),e&2&&ly("innerText",h_(1,1,"accessories.control.off"));}function c1(e,r){e&1&&(dy(0,"div",11),f_(1,"translate")),e&2&&ly("innerText",h_(1,1,"accessories.control.mute"));}function d1(e,r){if(e&1&&(La$1(0,"div",10),At$1(1),Rd$1()),e&2){let t=ye$1();ie$1(),Rt("",t.service().values?.Volume,"%");}}function p1(e,r){e&1&&(La$1(0,"div",10),At$1(1),f_(2,"translate"),Rd$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.on")));}function m1(e,r){e&1&&(La$1(0,"div",10),At$1(1),f_(2,"translate"),Rd$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.microphone")));}var jo=(()=>{class e{$accessories=g(le);injector=g(we);$modal=g(si);service=PH.required();readyForControl=PH(false);isOn(){let t=this.service().values;return "On"in t?!!t?.On:"Active"in t?!!t?.Active:"CurrentMediaState"in t?[0,1].includes(t?.CurrentMediaState):"Mute"in t&&"Volume"in t?!t?.Mute&&t?.Volume>0:"Mute"in t&&!t?.Mute}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: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=ty([{provide:ce,useValue:{service:this.service(),$accessories:this.$accessories}}],this.injector);this.$modal.open(Wo,{size:"md",backdrop:"static",injector:t});}}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-microphone"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:18,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","6","y","1","width","18","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","2"],["stroke-linecap","round","x1","10","y1","6","x2","20","y2","6","stroke","#7f7f7f","stroke-width","2"],["stroke-linecap","round","x1","10","y1","10","x2","20","y2","10","stroke","#7f7f7f","stroke-width","2"],["stroke-linecap","round","x1","10","y1","14","x2","20","y2","14","stroke","#7f7f7f","stroke-width","2"],["cx","15","cy","23","r","3","stroke","#7f7f7f","stroke-width","2","fill","#1976d2","fill-opacity","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(o,i){o&1&&(La$1(0,"div",0),rc$1("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),La$1(1,"div",1)(2,"div",2),f_(3,"translate"),ah(),La$1(4,"svg",3),dy(5,"rect",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"circle",8),Rd$1()(),ch(),La$1(10,"div",9),At$1(11),Rd$1(),Re$1(12,s1,6,2,"div",10)(13,l1,2,3,"div",11)(14,c1,2,3,"div",11)(15,d1,2,1,"div",10)(16,p1,3,3,"div",10)(17,m1,3,3,"div",10),Rd$1()()),o&2&&(Cy("accessory-on",i.isOn())("paused","CurrentMediaState"in i.service().values&&i.service().values?.CurrentMediaState===1)("cursor-pointer",i.readyForControl()),ie$1(2),vr$1("aria-label",h_(3,9,"accessories.core.microphone")),ie$1(9),Ny(i.service().customName||i.service().serviceName),ie$1(),Oe("CurrentMediaState"in i.service().values?12:"Active"in i.service().values&&!i.service().values?.Active?13:"Mute"in i.service().values&&i.service().values?.Mute?14:"Volume"in i.service().values?15:s_(11,e1).includes(i.service().customType||i.service().type)?16:17));},dependencies:[ie,K8],encapsulation:2})}return e})();function u1(e,r){e&1&&(ke(0,"div",26),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.detected")));}function f1(e,r){e&1&&(ke(0,"div",27),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Rt(" ",h_(2,1,"accessories.control.not_detected")," "));}var Go=(()=>{class e{service=PH.required();static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-motion-sensor"]],inputs:{service:[1,"service"]},decls:38,vars:15,consts:[[1,"accessory-box"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2",1,"orange-outline"],["transform","translate(7, -0.75), scale(0.075)"],["d","M190.85 83.94C190.85 70.36 180.09 59.24 166.93 59.24C153.78 59.24 143.02 70.36 143.02 83.94C143.02 97.53 153.78 108.65 166.93 108.65C180.09 108.65 190.85 97.53 190.85 83.94Z","fill","#1976d2","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","7"],["d","M232.24 175.95C210.12 175.95 190.98 163.6 180.22 145.69C179.08 143.72 169.99 127.91 168.86 125.93C164.67 118.52 156.9 114.2 148.53 114.2C145.54 114.2 142.55 114.81 139.56 116.05C135.37 117.82 114.45 126.67 76.78 142.6L76.78 200.66L100.69 200.66L100.69 159.28L121.62 150.02L88.73 324.17L113.85 324.17L134.78 225.36L160.49 250.06L160.49 324.17L184.4 324.17L184.4 230.92L159.89 205.6C164.19 183.36 166.59 171.01 167.06 168.54C182.61 188.3 205.93 200.66 232.24 200.66C232.24 195.72 232.24 178.42 232.24 175.95Z","fill","#1976d2","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","7"],["x","9","y","9","width","2","height","1","rx","0.2","stroke","#7f7f7f","fill","#1976d2","fill-opacity","0.25","stroke-width","0.25"],["x","7","y","13","width","3","height","1","rx","0.2","stroke","#7f7f7f","fill","#1976d2","fill-opacity","0.25","stroke-width","0.25"],["x","8","y","17","width","4","height","1","rx","0.2","stroke","#7f7f7f","fill","#1976d2","fill-opacity","0.25","stroke-width","0.25"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","red-text"],["aria-hidden","true",1,"accessory-label","grey-text"]],template:function(o,i){if(o&1&&(Mi(0),f_(1,"translate"),f_(2,"translate"),Mi(3),f_(4,"translate"),Mi(5),f_(6,"lowercase"),f_(7,"lowercase"),ke(8,"div",0)(9,"span",1),At$1(10),Je$1(),ke(11,"div",2)(12,"div",3),ah(),ke(13,"svg",4),Dr$1(14,"rect",5),ke(15,"g",6),Dr$1(16,"path",7)(17,"path",8),Je$1(),Dr$1(18,"rect",9)(19,"rect",10)(20,"rect",11)(21,"line",12)(22,"line",13)(23,"line",14)(24,"line",15)(25,"line",16)(26,"line",17)(27,"line",18)(28,"line",19)(29,"line",20)(30,"line",21)(31,"line",22)(32,"line",23)(33,"line",24),Je$1()(),ch(),ke(34,"div",25),At$1(35),Je$1(),Re$1(36,u1,3,3,"div",26)(37,f1,3,3,"div",27),Je$1()()),o&2){let c=!!i.service().values?.MotionDetected,f=c?h_(1,5,"accessories.control.detected"):h_(2,7,"accessories.control.not_detected"),T=(i.service().customName||i.service().serviceName||"").trim(),P=h_(4,9,"accessories.core.motion_sensor"),O=!h_(6,11,T).includes(h_(7,13,P)),R=`${T+(O?`, ${P}`:"")}, ${f}`;ie$1(8),Cy("accessory-on",c),ie$1(2),Rt(" ",R," "),ie$1(25),Ny(i.service().customName||i.service().serviceName),ie$1(),Oe(c?36:37);}},dependencies:[_S,K8],styles:[".accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .orange-outline[_ngcontent-%COMP%]{stroke:#ff9800;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{stroke-opacity:.8}50%{stroke-opacity:.2}}"]})}return e})();function g1(e,r){e&1&&(ke(0,"div",23),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.detected")));}function v1(e,r){e&1&&(ke(0,"div",24),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Rt(" ",h_(2,1,"accessories.control.not_detected")," "));}var qo=(()=>{class e{service=PH.required();static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-occupancy-sensor"]],inputs:{service:[1,"service"]},decls:35,vars:15,consts:[[1,"accessory-box"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2",1,"orange-outline"],["transform","translate(4.75, -0.75), scale(0.075)"],["d","M190.85 83.94C190.85 70.36 180.09 59.24 166.93 59.24C153.78 59.24 143.02 70.36 143.02 83.94C143.02 97.53 153.78 108.65 166.93 108.65C180.09 108.65 190.85 97.53 190.85 83.94Z","fill","#ff9800","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","7"],["d","M232.24 175.95C210.12 175.95 190.98 163.6 180.22 145.69C179.08 143.72 169.99 127.91 168.86 125.93C164.67 118.52 156.9 114.2 148.53 114.2C145.54 114.2 142.55 114.81 139.56 116.05C135.37 117.82 114.45 126.67 76.78 142.6L76.78 200.66L100.69 200.66L100.69 159.28L121.62 150.02L88.73 324.17L113.85 324.17L134.78 225.36L160.49 250.06L160.49 324.17L184.4 324.17L184.4 230.92L159.89 205.6C164.19 183.36 166.59 171.01 167.06 168.54C182.61 188.3 205.93 200.66 232.24 200.66C232.24 195.72 232.24 178.42 232.24 175.95Z","fill","#ff9800","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","7"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","red-text"],["aria-hidden","true",1,"accessory-label","grey-text"]],template:function(o,i){if(o&1&&(Mi(0),f_(1,"translate"),f_(2,"translate"),Mi(3),f_(4,"translate"),Mi(5),f_(6,"lowercase"),f_(7,"lowercase"),ke(8,"div",0)(9,"span",1),At$1(10),Je$1(),ke(11,"div",2)(12,"div",3),ah(),ke(13,"svg",4),Dr$1(14,"rect",5),ke(15,"g",6),Dr$1(16,"path",7)(17,"path",8),Je$1(),Dr$1(18,"line",9)(19,"line",10)(20,"line",11)(21,"line",12)(22,"line",13)(23,"line",14)(24,"line",15)(25,"line",16)(26,"line",17)(27,"line",18)(28,"line",19)(29,"line",20)(30,"line",21),Je$1()(),ch(),ke(31,"div",22),At$1(32),Je$1(),Re$1(33,g1,3,3,"div",23)(34,v1,3,3,"div",24),Je$1()()),o&2){let c=!!i.service().values?.OccupancyDetected,f=c?h_(1,5,"accessories.control.detected"):h_(2,7,"accessories.control.not_detected"),T=(i.service().customName||i.service().serviceName||"").trim(),P=h_(4,9,"accessories.core.occupancy_sensor"),O=!h_(6,11,T).includes(h_(7,13,P)),R=`${T+(O?`, ${P}`:"")}, ${f}`;ie$1(8),Cy("accessory-on",c),ie$1(2),Rt(" ",R," "),ie$1(22),Ny(i.service().customName||i.service().serviceName),ie$1(),Oe(c?33:34);}},dependencies:[_S,K8],styles:[".accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .orange-outline[_ngcontent-%COMP%]{stroke:#ff9800;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{stroke-opacity:.8}50%{stroke-opacity:.2}}"]})}return e})();function h1(e,r){e&1&&(ah(),dy(0,"line",8)(1,"line",9)(2,"line",10));}function C1(e,r){e&1&&(ah(),dy(0,"line",11)(1,"line",12)(2,"line",13));}function _1(e,r){e&1&&(ah(),dy(0,"line",13)(1,"line",14)(2,"line",15));}function y1(e,r){if(e&1&&At$1(0),e&2){let t=ye$1();Rt(" \xB7 ",t.currentConsumption(),"W ");}}var zo=(()=>{class e{$settings=g(zt$1);service=PH.required();readyForControl=PH(false);browserLang=this.$settings.browserLang;isOn(){let t=this.service().values;return t?"On"in t?!!t.On:"Active"in t?!!t.Active:"CurrentMediaState"in t?[0,1].includes(t.CurrentMediaState):"Mute"in t&&"Volume"in t?!t.Mute&&t.Volume>0:"Mute"in t?!t.Mute:"LockTargetState"in t?!t.LockTargetState:"CurrentDoorState"in t?[0,2].includes(t.CurrentDoorState):false:false}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):"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):"LockTargetState"in this.service().values?this.service().getCharacteristic("LockTargetState").setValue(this.service().values.LockTargetState?0:1):"TargetDoorState"in this.service().values&&this.service().getCharacteristic("TargetDoorState").setValue(this.service().values.TargetDoorState?0:1));}hasCurrentConsumption(){return "Consumption"in this.service().values}currentConsumption(){if(this.hasCurrentConsumption())return this.service().values.Consumption}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-outlet"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:16,vars:13,consts:[["tabindex","0",1,"accessory-box",3,"shortClick"],[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"],["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(o,i){o&1&&(La$1(0,"div",0),rc$1("shortClick",function(){return i.onClick()}),La$1(1,"div",1)(2,"div",2),f_(3,"translate"),ah(),La$1(4,"svg",3),dy(5,"rect",4)(6,"circle",5),Re$1(7,h1,3,0)(8,C1,3,0)(9,_1,3,0),Rd$1()(),ch(),La$1(10,"div",6),At$1(11),Rd$1(),La$1(12,"div",7),At$1(13),f_(14,"translate"),Re$1(15,y1,1,1),Rd$1()()()),o&2&&(Cy("accessory-on",i.isOn())("cursor-pointer",i.readyForControl()),ie$1(2),vr$1("aria-label",h_(3,9,"accessories.core.outlet")),ie$1(5),Oe(i.browserLang==="en-GB"?7:i.browserLang==="en-AU"||i.browserLang==="en-NZ"?8:9),ie$1(4),Ny(i.service().customName||i.service().serviceName),ie$1(2),Rt(" ",h_(14,11,i.isOn()?"accessories.control.on":"accessories.control.off")," "),ie$1(2),Oe(i.isOn()&&i.hasCurrentConsumption()?15:-1));},dependencies:[ie,K8],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})();function x1(e,r){if(e&1&&At$1(0),e&2){let t=ye$1();Rt(" \xB7 ",t.currentConsumption(),"W ");}}var Ko=(()=>{class e{service=PH.required();readyForControl=PH(false);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));}hasCurrentConsumption(){return "Consumption"in this.service().values}currentConsumption(){if(this.hasCurrentConsumption())return this.service().values.Consumption}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-robot-vacuum"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:38,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["id","motionClip"],["x","0","y","-0.5","width","32","height","8"],["transform","translate(0, 5)"],["cx","16","cy","10","rx","14","ry","8.4","stroke","#7f7f7f","stroke-width","1.75","fill","none"],["x1","2","y1","10","x2","2","y2","16","stroke","#7f7f7f","stroke-width","1.75"],["x1","30","y1","10","x2","30","y2","16","stroke","#7f7f7f","stroke-width","1.75"],["d","M2,16 A14,6.9 0 0,0 30,16","stroke","#7f7f7f","stroke-width","1.75","fill","none"],["cx","16","cy","10","rx","4.2","ry","2.5","stroke","#7f7f7f","stroke-width","1","fill","#1976d2","fill-opacity","0.5"],["cx","16","cy","15","r","0.9","fill","#7f7f7f"],["x1","2","y1","16","x2","0.5","y2","18.5","stroke","#7f7f7f","stroke-width","1"],["x1","2","y1","16","x2","0.5","y2","14","stroke","#7f7f7f","stroke-width","1"],["x1","30","y1","16","x2","31.5","y2","18.5","stroke","#7f7f7f","stroke-width","1"],["x1","30","y1","16","x2","31.5","y2","14","stroke","#7f7f7f","stroke-width","1"],["clip-path","url(#motionClip)","stroke","#7f7f7f","stroke-linecap","round",1,"motion-lines"],["x1","12","y1","8","x2","12","y2","14","stroke-width","2.1","opacity","0"],["attributeName","y1","values","8;0","dur","3s","begin","0.3s","repeatCount","indefinite"],["attributeName","y2","values","14;6","dur","3s","begin","0.3s","repeatCount","indefinite"],["attributeName","opacity","values","0;1;1;0","keyTimes","0;0.2;0.8;1","dur","3s","begin","0.3s","repeatCount","indefinite"],["x1","16","y1","8","x2","16","y2","14","stroke-width","2.5","opacity","0"],["attributeName","y1","values","8;0","dur","3s","begin","0.6s","repeatCount","indefinite"],["attributeName","y2","values","14;6","dur","3s","begin","0.6s","repeatCount","indefinite"],["attributeName","opacity","values","0;1;1;0","keyTimes","0;0.2;0.8;1","dur","3s","begin","0.6s","repeatCount","indefinite"],["x1","20","y1","8","x2","20","y2","14","stroke-width","2.1","opacity","0"],["attributeName","y1","values","8;0","dur","3s","begin","0.9s","repeatCount","indefinite"],["attributeName","y2","values","14;6","dur","3s","begin","0.9s","repeatCount","indefinite"],["attributeName","opacity","values","0;1;1;0","keyTimes","0;0.2;0.8;1","dur","3s","begin","0.9s","repeatCount","indefinite"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(La$1(0,"div",0),rc$1("shortClick",function(){return i.onClick()}),La$1(1,"div",1)(2,"div",2),f_(3,"translate"),ah(),La$1(4,"svg",3)(5,"defs")(6,"clipPath",4),dy(7,"rect",5),Rd$1()(),La$1(8,"g",6),dy(9,"ellipse",7)(10,"line",8)(11,"line",9)(12,"path",10)(13,"ellipse",11)(14,"circle",12)(15,"line",13)(16,"line",14)(17,"line",15)(18,"line",16),Rd$1(),La$1(19,"g",17)(20,"line",18),dy(21,"animate",19)(22,"animate",20)(23,"animate",21),Rd$1(),La$1(24,"line",22),dy(25,"animate",23)(26,"animate",24)(27,"animate",25),Rd$1(),La$1(28,"line",26),dy(29,"animate",27)(30,"animate",28)(31,"animate",29),Rd$1()()()(),ch(),La$1(32,"div",30),At$1(33),Rd$1(),La$1(34,"div",31),At$1(35),f_(36,"translate"),Re$1(37,x1,1,1),Rd$1()()()),o&2&&(Cy("accessory-on",i.service().values?.On||i.service().values?.Active)("cursor-pointer",i.readyForControl()),ie$1(2),vr$1("aria-label",h_(3,8,"accessories.core.robot_vacuum")),ie$1(31),Ny(i.service().customName||i.service().serviceName),ie$1(2),Rt(" ",h_(36,10,i.service().values?.On||i.service().values?.Active?"accessories.control.on":"accessories.control.off")," "),ie$1(2),Oe((i.service().values?.On||i.service().values?.Active)&&i.hasCurrentConsumption()?37:-1));},dependencies:[ie,K8],styles:[".motion-lines[_ngcontent-%COMP%]{display:none}.accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .motion-lines[_ngcontent-%COMP%]{display:inline!important}"]})}return e})();function S1(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.triggered")," ");}function k1(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.arming"),"... ");}function M1(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.disarming"),"... ");}function T1(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.off")," ");}function b1(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.ready")," ");}function B1(e,r){if(e&1){let t=nc$1();ke(0,"button",10),_i("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setTargetMode(3,i))}),ke(1,"div",11),Dr$1(2,"i",12),Je$1(),At$1(3),f_(4,"translate"),ke(5,"div",13),Dr$1(6,"i",14),Je$1()();}if(e&2){let t=ye$1();ie$1(2),Cy("fa-check-circle",t.targetMode===3)("fa-blank",t.targetMode!==3)("opacity-muted",t.service.values?.SecuritySystemCurrentState===4),ie$1(),Rt(" ",h_(4,7,"accessories.control.off")," ");}}function w1(e,r){if(e&1){let t=nc$1();ke(0,"button",10),_i("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setTargetMode(0,i))}),ke(1,"div",11),Dr$1(2,"i",12),Je$1(),At$1(3),f_(4,"translate"),ke(5,"div",13),Dr$1(6,"i",14),Je$1()();}if(e&2){let t=ye$1();ie$1(2),Cy("fa-check-circle",t.targetMode===0)("fa-blank",t.targetMode!==0)("opacity-muted",t.service.values?.SecuritySystemCurrentState===4),ie$1(),Rt(" ",h_(4,7,"accessories.control.home")," ");}}function E1(e,r){if(e&1){let t=nc$1();ke(0,"button",10),_i("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setTargetMode(1,i))}),ke(1,"div",11),Dr$1(2,"i",12),Je$1(),At$1(3),f_(4,"translate"),ke(5,"div",13),Dr$1(6,"i",14),Je$1()();}if(e&2){let t=ye$1();ie$1(2),Cy("fa-check-circle",t.targetMode===1)("fa-blank",t.targetMode!==1)("opacity-muted",t.service.values?.SecuritySystemCurrentState===4),ie$1(),Rt(" ",h_(4,7,"accessories.control.away")," ");}}function D1(e,r){if(e&1){let t=nc$1();ke(0,"button",10),_i("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setTargetMode(2,i))}),ke(1,"div",11),Dr$1(2,"i",12),Je$1(),At$1(3),f_(4,"translate"),ke(5,"div",13),Dr$1(6,"i",14),Je$1()();}if(e&2){let t=ye$1();ie$1(2),Cy("fa-check-circle",t.targetMode===2)("fa-blank",t.targetMode!==2)("opacity-muted",t.service.values?.SecuritySystemCurrentState===4),ie$1(),Rt(" ",h_(4,7,"accessories.control.night")," ");}}var Yo=(()=>{class e extends me{targetMode;targetModeValidValues=[];isArming=false;isDisarming=false;setupComponent(){this.targetMode=this.service.values.SecuritySystemTargetState,this.targetModeValidValues=this.service.getCharacteristic("SecuritySystemTargetState").validValues,this.updateTransitionState();}handleAccessoryUpdate(){this.targetMode=this.service.values.SecuritySystemTargetState,this.updateTransitionState();}updateTransitionState(){let t=this.service.values.SecuritySystemCurrentState,o=this.service.values.SecuritySystemTargetState;this.isArming=t!==o&&o!==3&&t!==4,this.isDisarming=t!==o&&o===3&&t!==4;}setTargetMode(t,o){this.targetMode=t,this.service.getCharacteristic("SecuritySystemTargetState").setValue(this.targetMode),this.blurTarget(o);}static \u0275fac=(()=>{let t;return function(i){return (t||(t=_n(e)))(i||e)}})();static \u0275cmp=Ja$1({type:e,selectors:[["app-security-system-manage"]],features:[Xa$1],decls:20,vars:14,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-4","p-0"],[1,"mb-0","mx-0","p-3","btn-read","w-100"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control"],[1,"modal-footer"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"]],template:function(o,i){o&1&&(ke(0,"div",0)(1,"div",1),Dr$1(2,"h5",2),ke(3,"button",3),f_(4,"translate"),_i("click",function(){return i.dismissModal()}),Je$1()(),ke(5,"div",4)(6,"div",5)(7,"div",6),Re$1(8,S1,2,3)(9,k1,2,3)(10,M1,2,3)(11,T1,2,3)(12,b1,2,3),Je$1()(),ke(13,"div",7),f_(14,"translate"),Re$1(15,B1,7,9,"button",8),Re$1(16,w1,7,9,"button",8),Re$1(17,E1,7,9,"button",8),Re$1(18,D1,7,9,"button",8),Je$1()(),Dr$1(19,"div",9),Je$1()),o&2&&(ie$1(2),bi("innerText",i.service.customName||i.service.serviceName),ie$1(),vr$1("aria-label",h_(4,10,"form.button_close")),ie$1(4),Cy("text-danger",i.service.values?.SecuritySystemCurrentState===4),ie$1(),Oe(i.service.values?.SecuritySystemCurrentState===4?8:i.isArming?9:i.isDisarming?10:i.service.values?.SecuritySystemCurrentState===3?11:12),ie$1(5),vr$1("aria-label",h_(14,12,"accessories.control.mode_control")),ie$1(2),Oe(i.targetModeValidValues.includes(3)?15:-1),ie$1(),Oe(i.targetModeValidValues.includes(0)?16:-1),ie$1(),Oe(i.targetModeValidValues.includes(1)?17:-1),ie$1(),Oe(i.targetModeValidValues.includes(2)?18:-1));},dependencies:[Kn,K8],encapsulation:2})}return e})();function A1(e,r){e&1&&(La$1(0,"div",10),At$1(1),f_(2,"translate"),Rd$1()),e&2&&(ie$1(),Rt("",h_(2,1,"accessories.control.arming"),"..."));}function P1(e,r){e&1&&(La$1(0,"div",11),At$1(1),f_(2,"translate"),Rd$1()),e&2&&(ie$1(),Rt("",h_(2,1,"accessories.control.disarming"),"..."));}function F1(e,r){e&1&&(La$1(0,"div",11),At$1(1),f_(2,"translate"),Rd$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.home")));}function O1(e,r){e&1&&(La$1(0,"div",11),At$1(1),f_(2,"translate"),Rd$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.away")));}function I1(e,r){e&1&&(La$1(0,"div",11),At$1(1),f_(2,"translate"),Rd$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.night")));}function L1(e,r){e&1&&(La$1(0,"div",10),At$1(1),f_(2,"translate"),Rd$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.off")));}function V1(e,r){e&1&&(La$1(0,"div",10),At$1(1),f_(2,"translate"),Rd$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.triggered")));}function N1(e,r){if(e&1&&Re$1(0,F1,3,3,"div",11)(1,O1,3,3,"div",11)(2,I1,3,3,"div",11)(3,L1,3,3,"div",10)(4,V1,3,3,"div",10),e&2){let t,o=ye$1();Oe((t=o.service().values?.SecuritySystemCurrentState)===0?0:t===1?1:t===2?2:t===3?3:t===4?4:-1);}}var Qo=(()=>{class e{$accessories=g(le);injector=g(we);$modal=g(si);service=PH.required();readyForControl=PH(false);isArming=X(()=>{let t=this.service().values?.SecuritySystemCurrentState,o=this.service().values?.SecuritySystemTargetState;return t!==o&&o!==3&&t!==4});isDisarming=X(()=>{let t=this.service().values?.SecuritySystemCurrentState,o=this.service().values?.SecuritySystemTargetState;return t!==o&&o===3&&t!==4});onClick(){if(!this.readyForControl())return;let t=ty([{provide:ce,useValue:{service:this.service(),$accessories:this.$accessories}}],this.injector);this.$modal.open(Yo,{size:"md",backdrop:"static",injector:t});}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-security-system"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:15,vars:17,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32","height","32","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["d","M7 18 C7 5, 25 5, 25 18 V26 H7 V18 Z","fill","none","stroke","#7f7f7f","stroke-width","1.5","fill-opacity","0.5",1,"dome"],["x","2","y","26","width","28","height","4","fill","none","stroke","#7f7f7f","stroke-width","1.5","rx","1"],["x1","6","y1","3","x2","10","y2","7","stroke-width","3",1,"ray"],["x1","16","y1","0","x2","16","y2","5","stroke-width","3",1,"ray"],["x1","26","y1","3","x2","22","y2","7","stroke-width","3",1,"ray"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(La$1(0,"div",0),rc$1("longClick",function(){return i.onClick()})("shortClick",function(){return i.onClick()}),La$1(1,"div",1)(2,"div",2),f_(3,"translate"),ah(),La$1(4,"svg",3),dy(5,"path",4)(6,"rect",5)(7,"line",6)(8,"line",7)(9,"line",8),Rd$1()(),ch(),La$1(10,"div",9),At$1(11),Rd$1(),Re$1(12,A1,3,3,"div",10)(13,P1,3,3,"div",11)(14,N1,5,1),Rd$1()()),o&2&&(Cy("accessory-on",i.service().values?.SecuritySystemCurrentState!==3||i.isDisarming())("home",i.service().values?.SecuritySystemCurrentState===0&&!i.isArming())("away",i.service().values?.SecuritySystemCurrentState===1&&!i.isArming())("night",i.service().values?.SecuritySystemCurrentState===2&&!i.isArming())("triggered",i.service().values?.SecuritySystemCurrentState===4)("cursor-pointer",i.readyForControl()),ie$1(2),vr$1("aria-label",h_(3,15,"accessories.core.security_system")),ie$1(9),Ny(i.service().customName||i.service().serviceName),ie$1(),Oe(i.isArming()?12:i.isDisarming()?13:14));},dependencies:[ie,K8],styles:[".home[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .dome[_ngcontent-%COMP%]{fill:#1976d2!important}.away[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .dome[_ngcontent-%COMP%]{fill:#ff9800!important}.night[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .dome[_ngcontent-%COMP%]{fill:#673ab7!important}.triggered[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .dome[_ngcontent-%COMP%]{fill:#d32f2f!important}.triggered[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .ray[_ngcontent-%COMP%]{stroke:#d32f2f;stroke-opacity:.5;animation:_ngcontent-%COMP%_blink 1s infinite}@keyframes _ngcontent-%COMP%_blink{0%,to{stroke-opacity:1}50%{stroke-opacity:.2}}"]})}return e})();function H1(e,r){e&1&&(ke(0,"div",18),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.detected")));}function R1(e,r){e&1&&(ke(0,"div",19),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Rt(" ",h_(2,1,"accessories.control.not_detected")," "));}var Zo=(()=>{class e{service=PH.required();static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-smoke-sensor"]],inputs:{service:[1,"service"]},decls:31,vars:15,consts:[[1,"accessory-box"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["x","1","y","1","width","30","height","12","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.25"],["text-anchor","middle","dominant-baseline","middle","font-family","Arial","font-size","7.5","x","16","y","7.7","fill","#7f7f7f","stroke-width","0.6","font-weight","900",1,"type"],["x1","6","y1","14.5","x2","25.5","y2","14.5","stroke","#1976d2","stroke-opacity","0.5","stroke-width","2"],["stroke-linecap","round","x1","5","y1","13","x2","6.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","11","y1","13","x2","11","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","15.5","y1","13","x2","15.5","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","20","y1","13","x2","20","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","26","y1","13","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","6.5","y1","16","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","11","y1","21","x2","6","y2","27","stroke","#7f7f7f","stroke-width","1.25",1,"air-line"],["stroke-linecap","round","x1","16","y1","21","x2","16","y2","31","stroke","#7f7f7f","stroke-width","1.25",1,"air-line"],["stroke-linecap","round","x1","21","y1","21","x2","26","y2","27","stroke","#7f7f7f","stroke-width","1.25",1,"air-line"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","red-text"],["aria-hidden","true",1,"accessory-label","grey-text"]],template:function(o,i){if(o&1&&(Mi(0),f_(1,"translate"),f_(2,"translate"),Mi(3),f_(4,"translate"),Mi(5),f_(6,"lowercase"),f_(7,"lowercase"),ke(8,"div",0)(9,"span",1),At$1(10),Je$1(),ke(11,"div",2)(12,"div",3),ah(),ke(13,"svg",4),Dr$1(14,"rect",5),ke(15,"text",6),At$1(16," SMOKE "),Je$1(),Dr$1(17,"line",7)(18,"line",8)(19,"line",9)(20,"line",10)(21,"line",11)(22,"line",12)(23,"line",13)(24,"line",14)(25,"line",15)(26,"line",16),Je$1()(),ch(),ke(27,"div",17),At$1(28),Je$1(),Re$1(29,H1,3,3,"div",18)(30,R1,3,3,"div",19),Je$1()()),o&2){let c=!!i.service().values?.SmokeDetected,f=c?h_(1,5,"accessories.control.detected"):h_(2,7,"accessories.control.not_detected"),T=(i.service().customName||i.service().serviceName||"").trim(),P=h_(4,9,"accessories.core.smoke_sensor"),O=!h_(6,11,T).includes(h_(7,13,P)),R=`${T+(O?`, ${P}`:"")}, ${f}`;ie$1(8),Cy("accessory-on",c),ie$1(2),Rt(" ",R," "),ie$1(18),Ny(i.service().customName||i.service().serviceName),ie$1(),Oe(c?29:30);}},dependencies:[_S,K8],styles:[".accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .air-line[_ngcontent-%COMP%]{stroke:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}.accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .type[_ngcontent-%COMP%]{fill:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{opacity:1}50%{opacity:.2}}"]})}return e})();function $1(e,r){if(e&1){let t=nc$1();La$1(0,"div",5),f_(1,"translate"),La$1(2,"button",7),rc$1("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setActive(0,i))}),La$1(3,"div",8),dy(4,"i",9),Rd$1(),At$1(5),f_(6,"translate"),La$1(7,"div",10),dy(8,"i",11),Rd$1()(),La$1(9,"button",7),rc$1("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setActive(1,i))}),La$1(10,"div",8),dy(11,"i",9),Rd$1(),At$1(12),f_(13,"translate"),La$1(14,"div",10),dy(15,"i",11),Rd$1()()();}if(e&2){let t=ye$1();vr$1("aria-label",h_(1,11,"accessories.control.mode_control")),ie$1(4),Cy("fa-check-circle",t.service.values?.Active===0)("fa-blank",t.service.values?.Active!==0),ie$1(),Rt(" ",h_(6,13,"accessories.control.off")," "),ie$1(6),Cy("fa-check-circle",t.service.values?.Active===1)("fa-blank",t.service.values?.Active!==1),ie$1(),Rt(" ",h_(13,15,"accessories.control.on")," ");}}function U1(e,r){if(e&1){let t=nc$1();La$1(0,"div",5),f_(1,"translate"),La$1(2,"button",7),rc$1("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setTargetState(0,i))}),La$1(3,"div",8),dy(4,"i",9),Rd$1(),At$1(5),f_(6,"translate"),La$1(7,"div",10),dy(8,"i",11),Rd$1()(),La$1(9,"button",7),rc$1("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setTargetState(1,i))}),La$1(10,"div",8),dy(11,"i",9),Rd$1(),At$1(12),f_(13,"translate"),La$1(14,"div",10),dy(15,"i",11),Rd$1()(),La$1(16,"button",7),rc$1("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setTargetState(2,i))}),La$1(17,"div",8),dy(18,"i",9),Rd$1(),At$1(19),f_(20,"translate"),La$1(21,"div",10),dy(22,"i",11),Rd$1()()();}if(e&2){let t=ye$1();vr$1("aria-label",h_(1,16,"accessories.control.media_control")),ie$1(4),Cy("fa-check-circle",t.service.values?.CurrentMediaState===0)("fa-blank",t.service.values?.CurrentMediaState!==0),ie$1(),Rt(" ",h_(6,18,"accessories.control.play")," "),ie$1(6),Cy("fa-check-circle",t.service.values?.CurrentMediaState===1)("fa-blank",t.service.values?.CurrentMediaState!==1),ie$1(),Rt(" ",h_(13,20,"accessories.control.pause")," "),ie$1(6),Cy("fa-check-circle",t.service.values?.CurrentMediaState===2)("fa-blank",t.service.values?.CurrentMediaState!==2),ie$1(),Rt(" ",h_(20,22,"accessories.control.stop")," ");}}function W1(e,r){if(e&1){let t=nc$1();La$1(0,"h6"),At$1(1),f_(2,"translate"),Rd$1(),La$1(3,"div",12),f_(4,"translate"),La$1(5,"button",7),rc$1("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setTargetMode(false,i))}),La$1(6,"div",8),dy(7,"i",9),Rd$1(),At$1(8),f_(9,"translate"),La$1(10,"div",10),dy(11,"i",11),Rd$1()(),La$1(12,"button",7),rc$1("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setTargetMode(true,i))}),La$1(13,"div",8),dy(14,"i",9),Rd$1(),At$1(15),f_(16,"translate"),La$1(17,"div",10),dy(18,"i",11),Rd$1()()();}if(e&2){let t=ye$1();ie$1(),Rt(" ",h_(2,12,"Active"in t.service.values||"TargetMediaState"in t.service.values?"accessories.control.speaker_volume":"menu.label_status")," "),ie$1(2),vr$1("aria-label",h_(4,14,"accessories.control.mute_control")),ie$1(4),Cy("fa-check-circle",!t.targetMode)("fa-blank",t.targetMode),ie$1(),Rt(" ",h_(9,16,"accessories.control.not_mute")," "),ie$1(6),Cy("fa-check-circle",t.targetMode)("fa-blank",!t.targetMode),ie$1(),Rt(" ",h_(16,18,"accessories.control.mute")," ");}}function j1(e,r){if(e&1){let t=nc$1();La$1(0,"h6",13),At$1(1),f_(2,"translate"),Rd$1(),La$1(3,"nouislider",14),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1();return t_(c.targetVolume.value,i)||(c.targetVolume.value=i),Wo$1(i)}),rc$1("ngModelChange",function(){Go$1(t);let i=ye$1();return Wo$1(i.onVolumeStateChange())}),Rd$1(),KC();}if(e&2){let t=ye$1();ie$1(),xy("",h_(2,6,"accessories.control.speaker_volume"),": ",t.targetVolume.value,"%"),ie$1(2),ly("min",t.targetVolume.min)("max",t.targetVolume.max)("step",t.targetVolume.step),ky("ngModel",t.targetVolume.value),JC();}}var Jo=(()=>{class e extends me{targetMode;targetVolume;targetVolumeChanged=new $$1;setupComponent(){this.createDebouncedSubscription(this.targetVolumeChanged,()=>{this.service.getCharacteristic("Volume").setValue(this.targetVolume.value);}),this.targetMode=this.service.values.Mute,this.loadTargetVolume();}handleAccessoryUpdate(){this.targetMode=this.service.values.Mute,this.targetVolume&&"Volume"in this.service.values&&(this.targetVolume.value=this.service.getCharacteristic("Volume").value);}setTargetMode(t,o){this.targetMode=t,this.service.getCharacteristic("Mute").setValue(this.targetMode),this.blurTarget(o);}setActive(t,o){this.service.getCharacteristic("Active").setValue(t),this.blurTarget(o);}setTargetState(t,o){this.service.getCharacteristic("TargetMediaState").setValue(t),this.blurTarget(o);}onVolumeStateChange(){this.targetVolumeChanged.next(this.targetVolume.value);}loadTargetVolume(){let t=this.service.getCharacteristic("Volume");t&&(this.targetVolume={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},this.applySliderGradient("linear-gradient(to right, #ffffff, #ffd966, #ff0000)"));}static \u0275fac=(()=>{let t;return function(i){return (t||(t=_n(e)))(i||e)}})();static \u0275cmp=Ja$1({type:e,selectors:[["app-speaker-manage"]],features:[Xa$1],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"],[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(o,i){o&1&&(La$1(0,"div",0)(1,"div",1),dy(2,"h5",2),La$1(3,"button",3),f_(4,"translate"),rc$1("click",function(){return i.dismissModal()}),Rd$1()(),La$1(5,"div",4),Re$1(6,$1,16,17,"div",5)(7,U1,23,24,"div",5),Re$1(8,W1,19,20),Re$1(9,j1,4,8),Rd$1(),dy(10,"div",6),Rd$1()),o&2&&(ie$1(2),ly("innerText",i.service.customName||i.service.serviceName),ie$1(),vr$1("aria-label",h_(4,5,"form.button_close")),ie$1(3),Oe("Active"in i.service.values?6:"TargetMediaState"in i.service.values?7:-1),ie$1(2),Oe("Mute"in i.service.values?8:-1),ie$1(),Oe(i.targetVolume?9:-1));},dependencies:[Kn,Hn,ln,ye,K8],encapsulation:2})}return e})();var G1=()=>["Speaker","SmartSpeaker"];function q1(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.playing")," ");}function z1(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.paused")," ");}function K1(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.stopped")," ");}function Y1(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" \xB7 ",h_(1,1,"accessories.control.mute")," ");}function Q1(e,r){if(e&1&&At$1(0),e&2){let t=ye$1(3);Rt(" \xB7 ",t.service().values?.Volume,"% ");}}function Z1(e,r){if(e&1&&Re$1(0,Q1,1,1),e&2){let t=ye$1(2);Oe("Volume"in t.service().values?0:-1);}}function J1(e,r){if(e&1&&(La$1(0,"div",14),Re$1(1,q1,2,3)(2,z1,2,3)(3,K1,2,3),Re$1(4,Y1,2,3)(5,Z1,1,1),Rd$1()),e&2){let t,o=ye$1();ie$1(),Oe((t=o.service().values?.CurrentMediaState)===0?1:t===1?2:t===2?3:-1),ie$1(3),Oe("Mute"in o.service().values&&o.service().values?.Mute?4:5);}}function X1(e,r){e&1&&(dy(0,"div",15),f_(1,"translate")),e&2&&ly("innerText",h_(1,1,"accessories.control.off"));}function ep(e,r){e&1&&(dy(0,"div",15),f_(1,"translate")),e&2&&ly("innerText",h_(1,1,"accessories.control.mute"));}function tp(e,r){if(e&1&&(La$1(0,"div",14),At$1(1),Rd$1()),e&2){let t=ye$1();ie$1(),Rt("",t.service().values?.Volume,"%");}}function ip(e,r){e&1&&(La$1(0,"div",14),At$1(1),f_(2,"translate"),Rd$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.on")));}function np(e,r){e&1&&(La$1(0,"div",14),At$1(1),f_(2,"translate"),Rd$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.speaker")));}var Xo=(()=>{class e{$accessories=g(le);injector=g(we);$modal=g(si);service=PH.required();readyForControl=PH(false);isOn(){let t=this.service().values;return "On"in t?!!t?.On:"Active"in t?!!t?.Active:"CurrentMediaState"in t?[0,1].includes(t?.CurrentMediaState):"Mute"in t&&"Volume"in t?!t?.Mute&&t?.Volume>0:"Mute"in t&&!t?.Mute}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: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=ty([{provide:ce,useValue:{service:this.service(),$accessories:this.$accessories}}],this.injector);this.$modal.open(Jo,{size:"md",backdrop:"static",injector:t});}}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-speaker"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:22,vars:14,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","6","y","1","width","20","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1"],["cx","16","cy","9","r","4.5","stroke","#7f7f7f","stroke-width","0","fill","#7f7f7f"],["cx","16","cy","9","r","1.5","stroke","#7f7f7f","stroke-width","0","fill","#e1e1e1",1,"inner"],["cx","16","cy","22","r","6","stroke","#7f7f7f","stroke-width","0","fill","#7f7f7f"],["cx","16","cy","22","r","2","stroke","#7f7f7f","stroke-width","0","fill","#e1e1e1",1,"inner"],["d","M4,12 Q1,16 4,20","stroke","#1976d2","fill","none","stroke-width","1","stroke-opacity","0",1,"wave-inner"],["d","M3,10 Q-2,16 3,22","stroke","#1976d2","fill","none","stroke-width","1","stroke-opacity","0",1,"wave-outer"],["d","M28,12 Q31,16 28,20","stroke","#1976d2","fill","none","stroke-width","1","stroke-opacity","0",1,"wave-inner"],["d","M29,10 Q34,16 29,22","stroke","#1976d2","fill","none","stroke-width","1","stroke-opacity","0",1,"wave-outer"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(o,i){o&1&&(La$1(0,"div",0),rc$1("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),La$1(1,"div",1)(2,"div",2),f_(3,"translate"),ah(),La$1(4,"svg",3),dy(5,"rect",4)(6,"circle",5)(7,"circle",6)(8,"circle",7)(9,"circle",8)(10,"path",9)(11,"path",10)(12,"path",11)(13,"path",12),Rd$1()(),ch(),La$1(14,"div",13),At$1(15),Rd$1(),Re$1(16,J1,6,2,"div",14)(17,X1,2,3,"div",15)(18,ep,2,3,"div",15)(19,tp,2,1,"div",14)(20,ip,3,3,"div",14)(21,np,3,3,"div",14),Rd$1()()),o&2&&(Cy("accessory-on",i.isOn())("paused","CurrentMediaState"in i.service().values&&i.service().values?.CurrentMediaState===1)("muted","Mute"in i.service().values&&i.service().values?.Mute)("cursor-pointer",i.readyForControl()),ie$1(2),vr$1("aria-label",h_(3,11,"accessories.core.speaker")),ie$1(13),Ny(i.service().customName||i.service().serviceName),ie$1(),Oe("CurrentMediaState"in i.service().values?16:"Active"in i.service().values&&!i.service().values?.Active?17:"Mute"in i.service().values&&i.service().values?.Mute?18:"Volume"in i.service().values?19:s_(13,G1).includes(i.service().customType||i.service().type)?20:21));},dependencies:[ie,K8],styles:[".accessory-on[_ngcontent-%COMP%]:not(.paused):not(.muted) svg[_ngcontent-%COMP%] .wave-inner[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_pulse-inner 2s infinite}.accessory-on[_ngcontent-%COMP%]:not(.paused):not(.muted) svg[_ngcontent-%COMP%] .wave-outer[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_pulse-outer 2s infinite}@keyframes _ngcontent-%COMP%_pulse-inner{0%{stroke-opacity:.5}50%{stroke-opacity:1}to{stroke-opacity:.5}}@keyframes _ngcontent-%COMP%_pulse-outer{0%{stroke-opacity:.3}50%{stroke-opacity:.8}to{stroke-opacity:.3}}body.dark-mode[_ngcontent-%COMP%] div.accessory-box[_ngcontent-%COMP%]:not(.accessory-on) svg[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%]{fill:#2b2b2b!important}"]})}return e})();var er=(()=>{class e{service=PH.required();static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-stateless-programmable-switch"]],inputs:{service:[1,"service"]},decls:17,vars:13,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","1","y","1","width","30","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","2"],["cx","8.5","cy","9.5","r","5","stroke","#7f7f7f","stroke-width","1","fill","none","fill-opacity","0.5",1,"single"],["cx","23.5","cy","9.5","r","5","stroke","#7f7f7f","stroke-width","1","fill","none","fill-opacity","0.5",1,"double"],["cx","23.5","cy","9.5","r","3","stroke","#7f7f7f","stroke-width","1","fill","none"],["cx","16","cy","23.5","r","5","stroke","#7f7f7f","stroke-width","1","fill","none","fill-opacity","0.5",1,"long"],["x1","5","y1","23.5","x2","11","y2","23.5","stroke","#7f7f7f","stroke-width","0.5","stroke-linecap","round"],["x1","21","y1","23.5","x2","27","y2","23.5","stroke","#7f7f7f","stroke-width","0.5","stroke-linecap","round"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(ke(0,"div",0)(1,"div",1)(2,"div",2),f_(3,"translate"),ah(),ke(4,"svg",3),Dr$1(5,"rect",4)(6,"circle",5)(7,"circle",6)(8,"circle",7)(9,"circle",8)(10,"line",9)(11,"line",10),Je$1()(),ch(),ke(12,"div",11),At$1(13),Je$1(),ke(14,"div",12),At$1(15),f_(16,"translate"),Je$1()()()),o&2&&(Cy("press-single",i.service().values?.ProgrammableSwitchEvent===0)("press-double",i.service().values?.ProgrammableSwitchEvent===1)("press-long",i.service().values?.ProgrammableSwitchEvent===2),ie$1(2),vr$1("aria-label",h_(3,9,"accessories.core.stateless_programmable_switch")),ie$1(11),Ny(i.service().customName||i.service().serviceName),ie$1(2),Ny(h_(16,11,"accessories.control.stateless")));},dependencies:[K8],styles:[".press-single[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .single[_ngcontent-%COMP%]{fill:#1976d2!important}.press-double[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .double[_ngcontent-%COMP%]{fill:#1976d2!important}.press-long[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .long[_ngcontent-%COMP%]{fill:#1976d2!important}"]})}return e})();function op(e,r){if(e&1&&At$1(0),e&2){let t=ye$1();Rt(" \xB7 ",t.currentConsumption(),"W ");}}var tr=(()=>{class e{service=PH.required();readyForControl=PH(false);isOn(){let t=this.service().values;return t?"On"in t?!!t.On:"Active"in t?!!t.Active:"CurrentMediaState"in t?[0,1].includes(t.CurrentMediaState):"Mute"in t&&"Volume"in t?!t.Mute&&t.Volume>0:"Mute"in t?!t.Mute:"LockTargetState"in t?!t.LockTargetState:"CurrentDoorState"in t?[0,2].includes(t.CurrentDoorState):false:false}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):"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):"LockTargetState"in this.service().values?this.service().getCharacteristic("LockTargetState").setValue(this.service().values.LockTargetState?0:1):"TargetDoorState"in this.service().values&&this.service().getCharacteristic("TargetDoorState").setValue(this.service().values.TargetDoorState?0:1));}hasCurrentConsumption(){return "Consumption"in this.service().values}currentConsumption(){if(this.hasCurrentConsumption())return this.service().values.Consumption}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-switch"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:23,vars:22,consts:[["role","switch","tabindex","0",1,"accessory-box",3,"shortClick","keydown.enter","keydown.space"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["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
C21,9.97698687 21.1735519,10.8351 21.4589326,11.2029426
C22.4505994,12.4811551 23,14.065977 23,15.7447101
C23,19.7640218 19.8532802,23 16,23
C12.1467198,23 9,19.7640218 9,15.7447101
C9,14.0415493 9.56560927,12.4352187 10.5838497,11.1483389
C10.8725653,10.7834523 11,9.9670534 10.5,9.49999999
C10,9.03294657 9.01543812,9.9073372 9.01543812,9.9073372
C7.75536735,11.4998488 7,13.5315645 7,15.7447101
C7,20.8562656 11.0294373,25 16,25
C20.9705627,25 25,20.8562656 25,15.7447101
C25,13.5637007 24.2664101,11.5588905 23.0391328,9.97698685
C23.0391328,9.97698685 21.9178658,9.0230131 21.4589329,9.49999998 Z`],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","grey-text"]],template:function(o,i){if(o&1&&(Mi(0),f_(1,"translate"),f_(2,"translate"),Mi(3),f_(4,"translate"),Mi(5),f_(6,"lowercase"),f_(7,"lowercase"),La$1(8,"div",0),rc$1("shortClick",function(){return i.onClick()})("keydown.enter",function(){return i.onClick()})("keydown.space",function(){return i.onClick()}),La$1(9,"span",1),At$1(10),Rd$1(),La$1(11,"div",2)(12,"div",3),ah(),La$1(13,"svg",4),dy(14,"circle",5)(15,"line",6)(16,"path",7),Rd$1()(),ch(),La$1(17,"div",8),At$1(18),Rd$1(),La$1(19,"div",9),At$1(20),f_(21,"translate"),Re$1(22,op,1,1),Rd$1()()()),o&2){let c=i.isOn(),f=c?h_(1,10,"accessories.control.on"):h_(2,12,"accessories.control.off"),T=(i.service().customName||i.service().serviceName||"").trim(),P=h_(4,14,"accessories.core.switch"),O=!h_(6,16,T).includes(h_(7,18,P)),R=`${T+(O?`, ${P}`:"")}, ${f}`;ie$1(8),Cy("accessory-on",c)("cursor-pointer",i.readyForControl()),vr$1("aria-checked",c)("aria-label",R),ie$1(2),Rt(" ",R," "),ie$1(8),Ny(i.service().customName||i.service().serviceName),ie$1(2),Rt(" ",h_(21,20,c?"accessories.control.on":"accessories.control.off")," "),ie$1(2),Oe(c&&i.hasCurrentConsumption()?22:-1);}},dependencies:[ie,_S,K8],styles:[".accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]{stroke:#1976d2;stroke-opacity:.75;stroke-width:2.5}.accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] line[_ngcontent-%COMP%]{stroke:#1976d2;stroke-opacity:.75}.accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:#1976d2;fill-opacity:.75}"]})}return e})();function rp(e,r){if(e&1){let t=nc$1();ke(0,"div",7),f_(1,"translate"),ke(2,"button",8),_i("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setActive(0,i))}),ke(3,"div",9),Dr$1(4,"i",10),Je$1(),At$1(5),f_(6,"translate"),ke(7,"div",11),Dr$1(8,"i",12),Je$1()(),ke(9,"button",8),_i("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setActive(1,i))}),ke(10,"div",9),Dr$1(11,"i",10),Je$1(),At$1(12),f_(13,"translate"),ke(14,"div",11),Dr$1(15,"i",12),Je$1()()();}if(e&2){let t=ye$1();Cy("mb-4",t.sourceList.length)("mb-0",!t.sourceList.length),vr$1("aria-label",h_(1,15,"accessories.control.mode_control")),ie$1(4),Cy("fa-check-circle",t.service.values?.Active===0)("fa-blank",t.service.values?.Active!==0),ie$1(),Rt(" ",h_(6,17,"accessories.control.off")," "),ie$1(6),Cy("fa-check-circle",t.service.values?.Active===1)("fa-blank",t.service.values?.Active!==1),ie$1(),Rt(" ",h_(13,19,"accessories.control.on")," ");}}function ap(e,r){e&1&&(ke(0,"h6"),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.input")));}function sp(e,r){if(e&1){let t=nc$1();ke(0,"button",8),_i("click",function(i){let c=Go$1(t).$implicit,f=ye$1(2);return Wo$1(f.setInput(c.identifier,i))}),ke(1,"div",9),Dr$1(2,"i",10),Je$1(),At$1(3),ke(4,"div",11),Dr$1(5,"i",12),Je$1()();}if(e&2){let t=r.$implicit,o=ye$1(2);ie$1(2),Cy("fa-check-circle",o.service.values?.ActiveIdentifier===t.identifier)("fa-blank",o.service.values?.ActiveIdentifier!==t.identifier),ie$1(),Rt(" ",t.name," ");}}function lp(e,r){if(e&1&&(Re$1(0,ap,3,3,"h6"),ke(1,"div",13),f_(2,"translate"),dT(3,sp,6,5,"button",14,lT),Je$1()),e&2){let t=ye$1();Oe(t.hasActive?0:-1),ie$1(),vr$1("aria-label",h_(2,2,"accessories.control.input_control")),ie$1(2),fT(t.sourceList);}}var ir=(()=>{class e extends me{hasActive=false;sourceList=[];setupComponent(){if("Active"in this.service.values&&(this.hasActive=true),this.service.linkedServices)for(let[,t]of Object.entries(this.service.linkedServices))t.type==="InputSource"&&this.sourceList.push({identifier:t.values.Identifier,name:t.values.ConfiguredName||`Input ${t.values.Identifier}`});}handleAccessoryUpdate(){"Active"in this.service.values&&(this.hasActive=true);}setActive(t,o){this.service.getCharacteristic("Active").setValue(t),this.blurTarget(o);}setInput(t,o){this.service.getCharacteristic("ActiveIdentifier").setValue(t),this.blurTarget(o);}static \u0275fac=(()=>{let t;return function(i){return (t||(t=_n(e)))(i||e)}})();static \u0275cmp=Ja$1({type:e,selectors:[["app-television-manage"]],features:[Xa$1],decls:9,vars:6,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0",3,"mb-4","mb-0"],[1,"modal-footer"],["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"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control"]],template:function(o,i){o&1&&(ke(0,"div",0)(1,"div",1),Dr$1(2,"h5",2),ke(3,"button",3),f_(4,"translate"),_i("click",function(){return i.dismissModal()}),Je$1()(),ke(5,"div",4),Re$1(6,rp,16,21,"div",5),Re$1(7,lp,5,4),Je$1(),Dr$1(8,"div",6),Je$1()),o&2&&(ie$1(2),bi("innerText",i.service.customName||i.service.serviceName),ie$1(),vr$1("aria-label",h_(4,4,"form.button_close")),ie$1(3),Oe(i.hasActive?6:-1),ie$1(),Oe(i.sourceList.length?7:-1));},dependencies:[Kn,K8],encapsulation:2})}return e})();function cp(e,r){if(e&1&&At$1(0),e&2){let t=ye$1(2);Rt(" \xB7 ",t.currentConsumption(),"W ");}}function dp(e,r){if(e&1&&(La$1(0,"div",7),At$1(1),f_(2,"translate"),Re$1(3,cp,1,1),Rd$1()),e&2){let t=ye$1();ie$1(),Rt(" ",t.channelList[t.service().values?.ActiveIdentifier]||h_(2,2,"accessories.control.on")," "),ie$1(2),Oe(t.hasCurrentConsumption()?3:-1);}}function pp(e,r){e&1&&(La$1(0,"div",7),At$1(1),f_(2,"translate"),Rd$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.off")));}var nr=(()=>{class e{$accessories=g(le);injector=g(we);$modal=g(si);service=PH.required();readyForControl=PH(false);channelList={};ngOnInit(){if(this.service().linkedServices)for(let[,t]of Object.entries(this.service().linkedServices))t.type==="InputSource"&&(this.channelList[t.values.Identifier]=t.values.ConfiguredName||`Input ${t.values.Identifier}`);}onClick(){this.readyForControl()&&("Active"in this.service().values?this.service().getCharacteristic("Active").setValue(this.service().values.Active?0:1):"On"in this.service().values&&this.service().getCharacteristic("On").setValue(!this.service().values.On));}onLongClick(){if(this.readyForControl()&&("Active"in this.service().values||Object.keys(this.channelList).length)){let t=ty([{provide:ce,useValue:{service:this.service(),$accessories:this.$accessories}}],this.injector);this.$modal.open(ir,{size:"md",backdrop:"static",injector:t});}}hasCurrentConsumption(){return "Consumption"in this.service().values}currentConsumption(){if(this.hasCurrentConsumption())return this.service().values.Consumption}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-television"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:11,vars:9,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x1","10","y1","27.25","x2","22","y2","27.25","stroke","#d32f2f","stroke-width","4","stroke-linecap","round","stroke-opacity","0.75",1,"stand"],["x","1","y","6","width","30","height","20","rx","2","stroke","#7f7f7f","fill","#808080","stroke-width","1.5",1,"screen"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(La$1(0,"div",0),rc$1("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),La$1(1,"div",1)(2,"div",2),f_(3,"translate"),ah(),La$1(4,"svg",3),dy(5,"line",4)(6,"rect",5),Rd$1()(),ch(),La$1(7,"div",6),At$1(8),Rd$1(),Re$1(9,dp,4,4,"div",7)(10,pp,3,3,"div",7),Rd$1()()),o&2&&(Cy("accessory-on",i.service().values?.Active||i.service().values?.On)("cursor-pointer",i.readyForControl()),ie$1(2),vr$1("aria-label",h_(3,7,"accessories.core.television")),ie$1(6),Rt(" ",i.service().customName||i.service().values?.ConfiguredName||i.service().serviceName," "),ie$1(),Oe(i.service().values?.On||i.service().values?.Active?9:10));},dependencies:[ie,K8],styles:[".accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .screen[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_color-change 3s infinite alternate}.accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .stand[_ngcontent-%COMP%]{stroke:#7f7f7f;stroke-opacity:1}@keyframes _ngcontent-%COMP%_color-change{0%{fill:#4fc3f7}to{fill:#0288d1}}"]})}return e})();function mp(e,r){if(e&1&&(At$1(0),f_(1,"convertTemp"),f_(2,"number"),f_(3,"uppercase")),e&2){let t=ye$1();xy(" ",g_(2,4,h_(1,2,t.service().values?.CurrentTemperature),"1.0-1"),"\xB0",h_(3,7,t.temperatureUnits)," ");}}function up(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.no_data")," ");}var or=(()=>{class e{$settings=g(zt$1);service=PH.required();temperatureUnits=this.$settings.env.temperatureUnits;static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-temperature-sensor"]],inputs:{service:[1,"service"]},decls:45,vars:18,consts:[[1,"accessory-box"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x1","16","y1","5","x2","16","y2","17","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["cx","16","cy","20","r","3","stroke","#7f7f7f","stroke-width","1.2","fill","#1976d2","fill-opacity","0.5"],["x1","9","y1","6","x2","13","y2","6","stroke","#7f7f7f","stroke-width","0.8"],["x1","9","y1","9","x2","13","y2","9","stroke","#7f7f7f","stroke-width","0.8"],["x1","9","y1","12","x2","13","y2","12","stroke","#7f7f7f","stroke-width","0.8"],["x1","9","y1","15","x2","13","y2","15","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","6","x2","23","y2","6","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","9","x2","23","y2","9","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","12","x2","23","y2","12","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","15","x2","23","y2","15","stroke","#7f7f7f","stroke-width","0.8"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","grey-text"]],template:function(o,i){if(o&1&&(Mi(0),f_(1,"convertTemp"),f_(2,"number"),f_(3,"uppercase"),f_(4,"translate"),Mi(5),f_(6,"translate"),Mi(7),f_(8,"lowercase"),f_(9,"lowercase"),ke(10,"div",0)(11,"span",1),At$1(12),Je$1(),ke(13,"div",2)(14,"div",3),ah(),ke(15,"svg",4),Dr$1(16,"rect",5)(17,"line",6)(18,"circle",7)(19,"line",8)(20,"line",9)(21,"line",10)(22,"line",11)(23,"line",12)(24,"line",13)(25,"line",14)(26,"line",15)(27,"line",16)(28,"line",17)(29,"line",18)(30,"line",19)(31,"line",20)(32,"line",21)(33,"line",22)(34,"line",23)(35,"line",24)(36,"line",25)(37,"line",26)(38,"line",27)(39,"line",28),Je$1()(),ch(),ke(40,"div",29),At$1(41),Je$1(),ke(42,"div",30),Re$1(43,mp,4,9)(44,up,2,3),Je$1()()()),o&2){let c="CurrentTemperature"in i.service().values,f=c?`${g_(2,5,h_(1,3,i.service().values?.CurrentTemperature),"1.0-1")}\xB0${h_(3,8,i.temperatureUnits)}`:h_(4,10,"accessories.control.no_data"),T=(i.service().customName||i.service().serviceName||"").trim(),P=h_(6,12,"accessories.core.temperature_sensor"),O=!h_(8,14,T).includes(h_(9,16,P)),R=`${T+(O?`, ${P}`:"")}, ${f}`;ie$1(12),Rt(" ",R," "),ie$1(29),Ny(i.service().customName||i.service().serviceName),ie$1(2),Oe(c?43:44);}},dependencies:[kS,Re,_S,NS,K8],styles:[".temperature-circle[_ngcontent-%COMP%]{position:relative;display:inline-block;width:50px;height:50px;line-height:50px;border-radius:50%;font-size:14px;text-align:center;margin-bottom:6px;background-color:gray;color:#d3d3d3}@media(max-width:575px){.temperature-circle-collapse[_ngcontent-%COMP%]{width:31px;height:31px;line-height:31px;font-size:10px;margin-bottom:7px}}"]})}return e})();function fp(e,r){if(e&1&&At$1(0),e&2){let t=ye$1();Rt(" \xB7 ",t.service.values?.CurrentRelativeHumidity,"% ");}}function gp(e,r){if(e&1){let t=nc$1();La$1(0,"button",9),rc$1("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setTargetMode(0,i))}),La$1(1,"div",10),dy(2,"i",11),Rd$1(),At$1(3),f_(4,"translate"),La$1(5,"div",12),dy(6,"i",13),Rd$1()();}if(e&2){let t=ye$1();ie$1(2),Cy("fa-check-circle",t.targetMode===0)("fa-blank",t.targetMode!==0),ie$1(),Rt(" ",h_(4,5,"accessories.control.off")," ");}}function vp(e,r){if(e&1){let t=nc$1();La$1(0,"button",9),rc$1("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setTargetMode(3,i))}),La$1(1,"div",10),dy(2,"i",11),Rd$1(),At$1(3),f_(4,"translate"),La$1(5,"div",12),dy(6,"i",13),Rd$1()();}if(e&2){let t=ye$1();ie$1(2),Cy("fa-check-circle",t.targetMode===3)("fa-blank",t.targetMode!==3),ie$1(),Rt(" ",h_(4,5,"accessories.control.auto")," ");}}function hp(e,r){if(e&1){let t=nc$1();La$1(0,"button",9),rc$1("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setTargetMode(1,i))}),La$1(1,"div",10),dy(2,"i",11),Rd$1(),At$1(3),f_(4,"translate"),La$1(5,"div",12),dy(6,"i",13),Rd$1()();}if(e&2){let t=ye$1();ie$1(2),Cy("fa-check-circle",t.targetMode===1)("fa-blank",t.targetMode!==1),ie$1(),Rt(" ",h_(4,5,"accessories.control.heat")," ");}}function Cp(e,r){if(e&1){let t=nc$1();La$1(0,"button",9),rc$1("click",function(i){Go$1(t);let c=ye$1();return Wo$1(c.setTargetMode(2,i))}),La$1(1,"div",10),dy(2,"i",11),Rd$1(),At$1(3),f_(4,"translate"),La$1(5,"div",12),dy(6,"i",13),Rd$1()();}if(e&2){let t=ye$1();ie$1(2),Cy("fa-check-circle",t.targetMode===2)("fa-blank",t.targetMode!==2),ie$1(),Rt(" ",h_(4,5,"accessories.control.cool")," ");}}function _p(e,r){if(e&1){let t=nc$1();La$1(0,"h6",14),At$1(1),f_(2,"translate"),f_(3,"convertTemp"),f_(4,"number"),f_(5,"uppercase"),Rd$1(),La$1(6,"nouislider",15),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1();return t_(c.targetTemperature.value,i)||(c.targetTemperature.value=i),Wo$1(i)}),rc$1("ngModelChange",function(){Go$1(t);let i=ye$1();return Wo$1(i.onTemperatureStateChange())}),Rd$1(),KC();}if(e&2){let t=ye$1();ie$1(),Ay(" ",h_(2,7,"accessories.control.target"),": ",g_(4,11,h_(3,9,t.targetTemperature.value),"1.0-1"),"\xB0",h_(5,14,t.temperatureUnits)," "),ie$1(5),ly("min",t.targetTemperature.min)("max",t.targetTemperature.max)("step",t.targetTemperature.step),ky("ngModel",t.targetTemperature.value),JC();}}function yp(e,r){if(e&1){let t=nc$1();La$1(0,"h6",16),At$1(1),f_(2,"translate"),f_(3,"convertTemp"),f_(4,"number"),f_(5,"uppercase"),f_(6,"convertTemp"),f_(7,"number"),f_(8,"uppercase"),Rd$1(),La$1(9,"nouislider",15),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1(2);return t_(c.autoTemp,i)||(c.autoTemp=i),Wo$1(i)}),rc$1("ngModelChange",function(){Go$1(t);let i=ye$1(2);return Wo$1(i.onAutoThresholdStateChange())}),Rd$1(),KC();}if(e&2){let t=ye$1(2);ie$1(),Oy(" ",h_(2,9,"accessories.control.threshold_auto"),": ",g_(4,13,h_(3,11,t.autoTemp[0]),"1.0-1"),"\xB0",h_(5,16,t.temperatureUnits)," - ",g_(7,20,h_(6,18,t.autoTemp[1]),"1.0-1"),"\xB0",h_(8,23,t.temperatureUnits)," "),ie$1(8),ly("min",t.HeatingThresholdTemperature.minValue)("max",t.CoolingThresholdTemperature.maxValue)("step",t.CoolingThresholdTemperature.minStep),ky("ngModel",t.autoTemp),JC();}}function xp(e,r){if(e&1){let t=nc$1();La$1(0,"h6",14),At$1(1),f_(2,"translate"),f_(3,"convertTemp"),f_(4,"number"),f_(5,"uppercase"),Rd$1(),La$1(6,"nouislider",15),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1(2);return t_(c.targetHeatingTemp,i)||(c.targetHeatingTemp=i),Wo$1(i)}),rc$1("ngModelChange",function(){Go$1(t);let i=ye$1(2);return Wo$1(i.onThresholdStateChange())}),Rd$1(),KC();}if(e&2){let t=ye$1(2);ie$1(),Ay(" ",h_(2,7,"accessories.control.threshold_auto"),": ",g_(4,11,h_(3,9,t.targetHeatingTemp),"1.0-1"),"\xB0",h_(5,14,t.temperatureUnits)," "),ie$1(5),ly("min",t.HeatingThresholdTemperature.minValue)("max",t.HeatingThresholdTemperature.maxValue)("step",t.HeatingThresholdTemperature.minStep),ky("ngModel",t.targetHeatingTemp),JC();}}function Sp(e,r){if(e&1){let t=nc$1();La$1(0,"h6",14),At$1(1),f_(2,"translate"),f_(3,"convertTemp"),f_(4,"number"),f_(5,"uppercase"),Rd$1(),La$1(6,"nouislider",15),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1(2);return t_(c.targetCoolingTemp,i)||(c.targetCoolingTemp=i),Wo$1(i)}),rc$1("ngModelChange",function(){Go$1(t);let i=ye$1(2);return Wo$1(i.onThresholdStateChange())}),Rd$1(),KC();}if(e&2){let t=ye$1(2);ie$1(),Ay(" ",h_(2,7,"accessories.control.threshold_auto"),": ",g_(4,11,h_(3,9,t.targetCoolingTemp),"1.0-1"),"\xB0",h_(5,14,t.temperatureUnits)," "),ie$1(5),ly("min",t.CoolingThresholdTemperature.minValue)("max",t.CoolingThresholdTemperature.maxValue)("step",t.CoolingThresholdTemperature.minStep),ky("ngModel",t.targetCoolingTemp),JC();}}function kp(e,r){if(e&1&&Re$1(0,yp,10,25)(1,xp,7,16)(2,Sp,7,16),e&2){let t=ye$1();Oe(t.HeatingThresholdTemperature&&t.CoolingThresholdTemperature?0:t.HeatingThresholdTemperature&&!t.CoolingThresholdTemperature?1:!t.HeatingThresholdTemperature&&t.CoolingThresholdTemperature?2:-1);}}var rr=(()=>{class e extends me{$settings=g(zt$1);targetMode;targetTemperature;targetTemperatureChanged=new $$1;targetThresholdChanged=new $$1;targetStateValidValues=[];CoolingThresholdTemperature;HeatingThresholdTemperature;targetCoolingTemp;targetHeatingTemp;autoTemp;hasHumidity=false;temperatureUnits=this.$settings.env.temperatureUnits;setupComponent(){this.createDebouncedSubscription(this.targetTemperatureChanged,()=>{this.service.getCharacteristic("TargetTemperature").setValue(this.targetTemperature.value);}),this.createDebouncedSubscription(this.targetThresholdChanged,()=>{this.HeatingThresholdTemperature&&this.service.getCharacteristic("HeatingThresholdTemperature").setValue(this.targetHeatingTemp),this.CoolingThresholdTemperature&&this.service.getCharacteristic("CoolingThresholdTemperature").setValue(this.targetCoolingTemp);}),this.targetMode=this.service.values.TargetHeatingCoolingState,this.CoolingThresholdTemperature=this.service.getCharacteristic("CoolingThresholdTemperature"),this.HeatingThresholdTemperature=this.service.getCharacteristic("HeatingThresholdTemperature"),this.targetStateValidValues=this.service.getCharacteristic("TargetHeatingCoolingState").validValues,this.loadTargetTemperature(),this.service.getCharacteristic("CurrentRelativeHumidity")&&(this.hasHumidity=true),this.applyThermostatGradient();}handleAccessoryUpdate(){this.targetMode=this.service.values.TargetHeatingCoolingState,this.targetTemperature&&(this.targetTemperature.value=this.service.getCharacteristic("TargetTemperature").value),this.CoolingThresholdTemperature&&(this.targetCoolingTemp=this.service.getCharacteristic("CoolingThresholdTemperature").value),this.HeatingThresholdTemperature&&(this.targetHeatingTemp=this.service.getCharacteristic("HeatingThresholdTemperature").value),this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp],this.applyThermostatGradient();}getStatusClass(){let t=this.service.values?.CurrentHeatingCoolingState,o=this.service.values?.TargetHeatingCoolingState;return t===2?"status-color-cooling":t===1?"status-color-heating":o===3?"status-color-active":"status-color-inactive"}setTargetMode(t,o){this.targetMode=t,this.service.getCharacteristic("TargetHeatingCoolingState").setValue(this.targetMode),this.blurTarget(o),this.applyThermostatGradient();}onTemperatureStateChange(){this.targetTemperatureChanged.next(this.targetTemperature.value);}onThresholdStateChange(){this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp],this.targetThresholdChanged.next(void 0);}onAutoThresholdStateChange(){this.targetHeatingTemp=this.autoTemp[0],this.targetCoolingTemp=this.autoTemp[1],this.targetThresholdChanged.next(void 0);}loadTargetTemperature(){let t=this.service.getCharacteristic("TargetTemperature");this.targetTemperature={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep||.5},this.targetCoolingTemp=this.service.getCharacteristic("CoolingThresholdTemperature")?.value,this.targetHeatingTemp=this.service.getCharacteristic("HeatingThresholdTemperature")?.value,this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp];}applyThermostatGradient(){this.applySliderGradient("linear-gradient(to right, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))");}static \u0275fac=(()=>{let t;return function(i){return (t||(t=_n(e)))(i||e)}})();static \u0275cmp=Ja$1({type:e,selectors:[["app-thermostat-manage"]],features:[Xa$1],decls:22,vars:25,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"mt-2","mb-4","fs-4"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control"],[1,"modal-footer"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"mt-4"],[3,"ngModelChange","min","max","step","ngModel"],[1,"mt-4","mb-1"]],template:function(o,i){o&1&&(La$1(0,"div",0)(1,"div",1),dy(2,"h5",2),La$1(3,"button",3),f_(4,"translate"),rc$1("click",function(){return i.dismissModal()}),Rd$1()(),La$1(5,"div",4)(6,"h6",5),dy(7,"i"),At$1(8),f_(9,"convertTemp"),f_(10,"number"),f_(11,"uppercase"),Re$1(12,fp,1,1),Rd$1(),La$1(13,"div",6),f_(14,"translate"),Re$1(15,gp,7,7,"button",7),Re$1(16,vp,7,7,"button",7),Re$1(17,hp,7,7,"button",7),Re$1(18,Cp,7,7,"button",7),Rd$1(),Re$1(19,_p,7,16),Re$1(20,kp,3,1),Rd$1(),dy(21,"div",8),Rd$1()),o&2&&(ie$1(2),ly("innerText",i.service.customName||i.service.serviceName),ie$1(),vr$1("aria-label",h_(4,14,"form.button_close")),ie$1(4),Qt(`fas fa-temperature-full ${i.getStatusClass()}`),ie$1(),xy("",g_(10,18,h_(9,16,i.service.values?.CurrentTemperature),"1.0-1"),"\xB0",h_(11,21,i.temperatureUnits)," "),ie$1(4),Oe(i.hasHumidity?12:-1),ie$1(),vr$1("aria-label",h_(14,23,"accessories.control.mode_control")),ie$1(2),Oe(i.targetStateValidValues.includes(0)?15:-1),ie$1(),Oe(i.targetStateValidValues.includes(3)?16:-1),ie$1(),Oe(i.targetStateValidValues.includes(1)?17:-1),ie$1(),Oe(i.targetStateValidValues.includes(2)?18:-1),ie$1(),Oe("TargetTemperature"in i.service.values?19:-1),ie$1(),Oe(i.targetStateValidValues.includes(3)?20:-1));},dependencies:[Kn,Hn,ln,ye,kS,K8,Re,NS],encapsulation:2})}return e})();function Mp(e,r){if(e&1&&(ah(),La$1(0,"text",18),At$1(1),f_(2,"convertTemp"),f_(3,"number"),f_(4,"uppercase"),Rd$1()),e&2){let t=ye$1();ie$1(),xy(" ",g_(3,4,h_(2,2,t.service().values?.CurrentTemperature),"1.0-1"),"\xB0",h_(4,7,t.temperatureUnits)," ");}}function Tp(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.off")," ");}function bp(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.heat")," ");}function Bp(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.cool")," ");}function wp(e,r){if(e&1&&(dy(0,"i",21),At$1(1),f_(2,"convertTemp"),f_(3,"number"),f_(4,"uppercase")),e&2){let t=ye$1();ie$1(),xy(" ",g_(3,4,h_(2,2,t.service().values?.TargetTemperature),"1.0-1"),"\xB0",h_(4,7,t.temperatureUnits)," ");}}var ar=(()=>{class e{$modal=g(si);injector=g(we);$settings=g(zt$1);$accessories=g(le);service=PH.required();readyForControl=PH(false);temperatureUnits=this.$settings.env.temperatureUnits;getStatusFill(){let t=this.service().values?.CurrentHeatingCoolingState,o=this.service().values?.TargetHeatingCoolingState;return t===2?"url(#coolingGradient)":t===1?"url(#heatingGradient)":o===3?"#42d672":"#7b7b7b"}onClick(){if(!this.readyForControl())return;let t=ty([{provide:ce,useValue:{service:this.service(),$accessories:this.$accessories}}],this.injector);this.$modal.open(rr,{size:"md",backdrop:"static",injector:t});}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-thermostat"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:30,vars:11,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["id","coolingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#1e8bbd"],["attributeName","stop-color","values","#1e8bbd;#66d6d6;#1e8bbd","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#66d6d6"],["attributeName","stop-color","values","#66d6d6;#1e8bbd;#66d6d6","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#1e8bbd"],["id","heatingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#cc5e00"],["attributeName","stop-color","values","#cc5e00;#e69533;#cc5e00;#e69533","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#e69533"],["attributeName","stop-color","values","#e69533;#cc5e00;#e69533;#cc5e00","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#cc5e00"],["x","1","y","1","width","30","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x","1","y","19","width","30","height","8","rx","0","stroke","#7f7f7f","stroke-width","0.75","fill-opacity","0.5"],["x","16","y","13","font-size","8","text-anchor","middle","fill","#7f7f7f","font-family","Arial, sans-serif"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"fa","fas","fa-bullseye"]],template:function(o,i){o&1&&(La$1(0,"div",0),rc$1("longClick",function(){return i.onClick()})("shortClick",function(){return i.onClick()}),La$1(1,"div",1)(2,"div",2),f_(3,"translate"),ah(),La$1(4,"svg",3)(5,"defs")(6,"linearGradient",4)(7,"stop",5),dy(8,"animate",6),Rd$1(),La$1(9,"stop",7),dy(10,"animate",8),Rd$1(),La$1(11,"stop",9),dy(12,"animate",6),Rd$1()(),La$1(13,"linearGradient",10)(14,"stop",11),dy(15,"animate",12),Rd$1(),La$1(16,"stop",13),dy(17,"animate",14),Rd$1(),La$1(18,"stop",15),dy(19,"animate",12),Rd$1()()(),dy(20,"rect",16)(21,"rect",17),Re$1(22,Mp,5,9,":svg:text",18),Rd$1()(),ch(),La$1(23,"div",19),At$1(24),Rd$1(),La$1(25,"div",20),Re$1(26,Tp,2,3)(27,bp,2,3)(28,Bp,2,3)(29,wp,5,9),Rd$1()()()),o&2&&(Cy("accessory-on",i.service().values?.TargetHeatingCoolingState>0)("cursor-pointer",i.readyForControl()),ie$1(2),vr$1("aria-label",h_(3,9,"accessories.core.thermostat")),ie$1(19),vr$1("fill",i.getStatusFill()),ie$1(),Oe("CurrentTemperature"in i.service().values?22:-1),ie$1(2),Ny(i.service().customName||i.service().serviceName),ie$1(2),Oe(i.service().values?.TargetHeatingCoolingState===0?26:i.service().values?.CurrentHeatingCoolingState===1?27:i.service().values?.CurrentHeatingCoolingState===2?28:i.service().values?.TargetHeatingCoolingState===3?29:-1));},dependencies:[ie,kS,K8,Re,NS],encapsulation:2})}return e})();var sr=(()=>{class e{service=PH.required();static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-unknown"]],inputs:{service:[1,"service"]},decls:10,vars:3,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["cx","16","cy","16","r","14","fill","none","stroke","#7f7f7f","stroke-width","1.5"],["d",`M12.2575393,17.7112593
L12.1868707,17.7112593
C11.0779698,17.7112593 10.6478221,16.9467914 11.2212184,16.0037726
L16.4805582,7.35415962
C17.67876,5.38357359 18.0624739,5.55948915 17.3376772,7.746963
L15.7252918,12.6132252
C15.3772095,13.6637556 15.9942825,14.5048291 17.0992511,14.5048291
L20.1977772,14.5048291
L20.1846183,14.5177121
L20.2552868,14.5177121
C21.3641878,14.5177121 21.7943355,15.2821799 21.2209392,16.2251988
L16.1844844,24.5082506
C14.864477,26.6791606 14.4411534,26.4839632 15.241777,24.0676402
L16.7168658,19.6157462
C17.0649481,18.5652158 16.447875,17.7241422 15.3429064,17.7241422
L12.2443804,17.7241422
L12.2575393,17.7112593 Z`,"fill","#7f7f7f"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(ke(0,"div",0)(1,"div",1)(2,"div",2),ah(),ke(3,"svg",3),Dr$1(4,"circle",4)(5,"path",5),Je$1()(),ch(),ke(6,"div",6),At$1(7),Je$1(),ke(8,"div",7),At$1(9),Je$1()()()),o&2&&(ie$1(2),vr$1("aria-label",i.service().humanType),ie$1(5),Ny(i.service().customName||i.service().serviceName),ie$1(2),Ny(i.service().humanType));},encapsulation:2})}return e})();function Ep(e,r){if(e&1){let t=nc$1();La$1(0,"h6"),At$1(1),f_(2,"translate"),f_(3,"duration"),Rd$1(),La$1(4,"nouislider",12),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1();return t_(c.targetSetDuration.value,i)||(c.targetSetDuration.value=i),Wo$1(i)}),rc$1("ngModelChange",function(){Go$1(t);let i=ye$1();return Wo$1(i.onSetDurationStateChange())}),Rd$1(),KC();}if(e&2){let t=ye$1();ie$1(),xy(" ",h_(2,6,"accessories.control.set_duration"),": ",t.targetSetDuration.value===0?"\u221E":h_(3,8,t.targetSetDuration.value)," "),ie$1(3),ly("min",t.targetSetDuration.min)("max",t.targetSetDuration.max)("step",15),ky("ngModel",t.targetSetDuration.value),JC();}}var lr=(()=>{class e extends me{targetMode;targetSetDuration;targetSetDurationChanged=new $$1;setupComponent(){this.createDebouncedSubscription(this.targetSetDurationChanged,()=>{this.service.getCharacteristic("SetDuration").setValue(this.targetSetDuration.value);}),this.targetMode=this.service.values.Active,this.loadTargetSetDuration();}handleAccessoryUpdate(){this.targetMode=this.service.values.Active,this.targetSetDuration&&"SetDuration"in this.service.values&&(this.targetSetDuration.value=this.service.getCharacteristic("SetDuration").value);}setTargetMode(t,o){this.targetMode=t,this.service.getCharacteristic("Active").setValue(this.targetMode),this.blurTarget(o);}onSetDurationStateChange(){this.targetSetDurationChanged.next(this.targetSetDuration.value);}loadTargetSetDuration(){let t=this.service.getCharacteristic("SetDuration");t&&(this.targetSetDuration={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},this.applySliderGradient("linear-gradient(to right, #add8e6, #416bdf)",".noUi-target"));}static \u0275fac=(()=>{let t;return function(i){return (t||(t=_n(e)))(i||e)}})();static \u0275cmp=Ja$1({type:e,selectors:[["app-valve-manage"]],features:[Xa$1],decls:24,vars:22,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(o,i){o&1&&(La$1(0,"div",0)(1,"div",1),dy(2,"h5",2),La$1(3,"button",3),f_(4,"translate"),rc$1("click",function(){return i.dismissModal()}),Rd$1()(),La$1(5,"div",4)(6,"div",5),f_(7,"translate"),La$1(8,"button",6),rc$1("click",function(f){return i.setTargetMode(false,f)}),La$1(9,"div",7),dy(10,"i",8),Rd$1(),At$1(11),f_(12,"translate"),La$1(13,"div",9),dy(14,"i",10),Rd$1()(),La$1(15,"button",6),rc$1("click",function(f){return i.setTargetMode(true,f)}),La$1(16,"div",7),dy(17,"i",8),Rd$1(),At$1(18),f_(19,"translate"),La$1(20,"div",9),dy(21,"i",10),Rd$1()()(),Re$1(22,Ep,5,10),Rd$1(),dy(23,"div",11),Rd$1()),o&2&&(ie$1(2),ly("innerText",i.service.customName||i.service.serviceName),ie$1(),vr$1("aria-label",h_(4,14,"form.button_close")),ie$1(3),vr$1("aria-label",h_(7,16,"accessories.control.mode_control")),ie$1(4),Cy("fa-check-circle",!i.targetMode)("fa-blank",i.targetMode),ie$1(),Rt(" ",h_(12,18,"accessories.control.off")," "),ie$1(6),Cy("fa-check-circle",i.targetMode)("fa-blank",!i.targetMode),ie$1(),Rt(" ",h_(19,20,"accessories.control.on")," "),ie$1(4),Oe(i.targetSetDuration?22:-1));},dependencies:[Kn,Hn,ln,ye,K8,ui],encapsulation:2})}return e})();function Dp(e,r){e&1&&(La$1(0,"div",2),f_(1,"translate"),ah(),La$1(2,"svg",5),dy(3,"line",6)(4,"line",7)(5,"line",8)(6,"line",9)(7,"circle",10)(8,"circle",11)(9,"circle",12)(10,"circle",13)(11,"circle",14)(12,"circle",15),Rd$1()()),e&2&&vr$1("aria-label",h_(1,1,"accessories.core.generic_valve"));}function Ap(e,r){e&1&&(La$1(0,"div",2),f_(1,"translate"),ah(),La$1(2,"svg",5),dy(3,"circle",16)(4,"circle",17)(5,"circle",18)(6,"circle",19)(7,"circle",20)(8,"circle",21)(9,"circle",22)(10,"circle",23)(11,"circle",24)(12,"circle",25)(13,"line",26)(14,"line",27)(15,"line",28),Rd$1()()),e&2&&vr$1("aria-label",h_(1,1,"accessories.core.irrigation_valve"));}function Pp(e,r){e&1&&(La$1(0,"div",2),f_(1,"translate"),ah(),La$1(2,"svg",5),dy(3,"line",29)(4,"line",30)(5,"line",31)(6,"path",32)(7,"line",33)(8,"circle",34)(9,"circle",35)(10,"circle",36)(11,"circle",37)(12,"circle",38)(13,"circle",39)(14,"circle",40)(15,"circle",41)(16,"circle",42)(17,"circle",43)(18,"circle",44)(19,"circle",45),Rd$1()()),e&2&&vr$1("aria-label",h_(1,1,"accessories.core.shower_head_valve"));}function Fp(e,r){e&1&&(La$1(0,"div",2),f_(1,"translate"),ah(),La$1(2,"svg",5),dy(3,"rect",46)(4,"line",47)(5,"line",48)(6,"rect",49)(7,"path",50)(8,"line",51)(9,"line",52),Rd$1()()),e&2&&vr$1("aria-label",h_(1,1,"accessories.core.faucet_valve"));}function Op(e,r){if(e&1&&(La$1(0,"div",4),At$1(1),Rd$1()),e&2){let t=ye$1();ie$1(),Ny(t.remainingDuration());}}function Ip(e,r){if(e&1&&At$1(0),e&2){let t=ye$1(2);Rt(" \xB7 ",t.currentConsumption(),"W ");}}function Lp(e,r){if(e&1&&(La$1(0,"div",4),At$1(1),f_(2,"translate"),Re$1(3,Ip,1,1),Rd$1()),e&2){let t=ye$1();ie$1(),Rt(" ",h_(2,2,"accessories.control.running")," "),ie$1(2),Oe(t.hasCurrentConsumption()?3:-1);}}function Vp(e,r){e&1&&(La$1(0,"div",4),At$1(1),f_(2,"translate"),Rd$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.off")));}var cr=(()=>{class e{destroyRef=g(ne);injector=g(we);$accessories=g(le);$modal=g(si);service=PH.required();readyForControl=PH(false);secondsActive=0;remainingDuration=W("");remainingDurationInterval=TD(1e3).pipe(Ct$1(()=>this.isActive()));ngOnInit(){"SetDuration"in this.service().values&&this.setupRemainingDurationCounter();}onClick(){this.readyForControl()&&("Active"in this.service().values?this.service().getCharacteristic("Active").setValue(this.service().values.Active?0:1):"On"in this.service().values&&this.service().getCharacteristic("On").setValue(!this.service().values.On));}onLongClick(){if(this.readyForControl()&&"SetDuration"in this.service().values){let t=ty([{provide:ce,useValue:{service:this.service(),$accessories:this.$accessories}}],this.injector);this.$modal.open(lr,{size:"md",backdrop:"static",injector:t});}}isActive(){return this.service().values.Active?true:(this.resetRemainingDuration(),false)}setupRemainingDurationCounter(){this.remainingDurationInterval.pipe(An(this.destroyRef)).subscribe(()=>{this.secondsActive++;let t=this.service().getCharacteristic("RemainingDuration").value-this.secondsActive;t>0?this.remainingDuration.set(t<3600?new Date(t*1e3).toISOString().substring(14,19):new Date(t*1e3).toISOString().substring(11,19)):this.remainingDuration.set("");});}resetRemainingDuration(){this.secondsActive=0,this.service().getCharacteristic?.("RemainingDuration")&&this.remainingDuration.set("");}hasCurrentConsumption(){return "Consumption"in this.service().values}currentConsumption(){if(this.hasCurrentConsumption())return this.service().values.Consumption}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-valve"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:11,vars:7,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],["width","32","height","32","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x1","8","y1","3","x2","14","y2","3","stroke","#7f7f7f","stroke-width","3","stroke-linecap","round"],["x1","11","y1","8","x2","11","y2","3","stroke","#7f7f7f","stroke-width","3","stroke-linecap","round"],["x1","0","y1","9","x2","21","y2","9","stroke","#7f7f7f","stroke-width","4","stroke-linecap","round"],["x1","21","y1","9","x2","21","y2","14","stroke","#7f7f7f","stroke-width","4","stroke-linecap","round"],["fill","#1976d2","fill-opacity","0","cx","21","cy","19","r","1.5",1,"drop","drop-top"],["fill","#1976d2","fill-opacity","0","cx","17","cy","24","r","1.5",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","25","cy","24","r","1.5",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","13","cy","29","r","1.5",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","21","cy","29","r","1.5",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","29","cy","29","r","1.5",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","1","cy","16","r","1",1,"drop","drop-out"],["fill","#1976d2","fill-opacity","0","cx","6","cy","8","r","1",1,"drop","drop-out"],["fill","#1976d2","fill-opacity","0","cx","16","cy","4","r","1",1,"drop","drop-out"],["fill","#1976d2","fill-opacity","0","cx","26","cy","8","r","1",1,"drop","drop-out"],["fill","#1976d2","fill-opacity","0","cx","31","cy","16","r","1",1,"drop","drop-out"],["fill","#1976d2","fill-opacity","0","cx","7","cy","16","r","1.5",1,"drop","drop-in"],["fill","#1976d2","fill-opacity","0","cx","25","cy","16","r","1.5",1,"drop","drop-in"],["fill","#1976d2","fill-opacity","0","cx","10.5","cy","11.5","r","1.5",1,"drop","drop-in"],["fill","#1976d2","fill-opacity","0","cx","21.5","cy","11.5","r","1.5",1,"drop","drop-in"],["fill","#1976d2","fill-opacity","0","cx","16","cy","9","r","1.5",1,"drop","drop-in"],["x1","16","y1","16","x2","16","y2","31","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["x1","14","y1","16","x2","18","y2","16","stroke","#7f7f7f","stroke-width","4","stroke-linecap","round"],["x1","4","y1","31","x2","28","y2","31","stroke","#7f7f7f","stroke-opacity","0.5","stroke-width","10","stroke-linecap","round",1,"grass"],["x1","1","y1","1","x2","16","y2","1","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["x1","1","y1","1","x2","1","y2","31","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["x1","16","y1","1","x2","16","y2","3","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["d","M8 11 A8 7 0 0 1 24 11","fill","none","stroke","#7f7f7f","stroke-width","2"],["x1","7","y1","11","x2","25","y2","11","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["fill","#1976d2","fill-opacity","0","cx","8","cy","16","r","1.25",1,"drop","drop-top"],["fill","#1976d2","fill-opacity","0","cx","13.3","cy","16","r","1.25",1,"drop","drop-top"],["fill","#1976d2","fill-opacity","0","cx","18.6","cy","16","r","1.25",1,"drop","drop-top"],["fill","#1976d2","fill-opacity","0","cx","24","cy","16","r","1.25",1,"drop","drop-top"],["fill","#1976d2","fill-opacity","0","cx","8","cy","22","r","1",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","13.3","cy","22","r","1",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","18.6","cy","22","r","1",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","24","cy","22","r","1",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","8","cy","28","r","0.75",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","13.3","cy","28","r","0.75",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","18.6","cy","28","r","0.75",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","24","cy","28","r","0.75",1,"drop","drop-bottom"],["x","-3","y","28","width","21","height","6.5","fill","#7f7f7f","stroke-width","0","fill-opacity","0.5",1,"sink"],["stroke-linecap","round","x1","24","y1","18","x2","26","y2","18","stroke","#1976d2","stroke-width","3","stroke-opacity","0.5"],["stroke-linecap","round","x1","20","y1","18","x2","22","y2","18","stroke","#d32f2f","stroke-width","3","stroke-opacity","0.5"],["x","19","y","16.5","rx","1","width","8","height","3","fill","none","stroke-width","1","stroke","#7f7f7f"],["d","M10 9 C10 -1, 23 -1, 23 10 V26","fill","none","stroke","#7f7f7f","stroke-width","2"],["x1","10","y1","9","x2","10","y2","28","stroke","#1976d2","stroke-opacity","0","stroke-width","1.5",1,"stream"],["x1","20","y1","31","x2","26","y2","31","stroke","#7f7f7f","stroke-width","10","stroke-linecap","round"]],template:function(o,i){o&1&&(La$1(0,"div",0),rc$1("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),La$1(1,"div",1),Re$1(2,Dp,13,3,"div",2)(3,Ap,16,3,"div",2)(4,Pp,20,3,"div",2)(5,Fp,10,3,"div",2),La$1(6,"div",3),At$1(7),Rd$1(),Re$1(8,Op,2,1,"div",4)(9,Lp,4,4,"div",4)(10,Vp,3,3,"div",4),Rd$1()()),o&2&&(Cy("accessory-on",i.service().values?.Active||i.service().values?.On)("cursor-pointer",i.readyForControl()),ie$1(2),Oe(i.service().values?.ValveType===0||!i.service().values?.ValveType?2:i.service().values?.ValveType===1?3:i.service().values?.ValveType===2?4:i.service().values?.ValveType===3?5:-1),ie$1(5),Rt(" ",i.service().customName||i.service().values?.ConfiguredName||i.service().serviceName," "),ie$1(),Oe(i.service().values?.Active&&i.remainingDuration()?8:i.service().values?.Active&&!i.remainingDuration()||i.service().values?.On?9:10));},dependencies:[ie,K8],styles:[".accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .grass[_ngcontent-%COMP%]{stroke:#4caf50!important}.accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .drop[_ngcontent-%COMP%]{fill-opacity:.5}.accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .drop-in[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blink 1.5s infinite}.accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .drop-out[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blink 1.5s infinite;animation-delay:.75s}.accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .drop-top[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blink 1.5s infinite}.accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .drop-middle[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blink 1.5s infinite;animation-delay:.5s}.accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .drop-bottom[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blink 1.5s infinite;animation-delay:1s}@keyframes _ngcontent-%COMP%_blink{0%,to{opacity:1}50%{opacity:0}}@keyframes _ngcontent-%COMP%_blink-on-off{0%,to{opacity:1}50%{opacity:.5}}.accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .stream[_ngcontent-%COMP%]{stroke-opacity:.5;animation:_ngcontent-%COMP%_blink-on-off 4s infinite}.accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .sink[_ngcontent-%COMP%]{fill:#1976d2}"]})}return e})();function Np(e,r){if(e&1&&At$1(0),e&2){let t=ye$1();Rt(" \xB7 ",t.currentConsumption(),"W ");}}var dr=(()=>{class e{service=PH.required();readyForControl=PH(false);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));}hasCurrentConsumption(){return "Consumption"in this.service().values}currentConsumption(){if(this.hasCurrentConsumption())return this.service().values.Consumption}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-washing-machine"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:24,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3","y","1","width","25","height","30","rx","2","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x","6","y","4","width","5","rx","0.5","height","4","stroke","#7f7f7f","fill","none","stroke-width","0.5"],["x","7","y","6","width","3","rx","0.25","height","1","stroke","#7f7f7f","fill","none","stroke-width","0.25"],["x","14","y","4","width","11","height","4","rx","0.5","fill","none","stroke","#7f7f7f","stroke-width","0.5"],["x","19","y","5","width","5","height","2","rx","0.25","fill","#1976d2","fill-opacity","0.5","stroke","#7f7f7f","stroke-width","0.25"],["x","15","y","5","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","16","y","5","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","17","y","5","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","15","y","6","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","16","y","6","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","17","y","6","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","19","y","15.5","rx","1","width","3","height","3","fill","#7f7f7f",1,"handle"],["cx","15.5","cy","17","r","6.5","stroke","#7f7f7f","fill","none","stroke-width","1.2"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(La$1(0,"div",0),rc$1("shortClick",function(){return i.onClick()}),La$1(1,"div",1)(2,"div",2),f_(3,"translate"),ah(),La$1(4,"svg",3),dy(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7)(9,"rect",8)(10,"rect",9)(11,"rect",10)(12,"rect",11)(13,"rect",12)(14,"rect",13)(15,"rect",14)(16,"rect",15)(17,"circle",16),Rd$1()(),ch(),La$1(18,"div",17),At$1(19),Rd$1(),La$1(20,"div",18),At$1(21),f_(22,"translate"),Re$1(23,Np,1,1),Rd$1()()()),o&2&&(Cy("accessory-on",i.service().values?.On||i.service().values?.Active)("cursor-pointer",i.readyForControl()),ie$1(2),vr$1("aria-label",h_(3,8,"accessories.core.washing_machine")),ie$1(17),Ny(i.service().customName||i.service().serviceName),ie$1(2),Rt(" ",h_(22,10,i.service().values?.On||i.service().values?.Active?"accessories.control.on":"accessories.control.off")," "),ie$1(2),Oe((i.service().values?.On||i.service().values?.Active)&&i.hasCurrentConsumption()?23:-1));},dependencies:[ie,K8],styles:[".accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .handle[_ngcontent-%COMP%]{fill:#1976d2;fill-opacity:.5;transform-origin:48% 53%;animation:_ngcontent-%COMP%_rotate-handle 2s linear infinite}@keyframes _ngcontent-%COMP%_rotate-handle{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"]})}return e})();function Hp(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.closed")," ");}function Rp(e,r){if(e&1&&(At$1(0),f_(1,"translate")),e&2){let t=ye$1(2);xy(" ",h_(1,2,"accessories.control.open")," ",t.service.getCharacteristic("CurrentPosition").value,"% ");}}function $p(e,r){if(e&1&&Re$1(0,Hp,2,3)(1,Rp,2,4),e&2){let t=ye$1();Oe(t.service.values?.CurrentPosition===0?0:1);}}function Up(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.opening"),"... ");}function Wp(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.closing"),"... ");}var pr=(()=>{class e extends me{targetMode;targetPositionChanged=new $$1;targetPosition;setupComponent(){this.createDebouncedSubscription(this.targetPositionChanged,()=>{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);}),this.targetMode=this.service.values.On,this.loadTargetPosition();}handleAccessoryUpdate(){this.targetMode=this.service.values.On,this.targetPosition&&"TargetPosition"in this.service.values&&(this.targetPosition.value=this.service.getCharacteristic("TargetPosition").value);}onTargetPositionChange(){this.targetPositionChanged.next(this.targetPosition.value);}loadTargetPosition(){let t=this.service.getCharacteristic("TargetPosition");t&&(this.targetPosition={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},this.applySliderGradient("linear-gradient(to right, #242424, #ffd6aa)"));}static \u0275fac=(()=>{let t;return function(i){return (t||(t=_n(e)))(i||e)}})();static \u0275cmp=Ja$1({type:e,selectors:[["app-window-covering-manage"]],features:[Xa$1],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(o,i){o&1&&(La$1(0,"div",0)(1,"div",1),dy(2,"h5",2),La$1(3,"button",3),f_(4,"translate"),rc$1("click",function(){return i.dismissModal()}),Rd$1()(),La$1(5,"div",4)(6,"div",5)(7,"div",6),Re$1(8,$p,2,1)(9,Up,2,3)(10,Wp,2,3),Rd$1()(),La$1(11,"h6",7),At$1(12),f_(13,"translate"),Rd$1(),La$1(14,"nouislider",8),Fy("ngModelChange",function(f){return t_(i.targetPosition.value,f)||(i.targetPosition.value=f),f}),rc$1("ngModelChange",function(){return i.onTargetPositionChange()}),Rd$1(),KC(),La$1(15,"div",9)(16,"span",10),At$1(17),f_(18,"translate"),Rd$1(),La$1(19,"span",10),At$1(20),f_(21,"translate"),Rd$1()(),La$1(22,"h6",7),At$1(23),f_(24,"translate"),Rd$1(),La$1(25,"nouislider",11),Fy("ngModelChange",function(f){return t_(i.service.getCharacteristic("CurrentPosition").value,f)||(i.service.getCharacteristic("CurrentPosition").value=f),f}),Rd$1(),KC(),La$1(26,"div",9)(27,"span",10),At$1(28),f_(29,"translate"),Rd$1(),La$1(30,"span",10),At$1(31),f_(32,"translate"),Rd$1()()(),dy(33,"div",12),Rd$1()),o&2&&(ie$1(2),ly("innerText",i.service.customName||i.service.serviceName),ie$1(),vr$1("aria-label",h_(4,20,"form.button_close")),ie$1(5),Oe(i.service.values?.PositionState===2?8:i.service.values?.PositionState===1?9:i.service.values?.PositionState===0?10:-1),ie$1(4),xy("",h_(13,22,"accessories.control.target"),": ",i.targetPosition.value,"%"),ie$1(2),ly("min",i.targetPosition.min)("max",i.targetPosition.max)("step",i.targetPosition.step),ky("ngModel",i.targetPosition.value),JC(),ie$1(3),Ny(h_(18,24,"accessories.control.closed")),ie$1(3),Ny(h_(21,26,"accessories.control.open")),ie$1(3),xy(" ",h_(24,28,"accessories.control.current"),": ",i.service.getCharacteristic("CurrentPosition").value,"% "),ie$1(2),ly("min",0)("max",100)("step",1)("disabled",true),ky("ngModel",i.service.getCharacteristic("CurrentPosition").value),JC(),ie$1(3),Ny(h_(29,30,"accessories.control.closed")),ie$1(3),Ny(h_(32,32,"accessories.control.open")));},dependencies:[ye,Kn,Hn,ln,K8],encapsulation:2})}return e})();function jp(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.closed")," ");}function Gp(e,r){if(e&1&&(At$1(0),f_(1,"translate")),e&2){let t=ye$1(2);xy(" ",h_(1,2,"accessories.control.open")," ",t.service().values?.CurrentPosition,"% ");}}function qp(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.open")," ");}function zp(e,r){if(e&1&&(La$1(0,"div",12),Re$1(1,jp,2,3),Re$1(2,Gp,2,4),Re$1(3,qp,2,3),Rd$1()),e&2){let t=ye$1();ie$1(),Oe(t.service().values?.CurrentPosition===0?1:-1),ie$1(),Oe(t.service().values?.CurrentPosition>0&&t.service().values?.CurrentPosition<100?2:-1),ie$1(),Oe(t.service().values?.CurrentPosition===100?3:-1);}}function Kp(e,r){e&1&&(La$1(0,"div",13),At$1(1),f_(2,"translate"),Rd$1()),e&2&&(ie$1(),Rt("",h_(2,1,"accessories.control.opening"),"..."));}function Yp(e,r){e&1&&(La$1(0,"div",13),At$1(1),f_(2,"translate"),Rd$1()),e&2&&(ie$1(),Rt("",h_(2,1,"accessories.control.closing"),"..."));}var mr=(()=>{class e{$accessories=g(le);injector=g(we);$modal=g(si);service=PH.required();readyForControl=PH(false);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=ty([{provide:ce,useValue:{service:this.service(),$accessories:this.$accessories}}],this.injector);this.$modal.open(pr,{size:"md",backdrop:"static",injector:t});}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-window-covering"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:17,vars:11,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","0.8","width","30","height","30.2","rx","0.5","stroke","#7f7f7f","fill","none","stroke-width","1.5"],["x","2.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1"],["x","3.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","rx","2"],["x","16.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1"],["x","17.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","rx","2"],["x","2.3","y","2.1","width","27.4","height","27.6","stroke","#808080","fill","#808080","stroke-width","0.5","stroke-opacity","0.9","fill-opacity","0.9",1,"c-blinds"],["x","2.05","y","29.9","width","27.9","height","0","stroke","#ffffff","fill","#ffffff","stroke-width","0.5","stroke-opacity","0","fill-opacity","0.5",1,"c-light"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","red-text"]],template:function(o,i){o&1&&(La$1(0,"div",0),rc$1("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),La$1(1,"div",1)(2,"div",2),f_(3,"translate"),ah(),La$1(4,"svg",3),dy(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7)(9,"rect",8)(10,"rect",9)(11,"rect",10),Rd$1()(),ch(),La$1(12,"div",11),At$1(13),Rd$1(),Re$1(14,zp,4,3,"div",12)(15,Kp,3,3,"div",13)(16,Yp,3,3,"div",13),Rd$1()()),o&2&&(Kt$1("--position",(i.service().values?.CurrentPosition??0)/100),Cy("accessory-on",i.service().values?.CurrentPosition)("cursor-pointer",i.readyForControl()),ie$1(2),vr$1("aria-label",h_(3,9,"accessories.core.window_covering")),ie$1(11),Ny(i.service().customName||i.service().serviceName),ie$1(),Oe(i.service().values?.PositionState===2?14:i.service().values?.PositionState===1?15:i.service().values?.PositionState===0?16:-1));},dependencies:[ie,K8],styles:["svg[_ngcontent-%COMP%] .c-blinds[_ngcontent-%COMP%]{transition:height 3s ease;height:calc(27.6px - 27.3px * var(--position, 0))}svg[_ngcontent-%COMP%] .c-light[_ngcontent-%COMP%]{transition:y 3s ease,height 3s ease;y:calc(29.9px - 27.25px * var(--position, 0));height:calc(27.3px * var(--position, 0))}"]})}return e})();function Qp(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.closed")," ");}function Zp(e,r){if(e&1&&(At$1(0),f_(1,"translate")),e&2){let t=ye$1(2);xy(" ",h_(1,2,"accessories.control.open")," ",t.service.getCharacteristic("CurrentPosition").value,"% ");}}function Jp(e,r){if(e&1&&Re$1(0,Qp,2,3)(1,Zp,2,4),e&2){let t=ye$1();Oe(t.service.values?.CurrentPosition===0?0:1);}}function Xp(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.opening"),"... ");}function em(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.closing"),"... ");}var ur=(()=>{class e extends me{targetMode;targetPositionChanged=new $$1;targetPosition;setupComponent(){this.createDebouncedSubscription(this.targetPositionChanged,()=>{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);}),this.targetMode=this.service.values.On,this.loadTargetPosition();}handleAccessoryUpdate(){this.targetMode=this.service.values.On,this.targetPosition&&"TargetPosition"in this.service.values&&(this.targetPosition.value=this.service.getCharacteristic("TargetPosition").value);}onTargetPositionChange(){this.targetPositionChanged.next(this.targetPosition.value);}loadTargetPosition(){let t=this.service.getCharacteristic("TargetPosition");t&&(this.targetPosition={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},this.applySliderGradient("linear-gradient(to right, #242424, #ffd6aa)"));}static \u0275fac=(()=>{let t;return function(i){return (t||(t=_n(e)))(i||e)}})();static \u0275cmp=Ja$1({type:e,selectors:[["app-window-manage"]],features:[Xa$1],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(o,i){o&1&&(La$1(0,"div",0)(1,"div",1),dy(2,"h5",2),La$1(3,"button",3),f_(4,"translate"),rc$1("click",function(){return i.dismissModal()}),Rd$1()(),La$1(5,"div",4)(6,"div",5)(7,"div",6),Re$1(8,Jp,2,1)(9,Xp,2,3)(10,em,2,3),Rd$1()(),La$1(11,"h6",7),At$1(12),f_(13,"translate"),Rd$1(),La$1(14,"nouislider",8),Fy("ngModelChange",function(f){return t_(i.targetPosition.value,f)||(i.targetPosition.value=f),f}),rc$1("ngModelChange",function(){return i.onTargetPositionChange()}),Rd$1(),KC(),La$1(15,"div",9)(16,"span",10),At$1(17),f_(18,"translate"),Rd$1(),La$1(19,"span",10),At$1(20),f_(21,"translate"),Rd$1()(),La$1(22,"h6",7),At$1(23),f_(24,"translate"),Rd$1(),La$1(25,"nouislider",11),Fy("ngModelChange",function(f){return t_(i.service.getCharacteristic("CurrentPosition").value,f)||(i.service.getCharacteristic("CurrentPosition").value=f),f}),Rd$1(),KC(),La$1(26,"div",9)(27,"span",10),At$1(28),f_(29,"translate"),Rd$1(),La$1(30,"span",10),At$1(31),f_(32,"translate"),Rd$1()()(),dy(33,"div",12),Rd$1()),o&2&&(ie$1(2),ly("innerText",i.service.customName||i.service.serviceName),ie$1(),vr$1("aria-label",h_(4,20,"form.button_close")),ie$1(5),Oe(i.service.values?.PositionState===2?8:i.service.values?.PositionState===1?9:i.service.values?.PositionState===0?10:-1),ie$1(4),xy("",h_(13,22,"accessories.control.target"),": ",i.targetPosition.value,"%"),ie$1(2),ly("min",i.targetPosition.min)("max",i.targetPosition.max)("step",i.targetPosition.step),ky("ngModel",i.targetPosition.value),JC(),ie$1(3),Ny(h_(18,24,"accessories.control.closed")),ie$1(3),Ny(h_(21,26,"accessories.control.open")),ie$1(3),xy(" ",h_(24,28,"accessories.control.current"),": ",i.service.getCharacteristic("CurrentPosition").value,"% "),ie$1(2),ly("min",0)("max",100)("step",1)("disabled",true),ky("ngModel",i.service.getCharacteristic("CurrentPosition").value),JC(),ie$1(3),Ny(h_(29,30,"accessories.control.closed")),ie$1(3),Ny(h_(32,32,"accessories.control.open")));},dependencies:[ye,Kn,Hn,ln,K8],encapsulation:2})}return e})();function tm(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.closed")," ");}function im(e,r){if(e&1&&(At$1(0),f_(1,"translate")),e&2){let t=ye$1(2);xy(" ",h_(1,2,"accessories.control.open")," ",t.service().values?.CurrentPosition,"% ");}}function nm(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.open")," ");}function om(e,r){if(e&1&&(La$1(0,"div",12),Re$1(1,tm,2,3),Re$1(2,im,2,4),Re$1(3,nm,2,3),Rd$1()),e&2){let t=ye$1();ie$1(),Oe(t.service().values?.CurrentPosition===0?1:-1),ie$1(),Oe(t.service().values?.CurrentPosition>0&&t.service().values?.CurrentPosition<100?2:-1),ie$1(),Oe(t.service().values?.CurrentPosition===100?3:-1);}}function rm(e,r){e&1&&(La$1(0,"div",13),At$1(1),f_(2,"translate"),Rd$1()),e&2&&(ie$1(),Rt("",h_(2,1,"accessories.control.opening"),"..."));}function am(e,r){e&1&&(La$1(0,"div",13),At$1(1),f_(2,"translate"),Rd$1()),e&2&&(ie$1(),Rt("",h_(2,1,"accessories.control.closing"),"..."));}var fr=(()=>{class e{$accessories=g(le);injector=g(we);$modal=g(si);service=PH.required();readyForControl=PH(false);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=ty([{provide:ce,useValue:{service:this.service(),$accessories:this.$accessories}}],this.injector);this.$modal.open(ur,{size:"md",backdrop:"static",injector:t});}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-window"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:17,vars:11,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","0.8","width","30","height","30.2","rx","0.5","stroke","#7f7f7f","fill","none","stroke-width","1.5"],["x","2.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1",1,"outline-left"],["x","3.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","ry","2",1,"divider-left"],["x","15.16","y","13.6","width","0.1","height","4.6","stroke","#1976d2","fill","none","stroke-width","0.5","ry","2",1,"handle-left"],["x","16.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1",1,"outline-right"],["x","17.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","ry","2",1,"divider-right"],["x","16.76","y","13.6","width","0.1","height","4.6","stroke","#1976d2","fill","none","stroke-width","0.5","ry","2",1,"handle-right"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","red-text"]],template:function(o,i){o&1&&(La$1(0,"div",0),rc$1("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),La$1(1,"div",1)(2,"div",2),f_(3,"translate"),ah(),La$1(4,"svg",3),dy(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7)(9,"rect",8)(10,"rect",9)(11,"rect",10),Rd$1()(),ch(),La$1(12,"div",11),At$1(13),Rd$1(),Re$1(14,om,4,3,"div",12)(15,rm,3,3,"div",13)(16,am,3,3,"div",13),Rd$1()()),o&2&&(Kt$1("--position",(i.service().values?.CurrentPosition??0)/100),Cy("accessory-on",i.service().values?.CurrentPosition)("cursor-pointer",i.readyForControl()),ie$1(2),vr$1("aria-label",h_(3,9,"accessories.core.window")),ie$1(11),Ny(i.service().customName||i.service().serviceName),ie$1(),Oe(i.service().values?.PositionState===2?14:i.service().values?.PositionState===1?15:i.service().values?.PositionState===0?16:-1));},dependencies:[ie,K8],styles:["svg[_ngcontent-%COMP%] .outline-left[_ngcontent-%COMP%]{transition:width 3s ease;x:2.8px;width:calc(12.4px - 10px * var(--position, 0))}svg[_ngcontent-%COMP%] .divider-left[_ngcontent-%COMP%]{transition:width 3s ease;x:3.66px;width:calc(10.68px - 10px * var(--position, 0))}svg[_ngcontent-%COMP%] .handle-left[_ngcontent-%COMP%]{transition:x 3s ease;x:calc(15.16px - 10px * var(--position, 0));width:.1px}svg[_ngcontent-%COMP%] .outline-right[_ngcontent-%COMP%]{transition:x 3s ease,width 3s ease;x:calc(16.8px + 10px * var(--position, 0));width:calc(12.4px - 10px * var(--position, 0))}svg[_ngcontent-%COMP%] .divider-right[_ngcontent-%COMP%]{transition:x 3s ease,width 3s ease;x:calc(17.66px + 10px * var(--position, 0));width:calc(10.68px - 10px * var(--position, 0))}svg[_ngcontent-%COMP%] .handle-right[_ngcontent-%COMP%]{transition:x 3s ease;x:calc(16.76px + 10px * var(--position, 0));width:.1px}"]})}return e})();var Gt={OnOffLight:"OnOffLight",OnOffLightSwitch:"OnOffLightSwitch",OnOffPlugInUnit:"OnOffPlugInUnit",RoboticVacuumCleaner:"RoboticVacuumCleaner"},Be=(function(e){return e[e.Stopped=0]="Stopped",e[e.Running=1]="Running",e[e.Paused=2]="Paused",e[e.Error=3]="Error",e[e.SeekingCharger=64]="SeekingCharger",e[e.Charging=65]="Charging",e[e.Docked=66]="Docked",e})(Be||{}),ot=(function(e){return e[e.Idle=0]="Idle",e[e.Cleaning=1]="Cleaning",e})(ot||{}),je={Min:0,Max:254},At={MinMired:147,MaxMired:500},Ri=(function(e){return e[e.NotFullyLocked=0]="NotFullyLocked",e[e.Locked=1]="Locked",e[e.Unlocked=2]="Unlocked",e})(Ri||{});var ft=(function(e){return e[e.Closed=0]="Closed",e[e.Open=1]="Open",e[e.Transitioning=2]="Transitioning",e})(ft||{}),qt=(function(e){return e[e.Off=0]="Off",e[e.Auto=1]="Auto",e[e.Cool=3]="Cool",e[e.Heat=4]="Heat",e[e.EmergencyHeat=5]="EmergencyHeat",e[e.Precooling=6]="Precooling",e[e.FanOnly=7]="FanOnly",e})(qt||{});function gr(e){return e.deviceType===Gt.OnOffLight||e.deviceType===Gt.OnOffLightSwitch||e.deviceType===Gt.OnOffPlugInUnit}function $i(e){return e.deviceType===Gt.RoboticVacuumCleaner}function Pt(e){return e.clusters?.rvcOperationalState?.operationalState??Be.Stopped}function sm(e){let r=Pt(e);return r===Be.Running||r===Be.Paused||r===Be.SeekingCharger}function lm(e){return E(this,null,function*(){let r=Pt(e);if(r===Be.Running){let t=e.getCluster?.("rvcOperationalState");if(!t){let o=new Error("RVC operational state cluster not found");throw console.error(o.message),o}try{yield t.setAttributes({operationalState:Be.Paused});}catch(o){throw console.error("Failed to pause Matter robotic vacuum:",o),o}}else if(r===Be.Paused){let t=e.getCluster?.("rvcOperationalState");if(!t){let o=new Error("RVC operational state cluster not found");throw console.error(o.message),o}try{yield t.setAttributes({operationalState:Be.Running});}catch(o){throw console.error("Failed to resume Matter robotic vacuum:",o),o}}else {let t=e.getCluster?.("rvcRunMode");if(!t){let o=new Error("RvcRunMode cluster not found");throw console.error(o.message),o}try{yield t.setAttributes({currentMode:ot.Cleaning});}catch(o){throw console.error("Failed to start Matter robotic vacuum:",o),o}}})}function Ui(e){return E(this,null,function*(){let t=!(e.clusters?.onOff?.onOff??false),o=e.getCluster?.("onOff");if(!o){let i=new Error("OnOff cluster not found");throw console.error(i.message),i}try{yield o.setAttributes({onOff:t});}catch(i){throw console.error("Failed to control Matter device:",i),i}})}function Ze(e){return e.clusters?.onOff?.onOff??false}function cm(e){return e.clusters?.levelControl!==void 0}function tt(e){if($i(e))return sm(e);if(cm(e)){let r=Ze(e),t=Je(e)>0;return r&&t}return Ze(e)}function yt(e){$i(e)?lm(e):Ui(e);}function dm(e){switch(Pt(e)){case Be.Running:return "accessories.control.cleaning";case Be.Paused:return "accessories.control.paused";case Be.SeekingCharger:return "accessories.control.seeking_charger";case Be.Charging:return "accessories.control.charging";case Be.Docked:return "accessories.control.docked";case Be.Stopped:default:return "accessories.control.stopped"}}function pm(e){return Ze(e)?"accessories.control.on":"accessories.control.off"}function vr(e){return $i(e)?dm(e):pm(e)}function Je(e){return e.clusters?.levelControl?.currentLevel??je.Min}function Ft(e){let r=Je(e);return Math.round(r/je.Max*100)}function Ot(e){return Math.round(e/je.Max*100)}function It(e){return E(this,null,function*(){let r=Je(e);if(Ze(e)){let o=e.getCluster?.("onOff");if(!o){let i=new Error("OnOff cluster not found");throw console.error(i.message),i}try{yield o.setAttributes({onOff:!1});}catch(i){throw console.error("Failed to turn Matter light off:",i),i}}else {let o=r||je.Max,i=e.getCluster?.("levelControl");if(!i){let c=new Error("LevelControl cluster not found");throw console.error(c.message),c}try{yield i.setAttributes({currentLevel:o});}catch(c){throw console.error("Failed to turn Matter light on:",c),c}}})}function pt(e){return e.clusters?.colorControl?.colorTemperatureMireds??250}function hr(e){return e.clusters?.colorControl?.colorTemperatureMireds!==void 0}function Cr(e){return e.clusters?.colorControl?.colorMode??0}function bt(e){return e.clusters?.colorControl?.currentHue??0}function Bt(e){return e.clusters?.colorControl?.currentSaturation??0}function _r(e){return !(e.clusters?.booleanState?.stateValue??false)}function yr(e){return e.clusters?.occupancySensing?.occupancy?.occupied??false}function xr(e){let r=e.clusters?.illuminanceMeasurement?.measuredValue??0;return r===0||r===null?0:10**((r-1)/1e4)}function Sr(e){let r=e.clusters?.electricalPowerMeasurement?.activePower;return r==null||typeof r!="number"?null:r/1e3}function kr(e){let r=e.clusters?.temperatureMeasurement?.measuredValue;return r==null?null:r/100}function Mr(e){let r=e.clusters?.relativeHumidityMeasurement?.measuredValue;return r==null?null:r/100}function mm(e){return e.clusters?.smokeCoAlarm?.smokeState??0}function um(e){return e.clusters?.smokeCoAlarm?.coState??0}function Tr(e){let r=mm(e),t=um(e);return r>0||t>0}function br(e){return e.clusters?.booleanState?.stateValue??false}function gi(e){return e.clusters?.airQuality?.airQuality??0}function Lt(e){return e.clusters?.doorLock?.lockState??1}function Br(e){return E(this,null,function*(){let r=Lt(e),t=e.getCluster?.("doorLock");if(!t){let o=new Error("Door lock cluster not found");throw console.error(o.message),o}try{r===1?yield t.setAttributes({lockState:2}):yield t.setAttributes({lockState:1});}catch(o){throw console.error(`Failed to ${r===1?"unlock":"lock"} door:`,o),o}})}function wr(e,r){return E(this,null,function*(){let t=e.getCluster?.("doorLock");if(!t){let i=new Error("Door lock cluster not found");throw console.error(i.message),i}let o=r?1:2;try{yield t.setAttributes({lockState:o});}catch(i){throw console.error("Failed to set door lock state:",i),i}})}function fm(e){return e.clusters?.windowCovering?.currentPositionLiftPercent100ths??0}function gm(e){return Math.round(100-e/100)}function vm(e){return Math.round((100-e)*100)}function xt(e){let r=fm(e);return gm(r)}function fi(e,r){return E(this,null,function*(){let t=e.getCluster?.("windowCovering");if(!t){let i=new Error("Window covering cluster not found");throw console.error(i.message),i}let o=vm(r);try{yield t.setAttributes({targetPositionLiftPercent100ths:o});}catch(i){throw console.error("Failed to set window covering position:",i),i}})}function Er(e){return E(this,null,function*(){xt(e)>50?yield fi(e,0):yield fi(e,100);})}function hm(e){return e.clusters?.valveConfigurationAndControl?.currentState??ft.Closed}function Wi(e){let r=hm(e);return r===ft.Open||r===ft.Transitioning&&e.clusters?.valveConfigurationAndControl?.targetState===ft.Open}function Dr(e){return E(this,null,function*(){let r=e.getCluster?.("valveConfigurationAndControl");if(!r){let o=new Error("ValveConfigurationAndControl cluster not found");throw console.error(o.message),o}let t=Wi(e)?ft.Closed:ft.Open;try{yield r.setAttributes({targetState:t});}catch(o){throw console.error(`Failed to ${t===ft.Open?"open":"close"} water valve:`,o),o}})}function Cm(e){return e.clusters?.fanControl?.fanMode??0}function wt(e){return e.clusters?.fanControl?.percentSetting??0}function Vt(e){let r=Cm(e),t=wt(e);return r>0||t>0}function Ar(e){return E(this,null,function*(){let r=Vt(e),t=e.getCluster?.("fanControl");if(!t){let o=new Error("Fan control cluster not found");throw console.error(o.message),o}try{r?yield t.setAttributes({percentSetting:0}):yield t.setAttributes({percentSetting:100});}catch(o){throw console.error(`Failed to turn fan ${r?"off":"on"}:`,o),o}})}function vi(e,r){return E(this,null,function*(){let t=e.getCluster?.("fanControl");if(!t){let o=new Error("Fan control cluster not found");throw console.error(o.message),o}try{yield t.setAttributes({percentSetting:r});}catch(o){throw console.error("Failed to set fan speed:",o),o}})}function hi(e){let r=e.clusters?.thermostat?.localTemperature??e.clusters?.thermostat?.externalMeasuredIndoorTemperature;return r==null?null:r/100}function Nt(e){return e.clusters?.thermostat?.systemMode??0}function zt(e){return (e.clusters?.thermostat?.occupiedHeatingSetpoint??2e3)/100}function Kt(e){return (e.clusters?.thermostat?.occupiedCoolingSetpoint??2400)/100}function Pr(e){return Nt(e)>0}function Fr(e,r){return E(this,null,function*(){let t=e.getCluster?.("thermostat");if(!t){let o=new Error("Thermostat cluster not found");throw console.error(o.message),o}try{yield t.setAttributes({systemMode:r});}catch(o){throw console.error("Failed to set thermostat system mode:",o),o}})}function ji(e,r){return E(this,null,function*(){let t=e.getCluster?.("thermostat");if(!t){let i=new Error("Thermostat cluster not found");throw console.error(i.message),i}let o=Math.round(r*100);try{yield t.setAttributes({occupiedHeatingSetpoint:o});}catch(i){throw console.error("Failed to set heating setpoint:",i),i}})}function Gi(e,r){return E(this,null,function*(){let t=e.getCluster?.("thermostat");if(!t){let i=new Error("Thermostat cluster not found");throw console.error(i.message),i}let o=Math.round(r*100);try{yield t.setAttributes({occupiedCoolingSetpoint:o});}catch(i){throw console.error("Failed to set cooling setpoint:",i),i}})}function qi(e){return e.clusters?.pm25ConcentrationMeasurement?.measuredValue??null}function zi(e){return e.clusters?.pm10ConcentrationMeasurement?.measuredValue??null}function Ki(e){return e.clusters?.carbonMonoxideConcentrationMeasurement?.measuredValue??null}function Yi(e){return e.clusters?.nitrogenDioxideConcentrationMeasurement?.measuredValue??null}function Qi(e){return e.clusters?.ozoneConcentrationMeasurement?.measuredValue??null}function Ci(e){return qi(e)!==null||zi(e)!==null||Ki(e)!==null||Yi(e)!==null||Qi(e)!==null}function Ht(e,r){let t=e.clusters?.[r];if(t?.measurementUnit!==void 0)switch(t.measurementUnit){case 0:return "ppm";case 1:return "ppb";case 2:return "ppt";case 3:return "mg/m\xB3";case 4:return "\xB5g/m\xB3"}return r.includes("pm25")||r.includes("pm10")?"\xB5g/m\xB3":r.includes("carbonMonoxide")?"ppm":"ppb"}function Or(e){return !!e.clusters?.serviceArea}function Ir(e){return !!e.clusters?.rvcCleanMode}function Lr(e){let r=e.clusters?.serviceArea?.supportedAreas;return Array.isArray(r)?r.map(t=>({areaId:t.areaId,name:t.areaInfo?.locationName||`Area ${t.areaId}`})):[]}function Vr(e){return e.clusters?.serviceArea?.selectedAreas??[]}function Nr(e){return e.clusters?.serviceArea?.currentArea??null}function Hr(e){return e.clusters?.serviceArea?.progress??[]}function Rr(e){return e.clusters?.rvcCleanMode?.supportedModes??[]}function $r(e){return e.clusters?.rvcCleanMode?.currentMode??0}var _m=()=>[1,2],ym=()=>[3,4];function xm(e,r){if(e&1&&(ke(0,"li",9)(1,"span"),At$1(2),f_(3,"translate"),Je$1(),ke(4,"span",10),At$1(5),Je$1()()),e&2){let t=ye$1(2);ie$1(2),Ny(h_(3,3,"accessories.control.pm25")),ie$1(3),xy("",t.pm25," ",t.pm25Unit);}}function Sm(e,r){if(e&1&&(ke(0,"li",9)(1,"span"),At$1(2),f_(3,"translate"),Je$1(),ke(4,"span",10),At$1(5),Je$1()()),e&2){let t=ye$1(2);ie$1(2),Ny(h_(3,3,"accessories.control.pm10")),ie$1(3),xy("",t.pm10," ",t.pm10Unit);}}function km(e,r){if(e&1&&(ke(0,"li",9)(1,"span"),At$1(2),f_(3,"translate"),Je$1(),ke(4,"span",10),At$1(5),Je$1()()),e&2){let t=ye$1(2);ie$1(2),Ny(h_(3,3,"accessories.control.carbon_monoxide")),ie$1(3),xy("",t.co," ",t.coUnit);}}function Mm(e,r){if(e&1&&(ke(0,"li",9)(1,"span"),At$1(2),f_(3,"translate"),Je$1(),ke(4,"span",10),At$1(5),Je$1()()),e&2){let t=ye$1(2);ie$1(2),Ny(h_(3,3,"accessories.control.nitrogen_dioxide")),ie$1(3),xy("",t.no2," ",t.no2Unit);}}function Tm(e,r){if(e&1&&(ke(0,"li",9)(1,"span"),At$1(2),f_(3,"translate"),Je$1(),ke(4,"span",10),At$1(5),Je$1()()),e&2){let t=ye$1(2);ie$1(2),Ny(h_(3,3,"accessories.control.ozone")),ie$1(3),xy("",t.ozone," ",t.ozoneUnit);}}function bm(e,r){if(e&1&&(ke(0,"ul",7),Re$1(1,xm,6,5,"li",9),Re$1(2,Sm,6,5,"li",9),Re$1(3,km,6,5,"li",9),Re$1(4,Mm,6,5,"li",9),Re$1(5,Tm,6,5,"li",9),Je$1()),e&2){let t=ye$1();ie$1(),Oe(t.pm25!==null?1:-1),ie$1(),Oe(t.pm10!==null?2:-1),ie$1(),Oe(t.co!==null?3:-1),ie$1(),Oe(t.no2!==null?4:-1),ie$1(),Oe(t.ozone!==null?5:-1);}}var Ur=(()=>{class e extends me{labels=["accessories.control.air_quality_unknown","accessories.control.air_quality_good","accessories.control.air_quality_fair","accessories.control.air_quality_moderate","accessories.control.air_quality_poor","accessories.control.air_quality_very_poor","accessories.control.air_quality_extremely_poor"];airQuality=0;pm25=null;pm10=null;co=null;no2=null;ozone=null;pm25Unit="\xB5g/m\xB3";pm10Unit="\xB5g/m\xB3";coUnit="ppm";no2Unit="ppb";ozoneUnit="ppb";setupComponent(){this.updateFromService();}handleAccessoryUpdate(){this.updateFromService();}updateFromService(){this.airQuality=gi(this.service),this.pm25=qi(this.service),this.pm10=zi(this.service),this.co=Ki(this.service),this.no2=Yi(this.service),this.ozone=Qi(this.service),this.pm25!==null&&(this.pm25Unit=Ht(this.service,"pm25ConcentrationMeasurement")),this.pm10!==null&&(this.pm10Unit=Ht(this.service,"pm10ConcentrationMeasurement")),this.co!==null&&(this.coUnit=Ht(this.service,"carbonMonoxideConcentrationMeasurement")),this.no2!==null&&(this.no2Unit=Ht(this.service,"nitrogenDioxideConcentrationMeasurement")),this.ozone!==null&&(this.ozoneUnit=Ht(this.service,"ozoneConcentrationMeasurement"));}get hasConcentration(){return Ci(this.service)}static \u0275fac=(()=>{let t;return function(i){return (t||(t=_n(e)))(i||e)}})();static \u0275cmp=Ja$1({type:e,selectors:[["app-air-quality-sensor-manage"]],features:[Xa$1],decls:12,vars:16,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","px-4"],[1,"text-center","mb-3"],[1,"badge","rounded-pill","fs-6"],[1,"list-group","list-group-box","mb-0"],[1,"modal-footer"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"grey-text"]],template:function(o,i){o&1&&(ke(0,"div",0)(1,"div",1),Dr$1(2,"h5",2),ke(3,"button",3),f_(4,"translate"),_i("click",function(){return i.dismissModal()}),Je$1()(),ke(5,"div",4)(6,"div",5)(7,"span",6),At$1(8),f_(9,"translate"),Je$1()(),Re$1(10,bm,6,5,"ul",7),Je$1(),Dr$1(11,"div",8),Je$1()),o&2&&(ie$1(2),bi("innerText",i.service.customName||i.service.serviceName||i.service.displayName),ie$1(),vr$1("aria-label",h_(4,10,"form.button_close")),ie$1(4),Cy("bg-success",s_(14,_m).includes(i.airQuality))("bg-warning",s_(15,ym).includes(i.airQuality))("bg-danger",i.airQuality>=5),ie$1(),Rt(" ",h_(9,12,i.labels[i.airQuality||0])," "),ie$1(2),Oe(i.hasConcentration?10:-1));},dependencies:[K8],encapsulation:2})}return e})();var Bm=()=>[3,4],wm=()=>[1,2],Wr=(()=>{class e{$accessories=g(le);injector=g(we);$modal=g(si);service=PH.required();labels=["accessories.control.air_quality_unknown","accessories.control.air_quality_good","accessories.control.air_quality_fair","accessories.control.air_quality_moderate","accessories.control.air_quality_poor","accessories.control.air_quality_very_poor","accessories.control.air_quality_extremely_poor"];airQuality=X(()=>gi(this.service()));canShowModal=X(()=>Ci(this.service()));onLongClick(){if(!this.canShowModal())return;let t=ty([{provide:ce,useValue:{service:this.service(),$accessories:this.$accessories}}],this.injector);this.$modal.open(Ur,{size:"md",backdrop:"static",injector:t});}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-matter-air-quality-sensor"]],inputs:{service:[1,"service"]},decls:33,vars:30,consts:[["appLongClick","",1,"accessory-box",3,"longClick","keydown.enter","keydown.space"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["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"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label"]],template:function(o,i){if(o&1&&(Mi(0),f_(1,"translate"),Mi(2),f_(3,"translate"),Mi(4),f_(5,"lowercase"),f_(6,"lowercase"),La$1(7,"div",0),rc$1("longClick",function(){return i.onLongClick()})("keydown.enter",function(){return i.canShowModal()&&i.onLongClick()})("keydown.space",function(){return i.canShowModal()&&i.onLongClick()}),La$1(8,"span",1),At$1(9),Rd$1(),La$1(10,"div",2)(11,"div",3),ah(),La$1(12,"svg",4),dy(13,"rect",5),La$1(14,"g",6),dy(15,"path",7),Rd$1(),dy(16,"line",8)(17,"line",9)(18,"line",10)(19,"line",11)(20,"line",12)(21,"line",13)(22,"line",14)(23,"line",15)(24,"line",16)(25,"line",17)(26,"line",18)(27,"line",19)(28,"line",20),Rd$1()(),ch(),La$1(29,"div",21),At$1(30),Rd$1(),La$1(31,"div",22),At$1(32),Rd$1()()()),o&2){let c=i.airQuality()||0,f=h_(1,20,i.labels[c]),T=(i.service().customName||i.service().displayName||i.service().serviceName||"").trim(),P=h_(3,22,"accessories.core.air_quality_sensor"),O=!h_(5,24,T).includes(h_(6,26,P)),R=`${T+(O?`, ${P}`:"")}, ${f}`;ie$1(7),Cy("cursor-pointer",i.canShowModal())("accessory-on",c===5)("fill-red",c===5)("fill-orange",s_(28,Bm).includes(c))("fill-green",s_(29,wm).includes(c)),vr$1("role",i.canShowModal()?"button":null)("tabindex",i.canShowModal()?0:null)("aria-label",i.canShowModal()?R:null),ie$1(2),Rt(" ",R," "),ie$1(21),Ny(i.service().customName||i.service().displayName),ie$1(),Cy("grey-text",c<5)("red-text",c===5),ie$1(),Rt(" ",f," ");}},dependencies:[ie,_S,K8],styles:[".fill-red[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .leaves[_ngcontent-%COMP%]{fill:#d32f2f!important;fill-opacity:.5!important}.fill-orange[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .leaves[_ngcontent-%COMP%]{fill:#ff9800!important;fill-opacity:.5!important}.fill-green[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .leaves[_ngcontent-%COMP%]{fill:#4caf50!important;fill-opacity:.5!important}"]})}return e})();var jr=(()=>{class e extends me{$colour=g(nt);targetMode;targetBrightness;targetBrightnessChanged=new $$1;targetColorTemperature;targetColorTemperatureChanged=new $$1;setupComponent(){this.createDebouncedSubscription(this.targetBrightnessChanged,()=>E(this,null,function*(){let t=Je(this.service);try{if(this.targetBrightness.value===je.Min){let o=this.service.getCluster?.("onOff");if(!o)throw new Error("OnOff cluster not found");yield o.setAttributes({onOff:!1});}else {let o=this.service.getCluster?.("levelControl");if(!o)throw new Error("LevelControl cluster not found");yield o.setAttributes({currentLevel:this.targetBrightness.value});}this.targetMode=this.targetBrightness.value>0;}catch(o){this.showGenericErrorToast(o),this.targetBrightness.value=t,this.targetMode=t>0,this.cdr.markForCheck();}}),300),this.createDebouncedSubscription(this.targetColorTemperatureChanged,t=>E(this,null,function*(){let o=pt(this.service);try{let i=this.service.getCluster?.("colorControl");if(!i)throw new Error("ColorControl cluster not found");yield i.setAttributes({colorTemperatureMireds:t});}catch(i){this.showGenericErrorToast(i),this.targetColorTemperature.mired=o,this.targetColorTemperature.value=this.$colour.miredToKelvin(o),this.cdr.markForCheck();}}),300),this.targetMode=Ze(this.service),this.loadTargetBrightness(),this.loadTargetColorTemperature();}handleAccessoryUpdate(){this.targetMode=Ze(this.service),this.targetBrightness.value=Je(this.service);let t=pt(this.service);this.targetColorTemperature.mired=t,this.targetColorTemperature.value=this.$colour.miredToKelvin(t);}setTargetMode(t,o){return E(this,null,function*(){let i=this.targetMode,c=this.targetBrightness.value;try{if(this.targetMode=t,t){let f=this.targetBrightness.value||this.targetBrightness.max;this.targetBrightness.value=f;let T=this.service.getCluster?.("levelControl");if(!T)throw new Error("LevelControl cluster not found");yield T.setAttributes({currentLevel:f});}else {let f=this.service.getCluster?.("onOff");if(!f)throw new Error("OnOff cluster not found");yield f.setAttributes({onOff:!1});}this.blurTarget(o);}catch(f){this.showGenericErrorToast(f),this.targetMode=i,this.targetBrightness.value=c,this.cdr.markForCheck();}})}onBrightnessStateChange(){this.targetBrightnessChanged.next(this.targetBrightness.value);}onColorTemperatureStateChange(){let t=this.$colour.kelvinToMired(this.targetColorTemperature.value);this.targetColorTemperature.mired=t,this.targetColorTemperatureChanged.next(t);}loadTargetBrightness(){let t=Je(this.service);this.targetBrightness={value:t,min:je.Min,max:je.Max,step:1},this.applySliderGradient("linear-gradient(to right, #242424, #ffd6aa)",".brightness-slider .noUi-target");}loadTargetColorTemperature(){let t=pt(this.service);this.targetColorTemperature={value:this.$colour.miredToKelvin(t),mired:t,min:this.$colour.miredToKelvin(At.MaxMired),max:this.$colour.miredToKelvin(At.MinMired),step:10};let o=this.$colour.kelvinToHsl(this.targetColorTemperature.min),i=this.$colour.kelvinToHsl(this.targetColorTemperature.max);this.applySliderGradient(`linear-gradient(to right, ${o}, ${i})`,".color-temp-slider .noUi-target");}get brightnessPercentage(){return Ot(this.targetBrightness.value)}static \u0275fac=(()=>{let t;return function(i){return (t||(t=_n(e)))(i||e)}})();static \u0275cmp=Ja$1({type:e,selectors:[["app-color-temperature-light-manage"]],features:[Xa$1],decls:34,vars:39,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"mt-4"],[1,"brightness-slider"],[3,"ngModelChange","min","max","step","ngModel"],[1,"color-temp-slider"],[1,"modal-footer"]],template:function(o,i){o&1&&(La$1(0,"div",0)(1,"div",1),dy(2,"h5",2),La$1(3,"button",3),f_(4,"translate"),rc$1("click",function(){return i.dismissModal()}),Rd$1()(),La$1(5,"div",4)(6,"div",5),f_(7,"translate"),La$1(8,"button",6),rc$1("click",function(f){return i.setTargetMode(false,f)}),La$1(9,"div",7),dy(10,"i",8),Rd$1(),At$1(11),f_(12,"translate"),La$1(13,"div",9),dy(14,"i",10),Rd$1()(),La$1(15,"button",6),rc$1("click",function(f){return i.setTargetMode(true,f)}),La$1(16,"div",7),dy(17,"i",8),Rd$1(),At$1(18),f_(19,"translate"),La$1(20,"div",9),dy(21,"i",10),Rd$1()()(),La$1(22,"h6",11),At$1(23),f_(24,"translate"),Rd$1(),La$1(25,"div",12)(26,"nouislider",13),Fy("ngModelChange",function(f){return t_(i.targetBrightness.value,f)||(i.targetBrightness.value=f),f}),rc$1("ngModelChange",function(){return i.onBrightnessStateChange()}),Rd$1(),KC(),Rd$1(),La$1(27,"h6",11),At$1(28),f_(29,"translate"),f_(30,"convertMired"),Rd$1(),La$1(31,"div",14)(32,"nouislider",13),Fy("ngModelChange",function(f){return t_(i.targetColorTemperature.value,f)||(i.targetColorTemperature.value=f),f}),rc$1("ngModelChange",function(){return i.onColorTemperatureStateChange()}),Rd$1(),KC(),Rd$1()(),dy(33,"div",15),Rd$1()),o&2&&(ie$1(2),ly("innerText",i.service.customName||i.service.serviceName||i.service.displayName),ie$1(),vr$1("aria-label",h_(4,25,"form.button_close")),ie$1(3),vr$1("aria-label",h_(7,27,"accessories.control.mode_control")),ie$1(4),Cy("fa-check-circle",!i.targetMode)("fa-blank",i.targetMode),ie$1(),Rt(" ",h_(12,29,"accessories.control.off")," "),ie$1(6),Cy("fa-check-circle",i.targetMode)("fa-blank",!i.targetMode),ie$1(),Rt(" ",h_(19,31,"accessories.control.on")," "),ie$1(5),xy("",h_(24,33,"accessories.control.brightness"),": ",i.brightnessPercentage,"%"),ie$1(3),ly("min",i.targetBrightness.min)("max",i.targetBrightness.max)("step",i.targetBrightness.step),ky("ngModel",i.targetBrightness.value),JC(),ie$1(2),xy(" ",h_(29,35,"accessories.control.color_temperature"),": ",h_(30,37,i.targetColorTemperature.mired)," "),ie$1(4),ly("min",i.targetColorTemperature.min)("max",i.targetColorTemperature.max)("step",i.targetColorTemperature.step),ky("ngModel",i.targetColorTemperature.value),JC());},dependencies:[Kn,Hn,ln,ye,K8,Ct],encapsulation:2})}return e})();var Gr=(()=>{class e{$accessories=g(le);injector=g(we);$modal=g(si);$colour=g(nt);service=PH.required();readyForControl=PH(false);onClick(){this.readyForControl()&&It(this.service());}onLongClick(){if(!this.readyForControl())return;let t=ty([{provide:ce,useValue:{service:this.service(),$accessories:this.$accessories}}],this.injector);this.$modal.open(jr,{size:"md",backdrop:"static",injector:t});}isOn=X(()=>tt(this.service()));brightness=X(()=>Ft(this.service()));static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-color-temperature-light"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:22,vars:21,consts:[["role","switch","tabindex","0",1,"accessory-box",3,"longClick","shortClick","keydown.enter","keydown.space"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["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"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","grey-text",3,"innerHTML"]],template:function(o,i){if(o&1&&(Mi(0),f_(1,"translate"),f_(2,"translate"),Mi(3),f_(4,"translate"),Mi(5),f_(6,"lowercase"),f_(7,"lowercase"),La$1(8,"div",0),rc$1("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()})("keydown.enter",function(){return i.onClick()})("keydown.space",function(){return i.onClick()}),La$1(9,"span",1),At$1(10),Rd$1(),La$1(11,"div",2)(12,"div",3),ah(),La$1(13,"svg",4),dy(14,"path",5)(15,"line",6)(16,"line",7)(17,"line",8)(18,"line",9),Rd$1()(),ch(),La$1(19,"div",10),At$1(20),Rd$1(),dy(21,"div",11),Rd$1()()),o&2){let c=i.isOn(),f=i.brightness(),T=c?f>0?`${f}%`:h_(1,11,"accessories.control.on"):h_(2,13,"accessories.control.off"),P=(i.service().customName||i.service().serviceName||i.service().displayName||"").trim(),O=h_(4,15,"accessories.core.lightbulb"),R=!h_(6,17,P).includes(h_(7,19,O)),se=`${P+(R?`, ${O}`:"")}, ${T}`;ie$1(8),Cy("accessory-on",c)("cursor-pointer",i.readyForControl()),vr$1("aria-checked",c)("aria-label",se),ie$1(2),Rt(" ",se," "),ie$1(4),vr$1("fill",c?i.$colour.kelvinToHex(i.$colour.miredToKelvin(i.service().clusters?.colorControl?.colorTemperatureMireds||250)):"none")("fill-opacity",.25+f/100*.5),ie$1(6),Rt(" ",i.service().customName||i.service().serviceName||i.service().displayName," "),ie$1(),ly("innerHTML",T,Ha$1);}},dependencies:[ie,_S,K8],encapsulation:2})}return e})();function Em(e,r){e&1&&(ke(0,"div",10),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.open")));}function Dm(e,r){e&1&&(ke(0,"div",11),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.closed")));}var qr=(()=>{class e{service=PH.required();isOpen=X(()=>_r(this.service()));static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-matter-contact-sensor"]],inputs:{service:[1,"service"]},decls:22,vars:15,consts:[[1,"accessory-box"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["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"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","red-text"],["aria-hidden","true",1,"accessory-label","grey-text"]],template:function(o,i){if(o&1&&(Mi(0),f_(1,"translate"),f_(2,"translate"),Mi(3),f_(4,"translate"),Mi(5),f_(6,"lowercase"),f_(7,"lowercase"),ke(8,"div",0)(9,"span",1),At$1(10),Je$1(),ke(11,"div",2)(12,"div",3),ah(),ke(13,"svg",4),Dr$1(14,"rect",5)(15,"rect",6)(16,"rect",7)(17,"rect",8),Je$1()(),ch(),ke(18,"div",9),At$1(19),Je$1(),Re$1(20,Em,3,3,"div",10)(21,Dm,3,3,"div",11),Je$1()()),o&2){let c=i.isOpen(),f=c?h_(1,5,"accessories.control.open"):h_(2,7,"accessories.control.closed"),T=(i.service().customName||i.service().serviceName||"").trim(),P=h_(4,9,"accessories.core.contact_sensor"),O=!h_(6,11,T).includes(h_(7,13,P)),R=`${T+(O?`, ${P}`:"")}, ${f}`;ie$1(8),Cy("accessory-on",c),ie$1(2),Rt(" ",R," "),ie$1(9),Ny(i.service().customName||i.service().serviceName),ie$1(),Oe(c?20:21);}},dependencies:[_S,K8],styles:[".accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .left-sensor[_ngcontent-%COMP%]{fill:#ff9800;fill-opacity:.5}.accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .right-object[_ngcontent-%COMP%]{x:24px}.accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .right-sensor[_ngcontent-%COMP%]{x:24px;fill:#ff9800;fill-opacity:.5}"]})}return e})();var zr=(()=>{class e extends me{targetMode;targetBrightness;targetBrightnessChanged=new $$1;setupComponent(){this.createDebouncedSubscription(this.targetBrightnessChanged,()=>E(this,null,function*(){let t=Je(this.service);try{if(this.targetBrightness.value===je.Min){let o=this.service.getCluster?.("onOff");if(!o)throw new Error("OnOff cluster not found");yield o.setAttributes({onOff:!1});}else {let o=this.service.getCluster?.("levelControl");if(!o)throw new Error("LevelControl cluster not found");yield o.setAttributes({currentLevel:this.targetBrightness.value});}this.targetMode=this.targetBrightness.value>0;}catch(o){this.showGenericErrorToast(o),this.targetBrightness.value=t,this.targetMode=t>0,this.cdr.markForCheck();}}),300),this.targetMode=Ze(this.service),this.loadTargetBrightness();}handleAccessoryUpdate(){this.targetMode=Ze(this.service),this.targetBrightness.value=Je(this.service);}setTargetMode(t,o){return E(this,null,function*(){let i=this.targetMode,c=this.targetBrightness.value;try{if(this.targetMode=t,t){let f=this.targetBrightness.value||this.targetBrightness.max;this.targetBrightness.value=f;let T=this.service.getCluster?.("levelControl");if(!T)throw new Error("LevelControl cluster not found");yield T.setAttributes({currentLevel:f});}else {let f=this.service.getCluster?.("onOff");if(!f)throw new Error("OnOff cluster not found");yield f.setAttributes({onOff:!1});}this.blurTarget(o);}catch(f){this.showGenericErrorToast(f),this.targetMode=i,this.targetBrightness.value=c,this.cdr.markForCheck();}})}onBrightnessStateChange(){this.targetBrightnessChanged.next(this.targetBrightness.value);}loadTargetBrightness(){let t=Je(this.service);this.targetBrightness={value:t,min:je.Min,max:je.Max,step:1},this.applySliderGradient("linear-gradient(to right, #242424, #ffd6aa)");}get brightnessPercentage(){return Ot(this.targetBrightness.value)}static \u0275fac=(()=>{let t;return function(i){return (t||(t=_n(e)))(i||e)}})();static \u0275cmp=Ja$1({type:e,selectors:[["app-dimmable-light-manage"]],features:[Xa$1],decls:27,vars:29,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"mt-4"],[3,"ngModelChange","min","max","step","ngModel"],[1,"modal-footer"]],template:function(o,i){o&1&&(La$1(0,"div",0)(1,"div",1),dy(2,"h5",2),La$1(3,"button",3),f_(4,"translate"),rc$1("click",function(){return i.dismissModal()}),Rd$1()(),La$1(5,"div",4)(6,"div",5),f_(7,"translate"),La$1(8,"button",6),rc$1("click",function(f){return i.setTargetMode(false,f)}),La$1(9,"div",7),dy(10,"i",8),Rd$1(),At$1(11),f_(12,"translate"),La$1(13,"div",9),dy(14,"i",10),Rd$1()(),La$1(15,"button",6),rc$1("click",function(f){return i.setTargetMode(true,f)}),La$1(16,"div",7),dy(17,"i",8),Rd$1(),At$1(18),f_(19,"translate"),La$1(20,"div",9),dy(21,"i",10),Rd$1()()(),La$1(22,"h6",11),At$1(23),f_(24,"translate"),Rd$1(),La$1(25,"nouislider",12),Fy("ngModelChange",function(f){return t_(i.targetBrightness.value,f)||(i.targetBrightness.value=f),f}),rc$1("ngModelChange",function(){return i.onBrightnessStateChange()}),Rd$1(),KC(),Rd$1(),dy(26,"div",13),Rd$1()),o&2&&(ie$1(2),ly("innerText",i.service.customName||i.service.serviceName||i.service.displayName),ie$1(),vr$1("aria-label",h_(4,19,"form.button_close")),ie$1(3),vr$1("aria-label",h_(7,21,"accessories.control.mode_control")),ie$1(4),Cy("fa-check-circle",!i.targetMode)("fa-blank",i.targetMode),ie$1(),Rt(" ",h_(12,23,"accessories.control.off")," "),ie$1(6),Cy("fa-check-circle",i.targetMode)("fa-blank",!i.targetMode),ie$1(),Rt(" ",h_(19,25,"accessories.control.on")," "),ie$1(5),xy("",h_(24,27,"accessories.control.brightness"),": ",i.brightnessPercentage,"%"),ie$1(2),ly("min",i.targetBrightness.min)("max",i.targetBrightness.max)("step",i.targetBrightness.step),ky("ngModel",i.targetBrightness.value),JC());},dependencies:[Kn,Hn,ln,ye,K8],encapsulation:2})}return e})();var Kr=(()=>{class e{$accessories=g(le);injector=g(we);$modal=g(si);service=PH.required();readyForControl=PH(false);onClick(){this.readyForControl()&&It(this.service());}onLongClick(){if(!this.readyForControl())return;let t=ty([{provide:ce,useValue:{service:this.service(),$accessories:this.$accessories}}],this.injector);this.$modal.open(zr,{size:"md",backdrop:"static",injector:t});}isOn=X(()=>tt(this.service()));brightness=X(()=>Ft(this.service()));static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-dimmable-light"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:22,vars:21,consts:[["role","switch","tabindex","0",1,"accessory-box",3,"longClick","shortClick","keydown.enter","keydown.space"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["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"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","grey-text",3,"innerHTML"]],template:function(o,i){if(o&1&&(Mi(0),f_(1,"translate"),f_(2,"translate"),Mi(3),f_(4,"translate"),Mi(5),f_(6,"lowercase"),f_(7,"lowercase"),La$1(8,"div",0),rc$1("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()})("keydown.enter",function(){return i.onClick()})("keydown.space",function(){return i.onClick()}),La$1(9,"span",1),At$1(10),Rd$1(),La$1(11,"div",2)(12,"div",3),ah(),La$1(13,"svg",4),dy(14,"path",5)(15,"line",6)(16,"line",7)(17,"line",8)(18,"line",9),Rd$1()(),ch(),La$1(19,"div",10),At$1(20),Rd$1(),dy(21,"div",11),Rd$1()()),o&2){let c=i.isOn(),f=i.brightness(),T=c?f>0?`${f}%`:h_(1,11,"accessories.control.on"):h_(2,13,"accessories.control.off"),P=(i.service().customName||i.service().serviceName||i.service().displayName||"").trim(),O=h_(4,15,"accessories.core.lightbulb"),R=!h_(6,17,P).includes(h_(7,19,O)),se=`${P+(R?`, ${O}`:"")}, ${T}`;ie$1(8),Cy("accessory-on",c)("cursor-pointer",i.readyForControl()),vr$1("aria-checked",c)("aria-label",se),ie$1(2),Rt(" ",se," "),ie$1(4),vr$1("fill",c?"#ffcf55":"none")("fill-opacity",.25+f/100*.5),ie$1(6),Rt(" ",i.service().customName||i.service().serviceName||i.service().displayName," "),ie$1(),ly("innerHTML",T,Ha$1);}},dependencies:[ie,_S,K8],encapsulation:2})}return e})();var Yr=(()=>{class e extends me{targetMode;setupComponent(){this.targetMode=Lt(this.service);}handleAccessoryUpdate(){this.targetMode=Lt(this.service);}setTargetMode(t,o){return E(this,null,function*(){let i=this.targetMode;try{this.targetMode=t,this.cdr.markForCheck();let c=t===Ri.Locked;yield wr(this.service,c),this.blurTarget(o);}catch(c){this.showGenericErrorToast(c),this.targetMode=i,this.cdr.markForCheck();}})}static \u0275fac=(()=>{let t;return function(i){return (t||(t=_n(e)))(i||e)}})();static \u0275cmp=Ja$1({type:e,selectors:[["app-door-lock-manage"]],features:[Xa$1],decls:23,vars:21,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"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"]],template:function(o,i){o&1&&(ke(0,"div",0)(1,"div",1),Dr$1(2,"h5",2),ke(3,"button",3),f_(4,"translate"),_i("click",function(){return i.dismissModal()}),Je$1()(),ke(5,"div",4)(6,"div",5),f_(7,"translate"),ke(8,"button",6),_i("click",function(f){return i.setTargetMode(1,f)}),ke(9,"div",7),Dr$1(10,"i",8),Je$1(),At$1(11),f_(12,"translate"),ke(13,"div",9),Dr$1(14,"i",10),Je$1()(),ke(15,"button",6),_i("click",function(f){return i.setTargetMode(2,f)}),ke(16,"div",7),Dr$1(17,"i",8),Je$1(),At$1(18),f_(19,"translate"),ke(20,"div",9),Dr$1(21,"i",10),Je$1()()()(),Dr$1(22,"div",11),Je$1()),o&2&&(ie$1(2),bi("innerText",i.service.customName||i.service.serviceName||i.service.displayName),ie$1(),vr$1("aria-label",h_(4,13,"form.button_close")),ie$1(3),vr$1("aria-label",h_(7,15,"accessories.control.mode_control")),ie$1(4),Cy("fa-check-circle",i.targetMode===1)("fa-blank",i.targetMode!==1),ie$1(),Rt(" ",h_(12,17,"accessories.control.lock")," "),ie$1(6),Cy("fa-check-circle",i.targetMode===2)("fa-blank",i.targetMode!==2),ie$1(),Rt(" ",h_(19,19,"accessories.control.unlock")," "));},dependencies:[K8],encapsulation:2})}return e})();function Am(e,r){e&1&&(La$1(0,"div",10),At$1(1),f_(2,"translate"),Rd$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.locked")));}function Pm(e,r){e&1&&(La$1(0,"div",11),At$1(1),f_(2,"translate"),Rd$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.unlocked")));}function Fm(e,r){e&1&&(La$1(0,"div",11),At$1(1),f_(2,"translate"),Rd$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.jammed")));}var Qr=(()=>{class e{$accessories=g(le);injector=g(we);$modal=g(si);service=PH.required();readyForControl=PH(false);onClick(){this.readyForControl()&&Br(this.service());}onLongClick(){if(!this.readyForControl())return;let t=ty([{provide:ce,useValue:{service:this.service(),$accessories:this.$accessories}}],this.injector);this.$modal.open(Yr,{size:"md",backdrop:"static",injector:t});}lockState=X(()=>Lt(this.service()));static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-matter-door-lock"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:24,vars:25,consts:[["role","switch","tabindex","0",1,"accessory-box",3,"shortClick","longClick","keydown.enter","keydown.space"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["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"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","grey-text"],["aria-hidden","true",1,"accessory-label","red-text"]],template:function(o,i){if(o&1&&(Mi(0),f_(1,"translate"),f_(2,"translate"),f_(3,"translate"),Mi(4),f_(5,"translate"),Mi(6),f_(7,"lowercase"),f_(8,"lowercase"),La$1(9,"div",0),rc$1("shortClick",function(){return i.onClick()})("longClick",function(){return i.onLongClick()})("keydown.enter",function(){return i.onClick()})("keydown.space",function(){return i.onClick()}),La$1(10,"span",1),At$1(11),Rd$1(),La$1(12,"div",2)(13,"div",3),ah(),La$1(14,"svg",4),dy(15,"path",5)(16,"path",6)(17,"rect",7)(18,"circle",8),Rd$1()(),ch(),La$1(19,"div",9),At$1(20),Rd$1(),Re$1(21,Am,3,3,"div",10)(22,Pm,3,3,"div",11)(23,Fm,3,3,"div",11),Rd$1()()),o&2){let c=i.lockState(),f=c===1,T=c===1?h_(1,13,"accessories.control.locked"):c===2?h_(2,15,"accessories.control.unlocked"):c===0?h_(3,17,"accessories.control.jammed"):"",P=(i.service().customName||i.service().serviceName||i.service().displayName||"").trim(),O=h_(5,19,"accessories.core.lock_mechanism"),R=!h_(7,21,P).includes(h_(8,23,O)),se=T?`${P+(R?`, ${O}`:"")}, ${T}`:`${P+(R?`, ${O}`:"")}`;ie$1(9),Cy("accessory-on",c!==1)("unlocked",c===2)("jammed",c===0)("cursor-pointer",i.readyForControl()),vr$1("aria-checked",f)("aria-label",se),ie$1(2),Rt(" ",se," "),ie$1(9),Rt(" ",i.service().customName||i.service().serviceName||i.service().displayName," "),ie$1(),Oe(c===1?21:c===2?22:c===0?23:-1);}},dependencies:[ie,_S,K8],styles:["@keyframes _ngcontent-%COMP%_blink{0%,to{fill-opacity:1}50%{fill-opacity:.2}}.unlocked[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .shackle-locked[_ngcontent-%COMP%]{stroke-opacity:0!important}.unlocked[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .shackle-unlocked[_ngcontent-%COMP%]{stroke-opacity:1!important}.unlocked[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .keyhole[_ngcontent-%COMP%]{fill:#ff9800!important}.jammed[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .shackle-locked[_ngcontent-%COMP%]{stroke-opacity:0!important}.jammed[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .shackle-unlocked[_ngcontent-%COMP%]{stroke-opacity:1!important}.jammed[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .keyhole[_ngcontent-%COMP%]{fill:#d32f2f!important;animation:_ngcontent-%COMP%_blink 1s infinite}.error[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .shackle-locked[_ngcontent-%COMP%]{stroke-opacity:0!important}.error[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .shackle-unlocked[_ngcontent-%COMP%]{stroke-opacity:1!important}.error[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .keyhole[_ngcontent-%COMP%]{fill:#d32f2f!important;animation:_ngcontent-%COMP%_blink 1s infinite}"]})}return e})();function Om(e,r){if(e&1){let t=nc$1();La$1(0,"h6",11),At$1(1),f_(2,"translate"),f_(3,"convertMired"),Rd$1(),La$1(4,"div",18)(5,"nouislider",13),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1();return t_(c.targetColorTemperature.value,i)||(c.targetColorTemperature.value=i),Wo$1(i)}),rc$1("ngModelChange",function(){Go$1(t);let i=ye$1();return Wo$1(i.onColorTemperatureStateChange())}),Rd$1(),KC(),Rd$1();}if(e&2){let t=ye$1();ie$1(),xy(" ",h_(2,6,"accessories.control.color_temperature"),": ",h_(3,8,t.targetColorTemperature.mired)," "),ie$1(4),ly("min",t.targetColorTemperature.min)("max",t.targetColorTemperature.max)("step",t.targetColorTemperature.step),ky("ngModel",t.targetColorTemperature.value),JC();}}var Zr=(()=>{class e extends me{$colour=g(nt);targetMode;targetBrightness;targetBrightnessChanged=new $$1;targetColorTemperature;targetColorTemperatureChanged=new $$1;targetHue;targetHueChanged=new $$1;targetSaturation;targetSaturationChanged=new $$1;setupComponent(){this.createDebouncedSubscription(this.targetBrightnessChanged,()=>E(this,null,function*(){let t=Je(this.service);try{if(this.targetBrightness.value===je.Min){let o=this.service.getCluster?.("onOff");if(!o)throw new Error("OnOff cluster not found");yield o.setAttributes({onOff:!1});}else {let o=this.service.getCluster?.("levelControl");if(!o)throw new Error("LevelControl cluster not found");yield o.setAttributes({currentLevel:this.targetBrightness.value});}this.targetMode=this.targetBrightness.value>0;}catch(o){this.showGenericErrorToast(o),this.targetBrightness.value=t,this.targetMode=t>0,this.cdr.markForCheck();}}),300),this.createDebouncedSubscription(this.targetColorTemperatureChanged,t=>E(this,null,function*(){let o=pt(this.service);try{let i=this.service.getCluster?.("colorControl");if(!i)throw new Error("ColorControl cluster not found");yield i.setAttributes({colorTemperatureMireds:t});}catch(i){this.showGenericErrorToast(i),this.targetColorTemperature.mired=o,this.targetColorTemperature.value=this.$colour.miredToKelvin(o),this.cdr.markForCheck();}}),300),this.createDebouncedSubscription(this.targetHueChanged,()=>E(this,null,function*(){let t=bt(this.service),o=Bt(this.service);try{let i=this.service.getCluster?.("colorControl");if(!i)throw new Error("ColorControl cluster not found");yield i.setAttributes({currentHue:this.targetHue.value,currentSaturation:this.targetSaturation.value});}catch(i){this.showGenericErrorToast(i),this.targetHue.value=t,this.targetSaturation.value=o,this.updateSaturationSliderGradient(),this.cdr.markForCheck();}}),300),this.createDebouncedSubscription(this.targetSaturationChanged,()=>E(this,null,function*(){let t=bt(this.service),o=Bt(this.service);try{let i=this.service.getCluster?.("colorControl");if(!i)throw new Error("ColorControl cluster not found");yield i.setAttributes({currentHue:this.targetHue.value,currentSaturation:this.targetSaturation.value});}catch(i){this.showGenericErrorToast(i),this.targetHue.value=t,this.targetSaturation.value=o,this.cdr.markForCheck();}}),300),this.targetMode=Ze(this.service),this.loadTargetBrightness(),this.supportsColorTemperature&&this.loadTargetColorTemperature(),this.loadTargetHueSaturation();}handleAccessoryUpdate(){if(this.targetMode=Ze(this.service),this.targetBrightness.value=Je(this.service),this.supportsColorTemperature){let o=pt(this.service);this.targetColorTemperature.mired=o,this.targetColorTemperature.value=this.$colour.miredToKelvin(o);}let t=bt(this.service);this.targetHue.value!==t&&(this.targetHue.value=t,this.updateSaturationSliderGradient()),this.targetSaturation.value=Bt(this.service);}setTargetMode(t,o){return E(this,null,function*(){let i=this.targetMode,c=this.targetBrightness.value;try{if(this.targetMode=t,t){let f=this.targetBrightness.value||this.targetBrightness.max;this.targetBrightness.value=f;let T=this.service.getCluster?.("levelControl");if(!T)throw new Error("LevelControl cluster not found");yield T.setAttributes({currentLevel:f});}else {let f=this.service.getCluster?.("onOff");if(!f)throw new Error("OnOff cluster not found");yield f.setAttributes({onOff:!1});}this.blurTarget(o);}catch(f){this.showGenericErrorToast(f),this.targetMode=i,this.targetBrightness.value=c,this.cdr.markForCheck();}})}onBrightnessStateChange(){this.targetBrightnessChanged.next(this.targetBrightness.value);}onColorTemperatureStateChange(){let t=this.$colour.kelvinToMired(this.targetColorTemperature.value);this.targetColorTemperature.mired=t,this.targetColorTemperatureChanged.next(t);}onHueStateChange(){this.targetHueChanged.next(this.targetHue.value),this.updateSaturationSliderGradient();}onSaturationStateChange(){this.targetSaturationChanged.next(this.targetSaturation.value);}loadTargetBrightness(){let t=Je(this.service);this.targetBrightness={value:t,min:je.Min,max:je.Max,step:1},this.applySliderGradient("linear-gradient(to right, #242424, #ffd6aa)",".brightness-slider .noUi-target");}loadTargetColorTemperature(){let t=pt(this.service);this.targetColorTemperature={value:this.$colour.miredToKelvin(t),mired:t,min:this.$colour.miredToKelvin(At.MaxMired),max:this.$colour.miredToKelvin(At.MinMired),step:10};let o=this.$colour.kelvinToHsl(this.targetColorTemperature.min),i=this.$colour.kelvinToHsl(this.targetColorTemperature.max);this.applySliderGradient(`linear-gradient(to right, ${o}, ${i})`,".color-temp-slider .noUi-target");}loadTargetHueSaturation(){let t=bt(this.service),o=Bt(this.service);this.targetHue={value:t,min:0,max:254,step:1},this.targetSaturation={value:o,min:0,max:254,step:1},this.applySliderGradient("linear-gradient(to right, hsl(0, 100%, 50%), hsl(60, 100%, 50%), hsl(120, 100%, 50%), hsl(180, 100%, 50%), hsl(240, 100%, 50%), hsl(300, 100%, 50%), hsl(360, 100%, 50%))",".hue-slider .noUi-target"),this.updateSaturationSliderGradient();}get brightnessPercentage(){return Ot(this.targetBrightness.value)}get huePercentage(){return Math.round(this.targetHue.value/254*100)}get saturationPercentage(){return Math.round(this.targetSaturation.value/254*100)}get supportsColorTemperature(){return hr(this.service)}updateSaturationSliderGradient(){let t=this.targetHue.value/254*360;this.applySliderGradient(`linear-gradient(to right, hsl(${t}, 0%, 50%), hsl(${t}, 100%, 50%))`,".saturation-slider .noUi-target");}static \u0275fac=(()=>{let t;return function(i){return (t||(t=_n(e)))(i||e)}})();static \u0275cmp=Ja$1({type:e,selectors:[["app-extended-color-light-manage"]],features:[Xa$1],decls:39,vars:46,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"mt-4"],[1,"brightness-slider"],[3,"ngModelChange","min","max","step","ngModel"],[1,"mt-3"],[1,"hue-slider"],[1,"saturation-slider"],[1,"modal-footer"],[1,"color-temp-slider"]],template:function(o,i){o&1&&(La$1(0,"div",0)(1,"div",1),dy(2,"h5",2),La$1(3,"button",3),f_(4,"translate"),rc$1("click",function(){return i.dismissModal()}),Rd$1()(),La$1(5,"div",4)(6,"div",5),f_(7,"translate"),La$1(8,"button",6),rc$1("click",function(f){return i.setTargetMode(false,f)}),La$1(9,"div",7),dy(10,"i",8),Rd$1(),At$1(11),f_(12,"translate"),La$1(13,"div",9),dy(14,"i",10),Rd$1()(),La$1(15,"button",6),rc$1("click",function(f){return i.setTargetMode(true,f)}),La$1(16,"div",7),dy(17,"i",8),Rd$1(),At$1(18),f_(19,"translate"),La$1(20,"div",9),dy(21,"i",10),Rd$1()()(),La$1(22,"h6",11),At$1(23),f_(24,"translate"),Rd$1(),La$1(25,"div",12)(26,"nouislider",13),Fy("ngModelChange",function(f){return t_(i.targetBrightness.value,f)||(i.targetBrightness.value=f),f}),rc$1("ngModelChange",function(){return i.onBrightnessStateChange()}),Rd$1(),KC(),Rd$1(),Re$1(27,Om,6,10),La$1(28,"h6",14),At$1(29),f_(30,"translate"),Rd$1(),La$1(31,"div",15)(32,"nouislider",13),Fy("ngModelChange",function(f){return t_(i.targetHue.value,f)||(i.targetHue.value=f),f}),rc$1("ngModelChange",function(){return i.onHueStateChange()}),Rd$1(),KC(),Rd$1(),La$1(33,"h6",14),At$1(34),f_(35,"translate"),Rd$1(),La$1(36,"div",16)(37,"nouislider",13),Fy("ngModelChange",function(f){return t_(i.targetSaturation.value,f)||(i.targetSaturation.value=f),f}),rc$1("ngModelChange",function(){return i.onSaturationStateChange()}),Rd$1(),KC(),Rd$1()(),dy(38,"div",17),Rd$1()),o&2&&(ie$1(2),ly("innerText",i.service.customName||i.service.serviceName||i.service.displayName),ie$1(),vr$1("aria-label",h_(4,32,"form.button_close")),ie$1(3),vr$1("aria-label",h_(7,34,"accessories.control.mode_control")),ie$1(4),Cy("fa-check-circle",!i.targetMode)("fa-blank",i.targetMode),ie$1(),Rt(" ",h_(12,36,"accessories.control.off")," "),ie$1(6),Cy("fa-check-circle",i.targetMode)("fa-blank",!i.targetMode),ie$1(),Rt(" ",h_(19,38,"accessories.control.on")," "),ie$1(5),xy("",h_(24,40,"accessories.control.brightness"),": ",i.brightnessPercentage,"%"),ie$1(3),ly("min",i.targetBrightness.min)("max",i.targetBrightness.max)("step",i.targetBrightness.step),ky("ngModel",i.targetBrightness.value),JC(),ie$1(),Oe(i.supportsColorTemperature?27:-1),ie$1(2),xy("",h_(30,42,"accessories.control.hue"),": ",i.huePercentage,"%"),ie$1(3),ly("min",i.targetHue.min)("max",i.targetHue.max)("step",i.targetHue.step),ky("ngModel",i.targetHue.value),JC(),ie$1(2),xy("",h_(35,44,"accessories.control.saturation"),": ",i.saturationPercentage,"%"),ie$1(3),ly("min",i.targetSaturation.min)("max",i.targetSaturation.max)("step",i.targetSaturation.step),ky("ngModel",i.targetSaturation.value),JC());},dependencies:[Kn,Hn,ln,ye,K8,Ct],encapsulation:2})}return e})();var Jr=(()=>{class e{$accessories=g(le);injector=g(we);$modal=g(si);$colour=g(nt);service=PH.required();readyForControl=PH(false);onClick(){this.readyForControl()&&It(this.service());}onLongClick(){if(!this.readyForControl())return;let t=ty([{provide:ce,useValue:{service:this.service(),$accessories:this.$accessories}}],this.injector);this.$modal.open(Zr,{size:"md",backdrop:"static",injector:t});}isOn=X(()=>tt(this.service()));brightness=X(()=>Ft(this.service()));lightColor=X(()=>{if(Cr(this.service())===2){let T=pt(this.service());return this.$colour.kelvinToHex(this.$colour.miredToKelvin(T))}let o=bt(this.service()),i=Bt(this.service()),c=o/254*360,f=i/254*100;return `hsl(${c}, ${f}%, 50%)`});static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-extended-color-light"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:22,vars:21,consts:[["role","switch","tabindex","0",1,"accessory-box",3,"longClick","shortClick","keydown.enter","keydown.space"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["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"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","grey-text",3,"innerHTML"]],template:function(o,i){if(o&1&&(Mi(0),f_(1,"translate"),f_(2,"translate"),Mi(3),f_(4,"translate"),Mi(5),f_(6,"lowercase"),f_(7,"lowercase"),La$1(8,"div",0),rc$1("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()})("keydown.enter",function(){return i.onClick()})("keydown.space",function(){return i.onClick()}),La$1(9,"span",1),At$1(10),Rd$1(),La$1(11,"div",2)(12,"div",3),ah(),La$1(13,"svg",4),dy(14,"path",5)(15,"line",6)(16,"line",7)(17,"line",8)(18,"line",9),Rd$1()(),ch(),La$1(19,"div",10),At$1(20),Rd$1(),dy(21,"div",11),Rd$1()()),o&2){let c=i.isOn(),f=i.brightness(),T=c?f>0?`${f}%`:h_(1,11,"accessories.control.on"):h_(2,13,"accessories.control.off"),P=(i.service().customName||i.service().serviceName||i.service().displayName||"").trim(),O=h_(4,15,"accessories.core.lightbulb"),R=!h_(6,17,P).includes(h_(7,19,O)),se=`${P+(R?`, ${O}`:"")}, ${T}`;ie$1(8),Cy("accessory-on",c)("cursor-pointer",i.readyForControl()),vr$1("aria-checked",c)("aria-label",se),ie$1(2),Rt(" ",se," "),ie$1(4),vr$1("fill",c?i.lightColor():"none")("fill-opacity",.25+f/100*.5),ie$1(6),Rt(" ",i.service().customName||i.service().serviceName||i.service().displayName," "),ie$1(),ly("innerHTML",T,Ha$1);}},dependencies:[ie,_S,K8],encapsulation:2})}return e})();function Im(e,r){if(e&1){let t=nc$1();La$1(0,"h6",12),At$1(1),f_(2,"translate"),Rd$1(),La$1(3,"nouislider",13),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1();return t_(c.targetSpeed.value,i)||(c.targetSpeed.value=i),Wo$1(i)}),rc$1("ngModelChange",function(){Go$1(t);let i=ye$1();return Wo$1(i.onTargetSpeedChange())}),Rd$1(),KC();}if(e&2){let t=ye$1();ie$1(),xy("",h_(2,6,"accessories.control.rotation_speed"),": ",t.targetSpeed.value,"%"),ie$1(2),ly("min",t.targetSpeed.min)("max",t.targetSpeed.max)("step",t.targetSpeed.step),ky("ngModel",t.targetSpeed.value),JC();}}var Xr=(()=>{class e extends me{targetMode;targetSpeed;targetSpeedChanged=new $$1;setupComponent(){this.createDebouncedSubscription(this.targetSpeedChanged,()=>E(this,null,function*(){let t=wt(this.service);try{yield vi(this.service,this.targetSpeed.value);}catch(o){this.showGenericErrorToast(o),this.targetSpeed.value=t,this.targetMode=t>0,this.cdr.markForCheck();}})),this.targetMode=Vt(this.service),this.loadSpeed();}handleAccessoryUpdate(){this.targetMode=Vt(this.service),this.targetSpeed&&(this.targetSpeed.value=wt(this.service));}setTargetMode(t,o){return E(this,null,function*(){let i=this.targetMode,c=this.targetSpeed.value;try{if(this.targetMode=t,t){let f=this.targetSpeed.value||100;yield vi(this.service,f),this.targetSpeed.value=f;}else yield vi(this.service,0),this.targetSpeed.value=0;this.blurTarget(o);}catch(f){this.showGenericErrorToast(f),this.targetMode=i,this.targetSpeed.value=c,this.cdr.markForCheck();}})}onTargetSpeedChange(){this.targetSpeedChanged.next(this.targetSpeed.value),this.targetMode=this.targetSpeed.value>0;}loadSpeed(){this.targetSpeed={value:wt(this.service),min:0,max:100,step:1},this.applySliderGradient("linear-gradient(to right, #add8e6, #416bdf)");}static \u0275fac=(()=>{let t;return function(i){return (t||(t=_n(e)))(i||e)}})();static \u0275cmp=Ja$1({type:e,selectors:[["app-fan-manage"]],features:[Xa$1],decls:24,vars:22,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-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"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[1,"mt-4"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(o,i){o&1&&(La$1(0,"div",0)(1,"div",1),dy(2,"h5",2),La$1(3,"button",3),f_(4,"translate"),rc$1("click",function(){return i.dismissModal()}),Rd$1()(),La$1(5,"div",4)(6,"div",5),f_(7,"translate"),La$1(8,"button",6),rc$1("click",function(f){return i.setTargetMode(false,f)}),La$1(9,"div",7),dy(10,"i",8),Rd$1(),At$1(11),f_(12,"translate"),La$1(13,"div",9),dy(14,"i",10),Rd$1()(),La$1(15,"button",6),rc$1("click",function(f){return i.setTargetMode(true,f)}),La$1(16,"div",7),dy(17,"i",8),Rd$1(),At$1(18),f_(19,"translate"),La$1(20,"div",9),dy(21,"i",10),Rd$1()()(),Re$1(22,Im,4,8),Rd$1(),dy(23,"div",11),Rd$1()),o&2&&(ie$1(2),ly("innerText",i.service.customName||i.service.serviceName||i.service.displayName),ie$1(),vr$1("aria-label",h_(4,14,"form.button_close")),ie$1(3),vr$1("aria-label",h_(7,16,"accessories.control.mode_control")),ie$1(4),Cy("fa-check-circle",!i.targetMode)("fa-blank",i.targetMode),ie$1(),Rt(" ",h_(12,18,"accessories.control.off")," "),ie$1(6),Cy("fa-check-circle",i.targetMode)("fa-blank",!i.targetMode),ie$1(),Rt(" ",h_(19,20,"accessories.control.on")," "),ie$1(4),Oe(i.targetSpeed?22:-1));},dependencies:[Kn,Hn,ln,ye,K8],encapsulation:2})}return e})();function Lm(e,r){if(e&1&&(La$1(0,"div",9),At$1(1),Rd$1()),e&2){ye$1();let t=Ot$1(1);ie$1(),Rt("",t,"%");}}function Vm(e,r){if(e&1&&(dy(0,"div",10),f_(1,"translate")),e&2){ye$1();let t=Ot$1(0);ly("innerText",h_(1,1,t?"accessories.control.on":"accessories.control.off"));}}var e0=(()=>{class e{$accessories=g(le);injector=g(we);$modal=g(si);service=PH.required();readyForControl=PH(false);onClick(){this.readyForControl()&&Ar(this.service());}onLongClick(){if(!this.readyForControl())return;let t=ty([{provide:ce,useValue:{service:this.service(),$accessories:this.$accessories}}],this.injector);this.$modal.open(Xr,{size:"md",backdrop:"static",injector:t});}isOn=X(()=>Vt(this.service()));fanSpeed=X(()=>wt(this.service()));static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-matter-fan"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:23,vars:23,consts:[["role","switch","tabindex","0",1,"accessory-box",3,"longClick","shortClick","keydown.enter","keydown.space"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["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"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","grey-text"],["aria-hidden","true",1,"accessory-label","grey-text",3,"innerText"]],template:function(o,i){if(o&1&&(Mi(0)(1)(2),f_(3,"translate"),f_(4,"translate"),Mi(5),f_(6,"translate"),Mi(7),f_(8,"lowercase"),f_(9,"lowercase"),La$1(10,"div",0),rc$1("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()})("keydown.enter",function(){return i.onClick()})("keydown.space",function(){return i.onClick()}),La$1(11,"span",1),At$1(12),Rd$1(),La$1(13,"div",2)(14,"div",3),ah(),La$1(15,"svg",4)(16,"g",5),dy(17,"path",6),Rd$1(),dy(18,"circle",7),Rd$1()(),ch(),La$1(19,"div",8),At$1(20),Rd$1(),Re$1(21,Lm,2,1,"div",9)(22,Vm,2,3,"div",10),Rd$1()()),o&2){let c=oc$1(i.isOn());ie$1();let f=oc$1(i.fanSpeed()),T=c?f>0?`${f}%`:h_(3,13,"accessories.control.on"):h_(4,15,"accessories.control.off"),P=(i.service().customName||i.service().serviceName||i.service().displayName||"").trim(),O=h_(6,17,"accessories.core.fan"),R=!h_(8,19,P).includes(h_(9,21,O)),se=`${P+(R?`, ${O}`:"")}, ${T}`;ie$1(9),Cy("accessory-on",c)("cursor-pointer",i.readyForControl()),vr$1("aria-checked",c)("aria-label",se),ie$1(2),Rt(" ",se," "),ie$1(2),Cy("spin",c),ie$1(6),Rt(" ",i.service().customName||i.service().serviceName||i.service().displayName," "),ie$1(),Oe(c&&f>0?21:22);}},dependencies:[ie,_S,K8],styles:[".spin[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] g[_ngcontent-%COMP%] .fan-blades[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_fa-spin 2s infinite linear;transform-origin:53.5% 50%}.spin-counter[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] g[_ngcontent-%COMP%] .fan-blades[_ngcontent-%COMP%]{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 t0=(()=>{class e{service=PH.required();static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-matter-generic-switch"]],inputs:{service:[1,"service"]},decls:17,vars:7,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","focusable","false","aria-hidden","true"],["x","1","y","1","width","30","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","2"],["cx","8.5","cy","9.5","r","5","stroke","#7f7f7f","stroke-width","1","fill","none","fill-opacity","0.5"],["cx","23.5","cy","9.5","r","5","stroke","#7f7f7f","stroke-width","1","fill","none","fill-opacity","0.5"],["cx","23.5","cy","9.5","r","3","stroke","#7f7f7f","stroke-width","1","fill","none"],["cx","16","cy","23.5","r","5","stroke","#7f7f7f","stroke-width","1","fill","none","fill-opacity","0.5"],["x1","5","y1","23.5","x2","11","y2","23.5","stroke","#7f7f7f","stroke-width","0.5","stroke-linecap","round"],["x1","21","y1","23.5","x2","27","y2","23.5","stroke","#7f7f7f","stroke-width","0.5","stroke-linecap","round"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","grey-text"]],template:function(o,i){o&1&&(ke(0,"div",0)(1,"div",1)(2,"div",2),f_(3,"translate"),ah(),ke(4,"svg",3),Dr$1(5,"rect",4)(6,"circle",5)(7,"circle",6)(8,"circle",7)(9,"circle",8)(10,"line",9)(11,"line",10),Je$1()(),ch(),ke(12,"div",11),At$1(13),Je$1(),ke(14,"div",12),At$1(15),f_(16,"translate"),Je$1()()()),o&2&&(ie$1(2),vr$1("aria-label",h_(3,3,"accessories.core.stateless_programmable_switch")),ie$1(11),Rt(" ",i.service().customName||i.service().serviceName||i.service().displayName," "),ie$1(2),Rt(" ",h_(16,5,"accessories.control.stateless")," "));},dependencies:[K8],encapsulation:2})}return e})();function Nm(e,r){if(e&1&&At$1(0),e&2){ye$1();let t=Ot$1(0);Rt(" ",t,"% ");}}function Hm(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.no_data")," ");}var i0=(()=>{class e{service=PH.required();humidity=X(()=>Mr(this.service()));static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-matter-humidity-sensor"]],inputs:{service:[1,"service"]},decls:35,vars:12,consts:[[1,"accessory-box"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["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"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","grey-text"]],template:function(o,i){if(o&1&&(Mi(0)(1),f_(2,"translate"),Mi(3),f_(4,"translate"),Mi(5),f_(6,"lowercase"),f_(7,"lowercase"),ke(8,"div",0)(9,"span",1),At$1(10),Je$1(),ke(11,"div",2)(12,"div",3),ah(),ke(13,"svg",4),Dr$1(14,"rect",5),ke(15,"g",6),Dr$1(16,"path",7),Je$1(),Dr$1(17,"line",8)(18,"line",9)(19,"line",10)(20,"line",11)(21,"line",12)(22,"line",13)(23,"line",14)(24,"line",15)(25,"line",16)(26,"line",17)(27,"line",18)(28,"line",19)(29,"line",20),Je$1()(),ch(),ke(30,"div",21),At$1(31),Je$1(),ke(32,"div",22),Re$1(33,Nm,1,1)(34,Hm,2,3),Je$1()()()),o&2){let c=oc$1(i.humidity()),f=c!==null?`${c}%`:h_(2,4,"accessories.control.no_data"),T=(i.service().customName||i.service().serviceName||"").trim(),P=h_(4,6,"accessories.core.humidity_sensor"),O=!h_(6,8,T).includes(h_(7,10,P)),R=`${T+(O?`, ${P}`:"")}, ${f}`;ie$1(10),Rt(" ",R," "),ie$1(21),Ny(i.service().customName||i.service().serviceName),ie$1(2),Oe(c!==null?33:34);}},dependencies:[_S,K8],encapsulation:2})}return e})();function Rm(e,r){if(e&1&&(ke(0,"div",29),At$1(1),f_(2,"number"),Je$1()),e&2){ye$1();let t=Ot$1(0);ie$1(),Rt("",g_(2,1,t,"0.1-1")," lux");}}function $m(e,r){if(e&1&&(ke(0,"div",29),At$1(1),f_(2,"number"),Je$1()),e&2){ye$1();let t=Ot$1(0);ie$1(),Rt("",g_(2,1,t,"1.0-0")," lux");}}var n0=(()=>{class e{service=PH.required();illuminance=X(()=>xr(this.service()));static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-matter-light-sensor"]],inputs:{service:[1,"service"]},decls:42,vars:16,consts:[[1,"accessory-box"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["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"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","grey-text"]],template:function(o,i){if(o&1&&(Mi(0)(1),f_(2,"number"),f_(3,"number"),Mi(4),f_(5,"translate"),Mi(6),f_(7,"lowercase"),f_(8,"lowercase"),ke(9,"div",0)(10,"span",1),At$1(11),Je$1(),ke(12,"div",2)(13,"div",3),ah(),ke(14,"svg",4),Dr$1(15,"rect",5)(16,"circle",6)(17,"line",7)(18,"line",8)(19,"line",9)(20,"line",10)(21,"line",11)(22,"line",12)(23,"line",13)(24,"line",14)(25,"line",15)(26,"line",16)(27,"line",17)(28,"line",18)(29,"line",19)(30,"line",20)(31,"line",21)(32,"line",22)(33,"line",23)(34,"line",24)(35,"line",25)(36,"line",26)(37,"line",27),Je$1()(),ch(),ke(38,"div",28),At$1(39),Je$1(),Re$1(40,Rm,3,4,"div",29)(41,$m,3,4,"div",29),Je$1()()),o&2){let c=oc$1(i.illuminance()),f=`${c<1?g_(2,4,c,"0.1-1"):g_(3,7,c,"1.0-0")} lux`,T=(i.service().customName||i.service().serviceName||"").trim(),P=h_(5,10,"accessories.core.light_sensor"),O=!h_(7,12,T).includes(h_(8,14,P)),R=`${T+(O?`, ${P}`:"")}, ${f}`;ie$1(11),Rt(" ",R," "),ie$1(28),Ny(i.service().customName||i.service().serviceName),ie$1(),Oe(c<1?40:41);}},dependencies:[kS,_S,K8],encapsulation:2})}return e})();function Um(e,r){e&1&&(ke(0,"div",23),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.detected")));}function Wm(e,r){e&1&&(ke(0,"div",24),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Rt(" ",h_(2,1,"accessories.control.not_detected")," "));}var o0=(()=>{class e{service=PH.required();isOccupied=X(()=>yr(this.service()));static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-matter-occupancy-sensor"]],inputs:{service:[1,"service"]},decls:35,vars:15,consts:[[1,"accessory-box"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2",1,"orange-outline"],["transform","translate(4.75, -0.75), scale(0.075)"],["d","M190.85 83.94C190.85 70.36 180.09 59.24 166.93 59.24C153.78 59.24 143.02 70.36 143.02 83.94C143.02 97.53 153.78 108.65 166.93 108.65C180.09 108.65 190.85 97.53 190.85 83.94Z","fill","#ff9800","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","7"],["d","M232.24 175.95C210.12 175.95 190.98 163.6 180.22 145.69C179.08 143.72 169.99 127.91 168.86 125.93C164.67 118.52 156.9 114.2 148.53 114.2C145.54 114.2 142.55 114.81 139.56 116.05C135.37 117.82 114.45 126.67 76.78 142.6L76.78 200.66L100.69 200.66L100.69 159.28L121.62 150.02L88.73 324.17L113.85 324.17L134.78 225.36L160.49 250.06L160.49 324.17L184.4 324.17L184.4 230.92L159.89 205.6C164.19 183.36 166.59 171.01 167.06 168.54C182.61 188.3 205.93 200.66 232.24 200.66C232.24 195.72 232.24 178.42 232.24 175.95Z","fill","#ff9800","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","7"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","red-text"],["aria-hidden","true",1,"accessory-label","grey-text"]],template:function(o,i){if(o&1&&(Mi(0),f_(1,"translate"),f_(2,"translate"),Mi(3),f_(4,"translate"),Mi(5),f_(6,"lowercase"),f_(7,"lowercase"),ke(8,"div",0)(9,"span",1),At$1(10),Je$1(),ke(11,"div",2)(12,"div",3),ah(),ke(13,"svg",4),Dr$1(14,"rect",5),ke(15,"g",6),Dr$1(16,"path",7)(17,"path",8),Je$1(),Dr$1(18,"line",9)(19,"line",10)(20,"line",11)(21,"line",12)(22,"line",13)(23,"line",14)(24,"line",15)(25,"line",16)(26,"line",17)(27,"line",18)(28,"line",19)(29,"line",20)(30,"line",21),Je$1()(),ch(),ke(31,"div",22),At$1(32),Je$1(),Re$1(33,Um,3,3,"div",23)(34,Wm,3,3,"div",24),Je$1()()),o&2){let c=i.isOccupied(),f=c?h_(1,5,"accessories.control.detected"):h_(2,7,"accessories.control.not_detected"),T=(i.service().customName||i.service().serviceName||"").trim(),P=h_(4,9,"accessories.core.occupancy_sensor"),O=!h_(6,11,T).includes(h_(7,13,P)),R=`${T+(O?`, ${P}`:"")}, ${f}`;ie$1(8),Cy("accessory-on",c),ie$1(2),Rt(" ",R," "),ie$1(22),Ny(i.service().customName||i.service().serviceName),ie$1(),Oe(c?33:34);}},dependencies:[_S,K8],styles:[".accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .orange-outline[_ngcontent-%COMP%]{stroke:#ff9800;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{stroke-opacity:.8}50%{stroke-opacity:.2}}"]})}return e})();var r0=(()=>{class e{service=PH.required();readyForControl=PH(false);onClick(){this.readyForControl()&&yt(this.service());}isOn=X(()=>tt(this.service()));static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-on-off-light-switch"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:21,vars:21,consts:[["role","switch","tabindex","0",1,"accessory-box",3,"click","keydown.enter","keydown.space"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["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
C21,9.97698687 21.1735519,10.8351 21.4589326,11.2029426
C22.4505994,12.4811551 23,14.065977 23,15.7447101
C23,19.7640218 19.8532802,23 16,23
C12.1467198,23 9,19.7640218 9,15.7447101
C9,14.0415493 9.56560927,12.4352187 10.5838497,11.1483389
C10.8725653,10.7834523 11,9.9670534 10.5,9.49999999
C10,9.03294657 9.01543812,9.9073372 9.01543812,9.9073372
C7.75536735,11.4998488 7,13.5315645 7,15.7447101
C7,20.8562656 11.0294373,25 16,25
C20.9705627,25 25,20.8562656 25,15.7447101
C25,13.5637007 24.2664101,11.5588905 23.0391328,9.97698685
C23.0391328,9.97698685 21.9178658,9.0230131 21.4589329,9.49999998 Z`],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","grey-text",3,"innerText"]],template:function(o,i){if(o&1&&(Mi(0),f_(1,"translate"),f_(2,"translate"),Mi(3),f_(4,"translate"),Mi(5),f_(6,"lowercase"),f_(7,"lowercase"),ke(8,"div",0),_i("click",function(){return i.onClick()})("keydown.enter",function(){return i.onClick()})("keydown.space",function(){return i.onClick()}),ke(9,"span",1),At$1(10),Je$1(),ke(11,"div",2)(12,"div",3),ah(),ke(13,"svg",4),Dr$1(14,"circle",5)(15,"line",6)(16,"path",7),Je$1()(),ch(),ke(17,"div",8),At$1(18),Je$1(),Dr$1(19,"div",9),f_(20,"translate"),Je$1()()),o&2){let c=i.isOn(),f=c?h_(1,9,"accessories.control.on"):h_(2,11,"accessories.control.off"),T=(i.service().customName||i.service().serviceName||i.service().displayName||"").trim(),P=h_(4,13,"accessories.core.switch"),O=!h_(6,15,T).includes(h_(7,17,P)),R=`${T+(O?`, ${P}`:"")}, ${f}`;ie$1(8),Cy("accessory-on",c)("cursor-pointer",i.readyForControl()),vr$1("aria-checked",c)("aria-label",R),ie$1(2),Rt(" ",R," "),ie$1(8),Rt(" ",i.service().customName||i.service().serviceName||i.service().displayName," "),ie$1(),bi("innerText",h_(20,19,c?"accessories.control.on":"accessories.control.off"));}},dependencies:[_S,K8],encapsulation:2})}return e})();var a0=(()=>{class e{service=PH.required();readyForControl=PH(false);onClick(){this.readyForControl()&&yt(this.service());}isOn=X(()=>tt(this.service()));static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-on-off-light"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:23,vars:22,consts:[["role","switch","tabindex","0",1,"accessory-box",3,"click","keydown.enter","keydown.space"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["fill-opacity","0.75","stroke","#7f7f7f","stroke-width","1.5","d","M8 21c-2.8-2.2-4.5-5.4-4.5-9 0-6.1 5-11 11.5-11S27.5 5.9 27.5 12c0 3.5-1.7 6.7-4.5 8.9-1.2 1-1.8 4.8-3 7.3-.9 2-2.2 2.7-4.5 2.7s-3.6-.7-4.5-2.7c-1.2-2.5-1.8-6.3-3-7.3z"],["stroke","#7f7f7f","stroke-width","1.5","x1","8","y1","21.5","x2","23","y2","21.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","23","x2","21","y2","24"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","25.5","x2","21","y2","26.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","11","y1","28","x2","20","y2","29"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","grey-text",3,"innerHTML"]],template:function(o,i){if(o&1&&(Mi(0),f_(1,"translate"),f_(2,"translate"),Mi(3),f_(4,"translate"),Mi(5),f_(6,"lowercase"),f_(7,"lowercase"),ke(8,"div",0),_i("click",function(){return i.onClick()})("keydown.enter",function(){return i.onClick()})("keydown.space",function(){return i.onClick()}),ke(9,"span",1),At$1(10),Je$1(),ke(11,"div",2)(12,"div",3),ah(),ke(13,"svg",4),Dr$1(14,"path",5)(15,"line",6)(16,"line",7)(17,"line",8)(18,"line",9),Je$1()(),ch(),ke(19,"div",10),At$1(20),Je$1(),Dr$1(21,"div",11),f_(22,"translate"),Je$1()()),o&2){let c=i.isOn(),f=c?h_(1,10,"accessories.control.on"):h_(2,12,"accessories.control.off"),T=(i.service().customName||i.service().serviceName||i.service().displayName||"").trim(),P=h_(4,14,"accessories.core.lightbulb"),O=!h_(6,16,T).includes(h_(7,18,P)),R=`${T+(O?`, ${P}`:"")}, ${f}`;ie$1(8),Cy("accessory-on",c)("cursor-pointer",i.readyForControl()),vr$1("aria-checked",c)("aria-label",R),ie$1(2),Rt(" ",R," "),ie$1(4),vr$1("fill",c?"#ffcf55":"none"),ie$1(6),Rt(" ",i.service().customName||i.service().serviceName||i.service().displayName," "),ie$1(),bi("innerHTML",h_(22,20,c?"accessories.control.on":"accessories.control.off"),Ha$1);}},dependencies:[_S,K8],encapsulation:2})}return e})();function jm(e,r){e&1&&(ah(),Dr$1(0,"line",9)(1,"line",10)(2,"line",11));}function Gm(e,r){e&1&&(ah(),Dr$1(0,"line",12)(1,"line",13)(2,"line",14));}function qm(e,r){e&1&&(ah(),Dr$1(0,"line",14)(1,"line",15)(2,"line",16));}var s0=(()=>{class e{$settings=g(zt$1);service=PH.required();readyForControl=PH(false);browserLang=this.$settings.browserLang;onClick(){this.readyForControl()&&yt(this.service());}isOn=X(()=>tt(this.service()));activePowerWatts=X(()=>Sr(this.service()));static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-on-off-plug-in-unit"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:24,vars:23,consts:[["role","switch","tabindex","0",1,"accessory-box",3,"click","keydown.enter","keydown.space"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32","height","32","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["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"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",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(o,i){if(o&1&&(Mi(0),f_(1,"translate"),f_(2,"translate"),Mi(3),f_(4,"number"),Mi(5),f_(6,"translate"),Mi(7),f_(8,"lowercase"),f_(9,"lowercase"),ke(10,"div",0),_i("click",function(){return i.onClick()})("keydown.enter",function(){return i.onClick()})("keydown.space",function(){return i.onClick()}),ke(11,"span",1),At$1(12),Je$1(),ke(13,"div",2)(14,"div",3),ah(),ke(15,"svg",4),Dr$1(16,"rect",5)(17,"circle",6),Re$1(18,jm,3,0)(19,Gm,3,0)(20,qm,3,0),Je$1()(),ch(),ke(21,"div",7),At$1(22),Je$1(),Dr$1(23,"div",8),Je$1()()),o&2){let c=i.isOn(),f=i.activePowerWatts(),T=c?h_(1,10,"accessories.control.on"):h_(2,12,"accessories.control.off"),P=c&&f!==null?`${T} \xB7 ${g_(4,14,f,"1.0-1")}W`:T,O=(i.service().customName||i.service().serviceName||i.service().displayName||"").trim(),R=h_(6,17,"accessories.core.outlet"),se=!h_(8,19,O).includes(h_(9,21,R)),Se=`${O+(se?`, ${R}`:"")}, ${P}`;ie$1(10),Cy("accessory-on",c)("cursor-pointer",i.readyForControl()),vr$1("aria-checked",c)("aria-label",Se),ie$1(2),Rt(" ",Se," "),ie$1(6),Oe(i.browserLang==="en-GB"?18:i.browserLang==="en-AU"||i.browserLang==="en-NZ"?19:20),ie$1(4),Rt(" ",i.service().customName||i.service().serviceName||i.service().displayName," "),ie$1(),bi("innerText",P);}},dependencies:[kS,_S,K8],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 l0=(()=>{class e{service=PH.required();readyForControl=PH(false);isOn=X(()=>Ze(this.service()));onClick(){this.readyForControl()&&Ui(this.service());}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-matter-pump"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:27,vars:21,consts:[["role","switch","tabindex","0",1,"accessory-box",3,"click","keydown.enter","keydown.space"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32","height","32","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["x1","1","y1","16","x2","6","y2","16","stroke","#7f7f7f","stroke-width","3","stroke-linecap","round"],["x1","16","y1","6","x2","16","y2","1","stroke","#7f7f7f","stroke-width","3","stroke-linecap","round"],["cx","16","cy","16","r","10","fill","none","stroke","#7f7f7f","stroke-width","2",1,"housing"],["stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round",1,"impeller"],["x1","16","y1","16","x2","16","y2","10"],["x1","16","y1","16","x2","21.2","y2","19"],["x1","16","y1","16","x2","10.8","y2","19"],["cx","16","cy","16","r","2","fill","#7f7f7f","stroke","none",1,"hub"],["x1","9","y1","30","x2","23","y2","30","stroke","#7f7f7f","stroke-width","2.5","stroke-linecap","round"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","grey-text",3,"innerText"]],template:function(o,i){if(o&1&&(Mi(0),f_(1,"translate"),f_(2,"translate"),Mi(3),f_(4,"translate"),Mi(5),f_(6,"lowercase"),f_(7,"lowercase"),ke(8,"div",0),_i("click",function(){return i.onClick()})("keydown.enter",function(){return i.onClick()})("keydown.space",function(){return i.onClick()}),ke(9,"span",1),At$1(10),Je$1(),ke(11,"div",2)(12,"div",3),ah(),ke(13,"svg",4),Dr$1(14,"line",5)(15,"line",6)(16,"circle",7),ke(17,"g",8),Dr$1(18,"line",9)(19,"line",10)(20,"line",11),Je$1(),Dr$1(21,"circle",12)(22,"line",13),Je$1()(),ch(),ke(23,"div",14),At$1(24),Je$1(),Dr$1(25,"div",15),f_(26,"translate"),Je$1()()),o&2){let c=i.isOn(),f=c?h_(1,9,"accessories.control.on"):h_(2,11,"accessories.control.off"),T=(i.service().customName||i.service().serviceName||i.service().displayName||"").trim(),P=h_(4,13,"accessories.core.pump"),O=!h_(6,15,T).includes(h_(7,17,P)),R=`${T+(O?`, ${P}`:"")}, ${f}`;ie$1(8),Cy("accessory-on",c)("cursor-pointer",i.readyForControl()),vr$1("aria-checked",c)("aria-label",R),ie$1(2),Rt(" ",R," "),ie$1(14),Rt(" ",i.service().customName||i.service().serviceName||i.service().displayName," "),ie$1(),bi("innerText",h_(26,19,c?"accessories.control.on":"accessories.control.off"));}},dependencies:[_S,K8],styles:[".accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] .housing[_ngcontent-%COMP%]{stroke:#1976d2;stroke-opacity:.75;stroke-width:2.5}.accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] .impeller[_ngcontent-%COMP%]{stroke:#1976d2;transform-origin:16px 16px;animation:_ngcontent-%COMP%_spin 2s linear infinite}.accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] .hub[_ngcontent-%COMP%]{fill:#1976d2}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"]})}return e})();var zm=(e,r)=>r.mode,Km=(e,r)=>r.areaId;function Ym(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.stopped")," ");}function Qm(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.paused")," ");}function Zm(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.cleaning")," ");}function Jm(e,r){if(e&1){let t=nc$1();ke(0,"button",8),_i("click",function(i){let c=Go$1(t).$implicit,f=ye$1(2);return Wo$1(f.setCleanMode(c.mode,i))}),ke(1,"div",9),Dr$1(2,"i",10),Je$1(),At$1(3),ke(4,"div",11),Dr$1(5,"i",12),Je$1()();}if(e&2){let t=r.$implicit,o=ye$1(2);ie$1(2),Cy("fa-check-circle",o.currentCleanModeId===t.mode)("fa-blank",o.currentCleanModeId!==t.mode),ie$1(),Rt(" ",t.label," ");}}function Xm(e,r){if(e&1&&(ke(0,"h6",14),At$1(1),f_(2,"translate"),Je$1(),ke(3,"div",7),f_(4,"translate"),dT(5,Jm,6,5,"button",15,zm),Je$1()),e&2){let t=ye$1();ie$1(),Ny(h_(2,2,"accessories.control.clean_mode")),ie$1(2),vr$1("aria-label",h_(4,4,"accessories.control.clean_mode")),ie$1(2),fT(t.cleanModes);}}function eu(e,r){e&1&&(ke(0,"span",16),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.cleaning")));}function tu(e,r){e&1&&Dr$1(0,"i",12);}function iu(e,r){if(e&1){let t=nc$1();ke(0,"button",8),_i("click",function(){let i=Go$1(t).$implicit,c=ye$1(2);return Wo$1(c.toggleAreaSelection(i.areaId))}),ke(1,"div",9),Dr$1(2,"i",10),Je$1(),At$1(3),ke(4,"div",11),Re$1(5,eu,3,3,"span",16)(6,tu,1,0,"i",12),Je$1()();}if(e&2){let t=r.$implicit,o=ye$1(2);ie$1(2),Cy("fa-check-circle",o.isAreaSelected(t.areaId))("fa-blank",!o.isAreaSelected(t.areaId)),ie$1(),Rt(" ",t.name," "),ie$1(2),Oe(o.currentAreaId===t.areaId?5:6);}}function nu(e,r){if(e&1&&(ke(0,"h6",14),At$1(1),f_(2,"translate"),Je$1(),ke(3,"div",7),f_(4,"translate"),dT(5,iu,7,6,"button",15,Km),Je$1()),e&2){let t=ye$1();ie$1(),Ny(h_(2,2,"accessories.control.service_areas")),ie$1(2),vr$1("aria-label",h_(4,4,"accessories.control.service_areas")),ie$1(2),fT(t.areas);}}var c0=(()=>{class e extends me{currentMode=0;hasCleanMode=false;cleanModes=[];currentCleanModeId=0;hasServiceArea=false;areas=[];selectedAreaIds=[];currentAreaId=null;areaProgress=[];setupComponent(){this.updateModeFromService(),this.updateCleanModeFromService(),this.updateServiceAreaFromService();}handleAccessoryUpdate(){this.updateModeFromService(),this.updateCleanModeFromService(),this.updateServiceAreaFromService();}updateModeFromService(){let t=this.service.clusters?.rvcOperationalState?.operationalState??Be.Stopped;t===Be.Running?this.currentMode=ot.Cleaning:t===Be.Paused?this.currentMode=2:this.currentMode=ot.Idle;}updateCleanModeFromService(){this.hasCleanMode=Ir(this.service),this.hasCleanMode&&(this.cleanModes=Rr(this.service),this.currentCleanModeId=$r(this.service));}updateServiceAreaFromService(){this.hasServiceArea=Or(this.service),this.hasServiceArea&&(this.areas=Lr(this.service),this.selectedAreaIds=Vr(this.service),this.currentAreaId=Nr(this.service),this.areaProgress=Hr(this.service));}setMode(t,o){return E(this,null,function*(){if(t===Be.Paused&&this.currentMode===ot.Idle)return;let i=this.currentMode;try{if(this.currentMode=t,this.cdr.markForCheck(),t===ot.Idle){let c=this.service.getCluster?.("rvcRunMode");if(!c)throw new Error("RvcRunMode cluster not found");yield c.setAttributes({currentMode:ot.Idle});}else if(t===ot.Cleaning){let c=this.service.getCluster?.("rvcRunMode");if(!c)throw new Error("RvcRunMode cluster not found");yield c.setAttributes({currentMode:ot.Cleaning});}else if(t===Be.Paused){let c=this.service.getCluster?.("rvcOperationalState");if(!c)throw new Error("RvcOperationalState cluster not found");yield c.setAttributes({operationalState:Be.Paused});}this.blurTarget(o);}catch(c){this.showGenericErrorToast(c),this.currentMode=i,this.cdr.markForCheck();}})}setCleanMode(t,o){return E(this,null,function*(){let i=this.currentCleanModeId;try{this.currentCleanModeId=t,this.cdr.markForCheck();let c=this.service.getCluster?.("rvcCleanMode");if(!c)throw new Error("RvcCleanMode cluster not found");yield c.setAttributes({currentMode:t}),this.blurTarget(o);}catch(c){this.showGenericErrorToast(c),this.currentCleanModeId=i,this.cdr.markForCheck();}})}toggleAreaSelection(t){return E(this,null,function*(){let o=[...this.selectedAreaIds];try{this.selectedAreaIds.indexOf(t)===-1?this.selectedAreaIds=[...this.selectedAreaIds,t]:this.selectedAreaIds=this.selectedAreaIds.filter(f=>f!==t),this.cdr.markForCheck();let c=this.service.getCluster?.("serviceArea");if(!c)throw new Error("ServiceArea cluster not found");yield c.setAttributes({selectedAreas:this.selectedAreaIds});}catch(i){this.showGenericErrorToast(i),this.selectedAreaIds=o,this.cdr.markForCheck();}})}isAreaSelected(t){return this.selectedAreaIds.includes(t)}get isPauseDisabled(){return this.currentMode===ot.Idle}static \u0275fac=(()=>{let t;return function(i){return (t||(t=_n(e)))(i||e)}})();static \u0275cmp=Ja$1({type:e,selectors:[["app-robotic-vacuum-cleaner-manage"]],features:[Xa$1],decls:37,vars:33,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-4","p-0"],[1,"mb-0","mx-0","p-3","btn-read","w-100"],["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"],[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"],[1,"badge","bg-primary"]],template:function(o,i){if(o&1&&(ke(0,"div",0)(1,"div",1),Dr$1(2,"h5",2),ke(3,"button",3),f_(4,"translate"),_i("click",function(){return i.dismissModal()}),Je$1()(),ke(5,"div",4)(6,"div",5)(7,"div",6),Re$1(8,Ym,2,3)(9,Qm,2,3)(10,Zm,2,3),Je$1()(),ke(11,"div",7),f_(12,"translate"),ke(13,"button",8),_i("click",function(f){return i.setMode(0,f)}),ke(14,"div",9),Dr$1(15,"i",10),Je$1(),At$1(16),f_(17,"translate"),ke(18,"div",11),Dr$1(19,"i",12),Je$1()(),ke(20,"button",8),_i("click",function(f){return i.setMode(2,f)}),ke(21,"div",9),Dr$1(22,"i",10),Je$1(),At$1(23),f_(24,"translate"),ke(25,"div",11),Dr$1(26,"i",12),Je$1()(),ke(27,"button",8),_i("click",function(f){return i.setMode(1,f)}),ke(28,"div",9),Dr$1(29,"i",10),Je$1(),At$1(30),f_(31,"translate"),ke(32,"div",11),Dr$1(33,"i",12),Je$1()()(),Re$1(34,Xm,7,6),Re$1(35,nu,7,6),Je$1(),Dr$1(36,"div",13),Je$1()),o&2){let c;ie$1(2),bi("innerText",i.service.customName||i.service.serviceName||i.service.displayName),ie$1(),vr$1("aria-label",h_(4,23,"form.button_close")),ie$1(5),Oe((c=i.currentMode)===0?8:c===2?9:c===1?10:-1),ie$1(3),vr$1("aria-label",h_(12,25,"accessories.control.mode_control")),ie$1(4),Cy("fa-check-circle",i.currentMode===0)("fa-blank",i.currentMode!==0),ie$1(),Rt(" ",h_(17,27,"accessories.control.stop")," "),ie$1(4),Cy("btn-pause-disabled",i.isPauseDisabled),ie$1(2),Cy("fa-check-circle",i.currentMode===2)("fa-blank",i.currentMode!==2),ie$1(),Rt(" ",h_(24,29,"accessories.control.pause")," "),ie$1(6),Cy("fa-check-circle",i.currentMode===1)("fa-blank",i.currentMode!==1),ie$1(),Rt(" ",h_(31,31,"accessories.control.clean")," "),ie$1(4),Oe(i.hasCleanMode&&i.cleanModes.length>0?34:-1),ie$1(),Oe(i.hasServiceArea&&i.areas.length>0?35:-1);}},dependencies:[K8],styles:[".btn-control.btn-pause-disabled[_ngcontent-%COMP%]{opacity:.5;cursor:not-allowed!important;pointer-events:auto!important}.btn-control.btn-pause-disabled[_ngcontent-%COMP%]:hover{cursor:not-allowed!important}"]})}return e})();var d0=(()=>{class e{$accessories=g(le);injector=g(we);$modal=g(si);service=PH.required();readyForControl=PH(false);onClick(){this.readyForControl()&&yt(this.service());}onLongClick(){if(!this.readyForControl()||!this.canShowModal())return;let t=ty([{provide:ce,useValue:{service:this.service(),$accessories:this.$accessories}}],this.injector);this.$modal.open(c0,{size:"md",backdrop:"static",injector:t});}isActive=X(()=>tt(this.service()));isRunning=X(()=>Pt(this.service())===Be.Running);isCharging=X(()=>Pt(this.service())===Be.Charging);statusText=X(()=>vr(this.service()));canShowModal=X(()=>!gr(this.service()));static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-robotic-vacuum-cleaner"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:44,vars:23,consts:[["role","switch","tabindex","0",1,"accessory-box",3,"longClick","shortClick","keydown.enter","keydown.space"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["id","motionClip"],["x","0","y","-0.5","width","32","height","8"],["transform","translate(0, 5)"],["cx","16","cy","10","rx","14","ry","8.4","stroke","#7f7f7f","stroke-width","1.75","fill","none"],["x1","2","y1","10","x2","2","y2","16","stroke","#7f7f7f","stroke-width","1.75"],["x1","30","y1","10","x2","30","y2","16","stroke","#7f7f7f","stroke-width","1.75"],["d","M2,16 A14,6.9 0 0,0 30,16","stroke","#7f7f7f","stroke-width","1.75","fill","none"],["cx","16","cy","10","rx","4.2","ry","2.5","stroke","#7f7f7f","stroke-width","1","fill","#1976d2","fill-opacity","0.5"],["cx","16","cy","15","r","0.9","fill","#7f7f7f"],["x1","2","y1","16","x2","0.5","y2","18.5","stroke","#7f7f7f","stroke-width","1"],["x1","2","y1","16","x2","0.5","y2","14","stroke","#7f7f7f","stroke-width","1"],["x1","30","y1","16","x2","31.5","y2","18.5","stroke","#7f7f7f","stroke-width","1"],["x1","30","y1","16","x2","31.5","y2","14","stroke","#7f7f7f","stroke-width","1"],["clip-path","url(#motionClip)","stroke","#7f7f7f","stroke-linecap","round",1,"motion-lines"],["x1","12","y1","8","x2","12","y2","14","stroke-width","2.1","opacity","0"],["attributeName","y1","values","8;0","dur","3s","begin","0.3s","repeatCount","indefinite"],["attributeName","y2","values","14;6","dur","3s","begin","0.3s","repeatCount","indefinite"],["attributeName","opacity","values","0;1;1;0","keyTimes","0;0.2;0.8;1","dur","3s","begin","0.3s","repeatCount","indefinite"],["x1","16","y1","8","x2","16","y2","14","stroke-width","2.5","opacity","0"],["attributeName","y1","values","8;0","dur","3s","begin","0.6s","repeatCount","indefinite"],["attributeName","y2","values","14;6","dur","3s","begin","0.6s","repeatCount","indefinite"],["attributeName","opacity","values","0;1;1;0","keyTimes","0;0.2;0.8;1","dur","3s","begin","0.6s","repeatCount","indefinite"],["x1","20","y1","8","x2","20","y2","14","stroke-width","2.1","opacity","0"],["attributeName","y1","values","8;0","dur","3s","begin","0.9s","repeatCount","indefinite"],["attributeName","y2","values","14;6","dur","3s","begin","0.9s","repeatCount","indefinite"],["attributeName","opacity","values","0;1;1;0","keyTimes","0;0.2;0.8;1","dur","3s","begin","0.9s","repeatCount","indefinite"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","grey-text",3,"innerText"]],template:function(o,i){if(o&1&&(Mi(0),f_(1,"translate"),Mi(2),f_(3,"translate"),Mi(4),f_(5,"lowercase"),f_(6,"lowercase"),La$1(7,"div",0),rc$1("longClick",function(){return i.canShowModal()&&i.onLongClick()})("shortClick",function(){return i.onClick()})("keydown.enter",function(){return i.onClick()})("keydown.space",function(){return i.onClick()}),La$1(8,"span",1),At$1(9),Rd$1(),La$1(10,"div",2)(11,"div",3),ah(),La$1(12,"svg",4)(13,"defs")(14,"clipPath",5),dy(15,"rect",6),Rd$1()(),La$1(16,"g",7),dy(17,"ellipse",8)(18,"line",9)(19,"line",10)(20,"path",11)(21,"ellipse",12)(22,"circle",13)(23,"line",14)(24,"line",15)(25,"line",16)(26,"line",17),Rd$1(),La$1(27,"g",18)(28,"line",19),dy(29,"animate",20)(30,"animate",21)(31,"animate",22),Rd$1(),La$1(32,"line",23),dy(33,"animate",24)(34,"animate",25)(35,"animate",26),Rd$1(),La$1(36,"line",27),dy(37,"animate",28)(38,"animate",29)(39,"animate",30),Rd$1()()()(),ch(),La$1(40,"div",31),At$1(41),Rd$1(),dy(42,"div",32),f_(43,"translate"),Rd$1()()),o&2){let c=i.isActive(),f=h_(1,13,i.statusText()),T=(i.service().customName||i.service().serviceName||"").trim(),P=h_(3,15,"accessories.core.robotic_vacuum_cleaner"),O=!h_(5,17,T).includes(h_(6,19,P)),R=f?`${T+(O?`, ${P}`:"")}, ${f}`:`${T+(O?`, ${P}`:"")}`;ie$1(7),Cy("accessory-on",c)("cursor-pointer",i.readyForControl()),vr$1("aria-checked",c)("aria-label",R),ie$1(2),Rt(" ",R," "),ie$1(12),Cy("is-charging",i.isCharging()),ie$1(6),Cy("is-running",i.isRunning()),ie$1(14),Ny(i.service().customName||i.service().serviceName),ie$1(),ly("innerText",h_(43,21,i.statusText()));}},dependencies:[ie,_S,K8],styles:[".motion-lines[_ngcontent-%COMP%]{display:none}.motion-lines.is-running[_ngcontent-%COMP%]{display:block}.is-charging[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_charging-pulse 5s ease-in-out infinite}@keyframes _ngcontent-%COMP%_charging-pulse{0%,to{fill-opacity:.3}50%{fill-opacity:.8}}"]})}return e})();function ou(e,r){e&1&&(ke(0,"div",18),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.detected")));}function ru(e,r){e&1&&(ke(0,"div",19),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Rt(" ",h_(2,1,"accessories.control.not_detected")," "));}var p0=(()=>{class e{service=PH.required();isTriggered=X(()=>Tr(this.service()));static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-matter-smoke-co-alarm"]],inputs:{service:[1,"service"]},decls:31,vars:15,consts:[[1,"accessory-box"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["x","1","y","1","width","30","height","12","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.25"],["text-anchor","middle","dominant-baseline","middle","font-family","Arial","font-size","7.5","x","16","y","7.7","fill","#7f7f7f","stroke-width","0.6","font-weight","900",1,"type"],["x1","6","y1","14.5","x2","25.5","y2","14.5","stroke","#1976d2","stroke-opacity","0.5","stroke-width","2"],["stroke-linecap","round","x1","5","y1","13","x2","6.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","11","y1","13","x2","11","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","15.5","y1","13","x2","15.5","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","20","y1","13","x2","20","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","26","y1","13","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","6.5","y1","16","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","11","y1","21","x2","6","y2","27","stroke","#7f7f7f","stroke-width","1.25",1,"air-line"],["stroke-linecap","round","x1","16","y1","21","x2","16","y2","31","stroke","#7f7f7f","stroke-width","1.25",1,"air-line"],["stroke-linecap","round","x1","21","y1","21","x2","26","y2","27","stroke","#7f7f7f","stroke-width","1.25",1,"air-line"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","red-text"],["aria-hidden","true",1,"accessory-label","grey-text"]],template:function(o,i){if(o&1&&(Mi(0),f_(1,"translate"),f_(2,"translate"),Mi(3),f_(4,"translate"),Mi(5),f_(6,"lowercase"),f_(7,"lowercase"),ke(8,"div",0)(9,"span",1),At$1(10),Je$1(),ke(11,"div",2)(12,"div",3),ah(),ke(13,"svg",4),Dr$1(14,"rect",5),ke(15,"text",6),At$1(16," ALARM "),Je$1(),Dr$1(17,"line",7)(18,"line",8)(19,"line",9)(20,"line",10)(21,"line",11)(22,"line",12)(23,"line",13)(24,"line",14)(25,"line",15)(26,"line",16),Je$1()(),ch(),ke(27,"div",17),At$1(28),Je$1(),Re$1(29,ou,3,3,"div",18)(30,ru,3,3,"div",19),Je$1()()),o&2){let c=i.isTriggered(),f=c?h_(1,5,"accessories.control.detected"):h_(2,7,"accessories.control.not_detected"),T=(i.service().customName||i.service().serviceName||"").trim(),P=h_(4,9,"accessories.core.smoke_sensor"),O=!h_(6,11,T).includes(h_(7,13,P)),R=`${T+(O?`, ${P}`:"")}, ${f}`;ie$1(8),Cy("accessory-on",c),ie$1(2),Rt(" ",R," "),ie$1(18),Ny(i.service().customName||i.service().serviceName),ie$1(),Oe(c?29:30);}},dependencies:[_S,K8],styles:[".accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .air-line[_ngcontent-%COMP%]{stroke:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}.accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .type[_ngcontent-%COMP%]{fill:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{opacity:1}50%{opacity:.2}}"]})}return e})();function au(e,r){if(e&1&&(At$1(0),f_(1,"convertTemp"),f_(2,"number"),f_(3,"uppercase")),e&2){let t=ye$1(),o=Ot$1(0);xy(" ",g_(2,4,h_(1,2,o),"1.0-1"),"\xB0",h_(3,7,t.temperatureUnits)," ");}}function su(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.no_data")," ");}var m0=(()=>{class e{$settings=g(zt$1);service=PH.required();temperatureUnits=this.$settings.env.temperatureUnits;temperature=X(()=>kr(this.service()));static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-matter-temperature-sensor"]],inputs:{service:[1,"service"]},decls:46,vars:19,consts:[[1,"accessory-box"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x1","16","y1","5","x2","16","y2","17","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["cx","16","cy","20","r","3","stroke","#7f7f7f","stroke-width","1.2","fill","#1976d2","fill-opacity","0.5"],["x1","9","y1","6","x2","13","y2","6","stroke","#7f7f7f","stroke-width","0.8"],["x1","9","y1","9","x2","13","y2","9","stroke","#7f7f7f","stroke-width","0.8"],["x1","9","y1","12","x2","13","y2","12","stroke","#7f7f7f","stroke-width","0.8"],["x1","9","y1","15","x2","13","y2","15","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","6","x2","23","y2","6","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","9","x2","23","y2","9","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","12","x2","23","y2","12","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","15","x2","23","y2","15","stroke","#7f7f7f","stroke-width","0.8"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","grey-text"]],template:function(o,i){if(o&1&&(Mi(0)(1),f_(2,"convertTemp"),f_(3,"number"),f_(4,"uppercase"),f_(5,"translate"),Mi(6),f_(7,"translate"),Mi(8),f_(9,"lowercase"),f_(10,"lowercase"),ke(11,"div",0)(12,"span",1),At$1(13),Je$1(),ke(14,"div",2)(15,"div",3),ah(),ke(16,"svg",4),Dr$1(17,"rect",5)(18,"line",6)(19,"circle",7)(20,"line",8)(21,"line",9)(22,"line",10)(23,"line",11)(24,"line",12)(25,"line",13)(26,"line",14)(27,"line",15)(28,"line",16)(29,"line",17)(30,"line",18)(31,"line",19)(32,"line",20)(33,"line",21)(34,"line",22)(35,"line",23)(36,"line",24)(37,"line",25)(38,"line",26)(39,"line",27)(40,"line",28),Je$1()(),ch(),ke(41,"div",29),At$1(42),Je$1(),ke(43,"div",30),Re$1(44,au,4,9)(45,su,2,3),Je$1()()()),o&2){let c=oc$1(i.temperature()),f=c!==null?`${g_(3,6,h_(2,4,c),"1.0-1")}\xB0${h_(4,9,i.temperatureUnits)}`:h_(5,11,"accessories.control.no_data"),T=(i.service().customName||i.service().serviceName||"").trim(),P=h_(7,13,"accessories.core.temperature_sensor"),O=!h_(9,15,T).includes(h_(10,17,P)),R=`${T+(O?`, ${P}`:"")}, ${f}`;ie$1(13),Rt(" ",R," "),ie$1(29),Ny(i.service().customName||i.service().serviceName),ie$1(2),Oe(c!==null?44:45);}},dependencies:[kS,Re,_S,NS,K8],encapsulation:2})}return e})();function lu(e,r){if(e&1&&(La$1(0,"h6",5),dy(1,"i"),At$1(2),f_(3,"convertTemp"),f_(4,"number"),f_(5,"uppercase"),Rd$1()),e&2){let t=ye$1();ie$1(),Qt(`fas fa-temperature-full ${t.getStatusClass()}`),ie$1(),xy("",g_(4,6,h_(3,4,t.currentTemperature),"1.0-1"),"\xB0",h_(5,9,t.temperatureUnits)," ");}}function cu(e,r){if(e&1){let t=nc$1();La$1(0,"h6",13),At$1(1),f_(2,"translate"),f_(3,"convertTemp"),f_(4,"number"),f_(5,"uppercase"),f_(6,"convertTemp"),f_(7,"number"),f_(8,"uppercase"),Rd$1(),La$1(9,"nouislider",14),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1();return t_(c.autoTemp,i)||(c.autoTemp=i),Wo$1(i)}),rc$1("ngModelChange",function(){Go$1(t);let i=ye$1();return Wo$1(i.onAutoTempChange())}),Rd$1(),KC();}if(e&2){let t=ye$1();ie$1(),Oy(" ",h_(2,9,"accessories.control.threshold_auto"),": ",g_(4,13,h_(3,11,t.autoTemp[0]),"1.0-1"),"\xB0",h_(5,16,t.temperatureUnits)," - ",g_(7,20,h_(6,18,t.autoTemp[1]),"1.0-1"),"\xB0",h_(8,23,t.temperatureUnits)," "),ie$1(8),ly("min",t.minHeatSetpoint)("max",t.maxCoolSetpoint)("step",.5),ky("ngModel",t.autoTemp),JC();}}function du(e,r){if(e&1){let t=nc$1();La$1(0,"h6",15),At$1(1),f_(2,"translate"),f_(3,"convertTemp"),f_(4,"number"),f_(5,"uppercase"),Rd$1(),La$1(6,"nouislider",14),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1();return t_(c.targetHeatingTemp,i)||(c.targetHeatingTemp=i),Wo$1(i)}),rc$1("ngModelChange",function(){Go$1(t);let i=ye$1();return Wo$1(i.onHeatingTempChange())}),Rd$1(),KC();}if(e&2){let t=ye$1();ie$1(),Ay(" ",h_(2,7,"accessories.control.target"),": ",g_(4,11,h_(3,9,t.targetHeatingTemp),"1.0-1"),"\xB0",h_(5,14,t.temperatureUnits)," "),ie$1(5),ly("min",t.minHeatSetpoint)("max",t.maxHeatSetpoint)("step",.5),ky("ngModel",t.targetHeatingTemp),JC();}}function pu(e,r){if(e&1){let t=nc$1();La$1(0,"h6",15),At$1(1),f_(2,"translate"),f_(3,"convertTemp"),f_(4,"number"),f_(5,"uppercase"),Rd$1(),La$1(6,"nouislider",14),Fy("ngModelChange",function(i){Go$1(t);let c=ye$1();return t_(c.targetCoolingTemp,i)||(c.targetCoolingTemp=i),Wo$1(i)}),rc$1("ngModelChange",function(){Go$1(t);let i=ye$1();return Wo$1(i.onCoolingTempChange())}),Rd$1(),KC();}if(e&2){let t=ye$1();ie$1(),Ay(" ",h_(2,7,"accessories.control.target"),": ",g_(4,11,h_(3,9,t.targetCoolingTemp),"1.0-1"),"\xB0",h_(5,14,t.temperatureUnits)," "),ie$1(5),ly("min",t.minCoolSetpoint)("max",t.maxCoolSetpoint)("step",.5),ky("ngModel",t.targetCoolingTemp),JC();}}var u0=(()=>{class e extends me{$settings=g(zt$1);targetMode;targetHeatingTemp;targetCoolingTemp;autoTemp;temperatureUnits=this.$settings.env.temperatureUnits;heatingTempChanged=new $$1;coolingTempChanged=new $$1;autoTempChanged=new $$1;minHeatSetpoint=7;maxHeatSetpoint=30;minCoolSetpoint=10;maxCoolSetpoint=35;setupComponent(){this.createDebouncedSubscription(this.heatingTempChanged,()=>E(this,null,function*(){try{yield ji(this.service,this.targetHeatingTemp);}catch(o){this.showGenericErrorToast(o),this.targetHeatingTemp=zt(this.service),this.cdr.markForCheck();}})),this.createDebouncedSubscription(this.coolingTempChanged,()=>E(this,null,function*(){try{yield Gi(this.service,this.targetCoolingTemp);}catch(o){this.showGenericErrorToast(o),this.targetCoolingTemp=Kt(this.service),this.cdr.markForCheck();}})),this.createDebouncedSubscription(this.autoTempChanged,()=>E(this,null,function*(){try{yield ji(this.service,this.autoTemp[0]),yield Gi(this.service,this.autoTemp[1]);}catch(o){this.showGenericErrorToast(o),this.targetHeatingTemp=zt(this.service),this.targetCoolingTemp=Kt(this.service),this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp],this.cdr.markForCheck();}})),this.targetMode=Nt(this.service),this.targetHeatingTemp=zt(this.service),this.targetCoolingTemp=Kt(this.service),this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp];let t=this.service.clusters?.thermostat;t&&(this.minHeatSetpoint=t.minHeatSetpointLimit?t.minHeatSetpointLimit/100:7,this.maxHeatSetpoint=t.maxHeatSetpointLimit?t.maxHeatSetpointLimit/100:30,this.minCoolSetpoint=t.minCoolSetpointLimit?t.minCoolSetpointLimit/100:10,this.maxCoolSetpoint=t.maxCoolSetpointLimit?t.maxCoolSetpointLimit/100:35),this.applySliderGradient("linear-gradient(to right, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))");}handleAccessoryUpdate(){let t=this.targetMode;this.targetMode=Nt(this.service),this.targetHeatingTemp=zt(this.service),this.targetCoolingTemp=Kt(this.service),this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp],t!==this.targetMode&&this.applySliderGradient("linear-gradient(to right, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))");}getStatusClass(){return this.targetMode===qt.Cool?"status-color-cooling":this.targetMode===qt.Heat?"status-color-heating":this.targetMode===qt.Auto?"status-color-active":"status-color-inactive"}setTargetMode(t,o){return E(this,null,function*(){let i=this.targetMode;try{this.targetMode=t,this.cdr.markForCheck(),yield Fr(this.service,this.targetMode),this.blurTarget(o),this.applySliderGradient("linear-gradient(to right, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))");}catch(c){this.showGenericErrorToast(c),this.targetMode=i,this.cdr.markForCheck();}})}onHeatingTempChange(){this.heatingTempChanged.next(this.targetHeatingTemp);}onCoolingTempChange(){this.coolingTempChanged.next(this.targetCoolingTemp);}onAutoTempChange(){this.targetHeatingTemp=this.autoTemp[0],this.targetCoolingTemp=this.autoTemp[1],this.autoTempChanged.next(this.autoTemp);}get currentTemperature(){return hi(this.service)}static \u0275fac=(()=>{let t;return function(i){return (t||(t=_n(e)))(i||e)}})();static \u0275cmp=Ja$1({type:e,selectors:[["app-thermostat-manage"]],features:[Xa$1],decls:41,vars:39,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"mt-2","mb-4","fs-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,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[1,"mt-4","mb-1"],[3,"ngModelChange","min","max","step","ngModel"],[1,"mt-4"]],template:function(o,i){o&1&&(La$1(0,"div",0)(1,"div",1),dy(2,"h5",2),La$1(3,"button",3),f_(4,"translate"),rc$1("click",function(){return i.dismissModal()}),Rd$1()(),La$1(5,"div",4),Re$1(6,lu,6,11,"h6",5),La$1(7,"div",6),f_(8,"translate"),La$1(9,"button",7),rc$1("click",function(f){return i.setTargetMode(0,f)}),La$1(10,"div",8),dy(11,"i",9),Rd$1(),At$1(12),f_(13,"translate"),La$1(14,"div",10),dy(15,"i",11),Rd$1()(),La$1(16,"button",7),rc$1("click",function(f){return i.setTargetMode(1,f)}),La$1(17,"div",8),dy(18,"i",9),Rd$1(),At$1(19),f_(20,"translate"),La$1(21,"div",10),dy(22,"i",11),Rd$1()(),La$1(23,"button",7),rc$1("click",function(f){return i.setTargetMode(4,f)}),La$1(24,"div",8),dy(25,"i",9),Rd$1(),At$1(26),f_(27,"translate"),La$1(28,"div",10),dy(29,"i",11),Rd$1()(),La$1(30,"button",7),rc$1("click",function(f){return i.setTargetMode(3,f)}),La$1(31,"div",8),dy(32,"i",9),Rd$1(),At$1(33),f_(34,"translate"),La$1(35,"div",10),dy(36,"i",11),Rd$1()()(),Re$1(37,cu,10,25),Re$1(38,du,7,16),Re$1(39,pu,7,16),Rd$1(),dy(40,"div",12),Rd$1()),o&2&&(ie$1(2),ly("innerText",i.service.customName||i.service.serviceName||i.service.displayName),ie$1(),vr$1("aria-label",h_(4,27,"form.button_close")),ie$1(3),Oe(i.currentTemperature!==null?6:-1),ie$1(),vr$1("aria-label",h_(8,29,"accessories.control.mode_control")),ie$1(4),Cy("fa-check-circle",i.targetMode===0)("fa-blank",i.targetMode!==0),ie$1(),Rt(" ",h_(13,31,"accessories.control.off")," "),ie$1(6),Cy("fa-check-circle",i.targetMode===1)("fa-blank",i.targetMode!==1),ie$1(),Rt(" ",h_(20,33,"accessories.control.auto")," "),ie$1(6),Cy("fa-check-circle",i.targetMode===4)("fa-blank",i.targetMode!==4),ie$1(),Rt(" ",h_(27,35,"accessories.control.heat")," "),ie$1(6),Cy("fa-check-circle",i.targetMode===3)("fa-blank",i.targetMode!==3),ie$1(),Rt(" ",h_(34,37,"accessories.control.cool")," "),ie$1(4),Oe(i.targetMode===1?37:-1),ie$1(),Oe(i.targetMode===4?38:-1),ie$1(),Oe(i.targetMode===3?39:-1));},dependencies:[Kn,Hn,ln,ye,kS,K8,Re,NS],encapsulation:2})}return e})();function mu(e,r){if(e&1&&(ah(),La$1(0,"text",19),At$1(1),f_(2,"convertTemp"),f_(3,"number"),f_(4,"uppercase"),Rd$1()),e&2){let t=ye$1();ie$1(),xy(" ",g_(3,4,h_(2,2,t.currentTemperature()),"1.0-1"),"\xB0",h_(4,7,t.temperatureUnits)," ");}}function uu(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.off")," ");}function fu(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.cool")," ");}function gu(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.heat")," ");}function vu(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.auto")," ");}var f0=(()=>{class e{$modal=g(si);injector=g(we);$settings=g(zt$1);$accessories=g(le);service=PH.required();readyForControl=PH(false);temperatureUnits=this.$settings.env.temperatureUnits;onClick(){if(!this.readyForControl())return;let t=ty([{provide:ce,useValue:{service:this.service(),$accessories:this.$accessories}}],this.injector);this.$modal.open(u0,{size:"md",backdrop:"static",injector:t});}getStatusFill(){let t=this.systemMode();return t===3?"url(#coolingGradient)":t===4?"url(#heatingGradient)":t===1?"#42d672":"#7b7b7b"}isOn=X(()=>Pr(this.service()));systemMode=X(()=>Nt(this.service()));currentTemperature=X(()=>hi(this.service()));static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-matter-thermostat"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:41,vars:24,consts:[["role","button","tabindex","0",1,"accessory-box",3,"longClick","shortClick","keydown.enter","keydown.space"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["id","coolingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#1e8bbd"],["attributeName","stop-color","values","#1e8bbd;#66d6d6;#1e8bbd","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#66d6d6"],["attributeName","stop-color","values","#66d6d6;#1e8bbd;#66d6d6","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#1e8bbd"],["id","heatingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#cc5e00"],["attributeName","stop-color","values","#cc5e00;#e69533;#cc5e00;#e69533","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#e69533"],["attributeName","stop-color","values","#e69533;#cc5e00;#e69533;#cc5e00","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#cc5e00"],["x","1","y","1","width","30","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x","1","y","19","width","30","height","8","rx","0","stroke","#7f7f7f","stroke-width","0.75","fill-opacity","0.5"],["x","16","y","13","font-size","8","text-anchor","middle","fill","#7f7f7f","font-family","Arial, sans-serif"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","grey-text"]],template:function(o,i){if(o&1&&(Mi(0),f_(1,"translate"),f_(2,"translate"),f_(3,"translate"),f_(4,"translate"),Mi(5),f_(6,"translate"),Mi(7),f_(8,"lowercase"),f_(9,"lowercase"),La$1(10,"div",0),rc$1("longClick",function(){return i.onClick()})("shortClick",function(){return i.onClick()})("keydown.enter",function(){return i.onClick()})("keydown.space",function(){return i.onClick()}),La$1(11,"span",1),At$1(12),Rd$1(),La$1(13,"div",2)(14,"div",3),ah(),La$1(15,"svg",4)(16,"defs")(17,"linearGradient",5)(18,"stop",6),dy(19,"animate",7),Rd$1(),La$1(20,"stop",8),dy(21,"animate",9),Rd$1(),La$1(22,"stop",10),dy(23,"animate",7),Rd$1()(),La$1(24,"linearGradient",11)(25,"stop",12),dy(26,"animate",13),Rd$1(),La$1(27,"stop",14),dy(28,"animate",15),Rd$1(),La$1(29,"stop",16),dy(30,"animate",13),Rd$1()()(),dy(31,"rect",17)(32,"rect",18),Re$1(33,mu,5,9,":svg:text",19),Rd$1()(),ch(),La$1(34,"div",20),At$1(35),Rd$1(),La$1(36,"div",21),Re$1(37,uu,2,3)(38,fu,2,3)(39,gu,2,3)(40,vu,2,3),Rd$1()()()),o&2){let c=i.systemMode(),f=c===0?h_(1,10,"accessories.control.off"):c===3?h_(2,12,"accessories.control.cool"):c===4?h_(3,14,"accessories.control.heat"):c===1?h_(4,16,"accessories.control.auto"):"",T=(i.service().customName||i.service().serviceName||i.service().displayName||"").trim(),P=h_(6,18,"accessories.core.thermostat"),O=!h_(8,20,T).includes(h_(9,22,P)),R=f?`${T+(O?`, ${P}`:"")}, ${f}`:`${T+(O?`, ${P}`:"")}`;ie$1(10),Cy("accessory-on",i.isOn())("cursor-pointer",i.readyForControl()),vr$1("aria-label",R),ie$1(2),Rt(" ",R," "),ie$1(20),vr$1("fill",i.getStatusFill()),ie$1(),Oe(i.currentTemperature()!==null?33:-1),ie$1(2),Rt(" ",i.service().customName||i.service().serviceName||i.service().displayName," "),ie$1(2),Oe(c===0?37:c===3?38:c===4?39:c===1?40:-1);}},dependencies:[ie,kS,_S,K8,Re,NS],encapsulation:2})}return e})();var g0=(()=>{class e{service=PH.required();static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-matter-unknown"]],inputs:{service:[1,"service"]},decls:10,vars:3,consts:[["role","group",1,"accessory-box"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["cx","16","cy","16","r","14","fill","none","stroke","#7f7f7f","stroke-width","1.5"],["d",`M12.2575393,17.7112593
L12.1868707,17.7112593
C11.0779698,17.7112593 10.6478221,16.9467914 11.2212184,16.0037726
L16.4805582,7.35415962
C17.67876,5.38357359 18.0624739,5.55948915 17.3376772,7.746963
L15.7252918,12.6132252
C15.3772095,13.6637556 15.9942825,14.5048291 17.0992511,14.5048291
L20.1977772,14.5048291
L20.1846183,14.5177121
L20.2552868,14.5177121
C21.3641878,14.5177121 21.7943355,15.2821799 21.2209392,16.2251988
L16.1844844,24.5082506
C14.864477,26.6791606 14.4411534,26.4839632 15.241777,24.0676402
L16.7168658,19.6157462
C17.0649481,18.5652158 16.447875,17.7241422 15.3429064,17.7241422
L12.2443804,17.7241422
L12.2575393,17.7112593 Z`,"fill","#7f7f7f"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","grey-text"]],template:function(o,i){if(o&1&&(ke(0,"div",0)(1,"div",1)(2,"div",2),ah(),ke(3,"svg",3),Dr$1(4,"circle",4)(5,"path",5),Je$1()(),ch(),ke(6,"div",6),At$1(7),Je$1(),ke(8,"div",7),At$1(9),Je$1()()()),o&2){let c=(i.service().customName||i.service().serviceName||"").trim(),f=i.service().humanType||"";vr$1("aria-label",f?`${c}, ${f}`:c),ie$1(7),Ny(i.service().customName||i.service().serviceName),ie$1(2),Ny(i.service().humanType);}},encapsulation:2})}return e})();function hu(e,r){e&1&&(ke(0,"div",24),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.detected")));}function Cu(e,r){e&1&&(ke(0,"div",25),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Rt(" ",h_(2,1,"accessories.control.not_detected")," "));}var v0=(()=>{class e{service=PH.required();isLeaking=X(()=>br(this.service()));static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-matter-water-leak-detector"]],inputs:{service:[1,"service"]},decls:37,vars:15,consts:[[1,"accessory-box"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["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"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","red-text"],["aria-hidden","true",1,"accessory-label","grey-text"]],template:function(o,i){if(o&1&&(Mi(0),f_(1,"translate"),f_(2,"translate"),Mi(3),f_(4,"translate"),Mi(5),f_(6,"lowercase"),f_(7,"lowercase"),ke(8,"div",0)(9,"span",1),At$1(10),Je$1(),ke(11,"div",2)(12,"div",3),ah(),ke(13,"svg",4),Dr$1(14,"rect",5),ke(15,"g",6),Dr$1(16,"path",7),Je$1(),ke(17,"g",8),Dr$1(18,"path",7),Je$1(),Dr$1(19,"ellipse",9)(20,"line",10)(21,"line",11)(22,"line",12)(23,"line",13)(24,"line",14)(25,"line",15)(26,"line",16)(27,"line",17)(28,"line",18)(29,"line",19)(30,"line",20)(31,"line",21)(32,"line",22),Je$1()(),ch(),ke(33,"div",23),At$1(34),Je$1(),Re$1(35,hu,3,3,"div",24)(36,Cu,3,3,"div",25),Je$1()()),o&2){let c=i.isLeaking(),f=c?h_(1,5,"accessories.control.detected"):h_(2,7,"accessories.control.not_detected"),T=(i.service().customName||i.service().serviceName||"").trim(),P=h_(4,9,"accessories.core.leak_sensor"),O=!h_(6,11,T).includes(h_(7,13,P)),R=`${T+(O?`, ${P}`:"")}, ${f}`;ie$1(8),Cy("accessory-on",c),ie$1(2),Rt(" ",R," "),ie$1(24),Ny(i.service().customName||i.service().serviceName),ie$1(),Oe(c?35:36);}},dependencies:[_S,K8],styles:[".accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .red-outline[_ngcontent-%COMP%]{stroke:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{stroke-opacity:.8}50%{stroke-opacity:.2}}"]})}return e})();function _u(e,r){e&1&&(ke(0,"div",16),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.open")));}function yu(e,r){e&1&&(ke(0,"div",16),At$1(1),f_(2,"translate"),Je$1()),e&2&&(ie$1(),Ny(h_(2,1,"accessories.control.closed")));}var h0=(()=>{class e{service=PH.required();readyForControl=PH(false);isOpen=X(()=>Wi(this.service()));onClick(){this.readyForControl()&&Dr(this.service());}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-matter-water-valve"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:28,vars:19,consts:[["role","switch","tabindex","0",1,"accessory-box",3,"click","keydown.enter","keydown.space"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["width","32","height","32","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["x1","8","y1","3","x2","14","y2","3","stroke","#7f7f7f","stroke-width","3","stroke-linecap","round"],["x1","11","y1","8","x2","11","y2","3","stroke","#7f7f7f","stroke-width","3","stroke-linecap","round"],["x1","0","y1","9","x2","21","y2","9","stroke","#7f7f7f","stroke-width","4","stroke-linecap","round"],["x1","21","y1","9","x2","21","y2","14","stroke","#7f7f7f","stroke-width","4","stroke-linecap","round"],["fill","#1976d2","fill-opacity","0","cx","21","cy","19","r","1.5",1,"drop","drop-top"],["fill","#1976d2","fill-opacity","0","cx","17","cy","24","r","1.5",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","25","cy","24","r","1.5",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","13","cy","29","r","1.5",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","21","cy","29","r","1.5",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","29","cy","29","r","1.5",1,"drop","drop-bottom"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","grey-text"]],template:function(o,i){if(o&1&&(Mi(0),f_(1,"translate"),f_(2,"translate"),Mi(3),f_(4,"translate"),Mi(5),f_(6,"lowercase"),f_(7,"lowercase"),ke(8,"div",0),_i("click",function(){return i.onClick()})("keydown.enter",function(){return i.onClick()})("keydown.space",function(){return i.onClick()}),ke(9,"span",1),At$1(10),Je$1(),ke(11,"div",2)(12,"div",3),ah(),ke(13,"svg",4),Dr$1(14,"line",5)(15,"line",6)(16,"line",7)(17,"line",8)(18,"circle",9)(19,"circle",10)(20,"circle",11)(21,"circle",12)(22,"circle",13)(23,"circle",14),Je$1()(),ch(),ke(24,"div",15),At$1(25),Je$1(),Re$1(26,_u,3,3,"div",16)(27,yu,3,3,"div",16),Je$1()()),o&2){let c=i.isOpen(),f=c?h_(1,9,"accessories.control.open"):h_(2,11,"accessories.control.closed"),T=(i.service().customName||i.service().serviceName||i.service().displayName||"").trim(),P=h_(4,13,"accessories.core.valve"),O=!h_(6,15,T).includes(h_(7,17,P)),R=`${T+(O?`, ${P}`:"")}, ${f}`;ie$1(8),Cy("accessory-on",c)("cursor-pointer",i.readyForControl()),vr$1("aria-checked",c)("aria-label",R),ie$1(2),Rt(" ",R," "),ie$1(15),Rt(" ",i.service().customName||i.service().serviceName||i.service().displayName," "),ie$1(),Oe(c?26:27);}},dependencies:[_S,K8],styles:[".accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .drop[_ngcontent-%COMP%]{fill-opacity:.5}.accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .drop-top[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blink 1.5s infinite}.accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .drop-middle[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blink 1.5s infinite;animation-delay:.5s}.accessory-on[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] .drop-bottom[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blink 1.5s infinite;animation-delay:1s}@keyframes _ngcontent-%COMP%_blink{0%,to{opacity:1}50%{opacity:0}}"]})}return e})();function xu(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.closed")," ");}function Su(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.open")," ");}function ku(e,r){if(e&1&&(At$1(0),f_(1,"translate")),e&2){let t=ye$1();xy(" ",h_(1,2,"accessories.control.open")," ",t.currentPosition,"% ");}}var C0=(()=>{class e extends me{targetPositionChanged=new $$1;targetPosition;setupComponent(){this.loadTargetPosition(),this.createDebouncedSubscription(this.targetPositionChanged,()=>E(this,null,function*(){let t=xt(this.service);try{yield fi(this.service,this.targetPosition.value);}catch(o){this.showGenericErrorToast(o),this.targetPosition.value=t,this.cdr.markForCheck();}}));}handleAccessoryUpdate(){this.targetPosition&&(this.targetPosition.value=xt(this.service));}onTargetPositionChange(){this.targetPositionChanged.next(this.targetPosition.value);}loadTargetPosition(){this.targetPosition={value:xt(this.service),min:0,max:100,step:1},this.applySliderGradient("linear-gradient(to right, #242424, #ffd6aa)");}get currentPosition(){return xt(this.service)}static \u0275fac=(()=>{let t;return function(i){return (t||(t=_n(e)))(i||e)}})();static \u0275cmp=Ja$1({type:e,selectors:[["app-window-covering-manage"]],features:[Xa$1],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,"min","max","step","disabled","ngModel"],[1,"modal-footer"]],template:function(o,i){o&1&&(La$1(0,"div",0)(1,"div",1),dy(2,"h5",2),La$1(3,"button",3),f_(4,"translate"),rc$1("click",function(){return i.dismissModal()}),Rd$1()(),La$1(5,"div",4)(6,"div",5)(7,"div",6),Re$1(8,xu,2,3)(9,Su,2,3)(10,ku,2,4),Rd$1()(),La$1(11,"h6",7),At$1(12),f_(13,"translate"),Rd$1(),La$1(14,"nouislider",8),Fy("ngModelChange",function(f){return t_(i.targetPosition.value,f)||(i.targetPosition.value=f),f}),rc$1("ngModelChange",function(){return i.onTargetPositionChange()}),Rd$1(),KC(),La$1(15,"div",9)(16,"span",10),At$1(17),f_(18,"translate"),Rd$1(),La$1(19,"span",10),At$1(20),f_(21,"translate"),Rd$1()(),La$1(22,"h6",7),At$1(23),f_(24,"translate"),Rd$1(),dy(25,"nouislider",11),KC(),La$1(26,"div",9)(27,"span",10),At$1(28),f_(29,"translate"),Rd$1(),La$1(30,"span",10),At$1(31),f_(32,"translate"),Rd$1()()(),dy(33,"div",12),Rd$1()),o&2&&(ie$1(2),ly("innerText",i.service.customName||i.service.serviceName||i.service.displayName),ie$1(),vr$1("aria-label",h_(4,20,"form.button_close")),ie$1(5),Oe(i.currentPosition===0?8:i.currentPosition===100?9:10),ie$1(4),xy("",h_(13,22,"accessories.control.target"),": ",i.targetPosition.value,"%"),ie$1(2),ly("min",i.targetPosition.min)("max",i.targetPosition.max)("step",i.targetPosition.step),ky("ngModel",i.targetPosition.value),JC(),ie$1(3),Ny(h_(18,24,"accessories.control.closed")),ie$1(3),Ny(h_(21,26,"accessories.control.open")),ie$1(3),xy("",h_(24,28,"accessories.control.current"),": ",i.currentPosition,"%"),ie$1(2),ly("min",0)("max",100)("step",1)("disabled",true)("ngModel",i.currentPosition),JC(),ie$1(3),Ny(h_(29,30,"accessories.control.closed")),ie$1(3),Ny(h_(32,32,"accessories.control.open")));},dependencies:[ye,Kn,Hn,ln,K8],encapsulation:2})}return e})();function Mu(e,r){e&1&&(La$1(0,"div",3),ah(),La$1(1,"svg",6),dy(2,"rect",7)(3,"rect",8)(4,"rect",9)(5,"rect",10)(6,"rect",11)(7,"rect",12)(8,"rect",13),Rd$1()());}function Tu(e,r){e&1&&(La$1(0,"div",3),ah(),La$1(1,"svg",6),dy(2,"rect",14)(3,"rect",15)(4,"rect",16)(5,"rect",17)(6,"line",18)(7,"rect",19),Rd$1()());}function bu(e,r){e&1&&(La$1(0,"div",3),ah(),La$1(1,"svg",6),dy(2,"rect",7)(3,"rect",20)(4,"rect",21)(5,"rect",22)(6,"rect",23)(7,"rect",24)(8,"rect",25),Rd$1()());}function Bu(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.closed")," ");}function wu(e,r){e&1&&(At$1(0),f_(1,"translate")),e&2&&Rt(" ",h_(1,1,"accessories.control.open")," ");}function Eu(e,r){if(e&1&&(At$1(0),f_(1,"translate")),e&2){ye$1();let t=Ot$1(0);xy(" ",h_(1,2,"accessories.control.open")," ",t,"% ");}}var _0=(()=>{class e{$accessories=g(le);injector=g(we);$modal=g(si);service=PH.required();readyForControl=PH(false);onClick(){this.readyForControl()&&Er(this.service());}onLongClick(){if(!this.readyForControl())return;let t=ty([{provide:ce,useValue:{service:this.service(),$accessories:this.$accessories}}],this.injector);this.$modal.open(C0,{size:"md",backdrop:"static",injector:t});}currentPosition=X(()=>xt(this.service()));deviceType=X(()=>this.service().customType||this.service().deviceType||"WindowCovering");isWindowCovering=X(()=>this.deviceType()==="WindowCovering");isDoor=X(()=>this.deviceType()==="Door");isWindow=X(()=>this.deviceType()==="Window");static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-matter-window-covering"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:25,vars:32,consts:[["role","slider","tabindex","0",1,"accessory-box",3,"longClick","shortClick","keydown.enter","keydown.space"],["role","status","aria-live","polite","aria-atomic","true",1,"visually-hidden"],[1,"d-flex","flex-column","h-100"],["aria-hidden","true",1,"accessory-svg"],["aria-hidden","true",1,"accessory-label","mt-auto"],["aria-hidden","true",1,"accessory-label","grey-text"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["x","1","y","0.8","width","30","height","30.2","rx","0.5","stroke","#7f7f7f","fill","none","stroke-width","1.5"],["x","2.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1"],["x","3.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","rx","2"],["x","16.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1"],["x","17.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","rx","2"],["x","2.3","y","2.1","width","27.4","height","27.6","stroke","#808080","fill","#808080","stroke-width","0.5","stroke-opacity","0.9","fill-opacity","0.9",1,"c-blinds"],["x","2.05","y","29.9","width","27.9","height","0","stroke","#ffffff","fill","#ffffff","stroke-width","0.5","stroke-opacity","0","fill-opacity","0.5",1,"c-light"],["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"],["x","2.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1",1,"outline-left"],["x","3.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","ry","2",1,"divider-left"],["x","15.16","y","13.6","width","0.1","height","4.6","stroke","#1976d2","fill","none","stroke-width","0.5","ry","2",1,"handle-left"],["x","16.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1",1,"outline-right"],["x","17.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","ry","2",1,"divider-right"],["x","16.76","y","13.6","width","0.1","height","4.6","stroke","#1976d2","fill","none","stroke-width","0.5","ry","2",1,"handle-right"]],template:function(o,i){if(o&1&&(Mi(0)(1),f_(2,"translate"),Mi(3),f_(4,"translate"),Mi(5),f_(6,"translate"),f_(7,"translate"),f_(8,"translate"),Mi(9),f_(10,"lowercase"),f_(11,"lowercase"),La$1(12,"div",0),rc$1("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()})("keydown.enter",function(){return i.onClick()})("keydown.space",function(){return i.onClick()}),La$1(13,"span",1),At$1(14),Rd$1(),La$1(15,"div",2),Re$1(16,Mu,9,0,"div",3),Re$1(17,Tu,8,0,"div",3),Re$1(18,bu,9,0,"div",3),La$1(19,"div",4),At$1(20),Rd$1(),La$1(21,"div",5),Re$1(22,Bu,2,3)(23,wu,2,3)(24,Eu,2,4),Rd$1()()()),o&2){let c=oc$1(i.currentPosition()),f=h_(2,18,"accessories.control.open"),T=c===0?h_(4,20,"accessories.control.closed"):c===100?f:`${f} ${c}%`,P=(i.service().customName||i.service().serviceName||i.service().displayName||"").trim(),O=i.isDoor()?h_(6,22,"accessories.core.door"):i.isWindow()?h_(7,24,"accessories.core.window"):h_(8,26,"accessories.core.window_covering"),R=!h_(10,28,P).includes(h_(11,30,O)),se=`${P+(R?`, ${O}`:"")}, ${T}`;ie$1(12),Kt$1("--position",c/100),Cy("accessory-on",c>0)("cursor-pointer",i.readyForControl()),vr$1("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow",c)("aria-valuetext",T)("aria-label",se),ie$1(2),Rt(" ",se," "),ie$1(2),Oe(i.isWindowCovering()?16:-1),ie$1(),Oe(i.isDoor()?17:-1),ie$1(),Oe(i.isWindow()?18:-1),ie$1(2),Rt(" ",i.service().customName||i.service().serviceName||i.service().displayName," "),ie$1(2),Oe(c===0?22:c===100?23:24);}},dependencies:[ie,_S,K8],styles:["svg[_ngcontent-%COMP%] .c-blinds[_ngcontent-%COMP%]{transition:height 3s ease;height:calc(27.6px - 27.3px * var(--position, 0))}svg[_ngcontent-%COMP%] .c-light[_ngcontent-%COMP%]{transition:y 3s ease,height 3s ease;y:calc(29.9px - 27.25px * var(--position, 0));height:calc(27.3px * var(--position, 0))}svg[_ngcontent-%COMP%] .outline[_ngcontent-%COMP%]{transition:width 3s ease;width:calc(12.8px - 9px * var(--position, 0))}svg[_ngcontent-%COMP%] .panel[_ngcontent-%COMP%]{transition:width 3s ease;width:calc(9.6px - 9px * var(--position, 0))}svg[_ngcontent-%COMP%] .handle[_ngcontent-%COMP%]{opacity:calc(1 - var(--position, 0));transition:opacity 3s ease}svg[_ngcontent-%COMP%] .outline-left[_ngcontent-%COMP%]{transition:width 3s ease;x:2.8px;width:calc(12.4px - 10px * var(--position, 0))}svg[_ngcontent-%COMP%] .divider-left[_ngcontent-%COMP%]{transition:width 3s ease;x:3.66px;width:calc(10.68px - 10px * var(--position, 0))}svg[_ngcontent-%COMP%] .handle-left[_ngcontent-%COMP%]{transition:x 3s ease;x:calc(15.16px - 10px * var(--position, 0));width:.1px}svg[_ngcontent-%COMP%] .outline-right[_ngcontent-%COMP%]{transition:x 3s ease,width 3s ease;x:calc(16.8px + 10px * var(--position, 0));width:calc(12.4px - 10px * var(--position, 0))}svg[_ngcontent-%COMP%] .divider-right[_ngcontent-%COMP%]{transition:x 3s ease,width 3s ease;x:calc(17.66px + 10px * var(--position, 0));width:calc(10.68px - 10px * var(--position, 0))}svg[_ngcontent-%COMP%] .handle-right[_ngcontent-%COMP%]{transition:x 3s ease;x:calc(16.76px + 10px * var(--position, 0));width:.1px}"]})}return e})();function Du(e,r){e&1&&dy(0,"i",4)(1,"i",5);}function Au(e,r){e&1&&dy(0,"i",3);}function Pu(e,r){if(e&1){let t=nc$1();La$1(0,"button",2),f_(1,"translate"),rc$1("click",function(){Go$1(t);let i=ye$1();return Wo$1(i.$accessories.showAccessoryInformation(i.service()))}),Re$1(2,Du,2,0)(3,Au,1,0,"i",3),Rd$1();}if(e&2){let t=ye$1();Cy("accessory-hidden-indicator",t.service().hidden),vr$1("aria-label",`${h_(1,4,"form.button_edit")} ${t.service().customName||t.service().serviceName}`),ie$1(2),Oe(t.service().hidden?2:3);}}function Fu(e,r){if(e&1){let t=nc$1();La$1(0,"button",6),f_(1,"translate"),rc$1("click",function(){Go$1(t);let i=ye$1();return Wo$1(i.$accessories.showAccessoryInformation(i.service()))}),dy(2,"i",7),Rd$1();}if(e&2){let t=ye$1();vr$1("aria-label",`${h_(1,1,"form.button_edit")} ${t.service().customName||t.service().serviceName}`);}}function Ou(e,r){if(e&1&&(La$1(0,"app-on-off-light",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.matterReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.on_off_light")," ");}}function Iu(e,r){if(e&1&&(La$1(0,"app-dimmable-light",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.matterReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.dimmable_light")," ");}}function Lu(e,r){if(e&1&&(La$1(0,"app-color-temperature-light",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.matterReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.color_temperature_light")," ");}}function Vu(e,r){if(e&1&&(La$1(0,"app-extended-color-light",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.matterReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.extended_color_light")," ");}}function Nu(e,r){if(e&1&&(La$1(0,"app-on-off-plug-in-unit",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.matterReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.on_off_plug_in_unit")," ");}}function Hu(e,r){if(e&1&&(La$1(0,"app-on-off-light-switch",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.matterReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.on_off_light_switch")," ");}}function Ru(e,r){if(e&1&&(La$1(0,"app-robotic-vacuum-cleaner",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.matterReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.robotic_vacuum_cleaner")," ");}}function $u(e,r){if(e&1&&(La$1(0,"app-matter-contact-sensor",9),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service()),ie$1(),Rt(" ",h_(2,2,"accessories.core.contact_sensor")," ");}}function Uu(e,r){if(e&1&&(La$1(0,"app-matter-occupancy-sensor",9),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service()),ie$1(),Rt(" ",h_(2,2,"accessories.core.occupancy_sensor")," ");}}function Wu(e,r){if(e&1&&(La$1(0,"app-matter-light-sensor",9),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service()),ie$1(),Rt(" ",h_(2,2,"accessories.core.light_sensor")," ");}}function ju(e,r){if(e&1&&(La$1(0,"app-matter-temperature-sensor",9),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service()),ie$1(),Rt(" ",h_(2,2,"accessories.core.temperature_sensor")," ");}}function Gu(e,r){if(e&1&&(La$1(0,"app-matter-humidity-sensor",9),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service()),ie$1(),Rt(" ",h_(2,2,"accessories.core.humidity_sensor")," ");}}function qu(e,r){if(e&1&&(La$1(0,"app-matter-smoke-co-alarm",9),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service()),ie$1(),Rt(" ",h_(2,2,"accessories.core.smoke_co_alarm")," ");}}function zu(e,r){if(e&1&&(La$1(0,"app-matter-water-leak-detector",9),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service()),ie$1(),Rt(" ",h_(2,2,"accessories.core.leak_sensor")," ");}}function Ku(e,r){if(e&1&&(La$1(0,"app-matter-air-quality-sensor",9),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service()),ie$1(),Rt(" ",h_(2,2,"accessories.core.air_quality_sensor")," ");}}function Yu(e,r){if(e&1&&(La$1(0,"app-matter-door-lock",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.matterReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.lock_mechanism")," ");}}function Qu(e,r){if(e&1&&(La$1(0,"app-matter-window-covering",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.matterReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.window_covering")," ");}}function Zu(e,r){if(e&1&&(La$1(0,"app-matter-window-covering",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.matterReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.door")," ");}}function Ju(e,r){if(e&1&&(La$1(0,"app-matter-window-covering",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.matterReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.window")," ");}}function Xu(e,r){if(e&1&&(La$1(0,"app-matter-fan",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.matterReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.fan")," ");}}function e2(e,r){if(e&1&&(La$1(0,"app-matter-thermostat",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.matterReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.thermostat")," ");}}function t2(e,r){if(e&1&&(La$1(0,"app-matter-thermostat",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.matterReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.heater_cooler")," ");}}function i2(e,r){if(e&1&&(La$1(0,"app-matter-generic-switch",9),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service()),ie$1(),Rt(" ",h_(2,2,"accessories.core.stateless_programmable_switch")," ");}}function n2(e,r){if(e&1&&(La$1(0,"app-matter-water-valve",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.matterReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.valve")," ");}}function o2(e,r){if(e&1&&(La$1(0,"app-matter-pump",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.matterReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.pump")," ");}}function r2(e,r){if(e&1&&(La$1(0,"app-matter-unknown",9),At$1(1),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service()),ie$1(),Ny(t.service().humanType);}}function a2(e,r){if(e&1&&Re$1(0,Ou,3,5,"app-on-off-light",8)(1,Iu,3,5,"app-dimmable-light",8)(2,Lu,3,5,"app-color-temperature-light",8)(3,Vu,3,5,"app-extended-color-light",8)(4,Nu,3,5,"app-on-off-plug-in-unit",8)(5,Hu,3,5,"app-on-off-light-switch",8)(6,Ru,3,5,"app-robotic-vacuum-cleaner",8)(7,$u,3,4,"app-matter-contact-sensor",9)(8,Uu,3,4,"app-matter-occupancy-sensor",9)(9,Wu,3,4,"app-matter-light-sensor",9)(10,ju,3,4,"app-matter-temperature-sensor",9)(11,Gu,3,4,"app-matter-humidity-sensor",9)(12,qu,3,4,"app-matter-smoke-co-alarm",9)(13,zu,3,4,"app-matter-water-leak-detector",9)(14,Ku,3,4,"app-matter-air-quality-sensor",9)(15,Yu,3,5,"app-matter-door-lock",8)(16,Qu,3,5,"app-matter-window-covering",8)(17,Zu,3,5,"app-matter-window-covering",8)(18,Ju,3,5,"app-matter-window-covering",8)(19,Xu,3,5,"app-matter-fan",8)(20,e2,3,5,"app-matter-thermostat",8)(21,t2,3,5,"app-matter-thermostat",8)(22,i2,3,4,"app-matter-generic-switch",9)(23,n2,3,5,"app-matter-water-valve",8)(24,o2,3,5,"app-matter-pump",8)(25,r2,2,2,"app-matter-unknown",9),e&2){let t,o=ye$1();Oe((t=o.service().customType||o.service().deviceType)==="OnOffLight"?0:t==="DimmableLight"?1:t==="ColorTemperatureLight"?2:t==="ExtendedColorLight"?3:t==="OnOffPlugInUnit"?4:t==="OnOffLightSwitch"?5:t==="RoboticVacuumCleaner"?6:t==="ContactSensor"?7:t==="OccupancySensor"?8:t==="LightSensor"?9:t==="TemperatureSensor"?10:t==="HumiditySensor"?11:t==="SmokeCoAlarm"?12:t==="WaterLeakDetector"?13:t==="AirQualitySensor"?14:t==="DoorLock"?15:t==="WindowCovering"?16:t==="Door"?17:t==="Window"?18:t==="Fan"?19:t==="Thermostat"?20:t==="RoomAirConditioner"?21:t==="GenericSwitch"?22:t==="WaterValve"?23:t==="Pump"?24:25);}}function s2(e,r){if(e&1&&(La$1(0,"app-switch",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.switch")," ");}}function l2(e,r){if(e&1&&(La$1(0,"app-thermostat",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.thermostat")," ");}}function c2(e,r){if(e&1&&(La$1(0,"app-outlet",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.outlet")," ");}}function d2(e,r){if(e&1&&(La$1(0,"app-fan",10),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.fan")," ");}}function p2(e,r){if(e&1&&(La$1(0,"app-fan",10),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.fan")," ");}}function m2(e,r){if(e&1&&(La$1(0,"app-air-purifier",10),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.air_purifier")," ");}}function u2(e,r){if(e&1&&(La$1(0,"app-access-code",10),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.access_code")," ");}}function f2(e,r){if(e&1&&(La$1(0,"app-lightbulb",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.lightbulb")," ");}}function g2(e,r){if(e&1&&(La$1(0,"app-light-sensor",9),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service()),ie$1(),Ny(h_(2,2,"accessories.core.light_sensor"));}}function v2(e,r){if(e&1&&(La$1(0,"app-lock-mechanism",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.lock_mechanism")," ");}}function h2(e,r){if(e&1&&(La$1(0,"app-temperature-sensor",9),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service()),ie$1(),Rt(" ",h_(2,2,"accessories.core.temperature_sensor")," ");}}function C2(e,r){if(e&1&&(La$1(0,"app-garage-door-opener",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.garage_door_opener")," ");}}function _2(e,r){if(e&1&&(La$1(0,"app-motion-sensor",9),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service()),ie$1(),Ny(h_(2,2,"accessories.core.motion_sensor"));}}function y2(e,r){if(e&1&&(La$1(0,"app-occupancy-sensor",9),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service()),ie$1(),Rt(" ",h_(2,2,"accessories.core.occupancy_sensor")," ");}}function x2(e,r){if(e&1&&(La$1(0,"app-contact-sensor",9),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service()),ie$1(),Ny(h_(2,2,"accessories.core.contact_sensor"));}}function S2(e,r){if(e&1&&(La$1(0,"app-humidity-sensor",9),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service()),ie$1(),Ny(h_(2,2,"accessories.core.humidity_sensor"));}}function k2(e,r){if(e&1&&(La$1(0,"app-air-quality-sensor",9),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service()),ie$1(),Rt(" ",h_(2,2,"accessories.core.air_quality_sensor")," ");}}function M2(e,r){if(e&1&&(La$1(0,"app-window-covering",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.window_covering")," ");}}function T2(e,r){if(e&1&&(La$1(0,"app-window",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.window")," ");}}function b2(e,r){if(e&1&&(La$1(0,"app-door",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.door")," ");}}function B2(e,r){if(e&1&&(La$1(0,"app-television",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.television")," ");}}function w2(e,r){if(e&1&&(La$1(0,"app-battery",9),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service()),ie$1(),Ny(h_(2,2,"accessories.core.battery"));}}function E2(e,r){if(e&1&&(La$1(0,"app-battery",9),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service()),ie$1(),Ny(h_(2,2,"accessories.core.battery"));}}function D2(e,r){if(e&1&&(La$1(0,"app-speaker",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.speaker")," ");}}function A2(e,r){if(e&1&&(La$1(0,"app-speaker",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.speaker")," ");}}function P2(e,r){if(e&1&&(La$1(0,"app-doorbell",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.doorbell")," ");}}function F2(e,r){if(e&1&&(La$1(0,"app-microphone",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.microphone")," ");}}function O2(e,r){if(e&1&&(La$1(0,"app-security-system",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.security_system")," ");}}function I2(e,r){if(e&1&&(La$1(0,"app-leak-sensor",9),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service()),ie$1(),Ny(h_(2,2,"accessories.core.leak_sensor"));}}function L2(e,r){if(e&1&&(La$1(0,"app-smoke-sensor",9),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service()),ie$1(),Ny(h_(2,2,"accessories.core.smoke_sensor"));}}function V2(e,r){if(e&1&&(La$1(0,"app-carbon-monoxide-sensor",9),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service()),ie$1(),Rt(" ",h_(2,2,"accessories.core.carbon_monoxide_sensor")," ");}}function N2(e,r){if(e&1&&(La$1(0,"app-carbon-dioxide-sensor",9),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service()),ie$1(),Rt(" ",h_(2,2,"accessories.core.carbon_dioxide_sensor")," ");}}function H2(e,r){if(e&1&&(La$1(0,"app-valve",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.valve")," ");}}function R2(e,r){if(e&1&&(La$1(0,"app-irrigation-system",9),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service()),ie$1(),Rt(" ",h_(2,2,"accessories.core.irrigation_system")," ");}}function $2(e,r){if(e&1&&(La$1(0,"app-heater-cooler",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.heater_cooler")," ");}}function U2(e,r){if(e&1&&(La$1(0,"app-heater-cooler",11),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.heater")," ");}}function W2(e,r){if(e&1&&(La$1(0,"app-heater-cooler",12),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.cooler")," ");}}function j2(e,r){if(e&1&&(La$1(0,"app-humidifier-dehumidifier",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.humidifier_dehumidifier")," ");}}function G2(e,r){if(e&1&&(La$1(0,"app-humidifier-dehumidifier",13),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.humidifier")," ");}}function q2(e,r){if(e&1&&(La$1(0,"app-humidifier-dehumidifier",14),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.dehumidifier")," ");}}function z2(e,r){if(e&1&&(La$1(0,"app-stateless-programmable-switch",9),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service()),ie$1(),Rt(" ",h_(2,2,"accessories.core.stateless_programmable_switch")," ");}}function K2(e,r){if(e&1&&(La$1(0,"app-filter-maintenance",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.filter_maintenance")," ");}}function Y2(e,r){if(e&1&&(La$1(0,"app-robot-vacuum",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.robot_vacuum")," ");}}function Q2(e,r){if(e&1&&(La$1(0,"app-washing-machine",8),At$1(1),f_(2,"translate"),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),ie$1(),Rt(" ",h_(2,3,"accessories.core.washing_machine")," ");}}function Z2(e,r){if(e&1&&(La$1(0,"app-unknown",9),At$1(1),Rd$1()),e&2){let t=ye$1(2);ly("service",t.service()),ie$1(),Ny(t.service().humanType);}}function J2(e,r){if(e&1&&Re$1(0,s2,3,5,"app-switch",8)(1,l2,3,5,"app-thermostat",8)(2,c2,3,5,"app-outlet",8)(3,d2,3,5,"app-fan",10)(4,p2,3,5,"app-fan",10)(5,m2,3,5,"app-air-purifier",10)(6,u2,3,5,"app-access-code",10)(7,f2,3,5,"app-lightbulb",8)(8,g2,3,4,"app-light-sensor",9)(9,v2,3,5,"app-lock-mechanism",8)(10,h2,3,4,"app-temperature-sensor",9)(11,C2,3,5,"app-garage-door-opener",8)(12,_2,3,4,"app-motion-sensor",9)(13,y2,3,4,"app-occupancy-sensor",9)(14,x2,3,4,"app-contact-sensor",9)(15,S2,3,4,"app-humidity-sensor",9)(16,k2,3,4,"app-air-quality-sensor",9)(17,M2,3,5,"app-window-covering",8)(18,T2,3,5,"app-window",8)(19,b2,3,5,"app-door",8)(20,B2,3,5,"app-television",8)(21,w2,3,4,"app-battery",9)(22,E2,3,4,"app-battery",9)(23,D2,3,5,"app-speaker",8)(24,A2,3,5,"app-speaker",8)(25,P2,3,5,"app-doorbell",8)(26,F2,3,5,"app-microphone",8)(27,O2,3,5,"app-security-system",8)(28,I2,3,4,"app-leak-sensor",9)(29,L2,3,4,"app-smoke-sensor",9)(30,V2,3,4,"app-carbon-monoxide-sensor",9)(31,N2,3,4,"app-carbon-dioxide-sensor",9)(32,H2,3,5,"app-valve",8)(33,R2,3,4,"app-irrigation-system",9)(34,$2,3,5,"app-heater-cooler",8)(35,U2,3,5,"app-heater-cooler",11)(36,W2,3,5,"app-heater-cooler",12)(37,j2,3,5,"app-humidifier-dehumidifier",8)(38,G2,3,5,"app-humidifier-dehumidifier",13)(39,q2,3,5,"app-humidifier-dehumidifier",14)(40,z2,3,4,"app-stateless-programmable-switch",9)(41,K2,3,5,"app-filter-maintenance",8)(42,Y2,3,5,"app-robot-vacuum",8)(43,Q2,3,5,"app-washing-machine",8)(44,Z2,2,2,"app-unknown",9),e&2){let t,o=ye$1();Oe((t=o.service().customType||o.service().type||o.service().deviceType)==="Switch"?0:t==="Thermostat"?1:t==="Outlet"?2:t==="Fan"?3:t==="Fanv2"?4:t==="AirPurifier"?5:t==="AccessCode"?6:t==="Lightbulb"?7:t==="LightSensor"?8:t==="LockMechanism"?9:t==="TemperatureSensor"?10:t==="GarageDoorOpener"?11:t==="MotionSensor"?12:t==="OccupancySensor"?13:t==="ContactSensor"?14:t==="HumiditySensor"?15:t==="AirQualitySensor"?16:t==="WindowCovering"?17:t==="Window"?18:t==="Door"?19:t==="Television"?20:t==="Battery"?21:t==="BatteryService"?22:t==="Speaker"?23:t==="SmartSpeaker"?24:t==="Doorbell"?25:t==="Microphone"?26:t==="SecuritySystem"?27:t==="LeakSensor"?28:t==="SmokeSensor"?29:t==="CarbonMonoxideSensor"?30:t==="CarbonDioxideSensor"?31:t==="Valve"?32:t==="IrrigationSystem"?33:t==="HeaterCooler"?34:t==="Heater"?35:t==="Cooler"?36:t==="HumidifierDehumidifier"?37:t==="Humidifier"?38:t==="Dehumidifier"?39:t==="StatelessProgrammableSwitch"?40:t==="FilterMaintenance"?41:t==="RobotVacuum"?42:t==="WashingMachine"?43:44);}}var pM=(()=>{class e{$accessories=g(le);service=PH.required();static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Ja$1({type:e,selectors:[["app-accessory-tile"]],inputs:{service:[1,"service"]},decls:5,vars:2,consts:[["type","button",1,"manage-accessory-button",3,"accessory-hidden-indicator"],["type","button",1,"refreshing-accessory-button"],["type","button",1,"manage-accessory-button",3,"click"],["aria-hidden","true",1,"fas","fa-bars","grey-text"],["aria-hidden","true",1,"fas","fa-eye-slash","grey-text","accessory-hidden-icon"],["aria-hidden","true",1,"fas","fa-bars","grey-text","accessory-hidden-hover-icon"],["type","button",1,"refreshing-accessory-button",3,"click"],["aria-hidden","true",1,"fas","fa-circle-notch","fa-spin","grey-text"],[3,"service","readyForControl"],[3,"service"],[1,"w-100",3,"service","readyForControl"],["type","heater",3,"service","readyForControl"],["type","cooler",3,"service","readyForControl"],["type","humidifier",3,"service","readyForControl"],["type","dehumidifier",3,"service","readyForControl"]],template:function(o,i){o&1&&(Od$1(0),Re$1(1,Pu,4,6,"button",0)(2,Fu,3,3,"button",1),Re$1(3,a2,26,1)(4,J2,45,1),tc$1()),o&2&&(ie$1(),Oe(i.service().protocol==="matter"&&i.$accessories.matterReadyForControl||i.service().protocol!=="matter"&&i.$accessories.hapReadyForControl?1:2),ie$1(2),Oe(i.service().protocol==="matter"?3:4));},dependencies:[tr,ar,zo,bo,fo,Ro,No,Uo,or,Do,Go,qo,yo,Io,vo,mr,fr,So,nr,ho,Xo,Qo,Vo,Zo,_o,Co,cr,Lo,Po,Oo,er,wo,Mo,sr,jo,Ko,dr,a0,s0,r0,Kr,Gr,Jr,d0,qr,o0,n0,m0,i0,p0,v0,Wr,Qr,_0,e0,f0,t0,h0,l0,g0,to,K8],encapsulation:2})}return e})();
export{Re as R,le as l,pM as p};