1export const __rspack_esm_id=92827;export const __rspack_esm_ids=[92827];export const __webpack_modules__={94995(t,i,e){e(25102),e(47508),e(24791),e(77809),e(92653);e.d(i,{},{b:(t,i)=>{if(t===i)return!0;if(t&&i&&"object"==typeof t&&"object"==typeof i){if(t.constructor!==i.constructor)return!1;let e,a;if(Array.isArray(t)){if(a=t.length,a!==i.length)return!1;for(e=a;0!==e--;)if(t[e]!==i[e])return!1;return!0}if(t instanceof Map&&i instanceof Map){if(t.size!==i.size)return!1;for(e of t.entries())if(!i.has(e[0]))return!1;for(e of t.entries())if(e[1]!==i.get(e[0]))return!1;return!0}if(t instanceof Set&&i instanceof Set){if(t.size!==i.size)return!1;for(e of t.entries())if(!i.has(e[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(i)){if(a=t.length,a!==i.length)return!1;for(e=a;0!==e--;)if(t[e]!==i[e])return!1;return!0}if(t.constructor===RegExp)return t.source===i.source&&t.flags===i.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===i.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===i.toString();const o=Object.keys(t);if(a=o.length,a!==Object.keys(i).length)return!1;for(e=a;0!==e--;)if(!Object.prototype.hasOwnProperty.call(i,o[e]))return!1;for(e=a;0!==e--;){const a=o[e];if(t[a]!==i[a])return!1}return!0}return t!=t&&i!=i}})},12468(t,i,e){const a=(0,e(74175).q6)("dirtyState");e.d(i,{},{f:a,v:"__default__"})},99885(t,i,e){var a=function(t){return t.BIND="bind",t.CIFS="cifs",t.NFS="nfs",t}({}),o=function(t){return t.BACKUP="backup",t.MEDIA="media",t.SHARE="share",t}({}),r=function(t){return t.ACTIVE="active",t.ACTIVATING="activating",t.DEACTIVATING="deactivating",t.FAILED="failed",t.INACTIVE="inactive",t.MAINTENANCE="maintenance",t.RELOADING="reloading",t}({});e.d(i,{Wu:()=>a,f3:()=>r,h1:()=>o},{Bt:async(t,i)=>t.callWS({type:"supervisor/api",endpoint:`/mounts/${i.name}`,method:"put",timeout:null,data:i}),Qf:async(t,i)=>t.callWS({type:"supervisor/api",endpoint:"/mounts",method:"post",timeout:null,data:i}),Su:async(t,i)=>t.callWS({type:"supervisor/api",endpoint:"/mounts/options",method:"post",timeout:null,data:i}),bK:async t=>t.callWS({type:"supervisor/api",endpoint:"/mounts",method:"get",timeout:null}),dd:async(t,i)=>t.callWS({type:"supervisor/api",endpoint:`/mounts/${i.name}/reload`,method:"post",timeout:null}),wZ:async(t,i)=>t.callWS({type:"supervisor/api",endpoint:`/mounts/${i}`,method:"delete",timeout:null})})},28398(t,i,e){e(47144),e(99686),e(25102),e(47508);var a=e(89797),o=e(74175),r=e(26419),s=e(32379),n=e(86075),l=e(25071),c=e(94995),u=e(12468);const h=new Map,d=()=>{const t=Array.from(h.values()).some(Boolean);t!==window.isDirtyState&&(window.isDirtyState=t,(0,n.r)(window,"dirty-state-changed",{isDirty:t}))};e.d(i,{},{U:()=>t=>{class i extends t{_normalizeEffective(t){return this._effectiveNormalize?this._effectiveNormalize(t):t}_buildContextValue(){const t=Array.from(this._dirtySlices.values());return{isDirty:t.some(({initial:t,current:i})=>!this._dirtyCompareFn(t,i)),isEffectiveDirty:t.some(({normalizedInitial:t,current:i})=>!this._dirtyCompareFn(t,this._normalizeEffective(i))),setState:(t,i)=>{this._writeSlice(i,t)},markClean:()=>{this._markDirtyStateClean()}}}_publishContext(){this._dirtyStateContext=this._buildContextValue()}connectedCallback(){super.connectedCallback(),h.set(this,this.isDirtyState),d()}updated(t){super.updated(t),h.set(this,this.isDirtyState),d()}disconnectedCallback(){h.delete(this),d(),super.disconnectedCallback()}_writeSlice(t,i){const e=this._dirtySlices.get(t);if(!e){const e=this._dirtyCloneFn(i);return this._dirtySlices.set(t,{initial:e,current:i,normalizedInitial:this._normalizeEffective(e)}),void this._publishContext()}this._dirtyCompareFn(e.current,i)||(e.current=i,this._publishContext())}_initDirtyTracking(t,i,e){switch(this._effectiveNormalize=e,t.type){case"deep":this._dirtyCompareFn=(t,i)=>(0,l.b)(t,i),this._dirtyCloneFn=t=>(0,r.A)(t);break;case"shallow":this._dirtyCompareFn=(t,i)=>(0,c.b)(t,i),this._dirtyCloneFn=t=>t;break;default:this._dirtyCompareFn=t.compare,this._dirtyCloneFn=t=>t}if(this._dirtySlices.clear(),void 0!==i){const t=this._dirtyCloneFn(i);this._dirtySlices.set(u.v,{initial:t,current:i,normalizedInitial:this._normalizeEffective(t)})}this._publishContext()}_updateDirtyState(t){this._writeSlice(u.v,t)}_markDirtyStateClean(){for(const t of this._dirtySlices.values())t.initial=this._dirtyCloneFn(t.current),t.normalizedInitial=this._normalizeEffective(t.initial);this._publishContext()}_discardDirtyStateChanges(){for(const t of this._dirtySlices.values())t.current=this._dirtyCloneFn(t.initial);this._publishContext()}
1get isDirtyState(){return this._dirtyStateContext.isDirty}get isEffectiveDirtyState(){return this._dirtyStateContext.isEffectiveDirty}constructor(...t){super(...t),this._dirtySlices=new Map,this._dirtyCompareFn=l.b,this._dirtyCloneFn=t=>t,this._dirtyStateContext=this._buildContextValue()}}return(0,a.Cg)([(0,o.Gt)({context:u.f}),(0,s.wk)()],i.prototype,"_dirtyStateContext",void 0),i}})},50166(t,i,e){e.a(t,async function(t,a){try{e.r(i);var o=e(89797),r=e(20686),s=e(32379),n=e(86075),l=e(46686),c=e(90306),u=(e(94584),e(37334)),h=e(13239),d=e(32971),p=e(99885),_=e(28398),f=e(79419),y=t([l,c,u,h]);[l,c,u,h]=y.then?(await y)():y;const m=[{name:"default_backup_mount",required:!0,selector:{backup_location:{}}}];class g extends((0,_.U)()(r.WF)){async showDialog(t){this._dialogParams=t,this._open=!0,this._initDirtyTracking({type:"shallow"},{default_backup_mount:void 0})}closeDialog(){this._open=!1}_dialogClosed(){this._data=void 0,this._error=void 0,this._waiting=void 0,this._dialogParams=void 0,(0,n.r)(this,"dialog-closed",{dialog:this.localName})}render(){return this._dialogParams?r.qy` <ha-dialog .open=${this._open} header-title=${this.hass.localize("ui.panel.config.backup.dialogs.local_backup_location.title")} .preventScrimClose=${this.isDirtyState} @closed=${this._dialogClosed}> ${this._error?r.qy`<ha-alert alert-type="error">${this._error}</ha-alert>`:r.s6} <p> ${this.hass.localize("ui.panel.config.backup.dialogs.local_backup_location.description")} </p> <ha-form autofocus .hass=${this.hass} .data=${this._data} .schema=${m} .computeLabel=${this._computeLabelCallback} @value-changed=${this._valueChanged}></ha-form> <ha-alert alert-type="info"> ${this.hass.localize("ui.panel.config.backup.dialogs.local_backup_location.note")} </ha-alert> <ha-dialog-footer slot="footer"> <ha-button slot="secondaryAction" appearance="plain" @click=${this.closeDialog}> ${this.hass.localize("ui.common.cancel")} </ha-button> <ha-button .disabled=${this._waiting||!this.isDirtyState} slot="primaryAction" @click=${this._changeMount}> ${this.hass.localize("ui.common.save")} </ha-button> </ha-dialog-footer> </ha-dialog> `:r.s6}_valueChanged(t){const i=t.detail.value.default_backup_mount;this._data={default_backup_mount:"/backup"===i?null:i},this._updateDirtyState({default_backup_mount:this._data.default_backup_mount})}async _changeMount(){if(this._data){this._error=void 0,this._waiting=!0;try{await(0,p.Su)(this.hass,this._data)}catch(t){return this._error=(0,d.VR)(t),void(this._waiting=!1)}this._markDirtyStateClean(),this.closeDialog()}}static get styles(){return[f.RF,f.nA,r.AH`ha-form{margin-bottom:16px;display:block}`]}constructor(...t){super(...t),this._open=!1,this._computeLabelCallback=t=>this.hass.localize(`ui.panel.config.backup.dialogs.local_backup_location.options.${t.name}.name`)||t.name}}(0,o.Cg)([(0,s.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,o.Cg)([(0,s.wk)()],g.prototype,"_dialogParams",void 0),(0,o.Cg)([(0,s.wk)()],g.prototype,"_data",void 0),(0,o.Cg)([(0,s.wk)()],g.prototype,"_waiting",void 0),(0,o.Cg)([(0,s.wk)()],g.prototype,"_error",void 0),(0,o.Cg)([(0,s.wk)()],g.prototype,"_open",void 0),g=(0,o.Cg)([(0,s.EM)("dialog-local-backup-location")],g),a()}catch(t){a(t)}})}}; 2//# sourceMappingURL=92827.0bf6be29f0087532.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.