@duplicati/ngclient 0.0.225 → 0.0.226

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 (100) hide show
  1. package/assets/images/backup-from-config.png +0 -0
  2. package/assets/images/backup-from-remote.png +0 -0
  3. package/{chunk-KZYRTI62.js → chunk-3GE3OWQF.js} +1 -1
  4. package/{chunk-6DX35WDO.js → chunk-47XLDVIW.js} +1 -1
  5. package/chunk-4V3AE4ZE.js +1 -0
  6. package/chunk-5IK3XXXK.js +1 -0
  7. package/chunk-66KSIF26.js +1 -0
  8. package/chunk-6A42WZTO.js +1 -0
  9. package/{chunk-VTOEFKZG.js → chunk-6GUEHKCO.js} +1 -1
  10. package/chunk-6JZ257HD.js +1 -0
  11. package/{chunk-EXAZ4QZR.js → chunk-6LQMQH6Z.js} +1 -1
  12. package/{chunk-PDZNQW6F.js → chunk-6RZVYDJF.js} +1 -1
  13. package/chunk-75ULGSKP.js +1 -0
  14. package/chunk-A2BMFFEA.js +1 -0
  15. package/{chunk-OYU6OBKA.js → chunk-A6LVKRWD.js} +1 -1
  16. package/chunk-AOPTGCDG.js +2 -0
  17. package/chunk-AU25JBCN.js +11 -0
  18. package/chunk-DCBSWJWZ.js +1 -0
  19. package/{chunk-OSGHJCUU.js → chunk-DHJS5K3Y.js} +1 -1
  20. package/{chunk-PNRFCYAE.js → chunk-DPQTEDTG.js} +1 -1
  21. package/{chunk-NE255HQN.js → chunk-EY7DOUFA.js} +1 -1
  22. package/{chunk-4ISFDBI3.js → chunk-FUF6MJKB.js} +1 -1
  23. package/{chunk-JNZJE3GC.js → chunk-FXUIGUFS.js} +1 -1
  24. package/chunk-G4QGXDP5.js +1 -0
  25. package/{chunk-AR5SEBWX.js → chunk-GDKT3FJR.js} +1 -1
  26. package/{chunk-N5XYG3QW.js → chunk-GO52XH3L.js} +1 -1
  27. package/{chunk-P2EIEVFT.js → chunk-GULHHZTR.js} +1 -1
  28. package/{chunk-T7RMSUHE.js → chunk-HX3OONES.js} +1 -1
  29. package/{chunk-TXCVGOPN.js → chunk-I5OT6RKO.js} +1 -1
  30. package/{chunk-VQLI7RDY.js → chunk-JSPDZRZU.js} +1 -1
  31. package/{chunk-5UJN5SN4.js → chunk-JUESTFR6.js} +1 -1
  32. package/chunk-K3VYMXQM.js +1 -0
  33. package/chunk-KKD7OSBL.js +1 -0
  34. package/{chunk-OP7MDR2B.js → chunk-KKUFO6NZ.js} +1 -1
  35. package/{chunk-EBKOJDCT.js → chunk-KMESPAAQ.js} +1 -1
  36. package/{chunk-ZSAEIKEB.js → chunk-KYWUJWBQ.js} +1 -1
  37. package/{chunk-UIVZWXBK.js → chunk-LNE7WQZG.js} +1 -1
  38. package/{chunk-ZGQ2WCM2.js → chunk-LP2FIVE3.js} +1 -1
  39. package/{chunk-O2HQIEE4.js → chunk-LP3KCTXP.js} +1 -1
  40. package/chunk-LZIQCSZ3.js +1 -0
  41. package/chunk-M3QHK4UT.js +1 -0
  42. package/{chunk-JBX7YYME.js → chunk-MIJNCB2V.js} +1 -1
  43. package/{chunk-5QGFYH2A.js → chunk-MOOFSJSE.js} +1 -1
  44. package/chunk-MWQHWJOA.js +1 -0
  45. package/{chunk-7VQ67PEZ.js → chunk-MWY7XFWW.js} +1 -1
  46. package/{chunk-MSIH2OJ5.js → chunk-N2ZEWG3V.js} +1 -1
  47. package/{chunk-3PARK7B7.js → chunk-NDEZRDHS.js} +1 -1
  48. package/chunk-NNSH2MIZ.js +1 -0
  49. package/{chunk-POVWDK74.js → chunk-ONQFM5B7.js} +1 -1
  50. package/chunk-OVNIENWW.js +2 -0
  51. package/{chunk-NQAD2FBX.js → chunk-PKSSAQHV.js} +1 -1
  52. package/chunk-PSEMHKPR.js +1 -0
  53. package/{chunk-3V25RAVK.js → chunk-QAEOCCMO.js} +1 -1
  54. package/chunk-QMZVKUXI.js +1 -0
  55. package/{chunk-JCXT6U5P.js → chunk-QODXELJ3.js} +1 -1
  56. package/{chunk-XUCXLLB4.js → chunk-R2U3UIJI.js} +1 -1
  57. package/{chunk-TSVSMVY4.js → chunk-S5IJ4C5T.js} +1 -1
  58. package/{chunk-QW23XWNE.js → chunk-SCDXVGMX.js} +1 -1
  59. package/{chunk-3DHD6GQL.js → chunk-SCFUXVU4.js} +1 -1
  60. package/chunk-SY6UK74R.js +1 -0
  61. package/{chunk-35FMFK4I.js → chunk-TGVKMKNV.js} +1 -1
  62. package/chunk-U2QRNQWA.js +1 -0
  63. package/{chunk-YS4B2B5N.js → chunk-UHSRAJTA.js} +1 -1
  64. package/{chunk-KX3UP3HV.js → chunk-UK6C6RS4.js} +1 -1
  65. package/{chunk-PMF4FTBF.js → chunk-ULC7YKKF.js} +1 -1
  66. package/{chunk-3HYQMG65.js → chunk-UZ2BD6RF.js} +1 -1
  67. package/{chunk-G7TNRWOU.js → chunk-VCDNIRPY.js} +1 -1
  68. package/{chunk-VOXTAZLZ.js → chunk-VJ3733O4.js} +1 -1
  69. package/chunk-W7PQYY25.js +1 -0
  70. package/{chunk-A23UTI46.js → chunk-XAYQR66G.js} +1 -1
  71. package/{chunk-ZXBKGNJU.js → chunk-XCS545S6.js} +1 -1
  72. package/{chunk-TWWAK5M6.js → chunk-XJUQUKBN.js} +1 -1
  73. package/chunk-XKDNDQVK.js +1 -0
  74. package/chunk-YQ5IJ3RD.js +1 -0
  75. package/{chunk-E4CYVUYG.js → chunk-ZFV3MK5Y.js} +1 -1
  76. package/chunk-ZUMHFNEV.js +1 -0
  77. package/index.html +1 -1
  78. package/main-RCWMFMBQ.js +1 -0
  79. package/package.json +1 -1
  80. package/chunk-2EX5HS5X.js +0 -1
  81. package/chunk-5FQ7HESA.js +0 -1
  82. package/chunk-6WX2UOAN.js +0 -1
  83. package/chunk-EVEI25GQ.js +0 -2
  84. package/chunk-GKAMSAN5.js +0 -1
  85. package/chunk-HS3UDQIJ.js +0 -1
  86. package/chunk-IDJ52K34.js +0 -1
  87. package/chunk-ITN4L52Q.js +0 -1
  88. package/chunk-J7GH3G72.js +0 -1
  89. package/chunk-KGK4RY3J.js +0 -1
  90. package/chunk-KNSQLQC6.js +0 -1
  91. package/chunk-KUNX5APQ.js +0 -1
  92. package/chunk-LXTSZI4K.js +0 -1
  93. package/chunk-MKI54WTC.js +0 -1
  94. package/chunk-NUV5LHQV.js +0 -1
  95. package/chunk-O2L2FRYE.js +0 -11
  96. package/chunk-TV7OB7Y4.js +0 -1
  97. package/chunk-UNQKMTFM.js +0 -1
  98. package/chunk-VZNLMGYP.js +0 -2
  99. package/chunk-Y47NRSCA.js +0 -1
  100. package/main-S64CL44W.js +0 -1
@@ -0,0 +1 @@
1
+ import{a as Sn}from"./chunk-6LQMQH6Z.js";import{a as pn}from"./chunk-XJUQUKBN.js";import"./chunk-47XLDVIW.js";import"./chunk-TGVKMKNV.js";import{c as En,f as gn}from"./chunk-OVNIENWW.js";import{b as Tn}from"./chunk-LNE7WQZG.js";import{a as Cn}from"./chunk-ZFV3MK5Y.js";import"./chunk-BPHX6VXP.js";import"./chunk-XWML36YQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-COEGVUM3.js";import{a as Fn}from"./chunk-UHSRAJTA.js";import{b as dn}from"./chunk-3GE3OWQF.js";import"./chunk-S5IJ4C5T.js";import"./chunk-2KD757N6.js";import{b as un}from"./chunk-KKUFO6NZ.js";import"./chunk-PEOYNJJM.js";import"./chunk-MWQHWJOA.js";import"./chunk-6RZVYDJF.js";import{A as nn,B as ae,C as tn,E as on,G as _n,K as an,L as ln,S as rn,T as cn,v as _e,z as en}from"./chunk-CJKZ27FM.js";import{d as sn}from"./chunk-4V3AE4ZE.js";import{e as oe}from"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as x,Bb as z,Bc as W,Cb as V,Cc as $,Db as E,Eb as o,Fb as i,G as q,Gb as C,Gc as D,Hc as G,Ic as L,Kb as N,Kc as ie,Lb as M,Mb as f,Nb as R,Qa as J,Rc as j,Ta as a,Ub as s,Vb as u,Wb as d,Xb as k,Yb as H,Zb as U,_b as I,ac as l,ea as m,fa as O,hb as qe,jc as K,lc as A,mb as P,nb as Qe,oc as T,qa as y,qc as S,sa as je,tc as Q,ub as Ye,uc as Y,vb as Ze,vc as Z,wc as ee,xb as g,xc as ne,yb as p,yc as te,zb as X}from"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";var On=()=>[oe,import("./chunk-V2M5YF4E.js").then(e=>e.NgTemplateOutlet),ae,_e,on,cn,rn,import("./chunk-LZIQCSZ3.js").then(e=>e.BackupProgressComponent),import("./chunk-HPXIWKIK.js").then(e=>e.DurationFormatPipe),import("./chunk-HLHUPBCV.js").then(e=>e.BytesPipe),import("./chunk-HWOUAWOE.js").then(e=>e.RelativeTimePipe)],Nn=()=>["/add-backup"],Mn=()=>["/restore"],mn=e=>({$implicit:e}),In=()=>["/backup/new"],Pn=e=>["/backup",e],Dn=e=>["/restore",e],fn=e=>["/backup",e,"export"],$n=e=>["/backup",e,"delete"],Rn=e=>["/backup",e,"database"],hn=e=>["/backup",e,"commandline"],An=e=>["/backup",e,"log"];function xn(e,t){e&1&&d(0,11,1)}function Ln(e,t){e&1&&d(0,11,2)}function kn(e,t){if(e&1&&d(0,11,3),e&2){let n=l(2);k(n.timeType()),H(0)}}function Hn(e,t){if(e&1){let n=R();o(0,"button",64),I("click",function(){let c=m(n).$implicit,F=l(3);return O(F.sortByColumn.set(c.value))}),d(1,15),i()}if(e&2){let n=t.$implicit,_=l(3);A("active",_.orderBy()===n.value),a(),k(n.label),H(1)}}function yn(e,t){if(e&1&&(o(0,"sh-menu",61)(1,"button",62),s(2,14),C(3,"strong")(4,"sh-icon"),u(),i(),N(5,63),z(6,Hn,2,3,"button",65,X),M(),i()),e&2){let n=l(2);a(4),k(n.orderBy()),H(2),a(2),V(n.sortOrderOptions())}}function Gn(e,t){if(e&1){let n=R();o(0,"div",57)(1,"sh-button-group",58),Z("valueChange",function(c){m(n);let F=l();return Y(F.viewMode,c)||(F.viewMode=c),O(c)}),o(2,"button",59),s(3,9),C(4,"sh-icon"),u(),i(),o(5,"button",60),s(6,10),C(7,"sh-icon"),u(),i()(),o(8,"sh-menu",61)(9,"button",62),s(10,11),o(11,"strong"),g(12,xn,1,0)(13,Ln,1,0)(14,kn,1,1),i(),C(15,"sh-icon"),u(),i(),N(16,63),o(17,"button",64),I("click",function(){m(n);let c=l();return O(c.setTimeType("relative"))}),d(18,12),i(),o(19,"button",64),I("click",function(){m(n);let c=l();return O(c.setTimeType("actual"))}),d(20,13),i(),M(),i(),g(21,yn,8,1,"sh-menu",61),i()}if(e&2){let n=l();a(),Q("value",n.viewMode),a(11),p(n.timeType()=="relative"?12:n.timeType()=="actual"?13:14),a(9),p(n.viewMode()==="list"?21:-1)}}function bn(e,t){if(e&1){let n=R();o(0,"div",70)(1,"div",53)(2,"h3"),T(3),o(4,"sh-chip"),C(5,"img",72),T(6),i()()(),o(7,"div",73)(8,"sh-chip",74),d(9,16),i()(),o(10,"div",57)(11,"button",75),I("click",function(){m(n);let c=l().$implicit,F=l(4);return O(F.openInConsole(c))}),s(12,17),C(13,"sh-icon"),u(),i()(),C(14,"app-backup-progress",76),i()}if(e&2){let n=l().$implicit,_=l(4);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),E("src",_.getBackendIcon(n.Backup.TargetURL),J),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(8),E("backupId",n.Backup.ID)}}function Bn(e,t){if(e&1&&(o(0,"p")(1,"span"),d(2,23),i(),T(3),D(4,"relativeTime"),i()),e&2){l();let n=te(5),_=l(6);a(3),S(" ",L(4,1,n,_.timeType()==="actual")," ")}}function vn(e,t){if(e&1&&(T(0),D(1,"durationFormat")),e&2){let n=l(3).$implicit,_=l(4);S(" ",L(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function wn(e,t){e&1&&(N(0),T(1,"-"),M())}function Jn(e,t){if(e&1&&(T(0),D(1,"bytes")),e&2){let n=l(3).$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Xn(e,t){e&1&&(N(0),T(1,"-"),M())}function zn(e,t){if(e&1&&(T(0),D(1,"bytes")),e&2){let n=l(3).$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Vn(e,t){e&1&&(N(0),T(1,"-"),M())}function Un(e,t){if(e&1&&(o(0,"p")(1,"span"),d(2,19),i(),T(3),D(4,"relativeTime"),i(),ee(5),g(6,Bn,5,4,"p"),o(7,"p")(8,"span"),d(9,20),i(),g(10,vn,2,4)(11,wn,2,0,"ng-container"),i(),o(12,"p")(13,"span"),d(14,21),i(),g(15,Jn,2,3)(16,Xn,2,0,"ng-container"),i(),o(17,"p")(18,"span"),d(19,22),i(),g(20,zn,2,3)(21,Vn,2,0,"ng-container"),i()),e&2){let n=l(2).$implicit,_=l(4);a(3),S(" ",L(4,5,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupFinished,_.timeType()==="actual")," "),a(2);let c=ne(_.scheduledTimes()[n.Backup.ID??""]);a(),p(c?6:-1),a(4),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?10:11),a(5),p(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?15:16),a(5),p(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?20:21)}}function Kn(e,t){if(e&1&&C(0,"app-backup-progress",76),e&2){let n=l(2).$implicit;E("backupId",n.Backup.ID)}}function Wn(e,t){e&1&&(o(0,"sh-chip",74),d(1,24),i())}function jn(e,t){e&1&&f(0)}function qn(e,t){if(e&1&&(o(0,"div",71)(1,"div",53)(2,"h3"),T(3),o(4,"sh-chip"),C(5,"img",72),T(6),i()(),g(7,Un,22,9)(8,Kn,1,1,"app-backup-progress",76),i(),o(9,"div",73)(10,"sh-chip",77),d(11,18),i(),g(12,Wn,2,0,"sh-chip",74),i(),o(13,"div",57),P(14,jn,1,0,"ng-container",78),i()()),e&2){let n=l().$implicit,_=l(4),c=K(33);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),E("src",_.getBackendIcon(n.Backup.TargetURL),J),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(),p(_.runningBackupId()!==n.Backup.ID?7:8);let F=_.getBackupVersionCount(n);a(4),k(F)(F),H(11),a(),p(n.Backup.ExternalID?12:-1),a(2),E("ngTemplateOutlet",c)("ngTemplateOutletContext",$(9,mn,n))}}function Qn(e,t){if(e&1&&g(0,bn,15,4,"div",70)(1,qn,15,11,"div",71),e&2){let n=t.$implicit;p(n.Backup.ExternalID?0:1)}}function Yn(e,t){if(e&1&&z(0,Qn,2,1,null,null,X),e&2){let n=l(3);V(n.backups())}}function Zn(e,t){e&1&&(o(0,"div",69),s(1,25),o(2,"button",79),C(3,"sh-icon"),i(),u(),i()),e&2&&(a(2),E("routerLink",W(1,In)))}function et(e,t){if(e&1&&(o(0,"div",68),g(1,Yn,2,0)(2,Zn,4,2,"div",69),i()),e&2){let n=l(2);A("fallback",n.backups().length===0),a(),p(n.backups().length?1:2)}}function nt(e,t){e&1&&(s(0,26,1),f(1),u())}function tt(e,t){e&1&&(s(0,27,1),f(1),u())}function it(e,t){e&1&&(s(0,28,1),f(1),u())}function ot(e,t){e&1&&(s(0,29,1),f(1),u())}function _t(e,t){e&1&&(s(0,30,1),f(1),u())}function at(e,t){e&1&&(s(0,31,1),f(1),u())}function lt(e,t){e&1&&(s(0,32,1),f(1),u())}function rt(e,t){if(e&1&&(T(0),D(1,"relativeTime")),e&2){let n=l().$implicit,_=l(3);S(" ",L(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupFinished,_.timeType()==="actual")," ")}}function ct(e,t){e&1&&(N(0),T(1,"-"),M())}function st(e,t){if(e&1&&(T(0),D(1,"relativeTime")),e&2){l();let n=te(11),_=l(3);S(" ",L(1,1,n,_.timeType()==="actual")," ")}}function ut(e,t){e&1&&(N(0),T(1,"-"),M())}function Ft(e,t){if(e&1&&(T(0),D(1,"durationFormat")),e&2){let n=l().$implicit,_=l(3);S(" ",L(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function Ct(e,t){e&1&&(N(0),T(1,"-"),M())}function Tt(e,t){if(e&1&&(T(0),D(1,"bytes")),e&2){let n=l().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function dt(e,t){e&1&&(N(0),T(1,"-"),M())}function Et(e,t){if(e&1&&(T(0),D(1,"bytes")),e&2){let n=l().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function gt(e,t){e&1&&(N(0),T(1,"-"),M())}function pt(e,t){e&1&&f(0)}function St(e,t){if(e&1&&(o(0,"tr")(1,"td"),T(2),i(),o(3,"td")(4,"sh-chip",90),C(5,"img",72),T(6),i()(),o(7,"td"),g(8,rt,2,4)(9,ct,2,0,"ng-container"),i(),o(10,"td"),ee(11),g(12,st,2,4)(13,ut,2,0,"ng-container"),i(),o(14,"td"),g(15,Ft,2,4)(16,Ct,2,0,"ng-container"),i(),o(17,"td"),g(18,Tt,2,3)(19,dt,2,0,"ng-container"),i(),o(20,"td"),g(21,Et,2,3)(22,gt,2,0,"ng-container"),i(),o(23,"td")(24,"span"),d(25,35),i()(),o(26,"td"),P(27,pt,1,0,"ng-container",78),i()()),e&2){let n=t.$implicit,_=l(3),c=K(33);a(2),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(3),E("src",_.getBackendIcon(n.Backup.TargetURL),J),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(2),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupFinished?8:9),a(3);let F=ne(_.scheduledTimes()[n.Backup.ID??""]);a(),p(F?12:13),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?15:16),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?18:19),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?21:22);let h=_.getBackupVersionCount(n);a(4),k(h)(h),H(25),a(2),E("ngTemplateOutlet",c)("ngTemplateOutletContext",$(13,mn,n))}}function mt(e,t){if(e&1){let n=R();o(0,"sh-table",80),Z("sortByColumnChange",function(c){m(n);let F=l(2);return Y(F.sortByColumn,c)||(F.sortByColumn=c),O(c)}),o(1,"tr",81)(2,"th",82),s(3,26),P(4,nt,2,0,"ng-container",83),u(),i(),o(5,"th",84),s(6,27),P(7,tt,2,0,"ng-container",83),u(),i(),o(8,"th",85),s(9,28),P(10,it,2,0,"ng-container",83),u(),i(),o(11,"th",86),s(12,29),P(13,ot,2,0,"ng-container",83),u(),i(),o(14,"th",87),s(15,30),P(16,_t,2,0,"ng-container",83),u(),i(),o(17,"th",88),s(18,31),P(19,at,2,0,"ng-container",83),u(),i(),o(20,"th",89),s(21,32),P(22,lt,2,0,"ng-container",83),u(),i(),o(23,"th"),d(24,33),i(),o(25,"th"),d(26,34),i()(),z(27,St,28,15,"tr",null,X),i()}if(e&2){let n=l(2),_=K(35);E("data",n.backups())("loading",n.backupsLoading()),Q("sortByColumn",n.sortByColumn),a(4),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(5),V(n.backups())}}function Ot(e,t){if(e&1&&g(0,et,3,3,"div",66)(1,mt,29,10,"sh-table",67),e&2){let n=l();p(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1)}}function Nt(e,t){e&1&&(o(0,"div",91),C(1,"sh-progress-bar",92),o(2,"div",53)(3,"h3"),d(4,36),i()()())}function Mt(e,t){if(e&1){let n=R();o(0,"button",94),I("click",function(){m(n);let c=l(3);return O(c.abort())}),s(1,38),C(2,"sh-icon"),u(),i()}if(e&2){let n=l(3);A("small",n.viewMode()==="details")}}function It(e,t){if(e&1){let n=R();o(0,"button",94),I("click",function(){m(n);let c=l(3);return O(c.stop())}),s(1,39),C(2,"sh-icon"),u(),i()}if(e&2){let n=l(3);A("small",n.viewMode()==="details")}}function Pt(e,t){e&1&&(s(0,37,1),C(1,"sh-icon"),u())}function Dt(e,t){e&1&&(s(0,37,2),C(1,"sh-icon"),u())}function ft(e,t){if(e&1){let n=R();g(0,Mt,3,2,"button",93)(1,It,3,2,"button",93),o(2,"button",94),I("click",function(){m(n);let c=l(2);return O(c.pauseResume())}),s(3,37),g(4,Pt,2,0)(5,Dt,2,0),u(),i()}if(e&2){let n=l(2);p(n.isStopping()?0:1),a(2),A("small",n.viewMode()==="details")("loading",n.isResuming()),a(2),p(n.clientIsRunning()?4:5)}}function $t(e,t){e&1&&d(0,40,1)}function Rt(e,t){e&1&&(o(0,"sh-icon"),T(1,"check"),i())}function ht(e,t){e&1&&(o(0,"sh-icon"),T(1,"dots-three-vertical"),i())}function At(e,t){if(e&1){let n=R();o(0,"button",94),I("click",function(){m(n);let c=l().$implicit,F=l();return O(F.startBackup(c.Backup.ID))}),s(1,40),C(2,"sh-icon"),g(3,$t,1,0),u(),i(),o(4,"button",95)(5,"sh-icon"),T(6,"pencil-simple"),i()(),o(7,"sh-menu")(8,"button",96),g(9,Rt,2,0,"sh-icon")(10,ht,2,0,"sh-icon"),i(),N(11,63),o(12,"h3",97),T(13,"Operations"),i(),o(14,"button",98),s(15,41),C(16,"sh-icon"),u(),i(),o(17,"button",98),s(18,42),C(19,"sh-icon"),u(),i(),o(20,"button",98),s(21,43),C(22,"sh-icon"),u(),i(),C(23,"sh-divider"),o(24,"h3",97),d(25,44),i(),o(26,"button",98),s(27,45),C(28,"sh-icon"),u(),i(),o(29,"button",64),I("click",function(){m(n);let c=l().$implicit,F=l();return O(F.verifyFiles(c.Backup.ID))}),s(30,46),C(31,"sh-icon"),u(),i(),o(32,"button",64),I("click",function(){m(n);let c=l().$implicit,F=l();return O(F.compressBackup(c.Backup.ID))}),s(33,47),C(34,"sh-icon"),u(),i(),o(35,"button",98),s(36,48),C(37,"sh-icon"),u(),i(),C(38,"sh-divider"),o(39,"h3",97),d(40,49),i(),o(41,"button",98),s(42,50),C(43,"sh-icon"),u(),i(),M(),i()}if(e&2){let n=l().$implicit,_=l();A("loading",_.startingBackup()===n.Backup.ID),a(3),p(_.viewMode()==="list"?3:-1),a(),E("routerLink",$(15,Pn,n.Backup.ID)),a(4),A("loading",_.loadingId()===n.Backup.ID)("success",_.successId()===n.Backup.ID),a(),p(_.successId()===n.Backup.ID?9:10),a(5),E("routerLink",$(17,Dn,n.Backup.ID)),a(3),E("routerLink",$(19,fn,n.Backup.ID)),a(3),E("routerLink",$(21,$n,n.Backup.ID)),a(6),E("routerLink",$(23,Rn,n.Backup.ID)),a(9),E("routerLink",$(25,hn,n.Backup.ID)),a(6),E("routerLink",$(27,An,n.Backup.ID))}}function xt(e,t){if(e&1&&g(0,ft,6,6)(1,At,44,29),e&2){let n=t.$implicit,_=l();p(_.runningBackupId()===n.Backup.ID?0:1)}}function Lt(e,t){e&1&&(o(0,"sh-icon",99),T(1,"funnel-simple"),i(),o(2,"sh-icon",100),T(3,"sort-ascending"),i(),o(4,"sh-icon",101),T(5,"sort-descending"),i())}var le=class e{#t=x(sn);#n=x(Tn);#e=x(Cn);#o=x(dn);#_=x(un);#a=x(en);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;runningBackupId=this.#n.runningBackupId;getBackendType=gn;getBackendIcon=En;timeType=this.#e.timeType;clientIsRunning=this.#n.clientIsRunning;isResuming=this.#n.isResuming;runningTask=j(()=>this.#n.serverState()?.ActiveTask?.Item1);isStopping=j(()=>this.runningTask()==this.#i());scheduledTimes=j(()=>{let t=this.#_.serverState()?.ProposedSchedule??[],n=this.#e.backups(),_={};return n.forEach(c=>{let F=c.Backup?.ID;if(F){var h=t.find(b=>b.Item1==F);h?.Item2?_[F]=h.Item2:c.Schedule?.Time&&(_[F]=c.Schedule.Time)}}),_});#i=y(-1);viewMode=Fn("viewMode","list");sortByColumn=y(this.#e.orderBy());loadingId=y(null);successId=y(null);sortEffect=je(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}openInConsole(t){let n=t.Backup.ExternalID?.split(":")[1];if(!n){console.error("Backup does not have an external ID");return}this.#o.openConsole("/app/machines/configurations/"+n)}setOrderBy(t){this.#e.setOrderBy(t)}setTimeType(t){this.#e.setTimeType(t)}startBackup(t){this.#n.resumeDialogCheck(()=>this.#e.startBackup(t))}openPauseDialog(){this.#a.open(pn,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#n.pauseResume().subscribe()}stop(){let t=this.runningTask();t&&(this.#i.set(t),this.#t.postApiV1TaskByTaskidStop({taskid:t}).subscribe())}abort(){let t=this.runningTask();t&&this.#t.postApiV1TaskByTaskidAbort({taskid:t}).subscribe()}getBackupVersionCount(t){return parseInt(t?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(t){this.loadingId.set(t),this.#t.postApiV1BackupByIdVerify({id:t}).pipe(q(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(t){this.loadingId.set(t),this.#t.postApiV1BackupByIdCompact({id:t}).pipe(q(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=qe({type:e,selectors:[["app-home"]],decls:36,vars:6,consts:()=>{let t;t=$localize`Backups`;let n;n=$localize`Keep your data safe at your chosen destination.`;let _;_=$localize` Create ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let c;c=$localize`Restores`;let F;F=$localize`Recover your files from any backup set.`;let h;h=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let b;b=$localize`My backups`;let re;re=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let ce;ce=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let se;se=$localize` Time: ${"\uFFFD#11\uFFFD"}:START_TAG_STRONG:${"\uFFFD*12:1\uFFFD"}:START_BLOCK_IF: Relative ${"\uFFFD/*12:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*13:2\uFFFD"}:START_BLOCK_ELSE_IF: Actual ${"\uFFFD/*13:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*14:3\uFFFD"}:START_BLOCK_ELSE: ${"\uFFFD0:3\uFFFD"}:INTERPOLATION: ${"\uFFFD/*14:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ue;ue=$localize`Relative time`;let Fe;Fe=$localize`Actual time`;let Ce;Ce=$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 Te;Te=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let de;de=$localize`Externally managed`;let Ee;Ee=$localize` Edit in console ${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:arrow-up-right${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:`;let B;B=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,B=U(B,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let ge;ge=$localize` ${B}:ICU@@6502601490918455200: `;let pe;pe=$localize`Last successful backup:`;let Se;Se=$localize`Duration:`;let me;me=$localize`Source:`;let Oe;Oe=$localize`Destination:`;let Ne;Ne=$localize`Next scheduled run:`;let Me;Me=$localize`Externally managed`;let Ie;Ie=$localize` No backups found ${"\uFFFD#2\uFFFD"}:START_TAG_BUTTON: Click to create one now ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_BUTTON:`;let Pe;Pe=$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 fe;fe=$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 $e;$e=$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 Re;Re=$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 he;he=$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 Ae;Ae=$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 xe;xe=$localize`Version`;let Le;Le=$localize`Actions`;let v;v=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,v=U(v,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let ke;ke=$localize` ${v}:ICU@@3521773141017690117: `;let He;He=$localize`Loading backups...`;let w;w=$localize`${"\uFFFD*4:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Pause ${"\uFFFD/*4:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*5:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Resume ${"\uFFFD/*5:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,w=U(w);let ye;ye=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skull${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Abort `;let Ge;Ge=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:stop${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Stop `;let be;be=$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 Be;Be=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let ve;ve=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let we;we=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let Je;Je=$localize`Advanced`;let Xe;Xe=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let ze;ze=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let Ve;Ve=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Compress now `;let Ue;Ue=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let Ke;Ke=$localize`Reporting`;let We;return We=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Log `,[["actions",""],["sortIcons",""],t,n,_,c,F,h,b,re,ce,se,ue,Fe,Ce,Te,de,Ee,ge,pe,Se,me,Oe,Ne,Me,Ie,Pe,De,fe,$e,Re,he,Ae,xe,Le,ke,He,w,ye,Ge,be,Be,ve,we,Je,Xe,ze,Ve,Ue,Ke,We,[1,"type-a","actionable",3,"keydown.enter","keydown.space","routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","tabindex","-1","shButton",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small","type-b",3,"valueChange","value"],["value","list"],["value","details"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"click"],["type","button",3,"active"],[1,"backups",3,"fallback"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backups"],[1,"no-backups"],[1,"backup","externaly-managed"],[1,"backup"],["alt","",1,"provider-icon",3,"src"],[1,"tags"],[1,"simple","primary"],["type","button","shButton","",3,"click"],[3,"backupId"],[1,"simple","success"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["shButton","",1,"primary","raised",3,"routerLink"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["thead",""],["shSort","name"],[4,"ngTemplateOutlet"],["shSort","type"],["shSort","lastrun"],["shSort","nextrun"],["shSort","duration"],["shSort","sourcesize"],["shSort","destinationsize"],[1,"small"],[1,"loading-list"],[1,"indeterminate","primary"],["shButton","",3,"small"],["shButton","",3,"click"],["type","button","shButton","",3,"routerLink"],["type","button","shButton",""],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,_){n&1&&(C(0,"app-status-bar"),o(1,"section")(2,"header")(3,"sh-card",51),I("keydown.enter",function(F){return F.target.click()})("keydown.space",function(F){return F.target.click()}),C(4,"img",52),o(5,"div",53)(6,"h3"),d(7,2),i(),o(8,"p"),d(9,3),i()(),o(10,"button",54),s(11,4),C(12,"sh-icon"),u(),i()(),o(13,"sh-card",51),I("keydown.enter",function(F){return F.target.click()})("keydown.space",function(F){return F.target.click()}),C(14,"img",55),o(15,"div",53)(16,"h3"),d(17,5),i(),o(18,"p"),d(19,6),i()(),o(20,"button",54),s(21,7),C(22,"sh-icon"),u(),i()()(),o(23,"div",56)(24,"h2"),N(25),d(26,8),M(),g(27,Gn,22,3,"div",57),i(),Qe(28,Ot,2,1)(29,Nt,5,0),Ye(30,28,On,null,29),i()(),P(32,xt,2,1,"ng-template",null,0,ie)(34,Lt,6,0,"ng-template",null,1,ie)),n&2&&(a(3),E("routerLink",W(4,Nn)),a(10),E("routerLink",W(5,Mn)),a(14),p(_.backups().length>0?27:-1),a(3),Ze(!_.backupsLoading()))},dependencies:[oe,Sn,tn,ae,_e,_n,an,ln,nn],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}@media only screen and (max-width:768px){header[_ngcontent-%COMP%]{grid-template-columns:1fr}}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}@media only screen and (max-width:768px){.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}}sh-menu[_ngcontent-%COMP%]{color:red}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backups.fallback[_ngcontent-%COMP%]{justify-content:center;align-items:center;padding:4rem;border:1px solid var(--base-4);background:var(--base-2);border-radius:var(--shape-2);width:calc(100% - 4rem);margin:0 auto}.no-backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}@media only screen and (max-width:768px){.backup[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start}}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}@media only screen and (max-width:768px){.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{max-width:initial}}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.backup[_ngcontent-%COMP%] .tags[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:.5rem}.provider-icon[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) sh-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] sh-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] sh-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}"],changeDetection:0})};export{le as default};
@@ -0,0 +1 @@
1
+ import"./chunk-7CGTOI24.js";var t=[{path:"",redirectTo:"destination",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-XKDNDQVK.js")},{path:"encryption",loadComponent:()=>import("./chunk-QMZVKUXI.js")},{path:"select-config",loadComponent:()=>import("./chunk-U2QRNQWA.js")}],o=t;export{o as default};
@@ -1 +1 @@
1
- import{a as D}from"./chunk-NUV5LHQV.js";import{c as j,e as V}from"./chunk-PDZNQW6F.js";import{z as b}from"./chunk-CJKZ27FM.js";import{a as x,d as v}from"./chunk-KNSQLQC6.js";import{ma as L}from"./chunk-YF6JHIN5.js";import{$ as a,Gc as W,Hb as N,Ib as C,Ic as $,Jb as _,N as R,Rc as p,Ta as M,Ub as A,Vb as w,W as h,Wb as P,Xb as F,Yb as G,f as m,g as y,hb as I,qa as n,sa as O}from"./chunk-K5XGRFWJ.js";var S=class r{reconnectTimer=n(15e3);countdown=n(0);connectTimerEffect=O(()=>{let e=this.reconnectTimer();this.countdown.set(e/1e3)});interval=setInterval(()=>{if(this.countdown()<=1){this.countdown.set(this.reconnectTimer()/1e3);return}this.countdown.set(this.countdown()-1)},1e3);ngOnDestroy(){clearInterval(this.interval)}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=I({type:r,selectors:[["app-disconnected-dialog"]],decls:8,vars:4,consts:()=>{let e;e=$localize`Reconnecting...`;let t;return t=$localize` The connection to the server is lost, attempting again in ${"\uFFFD#6\uFFFD"}:START_TAG_STRONG:0:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_STRONG:`,[e,t,["header",""],["content",""]]},template:function(t,s){t&1&&(N(0,"header",2)(1,"h3"),P(2,0),C()(),N(3,"div",3)(4,"p"),A(5,1),_(6,"strong"),W(7,"number"),w(),C()()),t&2&&(M(7),F($(7,1,s.countdown(),"2.0-0")),G(5))},dependencies:[L],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var l=!1,T=class r{#e=a(V);#n=a(D);dialog=a(b);#s=null;#t=n("disconnected");#i=n(null);#a=n(null);#u=n(null);#o=n(null);#r=n(null);#d=n(null);#c=n(null);#h=void 0;#l=n({legacystatus:!0});shouldConnect=n(!0);connectionStatus=this.#t.asReadonly();serverState=this.#i.asReadonly();serverProgress=this.#a.asReadonly();serverSettings=this.#u.asReadonly();subscriptions=this.#l.asReadonly();serverTaskQueue=this.#o.asReadonly();backupListState=this.#r.asReadonly();notificationState=this.#d.asReadonly();remoteControlState=this.#c.asReadonly();#S=null;taskCompleted=new m(e=>{this.#S=e});#f=0;#p=null;start(){this.shouldConnect.set(!0),this.#m()}#m(){this.#p&&(clearTimeout(this.#p),this.#p=null);let e=this.#e.token();if(!e){console.error("No access token available");return}let t=window.location.protocol==="https:"?"wss:":"ws:",s=window.location.port?`:${window.location.port}`:"";window.location.port==="4200"&&(s=":8200");let u=window.location.hostname,g=x.BASE||"",f=this.#e.xsrfQueryParam(),Q=this.#n.hasWebSocketAuth()?`${t}//${u}${s}${g}/notifications${f?`?${f}`:""}`:`${t}//${u}${s}${g}/notifications?token=${e}${f?`&${f}`:""}`;this.#t.set("connecting"),this.#s=new WebSocket(Q),this.#s.onopen=()=>{l&&console.log("WebSocket connection established"),this.#n.hasWebSocketAuth()?(this.#t.set("authenticating"),this.#s?.send(JSON.stringify({Version:1,Token:e,Action:"auth"}))):this.#g()},this.#s.onmessage=d=>{if(this.#t()==="authenticating")try{let i=JSON.parse(d.data);if(i.Success){l&&console.log("WebSocket authentication successful"),this.#g();return}else if(i?.Type==="legacystatus")l&&console.log("WebSocket authentication successful"),this.#g();else{console.error("WebSocket authentication failed:",i.Message),this.#t.set("disconnected"),this.#e.refreshToken().subscribe({next:()=>{this.reconnect()},error:o=>{console.error("Error refreshing token after WebSocket auth failed",o)}});return}}catch(i){console.error("Error parsing WebSocket authentication reply",i),this.#t.set("disconnected");return}try{let i=JSON.parse(d.data),c=i?.Type;if(c==="legacystatus"||c==null)l&&console.log("Received legacy status update:",i),this.#i.set(i);else if(c==="reply"){let o=i;o.Success||console.error("WebSocket reply error:",o.Message)}else if(c==="progress"){let o=i;l&&console.log("Received progress update:",o.Data),this.#a.set(o.Data)}else if(c==="serversettings"){let o=i;l&&console.log("Received server settings update:",o.Data),this.#u.set(o.Data)}else if(c==="taskqueue"){let o=i;l&&console.log("Received task update:",o.Data),this.#o.set(o.Data)}else if(c==="taskcompleted"){let o=i;l&&console.log("Received task completed:",o.Data),this.#S?.next(o.Data)}else if(c==="backuplist"){let o=i;l&&console.log("Received backup list update:",o.Data),this.#r.set(o.Data)}else if(c==="notifications"){let o=i;l&&console.log("Received notification update:",o.Data),this.#d.set(o.Data)}else if(c==="remotecontrol"){let o=i;l&&console.log("Received remote control update:",o.Data),this.#c.set(o.Data)}else console.warn("Unknown WebSocket message type:",c)}catch(i){console.error("Error parsing WebSocket message",i)}},this.#s.onclose=d=>{l&&console.log("WebSocket connection closed",d),this.#t.set("disconnected");var i=d.code===4401;i&&this.#e.refreshToken().subscribe({next:()=>{this.reconnect()},error:c=>{console.error("Error refreshing token",c)}}),this.shouldConnect()&&(this.#h||(this.#h=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#h.component.reconnectTimer.set(15e3)),this.#p&&clearTimeout(this.#p),this.#p=setTimeout(()=>this.#m(),5e3))},this.#s.onerror=d=>{console.error("WebSocket error",d),this.#t.set("disconnected")}}#g(){this.#t.set("connected");let e=this.#l();Object.keys(e).length>0&&Object.entries(e).forEach(([t,s])=>{s!=null&&this.sendSubscribeRequest(t,s)}),this.#h&&this.#h.close()}stop(){this.shouldConnect.set(!1),this.#s?.close()}reconnect(){this.#s?.close(),this.start()}reconnectIfNeeded(){this.#s?.readyState!==WebSocket.OPEN&&this.reconnect()}sendSubscribeRequest(e,t){this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#f}`,Action:"sub",Service:e,Data:t||null}))}subscribe(e,t=void 0){let s=this.#l(),u=s[e];(!u||JSON.stringify(u)!==JSON.stringify(t||!0))&&(s[e]=t||!0,this.#l.set(s),this.#t()=="connected"&&this.sendSubscribeRequest(e,t))}unsubscribe(e){let t=this.#l();t[e]&&(delete t[e],this.#l.set(t),this.#t()=="connected"&&this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#f}`,Action:"unsub",Service:e})))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};var k=class r{dialog=a(b);#e=a(v);#n=n("disconnected");#s=n(null);#t=n(-1);#i=n(0);#a=n(!1);#u=new y;connectionStatus=this.#n.asReadonly();serverState=this.#s.asReadonly();#o=void 0;duration=a(j).relayIsEnabled()?"94s":"299s";start(){this.#a.set(!0),this.#u=new y,this.#r()}stop(){this.#u.next(),this.#u.complete(),this.#a.set(!1)}reconnect(){this.stop(),this.start()}reconnectIfNeeded(){this.#a()||this.reconnect()}#r(){this.#n.set("connecting"),this.#e.getApiV1Serverstate({lastEventId:this.#t(),longpoll:this.#t()>=0,duration:this.duration}).pipe(R(this.#u)).subscribe({next:e=>{e&&this.#d(e),this.#c()},error:e=>{let s=this.#i()+1,u=Math.min(5e3*s,3e4);this.#i.set(s),s>3&&this.#n.set("disconnected"),this.#o||(this.#o=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1})),this.#o.component.reconnectTimer.set(u),setTimeout(()=>{this.#r()},u)}})}#d(e){this.#n.set("connected"),this.#s.set(e),this.#t.set(e.LastEventID??-1),this.#i.set(0)}#c(){this.#a()&&this.#r()}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};var q=10,J=class r{#e=a(T);#n=a(k);#s=a(v);#t=a(D);#i=n("longpoll");#a=n(!1);#u=p(()=>this.#t.hasTaskCompletedOption()&&this.#i()==="websocket");#o={};#r=null;#d=!1;#c=[];constructor(){this.#e.subscribe("taskcompleted"),this.#e.taskCompleted.subscribe(e=>{if(this.#c.unshift(e),this.#c.length>q&&this.#c.pop(),!e.ID)return;let t=this.#o[e.ID];t&&(t.forEach(s=>{s.next(e),s.complete()}),delete this.#o[e.ID])})}connectionStatus=p(()=>this.#i()==="websocket"?this.#e.connectionStatus():this.#n.connectionStatus());isConnectionMethodSet=this.#a.asReadonly();serverState=p(()=>this.#i()==="websocket"?this.#e.serverState():this.#n.serverState());progressState=this.#e.serverProgress;taskQueueState=this.#e.serverTaskQueue;activeTaskQueueState=p(()=>this.#i()==="websocket"?this.#e.serverTaskQueue()?.map(t=>t.ID).filter(t=>t)??[]:(this.#n.serverState()?.SchedulerQueueIds??[]).map(t=>t.Item1).filter(t=>t));backupListState=p(()=>this.#e.backupListState());setConnectionMethod(e){e==="websocket"?(this.#e.reconnectIfNeeded(),this.#n.stop()):(this.#n.reconnectIfNeeded(),this.#e.stop()),this.#i.set(e),this.#a.set(!0)}getConnectionMethod(){return this.#i()}subscribe(e,t=null){this.#e.subscribe(e,t)}unsubscribe(e){this.#e.unsubscribe(e)}waitForTaskToComplete(e){return new m(t=>{let s=this.#c.find(u=>u.ID===e);if(s){t.next(s),t.complete();return}this.#o[e]=this.#o[e]||[],this.#o[e].push(t),this.#h()})}#h(){this.#d||this.#u()||(this.#d=!0,this.#l())}#l(){let e=Object.keys(this.#o).map(s=>parseInt(s,10));if(e.length===0){this.#S();return}let t=Math.min(...e);this.#s.getApiV1TaskByTaskid({taskid:t}).subscribe({next:s=>{s.TaskFinished!=null&&(this.#c.unshift(s),this.#c.length>q&&this.#c.pop(),this.#o[t].forEach(g=>{g.next(s),g.complete()}),delete this.#o[t])},complete:()=>{this.#r=window.setTimeout(()=>{this.#l()},1e3)},error:s=>{this.#r=window.setTimeout(()=>{this.#l()},3e3)}})}#S(){this.#r!==null&&(clearTimeout(this.#r),this.#r=null),this.#d=!1}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};export{T as a,J as b};
1
+ import{a as D}from"./chunk-MWQHWJOA.js";import{c as j,e as V}from"./chunk-6RZVYDJF.js";import{z as b}from"./chunk-CJKZ27FM.js";import{a as x,d as v}from"./chunk-4V3AE4ZE.js";import{ma as L}from"./chunk-YF6JHIN5.js";import{$ as a,Gc as W,Hb as N,Ib as C,Ic as $,Jb as _,N as R,Rc as p,Ta as M,Ub as A,Vb as w,W as h,Wb as P,Xb as F,Yb as G,f as m,g as y,hb as I,qa as n,sa as O}from"./chunk-K5XGRFWJ.js";var S=class r{reconnectTimer=n(15e3);countdown=n(0);connectTimerEffect=O(()=>{let e=this.reconnectTimer();this.countdown.set(e/1e3)});interval=setInterval(()=>{if(this.countdown()<=1){this.countdown.set(this.reconnectTimer()/1e3);return}this.countdown.set(this.countdown()-1)},1e3);ngOnDestroy(){clearInterval(this.interval)}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=I({type:r,selectors:[["app-disconnected-dialog"]],decls:8,vars:4,consts:()=>{let e;e=$localize`Reconnecting...`;let t;return t=$localize` The connection to the server is lost, attempting again in ${"\uFFFD#6\uFFFD"}:START_TAG_STRONG:0:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_STRONG:`,[e,t,["header",""],["content",""]]},template:function(t,s){t&1&&(N(0,"header",2)(1,"h3"),P(2,0),C()(),N(3,"div",3)(4,"p"),A(5,1),_(6,"strong"),W(7,"number"),w(),C()()),t&2&&(M(7),F($(7,1,s.countdown(),"2.0-0")),G(5))},dependencies:[L],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var l=!1,T=class r{#e=a(V);#n=a(D);dialog=a(b);#s=null;#t=n("disconnected");#i=n(null);#a=n(null);#u=n(null);#o=n(null);#r=n(null);#d=n(null);#c=n(null);#h=void 0;#l=n({legacystatus:!0});shouldConnect=n(!0);connectionStatus=this.#t.asReadonly();serverState=this.#i.asReadonly();serverProgress=this.#a.asReadonly();serverSettings=this.#u.asReadonly();subscriptions=this.#l.asReadonly();serverTaskQueue=this.#o.asReadonly();backupListState=this.#r.asReadonly();notificationState=this.#d.asReadonly();remoteControlState=this.#c.asReadonly();#S=null;taskCompleted=new m(e=>{this.#S=e});#f=0;#p=null;start(){this.shouldConnect.set(!0),this.#m()}#m(){this.#p&&(clearTimeout(this.#p),this.#p=null);let e=this.#e.token();if(!e){console.error("No access token available");return}let t=window.location.protocol==="https:"?"wss:":"ws:",s=window.location.port?`:${window.location.port}`:"";window.location.port==="4200"&&(s=":8200");let u=window.location.hostname,g=x.BASE||"",f=this.#e.xsrfQueryParam(),Q=this.#n.hasWebSocketAuth()?`${t}//${u}${s}${g}/notifications${f?`?${f}`:""}`:`${t}//${u}${s}${g}/notifications?token=${e}${f?`&${f}`:""}`;this.#t.set("connecting"),this.#s=new WebSocket(Q),this.#s.onopen=()=>{l&&console.log("WebSocket connection established"),this.#n.hasWebSocketAuth()?(this.#t.set("authenticating"),this.#s?.send(JSON.stringify({Version:1,Token:e,Action:"auth"}))):this.#g()},this.#s.onmessage=d=>{if(this.#t()==="authenticating")try{let i=JSON.parse(d.data);if(i.Success){l&&console.log("WebSocket authentication successful"),this.#g();return}else if(i?.Type==="legacystatus")l&&console.log("WebSocket authentication successful"),this.#g();else{console.error("WebSocket authentication failed:",i.Message),this.#t.set("disconnected"),this.#e.refreshToken().subscribe({next:()=>{this.reconnect()},error:o=>{console.error("Error refreshing token after WebSocket auth failed",o)}});return}}catch(i){console.error("Error parsing WebSocket authentication reply",i),this.#t.set("disconnected");return}try{let i=JSON.parse(d.data),c=i?.Type;if(c==="legacystatus"||c==null)l&&console.log("Received legacy status update:",i),this.#i.set(i);else if(c==="reply"){let o=i;o.Success||console.error("WebSocket reply error:",o.Message)}else if(c==="progress"){let o=i;l&&console.log("Received progress update:",o.Data),this.#a.set(o.Data)}else if(c==="serversettings"){let o=i;l&&console.log("Received server settings update:",o.Data),this.#u.set(o.Data)}else if(c==="taskqueue"){let o=i;l&&console.log("Received task update:",o.Data),this.#o.set(o.Data)}else if(c==="taskcompleted"){let o=i;l&&console.log("Received task completed:",o.Data),this.#S?.next(o.Data)}else if(c==="backuplist"){let o=i;l&&console.log("Received backup list update:",o.Data),this.#r.set(o.Data)}else if(c==="notifications"){let o=i;l&&console.log("Received notification update:",o.Data),this.#d.set(o.Data)}else if(c==="remotecontrol"){let o=i;l&&console.log("Received remote control update:",o.Data),this.#c.set(o.Data)}else console.warn("Unknown WebSocket message type:",c)}catch(i){console.error("Error parsing WebSocket message",i)}},this.#s.onclose=d=>{l&&console.log("WebSocket connection closed",d),this.#t.set("disconnected");var i=d.code===4401;i&&this.#e.refreshToken().subscribe({next:()=>{this.reconnect()},error:c=>{console.error("Error refreshing token",c)}}),this.shouldConnect()&&(this.#h||(this.#h=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#h.component.reconnectTimer.set(15e3)),this.#p&&clearTimeout(this.#p),this.#p=setTimeout(()=>this.#m(),5e3))},this.#s.onerror=d=>{console.error("WebSocket error",d),this.#t.set("disconnected")}}#g(){this.#t.set("connected");let e=this.#l();Object.keys(e).length>0&&Object.entries(e).forEach(([t,s])=>{s!=null&&this.sendSubscribeRequest(t,s)}),this.#h&&this.#h.close()}stop(){this.shouldConnect.set(!1),this.#s?.close()}reconnect(){this.#s?.close(),this.start()}reconnectIfNeeded(){this.#s?.readyState!==WebSocket.OPEN&&this.reconnect()}sendSubscribeRequest(e,t){this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#f}`,Action:"sub",Service:e,Data:t||null}))}subscribe(e,t=void 0){let s=this.#l(),u=s[e];(!u||JSON.stringify(u)!==JSON.stringify(t||!0))&&(s[e]=t||!0,this.#l.set(s),this.#t()=="connected"&&this.sendSubscribeRequest(e,t))}unsubscribe(e){let t=this.#l();t[e]&&(delete t[e],this.#l.set(t),this.#t()=="connected"&&this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#f}`,Action:"unsub",Service:e})))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};var k=class r{dialog=a(b);#e=a(v);#n=n("disconnected");#s=n(null);#t=n(-1);#i=n(0);#a=n(!1);#u=new y;connectionStatus=this.#n.asReadonly();serverState=this.#s.asReadonly();#o=void 0;duration=a(j).relayIsEnabled()?"94s":"299s";start(){this.#a.set(!0),this.#u=new y,this.#r()}stop(){this.#u.next(),this.#u.complete(),this.#a.set(!1)}reconnect(){this.stop(),this.start()}reconnectIfNeeded(){this.#a()||this.reconnect()}#r(){this.#n.set("connecting"),this.#e.getApiV1Serverstate({lastEventId:this.#t(),longpoll:this.#t()>=0,duration:this.duration}).pipe(R(this.#u)).subscribe({next:e=>{e&&this.#d(e),this.#c()},error:e=>{let s=this.#i()+1,u=Math.min(5e3*s,3e4);this.#i.set(s),s>3&&this.#n.set("disconnected"),this.#o||(this.#o=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1})),this.#o.component.reconnectTimer.set(u),setTimeout(()=>{this.#r()},u)}})}#d(e){this.#n.set("connected"),this.#s.set(e),this.#t.set(e.LastEventID??-1),this.#i.set(0)}#c(){this.#a()&&this.#r()}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};var q=10,J=class r{#e=a(T);#n=a(k);#s=a(v);#t=a(D);#i=n("longpoll");#a=n(!1);#u=p(()=>this.#t.hasTaskCompletedOption()&&this.#i()==="websocket");#o={};#r=null;#d=!1;#c=[];constructor(){this.#e.subscribe("taskcompleted"),this.#e.taskCompleted.subscribe(e=>{if(this.#c.unshift(e),this.#c.length>q&&this.#c.pop(),!e.ID)return;let t=this.#o[e.ID];t&&(t.forEach(s=>{s.next(e),s.complete()}),delete this.#o[e.ID])})}connectionStatus=p(()=>this.#i()==="websocket"?this.#e.connectionStatus():this.#n.connectionStatus());isConnectionMethodSet=this.#a.asReadonly();serverState=p(()=>this.#i()==="websocket"?this.#e.serverState():this.#n.serverState());progressState=this.#e.serverProgress;taskQueueState=this.#e.serverTaskQueue;activeTaskQueueState=p(()=>this.#i()==="websocket"?this.#e.serverTaskQueue()?.map(t=>t.ID).filter(t=>t)??[]:(this.#n.serverState()?.SchedulerQueueIds??[]).map(t=>t.Item1).filter(t=>t));backupListState=p(()=>this.#e.backupListState());setConnectionMethod(e){e==="websocket"?(this.#e.reconnectIfNeeded(),this.#n.stop()):(this.#n.reconnectIfNeeded(),this.#e.stop()),this.#i.set(e),this.#a.set(!0)}getConnectionMethod(){return this.#i()}subscribe(e,t=null){this.#e.subscribe(e,t)}unsubscribe(e){this.#e.unsubscribe(e)}waitForTaskToComplete(e){return new m(t=>{let s=this.#c.find(u=>u.ID===e);if(s){t.next(s),t.complete();return}this.#o[e]=this.#o[e]||[],this.#o[e].push(t),this.#h()})}#h(){this.#d||this.#u()||(this.#d=!0,this.#l())}#l(){let e=Object.keys(this.#o).map(s=>parseInt(s,10));if(e.length===0){this.#S();return}let t=Math.min(...e);this.#s.getApiV1TaskByTaskid({taskid:t}).subscribe({next:s=>{s.TaskFinished!=null&&(this.#c.unshift(s),this.#c.length>q&&this.#c.pop(),this.#o[t].forEach(g=>{g.next(s),g.complete()}),delete this.#o[t])},complete:()=>{this.#r=window.setTimeout(()=>{this.#l()},1e3)},error:s=>{this.#r=window.setTimeout(()=>{this.#l()},3e3)}})}#S(){this.#r!==null&&(clearTimeout(this.#r),this.#r=null),this.#d=!1}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};export{T as a,J as b};
@@ -1 +1 @@
1
- import{a as mn}from"./chunk-EXAZ4QZR.js";import"./chunk-TWWAK5M6.js";import"./chunk-6DX35WDO.js";import"./chunk-35FMFK4I.js";import{a as ee}from"./chunk-B4QFOJXL.js";import"./chunk-UIVZWXBK.js";import{a as Ge}from"./chunk-E4CYVUYG.js";import"./chunk-BPHX6VXP.js";import"./chunk-XWML36YQ.js";import"./chunk-6Q6SSTBK.js";import{a as Z}from"./chunk-COEGVUM3.js";import"./chunk-YS4B2B5N.js";import"./chunk-KZYRTI62.js";import"./chunk-TSVSMVY4.js";import{b as Nn,c as Ae}from"./chunk-2KD757N6.js";import"./chunk-OP7MDR2B.js";import"./chunk-PEOYNJJM.js";import"./chunk-NUV5LHQV.js";import"./chunk-PDZNQW6F.js";import{B as Oe,E as gn,G as Ln,L as Ne,U as Sn,V as On,v as q}from"./chunk-CJKZ27FM.js";import{d as me}from"./chunk-KNSQLQC6.js";import{b as pn,e as Tn}from"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import{ha as j,ka as Se}from"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as z,Bb as x,Cb as b,Db as w,Eb as _,Fb as o,G as Fn,Gb as F,Gc as C,Hc as $,Ic as D,Jc as X,Kb as M,Lb as f,M as rn,Nb as I,Rc as ge,Ta as a,Tc as Cn,Ub as p,Vb as T,Wb as s,Xb as c,Xc as Le,Yb as d,Zb as m,_b as y,ac as E,ea as P,fa as R,hb as W,lc as Y,oc as g,p as ln,pc as K,q as H,qa as h,qc as V,rc as sn,sc as un,tc as cn,uc as dn,vc as En,wc as pe,xb as L,xc as Te,yb as S,yc as J,zb as v}from"./chunk-K5XGRFWJ.js";import{a as Ce}from"./chunk-7CGTOI24.js";function Dn(n,t){n&1&&F(0,"sh-progress-bar",58)}function Pn(n,t){n&1&&F(0,"div",61)}function Rn(n,t){n&1&&F(0,"div",61)}function In(n,t){n&1&&F(0,"div",62)}function $n(n,t){n&1&&F(0,"div",63)}function Mn(n,t){if(n&1&&(_(0,"details",72)(1,"summary"),p(2,15),F(3,"sh-icon"),_(4,"div",74),F(5,"sh-icon",66),o(),T(),o(),_(6,"div",75)(7,"p"),s(8,16),C(9,"date"),o(),_(10,"p"),s(11,17),C(12,"date"),o(),_(13,"p"),s(14,18),C(15,"durationFormat"),o(),_(16,"p"),s(17,19),o(),F(18,"sh-divider"),_(19,"p"),s(20,20),o(),_(21,"p"),s(22,21),o()()(),_(23,"details",72)(24,"summary"),p(25,22),F(26,"sh-icon"),_(27,"div",74),F(28,"sh-icon",66),o(),T(),o(),_(29,"div",75)(30,"p"),s(31,23),C(32,"date"),o(),_(33,"p"),s(34,24),C(35,"date"),o(),_(36,"p"),s(37,25),C(38,"durationFormat"),o(),F(39,"sh-divider"),_(40,"p"),s(41,26),C(42,"bytes"),o(),_(43,"p"),s(44,27),C(45,"bytes"),o(),_(46,"p"),s(47,28),C(48,"bytes"),o(),F(49,"sh-divider"),_(50,"p"),s(51,29),o(),_(52,"p"),s(53,30),o()()()),n&2){let e=E(2).$implicit;a(9),c(D(9,17,e.data==null||e.data.TestResults==null?null:e.data.TestResults.BeginTime,"medium")),d(8),a(3),c(D(12,20,e.data==null||e.data.TestResults==null?null:e.data.TestResults.EndTime,"medium")),d(11),a(3),c($(15,23,e.data==null||e.data.TestResults==null?null:e.data.TestResults.Duration)),d(14),a(2),c(e.data==null||e.data.TestResults==null?null:e.data.TestResults.VerificationsActualLength),d(17),a(3),c(e.data==null||e.data.TestResults==null?null:e.data.TestResults.WarningsActualLength),d(20),a(2),c(e.data==null||e.data.TestResults==null?null:e.data.TestResults.ErrorsActualLength),d(22),a(10),c(D(32,25,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.BeginTime,"medium")),d(31),a(3),c(D(35,28,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.EndTime,"medium")),d(34),a(3),c($(38,31,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.Duration)),d(37),a(4),c(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileCount)(X(42,33,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileSize,!0,!0)),d(41),a(3),c(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileCount)(X(45,37,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileSize,!0,!0)),d(44),a(3),c(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileCount)(X(48,41,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileSize,!0,!0)),d(47),a(3),c(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.WarningsActualLength),d(51),a(2),c(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.ErrorsActualLength),d(53)}}function fn(n,t){n&1&&(_(0,"p"),g(1,"No messages"),o())}function hn(n,t){n&1&&(p(0,43,1),F(1,"sh-icon"),T())}function yn(n,t){n&1&&(p(0,43,2),F(1,"sh-icon"),T())}function Bn(n,t){if(n&1){let e=I();_(0,"div",76)(1,"code"),g(2),o(),_(3,"button",77),y("click",function(l){let u=P(e).$implicit,O=E(5);return R(O.copyToClipboard(l,u,u))}),p(4,43),L(5,hn,2,0,"sh-icon")(6,yn,2,0,"sh-icon"),T(),o()()}if(n&2){let e=t.$implicit,i=E(5);a(2),K(e),a(3),S(i.copied()==e?5:6)}}function vn(n,t){n&1&&(_(0,"p"),g(1,"No warnings"),o())}function xn(n,t){n&1&&(p(0,44,1),F(1,"sh-icon"),T())}function bn(n,t){n&1&&(p(0,44,2),F(1,"sh-icon"),T())}function kn(n,t){if(n&1){let e=I();_(0,"div",76)(1,"code"),g(2),o(),_(3,"button",77),y("click",function(l){let u=P(e).$implicit,O=E(5);return R(O.copyToClipboard(l,u,u))}),p(4,44),L(5,xn,2,0,"sh-icon")(6,bn,2,0,"sh-icon"),T(),o()()}if(n&2){let e=t.$implicit,i=E(5);a(2),K(e),a(3),S(i.copied()==e?5:6)}}function Kn(n,t){n&1&&(_(0,"p"),g(1,"No errors"),o())}function Un(n,t){n&1&&(p(0,45,1),F(1,"sh-icon"),T())}function wn(n,t){n&1&&(p(0,45,2),F(1,"sh-icon"),T())}function Jn(n,t){if(n&1){let e=I();_(0,"div",76)(1,"code"),g(2),o(),_(3,"button",77),y("click",function(l){let u=P(e).$implicit,O=E(5);return R(O.copyToClipboard(l,u,u))}),p(4,45),L(5,Un,2,0,"sh-icon")(6,wn,2,0,"sh-icon"),T(),o()()}if(n&2){let e=t.$implicit,i=E(5);a(2),K(e),a(3),S(i.copied()==e?5:6)}}function Xn(n,t){if(n&1&&(_(0,"details",72)(1,"summary"),p(2,31),F(3,"sh-icon"),_(4,"div",74),F(5,"sh-icon",66),o(),T(),o(),_(6,"div",75)(7,"p"),s(8,32),C(9,"date"),o(),_(10,"p"),s(11,33),C(12,"date"),o(),_(13,"p"),s(14,34),C(15,"durationFormat"),o(),F(16,"sh-divider"),_(17,"p"),s(18,35),C(19,"bytes"),o(),_(20,"p"),s(21,36),o(),_(22,"p"),s(23,37),o(),_(24,"p"),s(25,38),o(),_(26,"p"),s(27,39),o(),F(28,"sh-divider"),_(29,"details",78)(30,"summary"),p(31,40),F(32,"sh-icon"),_(33,"div",74),F(34,"sh-icon",66),o(),T(),o(),_(35,"div",75),L(36,fn,2,0,"p"),x(37,Bn,7,2,"div",76,v),o()(),_(39,"details",79)(40,"summary"),p(41,41),F(42,"sh-icon"),_(43,"div",74),F(44,"sh-icon",66),o(),T(),o(),_(45,"div",75),L(46,vn,2,0,"p"),x(47,kn,7,2,"div",76,v),o()(),_(49,"details",80)(50,"summary"),p(51,42),F(52,"sh-icon"),_(53,"div",74),F(54,"sh-icon",66),o(),T(),o(),_(55,"div",75),L(56,Kn,2,0,"p"),x(57,Jn,7,2,"div",76,v),o()(),F(59,"sh-divider"),o()()),n&2){let e=t.$implicit;a(5),c(e.Destination),d(2),a(4),c(D(9,16,e.BeginTime,"medium")),d(8),a(3),c(D(12,19,e.EndTime,"medium")),d(11),a(3),c($(15,22,e.Duration)),d(14),a(4),c(e.CopiedFileCount)(X(19,24,e.CopiedFileSize,!0,!0)),d(18),a(2),c(e.DeletedFileCount),d(21),a(2),c(e.RenamedFileCount),d(23),a(2),c(e.VerifiedFileCount),d(25),a(2),c(e.FailedVerificationCount),d(27),a(7),c(e.MessagesActualLength),d(31),a(2),S((e.Messages==null?null:e.Messages.length)===0?36:-1),a(),b(e.Messages),a(7),c(e.WarningsActualLength),d(41),a(2),S((e.Warnings==null?null:e.Warnings.length)===0?46:-1),a(),b(e.Warnings),a(7),c(e.ErrorsActualLength),d(51),a(2),S((e.Errors==null?null:e.Errors.length)===0?56:-1),a(),b(e.Errors)}}function zn(n,t){if(n&1&&x(0,Xn,60,28,"details",72,v),n&2){let e=E(2).$implicit;b(e.data==null?null:e.data.RemoteSynchronizationResults)}}function Vn(n,t){if(n&1&&(_(0,"details",72)(1,"summary"),p(2,46),F(3,"sh-icon"),_(4,"div",74),F(5,"sh-icon",66),o(),T(),o(),_(6,"div",75)(7,"p"),s(8,47),C(9,"date"),o(),_(10,"p"),s(11,48),C(12,"date"),o(),_(13,"p"),s(14,49),C(15,"durationFormat"),o(),F(16,"sh-divider"),_(17,"p"),s(18,50),o(),_(19,"p"),s(20,51),o(),_(21,"p"),s(22,52),o()()()),n&2){let e=E(2).$implicit;a(9),c(D(9,6,e.data==null||e.data.LockResults==null?null:e.data.LockResults.BeginTime,"medium")),d(8),a(3),c(D(12,9,e.data==null||e.data.LockResults==null?null:e.data.LockResults.EndTime,"medium")),d(11),a(3),c($(15,12,e.data==null||e.data.LockResults==null?null:e.data.LockResults.Duration)),d(14),a(3),c(e.data==null||e.data.LockResults==null?null:e.data.LockResults.VolumesRead),d(18),a(2),c(e.data==null||e.data.LockResults==null?null:e.data.LockResults.VolumesUpdated),d(20),a(2),c(e.data==null||e.data.LockResults==null?null:e.data.LockResults.ParsedResult),d(22)}}function Hn(n,t){if(n&1&&(_(0,"code"),g(1),C(2,"json"),o()),n&2){let e=t.$implicit;a(),K($(2,1,e))}}function Wn(n,t){if(n&1&&(_(0,"details",72)(1,"summary"),p(2,53),F(3,"sh-icon"),_(4,"div",74),F(5,"sh-icon",66),o(),T(),o(),_(6,"div",75),x(7,Hn,3,3,"code",null,v),o()()),n&2){let e=E(2).$implicit;a(5),c(e.data.VerificationsActualLength),d(2),a(2),b(e.data.Verifications)}}function jn(n,t){n&1&&(_(0,"sh-icon"),g(1,"check"),o())}function qn(n,t){n&1&&(_(0,"sh-icon"),g(1,"copy"),o())}function Qn(n,t){n&1&&(M(0),p(1,54),F(2,"sh-icon"),T(),f())}function Yn(n,t){n&1&&(M(0),p(1,55),F(2,"sh-icon"),T(),f())}function Zn(n,t){n&1&&(M(0),p(1,56),F(2,"sh-icon"),T(),f())}function et(n,t){if(n&1){let e=I();_(0,"button",82),y("click",function(){P(e),E();let l=J(0),u=E(3);return R(u.toggleWarningSuppression(l.MessageId))}),L(1,Qn,3,0,"ng-container")(2,Yn,3,0,"ng-container")(3,Zn,3,0,"ng-container"),o()}if(n&2){E();let e=J(0),i=E(3),l=i.isWarningSuppressed(e.MessageId);w("disabled",i.isSuppressingWarning()),a(),S(i.isSuppressingWarning()?1:l?2:3)}}function nt(n,t){if(n&1){let e=I();pe(0),_(1,"div",76)(2,"code"),g(3),o(),_(4,"button",77),y("click",function(l){let u=P(e).$implicit,O=E(3);return R(O.copyToClipboard(l,u,u))}),g(5," Copy "),L(6,jn,2,0,"sh-icon")(7,qn,2,0,"sh-icon"),o(),L(8,et,4,2,"button",81),o()}if(n&2){let e=t.$implicit,i=E(3),l=Te(i.parseWarning(e));a(3),K(e),a(3),S(i.copied()==e?6:7),a(2),S(l!=null&&l.MessageId?8:-1)}}function tt(n,t){n&1&&(_(0,"p"),g(1,"No errors"),o())}function it(n,t){n&1&&(p(0,57,1),F(1,"sh-icon"),T())}function ot(n,t){n&1&&(p(0,57,2),F(1,"sh-icon"),T())}function _t(n,t){if(n&1){let e=I();_(0,"div",76)(1,"code"),g(2),o(),_(3,"button",77),y("click",function(l){let u=P(e).$implicit,O=E(3);return R(O.copyToClipboard(l,u,u))}),p(4,57),L(5,it,2,0,"sh-icon")(6,ot,2,0,"sh-icon"),T(),o()()}if(n&2){let e=t.$implicit,i=E(3);a(2),K(e),a(3),S(i.copied()==e?5:6)}}function at(n,t){n&1&&(_(0,"sh-icon"),g(1,"check"),o())}function lt(n,t){n&1&&(_(0,"sh-icon"),g(1,"copy"),o())}function Ft(n,t){if(n&1){let e=I();_(0,"section",67)(1,"sh-toggle-card",68),M(2,69),_(3,"h3"),s(4,0),o(),f(),M(5,70),_(6,"p"),s(7,1),C(8,"date"),o(),_(9,"p"),s(10,2),C(11,"date"),o(),_(12,"p"),s(13,3),C(14,"durationFormat"),o(),f(),o(),_(15,"sh-toggle-card",68),M(16,69),_(17,"h3"),s(18,4),o(),f(),M(19,70),_(20,"p"),s(21,5),C(22,"bytes"),o(),_(23,"p"),s(24,6),C(25,"bytes"),o(),_(26,"p"),s(27,7),C(28,"bytes"),o(),_(29,"p"),s(30,8),C(31,"bytes"),o(),_(32,"p"),s(33,9),o(),_(34,"p"),s(35,10),o(),_(36,"p"),s(37,11),o(),f(),o(),_(38,"div",71),F(39,"sh-divider"),L(40,Mn,54,45),L(41,zn,2,0),L(42,Vn,23,14,"details",72),L(43,Wn,9,1,"details",72),_(44,"details",73)(45,"summary"),p(46,12),F(47,"sh-icon"),_(48,"div",74),F(49,"sh-icon",66),o(),T(),o(),_(50,"div",75),x(51,nt,9,4,"div",76,v),o()(),_(53,"details",73)(54,"summary"),p(55,13),F(56,"sh-icon"),_(57,"div",74),F(58,"sh-icon",66),o(),T(),o(),_(59,"div",75),L(60,tt,2,0,"p"),x(61,_t,7,2,"div",76,v),o()(),F(63,"sh-divider"),_(64,"details")(65,"summary"),p(66,14),F(67,"sh-icon"),_(68,"div",74),F(69,"sh-icon",66),o(),T(),o(),_(70,"code")(71,"button",77),y("click",function(l){P(e);let u=E().$implicit,O=E();return R(O.copyToClipboard(l,O.stringify(u.data),"all"))}),g(72," Copy "),L(73,at,2,0,"sh-icon")(74,lt,2,0,"sh-icon"),o(),g(75),C(76,"json"),o()()()()}if(n&2){let e=E().$implicit,i=E();a(),w("disableToggle",!0),a(7),c(D(8,27,e.data==null?null:e.data.BeginTime,"medium")),d(7),a(3),c(D(11,30,e.data==null?null:e.data.EndTime,"medium")),d(10),a(3),c($(14,33,e.data==null?null:e.data.Duration)),d(13),a(),w("disableToggle",!0),a(7),c(e.data==null?null:e.data.ExaminedFiles)(X(22,35,e.data==null?null:e.data.SizeOfExaminedFiles,!0,!0)),d(21),a(3),c(e.data==null?null:e.data.OpenedFiles)(X(25,39,e.data==null?null:e.data.SizeOfOpenedFiles,!0,!0)),d(24),a(3),c(e.data==null?null:e.data.AddedFiles)(X(28,43,e.data==null?null:e.data.SizeOfAddedFiles,!0,!0)),d(27),a(3),c(e.data==null?null:e.data.ModifiedFiles)(X(31,47,e.data==null?null:e.data.SizeOfModifiedFiles,!0,!0)),d(30),a(2),c(e.data==null?null:e.data.DeletedFiles),d(33),a(2),c(e.data==null?null:e.data.TooLargeFiles),d(35),a(2),c(e.data==null?null:e.data.FilesWithError),d(37),a(3),S(e.data!=null&&e.data.TestResults?40:-1),a(),S(e.data!=null&&e.data.RemoteSynchronizationResults?41:-1),a(),S(e.data!=null&&e.data.LockResults?42:-1),a(),S((e.data==null?null:e.data.MainOperation)==="Test"?43:-1),a(),w("open",e.id===i.openEntry()&&i.openSection()==="warnings"),a(5),c(e.data==null?null:e.data.WarningsActualLength),d(46),a(2),b(e.data==null?null:e.data.Warnings),a(2),w("open",e.id===i.openEntry()&&i.openSection()==="errors"),a(5),c(e.data==null?null:e.data.ErrorsActualLength),d(55),a(2),S((e.data==null||e.data.Errors==null?null:e.data.Errors.length)===0?60:-1),a(),b(e.data==null?null:e.data.Errors),a(12),S(i.copied()=="all"?73:74),a(2),V(" ",$(76,51,e.data)," ")}}function rt(n,t){if(n&1){let e=I();_(0,"article",59)(1,"header",60),y("click",function(){let l=P(e).$implicit,u=E();return R(u.toggleOpenEntry(l))}),L(2,Pn,1,0,"div",61)(3,Rn,1,0,"div",61)(4,In,1,0,"div",62)(5,$n,1,0,"div",63),_(6,"h3"),g(7),C(8,"date"),o(),_(9,"p"),g(10),o(),F(11,"div",64),_(12,"div",65)(13,"sh-icon",66),g(14,"caret-down"),o()()(),L(15,Ft,77,53,"section",67),o()}if(n&2){let e=t.$implicit,i=E(),l=(e.data==null?null:e.data.ParsedResult)||"Unknown";a(2),S(l=="Fatal"?2:l=="Error"?3:l=="Warning"?4:5),a(5),K(D(8,7,e.timestamp,"medium")),a(3),sn(" ",e.data==null?null:e.data.MainOperation," ",i.getLocalizedSummary(e)," "),a(3),Y("open",e.id===i.openEntry()),a(2),S(e.id===i.openEntry()?15:-1)}}var De=class n{#e=z(me);#n=z(Ge);#t=new Z;#i=new ee;backupId=Le.required();isSuppressingWarning=h(!1);copied=h(null);backupResource=Cn({params:()=>({id:this.backupId()}),loader:({params:t})=>ln(this.#e.getApiV1BackupById({id:t.id}))});suppressedWarningIds=ge(()=>{let t=this.backupResource.value();if(!t?.Backup?.Settings)return new Set;let e=t.Backup.Settings.find(i=>i.Name==="--suppress-warnings");return e?.Value?new Set(e.Value.split(",").map(i=>i.trim()).filter(Boolean)):new Set});openEntry=h(null);openSection=h(null);pagination=h({offset:0,pagesize:100});resource=Ae({params:()=>Ce({id:this.backupId()},this.pagination()),stream:({params:t})=>this.#e.getApiV1BackupByIdLog({id:t.id,pagesize:100}).pipe(H(e=>e.map(i=>({id:i.ID,operationId:i.OperationID,timestamp:i.Timestamp*1e3,type:i.Type,data:JSON.parse(i.Message),exception:JSON.stringify(i.Exception)==="{}"?null:i.Exception}))))});getLocalizedSummary(t){let e=t.data?.ErrorsActualLength??0,i=t.data?.WarningsActualLength??0,l=[];if(t.data?.MainOperation=="Backup"){if(t.data?.Duration){let u=this.#i.transform(t.data?.Duration,!0);u.startsWith("0h ")&&(u=u.slice(3)),u.startsWith("0m ")&&(u=u.slice(3)),l.push($localize`took ${u}`)}t.data?.BackendStatistics?.BytesUploaded&&l.push($localize`uploaded ${this.#t.transform(t.data?.BackendStatistics?.BytesUploaded)}`),t.data?.BackendStatistics?.KnownFileSize&&l.push($localize`backup size ${this.#t.transform(t.data?.BackendStatistics?.KnownFileSize)}`)}return e!==0&&l.push($localize`:@@errorCount:${e} error${e===1?"":"s"}`),i!==0&&l.push($localize`:@@warningCount:${i} warning${i===1?"":"s"}`),l.length===0?"":`(${l.join(", ")})`}toggleOpenEntry(t){let e=t.id;if(this.openEntry()===e){this.openEntry.set(null),this.openSection.set(null);return}let i=t.data?.ErrorsActualLength??0,l=t.data?.WarningsActualLength??0;i>0?this.openSection.set("errors"):l>0?this.openSection.set("warnings"):this.openSection.set(null),this.openEntry.set(e)}parseWarning(t){let e=t.match(/^(.*?) - \[(.*?)-(.*?)-(.*?)\]: (.*)$/);if(!e)return null;let[,i,l,u,O,G]=e;return{Timestamp:i,LogLevel:l,Source:u,MessageId:O,Message:G}}isWarningSuppressed(t){return this.suppressedWarningIds().has(t)}toggleWarningSuppression(t){let e=this.backupId();!e||!t||(this.isSuppressingWarning.set(!0),this.#e.getApiV1BackupById({id:e}).pipe(rn(i=>{let l=i.Backup?.Settings??[],u=l.findIndex(N=>N.Name==="--suppress-warnings"),O=this.isWarningSuppressed(t),G="";if(u>=0){let B=(l[u].Value??"").split(",").map(U=>U.trim()).filter(Boolean);O?B=B.filter(U=>U!==t):B.includes(t)||B.push(t),G=B.join(",")}else O||(G=t);let k=l.map(N=>({Name:N.Name,Value:N.Value,Filter:N.Filter}));return u>=0?G===""?k.splice(u,1):k[u]={Name:"--suppress-warnings",Value:G,Filter:null}:G!==""&&k.push({Name:"--suppress-warnings",Value:G,Filter:null}),this.#e.putApiV1BackupById({id:e,requestBody:{Backup:{Name:i.Backup?.Name,Description:i.Backup?.Description,DBPath:i.Backup?.DBPath,Tags:i.Backup?.Tags??[],TargetURL:i.Backup?.TargetURL,ConnectionStringID:i.Backup?.ConnectionStringID,Sources:i.Backup?.Sources??[],Settings:k,Filters:i.Backup?.Filters?.map(N=>({Expression:N.Expression,Include:N.Include,Order:N.Order})),Metadata:i.Backup?.Metadata??{},AdditionalTargetURLs:i.Backup?.AdditionalTargetURLs?.map(N=>({TargetUrl:N.TargetUrl,UrlKey:N.UrlKey,Mode:N.Mode,Interval:N.Interval,ConnectionStringID:N.ConnectionStringID,Options:N.Options}))},Schedule:i.Schedule?{Repeat:i.Schedule.Repeat,Time:i.Schedule.Time,AllowedDays:i.Schedule.AllowedDays}:void 0}})}),Fn(()=>this.isSuppressingWarning.set(!1))).subscribe({next:()=>{this.#n.getBackups(!0),this.backupResource.reload()},error:i=>{console.error("Failed to toggle warning suppression:",i)}}))}copyToClipboard(t,e,i){t.stopPropagation(),navigator.clipboard.writeText(e),this.copied.set(i),setTimeout(()=>{this.copied.set(null)},2e3)}stringify(t){return JSON.stringify(t,null,2)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=W({type:n,selectors:[["app-general-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let t;t=$localize`Time`;let e;e=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let i;i=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let l;l=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let u;u=$localize`Source files`;let O;O=$localize` Evaluated: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let G;G=$localize`Opened: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let k;k=$localize`Added: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let N;N=$localize` Modified: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let B;B=$localize`Deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let U;U=$localize`Too large: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Q;Q=$localize`Files with error: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let A;A=$localize`${"\uFFFD#47\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#47\uFFFD|\uFFFD/#49\uFFFD]"}:CLOSE_TAG_SH_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#48\uFFFD"}:START_TAG_DIV:${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#47\uFFFD|\uFFFD/#49\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#48\uFFFD"}:CLOSE_TAG_DIV:`,A=m(A);let ne;ne=$localize`${"\uFFFD#56\uFFFD"}:START_TAG_SH_ICON:warning${"[\uFFFD/#56\uFFFD|\uFFFD/#58\uFFFD]"}:CLOSE_TAG_SH_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#57\uFFFD"}:START_TAG_DIV:${"\uFFFD#58\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#56\uFFFD|\uFFFD/#58\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#57\uFFFD"}:CLOSE_TAG_DIV:`,ne=m(ne);let te;te=$localize`${"\uFFFD#67\uFFFD"}:START_TAG_SH_ICON:notepad${"[\uFFFD/#67\uFFFD|\uFFFD/#69\uFFFD]"}:CLOSE_TAG_SH_ICON: Complete log ${"\uFFFD#68\uFFFD"}:START_TAG_DIV:${"\uFFFD#69\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#67\uFFFD|\uFFFD/#69\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#68\uFFFD"}:CLOSE_TAG_DIV:`,te=m(te);let ie;ie=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:circle-half-tilt${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Test phase ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ie=m(ie);let Ie;Ie=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let $e;$e=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Me;Me=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let fe;fe=$localize`Verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let he;he=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ye;ye=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let oe;oe=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SH_ICON:file-archive${"[\uFFFD/#26\uFFFD|\uFFFD/#28\uFFFD]"}:CLOSE_TAG_SH_ICON: Compact phase ${"\uFFFD#27\uFFFD"}:START_TAG_DIV:${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#26\uFFFD|\uFFFD/#28\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_DIV:`,oe=m(oe);let Be;Be=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ve;ve=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let xe;xe=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let be;be=$localize` Deleted files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let ke;ke=$localize` Downloaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ke;Ke=$localize` Uploaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ue;Ue=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let we;we=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let _e;_e=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:arrows-clockwise${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Secondary destination: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,_e=m(_e);let Je;Je=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Xe;Xe=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ze;ze=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ve;Ve=$localize` Files copied: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let He;He=$localize`Files deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let We;We=$localize`Files renamed: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let je;je=$localize`Files verified: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let qe;qe=$localize`Failed verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ae;ae=$localize`${"\uFFFD#32\uFFFD"}:START_TAG_SH_ICON:info${"[\uFFFD/#32\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SH_ICON: Messages ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#33\uFFFD"}:START_TAG_DIV:${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#32\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#33\uFFFD"}:CLOSE_TAG_DIV:`,ae=m(ae);let le;le=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#42\uFFFD|\uFFFD/#44\uFFFD]"}:CLOSE_TAG_SH_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#43\uFFFD"}:START_TAG_DIV:${"\uFFFD#44\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#42\uFFFD|\uFFFD/#44\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_DIV:`,le=m(le);let Fe;Fe=$localize`${"\uFFFD#52\uFFFD"}:START_TAG_SH_ICON:warning${"[\uFFFD/#52\uFFFD|\uFFFD/#54\uFFFD]"}:CLOSE_TAG_SH_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#53\uFFFD"}:START_TAG_DIV:${"\uFFFD#54\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#52\uFFFD|\uFFFD/#54\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#53\uFFFD"}:CLOSE_TAG_DIV:`,Fe=m(Fe);let re;re=$localize` Copy ${"\uFFFD*5:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*5:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*6:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*6:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,re=m(re);let se;se=$localize` Copy ${"\uFFFD*5:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*5:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*6:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*6:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,se=m(se);let ue;ue=$localize` Copy ${"\uFFFD*5:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*5:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*6:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*6:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,ue=m(ue);let ce;ce=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:lock${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Lock results ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ce=m(ce);let Qe;Qe=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ye;Ye=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ze;Ze=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let en;en=$localize`Volumes read: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let nn;nn=$localize`Volumes updated: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let tn;tn=$localize`Parsed result: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let de;de=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Verifications ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,de=m(de);let on;on=$localize` Updating ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let _n;_n=$localize` Un-suppress ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:bell${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let an;an=$localize` Suppress ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:bell-slash${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Ee;return Ee=$localize` Copy ${"\uFFFD*5:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*5:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*6:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*6:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,Ee=m(Ee),[t,e,i,l,u,O,G,k,N,B,U,Q,A,ne,te,ie,Ie,$e,Me,fe,he,ye,oe,Be,ve,xe,be,ke,Ke,Ue,we,_e,Je,Xe,ze,Ve,He,We,je,qe,ae,le,Fe,re,se,ue,ce,Qe,Ye,Ze,en,nn,tn,de,on,_n,an,Ee,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"status","error"],[1,"status","warn"],[1,"status"],[1,"spacer"],[1,"action"],[1,"toggle-indicator"],[1,"log-content"],[3,"disableToggle"],["title",""],["content",""],[1,"extra-info"],["name","details"],["name","details",3,"open"],[1,"actions"],[1,"content"],[1,"warning-item"],["shButton","",1,"small",3,"click"],["name","details-messages"],["name","details-warnings"],["name","details-errors"],["shButton","",1,"small",3,"disabled"],["shButton","",1,"small",3,"click","disabled"]]},template:function(e,i){e&1&&(L(0,Dn,1,0,"sh-progress-bar",58),x(1,rt,16,10,"article",59,v)),e&2&&(S(i.resource.isLoading()?0:-1),a(),b(i.resource.value()))},dependencies:[On,Ln,Ne,Oe,q,Z,j,ee,Se],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column;cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-4);background-color:var(--base-1);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-2)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%]{display:flex;flex-direction:column}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;gap:.5rem;padding:.75rem;border-radius:var(--shape-2);background-color:var(--base-2)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:focus{outline:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:hover{background-color:var(--base-3)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]::marker{font-size:0}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex:1 0;gap:.5rem;-webkit-user-select:none;user-select:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:2rem;transition:transform 125ms linear}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon.toggle-indicator[_ngcontent-%COMP%]{transform:rotate(0)}details[open][_ngcontent-%COMP%] > summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon.toggle-indicator[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:.75rem 1rem 0;display:flex;flex-direction:column;gap:.75rem}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{margin-top:.75rem;position:relative}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:.75rem;right:.75rem}.extra-info[_ngcontent-%COMP%]{grid-column:1/-1;display:flex;flex-direction:column;gap:1rem}.extra-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.extra-info[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-2)}.log-content[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:1fr 1fr;gap:1rem}.status[_ngcontent-%COMP%]{display:block;width:1rem;height:1rem;background-color:var(--success-8);border-radius:50%}.status.error[_ngcontent-%COMP%]{background-color:var(--error-8)}.status.warn[_ngcontent-%COMP%]{background-color:var(--warn-8)}.warning-item[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:.5rem;padding:.75rem;border-radius:var(--shape-2);background-color:var(--base-2)}.warning-item[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{margin:0;white-space:pre-wrap;word-break:break-word}.warning-item[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{align-self:flex-start;white-space:nowrap}"],changeDetection:0})};function st(n,t){n&1&&F(0,"sh-progress-bar",1)}function ut(n,t){n&1&&(p(0,0,1),F(1,"sh-icon"),T())}function ct(n,t){n&1&&(p(0,0,2),F(1,"sh-icon"),T())}function dt(n,t){if(n&1){let e=I();_(0,"section",6)(1,"button",7),y("click",function(){P(e);let l=E(),u=l.$implicit,O=l.$index,G=E();return R(G.copyToClipboard(u.data,O))}),p(2,0),L(3,ut,2,0)(4,ct,2,0),T(),o(),_(5,"code"),g(6),C(7,"json"),o()()}if(n&2){let e=E(),i=e.$implicit,l=e.$index,u=E();a(),Y("success",u.copiedFromIndex()===l),a(2),S(u.copiedFromIndex()===l?3:4),a(3),K($(7,4,i.data))}}function Et(n,t){if(n&1){let e=I();_(0,"article",2)(1,"header",3),y("click",function(){let l=P(e).$implicit,u=E();return R(u.toggleOpenEntry(l.id))}),_(2,"h3"),g(3),C(4,"date"),o(),_(5,"div",4)(6,"sh-icon",5),g(7,"caret-down"),o()()(),L(8,dt,8,6,"section",6),o()}if(n&2){let e=t.$implicit,i=E();a(3),un("",D(4,6,e.timestamp,"medium"),": ",e.operation," ",e.path),a(3),Y("open",e.id===i.openEntry()),a(2),S(e.id===i.openEntry()?8:-1)}}var Pe=class n{#e=z(me);backupId=Le.required();openEntry=h(null);pagination=h({offset:0,pagesize:100});copiedFromIndex=h(null);resource=Ae({params:()=>Ce({id:this.backupId()},this.pagination()),stream:({params:t})=>this.#e.getApiV1BackupByIdRemotelog({id:t.id,pagesize:100}).pipe(H(e=>e.map((i,l)=>({id:i.ID,operationId:i.OperationID,timestamp:i.Timestamp*1e3,operation:i.Operation,path:i.Path,data:typeof i.Data=="string"?JSON.parse(i.Data):null}))))});toggleOpenEntry(t){if(this.openEntry()===t){this.openEntry.set(null);return}this.openEntry.set(t)}copyToClipboard(t,e){let i=JSON.stringify(t,null,2);navigator.clipboard.writeText(i),this.copiedFromIndex.set(e),setTimeout(()=>{this.copiedFromIndex.set(null)},3e3)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=W({type:n,selectors:[["app-remote-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let t;return t=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy to clipboard ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=m(t),[t,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"actions"],[1,"toggle-indicator"],[1,"log-content"],["shButton","",1,"small",3,"click"]]},template:function(e,i){e&1&&(L(0,st,1,0,"sh-progress-bar",1),x(1,Et,9,9,"article",2,v)),e&2&&(S(i.resource.isLoading()?0:-1),a(),b(i.resource.value()))},dependencies:[Ne,q,Se,j],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-4);background-color:var(--base-1);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-2)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0;-webkit-user-select:none;user-select:none}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}.log-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem;position:relative}.log-content[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:2rem;right:2rem;background:transparent}code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-2)}"],changeDetection:0})};function Ct(n,t){if(n&1&&(g(0," - "),M(1),s(2,6),f(),g(3),C(4,"durationFormat")),n&2){E(2);let e=J(6);a(3),V(" ",$(4,1,e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration)," ")}}function pt(n,t){n&1&&(M(0),s(1,7),f())}function Tt(n,t){if(n&1&&(g(0),C(1,"bytes")),n&2){E(2);let e=J(6);V(" ",$(1,1,e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function gt(n,t){n&1&&(M(0),s(1,8),f())}function Lt(n,t){if(n&1&&(g(0),C(1,"bytes")),n&2){E(2);let e=J(6);V(" ",$(1,1,e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function St(n,t){n&1&&(M(0),s(1,9),f())}function Ot(n,t){if(n&1&&(_(0,"sh-chip",20),s(1,10),o()),n&2){E(2);let e=J(6);a(),c(e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount),d(1)}}function Nt(n,t){n&1&&(_(0,"sh-chip",21),s(1,11),o())}function mt(n,t){if(n&1&&(_(0,"div",14)(1,"div",19)(2,"h3"),g(3),_(4,"sh-icon"),g(5,"database"),o()(),_(6,"p")(7,"span"),s(8,3),o(),g(9),C(10,"date"),L(11,Ct,5,3)(12,pt,2,0,"ng-container"),o(),_(13,"p")(14,"span"),s(15,4),o(),L(16,Tt,2,3)(17,gt,2,0,"ng-container"),o(),_(18,"p")(19,"span"),s(20,5),o(),L(21,Lt,2,3)(22,St,2,0,"ng-container"),o()(),L(23,Ot,2,1,"sh-chip",20)(24,Nt,2,0,"sh-chip",21),o()),n&2){let e=E(),i=J(6);a(3),V(" ",i.Backup.Name??e.MISSING_BACKUP_NAME," "),a(6),V(" ",D(10,6,i.Backup.Metadata==null?null:i.Backup.Metadata.LastBackupFinished,"short")," "),a(2),S(i.Backup.Metadata!=null&&i.Backup.Metadata.LastBackupDuration?11:12),a(5),S(i.Backup.Metadata!=null&&i.Backup.Metadata.SourceFilesSize?16:17),a(5),S(i.Backup.Metadata!=null&&i.Backup.Metadata.TargetFilesSize?21:22),a(2),S(i.Backup.Metadata!=null&&i.Backup.Metadata.BackupListCount?23:24)}}function Gt(n,t){if(n&1&&F(0,"app-general-log",18),n&2){let e=E();w("backupId",e.backupId())}}function At(n,t){if(n&1&&F(0,"app-remote-log",18),n&2){let e=E();w("backupId",e.backupId())}}var Re=class n{#e=z(pn);#n=z(Ge);MISSING_BACKUP_NAME=$localize`Backup name missing`;activeTab=h("general");backupId=Nn(this.#e.params.pipe(H(t=>t.id)));backup=ge(()=>{let t=this.backupId();return t?this.#n.getBackupById(t):null});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=W({type:n,selectors:[["app-log"]],decls:15,vars:5,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`General`;let i;i=$localize`Destination`;let l;l=$localize`Last successful backup:`;let u;u=$localize`Source:`;let O;O=$localize`Destination:`;let G;G=$localize`took`;let k;k=$localize`N/A`;let N;N=$localize`N/A`;let B;B=$localize`N/A`;let U;U=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION: Version`;let Q;return Q=$localize`No version yet`,[t,e,i,l,u,O,G,k,N,B,U,Q,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"backup"],[1,"primary",3,"valueChange","value"],["value","general"],["value","destination"],[3,"backupId"],[1,"text"],[1,"simple","success"],[1,"simple"]]},template:function(e,i){if(e&1){let l=I();F(0,"app-status-bar"),_(1,"section")(2,"div",12)(3,"button",13),p(4,0),F(5,"sh-icon"),T(),o()(),pe(6),L(7,mt,25,9,"div",14),_(8,"sh-tabs",15),En("valueChange",function(O){return P(l),dn(i.activeTab,O)||(i.activeTab=O),R(O)}),_(9,"button",16),s(10,1),o(),_(11,"button",17),s(12,2),o()(),L(13,Gt,1,1,"app-general-log",18),L(14,At,1,1,"app-remote-log",18),o()}if(e&2){a(6);let l=Te(i.backup());a(),S(l?7:-1),a(),cn("value",i.activeTab),a(5),S(i.activeTab()==="general"?13:-1),a(),S(i.activeTab()==="destination"?14:-1)}},dependencies:[Sn,De,Pe,Tn,mn,q,Oe,gn,Z,ee,j],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 1.5rem;gap:1rem}sh-tabs[_ngcontent-%COMP%]{margin-bottom:1rem}.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)}"],changeDetection:0})};export{Re as default};
1
+ import{a as mn}from"./chunk-6LQMQH6Z.js";import"./chunk-XJUQUKBN.js";import"./chunk-47XLDVIW.js";import"./chunk-TGVKMKNV.js";import{a as ee}from"./chunk-B4QFOJXL.js";import"./chunk-LNE7WQZG.js";import{a as Ge}from"./chunk-ZFV3MK5Y.js";import"./chunk-BPHX6VXP.js";import"./chunk-XWML36YQ.js";import"./chunk-6Q6SSTBK.js";import{a as Z}from"./chunk-COEGVUM3.js";import"./chunk-UHSRAJTA.js";import"./chunk-3GE3OWQF.js";import"./chunk-S5IJ4C5T.js";import{b as Nn,c as Ae}from"./chunk-2KD757N6.js";import"./chunk-KKUFO6NZ.js";import"./chunk-PEOYNJJM.js";import"./chunk-MWQHWJOA.js";import"./chunk-6RZVYDJF.js";import{B as Oe,E as gn,G as Ln,L as Ne,U as Sn,V as On,v as q}from"./chunk-CJKZ27FM.js";import{d as me}from"./chunk-4V3AE4ZE.js";import{b as pn,e as Tn}from"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import{ha as j,ka as Se}from"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as z,Bb as x,Cb as b,Db as w,Eb as _,Fb as o,G as Fn,Gb as F,Gc as C,Hc as $,Ic as D,Jc as X,Kb as M,Lb as f,M as rn,Nb as I,Rc as ge,Ta as a,Tc as Cn,Ub as p,Vb as T,Wb as s,Xb as c,Xc as Le,Yb as d,Zb as m,_b as y,ac as E,ea as P,fa as R,hb as W,lc as Y,oc as g,p as ln,pc as K,q as H,qa as h,qc as V,rc as sn,sc as un,tc as cn,uc as dn,vc as En,wc as pe,xb as L,xc as Te,yb as S,yc as J,zb as v}from"./chunk-K5XGRFWJ.js";import{a as Ce}from"./chunk-7CGTOI24.js";function Dn(n,t){n&1&&F(0,"sh-progress-bar",58)}function Pn(n,t){n&1&&F(0,"div",61)}function Rn(n,t){n&1&&F(0,"div",61)}function In(n,t){n&1&&F(0,"div",62)}function $n(n,t){n&1&&F(0,"div",63)}function Mn(n,t){if(n&1&&(_(0,"details",72)(1,"summary"),p(2,15),F(3,"sh-icon"),_(4,"div",74),F(5,"sh-icon",66),o(),T(),o(),_(6,"div",75)(7,"p"),s(8,16),C(9,"date"),o(),_(10,"p"),s(11,17),C(12,"date"),o(),_(13,"p"),s(14,18),C(15,"durationFormat"),o(),_(16,"p"),s(17,19),o(),F(18,"sh-divider"),_(19,"p"),s(20,20),o(),_(21,"p"),s(22,21),o()()(),_(23,"details",72)(24,"summary"),p(25,22),F(26,"sh-icon"),_(27,"div",74),F(28,"sh-icon",66),o(),T(),o(),_(29,"div",75)(30,"p"),s(31,23),C(32,"date"),o(),_(33,"p"),s(34,24),C(35,"date"),o(),_(36,"p"),s(37,25),C(38,"durationFormat"),o(),F(39,"sh-divider"),_(40,"p"),s(41,26),C(42,"bytes"),o(),_(43,"p"),s(44,27),C(45,"bytes"),o(),_(46,"p"),s(47,28),C(48,"bytes"),o(),F(49,"sh-divider"),_(50,"p"),s(51,29),o(),_(52,"p"),s(53,30),o()()()),n&2){let e=E(2).$implicit;a(9),c(D(9,17,e.data==null||e.data.TestResults==null?null:e.data.TestResults.BeginTime,"medium")),d(8),a(3),c(D(12,20,e.data==null||e.data.TestResults==null?null:e.data.TestResults.EndTime,"medium")),d(11),a(3),c($(15,23,e.data==null||e.data.TestResults==null?null:e.data.TestResults.Duration)),d(14),a(2),c(e.data==null||e.data.TestResults==null?null:e.data.TestResults.VerificationsActualLength),d(17),a(3),c(e.data==null||e.data.TestResults==null?null:e.data.TestResults.WarningsActualLength),d(20),a(2),c(e.data==null||e.data.TestResults==null?null:e.data.TestResults.ErrorsActualLength),d(22),a(10),c(D(32,25,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.BeginTime,"medium")),d(31),a(3),c(D(35,28,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.EndTime,"medium")),d(34),a(3),c($(38,31,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.Duration)),d(37),a(4),c(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileCount)(X(42,33,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileSize,!0,!0)),d(41),a(3),c(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileCount)(X(45,37,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileSize,!0,!0)),d(44),a(3),c(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileCount)(X(48,41,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileSize,!0,!0)),d(47),a(3),c(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.WarningsActualLength),d(51),a(2),c(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.ErrorsActualLength),d(53)}}function fn(n,t){n&1&&(_(0,"p"),g(1,"No messages"),o())}function hn(n,t){n&1&&(p(0,43,1),F(1,"sh-icon"),T())}function yn(n,t){n&1&&(p(0,43,2),F(1,"sh-icon"),T())}function Bn(n,t){if(n&1){let e=I();_(0,"div",76)(1,"code"),g(2),o(),_(3,"button",77),y("click",function(l){let u=P(e).$implicit,O=E(5);return R(O.copyToClipboard(l,u,u))}),p(4,43),L(5,hn,2,0,"sh-icon")(6,yn,2,0,"sh-icon"),T(),o()()}if(n&2){let e=t.$implicit,i=E(5);a(2),K(e),a(3),S(i.copied()==e?5:6)}}function vn(n,t){n&1&&(_(0,"p"),g(1,"No warnings"),o())}function xn(n,t){n&1&&(p(0,44,1),F(1,"sh-icon"),T())}function bn(n,t){n&1&&(p(0,44,2),F(1,"sh-icon"),T())}function kn(n,t){if(n&1){let e=I();_(0,"div",76)(1,"code"),g(2),o(),_(3,"button",77),y("click",function(l){let u=P(e).$implicit,O=E(5);return R(O.copyToClipboard(l,u,u))}),p(4,44),L(5,xn,2,0,"sh-icon")(6,bn,2,0,"sh-icon"),T(),o()()}if(n&2){let e=t.$implicit,i=E(5);a(2),K(e),a(3),S(i.copied()==e?5:6)}}function Kn(n,t){n&1&&(_(0,"p"),g(1,"No errors"),o())}function Un(n,t){n&1&&(p(0,45,1),F(1,"sh-icon"),T())}function wn(n,t){n&1&&(p(0,45,2),F(1,"sh-icon"),T())}function Jn(n,t){if(n&1){let e=I();_(0,"div",76)(1,"code"),g(2),o(),_(3,"button",77),y("click",function(l){let u=P(e).$implicit,O=E(5);return R(O.copyToClipboard(l,u,u))}),p(4,45),L(5,Un,2,0,"sh-icon")(6,wn,2,0,"sh-icon"),T(),o()()}if(n&2){let e=t.$implicit,i=E(5);a(2),K(e),a(3),S(i.copied()==e?5:6)}}function Xn(n,t){if(n&1&&(_(0,"details",72)(1,"summary"),p(2,31),F(3,"sh-icon"),_(4,"div",74),F(5,"sh-icon",66),o(),T(),o(),_(6,"div",75)(7,"p"),s(8,32),C(9,"date"),o(),_(10,"p"),s(11,33),C(12,"date"),o(),_(13,"p"),s(14,34),C(15,"durationFormat"),o(),F(16,"sh-divider"),_(17,"p"),s(18,35),C(19,"bytes"),o(),_(20,"p"),s(21,36),o(),_(22,"p"),s(23,37),o(),_(24,"p"),s(25,38),o(),_(26,"p"),s(27,39),o(),F(28,"sh-divider"),_(29,"details",78)(30,"summary"),p(31,40),F(32,"sh-icon"),_(33,"div",74),F(34,"sh-icon",66),o(),T(),o(),_(35,"div",75),L(36,fn,2,0,"p"),x(37,Bn,7,2,"div",76,v),o()(),_(39,"details",79)(40,"summary"),p(41,41),F(42,"sh-icon"),_(43,"div",74),F(44,"sh-icon",66),o(),T(),o(),_(45,"div",75),L(46,vn,2,0,"p"),x(47,kn,7,2,"div",76,v),o()(),_(49,"details",80)(50,"summary"),p(51,42),F(52,"sh-icon"),_(53,"div",74),F(54,"sh-icon",66),o(),T(),o(),_(55,"div",75),L(56,Kn,2,0,"p"),x(57,Jn,7,2,"div",76,v),o()(),F(59,"sh-divider"),o()()),n&2){let e=t.$implicit;a(5),c(e.Destination),d(2),a(4),c(D(9,16,e.BeginTime,"medium")),d(8),a(3),c(D(12,19,e.EndTime,"medium")),d(11),a(3),c($(15,22,e.Duration)),d(14),a(4),c(e.CopiedFileCount)(X(19,24,e.CopiedFileSize,!0,!0)),d(18),a(2),c(e.DeletedFileCount),d(21),a(2),c(e.RenamedFileCount),d(23),a(2),c(e.VerifiedFileCount),d(25),a(2),c(e.FailedVerificationCount),d(27),a(7),c(e.MessagesActualLength),d(31),a(2),S((e.Messages==null?null:e.Messages.length)===0?36:-1),a(),b(e.Messages),a(7),c(e.WarningsActualLength),d(41),a(2),S((e.Warnings==null?null:e.Warnings.length)===0?46:-1),a(),b(e.Warnings),a(7),c(e.ErrorsActualLength),d(51),a(2),S((e.Errors==null?null:e.Errors.length)===0?56:-1),a(),b(e.Errors)}}function zn(n,t){if(n&1&&x(0,Xn,60,28,"details",72,v),n&2){let e=E(2).$implicit;b(e.data==null?null:e.data.RemoteSynchronizationResults)}}function Vn(n,t){if(n&1&&(_(0,"details",72)(1,"summary"),p(2,46),F(3,"sh-icon"),_(4,"div",74),F(5,"sh-icon",66),o(),T(),o(),_(6,"div",75)(7,"p"),s(8,47),C(9,"date"),o(),_(10,"p"),s(11,48),C(12,"date"),o(),_(13,"p"),s(14,49),C(15,"durationFormat"),o(),F(16,"sh-divider"),_(17,"p"),s(18,50),o(),_(19,"p"),s(20,51),o(),_(21,"p"),s(22,52),o()()()),n&2){let e=E(2).$implicit;a(9),c(D(9,6,e.data==null||e.data.LockResults==null?null:e.data.LockResults.BeginTime,"medium")),d(8),a(3),c(D(12,9,e.data==null||e.data.LockResults==null?null:e.data.LockResults.EndTime,"medium")),d(11),a(3),c($(15,12,e.data==null||e.data.LockResults==null?null:e.data.LockResults.Duration)),d(14),a(3),c(e.data==null||e.data.LockResults==null?null:e.data.LockResults.VolumesRead),d(18),a(2),c(e.data==null||e.data.LockResults==null?null:e.data.LockResults.VolumesUpdated),d(20),a(2),c(e.data==null||e.data.LockResults==null?null:e.data.LockResults.ParsedResult),d(22)}}function Hn(n,t){if(n&1&&(_(0,"code"),g(1),C(2,"json"),o()),n&2){let e=t.$implicit;a(),K($(2,1,e))}}function Wn(n,t){if(n&1&&(_(0,"details",72)(1,"summary"),p(2,53),F(3,"sh-icon"),_(4,"div",74),F(5,"sh-icon",66),o(),T(),o(),_(6,"div",75),x(7,Hn,3,3,"code",null,v),o()()),n&2){let e=E(2).$implicit;a(5),c(e.data.VerificationsActualLength),d(2),a(2),b(e.data.Verifications)}}function jn(n,t){n&1&&(_(0,"sh-icon"),g(1,"check"),o())}function qn(n,t){n&1&&(_(0,"sh-icon"),g(1,"copy"),o())}function Qn(n,t){n&1&&(M(0),p(1,54),F(2,"sh-icon"),T(),f())}function Yn(n,t){n&1&&(M(0),p(1,55),F(2,"sh-icon"),T(),f())}function Zn(n,t){n&1&&(M(0),p(1,56),F(2,"sh-icon"),T(),f())}function et(n,t){if(n&1){let e=I();_(0,"button",82),y("click",function(){P(e),E();let l=J(0),u=E(3);return R(u.toggleWarningSuppression(l.MessageId))}),L(1,Qn,3,0,"ng-container")(2,Yn,3,0,"ng-container")(3,Zn,3,0,"ng-container"),o()}if(n&2){E();let e=J(0),i=E(3),l=i.isWarningSuppressed(e.MessageId);w("disabled",i.isSuppressingWarning()),a(),S(i.isSuppressingWarning()?1:l?2:3)}}function nt(n,t){if(n&1){let e=I();pe(0),_(1,"div",76)(2,"code"),g(3),o(),_(4,"button",77),y("click",function(l){let u=P(e).$implicit,O=E(3);return R(O.copyToClipboard(l,u,u))}),g(5," Copy "),L(6,jn,2,0,"sh-icon")(7,qn,2,0,"sh-icon"),o(),L(8,et,4,2,"button",81),o()}if(n&2){let e=t.$implicit,i=E(3),l=Te(i.parseWarning(e));a(3),K(e),a(3),S(i.copied()==e?6:7),a(2),S(l!=null&&l.MessageId?8:-1)}}function tt(n,t){n&1&&(_(0,"p"),g(1,"No errors"),o())}function it(n,t){n&1&&(p(0,57,1),F(1,"sh-icon"),T())}function ot(n,t){n&1&&(p(0,57,2),F(1,"sh-icon"),T())}function _t(n,t){if(n&1){let e=I();_(0,"div",76)(1,"code"),g(2),o(),_(3,"button",77),y("click",function(l){let u=P(e).$implicit,O=E(3);return R(O.copyToClipboard(l,u,u))}),p(4,57),L(5,it,2,0,"sh-icon")(6,ot,2,0,"sh-icon"),T(),o()()}if(n&2){let e=t.$implicit,i=E(3);a(2),K(e),a(3),S(i.copied()==e?5:6)}}function at(n,t){n&1&&(_(0,"sh-icon"),g(1,"check"),o())}function lt(n,t){n&1&&(_(0,"sh-icon"),g(1,"copy"),o())}function Ft(n,t){if(n&1){let e=I();_(0,"section",67)(1,"sh-toggle-card",68),M(2,69),_(3,"h3"),s(4,0),o(),f(),M(5,70),_(6,"p"),s(7,1),C(8,"date"),o(),_(9,"p"),s(10,2),C(11,"date"),o(),_(12,"p"),s(13,3),C(14,"durationFormat"),o(),f(),o(),_(15,"sh-toggle-card",68),M(16,69),_(17,"h3"),s(18,4),o(),f(),M(19,70),_(20,"p"),s(21,5),C(22,"bytes"),o(),_(23,"p"),s(24,6),C(25,"bytes"),o(),_(26,"p"),s(27,7),C(28,"bytes"),o(),_(29,"p"),s(30,8),C(31,"bytes"),o(),_(32,"p"),s(33,9),o(),_(34,"p"),s(35,10),o(),_(36,"p"),s(37,11),o(),f(),o(),_(38,"div",71),F(39,"sh-divider"),L(40,Mn,54,45),L(41,zn,2,0),L(42,Vn,23,14,"details",72),L(43,Wn,9,1,"details",72),_(44,"details",73)(45,"summary"),p(46,12),F(47,"sh-icon"),_(48,"div",74),F(49,"sh-icon",66),o(),T(),o(),_(50,"div",75),x(51,nt,9,4,"div",76,v),o()(),_(53,"details",73)(54,"summary"),p(55,13),F(56,"sh-icon"),_(57,"div",74),F(58,"sh-icon",66),o(),T(),o(),_(59,"div",75),L(60,tt,2,0,"p"),x(61,_t,7,2,"div",76,v),o()(),F(63,"sh-divider"),_(64,"details")(65,"summary"),p(66,14),F(67,"sh-icon"),_(68,"div",74),F(69,"sh-icon",66),o(),T(),o(),_(70,"code")(71,"button",77),y("click",function(l){P(e);let u=E().$implicit,O=E();return R(O.copyToClipboard(l,O.stringify(u.data),"all"))}),g(72," Copy "),L(73,at,2,0,"sh-icon")(74,lt,2,0,"sh-icon"),o(),g(75),C(76,"json"),o()()()()}if(n&2){let e=E().$implicit,i=E();a(),w("disableToggle",!0),a(7),c(D(8,27,e.data==null?null:e.data.BeginTime,"medium")),d(7),a(3),c(D(11,30,e.data==null?null:e.data.EndTime,"medium")),d(10),a(3),c($(14,33,e.data==null?null:e.data.Duration)),d(13),a(),w("disableToggle",!0),a(7),c(e.data==null?null:e.data.ExaminedFiles)(X(22,35,e.data==null?null:e.data.SizeOfExaminedFiles,!0,!0)),d(21),a(3),c(e.data==null?null:e.data.OpenedFiles)(X(25,39,e.data==null?null:e.data.SizeOfOpenedFiles,!0,!0)),d(24),a(3),c(e.data==null?null:e.data.AddedFiles)(X(28,43,e.data==null?null:e.data.SizeOfAddedFiles,!0,!0)),d(27),a(3),c(e.data==null?null:e.data.ModifiedFiles)(X(31,47,e.data==null?null:e.data.SizeOfModifiedFiles,!0,!0)),d(30),a(2),c(e.data==null?null:e.data.DeletedFiles),d(33),a(2),c(e.data==null?null:e.data.TooLargeFiles),d(35),a(2),c(e.data==null?null:e.data.FilesWithError),d(37),a(3),S(e.data!=null&&e.data.TestResults?40:-1),a(),S(e.data!=null&&e.data.RemoteSynchronizationResults?41:-1),a(),S(e.data!=null&&e.data.LockResults?42:-1),a(),S((e.data==null?null:e.data.MainOperation)==="Test"?43:-1),a(),w("open",e.id===i.openEntry()&&i.openSection()==="warnings"),a(5),c(e.data==null?null:e.data.WarningsActualLength),d(46),a(2),b(e.data==null?null:e.data.Warnings),a(2),w("open",e.id===i.openEntry()&&i.openSection()==="errors"),a(5),c(e.data==null?null:e.data.ErrorsActualLength),d(55),a(2),S((e.data==null||e.data.Errors==null?null:e.data.Errors.length)===0?60:-1),a(),b(e.data==null?null:e.data.Errors),a(12),S(i.copied()=="all"?73:74),a(2),V(" ",$(76,51,e.data)," ")}}function rt(n,t){if(n&1){let e=I();_(0,"article",59)(1,"header",60),y("click",function(){let l=P(e).$implicit,u=E();return R(u.toggleOpenEntry(l))}),L(2,Pn,1,0,"div",61)(3,Rn,1,0,"div",61)(4,In,1,0,"div",62)(5,$n,1,0,"div",63),_(6,"h3"),g(7),C(8,"date"),o(),_(9,"p"),g(10),o(),F(11,"div",64),_(12,"div",65)(13,"sh-icon",66),g(14,"caret-down"),o()()(),L(15,Ft,77,53,"section",67),o()}if(n&2){let e=t.$implicit,i=E(),l=(e.data==null?null:e.data.ParsedResult)||"Unknown";a(2),S(l=="Fatal"?2:l=="Error"?3:l=="Warning"?4:5),a(5),K(D(8,7,e.timestamp,"medium")),a(3),sn(" ",e.data==null?null:e.data.MainOperation," ",i.getLocalizedSummary(e)," "),a(3),Y("open",e.id===i.openEntry()),a(2),S(e.id===i.openEntry()?15:-1)}}var De=class n{#e=z(me);#n=z(Ge);#t=new Z;#i=new ee;backupId=Le.required();isSuppressingWarning=h(!1);copied=h(null);backupResource=Cn({params:()=>({id:this.backupId()}),loader:({params:t})=>ln(this.#e.getApiV1BackupById({id:t.id}))});suppressedWarningIds=ge(()=>{let t=this.backupResource.value();if(!t?.Backup?.Settings)return new Set;let e=t.Backup.Settings.find(i=>i.Name==="--suppress-warnings");return e?.Value?new Set(e.Value.split(",").map(i=>i.trim()).filter(Boolean)):new Set});openEntry=h(null);openSection=h(null);pagination=h({offset:0,pagesize:100});resource=Ae({params:()=>Ce({id:this.backupId()},this.pagination()),stream:({params:t})=>this.#e.getApiV1BackupByIdLog({id:t.id,pagesize:100}).pipe(H(e=>e.map(i=>({id:i.ID,operationId:i.OperationID,timestamp:i.Timestamp*1e3,type:i.Type,data:JSON.parse(i.Message),exception:JSON.stringify(i.Exception)==="{}"?null:i.Exception}))))});getLocalizedSummary(t){let e=t.data?.ErrorsActualLength??0,i=t.data?.WarningsActualLength??0,l=[];if(t.data?.MainOperation=="Backup"){if(t.data?.Duration){let u=this.#i.transform(t.data?.Duration,!0);u.startsWith("0h ")&&(u=u.slice(3)),u.startsWith("0m ")&&(u=u.slice(3)),l.push($localize`took ${u}`)}t.data?.BackendStatistics?.BytesUploaded&&l.push($localize`uploaded ${this.#t.transform(t.data?.BackendStatistics?.BytesUploaded)}`),t.data?.BackendStatistics?.KnownFileSize&&l.push($localize`backup size ${this.#t.transform(t.data?.BackendStatistics?.KnownFileSize)}`)}return e!==0&&l.push($localize`:@@errorCount:${e} error${e===1?"":"s"}`),i!==0&&l.push($localize`:@@warningCount:${i} warning${i===1?"":"s"}`),l.length===0?"":`(${l.join(", ")})`}toggleOpenEntry(t){let e=t.id;if(this.openEntry()===e){this.openEntry.set(null),this.openSection.set(null);return}let i=t.data?.ErrorsActualLength??0,l=t.data?.WarningsActualLength??0;i>0?this.openSection.set("errors"):l>0?this.openSection.set("warnings"):this.openSection.set(null),this.openEntry.set(e)}parseWarning(t){let e=t.match(/^(.*?) - \[(.*?)-(.*?)-(.*?)\]: (.*)$/);if(!e)return null;let[,i,l,u,O,G]=e;return{Timestamp:i,LogLevel:l,Source:u,MessageId:O,Message:G}}isWarningSuppressed(t){return this.suppressedWarningIds().has(t)}toggleWarningSuppression(t){let e=this.backupId();!e||!t||(this.isSuppressingWarning.set(!0),this.#e.getApiV1BackupById({id:e}).pipe(rn(i=>{let l=i.Backup?.Settings??[],u=l.findIndex(N=>N.Name==="--suppress-warnings"),O=this.isWarningSuppressed(t),G="";if(u>=0){let B=(l[u].Value??"").split(",").map(U=>U.trim()).filter(Boolean);O?B=B.filter(U=>U!==t):B.includes(t)||B.push(t),G=B.join(",")}else O||(G=t);let k=l.map(N=>({Name:N.Name,Value:N.Value,Filter:N.Filter}));return u>=0?G===""?k.splice(u,1):k[u]={Name:"--suppress-warnings",Value:G,Filter:null}:G!==""&&k.push({Name:"--suppress-warnings",Value:G,Filter:null}),this.#e.putApiV1BackupById({id:e,requestBody:{Backup:{Name:i.Backup?.Name,Description:i.Backup?.Description,DBPath:i.Backup?.DBPath,Tags:i.Backup?.Tags??[],TargetURL:i.Backup?.TargetURL,ConnectionStringID:i.Backup?.ConnectionStringID,Sources:i.Backup?.Sources??[],Settings:k,Filters:i.Backup?.Filters?.map(N=>({Expression:N.Expression,Include:N.Include,Order:N.Order})),Metadata:i.Backup?.Metadata??{},AdditionalTargetURLs:i.Backup?.AdditionalTargetURLs?.map(N=>({TargetUrl:N.TargetUrl,UrlKey:N.UrlKey,Mode:N.Mode,Interval:N.Interval,ConnectionStringID:N.ConnectionStringID,Options:N.Options}))},Schedule:i.Schedule?{Repeat:i.Schedule.Repeat,Time:i.Schedule.Time,AllowedDays:i.Schedule.AllowedDays}:void 0}})}),Fn(()=>this.isSuppressingWarning.set(!1))).subscribe({next:()=>{this.#n.getBackups(!0),this.backupResource.reload()},error:i=>{console.error("Failed to toggle warning suppression:",i)}}))}copyToClipboard(t,e,i){t.stopPropagation(),navigator.clipboard.writeText(e),this.copied.set(i),setTimeout(()=>{this.copied.set(null)},2e3)}stringify(t){return JSON.stringify(t,null,2)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=W({type:n,selectors:[["app-general-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let t;t=$localize`Time`;let e;e=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let i;i=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let l;l=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let u;u=$localize`Source files`;let O;O=$localize` Evaluated: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let G;G=$localize`Opened: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let k;k=$localize`Added: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let N;N=$localize` Modified: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let B;B=$localize`Deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let U;U=$localize`Too large: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Q;Q=$localize`Files with error: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let A;A=$localize`${"\uFFFD#47\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#47\uFFFD|\uFFFD/#49\uFFFD]"}:CLOSE_TAG_SH_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#48\uFFFD"}:START_TAG_DIV:${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#47\uFFFD|\uFFFD/#49\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#48\uFFFD"}:CLOSE_TAG_DIV:`,A=m(A);let ne;ne=$localize`${"\uFFFD#56\uFFFD"}:START_TAG_SH_ICON:warning${"[\uFFFD/#56\uFFFD|\uFFFD/#58\uFFFD]"}:CLOSE_TAG_SH_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#57\uFFFD"}:START_TAG_DIV:${"\uFFFD#58\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#56\uFFFD|\uFFFD/#58\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#57\uFFFD"}:CLOSE_TAG_DIV:`,ne=m(ne);let te;te=$localize`${"\uFFFD#67\uFFFD"}:START_TAG_SH_ICON:notepad${"[\uFFFD/#67\uFFFD|\uFFFD/#69\uFFFD]"}:CLOSE_TAG_SH_ICON: Complete log ${"\uFFFD#68\uFFFD"}:START_TAG_DIV:${"\uFFFD#69\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#67\uFFFD|\uFFFD/#69\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#68\uFFFD"}:CLOSE_TAG_DIV:`,te=m(te);let ie;ie=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:circle-half-tilt${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Test phase ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ie=m(ie);let Ie;Ie=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let $e;$e=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Me;Me=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let fe;fe=$localize`Verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let he;he=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ye;ye=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let oe;oe=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SH_ICON:file-archive${"[\uFFFD/#26\uFFFD|\uFFFD/#28\uFFFD]"}:CLOSE_TAG_SH_ICON: Compact phase ${"\uFFFD#27\uFFFD"}:START_TAG_DIV:${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#26\uFFFD|\uFFFD/#28\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_DIV:`,oe=m(oe);let Be;Be=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ve;ve=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let xe;xe=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let be;be=$localize` Deleted files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let ke;ke=$localize` Downloaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ke;Ke=$localize` Uploaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ue;Ue=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let we;we=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let _e;_e=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:arrows-clockwise${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Secondary destination: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,_e=m(_e);let Je;Je=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Xe;Xe=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ze;ze=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ve;Ve=$localize` Files copied: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let He;He=$localize`Files deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let We;We=$localize`Files renamed: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let je;je=$localize`Files verified: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let qe;qe=$localize`Failed verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ae;ae=$localize`${"\uFFFD#32\uFFFD"}:START_TAG_SH_ICON:info${"[\uFFFD/#32\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SH_ICON: Messages ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#33\uFFFD"}:START_TAG_DIV:${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#32\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#33\uFFFD"}:CLOSE_TAG_DIV:`,ae=m(ae);let le;le=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#42\uFFFD|\uFFFD/#44\uFFFD]"}:CLOSE_TAG_SH_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#43\uFFFD"}:START_TAG_DIV:${"\uFFFD#44\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#42\uFFFD|\uFFFD/#44\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_DIV:`,le=m(le);let Fe;Fe=$localize`${"\uFFFD#52\uFFFD"}:START_TAG_SH_ICON:warning${"[\uFFFD/#52\uFFFD|\uFFFD/#54\uFFFD]"}:CLOSE_TAG_SH_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#53\uFFFD"}:START_TAG_DIV:${"\uFFFD#54\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#52\uFFFD|\uFFFD/#54\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#53\uFFFD"}:CLOSE_TAG_DIV:`,Fe=m(Fe);let re;re=$localize` Copy ${"\uFFFD*5:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*5:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*6:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*6:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,re=m(re);let se;se=$localize` Copy ${"\uFFFD*5:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*5:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*6:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*6:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,se=m(se);let ue;ue=$localize` Copy ${"\uFFFD*5:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*5:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*6:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*6:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,ue=m(ue);let ce;ce=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:lock${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Lock results ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ce=m(ce);let Qe;Qe=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ye;Ye=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ze;Ze=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let en;en=$localize`Volumes read: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let nn;nn=$localize`Volumes updated: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let tn;tn=$localize`Parsed result: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let de;de=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Verifications ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,de=m(de);let on;on=$localize` Updating ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let _n;_n=$localize` Un-suppress ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:bell${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let an;an=$localize` Suppress ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:bell-slash${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Ee;return Ee=$localize` Copy ${"\uFFFD*5:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*5:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*6:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*6:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,Ee=m(Ee),[t,e,i,l,u,O,G,k,N,B,U,Q,A,ne,te,ie,Ie,$e,Me,fe,he,ye,oe,Be,ve,xe,be,ke,Ke,Ue,we,_e,Je,Xe,ze,Ve,He,We,je,qe,ae,le,Fe,re,se,ue,ce,Qe,Ye,Ze,en,nn,tn,de,on,_n,an,Ee,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"status","error"],[1,"status","warn"],[1,"status"],[1,"spacer"],[1,"action"],[1,"toggle-indicator"],[1,"log-content"],[3,"disableToggle"],["title",""],["content",""],[1,"extra-info"],["name","details"],["name","details",3,"open"],[1,"actions"],[1,"content"],[1,"warning-item"],["shButton","",1,"small",3,"click"],["name","details-messages"],["name","details-warnings"],["name","details-errors"],["shButton","",1,"small",3,"disabled"],["shButton","",1,"small",3,"click","disabled"]]},template:function(e,i){e&1&&(L(0,Dn,1,0,"sh-progress-bar",58),x(1,rt,16,10,"article",59,v)),e&2&&(S(i.resource.isLoading()?0:-1),a(),b(i.resource.value()))},dependencies:[On,Ln,Ne,Oe,q,Z,j,ee,Se],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column;cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-4);background-color:var(--base-1);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-2)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%]{display:flex;flex-direction:column}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;gap:.5rem;padding:.75rem;border-radius:var(--shape-2);background-color:var(--base-2)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:focus{outline:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:hover{background-color:var(--base-3)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]::marker{font-size:0}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex:1 0;gap:.5rem;-webkit-user-select:none;user-select:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:2rem;transition:transform 125ms linear}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon.toggle-indicator[_ngcontent-%COMP%]{transform:rotate(0)}details[open][_ngcontent-%COMP%] > summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon.toggle-indicator[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:.75rem 1rem 0;display:flex;flex-direction:column;gap:.75rem}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{margin-top:.75rem;position:relative}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:.75rem;right:.75rem}.extra-info[_ngcontent-%COMP%]{grid-column:1/-1;display:flex;flex-direction:column;gap:1rem}.extra-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.extra-info[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-2)}.log-content[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:1fr 1fr;gap:1rem}.status[_ngcontent-%COMP%]{display:block;width:1rem;height:1rem;background-color:var(--success-8);border-radius:50%}.status.error[_ngcontent-%COMP%]{background-color:var(--error-8)}.status.warn[_ngcontent-%COMP%]{background-color:var(--warn-8)}.warning-item[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:.5rem;padding:.75rem;border-radius:var(--shape-2);background-color:var(--base-2)}.warning-item[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{margin:0;white-space:pre-wrap;word-break:break-word}.warning-item[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{align-self:flex-start;white-space:nowrap}"],changeDetection:0})};function st(n,t){n&1&&F(0,"sh-progress-bar",1)}function ut(n,t){n&1&&(p(0,0,1),F(1,"sh-icon"),T())}function ct(n,t){n&1&&(p(0,0,2),F(1,"sh-icon"),T())}function dt(n,t){if(n&1){let e=I();_(0,"section",6)(1,"button",7),y("click",function(){P(e);let l=E(),u=l.$implicit,O=l.$index,G=E();return R(G.copyToClipboard(u.data,O))}),p(2,0),L(3,ut,2,0)(4,ct,2,0),T(),o(),_(5,"code"),g(6),C(7,"json"),o()()}if(n&2){let e=E(),i=e.$implicit,l=e.$index,u=E();a(),Y("success",u.copiedFromIndex()===l),a(2),S(u.copiedFromIndex()===l?3:4),a(3),K($(7,4,i.data))}}function Et(n,t){if(n&1){let e=I();_(0,"article",2)(1,"header",3),y("click",function(){let l=P(e).$implicit,u=E();return R(u.toggleOpenEntry(l.id))}),_(2,"h3"),g(3),C(4,"date"),o(),_(5,"div",4)(6,"sh-icon",5),g(7,"caret-down"),o()()(),L(8,dt,8,6,"section",6),o()}if(n&2){let e=t.$implicit,i=E();a(3),un("",D(4,6,e.timestamp,"medium"),": ",e.operation," ",e.path),a(3),Y("open",e.id===i.openEntry()),a(2),S(e.id===i.openEntry()?8:-1)}}var Pe=class n{#e=z(me);backupId=Le.required();openEntry=h(null);pagination=h({offset:0,pagesize:100});copiedFromIndex=h(null);resource=Ae({params:()=>Ce({id:this.backupId()},this.pagination()),stream:({params:t})=>this.#e.getApiV1BackupByIdRemotelog({id:t.id,pagesize:100}).pipe(H(e=>e.map((i,l)=>({id:i.ID,operationId:i.OperationID,timestamp:i.Timestamp*1e3,operation:i.Operation,path:i.Path,data:typeof i.Data=="string"?JSON.parse(i.Data):null}))))});toggleOpenEntry(t){if(this.openEntry()===t){this.openEntry.set(null);return}this.openEntry.set(t)}copyToClipboard(t,e){let i=JSON.stringify(t,null,2);navigator.clipboard.writeText(i),this.copiedFromIndex.set(e),setTimeout(()=>{this.copiedFromIndex.set(null)},3e3)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=W({type:n,selectors:[["app-remote-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let t;return t=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy to clipboard ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=m(t),[t,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"actions"],[1,"toggle-indicator"],[1,"log-content"],["shButton","",1,"small",3,"click"]]},template:function(e,i){e&1&&(L(0,st,1,0,"sh-progress-bar",1),x(1,Et,9,9,"article",2,v)),e&2&&(S(i.resource.isLoading()?0:-1),a(),b(i.resource.value()))},dependencies:[Ne,q,Se,j],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-4);background-color:var(--base-1);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-2)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0;-webkit-user-select:none;user-select:none}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}.log-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem;position:relative}.log-content[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:2rem;right:2rem;background:transparent}code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-2)}"],changeDetection:0})};function Ct(n,t){if(n&1&&(g(0," - "),M(1),s(2,6),f(),g(3),C(4,"durationFormat")),n&2){E(2);let e=J(6);a(3),V(" ",$(4,1,e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration)," ")}}function pt(n,t){n&1&&(M(0),s(1,7),f())}function Tt(n,t){if(n&1&&(g(0),C(1,"bytes")),n&2){E(2);let e=J(6);V(" ",$(1,1,e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function gt(n,t){n&1&&(M(0),s(1,8),f())}function Lt(n,t){if(n&1&&(g(0),C(1,"bytes")),n&2){E(2);let e=J(6);V(" ",$(1,1,e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function St(n,t){n&1&&(M(0),s(1,9),f())}function Ot(n,t){if(n&1&&(_(0,"sh-chip",20),s(1,10),o()),n&2){E(2);let e=J(6);a(),c(e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount),d(1)}}function Nt(n,t){n&1&&(_(0,"sh-chip",21),s(1,11),o())}function mt(n,t){if(n&1&&(_(0,"div",14)(1,"div",19)(2,"h3"),g(3),_(4,"sh-icon"),g(5,"database"),o()(),_(6,"p")(7,"span"),s(8,3),o(),g(9),C(10,"date"),L(11,Ct,5,3)(12,pt,2,0,"ng-container"),o(),_(13,"p")(14,"span"),s(15,4),o(),L(16,Tt,2,3)(17,gt,2,0,"ng-container"),o(),_(18,"p")(19,"span"),s(20,5),o(),L(21,Lt,2,3)(22,St,2,0,"ng-container"),o()(),L(23,Ot,2,1,"sh-chip",20)(24,Nt,2,0,"sh-chip",21),o()),n&2){let e=E(),i=J(6);a(3),V(" ",i.Backup.Name??e.MISSING_BACKUP_NAME," "),a(6),V(" ",D(10,6,i.Backup.Metadata==null?null:i.Backup.Metadata.LastBackupFinished,"short")," "),a(2),S(i.Backup.Metadata!=null&&i.Backup.Metadata.LastBackupDuration?11:12),a(5),S(i.Backup.Metadata!=null&&i.Backup.Metadata.SourceFilesSize?16:17),a(5),S(i.Backup.Metadata!=null&&i.Backup.Metadata.TargetFilesSize?21:22),a(2),S(i.Backup.Metadata!=null&&i.Backup.Metadata.BackupListCount?23:24)}}function Gt(n,t){if(n&1&&F(0,"app-general-log",18),n&2){let e=E();w("backupId",e.backupId())}}function At(n,t){if(n&1&&F(0,"app-remote-log",18),n&2){let e=E();w("backupId",e.backupId())}}var Re=class n{#e=z(pn);#n=z(Ge);MISSING_BACKUP_NAME=$localize`Backup name missing`;activeTab=h("general");backupId=Nn(this.#e.params.pipe(H(t=>t.id)));backup=ge(()=>{let t=this.backupId();return t?this.#n.getBackupById(t):null});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=W({type:n,selectors:[["app-log"]],decls:15,vars:5,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`General`;let i;i=$localize`Destination`;let l;l=$localize`Last successful backup:`;let u;u=$localize`Source:`;let O;O=$localize`Destination:`;let G;G=$localize`took`;let k;k=$localize`N/A`;let N;N=$localize`N/A`;let B;B=$localize`N/A`;let U;U=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION: Version`;let Q;return Q=$localize`No version yet`,[t,e,i,l,u,O,G,k,N,B,U,Q,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"backup"],[1,"primary",3,"valueChange","value"],["value","general"],["value","destination"],[3,"backupId"],[1,"text"],[1,"simple","success"],[1,"simple"]]},template:function(e,i){if(e&1){let l=I();F(0,"app-status-bar"),_(1,"section")(2,"div",12)(3,"button",13),p(4,0),F(5,"sh-icon"),T(),o()(),pe(6),L(7,mt,25,9,"div",14),_(8,"sh-tabs",15),En("valueChange",function(O){return P(l),dn(i.activeTab,O)||(i.activeTab=O),R(O)}),_(9,"button",16),s(10,1),o(),_(11,"button",17),s(12,2),o()(),L(13,Gt,1,1,"app-general-log",18),L(14,At,1,1,"app-remote-log",18),o()}if(e&2){a(6);let l=Te(i.backup());a(),S(l?7:-1),a(),cn("value",i.activeTab),a(5),S(i.activeTab()==="general"?13:-1),a(),S(i.activeTab()==="destination"?14:-1)}},dependencies:[Sn,De,Pe,Tn,mn,q,Oe,gn,Z,ee,j],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 1.5rem;gap:1rem}sh-tabs[_ngcontent-%COMP%]{margin-bottom:1rem}.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)}"],changeDetection:0})};export{Re as default};
@@ -1 +1 @@
1
- import{g as pe}from"./chunk-6WX2UOAN.js";import"./chunk-VZNLMGYP.js";import{b as ue,c as de,m as Se,q as Ee,r as Ce}from"./chunk-O2L2FRYE.js";import"./chunk-PNQ5BDQN.js";import"./chunk-2EX5HS5X.js";import{c as Te,d as ge}from"./chunk-EVEI25GQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-COEGVUM3.js";import"./chunk-KZYRTI62.js";import"./chunk-TSVSMVY4.js";import"./chunk-2KD757N6.js";import"./chunk-OP7MDR2B.js";import{a as M}from"./chunk-PEOYNJJM.js";import"./chunk-NUV5LHQV.js";import"./chunk-PDZNQW6F.js";import{B as le,H as _e,K as ce,c as Q,e as Y,f as Z,g as ee,i as te,j as ne,s as ie,v as oe,w as re,y as ae,z as se}from"./chunk-CJKZ27FM.js";import"./chunk-KNSQLQC6.js";import{b as j,d as q}from"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as m,Ac as H,Bc as K,Db as D,Eb as r,Fb as a,Gb as O,Kb as V,Lb as W,Nb as S,Rc as $,Ta as T,Ub as E,Vb as C,Wb as I,Yc as w,Zb as z,_b as u,ac as l,ea as _,fa as c,hb as B,hc as J,ia as v,ic as X,oc as y,qa as N,tc as f,uc as R,vc as h,wc as P,xb as p,xc as A,yb as F,yc as L}from"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";var Fe=["formRef"],Oe=["testUrl"],me=()=>({maxWidth:"700px",width:"100%"});function Re(o,i){if(o&1){let e=S();r(0,"button",24),u("click",function(){_(e);let t=l();return c(t.openTargetUrlDialog())}),E(1,5),O(2,"sh-icon"),C(),a()}}function Ne(o,i){if(o&1){let e=S();r(0,"button",24),u("click",function(){_(e);let t=l(2);return c(t.copyTargetUrl())}),E(1,7),O(2,"sh-icon"),C(),a()}}function De(o,i){if(o&1){let e=S();r(0,"sh-menu")(1,"button",15)(2,"sh-icon"),y(3,"dots-three-vertical"),a()(),V(4,25),r(5,"button",24),u("click",function(){_(e);let t=l();return c(t.openTargetUrlDialog())}),E(6,6),O(7,"sh-icon"),C(),a(),p(8,Ne,3,0,"button",15),W(),a()}if(o&2){l();let e=L(0);T(8),F(e?8:-1)}}function Ie(o,i){if(o&1){let e=S();r(0,"app-destination-list-item",17)(1,"button",20),u("click",function(){_(e);let t=l();return c(t.removeDestination())}),I(2,8),a()()}if(o&2){l();let e=L(12);D("destination",e)}}function fe(o,i){if(o&1){let e=S();r(0,"app-destination-list",26),u("setDestination",function(t){_(e);let s=l();return c(s.setDestination(t))}),a()}}function he(o,i){if(o&1){let e=S();r(0,"app-single-destination",27),h("targetUrlChange",function(t){_(e);let s=l();return R(s.targetUrlModel,t)||(s.targetUrlModel=t),c(t)}),a()}if(o&2){let e=l();f("targetUrl",e.targetUrlModel)}}function Me(o,i){o&1&&(E(0,4,1),O(1,"sh-icon",22),C())}function ye(o,i){o&1&&(E(0,4,2),O(1,"sh-icon"),C())}function Pe(o,i){if(o&1){let e=S();r(0,"sh-dialog",28),h("isOpenChange",function(t){_(e);let s=l();return R(s.targetUrlDialogOpen,t)||(s.targetUrlDialogOpen=t),c(t)}),r(1,"header",29)(2,"div",30)(3,"h2"),I(4,9),a(),r(5,"sh-alert",31),I(6,10),a()()(),r(7,"div",32)(8,"sh-form-field")(9,"textarea",33),h("ngModelChange",function(t){_(e);let s=l();return R(s.targetUrlCtrl,t)||(s.targetUrlCtrl=t),c(t)}),a()()(),r(10,"footer",34)(11,"button",20),u("click",function(){_(e);let t=l();return c(t.closeTargetUrlDialog(!1))}),y(12,"Cancel"),a(),r(13,"button",35),u("click",function(){_(e);let t=l();return c(t.closeTargetUrlDialog(!0))}),E(14,11),O(15,"sh-icon"),C(),a()()()}if(o&2){let e=l();f("isOpen",e.targetUrlDialogOpen),D("options",K(3,me)),T(9),f("ngModel",e.targetUrlCtrl)}}var x=class o{#i=m(q);#o=m(j);#n=m(se);injector=m(v);#e=m(pe);formRef=w.required("formRef");testUrlComponent=w.required("testUrl");testSignal=this.#e.destinationTestSignal;targetUrlModel=this.#e.destinationTargetUrl;targetUrlCtrl=N(null);targetUrlInitial=N(null);targetUrlDialogOpen=N(!1);toggleNewDestination=N(!0);selectedDestinationType=$(()=>{let i=this.#e.destinationTargetUrl();return i?Te(i):null});selectedDestinationTypeOption=$(()=>{let i=this.selectedDestinationType();return i?{key:i.customKey??i.key,customKey:i.customKey??null,displayName:i.displayName,description:i.description,icon:i.icon}:null});copyTargetUrl(){navigator.clipboard.writeText(this.#e.destinationTargetUrl()??"")}openTargetUrlDialog(){let i=this.#e.destinationTargetUrl();this.targetUrlCtrl.set(i),this.targetUrlInitial.set(i),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl(),n=this.targetUrlInitial();!i||e===n||!e||this.#e.updateTargetUrl(e)}setDestination(i){let e=ge(i??"");if(e){if(e.mapper.default){let n=e.mapper.default("");this.#e.updateTargetUrl(n);return}this.#e.updateTargetUrl(`${i}://`)}}removeDestination(){this.#e.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let i=this.testSignal();if(i===null){this.#n.open(M,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:n=>{n?this.testUrlComponent()?.testDestination(!1)?.then(t=>{t.action==="success"&&t.containsBackup?this.#t():this.#n.open(M,{data:{title:$localize`Test did not succeed`,message:t.errorMessage??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#t()}});return}let e=typeof i=="string"?null:i;if(e?.action!=="success"||!e.containsBackup){this.#n.open(M,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Edit destination`,cancelText:$localize`Yes, continue`},closed:n=>{n||this.#t()}});return}this.#t()}#t(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=B({type:o,selectors:[["app-restore-destination"]],viewQuery:function(e,n){e&1&&J(n.formRef,Fe,5)(n.testUrlComponent,Oe,5),e&2&&X(2)},features:[H([Ee])],decls:25,vars:18,consts:()=>{let i;i=$localize`Backup destination`;let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let n;n=$localize`${"\uFFFD*22:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*22:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*23:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*23:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,n=z(n);let t;t=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Set target URL `;let s;s=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let g;g=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let U;U=$localize`Change`;let b;b=$localize`Edit target URL`;let G;G=$localize`Be careful, this will overwrite everything you have in your destination.`;let k;return k=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["testUrl",""],i,e,n,t,s,g,U,b,G,k,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","readOnlyTest","moduleType"],[1,"current-destination",3,"destination"],[3,"targetUrl"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click"],["menu",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],[1,"warn"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,n){if(e&1){let t=S();P(0),r(1,"form",12,0),u("submit",function(){return n.next()}),r(3,"header")(4,"h3",13)(5,"span"),I(6,2),a(),r(7,"div",14),p(8,Re,3,0,"button",15)(9,De,9,1,"sh-menu"),a()(),r(10,"app-test-url",16,1),h("targetUrlChange",function(g){return _(t),R(n.targetUrlModel,g)||(n.targetUrlModel=g),c(g)})("testSignalChange",function(g){return _(t),R(n.testSignal,g)||(n.testSignal=g),c(g)}),a(),P(12),p(13,Ie,3,1,"app-destination-list-item",17),a(),p(14,fe,1,0,"app-destination-list"),p(15,he,1,1,"app-single-destination",18),r(16,"div",19)(17,"button",20),u("click",function(){return n.goBack()}),E(18,3),O(19,"sh-icon"),C(),a(),r(20,"button",21),E(21,4),p(22,Me,2,0,"sh-icon",22)(23,ye,2,0,"sh-icon"),C(),a()()(),p(24,Pe,16,4,"sh-dialog",23)}if(e&2){let t=A(!!n.targetUrlModel());T(8),F(t?9:8),T(2),f("targetUrl",n.targetUrlModel)("testSignal",n.testSignal),D("backupId",null)("sourcePrefix",null)("suppressErrorDialogs",!1)("askToCreate",!1)("testExpectation","containsBackup")("readOnlyTest",!0)("moduleType","Backend"),T(2);let s=A(n.selectedDestinationTypeOption());T(),F(s?13:-1),T(),F(t?-1:14),T(),F(t?15:-1),T(5),D("disabled",n.testSignal()=="testing"||!t),T(2),F(n.testSignal()=="testing"?22:23),T(2),F(n.targetUrlDialogOpen()?24:-1)}},dependencies:[Ce,de,ue,ie,ne,Q,Y,Z,te,ee,le,_e,ce,oe,ae,re,Se],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.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}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-8)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}"],changeDetection:0})};export{x as default};
1
+ import{g as pe}from"./chunk-NNSH2MIZ.js";import"./chunk-AOPTGCDG.js";import{b as ue,c as de,m as Se,q as Ee,r as Ce}from"./chunk-AU25JBCN.js";import"./chunk-PNQ5BDQN.js";import"./chunk-DCBSWJWZ.js";import{e as Te,g as ge}from"./chunk-OVNIENWW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-COEGVUM3.js";import"./chunk-3GE3OWQF.js";import"./chunk-S5IJ4C5T.js";import"./chunk-2KD757N6.js";import"./chunk-KKUFO6NZ.js";import{a as M}from"./chunk-PEOYNJJM.js";import"./chunk-MWQHWJOA.js";import"./chunk-6RZVYDJF.js";import{B as le,H as _e,K as ce,c as Q,e as Y,f as Z,g as ee,i as te,j as ne,s as ie,v as oe,w as re,y as ae,z as se}from"./chunk-CJKZ27FM.js";import"./chunk-4V3AE4ZE.js";import{b as j,d as q}from"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as m,Ac as H,Bc as K,Db as D,Eb as r,Fb as a,Gb as O,Kb as V,Lb as W,Nb as S,Rc as $,Ta as T,Ub as E,Vb as C,Wb as I,Yc as w,Zb as z,_b as u,ac as l,ea as _,fa as c,hb as B,hc as J,ia as v,ic as X,oc as y,qa as N,tc as f,uc as R,vc as h,wc as P,xb as p,xc as A,yb as F,yc as L}from"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";var Fe=["formRef"],Oe=["testUrl"],me=()=>({maxWidth:"700px",width:"100%"});function Re(o,i){if(o&1){let e=S();r(0,"button",24),u("click",function(){_(e);let t=l();return c(t.openTargetUrlDialog())}),E(1,5),O(2,"sh-icon"),C(),a()}}function Ne(o,i){if(o&1){let e=S();r(0,"button",24),u("click",function(){_(e);let t=l(2);return c(t.copyTargetUrl())}),E(1,7),O(2,"sh-icon"),C(),a()}}function De(o,i){if(o&1){let e=S();r(0,"sh-menu")(1,"button",15)(2,"sh-icon"),y(3,"dots-three-vertical"),a()(),V(4,25),r(5,"button",24),u("click",function(){_(e);let t=l();return c(t.openTargetUrlDialog())}),E(6,6),O(7,"sh-icon"),C(),a(),p(8,Ne,3,0,"button",15),W(),a()}if(o&2){l();let e=L(0);T(8),F(e?8:-1)}}function Ie(o,i){if(o&1){let e=S();r(0,"app-destination-list-item",17)(1,"button",20),u("click",function(){_(e);let t=l();return c(t.removeDestination())}),I(2,8),a()()}if(o&2){l();let e=L(12);D("destination",e)}}function fe(o,i){if(o&1){let e=S();r(0,"app-destination-list",26),u("setDestination",function(t){_(e);let s=l();return c(s.setDestination(t))}),a()}}function he(o,i){if(o&1){let e=S();r(0,"app-single-destination",27),h("targetUrlChange",function(t){_(e);let s=l();return R(s.targetUrlModel,t)||(s.targetUrlModel=t),c(t)}),a()}if(o&2){let e=l();f("targetUrl",e.targetUrlModel)}}function Me(o,i){o&1&&(E(0,4,1),O(1,"sh-icon",22),C())}function ye(o,i){o&1&&(E(0,4,2),O(1,"sh-icon"),C())}function Pe(o,i){if(o&1){let e=S();r(0,"sh-dialog",28),h("isOpenChange",function(t){_(e);let s=l();return R(s.targetUrlDialogOpen,t)||(s.targetUrlDialogOpen=t),c(t)}),r(1,"header",29)(2,"div",30)(3,"h2"),I(4,9),a(),r(5,"sh-alert",31),I(6,10),a()()(),r(7,"div",32)(8,"sh-form-field")(9,"textarea",33),h("ngModelChange",function(t){_(e);let s=l();return R(s.targetUrlCtrl,t)||(s.targetUrlCtrl=t),c(t)}),a()()(),r(10,"footer",34)(11,"button",20),u("click",function(){_(e);let t=l();return c(t.closeTargetUrlDialog(!1))}),y(12,"Cancel"),a(),r(13,"button",35),u("click",function(){_(e);let t=l();return c(t.closeTargetUrlDialog(!0))}),E(14,11),O(15,"sh-icon"),C(),a()()()}if(o&2){let e=l();f("isOpen",e.targetUrlDialogOpen),D("options",K(3,me)),T(9),f("ngModel",e.targetUrlCtrl)}}var x=class o{#i=m(q);#o=m(j);#n=m(se);injector=m(v);#e=m(pe);formRef=w.required("formRef");testUrlComponent=w.required("testUrl");testSignal=this.#e.destinationTestSignal;targetUrlModel=this.#e.destinationTargetUrl;targetUrlCtrl=N(null);targetUrlInitial=N(null);targetUrlDialogOpen=N(!1);toggleNewDestination=N(!0);selectedDestinationType=$(()=>{let i=this.#e.destinationTargetUrl();return i?Te(i):null});selectedDestinationTypeOption=$(()=>{let i=this.selectedDestinationType();return i?{key:i.customKey??i.key,customKey:i.customKey??null,displayName:i.displayName,description:i.description,icon:i.icon}:null});copyTargetUrl(){navigator.clipboard.writeText(this.#e.destinationTargetUrl()??"")}openTargetUrlDialog(){let i=this.#e.destinationTargetUrl();this.targetUrlCtrl.set(i),this.targetUrlInitial.set(i),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl(),n=this.targetUrlInitial();!i||e===n||!e||this.#e.updateTargetUrl(e)}setDestination(i){let e=ge(i??"");if(e){if(e.mapper.default){let n=e.mapper.default("");this.#e.updateTargetUrl(n);return}this.#e.updateTargetUrl(`${i}://`)}}removeDestination(){this.#e.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let i=this.testSignal();if(i===null){this.#n.open(M,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:n=>{n?this.testUrlComponent()?.testDestination(!1)?.then(t=>{t.action==="success"&&t.containsBackup?this.#t():this.#n.open(M,{data:{title:$localize`Test did not succeed`,message:t.errorMessage??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#t()}});return}let e=typeof i=="string"?null:i;if(e?.action!=="success"||!e.containsBackup){this.#n.open(M,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Edit destination`,cancelText:$localize`Yes, continue`},closed:n=>{n||this.#t()}});return}this.#t()}#t(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=B({type:o,selectors:[["app-restore-destination"]],viewQuery:function(e,n){e&1&&J(n.formRef,Fe,5)(n.testUrlComponent,Oe,5),e&2&&X(2)},features:[H([Ee])],decls:25,vars:18,consts:()=>{let i;i=$localize`Backup destination`;let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let n;n=$localize`${"\uFFFD*22:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*22:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*23:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*23:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,n=z(n);let t;t=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Set target URL `;let s;s=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let g;g=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let U;U=$localize`Change`;let b;b=$localize`Edit target URL`;let G;G=$localize`Be careful, this will overwrite everything you have in your destination.`;let k;return k=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["testUrl",""],i,e,n,t,s,g,U,b,G,k,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","readOnlyTest","moduleType"],[1,"current-destination",3,"destination"],[3,"targetUrl"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click"],["menu",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],[1,"warn"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,n){if(e&1){let t=S();P(0),r(1,"form",12,0),u("submit",function(){return n.next()}),r(3,"header")(4,"h3",13)(5,"span"),I(6,2),a(),r(7,"div",14),p(8,Re,3,0,"button",15)(9,De,9,1,"sh-menu"),a()(),r(10,"app-test-url",16,1),h("targetUrlChange",function(g){return _(t),R(n.targetUrlModel,g)||(n.targetUrlModel=g),c(g)})("testSignalChange",function(g){return _(t),R(n.testSignal,g)||(n.testSignal=g),c(g)}),a(),P(12),p(13,Ie,3,1,"app-destination-list-item",17),a(),p(14,fe,1,0,"app-destination-list"),p(15,he,1,1,"app-single-destination",18),r(16,"div",19)(17,"button",20),u("click",function(){return n.goBack()}),E(18,3),O(19,"sh-icon"),C(),a(),r(20,"button",21),E(21,4),p(22,Me,2,0,"sh-icon",22)(23,ye,2,0,"sh-icon"),C(),a()()(),p(24,Pe,16,4,"sh-dialog",23)}if(e&2){let t=A(!!n.targetUrlModel());T(8),F(t?9:8),T(2),f("targetUrl",n.targetUrlModel)("testSignal",n.testSignal),D("backupId",null)("sourcePrefix",null)("suppressErrorDialogs",!1)("askToCreate",!1)("testExpectation","containsBackup")("readOnlyTest",!0)("moduleType","Backend"),T(2);let s=A(n.selectedDestinationTypeOption());T(),F(s?13:-1),T(),F(t?-1:14),T(),F(t?15:-1),T(5),D("disabled",n.testSignal()=="testing"||!t),T(2),F(n.testSignal()=="testing"?22:23),T(2),F(n.targetUrlDialogOpen()?24:-1)}},dependencies:[Ce,de,ue,ie,ne,Q,Y,Z,te,ee,le,_e,ce,oe,ae,re,Se],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.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}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-8)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}"],changeDetection:0})};export{x as default};
@@ -1 +1 @@
1
- import{a as F}from"./chunk-E4CYVUYG.js";import{a as _}from"./chunk-COEGVUM3.js";import{b as B}from"./chunk-OP7MDR2B.js";import{a as C}from"./chunk-PEOYNJJM.js";import{a as R}from"./chunk-NUV5LHQV.js";import{z}from"./chunk-CJKZ27FM.js";import{d as $}from"./chunk-KNSQLQC6.js";import{$ as a,G as f,M as S,Rc as c,W as P,l as h,q as k,qa as g,sa as d}from"./chunk-K5XGRFWJ.js";import{a as n,b as r}from"./chunk-7CGTOI24.js";var m={Starting_Operation:$localize`Starting operation …`,Backup_Begin:$localize`Starting backup …`,Backup_PreBackupVerify:$localize`Verifying backend data …`,Backup_PostBackupTest:$localize`Verifying remote data …`,Backup_PreviousBackupFinalize:$localize`Completing previous backup …`,Backup_ProcessingFiles:$localize`Processing files to backup …`,Backup_Finalize:$localize`Completing backup …`,Backup_WaitForUpload:$localize`Waiting for upload to finish …`,Backup_Delete:$localize`Deleting unwanted files …`,Backup_Compact:$localize`Compacting remote data …`,Backup_VerificationUpload:$localize`Uploading verification file …`,Backup_PostBackupVerify:$localize`Verifying backend data …`,Backup_Lock:$localize`Locking remote data …`,Backup_Complete:$localize`Backup complete!`,Backup_RemoteSynchronization:$localize`Synchronizing secondary destination(s) …`,Restore_Begin:$localize`Starting restore …`,Restore_RecreateDatabase:$localize`Rebuilding local database …`,Restore_PreRestoreVerify:$localize`Verifying remote data …`,Restore_CreateFileList:$localize`Building list of files to restore …`,Restore_CreateTargetFolders:$localize`Creating target folders …`,Restore_ScanForExistingFiles:$localize`Scanning existing files …`,Restore_ScanForLocalBlocks:$localize`Scanning for local blocks …`,Restore_PatchWithLocalBlocks:$localize`Patching files with local blocks …`,Restore_Download:$localize`Downloading files …`,Restore_PatchWithRemoteFiles:$localize`Patching files with remote data …`,Restore_VerifyRestoredFiles:$localize`Verifying restored files …`,Restore_Finaluze:$localize`Finalizing restore …`,Restore_Complete:$localize`Restore complete!`,Recreate_Begin:$localize`Starting database recreate …`,Recreate_Delete:$localize`Deleting old database …`,Recreate_Create:$localize`Creating new database …`,Recreate_Download:$localize`Downloading files …`,Recreate_Process:$localize`Processing files …`,Recreate_Complete:$localize`Database recreate complete!`,Verify_Begin:$localize`Starting verification …`,Verify_Download:$localize`Downloading files …`,Verify_Process:$localize`Processing files …`,Verify_Complete:$localize`Verification complete!`,BugReport_Begin:$localize`Starting bug report …`,BugReport_Gathering:$localize`Gathering information …`,BugReport_Complete:$localize`Bug report complete!`,List_Begin:$localize`Starting list …`,List_Download:$localize`Downloading files …`,List_Process:$localize`Processing files …`,List_Complete:$localize`List complete!`,Delete_Begin:$localize`Starting delete …`,Delete_Download:$localize`Downloading files …`,Delete_Process:$localize`Processing files …`,Delete_Complete:$localize`Delete complete!`,Compact_Begin:$localize`Starting compact …`,Compact_Download:$localize`Downloading files …`,Compact_Process:$localize`Processing files …`,Compact_Complete:$localize`Compact complete!`,Restore_DownloadingRemoteFiles:$localize`Downloading files …`,Restore_PostRestoreVerify:$localize`Verifying restored files …`,Recreate_Running:$localize`Recreating database …`,Vacuum_Running:$localize`Vacuuming database …`,Repair_Running:$localize`Repairing database …`,Verify_Running:$localize`Verifying files …`,BugReport_Running:$localize`Creating bug report …`,Delete_Listing:$localize`Listing remote files …`,Delete_Deleting:$localize`Deleting remote files …`,PurgeFiles_Begin:$localize`Listing remote files for purge …`,PurgeFiles_Process:$localize`Purging files …`,PurgeFiles_Compact:$localize`Compacting remote data …`,PurgeFiles_Complete:$localize`Purging files complete!`,ReadLockInfo_Running:$localize`Reading lock info …`,Error:$localize`Error!`};var b=class p{#i=a(_);#t=a($);#o=a(F);#e=a(B);#c=a(z);#g=a(R);#l=g(!1);#s=g(null);statusData=this.#s.asReadonly();lastState=null;serverState=c(()=>{let e=this.#e.serverState();return e?(e.ProposedSchedule=e.ProposedSchedule?.map(i=>r(n({},i),{backup:i.Item1?this.#o.getBackupById(i.Item1):null}))??null,this.lastState=e,e):this.lastState});hasProgressOnWebsocket=c(()=>this.#g.hasProgressSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");clientIsRunning=c(()=>this.serverState()?.ProgramState==="Running");runningBackupId=c(()=>{let e=this.statusData();return!!(this.serverState()?.ActiveTask&&e?.task?.Status&&e?.task?.Status!=="Completed")?e?.BackupID??null:null});isResuming=g(!1);isFetching=this.#l.asReadonly();connectionStatus=this.#e.connectionStatus;pollingInterval;#m=d(()=>{let e=this.#e.serverState();e?.ActiveTask||this.#o.getBackups(!0),this.hasProgressOnWebsocket()&&(this.#e.subscribe("progress"),this.#e.subscribe("taskqueue")),e?.ActiveTask&&this.pollingInterval===void 0?this.startPollingProgress():e?.ActiveTask||this.stopPollingProgress()});#h=d(()=>{let e=this.#e.progressState(),i=this.#e.taskQueueState();if(e){let t=i?.find(o=>o.ID===e.TaskID)??null;this.#r(r(n({},e),{task:t}))}});setConnectionMethod(e){this.#e.setConnectionMethod(e)}startPollingProgress(){this.hasProgressOnWebsocket()?this.#e.subscribe("progress"):this.pollingInterval=setInterval(()=>{this.#n()},1e3)}stopPollingProgress(){clearInterval(this.pollingInterval)}fetchProgressState(){this.#n()}pauseResume(){return this.isResuming.set(!0),this.#t.postApiV1ServerstateResume().pipe(f(()=>this.isResuming.set(!1)))}resumeDialogCheck(e){if(!this.clientIsRunning()){this.#c.open(C,{data:{title:$localize`Server paused`,message:$localize`Server is currently paused. Do you want to resume now?`,confirmText:$localize`Resume`,cancelText:$localize`No, I'll resume later`},closed:i=>{i&&this.pauseResume().subscribe({next:()=>{e()}})}});return}e()}#n(){this.#l.set(!0),this.#t.getApiV1Progressstate().pipe(S(e=>{let i=e.TaskID??null;return i===null?h(e):this.#t.getApiV1TaskByTaskid({taskid:i}).pipe(k(t=>r(n({},e),{task:t??null})))}),f(()=>this.#l.set(!1))).subscribe({next:e=>{this.#r(e),this.serverState()?.ActiveTask==null&&this.stopPollingProgress()},error:e=>{e.status===404&&this.stopPollingProgress()}})}#r(e){let i=e.TaskID??null,t=e.BackupID??null;i!==null&&t!==null&&(e.backup=this.#o.getBackupById(t)),this.#s.set(r(n({},e),{progress:this.#p(e),statusText:this.#d(e),fileStatusText:this.#u(e),fileCountProgressText:this.#f(e),actionText:e.backup?.Backup?.Name??$localize`Running task`}))}#p(e){let i=-1;if(e.task&&e)if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=0;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,o=e.TotalFileCount-e.ProcessedFileCount,l=e.TotalFileSize-e.ProcessedFileSize-t;i=(e.ProcessedFileSize+t)/e.TotalFileSize,e.ProcessedFileCount===0?i=0:i>=.9&&(i=.9)}else e.Phase==="Backup_Finalize"||e.Phase==="Backup_WaitForUpload"?i=.9:e.Phase==="Backup_Delete"||e.Phase==="Backup_Compact"?i=.95:e.Phase==="Backup_VerificationUpload"||e.Phase==="Backup_PostBackupVerify"?i=.98:e.Phase==="Backup_Complete"?i=1:e.Phase==="Backup_RemoteSynchronization"?i=e.OverallProgress>0?e.OverallProgress:0:e.OverallProgress>0&&(i=e.OverallProgress);return i}#a(e){let i=(e.ActiveTransfers??[]).map(o=>o.BackendSpeed).reduce((o,l)=>(o??0)+(l??0),0)??-1,t=i<=0?e.BackendSpeed:i;return(t??-1)<0?"":` at ${this.#i.transform(t)}/s`}#u(e){let i=(["Backup_WaitForUpload","Backup_ProcessingFiles"].includes(e.Phase)?e?.BackendFileProgress:e.CurrentFileoffset)??0,t=(["Backup_WaitForUpload","Backup_ProcessingFiles"].includes(e.Phase)?e?.BackendFileSize:e.CurrentFilesize)??0;if(!e.CurrentFilename)return"";let o=e.CurrentFilename.length>42?"..."+e.CurrentFilename.slice(-42):e.CurrentFilename,l=(i/t*100).toFixed(1);return $localize`${o} | File processed: ${this.#i.transform(i)}/${this.#i.transform(t)} - ${l}%`}#f(e){return $localize`Files processed ${e.ProcessedFileCount}/${e.TotalFileCount}`}#d(e){let i="Running \u2026";if(e.task&&e){if(i=e.Phase?m[e.Phase]??e.Phase:"Running \u2026",e.TotalFileCount===0)return i;if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=`Counting (${e.TotalFileCount} files found, ${this.#i.transform(e.TotalFileSize)})`;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,o=e.TotalFileCount-e.ProcessedFileCount,l=e.TotalFileSize-e.ProcessedFileSize-t,u=e.Phase==="Restore_DownloadingRemoteFiles"?"Restoring: ":"",s=this.#a(e);e.Phase==="Backup_ProcessingFiles"&&o===0?i=`Completing upload ${s}`:e.BackendIsBlocking??!1?i=`Waiting for transfers ${s}`:i=`${u}${o} files (${this.#i.transform(l)}) to go ${s}`}else if(e.Phase==="Backup_WaitForUpload"){let t=this.#a(e);t!==""&&(i=`Waiting for upload to finish ${t}`)}else if(e.Phase==="Backup_RemoteSynchronization"){let t=e.RemoteSyncDestinationCount??0,o=e.RemoteSyncDestinationIndex??0,l=t>1?` (${o}/${t})`:"";if(e.TotalFileCount>0){let u=e.TotalFileCount-e.ProcessedFileCount,s=e.TotalFileSize-e.ProcessedFileSize,D=this.#a(e);i=`Synchronizing secondary destination${l}: ${u} files (${this.#i.transform(s)}) to go ${D}`}else l&&(i=`${m[e.Phase]}`.replace("\u2026",`${l} \u2026`))}}return i}static \u0275fac=function(i){return new(i||p)};static \u0275prov=P({token:p,factory:p.\u0275fac,providedIn:"root"})};export{m as a,b};
1
+ import{a as F}from"./chunk-ZFV3MK5Y.js";import{a as _}from"./chunk-COEGVUM3.js";import{b as B}from"./chunk-KKUFO6NZ.js";import{a as C}from"./chunk-PEOYNJJM.js";import{a as R}from"./chunk-MWQHWJOA.js";import{z}from"./chunk-CJKZ27FM.js";import{d as $}from"./chunk-4V3AE4ZE.js";import{$ as a,G as f,M as S,Rc as c,W as P,l as h,q as k,qa as g,sa as d}from"./chunk-K5XGRFWJ.js";import{a as n,b as r}from"./chunk-7CGTOI24.js";var m={Starting_Operation:$localize`Starting operation …`,Backup_Begin:$localize`Starting backup …`,Backup_PreBackupVerify:$localize`Verifying backend data …`,Backup_PostBackupTest:$localize`Verifying remote data …`,Backup_PreviousBackupFinalize:$localize`Completing previous backup …`,Backup_ProcessingFiles:$localize`Processing files to backup …`,Backup_Finalize:$localize`Completing backup …`,Backup_WaitForUpload:$localize`Waiting for upload to finish …`,Backup_Delete:$localize`Deleting unwanted files …`,Backup_Compact:$localize`Compacting remote data …`,Backup_VerificationUpload:$localize`Uploading verification file …`,Backup_PostBackupVerify:$localize`Verifying backend data …`,Backup_Lock:$localize`Locking remote data …`,Backup_Complete:$localize`Backup complete!`,Backup_RemoteSynchronization:$localize`Synchronizing secondary destination(s) …`,Restore_Begin:$localize`Starting restore …`,Restore_RecreateDatabase:$localize`Rebuilding local database …`,Restore_PreRestoreVerify:$localize`Verifying remote data …`,Restore_CreateFileList:$localize`Building list of files to restore …`,Restore_CreateTargetFolders:$localize`Creating target folders …`,Restore_ScanForExistingFiles:$localize`Scanning existing files …`,Restore_ScanForLocalBlocks:$localize`Scanning for local blocks …`,Restore_PatchWithLocalBlocks:$localize`Patching files with local blocks …`,Restore_Download:$localize`Downloading files …`,Restore_PatchWithRemoteFiles:$localize`Patching files with remote data …`,Restore_VerifyRestoredFiles:$localize`Verifying restored files …`,Restore_Finaluze:$localize`Finalizing restore …`,Restore_Complete:$localize`Restore complete!`,Recreate_Begin:$localize`Starting database recreate …`,Recreate_Delete:$localize`Deleting old database …`,Recreate_Create:$localize`Creating new database …`,Recreate_Download:$localize`Downloading files …`,Recreate_Process:$localize`Processing files …`,Recreate_Complete:$localize`Database recreate complete!`,Verify_Begin:$localize`Starting verification …`,Verify_Download:$localize`Downloading files …`,Verify_Process:$localize`Processing files …`,Verify_Complete:$localize`Verification complete!`,BugReport_Begin:$localize`Starting bug report …`,BugReport_Gathering:$localize`Gathering information …`,BugReport_Complete:$localize`Bug report complete!`,List_Begin:$localize`Starting list …`,List_Download:$localize`Downloading files …`,List_Process:$localize`Processing files …`,List_Complete:$localize`List complete!`,Delete_Begin:$localize`Starting delete …`,Delete_Download:$localize`Downloading files …`,Delete_Process:$localize`Processing files …`,Delete_Complete:$localize`Delete complete!`,Compact_Begin:$localize`Starting compact …`,Compact_Download:$localize`Downloading files …`,Compact_Process:$localize`Processing files …`,Compact_Complete:$localize`Compact complete!`,Restore_DownloadingRemoteFiles:$localize`Downloading files …`,Restore_PostRestoreVerify:$localize`Verifying restored files …`,Recreate_Running:$localize`Recreating database …`,Vacuum_Running:$localize`Vacuuming database …`,Repair_Running:$localize`Repairing database …`,Verify_Running:$localize`Verifying files …`,BugReport_Running:$localize`Creating bug report …`,Delete_Listing:$localize`Listing remote files …`,Delete_Deleting:$localize`Deleting remote files …`,PurgeFiles_Begin:$localize`Listing remote files for purge …`,PurgeFiles_Process:$localize`Purging files …`,PurgeFiles_Compact:$localize`Compacting remote data …`,PurgeFiles_Complete:$localize`Purging files complete!`,ReadLockInfo_Running:$localize`Reading lock info …`,Error:$localize`Error!`};var b=class p{#i=a(_);#t=a($);#o=a(F);#e=a(B);#c=a(z);#g=a(R);#l=g(!1);#s=g(null);statusData=this.#s.asReadonly();lastState=null;serverState=c(()=>{let e=this.#e.serverState();return e?(e.ProposedSchedule=e.ProposedSchedule?.map(i=>r(n({},i),{backup:i.Item1?this.#o.getBackupById(i.Item1):null}))??null,this.lastState=e,e):this.lastState});hasProgressOnWebsocket=c(()=>this.#g.hasProgressSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");clientIsRunning=c(()=>this.serverState()?.ProgramState==="Running");runningBackupId=c(()=>{let e=this.statusData();return!!(this.serverState()?.ActiveTask&&e?.task?.Status&&e?.task?.Status!=="Completed")?e?.BackupID??null:null});isResuming=g(!1);isFetching=this.#l.asReadonly();connectionStatus=this.#e.connectionStatus;pollingInterval;#m=d(()=>{let e=this.#e.serverState();e?.ActiveTask||this.#o.getBackups(!0),this.hasProgressOnWebsocket()&&(this.#e.subscribe("progress"),this.#e.subscribe("taskqueue")),e?.ActiveTask&&this.pollingInterval===void 0?this.startPollingProgress():e?.ActiveTask||this.stopPollingProgress()});#h=d(()=>{let e=this.#e.progressState(),i=this.#e.taskQueueState();if(e){let t=i?.find(o=>o.ID===e.TaskID)??null;this.#r(r(n({},e),{task:t}))}});setConnectionMethod(e){this.#e.setConnectionMethod(e)}startPollingProgress(){this.hasProgressOnWebsocket()?this.#e.subscribe("progress"):this.pollingInterval=setInterval(()=>{this.#n()},1e3)}stopPollingProgress(){clearInterval(this.pollingInterval)}fetchProgressState(){this.#n()}pauseResume(){return this.isResuming.set(!0),this.#t.postApiV1ServerstateResume().pipe(f(()=>this.isResuming.set(!1)))}resumeDialogCheck(e){if(!this.clientIsRunning()){this.#c.open(C,{data:{title:$localize`Server paused`,message:$localize`Server is currently paused. Do you want to resume now?`,confirmText:$localize`Resume`,cancelText:$localize`No, I'll resume later`},closed:i=>{i&&this.pauseResume().subscribe({next:()=>{e()}})}});return}e()}#n(){this.#l.set(!0),this.#t.getApiV1Progressstate().pipe(S(e=>{let i=e.TaskID??null;return i===null?h(e):this.#t.getApiV1TaskByTaskid({taskid:i}).pipe(k(t=>r(n({},e),{task:t??null})))}),f(()=>this.#l.set(!1))).subscribe({next:e=>{this.#r(e),this.serverState()?.ActiveTask==null&&this.stopPollingProgress()},error:e=>{e.status===404&&this.stopPollingProgress()}})}#r(e){let i=e.TaskID??null,t=e.BackupID??null;i!==null&&t!==null&&(e.backup=this.#o.getBackupById(t)),this.#s.set(r(n({},e),{progress:this.#p(e),statusText:this.#d(e),fileStatusText:this.#u(e),fileCountProgressText:this.#f(e),actionText:e.backup?.Backup?.Name??$localize`Running task`}))}#p(e){let i=-1;if(e.task&&e)if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=0;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,o=e.TotalFileCount-e.ProcessedFileCount,l=e.TotalFileSize-e.ProcessedFileSize-t;i=(e.ProcessedFileSize+t)/e.TotalFileSize,e.ProcessedFileCount===0?i=0:i>=.9&&(i=.9)}else e.Phase==="Backup_Finalize"||e.Phase==="Backup_WaitForUpload"?i=.9:e.Phase==="Backup_Delete"||e.Phase==="Backup_Compact"?i=.95:e.Phase==="Backup_VerificationUpload"||e.Phase==="Backup_PostBackupVerify"?i=.98:e.Phase==="Backup_Complete"?i=1:e.Phase==="Backup_RemoteSynchronization"?i=e.OverallProgress>0?e.OverallProgress:0:e.OverallProgress>0&&(i=e.OverallProgress);return i}#a(e){let i=(e.ActiveTransfers??[]).map(o=>o.BackendSpeed).reduce((o,l)=>(o??0)+(l??0),0)??-1,t=i<=0?e.BackendSpeed:i;return(t??-1)<0?"":` at ${this.#i.transform(t)}/s`}#u(e){let i=(["Backup_WaitForUpload","Backup_ProcessingFiles"].includes(e.Phase)?e?.BackendFileProgress:e.CurrentFileoffset)??0,t=(["Backup_WaitForUpload","Backup_ProcessingFiles"].includes(e.Phase)?e?.BackendFileSize:e.CurrentFilesize)??0;if(!e.CurrentFilename)return"";let o=e.CurrentFilename.length>42?"..."+e.CurrentFilename.slice(-42):e.CurrentFilename,l=(i/t*100).toFixed(1);return $localize`${o} | File processed: ${this.#i.transform(i)}/${this.#i.transform(t)} - ${l}%`}#f(e){return $localize`Files processed ${e.ProcessedFileCount}/${e.TotalFileCount}`}#d(e){let i="Running \u2026";if(e.task&&e){if(i=e.Phase?m[e.Phase]??e.Phase:"Running \u2026",e.TotalFileCount===0)return i;if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=`Counting (${e.TotalFileCount} files found, ${this.#i.transform(e.TotalFileSize)})`;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,o=e.TotalFileCount-e.ProcessedFileCount,l=e.TotalFileSize-e.ProcessedFileSize-t,u=e.Phase==="Restore_DownloadingRemoteFiles"?"Restoring: ":"",s=this.#a(e);e.Phase==="Backup_ProcessingFiles"&&o===0?i=`Completing upload ${s}`:e.BackendIsBlocking??!1?i=`Waiting for transfers ${s}`:i=`${u}${o} files (${this.#i.transform(l)}) to go ${s}`}else if(e.Phase==="Backup_WaitForUpload"){let t=this.#a(e);t!==""&&(i=`Waiting for upload to finish ${t}`)}else if(e.Phase==="Backup_RemoteSynchronization"){let t=e.RemoteSyncDestinationCount??0,o=e.RemoteSyncDestinationIndex??0,l=t>1?` (${o}/${t})`:"";if(e.TotalFileCount>0){let u=e.TotalFileCount-e.ProcessedFileCount,s=e.TotalFileSize-e.ProcessedFileSize,D=this.#a(e);i=`Synchronizing secondary destination${l}: ${u} files (${this.#i.transform(s)}) to go ${D}`}else l&&(i=`${m[e.Phase]}`.replace("\u2026",`${l} \u2026`))}}return i}static \u0275fac=function(i){return new(i||p)};static \u0275prov=P({token:p,factory:p.\u0275fac,providedIn:"root"})};export{m as a,b};
@@ -1 +1 @@
1
- import{e as P}from"./chunk-PDZNQW6F.js";import{B as E}from"./chunk-CJKZ27FM.js";import"./chunk-KNSQLQC6.js";import{e as T}from"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as u,Eb as i,Fb as a,Hb as r,Ib as l,Jb as c,Ta as C,Wb as d,bc as h,cc as m,hb as g,oc as b,xb as f,yb as O}from"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";var S=["*",[["","footer",""]]],L=["*","[footer]"],s=class t{static \u0275fac=function(e){return new(e||t)};static \u0275cmp=g({type:t,selectors:[["app-custom-card"]],ngContentSelectors:L,decls:11,vars:0,consts:[[1,"card"],["src","/assets/noise/auth-noise.svg",1,"noise"],[1,"header-title"],["src","/assets/duplicati/duplicati.svg","alt",""],[1,"bg"]],template:function(e,o){e&1&&(h(S),r(0,"div",0),c(1,"img",1),r(2,"header")(3,"div",2),c(4,"img",3),b(5," Duplicati "),l()(),r(6,"main"),m(7),r(8,"footer"),m(9,1),l()()(),c(10,"div",4))},styles:['[_nghost-%COMP%]{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center;background-color:var(--base-2)}body.dark [_nghost-%COMP%] .card[_ngcontent-%COMP%]:before{background:radial-gradient(rgba(var(--primary-rgb-900),1),#0000 60%)}.card[_ngcontent-%COMP%]{max-width:30rem;width:100%;position:relative;z-index:100;background-color:var(--base-1);border-radius:var(--shape-5);box-shadow:var(--box-shadow-40);border:1px solid var(--base-3);overflow:hidden}.card[_ngcontent-%COMP%]:before{content:"";position:absolute;height:30rem;transform:translateY(-17.8125rem);left:0;right:0;z-index:-2;background:radial-gradient(rgb(from var(--primary-1) r g b/1),#0000 60%)}.card[_ngcontent-%COMP%] img.noise[_ngcontent-%COMP%]{position:absolute;height:30rem;width:100%;transform:translateY(-17.8125rem);left:0;right:0;z-index:-1;-webkit-mask-image:radial-gradient(#000,#0000 60%);mask-image:radial-gradient(#000,#0000 60%)}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 0;gap:.75rem;position:relative;z-index:10}.header-title[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;gap:.625rem}.header-title[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1.75rem;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3))}main[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:2rem;gap:2.5rem;position:relative;z-index:10}main[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{font:var(--paragraph-40);color:var(--base-9);text-align:center;text-wrap:balance}.bg[_ngcontent-%COMP%]{position:fixed;inset:0;width:100vw;height:100vh;background-image:url(/assets/backgrounds/base-bg.svg);background-size:cover;background-position:center;background-repeat:no-repeat}body.dark[_ngcontent-%COMP%] .bg[_ngcontent-%COMP%]{opacity:1}footer[_ngcontent-%COMP%]:empty{display:none}'],changeDetection:0})};function v(t,n){t&1&&(i(0,"h3"),d(1,0),a())}function N(t,n){t&1&&(i(0,"h3"),d(1,1),a(),i(2,"button",3),d(3,2),a())}var p=class t{#e=u(P);isLoggingOut=this.#e.isLoggingOut;ngOnInit(){this.#e.logout()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=g({type:t,selectors:[["app-logout"]],decls:3,vars:1,consts:()=>{let n;n=$localize`Logging out...`;let e;e=$localize`You have successfully logged out your being redirected to login page.`;let o;return o=$localize`Go to login page`,[n,e,o,["shButton","","routerLink","/",1,"raised","primary"]]},template:function(e,o){e&1&&(i(0,"app-custom-card"),f(1,v,2,0,"h3")(2,N,4,0),a()),e&2&&(C(),O(o.isLoggingOut()?1:2))},dependencies:[s,E,T],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{p as default};
1
+ import{e as P}from"./chunk-6RZVYDJF.js";import{B as E}from"./chunk-CJKZ27FM.js";import"./chunk-4V3AE4ZE.js";import{e as T}from"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as u,Eb as i,Fb as a,Hb as r,Ib as l,Jb as c,Ta as C,Wb as d,bc as h,cc as m,hb as g,oc as b,xb as f,yb as O}from"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";var S=["*",[["","footer",""]]],L=["*","[footer]"],s=class t{static \u0275fac=function(e){return new(e||t)};static \u0275cmp=g({type:t,selectors:[["app-custom-card"]],ngContentSelectors:L,decls:11,vars:0,consts:[[1,"card"],["src","/assets/noise/auth-noise.svg",1,"noise"],[1,"header-title"],["src","/assets/duplicati/duplicati.svg","alt",""],[1,"bg"]],template:function(e,o){e&1&&(h(S),r(0,"div",0),c(1,"img",1),r(2,"header")(3,"div",2),c(4,"img",3),b(5," Duplicati "),l()(),r(6,"main"),m(7),r(8,"footer"),m(9,1),l()()(),c(10,"div",4))},styles:['[_nghost-%COMP%]{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center;background-color:var(--base-2)}body.dark [_nghost-%COMP%] .card[_ngcontent-%COMP%]:before{background:radial-gradient(rgba(var(--primary-rgb-900),1),#0000 60%)}.card[_ngcontent-%COMP%]{max-width:30rem;width:100%;position:relative;z-index:100;background-color:var(--base-1);border-radius:var(--shape-5);box-shadow:var(--box-shadow-40);border:1px solid var(--base-3);overflow:hidden}.card[_ngcontent-%COMP%]:before{content:"";position:absolute;height:30rem;transform:translateY(-17.8125rem);left:0;right:0;z-index:-2;background:radial-gradient(rgb(from var(--primary-1) r g b/1),#0000 60%)}.card[_ngcontent-%COMP%] img.noise[_ngcontent-%COMP%]{position:absolute;height:30rem;width:100%;transform:translateY(-17.8125rem);left:0;right:0;z-index:-1;-webkit-mask-image:radial-gradient(#000,#0000 60%);mask-image:radial-gradient(#000,#0000 60%)}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 0;gap:.75rem;position:relative;z-index:10}.header-title[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;gap:.625rem}.header-title[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1.75rem;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3))}main[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:2rem;gap:2.5rem;position:relative;z-index:10}main[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{font:var(--paragraph-40);color:var(--base-9);text-align:center;text-wrap:balance}.bg[_ngcontent-%COMP%]{position:fixed;inset:0;width:100vw;height:100vh;background-image:url(/assets/backgrounds/base-bg.svg);background-size:cover;background-position:center;background-repeat:no-repeat}body.dark[_ngcontent-%COMP%] .bg[_ngcontent-%COMP%]{opacity:1}footer[_ngcontent-%COMP%]:empty{display:none}'],changeDetection:0})};function v(t,n){t&1&&(i(0,"h3"),d(1,0),a())}function N(t,n){t&1&&(i(0,"h3"),d(1,1),a(),i(2,"button",3),d(3,2),a())}var p=class t{#e=u(P);isLoggingOut=this.#e.isLoggingOut;ngOnInit(){this.#e.logout()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=g({type:t,selectors:[["app-logout"]],decls:3,vars:1,consts:()=>{let n;n=$localize`Logging out...`;let e;e=$localize`You have successfully logged out your being redirected to login page.`;let o;return o=$localize`Go to login page`,[n,e,o,["shButton","","routerLink","/",1,"raised","primary"]]},template:function(e,o){e&1&&(i(0,"app-custom-card"),f(1,v,2,0,"h3")(2,N,4,0),a()),e&2&&(C(),O(o.isLoggingOut()?1:2))},dependencies:[s,E,T],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{p as default};
@@ -1 +1 @@
1
- import{d}from"./chunk-KNSQLQC6.js";import{$ as r,G as n,Rc as s,W as o,qa as l,sa as g}from"./chunk-K5XGRFWJ.js";var u=[{value:"Disabled",label:$localize`Disabled`},{value:"Verbose",label:$localize`Verbose`},{value:"ExplicitOnly",label:$localize`Explicit only`},{value:"Profiling",label:$localize`Profiling`},{value:"Retry",label:$localize`Retry`},{value:"Information",label:$localize`Information`},{value:"DryRun",label:$localize`Dry run`},{value:"Warning",label:$localize`Warning`},{value:"Error",label:$localize`Error`}],v=class a{#l=r(d);#e=l([]);LOG_LEVELS=u;logLevel=l("Disabled");logLevelByLabel=s(()=>u.find(e=>e.value===this.logLevel())?.label);whenFilter=l(null);backupIdFilter=l(null);id=l(0);logs=s(()=>this.whenFilter()&&this.backupIdFilter()?this.#e().filter(e=>e.BackupID===this.backupIdFilter()&&new Date(e.When).getTime()>=this.whenFilter()&&e.BackupID===this.backupIdFilter()):this.#e());timerInterval;logsLoading=l(!1);isPolling=l(!1);pagination=l({offset:0,pagesize:100});logLevelEffect=g(()=>{this.isPolling()?(this.#e.set([]),this.id.set(0),queueMicrotask(()=>this.loadLogs()),this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=setInterval(()=>{this.loadLogs()},3e3)):this.clearPolling()});setWhenFilter(e){this.whenFilter.set(e)}setBackupIdFilter(e){this.backupIdFilter.set(e)}loadLogs(){this.logsLoading.set(!0),this.#l.getApiV1LogdataPoll({id:this.id(),level:this.logLevel(),pagesize:this.pagination().pagesize}).pipe(n(()=>this.logsLoading.set(!1))).subscribe({next:e=>{let i=e.reverse(),t=this.#i(i);t>0&&this.id.set(t),this.#e.set([...i,...this.#e()])}})}updateLogLevel(e){this.logLevel.set(e),e==="Disabled"&&this.clearPolling()}#i(e){return e.reduce((i,t)=>Math.max(i,t.ID),0)}destroy(){this.logLevel.set("Disabled"),this.clearPolling()}clearPolling(){this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=void 0}static \u0275fac=function(i){return new(i||a)};static \u0275prov=o({token:a,factory:a.\u0275fac,providedIn:"root"})};export{v as a};
1
+ import{d}from"./chunk-4V3AE4ZE.js";import{$ as r,G as n,Rc as s,W as o,qa as l,sa as g}from"./chunk-K5XGRFWJ.js";var u=[{value:"Disabled",label:$localize`Disabled`},{value:"Verbose",label:$localize`Verbose`},{value:"ExplicitOnly",label:$localize`Explicit only`},{value:"Profiling",label:$localize`Profiling`},{value:"Retry",label:$localize`Retry`},{value:"Information",label:$localize`Information`},{value:"DryRun",label:$localize`Dry run`},{value:"Warning",label:$localize`Warning`},{value:"Error",label:$localize`Error`}],v=class a{#l=r(d);#e=l([]);LOG_LEVELS=u;logLevel=l("Disabled");logLevelByLabel=s(()=>u.find(e=>e.value===this.logLevel())?.label);whenFilter=l(null);backupIdFilter=l(null);id=l(0);logs=s(()=>this.whenFilter()&&this.backupIdFilter()?this.#e().filter(e=>e.BackupID===this.backupIdFilter()&&new Date(e.When).getTime()>=this.whenFilter()&&e.BackupID===this.backupIdFilter()):this.#e());timerInterval;logsLoading=l(!1);isPolling=l(!1);pagination=l({offset:0,pagesize:100});logLevelEffect=g(()=>{this.isPolling()?(this.#e.set([]),this.id.set(0),queueMicrotask(()=>this.loadLogs()),this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=setInterval(()=>{this.loadLogs()},3e3)):this.clearPolling()});setWhenFilter(e){this.whenFilter.set(e)}setBackupIdFilter(e){this.backupIdFilter.set(e)}loadLogs(){this.logsLoading.set(!0),this.#l.getApiV1LogdataPoll({id:this.id(),level:this.logLevel(),pagesize:this.pagination().pagesize}).pipe(n(()=>this.logsLoading.set(!1))).subscribe({next:e=>{let i=e.reverse(),t=this.#i(i);t>0&&this.id.set(t),this.#e.set([...i,...this.#e()])}})}updateLogLevel(e){this.logLevel.set(e),e==="Disabled"&&this.clearPolling()}#i(e){return e.reduce((i,t)=>Math.max(i,t.ID),0)}destroy(){this.logLevel.set("Disabled"),this.clearPolling()}clearPolling(){this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=void 0}static \u0275fac=function(i){return new(i||a)};static \u0275prov=o({token:a,factory:a.\u0275fac,providedIn:"root"})};export{v as a};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-TGVKMKNV.js";import"./chunk-LNE7WQZG.js";import"./chunk-ZFV3MK5Y.js";import"./chunk-BPHX6VXP.js";import"./chunk-XWML36YQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-COEGVUM3.js";import"./chunk-UHSRAJTA.js";import"./chunk-KKUFO6NZ.js";import"./chunk-PEOYNJJM.js";import"./chunk-MWQHWJOA.js";import"./chunk-6RZVYDJF.js";import"./chunk-CJKZ27FM.js";import"./chunk-4V3AE4ZE.js";import"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";export{a as BackupProgressComponent};
@@ -0,0 +1 @@
1
+ import{a,b}from"./chunk-NNSH2MIZ.js";import"./chunk-AOPTGCDG.js";import"./chunk-AU25JBCN.js";import"./chunk-PNQ5BDQN.js";import"./chunk-DCBSWJWZ.js";import"./chunk-OVNIENWW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-COEGVUM3.js";import"./chunk-3GE3OWQF.js";import"./chunk-S5IJ4C5T.js";import"./chunk-2KD757N6.js";import"./chunk-KKUFO6NZ.js";import"./chunk-PEOYNJJM.js";import"./chunk-MWQHWJOA.js";import"./chunk-6RZVYDJF.js";import"./chunk-CJKZ27FM.js";import"./chunk-4V3AE4ZE.js";import"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";export{a as createRestoreOptionsForm,b as default};