@duplicati/ngclient 0.0.69 → 0.0.71

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 (81) hide show
  1. package/{chunk-ME7OGY7M.js → chunk-23B5YPI7.js} +1 -1
  2. package/{chunk-IZGVBNDM.js → chunk-36BW3HQ7.js} +1 -1
  3. package/{chunk-GZNEVVHC.js → chunk-36F7QFET.js} +1 -1
  4. package/chunk-3HBDM5MB.js +1 -0
  5. package/chunk-3JP7VYCB.js +1 -0
  6. package/{chunk-U2NGUTAO.js → chunk-3PWBJYXG.js} +1 -1
  7. package/{chunk-3CXGKNYN.js → chunk-4TAMR7KC.js} +1 -1
  8. package/{chunk-KMQU3ZBK.js → chunk-5LJPNDXN.js} +1 -1
  9. package/{chunk-H4ZYUOCD.js → chunk-6L2NUWJ4.js} +1 -1
  10. package/chunk-6PVIT55H.js +1 -0
  11. package/{chunk-M3TDZOXH.js → chunk-7DMP23AI.js} +1 -1
  12. package/{chunk-LREVYYY4.js → chunk-7DREMJ5Y.js} +1 -1
  13. package/chunk-AMAV7ILZ.js +1 -0
  14. package/{chunk-BSZZLSIX.js → chunk-AUVXHFRE.js} +1 -1
  15. package/{chunk-DOUFB6IZ.js → chunk-BTVE465Y.js} +1 -1
  16. package/chunk-BXR7Y6IT.js +1 -0
  17. package/{chunk-M27H5SJL.js → chunk-CGRSLVMY.js} +1 -1
  18. package/{chunk-CO7Y3BIG.js → chunk-CRJYNI4C.js} +1 -1
  19. package/chunk-CVXQ5N2E.js +1 -0
  20. package/{chunk-GRR3LTVK.js → chunk-D4IXAB67.js} +1 -1
  21. package/{chunk-ZTSITRHY.js → chunk-D64J3G73.js} +1 -1
  22. package/{chunk-GE3T3AG3.js → chunk-DGDWETHE.js} +1 -1
  23. package/chunk-DWP7VODJ.js +1 -0
  24. package/{chunk-CM2VLNFJ.js → chunk-EQ7SGBND.js} +1 -1
  25. package/{chunk-PIVMNQL6.js → chunk-EQGWBFEW.js} +1 -1
  26. package/{chunk-KBC4N47O.js → chunk-ETSKNH5A.js} +1 -1
  27. package/{chunk-CLWDOASW.js → chunk-FOOQLIND.js} +1 -1
  28. package/chunk-G6DEVOXB.js +1 -0
  29. package/{chunk-NJSJNACP.js → chunk-GKTIIZ72.js} +1 -1
  30. package/{chunk-O2MZ5CAQ.js → chunk-GOCS43XM.js} +1 -1
  31. package/{chunk-B6UDSTOM.js → chunk-HUO7ZRYL.js} +1 -1
  32. package/{chunk-7YT4Y7C3.js → chunk-IAP5TJ3R.js} +1 -1
  33. package/{chunk-IHYJHBCC.js → chunk-JBUDJVPQ.js} +1 -1
  34. package/{chunk-VRLSXAI3.js → chunk-JYGPM2H4.js} +1 -1
  35. package/chunk-KULPV2R6.js +1 -0
  36. package/{chunk-KYCK75MH.js → chunk-L6P5W22A.js} +1 -1
  37. package/{chunk-2HC23GJF.js → chunk-LD6OVCQQ.js} +1 -1
  38. package/chunk-LH5KGH4I.js +1 -0
  39. package/{chunk-OIRMDOOF.js → chunk-LLZCURV6.js} +1 -1
  40. package/{chunk-PD4M6YP7.js → chunk-MSZ6S4MV.js} +1 -1
  41. package/chunk-PCX4N4NW.js +1 -0
  42. package/{chunk-OROSSCXB.js → chunk-PHVHG2MW.js} +1 -1
  43. package/{chunk-FC7IHW5V.js → chunk-PV7MTP6N.js} +1 -1
  44. package/{chunk-MSK2MH2K.js → chunk-R2RIU25S.js} +1 -1
  45. package/{chunk-T5I4AY74.js → chunk-RACRCDGZ.js} +1 -1
  46. package/{chunk-ICAVTIBO.js → chunk-RIBFT4EC.js} +1 -1
  47. package/{chunk-L5E5U6M6.js → chunk-RJNJ6YSP.js} +1 -1
  48. package/{chunk-TSQCXGD7.js → chunk-SRYAKXQ4.js} +1 -1
  49. package/{chunk-VX3YYMRB.js → chunk-T74PBQWH.js} +1 -1
  50. package/{chunk-3ENWJFPQ.js → chunk-VO6WZ2FC.js} +1 -1
  51. package/{chunk-N3GBABZB.js → chunk-W2IUXLYE.js} +1 -1
  52. package/chunk-W5XUYWNW.js +1 -0
  53. package/chunk-WRCHPMPK.js +1 -0
  54. package/{chunk-F7726SNN.js → chunk-WZU5GEIZ.js} +1 -1
  55. package/{chunk-N7TLL5YI.js → chunk-XPKNYX4D.js} +1 -1
  56. package/{chunk-BUARZS4A.js → chunk-XVYQD36R.js} +1 -1
  57. package/{chunk-HARDXXQK.js → chunk-YVJTTACQ.js} +1 -1
  58. package/{chunk-3LFQ2CMA.js → chunk-Z4N6RKX7.js} +1 -1
  59. package/{chunk-O53NVQ2A.js → chunk-ZLU2WKOF.js} +1 -1
  60. package/{chunk-J76HBC5J.js → chunk-ZTEWFJB7.js} +1 -1
  61. package/{chunk-INMFVRL6.js → chunk-ZU4O6G7N.js} +1 -1
  62. package/chunk-ZUSCSJMD.js +1 -0
  63. package/chunk-ZYQXWAMY.js +7 -0
  64. package/index.html +1 -1
  65. package/{main-ZA53CUZQ.js → main-YB2PGXE3.js} +1 -1
  66. package/package.json +1 -1
  67. package/chunk-34MR2IQN.js +0 -1
  68. package/chunk-5NMYYKKU.js +0 -1
  69. package/chunk-76QDT3DT.js +0 -1
  70. package/chunk-B6F7BTCY.js +0 -1
  71. package/chunk-BA7KFJXF.js +0 -1
  72. package/chunk-G2NEYTH2.js +0 -1
  73. package/chunk-HVNIDQ3I.js +0 -1
  74. package/chunk-K6NJFA6G.js +0 -1
  75. package/chunk-LULH26OZ.js +0 -1
  76. package/chunk-OTS7WJON.js +0 -1
  77. package/chunk-PU2Q3GL6.js +0 -1
  78. package/chunk-VGQ6X3AL.js +0 -7
  79. package/chunk-VTEOBYNY.js +0 -1
  80. package/chunk-XA2AVFI2.js +0 -1
  81. package/chunk-YJYS7OZI.js +0 -1
@@ -1,3 +1,3 @@
1
- import{o as U}from"./chunk-CO7Y3BIG.js";import{a as Ve}from"./chunk-5NMYYKKU.js";import{a as Le}from"./chunk-B6UDSTOM.js";import"./chunk-DNHLTHLR.js";import{b as R}from"./chunk-N3GBABZB.js";import"./chunk-PD4M6YP7.js";import"./chunk-KYCK75MH.js";import{a as ve}from"./chunk-VRLSXAI3.js";import"./chunk-IZGVBNDM.js";import"./chunk-BSZZLSIX.js";import"./chunk-OIRMDOOF.js";import"./chunk-GE3T3AG3.js";import{a as se,b as de,d as ce,e as ue,h as Ce,i as fe,k as Fe,l as ge,m as Ne,o as Te,p as Se,r as ke}from"./chunk-OROSSCXB.js";import"./chunk-T5I4AY74.js";import{a as pe,b as _e}from"./chunk-O2MZ5CAQ.js";import{a as le,c as re,d as me}from"./chunk-J76HBC5J.js";import"./chunk-MSK2MH2K.js";import{a as Ee,g as Me,i as xe,k as De,l as Ie,n as Oe,o as Ae,q as $e,r as Pe,w as ye,x as we}from"./chunk-ZTSITRHY.js";import"./chunk-NJSJNACP.js";import{ia as ae}from"./chunk-BUARZS4A.js";import"./chunk-O53NVQ2A.js";import{Ab as k,Bb as E,Cb as l,Db as o,Eb as s,Fb as $,Gb as P,Hb as Z,Ib as I,Mc as oe,Ob as y,Pb as w,Qb as M,Ra as a,Rb as B,Sb as G,Tb as J,Ub as O,Vb as m,Ya as h,Yb as N,Zb as Q,_ as A,_b as d,eb as j,fa as x,ga as D,gc as Y,hc as r,ic as v,jc as g,kb as u,qc as ee,sc as te,tb as p,tc as ne,vb as W,yb as C,yc as ie,zb as S}from"./chunk-VGQ6X3AL.js";import"./chunk-C6Q5SG76.js";var be=(n,i)=>({index:n,formView:i,formGroupName:"advancedOptions",destinationType:null,oauthField:null}),he=n=>({$implicit:n});function Be(n,i){n&1&&s(0,"spk-progress-bar",16)}function Ge(n,i){if(n&1&&(l(0,"spk-option",20),r(1),o()),n&2){let e=i.$implicit;p("value",e),a(),v(e)}}function Re(n,i){if(n&1&&(l(0,"spk-form-field"),s(1,"input",43),o()),n&2){let e=i.$implicit,t=i.$index;a(),Q("id","filter-",t,""),p("formControl",e)}}function Ue(n,i){if(n&1&&(l(0,"spk-option",20),r(1),o()),n&2){let e=i.$implicit;p("value",e),a(),v(e)}}function Ke(n,i){if(n&1){let e=I();y(0,12,1),l(1,"button",44,1),O("click",function(){let _=x(e).$implicit,f=m(2);return D(f.addNewOption(_))}),o(),w()}if(n&2){let e=i.$implicit;a(),B(e.name),G(0)}}function ze(n,i){n&1&&Z(0)}function Xe(n,i){if(n&1&&u(0,ze,1,0,"ng-container",45),n&2){let e=i.$implicit,t=i.$index;m();let _=Y(58);p("ngTemplateOutlet",_)("ngTemplateOutletContext",te(5,he,ne(2,be,t,e)))}}function qe(n,i){if(n&1&&(l(0,"spk-tooltip",55)(1,"spk-icon"),r(2,"question"),o()()),n&2){let e=m(2).$implicit;p("message",e.formView.longDescription)}}function He(n,i){if(n&1&&(l(0,"app-file-tree",48)(1,"label",54),r(2),u(3,qe,3,1,"spk-tooltip",55),o(),s(4,"input",56),o()),n&2){let e,t=m().$implicit,_=m(2);p("startingPath",_.getFormFieldValue(0,t.formGroupName,t.formView.name))("accepts",t.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),a(),d("for","destination-",t.formGroupName,"-",t.index,""),a(),g(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),a(),C(t.formView.longDescription?3:-1),a(),d("id","destination-",t.formGroupName,"-",t.index,""),N("formControlName",t.formView.name)}}function je(n,i){if(n&1&&(l(0,"spk-tooltip",55)(1,"spk-icon"),r(2,"question"),o()()),n&2){let e=m(2).$implicit;p("message",e.formView.longDescription)}}function We(n,i){if(n&1&&(l(0,"app-file-tree",49)(1,"label",54),r(2),u(3,je,3,1,"spk-tooltip",55),o(),s(4,"input",56),o()),n&2){let e,t=m().$implicit,_=m(2);p("startingPath",_.getFormFieldValue(0,t.formGroupName,t.formView.name)),a(),d("for","destination-",t.formGroupName,"-",t.index,""),a(),g(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),a(),C(t.formView.longDescription?3:-1),a(),d("id","destination-",t.formGroupName,"-",t.index,""),N("formControlName",t.formView.name)}}function Ze(n,i){if(n&1&&(l(0,"spk-tooltip",55)(1,"spk-icon"),r(2,"question"),o()()),n&2){let e=m(2).$implicit;p("message",e.formView.longDescription)}}function Je(n,i){n&1&&(l(0,"spk-icon",57),r(1,"link"),o())}function Qe(n,i){n&1&&(l(0,"spk-icon",57),r(1,"textbox"),o())}function Ye(n,i){if(n&1&&(l(0,"spk-form-field")(1,"label",54),r(2),u(3,Ze,3,1,"spk-tooltip",55),o(),s(4,"input",56),u(5,Je,2,0,"spk-icon",57)(6,Qe,2,0,"spk-icon",57),o()),n&2){let e,t=m().$implicit;a(),d("for","destination-",t.formGroupName,"-",t.index,""),a(),g(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),a(),C(t.formView.longDescription?3:-1),a(),d("id","destination-",t.formGroupName,"-",t.index,""),N("formControlName",t.formView.name),a(),C(t.formView.type==="Path"?5:6)}}function et(n,i){if(n&1){let e=I();l(0,"span",61),O("click",function(){x(e);let _=m(2).$implicit,f=m(2);return D(f.oauthStartTokenCreation(_.formViewType))}),r(1,"AuthID"),o()}}function tt(n,i){n&1&&(l(0,"spk-icon",57),r(1,"password"),o())}function nt(n,i){if(n&1){let e=I();l(0,"spk-icon",62),O("click",function(){x(e);let _=m(2).$implicit;return D(_.formView.showPassword=!_.formView.showPassword)}),r(1," eye "),o()}}function it(n,i){if(n&1){let e=I();l(0,"spk-icon",62),O("click",function(){x(e);let _=m(2).$implicit;return D(_.formView.showPassword=!_.formView.showPassword)}),r(1," eye-slash "),o()}}function ot(n,i){if(n&1&&(l(0,"spk-form-field")(1,"label",54),r(2),o(),s(3,"input",58),u(4,et,2,0,"span",59)(5,tt,2,0,"spk-icon",57)(6,nt,2,0,"spk-icon",60)(7,it,2,0,"spk-icon",60),o()),n&2){let e,t=m().$implicit;a(),d("for","destination-",t.formGroupName,"-",t.index,""),a(),g(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),a(),d("id","destination-",t.formGroupName,"-",t.index,""),N("formControlName",t.formView.name),p("type",t.formView.showPassword?"text":"password"),a(),C(t.oauthField===t.formView.name?4:5),a(2),C(t.formView.showPassword?6:7)}}function at(n,i){if(n&1&&(l(0,"spk-tooltip",55)(1,"spk-icon"),r(2,"question"),o()()),n&2){let e=m(2).$implicit;p("message",e.formView.longDescription)}}function lt(n,i){if(n&1&&(l(0,"spk-option",20),r(1),o()),n&2){let e=i.$implicit;p("value",e),a(),v(e)}}function rt(n,i){if(n&1&&(l(0,"spk-select")(1,"label",54),r(2),u(3,at,3,1,"spk-tooltip",55),o(),s(4,"input",63),k(5,lt,2,2,"spk-option",20,S),o()),n&2){let e,t=m().$implicit;a(),d("for","destination-",t.formGroupName,"-",t.index,""),a(),g(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),a(),C(t.formView.longDescription?3:-1),a(),d("id","destination-",t.formGroupName,"-",t.index,""),N("formControlName",t.formView.name),a(),E(t.formView.options)}}function mt(n,i){if(n&1&&(l(0,"spk-tooltip",55)(1,"spk-icon"),r(2,"question"),o()()),n&2){let e=m(2).$implicit;p("message",e.formView.longDescription)}}function pt(n,i){if(n&1&&(l(0,"spk-option",20),r(1),o()),n&2){let e=i.$implicit;p("value",e),a(),v(e)}}function _t(n,i){if(n&1&&(l(0,"div",50)(1,"label",54),r(2),u(3,mt,3,1,"spk-tooltip",55),o(),l(4,"div",64)(5,"spk-form-field"),s(6,"input",65),l(7,"spk-icon",57),r(8,"resize"),o()(),l(9,"spk-select"),s(10,"label")(11,"input",66),k(12,pt,2,2,"spk-option",20,S),o()()()),n&2){let e,t=m().$implicit,_=m(2);p("formGroupName",t.formView.name),a(),d("for","destination-",t.formGroupName,"-",t.index,""),a(),g(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),a(),C(t.formView.longDescription?3:-1),a(3),d("id","destination-",t.formGroupName,"-",t.index,""),a(6),E(_.sizeOptions())}}function st(n,i){if(n&1&&(l(0,"spk-tooltip",55)(1,"spk-icon"),r(2,"question"),o()()),n&2){let e=m(2).$implicit;p("message",e.formView.longDescription)}}function dt(n,i){if(n&1&&(l(0,"spk-form-field")(1,"label",54),r(2),u(3,st,3,1,"spk-tooltip",55),o(),s(4,"input",67),l(5,"spk-icon",57),r(6,"numpad"),o()()),n&2){let e,t=m().$implicit;a(),d("for","destination-",t.formGroupName,"-",t.index,""),a(),g(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),a(),C(t.formView.longDescription?3:-1),a(),d("id","destination-",t.formGroupName,"-",t.index,""),N("formControlName",t.formView.name)}}function ct(n,i){if(n&1&&(l(0,"spk-tooltip",55)(1,"spk-icon"),r(2,"question"),o()()),n&2){let e=m(2).$implicit;p("message",e.formView.longDescription)}}function ut(n,i){if(n&1&&(l(0,"spk-toggle",51)(1,"label",54),r(2),u(3,ct,3,1,"spk-tooltip",55),o(),s(4,"input",68),o()),n&2){let e,t=m().$implicit;a(),d("for","destination-",t.formGroupName,"-",t.index,""),a(),g(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),a(),C(t.formView.longDescription?3:-1),a(),d("id","destination-",t.formGroupName,"-",t.index,""),N("formControlName",t.formView.name)}}function Ct(n,i){if(n&1&&(l(0,"spk-tooltip",55)(1,"spk-icon"),r(2,"question"),o()()),n&2){let e=m(2).$implicit;p("message",e.formView.longDescription)}}function ft(n,i){n&1&&(l(0,"spk-option",70),r(1,"None"),o()),n&2&&p("value","None")}function Ft(n,i){if(n&1&&(l(0,"spk-option",20),r(1),s(2,"spk-checkbox",71),o()),n&2){let e=m().$implicit;p("value",e),a(),g(" ",e," ")}}function gt(n,i){if(n&1&&u(0,ft,2,1,"spk-option",70)(1,Ft,3,2,"spk-option",20),n&2){let e=i.$implicit;C(e==="None"?0:1)}}function Nt(n,i){if(n&1&&(l(0,"spk-select",52)(1,"label",54),r(2),u(3,Ct,3,1,"spk-tooltip",55),o(),s(4,"input",69),k(5,gt,2,1,null,null,S),o()),n&2){let e,t=m().$implicit;p("selectMultiple",!0),a(),d("for","destination-",t.formGroupName,"-",t.index,""),a(),g(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),a(),C(t.formView.longDescription?3:-1),a(),N("formControlName",t.formView.name),a(),E(t.formView.options)}}function Tt(n,i){if(n&1&&(l(0,"spk-tooltip",55)(1,"spk-icon"),r(2,"question"),o()()),n&2){let e=m(2).$implicit;p("message",e.formView.longDescription)}}function St(n,i){if(n&1&&(l(0,"spk-form-field")(1,"label",54),r(2),u(3,Tt,3,1,"spk-tooltip",55),o(),s(4,"input",56),o()),n&2){let e,t=m().$implicit;a(),d("for","destination-",t.formGroupName,"-",t.index,""),a(),g(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),a(),C(t.formView.longDescription?3:-1),a(),d("id","destination-",t.formGroupName,"-",t.index,""),N("formControlName",t.formView.name)}}function kt(n,i){if(n&1){let e=I();l(0,"div",46),$(1,47),u(2,He,5,14,"app-file-tree",48)(3,We,5,10,"app-file-tree",49)(4,Ye,7,10,"spk-form-field")(5,ot,8,11,"spk-form-field")(6,rt,7,9,"spk-select")(7,_t,14,9,"div",50)(8,dt,7,9,"spk-form-field")(9,ut,5,9,"spk-toggle",51)(10,Nt,7,7,"spk-select",52)(11,St,5,9,"spk-form-field"),P(),l(12,"button",53),O("click",function(){let _=x(e).$implicit,f=m(2);return D(f.removeFormView(_.formView,0))}),l(13,"spk-icon"),r(14,"x-circle"),o()()()}if(n&2){let e=i.$implicit;a(),p("formGroupName",e.formGroupName),a(),C(e.formView.type==="FileTree"?2:e.formView.type==="FolderTree"?3:e.formView.type==="String"||e.formView.type==="Path"?4:e.formView.type==="Password"?5:e.formView.type==="Enumeration"?6:e.formView.type==="Size"?7:e.formView.type==="Integer"?8:e.formView.type==="Boolean"?9:e.formView.type==="Flags"?10:e.formView.type==="Timespan"?11:-1)}}function Et(n,i){if(n&1){let e=I();l(0,"form",17)(1,"spk-select")(2,"label",18),M(3,3),o(),s(4,"input",19),k(5,Ge,2,2,"spk-option",20,S),o(),l(7,"spk-form-field")(8,"label",21),M(9,4),o(),s(10,"textarea",22),o(),l(11,"spk-form-field")(12,"label",23),M(13,5),o(),s(14,"textarea",24),o()(),l(15,"spk-divider"),M(16,6),o(),l(17,"form",17)(18,"spk-form-field")(19,"label",25),M(20,7),o(),s(21,"input",26),o(),l(22,"spk-form-field")(23,"label",27),M(24,8),o(),s(25,"input",28),o(),l(26,"app-toggle-card",29),$(27,30),M(28,9),P(),$(29,31),k(30,Re,2,3,"spk-form-field",null,S),P(),o()(),l(32,"form",17)(33,"div",32)(34,"div",33)(35,"spk-form-field")(36,"label",34),M(37,10),o(),s(38,"input",35),o(),l(39,"spk-select"),s(40,"input",36),k(41,Ue,2,2,"spk-option",20,S),o()(),l(43,"p"),y(44,11),s(45,"a",37),w(),o()(),l(46,"app-toggle-card",29),$(47,30),y(48,12),l(49,"spk-menu")(50,"button",38),s(51,"spk-icon"),o(),$(52,39),k(53,Ke,3,1,"button",40,S),P(),o(),w(),P(),k(55,Xe,1,7,"ng-container",null,S),o(),u(57,kt,15,2,"ng-template",null,0,ie),l(59,"div",41)(60,"button",42),O("click",function(){x(e);let _=m();return D(_.submit())}),y(61,13),s(62,"spk-icon"),w(),o()()()}if(n&2){let e=m();p("formGroup",e.baseCmdForm),a(5),E(e.commandOptions()),a(12),p("formGroup",e.standardFields),a(9),p("disallowToggle",!0),a(4),E(e.standardFields.controls.filters.controls),a(2),p("formGroup",e.optionsForm),a(9),E(e.sizeOptions()),a(5),p("disallowToggle",!0),a(7),E(e.nonSelectedOptions()),a(2),E(e.selectedOptions()),a(5),W("loader",e.isSubmitting()),a(2),B(e.baseCmdForm.value.command),G(61)}}var T=new Se,Mt=["Bytes","KB","MB","GB","TB","PB"],K=class n{#e=A(U);#t=A(_e);#n=A(re);#i=A(le);#o=A(pe);#a=R(this.#i.params);commandOptions=R(this.#o.getApiV1Commandline());sizeOptions=h(Mt);isSubmitting=h(!1);standardFields=T.group({"backup-id":T.control(""),"backup-name":T.control(""),dbpath:T.control(""),filters:T.array([])});baseCmdForm=T.group({command:T.control("backup"),targetUrl:T.control(""),arguments:T.control("")});optionsForm=this.#e.optionsForm;selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;#l=oe(()=>{let i=this.#a()?.id;this.#e.backupId.set(i),this.getBackup(i)});getBackup(i){this.#t.getApiV1BackupById({id:i}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup)),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(i){this.standardFields.patchValue({dbpath:i.DBPath,"backup-id":i.ID,"backup-name":i.Name}),i.Filters&&i.Filters.length&&i.Filters.map(e=>{this.standardFields.controls.filters.push(T.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.isSubmitting.set(!0);let i=this.baseCmdForm.value,e=this.optionsForm.value,t=i.targetUrl??"",_=i.arguments?.split(`
1
+ import{o as U}from"./chunk-CRJYNI4C.js";import{a as Ve}from"./chunk-G6DEVOXB.js";import{a as Le}from"./chunk-HUO7ZRYL.js";import"./chunk-DNHLTHLR.js";import{b as R}from"./chunk-W2IUXLYE.js";import"./chunk-MSZ6S4MV.js";import"./chunk-L6P5W22A.js";import{a as ve}from"./chunk-JYGPM2H4.js";import"./chunk-36BW3HQ7.js";import"./chunk-AUVXHFRE.js";import"./chunk-LLZCURV6.js";import"./chunk-DGDWETHE.js";import{a as se,b as de,d as ce,e as ue,h as Ce,i as fe,k as Fe,l as ge,m as Ne,o as Te,p as Se,r as ke}from"./chunk-PHVHG2MW.js";import"./chunk-RACRCDGZ.js";import{a as pe,b as _e}from"./chunk-GOCS43XM.js";import{a as le,c as re,d as me}from"./chunk-ZTEWFJB7.js";import"./chunk-R2RIU25S.js";import{a as Ee,g as Me,i as xe,k as De,l as Ie,n as Oe,o as Ae,q as $e,r as Pe,w as ye,x as we}from"./chunk-D64J3G73.js";import"./chunk-GKTIIZ72.js";import{ia as ae}from"./chunk-XVYQD36R.js";import"./chunk-ZLU2WKOF.js";import{Ab as k,Ac as ie,Bb as E,Cb as l,Db as o,Eb as s,Fb as $,Gb as P,Hb as Z,Ib as I,Ob as y,Oc as oe,Pb as w,Qb as M,Ra as a,Rb as B,Sb as G,Tb as J,Ub as O,Vb as m,Ya as h,Yb as N,Zb as Q,_ as A,_b as d,eb as j,fa as x,ga as D,gc as Y,hc as r,ic as v,jc as g,kb as u,sc as ee,tb as p,uc as te,vb as W,vc as ne,yb as C,zb as S}from"./chunk-ZYQXWAMY.js";import"./chunk-C6Q5SG76.js";var be=(n,i)=>({index:n,formView:i,formGroupName:"advancedOptions",destinationType:null,oauthField:null}),he=n=>({$implicit:n});function Be(n,i){n&1&&s(0,"spk-progress-bar",16)}function Ge(n,i){if(n&1&&(l(0,"spk-option",20),r(1),o()),n&2){let e=i.$implicit;p("value",e),a(),v(e)}}function Re(n,i){if(n&1&&(l(0,"spk-form-field"),s(1,"input",43),o()),n&2){let e=i.$implicit,t=i.$index;a(),Q("id","filter-",t,""),p("formControl",e)}}function Ue(n,i){if(n&1&&(l(0,"spk-option",20),r(1),o()),n&2){let e=i.$implicit;p("value",e),a(),v(e)}}function Ke(n,i){if(n&1){let e=I();y(0,12,1),l(1,"button",44,1),O("click",function(){let _=x(e).$implicit,f=m(2);return D(f.addNewOption(_))}),o(),w()}if(n&2){let e=i.$implicit;a(),B(e.name),G(0)}}function ze(n,i){n&1&&Z(0)}function Xe(n,i){if(n&1&&u(0,ze,1,0,"ng-container",45),n&2){let e=i.$implicit,t=i.$index;m();let _=Y(58);p("ngTemplateOutlet",_)("ngTemplateOutletContext",te(5,he,ne(2,be,t,e)))}}function qe(n,i){if(n&1&&(l(0,"spk-tooltip",55)(1,"spk-icon"),r(2,"question"),o()()),n&2){let e=m(2).$implicit;p("message",e.formView.longDescription)}}function He(n,i){if(n&1&&(l(0,"app-file-tree",48)(1,"label",54),r(2),u(3,qe,3,1,"spk-tooltip",55),o(),s(4,"input",56),o()),n&2){let e,t=m().$implicit,_=m(2);p("startingPath",_.getFormFieldValue(0,t.formGroupName,t.formView.name))("accepts",t.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),a(),d("for","destination-",t.formGroupName,"-",t.index,""),a(),g(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),a(),C(t.formView.longDescription?3:-1),a(),d("id","destination-",t.formGroupName,"-",t.index,""),N("formControlName",t.formView.name)}}function je(n,i){if(n&1&&(l(0,"spk-tooltip",55)(1,"spk-icon"),r(2,"question"),o()()),n&2){let e=m(2).$implicit;p("message",e.formView.longDescription)}}function We(n,i){if(n&1&&(l(0,"app-file-tree",49)(1,"label",54),r(2),u(3,je,3,1,"spk-tooltip",55),o(),s(4,"input",56),o()),n&2){let e,t=m().$implicit,_=m(2);p("startingPath",_.getFormFieldValue(0,t.formGroupName,t.formView.name)),a(),d("for","destination-",t.formGroupName,"-",t.index,""),a(),g(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),a(),C(t.formView.longDescription?3:-1),a(),d("id","destination-",t.formGroupName,"-",t.index,""),N("formControlName",t.formView.name)}}function Ze(n,i){if(n&1&&(l(0,"spk-tooltip",55)(1,"spk-icon"),r(2,"question"),o()()),n&2){let e=m(2).$implicit;p("message",e.formView.longDescription)}}function Je(n,i){n&1&&(l(0,"spk-icon",57),r(1,"link"),o())}function Qe(n,i){n&1&&(l(0,"spk-icon",57),r(1,"textbox"),o())}function Ye(n,i){if(n&1&&(l(0,"spk-form-field")(1,"label",54),r(2),u(3,Ze,3,1,"spk-tooltip",55),o(),s(4,"input",56),u(5,Je,2,0,"spk-icon",57)(6,Qe,2,0,"spk-icon",57),o()),n&2){let e,t=m().$implicit;a(),d("for","destination-",t.formGroupName,"-",t.index,""),a(),g(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),a(),C(t.formView.longDescription?3:-1),a(),d("id","destination-",t.formGroupName,"-",t.index,""),N("formControlName",t.formView.name),a(),C(t.formView.type==="Path"?5:6)}}function et(n,i){if(n&1){let e=I();l(0,"span",61),O("click",function(){x(e);let _=m(2).$implicit,f=m(2);return D(f.oauthStartTokenCreation(_.formViewType))}),r(1,"AuthID"),o()}}function tt(n,i){n&1&&(l(0,"spk-icon",57),r(1,"password"),o())}function nt(n,i){if(n&1){let e=I();l(0,"spk-icon",62),O("click",function(){x(e);let _=m(2).$implicit;return D(_.formView.showPassword=!_.formView.showPassword)}),r(1," eye "),o()}}function it(n,i){if(n&1){let e=I();l(0,"spk-icon",62),O("click",function(){x(e);let _=m(2).$implicit;return D(_.formView.showPassword=!_.formView.showPassword)}),r(1," eye-slash "),o()}}function ot(n,i){if(n&1&&(l(0,"spk-form-field")(1,"label",54),r(2),o(),s(3,"input",58),u(4,et,2,0,"span",59)(5,tt,2,0,"spk-icon",57)(6,nt,2,0,"spk-icon",60)(7,it,2,0,"spk-icon",60),o()),n&2){let e,t=m().$implicit;a(),d("for","destination-",t.formGroupName,"-",t.index,""),a(),g(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),a(),d("id","destination-",t.formGroupName,"-",t.index,""),N("formControlName",t.formView.name),p("type",t.formView.showPassword?"text":"password"),a(),C(t.oauthField===t.formView.name?4:5),a(2),C(t.formView.showPassword?6:7)}}function at(n,i){if(n&1&&(l(0,"spk-tooltip",55)(1,"spk-icon"),r(2,"question"),o()()),n&2){let e=m(2).$implicit;p("message",e.formView.longDescription)}}function lt(n,i){if(n&1&&(l(0,"spk-option",20),r(1),o()),n&2){let e=i.$implicit;p("value",e),a(),v(e)}}function rt(n,i){if(n&1&&(l(0,"spk-select")(1,"label",54),r(2),u(3,at,3,1,"spk-tooltip",55),o(),s(4,"input",63),k(5,lt,2,2,"spk-option",20,S),o()),n&2){let e,t=m().$implicit;a(),d("for","destination-",t.formGroupName,"-",t.index,""),a(),g(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),a(),C(t.formView.longDescription?3:-1),a(),d("id","destination-",t.formGroupName,"-",t.index,""),N("formControlName",t.formView.name),a(),E(t.formView.options)}}function mt(n,i){if(n&1&&(l(0,"spk-tooltip",55)(1,"spk-icon"),r(2,"question"),o()()),n&2){let e=m(2).$implicit;p("message",e.formView.longDescription)}}function pt(n,i){if(n&1&&(l(0,"spk-option",20),r(1),o()),n&2){let e=i.$implicit;p("value",e),a(),v(e)}}function _t(n,i){if(n&1&&(l(0,"div",50)(1,"label",54),r(2),u(3,mt,3,1,"spk-tooltip",55),o(),l(4,"div",64)(5,"spk-form-field"),s(6,"input",65),l(7,"spk-icon",57),r(8,"resize"),o()(),l(9,"spk-select"),s(10,"label")(11,"input",66),k(12,pt,2,2,"spk-option",20,S),o()()()),n&2){let e,t=m().$implicit,_=m(2);p("formGroupName",t.formView.name),a(),d("for","destination-",t.formGroupName,"-",t.index,""),a(),g(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),a(),C(t.formView.longDescription?3:-1),a(3),d("id","destination-",t.formGroupName,"-",t.index,""),a(6),E(_.sizeOptions())}}function st(n,i){if(n&1&&(l(0,"spk-tooltip",55)(1,"spk-icon"),r(2,"question"),o()()),n&2){let e=m(2).$implicit;p("message",e.formView.longDescription)}}function dt(n,i){if(n&1&&(l(0,"spk-form-field")(1,"label",54),r(2),u(3,st,3,1,"spk-tooltip",55),o(),s(4,"input",67),l(5,"spk-icon",57),r(6,"numpad"),o()()),n&2){let e,t=m().$implicit;a(),d("for","destination-",t.formGroupName,"-",t.index,""),a(),g(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),a(),C(t.formView.longDescription?3:-1),a(),d("id","destination-",t.formGroupName,"-",t.index,""),N("formControlName",t.formView.name)}}function ct(n,i){if(n&1&&(l(0,"spk-tooltip",55)(1,"spk-icon"),r(2,"question"),o()()),n&2){let e=m(2).$implicit;p("message",e.formView.longDescription)}}function ut(n,i){if(n&1&&(l(0,"spk-toggle",51)(1,"label",54),r(2),u(3,ct,3,1,"spk-tooltip",55),o(),s(4,"input",68),o()),n&2){let e,t=m().$implicit;a(),d("for","destination-",t.formGroupName,"-",t.index,""),a(),g(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),a(),C(t.formView.longDescription?3:-1),a(),d("id","destination-",t.formGroupName,"-",t.index,""),N("formControlName",t.formView.name)}}function Ct(n,i){if(n&1&&(l(0,"spk-tooltip",55)(1,"spk-icon"),r(2,"question"),o()()),n&2){let e=m(2).$implicit;p("message",e.formView.longDescription)}}function ft(n,i){n&1&&(l(0,"spk-option",70),r(1,"None"),o()),n&2&&p("value","None")}function Ft(n,i){if(n&1&&(l(0,"spk-option",20),r(1),s(2,"spk-checkbox",71),o()),n&2){let e=m().$implicit;p("value",e),a(),g(" ",e," ")}}function gt(n,i){if(n&1&&u(0,ft,2,1,"spk-option",70)(1,Ft,3,2,"spk-option",20),n&2){let e=i.$implicit;C(e==="None"?0:1)}}function Nt(n,i){if(n&1&&(l(0,"spk-select",52)(1,"label",54),r(2),u(3,Ct,3,1,"spk-tooltip",55),o(),s(4,"input",69),k(5,gt,2,1,null,null,S),o()),n&2){let e,t=m().$implicit;p("selectMultiple",!0),a(),d("for","destination-",t.formGroupName,"-",t.index,""),a(),g(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),a(),C(t.formView.longDescription?3:-1),a(),N("formControlName",t.formView.name),a(),E(t.formView.options)}}function Tt(n,i){if(n&1&&(l(0,"spk-tooltip",55)(1,"spk-icon"),r(2,"question"),o()()),n&2){let e=m(2).$implicit;p("message",e.formView.longDescription)}}function St(n,i){if(n&1&&(l(0,"spk-form-field")(1,"label",54),r(2),u(3,Tt,3,1,"spk-tooltip",55),o(),s(4,"input",56),o()),n&2){let e,t=m().$implicit;a(),d("for","destination-",t.formGroupName,"-",t.index,""),a(),g(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),a(),C(t.formView.longDescription?3:-1),a(),d("id","destination-",t.formGroupName,"-",t.index,""),N("formControlName",t.formView.name)}}function kt(n,i){if(n&1){let e=I();l(0,"div",46),$(1,47),u(2,He,5,14,"app-file-tree",48)(3,We,5,10,"app-file-tree",49)(4,Ye,7,10,"spk-form-field")(5,ot,8,11,"spk-form-field")(6,rt,7,9,"spk-select")(7,_t,14,9,"div",50)(8,dt,7,9,"spk-form-field")(9,ut,5,9,"spk-toggle",51)(10,Nt,7,7,"spk-select",52)(11,St,5,9,"spk-form-field"),P(),l(12,"button",53),O("click",function(){let _=x(e).$implicit,f=m(2);return D(f.removeFormView(_.formView,0))}),l(13,"spk-icon"),r(14,"x-circle"),o()()()}if(n&2){let e=i.$implicit;a(),p("formGroupName",e.formGroupName),a(),C(e.formView.type==="FileTree"?2:e.formView.type==="FolderTree"?3:e.formView.type==="String"||e.formView.type==="Path"?4:e.formView.type==="Password"?5:e.formView.type==="Enumeration"?6:e.formView.type==="Size"?7:e.formView.type==="Integer"?8:e.formView.type==="Boolean"?9:e.formView.type==="Flags"?10:e.formView.type==="Timespan"?11:-1)}}function Et(n,i){if(n&1){let e=I();l(0,"form",17)(1,"spk-select")(2,"label",18),M(3,3),o(),s(4,"input",19),k(5,Ge,2,2,"spk-option",20,S),o(),l(7,"spk-form-field")(8,"label",21),M(9,4),o(),s(10,"textarea",22),o(),l(11,"spk-form-field")(12,"label",23),M(13,5),o(),s(14,"textarea",24),o()(),l(15,"spk-divider"),M(16,6),o(),l(17,"form",17)(18,"spk-form-field")(19,"label",25),M(20,7),o(),s(21,"input",26),o(),l(22,"spk-form-field")(23,"label",27),M(24,8),o(),s(25,"input",28),o(),l(26,"app-toggle-card",29),$(27,30),M(28,9),P(),$(29,31),k(30,Re,2,3,"spk-form-field",null,S),P(),o()(),l(32,"form",17)(33,"div",32)(34,"div",33)(35,"spk-form-field")(36,"label",34),M(37,10),o(),s(38,"input",35),o(),l(39,"spk-select"),s(40,"input",36),k(41,Ue,2,2,"spk-option",20,S),o()(),l(43,"p"),y(44,11),s(45,"a",37),w(),o()(),l(46,"app-toggle-card",29),$(47,30),y(48,12),l(49,"spk-menu")(50,"button",38),s(51,"spk-icon"),o(),$(52,39),k(53,Ke,3,1,"button",40,S),P(),o(),w(),P(),k(55,Xe,1,7,"ng-container",null,S),o(),u(57,kt,15,2,"ng-template",null,0,ie),l(59,"div",41)(60,"button",42),O("click",function(){x(e);let _=m();return D(_.submit())}),y(61,13),s(62,"spk-icon"),w(),o()()()}if(n&2){let e=m();p("formGroup",e.baseCmdForm),a(5),E(e.commandOptions()),a(12),p("formGroup",e.standardFields),a(9),p("disallowToggle",!0),a(4),E(e.standardFields.controls.filters.controls),a(2),p("formGroup",e.optionsForm),a(9),E(e.sizeOptions()),a(5),p("disallowToggle",!0),a(7),E(e.nonSelectedOptions()),a(2),E(e.selectedOptions()),a(5),W("loader",e.isSubmitting()),a(2),B(e.baseCmdForm.value.command),G(61)}}var T=new Se,Mt=["Bytes","KB","MB","GB","TB","PB"],K=class n{#e=A(U);#t=A(_e);#n=A(re);#i=A(le);#o=A(pe);#a=R(this.#i.params);commandOptions=R(this.#o.getApiV1Commandline());sizeOptions=h(Mt);isSubmitting=h(!1);standardFields=T.group({"backup-id":T.control(""),"backup-name":T.control(""),dbpath:T.control(""),filters:T.array([])});baseCmdForm=T.group({command:T.control("backup"),targetUrl:T.control(""),arguments:T.control("")});optionsForm=this.#e.optionsForm;selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;#l=oe(()=>{let i=this.#a()?.id;this.#e.backupId.set(i),this.getBackup(i)});getBackup(i){this.#t.getApiV1BackupById({id:i}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup)),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(i){this.standardFields.patchValue({dbpath:i.DBPath,"backup-id":i.ID,"backup-name":i.Name}),i.Filters&&i.Filters.length&&i.Filters.map(e=>{this.standardFields.controls.filters.push(T.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.isSubmitting.set(!0);let i=this.baseCmdForm.value,e=this.optionsForm.value,t=i.targetUrl??"",_=i.arguments?.split(`
2
2
  `)??[],f=this.standardFields.value,V=f.filters??[],L=[i.command,t,..._,`--backup-name=${f["backup-name"]}`,`--dbpath=${f.dbpath}`,`--backup-id=${f["backup-id"]}`,...V.filter(c=>c).map(c=>c.startsWith("-")?`--exclude=${c?.slice(1)}`:`--include=${c}`),...this.#e.mapFormsToSettings().map(c=>c.Name.startsWith("--")?`${c.Name}=${c.Value}`:`--${c.Name}=${c.Value}`),"--disable-module=console-password-input"];this.#t.postApiV1Commandline({requestBody:L}).subscribe(c=>{c.Status==="OK"&&this.#n.navigate(["backup",this.backupId(),"commandline",c.ID])})}mapBaseCmdToForm(i){let e=i.TargetURL??null;e&&this.baseCmdForm.patchValue({targetUrl:e??"",arguments:i.Sources?.join(`
3
3
  `)??""})}oauthStartTokenCreation(i){}getFormFieldValue(i,e,t){return this.optionsForm.controls.advancedOptions.controls[t].value}removeFormView(i,e){this.#e.removeOptionFromFormGroup(i)}addNewOption(i){console.log("option",i),this.#e.addOptionToFormGroup(i)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=j({type:n,selectors:[["app-commandline"]],features:[ee([U])],decls:8,vars:1,consts:()=>{let i;i=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`Select an option...`;let t;t=$localize`Command`;let _;_=$localize`TargetUrl`;let f;f=$localize`Commandline Arguments`;let V;V=$localize`Advanced options`;let L;L=$localize`Backup ID`;let c;c=$localize`Backup Name`;let z;z=$localize`Filters`;let X;X=$localize`Remote volume size`;let q;q=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#45\uFFFD"}:START_LINK:Read more${"\uFFFD/#45\uFFFD"}:CLOSE_LINK:`;let b;b=$localize` Advanced options ${"\uFFFD#49\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#50\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#51\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#51\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#50\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#52\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*54:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1:${"\uFFFD0:1\uFFFD"}:INTERPOLATION:${"[\uFFFD/#50\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*54:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#52\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SPK_MENU:`,b=J(b);let H;return H=$localize`${"\uFFFD#62\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#62\uFFFD"}:CLOSE_TAG_SPK_ICON: Run "${"\uFFFD0\uFFFD"}:INTERPOLATION:" command now `,[["fieldTemplate",""],["option",""],i,t,_,f,V,L,c,z,X,q,b,H,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"indeterminate","primary"],[3,"formGroup"],["for","command"],["type","text","id","command","formControlName","command"],[3,"value"],["for","targetUrl"],["id","targetUrl","autocomplete","off","formControlName","targetUrl"],["for","arguments"],["id","arguments","autocomplete","off","formControlName","arguments"],["for","backup-id"],["id","backup-id","formControlName","backup-id"],["for","backup-name"],["id","backup-name","formControlName","backup-name"],[3,"disallowToggle"],["title",""],["content","","formGroupName","filters"],[1,"remote-volume-wrap"],["formGroupName","remoteVolumeSize",1,"row-inputs"],["for","size"],["type","number","id","size","formControlName","size"],["type","text","placeholder",e,"formControlName","unit"],["href","#",1,"spk-primary"],["spk-button","","type","button",1,"outlined","small"],["menu",""],["type","button"],[1,"form-actions"],["spk-button","",1,"raised","primary",3,"click"],[3,"id","formControl"],["type","button",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["type","search",3,"id","formControlName"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["type","search","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],["type","text","id","text",3,"formControlName"],["deselect","",3,"value"],[1,"raised","primary"]]},template:function(e,t){e&1&&(s(0,"app-status-bar"),l(1,"section")(2,"div",14)(3,"button",15),y(4,2),s(5,"spk-icon"),w(),o()(),u(6,Be,1,0,"spk-progress-bar",16)(7,Et,63,8),o()),e&2&&(a(6),C(t.finishedLoading()?7:6))},dependencies:[ve,Ve,Le,ke,Ce,de,fe,se,ce,ue,Fe,ge,Te,Ne,ae,me,Ie,Oe,Me,Pe,ye,$e,De,we,Ae,xe,Ee],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;max-width:40rem;padding:2.5rem;gap:1.25rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}"],changeDetection:0})};export{K as default};
@@ -1 +1 @@
1
- import{a as S}from"./chunk-BSZZLSIX.js";import{c as B}from"./chunk-OIRMDOOF.js";import{a as z}from"./chunk-GE3T3AG3.js";import{b as m,c as h}from"./chunk-O2MZ5CAQ.js";import{G as u,Kc as d,Mc as P,O as f,U as k,Ya as n,_ as o,l as p,q as g}from"./chunk-VGQ6X3AL.js";import{a as l,b as a}from"./chunk-C6Q5SG76.js";var $={Backup_Begin:$localize`Starting backup …`,Backup_PreBackupVerify:$localize`Verifying backend data …`,Backup_PostBackupTest:$localize`Verifying remote data …`,Backup_PreviousBackupFinalize:$localize`Completing previous backup …`,Backup_ProcessingFiles:$localize`Processing files to backup …`,Backup_Finalize:$localize`Completing backup …`,Backup_WaitForUpload:$localize`Waiting for upload to finish …`,Backup_Delete:$localize`Deleting unwanted files …`,Backup_Compact:$localize`Compacting remote data …`,Backup_VerificationUpload:$localize`Uploading verification file …`,Backup_PostBackupVerify:$localize`Verifying backend data …`,Backup_Complete:$localize`Backup complete!`,Restore_Begin:$localize`Starting restore …`,Restore_RecreateDatabase:$localize`Rebuilding local database …`,Restore_PreRestoreVerify:$localize`Verifying remote data …`,Restore_CreateFileList:$localize`Building list of files to restore …`,Restore_CreateTargetFolders:$localize`Creating target folders …`,Restore_ScanForExistingFiles:$localize`Scanning existing files …`,Restore_ScanForLocalBlocks:$localize`Scanning for local blocks …`,Restore_PatchWithLocalBlocks:$localize`Patching files with local blocks …`,Restore_DownloadingRemoteFiles:$localize`Downloading files …`,Restore_PostRestoreVerify:$localize`Verifying restored files …`,Restore_Complete:$localize`Restore complete!`,Recreate_Running:$localize`Recreating database …`,Vacuum_Running:$localize`Vacuuming database …`,Repair_Running:$localize`Repairing database …`,Verify_Running:$localize`Verifying files …`,BugReport_Running:$localize`Creating bug report …`,Delete_Listing:$localize`Listing remote files …`,Delete_Deleting:$localize`Deleting remote files …`,"PurgeFiles_Begin,":$localize`Listing remote files for purge …`,"PurgeFiles_Process,":$localize`Purging files …`,"PurgeFiles_Compact,":$localize`Compacting remote data …`,"PurgeFiles_Complete,":$localize`Purging files complete!`,Error:$localize`Error!`},_=class r{#i=o(S);#a=o(h);#r=o(m);#o=o(z);#e=o(B);#t=n(!1);#l=n(null);statusData=this.#l.asReadonly();serverState=d(()=>{let e=this.#e.serverState();return e?(e.ProposedSchedule=e.ProposedSchedule?.map(i=>a(l({},i),{backup:i.Item1?this.#o.getBackupById(i.Item1):null})),e):null});isFetching=this.#t.asReadonly();connectionStatus=this.#e.connectionStatus;setConnectionMethod(e){this.#e.setConnectionMethod(e)}pollingInterval;#p=P(()=>{let e=this.#e.serverState();e?.ActiveTask&&this.pollingInterval===void 0?this.pollingInterval=setInterval(()=>{this.#n()},1e3):e?.ActiveTask||this.stopPollingProgress()});stopPollingProgress(){clearInterval(this.pollingInterval)}#n(){this.#t.set(!0),this.#a.getApiV1Progressstate().pipe(f(e=>{let i=e.TaskID??null;return i===null?p(e):this.#r.getApiV1TaskByTaskid({taskid:i}).pipe(g(t=>a(l({},e),{task:t??null})))}),u(()=>this.#t.set(!1))).subscribe({next:e=>{let i=e.TaskID??null,t=e.BackupID??null;i!==null&&t!==null&&(e.backup=this.#o.getBackupById(t)),this.#l.set(a(l({},e),{progress:this.#s(e),statusText:this.#c(e),actionText:e.backup?.Backup?.Name??$localize`Running task`}))},error:e=>{e.status===404&&this.stopPollingProgress()}})}#s(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,s=e.TotalFileCount-e.ProcessedFileCount,c=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"||e.Phase==="Backup_WaitForUpload"?i=1:e.OverallProgress>0&&(i=e.OverallProgress);return i}#c(e){let i="Running \u2026";if(e.task&&e&&(i=e.Phase?$[e.Phase]:"Running \u2026",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,s=e.TotalFileCount-e.ProcessedFileCount,c=e.TotalFileSize-e.ProcessedFileSize-t,R=e.BackendSpeed<0?"":` at ${this.#i.transform(e.BackendSpeed)}/s`;i=`${e.Phase==="Restore_DownloadingRemoteFiles"?"Restoring: ":""}${s} files (${this.#i.transform(c)}) to go ${R}`}return i}static \u0275fac=function(i){return new(i||r)};static \u0275prov=k({token:r,factory:r.\u0275fac,providedIn:"root"})};export{_ as a};
1
+ import{a as S}from"./chunk-AUVXHFRE.js";import{c as B}from"./chunk-LLZCURV6.js";import{a as z}from"./chunk-DGDWETHE.js";import{b as m,c as h}from"./chunk-GOCS43XM.js";import{G as u,Mc as d,O as f,Oc as P,U as k,Ya as n,_ as o,l as p,q as g}from"./chunk-ZYQXWAMY.js";import{a as l,b as a}from"./chunk-C6Q5SG76.js";var $={Backup_Begin:$localize`Starting backup …`,Backup_PreBackupVerify:$localize`Verifying backend data …`,Backup_PostBackupTest:$localize`Verifying remote data …`,Backup_PreviousBackupFinalize:$localize`Completing previous backup …`,Backup_ProcessingFiles:$localize`Processing files to backup …`,Backup_Finalize:$localize`Completing backup …`,Backup_WaitForUpload:$localize`Waiting for upload to finish …`,Backup_Delete:$localize`Deleting unwanted files …`,Backup_Compact:$localize`Compacting remote data …`,Backup_VerificationUpload:$localize`Uploading verification file …`,Backup_PostBackupVerify:$localize`Verifying backend data …`,Backup_Complete:$localize`Backup complete!`,Restore_Begin:$localize`Starting restore …`,Restore_RecreateDatabase:$localize`Rebuilding local database …`,Restore_PreRestoreVerify:$localize`Verifying remote data …`,Restore_CreateFileList:$localize`Building list of files to restore …`,Restore_CreateTargetFolders:$localize`Creating target folders …`,Restore_ScanForExistingFiles:$localize`Scanning existing files …`,Restore_ScanForLocalBlocks:$localize`Scanning for local blocks …`,Restore_PatchWithLocalBlocks:$localize`Patching files with local blocks …`,Restore_DownloadingRemoteFiles:$localize`Downloading files …`,Restore_PostRestoreVerify:$localize`Verifying restored files …`,Restore_Complete:$localize`Restore complete!`,Recreate_Running:$localize`Recreating database …`,Vacuum_Running:$localize`Vacuuming database …`,Repair_Running:$localize`Repairing database …`,Verify_Running:$localize`Verifying files …`,BugReport_Running:$localize`Creating bug report …`,Delete_Listing:$localize`Listing remote files …`,Delete_Deleting:$localize`Deleting remote files …`,"PurgeFiles_Begin,":$localize`Listing remote files for purge …`,"PurgeFiles_Process,":$localize`Purging files …`,"PurgeFiles_Compact,":$localize`Compacting remote data …`,"PurgeFiles_Complete,":$localize`Purging files complete!`,Error:$localize`Error!`},_=class r{#i=o(S);#a=o(h);#r=o(m);#o=o(z);#e=o(B);#t=n(!1);#l=n(null);statusData=this.#l.asReadonly();serverState=d(()=>{let e=this.#e.serverState();return e?(e.ProposedSchedule=e.ProposedSchedule?.map(i=>a(l({},i),{backup:i.Item1?this.#o.getBackupById(i.Item1):null})),e):null});isFetching=this.#t.asReadonly();connectionStatus=this.#e.connectionStatus;setConnectionMethod(e){this.#e.setConnectionMethod(e)}pollingInterval;#p=P(()=>{let e=this.#e.serverState();e?.ActiveTask&&this.pollingInterval===void 0?this.pollingInterval=setInterval(()=>{this.#n()},1e3):e?.ActiveTask||this.stopPollingProgress()});stopPollingProgress(){clearInterval(this.pollingInterval)}#n(){this.#t.set(!0),this.#a.getApiV1Progressstate().pipe(f(e=>{let i=e.TaskID??null;return i===null?p(e):this.#r.getApiV1TaskByTaskid({taskid:i}).pipe(g(t=>a(l({},e),{task:t??null})))}),u(()=>this.#t.set(!1))).subscribe({next:e=>{let i=e.TaskID??null,t=e.BackupID??null;i!==null&&t!==null&&(e.backup=this.#o.getBackupById(t)),this.#l.set(a(l({},e),{progress:this.#s(e),statusText:this.#c(e),actionText:e.backup?.Backup?.Name??$localize`Running task`}))},error:e=>{e.status===404&&this.stopPollingProgress()}})}#s(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,s=e.TotalFileCount-e.ProcessedFileCount,c=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"||e.Phase==="Backup_WaitForUpload"?i=1:e.OverallProgress>0&&(i=e.OverallProgress);return i}#c(e){let i="Running \u2026";if(e.task&&e&&(i=e.Phase?$[e.Phase]:"Running \u2026",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,s=e.TotalFileCount-e.ProcessedFileCount,c=e.TotalFileSize-e.ProcessedFileSize-t,R=e.BackendSpeed<0?"":` at ${this.#i.transform(e.BackendSpeed)}/s`;i=`${e.Phase==="Restore_DownloadingRemoteFiles"?"Restoring: ":""}${s} files (${this.#i.transform(c)}) to go ${R}`}return i}static \u0275fac=function(i){return new(i||r)};static \u0275prov=k({token:r,factory:r.\u0275fac,providedIn:"root"})};export{_ as a};
@@ -1 +1 @@
1
- import{c as m}from"./chunk-OIRMDOOF.js";import{b as N}from"./chunk-O2MZ5CAQ.js";import{D as o,G as h,Kc as u,Q as d,U as l,Ya as s,_ as r,l as c,w as f,z as p}from"./chunk-VGQ6X3AL.js";var v=class n{#e=r(N);#n=r(m);serverState=u(()=>{let t=this.#n.serverState();return t?.LastNotificationUpdateID&&this.updateLastNotificationEventId(t?.LastNotificationUpdateID),t});#o=s(-1);#s=s(!1);#t=s([]);#i=s([]);notifications=this.#t.asReadonly();init(){this.notifications().length===0&&this.getNotifications()}updateLastNotificationEventId(t){this.#o()!==t&&(this.#o.set(t),this.getNotifications())}getNotifications(){this.#s.set(!0),this.#e.getApiV1Notifications().pipe(o(1),d(t=>this.#t.set(t)),h(()=>this.#s.set(!1))).subscribe()}getNofication(t){this.#e.getApiV1NotificationById({id:t}).pipe(o(1)).subscribe()}deleteNotification(t){let i=this.#t(),e=i[t];this.#i.set(i),i.splice(t,1),console.log("notifications",i),this.#t.set(i),this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(o(1)).subscribe({error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}deleteAllNotifications(){let t=this.#t();this.#i.set(t),this.#t.set([]);let i=t.map(e=>this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(p(()=>c(e))));f(i).pipe(o(1)).subscribe({next:e=>{let b=e.filter(a=>a!=null&&"ID"in a);this.#t.set(b),this.#i.set([])},error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}static \u0275fac=function(i){return new(i||n)};static \u0275prov=l({token:n,factory:n.\u0275fac,providedIn:"root"})};export{v as a};
1
+ import{c as m}from"./chunk-LLZCURV6.js";import{b as N}from"./chunk-GOCS43XM.js";import{D as o,G as h,Mc as u,Q as d,U as l,Ya as s,_ as r,l as c,w as f,z as p}from"./chunk-ZYQXWAMY.js";var v=class n{#e=r(N);#n=r(m);serverState=u(()=>{let t=this.#n.serverState();return t?.LastNotificationUpdateID&&this.updateLastNotificationEventId(t?.LastNotificationUpdateID),t});#o=s(-1);#s=s(!1);#t=s([]);#i=s([]);notifications=this.#t.asReadonly();init(){this.notifications().length===0&&this.getNotifications()}updateLastNotificationEventId(t){this.#o()!==t&&(this.#o.set(t),this.getNotifications())}getNotifications(){this.#s.set(!0),this.#e.getApiV1Notifications().pipe(o(1),d(t=>this.#t.set(t)),h(()=>this.#s.set(!1))).subscribe()}getNofication(t){this.#e.getApiV1NotificationById({id:t}).pipe(o(1)).subscribe()}deleteNotification(t){let i=this.#t(),e=i[t];this.#i.set(i),i.splice(t,1),console.log("notifications",i),this.#t.set(i),this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(o(1)).subscribe({error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}deleteAllNotifications(){let t=this.#t();this.#i.set(t),this.#t.set([]);let i=t.map(e=>this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(p(()=>c(e))));f(i).pipe(o(1)).subscribe({next:e=>{let b=e.filter(a=>a!=null&&"ID"in a);this.#t.set(b),this.#i.set([])},error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}static \u0275fac=function(i){return new(i||n)};static \u0275prov=l({token:n,factory:n.\u0275fac,providedIn:"root"})};export{v as a};
@@ -0,0 +1 @@
1
+ import{f as a,g as b,h as c}from"./chunk-CRJYNI4C.js";import"./chunk-G6DEVOXB.js";import"./chunk-HUO7ZRYL.js";import"./chunk-DNHLTHLR.js";import"./chunk-W2IUXLYE.js";import"./chunk-MSZ6S4MV.js";import"./chunk-L6P5W22A.js";import"./chunk-PHVHG2MW.js";import"./chunk-GOCS43XM.js";import"./chunk-ZTEWFJB7.js";import"./chunk-R2RIU25S.js";import"./chunk-D64J3G73.js";import"./chunk-GKTIIZ72.js";import"./chunk-XVYQD36R.js";import"./chunk-ZYQXWAMY.js";import"./chunk-C6Q5SG76.js";export{b as NONE_OPTION,a as createGeneralForm,c as default};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-ZU4O6G7N.js";import"./chunk-ZLU2WKOF.js";import"./chunk-ZYQXWAMY.js";import"./chunk-C6Q5SG76.js";export{a as DurationFormatPipe};
@@ -1 +1 @@
1
- import{b as c,d as A,e as d}from"./chunk-J76HBC5J.js";import"./chunk-MSK2MH2K.js";import{v as O}from"./chunk-ZTSITRHY.js";import"./chunk-NJSJNACP.js";import"./chunk-BUARZS4A.js";import{Cb as e,Db as t,Eb as T,Qb as o,eb as g}from"./chunk-VGQ6X3AL.js";import"./chunk-C6Q5SG76.js";var l=class a{static \u0275fac=function(n){return new(n||a)};static \u0275cmp=g({type:a,selectors:[["app-about"]],decls:13,vars:0,consts:()=>{let i;i=$localize`General`;let n;n=$localize`Changelog`;let r;r=$localize`Libraries`;let s;s=$localize`System info`;let u;return u=$localize`Logs`,[i,n,r,s,u,[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"]]},template:function(n,r){n&1&&(e(0,"spk-tabs",5)(1,"button",6),o(2,0),t(),e(3,"button",7),o(4,1),t(),e(5,"button",8),o(6,2),t(),e(7,"button",9),o(8,3),t(),e(9,"button",10),o(10,4),t()(),e(11,"section"),T(12,"router-outlet"),t())},dependencies:[O,c,A,d],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0;padding:2.5rem}.nav[_ngcontent-%COMP%]{display:flex;gap:.5rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem 0}"],changeDetection:0})};export{l as default};
1
+ import{b as c,d as A,e as d}from"./chunk-ZTEWFJB7.js";import"./chunk-R2RIU25S.js";import{v as O}from"./chunk-D64J3G73.js";import"./chunk-GKTIIZ72.js";import"./chunk-XVYQD36R.js";import{Cb as e,Db as t,Eb as T,Qb as o,eb as g}from"./chunk-ZYQXWAMY.js";import"./chunk-C6Q5SG76.js";var l=class a{static \u0275fac=function(n){return new(n||a)};static \u0275cmp=g({type:a,selectors:[["app-about"]],decls:13,vars:0,consts:()=>{let i;i=$localize`General`;let n;n=$localize`Changelog`;let r;r=$localize`Libraries`;let s;s=$localize`System info`;let u;return u=$localize`Logs`,[i,n,r,s,u,[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"]]},template:function(n,r){n&1&&(e(0,"spk-tabs",5)(1,"button",6),o(2,0),t(),e(3,"button",7),o(4,1),t(),e(5,"button",8),o(6,2),t(),e(7,"button",9),o(8,3),t(),e(9,"button",10),o(10,4),t()(),e(11,"section"),T(12,"router-outlet"),t())},dependencies:[O,c,A,d],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0;padding:2.5rem}.nav[_ngcontent-%COMP%]{display:flex;gap:.5rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem 0}"],changeDetection:0})};export{l as default};
@@ -1 +1 @@
1
- import{a as b}from"./chunk-PD4M6YP7.js";import"./chunk-O2MZ5CAQ.js";import{a as w,m as D}from"./chunk-ZTSITRHY.js";import"./chunk-NJSJNACP.js";import{ia as A}from"./chunk-BUARZS4A.js";import{Ab as I,Bb as M,Cb as c,Db as r,Hb as u,Ib as v,Kc as $,Qb as P,Ra as l,Ub as k,Vb as s,Ya as m,_ as y,eb as T,fa as O,ga as x,gc as C,hc as p,ic as E,kb as a,sc as _,tb as d,tc as N,ub as h,vb as f,yb as g,yc as F}from"./chunk-VGQ6X3AL.js";import"./chunk-C6Q5SG76.js";var L=(e,t)=>t.id,V=e=>({children:e,level:0}),R=e=>({$implicit:e}),j=(e,t)=>({children:e,level:t});function z(e,t){if(e&1&&(c(0,"spk-icon"),p(1,"caret-down"),r()),e&2){let n=s().$implicit;f("open",n.isOpen())}}function B(e,t){e&1&&(c(0,"spk-icon"),p(1,"dot"),r())}function G(e,t){e&1&&u(0)}function U(e,t){if(e&1&&a(0,G,1,0,"ng-container",3),e&2){let n=s().$implicit,o=s().$implicit;s();let i=C(3);d("ngTemplateOutlet",i)("ngTemplateOutletContext",_(5,R,N(2,j,n.children,o.level+1)))}}function X(e,t){if(e&1){let n=v();c(0,"div",4,1),k("click",function(){let i=O(n).$implicit,Y=s(2);return x(i.children.length>0&&Y.toggleNode(i))}),a(2,z,2,2,"spk-icon",5)(3,B,2,0,"spk-icon"),c(4,"div",6),p(5),r()(),a(6,U,1,7,"ng-container")}if(e&2){let n=t.$implicit;f("cannot-toggle",n.children.length===0)("open",n.isOpen()),l(2),g(n.children.length>0?2:3),l(3),E(n.text),l(),g(n.isOpen()?6:-1)}}function q(e,t){if(e&1&&(c(0,"spk-list"),I(1,X,7,7,null,null,L),r()),e&2){let n=t.$implicit;h("padding-left",n.level*.25,"rem"),l(),M(n.children)}}function H(e,t){e&1&&u(0)}var S=class e{#e=y(b);treeStructure=$(()=>{let t=this.#e.systemInfo();return this.processObject(t,0)});toggleNode(t){t.isOpen.update(n=>!n)}processObject(t,n){let o=[];for(let i in t)typeof t[i]=="object"?o.push({id:i,text:i,children:this.processObject(t[i],n+1),level:n,isOpen:m(!1)}):o.push({id:i,text:`${i}: ${t[i]}`,children:[],level:n,isOpen:m(!1)});return o}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=T({type:e,selectors:[["app-system-info"]],decls:5,vars:6,consts:()=>{let t;return t=$localize`System info`,[["recursiveTree",""],["treeNode",""],t,[4,"ngTemplateOutlet","ngTemplateOutletContext"],["action","",3,"click"],[3,"open"],[1,"text"]]},template:function(n,o){if(n&1&&(c(0,"h3"),P(1,2),r(),a(2,q,3,2,"ng-template",null,0,F)(4,H,1,0,"ng-container",3)),n&2){let i=C(3);l(4),d("ngTemplateOutlet",i)("ngTemplateOutletContext",_(4,R,_(2,V,o.treeStructure())))}},dependencies:[D,w,A],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-icon[_ngcontent-%COMP%]{font-size:1rem}spk-list[_ngcontent-%COMP%]{padding:0}spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0}spk-list[_ngcontent-%COMP%] [action].cannot-toggle[_ngcontent-%COMP%]{cursor:initial}"],changeDetection:0})};export{S as default};
1
+ import{a as b}from"./chunk-MSZ6S4MV.js";import"./chunk-GOCS43XM.js";import{a as w,m as D}from"./chunk-D64J3G73.js";import"./chunk-GKTIIZ72.js";import{ia as A}from"./chunk-XVYQD36R.js";import{Ab as I,Ac as F,Bb as M,Cb as c,Db as r,Hb as u,Ib as v,Mc as $,Qb as P,Ra as l,Ub as k,Vb as s,Ya as m,_ as y,eb as T,fa as O,ga as x,gc as C,hc as p,ic as E,kb as a,tb as d,ub as h,uc as _,vb as f,vc as N,yb as g}from"./chunk-ZYQXWAMY.js";import"./chunk-C6Q5SG76.js";var L=(e,t)=>t.id,V=e=>({children:e,level:0}),R=e=>({$implicit:e}),j=(e,t)=>({children:e,level:t});function z(e,t){if(e&1&&(c(0,"spk-icon"),p(1,"caret-down"),r()),e&2){let n=s().$implicit;f("open",n.isOpen())}}function B(e,t){e&1&&(c(0,"spk-icon"),p(1,"dot"),r())}function G(e,t){e&1&&u(0)}function U(e,t){if(e&1&&a(0,G,1,0,"ng-container",3),e&2){let n=s().$implicit,o=s().$implicit;s();let i=C(3);d("ngTemplateOutlet",i)("ngTemplateOutletContext",_(5,R,N(2,j,n.children,o.level+1)))}}function X(e,t){if(e&1){let n=v();c(0,"div",4,1),k("click",function(){let i=O(n).$implicit,Y=s(2);return x(i.children.length>0&&Y.toggleNode(i))}),a(2,z,2,2,"spk-icon",5)(3,B,2,0,"spk-icon"),c(4,"div",6),p(5),r()(),a(6,U,1,7,"ng-container")}if(e&2){let n=t.$implicit;f("cannot-toggle",n.children.length===0)("open",n.isOpen()),l(2),g(n.children.length>0?2:3),l(3),E(n.text),l(),g(n.isOpen()?6:-1)}}function q(e,t){if(e&1&&(c(0,"spk-list"),I(1,X,7,7,null,null,L),r()),e&2){let n=t.$implicit;h("padding-left",n.level*.25,"rem"),l(),M(n.children)}}function H(e,t){e&1&&u(0)}var S=class e{#e=y(b);treeStructure=$(()=>{let t=this.#e.systemInfo();return this.processObject(t,0)});toggleNode(t){t.isOpen.update(n=>!n)}processObject(t,n){let o=[];for(let i in t)typeof t[i]=="object"?o.push({id:i,text:i,children:this.processObject(t[i],n+1),level:n,isOpen:m(!1)}):o.push({id:i,text:`${i}: ${t[i]}`,children:[],level:n,isOpen:m(!1)});return o}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=T({type:e,selectors:[["app-system-info"]],decls:5,vars:6,consts:()=>{let t;return t=$localize`System info`,[["recursiveTree",""],["treeNode",""],t,[4,"ngTemplateOutlet","ngTemplateOutletContext"],["action","",3,"click"],[3,"open"],[1,"text"]]},template:function(n,o){if(n&1&&(c(0,"h3"),P(1,2),r(),a(2,q,3,2,"ng-template",null,0,F)(4,H,1,0,"ng-container",3)),n&2){let i=C(3);l(4),d("ngTemplateOutlet",i)("ngTemplateOutletContext",_(4,R,_(2,V,o.treeStructure())))}},dependencies:[D,w,A],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-icon[_ngcontent-%COMP%]{font-size:1rem}spk-list[_ngcontent-%COMP%]{padding:0}spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0}spk-list[_ngcontent-%COMP%] [action].cannot-toggle[_ngcontent-%COMP%]{cursor:initial}"],changeDetection:0})};export{S as default};
@@ -1 +1 @@
1
- import{a as k}from"./chunk-VRLSXAI3.js";import"./chunk-IZGVBNDM.js";import"./chunk-BSZZLSIX.js";import"./chunk-OIRMDOOF.js";import"./chunk-GE3T3AG3.js";import"./chunk-OROSSCXB.js";import"./chunk-T5I4AY74.js";import"./chunk-O2MZ5CAQ.js";import{d as S}from"./chunk-J76HBC5J.js";import"./chunk-MSK2MH2K.js";import{a as T,g as M,h as f}from"./chunk-ZTSITRHY.js";import"./chunk-NJSJNACP.js";import"./chunk-BUARZS4A.js";import"./chunk-O53NVQ2A.js";import{Cb as e,Db as n,Eb as _,Ob as s,Pb as l,Qb as i,Ra as c,eb as D,rc as d,tb as r}from"./chunk-VGQ6X3AL.js";import"./chunk-C6Q5SG76.js";var E=()=>["/backup/new"],F=()=>["/backup/import"],u=class C{static \u0275fac=function(t){return new(t||C)};static \u0275cmp=D({type:C,selectors:[["app-add-backup"]],decls:23,vars:4,consts:()=>{let a;a=$localize`Add a new backup`;let t;t=$localize`New backup`;let p;p=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let A;A=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let g;g=$localize`Import from file`;let P;P=$localize`Import backup configuration from a file. During import you can adjust the setings.`;let m;return m=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[a,t,p,A,g,P,m,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["spk-button","",1,"raised","primary",3,"routerLink"]]},template:function(t,p){t&1&&(_(0,"app-status-bar"),e(1,"section")(2,"h2"),i(3,0),n(),e(4,"div",7)(5,"spk-card",8),_(6,"img",9),e(7,"h3"),i(8,1),n(),e(9,"p"),i(10,2),n(),e(11,"button",10),s(12,3),_(13,"spk-icon"),l(),n()(),e(14,"spk-card",8),_(15,"img",9),e(16,"h3"),i(17,4),n(),e(18,"p"),i(19,5),n(),e(20,"button",10),s(21,6),_(22,"spk-icon"),l(),n()()()()),t&2&&(c(11),r("routerLink",d(2,E)),c(9),r("routerLink",d(3,F)))},dependencies:[k,M,f,T,S],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:700px}spk-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}spk-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:300px}spk-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{u as default};
1
+ import{a as k}from"./chunk-JYGPM2H4.js";import"./chunk-36BW3HQ7.js";import"./chunk-AUVXHFRE.js";import"./chunk-LLZCURV6.js";import"./chunk-DGDWETHE.js";import"./chunk-PHVHG2MW.js";import"./chunk-RACRCDGZ.js";import"./chunk-GOCS43XM.js";import{d as S}from"./chunk-ZTEWFJB7.js";import"./chunk-R2RIU25S.js";import{a as T,g as M,h as f}from"./chunk-D64J3G73.js";import"./chunk-GKTIIZ72.js";import"./chunk-XVYQD36R.js";import"./chunk-ZLU2WKOF.js";import{Cb as e,Db as n,Eb as _,Ob as s,Pb as l,Qb as i,Ra as c,eb as D,tb as r,tc as d}from"./chunk-ZYQXWAMY.js";import"./chunk-C6Q5SG76.js";var E=()=>["/backup/new"],F=()=>["/backup/import"],u=class C{static \u0275fac=function(t){return new(t||C)};static \u0275cmp=D({type:C,selectors:[["app-add-backup"]],decls:23,vars:4,consts:()=>{let a;a=$localize`Add a new backup`;let t;t=$localize`New backup`;let p;p=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let A;A=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let g;g=$localize`Import from file`;let P;P=$localize`Import backup configuration from a file. During import you can adjust the setings.`;let m;return m=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[a,t,p,A,g,P,m,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["spk-button","",1,"raised","primary",3,"routerLink"]]},template:function(t,p){t&1&&(_(0,"app-status-bar"),e(1,"section")(2,"h2"),i(3,0),n(),e(4,"div",7)(5,"spk-card",8),_(6,"img",9),e(7,"h3"),i(8,1),n(),e(9,"p"),i(10,2),n(),e(11,"button",10),s(12,3),_(13,"spk-icon"),l(),n()(),e(14,"spk-card",8),_(15,"img",9),e(16,"h3"),i(17,4),n(),e(18,"p"),i(19,5),n(),e(20,"button",10),s(21,6),_(22,"spk-icon"),l(),n()()()()),t&2&&(c(11),r("routerLink",d(2,E)),c(9),r("routerLink",d(3,F)))},dependencies:[k,M,f,T,S],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:700px}spk-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}spk-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:300px}spk-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{u as default};
@@ -1 +1 @@
1
- import{o as we}from"./chunk-CO7Y3BIG.js";import{a as Wt}from"./chunk-5NMYYKKU.js";import{a as Kt}from"./chunk-B6UDSTOM.js";import"./chunk-DNHLTHLR.js";import{a as Ae,b as te}from"./chunk-N3GBABZB.js";import{a as Ie}from"./chunk-M27H5SJL.js";import{a as pe}from"./chunk-PD4M6YP7.js";import{a as jt}from"./chunk-IHYJHBCC.js";import"./chunk-KYCK75MH.js";import{a as bt}from"./chunk-PIVMNQL6.js";import{a as Ht}from"./chunk-VRLSXAI3.js";import"./chunk-IZGVBNDM.js";import"./chunk-BSZZLSIX.js";import"./chunk-OIRMDOOF.js";import"./chunk-GE3T3AG3.js";import{a as Dt,b as j,d as H,e as ce,g as de,h as me,i as Vt,l as ue,m as Se,o as ge,p as Te,q as fe,r as Ce}from"./chunk-OROSSCXB.js";import"./chunk-T5I4AY74.js";import{b}from"./chunk-O2MZ5CAQ.js";import"./chunk-J76HBC5J.js";import"./chunk-MSK2MH2K.js";import{a as Ee,b as Lt,g as Ne,i as Xt,k as zt,l as W,n as Bt,o as Ut,p as qt,q as Oe,r as Me,w as he,x as Pe}from"./chunk-ZTSITRHY.js";import"./chunk-NJSJNACP.js";import"./chunk-BUARZS4A.js";import"./chunk-O53NVQ2A.js";import{Ab as w,Bb as G,Cb as r,Db as o,Eb as f,F as Re,Fb as ae,G as x,Gb as le,Hb as yt,Ib as M,Kc as k,Lc as kt,Mc as q,N as D,Oa as Ot,Ob as B,Pb as U,Qb as _,Ra as s,Rb as Y,Sb as ee,Tb as _e,U as se,Ub as S,Vb as l,Xa as Mt,Ya as g,Yb as R,Za as ht,_ as N,_b as O,b as ut,c as St,ca as Ct,da as Et,eb as z,ec as Ft,fa as C,fc as vt,ga as E,gc as Rt,hc as c,ic as $,jc as P,k as gt,ka as Nt,kb as T,l as Z,mc as V,n as Tt,nc as L,oc as X,q as ft,qb as Pt,qc as At,r as ve,rb as It,rc as wt,sc as Gt,tb as m,tc as xt,vb as I,yb as u,yc as $t,z as J,zb as A}from"./chunk-VGQ6X3AL.js";import"./chunk-C6Q5SG76.js";function Qt(i,n,e){!n&&Et(i);let t=n??N(Nt);return e?Ct(t,e):t}function Ge(...i){let{normalizedSources:n,hasInitValue:e,operator:t,options:a}=tn(i),p=Qt(Ge,a?.injector);return e?te(ve(n).pipe(t),{initialValue:a.initialValue,injector:p}):te(ve(n).pipe(t),{injector:p,requireSync:!0})}function tn(i){if(!i||!i.length||typeof i[0]!="object")throw new TypeError("derivedFrom needs sources");let n=typeof i[1]=="function";if(i.length==3&&!n)throw new TypeError("derivedFrom needs pipeable operator as a second argument");n||i.splice(1,0,ut);let[e,t,a]=i,p=!!a&&"initialValue"in a;return{normalizedSources:Object.entries(e).reduce((y,[h,F])=>{if(Mt(F))y[h]=Ae(F,{injector:a?.injector}).pipe(D(kt(F)));else if(Tt(F))y[h]=F.pipe(Re());else if(typeof F=="function"){let oe=k(F);y[h]=Ae(oe,{injector:a?.injector}).pipe(D(F()))}else y[h]=gt(F).pipe(Re());return y},Array.isArray(e)?[]:{}),operator:t,hasInitValue:p,options:a}}var K=class i{#e=N(b);#i=te(this.#e.getApiV1Serversettings());#t=g(void 0);serverSettings=k(()=>this.#t()||this.#i());refreshServerSettings(){this.#e.getApiV1Serversettings().subscribe({next:n=>{this.#t.set(n)}})}static \u0275fac=function(e){return new(e||i)};static \u0275prov=se({token:i,factory:i.\u0275fac,providedIn:"root"})};var nn=["formRef"],on=()=>[import("./chunk-LREVYYY4.js").then(i=>i.NgTemplateOutlet)],rn=(i,n)=>({index:i,formView:n,formGroupName:"advancedOptions",destinationType:null,oauthField:null}),sn=i=>({$implicit:i});function an(i,n){if(i&1){let e=M();B(0,3,1),r(1,"button",13,2),S("click",function(){let a=C(e).$implicit,p=l();return E(p.addNewOption(a))}),o(),U()}if(i&2){let e=n.$implicit;s(),Y(e.name),ee(0)}}function ln(i,n){i&1&&yt(0)}function _n(i,n){if(i&1&&T(0,ln,1,0,"ng-container",14),i&2){let e=n.$implicit,t=n.$index;l(2);let a=Rt(15);m("ngTemplateOutlet",a)("ngTemplateOutletContext",Gt(5,sn,xt(2,rn,t,e)))}}function pn(i,n){if(i&1&&w(0,_n,1,7,"ng-container",null,A),i&2){let e=l();G(e.selectedOptions())}}function cn(i,n){if(i&1&&(r(0,"spk-tooltip",24)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;m("message",e.formView.longDescription)}}function dn(i,n){if(i&1&&(r(0,"app-file-tree",17)(1,"label",23),c(2),T(3,cn,3,1,"spk-tooltip",24),o(),f(4,"input",25),o()),i&2){let e,t=l().$implicit,a=l();m("startingPath",a.getFormFieldValue(0,t.formGroupName,t.formView.name))("accepts",t.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),O("for","destination-",t.formGroupName,"-",t.index,""),s(),P(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),u(t.formView.longDescription?3:-1),s(),O("id","destination-",t.formGroupName,"-",t.index,""),R("formControlName",t.formView.name)}}function mn(i,n){if(i&1&&(r(0,"spk-tooltip",24)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;m("message",e.formView.longDescription)}}function un(i,n){if(i&1&&(r(0,"app-file-tree",18)(1,"label",23),c(2),T(3,mn,3,1,"spk-tooltip",24),o(),f(4,"input",25),o()),i&2){let e,t=l().$implicit,a=l();m("startingPath",a.getFormFieldValue(0,t.formGroupName,t.formView.name)),s(),O("for","destination-",t.formGroupName,"-",t.index,""),s(),P(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),u(t.formView.longDescription?3:-1),s(),O("id","destination-",t.formGroupName,"-",t.index,""),R("formControlName",t.formView.name)}}function Sn(i,n){if(i&1&&(r(0,"spk-tooltip",24)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;m("message",e.formView.longDescription)}}function gn(i,n){i&1&&(r(0,"spk-icon",26),c(1,"link"),o())}function Tn(i,n){i&1&&(r(0,"spk-icon",26),c(1,"textbox"),o())}function fn(i,n){if(i&1&&(r(0,"spk-form-field")(1,"label",23),c(2),T(3,Sn,3,1,"spk-tooltip",24),o(),f(4,"input",25),T(5,gn,2,0,"spk-icon",26)(6,Tn,2,0,"spk-icon",26),o()),i&2){let e,t=l().$implicit;s(),O("for","destination-",t.formGroupName,"-",t.index,""),s(),P(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),u(t.formView.longDescription?3:-1),s(),O("id","destination-",t.formGroupName,"-",t.index,""),R("formControlName",t.formView.name),s(),u(t.formView.type==="Path"?5:6)}}function Cn(i,n){if(i&1){let e=M();r(0,"span",30),S("click",function(){C(e);let a=l(2).$implicit,p=l();return E(p.oauthStartTokenCreation(a.formViewType))}),c(1,"AuthID"),o()}}function En(i,n){i&1&&(r(0,"spk-icon",26),c(1,"password"),o())}function Nn(i,n){if(i&1){let e=M();r(0,"spk-icon",31),S("click",function(){C(e);let a=l(2).$implicit;return E(a.formView.showPassword=!a.formView.showPassword)}),c(1," eye "),o()}}function On(i,n){if(i&1){let e=M();r(0,"spk-icon",31),S("click",function(){C(e);let a=l(2).$implicit;return E(a.formView.showPassword=!a.formView.showPassword)}),c(1," eye-slash "),o()}}function Mn(i,n){if(i&1&&(r(0,"spk-form-field")(1,"label",23),c(2),o(),f(3,"input",27),T(4,Cn,2,0,"span",28)(5,En,2,0,"spk-icon",26)(6,Nn,2,0,"spk-icon",29)(7,On,2,0,"spk-icon",29),o()),i&2){let e,t=l().$implicit;s(),O("for","destination-",t.formGroupName,"-",t.index,""),s(),P(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),O("id","destination-",t.formGroupName,"-",t.index,""),R("formControlName",t.formView.name),m("type",t.formView.showPassword?"text":"password"),s(),u(t.oauthField===t.formView.name?4:5),s(2),u(t.formView.showPassword?6:7)}}function hn(i,n){if(i&1&&(r(0,"spk-tooltip",24)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;m("message",e.formView.longDescription)}}function Pn(i,n){if(i&1&&(r(0,"spk-option",33),c(1),o()),i&2){let e=n.$implicit;m("value",e),s(),$(e)}}function In(i,n){if(i&1&&(r(0,"spk-select")(1,"label",23),c(2),T(3,hn,3,1,"spk-tooltip",24),o(),f(4,"input",32),w(5,Pn,2,2,"spk-option",33,A),o()),i&2){let e,t=l().$implicit;s(),O("for","destination-",t.formGroupName,"-",t.index,""),s(),P(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),u(t.formView.longDescription?3:-1),s(),O("id","destination-",t.formGroupName,"-",t.index,""),R("formControlName",t.formView.name),s(),G(t.formView.options)}}function yn(i,n){if(i&1&&(r(0,"spk-tooltip",24)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;m("message",e.formView.longDescription)}}function Fn(i,n){if(i&1&&(r(0,"spk-option",33),c(1),o()),i&2){let e=n.$implicit;m("value",e),s(),$(e)}}function vn(i,n){if(i&1&&(r(0,"div",19)(1,"label",23),c(2),T(3,yn,3,1,"spk-tooltip",24),o(),r(4,"div",34)(5,"spk-form-field"),f(6,"input",35),r(7,"spk-icon",26),c(8,"resize"),o()(),r(9,"spk-select"),f(10,"label")(11,"input",36),w(12,Fn,2,2,"spk-option",33,A),o()()()),i&2){let e,t=l().$implicit,a=l();m("formGroupName",t.formView.name),s(),O("for","destination-",t.formGroupName,"-",t.index,""),s(),P(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),u(t.formView.longDescription?3:-1),s(3),O("id","destination-",t.formGroupName,"-",t.index,""),s(6),G(a.sizeOptions())}}function Rn(i,n){if(i&1&&(r(0,"spk-tooltip",24)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;m("message",e.formView.longDescription)}}function An(i,n){if(i&1&&(r(0,"spk-form-field")(1,"label",23),c(2),T(3,Rn,3,1,"spk-tooltip",24),o(),f(4,"input",37),r(5,"spk-icon",26),c(6,"numpad"),o()()),i&2){let e,t=l().$implicit;s(),O("for","destination-",t.formGroupName,"-",t.index,""),s(),P(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),u(t.formView.longDescription?3:-1),s(),O("id","destination-",t.formGroupName,"-",t.index,""),R("formControlName",t.formView.name)}}function wn(i,n){if(i&1&&(r(0,"spk-tooltip",24)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;m("message",e.formView.longDescription)}}function Gn(i,n){if(i&1&&(r(0,"spk-toggle",20)(1,"label",23),c(2),T(3,wn,3,1,"spk-tooltip",24),o(),f(4,"input",38),o()),i&2){let e,t=l().$implicit;s(),O("for","destination-",t.formGroupName,"-",t.index,""),s(),P(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),u(t.formView.longDescription?3:-1),s(),O("id","destination-",t.formGroupName,"-",t.index,""),R("formControlName",t.formView.name)}}function xn(i,n){if(i&1&&(r(0,"spk-tooltip",24)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;m("message",e.formView.longDescription)}}function $n(i,n){i&1&&(r(0,"spk-option",40),c(1,"None"),o()),i&2&&m("value","None")}function kn(i,n){if(i&1&&(r(0,"spk-option",33),c(1),f(2,"spk-checkbox",41),o()),i&2){let e=l().$implicit;m("value",e),s(),P(" ",e," ")}}function bn(i,n){if(i&1&&T(0,$n,2,1,"spk-option",40)(1,kn,3,2,"spk-option",33),i&2){let e=n.$implicit;u(e==="None"?0:1)}}function Dn(i,n){if(i&1&&(r(0,"spk-select",21)(1,"label",23),c(2),T(3,xn,3,1,"spk-tooltip",24),o(),f(4,"input",39),w(5,bn,2,1,null,null,A),o()),i&2){let e,t=l().$implicit;m("selectMultiple",!0),s(),O("for","destination-",t.formGroupName,"-",t.index,""),s(),P(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),u(t.formView.longDescription?3:-1),s(),R("formControlName",t.formView.name),s(),G(t.formView.options)}}function Vn(i,n){if(i&1&&(r(0,"spk-tooltip",24)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;m("message",e.formView.longDescription)}}function Ln(i,n){if(i&1&&(r(0,"spk-form-field")(1,"label",23),c(2),T(3,Vn,3,1,"spk-tooltip",24),o(),f(4,"input",25),o()),i&2){let e,t=l().$implicit;s(),O("for","destination-",t.formGroupName,"-",t.index,""),s(),P(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),u(t.formView.longDescription?3:-1),s(),O("id","destination-",t.formGroupName,"-",t.index,""),R("formControlName",t.formView.name)}}function Xn(i,n){if(i&1){let e=M();r(0,"div",15),ae(1,16),T(2,dn,5,14,"app-file-tree",17)(3,un,5,10,"app-file-tree",18)(4,fn,7,10,"spk-form-field")(5,Mn,8,11,"spk-form-field")(6,In,7,9,"spk-select")(7,vn,14,9,"div",19)(8,An,7,9,"spk-form-field")(9,Gn,5,9,"spk-toggle",20)(10,Dn,7,7,"spk-select",21)(11,Ln,5,9,"spk-form-field"),le(),r(12,"button",22),S("click",function(){let a=C(e).$implicit,p=l();return E(p.removeFormView(a.formView))}),r(13,"spk-icon"),c(14,"x-circle"),o()()()}if(i&2){let e=n.$implicit;s(),m("formGroupName",e.formGroupName),s(),u(e.formView.type==="FileTree"?2:e.formView.type==="FolderTree"?3:e.formView.type==="String"||e.formView.type==="Path"?4:e.formView.type==="Password"?5:e.formView.type==="Enumeration"?6:e.formView.type==="Size"?7:e.formView.type==="Integer"?8:e.formView.type==="Boolean"?9:e.formView.type==="Flags"?10:e.formView.type==="Timespan"?11:-1)}}var ki=new Te,zn=["Bytes","KB","MB","GB","TB","PB"],bi=[{value:"",name:$localize`Keep all backups`},{value:"time",name:$localize`Delete backups that are older than`},{value:"versions",name:$localize`Keep a specific number of backups`},{value:"smart",name:$localize`Smart backup retention`},{value:"custom",name:$localize`Custom backup retention`}],Di=1024*1024*1024*2,Vi=1024*1024*5;var ne=class i{#e=N(we);#i=N(K);#t=N(b);formRef=ht.required("formRef");optionsForm=this.#e.optionsForm;selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=g(!1);isLoadingOptions=g(!0);sizeOptions=g(zn);serverSettingsEffect=q(()=>{let n=this.#i.serverSettings();if(n===void 0)return;this.isLoadingOptions.set(!0);let e=this.#e.nonSelectedOptions(),t=Object.entries(n);t.forEach(([a,p],v)=>{if(a.startsWith("--")){let y=a.replace("--",""),h=e.find(F=>F.name===y);h!==void 0?this.addNewOption(h,p):this.addFreeTextOption(y,p)}v===t.length-1&&this.isLoadingOptions.set(!1)})});oauthStartTokenCreation(n){}getFormFieldValue(n,e,t){return this.optionsForm.controls.advancedOptions.controls[t].value}removeFormView(n){let e="--"+n.name;this.#t.patchApiV1Serversettings({requestBody:{[e]:null}}).subscribe({next:t=>{window.location.reload()}})}addNewOption(n,e){this.#e.addOptionToFormGroup(n,e)}addFreeTextOption(n,e){this.#e.addFreeTextOption(n,e,{})}submit(){this.isSubmitting.set(!0);let n=this.optionsForm.value.advancedOptions;if(!n)return;let e=this.#n(n);this.#t.patchApiV1Serversettings({requestBody:e}).pipe(x(()=>this.isSubmitting.set(!1))).subscribe()}#n(n){let e={};for(let t in n)e[`--${t}`]=n[t];return e}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=z({type:i,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,t){e&1&&Ft(t.formRef,nn,5),e&2&&vt()},features:[At([we])],decls:20,vars:5,consts:()=>{let n;n=$localize` Advanced options ${"\uFFFD#5\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#7\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#6\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#8\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*10:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1:${"\uFFFD0:1\uFFFD"}:INTERPOLATION:${"[\uFFFD/#6\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*10:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_MENU:`,n=_e(n);let e;return e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Save `,[["formRef",""],["fieldTemplate",""],["option",""],n,e,[3,"submit","formGroup"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small"],["menu",""],["type","button"],[1,"form-actions"],["spk-button","","type","submit",1,"raised","primary"],["type","button",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["type","search",3,"id","formControlName"],[3,"value"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["type","search","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],["type","text","id","text",3,"formControlName"],["deselect","",3,"value"],[1,"raised","primary"]]},template:function(e,t){if(e&1){let a=M();r(0,"form",5,0),S("submit",function(){return C(a),E(t.submit())}),r(2,"app-toggle-card",6),ae(3,7),B(4,3),r(5,"spk-menu")(6,"button",8),f(7,"spk-icon"),o(),ae(8,9),w(9,an,3,1,"button",10,A),le(),o(),U(),le(),T(11,pn,2,0),Pt(12,11,on),o(),T(14,Xn,15,2,"ng-template",null,1,$t),r(16,"div",11)(17,"button",12),B(18,4),f(19,"spk-icon"),U(),o()()()}e&2&&(m("formGroup",t.optionsForm),s(2),m("disallowToggle",!0),s(7),G(t.nonSelectedOptions()),s(3),It(!t.isLoadingOptions()),s(5),I("loader",t.isSubmitting()))},dependencies:[Ce,me,j,Vt,Dt,H,ce,ue,ge,Se,Bt,Me,Ne,Ee,W,he,Xt,Oe,Pe,Wt,Kt],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 40px;align-items:flex-end}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var Q=class i{#e=N(b);#i=N(pe);repeatRegisterTimer=null;state=g("unknown");claimUrl=g(null);registerUrl=g("");status=k(()=>{let n=this.state();return n==="enabled"?"Remote control is enabled but not connected":n==="connected"?"Remote control is connected":n==="registering"?"Registering machine...":n==="registeringfaulted"?"Registration failed":n==="registered"?"Registered, waiting for accept":n==="disabled"?"Remote control is configured but not enabled":n==="unknown"?"...loading...":"Remote control is not set up"});sysInfoEffect=q(()=>{let n=this.#i.systemInfo();n&&this.registerUrl.set(n.RemoteControlRegistrationUrl??"")});#t(n){n.RegistrationUrl&&this.claimUrl.set(n.RegistrationUrl),n.IsConnected?this.state.set("connected"):n.IsEnabled?this.state.set("enabled"):n.CanEnable?this.state.set("disabled"):n.IsRegisteringFaulted?this.state.set("registeringfaulted"):n.IsRegistering?n.RegistrationUrl!=null&&n.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");let e=this.state();console.log("currentState: ",e),this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),e==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:t=>this.#t(t),error:t=>this.#n(t)})},5e3)),(e==="enabled"||e==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#t(t),error:t=>this.#n(t)})},5e3)),n.IsRegistering&&n.CanEnable&&this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:t=>this.#t(t)})}#n(n){this.#e.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#t(e)})}refreshRemoteControlStatus(){this.#e.getApiV1RemotecontrolStatus().subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})}beginRemoteRegistration(){this.state.set("registering"),this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:this.registerUrl()}}).subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})}cancelRemoteRegistration(){this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})}enableRemoteControl(){this.#e.postApiV1RemotecontrolEnable().subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})}disableRemoteControl(){this.#e.postApiV1RemotecontrolDisable().subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})}deleteRemoteControl(){let n=this;confirm("Are you sure you want to delete the remote control registration?")&&n.#e.deleteApiV1RemotecontrolRegistration().subscribe({next:e=>n.#t(e),error:e=>n.#n(e)})}static \u0275fac=function(e){return new(e||i)};static \u0275prov=se({token:i,factory:i.\u0275fac,providedIn:"root"})};function Bn(i,n){if(i&1){let e=M();r(0,"spk-form-field",10)(1,"input",11),X("ngModelChange",function(a){C(e);let p=l(2);return L(p.registerUrl,a)||(p.registerUrl=a),E(a)}),o()(),r(2,"button",12),S("click",function(){C(e);let a=l(2);return E(a.register())}),_(3,0),o()}if(i&2){let e=l(2);s(),V("ngModel",e.registerUrl)}}function Un(i,n){if(i&1&&(r(0,"div",8)(1,"label"),_(2,1),o(),r(3,"a",13),c(4),o()()),i&2){let e=l(2);s(3),R("href",e.claimUrl(),Ot),s(),$(e.claimUrl())}}function qn(i,n){i&1&&(r(0,"div",8)(1,"label"),_(2,2),o()())}function jn(i,n){if(i&1){let e=M();r(0,"button",12),S("click",function(){C(e);let a=l(2);return E(a.cancel())}),_(1,3),o()}}function Hn(i,n){if(i&1){let e=M();r(0,"button",12),S("click",function(){C(e);let a=l(2);return E(a.disable())}),_(1,4),o()}}function Wn(i,n){if(i&1){let e=M();r(0,"button",12),S("click",function(){C(e);let a=l(2);return E(a.enable())}),_(1,5),o(),r(2,"button",14),S("click",function(){C(e);let a=l(2);return E(a.delete())}),_(3,6),o()}}function Kn(i,n){if(i&1&&(r(0,"div",7),T(1,Bn,4,1)(2,Un,5,2,"div",8)(3,qn,3,0,"div",8)(4,jn,2,0,"button",9)(5,Hn,2,0,"button",9)(6,Wn,4,0),o()),i&2){let e=l();s(),u(e.state()==="inactive"?1:-1),s(),u(e.state()==="registered"?2:-1),s(),u(e.state()==="registering"?3:-1),s(),u(e.state()==="registering"||e.state()==="registeringfaulted"||e.state()==="registered"?4:-1),s(),u(e.state()==="connected"||e.state()==="enabled"?5:-1),s(),u(e.state()==="disabled"?6:-1)}}var Fe=class i{#e=N(Q);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=z({type:i,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let n;n=$localize`Register for remote control`;let e;e=$localize`Machine is now registered, open this link to add it to your account:`;let t;t=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let p;p=$localize`Disable remote control`;let v;v=$localize`Enable remote control`;let y;return y=$localize`Delete remote control setup`,[n,e,t,a,p,v,y,[1,"field-row"],[1,"field-col"],["type","button","spk-button","",1,"raised"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","spk-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","spk-button","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","spk-button","",1,"raised","warn",3,"click"]]},template:function(e,t){e&1&&T(0,Kn,7,6,"div",7),e&2&&u(t.state()!=="unknown"?0:-1)},dependencies:[fe,j,H,de,W],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};var Qn=()=>({standalone:!0});function Zn(i,n){i&1&&(r(0,"spk-icon",73),c(1,"check"),o())}function Jn(i,n){i&1&&(r(0,"spk-icon",74),c(1,"prohibit"),o())}function Yn(i,n){if(i&1){let e=M();r(0,"button",78),S("click",function(){C(e);let a=l(2);return E(a.updatePassphrase())}),_(1,35),o()}if(i&2){let e=l(2);I("loader",e.isUpdating())}}function ei(i,n){if(i&1){let e=M();r(0,"spk-tooltip",77)(1,"button",79),S("click",function(){C(e);let a=l(2);return E(a.updatePassphrase())}),_(2,36),o()()}if(i&2){let e=l(2);s(),I("loader",e.isUpdating()),m("disabled",!0)}}function ti(i,n){if(i&1){let e=M();r(0,"spk-form-field")(1,"label",69),_(2,32),o(),r(3,"input",70),X("ngModelChange",function(a){C(e);let p=l();return L(p.passphrase,a)||(p.passphrase=a),E(a)}),o()(),r(4,"spk-form-field")(5,"label",71),_(6,33),o(),r(7,"input",72),X("ngModelChange",function(a){C(e);let p=l();return L(p.repeatPassphrase,a)||(p.repeatPassphrase=a),E(a)}),o(),T(8,Zn,2,0,"spk-icon",73)(9,Jn,2,0,"spk-icon",74),o(),r(10,"div",50)(11,"button",75),S("click",function(){C(e);let a=l();return E(a.cancelPasswordChange())}),_(12,34),o(),T(13,Yn,2,2,"button",76)(14,ei,3,3,"spk-tooltip",77),o()}if(i&2){let e=l();s(3),V("ngModel",e.passphrase),s(4),m("disabled",e.passphrase().length===0),V("ngModel",e.repeatPassphrase),s(),u(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?8:9),s(3),I("loader",e.isUpdating()),s(2),u(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?13:14)}}function ni(i,n){i&1&&(r(0,"spk-icon",80),c(1,"check"),o())}function ii(i,n){if(i&1){let e=M();r(0,"div",50)(1,"button",75),S("click",function(){C(e);let a=l();return E(a.openPassphraseForm())}),_(2,37),o(),T(3,ni,2,0,"spk-icon",80),o()}if(i&2){let e=l();s(3),u(e.passwordUpdated()?3:-1)}}function oi(i,n){if(i&1&&(r(0,"spk-option",53),c(1),o()),i&2){let e=n.$implicit;m("value",e.value),s(),P(" ",e.label," ")}}function ri(i,n){if(i&1){let e=M();r(0,"spk-form-field")(1,"label",81),_(2,38),o(),r(3,"textarea",82),X("ngModelChange",function(a){C(e);let p=l();return L(p.allowedHostnames,a)||(p.allowedHostnames=a),E(a)}),o()(),r(4,"spk-alert",83),_(5,39),o(),r(6,"button",78),S("click",function(){C(e);let a=l();return E(a.updateAllowedHostnames())}),_(7,40),o()}if(i&2){let e=l();s(3),V("ngModel",e.allowedHostnames),s(3),I("loader",e.updatingAllowedHosts())}}function si(i,n){if(i&1&&c(0),i&2){let e,t=l();P(" ",(e=t.sysinfo())==null?null:e.ServerVersion," ")}}function ai(i,n){i&1&&f(0,"spk-progress-bar",56)}function li(i,n){if(i&1&&(r(0,"spk-option",53),c(1),o()),i&2){let e=n.$implicit;m("value",e),s(),$(e)}}function _i(i,n){if(i&1){let e=M();r(0,"spk-option",84),S("click",function(){let a=C(e).$implicit,p=l();return E(p.pauseSettings.controls.timeType.setValue(a.value))}),c(1),o()}if(i&2){let e=n.$implicit;m("value",e.value),s(),P(" ",e.label," ")}}function pi(i,n){if(i&1&&(r(0,"spk-option",53),c(1),o()),i&2){let e=n.$implicit;m("value",e.value),s(),P(" ",e.label," ")}}var ie=new Te,Yt=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],en=[{value:"",label:$localize`System default (information)`},{value:"information",label:$localize`Usage statistics, warnings, errors, and crashes`},{value:"warning",label:$localize`Warnings, errors and crashes`},{value:"error",label:$localize`Errors and crashes`},{value:"crash",label:$localize`Crashes only`},{value:"none",label:$localize`None / disabled`}],xe=class i{#e=N(jt);#i=N(pe);#t=N(b);#n=N(K);#r=N(Q);#o=N(bt);#s=this.#o.getItem("locale")??"en-US";sysinfo=this.#i.systemInfo;isDarkMode=this.#e.isDarkMode;editAs=g("list");langCtrl=g(this.#s);remoteControlStatus=this.#r.status;settingsForm=ie.group({pauseSettings:ie.group({time:ie.control(0),timeType:ie.control("s")}),usageStatistics:ie.control("")});updatingChannel=g(!1);updateChannel=g("");setNewChannel(n){let e=this.updateChannel();this.updateChannel.set(n),this.#t.patchApiV1Serversettings({requestBody:{"update-channel":n}}).pipe(x(()=>this.updatingChannel.set(!1)),J(()=>(this.updateChannel.set(e),Z(null)))).subscribe()}allowRemoteAccess=g(!1);allowedHostnames=g("");loadedAllowedHostnames=g("");updatingRemoteAccess=g(!1);updatingAllowedHosts=g(!1);updateRemoteAccess(){let n=this.allowRemoteAccess(),e=!n;this.allowRemoteAccess.set(e),e||this.#t.patchApiV1Serversettings({requestBody:{"server-listen-interface":e?"any":"loopback"}}).pipe(x(()=>this.updatingRemoteAccess.set(!1)),J(()=>(this.allowRemoteAccess.set(n),Z(null)))).subscribe()}updateAllowedHostnames(){let n=this.loadedAllowedHostnames(),e=this.allowedHostnames();this.updatingAllowedHosts.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"server-listen-interface":"any","allowed-hostnames":e}}).pipe(x(()=>this.updatingAllowedHosts.set(!1)),J(()=>(this.allowedHostnames.set(n),Z(null)))).subscribe()}updatingDisableTrayIconLogin=g(!1);disableTrayIconLogin=g(!1);saveDisableTrayIconLogin(){let n=this.disableTrayIconLogin(),e=!n;this.updatingDisableTrayIconLogin.set(!0),this.disableTrayIconLogin.set(e),this.#t.patchApiV1Serversettings({requestBody:{"disable-tray-icon-login":e?"True":"False"}}).pipe(x(()=>this.updatingDisableTrayIconLogin.set(!1)),J(()=>(this.disableTrayIconLogin.set(n),Z(null)))).subscribe()}showPassphraseForm=g(!1);isUpdating=g(!1);passphrase=g("");repeatPassphrase=g("");passwordUpdated=g(!1);updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(x(()=>this.isUpdating.set(!1))).subscribe({next:()=>{this.showPassphraseForm.set(!1),this.passwordUpdated.set(!0),setTimeout(()=>{this.passwordUpdated.set(!1)},3e3)}}))}openPassphraseForm(){this.showPassphraseForm.set(!0)}cancelPasswordChange(){this.showPassphraseForm.set(!1)}get pauseSettings(){return this.settingsForm.controls.pauseSettings}languageOptions=k(()=>{let n=this.langCtrl();return n?Ie.filter(e=>e.label.toLowerCase().includes(n.toLowerCase())):Ie});usageStatisticsOptions=g(en);timeTypeOptions=g(Yt);timeOptions=Ge([this.pauseSettings.controls.timeType.valueChanges.pipe(D("s")),this.pauseSettings.controls.time.valueChanges.pipe(D(null))],St(ft(([n,e])=>{let t=this.#a(n);return e!==null?t.filter(a=>a.toString().includes(e.toString())):t}),D([])));#a(n){let e=n==="h"?25:61;return new Array(e).fill(0).map((t,a)=>a)}saveLocale(n){this.#o.setItem("locale",n),window.location.reload()}submit(){let n=`${this.pauseSettings.controls.time.value}${this.pauseSettings.controls.timeType.value}`;this.#t.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.settingsForm.controls.usageStatistics.value,"startup-delay":n==="0s"?"":n}}).subscribe()}serverSettingsEffect=q(()=>{let n=this.#n.serverSettings();if(n===void 0)return;let e=n["startup-delay"],t=e.slice(-1),a=e.slice(0,-1),p=["s","m","h"];this.settingsForm.patchValue({pauseSettings:{time:parseInt(a==""?"0":a),timeType:p.includes(t)?t:"s"},usageStatistics:n["usage-reporter-level"]}),this.disableTrayIconLogin.set(n["disable-tray-icon-login"]!=="False"),this.updateChannel.set(n["update-channel"]),this.allowRemoteAccess.set(n["server-listen-interface"]==="any"),this.allowedHostnames.set(n["allowed-hostnames"]),this.loadedAllowedHostnames.set(n["allowed-hostnames"])});languageDisplay(){let n=this;return()=>{let e=n.langCtrl();return e?Ie.find(t=>t.value===e)?.label??null:null}}typeDisplay(){let n=this;return()=>{let e=n.settingsForm.value.pauseSettings?.timeType;return e==null?null:Yt.find(t=>t.value===e)?.label??null}}usageDisplay(){let n=this;return()=>{let e=n.settingsForm.value.usageStatistics;return e==null?null:en.find(t=>t.value===e)?.label??null}}setDarkMode(){this.#e.setDarkMode()}setLightMode(){this.#e.setLightMode()}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=z({type:i,selectors:[["app-settings"]],decls:140,vars:36,consts:()=>{let n;n=$localize`Settings`;let e;e=$localize`Configure your backup settings.`;let t;t=$localize` Save changes `;let a;a=$localize`Remote access control`;let p;p=$localize`Color theme`;let v;v=$localize`Customize your application theme`;let y;y=$localize`Passwords`;let h;h=$localize`Change server passphrase`;let F;F=$localize`Language`;let oe;oe=$localize`Select a language for the platform`;let $e;$e=$localize`Allow remote access (requires restart)`;let ke;ke=$localize` By allowing remote access, the server listens to requests from any machine on your network. If you enable this option, make sure you are always using the computer on a secure firewall protected network. `;let be;be=$localize`Allow remote access`;let De;De=$localize`Prevent tray icon automatic log-in`;let Ve;Ve=$localize` By default, the tray icon will open the user interface with a token that unlocks the user interface. This ensures that you can access the user interface from the tray icon, while requiring others to enter a password. If you prefer having to type in the password, even when accessing the user interface from the tray icon, enable this option. `;let Le;Le=$localize`Prevent tray icon automatic log-in`;let Xe;Xe=$localize`Update channel`;let ze;ze=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let Be;Be=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ue;Ue=$localize`Stable`;let qe;qe=$localize`Official releases`;let je;je=$localize`Beta`;let He;He=$localize` Try out the new features that we are working on. Currently the most stable version available. Test Restore data before using this in production environments. `;let We;We=$localize` Experimental `;let Ke;Ke=$localize`Specific builds for developers only. Not for use with important data.`;let Qe;Qe=$localize`Canary`;let Ze;Ze=$localize`Individual builds for developers only. Not for use with important data.`;let Je;Je=$localize`Pause after startup or hibernation`;let Ye;Ye=$localize` Duplicati will run when started, but will remain in paused state for the duration. Duplicati will occupy minimal system resources and no backups will be run. `;let et;et=$localize`Usage statistics`;let re;re=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#126\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#126\uFFFD"}:CLOSE_LINK:${"[\uFFFD#127\uFFFD\uFFFD/#127\uFFFD|\uFFFD#128\uFFFD\uFFFD/#128\uFFFD]"}:LINE_BREAK:${"[\uFFFD#127\uFFFD\uFFFD/#127\uFFFD|\uFFFD#128\uFFFD\uFFFD/#128\uFFFD]"}:LINE_BREAK: All usage reports are sent anonymously and do not contain any personal information. They contain information about hardware and operating system, the type of backend, backup duration, overall size of source data and similar data. They do not contain paths, filenames, usernames, passwords or similar sensitive information. `,re=_e(re);let tt;tt=$localize`Advanced options`;let nt;nt=$localize`Enter new password`;let it;it=$localize`Repeat password`;let ot;ot=$localize`Password have to be filled and have to match`;let rt;rt=$localize`Passphrase`;let st;st=$localize`Repeat passphrase`;let at;at=$localize`Cancel`;let lt;lt=$localize` Update passphrase `;let _t;_t=$localize` Update passphrase `;let pt;pt=$localize`Change password`;let ct;ct=$localize`Allowed hostnames`;let dt;dt=$localize` To prevent various DNS based attacks, Duplicati limits the allowed hostnames to the ones listed here. Direct IP access and localhost is always allowed. Multiple hostnames can be supplied with a semicolon separator. If any of the allowed hostnames is an asterisk (*), all hostnames are allowed and this feature is disabled. If the field is empty, only IP address and localhost access is allowed. `;let mt;return mt=$localize` Update allowed hostnames `,[n,e,t,a,p,v,y,h,F,oe,$e,ke,be,De,Ve,Le,Xe,ze,Be,Ue,qe,je,He,We,Ke,Qe,Ze,Je,Ye,et,re,tt,rt,st,at,lt,_t,pt,ct,dt,mt,[1,"content"],[1,"title"],["type","submit","spk-button","",1,"raised","primary",3,"disabled"],[1,"left"],[1,"right"],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[1,"right","passphrase-form"],[1,"actions"],[3,"change","displayFn","hideClearButton"],["type","search",3,"ngModelChange","ngModel","ngModelOptions"],[3,"value"],[1,"right","remote-access-form"],[1,"primary","raised",3,"click"],[1,"indeterminate","primary"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"primary","raised"],[1,"content",3,"submit","formGroup"],["formGroupName","pauseSettings",1,"field-row"],[3,"hideClearButton"],["type","search","formControlName","time"],[3,"displayFn","hideClearButton"],["type","text","formControlName","timeType"],["href","#"],[3,"displayFn"],["type","text","formControlName","usageStatistics"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",nt,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",it,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"spk-success"],["suffix",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"loader"],["message",ot,1,"primary"],["spk-button","",1,"raised","primary",3,"click"],["spk-button","",1,"raised","primary",3,"click","disabled"],[1,"spk-success"],["for","allowedHostnames"],["type","text","id","allowedHostnames",3,"ngModelChange","ngModel"],["type","primary"],[3,"click","value"]]},template:function(e,t){if(e&1&&(f(0,"app-status-bar"),r(1,"div",41)(2,"header")(3,"div",42)(4,"h2"),_(5,0),o(),r(6,"p"),_(7,1),o()(),r(8,"button",43),_(9,2),o()(),r(10,"section")(11,"div",44)(12,"h3"),_(13,3),o(),r(14,"p"),c(15),o()(),r(16,"div",45),f(17,"app-remote-control"),o()(),r(18,"section")(19,"div",44)(20,"h3"),_(21,4),o(),r(22,"p"),_(23,5),o()(),r(24,"div",45)(25,"div",46)(26,"img",47),S("click",function(){return t.setLightMode()}),o(),r(27,"img",48),S("click",function(){return t.setDarkMode()}),o()()()(),r(28,"section")(29,"div",44)(30,"h3"),_(31,6),o(),r(32,"p"),_(33,7),o()(),r(34,"div",49),T(35,ti,15,7)(36,ii,4,1,"div",50),o()(),r(37,"section")(38,"div",44)(39,"h3"),_(40,8),o(),r(41,"p"),_(42,9),o()(),r(43,"div",45)(44,"spk-select",51),S("change",function(p){return t.saveLocale(p)}),r(45,"input",52),X("ngModelChange",function(p){return L(t.langCtrl,p)||(t.langCtrl=p),p}),o(),w(46,oi,2,2,"spk-option",53,A),o()()(),r(48,"section")(49,"div",44)(50,"h3"),_(51,10),o(),r(52,"p"),_(53,11),o()(),r(54,"div",54)(55,"spk-toggle",55),S("click",function(){return t.updateRemoteAccess()}),r(56,"label"),_(57,12),o()(),T(58,ri,8,3),o()(),r(59,"section")(60,"div",44)(61,"h3"),_(62,13),o(),r(63,"p"),_(64,14),o()(),r(65,"div",45)(66,"spk-toggle",55),S("click",function(){return t.saveDisableTrayIconLogin()}),r(67,"label"),_(68,15),o()()()(),r(69,"section")(70,"div",44)(71,"h3"),_(72,16),o(),r(73,"p"),T(74,si,1,1),o(),T(75,ai,1,0,"spk-progress-bar",56),o(),r(76,"div",57)(77,"div",58),S("click",function(){return t.setNewChannel("")}),r(78,"spk-radio",59),_(79,17),o(),r(80,"p"),_(81,18),o()(),r(82,"div",58),S("click",function(){return t.setNewChannel("stable")}),r(83,"spk-radio",59),_(84,19),o(),r(85,"p"),_(86,20),o()(),r(87,"div",58),S("click",function(){return t.setNewChannel("beta")}),r(88,"spk-radio",59),_(89,21),o(),r(90,"p"),_(91,22),o()(),r(92,"div",58),S("click",function(){return t.setNewChannel("experimental")}),r(93,"spk-radio",59),_(94,23),o(),r(95,"p"),_(96,24),o()(),r(97,"div",58),S("click",function(){return t.setNewChannel("canary")}),r(98,"spk-radio",59),_(99,25),o(),r(100,"p"),_(101,26),o()()()()(),f(102,"spk-divider"),r(103,"form",60),S("submit",function(){return t.submit()}),r(104,"section")(105,"div",44)(106,"h3"),_(107,27),o(),r(108,"p"),_(109,28),o()(),r(110,"div",45)(111,"div",61)(112,"spk-select",62),f(113,"input",63),w(114,li,2,2,"spk-option",53,A),o(),r(116,"spk-select",64),f(117,"input",65),w(118,_i,2,2,"spk-option",53,A),o()()()(),r(120,"section")(121,"div",44)(122,"h3"),_(123,29),o(),r(124,"p"),B(125,30),f(126,"a",66)(127,"br")(128,"br"),U(),o()(),r(129,"div",45)(130,"spk-select",67),f(131,"input",68),w(132,pi,2,2,"spk-option",53,A),o()()(),r(134,"section")(135,"div",44)(136,"h3"),_(137,31),o()(),r(138,"div",45),f(139,"app-advanced-options-settings"),o()()()),e&2){let a,p,v;s(8),m("disabled",t.settingsForm.untouched),s(7),$(t.remoteControlStatus()),s(11),I("active",!t.isDarkMode()),s(),I("active",t.isDarkMode()),s(8),u(t.showPassphraseForm()?35:36),s(9),m("displayFn",t.languageDisplay())("hideClearButton",!0),s(),V("ngModel",t.langCtrl),m("ngModelOptions",wt(35,Qn)),s(),G(t.languageOptions()),s(9),I("active",t.allowRemoteAccess()),s(3),u(t.allowRemoteAccess()?58:-1),s(8),I("active",t.disableTrayIconLogin()),s(8),u(t.updateChannel()!==""&&((a=t.sysinfo())!=null&&a.ServerVersion)?74:-1),s(),u(t.updatingChannel()?75:-1),s(3),I("active",t.updateChannel()===""),s(),Y((p=t.sysinfo())==null?null:p.DefaultUpdateChannel),ee(79),s(2),Y((v=t.sysinfo())==null?null:v.ServerVersionType),ee(81),s(2),I("active",t.updateChannel()==="stable"),s(5),I("active",t.updateChannel()==="beta"),s(5),I("active",t.updateChannel()==="experimental"),s(5),I("active",t.updateChannel()==="canary"),s(5),m("formGroup",t.settingsForm),s(9),m("hideClearButton",!0),s(2),G(t.timeOptions()),s(2),m("displayFn",t.typeDisplay())("hideClearButton",!0),s(2),G(t.timeTypeOptions()),s(12),m("displayFn",t.usageDisplay()),s(2),G(t.usageStatisticsOptions())}},dependencies:[fe,me,j,H,ce,de,Ce,ue,ge,Se,Ht,Fe,ne,Oe,Ne,qt,Me,Ut,he,Pe,W,Ee,zt,Lt],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem 2rem}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem 0;position:sticky;top:0;background:var(--base-level-10);z-index:1000;border-bottom:1px solid var(--base-level-40)}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}section[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:2rem 0;border-top:1px solid var(--base-level-40)}section[_ngcontent-%COMP%]:first-of-type{border-top:0}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;align-items:flex-start}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] spk-button-group[_ngcontent-%COMP%]{margin-top:.25rem}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;width:50%}.passphrase-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:1rem}.passphrase-form[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.remote-access-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:240px;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-500)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] spk-radio[_ngcontent-%COMP%]{color:var(--base-level-60);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-level-60R)}.field-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};export{xe as default};
1
+ import{o as we}from"./chunk-CRJYNI4C.js";import{a as Wt}from"./chunk-G6DEVOXB.js";import{a as Kt}from"./chunk-HUO7ZRYL.js";import"./chunk-DNHLTHLR.js";import{a as Ae,b as te}from"./chunk-W2IUXLYE.js";import{a as Ie}from"./chunk-CGRSLVMY.js";import{a as pe}from"./chunk-MSZ6S4MV.js";import{a as jt}from"./chunk-JBUDJVPQ.js";import"./chunk-L6P5W22A.js";import{a as bt}from"./chunk-EQGWBFEW.js";import{a as Ht}from"./chunk-JYGPM2H4.js";import"./chunk-36BW3HQ7.js";import"./chunk-AUVXHFRE.js";import"./chunk-LLZCURV6.js";import"./chunk-DGDWETHE.js";import{a as Dt,b as j,d as H,e as ce,g as de,h as me,i as Vt,l as ue,m as Se,o as ge,p as Te,q as fe,r as Ce}from"./chunk-PHVHG2MW.js";import"./chunk-RACRCDGZ.js";import{b}from"./chunk-GOCS43XM.js";import"./chunk-ZTEWFJB7.js";import"./chunk-R2RIU25S.js";import{a as Ee,b as Lt,g as Ne,i as Xt,k as zt,l as W,n as Bt,o as Ut,p as qt,q as Oe,r as Me,w as he,x as Pe}from"./chunk-D64J3G73.js";import"./chunk-GKTIIZ72.js";import"./chunk-XVYQD36R.js";import"./chunk-ZLU2WKOF.js";import{Ab as w,Ac as $t,Bb as G,Cb as r,Db as o,Eb as f,F as Re,Fb as ae,G as x,Gb as le,Hb as yt,Ib as M,Mc as k,N as D,Nc as kt,Oa as Ot,Ob as B,Oc as q,Pb as U,Qb as _,Ra as s,Rb as Y,Sb as ee,Tb as _e,U as se,Ub as S,Vb as l,Xa as Mt,Ya as g,Yb as R,Za as ht,_ as N,_b as O,b as ut,c as St,ca as Ct,da as Et,eb as z,ec as Ft,fa as C,fc as vt,ga as E,gc as Rt,hc as c,ic as $,jc as P,k as gt,ka as Nt,kb as T,l as Z,mc as V,n as Tt,nc as L,oc as X,q as ft,qb as Pt,r as ve,rb as It,sc as At,tb as m,tc as wt,uc as Gt,vb as I,vc as xt,yb as u,z as J,zb as A}from"./chunk-ZYQXWAMY.js";import"./chunk-C6Q5SG76.js";function Qt(i,n,e){!n&&Et(i);let t=n??N(Nt);return e?Ct(t,e):t}function Ge(...i){let{normalizedSources:n,hasInitValue:e,operator:t,options:a}=tn(i),p=Qt(Ge,a?.injector);return e?te(ve(n).pipe(t),{initialValue:a.initialValue,injector:p}):te(ve(n).pipe(t),{injector:p,requireSync:!0})}function tn(i){if(!i||!i.length||typeof i[0]!="object")throw new TypeError("derivedFrom needs sources");let n=typeof i[1]=="function";if(i.length==3&&!n)throw new TypeError("derivedFrom needs pipeable operator as a second argument");n||i.splice(1,0,ut);let[e,t,a]=i,p=!!a&&"initialValue"in a;return{normalizedSources:Object.entries(e).reduce((y,[h,F])=>{if(Mt(F))y[h]=Ae(F,{injector:a?.injector}).pipe(D(kt(F)));else if(Tt(F))y[h]=F.pipe(Re());else if(typeof F=="function"){let oe=k(F);y[h]=Ae(oe,{injector:a?.injector}).pipe(D(F()))}else y[h]=gt(F).pipe(Re());return y},Array.isArray(e)?[]:{}),operator:t,hasInitValue:p,options:a}}var K=class i{#e=N(b);#i=te(this.#e.getApiV1Serversettings());#t=g(void 0);serverSettings=k(()=>this.#t()||this.#i());refreshServerSettings(){this.#e.getApiV1Serversettings().subscribe({next:n=>{this.#t.set(n)}})}static \u0275fac=function(e){return new(e||i)};static \u0275prov=se({token:i,factory:i.\u0275fac,providedIn:"root"})};var nn=["formRef"],on=()=>[import("./chunk-7DREMJ5Y.js").then(i=>i.NgTemplateOutlet)],rn=(i,n)=>({index:i,formView:n,formGroupName:"advancedOptions",destinationType:null,oauthField:null}),sn=i=>({$implicit:i});function an(i,n){if(i&1){let e=M();B(0,3,1),r(1,"button",13,2),S("click",function(){let a=C(e).$implicit,p=l();return E(p.addNewOption(a))}),o(),U()}if(i&2){let e=n.$implicit;s(),Y(e.name),ee(0)}}function ln(i,n){i&1&&yt(0)}function _n(i,n){if(i&1&&T(0,ln,1,0,"ng-container",14),i&2){let e=n.$implicit,t=n.$index;l(2);let a=Rt(15);m("ngTemplateOutlet",a)("ngTemplateOutletContext",Gt(5,sn,xt(2,rn,t,e)))}}function pn(i,n){if(i&1&&w(0,_n,1,7,"ng-container",null,A),i&2){let e=l();G(e.selectedOptions())}}function cn(i,n){if(i&1&&(r(0,"spk-tooltip",24)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;m("message",e.formView.longDescription)}}function dn(i,n){if(i&1&&(r(0,"app-file-tree",17)(1,"label",23),c(2),T(3,cn,3,1,"spk-tooltip",24),o(),f(4,"input",25),o()),i&2){let e,t=l().$implicit,a=l();m("startingPath",a.getFormFieldValue(0,t.formGroupName,t.formView.name))("accepts",t.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),O("for","destination-",t.formGroupName,"-",t.index,""),s(),P(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),u(t.formView.longDescription?3:-1),s(),O("id","destination-",t.formGroupName,"-",t.index,""),R("formControlName",t.formView.name)}}function mn(i,n){if(i&1&&(r(0,"spk-tooltip",24)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;m("message",e.formView.longDescription)}}function un(i,n){if(i&1&&(r(0,"app-file-tree",18)(1,"label",23),c(2),T(3,mn,3,1,"spk-tooltip",24),o(),f(4,"input",25),o()),i&2){let e,t=l().$implicit,a=l();m("startingPath",a.getFormFieldValue(0,t.formGroupName,t.formView.name)),s(),O("for","destination-",t.formGroupName,"-",t.index,""),s(),P(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),u(t.formView.longDescription?3:-1),s(),O("id","destination-",t.formGroupName,"-",t.index,""),R("formControlName",t.formView.name)}}function Sn(i,n){if(i&1&&(r(0,"spk-tooltip",24)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;m("message",e.formView.longDescription)}}function gn(i,n){i&1&&(r(0,"spk-icon",26),c(1,"link"),o())}function Tn(i,n){i&1&&(r(0,"spk-icon",26),c(1,"textbox"),o())}function fn(i,n){if(i&1&&(r(0,"spk-form-field")(1,"label",23),c(2),T(3,Sn,3,1,"spk-tooltip",24),o(),f(4,"input",25),T(5,gn,2,0,"spk-icon",26)(6,Tn,2,0,"spk-icon",26),o()),i&2){let e,t=l().$implicit;s(),O("for","destination-",t.formGroupName,"-",t.index,""),s(),P(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),u(t.formView.longDescription?3:-1),s(),O("id","destination-",t.formGroupName,"-",t.index,""),R("formControlName",t.formView.name),s(),u(t.formView.type==="Path"?5:6)}}function Cn(i,n){if(i&1){let e=M();r(0,"span",30),S("click",function(){C(e);let a=l(2).$implicit,p=l();return E(p.oauthStartTokenCreation(a.formViewType))}),c(1,"AuthID"),o()}}function En(i,n){i&1&&(r(0,"spk-icon",26),c(1,"password"),o())}function Nn(i,n){if(i&1){let e=M();r(0,"spk-icon",31),S("click",function(){C(e);let a=l(2).$implicit;return E(a.formView.showPassword=!a.formView.showPassword)}),c(1," eye "),o()}}function On(i,n){if(i&1){let e=M();r(0,"spk-icon",31),S("click",function(){C(e);let a=l(2).$implicit;return E(a.formView.showPassword=!a.formView.showPassword)}),c(1," eye-slash "),o()}}function Mn(i,n){if(i&1&&(r(0,"spk-form-field")(1,"label",23),c(2),o(),f(3,"input",27),T(4,Cn,2,0,"span",28)(5,En,2,0,"spk-icon",26)(6,Nn,2,0,"spk-icon",29)(7,On,2,0,"spk-icon",29),o()),i&2){let e,t=l().$implicit;s(),O("for","destination-",t.formGroupName,"-",t.index,""),s(),P(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),O("id","destination-",t.formGroupName,"-",t.index,""),R("formControlName",t.formView.name),m("type",t.formView.showPassword?"text":"password"),s(),u(t.oauthField===t.formView.name?4:5),s(2),u(t.formView.showPassword?6:7)}}function hn(i,n){if(i&1&&(r(0,"spk-tooltip",24)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;m("message",e.formView.longDescription)}}function Pn(i,n){if(i&1&&(r(0,"spk-option",33),c(1),o()),i&2){let e=n.$implicit;m("value",e),s(),$(e)}}function In(i,n){if(i&1&&(r(0,"spk-select")(1,"label",23),c(2),T(3,hn,3,1,"spk-tooltip",24),o(),f(4,"input",32),w(5,Pn,2,2,"spk-option",33,A),o()),i&2){let e,t=l().$implicit;s(),O("for","destination-",t.formGroupName,"-",t.index,""),s(),P(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),u(t.formView.longDescription?3:-1),s(),O("id","destination-",t.formGroupName,"-",t.index,""),R("formControlName",t.formView.name),s(),G(t.formView.options)}}function yn(i,n){if(i&1&&(r(0,"spk-tooltip",24)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;m("message",e.formView.longDescription)}}function Fn(i,n){if(i&1&&(r(0,"spk-option",33),c(1),o()),i&2){let e=n.$implicit;m("value",e),s(),$(e)}}function vn(i,n){if(i&1&&(r(0,"div",19)(1,"label",23),c(2),T(3,yn,3,1,"spk-tooltip",24),o(),r(4,"div",34)(5,"spk-form-field"),f(6,"input",35),r(7,"spk-icon",26),c(8,"resize"),o()(),r(9,"spk-select"),f(10,"label")(11,"input",36),w(12,Fn,2,2,"spk-option",33,A),o()()()),i&2){let e,t=l().$implicit,a=l();m("formGroupName",t.formView.name),s(),O("for","destination-",t.formGroupName,"-",t.index,""),s(),P(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),u(t.formView.longDescription?3:-1),s(3),O("id","destination-",t.formGroupName,"-",t.index,""),s(6),G(a.sizeOptions())}}function Rn(i,n){if(i&1&&(r(0,"spk-tooltip",24)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;m("message",e.formView.longDescription)}}function An(i,n){if(i&1&&(r(0,"spk-form-field")(1,"label",23),c(2),T(3,Rn,3,1,"spk-tooltip",24),o(),f(4,"input",37),r(5,"spk-icon",26),c(6,"numpad"),o()()),i&2){let e,t=l().$implicit;s(),O("for","destination-",t.formGroupName,"-",t.index,""),s(),P(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),u(t.formView.longDescription?3:-1),s(),O("id","destination-",t.formGroupName,"-",t.index,""),R("formControlName",t.formView.name)}}function wn(i,n){if(i&1&&(r(0,"spk-tooltip",24)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;m("message",e.formView.longDescription)}}function Gn(i,n){if(i&1&&(r(0,"spk-toggle",20)(1,"label",23),c(2),T(3,wn,3,1,"spk-tooltip",24),o(),f(4,"input",38),o()),i&2){let e,t=l().$implicit;s(),O("for","destination-",t.formGroupName,"-",t.index,""),s(),P(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),u(t.formView.longDescription?3:-1),s(),O("id","destination-",t.formGroupName,"-",t.index,""),R("formControlName",t.formView.name)}}function xn(i,n){if(i&1&&(r(0,"spk-tooltip",24)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;m("message",e.formView.longDescription)}}function $n(i,n){i&1&&(r(0,"spk-option",40),c(1,"None"),o()),i&2&&m("value","None")}function kn(i,n){if(i&1&&(r(0,"spk-option",33),c(1),f(2,"spk-checkbox",41),o()),i&2){let e=l().$implicit;m("value",e),s(),P(" ",e," ")}}function bn(i,n){if(i&1&&T(0,$n,2,1,"spk-option",40)(1,kn,3,2,"spk-option",33),i&2){let e=n.$implicit;u(e==="None"?0:1)}}function Dn(i,n){if(i&1&&(r(0,"spk-select",21)(1,"label",23),c(2),T(3,xn,3,1,"spk-tooltip",24),o(),f(4,"input",39),w(5,bn,2,1,null,null,A),o()),i&2){let e,t=l().$implicit;m("selectMultiple",!0),s(),O("for","destination-",t.formGroupName,"-",t.index,""),s(),P(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),u(t.formView.longDescription?3:-1),s(),R("formControlName",t.formView.name),s(),G(t.formView.options)}}function Vn(i,n){if(i&1&&(r(0,"spk-tooltip",24)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;m("message",e.formView.longDescription)}}function Ln(i,n){if(i&1&&(r(0,"spk-form-field")(1,"label",23),c(2),T(3,Vn,3,1,"spk-tooltip",24),o(),f(4,"input",25),o()),i&2){let e,t=l().$implicit;s(),O("for","destination-",t.formGroupName,"-",t.index,""),s(),P(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),u(t.formView.longDescription?3:-1),s(),O("id","destination-",t.formGroupName,"-",t.index,""),R("formControlName",t.formView.name)}}function Xn(i,n){if(i&1){let e=M();r(0,"div",15),ae(1,16),T(2,dn,5,14,"app-file-tree",17)(3,un,5,10,"app-file-tree",18)(4,fn,7,10,"spk-form-field")(5,Mn,8,11,"spk-form-field")(6,In,7,9,"spk-select")(7,vn,14,9,"div",19)(8,An,7,9,"spk-form-field")(9,Gn,5,9,"spk-toggle",20)(10,Dn,7,7,"spk-select",21)(11,Ln,5,9,"spk-form-field"),le(),r(12,"button",22),S("click",function(){let a=C(e).$implicit,p=l();return E(p.removeFormView(a.formView))}),r(13,"spk-icon"),c(14,"x-circle"),o()()()}if(i&2){let e=n.$implicit;s(),m("formGroupName",e.formGroupName),s(),u(e.formView.type==="FileTree"?2:e.formView.type==="FolderTree"?3:e.formView.type==="String"||e.formView.type==="Path"?4:e.formView.type==="Password"?5:e.formView.type==="Enumeration"?6:e.formView.type==="Size"?7:e.formView.type==="Integer"?8:e.formView.type==="Boolean"?9:e.formView.type==="Flags"?10:e.formView.type==="Timespan"?11:-1)}}var ki=new Te,zn=["Bytes","KB","MB","GB","TB","PB"],bi=[{value:"",name:$localize`Keep all backups`},{value:"time",name:$localize`Delete backups that are older than`},{value:"versions",name:$localize`Keep a specific number of backups`},{value:"smart",name:$localize`Smart backup retention`},{value:"custom",name:$localize`Custom backup retention`}],Di=1024*1024*1024*2,Vi=1024*1024*5;var ne=class i{#e=N(we);#i=N(K);#t=N(b);formRef=ht.required("formRef");optionsForm=this.#e.optionsForm;selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=g(!1);isLoadingOptions=g(!0);sizeOptions=g(zn);serverSettingsEffect=q(()=>{let n=this.#i.serverSettings();if(n===void 0)return;this.isLoadingOptions.set(!0);let e=this.#e.nonSelectedOptions(),t=Object.entries(n);t.forEach(([a,p],v)=>{if(a.startsWith("--")){let y=a.replace("--",""),h=e.find(F=>F.name===y);h!==void 0?this.addNewOption(h,p):this.addFreeTextOption(y,p)}v===t.length-1&&this.isLoadingOptions.set(!1)})});oauthStartTokenCreation(n){}getFormFieldValue(n,e,t){return this.optionsForm.controls.advancedOptions.controls[t].value}removeFormView(n){let e="--"+n.name;this.#t.patchApiV1Serversettings({requestBody:{[e]:null}}).subscribe({next:t=>{window.location.reload()}})}addNewOption(n,e){this.#e.addOptionToFormGroup(n,e)}addFreeTextOption(n,e){this.#e.addFreeTextOption(n,e,{})}submit(){this.isSubmitting.set(!0);let n=this.optionsForm.value.advancedOptions;if(!n)return;let e=this.#n(n);this.#t.patchApiV1Serversettings({requestBody:e}).pipe(x(()=>this.isSubmitting.set(!1))).subscribe()}#n(n){let e={};for(let t in n)e[`--${t}`]=n[t];return e}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=z({type:i,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,t){e&1&&Ft(t.formRef,nn,5),e&2&&vt()},features:[At([we])],decls:20,vars:5,consts:()=>{let n;n=$localize` Advanced options ${"\uFFFD#5\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#7\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#6\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#8\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*10:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1:${"\uFFFD0:1\uFFFD"}:INTERPOLATION:${"[\uFFFD/#6\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*10:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_MENU:`,n=_e(n);let e;return e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Save `,[["formRef",""],["fieldTemplate",""],["option",""],n,e,[3,"submit","formGroup"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small"],["menu",""],["type","button"],[1,"form-actions"],["spk-button","","type","submit",1,"raised","primary"],["type","button",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["type","search",3,"id","formControlName"],[3,"value"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["type","search","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],["type","text","id","text",3,"formControlName"],["deselect","",3,"value"],[1,"raised","primary"]]},template:function(e,t){if(e&1){let a=M();r(0,"form",5,0),S("submit",function(){return C(a),E(t.submit())}),r(2,"app-toggle-card",6),ae(3,7),B(4,3),r(5,"spk-menu")(6,"button",8),f(7,"spk-icon"),o(),ae(8,9),w(9,an,3,1,"button",10,A),le(),o(),U(),le(),T(11,pn,2,0),Pt(12,11,on),o(),T(14,Xn,15,2,"ng-template",null,1,$t),r(16,"div",11)(17,"button",12),B(18,4),f(19,"spk-icon"),U(),o()()()}e&2&&(m("formGroup",t.optionsForm),s(2),m("disallowToggle",!0),s(7),G(t.nonSelectedOptions()),s(3),It(!t.isLoadingOptions()),s(5),I("loader",t.isSubmitting()))},dependencies:[Ce,me,j,Vt,Dt,H,ce,ue,ge,Se,Bt,Me,Ne,Ee,W,he,Xt,Oe,Pe,Wt,Kt],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 40px;align-items:flex-end}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var Q=class i{#e=N(b);#i=N(pe);repeatRegisterTimer=null;state=g("unknown");claimUrl=g(null);registerUrl=g("");status=k(()=>{let n=this.state();return n==="enabled"?"Remote control is enabled but not connected":n==="connected"?"Remote control is connected":n==="registering"?"Registering machine...":n==="registeringfaulted"?"Registration failed":n==="registered"?"Registered, waiting for accept":n==="disabled"?"Remote control is configured but not enabled":n==="unknown"?"...loading...":"Remote control is not set up"});sysInfoEffect=q(()=>{let n=this.#i.systemInfo();n&&this.registerUrl.set(n.RemoteControlRegistrationUrl??"")});#t(n){n.RegistrationUrl&&this.claimUrl.set(n.RegistrationUrl),n.IsConnected?this.state.set("connected"):n.IsEnabled?this.state.set("enabled"):n.CanEnable?this.state.set("disabled"):n.IsRegisteringFaulted?this.state.set("registeringfaulted"):n.IsRegistering?n.RegistrationUrl!=null&&n.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");let e=this.state();console.log("currentState: ",e),this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),e==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:t=>this.#t(t),error:t=>this.#n(t)})},5e3)),(e==="enabled"||e==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#t(t),error:t=>this.#n(t)})},5e3)),n.IsRegistering&&n.CanEnable&&this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:t=>this.#t(t)})}#n(n){this.#e.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#t(e)})}refreshRemoteControlStatus(){this.#e.getApiV1RemotecontrolStatus().subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})}beginRemoteRegistration(){this.state.set("registering"),this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:this.registerUrl()}}).subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})}cancelRemoteRegistration(){this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})}enableRemoteControl(){this.#e.postApiV1RemotecontrolEnable().subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})}disableRemoteControl(){this.#e.postApiV1RemotecontrolDisable().subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})}deleteRemoteControl(){let n=this;confirm("Are you sure you want to delete the remote control registration?")&&n.#e.deleteApiV1RemotecontrolRegistration().subscribe({next:e=>n.#t(e),error:e=>n.#n(e)})}static \u0275fac=function(e){return new(e||i)};static \u0275prov=se({token:i,factory:i.\u0275fac,providedIn:"root"})};function Bn(i,n){if(i&1){let e=M();r(0,"spk-form-field",10)(1,"input",11),X("ngModelChange",function(a){C(e);let p=l(2);return L(p.registerUrl,a)||(p.registerUrl=a),E(a)}),o()(),r(2,"button",12),S("click",function(){C(e);let a=l(2);return E(a.register())}),_(3,0),o()}if(i&2){let e=l(2);s(),V("ngModel",e.registerUrl)}}function Un(i,n){if(i&1&&(r(0,"div",8)(1,"label"),_(2,1),o(),r(3,"a",13),c(4),o()()),i&2){let e=l(2);s(3),R("href",e.claimUrl(),Ot),s(),$(e.claimUrl())}}function qn(i,n){i&1&&(r(0,"div",8)(1,"label"),_(2,2),o()())}function jn(i,n){if(i&1){let e=M();r(0,"button",12),S("click",function(){C(e);let a=l(2);return E(a.cancel())}),_(1,3),o()}}function Hn(i,n){if(i&1){let e=M();r(0,"button",12),S("click",function(){C(e);let a=l(2);return E(a.disable())}),_(1,4),o()}}function Wn(i,n){if(i&1){let e=M();r(0,"button",12),S("click",function(){C(e);let a=l(2);return E(a.enable())}),_(1,5),o(),r(2,"button",14),S("click",function(){C(e);let a=l(2);return E(a.delete())}),_(3,6),o()}}function Kn(i,n){if(i&1&&(r(0,"div",7),T(1,Bn,4,1)(2,Un,5,2,"div",8)(3,qn,3,0,"div",8)(4,jn,2,0,"button",9)(5,Hn,2,0,"button",9)(6,Wn,4,0),o()),i&2){let e=l();s(),u(e.state()==="inactive"?1:-1),s(),u(e.state()==="registered"?2:-1),s(),u(e.state()==="registering"?3:-1),s(),u(e.state()==="registering"||e.state()==="registeringfaulted"||e.state()==="registered"?4:-1),s(),u(e.state()==="connected"||e.state()==="enabled"?5:-1),s(),u(e.state()==="disabled"?6:-1)}}var Fe=class i{#e=N(Q);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=z({type:i,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let n;n=$localize`Register for remote control`;let e;e=$localize`Machine is now registered, open this link to add it to your account:`;let t;t=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let p;p=$localize`Disable remote control`;let v;v=$localize`Enable remote control`;let y;return y=$localize`Delete remote control setup`,[n,e,t,a,p,v,y,[1,"field-row"],[1,"field-col"],["type","button","spk-button","",1,"raised"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","spk-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","spk-button","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","spk-button","",1,"raised","warn",3,"click"]]},template:function(e,t){e&1&&T(0,Kn,7,6,"div",7),e&2&&u(t.state()!=="unknown"?0:-1)},dependencies:[fe,j,H,de,W],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};var Qn=()=>({standalone:!0});function Zn(i,n){i&1&&(r(0,"spk-icon",73),c(1,"check"),o())}function Jn(i,n){i&1&&(r(0,"spk-icon",74),c(1,"prohibit"),o())}function Yn(i,n){if(i&1){let e=M();r(0,"button",78),S("click",function(){C(e);let a=l(2);return E(a.updatePassphrase())}),_(1,35),o()}if(i&2){let e=l(2);I("loader",e.isUpdating())}}function ei(i,n){if(i&1){let e=M();r(0,"spk-tooltip",77)(1,"button",79),S("click",function(){C(e);let a=l(2);return E(a.updatePassphrase())}),_(2,36),o()()}if(i&2){let e=l(2);s(),I("loader",e.isUpdating()),m("disabled",!0)}}function ti(i,n){if(i&1){let e=M();r(0,"spk-form-field")(1,"label",69),_(2,32),o(),r(3,"input",70),X("ngModelChange",function(a){C(e);let p=l();return L(p.passphrase,a)||(p.passphrase=a),E(a)}),o()(),r(4,"spk-form-field")(5,"label",71),_(6,33),o(),r(7,"input",72),X("ngModelChange",function(a){C(e);let p=l();return L(p.repeatPassphrase,a)||(p.repeatPassphrase=a),E(a)}),o(),T(8,Zn,2,0,"spk-icon",73)(9,Jn,2,0,"spk-icon",74),o(),r(10,"div",50)(11,"button",75),S("click",function(){C(e);let a=l();return E(a.cancelPasswordChange())}),_(12,34),o(),T(13,Yn,2,2,"button",76)(14,ei,3,3,"spk-tooltip",77),o()}if(i&2){let e=l();s(3),V("ngModel",e.passphrase),s(4),m("disabled",e.passphrase().length===0),V("ngModel",e.repeatPassphrase),s(),u(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?8:9),s(3),I("loader",e.isUpdating()),s(2),u(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?13:14)}}function ni(i,n){i&1&&(r(0,"spk-icon",80),c(1,"check"),o())}function ii(i,n){if(i&1){let e=M();r(0,"div",50)(1,"button",75),S("click",function(){C(e);let a=l();return E(a.openPassphraseForm())}),_(2,37),o(),T(3,ni,2,0,"spk-icon",80),o()}if(i&2){let e=l();s(3),u(e.passwordUpdated()?3:-1)}}function oi(i,n){if(i&1&&(r(0,"spk-option",53),c(1),o()),i&2){let e=n.$implicit;m("value",e.value),s(),P(" ",e.label," ")}}function ri(i,n){if(i&1){let e=M();r(0,"spk-form-field")(1,"label",81),_(2,38),o(),r(3,"textarea",82),X("ngModelChange",function(a){C(e);let p=l();return L(p.allowedHostnames,a)||(p.allowedHostnames=a),E(a)}),o()(),r(4,"spk-alert",83),_(5,39),o(),r(6,"button",78),S("click",function(){C(e);let a=l();return E(a.updateAllowedHostnames())}),_(7,40),o()}if(i&2){let e=l();s(3),V("ngModel",e.allowedHostnames),s(3),I("loader",e.updatingAllowedHosts())}}function si(i,n){if(i&1&&c(0),i&2){let e,t=l();P(" ",(e=t.sysinfo())==null?null:e.ServerVersion," ")}}function ai(i,n){i&1&&f(0,"spk-progress-bar",56)}function li(i,n){if(i&1&&(r(0,"spk-option",53),c(1),o()),i&2){let e=n.$implicit;m("value",e),s(),$(e)}}function _i(i,n){if(i&1){let e=M();r(0,"spk-option",84),S("click",function(){let a=C(e).$implicit,p=l();return E(p.pauseSettings.controls.timeType.setValue(a.value))}),c(1),o()}if(i&2){let e=n.$implicit;m("value",e.value),s(),P(" ",e.label," ")}}function pi(i,n){if(i&1&&(r(0,"spk-option",53),c(1),o()),i&2){let e=n.$implicit;m("value",e.value),s(),P(" ",e.label," ")}}var ie=new Te,Yt=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],en=[{value:"",label:$localize`System default (information)`},{value:"information",label:$localize`Usage statistics, warnings, errors, and crashes`},{value:"warning",label:$localize`Warnings, errors and crashes`},{value:"error",label:$localize`Errors and crashes`},{value:"crash",label:$localize`Crashes only`},{value:"none",label:$localize`None / disabled`}],xe=class i{#e=N(jt);#i=N(pe);#t=N(b);#n=N(K);#r=N(Q);#o=N(bt);#s=this.#o.getItem("locale")??"en-US";sysinfo=this.#i.systemInfo;isDarkMode=this.#e.isDarkMode;editAs=g("list");langCtrl=g(this.#s);remoteControlStatus=this.#r.status;settingsForm=ie.group({pauseSettings:ie.group({time:ie.control(0),timeType:ie.control("s")}),usageStatistics:ie.control("")});updatingChannel=g(!1);updateChannel=g("");setNewChannel(n){let e=this.updateChannel();this.updateChannel.set(n),this.#t.patchApiV1Serversettings({requestBody:{"update-channel":n}}).pipe(x(()=>this.updatingChannel.set(!1)),J(()=>(this.updateChannel.set(e),Z(null)))).subscribe()}allowRemoteAccess=g(!1);allowedHostnames=g("");loadedAllowedHostnames=g("");updatingRemoteAccess=g(!1);updatingAllowedHosts=g(!1);updateRemoteAccess(){let n=this.allowRemoteAccess(),e=!n;this.allowRemoteAccess.set(e),e||this.#t.patchApiV1Serversettings({requestBody:{"server-listen-interface":e?"any":"loopback"}}).pipe(x(()=>this.updatingRemoteAccess.set(!1)),J(()=>(this.allowRemoteAccess.set(n),Z(null)))).subscribe()}updateAllowedHostnames(){let n=this.loadedAllowedHostnames(),e=this.allowedHostnames();this.updatingAllowedHosts.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"server-listen-interface":"any","allowed-hostnames":e}}).pipe(x(()=>this.updatingAllowedHosts.set(!1)),J(()=>(this.allowedHostnames.set(n),Z(null)))).subscribe()}updatingDisableTrayIconLogin=g(!1);disableTrayIconLogin=g(!1);saveDisableTrayIconLogin(){let n=this.disableTrayIconLogin(),e=!n;this.updatingDisableTrayIconLogin.set(!0),this.disableTrayIconLogin.set(e),this.#t.patchApiV1Serversettings({requestBody:{"disable-tray-icon-login":e?"True":"False"}}).pipe(x(()=>this.updatingDisableTrayIconLogin.set(!1)),J(()=>(this.disableTrayIconLogin.set(n),Z(null)))).subscribe()}showPassphraseForm=g(!1);isUpdating=g(!1);passphrase=g("");repeatPassphrase=g("");passwordUpdated=g(!1);updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(x(()=>this.isUpdating.set(!1))).subscribe({next:()=>{this.showPassphraseForm.set(!1),this.passwordUpdated.set(!0),setTimeout(()=>{this.passwordUpdated.set(!1)},3e3)}}))}openPassphraseForm(){this.showPassphraseForm.set(!0)}cancelPasswordChange(){this.showPassphraseForm.set(!1)}get pauseSettings(){return this.settingsForm.controls.pauseSettings}languageOptions=k(()=>{let n=this.langCtrl();return n?Ie.filter(e=>e.label.toLowerCase().includes(n.toLowerCase())):Ie});usageStatisticsOptions=g(en);timeTypeOptions=g(Yt);timeOptions=Ge([this.pauseSettings.controls.timeType.valueChanges.pipe(D("s")),this.pauseSettings.controls.time.valueChanges.pipe(D(null))],St(ft(([n,e])=>{let t=this.#a(n);return e!==null?t.filter(a=>a.toString().includes(e.toString())):t}),D([])));#a(n){let e=n==="h"?25:61;return new Array(e).fill(0).map((t,a)=>a)}saveLocale(n){this.#o.setItem("locale",n),window.location.reload()}submit(){let n=`${this.pauseSettings.controls.time.value}${this.pauseSettings.controls.timeType.value}`;this.#t.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.settingsForm.controls.usageStatistics.value,"startup-delay":n==="0s"?"":n}}).subscribe()}serverSettingsEffect=q(()=>{let n=this.#n.serverSettings();if(n===void 0)return;let e=n["startup-delay"],t=e.slice(-1),a=e.slice(0,-1),p=["s","m","h"];this.settingsForm.patchValue({pauseSettings:{time:parseInt(a==""?"0":a),timeType:p.includes(t)?t:"s"},usageStatistics:n["usage-reporter-level"]}),this.disableTrayIconLogin.set(n["disable-tray-icon-login"]!=="False"),this.updateChannel.set(n["update-channel"]),this.allowRemoteAccess.set(n["server-listen-interface"]==="any"),this.allowedHostnames.set(n["allowed-hostnames"]),this.loadedAllowedHostnames.set(n["allowed-hostnames"])});languageDisplay(){let n=this;return()=>{let e=n.langCtrl();return e?Ie.find(t=>t.value===e)?.label??null:null}}typeDisplay(){let n=this;return()=>{let e=n.settingsForm.value.pauseSettings?.timeType;return e==null?null:Yt.find(t=>t.value===e)?.label??null}}usageDisplay(){let n=this;return()=>{let e=n.settingsForm.value.usageStatistics;return e==null?null:en.find(t=>t.value===e)?.label??null}}setDarkMode(){this.#e.setDarkMode()}setLightMode(){this.#e.setLightMode()}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=z({type:i,selectors:[["app-settings"]],decls:140,vars:36,consts:()=>{let n;n=$localize`Settings`;let e;e=$localize`Configure your backup settings.`;let t;t=$localize` Save changes `;let a;a=$localize`Remote access control`;let p;p=$localize`Color theme`;let v;v=$localize`Customize your application theme`;let y;y=$localize`Passwords`;let h;h=$localize`Change server passphrase`;let F;F=$localize`Language`;let oe;oe=$localize`Select a language for the platform`;let $e;$e=$localize`Allow remote access (requires restart)`;let ke;ke=$localize` By allowing remote access, the server listens to requests from any machine on your network. If you enable this option, make sure you are always using the computer on a secure firewall protected network. `;let be;be=$localize`Allow remote access`;let De;De=$localize`Prevent tray icon automatic log-in`;let Ve;Ve=$localize` By default, the tray icon will open the user interface with a token that unlocks the user interface. This ensures that you can access the user interface from the tray icon, while requiring others to enter a password. If you prefer having to type in the password, even when accessing the user interface from the tray icon, enable this option. `;let Le;Le=$localize`Prevent tray icon automatic log-in`;let Xe;Xe=$localize`Update channel`;let ze;ze=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let Be;Be=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ue;Ue=$localize`Stable`;let qe;qe=$localize`Official releases`;let je;je=$localize`Beta`;let He;He=$localize` Try out the new features that we are working on. Currently the most stable version available. Test Restore data before using this in production environments. `;let We;We=$localize` Experimental `;let Ke;Ke=$localize`Specific builds for developers only. Not for use with important data.`;let Qe;Qe=$localize`Canary`;let Ze;Ze=$localize`Individual builds for developers only. Not for use with important data.`;let Je;Je=$localize`Pause after startup or hibernation`;let Ye;Ye=$localize` Duplicati will run when started, but will remain in paused state for the duration. Duplicati will occupy minimal system resources and no backups will be run. `;let et;et=$localize`Usage statistics`;let re;re=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#126\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#126\uFFFD"}:CLOSE_LINK:${"[\uFFFD#127\uFFFD\uFFFD/#127\uFFFD|\uFFFD#128\uFFFD\uFFFD/#128\uFFFD]"}:LINE_BREAK:${"[\uFFFD#127\uFFFD\uFFFD/#127\uFFFD|\uFFFD#128\uFFFD\uFFFD/#128\uFFFD]"}:LINE_BREAK: All usage reports are sent anonymously and do not contain any personal information. They contain information about hardware and operating system, the type of backend, backup duration, overall size of source data and similar data. They do not contain paths, filenames, usernames, passwords or similar sensitive information. `,re=_e(re);let tt;tt=$localize`Advanced options`;let nt;nt=$localize`Enter new password`;let it;it=$localize`Repeat password`;let ot;ot=$localize`Password have to be filled and have to match`;let rt;rt=$localize`Passphrase`;let st;st=$localize`Repeat passphrase`;let at;at=$localize`Cancel`;let lt;lt=$localize` Update passphrase `;let _t;_t=$localize` Update passphrase `;let pt;pt=$localize`Change password`;let ct;ct=$localize`Allowed hostnames`;let dt;dt=$localize` To prevent various DNS based attacks, Duplicati limits the allowed hostnames to the ones listed here. Direct IP access and localhost is always allowed. Multiple hostnames can be supplied with a semicolon separator. If any of the allowed hostnames is an asterisk (*), all hostnames are allowed and this feature is disabled. If the field is empty, only IP address and localhost access is allowed. `;let mt;return mt=$localize` Update allowed hostnames `,[n,e,t,a,p,v,y,h,F,oe,$e,ke,be,De,Ve,Le,Xe,ze,Be,Ue,qe,je,He,We,Ke,Qe,Ze,Je,Ye,et,re,tt,rt,st,at,lt,_t,pt,ct,dt,mt,[1,"content"],[1,"title"],["type","submit","spk-button","",1,"raised","primary",3,"disabled"],[1,"left"],[1,"right"],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[1,"right","passphrase-form"],[1,"actions"],[3,"change","displayFn","hideClearButton"],["type","search",3,"ngModelChange","ngModel","ngModelOptions"],[3,"value"],[1,"right","remote-access-form"],[1,"primary","raised",3,"click"],[1,"indeterminate","primary"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"primary","raised"],[1,"content",3,"submit","formGroup"],["formGroupName","pauseSettings",1,"field-row"],[3,"hideClearButton"],["type","search","formControlName","time"],[3,"displayFn","hideClearButton"],["type","text","formControlName","timeType"],["href","#"],[3,"displayFn"],["type","text","formControlName","usageStatistics"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",nt,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",it,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"spk-success"],["suffix",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"loader"],["message",ot,1,"primary"],["spk-button","",1,"raised","primary",3,"click"],["spk-button","",1,"raised","primary",3,"click","disabled"],[1,"spk-success"],["for","allowedHostnames"],["type","text","id","allowedHostnames",3,"ngModelChange","ngModel"],["type","primary"],[3,"click","value"]]},template:function(e,t){if(e&1&&(f(0,"app-status-bar"),r(1,"div",41)(2,"header")(3,"div",42)(4,"h2"),_(5,0),o(),r(6,"p"),_(7,1),o()(),r(8,"button",43),_(9,2),o()(),r(10,"section")(11,"div",44)(12,"h3"),_(13,3),o(),r(14,"p"),c(15),o()(),r(16,"div",45),f(17,"app-remote-control"),o()(),r(18,"section")(19,"div",44)(20,"h3"),_(21,4),o(),r(22,"p"),_(23,5),o()(),r(24,"div",45)(25,"div",46)(26,"img",47),S("click",function(){return t.setLightMode()}),o(),r(27,"img",48),S("click",function(){return t.setDarkMode()}),o()()()(),r(28,"section")(29,"div",44)(30,"h3"),_(31,6),o(),r(32,"p"),_(33,7),o()(),r(34,"div",49),T(35,ti,15,7)(36,ii,4,1,"div",50),o()(),r(37,"section")(38,"div",44)(39,"h3"),_(40,8),o(),r(41,"p"),_(42,9),o()(),r(43,"div",45)(44,"spk-select",51),S("change",function(p){return t.saveLocale(p)}),r(45,"input",52),X("ngModelChange",function(p){return L(t.langCtrl,p)||(t.langCtrl=p),p}),o(),w(46,oi,2,2,"spk-option",53,A),o()()(),r(48,"section")(49,"div",44)(50,"h3"),_(51,10),o(),r(52,"p"),_(53,11),o()(),r(54,"div",54)(55,"spk-toggle",55),S("click",function(){return t.updateRemoteAccess()}),r(56,"label"),_(57,12),o()(),T(58,ri,8,3),o()(),r(59,"section")(60,"div",44)(61,"h3"),_(62,13),o(),r(63,"p"),_(64,14),o()(),r(65,"div",45)(66,"spk-toggle",55),S("click",function(){return t.saveDisableTrayIconLogin()}),r(67,"label"),_(68,15),o()()()(),r(69,"section")(70,"div",44)(71,"h3"),_(72,16),o(),r(73,"p"),T(74,si,1,1),o(),T(75,ai,1,0,"spk-progress-bar",56),o(),r(76,"div",57)(77,"div",58),S("click",function(){return t.setNewChannel("")}),r(78,"spk-radio",59),_(79,17),o(),r(80,"p"),_(81,18),o()(),r(82,"div",58),S("click",function(){return t.setNewChannel("stable")}),r(83,"spk-radio",59),_(84,19),o(),r(85,"p"),_(86,20),o()(),r(87,"div",58),S("click",function(){return t.setNewChannel("beta")}),r(88,"spk-radio",59),_(89,21),o(),r(90,"p"),_(91,22),o()(),r(92,"div",58),S("click",function(){return t.setNewChannel("experimental")}),r(93,"spk-radio",59),_(94,23),o(),r(95,"p"),_(96,24),o()(),r(97,"div",58),S("click",function(){return t.setNewChannel("canary")}),r(98,"spk-radio",59),_(99,25),o(),r(100,"p"),_(101,26),o()()()()(),f(102,"spk-divider"),r(103,"form",60),S("submit",function(){return t.submit()}),r(104,"section")(105,"div",44)(106,"h3"),_(107,27),o(),r(108,"p"),_(109,28),o()(),r(110,"div",45)(111,"div",61)(112,"spk-select",62),f(113,"input",63),w(114,li,2,2,"spk-option",53,A),o(),r(116,"spk-select",64),f(117,"input",65),w(118,_i,2,2,"spk-option",53,A),o()()()(),r(120,"section")(121,"div",44)(122,"h3"),_(123,29),o(),r(124,"p"),B(125,30),f(126,"a",66)(127,"br")(128,"br"),U(),o()(),r(129,"div",45)(130,"spk-select",67),f(131,"input",68),w(132,pi,2,2,"spk-option",53,A),o()()(),r(134,"section")(135,"div",44)(136,"h3"),_(137,31),o()(),r(138,"div",45),f(139,"app-advanced-options-settings"),o()()()),e&2){let a,p,v;s(8),m("disabled",t.settingsForm.untouched),s(7),$(t.remoteControlStatus()),s(11),I("active",!t.isDarkMode()),s(),I("active",t.isDarkMode()),s(8),u(t.showPassphraseForm()?35:36),s(9),m("displayFn",t.languageDisplay())("hideClearButton",!0),s(),V("ngModel",t.langCtrl),m("ngModelOptions",wt(35,Qn)),s(),G(t.languageOptions()),s(9),I("active",t.allowRemoteAccess()),s(3),u(t.allowRemoteAccess()?58:-1),s(8),I("active",t.disableTrayIconLogin()),s(8),u(t.updateChannel()!==""&&((a=t.sysinfo())!=null&&a.ServerVersion)?74:-1),s(),u(t.updatingChannel()?75:-1),s(3),I("active",t.updateChannel()===""),s(),Y((p=t.sysinfo())==null?null:p.DefaultUpdateChannel),ee(79),s(2),Y((v=t.sysinfo())==null?null:v.ServerVersionType),ee(81),s(2),I("active",t.updateChannel()==="stable"),s(5),I("active",t.updateChannel()==="beta"),s(5),I("active",t.updateChannel()==="experimental"),s(5),I("active",t.updateChannel()==="canary"),s(5),m("formGroup",t.settingsForm),s(9),m("hideClearButton",!0),s(2),G(t.timeOptions()),s(2),m("displayFn",t.typeDisplay())("hideClearButton",!0),s(2),G(t.timeTypeOptions()),s(12),m("displayFn",t.usageDisplay()),s(2),G(t.usageStatisticsOptions())}},dependencies:[fe,me,j,H,ce,de,Ce,ue,ge,Se,Ht,Fe,ne,Oe,Ne,qt,Me,Ut,he,Pe,W,Ee,zt,Lt],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem 2rem}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem 0;position:sticky;top:0;background:var(--base-level-10);z-index:1000;border-bottom:1px solid var(--base-level-40)}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}section[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:2rem 0;border-top:1px solid var(--base-level-40)}section[_ngcontent-%COMP%]:first-of-type{border-top:0}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;align-items:flex-start}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] spk-button-group[_ngcontent-%COMP%]{margin-top:.25rem}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;width:50%}.passphrase-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:1rem}.passphrase-form[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.remote-access-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:240px;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-500)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] spk-radio[_ngcontent-%COMP%]{color:var(--base-level-60);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-level-60R)}.field-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};export{xe as default};
@@ -0,0 +1 @@
1
+ import{e as a,f as b}from"./chunk-7DMP23AI.js";import"./chunk-G6DEVOXB.js";import"./chunk-HUO7ZRYL.js";import"./chunk-W2IUXLYE.js";import"./chunk-MSZ6S4MV.js";import"./chunk-PHVHG2MW.js";import"./chunk-GOCS43XM.js";import"./chunk-ZTEWFJB7.js";import"./chunk-R2RIU25S.js";import"./chunk-D64J3G73.js";import"./chunk-GKTIIZ72.js";import"./chunk-XVYQD36R.js";import"./chunk-ZYQXWAMY.js";import"./chunk-C6Q5SG76.js";export{a as createRestoreSelectFilesForm,b as default};
@@ -1 +1 @@
1
- import{a as j}from"./chunk-5NMYYKKU.js";import{a as Me}from"./chunk-B6UDSTOM.js";import{b as U}from"./chunk-N3GBABZB.js";import{a as de,b as h,d as M,e as k,h as L,j as fe,l as $,o as y,p as D,r as A}from"./chunk-OROSSCXB.js";import{b as I}from"./chunk-O2MZ5CAQ.js";import{a as P,c as d}from"./chunk-J76HBC5J.js";import{a as b,g as v,l as Ce,o as Re,p as Ne,q as Pe,r as Ie,w as he}from"./chunk-ZTSITRHY.js";import{pa as K}from"./chunk-BUARZS4A.js";import{Ab as ue,Bb as Se,Cb as r,D as ae,Db as a,Eb as l,Fb as X,G as O,Gb as z,Ib as x,K as le,Mc as H,Ob as c,Pb as u,Qb as m,Ra as S,Rb as Fe,Sb as me,U as _e,Ub as T,Vb as B,Ya as p,_,eb as N,fa as C,ga as R,hc as Y,kb as V,kc as Ee,p as re,qc as Te,tb as F,vb as pe,vc as ge,w as se,xc as Oe,yb as G,zb as ce}from"./chunk-VGQ6X3AL.js";var ke=new D,ye=()=>ke.group({passphrase:ke.control("")}),J=class n{#t=_(I);#e=_(f);#o=_(d);#i=_(P);encryptionForm=this.#e.encryptionForm;creatingTemporaryBackup=p(!1);next(){let t=this.#e.destinationTargetUrl();if(!t)throw new Error("No target URL");this.creatingTemporaryBackup.set(!0);let e=this.encryptionForm.value?.passphrase??null,o=[{Name:"--no-encryption",Value:"true"}];e&&(o=[{Name:"--passphrase",Value:e}]),this.#t.postApiV1Backups({requestBody:{Backup:{TargetURL:t,Settings:o}},temporary:!0}).pipe(O(()=>this.creatingTemporaryBackup.set(!1))).subscribe({next:i=>{let s=i.ID;this.#e.getBackup(s),this.#o.navigate([`/restore-draft/${s}`])},error:i=>{console.error(i)}})}back(){this.#e.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#i.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-restore-encryption"]],decls:12,vars:1,consts:()=>{let t;t=$localize`Enter backup passphrase if defined.`;let e;e=$localize`Password`;let o;o=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let i;return i=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `,[e,o,i,[3,"submit","formGroup"],["for","password"],["type","password","id","password","placeholder",t,"formControlName","passphrase"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,o){e&1&&(r(0,"form",3),T("submit",function(){return o.next()}),r(1,"spk-form-field")(2,"label",4),m(3,0),a(),l(4,"input",5),a(),r(5,"div",6)(6,"button",7),T("click",function(){return o.back()}),c(7,1),l(8,"spk-icon"),u(),a(),r(9,"button",8),c(10,2),l(11,"spk-icon"),u(),a()()()),e&2&&F("formGroup",o.encryptionForm)},dependencies:[A,L,h,M,k,$,y,Ce,b,v],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function be(n,t){n&1&&l(0,"spk-progress-bar",8)}function ve(n,t){if(n&1&&(r(0,"spk-option",14),Y(1),ge(2,"date"),a()),n&2){let e=t.$implicit;F("value",e.Version),S(),Ee("",e.Version,": ",Oe(2,3,e.Time,"medium"),"")}}function we(n,t){if(n&1){let e=x();l(0,"spk-progress-bar",8),r(1,"button",10),T("click",function(){C(e);let i=B(2);return R(i.abortLoading())}),m(2,4),a()}}function Ge(n,t){if(n&1&&(r(0,"app-file-tree",15)(1,"label",16),m(2,5),a(),l(3,"input",17),a()),n&2){let e=B(3);F("rootPath",e.rootPath())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)}}function xe(n,t){if(n&1&&V(0,Ge,4,4,"app-file-tree",15),n&2){let e=B(2);G((e.isDraft()&&!e.isRepairing()||!e.isDraft())&&e.backupSettings()?0:-1)}}function Be(n,t){if(n&1&&(r(0,"spk-select",12),l(1,"input",13),ue(2,ve,3,6,"spk-option",14,ce),a(),V(4,we,3,0)(5,xe,1,1)),n&2){let e=B();F("displayFn",e.displayFn())("hideClearButton",!0),S(2),Se(e.versionOptions()),S(2),G(e.isDraft()&&e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?4:-1),S(),G(e.showFileTree()?5:-1)}}var q=new D,De=()=>q.group({filesToRestore:q.control(""),selectedOption:q.control(null),passphrase:q.control(null)}),Z=class n{#t=_(I);#e=_(f);#o=_(d);#i=_(P);#n=_(K);selectFilesForm=this.#e.selectFilesForm;selectFilesFormSignal=this.#e.selectFilesFormSignal;selectOptionSignal=this.#e.selectOptionSignal;backupId=this.#e.backupId;versionOptionsLoading=this.#e.versionOptionsLoading;versionOptions=this.#e.versionOptions;isDraft=this.#e.isDraft;isFileRestore=this.#e.isFileRestore;showFileTree=p(!1);backupSettings=p(null);backupSettingsEffect=H(()=>{let t=this.backupId(),e=typeof this.selectOptionSignal()=="string"?parseInt(this.selectOptionSignal()):this.selectOptionSignal();if(typeof e!="number"||!t)return;let i=this.versionOptions()?.find(s=>s.Version===e)?.Time??null;i&&(this.showFileTree.set(!1),setTimeout(()=>{let s={id:t+"",time:i};this.backupSettings.set(s),this.getRootPath(s)}))});rootPath=p(void 0);loadingRootPath=p(!1);getRootPath(t){let e={id:t.id+"",time:t.time,prefixOnly:!0,folderContents:!1};this.loadingRootPath.set(!0),this.#t.getApiV1BackupByIdFiles(e).pipe(O(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1)})).subscribe({next:o=>{let i=o.Files[0].Path;this.rootPath.set(i)}})}isRepairing=p(!1);repairEffect=H(()=>{let t=this.#e.isDraft(),e=this.selectOptionSignal();if(t&&e){let o=this.backupId();this.isRepairing.set(!0),this.#t.postApiV1BackupByIdRepairupdate({id:o,requestBody:{only_paths:!0,time:new Date().toISOString()}}).pipe(O(()=>this.isRepairing.set(!1))).subscribe()}});abortLoading(){this.selectFilesForm.controls.selectedOption.setValue(null)}displayFn(){let t=this.versionOptions();return e=>{if(!e)return"";let o=t?.find(i=>typeof i.Version=="number"&&i.Version.toString()===e);return o?`${o.Version}: ${this.#n.transform(o.Time,"medium")}`:""}}next(){this.#o.navigate(["options"],{relativeTo:this.#i.parent})}back(){this.#e.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#i.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-select-files"]],features:[Te([K])],decls:13,vars:3,consts:()=>{let t;t=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let o;o=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$localize`Select an option...`;let s;s=$localize`Cancel`;let w;return w=$localize`Path`,[["formRef",""],t,e,o,s,w,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"displayFn","hideClearButton"],["type","text","placeholder",i,"formControlName","selectedOption"],[3,"value"],[3,"rootPath","backupSettings","multiSelect","showFiles"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]]},template:function(e,o){if(e&1){let i=x();r(0,"form",6,0),T("submit",function(){return C(i),R(o.next())}),r(2,"h3",7),m(3,1),a(),V(4,be,1,0,"spk-progress-bar",8)(5,Be,6,4),r(6,"div",9)(7,"button",10),T("click",function(){return C(i),R(o.back())}),c(8,2),l(9,"spk-icon"),u(),a(),r(10,"button",11),c(11,3),l(12,"spk-icon"),u(),a()()()}e&2&&(F("formGroup",o.selectFilesForm),S(4),G(o.versionOptionsLoading()?4:5),S(5),Fe(o.isFileRestore()?"Back":"Exit"),me(8))},dependencies:[A,L,h,M,k,$,y,K,j,v,Pe,b,Ie,Re],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var f=class n{#t=_(d);#e=_(I);backupId=p(null);backup=p(null);destinationTargetUrl=p(null);selectFilesForm=De();optionsForm=Ae();encryptionForm=ye();optionsFormSignal=U(this.optionsForm.valueChanges);selectFilesFormSignal=U(this.selectFilesForm.valueChanges);selectOptionSignal=U(this.selectFilesForm.controls.selectedOption.valueChanges);versionOptionsLoading=p(!1);versionOptions=p([]);isSubmitting=p(!1);isDraft=p(!1);isFileRestore=p(!1);init(t,e=!1,o=!1){this.backupId.set(t),this.isFileRestore.set(e),this.isDraft.set(o),e&&this.#t.navigate(["/restore-from-files/destination"]),e||this.getBackup(t,!0)}updateTargetUrl(t){this.destinationTargetUrl.set(t)}submit(){this.isSubmitting.set(!0);let t=this.backupId(),e=this.optionsForm.value,o=this.selectFilesForm.value,i=this.versionOptions()?.find(s=>s.Version===o.selectedOption);this.#e.postApiV1BackupByIdRestore({id:t??"",requestBody:{paths:o.filesToRestore?.split("\0").map(s=>`${s}*`)??[],passphrase:o.passphrase??null,time:i?.Time,restore_path:e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!0}}).pipe(O(()=>this.isSubmitting.set(!1))).subscribe({next:()=>this.exit(),error:s=>{console.error("restore error",s)}})}exit(){this.#o(),this.#t.navigate(["/"])}getVersionOptions(){this.versionOptions()}getBackup(t,e=!1){this.versionOptionsLoading.set(!0),se([this.#e.getApiV1BackupById({id:t}),this.#e.getApiV1BackupByIdFilesets({id:t}).pipe(re(12e3),le())]).pipe(ae(1),O(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([o,i])=>{this.versionOptions.set(i),this.backup.set(o)}})}#o(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||n)};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})};var W=new D,Ae=()=>W.group({restoreFrom:W.control("orignal"),restoreFromPath:W.control(""),handleExisting:W.control("overwrite"),permissions:W.control(!1)}),ee=class n{#t=_(f);#e=_(d);#o=_(P);optionsForm=this.#t.optionsForm;optionsFormSignal=this.#t.optionsFormSignal;isSubmitting=this.#t.isSubmitting;goBack(){this.#e.navigate(["select-files"],{relativeTo:this.#o.parent})}submit(){this.#t.submit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-advanced-options-settings"]],decls:39,vars:6,consts:()=>{let t;t=$localize`Restore options`;let e;e=$localize`Where do you want to restore files from?`;let o;o=$localize` Original location ${"\uFFFD#9\uFFFD\uFFFD/#9\uFFFD"}:TAG_INPUT:`;let i;i=$localize` Pick location ${"\uFFFD#12\uFFFD\uFFFD/#12\uFFFD"}:TAG_INPUT:`;let s;s=$localize`How do you want to handle existing files?`;let w;w=$localize` Overwrite ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let g;g=$localize` Save different versions with timestamp in file name ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let te;te=$localize`Permissions`;let oe;oe=$localize` Restore read/write permissions ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let ie;ie=$localize`${"\uFFFD#35\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#35\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let ne;return ne=$localize`${"\uFFFD#38\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `,[["formRef",""],t,e,o,i,s,w,g,te,oe,ie,ne,[3,"submit","formGroup"],[1,"title-30"],[3,"disallowToggle"],["title",""],[1,"raised","primary"],["type","radio","name","restoreFrom","value","orignal","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","permissions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,o){if(e&1){let i=x();r(0,"form",12,0),T("submit",function(){return C(i),R(o.submit())}),r(2,"h3",13),m(3,1),a(),r(4,"app-toggle-card",14),X(5,15),m(6,2),z(),r(7,"spk-radio",16),c(8,3),l(9,"input",17),u(),a(),r(10,"spk-radio",16),c(11,4),l(12,"input",18),u(),a(),r(13,"app-file-tree",19)(14,"label",20),Y(15,"Path"),a(),l(16,"input",21),a()(),r(17,"app-toggle-card",14),X(18,15),m(19,5),z(),r(20,"spk-radio",16),c(21,6),l(22,"input",22),u(),a(),r(23,"spk-radio",16),c(24,7),l(25,"input",23),u(),a()(),r(26,"app-toggle-card"),X(27,15),m(28,8),z(),r(29,"spk-toggle",24),c(30,9),l(31,"input",25),u(),a()(),r(32,"div",26)(33,"button",27),T("click",function(){return C(i),R(o.goBack())}),c(34,10),l(35,"spk-icon"),u(),a(),r(36,"button",28),c(37,11),l(38,"spk-icon"),u(),a()()()}if(e&2){let i;F("formGroup",o.optionsForm),S(4),F("disallowToggle",!0),S(9),F("disabled",((i=o.optionsFormSignal())==null?null:i.restoreFrom)!=="pickLocation"),S(4),F("disallowToggle",!0),S(19),pe("loader",o.isSubmitting())}},dependencies:[A,L,h,de,fe,M,k,$,y,Me,j,he,Ne,v,b],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};export{Ae as a,ee as b,ye as c,J as d,De as e,Z as f,f as g};
1
+ import{a as j}from"./chunk-G6DEVOXB.js";import{a as Me}from"./chunk-HUO7ZRYL.js";import{b as U}from"./chunk-W2IUXLYE.js";import{a as de,b as h,d as M,e as k,h as L,j as fe,l as $,o as y,p as D,r as A}from"./chunk-PHVHG2MW.js";import{b as I}from"./chunk-GOCS43XM.js";import{a as P,c as d}from"./chunk-ZTEWFJB7.js";import{a as b,g as v,l as Ce,o as Re,p as Ne,q as Pe,r as Ie,w as he}from"./chunk-D64J3G73.js";import{pa as K}from"./chunk-XVYQD36R.js";import{Ab as ue,Bb as Se,Cb as r,D as ae,Db as a,Eb as l,Fb as X,G as O,Gb as z,Ib as x,K as le,Ob as c,Oc as H,Pb as u,Qb as m,Ra as S,Rb as Fe,Sb as me,U as _e,Ub as T,Vb as B,Ya as p,_,eb as N,fa as C,ga as R,hc as Y,kb as V,kc as Ee,p as re,sc as Te,tb as F,vb as pe,w as se,xc as ge,yb as G,zb as ce,zc as Oe}from"./chunk-ZYQXWAMY.js";var ke=new D,ye=()=>ke.group({passphrase:ke.control("")}),J=class n{#t=_(I);#e=_(f);#o=_(d);#i=_(P);encryptionForm=this.#e.encryptionForm;creatingTemporaryBackup=p(!1);next(){let t=this.#e.destinationTargetUrl();if(!t)throw new Error("No target URL");this.creatingTemporaryBackup.set(!0);let e=this.encryptionForm.value?.passphrase??null,o=[{Name:"--no-encryption",Value:"true"}];e&&(o=[{Name:"--passphrase",Value:e}]),this.#t.postApiV1Backups({requestBody:{Backup:{TargetURL:t,Settings:o}},temporary:!0}).pipe(O(()=>this.creatingTemporaryBackup.set(!1))).subscribe({next:i=>{let s=i.ID;this.#e.getBackup(s),this.#o.navigate([`/restore-draft/${s}`])},error:i=>{console.error(i)}})}back(){this.#e.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#i.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-restore-encryption"]],decls:12,vars:1,consts:()=>{let t;t=$localize`Enter backup passphrase if defined.`;let e;e=$localize`Password`;let o;o=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let i;return i=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `,[e,o,i,[3,"submit","formGroup"],["for","password"],["type","password","id","password","placeholder",t,"formControlName","passphrase"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,o){e&1&&(r(0,"form",3),T("submit",function(){return o.next()}),r(1,"spk-form-field")(2,"label",4),m(3,0),a(),l(4,"input",5),a(),r(5,"div",6)(6,"button",7),T("click",function(){return o.back()}),c(7,1),l(8,"spk-icon"),u(),a(),r(9,"button",8),c(10,2),l(11,"spk-icon"),u(),a()()()),e&2&&F("formGroup",o.encryptionForm)},dependencies:[A,L,h,M,k,$,y,Ce,b,v],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function be(n,t){n&1&&l(0,"spk-progress-bar",8)}function ve(n,t){if(n&1&&(r(0,"spk-option",14),Y(1),ge(2,"date"),a()),n&2){let e=t.$implicit;F("value",e.Version),S(),Ee("",e.Version,": ",Oe(2,3,e.Time,"medium"),"")}}function we(n,t){if(n&1){let e=x();l(0,"spk-progress-bar",8),r(1,"button",10),T("click",function(){C(e);let i=B(2);return R(i.abortLoading())}),m(2,4),a()}}function Ge(n,t){if(n&1&&(r(0,"app-file-tree",15)(1,"label",16),m(2,5),a(),l(3,"input",17),a()),n&2){let e=B(3);F("rootPath",e.rootPath())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)}}function xe(n,t){if(n&1&&V(0,Ge,4,4,"app-file-tree",15),n&2){let e=B(2);G((e.isDraft()&&!e.isRepairing()||!e.isDraft())&&e.backupSettings()?0:-1)}}function Be(n,t){if(n&1&&(r(0,"spk-select",12),l(1,"input",13),ue(2,ve,3,6,"spk-option",14,ce),a(),V(4,we,3,0)(5,xe,1,1)),n&2){let e=B();F("displayFn",e.displayFn())("hideClearButton",!0),S(2),Se(e.versionOptions()),S(2),G(e.isDraft()&&e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?4:-1),S(),G(e.showFileTree()?5:-1)}}var q=new D,De=()=>q.group({filesToRestore:q.control(""),selectedOption:q.control(null),passphrase:q.control(null)}),Z=class n{#t=_(I);#e=_(f);#o=_(d);#i=_(P);#n=_(K);selectFilesForm=this.#e.selectFilesForm;selectFilesFormSignal=this.#e.selectFilesFormSignal;selectOptionSignal=this.#e.selectOptionSignal;backupId=this.#e.backupId;versionOptionsLoading=this.#e.versionOptionsLoading;versionOptions=this.#e.versionOptions;isDraft=this.#e.isDraft;isFileRestore=this.#e.isFileRestore;showFileTree=p(!1);backupSettings=p(null);backupSettingsEffect=H(()=>{let t=this.backupId(),e=typeof this.selectOptionSignal()=="string"?parseInt(this.selectOptionSignal()):this.selectOptionSignal();if(typeof e!="number"||!t)return;let i=this.versionOptions()?.find(s=>s.Version===e)?.Time??null;i&&(this.showFileTree.set(!1),setTimeout(()=>{let s={id:t+"",time:i};this.backupSettings.set(s),this.getRootPath(s)}))});rootPath=p(void 0);loadingRootPath=p(!1);getRootPath(t){let e={id:t.id+"",time:t.time,prefixOnly:!0,folderContents:!1};this.loadingRootPath.set(!0),this.#t.getApiV1BackupByIdFiles(e).pipe(O(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1)})).subscribe({next:o=>{let i=o.Files[0].Path;this.rootPath.set(i)}})}isRepairing=p(!1);repairEffect=H(()=>{let t=this.#e.isDraft(),e=this.selectOptionSignal();if(t&&e){let o=this.backupId();this.isRepairing.set(!0),this.#t.postApiV1BackupByIdRepairupdate({id:o,requestBody:{only_paths:!0,time:new Date().toISOString()}}).pipe(O(()=>this.isRepairing.set(!1))).subscribe()}});abortLoading(){this.selectFilesForm.controls.selectedOption.setValue(null)}displayFn(){let t=this.versionOptions();return e=>{if(!e)return"";let o=t?.find(i=>typeof i.Version=="number"&&i.Version.toString()===e);return o?`${o.Version}: ${this.#n.transform(o.Time,"medium")}`:""}}next(){this.#o.navigate(["options"],{relativeTo:this.#i.parent})}back(){this.#e.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#i.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-select-files"]],features:[Te([K])],decls:13,vars:3,consts:()=>{let t;t=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let o;o=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$localize`Select an option...`;let s;s=$localize`Cancel`;let w;return w=$localize`Path`,[["formRef",""],t,e,o,s,w,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"displayFn","hideClearButton"],["type","text","placeholder",i,"formControlName","selectedOption"],[3,"value"],[3,"rootPath","backupSettings","multiSelect","showFiles"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]]},template:function(e,o){if(e&1){let i=x();r(0,"form",6,0),T("submit",function(){return C(i),R(o.next())}),r(2,"h3",7),m(3,1),a(),V(4,be,1,0,"spk-progress-bar",8)(5,Be,6,4),r(6,"div",9)(7,"button",10),T("click",function(){return C(i),R(o.back())}),c(8,2),l(9,"spk-icon"),u(),a(),r(10,"button",11),c(11,3),l(12,"spk-icon"),u(),a()()()}e&2&&(F("formGroup",o.selectFilesForm),S(4),G(o.versionOptionsLoading()?4:5),S(5),Fe(o.isFileRestore()?"Back":"Exit"),me(8))},dependencies:[A,L,h,M,k,$,y,K,j,v,Pe,b,Ie,Re],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var f=class n{#t=_(d);#e=_(I);backupId=p(null);backup=p(null);destinationTargetUrl=p(null);selectFilesForm=De();optionsForm=Ae();encryptionForm=ye();optionsFormSignal=U(this.optionsForm.valueChanges);selectFilesFormSignal=U(this.selectFilesForm.valueChanges);selectOptionSignal=U(this.selectFilesForm.controls.selectedOption.valueChanges);versionOptionsLoading=p(!1);versionOptions=p([]);isSubmitting=p(!1);isDraft=p(!1);isFileRestore=p(!1);init(t,e=!1,o=!1){this.backupId.set(t),this.isFileRestore.set(e),this.isDraft.set(o),e&&this.#t.navigate(["/restore-from-files/destination"]),e||this.getBackup(t,!0)}updateTargetUrl(t){this.destinationTargetUrl.set(t)}submit(){this.isSubmitting.set(!0);let t=this.backupId(),e=this.optionsForm.value,o=this.selectFilesForm.value,i=this.versionOptions()?.find(s=>s.Version===o.selectedOption);this.#e.postApiV1BackupByIdRestore({id:t??"",requestBody:{paths:o.filesToRestore?.split("\0").map(s=>`${s}*`)??[],passphrase:o.passphrase??null,time:i?.Time,restore_path:e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!0}}).pipe(O(()=>this.isSubmitting.set(!1))).subscribe({next:()=>this.exit(),error:s=>{console.error("restore error",s)}})}exit(){this.#o(),this.#t.navigate(["/"])}getVersionOptions(){this.versionOptions()}getBackup(t,e=!1){this.versionOptionsLoading.set(!0),se([this.#e.getApiV1BackupById({id:t}),this.#e.getApiV1BackupByIdFilesets({id:t}).pipe(re(12e3),le())]).pipe(ae(1),O(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([o,i])=>{this.versionOptions.set(i),this.backup.set(o)}})}#o(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||n)};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})};var W=new D,Ae=()=>W.group({restoreFrom:W.control("orignal"),restoreFromPath:W.control(""),handleExisting:W.control("overwrite"),permissions:W.control(!1)}),ee=class n{#t=_(f);#e=_(d);#o=_(P);optionsForm=this.#t.optionsForm;optionsFormSignal=this.#t.optionsFormSignal;isSubmitting=this.#t.isSubmitting;goBack(){this.#e.navigate(["select-files"],{relativeTo:this.#o.parent})}submit(){this.#t.submit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-advanced-options-settings"]],decls:39,vars:6,consts:()=>{let t;t=$localize`Restore options`;let e;e=$localize`Where do you want to restore files from?`;let o;o=$localize` Original location ${"\uFFFD#9\uFFFD\uFFFD/#9\uFFFD"}:TAG_INPUT:`;let i;i=$localize` Pick location ${"\uFFFD#12\uFFFD\uFFFD/#12\uFFFD"}:TAG_INPUT:`;let s;s=$localize`How do you want to handle existing files?`;let w;w=$localize` Overwrite ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let g;g=$localize` Save different versions with timestamp in file name ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let te;te=$localize`Permissions`;let oe;oe=$localize` Restore read/write permissions ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let ie;ie=$localize`${"\uFFFD#35\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#35\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let ne;return ne=$localize`${"\uFFFD#38\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `,[["formRef",""],t,e,o,i,s,w,g,te,oe,ie,ne,[3,"submit","formGroup"],[1,"title-30"],[3,"disallowToggle"],["title",""],[1,"raised","primary"],["type","radio","name","restoreFrom","value","orignal","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","permissions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,o){if(e&1){let i=x();r(0,"form",12,0),T("submit",function(){return C(i),R(o.submit())}),r(2,"h3",13),m(3,1),a(),r(4,"app-toggle-card",14),X(5,15),m(6,2),z(),r(7,"spk-radio",16),c(8,3),l(9,"input",17),u(),a(),r(10,"spk-radio",16),c(11,4),l(12,"input",18),u(),a(),r(13,"app-file-tree",19)(14,"label",20),Y(15,"Path"),a(),l(16,"input",21),a()(),r(17,"app-toggle-card",14),X(18,15),m(19,5),z(),r(20,"spk-radio",16),c(21,6),l(22,"input",22),u(),a(),r(23,"spk-radio",16),c(24,7),l(25,"input",23),u(),a()(),r(26,"app-toggle-card"),X(27,15),m(28,8),z(),r(29,"spk-toggle",24),c(30,9),l(31,"input",25),u(),a()(),r(32,"div",26)(33,"button",27),T("click",function(){return C(i),R(o.goBack())}),c(34,10),l(35,"spk-icon"),u(),a(),r(36,"button",28),c(37,11),l(38,"spk-icon"),u(),a()()()}if(e&2){let i;F("formGroup",o.optionsForm),S(4),F("disallowToggle",!0),S(9),F("disabled",((i=o.optionsFormSignal())==null?null:i.restoreFrom)!=="pickLocation"),S(4),F("disallowToggle",!0),S(19),pe("loader",o.isSubmitting())}},dependencies:[A,L,h,de,fe,M,k,$,y,Me,j,he,Ne,v,b],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};export{Ae as a,ee as b,ye as c,J as d,De as e,Z as f,f as g};
@@ -1 +1 @@
1
- import{$ as aa,A as B,Aa as Ba,B as C,Ba as Ca,C as D,Ca as Da,D as E,Da as Ea,E as F,Ea as Fa,F as G,Fa as Ga,G as H,Ga as Ha,H as I,Ha as Ia,I as J,Ia as Ja,J as K,Ja as Ka,K as L,Ka as La,L as M,La as Ma,M as N,Ma as Na,N as O,Na as Oa,O as P,Oa as Pa,P as Q,Q as R,R as S,S as T,T as U,U as V,V as W,W as X,X as Y,Y as Z,Z as _,_ as $,a as b,aa as ba,b as c,ba as ca,c as d,ca as da,d as e,da as ea,e as f,ea as fa,f as g,fa as ga,g as h,ga as ha,h as i,ha as ia,i as j,ia as ja,j as k,ja as ka,k as l,ka as la,l as m,la as ma,m as n,ma as na,n as o,na as oa,o as p,oa as pa,p as q,pa as qa,q as r,qa as ra,r as s,ra as sa,s as t,sa as ta,t as u,ta as ua,u as v,ua as va,v as w,va as wa,w as x,wa as xa,x as y,xa as ya,y as z,ya as za,z as A,za as Aa}from"./chunk-BUARZS4A.js";import{Aa as a}from"./chunk-VGQ6X3AL.js";import"./chunk-C6Q5SG76.js";export{l as APP_BASE_HREF,ka as AsyncPipe,i as BrowserPlatformLocation,za as CommonModule,xa as CurrencyPipe,pa as DATE_PIPE_DEFAULT_OPTIONS,oa as DATE_PIPE_DEFAULT_TIMEZONE,f as DOCUMENT,qa as DatePipe,va as DecimalPipe,r as FormStyle,t as FormatWidth,n as HashLocationStrategy,ra as I18nPluralPipe,sa as I18nSelectPipe,a as IMAGE_CONFIG,Ia as IMAGE_LOADER,ta as JsonPipe,ua as KeyValuePipe,h as LOCATION_INITIALIZED,o as Location,k as LocationStrategy,la as LowerCasePipe,Z as NgClass,_ as NgComponentOutlet,aa as NgFor,aa as NgForOf,$ as NgForOfContext,ba as NgIf,ca as NgIfContext,W as NgLocaleLocalization,V as NgLocalization,Pa as NgOptimizedImage,ga as NgPlural,ha as NgPluralCase,ia as NgStyle,da as NgSwitch,ea as NgSwitchCase,fa as NgSwitchDefault,ja as NgTemplateOutlet,p as NumberFormatStyle,u as NumberSymbol,Oa as PRECONNECT_CHECK_BLOCKLIST,m as PathLocationStrategy,wa as PercentPipe,g as PlatformLocation,q as Plural,ya as SlicePipe,ma as TitleCasePipe,s as TranslationWidth,na as UpperCasePipe,Ea as VERSION,Fa as ViewportScroller,v as WeekDay,Ha as XhrFactory,S as formatCurrency,R as formatDate,U as formatNumber,T as formatPercent,P as getCurrencySymbol,K as getLocaleCurrencyCode,J as getLocaleCurrencyName,I as getLocaleCurrencySymbol,D as getLocaleDateFormat,F as getLocaleDateTimeFormat,y as getLocaleDayNames,x as getLocaleDayPeriods,O as getLocaleDirection,A as getLocaleEraNames,M as getLocaleExtraDayPeriodRules,N as getLocaleExtraDayPeriods,B as getLocaleFirstDayOfWeek,w as getLocaleId,z as getLocaleMonthNames,H as getLocaleNumberFormat,G as getLocaleNumberSymbol,L as getLocalePluralCase,E as getLocaleTimeFormat,C as getLocaleWeekEndRange,Q as getNumberOfCurrencyDigits,Ca as isPlatformBrowser,Da as isPlatformServer,Ja as provideCloudflareLoader,Ka as provideCloudinaryLoader,La as provideImageKitLoader,Ma as provideImgixLoader,Na as provideNetlifyLoader,X as registerLocaleData,d as \u0275DomAdapter,Ga as \u0275NullViewportScroller,Aa as \u0275PLATFORM_BROWSER_ID,Ba as \u0275PLATFORM_SERVER_ID,e as \u0275PlatformNavigation,b as \u0275getDOM,j as \u0275normalizeQueryParams,Y as \u0275parseCookieValue,c as \u0275setRootDomAdapter};
1
+ import{$ as aa,A as B,Aa as Ba,B as C,Ba as Ca,C as D,Ca as Da,D as E,Da as Ea,E as F,Ea as Fa,F as G,Fa as Ga,G as H,Ga as Ha,H as I,Ha as Ia,I as J,Ia as Ja,J as K,Ja as Ka,K as L,Ka as La,L as M,La as Ma,M as N,Ma as Na,N as O,Na as Oa,O as P,Oa as Pa,P as Q,Q as R,R as S,S as T,T as U,U as V,V as W,W as X,X as Y,Y as Z,Z as _,_ as $,a as b,aa as ba,b as c,ba as ca,c as d,ca as da,d as e,da as ea,e as f,ea as fa,f as g,fa as ga,g as h,ga as ha,h as i,ha as ia,i as j,ia as ja,j as k,ja as ka,k as l,ka as la,l as m,la as ma,m as n,ma as na,n as o,na as oa,o as p,oa as pa,p as q,pa as qa,q as r,qa as ra,r as s,ra as sa,s as t,sa as ta,t as u,ta as ua,u as v,ua as va,v as w,va as wa,w as x,wa as xa,x as y,xa as ya,y as z,ya as za,z as A,za as Aa}from"./chunk-XVYQD36R.js";import{Aa as a}from"./chunk-ZYQXWAMY.js";import"./chunk-C6Q5SG76.js";export{l as APP_BASE_HREF,ka as AsyncPipe,i as BrowserPlatformLocation,za as CommonModule,xa as CurrencyPipe,pa as DATE_PIPE_DEFAULT_OPTIONS,oa as DATE_PIPE_DEFAULT_TIMEZONE,f as DOCUMENT,qa as DatePipe,va as DecimalPipe,r as FormStyle,t as FormatWidth,n as HashLocationStrategy,ra as I18nPluralPipe,sa as I18nSelectPipe,a as IMAGE_CONFIG,Ia as IMAGE_LOADER,ta as JsonPipe,ua as KeyValuePipe,h as LOCATION_INITIALIZED,o as Location,k as LocationStrategy,la as LowerCasePipe,Z as NgClass,_ as NgComponentOutlet,aa as NgFor,aa as NgForOf,$ as NgForOfContext,ba as NgIf,ca as NgIfContext,W as NgLocaleLocalization,V as NgLocalization,Pa as NgOptimizedImage,ga as NgPlural,ha as NgPluralCase,ia as NgStyle,da as NgSwitch,ea as NgSwitchCase,fa as NgSwitchDefault,ja as NgTemplateOutlet,p as NumberFormatStyle,u as NumberSymbol,Oa as PRECONNECT_CHECK_BLOCKLIST,m as PathLocationStrategy,wa as PercentPipe,g as PlatformLocation,q as Plural,ya as SlicePipe,ma as TitleCasePipe,s as TranslationWidth,na as UpperCasePipe,Ea as VERSION,Fa as ViewportScroller,v as WeekDay,Ha as XhrFactory,S as formatCurrency,R as formatDate,U as formatNumber,T as formatPercent,P as getCurrencySymbol,K as getLocaleCurrencyCode,J as getLocaleCurrencyName,I as getLocaleCurrencySymbol,D as getLocaleDateFormat,F as getLocaleDateTimeFormat,y as getLocaleDayNames,x as getLocaleDayPeriods,O as getLocaleDirection,A as getLocaleEraNames,M as getLocaleExtraDayPeriodRules,N as getLocaleExtraDayPeriods,B as getLocaleFirstDayOfWeek,w as getLocaleId,z as getLocaleMonthNames,H as getLocaleNumberFormat,G as getLocaleNumberSymbol,L as getLocalePluralCase,E as getLocaleTimeFormat,C as getLocaleWeekEndRange,Q as getNumberOfCurrencyDigits,Ca as isPlatformBrowser,Da as isPlatformServer,Ja as provideCloudflareLoader,Ka as provideCloudinaryLoader,La as provideImageKitLoader,Ma as provideImgixLoader,Na as provideNetlifyLoader,X as registerLocaleData,d as \u0275DomAdapter,Ga as \u0275NullViewportScroller,Aa as \u0275PLATFORM_BROWSER_ID,Ba as \u0275PLATFORM_SERVER_ID,e as \u0275PlatformNavigation,b as \u0275getDOM,j as \u0275normalizeQueryParams,Y as \u0275parseCookieValue,c as \u0275setRootDomAdapter};