@duplicati/ngclient 0.0.142 → 0.0.144

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 (130) hide show
  1. package/assets/dest-icons/aliyun.png +0 -0
  2. package/assets/dest-icons/aws.png +0 -0
  3. package/assets/dest-icons/azure.png +0 -0
  4. package/assets/dest-icons/backblaze.png +0 -0
  5. package/assets/dest-icons/box-com.png +0 -0
  6. package/assets/dest-icons/dropbox.png +0 -0
  7. package/assets/dest-icons/external-harddrive.png +0 -0
  8. package/assets/dest-icons/file-jump.png +0 -0
  9. package/assets/dest-icons/file-system.png +0 -0
  10. package/assets/dest-icons/filen.png +0 -0
  11. package/assets/dest-icons/ftp.png +0 -0
  12. package/assets/dest-icons/google-cloud.png +0 -0
  13. package/assets/dest-icons/google-drive.png +0 -0
  14. package/assets/dest-icons/idrive-e2.png +0 -0
  15. package/assets/dest-icons/jottacloud.png +0 -0
  16. package/assets/dest-icons/mega-nz.png +0 -0
  17. package/assets/dest-icons/nas.png +0 -0
  18. package/assets/dest-icons/office-365.png +0 -0
  19. package/assets/dest-icons/one-drive.png +0 -0
  20. package/assets/dest-icons/open-stack.png +0 -0
  21. package/assets/dest-icons/pcloud.png +0 -0
  22. package/assets/dest-icons/rackspace.png +0 -0
  23. package/assets/dest-icons/rclone.png +0 -0
  24. package/assets/dest-icons/sftp.png +0 -0
  25. package/assets/dest-icons/sharepoint.png +0 -0
  26. package/assets/dest-icons/sia-cloud.png +0 -0
  27. package/assets/dest-icons/sia_logo_dark.92db63f5.svg +6 -0
  28. package/assets/dest-icons/smb.png +0 -0
  29. package/assets/dest-icons/ssh.png +0 -0
  30. package/assets/dest-icons/storj.png +0 -0
  31. package/assets/dest-icons/tahoelafs.png +0 -0
  32. package/assets/dest-icons/tencent-cloud.png +0 -0
  33. package/assets/dest-icons/webdav.png +0 -0
  34. package/{chunk-SWLG7DS7.js → chunk-2CTSAUUN.js} +1 -1
  35. package/chunk-2NU5Y4V7.js +1 -0
  36. package/{chunk-JB75BUPF.js → chunk-3UN32GIC.js} +1 -1
  37. package/{chunk-GFSWKDRL.js → chunk-5PSLWJTF.js} +1 -1
  38. package/{chunk-OWAZS6AA.js → chunk-66BSPEOQ.js} +1 -1
  39. package/{chunk-3L3SGYRX.js → chunk-6GC5VKTI.js} +1 -1
  40. package/{chunk-UBFQDZB5.js → chunk-6WWCFRZ5.js} +1 -1
  41. package/{chunk-65QCOV7I.js → chunk-6XBSQDXR.js} +1 -1
  42. package/chunk-74NKDA4G.js +1 -0
  43. package/{chunk-PEWNHZLZ.js → chunk-7X7K5IXS.js} +1 -1
  44. package/chunk-AB2L3URR.js +1 -0
  45. package/{chunk-O2RJYKE4.js → chunk-AO4O42CM.js} +1 -1
  46. package/{chunk-DUKSWBLV.js → chunk-ARXKB7WH.js} +1 -1
  47. package/{chunk-GXARFIQG.js → chunk-B7NRTB6T.js} +1 -1
  48. package/{chunk-PWV3UKIW.js → chunk-BGUKMOKY.js} +1 -1
  49. package/{chunk-VMNRHHVY.js → chunk-BIETD4DI.js} +1 -1
  50. package/{chunk-3BODZQHK.js → chunk-BXRW2LGW.js} +1 -1
  51. package/chunk-C2L3SQU3.js +1 -0
  52. package/chunk-CDRDYQEV.js +1 -0
  53. package/{chunk-QIQH4ASK.js → chunk-CFNP4FBG.js} +1 -1
  54. package/{chunk-ZTHT3VVI.js → chunk-CTEFMU6N.js} +1 -1
  55. package/chunk-ERKYRXHP.js +8 -0
  56. package/chunk-ETCRT3EV.js +1 -0
  57. package/{chunk-WEAHBXR2.js → chunk-FFY3NRCC.js} +1 -1
  58. package/{chunk-Z2U5JI53.js → chunk-FVE45QKX.js} +1 -1
  59. package/{chunk-ERIXY2FW.js → chunk-GCZWFRPZ.js} +1 -1
  60. package/{chunk-LIJJPCCP.js → chunk-GDBU3Z7P.js} +1 -1
  61. package/{chunk-HBKQWKW7.js → chunk-GHFYBZHQ.js} +1 -1
  62. package/{chunk-X5ISYEI2.js → chunk-GO22DJ44.js} +1 -1
  63. package/chunk-HKZX6OB5.js +1 -0
  64. package/{chunk-2G6UXMJB.js → chunk-IGOZJJE3.js} +1 -1
  65. package/{chunk-C32RWSXV.js → chunk-J2MHNGNQ.js} +1 -1
  66. package/{chunk-QM6X5ZEC.js → chunk-J3BBLPAD.js} +1 -1
  67. package/{chunk-BMYQZKPC.js → chunk-J5PSMGKZ.js} +1 -1
  68. package/{chunk-QC2NBFUR.js → chunk-JA7OQSO3.js} +1 -1
  69. package/{chunk-EDW3WHAP.js → chunk-JIHMT35A.js} +1 -1
  70. package/{chunk-UV3WAAEX.js → chunk-K3ZQ67VT.js} +1 -1
  71. package/{chunk-QD2VHHZY.js → chunk-KGJAK6OP.js} +1 -1
  72. package/{chunk-PHIECUWX.js → chunk-KOVQRACM.js} +1 -1
  73. package/{chunk-LAUG2PZW.js → chunk-LEXA637O.js} +1 -1
  74. package/chunk-ODVCGM2O.js +1 -0
  75. package/{chunk-PMZGBC4U.js → chunk-OTMW34HV.js} +1 -1
  76. package/{chunk-P2DII6CV.js → chunk-OXOOR7I4.js} +1 -1
  77. package/{chunk-V7UTQSCX.js → chunk-PT7UQJD4.js} +1 -1
  78. package/chunk-QNOIURSX.js +1 -0
  79. package/{chunk-BVEALUGN.js → chunk-QY6E755W.js} +1 -1
  80. package/{chunk-CNUHBPET.js → chunk-SCOG2I64.js} +1 -1
  81. package/{chunk-PJBVFTZK.js → chunk-T4TFHAZT.js} +1 -1
  82. package/{chunk-OBJPWKDY.js → chunk-TJOWPBPB.js} +1 -1
  83. package/{chunk-X6QMUQPK.js → chunk-UGLRUY6T.js} +1 -1
  84. package/{chunk-UCZV35IF.js → chunk-UT6XGEMV.js} +1 -1
  85. package/chunk-UUODEERG.js +1 -0
  86. package/{chunk-OICFVPYU.js → chunk-UW4GBMEP.js} +1 -1
  87. package/{chunk-OAW2NFZX.js → chunk-WHKW5IYF.js} +1 -1
  88. package/{chunk-VC6TE2B6.js → chunk-WWFNG47J.js} +1 -1
  89. package/{chunk-ZGU7OKMF.js → chunk-X3IA226Q.js} +1 -1
  90. package/{chunk-TAPLSJ2K.js → chunk-XHUUCB2W.js} +1 -1
  91. package/{chunk-5SPGCYAQ.js → chunk-XNVRJH42.js} +1 -1
  92. package/{chunk-YIV6PKM7.js → chunk-XQ4CAUD4.js} +1 -1
  93. package/{chunk-47WDRGVN.js → chunk-ZGAC2JKG.js} +1 -1
  94. package/chunk-ZVIRETHC.js +1 -0
  95. package/index.html +1 -1
  96. package/locale/messages.cs.json +1 -0
  97. package/locale/messages.da.json +3 -20
  98. package/locale/messages.de.json +126 -104
  99. package/locale/messages.en_GB.json +1 -0
  100. package/locale/messages.es.json +1 -0
  101. package/locale/messages.fi.json +1 -0
  102. package/locale/messages.fr.json +1 -0
  103. package/locale/messages.hu.json +1 -0
  104. package/locale/messages.it.json +144 -112
  105. package/locale/messages.ja_JP.json +1 -0
  106. package/locale/messages.nl_NL.json +7 -106
  107. package/locale/messages.pl.json +29 -0
  108. package/locale/messages.pt.json +1 -0
  109. package/locale/messages.pt_BR.json +1 -0
  110. package/locale/messages.ru.json +1 -0
  111. package/locale/messages.sr_RS.json +1 -0
  112. package/locale/messages.sv_SE.json +1 -0
  113. package/locale/messages.zh-Hans.json +3 -97
  114. package/locale/messages.zh_CN.json +1 -88
  115. package/locale/messages.zh_TW.json +2 -0
  116. package/main-SUSCPR3H.js +1 -0
  117. package/package.json +1 -1
  118. package/chunk-4URGDROZ.js +0 -1
  119. package/chunk-5DO6JZVF.js +0 -1
  120. package/chunk-5OIM6PRU.js +0 -1
  121. package/chunk-5SH42EY6.js +0 -1
  122. package/chunk-7765XHNC.js +0 -8
  123. package/chunk-ATYS35R4.js +0 -1
  124. package/chunk-E6UP7FUD.js +0 -1
  125. package/chunk-JA5QSJM3.js +0 -1
  126. package/chunk-JF4IGUR6.js +0 -1
  127. package/chunk-LT2T7TXS.js +0 -1
  128. package/chunk-R3OYJX7V.js +0 -1
  129. package/chunk-YCTTQQ6B.js +0 -1
  130. package/main-TVE62AWE.js +0 -1
@@ -1 +1 @@
1
- import{a as le}from"./chunk-VC6TE2B6.js";import{a as re,b as E}from"./chunk-QGFC5ZUR.js";import"./chunk-5SPGCYAQ.js";import{a as ae}from"./chunk-JB75BUPF.js";import"./chunk-P2DII6CV.js";import{a as P}from"./chunk-GUH5TMOS.js";import"./chunk-RHW5QVAY.js";import"./chunk-OWAZS6AA.js";import"./chunk-CWBEE627.js";import{c as ie,e as ne,i as oe,s as se}from"./chunk-USU2EHJV.js";import"./chunk-47WDRGVN.js";import"./chunk-4URGDROZ.js";import{b as j,e as J}from"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import{C as ee,a as Q,e as Y,g as Z,l as x}from"./chunk-WRNQOX5R.js";import{h as te}from"./chunk-QM6X5ZEC.js";import"./chunk-B5FUQFEQ.js";import"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-73RDJP55.js";import{Ab as n,Bb as i,Cb as _,D as G,F as S,G as L,H as p,Oc as b,Pc as m,Qb as u,Ra as r,Rb as h,Sb as T,Tb as H,Ub as K,Wb as g,_ as F,bb as V,ic as D,kc as X,lc as C,oa as s,qc as z,r as y,rc as W,sc as q,ub as w,vb as U,zb as d}from"./chunk-QDFCX6XE.js";import"./chunk-EUDKD2JW.js";function ce(c,t){c&1&&(n(0,"sh-icon",19),C(1,"spinner"),i())}function _e(c,t){c&1&&(n(0,"sh-icon",20),C(1,"check"),i())}function de(c,t){c&1&&(n(0,"sh-icon",21),C(1,"warning"),i()),c&2&&d("shTooltip","File not found")}function ue(c,t){let a=re(c).pipe(G(t),L());return E(a,{initialValue:c()})}var f=class c{#o=F(j);#s=F(ae);#e=F(te);#a=F(Y);#t=s("");backupId=E(this.#o.params.pipe(y(t=>t.id)));activeBackup=b(()=>this.#s.backups().find(t=>t.Backup?.ID===this.backupId()));backupFilePath=s("");lastValidatedPath=s("");isValidatedPath=b(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=b(()=>this.backupFilePath()!==this.#t());isValidatingPath=s(!1);#i=ue(this.backupFilePath,500);#n=s(!1);isWaitingForValidation=b(()=>this.#i()!=this.backupFilePath()||this.isValidatingPath());backupFilePathEffect=m(()=>{let t=this.#i(),a=this.activeBackup(),e=this.#n();t!==""&&(this.isValidatingPath.set(!0),this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).pipe(S(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=m(()=>{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(S(1),p(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(t=null){this.isValidatedPath()?this.#a.open(P,{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(S(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(S(1),p(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t())}saveDatabasePath(t=null){this.isValidatedPath()?this.#a.open(P,{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(S(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||c)};static \u0275cmp=V({type:c,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 A;A=$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 M;M=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Repair `;let B;B=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let N;N=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Restore (delete and repair) `;let I;I=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:file-plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Create bug report database `;let $;$=$localize`Placement`;let R;R=$localize`${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON:backspace${"\uFFFD/#40\uFFFD"}:CLOSE_TAG_SH_ICON: Reset `;let v;v=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Save `;let k;k=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Save & Repair `;let O;return O=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON: Move existing database `,[t,a,e,o,A,M,B,N,I,$,R,v,k,O,[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&&(_(0,"app-status-bar"),n(1,"section")(2,"div",14)(3,"button",15),u(4,0),_(5,"sh-icon"),h(),i()(),n(6,"article")(7,"h1"),T(8,1),i(),n(9,"p"),T(10,2),i()(),n(11,"article")(12,"h2"),T(13,3),i(),n(14,"p"),T(15,4),i(),n(16,"div",16)(17,"button",17),g("click",function(){return e.repairDatabase()}),u(18,5),_(19,"sh-icon"),h(),i(),n(20,"button",17),g("click",function(){return e.deleteDatabase()}),u(21,6),_(22,"sh-icon"),h(),i(),n(23,"button",17),g("click",function(){return e.restoreDatabase()}),u(24,7),_(25,"sh-icon"),h(),i(),n(26,"button",17),g("click",function(){return e.createErrorReport()}),u(27,8),_(28,"sh-icon"),h(),i()()(),n(29,"article")(30,"h2"),T(31,9),i(),n(32,"sh-form-field")(33,"input",18),q("ngModelChange",function(A){return W(e.backupFilePath,A)||(e.backupFilePath=A),A}),i(),w(34,ce,2,0,"sh-icon",19)(35,_e,2,0,"sh-icon",20)(36,de,2,1,"sh-icon",21),i(),n(37,"div",22)(38,"button",17),g("click",function(){return e.resetDatabasePath()}),u(39,10),_(40,"sh-icon"),h(),i(),n(41,"button",17),g("click",function(){return e.saveDatabasePath()}),u(42,11),_(43,"sh-icon"),h(),i(),n(44,"button",17),g("click",function(){return e.saveAndRepairDatabasePath()}),u(45,12),_(46,"sh-icon"),h(),i(),n(47,"button",17),g("click",function(){return e.moveDatabasePath()}),u(48,13),_(49,"sh-icon"),h(),i()()()()),a&2){let o;r(8),H((o=e.activeBackup())==null||o.Backup==null?null:o.Backup.Name),K(8),r(9),D("loader",e.isRepairing()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),r(3),D("loader",e.isDeleting()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),r(3),D("loader",e.isRestoring()),d("disabled",e.pathHasChanged()),r(3),D("loader",e.isCreatingBugReport()),d("disabled",e.isCreatingBugReport()||!e.isValidatedPath()||e.pathHasChanged()),r(6),X(e.isValidatedPath()?"success":"error"),r(),z("ngModel",e.backupFilePath),r(),U(e.isWaitingForValidation()?34:e.isValidatedPath()?35:36),r(4),d("disabled",!e.pathHasChanged()),r(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),r(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),r(3),d("disabled",!e.pathHasChanged()||e.isValidatedPath()||e.isWaitingForValidation())}},dependencies:[se,ie,ne,oe,le,Z,x,Q,ee,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{f as default};
1
+ import{a as le}from"./chunk-WWFNG47J.js";import{a as re,b as E}from"./chunk-QGFC5ZUR.js";import"./chunk-XNVRJH42.js";import{a as ae}from"./chunk-3UN32GIC.js";import"./chunk-OXOOR7I4.js";import{a as P}from"./chunk-GUH5TMOS.js";import"./chunk-RHW5QVAY.js";import"./chunk-66BSPEOQ.js";import"./chunk-CWBEE627.js";import{c as ie,e as ne,i as oe,s as se}from"./chunk-USU2EHJV.js";import"./chunk-ZGAC2JKG.js";import"./chunk-ETCRT3EV.js";import{b as j,e as J}from"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import{C as ee,a as Q,e as Y,g as Z,l as x}from"./chunk-WRNQOX5R.js";import{h as te}from"./chunk-J3BBLPAD.js";import"./chunk-B5FUQFEQ.js";import"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-73RDJP55.js";import{Ab as n,Bb as i,Cb as _,D as G,F as S,G as L,H as p,Oc as b,Pc as m,Qb as u,Ra as r,Rb as h,Sb as T,Tb as H,Ub as K,Wb as g,_ as F,bb as V,ic as D,kc as X,lc as C,oa as s,qc as z,r as y,rc as W,sc as q,ub as w,vb as U,zb as d}from"./chunk-QDFCX6XE.js";import"./chunk-EUDKD2JW.js";function ce(c,t){c&1&&(n(0,"sh-icon",19),C(1,"spinner"),i())}function _e(c,t){c&1&&(n(0,"sh-icon",20),C(1,"check"),i())}function de(c,t){c&1&&(n(0,"sh-icon",21),C(1,"warning"),i()),c&2&&d("shTooltip","File not found")}function ue(c,t){let a=re(c).pipe(G(t),L());return E(a,{initialValue:c()})}var f=class c{#o=F(j);#s=F(ae);#e=F(te);#a=F(Y);#t=s("");backupId=E(this.#o.params.pipe(y(t=>t.id)));activeBackup=b(()=>this.#s.backups().find(t=>t.Backup?.ID===this.backupId()));backupFilePath=s("");lastValidatedPath=s("");isValidatedPath=b(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=b(()=>this.backupFilePath()!==this.#t());isValidatingPath=s(!1);#i=ue(this.backupFilePath,500);#n=s(!1);isWaitingForValidation=b(()=>this.#i()!=this.backupFilePath()||this.isValidatingPath());backupFilePathEffect=m(()=>{let t=this.#i(),a=this.activeBackup(),e=this.#n();t!==""&&(this.isValidatingPath.set(!0),this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).pipe(S(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=m(()=>{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(S(1),p(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(t=null){this.isValidatedPath()?this.#a.open(P,{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(S(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(S(1),p(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t())}saveDatabasePath(t=null){this.isValidatedPath()?this.#a.open(P,{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(S(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||c)};static \u0275cmp=V({type:c,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 A;A=$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 M;M=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Repair `;let B;B=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let N;N=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Restore (delete and repair) `;let I;I=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:file-plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Create bug report database `;let $;$=$localize`Placement`;let R;R=$localize`${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON:backspace${"\uFFFD/#40\uFFFD"}:CLOSE_TAG_SH_ICON: Reset `;let v;v=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Save `;let k;k=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Save & Repair `;let O;return O=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON: Move existing database `,[t,a,e,o,A,M,B,N,I,$,R,v,k,O,[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&&(_(0,"app-status-bar"),n(1,"section")(2,"div",14)(3,"button",15),u(4,0),_(5,"sh-icon"),h(),i()(),n(6,"article")(7,"h1"),T(8,1),i(),n(9,"p"),T(10,2),i()(),n(11,"article")(12,"h2"),T(13,3),i(),n(14,"p"),T(15,4),i(),n(16,"div",16)(17,"button",17),g("click",function(){return e.repairDatabase()}),u(18,5),_(19,"sh-icon"),h(),i(),n(20,"button",17),g("click",function(){return e.deleteDatabase()}),u(21,6),_(22,"sh-icon"),h(),i(),n(23,"button",17),g("click",function(){return e.restoreDatabase()}),u(24,7),_(25,"sh-icon"),h(),i(),n(26,"button",17),g("click",function(){return e.createErrorReport()}),u(27,8),_(28,"sh-icon"),h(),i()()(),n(29,"article")(30,"h2"),T(31,9),i(),n(32,"sh-form-field")(33,"input",18),q("ngModelChange",function(A){return W(e.backupFilePath,A)||(e.backupFilePath=A),A}),i(),w(34,ce,2,0,"sh-icon",19)(35,_e,2,0,"sh-icon",20)(36,de,2,1,"sh-icon",21),i(),n(37,"div",22)(38,"button",17),g("click",function(){return e.resetDatabasePath()}),u(39,10),_(40,"sh-icon"),h(),i(),n(41,"button",17),g("click",function(){return e.saveDatabasePath()}),u(42,11),_(43,"sh-icon"),h(),i(),n(44,"button",17),g("click",function(){return e.saveAndRepairDatabasePath()}),u(45,12),_(46,"sh-icon"),h(),i(),n(47,"button",17),g("click",function(){return e.moveDatabasePath()}),u(48,13),_(49,"sh-icon"),h(),i()()()()),a&2){let o;r(8),H((o=e.activeBackup())==null||o.Backup==null?null:o.Backup.Name),K(8),r(9),D("loader",e.isRepairing()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),r(3),D("loader",e.isDeleting()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),r(3),D("loader",e.isRestoring()),d("disabled",e.pathHasChanged()),r(3),D("loader",e.isCreatingBugReport()),d("disabled",e.isCreatingBugReport()||!e.isValidatedPath()||e.pathHasChanged()),r(6),X(e.isValidatedPath()?"success":"error"),r(),z("ngModel",e.backupFilePath),r(),U(e.isWaitingForValidation()?34:e.isValidatedPath()?35:36),r(4),d("disabled",!e.pathHasChanged()),r(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),r(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),r(3),d("disabled",!e.pathHasChanged()||e.isValidatedPath()||e.isWaitingForValidation())}},dependencies:[se,ie,ne,oe,le,Z,x,Q,ee,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{f as default};
@@ -0,0 +1,8 @@
1
+ import{a as it}from"./chunk-6GC5VKTI.js";import{a as tt,b as nt}from"./chunk-CZLLEVMJ.js";import{a as X,b as Ze,c as Je}from"./chunk-CDRDYQEV.js";import{h as et}from"./chunk-GDBU3Z7P.js";import{a as Ye}from"./chunk-QY6E755W.js";import{a as k}from"./chunk-GUH5TMOS.js";import{a as K}from"./chunk-66BSPEOQ.js";import{a as qe,c as ue,e as Ce,i as ge,k as We,s as fe,t as Qe}from"./chunk-USU2EHJV.js";import{A as Ue,C as He,a as pe,e as ke,g as me,l as Re,o as Be,p as ze,t as Ke,z as Xe}from"./chunk-WRNQOX5R.js";import{h as je}from"./chunk-J3BBLPAD.js";import{ea as Ge}from"./chunk-WJPLJKPQ.js";import{Ab as _,Ac as de,Bb as d,Cb as z,Cc as ce,Gb as re,Hb as W,Hc as J,Ib as le,Jb as N,Oc as P,Pc as Y,Qb as Q,Ra as l,Rb as Z,Sb as De,Uc as ee,V as oe,Wb as x,Xc as be,Yb as s,Zb as we,_ as M,_b as Ae,ac as Fe,bb as ae,bc as Oe,cc as Me,ea as T,f as ie,fa as S,gb as G,gc as B,ia as ye,ic as se,lc as p,nc as F,oa as b,oc as _e,qc as Ve,rc as ve,sc as Le,tc as L,ub as g,uc as A,vb as f,vc as c,wb as H,xb as j,yb as q,yc as Pe,zb as m,zc as $e}from"./chunk-QDFCX6XE.js";import{a as O,b as ne}from"./chunk-EUDKD2JW.js";var ot=class n{#t=M(je);#e=M(ke);#n=M(K);testDestination(t,e,o,i){return this.#n.hasV2TestOperations()?this.testDestinationv2(t,e,o,i):this.testDestinationv1(t,e,o,i)}testDestinationv2(t,e,o,i){return new ie(a=>{this.#t.postApiV2DestinationTest({requestBody:{DestinationUrl:t,AutoCreate:!1,Options:null}}).subscribe({next:r=>{if(r.Success){this.emitSuccessV2(a,t,e,r);return}this.handleGenericError(a,t,e,r.Error??"Unknown error",i)},error:r=>{let u=r?.error?.body;if(u?.Data?.FolderExists===!1||u?.StatusCode==="missing-folder"){o?this.handleMissingFolder(a,t,e):this.handleGenericError(a,t,e,$localize`The remote destination folder does not exist.`,i);return}if(u?.Data?.HostCertificate){this.handleMissingCertificate(a,t,e,u.Data?.HostCertificate);return}if(u?.Data?.ReportedHostKey){this.handleIncorrectKey(a,t,e,u.Data.ReportedHostKey,u.Data.AcceptedHostKey??null);return}this.handleGenericError(a,t,e,r?.message??"Unknown error",i)}})})}testDestinationv1(t,e,o,i){return new ie(a=>{this.#t.postApiV1RemoteoperationTest({requestBody:{path:t}}).subscribe({next:r=>{a.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:e}),a.complete()},error:r=>{this.handleDestinationErrorv1(r.message,t,e,o,i).subscribe(u=>{a.next(u)})}})})}handleMissingFolder(t,e,o){this.#e.open(k,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`,confirmText:$localize`Create folder`,cancelText:$localize`Cancel`},closed:i=>{if(!i){this.reportNoAction(t,e,o,$localize`The remote folder does not exist.`);return}this.#n.hasV2TestOperations()?this.#t.postApiV2DestinationTest({requestBody:{DestinationUrl:e,AutoCreate:!0,Options:null}}).subscribe({next:a=>{if(a.Success){this.emitSuccessV2(t,e,o,a);return}else this.handleFolderCreateFailure(t,e,o,a.Error??$localize`Unknown error`)},error:a=>{this.handleFolderCreateFailure(t,e,o,a.message??$localize`Unknown error`)}}):this.#t.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe({next:()=>{this.handleFolderCreated(t,e,o)},error:a=>{this.handleFolderCreateFailure(t,e,o,a.message??$localize`Unknown error`)}})}})}handleFolderCreateFailure(t,e,o,i){this.#e.open(k,{data:{title:$localize`Error creating folder`,message:$localize`The remote destination folder could not be created. ${i}`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:o}),t.complete()}})}emitSuccessV2(t,e,o,i){t.next({action:"success",targetUrl:e,testAgain:!1,destinationIndex:o,anyFilesFound:!i.Data?.FolderIsEmpty,containsBackup:i.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:i.Data?.FolderContainsEncryptedBackupFiles??void 0}),t.complete()}handleFolderCreated(t,e,o){this.#e.open(k,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"test-again",targetUrl:e,testAgain:!0,destinationIndex:o}),t.complete()}})}reportNoAction(t,e,o,i){t.next({action:"generic-error",targetUrl:e,errorMessage:i,testAgain:!1,destinationIndex:o}),t.complete()}handleMissingCertificate(t,e,o,i){this.#e.open(k,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
2
+ If this is a self-signed certificate, you can choose to trust this certificate.
3
+ The server reported the certificate hash: ${i}`,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:a=>{if(!a){this.reportNoAction(t,e,o,$localize`The server certificate is not trusted.`);return}t.next({action:"trust-cert",targetUrl:e,testAgain:!0,certData:i,destinationIndex:o}),t.complete()}})}handleIncorrectKey(t,e,o,i,a){a?this.#e.open(k,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
4
+ otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
5
+ Do you want to REPLACE your CURRENT host key ${a}
6
+ with the REPORTED host key: ${i}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:r=>{if(!r){this.reportNoAction(t,e,o,$localize`The host key was not approved.`);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:o}),t.complete()}}):this.#e.open(k,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${i}`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:r=>{if(!r){this.reportNoAction(t,e,o,$localize`The host key was not approved.`);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:o}),t.complete()}})}handleGenericError(t,e,o,i,a){function r(){t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:o,errorMessage:i}),t.complete()}if(a){r();return}this.#e.open(k,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:i,cancelText:$localize`OK`},closed:u=>r()})}handleDestinationErrorv1(t,e,o,i,a){return new ie(r=>{if(t==="missing-folder"){i?this.handleMissingFolder(r,e,o):this.handleGenericError(r,e,o,$localize`The remote destination folder does not exist.`,a);return}if(t.startsWith("incorrect-cert:")){let u=t.split("incorrect-cert:")[1];this.handleMissingCertificate(r,e,o,u);return}if(t.startsWith("incorrect-host-key:")){let u=t.split('incorrect-host-key:"')[1].split('",')[0],E=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(r,e,o,u,E);return}this.handleGenericError(r,e,o,t,a)})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})};var Te=class n{#t=M(K);supportedDestinationTypes=P(()=>this.#t.backendModules().map(t=>{if(!t?.Key)return null;let e=X(t.Key);return e.isDefaultEntry===!0?ne(O({},e),{displayName:t.DisplayName||e.displayName||t.Key,description:t.Description||e.description||""}):e}).filter(t=>t!==null));destinationTypeOptions=P(()=>this.supportedDestinationTypes().map(t=>({key:t.customKey??t.key,customKey:t.customKey??null,displayName:t.displayName,description:t.description,icon:t.icon})));backendModules=P(()=>this.#t.backendModules()??[]);static \u0275fac=function(e){return new(e||n)};static \u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})};var st=["fileInput"],_t=[[["label"]]],dt=["label"],Se=class n{customId=ee();content=b("");readonly=b(!1);placeholder=ee("Drop a file here or use the browse button");fileInputRef;onFileSelected(t){let e=t.target;e.files&&e.files.length>0&&this.readFile(e.files[0])}onFileDrop(t){t.preventDefault(),t.dataTransfer?.files&&t.dataTransfer.files.length>0&&this.readFile(t.dataTransfer.files[0])}onDragOver(t){t.preventDefault()}readFile(t){let e=new FileReader;e.onload=()=>{this.content.set(e.result)},e.readAsText(t)}triggerBrowse(){return this.fileInputRef.nativeElement.click(),!1}onChange=()=>{};onTouched=()=>{};onChangeEffect=Y(()=>{this.onChange(this.content())});writeValue(t){this.content.set(t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.readonly.set(t)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ae({type:n,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,o){if(e&1&&Fe(st,5),e&2){let i;Oe(i=Me())&&(o.fileInputRef=i.first)}},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[Pe([{provide:qe,useExisting:n,multi:!0}])],ngContentSelectors:dt,decls:9,vars:3,consts:()=>{let t;return t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:upload${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["fileInput",""],t,[1,"browse-btn"],["shButton","","type","button",1,"small","outlined",3,"click"],[1,"textarea-container","textarea-wrap",3,"drop","dragover"],["rows","10",3,"ngModelChange","placeholder","ngModel","disabled"],["type","file",1,"hidden",3,"change"]]},template:function(e,o){if(e&1){let i=N();we(_t),Ae(0,0,["ngProjectAs","label",5,["label"]]),_(1,"div",2)(2,"button",3),x("click",function(){return T(i),S(o.triggerBrowse())}),Q(3,1),z(4,"sh-icon"),Z(),d()(),_(5,"div",4),x("drop",function(r){return T(i),S(o.onFileDrop(r))})("dragover",function(r){return T(i),S(o.onDragOver(r))}),_(6,"textarea",5),Le("ngModelChange",function(r){return T(i),ve(o.content,r)||(o.content=r),S(r)}),d()(),_(7,"input",6,0),x("change",function(r){return T(i),S(o.onFileSelected(r))}),d()}e&2&&(l(6),m("placeholder",o.placeholder()),Ve("ngModel",o.content),m("disabled",o.readonly()))},dependencies:[fe,ue,Ce,ge,pe,me],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label browsebtn" "input input";grid-template-columns:8fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .browse-btn[_ngcontent-%COMP%]{grid-area:browsebtn}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%]{grid-area:input;width:100%;border:none;font:var(--code-20)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%;color:var(--base-8);background-color:var(--base-1);border:1px solid var(--base-4);border-radius:var(--shape-3);padding:.5rem;resize:vertical;box-shadow:var(--box-shadow-10)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%] .dark[_ngcontent-%COMP%]{background-color:var(--base-2)}[_nghost-%COMP%] .hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};var ct=(n,t,e,o)=>({index:n,fieldGroup:"custom",formView:t,destinationType:e,oauthField:o}),Ie=n=>({$implicit:n}),pt=(n,t,e,o)=>({index:n,fieldGroup:"dynamic",formView:t,destinationType:e,oauthField:o}),mt=()=>({updateOn:"blur"}),ut=(n,t,e,o)=>({index:n,formView:t,fieldGroup:"advanced",destinationType:e,oauthField:o});function Ct(n,t){n&1&&le(0)}function gt(n,t){if(n&1&&G(0,Ct,1,0,"ng-container",13),n&2){let e=t.$implicit,o=t.$index;s();let i=B(15);s();let a=c(0),r=c(1);m("ngTemplateOutlet",i)("ngTemplateOutletContext",de(7,Ie,ce(2,ct,o,e,a,r.oauthField)))}}function ft(n,t){n&1&&le(0)}function Tt(n,t){if(n&1&&G(0,ft,1,0,"ng-container",13),n&2){let e=t.$implicit,o=t.$index;s();let i=B(15);s();let a=c(0),r=c(1);m("ngTemplateOutlet",i)("ngTemplateOutletContext",de(7,Ie,ce(2,pt,o,e,a,r.oauthField)))}}function St(n,t){if(n&1){let e=N();_(0,"button",14),x("click",function(){T(e);let i=s(2);return S(i.showTextArea.set(!1))}),Q(1,6),z(2,"sh-icon"),Z(),d()}}function ht(n,t){if(n&1){let e=N();_(0,"button",21,1),x("click",function(){let i=T(e).$implicit,a=s(3);return S(a.addAdvancedOption(i))}),p(2),d()}if(n&2){let e=t.$implicit;l(2),F(" ",e.name," ")}}function xt(n,t){if(n&1){let e=N();_(0,"div",11)(1,"sh-menu",15)(2,"button",16),Q(3,7),z(4,"sh-icon"),Z(),d(),re(5,17),j(6,ht,3,1,"button",18,H),W(),d(),_(8,"sh-menu")(9,"button",19)(10,"sh-icon"),p(11,"dots-three-vertical"),d()(),re(12,17),_(13,"button",20),x("click",function(){T(e);let i=s(2);return S(i.showTextArea.set(!0))}),_(14,"sh-icon"),p(15,"link"),d(),p(16," Edit contents as text "),d(),W(),d()()}if(n&2){s();let e=c(9);l(),m("searchable",!0),l(),m("disabled",e.length===0),l(4),q(e)}}function Nt(n,t){if(n&1){let e=N();_(0,"textarea",22),x("ngModelChange",function(i){T(e);let a=s(2);return S(a.updateSettingsFromText(i))}),d()}if(n&2){let e=s(2);m("ngModel",e.settingsAsText())("ngModelOptions",$e(2,mt))}}function Et(n,t){n&1&&le(0)}function It(n,t){if(n&1&&G(0,Et,1,0,"ng-container",13),n&2){let e=t.$implicit,o=t.$index;s(2);let i=B(15),a=s(),r=c(0),u=c(1),E=a.getFormView("advanced",e)??a.getDefaultFormView(e);m("ngTemplateOutlet",i)("ngTemplateOutletContext",de(7,Ie,ce(2,ut,o,E,r,u.oauthField)))}}function yt(n,t){if(n&1&&j(0,It,1,9,"ng-container",null,H),n&2){let e=s(2);q(e.advancedFormFieldNames())}}function Dt(n,t){n&1&&(_(0,"sup",31),p(1,"*"),d())}function wt(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function At(n,t){if(n&1){let e=N();_(0,"app-file-tree",24)(1,"label",30),g(2,Dt,2,0,"sup",31),p(3),g(4,wt,2,1,"sh-icon",32),d(),_(5,"input",33),x("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(3),r=c(4),u=c(5);m("startingPath",a)("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),m("for",u),l(),f(e.formView.isMandatory&&r?2:-1),l(),F(" ",o," "),l(),f(e.formView.longDescription?4:-1),l(),m("id",u)("ngModel",i)}}function Ft(n,t){n&1&&(_(0,"sup",34),p(1,"*"),d())}function Ot(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function Mt(n,t){if(n&1){let e=N();_(0,"app-file-tree",25)(1,"label",30),g(2,Ft,2,0,"sup",34),p(3),g(4,Ot,2,1,"sh-icon",32),d(),_(5,"input",33),x("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(3),r=c(4),u=c(5);m("hideShortcuts",!0)("enableCreateFolder",!0)("startingPath",a),l(),m("for",u),l(),f(e.formView.isMandatory&&r?2:-1),l(),F(" ",o," "),l(),f(e.formView.longDescription?4:-1),l(),m("id",u)("ngModel",i)}}function Vt(n,t){n&1&&(_(0,"sup",35),p(1,"*"),d())}function vt(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function Lt(n,t){n&1&&(_(0,"sh-icon",36),p(1," warning "),d())}function Pt(n,t){n&1&&(_(0,"sh-icon",37),p(1,"x-circle"),d())}function $t(n,t){n&1&&(_(0,"sh-icon",38),p(1,"warning"),d())}function bt(n,t){if(n&1&&(_(0,"sh-icon",42),p(1," link "),d()),n&2){s();let e=c(9),o=c(10);se("error",e&&o==="error")("warn",e&&o==="warning"),m("shTooltip",e)}}function Gt(n,t){n&1&&(_(0,"sh-icon",41),p(1,"envelope"),d())}function kt(n,t){n&1&&(_(0,"sh-icon",41),p(1,"hard-drives"),d())}function Rt(n,t){n&1&&(_(0,"sh-icon",41),p(1,"jar"),d())}function Bt(n,t){n&1&&(_(0,"sh-icon",41),p(1,"textbox"),d())}function zt(n,t){if(n&1){let e=N();_(0,"sh-form-field")(1,"label",30),g(2,Vt,2,0,"sup",35),p(3),g(4,vt,2,1,"sh-icon",32),g(5,Lt,2,0,"sh-icon",36),g(6,Pt,2,0,"sh-icon",37),g(7,$t,2,0,"sh-icon",38),d(),_(8,"input",39),x("keydown",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.onKeyDown(a.fieldGroup,a.formView.name,a.formView.type,i))})("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d(),L(9)(10),g(11,bt,2,5,"sh-icon",40)(12,Gt,2,0,"sh-icon",41)(13,kt,2,0,"sh-icon",41)(14,Rt,2,0,"sh-icon",41)(15,Bt,2,0,"sh-icon",41),d()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(3),r=c(4),u=c(5),E=s(2);l(),m("for",u),l(),f(e.formView.isMandatory&&r?2:-1),l(),F(" ",o," "),l(),f(e.formView.longDescription?4:-1),l(),f(r&&e.formView.type==="Path"?5:-1),l(),f(e.formView.type=="Hostname"&&!r&&!E.isValidHostname(a)?6:-1),l(),f(e.formView.type=="Bucketname"&&!r&&!E.isValidBucketname(a)?7:-1),l(),m("type",e.formView.type==="Email"?"email":"text")("id",u)("ngModel",i);let V=a,w=E.hasLeadingSlash(V??"");l(),A(w&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),l(),A(e.formView.doubleSlash==null?null:e.formView.doubleSlash.type),l(),f(e.formView.type==="Path"?11:e.formView.type==="Email"?12:e.formView.type==="Hostname"?13:e.formView.type==="Bucketname"?14:15)}}function Kt(n,t){n&1&&(_(0,"sup",43),p(1,"*"),d())}function Xt(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function Ut(n,t){if(n&1){let e=N();_(0,"span",47),x("click",function(){T(e);let i=s(2).$implicit,a=s(2);return S(a.oauthStartTokenCreation(i.destinationType,i.fieldGroup,i.formView.name,i.formView.oauthVersion))}),p(1," AuthID "),d()}}function Ht(n,t){n&1&&(_(0,"sh-icon",41),p(1,"password"),d())}function jt(n,t){if(n&1){let e=N();_(0,"sh-icon",48),x("click",function(){T(e);let i=s(2).$implicit;return S(i.formView.showPassword=!i.formView.showPassword)}),p(1," eye "),d()}}function qt(n,t){if(n&1){let e=N();_(0,"sh-icon",48),x("click",function(){T(e);let i=s(2).$implicit;return S(i.formView.showPassword=!i.formView.showPassword)}),p(1," eye-slash "),d()}}function Wt(n,t){if(n&1){let e=N();_(0,"sh-form-field")(1,"label",30),g(2,Kt,2,0,"sup",43),p(3),g(4,Xt,2,1,"sh-icon",32),d(),_(5,"input",44),x("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d(),g(6,Ut,2,0,"span",45)(7,Ht,2,0,"sh-icon",41),g(8,jt,2,0,"sh-icon",46)(9,qt,2,0,"sh-icon",46),d()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(4),r=c(5);l(),m("for",r),l(),f(e.formView.isMandatory&&a?2:-1),l(),F(" ",o," "),l(),f(e.formView.longDescription?4:-1),l(),m("type",e.formView.showPassword?"text":"password")("id",r)("ngModel",i),l(),f(e.oauthField===e.formView.name?6:7),l(2),f(e.formView.showPassword?8:9)}}function Qt(n,t){n&1&&(_(0,"sup",50),p(1,"*"),d())}function Zt(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(3).$implicit;m("shTooltip",e.formView.longDescription)}}function Jt(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;_e(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Yt(n,t){if(n&1){let e=N();_(0,"sh-select",49)(1,"label",30),g(2,Qt,2,0,"sup",50),p(3),g(4,Zt,2,1,"sh-icon",32),d(),_(5,"input",33),x("ngModelChange",function(i){T(e);let a=s(2).$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()(),G(6,Jt,1,2,"ng-template",null,2,J)}if(n&2){let e=B(7);s();let o=c(0),i=s().$implicit,a=c(1),r=c(2),u=c(4),E=c(5);m("options",o)("isClearable",!1)("optionTemplate",e),l(),m("for",E),l(),f(i.formView.isMandatory&&u?2:-1),l(),F(" ",a," "),l(),f(i.formView.longDescription?4:-1),l(),m("id",E)("ngModel",r)}}function en(n,t){if(n&1&&(L(0),g(1,Yt,8,9)),n&2){let e=s().$implicit,o=A(s(2).mapOptions(e.formView));l(),f(o?1:-1)}}function tn(n,t){n&1&&(_(0,"sup",53),p(1,"*"),d())}function nn(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(3).$implicit;m("shTooltip",e.formView.longDescription)}}function on(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;_e(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function an(n,t){if(n&1){let e=N();_(0,"sh-select",52)(1,"label",30),g(2,tn,2,0,"sup",53),p(3),g(4,nn,2,1,"sh-icon",32),d(),_(5,"input",33),x("ngModelChange",function(i){T(e);let a=s(2).$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()(),G(6,on,1,2,"ng-template",null,3,J)}if(n&2){let e=B(7);s();let o=c(0),i=s().$implicit,a=c(1),r=c(2),u=c(4),E=c(5);m("options",o)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),l(),m("for",E),l(),f(i.formView.isMandatory&&u?2:-1),l(),F(" ",a," "),l(),f(i.formView.longDescription?4:-1),l(),m("id",E)("ngModel",r)}}function rn(n,t){n&1&&z(0,"sh-progress-bar",51)}function ln(n,t){if(n&1&&(L(0),g(1,an,8,10)(2,rn,1,0,"sh-progress-bar",51)),n&2){let e=s().$implicit,o=c(2),i=A(s(2).mapOptionsWithFreeText(e.formView,o));l(),f(i?1:2)}}function sn(n,t){n&1&&(_(0,"sup",55),p(1,"*"),d())}function _n(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function dn(n,t){if(n&1){let e=N();_(0,"app-size",54),x("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),_(1,"label",30),g(2,sn,2,0,"sup",55),p(3),g(4,_n,2,1,"sh-icon",32),d()()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(4),r=c(5);m("inputType",e.Name)("ngModel",i)("customId",r),l(),m("for",r),l(),f(e.formView.isMandatory&&a?2:-1),l(),F(" ",o," "),l(),f(e.formView.longDescription?4:-1)}}function cn(n,t){n&1&&(_(0,"sup",56),p(1,"*"),d())}function pn(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function mn(n,t){if(n&1){let e=N();_(0,"sh-form-field")(1,"label",30),g(2,cn,2,0,"sup",56),p(3),g(4,pn,2,1,"sh-icon",32),d(),_(5,"input",57),x("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d(),_(6,"sh-icon",41),p(7,"numpad"),d()()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(4),r=c(5);l(),m("for",r),l(),f(e.formView.isMandatory&&a?2:-1),l(),F(" ",o," "),l(),f(e.formView.longDescription?4:-1),l(),m("id",r)("ngModel",i)}}function un(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function Cn(n,t){if(n&1){let e=N();_(0,"sh-toggle",58),x("click",function(){T(e);let i=s().$implicit,a=c(2),r=s(2);return S(r.updateFieldValue(i.fieldGroup,i.formView.name,r.isTrue(a)?"false":"true"))}),_(1,"label",30),p(2),g(3,un,2,1,"sh-icon",32),d()()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(5),r=s(2);se("active",r.isTrue(i)),l(),m("for",a),l(),F(" ",o," "),l(),f(e.formView.longDescription?3:-1)}}function gn(n,t){n&1&&(_(0,"sup",60),p(1,"*"),d())}function fn(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(3).$implicit;m("shTooltip",e.formView.longDescription)}}function Tn(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;_e(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Sn(n,t){if(n&1){let e=N();_(0,"sh-select",59)(1,"label",30),g(2,gn,2,0,"sup",60),p(3),g(4,fn,2,1,"sh-icon",32),d(),_(5,"input",61),x("ngModelChange",function(i){T(e);let a=s(2).$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()(),G(6,Tn,1,2,"ng-template",null,4,J)}if(n&2){let e=B(7);s();let o=c(0),i=s().$implicit,a=c(1),r=c(2),u=c(4),E=c(5);m("options",o)("selectMultiple",!0)("optionTemplate",e),l(),m("for",E),l(),f(i.formView.isMandatory&&u?2:-1),l(),F(" ",a," "),l(),f(i.formView.longDescription?4:-1),l(),m("ngModel",r)}}function hn(n,t){if(n&1&&(L(0),g(1,Sn,8,8)),n&2){let e=s().$implicit,o=A(s(2).mapOptions(e.formView));l(),f(o?1:-1)}}function xn(n,t){n&1&&(_(0,"sup",62),p(1,"*"),d())}function Nn(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function En(n,t){if(n&1){let e=N();_(0,"app-timespan",54),x("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),_(1,"label",30),g(2,xn,2,0,"sup",62),p(3),g(4,Nn,2,1,"sh-icon",32),d()()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(4),r=c(5);m("inputType",e.formView.name)("ngModel",i)("customId",r),l(),m("for",r),l(),f(e.formView.isMandatory&&a?2:-1),l(),F(" ",o," "),l(),f(e.formView.longDescription?4:-1)}}function In(n,t){n&1&&(_(0,"sup",64),p(1,"*"),d())}function yn(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function Dn(n,t){if(n&1){let e=N();_(0,"app-file-drop-textarea",63),x("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),_(1,"label"),g(2,In,2,0,"sup",64),p(3),g(4,yn,2,1,"sh-icon",32),d()()}if(n&2){let e=s().$implicit,o=c(2),i=c(4),a=c(5);m("ngModel",o)("customId",a)("placeholder",e.formView.longDescription),l(2),f(e.formView.isMandatory&&i?2:-1),l(),F(" ",e.formView.shortDescription??e.formView.name," "),l(),f(e.formView.longDescription?4:-1)}}function wn(n,t){if(n&1){let e=N();_(0,"button",65),x("click",function(){T(e);let i=s().$implicit,a=s(2);return S(a.removeAdvancedOption(i.formView.name))}),_(1,"sh-icon"),p(2,"x-circle"),d()()}}function An(n,t){if(n&1&&(_(0,"div",23),L(1)(2)(3)(4)(5),g(6,At,6,12,"app-file-tree",24)(7,Mt,6,9,"app-file-tree",25)(8,zt,16,13,"sh-form-field")(9,Wt,10,9,"sh-form-field")(10,en,2,2)(11,ln,3,2)(12,dn,5,7,"app-size",26)(13,mn,8,6,"sh-form-field")(14,Cn,4,5,"sh-toggle",27)(15,hn,2,2)(16,En,5,7,"app-timespan",26)(17,Dn,5,6,"app-file-drop-textarea",28),g(18,wn,3,0,"button",29),d()),n&2){let e=t.$implicit;s();let o=c(0),i=s();se("single-field",e.fieldGroup!=="advanced"),l(),A(e.formView.shortDescription??e.formView.name),l(),A(i.getFieldGroup(o,e.fieldGroup)[e.formView.name]),l();let a=A(i.getFieldValue(e.fieldGroup,e.formView.name));l(),A((a??"").toString().trim()===""),l(),A("destination-"+e.fieldGroup+"-"+e.index+"-"+(e.asHttpOptions?"http":"other")),l(),f(e.formView.type==="FileTree"?6:e.formView.type==="FolderTree"?7:e.formView.type==="String"||e.formView.type==="Path"||e.formView.type==="Email"||e.formView.type==="Hostname"||e.formView.type==="Bucketname"?8:e.formView.type==="Password"?9:e.formView.type==="Enumeration"?10:e.formView.type==="NonValidatedSelectableString"?11:e.formView.type==="Size"?12:e.formView.type==="Integer"?13:e.formView.type==="Boolean"?14:e.formView.type==="Flags"?15:e.formView.type==="Timespan"||e.formView.type==="DateTime"?16:e.formView.type==="FreeText"?17:-1),l(12),f(e.fieldGroup==="advanced"?18:-1)}}function Fn(n,t){if(n&1&&(L(0),j(1,gt,1,9,"ng-container",null,H),j(3,Tt,1,9,"ng-container",null,H),_(5,"sh-toggle-card",8),re(6,9)(7),De(8,5),W(),L(9),g(10,St,3,0,"button",10)(11,xt,17,2,"div",11),W(),g(12,Nt,1,3,"textarea",12)(13,yt,2,0),d(),G(14,An,19,9,"ng-template",null,0,J)),n&2){let e=s(),o=c(1);A(e.destinationForm()),l(),q(o.custom),l(2),q(o.dynamic),l(2),m("disallowToggle",!0),l(4),A(e.nonSelectedAdvancedFormViews()),l(),f(e.showTextArea()?10:11),l(2),f(e.showTextArea()?12:13)}}var at=class n{#t=M(et);#e=M(K);#n=M(it);#a=M(Te);injector=M(ye);targetUrl=be.required();useBackupState=ee(!1);#i=null;destinationType=P(()=>{let t=this.targetUrl();if(!t)return null;let e=X(t.split("://")[0]);return this.#i=e?.customKey??e?.key,this.#i});destinationForm=b({custom:{},dynamic:{},advanced:{}});advancedFormFieldNames=P(()=>Object.keys(this.destinationForm().advanced));destinationFormConfig=b(null);showTextArea=b(!1);nonSelectedAdvancedFormViews=P(()=>{let t=this.destinationFormConfig();if(!t)return[];let e=this.advancedFormFieldNames();return t.advanced.filter(o=>e.findIndex(i=>i===o.name)===-1)});destinationTypeEffect=Y(()=>{let t=this.destinationType()??"",e=X(t),o=e?.key,i=this.#a.backendModules().find(I=>I.Key===o)??{Key:t,DisplayName:t,Description:X(t).description,Options:[]};if(!i||!i.Options||!t)return;let a=e&&e.oauthField?e.oauthField:null,r=e&&e.customFields?e.customFields:{},u=e&&e.dynamicFields?e.dynamicFields:[],E=e&&e.advancedFields?e.advancedFields:[],V=e&&e.ignoredAdvancedFields?e.ignoredAdvancedFields:[],w={destinationType:t,oauthField:a,custom:[],dynamic:[],advanced:[]};r&&Object.entries(r).forEach(([I,C],y)=>{let D=C.order??y;w.custom.push(O({order:900+D},C))});for(let I=0;I<i.Options.length;I++){let C=i.Options[I];if(C.Deprecated)continue;let y=u.find(D=>D===C.Name||C.Aliases?.includes(D.name)||D.name===C.Name);if(y){let D=C.Aliases?.indexOf(y.name)??-1,$=C.Aliases&&D>-1?C.Aliases[D]:C.Name,h=y&&typeof y!="string",he=h?y?.defaultValue??C.DefaultValue:C.DefaultValue,xe=h&&y?.order!==void 0?y.order:I,U={name:$,type:C.Type,shortDescription:C.ShortDescription??void 0,longDescription:C.LongDescription??void 0,options:C.ValidValues,order:900+xe},Ne=h?O(O({},U),y):U;w.dynamic.push(Ne)}else{let D=C.Name;if(V.find(te=>te===D))continue;let h=E.find(te=>te===D||te.name===D),he=h&&typeof h!="string",xe=he&&h?.order!==void 0?h.order:I,U={name:D,type:C.Type,shortDescription:C.ShortDescription??void 0,longDescription:C.LongDescription??void 0,options:C.ValidValues,defaultValue:C.DefaultValue,order:900+xe},Ne=he?O(O({},U),h):U;w.advanced.push(Ne)}}w.custom.sort((I,C)=>I.order-C.order),w.dynamic.sort((I,C)=>I.order-C.order),w.advanced.sort((I,C)=>I.order-C.order),this.destinationFormConfig.set(w);let R=this.targetUrl();if(!R)return;let v=Je(R);v&&this.destinationForm.set({custom:v.custom,dynamic:v.dynamic,advanced:v.advanced})});destinationFormEffect=Y(()=>{let t=this.#i,e=this.destinationForm();if(!e||!t)return;let o=Ze({destinationType:t,custom:e.custom,dynamic:e.dynamic,advanced:e.advanced});o&&this.targetUrl.set(o)});getFieldValue(t,e){let i=this.destinationForm()[t][e];return i||null}getFormView(t,e){let i=this.destinationFormConfig()?.[t].find(a=>a.name===e);return i||null}getDefaultFormView(t){return{name:t,type:"String",shortDescription:t,longDescription:$localize`This is an undocumented option.`}}getFieldGroup(t,e){return t[e]}hasLeadingSlash(t){return t?.startsWith("/")??!1}addAdvancedOption(t){let e=this.destinationForm();e.advanced[t.name]=t.defaultValue,this.destinationForm.set(O({},e))}isValidBucketname(t){if(!t)return!1;let e=t.length;return!(e<3||e>63||!/^[a-z0-9.-]+$/.test(t)||!/^[a-z0-9]/.test(t)||!/[a-z0-9]$/.test(t)||/^\d{1,3}(\.\d{1,3}){3}$/.test(t)||/(\.\.)|(\.-)|(-\.)/.test(t))}isValidHostname(t){if(!t||t.length>253)return!1;let e=t.split(".");for(let o of e)if(!o||o.length>63||!/^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?$/.test(o))return!1;return!0}isTrue(t){if(typeof t=="boolean")return t;if(typeof t=="string"){let e=t.toLowerCase();return e==="true"||e==="1"||e==="yes"||e==="on"}return!1}onKeyDown(t,e,o,i){if(o==="Hostname"||o==="Bucketname"){if(["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Home","End"].includes(i.key))return;if(i.key=="/"||i.key=="\\"||i.key==":"){i.preventDefault();return}}}updateFieldValue(t,e,o){let i=this.destinationForm();i[t][e]=o,this.destinationForm.set(O({},i))}removeAdvancedOption(t){let e=this.destinationForm();delete e.advanced[t],this.destinationForm.set(O({},e))}mapOptions(t){let e=t.loadOptions;if(e)return e(this.injector)();let o=t.options;return o?o.map(i=>({key:i,value:i})):null}mapOptionsWithFreeText(t,e){let o=this.mapOptions(t);return o?(e&&e.length>0&&(o.find(a=>a.value===e)||o.push({key:e,value:e})),o):null}#o=b(!1);oauthStartTokenCreation(t,e,o,i){this.#o.set(!0);let a=(i??1)==2?this.#e.defaultOAuthUrlV2():this.#e.defaultOAuthUrl(),r=this.#n.serverSettings()?.["--oauth-url"];if(r&&r.length>0&&(a=r),this.useBackupState()){let C=this.#t.mapFormsToSettings().find(y=>y.Name==="--oauth-url")?.Value;C&&C.length>0&&(a=C)}let u=this.destinationForm().advanced["oauth-url"];u&&u.length>0&&(a=u);let E=`${a}?type=${t}`,V=450,w=600,R=screen.width/2-V/2,v=screen.height/2-w/2,I=window.open(E,"_blank","height="+w+",width="+V+",menubar=0,status=0,titlebar=0,toolbar=0,left="+R+",top="+v);return window.addEventListener("message",C=>{let y=C.data.startsWith("authid:"),D=y?C.data.replace("authid:",""):null;y&&(this.destinationForm.update($=>($[e][o]=D,$)),this.#o.set(!1),I?.close())}),!1}settingsAsText=P(()=>{let t=this.destinationForm().advanced;return Object.entries(t).map(([e,o])=>{let i=e??"",a="";return typeof o=="boolean"?a=this.isTrue(o)?"True":"False":(typeof o=="number"||o!=null)&&(a=o.toString()),`${i}=${a}`}).join(`
7
+ `)});updateSettingsFromText(t){if(typeof t!="string")return;let e=t.split(`
8
+ `).map(i=>i.trim()).filter(i=>i.length>0),o={};for(let i of e){let[a,r]=i.split("=").map(u=>u.trim());a&&a.trim().length>0&&r!==void 0&&(o[a]=r)}this.destinationForm.update(i=>ne(O({},i),{advanced:o}))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ae({type:n,selectors:[["app-single-destination"]],inputs:{targetUrl:[1,"targetUrl"],useBackupState:[1,"useBackupState"]},outputs:{targetUrl:"targetUrlChange"},decls:3,vars:3,consts:()=>{let t;t=$localize`Advanced options`;let e;e=$localize` Show editor ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let o;o=$localize` Add advanced option ${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let i;i=$localize`This field is mandatory`;let a;a=$localize`This field is mandatory`;let r;r=$localize`This field is mandatory`;let u;u=$localize`An empty path means storing data in the initial or root folder, which is not recommended`;let E;E=$localize`Hostname is invalid`;let V;V=$localize`Bucket name is invalid`;let w;w=$localize`This field is mandatory`;let R;R=$localize`This field is mandatory`;let v;v=$localize`This field is mandatory`;let I;I=$localize`This field is mandatory`;let C;C=$localize`This field is mandatory`;let y;y=$localize`This field is mandatory`;let D;D=$localize`This field is mandatory`;let $;return $=$localize`This field is mandatory`,[["fieldTemplate",""],["option",""],["enumOptionTemplate",""],["nonValidatedOptionTemplate",""],["optionTemplate",""],t,e,o,[1,"advanced-options",3,"disallowToggle"],["title",""],["shButton","","type","button",1,"outlined","small"],[1,"actions"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModel","ngModelOptions"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["shButton","","type","button",1,"outlined","small",3,"click"],[3,"searchable"],["shButton","","type","button",1,"outlined","small",3,"disabled"],["menu",""],["type","button"],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"],["type","button",3,"click"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModelChange","ngModel","ngModelOptions"],[1,"field-row"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","enableCreateFolder","startingPath"],[3,"inputType","ngModel","customId"],[1,"primary","raised",3,"active"],[3,"ngModel","customId","placeholder"],["shButton","","type","button",1,"outlined"],[3,"for"],["shTooltip",i],[1,"primary",3,"shTooltip"],["type","text",3,"ngModelChange","id","ngModel"],["shTooltip",a],["shTooltip",r],["shTooltip",u,1,"warn"],["shTooltip",E,1,"error"],["shTooltip",V,1,"warn"],[3,"keydown","ngModelChange","type","id","ngModel"],["prefix","",3,"error","warn","shTooltip"],["prefix",""],["prefix","",3,"shTooltip"],["shTooltip",w],["autocomplete","off",3,"ngModelChange","type","id","ngModel"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["label","key","value","value",3,"options","isClearable","optionTemplate"],["shTooltip",R],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["shTooltip",v],[3,"ngModelChange","inputType","ngModel","customId"],["shTooltip",I],["shTooltip",C],["type","number",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"click"],["key","key","value","value",1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["shTooltip",y],["type","text","id","text",3,"ngModelChange","ngModel"],["shTooltip",D],[3,"ngModelChange","ngModel","customId","placeholder"],["shTooltip",$],["shButton","","type","button",1,"outlined",3,"click"]]},template:function(e,o){if(e&1&&(L(0)(1),g(2,Fn,16,5)),e&2){let i=A(o.destinationType());l();let a=A(o.destinationFormConfig());l(),f(i&&a?2:-1)}},dependencies:[Qe,ue,We,Ce,fe,ge,Ge,Ye,tt,nt,Se,Re,me,pe,Xe,Be,Ke,He,Ue,ze],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.advanced-options[_ngcontent-%COMP%]{position:relative;z-index:1}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}label[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.raw-text-area[_ngcontent-%COMP%]{min-height:12rem;white-space:pre}"],changeDetection:0})};export{ot as a,Te as b,at as c};
@@ -0,0 +1 @@
1
+ import{d as T}from"./chunk-L2EO4M4B.js";import{a as y,c as O,h as b}from"./chunk-J3BBLPAD.js";import{Aa as o,za as P}from"./chunk-WJPLJKPQ.js";import{B as A,F as l,H as N,R as g,V as a,_ as i,f as I,k as S,n as E,oa as n,r as R,ya as v}from"./chunk-QDFCX6XE.js";var c=class r{platformId=i(v);STORAGE_VERSION="v1";APP_NAME="duplicati";PERSISTED_PREFIX="persist:";getItemParsed(e,t=!1){return o(this.platformId)?null:JSON.parse(localStorage.getItem(`${this.STORAGE_VERSION}:${t?this.PERSISTED_PREFIX:""}${this.APP_NAME}:${e}`)??"null")}setItemParsed(e,t,s=!1){if(!o(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${s?this.PERSISTED_PREFIX:""}${this.APP_NAME}:${e}`,JSON.stringify(t))}get length(){return P(this.platformId)?localStorage.length:0}getItem(e){return o(this.platformId)?null:localStorage.getItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`)??null}setItem(e,t){if(!o(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`,t)}removeItem(e){o(this.platformId)||(localStorage.removeItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`),localStorage.removeItem(`${this.STORAGE_VERSION}:${this.PERSISTED_PREFIX}${this.APP_NAME}:${e}`))}clearAllNotCurrentVersion(){if(!o(this.platformId))for(var e in localStorage)!e.startsWith(this.STORAGE_VERSION)&&e.includes(this.APP_NAME)&&localStorage.removeItem(e)}clearAll(){o(this.platformId)||localStorage.clear()}clear(){if(!o(this.platformId))for(var e in localStorage)e.includes(this.APP_NAME)&&!e.includes(this.PERSISTED_PREFIX)&&localStorage.removeItem(e)}key(e){return o(this.platformId)?null:localStorage.key(e)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=a({token:r,factory:r.\u0275fac})};var f=class r{#i=i(c);#r=n(null);#t=window.self!==window.top;#s=n(this.#t);relayIsEnabled=this.#s.asReadonly();config=this.#r.asReadonly();configLoaded=this.#t?new S:null;isLoading=n(this.#t);parentIframeListner=null;parentOrigin="*";fetchConfig(){this.#o(),this.#t&&(this.#s.set(!0),this.parentIframeListner=new AbortController,this.#e("connected"),window.addEventListener("message",e=>{if(e.data.startsWith("access:")){let t=e.data.replace("access:",""),s=JSON.parse(t);if(!s?.accessToken||!s?.clientId){this.#e("error:invalid-config"),this.#s.set(!1);return}if(typeof s.clientId!="string"){this.#e("error:invalid-config"),this.#s.set(!1);return}if(typeof s.accessToken!="string"){this.#e("error:invalid-config"),this.#s.set(!1);return}let m=this.#i.getItem("locale")??"en-US",p=s.locale??"en-US";m!==p&&(this.#i.setItem("locale",p),window.location.reload()),this.#r.set(s),this.configLoaded?.next(!0),this.isLoading.set(!1),this.#e("handshake-complete")}},{signal:this.parentIframeListner.signal}))}#e(e){window.parent.postMessage(e,"*")}#o(){this.parentIframeListner&&(this.parentIframeListner.abort(),this.parentIframeListner=null)}setConfig(e){this.#r.set(e)}clearConfig(){this.#r.set(null)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=a({token:r,factory:r.\u0275fac,providedIn:"root"})};var d="PROXY_AUTHED_FAKE_TOKEN",h="refreshNonce",u="v1:persist:duplicati:refreshNonce",L=class r{#i=i(T);#r=i(O);#t=i(b);#s=i(f);#e=n(null);#o=n(!1);token=this.#e.asReadonly();isLoggingOut=this.#o.asReadonly();setRefreshNonce(e,t){if(!e){sessionStorage.removeItem(h);return}t?localStorage.setItem(u,e||""):sessionStorage.setItem(h,e||"")}getRefreshNonceBody(){let e=sessionStorage.getItem(h),t=localStorage.getItem(u),s=e||t;return{body:s?{requestBody:{Nonce:s}}:void 0,local:s===t}}login(e,t){return this.#t.postApiV1AuthLogin({requestBody:{Password:e,RememberMe:t}}).pipe(l(1),g(s=>{s.AccessToken?(this.#e.set(s.AccessToken),this.setRefreshNonce(s.RefreshNonce,t)):this.#e.set(null)}))}refreshToken(){if(this.#s.relayIsEnabled())return this.#e.set(d),new I(s=>{s.next({AccessToken:d}),s.complete()});let{body:e,local:t}=this.getRefreshNonceBody();return this.#t.postApiV1AuthRefresh(e).pipe(l(1),g(s=>{s.AccessToken&&(this.#e.set(s.AccessToken),this.setRefreshNonce(s.RefreshNonce,t))}))}checkProxyAuthed(){let e=new y({"custom-proxy-check":"true"});return this.#r.get("/api/v1/systeminfo",{headers:e}).pipe(R(()=>(this.#e.set(d),!0)),A(()=>E(!1)))}logout(){this.#o.set(!0);let{body:e,local:t}=this.getRefreshNonceBody();sessionStorage.removeItem(h),t&&localStorage.removeItem(u),this.#t.postApiV1AuthRefreshLogout(e).pipe(l(1),N(()=>{this.#o.set(!1),this.#e.set(null),this.#i.navigate(["/login"])})).subscribe()}static \u0275fac=function(t){return new(t||r)};static \u0275prov=a({token:r,factory:r.\u0275fac,providedIn:"root"})};export{c as a,f as b,d as c,L as d};
@@ -1 +1 @@
1
- import{a as M}from"./chunk-PWV3UKIW.js";import{a as Z}from"./chunk-GUH5TMOS.js";import{b as H,d as K}from"./chunk-L2EO4M4B.js";import{b as j,c as W,e as q,g as Y,p as J}from"./chunk-WRNQOX5R.js";import{h as Q}from"./chunk-QM6X5ZEC.js";import{Ab as a,Bb as l,Cb as O,Gb as D,Hb as R,Jb as f,Oa as E,Oc as h,Qb as V,Ra as r,Rb as z,Sb as s,Uc as S,Wb as u,Yb as _,_ as p,bb as A,ea as C,fa as I,kc as G,lc as F,mc as P,nc as X,oa as v,tc as B,ub as d,uc as U,vb as N,vc as m,xb as y,yb as L,zb as g}from"./chunk-QDFCX6XE.js";function ne(n,t){if(n&1&&F(0),n&2){_();let e=m(0);X(" ",e.Message," ")}}function oe(n,t){if(n&1&&(a(0,"div"),V(1,1),O(2,"a",15),z(),l()),n&2){let e=_();r(2),g("href",e.downloadLink(),E)}}function ae(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){C(e);let i=_(),c=m(0);return I(i.doRepair(c.BackupID))}),s(1,2),l()}}function re(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){C(e);let i=_(),c=m(0);return I(i.doDownloadBugreport(c))}),s(1,3),l()}}function le(n,t){if(n&1&&O(0,"sh-progress-bar",17),n&2){let e,o=_(2);g("value",(e=o.serverState())==null?null:e.UpdateDownloadProgress)}}function ce(n,t){if(n&1){let e=f();a(0,"div",13),D(1),s(2,4),R(),a(3,"a",16),F(4),l(),d(5,le,1,1,"sh-progress-bar",17),a(6,"button",14),u("click",function(){C(e);let i=_();return I(i.doShowUpdate())}),s(7,5),l()()}if(n&2){let e,o,i=_(),c=m(0);r(3),g("href",(e=i.serverState())==null?null:e.UpdateDownloadLink,E),r(),P(c.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(){C(e);let i=_(),c=m(0);return I(i.doShowLog(c.BackupID))}),s(1,6),l()}}function _e(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){C(e);let i=_();return I(i.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),s(1,7),l()}}function de(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){C(e);let i=_();return I(i.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),s(1,8),l()}}var Ne={Error:"error",Warning:"warn",Information:"primary"},x=class n{#e=p(K);#a=p(H);#r=p(q);#t=p(W);#i=p(M);#n=p(Q);#o=v(null);serverState=this.#i.serverState;index=S.required();notification=S.required();downloadLink=h(()=>this.#o()||this.notification().DownloadLink||"");deleteNotificationByIndex(){this.#i.deleteNotification(this.index())}deleteAllNotifications(){this.#i.deleteAllNotifications()}getAlertType(t){return t&&Ne[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(Z,{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=`${location.origin}/api/v1/bugreport/${e}?token=${o.Token}`;t.DownloadLink=i,this.#o.set(i),this.triggerDownload(i)},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=A({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 c;c=$localize`New update found:`;let w;w=$localize`Show Update`;let $;$=$localize`Show Log`;let b;b=$localize` Show Help `;let k;return k=$localize` Show Help `,[t,e,o,i,c,w,$,b,k,["ship-alert-title",""],["ship-alert-content","",1,"content"],[1,"actions"],["shButton","",1,"small","outlined"],[1,"message"],["shButton","",1,"small","outlined",3,"click"],["target","_blank",3,"href"],[3,"href"],[3,"value"]]},template:function(e,o){if(e&1){let i=f();B(0),a(1,"sh-alert")(2,"div",9),F(3),l(),a(4,"div",10),d(5,ne,1,1),d(6,oe,3,1,"div"),a(7,"div",11),d(8,ae,2,0,"button",12),d(9,re,2,0,"button",12),d(10,ce,8,3,"div",13),d(11,se,2,0,"button",12),d(12,_e,2,0,"button",12),d(13,de,2,0,"button",12),a(14,"button",14),u("click",function(){return C(i),I(o.deleteNotificationByIndex())}),s(15,0),l()()()()}if(e&2){let i=U(o.notification());r(),G(o.getAlertType(i.Type)),r(2),P(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:[J,Y,j],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};var pe=(n,t)=>t.ID;function Te(n,t){if(n&1&&O(0,"app-notification",1),n&2){let e=t.$implicit,o=t.$index;g("index",o)("notification",e)}}function Ce(n,t){n&1&&(a(0,"div",2)(1,"p"),s(2,0),l()())}var ee=class n{#e=p(M);notificationFilterPredicate=S();notifications=h(()=>{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=A({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&&y(0,Te,1,2,"app-notification",1,pe,!1,Ce,3,0,"div",2),e&2&&L(o.notifications())},dependencies:[x],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{x as a,ee as b};
1
+ import{a as M}from"./chunk-BGUKMOKY.js";import{a as Z}from"./chunk-GUH5TMOS.js";import{b as H,d as K}from"./chunk-L2EO4M4B.js";import{b as j,c as W,e as q,g as Y,p as J}from"./chunk-WRNQOX5R.js";import{h as Q}from"./chunk-J3BBLPAD.js";import{Ab as a,Bb as l,Cb as O,Gb as D,Hb as R,Jb as f,Oa as E,Oc as h,Qb as V,Ra as r,Rb as z,Sb as s,Uc as S,Wb as u,Yb as _,_ as p,bb as A,ea as C,fa as I,kc as G,lc as F,mc as P,nc as X,oa as v,tc as B,ub as d,uc as U,vb as N,vc as m,xb as y,yb as L,zb as g}from"./chunk-QDFCX6XE.js";function ne(n,t){if(n&1&&F(0),n&2){_();let e=m(0);X(" ",e.Message," ")}}function oe(n,t){if(n&1&&(a(0,"div"),V(1,1),O(2,"a",15),z(),l()),n&2){let e=_();r(2),g("href",e.downloadLink(),E)}}function ae(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){C(e);let i=_(),c=m(0);return I(i.doRepair(c.BackupID))}),s(1,2),l()}}function re(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){C(e);let i=_(),c=m(0);return I(i.doDownloadBugreport(c))}),s(1,3),l()}}function le(n,t){if(n&1&&O(0,"sh-progress-bar",17),n&2){let e,o=_(2);g("value",(e=o.serverState())==null?null:e.UpdateDownloadProgress)}}function ce(n,t){if(n&1){let e=f();a(0,"div",13),D(1),s(2,4),R(),a(3,"a",16),F(4),l(),d(5,le,1,1,"sh-progress-bar",17),a(6,"button",14),u("click",function(){C(e);let i=_();return I(i.doShowUpdate())}),s(7,5),l()()}if(n&2){let e,o,i=_(),c=m(0);r(3),g("href",(e=i.serverState())==null?null:e.UpdateDownloadLink,E),r(),P(c.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(){C(e);let i=_(),c=m(0);return I(i.doShowLog(c.BackupID))}),s(1,6),l()}}function _e(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){C(e);let i=_();return I(i.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),s(1,7),l()}}function de(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){C(e);let i=_();return I(i.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),s(1,8),l()}}var Ne={Error:"error",Warning:"warn",Information:"primary"},x=class n{#e=p(K);#a=p(H);#r=p(q);#t=p(W);#i=p(M);#n=p(Q);#o=v(null);serverState=this.#i.serverState;index=S.required();notification=S.required();downloadLink=h(()=>this.#o()||this.notification().DownloadLink||"");deleteNotificationByIndex(){this.#i.deleteNotification(this.index())}deleteAllNotifications(){this.#i.deleteAllNotifications()}getAlertType(t){return t&&Ne[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(Z,{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=`${location.origin}/api/v1/bugreport/${e}?token=${o.Token}`;t.DownloadLink=i,this.#o.set(i),this.triggerDownload(i)},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=A({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 c;c=$localize`New update found:`;let w;w=$localize`Show Update`;let $;$=$localize`Show Log`;let b;b=$localize` Show Help `;let k;return k=$localize` Show Help `,[t,e,o,i,c,w,$,b,k,["ship-alert-title",""],["ship-alert-content","",1,"content"],[1,"actions"],["shButton","",1,"small","outlined"],[1,"message"],["shButton","",1,"small","outlined",3,"click"],["target","_blank",3,"href"],[3,"href"],[3,"value"]]},template:function(e,o){if(e&1){let i=f();B(0),a(1,"sh-alert")(2,"div",9),F(3),l(),a(4,"div",10),d(5,ne,1,1),d(6,oe,3,1,"div"),a(7,"div",11),d(8,ae,2,0,"button",12),d(9,re,2,0,"button",12),d(10,ce,8,3,"div",13),d(11,se,2,0,"button",12),d(12,_e,2,0,"button",12),d(13,de,2,0,"button",12),a(14,"button",14),u("click",function(){return C(i),I(o.deleteNotificationByIndex())}),s(15,0),l()()()()}if(e&2){let i=U(o.notification());r(),G(o.getAlertType(i.Type)),r(2),P(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:[J,Y,j],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};var pe=(n,t)=>t.ID;function Te(n,t){if(n&1&&O(0,"app-notification",1),n&2){let e=t.$implicit,o=t.$index;g("index",o)("notification",e)}}function Ce(n,t){n&1&&(a(0,"div",2)(1,"p"),s(2,0),l()())}var ee=class n{#e=p(M);notificationFilterPredicate=S();notifications=h(()=>{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=A({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&&y(0,Te,1,2,"app-notification",1,pe,!1,Ce,3,0,"div",2),e&2&&L(o.notifications())},dependencies:[x],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{x as a,ee as b};
@@ -1 +1 @@
1
- import{a as Y,d as nn}from"./chunk-LT2T7TXS.js";import{a as tn}from"./chunk-VC6TE2B6.js";import{a as en}from"./chunk-5SPGCYAQ.js";import{a as Ze}from"./chunk-JB75BUPF.js";import"./chunk-P2DII6CV.js";import"./chunk-GUH5TMOS.js";import"./chunk-RHW5QVAY.js";import"./chunk-OWAZS6AA.js";import"./chunk-CWBEE627.js";import"./chunk-USU2EHJV.js";import{a as Ye}from"./chunk-47WDRGVN.js";import"./chunk-4URGDROZ.js";import{e as Xe}from"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import{a as Q,f as we,g as ze,h as Ve,j as Ue,k as Ke,o as je,p as We,w as qe,x as Je}from"./chunk-WRNQOX5R.js";import{h as Qe}from"./chunk-QM6X5ZEC.js";import"./chunk-B5FUQFEQ.js";import"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-73RDJP55.js";import{Ab as o,Ac as P,Bb as t,Cb as p,Dc as N,Ec as x,Fc as A,Gb as m,H as j,Hb as M,Hc as J,Ib as $,Jb as k,Pc as ve,Qb as s,Ra as _,Rb as u,Sb as g,Tb as h,Ub as H,Vb as W,Wb as I,Yb as F,_ as v,bb as Re,ea as D,fa as f,gb as O,gc as U,hb as ke,ic as R,lc as r,mc as Be,nc as E,oa as X,qc as Le,rb as xe,rc as Ge,sb as ye,sc as be,ub as C,vb as S,wb as w,xb as z,yb as V,zb as T,zc as q}from"./chunk-QDFCX6XE.js";import"./chunk-EUDKD2JW.js";var _n=()=>[import("./chunk-ACH476VA.js").then(n=>n.NgTemplateOutlet),Q,Ue,Je,qe,import("./chunk-2RB5RKNM.js").then(n=>n.DurationFormatPipe),import("./chunk-QFU6VJXV.js").then(n=>n.BytesPipe),import("./chunk-7WD3AN66.js").then(n=>n.RelativeTimePipe)],ln=()=>["/add-backup"],rn=()=>["/restore"],an=n=>({$implicit:n}),cn=n=>["/backup",n],sn=n=>["/restore",n],un=n=>["/backup",n,"export"],Fn=n=>["/backup",n,"delete"],dn=n=>["/backup",n,"database"],pn=n=>["/backup",n,"commandline"],gn=n=>["/backup",n,"log"];function Tn(n,i){if(n&1){let e=k();o(0,"button",51),I("click",function(){let c=D(e).$implicit,d=F(2);return f(d.sortByColumn.set(c.value))}),g(1,15),t()}if(n&2){let e=i.$implicit,a=F(2);R("active",a.orderBy()===e.value),_(),h(e.label),H(1)}}function Cn(n,i){if(n&1&&(o(0,"sh-menu",52)(1,"button",53),s(2,14),p(3,"strong")(4,"sh-icon"),u(),t(),m(5,54),z(6,Tn,2,3,"button",55,w),M(),t()),n&2){let e=F();_(4),h(e.orderBy()),H(2),_(2),V(e.sortOrderOptions())}}function Sn(n,i){if(n&1&&(o(0,"p")(1,"span"),g(2,21),t(),r(3),N(4,"relativeTime"),t()),n&2){let e=F().$implicit,a=F(4);_(3),E(" ",A(4,1,e.Schedule==null?null:e.Schedule.Time,a.timeType()==="actual")," ")}}function En(n,i){if(n&1&&(r(0),N(1,"durationFormat")),n&2){let e=F().$implicit,a=F(4);E(" ",A(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration,a.timeType()==="actual")," ")}}function mn(n,i){n&1&&(m(0),r(1,"-"),M())}function Mn(n,i){if(n&1&&(r(0),N(1,"bytes")),n&2){let e=F().$implicit;E(" ",x(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function On(n,i){n&1&&(m(0),r(1,"-"),M())}function Nn(n,i){if(n&1&&(r(0),N(1,"bytes")),n&2){let e=F().$implicit;E(" ",x(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function Dn(n,i){n&1&&(m(0),r(1,"-"),M())}function fn(n,i){n&1&&$(0)}function $n(n,i){if(n&1&&(o(0,"div",58)(1,"div",45)(2,"h3"),r(3),o(4,"sh-chip")(5,"sh-icon"),r(6),t(),r(7),t()(),o(8,"p")(9,"span"),g(10,16),t(),r(11),N(12,"relativeTime"),t(),C(13,Sn,5,4,"p"),o(14,"p")(15,"span"),g(16,17),t(),C(17,En,2,4)(18,mn,2,0,"ng-container"),t(),o(19,"p")(20,"span"),g(21,18),t(),C(22,Mn,2,3)(23,On,2,0,"ng-container"),t(),o(24,"p")(25,"span"),g(26,19),t(),C(27,Nn,2,3)(28,Dn,2,0,"ng-container"),t()(),o(29,"sh-chip",59),g(30,20),t(),o(31,"div",49),O(32,fn,1,0,"ng-container",60),t()()),n&2){let e=i.$implicit,a=F(4),c=U(51);_(3),E(" ",(e.Backup==null?null:e.Backup.Name)??a.MISSING_BACKUP_NAME," "),_(3),Be(a.getBackendIcon(e.Backup==null?null:e.Backup.TargetURL)),_(),E(" ",a.getBackendType(e.Backup==null?null:e.Backup.TargetURL)," "),_(4),E(" ",A(12,12,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupFinished,a.timeType()==="actual")," "),_(2),S(e.Schedule!=null&&e.Schedule.Time?13:-1),_(4),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDuration?17:18),_(5),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.SourceFilesSize?22:23),_(5),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.TargetFilesSize?27:28);let d=a.getBackupVersionCount(e);_(3),h(d)(d),H(30),_(2),T("ngTemplateOutlet",c)("ngTemplateOutletContext",P(15,an,e))}}function Pn(n,i){if(n&1&&z(0,$n,33,17,"div",58,w),n&2){let e=F(3);V(e.backups())}}function In(n,i){n&1&&(m(0),g(1,22),M())}function An(n,i){if(n&1&&(o(0,"div",56),C(1,Pn,2,0)(2,In,2,0,"ng-container"),t()),n&2){let e=F(2);_(),S(e.backups().length?1:2)}}function hn(n,i){n&1&&(s(0,23,1),$(1),u())}function Hn(n,i){n&1&&(s(0,24,1),$(1),u())}function Rn(n,i){n&1&&(s(0,25,1),$(1),u())}function kn(n,i){n&1&&(s(0,26,1),$(1),u())}function xn(n,i){n&1&&(s(0,27,1),$(1),u())}function yn(n,i){n&1&&(s(0,28,1),$(1),u())}function Bn(n,i){n&1&&(s(0,29,1),$(1),u())}function Ln(n,i){if(n&1&&(r(0),N(1,"relativeTime")),n&2){let e=F().$implicit,a=F(3);E(" ",A(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDate,a.timeType()==="actual")," ")}}function Gn(n,i){n&1&&(m(0),r(1,"-"),M())}function bn(n,i){if(n&1&&(r(0),N(1,"relativeTime")),n&2){let e=F().$implicit,a=F(3);E(" ",A(1,1,e.Schedule==null?null:e.Schedule.Time,a.timeType()==="actual")," ")}}function vn(n,i){n&1&&(m(0),r(1,"-"),M())}function Xn(n,i){if(n&1&&(r(0),N(1,"durationFormat")),n&2){let e=F().$implicit,a=F(3);E(" ",A(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration,a.timeType()==="actual")," ")}}function wn(n,i){n&1&&(m(0),r(1,"-"),M())}function zn(n,i){if(n&1&&(r(0),N(1,"bytes")),n&2){let e=F().$implicit;E(" ",x(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function Vn(n,i){n&1&&(m(0),r(1,"-"),M())}function Un(n,i){if(n&1&&(r(0),N(1,"bytes")),n&2){let e=F().$implicit;E(" ",x(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function Kn(n,i){n&1&&(m(0),r(1,"-"),M())}function jn(n,i){n&1&&$(0)}function Wn(n,i){if(n&1&&(o(0,"tr")(1,"td"),r(2),t(),o(3,"td"),r(4),t(),o(5,"td"),C(6,Ln,2,4)(7,Gn,2,0,"ng-container"),t(),o(8,"td"),C(9,bn,2,4)(10,vn,2,0,"ng-container"),t(),o(11,"td"),C(12,Xn,2,4)(13,wn,2,0,"ng-container"),t(),o(14,"td"),C(15,zn,2,3)(16,Vn,2,0,"ng-container"),t(),o(17,"td"),C(18,Un,2,3)(19,Kn,2,0,"ng-container"),t(),o(20,"td")(21,"span"),g(22,32),t()(),o(23,"td"),O(24,jn,1,0,"ng-container",60),t()()),n&2){let e=i.$implicit,a=F(3),c=U(51);_(2),E(" ",(e.Backup==null?null:e.Backup.Name)??a.MISSING_BACKUP_NAME," "),_(2),E(" ",a.getBackendType(e.Backup==null?null:e.Backup.TargetURL)," "),_(2),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDate?6:7),_(3),S(e.Schedule!=null&&e.Schedule.Time?9:10),_(3),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDuration?12:13),_(3),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.SourceFilesSize?15:16),_(3),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.TargetFilesSize?18:19);let d=a.getBackupVersionCount(e);_(4),h(d)(d),H(22),_(2),T("ngTemplateOutlet",c)("ngTemplateOutletContext",P(11,an,e))}}function qn(n,i){if(n&1){let e=k();o(0,"sh-table",61),be("sortByColumnChange",function(c){D(e);let d=F(2);return Ge(d.sortByColumn,c)||(d.sortByColumn=c),f(c)}),o(1,"tr",62)(2,"th",63),s(3,23),O(4,hn,2,0,"ng-container",64),u(),t(),o(5,"th",65),s(6,24),O(7,Hn,2,0,"ng-container",64),u(),t(),o(8,"th",66),s(9,25),O(10,Rn,2,0,"ng-container",64),u(),t(),o(11,"th",67),s(12,26),O(13,kn,2,0,"ng-container",64),u(),t(),o(14,"th",68),s(15,27),O(16,xn,2,0,"ng-container",64),u(),t(),o(17,"th",69),s(18,28),O(19,yn,2,0,"ng-container",64),u(),t(),o(20,"th",70),s(21,29),O(22,Bn,2,0,"ng-container",64),u(),t(),o(23,"th"),g(24,30),t(),o(25,"th"),g(26,31),t()(),z(27,Wn,25,13,"tr",null,w),t()}if(n&2){let e=F(2),a=U(53);T("data",e.backups())("loading",e.backupsLoading()),Le("sortByColumn",e.sortByColumn),_(4),T("ngTemplateOutlet",a),_(3),T("ngTemplateOutlet",a),_(3),T("ngTemplateOutlet",a),_(3),T("ngTemplateOutlet",a),_(3),T("ngTemplateOutlet",a),_(3),T("ngTemplateOutlet",a),_(3),T("ngTemplateOutlet",a),_(5),V(e.backups())}}function Jn(n,i){if(n&1&&C(0,An,3,1,"div",56)(1,qn,29,10,"sh-table",57),n&2){let e=F();S(e.viewMode()==="list"?0:e.viewMode()==="details"?1:-1)}}function Qn(n,i){n&1&&(o(0,"div",71),p(1,"sh-progress-bar",72),o(2,"div",45)(3,"h3"),g(4,33),t()()())}function Yn(n,i){n&1&&g(0,34,1)}function Zn(n,i){n&1&&(o(0,"sh-icon"),r(1,"check"),t())}function et(n,i){n&1&&(o(0,"sh-icon"),r(1,"dots-three-vertical"),t())}function nt(n,i){if(n&1){let e=k();o(0,"button",73),I("click",function(){let c=D(e).$implicit,d=F();return f(d.startBackup(c.Backup==null?null:c.Backup.ID))}),s(1,34),p(2,"sh-icon"),C(3,Yn,1,0),u(),t(),o(4,"button",74)(5,"sh-icon"),r(6,"pencil-simple"),t()(),o(7,"sh-menu")(8,"button",46),C(9,Zn,2,0,"sh-icon")(10,et,2,0,"sh-icon"),t(),m(11,54),o(12,"h3",75),r(13,"Operations"),t(),o(14,"button",76),s(15,35),p(16,"sh-icon"),u(),t(),o(17,"button",76),s(18,36),p(19,"sh-icon"),u(),t(),o(20,"button",76),s(21,37),p(22,"sh-icon"),u(),t(),p(23,"sh-divider"),o(24,"h3",75),r(25,"Advanced"),t(),o(26,"button",76),s(27,38),p(28,"sh-icon"),u(),t(),o(29,"button",51),I("click",function(){let c=D(e).$implicit,d=F();return f(d.verifyFiles(c.Backup==null?null:c.Backup.ID))}),s(30,39),p(31,"sh-icon"),u(),t(),o(32,"button",51),I("click",function(){let c=D(e).$implicit,d=F();return f(d.compressBackup(c.Backup==null?null:c.Backup.ID))}),s(33,40),p(34,"sh-icon"),u(),t(),o(35,"button",76),s(36,41),p(37,"sh-icon"),u(),t(),p(38,"sh-divider"),o(39,"h3",75),r(40,"Reporting"),t(),o(41,"button",76),s(42,42),p(43,"sh-icon"),u(),t(),M(),t()}if(n&2){let e=i.$implicit,a=F();R("loader",a.startingBackup()===(e.Backup==null?null:e.Backup.ID)),_(3),S(a.viewMode()==="list"?3:-1),_(),T("routerLink",P(15,cn,e.Backup==null?null:e.Backup.ID)),_(4),R("loader",a.loadingId()===(e.Backup==null?null:e.Backup.ID))("success",a.successId()===(e.Backup==null?null:e.Backup.ID)),_(),S(a.successId()===(e.Backup==null?null:e.Backup.ID)?9:10),_(5),T("routerLink",P(17,sn,e.Backup==null?null:e.Backup.ID)),_(3),T("routerLink",P(19,un,e.Backup==null?null:e.Backup.ID)),_(3),T("routerLink",P(21,Fn,e.Backup==null?null:e.Backup.ID)),_(6),T("routerLink",P(23,dn,e.Backup==null?null:e.Backup.ID)),_(9),T("routerLink",P(25,pn,e.Backup==null?null:e.Backup.ID)),_(6),T("routerLink",P(27,gn,e.Backup==null?null:e.Backup.ID))}}function tt(n,i){n&1&&(o(0,"sh-icon",77),r(1,"funnel-simple"),t(),o(2,"sh-icon",78),r(3,"sort-ascending"),t(),o(4,"sh-icon",79),r(5,"sort-descending"),t())}var on={file:{Display:$localize`Local`,Icon:null}},Z=class n{#n=v(Qe);#t=v(en);#e=v(Ze);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=Ye("viewMode","list");sortByColumn=X(this.#e.orderBy());loadingId=X(null);successId=X(null);sortEffect=ve(()=>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){if(!i)return"";let e=i.split("://")[0],a=Y(e);return on[a.key]?.Icon??"database"}getBackendType(i){if(!i)return"";let e=i.split("://")[0],a=Y(e);if(!a)return"";let c=on[a.key];if(c?.Display)return c.Display;if(a.key==="s3"){let d="http://null?"+i.split("?")[1],y=new URL(d).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[B,L]of Object.entries(nn))if(y.endsWith(B))return L}return a.displayName}getBackupVersionCount(i){return parseInt(i?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdVerify({id:i}).pipe(j(()=>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(j(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Re({type:n,selectors:[["app-home"]],decls:54,vars:11,consts:()=>{let i;i=$localize`Backups`;let e;e=$localize`Backups are stored in the cloud and can be restored at any time.`;let a;a=$localize` Add ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let c;c=$localize`Restores`;let d;d=$localize`Restores allow you to restore your data from the cloud.`;let K;K=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let y;y=$localize`My backups`;let B;B=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let L;L=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let ee;ee=$localize` Time: ${"\uFFFD#38\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#39\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ne;ne=$localize`Relative time`;let te;te=$localize`Actual time`;let ie;ie=$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 oe;oe=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let ae;ae=$localize`Last successful backup:`;let _e;_e=$localize`Duration:`;let le;le=$localize`Source:`;let re;re=$localize`Destination:`;let G;G=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,G=W(G,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let ce;ce=$localize` ${G}:ICU@@6502601490918455200: `;let se;se=$localize`Next scheduled run:`;let ue;ue=$localize`No backups founds`;let Fe;Fe=$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 de;de=$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 ge;ge=$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 Te;Te=$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 Ce;Ce=$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 Se;Se=$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 Ee;Ee=$localize`Version`;let me;me=$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 Me;Me=$localize` ${b}:ICU@@3521773141017690117: `;let Oe;Oe=$localize`Loading backups...`;let Ne;Ne=$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 De;De=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let fe;fe=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let $e;$e=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let Pe;Pe=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let Ie;Ie=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let Ae;Ae=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Compress now `;let he;he=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let He;return He=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Log `,[["actions",""],["sortIcons",""],i,e,a,c,d,K,y,B,L,ee,ne,te,ie,oe,ae,_e,le,re,ce,se,ue,Fe,de,pe,ge,Te,Ce,Se,Ee,me,Me,Oe,Ne,De,fe,$e,Pe,Ie,Ae,he,He,[1,"type-a",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","button",3,"click"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backup"],[1,"simple","success"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["table-header",""],["shSort","name"],[4,"ngTemplateOutlet"],["shSort","type"],["shSort","lastrun"],["shSort","nextrun"],["shSort","duration"],["shSort","sourcesize"],["shSort","destinationsize"],[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(e,a){if(e&1){let c=k();p(0,"app-status-bar"),o(1,"section")(2,"header")(3,"sh-card",43),p(4,"img",44),o(5,"div",45)(6,"h3"),g(7,2),t(),o(8,"p"),g(9,3),t()(),o(10,"button",46),s(11,4),p(12,"sh-icon"),u(),t()(),o(13,"sh-card",43),p(14,"img",47),o(15,"div",45)(16,"h3"),g(17,5),t(),o(18,"p"),g(19,6),t()(),o(20,"button",46),s(21,7),p(22,"sh-icon"),u(),t()()(),o(23,"div",48)(24,"h2"),m(25),g(26,8),M(),o(27,"div",49)(28,"sh-button-group",50)(29,"button",51),I("click",function(){return D(c),f(a.viewMode.set("list"))}),s(30,9),p(31,"sh-icon"),u(),t(),o(32,"button",51),I("click",function(){return D(c),f(a.viewMode.set("details"))}),s(33,10),p(34,"sh-icon"),u(),t()(),o(35,"sh-menu",52)(36,"button",53),s(37,11),p(38,"strong")(39,"sh-icon"),u(),t(),m(40,54),o(41,"button",51),I("click",function(){return D(c),f(a.setTimeType("relative"))}),g(42,12),t(),o(43,"button",51),I("click",function(){return D(c),f(a.setTimeType("actual"))}),g(44,13),t(),M(),t(),C(45,Cn,8,1,"sh-menu",52),t()(),ke(46,Jn,2,1)(47,Qn,5,0),xe(48,46,_n,null,47),t()(),O(50,nt,44,29,"ng-template",null,0,J)(52,tt,6,0,"ng-template",null,1,J)}e&2&&(_(3),T("routerLink",q(9,ln)),_(10),T("routerLink",q(10,rn)),_(16),R("active",a.viewMode()==="list"),_(3),R("active",a.viewMode()==="details"),_(7),h(a.timeType()),H(37),_(6),S(a.viewMode()==="list"?45:-1),_(3),ye(!a.backupsLoading()))},dependencies:[Xe,tn,Ve,ze,Q,Ke,je,We,we],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}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.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)}.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)}"],changeDetection:0})};export{Z as default};
1
+ import{a as Y,d as nn}from"./chunk-CDRDYQEV.js";import{a as tn}from"./chunk-WWFNG47J.js";import{a as en}from"./chunk-XNVRJH42.js";import{a as Ze}from"./chunk-3UN32GIC.js";import"./chunk-OXOOR7I4.js";import"./chunk-GUH5TMOS.js";import"./chunk-RHW5QVAY.js";import"./chunk-66BSPEOQ.js";import"./chunk-CWBEE627.js";import"./chunk-USU2EHJV.js";import{a as Ye}from"./chunk-ZGAC2JKG.js";import"./chunk-ETCRT3EV.js";import{e as Xe}from"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import{a as Q,f as we,g as ze,h as Ve,j as Ue,k as Ke,o as je,p as We,w as qe,x as Je}from"./chunk-WRNQOX5R.js";import{h as Qe}from"./chunk-J3BBLPAD.js";import"./chunk-B5FUQFEQ.js";import"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-73RDJP55.js";import{Ab as o,Ac as P,Bb as t,Cb as p,Dc as N,Ec as x,Fc as A,Gb as m,H as j,Hb as M,Hc as J,Ib as $,Jb as k,Pc as ve,Qb as s,Ra as _,Rb as u,Sb as g,Tb as h,Ub as H,Vb as W,Wb as I,Yb as F,_ as v,bb as Re,ea as D,fa as f,gb as O,gc as U,hb as ke,ic as R,lc as r,mc as Be,nc as E,oa as X,qc as Le,rb as xe,rc as Ge,sb as ye,sc as be,ub as C,vb as S,wb as w,xb as z,yb as V,zb as T,zc as q}from"./chunk-QDFCX6XE.js";import"./chunk-EUDKD2JW.js";var _n=()=>[import("./chunk-ACH476VA.js").then(n=>n.NgTemplateOutlet),Q,Ue,Je,qe,import("./chunk-2RB5RKNM.js").then(n=>n.DurationFormatPipe),import("./chunk-QFU6VJXV.js").then(n=>n.BytesPipe),import("./chunk-7WD3AN66.js").then(n=>n.RelativeTimePipe)],ln=()=>["/add-backup"],rn=()=>["/restore"],an=n=>({$implicit:n}),cn=n=>["/backup",n],sn=n=>["/restore",n],un=n=>["/backup",n,"export"],Fn=n=>["/backup",n,"delete"],dn=n=>["/backup",n,"database"],pn=n=>["/backup",n,"commandline"],gn=n=>["/backup",n,"log"];function Tn(n,i){if(n&1){let e=k();o(0,"button",51),I("click",function(){let c=D(e).$implicit,d=F(2);return f(d.sortByColumn.set(c.value))}),g(1,15),t()}if(n&2){let e=i.$implicit,a=F(2);R("active",a.orderBy()===e.value),_(),h(e.label),H(1)}}function Cn(n,i){if(n&1&&(o(0,"sh-menu",52)(1,"button",53),s(2,14),p(3,"strong")(4,"sh-icon"),u(),t(),m(5,54),z(6,Tn,2,3,"button",55,w),M(),t()),n&2){let e=F();_(4),h(e.orderBy()),H(2),_(2),V(e.sortOrderOptions())}}function Sn(n,i){if(n&1&&(o(0,"p")(1,"span"),g(2,21),t(),r(3),N(4,"relativeTime"),t()),n&2){let e=F().$implicit,a=F(4);_(3),E(" ",A(4,1,e.Schedule==null?null:e.Schedule.Time,a.timeType()==="actual")," ")}}function En(n,i){if(n&1&&(r(0),N(1,"durationFormat")),n&2){let e=F().$implicit,a=F(4);E(" ",A(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration,a.timeType()==="actual")," ")}}function mn(n,i){n&1&&(m(0),r(1,"-"),M())}function Mn(n,i){if(n&1&&(r(0),N(1,"bytes")),n&2){let e=F().$implicit;E(" ",x(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function On(n,i){n&1&&(m(0),r(1,"-"),M())}function Nn(n,i){if(n&1&&(r(0),N(1,"bytes")),n&2){let e=F().$implicit;E(" ",x(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function Dn(n,i){n&1&&(m(0),r(1,"-"),M())}function fn(n,i){n&1&&$(0)}function $n(n,i){if(n&1&&(o(0,"div",58)(1,"div",45)(2,"h3"),r(3),o(4,"sh-chip")(5,"sh-icon"),r(6),t(),r(7),t()(),o(8,"p")(9,"span"),g(10,16),t(),r(11),N(12,"relativeTime"),t(),C(13,Sn,5,4,"p"),o(14,"p")(15,"span"),g(16,17),t(),C(17,En,2,4)(18,mn,2,0,"ng-container"),t(),o(19,"p")(20,"span"),g(21,18),t(),C(22,Mn,2,3)(23,On,2,0,"ng-container"),t(),o(24,"p")(25,"span"),g(26,19),t(),C(27,Nn,2,3)(28,Dn,2,0,"ng-container"),t()(),o(29,"sh-chip",59),g(30,20),t(),o(31,"div",49),O(32,fn,1,0,"ng-container",60),t()()),n&2){let e=i.$implicit,a=F(4),c=U(51);_(3),E(" ",(e.Backup==null?null:e.Backup.Name)??a.MISSING_BACKUP_NAME," "),_(3),Be(a.getBackendIcon(e.Backup==null?null:e.Backup.TargetURL)),_(),E(" ",a.getBackendType(e.Backup==null?null:e.Backup.TargetURL)," "),_(4),E(" ",A(12,12,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupFinished,a.timeType()==="actual")," "),_(2),S(e.Schedule!=null&&e.Schedule.Time?13:-1),_(4),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDuration?17:18),_(5),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.SourceFilesSize?22:23),_(5),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.TargetFilesSize?27:28);let d=a.getBackupVersionCount(e);_(3),h(d)(d),H(30),_(2),T("ngTemplateOutlet",c)("ngTemplateOutletContext",P(15,an,e))}}function Pn(n,i){if(n&1&&z(0,$n,33,17,"div",58,w),n&2){let e=F(3);V(e.backups())}}function In(n,i){n&1&&(m(0),g(1,22),M())}function An(n,i){if(n&1&&(o(0,"div",56),C(1,Pn,2,0)(2,In,2,0,"ng-container"),t()),n&2){let e=F(2);_(),S(e.backups().length?1:2)}}function hn(n,i){n&1&&(s(0,23,1),$(1),u())}function Hn(n,i){n&1&&(s(0,24,1),$(1),u())}function Rn(n,i){n&1&&(s(0,25,1),$(1),u())}function kn(n,i){n&1&&(s(0,26,1),$(1),u())}function xn(n,i){n&1&&(s(0,27,1),$(1),u())}function yn(n,i){n&1&&(s(0,28,1),$(1),u())}function Bn(n,i){n&1&&(s(0,29,1),$(1),u())}function Ln(n,i){if(n&1&&(r(0),N(1,"relativeTime")),n&2){let e=F().$implicit,a=F(3);E(" ",A(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDate,a.timeType()==="actual")," ")}}function Gn(n,i){n&1&&(m(0),r(1,"-"),M())}function bn(n,i){if(n&1&&(r(0),N(1,"relativeTime")),n&2){let e=F().$implicit,a=F(3);E(" ",A(1,1,e.Schedule==null?null:e.Schedule.Time,a.timeType()==="actual")," ")}}function vn(n,i){n&1&&(m(0),r(1,"-"),M())}function Xn(n,i){if(n&1&&(r(0),N(1,"durationFormat")),n&2){let e=F().$implicit,a=F(3);E(" ",A(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration,a.timeType()==="actual")," ")}}function wn(n,i){n&1&&(m(0),r(1,"-"),M())}function zn(n,i){if(n&1&&(r(0),N(1,"bytes")),n&2){let e=F().$implicit;E(" ",x(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function Vn(n,i){n&1&&(m(0),r(1,"-"),M())}function Un(n,i){if(n&1&&(r(0),N(1,"bytes")),n&2){let e=F().$implicit;E(" ",x(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function Kn(n,i){n&1&&(m(0),r(1,"-"),M())}function jn(n,i){n&1&&$(0)}function Wn(n,i){if(n&1&&(o(0,"tr")(1,"td"),r(2),t(),o(3,"td"),r(4),t(),o(5,"td"),C(6,Ln,2,4)(7,Gn,2,0,"ng-container"),t(),o(8,"td"),C(9,bn,2,4)(10,vn,2,0,"ng-container"),t(),o(11,"td"),C(12,Xn,2,4)(13,wn,2,0,"ng-container"),t(),o(14,"td"),C(15,zn,2,3)(16,Vn,2,0,"ng-container"),t(),o(17,"td"),C(18,Un,2,3)(19,Kn,2,0,"ng-container"),t(),o(20,"td")(21,"span"),g(22,32),t()(),o(23,"td"),O(24,jn,1,0,"ng-container",60),t()()),n&2){let e=i.$implicit,a=F(3),c=U(51);_(2),E(" ",(e.Backup==null?null:e.Backup.Name)??a.MISSING_BACKUP_NAME," "),_(2),E(" ",a.getBackendType(e.Backup==null?null:e.Backup.TargetURL)," "),_(2),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDate?6:7),_(3),S(e.Schedule!=null&&e.Schedule.Time?9:10),_(3),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDuration?12:13),_(3),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.SourceFilesSize?15:16),_(3),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.TargetFilesSize?18:19);let d=a.getBackupVersionCount(e);_(4),h(d)(d),H(22),_(2),T("ngTemplateOutlet",c)("ngTemplateOutletContext",P(11,an,e))}}function qn(n,i){if(n&1){let e=k();o(0,"sh-table",61),be("sortByColumnChange",function(c){D(e);let d=F(2);return Ge(d.sortByColumn,c)||(d.sortByColumn=c),f(c)}),o(1,"tr",62)(2,"th",63),s(3,23),O(4,hn,2,0,"ng-container",64),u(),t(),o(5,"th",65),s(6,24),O(7,Hn,2,0,"ng-container",64),u(),t(),o(8,"th",66),s(9,25),O(10,Rn,2,0,"ng-container",64),u(),t(),o(11,"th",67),s(12,26),O(13,kn,2,0,"ng-container",64),u(),t(),o(14,"th",68),s(15,27),O(16,xn,2,0,"ng-container",64),u(),t(),o(17,"th",69),s(18,28),O(19,yn,2,0,"ng-container",64),u(),t(),o(20,"th",70),s(21,29),O(22,Bn,2,0,"ng-container",64),u(),t(),o(23,"th"),g(24,30),t(),o(25,"th"),g(26,31),t()(),z(27,Wn,25,13,"tr",null,w),t()}if(n&2){let e=F(2),a=U(53);T("data",e.backups())("loading",e.backupsLoading()),Le("sortByColumn",e.sortByColumn),_(4),T("ngTemplateOutlet",a),_(3),T("ngTemplateOutlet",a),_(3),T("ngTemplateOutlet",a),_(3),T("ngTemplateOutlet",a),_(3),T("ngTemplateOutlet",a),_(3),T("ngTemplateOutlet",a),_(3),T("ngTemplateOutlet",a),_(5),V(e.backups())}}function Jn(n,i){if(n&1&&C(0,An,3,1,"div",56)(1,qn,29,10,"sh-table",57),n&2){let e=F();S(e.viewMode()==="list"?0:e.viewMode()==="details"?1:-1)}}function Qn(n,i){n&1&&(o(0,"div",71),p(1,"sh-progress-bar",72),o(2,"div",45)(3,"h3"),g(4,33),t()()())}function Yn(n,i){n&1&&g(0,34,1)}function Zn(n,i){n&1&&(o(0,"sh-icon"),r(1,"check"),t())}function et(n,i){n&1&&(o(0,"sh-icon"),r(1,"dots-three-vertical"),t())}function nt(n,i){if(n&1){let e=k();o(0,"button",73),I("click",function(){let c=D(e).$implicit,d=F();return f(d.startBackup(c.Backup==null?null:c.Backup.ID))}),s(1,34),p(2,"sh-icon"),C(3,Yn,1,0),u(),t(),o(4,"button",74)(5,"sh-icon"),r(6,"pencil-simple"),t()(),o(7,"sh-menu")(8,"button",46),C(9,Zn,2,0,"sh-icon")(10,et,2,0,"sh-icon"),t(),m(11,54),o(12,"h3",75),r(13,"Operations"),t(),o(14,"button",76),s(15,35),p(16,"sh-icon"),u(),t(),o(17,"button",76),s(18,36),p(19,"sh-icon"),u(),t(),o(20,"button",76),s(21,37),p(22,"sh-icon"),u(),t(),p(23,"sh-divider"),o(24,"h3",75),r(25,"Advanced"),t(),o(26,"button",76),s(27,38),p(28,"sh-icon"),u(),t(),o(29,"button",51),I("click",function(){let c=D(e).$implicit,d=F();return f(d.verifyFiles(c.Backup==null?null:c.Backup.ID))}),s(30,39),p(31,"sh-icon"),u(),t(),o(32,"button",51),I("click",function(){let c=D(e).$implicit,d=F();return f(d.compressBackup(c.Backup==null?null:c.Backup.ID))}),s(33,40),p(34,"sh-icon"),u(),t(),o(35,"button",76),s(36,41),p(37,"sh-icon"),u(),t(),p(38,"sh-divider"),o(39,"h3",75),r(40,"Reporting"),t(),o(41,"button",76),s(42,42),p(43,"sh-icon"),u(),t(),M(),t()}if(n&2){let e=i.$implicit,a=F();R("loader",a.startingBackup()===(e.Backup==null?null:e.Backup.ID)),_(3),S(a.viewMode()==="list"?3:-1),_(),T("routerLink",P(15,cn,e.Backup==null?null:e.Backup.ID)),_(4),R("loader",a.loadingId()===(e.Backup==null?null:e.Backup.ID))("success",a.successId()===(e.Backup==null?null:e.Backup.ID)),_(),S(a.successId()===(e.Backup==null?null:e.Backup.ID)?9:10),_(5),T("routerLink",P(17,sn,e.Backup==null?null:e.Backup.ID)),_(3),T("routerLink",P(19,un,e.Backup==null?null:e.Backup.ID)),_(3),T("routerLink",P(21,Fn,e.Backup==null?null:e.Backup.ID)),_(6),T("routerLink",P(23,dn,e.Backup==null?null:e.Backup.ID)),_(9),T("routerLink",P(25,pn,e.Backup==null?null:e.Backup.ID)),_(6),T("routerLink",P(27,gn,e.Backup==null?null:e.Backup.ID))}}function tt(n,i){n&1&&(o(0,"sh-icon",77),r(1,"funnel-simple"),t(),o(2,"sh-icon",78),r(3,"sort-ascending"),t(),o(4,"sh-icon",79),r(5,"sort-descending"),t())}var on={file:{Display:$localize`Local`,Icon:null}},Z=class n{#n=v(Qe);#t=v(en);#e=v(Ze);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=Ye("viewMode","list");sortByColumn=X(this.#e.orderBy());loadingId=X(null);successId=X(null);sortEffect=ve(()=>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){if(!i)return"";let e=i.split("://")[0],a=Y(e);return on[a.key]?.Icon??"database"}getBackendType(i){if(!i)return"";let e=i.split("://")[0],a=Y(e);if(!a)return"";let c=on[a.key];if(c?.Display)return c.Display;if(a.key==="s3"){let d="http://null?"+i.split("?")[1],y=new URL(d).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[B,L]of Object.entries(nn))if(y.endsWith(B))return L}return a.displayName}getBackupVersionCount(i){return parseInt(i?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdVerify({id:i}).pipe(j(()=>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(j(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Re({type:n,selectors:[["app-home"]],decls:54,vars:11,consts:()=>{let i;i=$localize`Backups`;let e;e=$localize`Backups are stored in the cloud and can be restored at any time.`;let a;a=$localize` Add ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let c;c=$localize`Restores`;let d;d=$localize`Restores allow you to restore your data from the cloud.`;let K;K=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let y;y=$localize`My backups`;let B;B=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let L;L=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let ee;ee=$localize` Time: ${"\uFFFD#38\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#39\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ne;ne=$localize`Relative time`;let te;te=$localize`Actual time`;let ie;ie=$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 oe;oe=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let ae;ae=$localize`Last successful backup:`;let _e;_e=$localize`Duration:`;let le;le=$localize`Source:`;let re;re=$localize`Destination:`;let G;G=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,G=W(G,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let ce;ce=$localize` ${G}:ICU@@6502601490918455200: `;let se;se=$localize`Next scheduled run:`;let ue;ue=$localize`No backups founds`;let Fe;Fe=$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 de;de=$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 ge;ge=$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 Te;Te=$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 Ce;Ce=$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 Se;Se=$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 Ee;Ee=$localize`Version`;let me;me=$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 Me;Me=$localize` ${b}:ICU@@3521773141017690117: `;let Oe;Oe=$localize`Loading backups...`;let Ne;Ne=$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 De;De=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let fe;fe=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let $e;$e=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let Pe;Pe=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let Ie;Ie=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let Ae;Ae=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Compress now `;let he;he=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let He;return He=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Log `,[["actions",""],["sortIcons",""],i,e,a,c,d,K,y,B,L,ee,ne,te,ie,oe,ae,_e,le,re,ce,se,ue,Fe,de,pe,ge,Te,Ce,Se,Ee,me,Me,Oe,Ne,De,fe,$e,Pe,Ie,Ae,he,He,[1,"type-a",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","button",3,"click"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backup"],[1,"simple","success"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["table-header",""],["shSort","name"],[4,"ngTemplateOutlet"],["shSort","type"],["shSort","lastrun"],["shSort","nextrun"],["shSort","duration"],["shSort","sourcesize"],["shSort","destinationsize"],[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(e,a){if(e&1){let c=k();p(0,"app-status-bar"),o(1,"section")(2,"header")(3,"sh-card",43),p(4,"img",44),o(5,"div",45)(6,"h3"),g(7,2),t(),o(8,"p"),g(9,3),t()(),o(10,"button",46),s(11,4),p(12,"sh-icon"),u(),t()(),o(13,"sh-card",43),p(14,"img",47),o(15,"div",45)(16,"h3"),g(17,5),t(),o(18,"p"),g(19,6),t()(),o(20,"button",46),s(21,7),p(22,"sh-icon"),u(),t()()(),o(23,"div",48)(24,"h2"),m(25),g(26,8),M(),o(27,"div",49)(28,"sh-button-group",50)(29,"button",51),I("click",function(){return D(c),f(a.viewMode.set("list"))}),s(30,9),p(31,"sh-icon"),u(),t(),o(32,"button",51),I("click",function(){return D(c),f(a.viewMode.set("details"))}),s(33,10),p(34,"sh-icon"),u(),t()(),o(35,"sh-menu",52)(36,"button",53),s(37,11),p(38,"strong")(39,"sh-icon"),u(),t(),m(40,54),o(41,"button",51),I("click",function(){return D(c),f(a.setTimeType("relative"))}),g(42,12),t(),o(43,"button",51),I("click",function(){return D(c),f(a.setTimeType("actual"))}),g(44,13),t(),M(),t(),C(45,Cn,8,1,"sh-menu",52),t()(),ke(46,Jn,2,1)(47,Qn,5,0),xe(48,46,_n,null,47),t()(),O(50,nt,44,29,"ng-template",null,0,J)(52,tt,6,0,"ng-template",null,1,J)}e&2&&(_(3),T("routerLink",q(9,ln)),_(10),T("routerLink",q(10,rn)),_(16),R("active",a.viewMode()==="list"),_(3),R("active",a.viewMode()==="details"),_(7),h(a.timeType()),H(37),_(6),S(a.viewMode()==="list"?45:-1),_(3),ye(!a.backupsLoading()))},dependencies:[Xe,tn,Ve,ze,Q,Ke,je,We,we],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}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.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)}.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)}"],changeDetection:0})};export{Z as default};
@@ -1,3 +1,3 @@
1
- import{a as Ee}from"./chunk-UV3WAAEX.js";import"./chunk-CZLLEVMJ.js";import{a as fe}from"./chunk-VC6TE2B6.js";import{h as O}from"./chunk-LIJJPCCP.js";import"./chunk-BVEALUGN.js";import{a as Se}from"./chunk-UACX27D3.js";import"./chunk-VC72SWC4.js";import{b as T}from"./chunk-QGFC5ZUR.js";import{a as se}from"./chunk-5SPGCYAQ.js";import"./chunk-JB75BUPF.js";import"./chunk-P2DII6CV.js";import"./chunk-GUH5TMOS.js";import"./chunk-RHW5QVAY.js";import"./chunk-OWAZS6AA.js";import"./chunk-CWBEE627.js";import{c as le,e as me,f as de,j as _e,n as ce,o as ue,p as pe,q as Ce,r as ge,s as Ne,t as Me}from"./chunk-USU2EHJV.js";import"./chunk-47WDRGVN.js";import"./chunk-4URGDROZ.js";import{b as q,d as Z,e as J}from"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import{a as Q,e as Y,g as ee,k as te,l as ne,p as ie,t as oe}from"./chunk-WRNQOX5R.js";import{g as ae,h as re}from"./chunk-QM6X5ZEC.js";import"./chunk-B5FUQFEQ.js";import"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-73RDJP55.js";import{Ab as a,Bb as n,Cb as r,Gb as A,Hb as h,Jb as v,Pc as j,Qb as N,Ra as m,Rb as M,Sb as u,Tb as G,Ub as U,Wb as x,Yb as f,_ as c,bb as $,ea as S,fa as E,ic as w,oa as F,qc as K,rc as X,sc as z,ub as b,vb as B,wb as k,xb as R,xc as V,yb as y,yc as H,zb as C,zc as W}from"./chunk-QDFCX6XE.js";import"./chunk-EUDKD2JW.js";var Fe=()=>["backup"];function Ae(s,t){s&1&&r(0,"sh-progress-bar",12)}function he(s,t){if(s&1&&(a(0,"sh-form-field"),r(1,"input",32),n()),s&2){let e=t.$implicit,l=t.$index;m(),C("id",V("filter-",l))("formControl",e)}}function Te(s,t){if(s&1){let e=v();a(0,"form",13)(1,"sh-select",14)(2,"label",15),u(3,1),n(),r(4,"input",16),n(),a(5,"sh-form-field")(6,"label",17),u(7,2),n(),r(8,"textarea",18),n(),a(9,"sh-form-field")(10,"label",19),u(11,3),n(),r(12,"textarea",20),n()(),a(13,"sh-divider"),u(14,4),n(),a(15,"form",13)(16,"sh-form-field")(17,"label",21),u(18,5),n(),r(19,"input",22),n(),a(20,"sh-form-field")(21,"label",23),u(22,6),n(),r(23,"input",24),n(),a(24,"app-toggle-card",25),A(25,26),u(26,7),h(),A(27,27),R(28,he,2,3,"sh-form-field",null,k),h(),n()(),a(30,"p"),N(31,8),r(32,"a",28),M(),n(),a(33,"app-options-list",29),z("optionsChange",function(o){S(e);let p=f();return X(p.settings,o)||(p.settings=o),E(o)}),n(),a(34,"div",30)(35,"button",31),x("click",function(){S(e);let o=f();return E(o.submit())}),N(36,9),r(37,"sh-icon"),M(),n()()}if(s&2){let e=f();C("formGroup",e.baseCmdForm),m(),C("options",e.commandOptions()??W(10,Fe))("inlineSearch",!0),m(14),C("formGroup",e.standardFields),m(9),C("disallowToggle",!0),m(4),y(e.standardFields.controls.filters.controls),m(5),K("options",e.settings),C("hasFreeTextSettings",!0),m(2),w("loader",e.isSubmitting()),m(2),G(e.baseCmdForm.value.command),U(36)}}var d=new ge,Oe=["Bytes","KB","MB","GB","TB","PB"],P=class s{#e=c(O);#t=c(re);#n=c(Z);#i=c(q);#o=c(ae);#a=c(se);#l=c(Y);#r=T(this.#i.params);commandOptions=T(this.#o.getApiV1Commandline());sizeOptions=F(Oe);isSubmitting=F(!1);optionsFields=this.#e.optionsFields;standardFields=d.group({"backup-id":d.control(""),"backup-name":d.control(""),dbpath:d.control(""),filters:d.array([])});baseCmdForm=d.group({command:d.control("backup"),targetUrl:d.control(""),arguments:d.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#m=j(()=>{let t=this.#r()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#t.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.#e.mapGeneralToForm(e.Backup),this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup)),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),t.Filters&&t.Filters.length&&t.Filters.map(e=>{this.standardFields.controls.filters.push(d.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.#a.resumeDialogCheck(()=>this.#s())}#s(){this.isSubmitting.set(!0);let t=this.baseCmdForm.value,e=t.targetUrl??"",l=t.arguments?.split(`
1
+ import{a as Ee}from"./chunk-K3ZQ67VT.js";import"./chunk-CZLLEVMJ.js";import{a as fe}from"./chunk-WWFNG47J.js";import{h as O}from"./chunk-GDBU3Z7P.js";import"./chunk-QY6E755W.js";import{a as Se}from"./chunk-UACX27D3.js";import"./chunk-VC72SWC4.js";import{b as T}from"./chunk-QGFC5ZUR.js";import{a as se}from"./chunk-XNVRJH42.js";import"./chunk-3UN32GIC.js";import"./chunk-OXOOR7I4.js";import"./chunk-GUH5TMOS.js";import"./chunk-RHW5QVAY.js";import"./chunk-66BSPEOQ.js";import"./chunk-CWBEE627.js";import{c as le,e as me,f as de,j as _e,n as ce,o as ue,p as pe,q as Ce,r as ge,s as Ne,t as Me}from"./chunk-USU2EHJV.js";import"./chunk-ZGAC2JKG.js";import"./chunk-ETCRT3EV.js";import{b as q,d as Z,e as J}from"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import{a as Q,e as Y,g as ee,k as te,l as ne,p as ie,t as oe}from"./chunk-WRNQOX5R.js";import{g as ae,h as re}from"./chunk-J3BBLPAD.js";import"./chunk-B5FUQFEQ.js";import"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-73RDJP55.js";import{Ab as a,Bb as n,Cb as r,Gb as A,Hb as h,Jb as v,Pc as j,Qb as N,Ra as m,Rb as M,Sb as u,Tb as G,Ub as U,Wb as x,Yb as f,_ as c,bb as $,ea as S,fa as E,ic as w,oa as F,qc as K,rc as X,sc as z,ub as b,vb as B,wb as k,xb as R,xc as V,yb as y,yc as H,zb as C,zc as W}from"./chunk-QDFCX6XE.js";import"./chunk-EUDKD2JW.js";var Fe=()=>["backup"];function Ae(s,t){s&1&&r(0,"sh-progress-bar",12)}function he(s,t){if(s&1&&(a(0,"sh-form-field"),r(1,"input",32),n()),s&2){let e=t.$implicit,l=t.$index;m(),C("id",V("filter-",l))("formControl",e)}}function Te(s,t){if(s&1){let e=v();a(0,"form",13)(1,"sh-select",14)(2,"label",15),u(3,1),n(),r(4,"input",16),n(),a(5,"sh-form-field")(6,"label",17),u(7,2),n(),r(8,"textarea",18),n(),a(9,"sh-form-field")(10,"label",19),u(11,3),n(),r(12,"textarea",20),n()(),a(13,"sh-divider"),u(14,4),n(),a(15,"form",13)(16,"sh-form-field")(17,"label",21),u(18,5),n(),r(19,"input",22),n(),a(20,"sh-form-field")(21,"label",23),u(22,6),n(),r(23,"input",24),n(),a(24,"app-toggle-card",25),A(25,26),u(26,7),h(),A(27,27),R(28,he,2,3,"sh-form-field",null,k),h(),n()(),a(30,"p"),N(31,8),r(32,"a",28),M(),n(),a(33,"app-options-list",29),z("optionsChange",function(o){S(e);let p=f();return X(p.settings,o)||(p.settings=o),E(o)}),n(),a(34,"div",30)(35,"button",31),x("click",function(){S(e);let o=f();return E(o.submit())}),N(36,9),r(37,"sh-icon"),M(),n()()}if(s&2){let e=f();C("formGroup",e.baseCmdForm),m(),C("options",e.commandOptions()??W(10,Fe))("inlineSearch",!0),m(14),C("formGroup",e.standardFields),m(9),C("disallowToggle",!0),m(4),y(e.standardFields.controls.filters.controls),m(5),K("options",e.settings),C("hasFreeTextSettings",!0),m(2),w("loader",e.isSubmitting()),m(2),G(e.baseCmdForm.value.command),U(36)}}var d=new ge,Oe=["Bytes","KB","MB","GB","TB","PB"],P=class s{#e=c(O);#t=c(re);#n=c(Z);#i=c(q);#o=c(ae);#a=c(se);#l=c(Y);#r=T(this.#i.params);commandOptions=T(this.#o.getApiV1Commandline());sizeOptions=F(Oe);isSubmitting=F(!1);optionsFields=this.#e.optionsFields;standardFields=d.group({"backup-id":d.control(""),"backup-name":d.control(""),dbpath:d.control(""),filters:d.array([])});baseCmdForm=d.group({command:d.control("backup"),targetUrl:d.control(""),arguments:d.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#m=j(()=>{let t=this.#r()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#t.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.#e.mapGeneralToForm(e.Backup),this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup)),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),t.Filters&&t.Filters.length&&t.Filters.map(e=>{this.standardFields.controls.filters.push(d.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.#a.resumeDialogCheck(()=>this.#s())}#s(){this.isSubmitting.set(!0);let t=this.baseCmdForm.value,e=t.targetUrl??"",l=t.arguments?.split(`
2
2
  `).filter(i=>i.length>0)??[],o=this.standardFields.value,p=o.filters??[],g=[t.command,e,...l,`--backup-name=${o["backup-name"]}`,`--dbpath=${o.dbpath}`,`--backup-id=${o["backup-id"]}`,...p.filter(i=>i).map(i=>i.startsWith("-")?`--exclude=${i?.slice(1)}`:`--include=${i}`),...this.#e.mapFormsToSettings(["backup-id","backup-name","dbpath"]).map(i=>`${i.Name.startsWith("--")?"":"--"}${i.Name}=${i.Value}`),"--disable-module=console-password-input"];this.#t.postApiV1Commandline({requestBody:g}).subscribe(i=>{i.Status==="OK"&&this.#n.navigate(["backup",this.backupId(),"commandline",i.ID])})}mapBaseCmdToForm(t){let e=t.TargetURL??null;e&&this.baseCmdForm.patchValue({targetUrl:e??"",arguments:t.Sources?.join(`
3
3
  `)??""})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=$({type:s,selectors:[["app-commandline"]],features:[H([O])],decls:8,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`Command`;let l;l=$localize`TargetUrl`;let o;o=$localize`Commandline Arguments`;let p;p=$localize`Advanced options`;let g;g=$localize`Backup ID`;let i;i=$localize`Backup Name`;let I;I=$localize`Filters`;let D;D=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#32\uFFFD"}:START_LINK:Read more${"\uFFFD/#32\uFFFD"}:CLOSE_LINK:`;let L;return L=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Run "${"\uFFFD0\uFFFD"}:INTERPOLATION:" command now `,[t,e,l,o,p,g,i,I,D,L,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"indeterminate","primary"],[3,"formGroup"],["placeholder","Select a command...",3,"options","inlineSearch"],["for","command"],["type","text","id","command","formControlName","command"],["for","targetUrl"],["id","targetUrl","autocomplete","off","formControlName","targetUrl"],["for","arguments"],["id","arguments","autocomplete","off","formControlName","arguments"],["for","backup-id"],["id","backup-id","formControlName","backup-id"],["for","backup-name"],["id","backup-name","formControlName","backup-name"],[3,"disallowToggle"],["title",""],["content","","formGroupName","filters"],["href","#",1,"sh-primary"],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","",1,"raised","primary",3,"click"],[3,"id","formControl"]]},template:function(e,l){e&1&&(r(0,"app-status-bar"),a(1,"section")(2,"div",10)(3,"button",11),N(4,0),r(5,"sh-icon"),M(),n()(),b(6,Ae,1,0,"sh-progress-bar",12)(7,Te,38,11),n()),e&2&&(m(6),B(l.finishedLoading()?7:6))},dependencies:[Ne,_e,le,me,de,fe,Ee,Se,Me,ce,ue,Ce,pe,J,ne,ee,te,oe,ie,Q],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;max-width:40rem;padding:2.5rem;gap:1.25rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};export{P as default};