UNPKG

homebridge-config-ui-x

Version:

A web based management, configuration and control platform for Homebridge.

1 lines 3 kB
import{a as E,i as D}from"./chunk-D39XL-zh.js";import{Fr as se,Kr as v3,Sr as ph,Un as g,Vt as U3,Y as Je,dt as Nf,gt as Pe,hr as nc,jt as S_,kn as br,pt as Ot,ui as z0,ut as N_,v as C,vt as Py}from"./chunk-D96TCRAL.js";import{t as L}from"./chunk-tTuB-TjV2.js";var P=(()=>{class e{static ɵfac=function(t){return new(t||e)};static ɵcmp=nc({type:e,selectors:[[`app-spinner`]],decls:8,vars:3,consts:[[`role`,`status`,`aria-live`,`polite`,`aria-busy`,`true`,1,`app-spinner-container`],[1,`visually-hidden`],[`aria-hidden`,`true`,1,`animate_loader`],[`xmlns`,`http://www.w3.org/2000/svg`,0,`xmlns`,`xlink`,`http://www.w3.org/1999/xlink`,`width`,`200px`,`height`,`200px`,`viewBox`,`0 0 100 100`,`preserveAspectRatio`,`xMidYMid`,`focusable`,`false`,`aria-hidden`,`true`,1,`spinner-svg`],[`cx`,`50`,`cy`,`50`,`r`,`32`,`stroke-width`,`8`,`stroke-dasharray`,`50.26548245743669 50.26548245743669`,`fill`,`none`,`stroke-linecap`,`round`,1,`spinner_outer`],[`cx`,`50`,`cy`,`50`,`r`,`23`,`stroke-width`,`8`,`stroke`,`#f8b26a`,`stroke-dasharray`,`36.12831551628262 36.12831551628262`,`stroke-dashoffset`,`36.12831551628262`,`fill`,`none`,`stroke-linecap`,`round`,1,`spinner_inner`]],template:function(t,a){t&1&&(Pe(0,`div`,0)(1,`span`,1),Ot(2),S_(3,`translate`),Je(),Pe(4,`div`,2),ph(),Pe(5,`svg`,3),br(6,`circle`,4)(7,`circle`,5),Je()()()),t&2&&(se(2),Py(N_(3,1,`common.a11y.loading`)))},dependencies:[v3],styles:[`.app-spinner-container[_ngcontent-%COMP%]{position:absolute;inset:0 0 0 60px;display:flex;align-items:center;justify-content:center;z-index:1000}@media(max-width:767px){.app-spinner-container[_ngcontent-%COMP%]{left:0;top:65px}}.animate_loader[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{position:absolute;inset:0;margin:auto;width:200px;overflow:visible}.spinner-svg[_ngcontent-%COMP%]{margin:auto;display:block}@keyframes _ngcontent-%COMP%_spinner-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes _ngcontent-%COMP%_spinner-rotate-reverse{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}.spinner_outer[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_spinner-rotate 2.5s linear infinite;transform-origin:50px 50px}.spinner_inner[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_spinner-rotate-reverse 2.5s linear infinite;transform-origin:50px 50px}`]})}return e})();var b=D(L(),1);var I=(()=>{class e{$api=g(U3);$toastr=g(z0);$translate=g(Nf);downloadBackup(){return E(this,null,function*(){let n=yield this.$api.get(`/backup/download`,{observe:`response`,responseType:`blob`}),t=n.headers.get(`File-Name`)||`homebridge-backup.tar.gz`,a=n.body.size;if(a>globalThis.backup.maxBackupSize){let _=this.$translate.instant(`backup.backup_exceeds_max_size`,{maxBackupSizeText:globalThis.backup.maxBackupSizeText,size:`${(a/1048576).toFixed(1)}MB`});this.$toastr.warning(_,this.$translate.instant(`toast.title_warning`))}(0,b.saveAs)(n.body,t)})}static ɵfac=function(t){return new(t||e)};static ɵprov=C({token:e,factory:e.ɵfac,providedIn:`root`})}return e})();export{P as n,I as t};