@duplicati/ngclient 0.0.187 → 0.0.188

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/{chunk-XOCNOYCA.js → chunk-24YV42LW.js} +1 -1
  2. package/{chunk-SNMLTU3K.js → chunk-2BI7VDSG.js} +1 -1
  3. package/{chunk-KL6DMZCY.js → chunk-2DMMOK27.js} +1 -1
  4. package/{chunk-6FSRPHJF.js → chunk-2IO2SOVX.js} +1 -1
  5. package/{chunk-R2CR7QIQ.js → chunk-2TRLLAGC.js} +1 -1
  6. package/{chunk-IHOWO6XG.js → chunk-33POGLKV.js} +1 -1
  7. package/{chunk-DYGEVTZX.js → chunk-4H45FIAF.js} +1 -1
  8. package/{chunk-D4HZWDZW.js → chunk-4ISX5VCL.js} +1 -1
  9. package/{chunk-LEOGK5HM.js → chunk-4SFVPIZK.js} +1 -1
  10. package/{chunk-DQP3UARB.js → chunk-5RWJ5MYO.js} +1 -1
  11. package/chunk-5UCSUXYJ.js +1 -0
  12. package/chunk-5VERVHYL.js +1 -0
  13. package/{chunk-7Q2KX2DS.js → chunk-63LI5F3N.js} +1 -1
  14. package/{chunk-CQWNLLPV.js → chunk-7M5Z35KN.js} +1 -1
  15. package/{chunk-UBP2P6EP.js → chunk-BOI757XB.js} +1 -1
  16. package/{chunk-KJSWAB4L.js → chunk-CDM6ZLJ2.js} +1 -1
  17. package/{chunk-R5PJXZ7X.js → chunk-CEFDED3C.js} +1 -1
  18. package/{chunk-P526EH5C.js → chunk-D3OS7FRC.js} +1 -1
  19. package/{chunk-HWOYZETB.js → chunk-EMGRBH26.js} +1 -1
  20. package/{chunk-TZFBGGSO.js → chunk-EWMMPXAB.js} +1 -1
  21. package/{chunk-VDCBYIFA.js → chunk-GNGWXBMU.js} +1 -1
  22. package/{chunk-NCE6M4NI.js → chunk-GV3CLW3W.js} +1 -1
  23. package/chunk-GZ37Z4NG.js +1 -0
  24. package/{chunk-OHSVO3NE.js → chunk-H6R7RVZH.js} +1 -1
  25. package/{chunk-QMOCZK45.js → chunk-HRS47DZS.js} +1 -1
  26. package/{chunk-XP3LG4SJ.js → chunk-JEAN2PVD.js} +1 -1
  27. package/{chunk-35FSXDVX.js → chunk-JKQGCV6K.js} +1 -1
  28. package/{chunk-TKRULVGG.js → chunk-LWAB7LAV.js} +1 -1
  29. package/{chunk-6M2VMREP.js → chunk-M56FGHQ2.js} +1 -1
  30. package/{chunk-35M4XDBK.js → chunk-MZE52ST5.js} +1 -1
  31. package/{chunk-IPS4C3CW.js → chunk-NVQBM7CK.js} +1 -1
  32. package/{chunk-OJOPHFHY.js → chunk-NZOS5QEO.js} +1 -1
  33. package/{chunk-G4UZ3T3A.js → chunk-O4EWPOUJ.js} +1 -1
  34. package/{chunk-VKNTOYAT.js → chunk-P5N6B7G3.js} +1 -1
  35. package/{chunk-ZEQRM5IH.js → chunk-REBF6Z5V.js} +1 -1
  36. package/{chunk-KMQEHXG5.js → chunk-RH3FJRXA.js} +1 -1
  37. package/{chunk-QQ7GCZMS.js → chunk-RKUMBV7J.js} +1 -1
  38. package/{chunk-3TNG75IR.js → chunk-S3UIXRUK.js} +1 -1
  39. package/{chunk-WJA26TQB.js → chunk-U44MGLD5.js} +1 -1
  40. package/{chunk-NO3LFOWH.js → chunk-WNFITLQW.js} +1 -1
  41. package/{chunk-GBWQZZN5.js → chunk-XSRWYB73.js} +1 -1
  42. package/{chunk-PPRFWW5N.js → chunk-Y4I2LLJP.js} +1 -1
  43. package/index.html +1 -1
  44. package/{main-PLXUJB64.js → main-557TCNCJ.js} +1 -1
  45. package/package.json +1 -1
  46. package/chunk-7ZWBWIGK.js +0 -1
  47. package/chunk-DOEHXBWI.js +0 -1
  48. package/chunk-YJLLDDPP.js +0 -1
@@ -1 +1 @@
1
- import{a as m}from"./chunk-6Q6SSTBK.js";import{a as r}from"./chunk-WVF3GRDZ.js";import{b as B}from"./chunk-YJLLDDPP.js";import{a as k}from"./chunk-TELPJYLN.js";import{c as b}from"./chunk-BGTK25UG.js";import{C as i,E as u,M as c,Mc as d,R as o,W as s,la as a,na as p}from"./chunk-T2WO6CVD.js";var y="backupListOrderBy",v="backupListShowActualTimes",D=[{value:"id",label:$localize`Backup ID`},{value:"name",label:$localize`Backup name`},{value:"lastrun",label:$localize`Last run time`},{value:"nextrun",label:$localize`Next run time`},{value:"schedule",label:$localize`Is scheduled`},{value:"backend",label:$localize`Destination type`},{value:"sourcesize",label:$localize`Source size`},{value:"destinationsize",label:$localize`Destination size`},{value:"duration",label:$localize`Duration`},{value:"-id",label:$localize`Backup ID (descending)`},{value:"-name",label:$localize`Backup name (descending)`},{value:"-lastrun",label:$localize`Last run time (descending)`},{value:"-nextrun",label:$localize`Next run time (descending)`},{value:"-schedule",label:$localize`Is scheduled (descending)`},{value:"-backend",label:$localize`Destination type (descending)`},{value:"-sourcesize",label:$localize`Source size (descending)`},{value:"-destinationsize",label:$localize`Destination size (descending)`},{value:"-duration",label:$localize`Duration (descending)`}],g=class l{#s=s(b);#o=s(k);#e=s(B);#u=null;#t=a([]);#a=a([]);#l=a(!1);#n=a(null);#p=a(null);#c=r(v,"relative");#i=r(y,"id");orderByOptions=a(D);orderBy=this.#i.asReadonly();backups=this.#a.asReadonly();timeType=this.#c.asReadonly();backupsLoading=this.#l.asReadonly();startingBackup=this.#n.asReadonly();deletingBackup=this.#p.asReadonly();draftBackups=this.#t.asReadonly();#r=d(()=>this.#o.hasBackupListSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");#d=p(()=>{let e=this.#e.backupListState();e&&this.#a.set(e)});addDraftBackup(e){let t=m();return this.#t.set([...this.#t(),{id:t,data:e}]),t}setOrderBy(e){this.#i.set(e),this.#e.isConnectionMethodSet()&&(this.#r()?this.#e.subscribe("backuplist",e):this.getBackups(!0))}setTimeType(e){this.#c.set(e)}removeDraftBackupById(e){this.#t.set(this.#t().filter(t=>t.id!==e))}getBackupById(e){return this.#a().find(t=>t.Backup?.ID===e)??null}getBackups(e=!1){if(!this.#e.isConnectionMethodSet())return;if(this.#r()){this.#e.subscribe("backuplist",this.#i());return}let t=this.#u,n=Date.now(),h=t&&n-t<900*1e3;t&&n-t<100||!e&&h&&this.#a().length||(this.#u=n,this.#l.set(!0),this.#s.getApiV1Backups({orderBy:this.#i()}).pipe(i(1),c(f=>this.#a.set(f)),u(()=>this.#l.set(!1))).subscribe())}startBackup(e){this.#n.set(e),this.#s.postApiV1BackupByIdStart({id:e}).pipe(i(1),c(()=>this.getBackups(!0)),u(()=>this.#n.set(null))).subscribe()}deleteBackup(e){return this.#s.deleteApiV1BackupById(e).pipe(i(1))}static \u0275fac=function(t){return new(t||l)};static \u0275prov=o({token:l,factory:l.\u0275fac,providedIn:"root"})};export{g as a};
1
+ import{a as m}from"./chunk-6Q6SSTBK.js";import{a as r}from"./chunk-WVF3GRDZ.js";import{b as B}from"./chunk-GZ37Z4NG.js";import{a as k}from"./chunk-TELPJYLN.js";import{c as b}from"./chunk-BGTK25UG.js";import{C as i,E as u,M as c,Mc as d,R as o,W as s,la as a,na as p}from"./chunk-T2WO6CVD.js";var y="backupListOrderBy",v="backupListShowActualTimes",D=[{value:"id",label:$localize`Backup ID`},{value:"name",label:$localize`Backup name`},{value:"lastrun",label:$localize`Last run time`},{value:"nextrun",label:$localize`Next run time`},{value:"schedule",label:$localize`Is scheduled`},{value:"backend",label:$localize`Destination type`},{value:"sourcesize",label:$localize`Source size`},{value:"destinationsize",label:$localize`Destination size`},{value:"duration",label:$localize`Duration`},{value:"-id",label:$localize`Backup ID (descending)`},{value:"-name",label:$localize`Backup name (descending)`},{value:"-lastrun",label:$localize`Last run time (descending)`},{value:"-nextrun",label:$localize`Next run time (descending)`},{value:"-schedule",label:$localize`Is scheduled (descending)`},{value:"-backend",label:$localize`Destination type (descending)`},{value:"-sourcesize",label:$localize`Source size (descending)`},{value:"-destinationsize",label:$localize`Destination size (descending)`},{value:"-duration",label:$localize`Duration (descending)`}],g=class l{#s=s(b);#o=s(k);#e=s(B);#u=null;#t=a([]);#a=a([]);#l=a(!1);#n=a(null);#p=a(null);#c=r(v,"relative");#i=r(y,"id");orderByOptions=a(D);orderBy=this.#i.asReadonly();backups=this.#a.asReadonly();timeType=this.#c.asReadonly();backupsLoading=this.#l.asReadonly();startingBackup=this.#n.asReadonly();deletingBackup=this.#p.asReadonly();draftBackups=this.#t.asReadonly();#r=d(()=>this.#o.hasBackupListSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");#d=p(()=>{let e=this.#e.backupListState();e&&this.#a.set(e)});addDraftBackup(e){let t=m();return this.#t.set([...this.#t(),{id:t,data:e}]),t}setOrderBy(e){this.#i.set(e),this.#e.isConnectionMethodSet()&&(this.#r()?this.#e.subscribe("backuplist",e):this.getBackups(!0))}setTimeType(e){this.#c.set(e)}removeDraftBackupById(e){this.#t.set(this.#t().filter(t=>t.id!==e))}getBackupById(e){return this.#a().find(t=>t.Backup?.ID===e)??null}getBackups(e=!1){if(!this.#e.isConnectionMethodSet())return;if(this.#r()){this.#e.subscribe("backuplist",this.#i());return}let t=this.#u,n=Date.now(),h=t&&n-t<900*1e3;t&&n-t<100||!e&&h&&this.#a().length||(this.#u=n,this.#l.set(!0),this.#s.getApiV1Backups({orderBy:this.#i()}).pipe(i(1),c(f=>this.#a.set(f)),u(()=>this.#l.set(!1))).subscribe())}startBackup(e){this.#n.set(e),this.#s.postApiV1BackupByIdStart({id:e}).pipe(i(1),c(()=>this.getBackups(!0)),u(()=>this.#n.set(null))).subscribe()}deleteBackup(e){return this.#s.deleteApiV1BackupById(e).pipe(i(1))}static \u0275fac=function(t){return new(t||l)};static \u0275prov=o({token:l,factory:l.\u0275fac,providedIn:"root"})};export{g as a};
@@ -1 +1 @@
1
- import{a as le}from"./chunk-XOCNOYCA.js";import"./chunk-6Q6SSTBK.js";import{a as ae}from"./chunk-FK7JFD5B.js";import{a as _e}from"./chunk-5DJAX2HH.js";import"./chunk-WVF3GRDZ.js";import{c as re}from"./chunk-DW332N2S.js";import"./chunk-YJLLDDPP.js";import"./chunk-TELPJYLN.js";import"./chunk-4RKO4YFU.js";import{B as ie,D as ne,b as H,e as Q,i as Y,s as Z,u as ee,z as te}from"./chunk-HPNLQHW6.js";import{c as oe}from"./chunk-BGTK25UG.js";import{d as j,e as q}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{$ as p,Ab as o,Cc as z,E as K,Fc as V,Ib as g,Mc as M,Pa as r,Rb as c,Rc as W,Sb as A,Tb as L,Ub as F,Vb as $,W as u,Xb as C,aa as P,cb as y,gc as x,jc as E,l as k,la as T,oc as S,p as U,pc as D,qc as h,rc as G,sb as m,sc as w,tb as f,tc as v,xc as J,yb as N,yc as X,z as I,zb as n}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var ce=l=>["/backup",l,"export"],se=()=>["/"];function Ee(l,_){if(l&1){let t=g();n(0,"section")(1,"h4"),c(2,4),o(),n(3,"p"),c(4,5),o(),n(5,"sh-checkbox",11),E(6," Delete local database "),n(7,"input",12),h("ngModelChange",function(e){p(t);let a=C();return D(a.deleteLocalDb,e)||(a.deleteLocalDb=e),P(e)}),o()()()}if(l&2){let t=C();r(7),S("ngModel",t.deleteLocalDb)}}function ue(l,_){if(l&1){let t=g();n(0,"section")(1,"h4"),c(2,6),o(),n(3,"p"),c(4,7),z(5,"bytes"),o(),n(6,"sh-checkbox",11),E(7," Delete remote files "),n(8,"input",12),h("ngModelChange",function(e){p(t);let a=C();return D(a.deleteRemoteFiles,e)||(a.deleteRemoteFiles=e),P(e)}),o()()()}if(l&2){let t=C(),i=v(0),e=(i==null||i.Backup==null||i.Backup.Metadata==null?null:i.Backup.Metadata.TargetFilesSize)??0;r(5),A(t.fileCount())(t.fileCount())(V(5,4,e,!0,!0)),L(4),r(3),S("ngModel",t.deleteRemoteFiles)}}var B=class l{#t=u(oe);#i=u(te);#e=u(le);#n=u(j);id=W.required();backup=M(()=>this.#e.getBackupById(this.id()));noLocalDbResource=re({params:()=>({dbPath:this.backup()?.Backup?.DBPath}),stream:({params:_})=>this.#t.postApiV1FilesystemValidate({requestBody:{path:_.dbPath}}).pipe(U(()=>!0),I(()=>k(!1)))});fileCount=M(()=>parseInt(this.backup()?.Backup?.Metadata?.TargetFilesCount??"0",10));deleteLocalDb=T(!1);deleteRemoteFiles=T(!1);isDeleting=T(!1);deleteBackup(){let _=this.id(),t=this.deleteLocalDb(),i=this.deleteRemoteFiles();this.isDeleting.set(!0),this.#i.open(_e,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete this backup?`,confirmText:$localize`Delete backup`,cancelText:$localize`Cancel`},closed:e=>{e&&this.#e.deleteBackup({id:_,deleteLocalDb:t,deleteRemoteFiles:i}).pipe(K(()=>this.isDeleting.set(!1))).subscribe({next:()=>{this.#n.navigate(["/"])}})}})}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=y({type:l,selectors:[["app-delete-backup"]],inputs:{id:[1,"id"]},decls:19,vars:11,consts:()=>{let _;_=$localize`Delete backup: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;t=$localize`Export configuration`;let i;i=$localize`If you want to use the backup later, you can export the configuration before deleting it.`;let e;e=$localize`Cancel`;let a;a=$localize`Delete local database`;let b;b=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. When deleting a backup, you can also delete the local database without affecting the ability to restore the remote files. If you are using the local database for backups from the commandline, you should keep the database. `;let R;R=$localize`Delete remote files`;let d;d=$localize`{VAR_PLURAL, plural, =1 {1 file} other {{INTERPOLATION} files}}`,d=F(d,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let O;return O=$localize` Delete ${d}:ICU@@2159106180826349718: (${"\uFFFD2\uFFFD"}:INTERPOLATION_1:) from the remote storage? `,[_,t,i,e,a,b,R,O,["shButton","",3,"routerLink"],[1,"actions"],["shButton","",1,"raised","error",3,"click"],[1,"primary","raised"],["type","checkbox",3,"ngModelChange","ngModel"]]},template:function(t,i){if(t&1){let e=g();G(0),n(1,"h3"),c(2,0),o(),m(3,Ee,8,1,"section"),n(4,"section")(5,"h4"),c(6,1),o(),n(7,"p"),c(8,2),o(),n(9,"button",8),E(10," Export configuration "),n(11,"sh-icon"),E(12,"caret-right"),o()()(),m(13,ue,9,8,"section"),n(14,"div",9)(15,"button",8),c(16,3),o(),n(17,"button",10),$("click",function(){return p(e),P(i.deleteBackup())}),E(18,"Delete backup"),o()()}if(t&2){let e=w(i.backup()),a=i.noLocalDbResource.value();r(2),A(e==null||e.Backup==null?null:e.Backup.Name),L(2),r(),f(a?3:-1),r(6),N("routerLink",X(8,ce,i.id())),r(4),f(a?13:-1),r(2),N("routerLink",J(10,se)),r(2),x("loader",i.isDeleting())}},dependencies:[ne,ie,ee,Z,H,Q,Y,q,ae],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:2.5rem;max-width:43.75rem}section[_ngcontent-%COMP%]{padding:2rem 0;display:flex;align-items:flex-start;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}h4[_ngcontent-%COMP%]{font:var(--paragraph-20);margin-bottom:.5rem}p[_ngcontent-%COMP%]{margin-bottom:1rem}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;padding:2rem 0}"],changeDetection:0})};export{B as default};
1
+ import{a as le}from"./chunk-24YV42LW.js";import"./chunk-6Q6SSTBK.js";import{a as ae}from"./chunk-FK7JFD5B.js";import{a as _e}from"./chunk-5DJAX2HH.js";import"./chunk-WVF3GRDZ.js";import{c as re}from"./chunk-DW332N2S.js";import"./chunk-GZ37Z4NG.js";import"./chunk-TELPJYLN.js";import"./chunk-4RKO4YFU.js";import{B as ie,D as ne,b as H,e as Q,i as Y,s as Z,u as ee,z as te}from"./chunk-HPNLQHW6.js";import{c as oe}from"./chunk-BGTK25UG.js";import{d as j,e as q}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{$ as p,Ab as o,Cc as z,E as K,Fc as V,Ib as g,Mc as M,Pa as r,Rb as c,Rc as W,Sb as A,Tb as L,Ub as F,Vb as $,W as u,Xb as C,aa as P,cb as y,gc as x,jc as E,l as k,la as T,oc as S,p as U,pc as D,qc as h,rc as G,sb as m,sc as w,tb as f,tc as v,xc as J,yb as N,yc as X,z as I,zb as n}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var ce=l=>["/backup",l,"export"],se=()=>["/"];function Ee(l,_){if(l&1){let t=g();n(0,"section")(1,"h4"),c(2,4),o(),n(3,"p"),c(4,5),o(),n(5,"sh-checkbox",11),E(6," Delete local database "),n(7,"input",12),h("ngModelChange",function(e){p(t);let a=C();return D(a.deleteLocalDb,e)||(a.deleteLocalDb=e),P(e)}),o()()()}if(l&2){let t=C();r(7),S("ngModel",t.deleteLocalDb)}}function ue(l,_){if(l&1){let t=g();n(0,"section")(1,"h4"),c(2,6),o(),n(3,"p"),c(4,7),z(5,"bytes"),o(),n(6,"sh-checkbox",11),E(7," Delete remote files "),n(8,"input",12),h("ngModelChange",function(e){p(t);let a=C();return D(a.deleteRemoteFiles,e)||(a.deleteRemoteFiles=e),P(e)}),o()()()}if(l&2){let t=C(),i=v(0),e=(i==null||i.Backup==null||i.Backup.Metadata==null?null:i.Backup.Metadata.TargetFilesSize)??0;r(5),A(t.fileCount())(t.fileCount())(V(5,4,e,!0,!0)),L(4),r(3),S("ngModel",t.deleteRemoteFiles)}}var B=class l{#t=u(oe);#i=u(te);#e=u(le);#n=u(j);id=W.required();backup=M(()=>this.#e.getBackupById(this.id()));noLocalDbResource=re({params:()=>({dbPath:this.backup()?.Backup?.DBPath}),stream:({params:_})=>this.#t.postApiV1FilesystemValidate({requestBody:{path:_.dbPath}}).pipe(U(()=>!0),I(()=>k(!1)))});fileCount=M(()=>parseInt(this.backup()?.Backup?.Metadata?.TargetFilesCount??"0",10));deleteLocalDb=T(!1);deleteRemoteFiles=T(!1);isDeleting=T(!1);deleteBackup(){let _=this.id(),t=this.deleteLocalDb(),i=this.deleteRemoteFiles();this.isDeleting.set(!0),this.#i.open(_e,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete this backup?`,confirmText:$localize`Delete backup`,cancelText:$localize`Cancel`},closed:e=>{e&&this.#e.deleteBackup({id:_,deleteLocalDb:t,deleteRemoteFiles:i}).pipe(K(()=>this.isDeleting.set(!1))).subscribe({next:()=>{this.#n.navigate(["/"])}})}})}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=y({type:l,selectors:[["app-delete-backup"]],inputs:{id:[1,"id"]},decls:19,vars:11,consts:()=>{let _;_=$localize`Delete backup: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;t=$localize`Export configuration`;let i;i=$localize`If you want to use the backup later, you can export the configuration before deleting it.`;let e;e=$localize`Cancel`;let a;a=$localize`Delete local database`;let b;b=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. When deleting a backup, you can also delete the local database without affecting the ability to restore the remote files. If you are using the local database for backups from the commandline, you should keep the database. `;let R;R=$localize`Delete remote files`;let d;d=$localize`{VAR_PLURAL, plural, =1 {1 file} other {{INTERPOLATION} files}}`,d=F(d,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let O;return O=$localize` Delete ${d}:ICU@@2159106180826349718: (${"\uFFFD2\uFFFD"}:INTERPOLATION_1:) from the remote storage? `,[_,t,i,e,a,b,R,O,["shButton","",3,"routerLink"],[1,"actions"],["shButton","",1,"raised","error",3,"click"],[1,"primary","raised"],["type","checkbox",3,"ngModelChange","ngModel"]]},template:function(t,i){if(t&1){let e=g();G(0),n(1,"h3"),c(2,0),o(),m(3,Ee,8,1,"section"),n(4,"section")(5,"h4"),c(6,1),o(),n(7,"p"),c(8,2),o(),n(9,"button",8),E(10," Export configuration "),n(11,"sh-icon"),E(12,"caret-right"),o()()(),m(13,ue,9,8,"section"),n(14,"div",9)(15,"button",8),c(16,3),o(),n(17,"button",10),$("click",function(){return p(e),P(i.deleteBackup())}),E(18,"Delete backup"),o()()}if(t&2){let e=w(i.backup()),a=i.noLocalDbResource.value();r(2),A(e==null||e.Backup==null?null:e.Backup.Name),L(2),r(),f(a?3:-1),r(6),N("routerLink",X(8,ce,i.id())),r(4),f(a?13:-1),r(2),N("routerLink",J(10,se)),r(2),x("loader",i.isDeleting())}},dependencies:[ne,ie,ee,Z,H,Q,Y,q,ae],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:2.5rem;max-width:43.75rem}section[_ngcontent-%COMP%]{padding:2rem 0;display:flex;align-items:flex-start;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}h4[_ngcontent-%COMP%]{font:var(--paragraph-20);margin-bottom:.5rem}p[_ngcontent-%COMP%]{margin-bottom:1rem}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;padding:2rem 0}"],changeDetection:0})};export{B as default};
@@ -1 +1 @@
1
- import{h as a,i as b}from"./chunk-KJSWAB4L.js";import"./chunk-O4OTZE5N.js";import"./chunk-WIVARGP6.js";import"./chunk-MHRECQ5Y.js";import"./chunk-6Q6SSTBK.js";import"./chunk-5DJAX2HH.js";import"./chunk-35FSXDVX.js";import"./chunk-DW332N2S.js";import"./chunk-YJLLDDPP.js";import"./chunk-TELPJYLN.js";import"./chunk-4RKO4YFU.js";import"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";export{a as createSourceDataForm,b as default};
1
+ import{h as a,i as b}from"./chunk-CDM6ZLJ2.js";import"./chunk-O4OTZE5N.js";import"./chunk-WIVARGP6.js";import"./chunk-MHRECQ5Y.js";import"./chunk-6Q6SSTBK.js";import"./chunk-5DJAX2HH.js";import"./chunk-JKQGCV6K.js";import"./chunk-DW332N2S.js";import"./chunk-GZ37Z4NG.js";import"./chunk-TELPJYLN.js";import"./chunk-4RKO4YFU.js";import"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";export{a as createSourceDataForm,b as default};
@@ -1 +1 @@
1
- import{a as K}from"./chunk-XOCNOYCA.js";import"./chunk-6Q6SSTBK.js";import{a as z}from"./chunk-5DJAX2HH.js";import"./chunk-WVF3GRDZ.js";import"./chunk-YJLLDDPP.js";import"./chunk-TELPJYLN.js";import"./chunk-4RKO4YFU.js";import{B as U,H as x,I as V,W as j,b as E,c as A,e as R,f as b,j as y,p as B,q as $,r as v,t as G,u as k,x as L,z as w}from"./chunk-HPNLQHW6.js";import{c as J}from"./chunk-BGTK25UG.js";import{d as O,e as M}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{Ab as i,Bb as u,E as g,Pa as l,Pb as D,Qb as h,Rb as _,Ub as I,Vb as d,W as s,cb as f,gc as P,la as c,sb as C,tb as S,xc as N,yb as p,zb as a}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var X=()=>["/"];function H(m,o){m&1&&(a(0,"sh-form-field")(1,"label",14),_(2,3),i(),u(3,"input",15),i())}var F=new v,T=class m{#t=s(L);#o=s(w);#i=s(J);#n=s(K);#e=s(O);isImporting=c(!1);isSecureFile=c(!1);isValid=c(!1);importForm=F.group({config:F.control(""),cmdline:F.control(!1),import_metadata:F.control(!1),direct:F.control(!1),passphrase:F.control("")});selectedFile=c([]);onFileDropped(o){let e=o[0];if(e){let t=new FileReader;this.isSecureFile.set(e.type!=="application/json"),t.onload=this.#r.bind(this),t.readAsArrayBuffer(e)}}#r(o){let e=o.target?.result;this.isSecureFile.set(this.#a(e)!=="json"),this.importForm.patchValue({config:this.#s(e)}),this.isValid.set(this.importForm.value.config!=="")}#a(o){let e=new Uint8Array(o);if(e.length>=5&&e[0]===65&&e[1]===69&&e[2]===83&&e[4]===0)return"aes";try{let t=new TextDecoder().decode(o),n=JSON.parse(t);if(typeof n=="object"&&n!==null)return"json"}catch{}return"unknown"}#s(o){let e=new Uint8Array(o),t=e.byteLength,n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return btoa(n)}submit(){this.isImporting.set(!0);let o=this.importForm.value.direct??!1;this.#i.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(g(()=>this.isImporting.set(!1))).subscribe({next:e=>{if(o){this.#t.success("Backup imported successfully."),this.#e.navigate(["/"]);return}let t=this.#n.addDraftBackup(e.data);this.#e.navigate(["/backup-draft",t])},error:e=>{let t=e.message||$localize`Unknown error`;this.#o.open(z,{data:{title:$localize`Failed to import backup`,message:t,confirmText:$localize`OK`,cancelText:void 0}})}})}static \u0275fac=function(e){return new(e||m)};static \u0275cmp=f({type:m,selectors:[["app-import"]],decls:19,vars:8,consts:()=>{let o;o=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,o=I(o);let e;e=$localize`Import Metadata`;let t;t=$localize`Save now`;let n;return n=$localize`Passphrase`,[o,e,t,n,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["accept",".json,.aes",3,"filesChange","files"],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","import_metadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(e,t){e&1&&(a(0,"header")(1,"h3"),D(2,0),a(3,"div",4)(4,"button",5),u(5,"sh-icon"),i(),a(6,"button",6),d("click",function(){return t.submit()}),u(7,"sh-icon"),i()(),h(),i()(),a(8,"form",7)(9,"sh-file-upload",8),d("filesChange",function(r){return t.onFileDropped(r)}),i(),C(10,H,4,0,"sh-form-field"),a(11,"sh-toggle",9)(12,"label",10),_(13,1),i(),u(14,"input",11),i(),a(15,"sh-toggle",9)(16,"label",12),_(17,2),i(),u(18,"input",13),i()()),e&2&&(l(4),p("routerLink",N(7,X)),l(2),P("loader",t.isImporting()),p("disabled",t.isImporting()||!t.isValid()),l(2),p("formGroup",t.importForm),l(),p("files",t.selectedFile()),l(),S(t.isSecureFile()?10:-1))},dependencies:[G,y,A,E,R,b,$,B,M,x,k,U,j,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}sh-file-upload[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};export{T as default};
1
+ import{a as K}from"./chunk-24YV42LW.js";import"./chunk-6Q6SSTBK.js";import{a as z}from"./chunk-5DJAX2HH.js";import"./chunk-WVF3GRDZ.js";import"./chunk-GZ37Z4NG.js";import"./chunk-TELPJYLN.js";import"./chunk-4RKO4YFU.js";import{B as U,H as x,I as V,W as j,b as E,c as A,e as R,f as b,j as y,p as B,q as $,r as v,t as G,u as k,x as L,z as w}from"./chunk-HPNLQHW6.js";import{c as J}from"./chunk-BGTK25UG.js";import{d as O,e as M}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{Ab as i,Bb as u,E as g,Pa as l,Pb as D,Qb as h,Rb as _,Ub as I,Vb as d,W as s,cb as f,gc as P,la as c,sb as C,tb as S,xc as N,yb as p,zb as a}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var X=()=>["/"];function H(m,o){m&1&&(a(0,"sh-form-field")(1,"label",14),_(2,3),i(),u(3,"input",15),i())}var F=new v,T=class m{#t=s(L);#o=s(w);#i=s(J);#n=s(K);#e=s(O);isImporting=c(!1);isSecureFile=c(!1);isValid=c(!1);importForm=F.group({config:F.control(""),cmdline:F.control(!1),import_metadata:F.control(!1),direct:F.control(!1),passphrase:F.control("")});selectedFile=c([]);onFileDropped(o){let e=o[0];if(e){let t=new FileReader;this.isSecureFile.set(e.type!=="application/json"),t.onload=this.#r.bind(this),t.readAsArrayBuffer(e)}}#r(o){let e=o.target?.result;this.isSecureFile.set(this.#a(e)!=="json"),this.importForm.patchValue({config:this.#s(e)}),this.isValid.set(this.importForm.value.config!=="")}#a(o){let e=new Uint8Array(o);if(e.length>=5&&e[0]===65&&e[1]===69&&e[2]===83&&e[4]===0)return"aes";try{let t=new TextDecoder().decode(o),n=JSON.parse(t);if(typeof n=="object"&&n!==null)return"json"}catch{}return"unknown"}#s(o){let e=new Uint8Array(o),t=e.byteLength,n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return btoa(n)}submit(){this.isImporting.set(!0);let o=this.importForm.value.direct??!1;this.#i.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(g(()=>this.isImporting.set(!1))).subscribe({next:e=>{if(o){this.#t.success("Backup imported successfully."),this.#e.navigate(["/"]);return}let t=this.#n.addDraftBackup(e.data);this.#e.navigate(["/backup-draft",t])},error:e=>{let t=e.message||$localize`Unknown error`;this.#o.open(z,{data:{title:$localize`Failed to import backup`,message:t,confirmText:$localize`OK`,cancelText:void 0}})}})}static \u0275fac=function(e){return new(e||m)};static \u0275cmp=f({type:m,selectors:[["app-import"]],decls:19,vars:8,consts:()=>{let o;o=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,o=I(o);let e;e=$localize`Import Metadata`;let t;t=$localize`Save now`;let n;return n=$localize`Passphrase`,[o,e,t,n,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["accept",".json,.aes",3,"filesChange","files"],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","import_metadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(e,t){e&1&&(a(0,"header")(1,"h3"),D(2,0),a(3,"div",4)(4,"button",5),u(5,"sh-icon"),i(),a(6,"button",6),d("click",function(){return t.submit()}),u(7,"sh-icon"),i()(),h(),i()(),a(8,"form",7)(9,"sh-file-upload",8),d("filesChange",function(r){return t.onFileDropped(r)}),i(),C(10,H,4,0,"sh-form-field"),a(11,"sh-toggle",9)(12,"label",10),_(13,1),i(),u(14,"input",11),i(),a(15,"sh-toggle",9)(16,"label",12),_(17,2),i(),u(18,"input",13),i()()),e&2&&(l(4),p("routerLink",N(7,X)),l(2),P("loader",t.isImporting()),p("disabled",t.isImporting()||!t.isValid()),l(2),p("formGroup",t.importForm),l(),p("files",t.selectedFile()),l(),S(t.isSecureFile()?10:-1))},dependencies:[G,y,A,E,R,b,$,B,M,x,k,U,j,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}sh-file-upload[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};export{T as default};
@@ -1 +1 @@
1
- import{b as ee,k as _n}from"./chunk-IW4RDAIN.js";import{a as an}from"./chunk-TKRULVGG.js";import{a as on}from"./chunk-LEOGK5HM.js";import"./chunk-FOQJA6X2.js";import"./chunk-VHOAXFIJ.js";import{a as tn}from"./chunk-XOCNOYCA.js";import"./chunk-6Q6SSTBK.js";import"./chunk-FK7JFD5B.js";import"./chunk-D4HZWDZW.js";import"./chunk-ME77WZZI.js";import"./chunk-5DJAX2HH.js";import{a as nn}from"./chunk-WVF3GRDZ.js";import"./chunk-35FSXDVX.js";import"./chunk-DW332N2S.js";import"./chunk-YJLLDDPP.js";import"./chunk-TELPJYLN.js";import"./chunk-4RKO4YFU.js";import{A as Ue,B as Z,C as Ke,E as je,G as We,K as qe,L as Qe,S as Ye,T as Ze,u as Y}from"./chunk-HPNLQHW6.js";import{c as en}from"./chunk-BGTK25UG.js";import{e as Q}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{$ as I,Ab as t,Bb as T,Cc as M,Dc as G,E as K,Ec as A,Fb as O,Gb as m,Gc as q,Hb as f,Ib as H,Ma as j,Pa as a,Pb as c,Qb as s,Rb as C,Sb as h,Tb as L,Ub as W,Vb as $,W as v,Xb as r,aa as P,cb as be,ec as V,gc as R,hb as N,ib as ve,jc as u,la as X,lc as S,na as Be,oc as we,pb as Xe,pc as ze,qb as Je,qc as Ve,sb as g,tb as p,ub as J,wb as w,xb as z,xc as U,yb as E,yc as D,zb as o}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var rn=()=>[Q,import("./chunk-6GC4UPHS.js").then(e=>e.NgTemplateOutlet),Z,Y,je,Ze,Ye,import("./chunk-2PAQOFN3.js").then(e=>e.DurationFormatPipe),import("./chunk-2XXH473G.js").then(e=>e.BytesPipe),import("./chunk-YDDSLDHZ.js").then(e=>e.RelativeTimePipe)],cn=()=>["/add-backup"],sn=()=>["/restore"],ln=e=>({$implicit:e}),un=()=>["/backup/new"],Fn=e=>["/backup",e],Cn=e=>["/restore",e],Tn=e=>["/backup",e,"export"],En=e=>["/backup",e,"delete"],dn=e=>["/backup",e,"database"],gn=e=>["/backup",e,"commandline"],pn=e=>["/backup",e,"log"];function Sn(e,i){e&1&&C(0,11,1)}function On(e,i){e&1&&C(0,11,2)}function mn(e,i){if(e&1&&C(0,11,3),e&2){let n=r(2);h(n.timeType()),L(0)}}function Nn(e,i){if(e&1){let n=H();o(0,"button",54),$("click",function(){let F=I(n).$implicit,d=r(3);return P(d.sortByColumn.set(F.value))}),C(1,15),t()}if(e&2){let n=i.$implicit,_=r(3);R("active",_.orderBy()===n.value),a(),h(n.label),L(1)}}function Mn(e,i){if(e&1&&(o(0,"sh-menu",55)(1,"button",56),c(2,14),T(3,"strong")(4,"sh-icon"),s(),t(),O(5,57),w(6,Nn,2,3,"button",58,J),m(),t()),e&2){let n=r(2);a(4),h(n.orderBy()),L(2),a(2),z(n.sortOrderOptions())}}function In(e,i){if(e&1){let n=H();o(0,"div",52)(1,"sh-button-group",53)(2,"button",54),$("click",function(){I(n);let F=r();return P(F.viewMode.set("list"))}),c(3,9),T(4,"sh-icon"),s(),t(),o(5,"button",54),$("click",function(){I(n);let F=r();return P(F.viewMode.set("details"))}),c(6,10),T(7,"sh-icon"),s(),t()(),o(8,"sh-menu",55)(9,"button",56),c(10,11),o(11,"strong"),g(12,Sn,1,0)(13,On,1,0)(14,mn,1,1),t(),T(15,"sh-icon"),s(),t(),O(16,57),o(17,"button",54),$("click",function(){I(n);let F=r();return P(F.setTimeType("relative"))}),C(18,12),t(),o(19,"button",54),$("click",function(){I(n);let F=r();return P(F.setTimeType("actual"))}),C(20,13),t(),m(),t(),g(21,Mn,8,1,"sh-menu",55),t()}if(e&2){let n=r();a(2),R("active",n.viewMode()==="list"),a(3),R("active",n.viewMode()==="details"),a(7),p(n.timeType()=="relative"?12:n.timeType()=="actual"?13:14),a(9),p(n.viewMode()==="list"?21:-1)}}function Pn(e,i){if(e&1&&(o(0,"p")(1,"span"),C(2,21),t(),u(3),M(4,"relativeTime"),t()),e&2){let n=r().$implicit,_=r(4);a(3),S(" ",A(4,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function fn(e,i){if(e&1&&(u(0),M(1,"durationFormat")),e&2){let n=r().$implicit,_=r(4);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function Dn(e,i){e&1&&(O(0),u(1,"-"),m())}function $n(e,i){if(e&1&&(u(0),M(1,"bytes")),e&2){let n=r().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Rn(e,i){e&1&&(O(0),u(1,"-"),m())}function An(e,i){if(e&1&&(u(0),M(1,"bytes")),e&2){let n=r().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function hn(e,i){e&1&&(O(0),u(1,"-"),m())}function Ln(e,i){e&1&&(o(0,"sh-chip",67),C(1,22),t())}function Hn(e,i){e&1&&f(0)}function Gn(e,i){if(e&1&&(o(0,"div",63)(1,"div",48)(2,"h3"),u(3),o(4,"sh-chip"),T(5,"img",64),u(6),t()(),o(7,"p")(8,"span"),C(9,16),t(),u(10),M(11,"relativeTime"),t(),g(12,Pn,5,4,"p"),o(13,"p")(14,"span"),C(15,17),t(),g(16,fn,2,4)(17,Dn,2,0,"ng-container"),t(),o(18,"p")(19,"span"),C(20,18),t(),g(21,$n,2,3)(22,Rn,2,0,"ng-container"),t(),o(23,"p")(24,"span"),C(25,19),t(),g(26,An,2,3)(27,hn,2,0,"ng-container"),t()(),o(28,"div",65)(29,"sh-chip",66),C(30,20),t(),g(31,Ln,2,0,"sh-chip",67),t(),o(32,"div",52),N(33,Hn,1,0,"ng-container",68),t()()),e&2){let n=i.$implicit,_=r(4),F=V(33);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),E("src",_.getBackendIcon(n.Backup.TargetURL),j),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(4),S(" ",A(11,13,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupFinished,_.timeType()==="actual")," "),a(2),p(!(n==null||n.Schedule==null)&&n.Schedule.Time?12:-1),a(4),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?16:17),a(5),p(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?21:22),a(5),p(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?26:27);let d=_.getBackupVersionCount(n);a(4),h(d)(d),L(30),a(),p(n.Backup.ExternalID?31:-1),a(2),E("ngTemplateOutlet",F)("ngTemplateOutletContext",D(16,ln,n))}}function xn(e,i){if(e&1&&w(0,Gn,34,18,"div",63,J),e&2){let n=r(3);z(n.backups())}}function kn(e,i){e&1&&(o(0,"div",62),c(1,23),o(2,"button",69),T(3,"sh-icon"),t(),s(),t()),e&2&&(a(2),E("routerLink",U(1,un)))}function yn(e,i){if(e&1&&(o(0,"div",61),g(1,xn,2,0)(2,kn,4,2,"div",62),t()),e&2){let n=r(2);R("fallback",n.backups().length===0),a(),p(n.backups().length?1:2)}}function Bn(e,i){e&1&&(c(0,24,1),f(1),s())}function bn(e,i){e&1&&(c(0,25,1),f(1),s())}function vn(e,i){e&1&&(c(0,26,1),f(1),s())}function Xn(e,i){e&1&&(c(0,27,1),f(1),s())}function Jn(e,i){e&1&&(c(0,28,1),f(1),s())}function wn(e,i){e&1&&(c(0,29,1),f(1),s())}function zn(e,i){e&1&&(c(0,30,1),f(1),s())}function Vn(e,i){if(e&1&&(u(0),M(1,"relativeTime")),e&2){let n=r().$implicit,_=r(3);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,_.timeType()==="actual")," ")}}function Un(e,i){e&1&&(O(0),u(1,"-"),m())}function Kn(e,i){if(e&1&&(u(0),M(1,"relativeTime")),e&2){let n=r().$implicit,_=r(3);S(" ",A(1,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function jn(e,i){e&1&&(O(0),u(1,"-"),m())}function Wn(e,i){if(e&1&&(u(0),M(1,"durationFormat")),e&2){let n=r().$implicit,_=r(3);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function qn(e,i){e&1&&(O(0),u(1,"-"),m())}function Qn(e,i){if(e&1&&(u(0),M(1,"bytes")),e&2){let n=r().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Yn(e,i){e&1&&(O(0),u(1,"-"),m())}function Zn(e,i){if(e&1&&(u(0),M(1,"bytes")),e&2){let n=r().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function et(e,i){e&1&&(O(0),u(1,"-"),m())}function nt(e,i){e&1&&f(0)}function tt(e,i){if(e&1&&(o(0,"tr")(1,"td"),u(2),t(),o(3,"td")(4,"sh-chip",80),T(5,"img",64),u(6),t()(),o(7,"td"),g(8,Vn,2,4)(9,Un,2,0,"ng-container"),t(),o(10,"td"),g(11,Kn,2,4)(12,jn,2,0,"ng-container"),t(),o(13,"td"),g(14,Wn,2,4)(15,qn,2,0,"ng-container"),t(),o(16,"td"),g(17,Qn,2,3)(18,Yn,2,0,"ng-container"),t(),o(19,"td"),g(20,Zn,2,3)(21,et,2,0,"ng-container"),t(),o(22,"td")(23,"span"),C(24,33),t()(),o(25,"td"),N(26,nt,1,0,"ng-container",68),t()()),e&2){let n=i.$implicit,_=r(3),F=V(33);a(2),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(3),E("src",_.getBackendIcon(n.Backup.TargetURL),j),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(2),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDate?8:9),a(3),p(!(n==null||n.Schedule==null)&&n.Schedule.Time?11:12),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?14:15),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?17:18),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?20:21);let d=_.getBackupVersionCount(n);a(4),h(d)(d),L(24),a(2),E("ngTemplateOutlet",F)("ngTemplateOutletContext",D(12,ln,n))}}function it(e,i){if(e&1){let n=H();o(0,"sh-table",70),Ve("sortByColumnChange",function(F){I(n);let d=r(2);return ze(d.sortByColumn,F)||(d.sortByColumn=F),P(F)}),o(1,"tr",71)(2,"th",72),c(3,24),N(4,Bn,2,0,"ng-container",73),s(),t(),o(5,"th",74),c(6,25),N(7,bn,2,0,"ng-container",73),s(),t(),o(8,"th",75),c(9,26),N(10,vn,2,0,"ng-container",73),s(),t(),o(11,"th",76),c(12,27),N(13,Xn,2,0,"ng-container",73),s(),t(),o(14,"th",77),c(15,28),N(16,Jn,2,0,"ng-container",73),s(),t(),o(17,"th",78),c(18,29),N(19,wn,2,0,"ng-container",73),s(),t(),o(20,"th",79),c(21,30),N(22,zn,2,0,"ng-container",73),s(),t(),o(23,"th"),C(24,31),t(),o(25,"th"),C(26,32),t()(),w(27,tt,27,14,"tr",null,J),t()}if(e&2){let n=r(2),_=V(35);E("data",n.backups())("loading",n.backupsLoading()),we("sortByColumn",n.sortByColumn),a(4),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(5),z(n.backups())}}function ot(e,i){if(e&1&&g(0,yn,3,3,"div",59)(1,it,29,10,"sh-table",60),e&2){let n=r();p(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1)}}function _t(e,i){e&1&&(o(0,"div",81),T(1,"sh-progress-bar",82),o(2,"div",48)(3,"h3"),C(4,34),t()()())}function at(e,i){e&1&&C(0,35,1)}function lt(e,i){e&1&&(o(0,"sh-icon"),u(1,"check"),t())}function rt(e,i){e&1&&(o(0,"sh-icon"),u(1,"dots-three-vertical"),t())}function ct(e,i){if(e&1){let n=H();o(0,"button",83),$("click",function(){let F=I(n).$implicit,d=r();return P(d.startBackup(F.Backup.ID))}),c(1,35),T(2,"sh-icon"),g(3,at,1,0),s(),t(),o(4,"button",84)(5,"sh-icon"),u(6,"pencil-simple"),t()(),o(7,"sh-menu")(8,"button",49),g(9,lt,2,0,"sh-icon")(10,rt,2,0,"sh-icon"),t(),O(11,57),o(12,"h3",85),u(13,"Operations"),t(),o(14,"button",86),c(15,36),T(16,"sh-icon"),s(),t(),o(17,"button",86),c(18,37),T(19,"sh-icon"),s(),t(),o(20,"button",86),c(21,38),T(22,"sh-icon"),s(),t(),T(23,"sh-divider"),o(24,"h3",85),C(25,39),t(),o(26,"button",86),c(27,40),T(28,"sh-icon"),s(),t(),o(29,"button",54),$("click",function(){let F=I(n).$implicit,d=r();return P(d.verifyFiles(F.Backup.ID))}),c(30,41),T(31,"sh-icon"),s(),t(),o(32,"button",54),$("click",function(){let F=I(n).$implicit,d=r();return P(d.compressBackup(F.Backup.ID))}),c(33,42),T(34,"sh-icon"),s(),t(),o(35,"button",86),c(36,43),T(37,"sh-icon"),s(),t(),T(38,"sh-divider"),o(39,"h3",85),C(40,44),t(),o(41,"button",86),c(42,45),T(43,"sh-icon"),s(),t(),m(),t()}if(e&2){let n=i.$implicit,_=r();R("loader",_.startingBackup()===n.Backup.ID),a(3),p(_.viewMode()==="list"?3:-1),a(),E("routerLink",D(15,Fn,n.Backup.ID)),a(4),R("loader",_.loadingId()===n.Backup.ID)("success",_.successId()===n.Backup.ID),a(),p(_.successId()===n.Backup.ID?9:10),a(5),E("routerLink",D(17,Cn,n.Backup.ID)),a(3),E("routerLink",D(19,Tn,n.Backup.ID)),a(3),E("routerLink",D(21,En,n.Backup.ID)),a(6),E("routerLink",D(23,dn,n.Backup.ID)),a(9),E("routerLink",D(25,gn,n.Backup.ID)),a(6),E("routerLink",D(27,pn,n.Backup.ID))}}function st(e,i){e&1&&(o(0,"sh-icon",87),u(1,"funnel-simple"),t(),o(2,"sh-icon",88),u(3,"sort-ascending"),t(),o(4,"sh-icon",89),u(5,"sort-descending"),t())}var ut={file:{Display:$localize`Local`,Icon:null}},ne=class e{#n=v(en);#t=v(on);#e=v(tn);MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;timeType=this.#e.timeType;viewMode=nn("viewMode","list");sortByColumn=X(this.#e.orderBy());loadingId=X(null);successId=X(null);sortEffect=Be(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}setOrderBy(i){this.#e.setOrderBy(i)}setTimeType(i){this.#e.setTimeType(i)}startBackup(i){this.#t.resumeDialogCheck(()=>this.#e.startBackup(i))}getBackendIcon(i){return i?ee(i).icon??"database":""}getBackendType(i){if(!i)return"";let n=ee(i);if(!n)return"";let _=ut[n.key];if(_?.Display)return _.Display;if(n.key==="s3"){let F="http://null?"+i.split("?")[1],x=new URL(F).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[k,y]of Object.entries(_n))if(x.endsWith(k))return y}return n.displayName}getBackupVersionCount(i){return parseInt(i?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdVerify({id:i}).pipe(K(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdCompact({id:i}).pipe(K(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=be({type:e,selectors:[["app-home"]],decls:36,vars:6,consts:()=>{let i;i=$localize`Backups`;let n;n=$localize`Keep your data safe at your chosen destination.`;let _;_=$localize` Create ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let F;F=$localize`Restores`;let d;d=$localize`Recover your files from any backup set.`;let x;x=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let k;k=$localize`My backups`;let y;y=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let te;te=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let ie;ie=$localize` Time: ${"\uFFFD#11\uFFFD"}:START_TAG_STRONG:${"\uFFFD*12:1\uFFFD"}:START_BLOCK_IF: Relative ${"\uFFFD/*12:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*13:2\uFFFD"}:START_BLOCK_ELSE_IF: Actual ${"\uFFFD/*13:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*14:3\uFFFD"}:START_BLOCK_ELSE: ${"\uFFFD0:3\uFFFD"}:INTERPOLATION: ${"\uFFFD/*14:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let oe;oe=$localize`Relative time`;let _e;_e=$localize`Actual time`;let ae;ae=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let le;le=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let re;re=$localize`Last successful backup:`;let ce;ce=$localize`Duration:`;let se;se=$localize`Source:`;let ue;ue=$localize`Destination:`;let B;B=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,B=W(B,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Fe;Fe=$localize` ${B}:ICU@@6502601490918455200: `;let Ce;Ce=$localize`Next scheduled run:`;let Te;Te=$localize`Externally managed`;let Ee;Ee=$localize` No backups found ${"\uFFFD#2\uFFFD"}:START_TAG_BUTTON: Click to create one now ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_BUTTON:`;let de;de=$localize` Backup ${"\uFFFD*4:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*4:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let ge;ge=$localize` Type ${"\uFFFD*7:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*7:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let pe;pe=$localize` Last backup ${"\uFFFD*10:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*10:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Se;Se=$localize` Next run ${"\uFFFD*13:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*13:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Oe;Oe=$localize` Duration ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let me;me=$localize` Source ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ne;Ne=$localize` Destination ${"\uFFFD*22:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*22:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Me;Me=$localize`Version`;let Ie;Ie=$localize`Actions`;let b;b=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,b=W(b,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Pe;Pe=$localize` ${b}:ICU@@3521773141017690117: `;let fe;fe=$localize`Loading backups...`;let De;De=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let $e;$e=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let Re;Re=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let Ae;Ae=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let he;he=$localize`Advanced`;let Le;Le=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let He;He=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let Ge;Ge=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Compress now `;let xe;xe=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let ke;ke=$localize`Reporting`;let ye;return ye=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Log `,[["actions",""],["sortIcons",""],i,n,_,F,d,x,k,y,te,ie,oe,_e,ae,le,re,ce,se,ue,Fe,Ce,Te,Ee,de,ge,pe,Se,Oe,me,Ne,Me,Ie,Pe,fe,De,$e,Re,Ae,he,Le,He,Ge,xe,ke,ye,[1,"type-a","actionable",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","shButton",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small","type-b"],["type","button",3,"click"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups",3,"fallback"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backups"],[1,"no-backups"],[1,"backup"],["alt","",1,"provider-icon",3,"src"],[1,"tags"],[1,"simple","success"],[1,"simple","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["shButton","",1,"primary","raised",3,"routerLink"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["thead",""],["shSort","name"],[4,"ngTemplateOutlet"],["shSort","type"],["shSort","lastrun"],["shSort","nextrun"],["shSort","duration"],["shSort","sourcesize"],["shSort","destinationsize"],[1,"small"],[1,"loading-list"],[1,"indeterminate","primary"],["shButton","",3,"click"],["type","button","shButton","",3,"routerLink"],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,_){n&1&&(T(0,"app-status-bar"),o(1,"section")(2,"header")(3,"sh-card",46),T(4,"img",47),o(5,"div",48)(6,"h3"),C(7,2),t(),o(8,"p"),C(9,3),t()(),o(10,"button",49),c(11,4),T(12,"sh-icon"),s(),t()(),o(13,"sh-card",46),T(14,"img",50),o(15,"div",48)(16,"h3"),C(17,5),t(),o(18,"p"),C(19,6),t()(),o(20,"button",49),c(21,7),T(22,"sh-icon"),s(),t()()(),o(23,"div",51)(24,"h2"),O(25),C(26,8),m(),g(27,In,22,6,"div",52),t(),ve(28,ot,2,1)(29,_t,5,0),Xe(30,28,rn,null,29),t()(),N(32,ct,44,29,"ng-template",null,0,q)(34,st,6,0,"ng-template",null,1,q)),n&2&&(a(3),E("routerLink",U(4,cn)),a(10),E("routerLink",U(5,sn)),a(14),p(_.backups().length>0?27:-1),a(3),Je(!_.backupsLoading()))},dependencies:[Q,an,Ke,Z,Y,We,qe,Qe,Ue],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}sh-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}sh-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}sh-menu[_ngcontent-%COMP%]{color:red}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backups.fallback[_ngcontent-%COMP%]{justify-content:center;align-items:center;padding:4rem;border:1px solid var(--base-4);background:var(--base-2);border-radius:var(--shape-2);width:calc(100% - 4rem);margin:0 auto}.no-backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.backup[_ngcontent-%COMP%] .tags[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:.5rem}.provider-icon[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) sh-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] sh-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] sh-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}"],changeDetection:0})};export{ne as default};
1
+ import{b as ee,k as _n}from"./chunk-IW4RDAIN.js";import{a as an}from"./chunk-LWAB7LAV.js";import{a as on}from"./chunk-4SFVPIZK.js";import"./chunk-FOQJA6X2.js";import"./chunk-VHOAXFIJ.js";import{a as tn}from"./chunk-24YV42LW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-FK7JFD5B.js";import"./chunk-4ISX5VCL.js";import"./chunk-ME77WZZI.js";import"./chunk-5DJAX2HH.js";import{a as nn}from"./chunk-WVF3GRDZ.js";import"./chunk-JKQGCV6K.js";import"./chunk-DW332N2S.js";import"./chunk-GZ37Z4NG.js";import"./chunk-TELPJYLN.js";import"./chunk-4RKO4YFU.js";import{A as Ue,B as Z,C as Ke,E as je,G as We,K as qe,L as Qe,S as Ye,T as Ze,u as Y}from"./chunk-HPNLQHW6.js";import{c as en}from"./chunk-BGTK25UG.js";import{e as Q}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{$ as I,Ab as t,Bb as T,Cc as M,Dc as G,E as K,Ec as A,Fb as O,Gb as m,Gc as q,Hb as f,Ib as H,Ma as j,Pa as a,Pb as c,Qb as s,Rb as C,Sb as h,Tb as L,Ub as W,Vb as $,W as v,Xb as r,aa as P,cb as be,ec as V,gc as R,hb as N,ib as ve,jc as u,la as X,lc as S,na as Be,oc as we,pb as Xe,pc as ze,qb as Je,qc as Ve,sb as g,tb as p,ub as J,wb as w,xb as z,xc as U,yb as E,yc as D,zb as o}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var rn=()=>[Q,import("./chunk-6GC4UPHS.js").then(e=>e.NgTemplateOutlet),Z,Y,je,Ze,Ye,import("./chunk-2PAQOFN3.js").then(e=>e.DurationFormatPipe),import("./chunk-2XXH473G.js").then(e=>e.BytesPipe),import("./chunk-YDDSLDHZ.js").then(e=>e.RelativeTimePipe)],cn=()=>["/add-backup"],sn=()=>["/restore"],ln=e=>({$implicit:e}),un=()=>["/backup/new"],Fn=e=>["/backup",e],Cn=e=>["/restore",e],Tn=e=>["/backup",e,"export"],En=e=>["/backup",e,"delete"],dn=e=>["/backup",e,"database"],gn=e=>["/backup",e,"commandline"],pn=e=>["/backup",e,"log"];function Sn(e,i){e&1&&C(0,11,1)}function On(e,i){e&1&&C(0,11,2)}function mn(e,i){if(e&1&&C(0,11,3),e&2){let n=r(2);h(n.timeType()),L(0)}}function Nn(e,i){if(e&1){let n=H();o(0,"button",54),$("click",function(){let F=I(n).$implicit,d=r(3);return P(d.sortByColumn.set(F.value))}),C(1,15),t()}if(e&2){let n=i.$implicit,_=r(3);R("active",_.orderBy()===n.value),a(),h(n.label),L(1)}}function Mn(e,i){if(e&1&&(o(0,"sh-menu",55)(1,"button",56),c(2,14),T(3,"strong")(4,"sh-icon"),s(),t(),O(5,57),w(6,Nn,2,3,"button",58,J),m(),t()),e&2){let n=r(2);a(4),h(n.orderBy()),L(2),a(2),z(n.sortOrderOptions())}}function In(e,i){if(e&1){let n=H();o(0,"div",52)(1,"sh-button-group",53)(2,"button",54),$("click",function(){I(n);let F=r();return P(F.viewMode.set("list"))}),c(3,9),T(4,"sh-icon"),s(),t(),o(5,"button",54),$("click",function(){I(n);let F=r();return P(F.viewMode.set("details"))}),c(6,10),T(7,"sh-icon"),s(),t()(),o(8,"sh-menu",55)(9,"button",56),c(10,11),o(11,"strong"),g(12,Sn,1,0)(13,On,1,0)(14,mn,1,1),t(),T(15,"sh-icon"),s(),t(),O(16,57),o(17,"button",54),$("click",function(){I(n);let F=r();return P(F.setTimeType("relative"))}),C(18,12),t(),o(19,"button",54),$("click",function(){I(n);let F=r();return P(F.setTimeType("actual"))}),C(20,13),t(),m(),t(),g(21,Mn,8,1,"sh-menu",55),t()}if(e&2){let n=r();a(2),R("active",n.viewMode()==="list"),a(3),R("active",n.viewMode()==="details"),a(7),p(n.timeType()=="relative"?12:n.timeType()=="actual"?13:14),a(9),p(n.viewMode()==="list"?21:-1)}}function Pn(e,i){if(e&1&&(o(0,"p")(1,"span"),C(2,21),t(),u(3),M(4,"relativeTime"),t()),e&2){let n=r().$implicit,_=r(4);a(3),S(" ",A(4,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function fn(e,i){if(e&1&&(u(0),M(1,"durationFormat")),e&2){let n=r().$implicit,_=r(4);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function Dn(e,i){e&1&&(O(0),u(1,"-"),m())}function $n(e,i){if(e&1&&(u(0),M(1,"bytes")),e&2){let n=r().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Rn(e,i){e&1&&(O(0),u(1,"-"),m())}function An(e,i){if(e&1&&(u(0),M(1,"bytes")),e&2){let n=r().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function hn(e,i){e&1&&(O(0),u(1,"-"),m())}function Ln(e,i){e&1&&(o(0,"sh-chip",67),C(1,22),t())}function Hn(e,i){e&1&&f(0)}function Gn(e,i){if(e&1&&(o(0,"div",63)(1,"div",48)(2,"h3"),u(3),o(4,"sh-chip"),T(5,"img",64),u(6),t()(),o(7,"p")(8,"span"),C(9,16),t(),u(10),M(11,"relativeTime"),t(),g(12,Pn,5,4,"p"),o(13,"p")(14,"span"),C(15,17),t(),g(16,fn,2,4)(17,Dn,2,0,"ng-container"),t(),o(18,"p")(19,"span"),C(20,18),t(),g(21,$n,2,3)(22,Rn,2,0,"ng-container"),t(),o(23,"p")(24,"span"),C(25,19),t(),g(26,An,2,3)(27,hn,2,0,"ng-container"),t()(),o(28,"div",65)(29,"sh-chip",66),C(30,20),t(),g(31,Ln,2,0,"sh-chip",67),t(),o(32,"div",52),N(33,Hn,1,0,"ng-container",68),t()()),e&2){let n=i.$implicit,_=r(4),F=V(33);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),E("src",_.getBackendIcon(n.Backup.TargetURL),j),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(4),S(" ",A(11,13,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupFinished,_.timeType()==="actual")," "),a(2),p(!(n==null||n.Schedule==null)&&n.Schedule.Time?12:-1),a(4),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?16:17),a(5),p(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?21:22),a(5),p(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?26:27);let d=_.getBackupVersionCount(n);a(4),h(d)(d),L(30),a(),p(n.Backup.ExternalID?31:-1),a(2),E("ngTemplateOutlet",F)("ngTemplateOutletContext",D(16,ln,n))}}function xn(e,i){if(e&1&&w(0,Gn,34,18,"div",63,J),e&2){let n=r(3);z(n.backups())}}function kn(e,i){e&1&&(o(0,"div",62),c(1,23),o(2,"button",69),T(3,"sh-icon"),t(),s(),t()),e&2&&(a(2),E("routerLink",U(1,un)))}function yn(e,i){if(e&1&&(o(0,"div",61),g(1,xn,2,0)(2,kn,4,2,"div",62),t()),e&2){let n=r(2);R("fallback",n.backups().length===0),a(),p(n.backups().length?1:2)}}function Bn(e,i){e&1&&(c(0,24,1),f(1),s())}function bn(e,i){e&1&&(c(0,25,1),f(1),s())}function vn(e,i){e&1&&(c(0,26,1),f(1),s())}function Xn(e,i){e&1&&(c(0,27,1),f(1),s())}function Jn(e,i){e&1&&(c(0,28,1),f(1),s())}function wn(e,i){e&1&&(c(0,29,1),f(1),s())}function zn(e,i){e&1&&(c(0,30,1),f(1),s())}function Vn(e,i){if(e&1&&(u(0),M(1,"relativeTime")),e&2){let n=r().$implicit,_=r(3);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,_.timeType()==="actual")," ")}}function Un(e,i){e&1&&(O(0),u(1,"-"),m())}function Kn(e,i){if(e&1&&(u(0),M(1,"relativeTime")),e&2){let n=r().$implicit,_=r(3);S(" ",A(1,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function jn(e,i){e&1&&(O(0),u(1,"-"),m())}function Wn(e,i){if(e&1&&(u(0),M(1,"durationFormat")),e&2){let n=r().$implicit,_=r(3);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function qn(e,i){e&1&&(O(0),u(1,"-"),m())}function Qn(e,i){if(e&1&&(u(0),M(1,"bytes")),e&2){let n=r().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Yn(e,i){e&1&&(O(0),u(1,"-"),m())}function Zn(e,i){if(e&1&&(u(0),M(1,"bytes")),e&2){let n=r().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function et(e,i){e&1&&(O(0),u(1,"-"),m())}function nt(e,i){e&1&&f(0)}function tt(e,i){if(e&1&&(o(0,"tr")(1,"td"),u(2),t(),o(3,"td")(4,"sh-chip",80),T(5,"img",64),u(6),t()(),o(7,"td"),g(8,Vn,2,4)(9,Un,2,0,"ng-container"),t(),o(10,"td"),g(11,Kn,2,4)(12,jn,2,0,"ng-container"),t(),o(13,"td"),g(14,Wn,2,4)(15,qn,2,0,"ng-container"),t(),o(16,"td"),g(17,Qn,2,3)(18,Yn,2,0,"ng-container"),t(),o(19,"td"),g(20,Zn,2,3)(21,et,2,0,"ng-container"),t(),o(22,"td")(23,"span"),C(24,33),t()(),o(25,"td"),N(26,nt,1,0,"ng-container",68),t()()),e&2){let n=i.$implicit,_=r(3),F=V(33);a(2),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(3),E("src",_.getBackendIcon(n.Backup.TargetURL),j),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(2),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDate?8:9),a(3),p(!(n==null||n.Schedule==null)&&n.Schedule.Time?11:12),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?14:15),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?17:18),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?20:21);let d=_.getBackupVersionCount(n);a(4),h(d)(d),L(24),a(2),E("ngTemplateOutlet",F)("ngTemplateOutletContext",D(12,ln,n))}}function it(e,i){if(e&1){let n=H();o(0,"sh-table",70),Ve("sortByColumnChange",function(F){I(n);let d=r(2);return ze(d.sortByColumn,F)||(d.sortByColumn=F),P(F)}),o(1,"tr",71)(2,"th",72),c(3,24),N(4,Bn,2,0,"ng-container",73),s(),t(),o(5,"th",74),c(6,25),N(7,bn,2,0,"ng-container",73),s(),t(),o(8,"th",75),c(9,26),N(10,vn,2,0,"ng-container",73),s(),t(),o(11,"th",76),c(12,27),N(13,Xn,2,0,"ng-container",73),s(),t(),o(14,"th",77),c(15,28),N(16,Jn,2,0,"ng-container",73),s(),t(),o(17,"th",78),c(18,29),N(19,wn,2,0,"ng-container",73),s(),t(),o(20,"th",79),c(21,30),N(22,zn,2,0,"ng-container",73),s(),t(),o(23,"th"),C(24,31),t(),o(25,"th"),C(26,32),t()(),w(27,tt,27,14,"tr",null,J),t()}if(e&2){let n=r(2),_=V(35);E("data",n.backups())("loading",n.backupsLoading()),we("sortByColumn",n.sortByColumn),a(4),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(5),z(n.backups())}}function ot(e,i){if(e&1&&g(0,yn,3,3,"div",59)(1,it,29,10,"sh-table",60),e&2){let n=r();p(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1)}}function _t(e,i){e&1&&(o(0,"div",81),T(1,"sh-progress-bar",82),o(2,"div",48)(3,"h3"),C(4,34),t()()())}function at(e,i){e&1&&C(0,35,1)}function lt(e,i){e&1&&(o(0,"sh-icon"),u(1,"check"),t())}function rt(e,i){e&1&&(o(0,"sh-icon"),u(1,"dots-three-vertical"),t())}function ct(e,i){if(e&1){let n=H();o(0,"button",83),$("click",function(){let F=I(n).$implicit,d=r();return P(d.startBackup(F.Backup.ID))}),c(1,35),T(2,"sh-icon"),g(3,at,1,0),s(),t(),o(4,"button",84)(5,"sh-icon"),u(6,"pencil-simple"),t()(),o(7,"sh-menu")(8,"button",49),g(9,lt,2,0,"sh-icon")(10,rt,2,0,"sh-icon"),t(),O(11,57),o(12,"h3",85),u(13,"Operations"),t(),o(14,"button",86),c(15,36),T(16,"sh-icon"),s(),t(),o(17,"button",86),c(18,37),T(19,"sh-icon"),s(),t(),o(20,"button",86),c(21,38),T(22,"sh-icon"),s(),t(),T(23,"sh-divider"),o(24,"h3",85),C(25,39),t(),o(26,"button",86),c(27,40),T(28,"sh-icon"),s(),t(),o(29,"button",54),$("click",function(){let F=I(n).$implicit,d=r();return P(d.verifyFiles(F.Backup.ID))}),c(30,41),T(31,"sh-icon"),s(),t(),o(32,"button",54),$("click",function(){let F=I(n).$implicit,d=r();return P(d.compressBackup(F.Backup.ID))}),c(33,42),T(34,"sh-icon"),s(),t(),o(35,"button",86),c(36,43),T(37,"sh-icon"),s(),t(),T(38,"sh-divider"),o(39,"h3",85),C(40,44),t(),o(41,"button",86),c(42,45),T(43,"sh-icon"),s(),t(),m(),t()}if(e&2){let n=i.$implicit,_=r();R("loader",_.startingBackup()===n.Backup.ID),a(3),p(_.viewMode()==="list"?3:-1),a(),E("routerLink",D(15,Fn,n.Backup.ID)),a(4),R("loader",_.loadingId()===n.Backup.ID)("success",_.successId()===n.Backup.ID),a(),p(_.successId()===n.Backup.ID?9:10),a(5),E("routerLink",D(17,Cn,n.Backup.ID)),a(3),E("routerLink",D(19,Tn,n.Backup.ID)),a(3),E("routerLink",D(21,En,n.Backup.ID)),a(6),E("routerLink",D(23,dn,n.Backup.ID)),a(9),E("routerLink",D(25,gn,n.Backup.ID)),a(6),E("routerLink",D(27,pn,n.Backup.ID))}}function st(e,i){e&1&&(o(0,"sh-icon",87),u(1,"funnel-simple"),t(),o(2,"sh-icon",88),u(3,"sort-ascending"),t(),o(4,"sh-icon",89),u(5,"sort-descending"),t())}var ut={file:{Display:$localize`Local`,Icon:null}},ne=class e{#n=v(en);#t=v(on);#e=v(tn);MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;timeType=this.#e.timeType;viewMode=nn("viewMode","list");sortByColumn=X(this.#e.orderBy());loadingId=X(null);successId=X(null);sortEffect=Be(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}setOrderBy(i){this.#e.setOrderBy(i)}setTimeType(i){this.#e.setTimeType(i)}startBackup(i){this.#t.resumeDialogCheck(()=>this.#e.startBackup(i))}getBackendIcon(i){return i?ee(i).icon??"database":""}getBackendType(i){if(!i)return"";let n=ee(i);if(!n)return"";let _=ut[n.key];if(_?.Display)return _.Display;if(n.key==="s3"){let F="http://null?"+i.split("?")[1],x=new URL(F).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[k,y]of Object.entries(_n))if(x.endsWith(k))return y}return n.displayName}getBackupVersionCount(i){return parseInt(i?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdVerify({id:i}).pipe(K(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdCompact({id:i}).pipe(K(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=be({type:e,selectors:[["app-home"]],decls:36,vars:6,consts:()=>{let i;i=$localize`Backups`;let n;n=$localize`Keep your data safe at your chosen destination.`;let _;_=$localize` Create ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let F;F=$localize`Restores`;let d;d=$localize`Recover your files from any backup set.`;let x;x=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let k;k=$localize`My backups`;let y;y=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let te;te=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let ie;ie=$localize` Time: ${"\uFFFD#11\uFFFD"}:START_TAG_STRONG:${"\uFFFD*12:1\uFFFD"}:START_BLOCK_IF: Relative ${"\uFFFD/*12:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*13:2\uFFFD"}:START_BLOCK_ELSE_IF: Actual ${"\uFFFD/*13:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*14:3\uFFFD"}:START_BLOCK_ELSE: ${"\uFFFD0:3\uFFFD"}:INTERPOLATION: ${"\uFFFD/*14:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let oe;oe=$localize`Relative time`;let _e;_e=$localize`Actual time`;let ae;ae=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let le;le=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let re;re=$localize`Last successful backup:`;let ce;ce=$localize`Duration:`;let se;se=$localize`Source:`;let ue;ue=$localize`Destination:`;let B;B=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,B=W(B,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Fe;Fe=$localize` ${B}:ICU@@6502601490918455200: `;let Ce;Ce=$localize`Next scheduled run:`;let Te;Te=$localize`Externally managed`;let Ee;Ee=$localize` No backups found ${"\uFFFD#2\uFFFD"}:START_TAG_BUTTON: Click to create one now ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_BUTTON:`;let de;de=$localize` Backup ${"\uFFFD*4:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*4:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let ge;ge=$localize` Type ${"\uFFFD*7:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*7:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let pe;pe=$localize` Last backup ${"\uFFFD*10:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*10:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Se;Se=$localize` Next run ${"\uFFFD*13:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*13:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Oe;Oe=$localize` Duration ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let me;me=$localize` Source ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ne;Ne=$localize` Destination ${"\uFFFD*22:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*22:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Me;Me=$localize`Version`;let Ie;Ie=$localize`Actions`;let b;b=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,b=W(b,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Pe;Pe=$localize` ${b}:ICU@@3521773141017690117: `;let fe;fe=$localize`Loading backups...`;let De;De=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let $e;$e=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let Re;Re=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let Ae;Ae=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let he;he=$localize`Advanced`;let Le;Le=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let He;He=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let Ge;Ge=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Compress now `;let xe;xe=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let ke;ke=$localize`Reporting`;let ye;return ye=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Log `,[["actions",""],["sortIcons",""],i,n,_,F,d,x,k,y,te,ie,oe,_e,ae,le,re,ce,se,ue,Fe,Ce,Te,Ee,de,ge,pe,Se,Oe,me,Ne,Me,Ie,Pe,fe,De,$e,Re,Ae,he,Le,He,Ge,xe,ke,ye,[1,"type-a","actionable",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","shButton",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small","type-b"],["type","button",3,"click"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups",3,"fallback"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backups"],[1,"no-backups"],[1,"backup"],["alt","",1,"provider-icon",3,"src"],[1,"tags"],[1,"simple","success"],[1,"simple","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["shButton","",1,"primary","raised",3,"routerLink"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["thead",""],["shSort","name"],[4,"ngTemplateOutlet"],["shSort","type"],["shSort","lastrun"],["shSort","nextrun"],["shSort","duration"],["shSort","sourcesize"],["shSort","destinationsize"],[1,"small"],[1,"loading-list"],[1,"indeterminate","primary"],["shButton","",3,"click"],["type","button","shButton","",3,"routerLink"],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,_){n&1&&(T(0,"app-status-bar"),o(1,"section")(2,"header")(3,"sh-card",46),T(4,"img",47),o(5,"div",48)(6,"h3"),C(7,2),t(),o(8,"p"),C(9,3),t()(),o(10,"button",49),c(11,4),T(12,"sh-icon"),s(),t()(),o(13,"sh-card",46),T(14,"img",50),o(15,"div",48)(16,"h3"),C(17,5),t(),o(18,"p"),C(19,6),t()(),o(20,"button",49),c(21,7),T(22,"sh-icon"),s(),t()()(),o(23,"div",51)(24,"h2"),O(25),C(26,8),m(),g(27,In,22,6,"div",52),t(),ve(28,ot,2,1)(29,_t,5,0),Xe(30,28,rn,null,29),t()(),N(32,ct,44,29,"ng-template",null,0,q)(34,st,6,0,"ng-template",null,1,q)),n&2&&(a(3),E("routerLink",U(4,cn)),a(10),E("routerLink",U(5,sn)),a(14),p(_.backups().length>0?27:-1),a(3),Je(!_.backupsLoading()))},dependencies:[Q,an,Ke,Z,Y,We,qe,Qe,Ue],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}sh-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}sh-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}sh-menu[_ngcontent-%COMP%]{color:red}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backups.fallback[_ngcontent-%COMP%]{justify-content:center;align-items:center;padding:4rem;border:1px solid var(--base-4);background:var(--base-2);border-radius:var(--shape-2);width:calc(100% - 4rem);margin:0 auto}.no-backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.backup[_ngcontent-%COMP%] .tags[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:.5rem}.provider-icon[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) sh-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] sh-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] sh-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}"],changeDetection:0})};export{ne as default};
@@ -1 +1 @@
1
- import{a as De,b as he,d as Oe,e as fe}from"./chunk-HWOYZETB.js";import"./chunk-AS6Z56AD.js";import{b as Ee,c as Ie}from"./chunk-IW4RDAIN.js";import{j as me}from"./chunk-KJSWAB4L.js";import"./chunk-O4OTZE5N.js";import"./chunk-WIVARGP6.js";import"./chunk-MHRECQ5Y.js";import"./chunk-6Q6SSTBK.js";import"./chunk-D4HZWDZW.js";import"./chunk-ME77WZZI.js";import{a as D}from"./chunk-5DJAX2HH.js";import"./chunk-35FSXDVX.js";import"./chunk-DW332N2S.js";import"./chunk-YJLLDDPP.js";import"./chunk-TELPJYLN.js";import"./chunk-4RKO4YFU.js";import{B as Se,H as Ne,K as pe,c as ae,e as se,f as re,g as le,i as _e,j as ce,r as Te,s as ue,u as ge,w as de,y as Fe,z as Ce}from"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import{b as ie,d as oe}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{$ as T,Ab as r,Bb as F,Fb as Q,Gb as Y,Ib as p,Mc as U,Pa as _,Pb as g,Qb as d,Rb as E,Sb as R,Sc as ne,Tb as y,Ub as q,Vb as N,W as I,Xb as l,aa as u,cb as j,cc as Z,da as W,dc as ee,jc as L,la as O,oc as f,pc as A,qc as P,rc as x,sb as C,sc as G,tb as S,tc as M,xc as te,yb as m,zb as s}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var Ae=["formRef"],Pe=()=>({maxWidth:"700px",width:"100%"});function Me(t,n){t&1&&E(0,4,1)}function $e(t,n){t&1&&E(0,4,2)}function Re(t,n){if(t&1){let e=p();s(0,"button",35),N("click",function(){T(e);let o=l();return u(o.testDestination(0,!0))}),g(1,4),C(2,Me,1,0)(3,$e,1,0),d(),r()}if(t&2){let e=l();m("disabled",e.testSignal()=="testing"),_(2),S(e.testSignal()=="testing"?2:3)}}function ye(t,n){if(t&1){let e=p();s(0,"button",36),N("click",function(){T(e);let o=l();return u(o.openTargetUrlDialog())}),g(1,5),F(2,"sh-icon"),d(),r()}}function Le(t,n){if(t&1){let e=p();s(0,"button",36),N("click",function(){T(e);let o=l(2);return u(o.copyTargetUrl())}),g(1,7),F(2,"sh-icon"),d(),r()}}function xe(t,n){if(t&1){let e=p();s(0,"sh-menu")(1,"button",24)(2,"sh-icon"),L(3,"dots-three-vertical"),r()(),Q(4,37),s(5,"button",36),N("click",function(){T(e);let o=l();return u(o.openTargetUrlDialog())}),g(6,6),F(7,"sh-icon"),d(),r(),C(8,Le,3,0,"button",24),Y(),r()}if(t&2){l();let e=M(0);_(8),S(e?8:-1)}}function Ge(t,n){t&1&&(s(0,"sh-alert"),g(1,8),F(2,"sh-icon",38),d(),r())}function Ue(t,n){t&1&&(s(0,"sh-alert",25),g(1,9),F(2,"sh-icon",38),d(),r())}function we(t,n){if(t&1&&(s(0,"sh-alert",26),g(1,10),F(2,"sh-icon",38),d(),r()),t&2){let e=l();_(2),R(e.testErrorMessage()),y(1)}}function Be(t,n){if(t&1&&(s(0,"sh-alert",27),g(1,11),F(2,"sh-icon",38),d(),r()),t&2){let e=l();_(2),R(e.testErrorMessage()),y(1)}}function be(t,n){if(t&1){let e=p();s(0,"app-destination-list-item",28)(1,"button",31),N("click",function(){T(e);let o=l();return u(o.removeDestination())}),E(2,12),r()()}if(t&2){l();let e=M(18);m("destination",e)}}function ke(t,n){if(t&1){let e=p();s(0,"app-destination-list",39),N("setDestination",function(o){T(e);let a=l();return u(a.setDestination(o))}),r()}}function ve(t,n){if(t&1){let e=p();s(0,"app-single-destination",40),P("targetUrlChange",function(o){T(e);let a=l();return A(a.targetUrlModel,o)||(a.targetUrlModel=o),u(o)}),r()}if(t&2){let e=l();f("targetUrl",e.targetUrlModel),m("useBackupState",!0)}}function Ke(t,n){t&1&&(g(0,3,1),F(1,"sh-icon",33),d())}function Ve(t,n){t&1&&(g(0,3,2),F(1,"sh-icon"),d())}function ze(t,n){t&1&&(s(0,"h2"),E(1,15),r())}function Je(t,n){t&1&&(s(0,"h2"),E(1,16),r())}function Xe(t,n){if(t&1){let e=p();s(0,"sh-dialog",41),P("isOpenChange",function(o){T(e);let a=l();return A(a.targetUrlDialogOpen,o)||(a.targetUrlDialogOpen=o),u(o)}),s(1,"header",42)(2,"div",43),C(3,ze,2,0,"h2")(4,Je,2,0,"h2"),s(5,"sh-alert",26),E(6,13),r()()(),s(7,"div",44)(8,"sh-form-field")(9,"textarea",45),P("ngModelChange",function(o){T(e);let a=l();return A(a.targetUrlCtrl,o)||(a.targetUrlCtrl=o),u(o)}),r()()(),s(10,"footer",46)(11,"button",31),N("click",function(){T(e);let o=l();return u(o.closeTargetUrlDialog(!1))}),L(12,"Cancel"),r(),s(13,"button",47),N("click",function(){T(e);let o=l();return u(o.closeTargetUrlDialog(!0))}),g(14,14),F(15,"sh-icon"),d(),r()()()}if(t&2){let e=l(),i=M(0);f("isOpen",e.targetUrlDialogOpen),m("options",te(4,Pe)),_(3),S(i?4:3),_(6),f("ngModel",e.targetUrlCtrl)}}var $=new Te,Tt=(t={destinations:[]})=>$.group({destinations:$.array(t.destinations)}),ut=({key:t,customGroup:n,dynamicGroup:e,advancedGroup:i})=>$.group({destinationType:$.control(t),custom:n,dynamic:e,advanced:i}),w=class t{#i=I(oe);#o=I(ie);#e=I(me);#t=I(Ce);#a=I(De);injector=I(W);formRef=ne.required("formRef");targetUrlModel=this.#e.targetUrlModel;targetUrlCtrl=O(null);targetUrlInitial=O(null);targetUrlDialogOpen=O(!1);toggleNewDestination=O(!0);testSignal=this.#e.testSignal;testErrorMessage=this.#e.testErrorMessage;selectedDestinationType=U(()=>{let n=this.targetUrlModel();return n?Ee(n)??null:null});selectedDestinationTypeOption=U(()=>{let n=this.selectedDestinationType();return n?{key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description,icon:n.icon}:null});copyTargetUrl(){navigator.clipboard.writeText(this.targetUrlModel()??"")}openTargetUrlDialog(){let n=this.targetUrlModel();this.targetUrlCtrl.set(n),this.targetUrlInitial.set(n),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl(),i=this.targetUrlInitial();!n||e===i||!e||this.#e.setTargetUrl(e)}testDestination(n,e,i){let o=this.targetUrlModel();o&&(this.#e.setTestState("testing"),this.#a.testDestination(o,this.#e.backupId(),n,!0,!0).subscribe({next:a=>{if(a.action==="success"){this.#e.setTestState("success"),this.#e.isNew()&&(a.containsBackup===!0?(this.#e.setTestState("warning",$localize`The remote destination already contains a backup. Please use a different folder for each backup.`),e||this.#t.open(D,{data:{title:$localize`Folder contains backup`,message:$localize`The remote destination already contains a backup. You must use a different folder for each backup.`,confirmText:$localize`OK`,cancelText:void 0}})):a.anyFilesFound===!0&&(this.#e.setTestState("warning",$localize`The remote destination contains unknown files.`),e||this.#t.open(D,{data:{title:$localize`Folder is not empty`,message:$localize`The remote destination is not empty. It is recommended to use an empty folder for the backup.`,confirmText:$localize`OK`,cancelText:void 0}}))),i?.();return}if(this.#e.setTestState("error",a.errorMessage??$localize`An error occurred while testing the destination.`),a.action==="generic-error"){i?.();return}let h=o.includes("?");a.action==="trust-cert"&&this.#e.setTargetUrl(o+`${h?"&":"?"}accept-specified-ssl-hash=${a.certData}`),a.action==="approve-host-key"&&this.#e.setTargetUrl(o+`${h?"&":"?"}ssh-fingerprint=${a.reportedHostKey}`),a.testAgain?this.testDestination(a.destinationIndex,e):i?.()}}))}setDestination(n){let e=Ie(n??"");if(e){if(e.mapper.default){let i=e.mapper.default(this.#e.backupName()??"");this.#e.setTargetUrl(i,!0);return}this.#e.setTargetUrl(`${n}://`,!0)}}removeDestination(){this.#e.setTargetUrl(null,!0)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let n=this.#e.isNew(),e=this.testSignal();if(!n){this.#n();return}if(e===""){this.#t.open(D,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:i=>{i?this.testDestination(0,!1,()=>{this.testSignal()==="success"?this.#n():this.#t.open(D,{data:{title:$localize`Test did not succeed`,message:this.testErrorMessage()??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#n()}});return}if(e!=="success"){this.#t.open(D,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:i=>{i&&this.#n()}});return}this.#n()}#n(){this.#e.isNew()||this.#e.submit(!0),this.#i.navigate(["source-data"],{relativeTo:this.#o.parent})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=j({type:t,selectors:[["app-destination"]],viewQuery:function(e,i){e&1&&Z(i.formRef,Ae,5),e&2&&ee()},decls:31,vars:11,consts:()=>{let n;n=$localize`Backup destination`;let e;e=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let i;i=$localize`${"\uFFFD*28:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*28:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*29:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*29:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,i=q(i);let o;o=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF: Testing... ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Set target URL `;let h;h=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let B;B=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let b;b=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Testing connection... `;let k;k=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Connection tested successfully. `;let v;v=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let K;K=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let V;V=$localize`Change`;let z;z=$localize`Be careful, this will overwrite everything you have in your destination.`;let J;J=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let X;X=$localize`Set target URL`;let H;return H=$localize`Edit target URL`,[["formRef",""],n,e,i,o,a,h,B,b,k,v,K,V,z,J,X,H,["autocomplete","off",3,"submit"],[2,"position","absolute","left","-9999px","width","1px","height","1px","overflow","hidden"],["type","text","name","fake_email","tabindex","-1"],["type","password","name","fake_password","tabindex","-1"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small",3,"disabled"],["shButton","","type","button",1,"small"],[1,"success"],[1,"warn"],[1,"error"],[1,"current-destination",3,"destination"],[3,"targetUrl","useBackupState"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click","disabled"],["shButton","","type","button",1,"small",3,"click"],["menu",""],["icon",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl","useBackupState"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,i){if(e&1){let o=p();x(0),s(1,"form",17,0),N("submit",function(){return T(o),u(i.next())}),s(3,"div",18),F(4,"input",19)(5,"input",20),r(),s(6,"header")(7,"h3",21)(8,"span"),E(9,1),r(),s(10,"div",22),C(11,Re,4,2,"button",23),C(12,ye,3,0,"button",24)(13,xe,9,1,"sh-menu"),r()(),C(14,Ge,3,0,"sh-alert")(15,Ue,3,0,"sh-alert",25)(16,we,3,1,"sh-alert",26)(17,Be,3,1,"sh-alert",27),x(18),C(19,be,3,1,"app-destination-list-item",28),r(),C(20,ke,1,0,"app-destination-list"),C(21,ve,1,2,"app-single-destination",29),s(22,"div",30)(23,"button",31),N("click",function(){return T(o),u(i.goBack())}),g(24,2),F(25,"sh-icon"),d(),r(),s(26,"button",32),g(27,3),C(28,Ke,2,0,"sh-icon",33)(29,Ve,2,0,"sh-icon"),d(),r()()(),C(30,Xe,16,5,"sh-dialog",34)}if(e&2){let o=G(!!i.targetUrlModel());_(11),S(o?11:-1),_(),S(o?13:12),_(2),S(i.testSignal()=="testing"?14:i.testSignal()=="success"?15:i.testSignal()=="warning"?16:i.testSignal()=="error"?17:-1),_(4);let a=G(i.selectedDestinationTypeOption());_(),S(a?19:-1),_(),S(o?-1:20),_(),S(o?21:-1),_(5),m("disabled",i.testSignal()=="testing"||!o),_(2),S(i.testSignal()=="testing"?28:29),_(2),S(i.targetUrlDialogOpen()?30:-1)}},dependencies:[fe,Oe,he,ue,ce,ae,se,re,_e,le,Se,Ne,pe,ge,Fe,de],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem;padding:2.5rem 2.5rem 0}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;height:100%;padding:0 0 2.5rem}.current-destination[_ngcontent-%COMP%]{margin:1rem 0 0}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}"],changeDetection:0})};export{Tt as createDestinationForm,ut as createDestinationFormGroup,w as default};
1
+ import{a as De,b as he,d as Oe,e as fe}from"./chunk-EMGRBH26.js";import"./chunk-AS6Z56AD.js";import{b as Ee,c as Ie}from"./chunk-IW4RDAIN.js";import{j as me}from"./chunk-CDM6ZLJ2.js";import"./chunk-O4OTZE5N.js";import"./chunk-WIVARGP6.js";import"./chunk-MHRECQ5Y.js";import"./chunk-6Q6SSTBK.js";import"./chunk-4ISX5VCL.js";import"./chunk-ME77WZZI.js";import{a as D}from"./chunk-5DJAX2HH.js";import"./chunk-JKQGCV6K.js";import"./chunk-DW332N2S.js";import"./chunk-GZ37Z4NG.js";import"./chunk-TELPJYLN.js";import"./chunk-4RKO4YFU.js";import{B as Se,H as Ne,K as pe,c as ae,e as se,f as re,g as le,i as _e,j as ce,r as Te,s as ue,u as ge,w as de,y as Fe,z as Ce}from"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import{b as ie,d as oe}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{$ as T,Ab as r,Bb as F,Fb as Q,Gb as Y,Ib as p,Mc as U,Pa as _,Pb as g,Qb as d,Rb as E,Sb as R,Sc as ne,Tb as y,Ub as q,Vb as N,W as I,Xb as l,aa as u,cb as j,cc as Z,da as W,dc as ee,jc as L,la as O,oc as f,pc as A,qc as P,rc as x,sb as C,sc as G,tb as S,tc as M,xc as te,yb as m,zb as s}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var Ae=["formRef"],Pe=()=>({maxWidth:"700px",width:"100%"});function Me(t,n){t&1&&E(0,4,1)}function $e(t,n){t&1&&E(0,4,2)}function Re(t,n){if(t&1){let e=p();s(0,"button",35),N("click",function(){T(e);let o=l();return u(o.testDestination(0,!0))}),g(1,4),C(2,Me,1,0)(3,$e,1,0),d(),r()}if(t&2){let e=l();m("disabled",e.testSignal()=="testing"),_(2),S(e.testSignal()=="testing"?2:3)}}function ye(t,n){if(t&1){let e=p();s(0,"button",36),N("click",function(){T(e);let o=l();return u(o.openTargetUrlDialog())}),g(1,5),F(2,"sh-icon"),d(),r()}}function Le(t,n){if(t&1){let e=p();s(0,"button",36),N("click",function(){T(e);let o=l(2);return u(o.copyTargetUrl())}),g(1,7),F(2,"sh-icon"),d(),r()}}function xe(t,n){if(t&1){let e=p();s(0,"sh-menu")(1,"button",24)(2,"sh-icon"),L(3,"dots-three-vertical"),r()(),Q(4,37),s(5,"button",36),N("click",function(){T(e);let o=l();return u(o.openTargetUrlDialog())}),g(6,6),F(7,"sh-icon"),d(),r(),C(8,Le,3,0,"button",24),Y(),r()}if(t&2){l();let e=M(0);_(8),S(e?8:-1)}}function Ge(t,n){t&1&&(s(0,"sh-alert"),g(1,8),F(2,"sh-icon",38),d(),r())}function Ue(t,n){t&1&&(s(0,"sh-alert",25),g(1,9),F(2,"sh-icon",38),d(),r())}function we(t,n){if(t&1&&(s(0,"sh-alert",26),g(1,10),F(2,"sh-icon",38),d(),r()),t&2){let e=l();_(2),R(e.testErrorMessage()),y(1)}}function Be(t,n){if(t&1&&(s(0,"sh-alert",27),g(1,11),F(2,"sh-icon",38),d(),r()),t&2){let e=l();_(2),R(e.testErrorMessage()),y(1)}}function be(t,n){if(t&1){let e=p();s(0,"app-destination-list-item",28)(1,"button",31),N("click",function(){T(e);let o=l();return u(o.removeDestination())}),E(2,12),r()()}if(t&2){l();let e=M(18);m("destination",e)}}function ke(t,n){if(t&1){let e=p();s(0,"app-destination-list",39),N("setDestination",function(o){T(e);let a=l();return u(a.setDestination(o))}),r()}}function ve(t,n){if(t&1){let e=p();s(0,"app-single-destination",40),P("targetUrlChange",function(o){T(e);let a=l();return A(a.targetUrlModel,o)||(a.targetUrlModel=o),u(o)}),r()}if(t&2){let e=l();f("targetUrl",e.targetUrlModel),m("useBackupState",!0)}}function Ke(t,n){t&1&&(g(0,3,1),F(1,"sh-icon",33),d())}function Ve(t,n){t&1&&(g(0,3,2),F(1,"sh-icon"),d())}function ze(t,n){t&1&&(s(0,"h2"),E(1,15),r())}function Je(t,n){t&1&&(s(0,"h2"),E(1,16),r())}function Xe(t,n){if(t&1){let e=p();s(0,"sh-dialog",41),P("isOpenChange",function(o){T(e);let a=l();return A(a.targetUrlDialogOpen,o)||(a.targetUrlDialogOpen=o),u(o)}),s(1,"header",42)(2,"div",43),C(3,ze,2,0,"h2")(4,Je,2,0,"h2"),s(5,"sh-alert",26),E(6,13),r()()(),s(7,"div",44)(8,"sh-form-field")(9,"textarea",45),P("ngModelChange",function(o){T(e);let a=l();return A(a.targetUrlCtrl,o)||(a.targetUrlCtrl=o),u(o)}),r()()(),s(10,"footer",46)(11,"button",31),N("click",function(){T(e);let o=l();return u(o.closeTargetUrlDialog(!1))}),L(12,"Cancel"),r(),s(13,"button",47),N("click",function(){T(e);let o=l();return u(o.closeTargetUrlDialog(!0))}),g(14,14),F(15,"sh-icon"),d(),r()()()}if(t&2){let e=l(),i=M(0);f("isOpen",e.targetUrlDialogOpen),m("options",te(4,Pe)),_(3),S(i?4:3),_(6),f("ngModel",e.targetUrlCtrl)}}var $=new Te,Tt=(t={destinations:[]})=>$.group({destinations:$.array(t.destinations)}),ut=({key:t,customGroup:n,dynamicGroup:e,advancedGroup:i})=>$.group({destinationType:$.control(t),custom:n,dynamic:e,advanced:i}),w=class t{#i=I(oe);#o=I(ie);#e=I(me);#t=I(Ce);#a=I(De);injector=I(W);formRef=ne.required("formRef");targetUrlModel=this.#e.targetUrlModel;targetUrlCtrl=O(null);targetUrlInitial=O(null);targetUrlDialogOpen=O(!1);toggleNewDestination=O(!0);testSignal=this.#e.testSignal;testErrorMessage=this.#e.testErrorMessage;selectedDestinationType=U(()=>{let n=this.targetUrlModel();return n?Ee(n)??null:null});selectedDestinationTypeOption=U(()=>{let n=this.selectedDestinationType();return n?{key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description,icon:n.icon}:null});copyTargetUrl(){navigator.clipboard.writeText(this.targetUrlModel()??"")}openTargetUrlDialog(){let n=this.targetUrlModel();this.targetUrlCtrl.set(n),this.targetUrlInitial.set(n),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl(),i=this.targetUrlInitial();!n||e===i||!e||this.#e.setTargetUrl(e)}testDestination(n,e,i){let o=this.targetUrlModel();o&&(this.#e.setTestState("testing"),this.#a.testDestination(o,this.#e.backupId(),n,!0,!0).subscribe({next:a=>{if(a.action==="success"){this.#e.setTestState("success"),this.#e.isNew()&&(a.containsBackup===!0?(this.#e.setTestState("warning",$localize`The remote destination already contains a backup. Please use a different folder for each backup.`),e||this.#t.open(D,{data:{title:$localize`Folder contains backup`,message:$localize`The remote destination already contains a backup. You must use a different folder for each backup.`,confirmText:$localize`OK`,cancelText:void 0}})):a.anyFilesFound===!0&&(this.#e.setTestState("warning",$localize`The remote destination contains unknown files.`),e||this.#t.open(D,{data:{title:$localize`Folder is not empty`,message:$localize`The remote destination is not empty. It is recommended to use an empty folder for the backup.`,confirmText:$localize`OK`,cancelText:void 0}}))),i?.();return}if(this.#e.setTestState("error",a.errorMessage??$localize`An error occurred while testing the destination.`),a.action==="generic-error"){i?.();return}let h=o.includes("?");a.action==="trust-cert"&&this.#e.setTargetUrl(o+`${h?"&":"?"}accept-specified-ssl-hash=${a.certData}`),a.action==="approve-host-key"&&this.#e.setTargetUrl(o+`${h?"&":"?"}ssh-fingerprint=${a.reportedHostKey}`),a.testAgain?this.testDestination(a.destinationIndex,e):i?.()}}))}setDestination(n){let e=Ie(n??"");if(e){if(e.mapper.default){let i=e.mapper.default(this.#e.backupName()??"");this.#e.setTargetUrl(i,!0);return}this.#e.setTargetUrl(`${n}://`,!0)}}removeDestination(){this.#e.setTargetUrl(null,!0)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let n=this.#e.isNew(),e=this.testSignal();if(!n){this.#n();return}if(e===""){this.#t.open(D,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:i=>{i?this.testDestination(0,!1,()=>{this.testSignal()==="success"?this.#n():this.#t.open(D,{data:{title:$localize`Test did not succeed`,message:this.testErrorMessage()??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#n()}});return}if(e!=="success"){this.#t.open(D,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:i=>{i&&this.#n()}});return}this.#n()}#n(){this.#e.isNew()||this.#e.submit(!0),this.#i.navigate(["source-data"],{relativeTo:this.#o.parent})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=j({type:t,selectors:[["app-destination"]],viewQuery:function(e,i){e&1&&Z(i.formRef,Ae,5),e&2&&ee()},decls:31,vars:11,consts:()=>{let n;n=$localize`Backup destination`;let e;e=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let i;i=$localize`${"\uFFFD*28:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*28:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*29:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*29:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,i=q(i);let o;o=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF: Testing... ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Set target URL `;let h;h=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let B;B=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let b;b=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Testing connection... `;let k;k=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Connection tested successfully. `;let v;v=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let K;K=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let V;V=$localize`Change`;let z;z=$localize`Be careful, this will overwrite everything you have in your destination.`;let J;J=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let X;X=$localize`Set target URL`;let H;return H=$localize`Edit target URL`,[["formRef",""],n,e,i,o,a,h,B,b,k,v,K,V,z,J,X,H,["autocomplete","off",3,"submit"],[2,"position","absolute","left","-9999px","width","1px","height","1px","overflow","hidden"],["type","text","name","fake_email","tabindex","-1"],["type","password","name","fake_password","tabindex","-1"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small",3,"disabled"],["shButton","","type","button",1,"small"],[1,"success"],[1,"warn"],[1,"error"],[1,"current-destination",3,"destination"],[3,"targetUrl","useBackupState"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click","disabled"],["shButton","","type","button",1,"small",3,"click"],["menu",""],["icon",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl","useBackupState"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,i){if(e&1){let o=p();x(0),s(1,"form",17,0),N("submit",function(){return T(o),u(i.next())}),s(3,"div",18),F(4,"input",19)(5,"input",20),r(),s(6,"header")(7,"h3",21)(8,"span"),E(9,1),r(),s(10,"div",22),C(11,Re,4,2,"button",23),C(12,ye,3,0,"button",24)(13,xe,9,1,"sh-menu"),r()(),C(14,Ge,3,0,"sh-alert")(15,Ue,3,0,"sh-alert",25)(16,we,3,1,"sh-alert",26)(17,Be,3,1,"sh-alert",27),x(18),C(19,be,3,1,"app-destination-list-item",28),r(),C(20,ke,1,0,"app-destination-list"),C(21,ve,1,2,"app-single-destination",29),s(22,"div",30)(23,"button",31),N("click",function(){return T(o),u(i.goBack())}),g(24,2),F(25,"sh-icon"),d(),r(),s(26,"button",32),g(27,3),C(28,Ke,2,0,"sh-icon",33)(29,Ve,2,0,"sh-icon"),d(),r()()(),C(30,Xe,16,5,"sh-dialog",34)}if(e&2){let o=G(!!i.targetUrlModel());_(11),S(o?11:-1),_(),S(o?13:12),_(2),S(i.testSignal()=="testing"?14:i.testSignal()=="success"?15:i.testSignal()=="warning"?16:i.testSignal()=="error"?17:-1),_(4);let a=G(i.selectedDestinationTypeOption());_(),S(a?19:-1),_(),S(o?-1:20),_(),S(o?21:-1),_(5),m("disabled",i.testSignal()=="testing"||!o),_(2),S(i.testSignal()=="testing"?28:29),_(2),S(i.targetUrlDialogOpen()?30:-1)}},dependencies:[fe,Oe,he,ue,ce,ae,se,re,_e,le,Se,Ne,pe,ge,Fe,de],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem;padding:2.5rem 2.5rem 0}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;height:100%;padding:0 0 2.5rem}.current-destination[_ngcontent-%COMP%]{margin:1rem 0 0}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}"],changeDetection:0})};export{Tt as createDestinationForm,ut as createDestinationFormGroup,w as default};
@@ -1 +1 @@
1
- import{a as A}from"./chunk-TKRULVGG.js";import"./chunk-LEOGK5HM.js";import"./chunk-FOQJA6X2.js";import"./chunk-VHOAXFIJ.js";import"./chunk-XOCNOYCA.js";import"./chunk-6Q6SSTBK.js";import"./chunk-FK7JFD5B.js";import"./chunk-D4HZWDZW.js";import"./chunk-ME77WZZI.js";import"./chunk-5DJAX2HH.js";import"./chunk-WVF3GRDZ.js";import"./chunk-35FSXDVX.js";import"./chunk-DW332N2S.js";import"./chunk-YJLLDDPP.js";import"./chunk-TELPJYLN.js";import"./chunk-4RKO4YFU.js";import{U as S}from"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import{c as u,e as N,f as c}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{Ab as t,Bb as T,Rb as n,cb as g,zb as e}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var l=class s{static \u0275fac=function(o){return new(o||s)};static \u0275cmp=g({type:s,selectors:[["app-about"]],decls:19,vars:0,consts:()=>{let i;i=$localize`General`;let o;o=$localize`Changelog`;let r;r=$localize`Libraries`;let C;C=$localize`System info`;let a;a=$localize`Server settings`;let E;E=$localize`Logs`;let O;return O=$localize`Crash log`,[i,o,r,C,a,E,O,[1,"content"],[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/server-settings","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"],["tab","","routerLink","/about/crashlogs","routerLinkActive","active"]]},template:function(o,r){o&1&&(T(0,"app-status-bar"),e(1,"div",7)(2,"sh-tabs",8)(3,"button",9),n(4,0),t(),e(5,"button",10),n(6,1),t(),e(7,"button",11),n(8,2),t(),e(9,"button",12),n(10,3),t(),e(11,"button",13),n(12,4),t(),e(13,"button",14),n(14,5),t(),e(15,"button",15),n(16,6),t()(),e(17,"section"),T(18,"router-outlet"),t()())},dependencies:[A,S,u,N,c],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 0}.content[_ngcontent-%COMP%] sh-tabs[_ngcontent-%COMP%]{margin:0 2rem 2rem}.content[_ngcontent-%COMP%] section[_ngcontent-%COMP%]{padding:0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem}"],changeDetection:0})};export{l as default};
1
+ import{a as A}from"./chunk-LWAB7LAV.js";import"./chunk-4SFVPIZK.js";import"./chunk-FOQJA6X2.js";import"./chunk-VHOAXFIJ.js";import"./chunk-24YV42LW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-FK7JFD5B.js";import"./chunk-4ISX5VCL.js";import"./chunk-ME77WZZI.js";import"./chunk-5DJAX2HH.js";import"./chunk-WVF3GRDZ.js";import"./chunk-JKQGCV6K.js";import"./chunk-DW332N2S.js";import"./chunk-GZ37Z4NG.js";import"./chunk-TELPJYLN.js";import"./chunk-4RKO4YFU.js";import{U as S}from"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import{c as u,e as N,f as c}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{Ab as t,Bb as T,Rb as n,cb as g,zb as e}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var l=class s{static \u0275fac=function(o){return new(o||s)};static \u0275cmp=g({type:s,selectors:[["app-about"]],decls:19,vars:0,consts:()=>{let i;i=$localize`General`;let o;o=$localize`Changelog`;let r;r=$localize`Libraries`;let C;C=$localize`System info`;let a;a=$localize`Server settings`;let E;E=$localize`Logs`;let O;return O=$localize`Crash log`,[i,o,r,C,a,E,O,[1,"content"],[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/server-settings","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"],["tab","","routerLink","/about/crashlogs","routerLinkActive","active"]]},template:function(o,r){o&1&&(T(0,"app-status-bar"),e(1,"div",7)(2,"sh-tabs",8)(3,"button",9),n(4,0),t(),e(5,"button",10),n(6,1),t(),e(7,"button",11),n(8,2),t(),e(9,"button",12),n(10,3),t(),e(11,"button",13),n(12,4),t(),e(13,"button",14),n(14,5),t(),e(15,"button",15),n(16,6),t()(),e(17,"section"),T(18,"router-outlet"),t()())},dependencies:[A,S,u,N,c],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 0}.content[_ngcontent-%COMP%] sh-tabs[_ngcontent-%COMP%]{margin:0 2rem 2rem}.content[_ngcontent-%COMP%] section[_ngcontent-%COMP%]{padding:0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem}"],changeDetection:0})};export{l as default};
@@ -1 +1 @@
1
- import{a as h}from"./chunk-ME77WZZI.js";import{a as f}from"./chunk-5DJAX2HH.js";import{a as p}from"./chunk-35FSXDVX.js";import{a as m}from"./chunk-TELPJYLN.js";import{z as g}from"./chunk-HPNLQHW6.js";import{c as u}from"./chunk-BGTK25UG.js";import{Mc as c,R as l,W as s,la as r,na as a}from"./chunk-T2WO6CVD.js";var d=class o{#r=s(h);#o=s(g);#e=s(u);#s=s(m);#n=s(p);repeatRegisterTimer=null;state=r("unknown");claimUrl=r(null);registerUrl=r("");customRegisterUrl=r("");status=c(()=>{let e=this.state();return e==="connecting"?$localize`Console connection is enabled but not connected`:e==="connected"?$localize`Connected to console`:e==="registering"?$localize`Registering machine...`:e==="registeringfaulted"?$localize`Registration failed`:e==="registered"?$localize`Registered, waiting for accept`:e==="disabled"?$localize`Console connection is configured but not enabled`:e==="unknown"?$localize`...loading...`:$localize`Console connection is not set up`});sysInfoEffect=a(()=>{let e=this.#s.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"")});#t(e){e.RegistrationUrl&&this.claimUrl.set(e.RegistrationUrl),e.IsConnected?this.state.set("connected"):e.IsEnabled?this.state.set("connecting"):e.CanEnable?this.state.set("disabled"):e.IsRegisteringFaulted?this.state.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");let i=this.state();this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),i==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:t=>this.#t(t),error:t=>this.#i(t)})},5e3)),(i==="connecting"||i==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#t(t),error:t=>this.#i(t)})},5e3)),e.IsRegistering&&e.CanEnable&&this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:t=>this.#t(t)})}#i(e){this.#e.getApiV1RemotecontrolStatus().subscribe({next:i=>{console.log("next",i),this.#t(i)}})}refreshRemoteControlStatus(){this.#e.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}beginRemoteRegistration(e=!1){this.state.set("registering"),this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:e?this.customRegisterUrl():this.registerUrl()}}).subscribe({next:i=>this.#t(i),error:i=>this.#i(i)})}cancelRemoteRegistration(){this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}enableRemoteControl(){this.#e.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}disableRemoteControl(){this.#e.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}deleteRemoteControl(){let e=this;this.#o.open(f,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete the console registration?`,confirmText:$localize`Delete registration`,cancelText:$localize`Cancel`},closed:i=>{i&&e.#e.deleteApiV1RemotecontrolRegistration().subscribe({next:t=>e.#t(t),error:t=>e.#i(t)})}})}openConsole(){let e=this.#n.serverSettings(),i=this.#s.systemInfo(),t="https://app.duplicati.com/app/machines",n=i?.RemoteControlDashboardUrl??"";n.length>0&&(t=n),e&&e["remote-control-dashboard-url"]&&(t=e["remote-control-dashboard-url"]),this.#r.open(t,"_blank")}static \u0275fac=function(i){return new(i||o)};static \u0275prov=l({token:o,factory:o.\u0275fac,providedIn:"root"})};export{d as a};
1
+ import{a as h}from"./chunk-ME77WZZI.js";import{a as f}from"./chunk-5DJAX2HH.js";import{a as p}from"./chunk-JKQGCV6K.js";import{a as m}from"./chunk-TELPJYLN.js";import{z as g}from"./chunk-HPNLQHW6.js";import{c as u}from"./chunk-BGTK25UG.js";import{Mc as c,R as l,W as s,la as r,na as a}from"./chunk-T2WO6CVD.js";var d=class o{#r=s(h);#o=s(g);#e=s(u);#s=s(m);#n=s(p);repeatRegisterTimer=null;state=r("unknown");claimUrl=r(null);registerUrl=r("");customRegisterUrl=r("");status=c(()=>{let e=this.state();return e==="connecting"?$localize`Console connection is enabled but not connected`:e==="connected"?$localize`Connected to console`:e==="registering"?$localize`Registering machine...`:e==="registeringfaulted"?$localize`Registration failed`:e==="registered"?$localize`Registered, waiting for accept`:e==="disabled"?$localize`Console connection is configured but not enabled`:e==="unknown"?$localize`...loading...`:$localize`Console connection is not set up`});sysInfoEffect=a(()=>{let e=this.#s.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"")});#t(e){e.RegistrationUrl&&this.claimUrl.set(e.RegistrationUrl),e.IsConnected?this.state.set("connected"):e.IsEnabled?this.state.set("connecting"):e.CanEnable?this.state.set("disabled"):e.IsRegisteringFaulted?this.state.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");let i=this.state();this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),i==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:t=>this.#t(t),error:t=>this.#i(t)})},5e3)),(i==="connecting"||i==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#t(t),error:t=>this.#i(t)})},5e3)),e.IsRegistering&&e.CanEnable&&this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:t=>this.#t(t)})}#i(e){this.#e.getApiV1RemotecontrolStatus().subscribe({next:i=>{console.log("next",i),this.#t(i)}})}refreshRemoteControlStatus(){this.#e.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}beginRemoteRegistration(e=!1){this.state.set("registering"),this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:e?this.customRegisterUrl():this.registerUrl()}}).subscribe({next:i=>this.#t(i),error:i=>this.#i(i)})}cancelRemoteRegistration(){this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}enableRemoteControl(){this.#e.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}disableRemoteControl(){this.#e.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}deleteRemoteControl(){let e=this;this.#o.open(f,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete the console registration?`,confirmText:$localize`Delete registration`,cancelText:$localize`Cancel`},closed:i=>{i&&e.#e.deleteApiV1RemotecontrolRegistration().subscribe({next:t=>e.#t(t),error:t=>e.#i(t)})}})}openConsole(){let e=this.#n.serverSettings(),i=this.#s.systemInfo(),t="https://app.duplicati.com/app/machines",n=i?.RemoteControlDashboardUrl??"";n.length>0&&(t=n),e&&e["remote-control-dashboard-url"]&&(t=e["remote-control-dashboard-url"]),this.#r.open(t,"_blank")}static \u0275fac=function(i){return new(i||o)};static \u0275prov=l({token:o,factory:o.\u0275fac,providedIn:"root"})};export{d as a};
@@ -1 +1 @@
1
- import{a as B}from"./chunk-XOCNOYCA.js";import{a as R}from"./chunk-FK7JFD5B.js";import{a as $}from"./chunk-5DJAX2HH.js";import{b as z}from"./chunk-YJLLDDPP.js";import{a as b}from"./chunk-TELPJYLN.js";import{z as S}from"./chunk-HPNLQHW6.js";import{c as P}from"./chunk-BGTK25UG.js";import{E as u,K as k,Mc as c,R as m,W as s,l as d,la as n,na as f,p as h}from"./chunk-T2WO6CVD.js";import{a,b as r}from"./chunk-7CGTOI24.js";var F={Starting_Operation:$localize`Starting operation …`,Backup_Begin:$localize`Starting backup …`,Backup_PreBackupVerify:$localize`Verifying backend data …`,Backup_PostBackupTest:$localize`Verifying remote data …`,Backup_PreviousBackupFinalize:$localize`Completing previous backup …`,Backup_ProcessingFiles:$localize`Processing files to backup …`,Backup_Finalize:$localize`Completing backup …`,Backup_WaitForUpload:$localize`Waiting for upload to finish …`,Backup_Delete:$localize`Deleting unwanted files …`,Backup_Compact:$localize`Compacting remote data …`,Backup_VerificationUpload:$localize`Uploading verification file …`,Backup_PostBackupVerify:$localize`Verifying backend data …`,Backup_Complete:$localize`Backup complete!`,Restore_Begin:$localize`Starting restore …`,Restore_RecreateDatabase:$localize`Rebuilding local database …`,Restore_PreRestoreVerify:$localize`Verifying remote data …`,Restore_CreateFileList:$localize`Building list of files to restore …`,Restore_CreateTargetFolders:$localize`Creating target folders …`,Restore_ScanForExistingFiles:$localize`Scanning existing files …`,Restore_ScanForLocalBlocks:$localize`Scanning for local blocks …`,Restore_PatchWithLocalBlocks:$localize`Patching files with local blocks …`,Restore_DownloadingRemoteFiles:$localize`Downloading files …`,Restore_PostRestoreVerify:$localize`Verifying restored files …`,Restore_Complete:$localize`Restore complete!`,Recreate_Running:$localize`Recreating database …`,Vacuum_Running:$localize`Vacuuming database …`,Repair_Running:$localize`Repairing database …`,Verify_Running:$localize`Verifying files …`,BugReport_Running:$localize`Creating bug report …`,Delete_Listing:$localize`Listing remote files …`,Delete_Deleting:$localize`Deleting remote files …`,PurgeFiles_Begin:$localize`Listing remote files for purge …`,PurgeFiles_Process:$localize`Purging files …`,PurgeFiles_Compact:$localize`Compacting remote data …`,PurgeFiles_Complete:$localize`Purging files complete!`,Error:$localize`Error!`},_=class g{#i=s(R);#t=s(P);#o=s(B);#e=s(z);#c=s(S);#g=s(b);#s=n(!1);#a=n(null);statusData=this.#a.asReadonly();lastState=null;serverState=c(()=>{let e=this.#e.serverState();return e?(e.ProposedSchedule=e.ProposedSchedule?.map(i=>r(a({},i),{backup:i.Item1?this.#o.getBackupById(i.Item1):null}))??null,this.lastState=e,e):this.lastState});hasProgressOnWebsocket=c(()=>this.#g.hasProgressSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");clientIsRunning=c(()=>this.serverState()?.ProgramState==="Running");isResuming=n(!1);isFetching=this.#s.asReadonly();connectionStatus=this.#e.connectionStatus;pollingInterval;#f=f(()=>{let e=this.#e.serverState();e?.ActiveTask||this.#o.getBackups(!0),this.hasProgressOnWebsocket()&&(this.#e.subscribe("progress"),this.#e.subscribe("taskqueue")),e?.ActiveTask&&this.pollingInterval===void 0?this.startPollingProgress():e?.ActiveTask||this.stopPollingProgress()});#d=f(()=>{let e=this.#e.progressState(),i=this.#e.taskQueueState();if(e){let t=i?.find(o=>o.ID===e.TaskID)??null;this.#l(r(a({},e),{task:t}))}});setConnectionMethod(e){this.#e.setConnectionMethod(e)}startPollingProgress(){this.hasProgressOnWebsocket()?this.#e.subscribe("progress"):this.pollingInterval=setInterval(()=>{this.#r()},1e3)}stopPollingProgress(){clearInterval(this.pollingInterval)}fetchProgressState(){this.#r()}pauseResume(){return this.isResuming.set(!0),this.#t.postApiV1ServerstateResume().pipe(u(()=>this.isResuming.set(!1)))}resumeDialogCheck(e){if(!this.clientIsRunning()){this.#c.open($,{data:{title:$localize`Server paused`,message:$localize`Server is currently paused. Do you want to resume now?`,confirmText:$localize`Resume`,cancelText:$localize`No, I'll resume later`},closed:i=>{i&&this.pauseResume().subscribe({next:()=>{e()}})}});return}e()}#r(){this.#s.set(!0),this.#t.getApiV1Progressstate().pipe(k(e=>{let i=e.TaskID??null;return i===null?d(e):this.#t.getApiV1TaskByTaskid({taskid:i}).pipe(h(t=>r(a({},e),{task:t??null})))}),u(()=>this.#s.set(!1))).subscribe({next:e=>{this.#l(e),this.serverState()?.ActiveTask==null&&this.stopPollingProgress()},error:e=>{e.status===404&&this.stopPollingProgress()}})}#l(e){let i=e.TaskID??null,t=e.BackupID??null;i!==null&&t!==null&&(e.backup=this.#o.getBackupById(t)),this.#a.set(r(a({},e),{progress:this.#p(e),statusText:this.#u(e),actionText:e.backup?.Backup?.Name??$localize`Running task`}))}#p(e){let i=-1;if(e.task&&e)if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=0;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,o=e.TotalFileCount-e.ProcessedFileCount,l=e.TotalFileSize-e.ProcessedFileSize-t;i=(e.ProcessedFileSize+t)/e.TotalFileSize,e.ProcessedFileCount===0?i=0:i>=.9&&(i=.9)}else e.Phase==="Backup_Finalize"||e.Phase==="Backup_WaitForUpload"?i=.9:e.Phase==="Backup_Delete"||e.Phase==="Backup_Compact"?i=.95:e.Phase==="Backup_VerificationUpload"||e.Phase==="Backup_PostBackupVerify"?i=.98:e.Phase==="Backup_Complete"?i=1:e.OverallProgress>0&&(i=e.OverallProgress);return i}#n(e){let i=(e.ActiveTransfers??[]).map(o=>o.BackendSpeed).reduce((o,l)=>(o??0)+(l??0),0)??-1,t=i<=0?e.BackendSpeed:i;return(t??-1)<0?"":` at ${this.#i.transform(t)}/s`}#u(e){let i="Running \u2026";if(e.task&&e){if(i=e.Phase?F[e.Phase]:"Running \u2026",e.TotalFileCount===0)return i;if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=`Counting (${e.TotalFileCount} files found, ${this.#i.transform(e.TotalFileSize)})`;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,o=e.TotalFileCount-e.ProcessedFileCount,l=e.TotalFileSize-e.ProcessedFileSize-t,v=e.Phase==="Restore_DownloadingRemoteFiles"?"Restoring: ":"",p=this.#n(e);e.Phase==="Backup_ProcessingFiles"&&o===0?i=`Completing upload ${p}`:e.BackendIsBlocking??!1?i=`Waiting for transfers ${p}`:i=`${v}${o} files (${this.#i.transform(l)}) to go ${p}`}else if(e.Phase==="Backup_WaitForUpload"){let t=this.#n(e);t!==""&&(i=`Waiting for upload to finish ${t}`)}}return i}static \u0275fac=function(i){return new(i||g)};static \u0275prov=m({token:g,factory:g.\u0275fac,providedIn:"root"})};export{_ as a};
1
+ import{a as B}from"./chunk-24YV42LW.js";import{a as R}from"./chunk-FK7JFD5B.js";import{a as $}from"./chunk-5DJAX2HH.js";import{b as z}from"./chunk-GZ37Z4NG.js";import{a as b}from"./chunk-TELPJYLN.js";import{z as S}from"./chunk-HPNLQHW6.js";import{c as P}from"./chunk-BGTK25UG.js";import{E as u,K as k,Mc as c,R as m,W as s,l as d,la as n,na as f,p as h}from"./chunk-T2WO6CVD.js";import{a,b as r}from"./chunk-7CGTOI24.js";var F={Starting_Operation:$localize`Starting operation …`,Backup_Begin:$localize`Starting backup …`,Backup_PreBackupVerify:$localize`Verifying backend data …`,Backup_PostBackupTest:$localize`Verifying remote data …`,Backup_PreviousBackupFinalize:$localize`Completing previous backup …`,Backup_ProcessingFiles:$localize`Processing files to backup …`,Backup_Finalize:$localize`Completing backup …`,Backup_WaitForUpload:$localize`Waiting for upload to finish …`,Backup_Delete:$localize`Deleting unwanted files …`,Backup_Compact:$localize`Compacting remote data …`,Backup_VerificationUpload:$localize`Uploading verification file …`,Backup_PostBackupVerify:$localize`Verifying backend data …`,Backup_Complete:$localize`Backup complete!`,Restore_Begin:$localize`Starting restore …`,Restore_RecreateDatabase:$localize`Rebuilding local database …`,Restore_PreRestoreVerify:$localize`Verifying remote data …`,Restore_CreateFileList:$localize`Building list of files to restore …`,Restore_CreateTargetFolders:$localize`Creating target folders …`,Restore_ScanForExistingFiles:$localize`Scanning existing files …`,Restore_ScanForLocalBlocks:$localize`Scanning for local blocks …`,Restore_PatchWithLocalBlocks:$localize`Patching files with local blocks …`,Restore_DownloadingRemoteFiles:$localize`Downloading files …`,Restore_PostRestoreVerify:$localize`Verifying restored files …`,Restore_Complete:$localize`Restore complete!`,Recreate_Running:$localize`Recreating database …`,Vacuum_Running:$localize`Vacuuming database …`,Repair_Running:$localize`Repairing database …`,Verify_Running:$localize`Verifying files …`,BugReport_Running:$localize`Creating bug report …`,Delete_Listing:$localize`Listing remote files …`,Delete_Deleting:$localize`Deleting remote files …`,PurgeFiles_Begin:$localize`Listing remote files for purge …`,PurgeFiles_Process:$localize`Purging files …`,PurgeFiles_Compact:$localize`Compacting remote data …`,PurgeFiles_Complete:$localize`Purging files complete!`,Error:$localize`Error!`},_=class g{#i=s(R);#t=s(P);#o=s(B);#e=s(z);#c=s(S);#g=s(b);#s=n(!1);#a=n(null);statusData=this.#a.asReadonly();lastState=null;serverState=c(()=>{let e=this.#e.serverState();return e?(e.ProposedSchedule=e.ProposedSchedule?.map(i=>r(a({},i),{backup:i.Item1?this.#o.getBackupById(i.Item1):null}))??null,this.lastState=e,e):this.lastState});hasProgressOnWebsocket=c(()=>this.#g.hasProgressSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");clientIsRunning=c(()=>this.serverState()?.ProgramState==="Running");isResuming=n(!1);isFetching=this.#s.asReadonly();connectionStatus=this.#e.connectionStatus;pollingInterval;#f=f(()=>{let e=this.#e.serverState();e?.ActiveTask||this.#o.getBackups(!0),this.hasProgressOnWebsocket()&&(this.#e.subscribe("progress"),this.#e.subscribe("taskqueue")),e?.ActiveTask&&this.pollingInterval===void 0?this.startPollingProgress():e?.ActiveTask||this.stopPollingProgress()});#d=f(()=>{let e=this.#e.progressState(),i=this.#e.taskQueueState();if(e){let t=i?.find(o=>o.ID===e.TaskID)??null;this.#l(r(a({},e),{task:t}))}});setConnectionMethod(e){this.#e.setConnectionMethod(e)}startPollingProgress(){this.hasProgressOnWebsocket()?this.#e.subscribe("progress"):this.pollingInterval=setInterval(()=>{this.#r()},1e3)}stopPollingProgress(){clearInterval(this.pollingInterval)}fetchProgressState(){this.#r()}pauseResume(){return this.isResuming.set(!0),this.#t.postApiV1ServerstateResume().pipe(u(()=>this.isResuming.set(!1)))}resumeDialogCheck(e){if(!this.clientIsRunning()){this.#c.open($,{data:{title:$localize`Server paused`,message:$localize`Server is currently paused. Do you want to resume now?`,confirmText:$localize`Resume`,cancelText:$localize`No, I'll resume later`},closed:i=>{i&&this.pauseResume().subscribe({next:()=>{e()}})}});return}e()}#r(){this.#s.set(!0),this.#t.getApiV1Progressstate().pipe(k(e=>{let i=e.TaskID??null;return i===null?d(e):this.#t.getApiV1TaskByTaskid({taskid:i}).pipe(h(t=>r(a({},e),{task:t??null})))}),u(()=>this.#s.set(!1))).subscribe({next:e=>{this.#l(e),this.serverState()?.ActiveTask==null&&this.stopPollingProgress()},error:e=>{e.status===404&&this.stopPollingProgress()}})}#l(e){let i=e.TaskID??null,t=e.BackupID??null;i!==null&&t!==null&&(e.backup=this.#o.getBackupById(t)),this.#a.set(r(a({},e),{progress:this.#p(e),statusText:this.#u(e),actionText:e.backup?.Backup?.Name??$localize`Running task`}))}#p(e){let i=-1;if(e.task&&e)if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=0;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,o=e.TotalFileCount-e.ProcessedFileCount,l=e.TotalFileSize-e.ProcessedFileSize-t;i=(e.ProcessedFileSize+t)/e.TotalFileSize,e.ProcessedFileCount===0?i=0:i>=.9&&(i=.9)}else e.Phase==="Backup_Finalize"||e.Phase==="Backup_WaitForUpload"?i=.9:e.Phase==="Backup_Delete"||e.Phase==="Backup_Compact"?i=.95:e.Phase==="Backup_VerificationUpload"||e.Phase==="Backup_PostBackupVerify"?i=.98:e.Phase==="Backup_Complete"?i=1:e.OverallProgress>0&&(i=e.OverallProgress);return i}#n(e){let i=(e.ActiveTransfers??[]).map(o=>o.BackendSpeed).reduce((o,l)=>(o??0)+(l??0),0)??-1,t=i<=0?e.BackendSpeed:i;return(t??-1)<0?"":` at ${this.#i.transform(t)}/s`}#u(e){let i="Running \u2026";if(e.task&&e){if(i=e.Phase?F[e.Phase]:"Running \u2026",e.TotalFileCount===0)return i;if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=`Counting (${e.TotalFileCount} files found, ${this.#i.transform(e.TotalFileSize)})`;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,o=e.TotalFileCount-e.ProcessedFileCount,l=e.TotalFileSize-e.ProcessedFileSize-t,v=e.Phase==="Restore_DownloadingRemoteFiles"?"Restoring: ":"",p=this.#n(e);e.Phase==="Backup_ProcessingFiles"&&o===0?i=`Completing upload ${p}`:e.BackendIsBlocking??!1?i=`Waiting for transfers ${p}`:i=`${v}${o} files (${this.#i.transform(l)}) to go ${p}`}else if(e.Phase==="Backup_WaitForUpload"){let t=this.#n(e);t!==""&&(i=`Waiting for upload to finish ${t}`)}}return i}static \u0275fac=function(i){return new(i||g)};static \u0275prov=m({token:g,factory:g.\u0275fac,providedIn:"root"})};export{_ as a};
@@ -1 +1 @@
1
- import{a as _e}from"./chunk-TKRULVGG.js";import"./chunk-LEOGK5HM.js";import"./chunk-FOQJA6X2.js";import"./chunk-VHOAXFIJ.js";import{a as se}from"./chunk-XOCNOYCA.js";import"./chunk-6Q6SSTBK.js";import"./chunk-FK7JFD5B.js";import"./chunk-D4HZWDZW.js";import"./chunk-ME77WZZI.js";import{a as b}from"./chunk-5DJAX2HH.js";import"./chunk-WVF3GRDZ.js";import"./chunk-35FSXDVX.js";import{a as le,b as m}from"./chunk-DW332N2S.js";import"./chunk-YJLLDDPP.js";import"./chunk-TELPJYLN.js";import"./chunk-4RKO4YFU.js";import{B as ae,H as ie,Y as ne,c as Q,e as Y,i as Z,s as x,u as ee,z as te}from"./chunk-HPNLQHW6.js";import{c as oe}from"./chunk-BGTK25UG.js";import{b as q,e as j}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{Ab as i,B as G,Bb as c,C as g,D as L,E as p,Mc as E,Pa as _,Pb as u,Qb as h,Rb as A,Sb as H,Tb as J,Vb as T,W as F,cb as V,gc as C,ic as K,jc as D,la as s,na as P,oc as X,p as y,pc as z,qc as W,sb as w,tb as U,yb as d,zb as n}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";function re(r,t){r&1&&(n(0,"sh-icon",19),D(1,"spinner"),i())}function ce(r,t){r&1&&(n(0,"sh-icon",20),D(1,"check"),i())}function de(r,t){r&1&&(n(0,"sh-icon",21),D(1,"warning"),i()),r&2&&d("shTooltip","File not found")}function ue(r,t){let a=le(r).pipe(G(t),L());return m(a,{initialValue:r()})}var N=class r{#o=F(q);#s=F(se);#e=F(oe);#a=F(te);#t=s("");backupId=m(this.#o.params.pipe(y(t=>t.id)));activeBackup=E(()=>this.#s.backups().find(t=>t.Backup?.ID===this.backupId()));backupFilePath=s("");lastValidatedPath=s("");isValidatedPath=E(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=E(()=>this.backupFilePath()!==this.#t());isValidatingPath=s(!1);#i=ue(this.backupFilePath,500);#n=s(!1);isWaitingForValidation=E(()=>this.#i()!=this.backupFilePath()||this.isValidatingPath());backupFilePathEffect=P(()=>{let t=this.#i(),a=this.activeBackup(),e=this.#n();t!==""&&(this.isValidatingPath.set(!0),this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).pipe(g(1),p(()=>this.isValidatingPath.set(!1))).subscribe(()=>this.lastValidatedPath.set(t)))});isRestoring=s(!1);isRepairing=s(!1);isDeleting=s(!1);isSavingDbPath=s(!1);isSavingAndRepairing=s(!1);isMovingDb=s(!1);isCreatingBugReport=s(!1);createdReport=s(!1);activeBackupEffect=P(()=>{let t=this.activeBackup();if(!t)return;let a=t.Backup?.DBPath??"";this.backupFilePath.set(a),this.#t.set(a)});repairDatabase(){this.isRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(t=null){this.isValidatedPath()?this.#a.open(b,{data:{title:$localize`Confirm delete?`,message:$localize`Do you really want to delete the database for ${this.activeBackup()?.Backup?.Name}?`,confirmText:$localize`Delete database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doDeleteDatabase(t)}}):this.doDeleteDatabase(t)}doDeleteDatabase(t=null){this.isDeleting.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),p(()=>this.isDeleting.set(!1))).subscribe(()=>{this.lastValidatedPath.set(""),t?.()})}restoreDatabase(){this.isValidatedPath()?this.deleteDatabase(()=>{this.doRepairDatabase()}):this.doRepairDatabase()}doRepairDatabase(){this.isRestoring.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t())}saveDatabasePath(t=null){this.isValidatedPath()?this.#a.open(b,{data:{title:$localize`Confirm reassign?`,message:$localize`The target database path already exists and may belong to another backup. Are you sure you want to assign this backup to an existing database?`,confirmText:$localize`Assign existing database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doSaveDatabasePath(t)}}):this.doSaveDatabasePath(t)}doSaveDatabasePath(t=null){this.isSavingDbPath.set(!0);let a=this.backupFilePath();this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:a}}).pipe(p(()=>this.isSavingDbPath.set(!1))).subscribe(()=>{this.#t.set(a),t?.()})}saveAndRepairDatabasePath(){this.saveDatabasePath(()=>(this.isSavingAndRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isSavingAndRepairing.set(!1))).subscribe()))}moveDatabasePath(){this.isMovingDb.set(!0);let t=this.backupFilePath();this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:t}}).pipe(p(()=>this.isMovingDb.set(!1))).subscribe(()=>{this.#n.update(a=>!a),this.#t.set(t)})}createErrorReport(){this.isCreatingBugReport.set(!0),this.#e.postApiV1BackupByIdCreatereport({id:this.backupId()}).pipe(p(()=>this.isCreatingBugReport.set(!1))).subscribe({next:()=>{this.createdReport.set(!0),window.setTimeout(()=>this.createdReport.set(!1),3e3)}})}static \u0275fac=function(a){return new(a||r)};static \u0275cmp=V({type:r,selectors:[["app-database"]],decls:50,vars:21,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let a;a=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let o;o=$localize`Maintenance`;let S;S=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. The bug report button can be used to create a copy of the database with path information removed. This should only be used if a developer requests to investigate an issue with your database. `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Repair `;let I;I=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let M;M=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Recreate (delete and repair) `;let R;R=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:file-plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Create bug report database `;let B;B=$localize`Placement`;let O;O=$localize`${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON:backspace${"\uFFFD/#40\uFFFD"}:CLOSE_TAG_SH_ICON: Reset `;let $;$=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Save `;let v;v=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Save & Repair `;let k;return k=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON: Move existing database `,[t,a,e,o,S,f,I,M,R,B,O,$,v,k,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"actions","maintenance"],["shButton","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix","",1,"primary"],["prefix",""],["prefix","",3,"shTooltip"],[1,"actions","placement"]]},template:function(a,e){if(a&1&&(c(0,"app-status-bar"),n(1,"section")(2,"div",14)(3,"button",15),u(4,0),c(5,"sh-icon"),h(),i()(),n(6,"article")(7,"h1"),A(8,1),i(),n(9,"p"),A(10,2),i()(),n(11,"article")(12,"h2"),A(13,3),i(),n(14,"p"),A(15,4),i(),n(16,"div",16)(17,"button",17),T("click",function(){return e.repairDatabase()}),u(18,5),c(19,"sh-icon"),h(),i(),n(20,"button",17),T("click",function(){return e.deleteDatabase()}),u(21,6),c(22,"sh-icon"),h(),i(),n(23,"button",17),T("click",function(){return e.restoreDatabase()}),u(24,7),c(25,"sh-icon"),h(),i(),n(26,"button",17),T("click",function(){return e.createErrorReport()}),u(27,8),c(28,"sh-icon"),h(),i()()(),n(29,"article")(30,"h2"),A(31,9),i(),n(32,"sh-form-field")(33,"input",18),W("ngModelChange",function(S){return z(e.backupFilePath,S)||(e.backupFilePath=S),S}),i(),w(34,re,2,0,"sh-icon",19)(35,ce,2,0,"sh-icon",20)(36,de,2,1,"sh-icon",21),i(),n(37,"div",22)(38,"button",17),T("click",function(){return e.resetDatabasePath()}),u(39,10),c(40,"sh-icon"),h(),i(),n(41,"button",17),T("click",function(){return e.saveDatabasePath()}),u(42,11),c(43,"sh-icon"),h(),i(),n(44,"button",17),T("click",function(){return e.saveAndRepairDatabasePath()}),u(45,12),c(46,"sh-icon"),h(),i(),n(47,"button",17),T("click",function(){return e.moveDatabasePath()}),u(48,13),c(49,"sh-icon"),h(),i()()()()),a&2){let o;_(8),H((o=e.activeBackup())==null||o.Backup==null?null:o.Backup.Name),J(8),_(9),C("loader",e.isRepairing()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),_(3),C("loader",e.isDeleting()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),_(3),C("loader",e.isRestoring()),d("disabled",e.pathHasChanged()),_(3),C("loader",e.isCreatingBugReport()),d("disabled",e.isCreatingBugReport()||!e.isValidatedPath()||e.pathHasChanged()),_(6),K(e.isValidatedPath()?"success":"error"),_(),X("ngModel",e.backupFilePath),_(),U(e.isWaitingForValidation()?34:e.isValidatedPath()?35:36),_(4),d("disabled",!e.pathHasChanged()),_(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),_(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),_(3),d("disabled",!e.pathHasChanged()||e.isValidatedPath()||e.isWaitingForValidation())}},dependencies:[x,Q,Y,Z,_e,ae,ie,ee,ne,j],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{N as default};
1
+ import{a as _e}from"./chunk-LWAB7LAV.js";import"./chunk-4SFVPIZK.js";import"./chunk-FOQJA6X2.js";import"./chunk-VHOAXFIJ.js";import{a as se}from"./chunk-24YV42LW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-FK7JFD5B.js";import"./chunk-4ISX5VCL.js";import"./chunk-ME77WZZI.js";import{a as b}from"./chunk-5DJAX2HH.js";import"./chunk-WVF3GRDZ.js";import"./chunk-JKQGCV6K.js";import{a as le,b as m}from"./chunk-DW332N2S.js";import"./chunk-GZ37Z4NG.js";import"./chunk-TELPJYLN.js";import"./chunk-4RKO4YFU.js";import{B as ae,H as ie,Y as ne,c as Q,e as Y,i as Z,s as x,u as ee,z as te}from"./chunk-HPNLQHW6.js";import{c as oe}from"./chunk-BGTK25UG.js";import{b as q,e as j}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{Ab as i,B as G,Bb as c,C as g,D as L,E as p,Mc as E,Pa as _,Pb as u,Qb as h,Rb as A,Sb as H,Tb as J,Vb as T,W as F,cb as V,gc as C,ic as K,jc as D,la as s,na as P,oc as X,p as y,pc as z,qc as W,sb as w,tb as U,yb as d,zb as n}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";function re(r,t){r&1&&(n(0,"sh-icon",19),D(1,"spinner"),i())}function ce(r,t){r&1&&(n(0,"sh-icon",20),D(1,"check"),i())}function de(r,t){r&1&&(n(0,"sh-icon",21),D(1,"warning"),i()),r&2&&d("shTooltip","File not found")}function ue(r,t){let a=le(r).pipe(G(t),L());return m(a,{initialValue:r()})}var N=class r{#o=F(q);#s=F(se);#e=F(oe);#a=F(te);#t=s("");backupId=m(this.#o.params.pipe(y(t=>t.id)));activeBackup=E(()=>this.#s.backups().find(t=>t.Backup?.ID===this.backupId()));backupFilePath=s("");lastValidatedPath=s("");isValidatedPath=E(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=E(()=>this.backupFilePath()!==this.#t());isValidatingPath=s(!1);#i=ue(this.backupFilePath,500);#n=s(!1);isWaitingForValidation=E(()=>this.#i()!=this.backupFilePath()||this.isValidatingPath());backupFilePathEffect=P(()=>{let t=this.#i(),a=this.activeBackup(),e=this.#n();t!==""&&(this.isValidatingPath.set(!0),this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).pipe(g(1),p(()=>this.isValidatingPath.set(!1))).subscribe(()=>this.lastValidatedPath.set(t)))});isRestoring=s(!1);isRepairing=s(!1);isDeleting=s(!1);isSavingDbPath=s(!1);isSavingAndRepairing=s(!1);isMovingDb=s(!1);isCreatingBugReport=s(!1);createdReport=s(!1);activeBackupEffect=P(()=>{let t=this.activeBackup();if(!t)return;let a=t.Backup?.DBPath??"";this.backupFilePath.set(a),this.#t.set(a)});repairDatabase(){this.isRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(t=null){this.isValidatedPath()?this.#a.open(b,{data:{title:$localize`Confirm delete?`,message:$localize`Do you really want to delete the database for ${this.activeBackup()?.Backup?.Name}?`,confirmText:$localize`Delete database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doDeleteDatabase(t)}}):this.doDeleteDatabase(t)}doDeleteDatabase(t=null){this.isDeleting.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),p(()=>this.isDeleting.set(!1))).subscribe(()=>{this.lastValidatedPath.set(""),t?.()})}restoreDatabase(){this.isValidatedPath()?this.deleteDatabase(()=>{this.doRepairDatabase()}):this.doRepairDatabase()}doRepairDatabase(){this.isRestoring.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t())}saveDatabasePath(t=null){this.isValidatedPath()?this.#a.open(b,{data:{title:$localize`Confirm reassign?`,message:$localize`The target database path already exists and may belong to another backup. Are you sure you want to assign this backup to an existing database?`,confirmText:$localize`Assign existing database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doSaveDatabasePath(t)}}):this.doSaveDatabasePath(t)}doSaveDatabasePath(t=null){this.isSavingDbPath.set(!0);let a=this.backupFilePath();this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:a}}).pipe(p(()=>this.isSavingDbPath.set(!1))).subscribe(()=>{this.#t.set(a),t?.()})}saveAndRepairDatabasePath(){this.saveDatabasePath(()=>(this.isSavingAndRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isSavingAndRepairing.set(!1))).subscribe()))}moveDatabasePath(){this.isMovingDb.set(!0);let t=this.backupFilePath();this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:t}}).pipe(p(()=>this.isMovingDb.set(!1))).subscribe(()=>{this.#n.update(a=>!a),this.#t.set(t)})}createErrorReport(){this.isCreatingBugReport.set(!0),this.#e.postApiV1BackupByIdCreatereport({id:this.backupId()}).pipe(p(()=>this.isCreatingBugReport.set(!1))).subscribe({next:()=>{this.createdReport.set(!0),window.setTimeout(()=>this.createdReport.set(!1),3e3)}})}static \u0275fac=function(a){return new(a||r)};static \u0275cmp=V({type:r,selectors:[["app-database"]],decls:50,vars:21,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let a;a=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let o;o=$localize`Maintenance`;let S;S=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. The bug report button can be used to create a copy of the database with path information removed. This should only be used if a developer requests to investigate an issue with your database. `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Repair `;let I;I=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let M;M=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Recreate (delete and repair) `;let R;R=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:file-plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Create bug report database `;let B;B=$localize`Placement`;let O;O=$localize`${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON:backspace${"\uFFFD/#40\uFFFD"}:CLOSE_TAG_SH_ICON: Reset `;let $;$=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Save `;let v;v=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Save & Repair `;let k;return k=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON: Move existing database `,[t,a,e,o,S,f,I,M,R,B,O,$,v,k,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"actions","maintenance"],["shButton","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix","",1,"primary"],["prefix",""],["prefix","",3,"shTooltip"],[1,"actions","placement"]]},template:function(a,e){if(a&1&&(c(0,"app-status-bar"),n(1,"section")(2,"div",14)(3,"button",15),u(4,0),c(5,"sh-icon"),h(),i()(),n(6,"article")(7,"h1"),A(8,1),i(),n(9,"p"),A(10,2),i()(),n(11,"article")(12,"h2"),A(13,3),i(),n(14,"p"),A(15,4),i(),n(16,"div",16)(17,"button",17),T("click",function(){return e.repairDatabase()}),u(18,5),c(19,"sh-icon"),h(),i(),n(20,"button",17),T("click",function(){return e.deleteDatabase()}),u(21,6),c(22,"sh-icon"),h(),i(),n(23,"button",17),T("click",function(){return e.restoreDatabase()}),u(24,7),c(25,"sh-icon"),h(),i(),n(26,"button",17),T("click",function(){return e.createErrorReport()}),u(27,8),c(28,"sh-icon"),h(),i()()(),n(29,"article")(30,"h2"),A(31,9),i(),n(32,"sh-form-field")(33,"input",18),W("ngModelChange",function(S){return z(e.backupFilePath,S)||(e.backupFilePath=S),S}),i(),w(34,re,2,0,"sh-icon",19)(35,ce,2,0,"sh-icon",20)(36,de,2,1,"sh-icon",21),i(),n(37,"div",22)(38,"button",17),T("click",function(){return e.resetDatabasePath()}),u(39,10),c(40,"sh-icon"),h(),i(),n(41,"button",17),T("click",function(){return e.saveDatabasePath()}),u(42,11),c(43,"sh-icon"),h(),i(),n(44,"button",17),T("click",function(){return e.saveAndRepairDatabasePath()}),u(45,12),c(46,"sh-icon"),h(),i(),n(47,"button",17),T("click",function(){return e.moveDatabasePath()}),u(48,13),c(49,"sh-icon"),h(),i()()()()),a&2){let o;_(8),H((o=e.activeBackup())==null||o.Backup==null?null:o.Backup.Name),J(8),_(9),C("loader",e.isRepairing()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),_(3),C("loader",e.isDeleting()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),_(3),C("loader",e.isRestoring()),d("disabled",e.pathHasChanged()),_(3),C("loader",e.isCreatingBugReport()),d("disabled",e.isCreatingBugReport()||!e.isValidatedPath()||e.pathHasChanged()),_(6),K(e.isValidatedPath()?"success":"error"),_(),X("ngModel",e.backupFilePath),_(),U(e.isWaitingForValidation()?34:e.isValidatedPath()?35:36),_(4),d("disabled",!e.pathHasChanged()),_(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),_(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),_(3),d("disabled",!e.pathHasChanged()||e.isValidatedPath()||e.isWaitingForValidation())}},dependencies:[x,Q,Y,Z,_e,ae,ie,ee,ne,j],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{N as default};
@@ -0,0 +1 @@
1
+ import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-GNGWXBMU.js")},{path:"encryption",loadComponent:()=>import("./chunk-XSRWYB73.js")},{path:"select-files",loadComponent:()=>import("./chunk-Y4I2LLJP.js")},{path:"options",loadComponent:()=>import("./chunk-HRS47DZS.js")},{path:":taskid/progress",loadComponent:()=>import("./chunk-NZOS5QEO.js")}],t=o;export{t as default};
@@ -0,0 +1 @@
1
+ import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-CEFDED3C.js")},{path:"destination",loadComponent:()=>import("./chunk-33POGLKV.js")},{path:"source-data",loadComponent:()=>import("./chunk-2DMMOK27.js")},{path:"schedule",loadComponent:()=>import("./chunk-GV3CLW3W.js")},{path:"options",loadComponent:()=>import("./chunk-JEAN2PVD.js")}];export{o as default};
@@ -1 +1 @@
1
- import{a as M}from"./chunk-TKRULVGG.js";import"./chunk-LEOGK5HM.js";import"./chunk-FOQJA6X2.js";import"./chunk-VHOAXFIJ.js";import"./chunk-XOCNOYCA.js";import"./chunk-6Q6SSTBK.js";import"./chunk-FK7JFD5B.js";import"./chunk-D4HZWDZW.js";import"./chunk-ME77WZZI.js";import"./chunk-5DJAX2HH.js";import"./chunk-WVF3GRDZ.js";import"./chunk-35FSXDVX.js";import"./chunk-DW332N2S.js";import"./chunk-YJLLDDPP.js";import"./chunk-TELPJYLN.js";import"./chunk-4RKO4YFU.js";import{B as D,C as N,u as E}from"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import{e as m}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{Ab as n,Bb as o,Pa as c,Pb as r,Qb as l,Rb as i,cb as T,xc as d,yb as s,zb as e}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var f=()=>["/backup/new"],O=()=>["/backup/import"],u=class p{static \u0275fac=function(t){return new(t||p)};static \u0275cmp=T({type:p,selectors:[["app-add-backup"]],decls:23,vars:4,consts:()=>{let a;a=$localize`Add a new backup`;let t;t=$localize`New backup`;let C;C=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let A;A=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:`;let g;g=$localize`Import from file`;let P;P=$localize`Import backup configuration from a file. During import, you can adjust the settings.`;let S;return S=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`,[a,t,C,A,g,P,S,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["shButton","",1,"raised","primary",3,"routerLink"]]},template:function(t,C){t&1&&(o(0,"app-status-bar"),e(1,"section")(2,"h2"),i(3,0),n(),e(4,"div",7)(5,"sh-card",8),o(6,"img",9),e(7,"h3"),i(8,1),n(),e(9,"p"),i(10,2),n(),e(11,"button",10),r(12,3),o(13,"sh-icon"),l(),n()(),e(14,"sh-card",8),o(15,"img",9),e(16,"h3"),i(17,4),n(),e(18,"p"),i(19,5),n(),e(20,"button",10),r(21,6),o(22,"sh-icon"),l(),n()()()()),t&2&&(c(11),s("routerLink",d(2,f)),c(9),s("routerLink",d(3,O)))},dependencies:[M,D,N,E,m],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:43.75rem}sh-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}sh-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:18.75rem}sh-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{u as default};
1
+ import{a as M}from"./chunk-LWAB7LAV.js";import"./chunk-4SFVPIZK.js";import"./chunk-FOQJA6X2.js";import"./chunk-VHOAXFIJ.js";import"./chunk-24YV42LW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-FK7JFD5B.js";import"./chunk-4ISX5VCL.js";import"./chunk-ME77WZZI.js";import"./chunk-5DJAX2HH.js";import"./chunk-WVF3GRDZ.js";import"./chunk-JKQGCV6K.js";import"./chunk-DW332N2S.js";import"./chunk-GZ37Z4NG.js";import"./chunk-TELPJYLN.js";import"./chunk-4RKO4YFU.js";import{B as D,C as N,u as E}from"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import{e as m}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{Ab as n,Bb as o,Pa as c,Pb as r,Qb as l,Rb as i,cb as T,xc as d,yb as s,zb as e}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var f=()=>["/backup/new"],O=()=>["/backup/import"],u=class p{static \u0275fac=function(t){return new(t||p)};static \u0275cmp=T({type:p,selectors:[["app-add-backup"]],decls:23,vars:4,consts:()=>{let a;a=$localize`Add a new backup`;let t;t=$localize`New backup`;let C;C=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let A;A=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:`;let g;g=$localize`Import from file`;let P;P=$localize`Import backup configuration from a file. During import, you can adjust the settings.`;let S;return S=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`,[a,t,C,A,g,P,S,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["shButton","",1,"raised","primary",3,"routerLink"]]},template:function(t,C){t&1&&(o(0,"app-status-bar"),e(1,"section")(2,"h2"),i(3,0),n(),e(4,"div",7)(5,"sh-card",8),o(6,"img",9),e(7,"h3"),i(8,1),n(),e(9,"p"),i(10,2),n(),e(11,"button",10),r(12,3),o(13,"sh-icon"),l(),n()(),e(14,"sh-card",8),o(15,"img",9),e(16,"h3"),i(17,4),n(),e(18,"p"),i(19,5),n(),e(20,"button",10),r(21,6),o(22,"sh-icon"),l(),n()()()()),t&2&&(c(11),s("routerLink",d(2,f)),c(9),s("routerLink",d(3,O)))},dependencies:[M,D,N,E,m],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:43.75rem}sh-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}sh-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:18.75rem}sh-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{u as default};
@@ -1 +1 @@
1
- import{a as u}from"./chunk-LEOGK5HM.js";import{c as m}from"./chunk-BGTK25UG.js";import{C as o,E as p,M as h,R as N,W as r,l as c,la as s,na as l,v as f,z as d}from"./chunk-T2WO6CVD.js";var b=class a{#e=r(m);#o=r(u);serverState=this.#o.serverState;serverStateEffect=l(()=>{let t=this.#o.serverState();t?.LastNotificationUpdateID&&this.updateLastNotificationEventId(t?.LastNotificationUpdateID)});#s=-1;#a=s(!1);#t=s([]);#i=s([]);notifications=this.#t.asReadonly();init(){this.notifications().length===0&&this.getNotifications()}updateLastNotificationEventId(t){this.#s!==t&&(this.#s=t,this.getNotifications())}getNotifications(){this.#a.set(!0),this.#e.getApiV1Notifications().pipe(o(1),h(t=>this.#t.set(t)),p(()=>this.#a.set(!1))).subscribe()}getNofication(t){this.#e.getApiV1NotificationById({id:t}).pipe(o(1)).subscribe()}deleteNotification(t){let i=this.#t(),e=i[t];this.#i.set(i),i.splice(t,1),this.#t.set(i),this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(o(1)).subscribe({error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}deleteAllNotifications(){let t=this.#t();this.#i.set(t),this.#t.set([]);let i=t.map(e=>this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(d(()=>c(e))));f(i).pipe(o(1)).subscribe({next:e=>{let g=e.filter(n=>n!=null&&"ID"in n);this.#t.set(g),this.#i.set([])},error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}static \u0275fac=function(i){return new(i||a)};static \u0275prov=N({token:a,factory:a.\u0275fac,providedIn:"root"})};export{b as a};
1
+ import{a as u}from"./chunk-4SFVPIZK.js";import{c as m}from"./chunk-BGTK25UG.js";import{C as o,E as p,M as h,R as N,W as r,l as c,la as s,na as l,v as f,z as d}from"./chunk-T2WO6CVD.js";var b=class a{#e=r(m);#o=r(u);serverState=this.#o.serverState;serverStateEffect=l(()=>{let t=this.#o.serverState();t?.LastNotificationUpdateID&&this.updateLastNotificationEventId(t?.LastNotificationUpdateID)});#s=-1;#a=s(!1);#t=s([]);#i=s([]);notifications=this.#t.asReadonly();init(){this.notifications().length===0&&this.getNotifications()}updateLastNotificationEventId(t){this.#s!==t&&(this.#s=t,this.getNotifications())}getNotifications(){this.#a.set(!0),this.#e.getApiV1Notifications().pipe(o(1),h(t=>this.#t.set(t)),p(()=>this.#a.set(!1))).subscribe()}getNofication(t){this.#e.getApiV1NotificationById({id:t}).pipe(o(1)).subscribe()}deleteNotification(t){let i=this.#t(),e=i[t];this.#i.set(i),i.splice(t,1),this.#t.set(i),this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(o(1)).subscribe({error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}deleteAllNotifications(){let t=this.#t();this.#i.set(t),this.#t.set([]);let i=t.map(e=>this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(d(()=>c(e))));f(i).pipe(o(1)).subscribe({next:e=>{let g=e.filter(n=>n!=null&&"ID"in n);this.#t.set(g),this.#i.set([])},error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}static \u0275fac=function(i){return new(i||a)};static \u0275prov=N({token:a,factory:a.\u0275fac,providedIn:"root"})};export{b as a};
@@ -1 +1 @@
1
- import{a as F}from"./chunk-CQWNLLPV.js";import{a as ee}from"./chunk-5DJAX2HH.js";import{B as Y,L as Q,w as K,x as W,z as q}from"./chunk-HPNLQHW6.js";import{a as H,c as Z}from"./chunk-BGTK25UG.js";import{b as U,d as j}from"./chunk-A4LPGPDU.js";import{$ as p,Ab as c,Bb as m,Fb as y,Gb as D,Ib as f,Ma as M,Mc as P,Pa as r,Pb as G,Qb as V,Rb as _,Rc as S,Vb as u,W as T,Xb as s,aa as I,cb as E,ic as z,jc as A,kc as x,la as v,lc as J,rc as X,sb as d,sc as B,tb as N,tc as g,wb as b,xb as k,yb as O,zb as a}from"./chunk-T2WO6CVD.js";function oe(n,t){if(n&1&&(a(0,"div",11),A(1),c()),n&2){s();let e=g(0);r(),J(" ",e.Message," ")}}function ae(n,t){if(n&1&&(a(0,"div"),G(1,1),m(2,"a",15),V(),c()),n&2){let e=s();r(2),O("href",e.downloadLink(),M)}}function re(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s(),l=g(0);return I(i.doRepair(l.BackupID))}),_(1,2),c()}}function le(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s(),l=g(0);return I(i.doDownloadBugreport(l))}),_(1,3),c()}}function ce(n,t){if(n&1&&m(0,"sh-progress-bar",17),n&2){let e,o=s(2);O("value",(e=o.serverState())==null?null:e.UpdateDownloadProgress)}}function _e(n,t){if(n&1){let e=f();a(0,"div",11),y(1),_(2,4),D(),a(3,"a",16),A(4),c(),d(5,ce,1,1,"sh-progress-bar",17),a(6,"button",14),u("click",function(){p(e);let i=s();return I(i.doShowUpdate())}),_(7,5),c()()}if(n&2){let e,o,i=s(),l=g(0);r(3),O("href",(e=i.serverState())==null?null:e.UpdateDownloadLink,M),r(),x(l.Message),r(),N(((o=i.serverState())==null?null:o.UpdaterState)==="Downloading"?5:-1)}}function se(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s(),l=g(0);return I(i.doShowLog(l.BackupID))}),_(1,6),c()}}function de(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s();return I(i.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),_(1,7),c()}}function Ne(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s();return I(i.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),_(1,8),c()}}var Te={Error:"error",Warning:"warn",Information:"primary"},h=class n{#e=T(j);#a=T(U);#r=T(q);#t=T(W);#i=T(F);#n=T(Z);#o=v(null);serverState=this.#i.serverState;index=S.required();notification=S.required();downloadLink=P(()=>this.#o()||this.notification().DownloadLink||"");deleteNotificationByIndex(){this.#i.deleteNotification(this.index())}deleteAllNotifications(){this.#i.deleteAllNotifications()}getAlertType(t){return t&&Te[t]||"primary"}doShowLog(t){this.#n.getApiV1BackupByIdIsactive({id:t}).subscribe({next:e=>{this.#e.navigate(["/backup/"+t+"/log"])},error:e=>{if(e.status===404){let o={title:$localize`Error`,message:$localize`The backup is missing, has it been deleted?`,confirmText:$localize`OK`,cancelText:null};parseInt(t)+""!=t&&(o={title:$localize`Error`,message:$localize`The backup was temporary and does not exist anymore, so the log data is lost`,confirmText:$localize`OK`,cancelText:null}),this.#r.open(ee,{maxWidth:"550px",width:"100%",data:o})}else this.#t.error($localize`Failed to find backup: `+e.message)}})}doRepair(t){this.#n.postApiV1BackupByIdRepair({id:t}).subscribe({next:()=>{this.#t.success($localize`Backup repaired`),this.#e.navigate(["./"],{onSameUrlNavigation:"reload",relativeTo:this.#a})},error:e=>{this.#t.error($localize`Failed to repair backup: `+e.message)}})}doShowUpdate(){this.#e.navigate(["/about/changelog"])}doShowLink(t){window.open(t,"_blank")}doDownloadBugreport(t){let e=t.Action.slice(19);this.#n.postApiV1AuthIssuetokenByOperation({operation:"bugreport"}).subscribe({next:o=>{if(!o.Token){this.#t.error("Failed to get bug report URL: No token generated");return}let i=H.BASE||"",l=`${location.origin}${i}/api/v1/bugreport/${e}?token=${o.Token}`;t.DownloadLink=l,this.#o.set(l),this.triggerDownload(l)},error:o=>{this.#t.error(`Failed to get bug report URL: ${o.message}`)}})}triggerDownload(t){let e=document.createElement("a");e.href=t,e.download="",e.style.display="none",document.body.appendChild(e);try{e.click()}catch{}document.body.removeChild(e)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=E({type:n,selectors:[["app-notification"]],inputs:{index:[1,"index"],notification:[1,"notification"]},decls:16,vars:12,consts:()=>{let t;t=$localize`Dismiss`;let e;e=$localize` If the backup file was not downloaded automatically, ${"\uFFFD#2\uFFFD"}:START_LINK:right click and choose "Save as …"${"\uFFFD/#2\uFFFD"}:CLOSE_LINK:`;let o;o=$localize`Repair`;let i;i=$localize`Download`;let l;l=$localize`New update found:`;let L;L=$localize`Show Update`;let w;w=$localize`Show Log`;let R;R=$localize` Show Help `;let $;return $=$localize` Show Help `,[t,e,o,i,l,L,w,R,$,["ship-alert-title",""],["ship-alert-content","",1,"content"],[1,"message"],[1,"actions"],["shButton","",1,"small","outlined"],["shButton","",1,"small","outlined",3,"click"],["target","_blank",3,"href"],[3,"href"],[3,"value"]]},template:function(e,o){if(e&1){let i=f();X(0),a(1,"sh-alert")(2,"div",9),A(3),c(),a(4,"div",10),d(5,oe,2,1,"div",11),d(6,ae,3,1,"div"),a(7,"div",12),d(8,re,2,0,"button",13),d(9,le,2,0,"button",13),d(10,_e,8,3,"div",11),d(11,se,2,0,"button",13),d(12,de,2,0,"button",13),d(13,Ne,2,0,"button",13),a(14,"button",14),u("click",function(){return p(i),I(o.deleteNotificationByIndex())}),_(15,0),c()()()()}if(e&2){let i=B(o.notification());r(),z(o.getAlertType(i.Type)),r(2),x(i.Title),r(2),N(i.Action!=="update:new"&&i.Action!=="update:manual"?5:-1),r(),N(o.downloadLink()?6:-1),r(2),N(i.Message!=null&&i.Message.includes("please run repair")?8:-1),r(),N(i.Action!=null&&i.Action.startsWith("bug-report:created:")&&!o.downloadLink()?9:-1),r(),N(i.Action==="update:new"?10:-1),r(),N(i.Action==="backup:show-log"?11:-1),r(),N(i.Action==="config:issue:unencrypted-database"?12:-1),r(),N(i.Action==="config:issue:windows-folder-used"?13:-1)}},dependencies:[Q,Y,K],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-direction:column;gap:.5rem}.message[_ngcontent-%COMP%]{max-height:12.5rem;overflow:auto}"],changeDetection:0})};var Ce=(n,t)=>t.ID;function pe(n,t){if(n&1&&m(0,"app-notification",1),n&2){let e=t.$implicit,o=t.$index;O("index",o)("notification",e)}}function Ie(n,t){n&1&&(a(0,"div",2)(1,"p"),_(2,0),c()())}var te=class n{#e=T(F);notificationFilterPredicate=S();notifications=P(()=>{let t=this.notificationFilterPredicate()?.predicate,e=this.#e.notifications();return typeof t!="function"?e:e.filter(t)});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=E({type:n,selectors:[["app-notifications"]],inputs:{notificationFilterPredicate:[1,"notificationFilterPredicate"]},decls:3,vars:1,consts:()=>{let t;return t=$localize`No more notifications`,[t,[3,"index","notification"],[1,"notification-list"]]},template:function(e,o){e&1&&b(0,pe,1,2,"app-notification",1,Ce,!1,Ie,3,0,"div",2),e&2&&k(o.notifications())},dependencies:[h],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;justify-content:flex-end}.notification-list[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};export{h as a,te as b};
1
+ import{a as F}from"./chunk-7M5Z35KN.js";import{a as ee}from"./chunk-5DJAX2HH.js";import{B as Y,L as Q,w as K,x as W,z as q}from"./chunk-HPNLQHW6.js";import{a as H,c as Z}from"./chunk-BGTK25UG.js";import{b as U,d as j}from"./chunk-A4LPGPDU.js";import{$ as p,Ab as c,Bb as m,Fb as y,Gb as D,Ib as f,Ma as M,Mc as P,Pa as r,Pb as G,Qb as V,Rb as _,Rc as S,Vb as u,W as T,Xb as s,aa as I,cb as E,ic as z,jc as A,kc as x,la as v,lc as J,rc as X,sb as d,sc as B,tb as N,tc as g,wb as b,xb as k,yb as O,zb as a}from"./chunk-T2WO6CVD.js";function oe(n,t){if(n&1&&(a(0,"div",11),A(1),c()),n&2){s();let e=g(0);r(),J(" ",e.Message," ")}}function ae(n,t){if(n&1&&(a(0,"div"),G(1,1),m(2,"a",15),V(),c()),n&2){let e=s();r(2),O("href",e.downloadLink(),M)}}function re(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s(),l=g(0);return I(i.doRepair(l.BackupID))}),_(1,2),c()}}function le(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s(),l=g(0);return I(i.doDownloadBugreport(l))}),_(1,3),c()}}function ce(n,t){if(n&1&&m(0,"sh-progress-bar",17),n&2){let e,o=s(2);O("value",(e=o.serverState())==null?null:e.UpdateDownloadProgress)}}function _e(n,t){if(n&1){let e=f();a(0,"div",11),y(1),_(2,4),D(),a(3,"a",16),A(4),c(),d(5,ce,1,1,"sh-progress-bar",17),a(6,"button",14),u("click",function(){p(e);let i=s();return I(i.doShowUpdate())}),_(7,5),c()()}if(n&2){let e,o,i=s(),l=g(0);r(3),O("href",(e=i.serverState())==null?null:e.UpdateDownloadLink,M),r(),x(l.Message),r(),N(((o=i.serverState())==null?null:o.UpdaterState)==="Downloading"?5:-1)}}function se(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s(),l=g(0);return I(i.doShowLog(l.BackupID))}),_(1,6),c()}}function de(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s();return I(i.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),_(1,7),c()}}function Ne(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s();return I(i.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),_(1,8),c()}}var Te={Error:"error",Warning:"warn",Information:"primary"},h=class n{#e=T(j);#a=T(U);#r=T(q);#t=T(W);#i=T(F);#n=T(Z);#o=v(null);serverState=this.#i.serverState;index=S.required();notification=S.required();downloadLink=P(()=>this.#o()||this.notification().DownloadLink||"");deleteNotificationByIndex(){this.#i.deleteNotification(this.index())}deleteAllNotifications(){this.#i.deleteAllNotifications()}getAlertType(t){return t&&Te[t]||"primary"}doShowLog(t){this.#n.getApiV1BackupByIdIsactive({id:t}).subscribe({next:e=>{this.#e.navigate(["/backup/"+t+"/log"])},error:e=>{if(e.status===404){let o={title:$localize`Error`,message:$localize`The backup is missing, has it been deleted?`,confirmText:$localize`OK`,cancelText:null};parseInt(t)+""!=t&&(o={title:$localize`Error`,message:$localize`The backup was temporary and does not exist anymore, so the log data is lost`,confirmText:$localize`OK`,cancelText:null}),this.#r.open(ee,{maxWidth:"550px",width:"100%",data:o})}else this.#t.error($localize`Failed to find backup: `+e.message)}})}doRepair(t){this.#n.postApiV1BackupByIdRepair({id:t}).subscribe({next:()=>{this.#t.success($localize`Backup repaired`),this.#e.navigate(["./"],{onSameUrlNavigation:"reload",relativeTo:this.#a})},error:e=>{this.#t.error($localize`Failed to repair backup: `+e.message)}})}doShowUpdate(){this.#e.navigate(["/about/changelog"])}doShowLink(t){window.open(t,"_blank")}doDownloadBugreport(t){let e=t.Action.slice(19);this.#n.postApiV1AuthIssuetokenByOperation({operation:"bugreport"}).subscribe({next:o=>{if(!o.Token){this.#t.error("Failed to get bug report URL: No token generated");return}let i=H.BASE||"",l=`${location.origin}${i}/api/v1/bugreport/${e}?token=${o.Token}`;t.DownloadLink=l,this.#o.set(l),this.triggerDownload(l)},error:o=>{this.#t.error(`Failed to get bug report URL: ${o.message}`)}})}triggerDownload(t){let e=document.createElement("a");e.href=t,e.download="",e.style.display="none",document.body.appendChild(e);try{e.click()}catch{}document.body.removeChild(e)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=E({type:n,selectors:[["app-notification"]],inputs:{index:[1,"index"],notification:[1,"notification"]},decls:16,vars:12,consts:()=>{let t;t=$localize`Dismiss`;let e;e=$localize` If the backup file was not downloaded automatically, ${"\uFFFD#2\uFFFD"}:START_LINK:right click and choose "Save as …"${"\uFFFD/#2\uFFFD"}:CLOSE_LINK:`;let o;o=$localize`Repair`;let i;i=$localize`Download`;let l;l=$localize`New update found:`;let L;L=$localize`Show Update`;let w;w=$localize`Show Log`;let R;R=$localize` Show Help `;let $;return $=$localize` Show Help `,[t,e,o,i,l,L,w,R,$,["ship-alert-title",""],["ship-alert-content","",1,"content"],[1,"message"],[1,"actions"],["shButton","",1,"small","outlined"],["shButton","",1,"small","outlined",3,"click"],["target","_blank",3,"href"],[3,"href"],[3,"value"]]},template:function(e,o){if(e&1){let i=f();X(0),a(1,"sh-alert")(2,"div",9),A(3),c(),a(4,"div",10),d(5,oe,2,1,"div",11),d(6,ae,3,1,"div"),a(7,"div",12),d(8,re,2,0,"button",13),d(9,le,2,0,"button",13),d(10,_e,8,3,"div",11),d(11,se,2,0,"button",13),d(12,de,2,0,"button",13),d(13,Ne,2,0,"button",13),a(14,"button",14),u("click",function(){return p(i),I(o.deleteNotificationByIndex())}),_(15,0),c()()()()}if(e&2){let i=B(o.notification());r(),z(o.getAlertType(i.Type)),r(2),x(i.Title),r(2),N(i.Action!=="update:new"&&i.Action!=="update:manual"?5:-1),r(),N(o.downloadLink()?6:-1),r(2),N(i.Message!=null&&i.Message.includes("please run repair")?8:-1),r(),N(i.Action!=null&&i.Action.startsWith("bug-report:created:")&&!o.downloadLink()?9:-1),r(),N(i.Action==="update:new"?10:-1),r(),N(i.Action==="backup:show-log"?11:-1),r(),N(i.Action==="config:issue:unencrypted-database"?12:-1),r(),N(i.Action==="config:issue:windows-folder-used"?13:-1)}},dependencies:[Q,Y,K],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-direction:column;gap:.5rem}.message[_ngcontent-%COMP%]{max-height:12.5rem;overflow:auto}"],changeDetection:0})};var Ce=(n,t)=>t.ID;function pe(n,t){if(n&1&&m(0,"app-notification",1),n&2){let e=t.$implicit,o=t.$index;O("index",o)("notification",e)}}function Ie(n,t){n&1&&(a(0,"div",2)(1,"p"),_(2,0),c()())}var te=class n{#e=T(F);notificationFilterPredicate=S();notifications=P(()=>{let t=this.notificationFilterPredicate()?.predicate,e=this.#e.notifications();return typeof t!="function"?e:e.filter(t)});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=E({type:n,selectors:[["app-notifications"]],inputs:{notificationFilterPredicate:[1,"notificationFilterPredicate"]},decls:3,vars:1,consts:()=>{let t;return t=$localize`No more notifications`,[t,[3,"index","notification"],[1,"notification-list"]]},template:function(e,o){e&1&&b(0,pe,1,2,"app-notification",1,Ce,!1,Ie,3,0,"div",2),e&2&&k(o.notifications())},dependencies:[h],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;justify-content:flex-end}.notification-list[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};export{h as a,te as b};