"use strict";(self.webpackChunkknx_frontend=self.webpackChunkknx_frontend||[]).push([[4304],{6759:function(e,n,i){var t,a=i(6238),d=i(36683),r=i(89231),o=i(29864),l=i(83647),s=i(8364),u=(i(77052),i(650),i(43859),i(98597)),c=i(196),h=i(33167);i(22560),(0,s.A)([(0,c.EM)("ha-duration-input")],(function(e,n){var i=function(n){function i(){var n;(0,r.A)(this,i);for(var t=arguments.length,a=new Array(t),d=0;d<t;d++)a[d]=arguments[d];return n=(0,o.A)(this,i,[].concat(a)),e(n),n}return(0,l.A)(i,n),(0,d.A)(i)}(n);return{F:i,d:[{kind:"field",decorators:[(0,c.MZ)({attribute:!1})],key:"data",value:void 0},{kind:"field",decorators:[(0,c.MZ)()],key:"label",value:void 0},{kind:"field",decorators:[(0,c.MZ)()],key:"helper",value:void 0},{kind:"field",decorators:[(0,c.MZ)({type:Boolean})],key:"required",value:function(){return!1}},{kind:"field",decorators:[(0,c.MZ)({type:Boolean})],key:"enableMillisecond",value:function(){return!1}},{kind:"field",decorators:[(0,c.MZ)({type:Boolean})],key:"enableDay",value:function(){return!1}},{kind:"field",decorators:[(0,c.MZ)({type:Boolean})],key:"disabled",value:function(){return!1}},{kind:"field",decorators:[(0,c.P)("paper-time-input",!0)],key:"_input",value:void 0},{kind:"method",key:"focus",value:function(){this._input&&this._input.focus()}},{kind:"method",key:"render",value:function(){return(0,u.qy)(t||(t=(0,a.A)(["\n      <ha-base-time-input\n        .label=","\n        .helper=","\n        .required=","\n        .autoValidate=","\n        .disabled=",'\n        errorMessage="Required"\n        enableSecond\n        .enableMillisecond=',"\n        .enableDay=",'\n        format="24"\n        .days=',"\n        .hours=","\n        .minutes=","\n        .seconds=","\n        .milliseconds=","\n        @value-changed=",'\n        noHoursLimit\n        dayLabel="dd"\n        hourLabel="hh"\n        minLabel="mm"\n        secLabel="ss"\n        millisecLabel="ms"\n      ></ha-base-time-input>\n    '])),this.label,this.helper,this.required,this.required,this.disabled,this.enableMillisecond,this.enableDay,this._days,this._hours,this._minutes,this._seconds,this._milliseconds,this._durationChanged)}},{kind:"get",key:"_days",value:function(){var e;return null!==(e=this.data)&&void 0!==e&&e.days?Number(this.data.days):0}},{kind:"get",key:"_hours",value:function(){var e;return null!==(e=this.data)&&void 0!==e&&e.hours?Number(this.data.hours):0}},{kind:"get",key:"_minutes",value:function(){var e;return null!==(e=this.data)&&void 0!==e&&e.minutes?Number(this.data.minutes):0}},{kind:"get",key:"_seconds",value:function(){var e;return null!==(e=this.data)&&void 0!==e&&e.seconds?Number(this.data.seconds):0}},{kind:"get",key:"_milliseconds",value:function(){var e;return null!==(e=this.data)&&void 0!==e&&e.milliseconds?Number(this.data.milliseconds):0}},{kind:"method",key:"_durationChanged",value:function(e){e.stopPropagation();var n,i=Object.assign({},e.detail.value);(this.enableMillisecond||i.milliseconds?i.milliseconds>999&&(i.seconds+=Math.floor(i.milliseconds/1e3),i.milliseconds%=1e3):delete i.milliseconds,i.seconds>59&&(i.minutes+=Math.floor(i.seconds/60),i.seconds%=60),i.minutes>59&&(i.hours+=Math.floor(i.minutes/60),i.minutes%=60),this.enableDay&&i.hours>24)&&(i.days=(null!==(n=i.days)&&void 0!==n?n:0)+Math.floor(i.hours/24),i.hours%=24);(0,h.r)(this,"value-changed",{value:i})}}]}}),u.WF)},24304:function(e,n,i){i.r(n),i.d(n,{HaTimeDuration:function(){return h}});var t,a=i(6238),d=i(36683),r=i(89231),o=i(29864),l=i(83647),s=i(8364),u=(i(77052),i(98597)),c=i(196),h=(i(6759),(0,s.A)([(0,c.EM)("ha-selector-duration")],(function(e,n){var i=function(n){function i(){var n;(0,r.A)(this,i);for(var t=arguments.length,a=new Array(t),d=0;d<t;d++)a[d]=arguments[d];return n=(0,o.A)(this,i,[].concat(a)),e(n),n}return(0,l.A)(i,n),(0,d.A)(i)}(n);return{F:i,d:[{kind:"field",decorators:[(0,c.MZ)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,c.MZ)({attribute:!1})],key:"selector",value:void 0},{kind:"field",decorators:[(0,c.MZ)({attribute:!1})],key:"value",value:void 0},{kind:"field",decorators:[(0,c.MZ)()],key:"label",value:void 0},{kind:"field",decorators:[(0,c.MZ)()],key:"helper",value:void 0},{kind:"field",decorators:[(0,c.MZ)({type:Boolean})],key:"disabled",value:function(){return!1}},{kind:"field",decorators:[(0,c.MZ)({type:Boolean})],key:"required",value:function(){return!0}},{kind:"method",key:"render",value:function(){var e,n;return(0,u.qy)(t||(t=(0,a.A)(["\n      <ha-duration-input\n        .label=","\n        .helper=","\n        .data=","\n        .disabled=","\n        .required=","\n        ?enableDay=","\n        ?enableMillisecond=","\n      ></ha-duration-input>\n    "])),this.label,this.helper,this.value,this.disabled,this.required,null===(e=this.selector.duration)||void 0===e?void 0:e.enable_day,null===(n=this.selector.duration)||void 0===n?void 0:n.enable_millisecond)}}]}}),u.WF))}}]);