Initial Commit

This commit is contained in:
francop committed 2026-06-11 11:50:50 -04:00
commit d4a69c41be
2748 files changed
+80489

No files matched your search

@@ -0,0 +1,3 @@
/*! For license information please see 4147.64d66dfa6c33f0c7.js.LICENSE.txt */
export const ids=["4147"];export const modules={9115:function(e,r,i){i.d(r,{K:function(){return a}});const a=e=>{switch(e.language){case"cs":case"de":case"fi":case"fr":case"sk":case"sv":return" ";default:return""}}},20095:function(e,r,i){var a=i(44249),t=i(31622),s=i(57243),n=i(50778),o=i(22344);(0,a.Z)([(0,n.Mo)("ha-button")],(function(e,r){return{F:class extends r{constructor(...r){super(...r),e(this)}},d:[{kind:"field",static:!0,key:"styles",value:()=>[o.W,s.iv`::slotted([slot=icon]){margin-inline-start:0px;margin-inline-end:8px;direction:var(--direction);display:block}.mdc-button{height:var(--button-height,36px)}.trailing-icon{display:flex}.slot-container{overflow:var(--button-slot-container-overflow,visible)}`]}]}}),t.z)},97709:function(e,r,i){var a=i("44249"),t=i("72621"),s=(i("13334"),i("24427"),i("57243")),n=i("50778"),o=i("35359"),l=i("11297"),d=(i("20095"),i("59897"),i("9115")),c=i("24785");const m="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z",p="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";(0,a.Z)([(0,n.Mo)("ha-file-upload")],(function(e,r){class i extends r{constructor(...r){super(...r),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,n.Cb)()],key:"accept",value:void 0},{kind:"field",decorators:[(0,n.Cb)()],key:"icon",value:void 0},{kind:"field",decorators:[(0,n.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,n.Cb)()],key:"secondary",value:void 0},{kind:"field",decorators:[(0,n.Cb)()],key:"supports",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Object})],key:"value",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"multiple",value:()=>!1},{kind:"field",decorators:[(0,n.Cb)({type:Boolean,reflect:!0})],key:"disabled",value:()=>!1},{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"uploading",value:()=>!1},{kind:"field",decorators:[(0,n.Cb)({type:Number})],key:"progress",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean,attribute:"auto-open-file-dialog"})],key:"autoOpenFileDialog",value:()=>!1},{kind:"field",decorators:[(0,n.SB)()],key:"_drag",value:()=>!1},{kind:"field",decorators:[(0,n.IO)("#input")],key:"_input",value:void 0},{kind:"method",key:"firstUpdated",value:function(e){(0,t.Z)(i,"firstUpdated",this,3)([e]),this.autoOpenFileDialog&&this._openFilePicker()}},{kind:"get",key:"_name",value:function(){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return(this.value instanceof FileList?Array.from(this.value):(0,c.r)(this.value)).map((e=>e.name)).join(", ")}},{kind:"method",key:"render",value:function(){return s.dy` ${this.uploading?s.dy`<div class="container"> <div class="row"> <span class="header">${this.value?this.hass?.localize("ui.components.file-upload.uploading_name",{name:this._name}):this.hass?.localize("ui.components.file-upload.uploading")}</span> ${this.progress?s.dy`<span class="progress">${this.progress}${(0,d.K)(this.hass.locale)}%</span>`:""} </div> <mwc-linear-progress .indeterminate="${!this.progress}" .progress="${this.progress?this.progress/100:void 0}"></mwc-linear-progress> </div>`:s.dy`<label for="${this.value?"":"input"}" class="container ${(0,o.$)({dragged:this._drag,multiple:this.multiple,value:Boolean(this.value)})}" @drop="${this._handleDrop}" @dragenter="${this._handleDragStart}" @dragover="${this._handleDragStart}" @dragleave="${this._handleDragEnd}" @dragend="${this._handleDragEnd}">${this.value?"string"==typeof this.value?s.dy`<div class="row"> <div class="value" @click="${this._openFilePicker}"> <ha-svg-icon .path="${this.icon||p}"></ha-svg-icon> ${this.value} </div> <ha-icon-button @click="${this._clearValue}" .label="${this.hass?.localize("ui.common.delete")||"Delete"}" .path="${m}"></ha-icon-button> </div>`:(this.value instanceof FileList?Array.from(this.value):(0,c.r)(this.value)).map((e=>s.dy`<div class="row"> <div class="value" @click="${this._openFilePicker}"> <ha-svg-icon .path="${this.icon||p}"></ha-svg-icon> ${e.name} - ${((e=0,r=2)=>{if(0===e)return"0 Bytes";r=r<0?0:r;const i=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/1024**i).toFixed(r))} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]}`})(e.size)} </div> <ha-icon-button @click="${this._clearValue}" .label="${this.hass?.localize("ui.common.delete")||"Delete"}" .path="${m}"></ha-icon-button> </div>`)):s.dy`<ha-svg-icon class="big-icon" .path="${this.icon||p}"></ha-svg-icon> <ha-button unelevated @click="${this._openFilePicker}"> ${this.label||this.hass?.localize("ui.components.file-upload.label")} </ha-button> <span class="secondary">${this.secondary||this.hass?.localize("ui.components.file-upload.secondary")}</span> <span class="supports">${this.supports}</span>`} <input id="input" type="file" class="file" .accept="${this.accept}" .multiple="${this.multiple}" @change="${this._handleFilLine truncated
//# sourceMappingURL=4147.64d66dfa6c33f0c7.js.map