iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
11 lines • 24 kB
JavaScript
/*! For license information please see 4544.010fb3d03d88c075.js.LICENSE.txt */
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[4544],{41060:function(e,t,i){i.a(e,async function(e,t){try{i(18111),i(61701),i(62953);var a=i(40445),s=i(5124),r=i(67576),o=i(6412),n=i(44537),l=i(1087),d=i(67258),h=i(46187),c=i(18350),p=i(26300),u=i(94355),g=e([c,p,u]);[c,p,u]=g.then?(await g)():g;let v,_,f,m,b,w,y,$,M=e=>e;const z="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z",k="M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M13.5,16V19H10.5V16H8L12,12L16,16H13.5M13,9V3.5L18.5,9H13Z";class x extends s.WF{firstUpdated(e){super.firstUpdated(e),this.autoOpenFileDialog&&this._openFilePicker()}get _name(){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return(this.value instanceof FileList?Array.from(this.value):(0,n.e)(this.value)).map(e=>e.name).join(", ")}render(){const e=this.localize||this.hass.localize;return(0,s.qy)(v||(v=M` ${0} `),this.uploading?(0,s.qy)(_||(_=M`<div class="container"> <div class="uploading"> <span class="header">${0}</span> ${0} </div> <ha-progress-bar .indeterminate="${0}" .value="${0}" loading></ha-progress-bar> </div>`),this.uploadingLabel||(this.value?e("ui.components.file-upload.uploading_name",{name:this._name}):e("ui.components.file-upload.uploading")),this.progress?(0,s.qy)(f||(f=M`<div class="progress"> ${0}${0}% </div>`),this.progress,this.hass&&(0,d.d)(this.hass.locale)):s.s6,!this.progress,this.progress):(0,s.qy)(m||(m=M`<label for="${0}" class="container ${0}" ="${0}" ="${0}" ="${0}" ="${0}" ="${0}">${0} <input id="input" type="file" class="file" .accept="${0}" .multiple="${0}" ="${0}"></label>`),this.value?"":"input",(0,o.H)({dragged:this._drag,multiple:this.multiple,value:Boolean(this.value)}),this._handleDrop,this._handleDragStart,this._handleDragStart,this._handleDragEnd,this._handleDragEnd,this.value?"string"==typeof this.value?(0,s.qy)(w||(w=M`<div class="row"> <div class="value" ="${0}"> <ha-svg-icon .path="${0}"></ha-svg-icon> ${0} </div> <ha-icon-button ="${0}" .label="${0}" .path="${0}"></ha-icon-button> </div>`),this._openFilePicker,this.icon||k,this.value,this._clearValue,this.deleteLabel||e("ui.common.delete"),z):(this.value instanceof FileList?Array.from(this.value):(0,n.e)(this.value)).map(t=>(0,s.qy)(y||(y=M`<div class="row"> <div class="value" ="${0}"> <ha-svg-icon .path="${0}"></ha-svg-icon> ${0} - ${0} </div> <ha-icon-button ="${0}" .label="${0}" .path="${0}"></ha-icon-button> </div>`),this._openFilePicker,this.icon||k,t.name,(0,h.A)(t.size),this._clearValue,this.deleteLabel||e("ui.common.delete"),z)):(0,s.qy)(b||(b=M`<ha-button size="small" appearance="filled" ="${0}"> <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> ${0} </ha-button> <span class="secondary">${0}</span> <span class="supports">${0}</span>`),this._openFilePicker,this.icon||k,this.label||e("ui.components.file-upload.label"),this.secondary||e("ui.components.file-upload.secondary"),this.supports),this.accept,this.multiple,this._handleFilePicked))}_openFilePicker(){var e;null===(e=this._input)||void 0===e||e.click()}_handleDrop(e){var t;e.preventDefault(),e.stopPropagation(),null!==(t=e.dataTransfer)&&void 0!==t&&t.files&&(0,l.r)(this,"file-picked",{files:this.multiple||1===e.dataTransfer.files.length?Array.from(e.dataTransfer.files):[e.dataTransfer.files[0]]}),this._drag=!1}_handleDragStart(e){e.preventDefault(),e.stopPropagation(),this._drag=!0}_handleDragEnd(e){e.preventDefault(),e.stopPropagation(),this._drag=!1}_handleFilePicked(e){0!==e.target.files.length&&(this.value=e.target.files,(0,l.r)(this,"file-picked",{files:e.target.files}))}_clearValue(e){e.preventDefault(),this._input.value="",this.value=void 0,(0,l.r)(this,"change"),(0,l.r)(this,"files-cleared")}constructor(...e){super(...e),this.multiple=!1,this.disabled=!1,this.uploading=!1,this.autoOpenFileDialog=!1,this._drag=!1}}x.styles=(0,s.AH)($||($=M`:host{display:block;height:240px}:host([disabled]){pointer-events:none;color:var(--disabled-text-color)}.container{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;border:solid 1px var(--mdc-text-field-idle-line-color,rgba(0,0,0,.42));border-radius:var(--mdc-shape-small,var(--ha-border-radius-sm));height:100%}.row{display:flex;align-items:center}label.container{border:dashed 1px var(--mdc-text-field-idle-line-color,rgba(0,0,0,.42));cursor:pointer}.container .uploading{display:flex;flex-direction:column;width:100%;align-items:flex-start;padding:0 32px;box-sizing:border-box}:host([disabled]) .container{border-color:var(--disabled-color)}label.dragged,label:hover{border-style:solid}label.dragged{border-color:var(--primary-color)}.dragged:before{position:absolute;top:0;right:0;bottom:0;left:0;background-color:var(--primary-color);content:"";opacity:var(--dark-divider-opacity);pointer-events:none;border-radius:var(--mdc-shape-small,4px)}label.value{cursor:default}label.value.multiple{justify-content:unset;overflow:auto}.highlight{color:var(--primary-color)}ha-button{margin-bottom:8px}.supports{color:var(--secondary-text-color);font-size:var(--ha-font-size-s)}:host([disabled]) .secondary{color:var(--disabled-text-color)}input.file{display:none}.value{cursor:pointer}.value ha-svg-icon{margin-right:8px;margin-inline-end:8px;margin-inline-start:initial}ha-button{--mdc-button-outline-color:var(--primary-color);--ha-icon-button-size:24px}ha-progress-bar{width:100%;padding:8px 32px;box-sizing:border-box}.header{font-weight:var(--ha-font-weight-medium)}.progress{color:var(--secondary-text-color)}button.link{background:0 0;border:none;padding:0;font-size:var(--ha-font-size-m);color:var(--primary-color);text-decoration:underline;cursor:pointer}`)),(0,a.Cg)([(0,r.MZ)({attribute:!1})],x.prototype,"hass",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],x.prototype,"localize",void 0),(0,a.Cg)([(0,r.MZ)()],x.prototype,"accept",void 0),(0,a.Cg)([(0,r.MZ)()],x.prototype,"icon",void 0),(0,a.Cg)([(0,r.MZ)()],x.prototype,"label",void 0),(0,a.Cg)([(0,r.MZ)()],x.prototype,"secondary",void 0),(0,a.Cg)([(0,r.MZ)({attribute:"uploading-label"})],x.prototype,"uploadingLabel",void 0),(0,a.Cg)([(0,r.MZ)({attribute:"delete-label"})],x.prototype,"deleteLabel",void 0),(0,a.Cg)([(0,r.MZ)()],x.prototype,"supports",void 0),(0,a.Cg)([(0,r.MZ)({type:Object})],x.prototype,"value",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],x.prototype,"multiple",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],x.prototype,"disabled",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],x.prototype,"uploading",void 0),(0,a.Cg)([(0,r.MZ)({type:Number})],x.prototype,"progress",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean,attribute:"auto-open-file-dialog"})],x.prototype,"autoOpenFileDialog",void 0),(0,a.Cg)([(0,r.wk)()],x.prototype,"_drag",void 0),(0,a.Cg)([(0,r.P)("#input")],x.prototype,"_input",void 0),x=(0,a.Cg)([(0,r.EM)("ha-file-upload")],x),t()}catch(v){t(v)}})},94355:function(e,t,i){i.a(e,async function(e,t){try{i(62953);var a=i(40445),s=i(88590),r=i(5124),o=i(67576),n=e([s]);s=(n.then?(await n)():n)[0];let l,d=e=>e;class h extends s.A{static get styles(){return[s.A.styles,(0,r.AH)(l||(l=d`:host{--indicator-color:var(
--ha-progress-bar-indicator-color,
var(--ha-color-on-primary-normal)
);--track-color:var(
--ha-progress-bar-track-color,
var(--ha-color-fill-neutral-normal-hover)
);--track-height:var(--ha-progress-bar-track-height, 12px);--wa-transition-slow:var(--ha-animation-duration-slow);position:relative}.progress-bar{border-radius:var(--ha-progress-bar-border-radius,var(--ha-border-radius-pill))}.indicator{background:var(--ha-progress-bar-indicator-background,var(--indicator-color))}:host([indeterminate]) .indicator{animation:wa-progress-indeterminate var(--ha-progress-bar-animation-duration,2.5s) infinite cubic-bezier(.37,0,.63,1)} slide-highlight{0%{transform:translateX(-200%)}100%{transform:translateX(200%)}}:host([loading]:not([indeterminate])) .progress-bar::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,oklch(from var(--indicator-color) 85% c h) 50%,transparent 100%);opacity:.5;animation:slide-highlight var(--ha-progress-bar-animation-duration,2.5s) infinite cubic-bezier(.37,0,.63,1);width:50%}:host::after{--width:var(
--ha-progress-bar-indicator-highlight-width,
calc(var(--track-height) * 2)
);width:var(--width);height:var(--ha-progress-bar-indicator-highlight-height,calc(var(--track-height) * 2));content:"";position:absolute;inset-inline-start:clamp(var(--width)/ 2,var(--percentage,0%),calc(100% - var(--width)/ 2));top:50%;transform:translate(-50%,-50%);background-image:var(--ha-progress-bar-indicator-highlight-image);background-size:contain;background-repeat:no-repeat;background-position:center;pointer-events:none;transition:inset-inline-start var(--wa-transition-slow, 200ms) var(--wa-transition-easing, ease)}:host([indeterminate])::after{display:none}`))]}constructor(...e){super(...e),this.loading=!1}}(0,a.Cg)([(0,o.MZ)({type:Boolean,reflect:!0})],h.prototype,"loading",void 0),h=(0,a.Cg)([(0,o.EM)("ha-progress-bar")],h),t()}catch(l){t(l)}})},42048:function(e,t,i){i.a(e,async function(e,a){try{i.r(t);i(3362),i(62953);var s=i(40445),r=i(5124),o=i(67576),n=i(1087),l=i(37981),d=i(18350),h=i(72554),c=(i(93444),i(41060)),p=i(52763),u=(i(67094),i(94355)),g=i(72001),v=i(65063),_=i(14503),f=e([d,h,c,p,u]);[d,h,c,p,u]=f.then?(await f)():f;let m,b,w,y,$,M,z,k,x,F,C,P,q,L,A,N,j,S,Z,D,H,U,I,T,B,V,E,O,X=e=>e;const W="M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z",G="M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z",J="M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M13.5,16V19H10.5V16H8L12,12L16,16H13.5M13,9V3.5L18.5,9H13Z",K=[{name:"firmware_target",type:"integer",valueMin:0}];class Q extends r.WF{showDialog(e){this._deviceName=(0,l.T)(e.device,this.hass.localize,this.hass.states),this.device=e.device,this._open=!0,this._fetchData(),this._subscribeNodeStatus()}closeDialog(){this._open=!1}_dialogClosed(){this._unsubscribeNodeFirmwareUpdate(),this._unsubscribeNodeStatus(),this.device=void 0,this._updateProgressMessage=void 0,this._updateFinishedMessage=void 0,this._firmwareFile=void 0,this._nodeStatus=void 0,this._firmwareTarget=void 0,this._uploading=this._updateInProgress=!1,(0,n.r)(this,"dialog-closed",{dialog:this.localName})}render(){var e;if(!this.device||!this._nodeStatus||void 0===this._updateInProgress)return r.s6;const t=(0,r.qy)(m||(m=X`<ha-file-upload .hass="${0}" .uploading="${0}" .icon="${0}" .label="${0}" .uploadingLabel="${0}" .value="${0}" -picked="${0}"></ha-file-upload> ${0} `),this.hass,this._uploading,J,this.hass.localize("ui.panel.config.zwave_js.update_firmware.upload_firmware"),this.hass.localize("ui.panel.config.zwave_js.update_firmware.uploading",{name:null===(e=this._firmwareFile)||void 0===e?void 0:e.name}),this._firmwareFile,this._uploadFile,this._nodeStatus.is_controller_node?r.s6:(0,r.qy)(b||(b=X`<p class="${0}"> ${0} </p> <ha-form .hass="${0}" .data="${0}" .schema="${0}" -changed="${0}" .disabled="${0}"></ha-form>`),this._uploading?"disabled":"",this.hass.localize("ui.panel.config.zwave_js.update_firmware.firmware_target_intro"),this.hass,{firmware_target:this._firmwareTarget},K,this._firmwareTargetChanged,this._uploading)),i=this._updateFinishedMessage?this._updateFinishedMessage.success?"success":"error":void 0,a=this._nodeStatus.is_controller_node?"_controller":"",s=(0,r.qy)(w||(w=X` <ha-button slot="primaryAction" ="${0}" .disabled="${0}"> ${0} </ha-button> `),this._beginFirmwareUpdate,void 0===this._firmwareFile||this._uploading,this.hass.localize("ui.panel.config.zwave_js.update_firmware.begin_update")),o=this._nodeStatus.is_controller_node?r.s6:(0,r.qy)(y||(y=X` <ha-button slot="secondaryAction" appearance="plain" ="${0}" variant="danger"> ${0} </ha-button> `),this._abortFirmwareUpdate,this.hass.localize("ui.panel.config.zwave_js.update_firmware.abort")),n=(0,r.qy)($||($=X` <ha-button slot="primaryAction" ="${0}"> ${0} </ha-button> `),this.closeDialog,this.hass.localize("ui.common.close"));return(0,r.qy)(M||(M=X` <ha-dialog .open="${0}" header-title="${0}" ="${0}"> ${0} <ha-dialog-footer slot="footer"> ${0} </ha-dialog-footer> </ha-dialog> `),this._open,this.hass.localize("ui.panel.config.zwave_js.update_firmware.title"),this._dialogClosed,this._updateProgressMessage||this._updateFinishedMessage?this._updateProgressMessage&&!this._updateFinishedMessage?(0,r.qy)(A||(A=X` <p> ${0} </p> <ha-progress-bar loading .value="${0}"></ha-progress-bar> <p> ${0} </p> `),this.hass.localize("ui.panel.config.zwave_js.update_firmware.in_progress",{device:(0,r.qy)(N||(N=X`<strong>${0}</strong>`),this._deviceName),progress:(100*this._updateProgressMessage.sent_fragments/this._updateProgressMessage.total_fragments).toFixed(2)}),this._updateProgressMessage.sent_fragments/this._updateProgressMessage.total_fragments*100,this.hass.localize("ui.panel.config.zwave_js.update_firmware.close",{device:(0,r.qy)(j||(j=X`<strong>${0}</strong>`),this._deviceName)})):(0,r.qy)(S||(S=X` <div class="flex-container"> <ha-svg-icon .path="${0}" .class="${0}"></ha-svg-icon> <div class="status"> <p> ${0} </p> </div> </div> ${0} `),this._updateFinishedMessage.success?W:G,i,this.hass.localize(`ui.panel.config.zwave_js.update_firmware.finished_status.${i}`,{device:(0,r.qy)(Z||(Z=X`<strong>${0}</strong>`),this._deviceName),message:this.hass.localize(`ui.panel.config.zwave_js.update_firmware.finished_status.${this._nodeStatus.is_controller_node?g.DE[this._updateFinishedMessage.status]:g.VL[this._updateFinishedMessage.status]}`)}),this._updateFinishedMessage.success?(0,r.qy)(D||(D=X`<p> ${0} </p>`),this.hass.localize(`ui.panel.config.zwave_js.update_firmware.finished_status.done${a}`)):(0,r.qy)(H||(H=X`<p> ${0} </p> ${0}`),this.hass.localize("ui.panel.config.zwave_js.update_firmware.finished_status.try_again"),t)):this._updateInProgress?(0,r.qy)(F||(F=X` <p> ${0} </p> <p> ${0} </p> `),this._nodeStatus.status===g.zI.Asleep?this.hass.localize("ui.panel.config.zwave_js.update_firmware.queued",{device:(0,r.qy)(C||(C=X`<strong>${0}</strong>`),this._deviceName)}):this.hass.localize("ui.panel.config.zwave_js.update_firmware.awake",{device:(0,r.qy)(P||(P=X`<strong>${0}</strong>`),this._deviceName)}),this._nodeStatus.status===g.zI.Asleep?this.hass.localize("ui.panel.config.zwave_js.update_firmware.close_queued",{device:(0,r.qy)(q||(q=X`<strong>${0}</strong>`),this._deviceName)}):this.hass.localize("ui.panel.config.zwave_js.update_firmware.close",{device:(0,r.qy)(L||(L=X`<strong>${0}</strong>`),this._deviceName)})):(0,r.qy)(z||(z=X` <p class="${0}"> ${0} </p> ${0} ${0} `),this._uploading?"disabled":"",this.hass.localize(`ui.panel.config.zwave_js.update_firmware.introduction${a}`,{device:(0,r.qy)(k||(k=X`<strong>${0}</strong>`),this._deviceName)}),t,this._uploading&&this._nodeStatus.status===g.zI.Asleep?(0,r.qy)(x||(x=X`<p class="wakeup"> ${0} </p>`),this.hass.localize("ui.panel.config.zwave_js.update_firmware.device_asleep")):r.s6),this._updateProgressMessage||this._updateFinishedMessage?this._updateProgressMessage&&!this._updateFinishedMessage?(0,r.qy)(T||(T=X` ${0} ${0} `),o,n):this._updateFinishedMessage.success?(0,r.qy)(B||(B=X` ${0} `),n):(0,r.qy)(V||(V=X` ${0} `),s):this._updateInProgress?(0,r.qy)(I||(I=X` ${0} ${0} `),o,n):(0,r.qy)(U||(U=X` ${0} ${0} `),this._uploading?o:r.s6,s))}async _fetchData(){[this._nodeStatus,this._updateInProgress]=await Promise.all([(0,g.mQ)(this.hass,this.device.id),(0,g.Cr)(this.hass,this.device.id)]),this._updateInProgress&&this._subscribeNodeFirmwareUpdate()}async _beginFirmwareUpdate(){this._uploading=!0,this._updateProgressMessage=this._updateFinishedMessage=void 0;try{this._subscribeNodeFirmwareUpdate(),await new Promise((e,t)=>{const i=new AbortController;this._cancelUpload=()=>{this._cancelUpload=void 0,i.abort(),e()},(0,g.mR)(this.hass,this.device.id,this._firmwareFile,this._firmwareTarget,i.signal).then(()=>{var e;return null===(e=this._cancelUpload)||void 0===e?void 0:e.call(this)}).catch(t)}),this._updateInProgress=!0}catch(e){this._unsubscribeNodeFirmwareUpdate(),(0,v.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.zwave_js.update_firmware.upload_failed"),text:e.message,confirmText:this.hass.localize("ui.common.close")})}finally{this._uploading=!1}}async _abortFirmwareUpdate(){if(await(0,v.dk)(this,{text:this.hass.localize("ui.panel.config.zwave_js.update_firmware.confirm_abort",{device:(0,r.qy)(E||(E=X`<strong>${0}</strong>`),this._deviceName)}),dismissText:this.hass.localize("ui.common.no"),confirmText:this.hass.localize("ui.common.yes")})){var e;null===(e=this._cancelUpload)||void 0===e||e.call(this),this._unsubscribeNodeFirmwareUpdate();try{await(0,g.of)(this.hass,this.device.id)}catch(t){(0,v.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.zwave_js.update_firmware.abort_failed"),text:t.message,confirmText:this.hass.localize("ui.common.close")})}this._firmwareFile=void 0,this._updateFinishedMessage=void 0,this._updateProgressMessage=void 0,this._updateInProgress=!1,this._uploading=!1}}_subscribeNodeStatus(){this.hass&&this.device&&!this._subscribedNodeStatus&&(this._subscribedNodeStatus=(0,g.sb)(this.hass,this.device.id,e=>{this._nodeStatus.status=e.status}))}_unsubscribeNodeStatus(){this._subscribedNodeStatus&&(this._subscribedNodeStatus.then(e=>e()),this._subscribedNodeStatus=void 0)}_subscribeNodeFirmwareUpdate(){this.hass&&this.device&&!this._subscribedNodeFirmwareUpdate&&(this._subscribedNodeFirmwareUpdate=(0,g.mX)(this.hass,this.device.id,e=>{"firmware update progress"===e.event?this._updateFinishedMessage||(this._updateProgressMessage=e):(this._unsubscribeNodeFirmwareUpdate(),this._updateProgressMessage=void 0,this._updateInProgress=!1,this._updateFinishedMessage=e)}))}_unsubscribeNodeFirmwareUpdate(){this._subscribedNodeFirmwareUpdate&&(this._subscribedNodeFirmwareUpdate.then(e=>e()),this._subscribedNodeFirmwareUpdate=void 0)}async _firmwareTargetChanged(e){this._firmwareTarget=e.detail.value.firmware_target}async _uploadFile(e){this._firmwareFile=e.detail.files[0]}static get styles(){return[_.nA,(0,r.AH)(O||(O=X`.success{color:var(--success-color)}.error{color:var(--error-color)}.flex-container{display:flex;align-items:center;margin-bottom:5px}ha-svg-icon{width:68px;height:48px}p.disabled{color:var(--disabled-text-color)}p.wakeup{color:var(--warning-color);font-weight:var(--ha-font-weight-bold);margin-top:24px;margin-bottom:0}`))]}constructor(...e){super(...e),this._uploading=!1,this._updateInProgress=!1,this._open=!1}}(0,s.Cg)([(0,o.MZ)({attribute:!1})],Q.prototype,"hass",void 0),(0,s.Cg)([(0,o.wk)()],Q.prototype,"device",void 0),(0,s.Cg)([(0,o.wk)()],Q.prototype,"_uploading",void 0),(0,s.Cg)([(0,o.wk)()],Q.prototype,"_updateFinishedMessage",void 0),(0,s.Cg)([(0,o.wk)()],Q.prototype,"_updateProgressMessage",void 0),(0,s.Cg)([(0,o.wk)()],Q.prototype,"_updateInProgress",void 0),(0,s.Cg)([(0,o.wk)()],Q.prototype,"_firmwareFile",void 0),(0,s.Cg)([(0,o.wk)()],Q.prototype,"_nodeStatus",void 0),(0,s.Cg)([(0,o.wk)()],Q.prototype,"_firmwareTarget",void 0),(0,s.Cg)([(0,o.wk)()],Q.prototype,"_open",void 0),Q=(0,s.Cg)([(0,o.EM)("dialog-zwave_js-update-firmware-node")],Q),a()}catch(m){a(m)}})},46187:function(e,t,i){i.d(t,{A:function(){return a}});const a=(e=0,t=2)=>{if(0===e)return"0 Bytes";t=t<0?0:t;const i=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/1024**i).toFixed(t))} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]}`}},48646:function(e,t,i){var a=i(69565),s=i(28551),r=i(1767),o=i(50851);e.exports=function(e,t){t&&"string"==typeof e||s(e);var i=o(e);return r(s(void 0!==i?a(i,e):e))}},78350:function(e,t,i){var a=i(46518),s=i(70259),r=i(79306),o=i(48981),n=i(26198),l=i(1469);a({target:"Array",proto:!0},{flatMap:function(e){var t,i=o(this),a=n(i);return r(e),t=l(i,0),s(t,i,i,a,0,1,e,arguments.length>1?arguments[1]:void 0),t}})},30237:function(e,t,i){i(6469)("flatMap")},30531:function(e,t,i){var a=i(46518),s=i(69565),r=i(79306),o=i(28551),n=i(1767),l=i(48646),d=i(19462),h=i(9539),c=i(96395),p=i(30684),u=i(84549);var g=!c&&!p("flatMap",function(){}),v=!c&&!g&&u("flatMap",TypeError),_=c||g||v||function(){try{var e=Iterator.prototype.flatMap.call(new Map([[4,5]]).entries(),function(e){return e});e.next(),e.return()}catch(t){return!0}}(),f=d(function(){for(var e,t,i=this.iterator,a=this.mapper;;){if(t=this.inner)try{if(!(e=o(s(t.next,t.iterator))).done)return e.value;this.inner=null}catch(r){h(i,"throw",r)}if(e=o(s(this.next,i)),this.done=!!e.done)return;try{this.inner=l(a(e.value,this.counter++),!1)}catch(r){h(i,"throw",r)}}});a({target:"Iterator",proto:!0,real:!0,forced:_},{flatMap:function(e){o(this);try{r(e)}catch(t){h(this,"throw",t)}return v?s(v,this,e):new f(n(this),{mapper:e,inner:null})}})},88590:function(e,t,i){i.a(e,async function(e,a){try{i.d(t,{A:function(){return m}});i(62953);var s=i(5124),r=i(67576),o=i(63672),n=i(95010),l=i(717),d=i(17060),h=i(4168),c=e([d]);d=(c.then?(await c)():c)[0];let v,_,f=e=>e;var p=Object.defineProperty,u=Object.getOwnPropertyDescriptor,g=(e,t,i,a)=>{for(var s,r=a>1?void 0:a?u(t,i):t,o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a?s(t,i,r):s(r))||r);return a&&r&&p(t,i,r),r};let m=class extends l.A{updated(e){e.has("value")&&requestAnimationFrame(()=>{this.style.setProperty("--percentage",`${(0,n.q)(this.value,0,100)}%`)})}render(){return(0,s.qy)(v||(v=f` <div part="base" class="progress-bar" role="progressbar" title="${0}" aria-label="${0}" aria-valuemin="0" aria-valuemax="100" aria-valuenow="${0}"> <div part="indicator" class="indicator"> ${0} </div> </div> `),(0,o.J)(this.title),this.label.length>0?this.label:this.localize.term("progress"),this.indeterminate?"0":this.value,this.indeterminate?"":(0,s.qy)(_||(_=f` <slot part="label" class="label"></slot> `)))}constructor(){super(...arguments),this.localize=new d.c(this),this.value=0,this.indeterminate=!1,this.label=""}};m.css=h.A,g([(0,r.MZ)({type:Number,reflect:!0})],m.prototype,"value",2),g([(0,r.MZ)({type:Boolean,reflect:!0})],m.prototype,"indeterminate",2),g([(0,r.MZ)()],m.prototype,"label",2),m=g([(0,r.EM)("wa-progress-bar")],m),a()}catch(v){a(v)}})},4168:function(e,t,i){i.d(t,{A:function(){return s}});let a;var s=(0,i(5124).AH)(a||(a=(e=>e)`:host{--track-height:1rem;--track-color:var(--wa-color-neutral-fill-normal);--indicator-color:var(--wa-color-brand-fill-loud);display:flex}.progress-bar{flex:1 1 auto;display:flex;position:relative;overflow:hidden;height:var(--track-height);border-radius:var(--wa-border-radius-pill);background-color:var(--track-color);color:var(--wa-color-brand-on-loud);font-size:var(--wa-font-size-s)}.indicator{width:var(--percentage);display:flex;align-items:center;justify-content:center;background-color:var(--indicator-color);text-align:center;white-space:nowrap;overflow:hidden;line-height:1;font-weight:var(--wa-font-weight-semibold);transition:all var(--wa-transition-slow, 200ms) var(--wa-transition-easing, ease);user-select:none;-webkit-user-select:none}:host([indeterminate]) .indicator{position:absolute;inset-block:0;inline-size:50%;animation:wa-progress-indeterminate 2.5s infinite cubic-bezier(.37,0,.63,1)} (forced-colors:active){.progress-bar{outline:solid 1px SelectedItem;background-color:var(--wa-color-surface-default)}.indicator{outline:solid 1px SelectedItem;background-color:SelectedItem}} wa-progress-indeterminate{0%{inset-inline-start:-50%}100%,75%{inset-inline-start:100%}}`))}}]);