@duplicati/ngclient 0.0.205 → 0.0.206

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 (162) hide show
  1. package/assets/dest-icons/googleworkspace.png +0 -0
  2. package/assets/sh-bold.woff2 +0 -0
  3. package/assets/sh.woff2 +0 -0
  4. package/chunk-23UYU3M3.js +1 -0
  5. package/chunk-2E2AU7CO.js +1 -0
  6. package/chunk-2FPYV4EW.js +1 -0
  7. package/chunk-2K74TI2N.js +1 -0
  8. package/{chunk-HCSB3IIB.js → chunk-2T4BMRWX.js} +1 -1
  9. package/{chunk-D6IP567E.js → chunk-3MS6SVET.js} +1 -1
  10. package/{chunk-BABBRM6A.js → chunk-3QS6DB3O.js} +1 -1
  11. package/chunk-4GQJ6TJZ.js +1 -0
  12. package/chunk-4OBMW6MZ.js +1 -0
  13. package/{chunk-VDSX2M4H.js → chunk-4VYR5E5I.js} +1 -1
  14. package/chunk-5HB22USV.js +1 -0
  15. package/chunk-5MKFV3IB.js +1 -0
  16. package/chunk-5QAUCDEV.js +1 -0
  17. package/chunk-5T2JCBPV.js +1 -0
  18. package/{chunk-GRVTXORM.js → chunk-6COK7FLL.js} +1 -1
  19. package/chunk-6ETVPQVI.js +1 -0
  20. package/chunk-7E5J43IH.js +1 -0
  21. package/{chunk-BYUBKTO5.js → chunk-7HFTVA4J.js} +1 -1
  22. package/chunk-7JHU54QM.js +1 -0
  23. package/chunk-7MPZ3MRD.js +1 -0
  24. package/chunk-7PUXNL75.js +1 -0
  25. package/chunk-7T44DW2B.js +3 -0
  26. package/chunk-A57TBTOD.js +1 -0
  27. package/chunk-A5F2OWRS.js +2 -0
  28. package/chunk-AAECT3VT.js +1 -0
  29. package/chunk-AGMFKAHM.js +1 -0
  30. package/chunk-AI6EYFMY.js +1 -0
  31. package/chunk-AJF77BHX.js +1 -0
  32. package/chunk-AWL7E6ZQ.js +11 -0
  33. package/{chunk-MZ5COKIP.js → chunk-CTQKCCGM.js} +1 -1
  34. package/chunk-DKPWJYG3.js +1 -0
  35. package/{chunk-SZUNW4JO.js → chunk-EG3PT3XW.js} +1 -1
  36. package/{chunk-QHBOEY2O.js → chunk-FJFREVRV.js} +1 -1
  37. package/chunk-FNGDI6JY.js +1 -0
  38. package/chunk-G3FMV74P.js +1 -0
  39. package/{chunk-B62TPRVG.js → chunk-GGW26MAG.js} +1 -1
  40. package/chunk-GJGFMZUV.js +1 -0
  41. package/chunk-GTZRHPRV.js +1 -0
  42. package/chunk-HFNC6WUL.js +1 -0
  43. package/chunk-I6PR2AV2.js +1 -0
  44. package/chunk-I7MAEY3S.js +1 -0
  45. package/chunk-ISG53K32.js +1 -0
  46. package/chunk-JJY6UOEY.js +1 -0
  47. package/chunk-KICR4V2W.js +1 -0
  48. package/{chunk-ZU6T3TW3.js → chunk-KLAJGS5T.js} +1 -1
  49. package/{chunk-ZWLAV6HO.js → chunk-KUGAORAS.js} +1 -1
  50. package/{chunk-7TWUW4XJ.js → chunk-KUX6NGQU.js} +1 -1
  51. package/chunk-KYTPZ3WD.js +1 -0
  52. package/{chunk-PO3L6MKW.js → chunk-LU7RSOI6.js} +1 -1
  53. package/chunk-MMF252RQ.js +1 -0
  54. package/chunk-MT6UNBGG.js +1 -0
  55. package/chunk-NAMMULH4.js +1 -0
  56. package/{chunk-HUZXJWCG.js → chunk-NGKFJLI2.js} +1 -1
  57. package/chunk-NGPZXZJJ.js +1 -0
  58. package/chunk-NJBOYRXU.js +1 -0
  59. package/chunk-NWNCATHF.js +1 -0
  60. package/{chunk-TL4WOQKT.js → chunk-O3GGVB2B.js} +1 -1
  61. package/{chunk-7LTHH6OG.js → chunk-OAAXQ2BE.js} +1 -1
  62. package/{chunk-EE5SIDTF.js → chunk-OVLGKJ3Z.js} +1 -1
  63. package/{chunk-NK5WD6WE.js → chunk-OWBBT5WF.js} +1 -1
  64. package/{chunk-R5YJUVWW.js → chunk-PGISF7LM.js} +1 -1
  65. package/chunk-PVWYJV5Y.js +1 -0
  66. package/chunk-QY4Y5NJB.js +4 -0
  67. package/{chunk-5LBG6MOL.js → chunk-QY5UGQ3R.js} +1 -1
  68. package/{chunk-I3IIG2AK.js → chunk-R4E5IO3A.js} +1 -1
  69. package/chunk-RFCIV3AX.js +1 -0
  70. package/chunk-RNE4Z2E4.js +1 -0
  71. package/{chunk-6LAXPU22.js → chunk-RWDQ3L3C.js} +1 -1
  72. package/chunk-SFW3N5OL.js +1 -0
  73. package/chunk-SIMG6PGZ.js +2 -0
  74. package/chunk-STB3WOIA.js +1 -0
  75. package/{chunk-AIH3GSIT.js → chunk-TBQPNXMN.js} +1 -1
  76. package/{chunk-NGNWWP6M.js → chunk-UOZTEZ7B.js} +1 -1
  77. package/chunk-V5ZJABDA.js +1 -0
  78. package/{chunk-VFBRHP2H.js → chunk-V63YAEPZ.js} +1 -1
  79. package/{chunk-KDSMLI73.js → chunk-VKNFRCHQ.js} +1 -1
  80. package/{chunk-7AVOHYTE.js → chunk-VLMNSWR3.js} +1 -1
  81. package/{chunk-T4IKTBRQ.js → chunk-VNF7NNO5.js} +1 -1
  82. package/{chunk-AODNZLCK.js → chunk-VPUFUCR3.js} +1 -1
  83. package/{chunk-MDXSNEQZ.js → chunk-WLAJ3YIP.js} +1 -1
  84. package/{chunk-37CUOEGJ.js → chunk-X5JLWZ7R.js} +1 -1
  85. package/{chunk-G2FJM62F.js → chunk-XHDAWK7I.js} +1 -1
  86. package/chunk-XZHXN75E.js +1 -0
  87. package/chunk-Y46QCSB5.js +1 -0
  88. package/chunk-YYAHWCC5.js +1 -0
  89. package/chunk-ZFREX3ZV.js +1 -0
  90. package/chunk-ZKGGCQ2N.js +2 -0
  91. package/chunk-ZPIR5QIQ.js +2 -0
  92. package/index.html +2 -2
  93. package/locale/messages.da.json +9 -23
  94. package/locale/messages.de.json +114 -60
  95. package/locale/messages.de_CH.json +80 -37
  96. package/locale/messages.en.json +73 -39
  97. package/locale/messages.en_GB.json +73 -39
  98. package/locale/messages.es.json +43 -10
  99. package/locale/messages.fr.json +611 -17
  100. package/locale/messages.it.json +104 -63
  101. package/locale/messages.json +73 -39
  102. package/locale/messages.pl.json +376 -12
  103. package/main-DLNEYRGV.js +1 -0
  104. package/package.json +1 -1
  105. package/ship-ui-assets/mcp/components.json +4388 -0
  106. package/styles-377DNUNK.css +1 -0
  107. package/chunk-26MRZAFB.js +0 -1
  108. package/chunk-26Z7TPJB.js +0 -4
  109. package/chunk-3K3BYB36.js +0 -1
  110. package/chunk-3QV6WLWV.js +0 -1
  111. package/chunk-4GXIF5HF.js +0 -1
  112. package/chunk-4RYK5OOO.js +0 -1
  113. package/chunk-5MHYH7GK.js +0 -2
  114. package/chunk-5QWAH3QX.js +0 -1
  115. package/chunk-5VE6P5U5.js +0 -1
  116. package/chunk-7DCQVM6E.js +0 -1
  117. package/chunk-AT64P6E5.js +0 -2
  118. package/chunk-BFTGDQ4K.js +0 -1
  119. package/chunk-BT2VIZXE.js +0 -1
  120. package/chunk-C25WT56X.js +0 -1
  121. package/chunk-C7N24TZM.js +0 -1
  122. package/chunk-CFNARBNK.js +0 -1
  123. package/chunk-COPBOHWE.js +0 -1
  124. package/chunk-DESKT7LH.js +0 -1
  125. package/chunk-EE27B3OV.js +0 -1
  126. package/chunk-F3JL4GJQ.js +0 -1
  127. package/chunk-G4IFZKMI.js +0 -1
  128. package/chunk-GJKZESBX.js +0 -1
  129. package/chunk-H4LQO7G2.js +0 -1
  130. package/chunk-HOGZ74SB.js +0 -1
  131. package/chunk-HSHF5HR7.js +0 -1
  132. package/chunk-I27PVH6D.js +0 -1
  133. package/chunk-I2RQR4CB.js +0 -1
  134. package/chunk-IGYSPFE7.js +0 -1
  135. package/chunk-JN4WCRAH.js +0 -1
  136. package/chunk-K34VOGDF.js +0 -1
  137. package/chunk-KV5UORE3.js +0 -1
  138. package/chunk-LT3AVRVP.js +0 -1
  139. package/chunk-LXSHDO5C.js +0 -11
  140. package/chunk-M7Y3VPRV.js +0 -1
  141. package/chunk-MIMGEZMT.js +0 -1
  142. package/chunk-MLNK7NFW.js +0 -2
  143. package/chunk-MMEFBZO4.js +0 -1
  144. package/chunk-NNNKIEPR.js +0 -1
  145. package/chunk-OIYIWMS7.js +0 -1
  146. package/chunk-OPLWAKSM.js +0 -3
  147. package/chunk-Q2UQ5J3C.js +0 -1
  148. package/chunk-Q74O3CWJ.js +0 -1
  149. package/chunk-S2RZQVCD.js +0 -1
  150. package/chunk-T4BXBCQI.js +0 -1
  151. package/chunk-U2E3ZQUP.js +0 -1
  152. package/chunk-UK7MV4OF.js +0 -1
  153. package/chunk-UNLX3IVU.js +0 -1
  154. package/chunk-UNMDSCAN.js +0 -1
  155. package/chunk-W3YBKYPJ.js +0 -1
  156. package/chunk-XIYAYCFU.js +0 -1
  157. package/chunk-XLMLR5EV.js +0 -1
  158. package/chunk-YHMXLWRX.js +0 -1
  159. package/chunk-YLQF5ATT.js +0 -1
  160. package/chunk-ZHGDQABC.js +0 -2
  161. package/main-HMCIC27B.js +0 -1
  162. package/styles-H32RJLOU.css +0 -1
@@ -0,0 +1 @@
1
+ import{g as a,h as b,i as c,j as d}from"./chunk-AWL7E6ZQ.js";import"./chunk-RWDQ3L3C.js";import"./chunk-V5ZJABDA.js";import"./chunk-ZPIR5QIQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-O3GGVB2B.js";import"./chunk-OAAXQ2BE.js";import"./chunk-7E5J43IH.js";import"./chunk-3MS6SVET.js";import"./chunk-4VYR5E5I.js";import"./chunk-KLAJGS5T.js";import"./chunk-NGKFJLI2.js";import"./chunk-KUX6NGQU.js";import"./chunk-Y46QCSB5.js";import"./chunk-JJY6UOEY.js";import"./chunk-2K74TI2N.js";import"./chunk-G3FMV74P.js";import"./chunk-LU7RSOI6.js";import"./chunk-VLMNSWR3.js";import"./chunk-VKNFRCHQ.js";import"./chunk-QY4Y5NJB.js";import"./chunk-7CGTOI24.js";export{a as SCHEDULE_DEFAULT_OPTIONS,c as SCHEDULE_FIELD_DEFAULTS,d as default,b as scheduleOptionToSchedule};
@@ -1 +1 @@
1
- import{a as D}from"./chunk-HUZXJWCG.js";import{c as j,e as q}from"./chunk-7TWUW4XJ.js";import{z as b}from"./chunk-UNMDSCAN.js";import{a as x,c as v}from"./chunk-CFNARBNK.js";import{ka as L}from"./chunk-7AVOHYTE.js";import{Cb as N,Cc as W,Db as C,Eb as _,Ec as $,L as O,Mc as p,Pa as M,Pb as A,Qb as w,R as h,Rb as P,Sb as F,Tb as G,W as c,cb as I,f as m,g as y,la as n,na as R}from"./chunk-26Z7TPJB.js";var S=class r{reconnectTimer=n(15e3);countdown=n(0);connectTimerEffect=R(()=>{let e=this.reconnectTimer();this.countdown.set(e/1e3)});interval=setInterval(()=>{if(this.countdown()<=1){this.countdown.set(this.reconnectTimer()/1e3);return}this.countdown.set(this.countdown()-1)},1e3);ngOnDestroy(){clearInterval(this.interval)}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=I({type:r,selectors:[["app-disconnected-dialog"]],decls:8,vars:4,consts:()=>{let e;e=$localize`Reconnecting...`;let t;return t=$localize` The connection to the server is lost, attempting again in ${"\uFFFD#6\uFFFD"}:START_TAG_STRONG:0:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_STRONG:`,[e,t,["header",""],["content",""]]},template:function(t,s){t&1&&(N(0,"header",2)(1,"h3"),P(2,0),C()(),N(3,"div",3)(4,"p"),A(5,1),_(6,"strong"),W(7,"number"),w(),C()()),t&2&&(M(7),F($(7,1,s.countdown(),"2.0-0")),G(5))},dependencies:[L],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var T=class r{dialog=c(b);#e=c(v);#i=n("disconnected");#s=n(null);#t=n(-1);#r=n(0);#l=n(!1);#u=new y;connectionStatus=this.#i.asReadonly();serverState=this.#s.asReadonly();#o=void 0;duration=c(j).relayIsEnabled()?"94s":"299s";start(){this.#l.set(!0),this.#u=new y,this.#c()}stop(){this.#u.next(),this.#u.complete(),this.#l.set(!1)}reconnect(){this.stop(),this.start()}reconnectIfNeeded(){this.#l()||this.reconnect()}#c(){this.#i.set("connecting"),this.#e.getApiV1Serverstate({lastEventId:this.#t(),longpoll:this.#t()>=0,duration:this.duration}).pipe(O(this.#u)).subscribe({next:e=>{e&&this.#a(e),this.#n()},error:e=>{let s=this.#r()+1,l=Math.min(5e3*s,3e4);this.#r.set(s),s>3&&this.#i.set("disconnected"),this.#o||(this.#o=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1})),this.#o.component.reconnectTimer.set(l),setTimeout(()=>{this.#c()},l)}})}#a(e){this.#i.set("connected"),this.#s.set(e),this.#t.set(e.LastEventID??-1),this.#r.set(0)}#n(){this.#l()&&this.#c()}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};var u=!1,k=class r{#e=c(q);#i=c(D);dialog=c(b);#s=null;#t=n("disconnected");#r=n(null);#l=n(null);#u=n(null);#o=n(null);#c=n(null);#a=void 0;#n=n({legacystatus:!0});shouldConnect=n(!0);connectionStatus=this.#t.asReadonly();serverState=this.#r.asReadonly();serverProgress=this.#l.asReadonly();serverSettings=this.#u.asReadonly();subscriptions=this.#n.asReadonly();serverTaskQueue=this.#o.asReadonly();backupListState=this.#c.asReadonly();#h=null;taskCompleted=new m(e=>{this.#h=e});#d=0;start(){this.#p(),this.shouldConnect.set(!0)}#p(){let e=this.#e.token();if(!e){console.error("No access token available");return}let t=window.location.protocol==="https:"?"wss:":"ws:",s=window.location.port?`:${window.location.port}`:"";window.location.port==="4200"&&(s=":8200");let l=window.location.hostname,g=x.BASE||"",f=this.#e.xsrfQueryParam(),Q=this.#i.hasWebSocketAuth()?`${t}//${l}${s}${g}/notifications${f?`?${f}`:""}`:`${t}//${l}${s}${g}/notifications?token=${e}${f?`&${f}`:""}`;this.#t.set("connecting"),this.#s=new WebSocket(Q),this.#s.onopen=()=>{u&&console.log("WebSocket connection established"),this.#i.hasWebSocketAuth()?(this.#t.set("authenticating"),this.#s?.send(JSON.stringify({Version:1,Token:e,Action:"auth"}))):this.#S()},this.#s.onmessage=d=>{if(this.#t()==="authenticating")try{let o=JSON.parse(d.data);if(o.Success){u&&console.log("WebSocket authentication successful"),this.#S();return}else if(o?.Type==="legacystatus")u&&console.log("WebSocket authentication successful"),this.#S();else{console.error("WebSocket authentication failed:",o.Message),this.#t.set("disconnected");return}}catch(o){console.error("Error parsing WebSocket authentication reply",o),this.#t.set("disconnected");return}try{let o=JSON.parse(d.data),a=o?.Type;if(a==="legacystatus"||a==null)u&&console.log("Received legacy status update:",o),this.#r.set(o);else if(a==="reply"){let i=o;i.Success||console.error("WebSocket reply error:",i.Message)}else if(a==="progress"){let i=o;u&&console.log("Received progress update:",i.Data),this.#l.set(i.Data)}else if(a==="serversettings"){let i=o;u&&console.log("Received server settings update:",i.Data),this.#u.set(i.Data)}else if(a==="taskqueue"){let i=o;u&&console.log("Received task update:",i.Data),this.#o.set(i.Data)}else if(a==="taskcompleted"){let i=o;u&&console.log("Received task completed:",i.Data),this.#h?.next(i.Data)}else if(a==="backuplist"){let i=o;u&&console.log("Received backup list update:",i.Data),this.#c.set(i.Data)}else console.warn("Unknown WebSocket message type:",a)}catch(o){console.error("Error parsing WebSocket message",o)}},this.#s.onclose=d=>{u&&console.log("WebSocket connection closed",d),this.#t.set("disconnected");var o=d.code===4401;o&&this.#e.refreshToken().subscribe({next:()=>{this.reconnect()},error:a=>{console.error("Error refreshing token",a)}}),this.shouldConnect()&&(this.#a||(this.#a=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#a.component.reconnectTimer.set(15e3)),setTimeout(()=>this.#p(),5e3))},this.#s.onerror=d=>{console.error("WebSocket error",d),this.#t.set("disconnected")}}#S(){this.#t.set("connected");let e=this.#n();Object.keys(e).length>0&&Object.entries(e).forEach(([t,s])=>{s!=null&&this.sendSubscribeRequest(t,s)}),this.#a&&this.#a.close()}stop(){this.shouldConnect.set(!1),this.#s?.close()}reconnect(){this.#s?.close(),this.start()}reconnectIfNeeded(){this.#s?.readyState!==WebSocket.OPEN&&this.reconnect()}sendSubscribeRequest(e,t){this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#d}`,Action:"sub",Service:e,Data:t||null}))}subscribe(e,t=void 0){let s=this.#n(),l=s[e];(!l||JSON.stringify(l)!==JSON.stringify(t||!0))&&(s[e]=t||!0,this.#n.set(s),this.#t()=="connected"&&this.sendSubscribeRequest(e,t))}unsubscribe(e){let t=this.#n();t[e]&&(delete t[e],this.#n.set(t),this.#t()=="connected"&&this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#d}`,Action:"unsub",Service:e})))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};var V=10,J=class r{#e=c(k);#i=c(T);#s=c(v);#t=c(D);#r=n("longpoll");#l=n(!1);#u=p(()=>this.#t.hasTaskCompletedOption()&&this.#r()==="websocket");#o={};#c=null;#a=!1;#n=[];constructor(){this.#e.subscribe("taskcompleted"),this.#e.taskCompleted.subscribe(e=>{if(this.#n.unshift(e),this.#n.length>V&&this.#n.pop(),!e.ID)return;let t=this.#o[e.ID];t&&(t.forEach(s=>{s.next(e),s.complete()}),delete this.#o[e.ID])})}connectionStatus=p(()=>this.#r()==="websocket"?this.#e.connectionStatus():this.#i.connectionStatus());isConnectionMethodSet=this.#l.asReadonly();serverState=p(()=>this.#r()==="websocket"?this.#e.serverState():this.#i.serverState());progressState=this.#e.serverProgress;taskQueueState=this.#e.serverTaskQueue;activeTaskQueueState=p(()=>this.#r()==="websocket"?this.#e.serverTaskQueue()?.map(t=>t.ID).filter(t=>t)??[]:(this.#i.serverState()?.SchedulerQueueIds??[]).map(t=>t.Item1).filter(t=>t));backupListState=p(()=>this.#e.backupListState());setConnectionMethod(e){e==="websocket"?(this.#e.reconnectIfNeeded(),this.#i.stop()):(this.#i.reconnectIfNeeded(),this.#e.stop()),this.#r.set(e),this.#l.set(!0)}getConnectionMethod(){return this.#r()}subscribe(e,t=null){this.#e.subscribe(e,t)}unsubscribe(e){this.#e.unsubscribe(e)}waitForTaskToComplete(e){return new m(t=>{let s=this.#n.find(l=>l.ID===e);if(s){t.next(s),t.complete();return}this.#o[e]=this.#o[e]||[],this.#o[e].push(t),this.#h()})}#h(){this.#a||this.#u()||(this.#a=!0,this.#d())}#d(){let e=Object.keys(this.#o).map(s=>parseInt(s,10));if(e.length===0){this.#p();return}let t=Math.min(...e);this.#s.getApiV1TaskByTaskid({taskid:t}).subscribe({next:s=>{s.TaskFinished!=null&&(this.#n.unshift(s),this.#n.length>V&&this.#n.pop(),this.#o[t].forEach(g=>{g.next(s),g.complete()}),delete this.#o[t])},complete:()=>{this.#c=window.setTimeout(()=>{this.#d()},1e3)},error:s=>{this.#c=window.setTimeout(()=>{this.#d()},3e3)}})}#p(){this.#c!==null&&(clearTimeout(this.#c),this.#c=null),this.#a=!1}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};export{k as a,J as b};
1
+ import{a as D}from"./chunk-NGKFJLI2.js";import{c as j,e as q}from"./chunk-KUX6NGQU.js";import{z as b}from"./chunk-Y46QCSB5.js";import{a as x,d as v}from"./chunk-JJY6UOEY.js";import{ka as L}from"./chunk-VLMNSWR3.js";import{Fb as N,Fc as W,Gb as C,Hb as _,Hc as $,L as O,Pc as p,Sa as M,Sb as A,Tb as w,U as h,Ub as P,Vb as F,Wb as G,Z as c,f as m,fb as I,g as y,oa as n,qa as R}from"./chunk-QY4Y5NJB.js";var S=class r{reconnectTimer=n(15e3);countdown=n(0);connectTimerEffect=R(()=>{let e=this.reconnectTimer();this.countdown.set(e/1e3)});interval=setInterval(()=>{if(this.countdown()<=1){this.countdown.set(this.reconnectTimer()/1e3);return}this.countdown.set(this.countdown()-1)},1e3);ngOnDestroy(){clearInterval(this.interval)}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=I({type:r,selectors:[["app-disconnected-dialog"]],decls:8,vars:4,consts:()=>{let e;e=$localize`Reconnecting...`;let t;return t=$localize` The connection to the server is lost, attempting again in ${"\uFFFD#6\uFFFD"}:START_TAG_STRONG:0:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_STRONG:`,[e,t,["header",""],["content",""]]},template:function(t,s){t&1&&(N(0,"header",2)(1,"h3"),P(2,0),C()(),N(3,"div",3)(4,"p"),A(5,1),_(6,"strong"),W(7,"number"),w(),C()()),t&2&&(M(7),F($(7,1,s.countdown(),"2.0-0")),G(5))},dependencies:[L],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var T=class r{dialog=c(b);#e=c(v);#i=n("disconnected");#s=n(null);#t=n(-1);#r=n(0);#l=n(!1);#u=new y;connectionStatus=this.#i.asReadonly();serverState=this.#s.asReadonly();#o=void 0;duration=c(j).relayIsEnabled()?"94s":"299s";start(){this.#l.set(!0),this.#u=new y,this.#c()}stop(){this.#u.next(),this.#u.complete(),this.#l.set(!1)}reconnect(){this.stop(),this.start()}reconnectIfNeeded(){this.#l()||this.reconnect()}#c(){this.#i.set("connecting"),this.#e.getApiV1Serverstate({lastEventId:this.#t(),longpoll:this.#t()>=0,duration:this.duration}).pipe(O(this.#u)).subscribe({next:e=>{e&&this.#a(e),this.#n()},error:e=>{let s=this.#r()+1,l=Math.min(5e3*s,3e4);this.#r.set(s),s>3&&this.#i.set("disconnected"),this.#o||(this.#o=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1})),this.#o.component.reconnectTimer.set(l),setTimeout(()=>{this.#c()},l)}})}#a(e){this.#i.set("connected"),this.#s.set(e),this.#t.set(e.LastEventID??-1),this.#r.set(0)}#n(){this.#l()&&this.#c()}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};var u=!1,k=class r{#e=c(q);#i=c(D);dialog=c(b);#s=null;#t=n("disconnected");#r=n(null);#l=n(null);#u=n(null);#o=n(null);#c=n(null);#a=void 0;#n=n({legacystatus:!0});shouldConnect=n(!0);connectionStatus=this.#t.asReadonly();serverState=this.#r.asReadonly();serverProgress=this.#l.asReadonly();serverSettings=this.#u.asReadonly();subscriptions=this.#n.asReadonly();serverTaskQueue=this.#o.asReadonly();backupListState=this.#c.asReadonly();#h=null;taskCompleted=new m(e=>{this.#h=e});#d=0;start(){this.#p(),this.shouldConnect.set(!0)}#p(){let e=this.#e.token();if(!e){console.error("No access token available");return}let t=window.location.protocol==="https:"?"wss:":"ws:",s=window.location.port?`:${window.location.port}`:"";window.location.port==="4200"&&(s=":8200");let l=window.location.hostname,g=x.BASE||"",f=this.#e.xsrfQueryParam(),Q=this.#i.hasWebSocketAuth()?`${t}//${l}${s}${g}/notifications${f?`?${f}`:""}`:`${t}//${l}${s}${g}/notifications?token=${e}${f?`&${f}`:""}`;this.#t.set("connecting"),this.#s=new WebSocket(Q),this.#s.onopen=()=>{u&&console.log("WebSocket connection established"),this.#i.hasWebSocketAuth()?(this.#t.set("authenticating"),this.#s?.send(JSON.stringify({Version:1,Token:e,Action:"auth"}))):this.#S()},this.#s.onmessage=d=>{if(this.#t()==="authenticating")try{let o=JSON.parse(d.data);if(o.Success){u&&console.log("WebSocket authentication successful"),this.#S();return}else if(o?.Type==="legacystatus")u&&console.log("WebSocket authentication successful"),this.#S();else{console.error("WebSocket authentication failed:",o.Message),this.#t.set("disconnected");return}}catch(o){console.error("Error parsing WebSocket authentication reply",o),this.#t.set("disconnected");return}try{let o=JSON.parse(d.data),a=o?.Type;if(a==="legacystatus"||a==null)u&&console.log("Received legacy status update:",o),this.#r.set(o);else if(a==="reply"){let i=o;i.Success||console.error("WebSocket reply error:",i.Message)}else if(a==="progress"){let i=o;u&&console.log("Received progress update:",i.Data),this.#l.set(i.Data)}else if(a==="serversettings"){let i=o;u&&console.log("Received server settings update:",i.Data),this.#u.set(i.Data)}else if(a==="taskqueue"){let i=o;u&&console.log("Received task update:",i.Data),this.#o.set(i.Data)}else if(a==="taskcompleted"){let i=o;u&&console.log("Received task completed:",i.Data),this.#h?.next(i.Data)}else if(a==="backuplist"){let i=o;u&&console.log("Received backup list update:",i.Data),this.#c.set(i.Data)}else console.warn("Unknown WebSocket message type:",a)}catch(o){console.error("Error parsing WebSocket message",o)}},this.#s.onclose=d=>{u&&console.log("WebSocket connection closed",d),this.#t.set("disconnected");var o=d.code===4401;o&&this.#e.refreshToken().subscribe({next:()=>{this.reconnect()},error:a=>{console.error("Error refreshing token",a)}}),this.shouldConnect()&&(this.#a||(this.#a=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#a.component.reconnectTimer.set(15e3)),setTimeout(()=>this.#p(),5e3))},this.#s.onerror=d=>{console.error("WebSocket error",d),this.#t.set("disconnected")}}#S(){this.#t.set("connected");let e=this.#n();Object.keys(e).length>0&&Object.entries(e).forEach(([t,s])=>{s!=null&&this.sendSubscribeRequest(t,s)}),this.#a&&this.#a.close()}stop(){this.shouldConnect.set(!1),this.#s?.close()}reconnect(){this.#s?.close(),this.start()}reconnectIfNeeded(){this.#s?.readyState!==WebSocket.OPEN&&this.reconnect()}sendSubscribeRequest(e,t){this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#d}`,Action:"sub",Service:e,Data:t||null}))}subscribe(e,t=void 0){let s=this.#n(),l=s[e];(!l||JSON.stringify(l)!==JSON.stringify(t||!0))&&(s[e]=t||!0,this.#n.set(s),this.#t()=="connected"&&this.sendSubscribeRequest(e,t))}unsubscribe(e){let t=this.#n();t[e]&&(delete t[e],this.#n.set(t),this.#t()=="connected"&&this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#d}`,Action:"unsub",Service:e})))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};var V=10,J=class r{#e=c(k);#i=c(T);#s=c(v);#t=c(D);#r=n("longpoll");#l=n(!1);#u=p(()=>this.#t.hasTaskCompletedOption()&&this.#r()==="websocket");#o={};#c=null;#a=!1;#n=[];constructor(){this.#e.subscribe("taskcompleted"),this.#e.taskCompleted.subscribe(e=>{if(this.#n.unshift(e),this.#n.length>V&&this.#n.pop(),!e.ID)return;let t=this.#o[e.ID];t&&(t.forEach(s=>{s.next(e),s.complete()}),delete this.#o[e.ID])})}connectionStatus=p(()=>this.#r()==="websocket"?this.#e.connectionStatus():this.#i.connectionStatus());isConnectionMethodSet=this.#l.asReadonly();serverState=p(()=>this.#r()==="websocket"?this.#e.serverState():this.#i.serverState());progressState=this.#e.serverProgress;taskQueueState=this.#e.serverTaskQueue;activeTaskQueueState=p(()=>this.#r()==="websocket"?this.#e.serverTaskQueue()?.map(t=>t.ID).filter(t=>t)??[]:(this.#i.serverState()?.SchedulerQueueIds??[]).map(t=>t.Item1).filter(t=>t));backupListState=p(()=>this.#e.backupListState());setConnectionMethod(e){e==="websocket"?(this.#e.reconnectIfNeeded(),this.#i.stop()):(this.#i.reconnectIfNeeded(),this.#e.stop()),this.#r.set(e),this.#l.set(!0)}getConnectionMethod(){return this.#r()}subscribe(e,t=null){this.#e.subscribe(e,t)}unsubscribe(e){this.#e.unsubscribe(e)}waitForTaskToComplete(e){return new m(t=>{let s=this.#n.find(l=>l.ID===e);if(s){t.next(s),t.complete();return}this.#o[e]=this.#o[e]||[],this.#o[e].push(t),this.#h()})}#h(){this.#a||this.#u()||(this.#a=!0,this.#d())}#d(){let e=Object.keys(this.#o).map(s=>parseInt(s,10));if(e.length===0){this.#p();return}let t=Math.min(...e);this.#s.getApiV1TaskByTaskid({taskid:t}).subscribe({next:s=>{s.TaskFinished!=null&&(this.#n.unshift(s),this.#n.length>V&&this.#n.pop(),this.#o[t].forEach(g=>{g.next(s),g.complete()}),delete this.#o[t])},complete:()=>{this.#c=window.setTimeout(()=>{this.#d()},1e3)},error:s=>{this.#c=window.setTimeout(()=>{this.#d()},3e3)}})}#p(){this.#c!==null&&(clearTimeout(this.#c),this.#c=null),this.#a=!1}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};export{k as a,J as b};
@@ -1 +1 @@
1
- import{$ as ha,A as I,Aa as Ka,B as J,Ba as La,C as K,Ca as Ma,D as L,Da as Na,E as M,Ea as Oa,F as N,Fa as Pa,G as O,Ga as Qa,H as P,Ha as Ra,I as Q,J as R,K as S,L as T,M as U,N as V,O as W,P as X,Q as Y,R as Z,S as _,T as $,U as aa,V as ba,W as ca,X as da,Y as ea,Z as fa,_ as ga,a as i,aa as ia,b as j,ba as ja,c as k,ca as ka,d as l,da as la,e as m,ea as ma,f as n,fa as na,g as o,ga as oa,h as p,ha as pa,i as q,ia as qa,j as r,ja as ra,k as s,ka as sa,l as t,la as ta,m as u,ma as ua,n as v,na as va,o as w,oa as wa,p as x,pa as xa,q as y,qa as ya,r as z,ra as Ba,s as A,sa as Ca,t as B,ta as Da,u as C,ua as Ea,v as D,va as Fa,w as E,wa as Ga,x as F,xa as Ha,y as G,ya as Ia,z as H,za as Ja}from"./chunk-7AVOHYTE.js";import{a as c,b as d,c as e,d as f,e as g,f as h,g as za,h as Aa}from"./chunk-KDSMLI73.js";import{ea as a,za as b}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";export{k as APP_BASE_HREF,ha as AsyncPipe,h as BrowserPlatformLocation,wa as CommonModule,ua as CurrencyPipe,ma as DATE_PIPE_DEFAULT_OPTIONS,la as DATE_PIPE_DEFAULT_TIMEZONE,a as DOCUMENT,na as DatePipe,sa as DecimalPipe,q as FormStyle,s as FormatWidth,n as HashLocationStrategy,oa as I18nPluralPipe,pa as I18nSelectPipe,b as IMAGE_CONFIG,Ka as IMAGE_LOADER,qa as JsonPipe,ra as KeyValuePipe,g as LOCATION_INITIALIZED,m as Location,j as LocationStrategy,ia as LowerCasePipe,W as NgClass,X as NgComponentOutlet,Z as NgFor,Z as NgForOf,Y as NgForOfContext,_ as NgIf,$ as NgIfContext,V as NgLocaleLocalization,U as NgLocalization,Ra as NgOptimizedImage,da as NgPlural,ea as NgPluralCase,fa as NgStyle,aa as NgSwitch,ba as NgSwitchCase,ca as NgSwitchDefault,ga as NgTemplateOutlet,o as NumberFormatStyle,t as NumberSymbol,Qa as PRECONNECT_CHECK_BLOCKLIST,l as PathLocationStrategy,ta as PercentPipe,f as PlatformLocation,ya as PlatformNavigation,p as Plural,va as SlicePipe,ja as TitleCasePipe,r as TranslationWidth,ka as UpperCasePipe,Ha as VERSION,Ia as ViewportScroller,u as WeekDay,Aa as XhrFactory,R as formatCurrency,Q as formatDate,T as formatNumber,S as formatPercent,O as getCurrencySymbol,J as getLocaleCurrencyCode,I as getLocaleCurrencyName,H as getLocaleCurrencySymbol,C as getLocaleDateFormat,E as getLocaleDateTimeFormat,x as getLocaleDayNames,w as getLocaleDayPeriods,N as getLocaleDirection,z as getLocaleEraNames,L as getLocaleExtraDayPeriodRules,M as getLocaleExtraDayPeriods,A as getLocaleFirstDayOfWeek,v as getLocaleId,y as getLocaleMonthNames,G as getLocaleNumberFormat,F as getLocaleNumberSymbol,K as getLocalePluralCase,D as getLocaleTimeFormat,B as getLocaleWeekEndRange,P as getNumberOfCurrencyDigits,Fa as isPlatformBrowser,Ga as isPlatformServer,La as provideCloudflareLoader,Ma as provideCloudinaryLoader,Na as provideImageKitLoader,Oa as provideImgixLoader,Pa as provideNetlifyLoader,Ca as registerLocaleData,e as \u0275DomAdapter,Ba as \u0275NavigationAdapterForLocation,Ja as \u0275NullViewportScroller,Da as \u0275PLATFORM_BROWSER_ID,Ea as \u0275PLATFORM_SERVER_ID,xa as \u0275PRECOMMIT_HANDLER_SUPPORTED,c as \u0275getDOM,i as \u0275normalizeQueryParams,za as \u0275parseCookieValue,d as \u0275setRootDomAdapter};
1
+ import{$ as ha,A as I,Aa as Ka,B as J,Ba as La,C as K,Ca as Ma,D as L,Da as Na,E as M,Ea as Oa,F as N,Fa as Pa,G as O,Ga as Qa,H as P,Ha as Ra,I as Q,J as R,K as S,L as T,M as U,N as V,O as W,P as X,Q as Y,R as Z,S as _,T as $,U as aa,V as ba,W as ca,X as da,Y as ea,Z as fa,_ as ga,a as i,aa as ia,b as j,ba as ja,c as k,ca as ka,d as l,da as la,e as m,ea as ma,f as n,fa as na,g as o,ga as oa,h as p,ha as pa,i as q,ia as qa,j as r,ja as ra,k as s,ka as sa,l as t,la as ta,m as u,ma as ua,n as v,na as va,o as w,oa as wa,p as x,pa as xa,q as y,qa as ya,r as z,ra as Ba,s as A,sa as Ca,t as B,ta as Da,u as C,ua as Ea,v as D,va as Fa,w as E,wa as Ga,x as F,xa as Ha,y as G,ya as Ia,z as H,za as Ja}from"./chunk-VLMNSWR3.js";import{a as c,b as d,c as e,d as f,e as g,f as h,g as za,h as Aa}from"./chunk-VKNFRCHQ.js";import{Ca as b,ha as a}from"./chunk-QY4Y5NJB.js";import"./chunk-7CGTOI24.js";export{k as APP_BASE_HREF,ha as AsyncPipe,h as BrowserPlatformLocation,wa as CommonModule,ua as CurrencyPipe,ma as DATE_PIPE_DEFAULT_OPTIONS,la as DATE_PIPE_DEFAULT_TIMEZONE,a as DOCUMENT,na as DatePipe,sa as DecimalPipe,q as FormStyle,s as FormatWidth,n as HashLocationStrategy,oa as I18nPluralPipe,pa as I18nSelectPipe,b as IMAGE_CONFIG,Ka as IMAGE_LOADER,qa as JsonPipe,ra as KeyValuePipe,g as LOCATION_INITIALIZED,m as Location,j as LocationStrategy,ia as LowerCasePipe,W as NgClass,X as NgComponentOutlet,Z as NgFor,Z as NgForOf,Y as NgForOfContext,_ as NgIf,$ as NgIfContext,V as NgLocaleLocalization,U as NgLocalization,Ra as NgOptimizedImage,da as NgPlural,ea as NgPluralCase,fa as NgStyle,aa as NgSwitch,ba as NgSwitchCase,ca as NgSwitchDefault,ga as NgTemplateOutlet,o as NumberFormatStyle,t as NumberSymbol,Qa as PRECONNECT_CHECK_BLOCKLIST,l as PathLocationStrategy,ta as PercentPipe,f as PlatformLocation,ya as PlatformNavigation,p as Plural,va as SlicePipe,ja as TitleCasePipe,r as TranslationWidth,ka as UpperCasePipe,Ha as VERSION,Ia as ViewportScroller,u as WeekDay,Aa as XhrFactory,R as formatCurrency,Q as formatDate,T as formatNumber,S as formatPercent,O as getCurrencySymbol,J as getLocaleCurrencyCode,I as getLocaleCurrencyName,H as getLocaleCurrencySymbol,C as getLocaleDateFormat,E as getLocaleDateTimeFormat,x as getLocaleDayNames,w as getLocaleDayPeriods,N as getLocaleDirection,z as getLocaleEraNames,L as getLocaleExtraDayPeriodRules,M as getLocaleExtraDayPeriods,A as getLocaleFirstDayOfWeek,v as getLocaleId,y as getLocaleMonthNames,G as getLocaleNumberFormat,F as getLocaleNumberSymbol,K as getLocalePluralCase,D as getLocaleTimeFormat,B as getLocaleWeekEndRange,P as getNumberOfCurrencyDigits,Fa as isPlatformBrowser,Ga as isPlatformServer,La as provideCloudflareLoader,Ma as provideCloudinaryLoader,Na as provideImageKitLoader,Oa as provideImgixLoader,Pa as provideNetlifyLoader,Ca as registerLocaleData,e as \u0275DomAdapter,Ba as \u0275NavigationAdapterForLocation,Ja as \u0275NullViewportScroller,Da as \u0275PLATFORM_BROWSER_ID,Ea as \u0275PLATFORM_SERVER_ID,xa as \u0275PRECOMMIT_HANDLER_SUPPORTED,c as \u0275getDOM,i as \u0275normalizeQueryParams,za as \u0275parseCookieValue,d as \u0275setRootDomAdapter};
@@ -1 +1 @@
1
- import{a as l,c as k}from"./chunk-CFNARBNK.js";import{d as O}from"./chunk-I27PVH6D.js";import{a as T,d as b}from"./chunk-PO3L6MKW.js";import{va as v,wa as n}from"./chunk-7AVOHYTE.js";import{C as u,E as N,M as f,R as c,W as i,f as A,i as E,l as R,la as a,p as m,wa as P,z as y}from"./chunk-26Z7TPJB.js";import{a as I}from"./chunk-7CGTOI24.js";var g=class r{platformId=i(P);STORAGE_VERSION="v1";APP_NAME="duplicati";PERSISTED_PREFIX="persist:";getItemParsed(e,t=!1){return n(this.platformId)?null:JSON.parse(localStorage.getItem(`${this.STORAGE_VERSION}:${t?this.PERSISTED_PREFIX:""}${this.APP_NAME}:${e}`)??"null")}setItemParsed(e,t,o=!1){if(!n(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${o?this.PERSISTED_PREFIX:""}${this.APP_NAME}:${e}`,JSON.stringify(t))}get length(){return v(this.platformId)?localStorage.length:0}getItem(e){return n(this.platformId)?null:localStorage.getItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`)??null}setItem(e,t){if(!n(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`,t)}removeItem(e){n(this.platformId)||(localStorage.removeItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`),localStorage.removeItem(`${this.STORAGE_VERSION}:${this.PERSISTED_PREFIX}${this.APP_NAME}:${e}`))}clearAllNotCurrentVersion(){if(!n(this.platformId))for(var e in localStorage)!e.startsWith(this.STORAGE_VERSION)&&e.includes(this.APP_NAME)&&localStorage.removeItem(e)}clearAll(){n(this.platformId)||localStorage.clear()}clear(){if(!n(this.platformId))for(var e in localStorage)e.includes(this.APP_NAME)&&!e.includes(this.PERSISTED_PREFIX)&&localStorage.removeItem(e)}key(e){return n(this.platformId)?null:localStorage.key(e)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=c({token:r,factory:r.\u0275fac})};function M(){try{let r=document.querySelector('meta[name="duplicati-proxy-config"]');if(r){let e=(r.getAttribute("content")||"").trim();if(e&&e.startsWith("/"))return e}}catch(r){console.warn("Failed to read proxy configuration from meta tag:",r)}return null}function _(){try{let r=document.querySelector('meta[name="duplicati-enable-iframe-hosting"]');if(r){let e=(r.getAttribute("content")||"").trim();if(e&&e.length>0)return e.toLowerCase()!=="true"}}catch(r){console.warn("Failed to read disable relay support configuration from meta tag:",r)}return!0}function L(){try{let r=document.querySelector('meta[name="duplicati-xsrf-config"]');if(r){let e=(r.getAttribute("data-header-name")||"").trim(),t=(r.getAttribute("data-query-name")||"").trim();if(e&&t&&e.length>0&&t.length>0){let s=new URLSearchParams(window.location.search).get(t);if(s)return{headerName:e,queryName:t,headerValue:s}}}}catch(r){console.warn("Failed to read XSRF configuration from meta tags:",r)}return null}function x(){let r=L();return r?`${r.queryName}=${encodeURIComponent(r.headerValue)}`:null}function G(){let r=M();if(r&&r.length>0){let t=r;t.startsWith("/")||(t=`/${t}`),t.endsWith("/")&&(t=t.slice(0,-1)),l.BASE=t}else l.BASE="";let e=L();e&&(l.HEADERS={[e.headerName]:e.headerValue})}var h=class r{#s=i(g);#o=a(null);#t=window.self!==window.top&&_();#r=a(this.#t);relayIsEnabled=this.#r.asReadonly();config=this.#o.asReadonly();configLoaded=this.#t?new E:null;isLoading=a(this.#t);parentIframeListner=null;parentOrigin="*";fetchConfig(){this.#n(),this.#t&&(this.#r.set(!0),this.parentIframeListner=new AbortController,this.#e("connected"),window.addEventListener("message",e=>{if(e.data.startsWith("access:")){let t=e.data.replace("access:",""),o=JSON.parse(t);if(!o?.accessToken||!o?.clientId){this.#e("error:invalid-config"),this.#r.set(!1);return}if(typeof o.clientId!="string"){this.#e("error:invalid-config"),this.#r.set(!1);return}if(typeof o.accessToken!="string"){this.#e("error:invalid-config"),this.#r.set(!1);return}let s=this.#s.getItem("locale")??"en-US",S=o.locale??"en-US";s!==S&&(this.#s.setItem("locale",S),window.location.reload()),this.#o.set(o),this.configLoaded?.next(!0),this.isLoading.set(!1),this.#e("handshake-complete")}},{signal:this.parentIframeListner.signal}))}#e(e){window.parent.postMessage(e,"*")}#n(){this.parentIframeListner&&(this.parentIframeListner.abort(),this.parentIframeListner=null)}setConfig(e){this.#o.set(e)}clearConfig(){this.#o.set(null)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})};var $="PROXY_AUTHED_FAKE_TOKEN",d="refreshNonce",p="v1:persist:duplicati:refreshNonce",D=class r{#s=i(O);#o=i(b);#t=i(k);#r=i(h);#e=a(null);#n=a(!1);#i=a(!1);#a=a(x());xsrfQueryParam=this.#a.asReadonly();token=this.#e.asReadonly();isLoggingOut=this.#n.asReadonly();setRefreshNonce(e,t){if(!e){sessionStorage.removeItem(d);return}t?localStorage.setItem(p,e||""):sessionStorage.setItem(d,e||"")}getRefreshNonceBody(){let e=sessionStorage.getItem(d),t=localStorage.getItem(p),o=e||t;return{requestBody:o?{requestBody:{Nonce:o}}:void 0,local:o===t}}login(e,t){return this.#t.postApiV1AuthLogin({requestBody:{Password:e,RememberMe:t}}).pipe(u(1),f(o=>{o.AccessToken?(this.#e.set(o.AccessToken),this.setRefreshNonce(o.RefreshNonce,t)):this.#e.set(null)}))}refreshToken(){if(this.#r.relayIsEnabled())return this.#e.set($),new A(o=>{o.next({AccessToken:$}),o.complete()});if(this.#i())return this.#t.postApiV1AuthIssuetokenByOperation({operation:"websocket"}).pipe(u(1),f(o=>{o.Token&&this.#e.set(o.Token)}),m(o=>({AccessToken:o.Token})));let{requestBody:e,local:t}=this.getRefreshNonceBody();return this.#t.postApiV1AuthRefresh(e).pipe(u(1),f(o=>{o.AccessToken&&(this.#e.set(o.AccessToken),this.setRefreshNonce(o.RefreshNonce,t))}))}checkProxyAuthed(){let e=new T(I({"custom-proxy-check":"true"},l.HEADERS??{})),t=l.BASE||"";return this.#o.post(`${t}/api/v1/auth/status`,null,{headers:e}).pipe(m(o=>{let s=o;return s?.authorized&&s?.socketToken?(this.#e.set(s.socketToken),this.#i.set(!0),!0):!1}),y(()=>R(!1)))}logout(){this.#n.set(!0);let{requestBody:e,local:t}=this.getRefreshNonceBody();sessionStorage.removeItem(d),t&&localStorage.removeItem(p),this.#t.postApiV1AuthRefreshLogout(e).pipe(u(1),N(()=>{this.#n.set(!1),this.#e.set(null),this.#s.navigate(["/login"])})).subscribe()}static \u0275fac=function(t){return new(t||r)};static \u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})};export{g as a,G as b,h as c,$ as d,D as e};
1
+ import{a as l,d as k}from"./chunk-JJY6UOEY.js";import{d as O}from"./chunk-2K74TI2N.js";import{a as T,d as b}from"./chunk-LU7RSOI6.js";import{va as v,wa as n}from"./chunk-VLMNSWR3.js";import{C as u,E as N,M as f,U as c,Z as i,f as A,i as E,l as R,oa as a,p as m,z as y,za as P}from"./chunk-QY4Y5NJB.js";import{a as I}from"./chunk-7CGTOI24.js";var g=class r{platformId=i(P);STORAGE_VERSION="v1";APP_NAME="duplicati";PERSISTED_PREFIX="persist:";getItemParsed(e,t=!1){return n(this.platformId)?null:JSON.parse(localStorage.getItem(`${this.STORAGE_VERSION}:${t?this.PERSISTED_PREFIX:""}${this.APP_NAME}:${e}`)??"null")}setItemParsed(e,t,o=!1){if(!n(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${o?this.PERSISTED_PREFIX:""}${this.APP_NAME}:${e}`,JSON.stringify(t))}get length(){return v(this.platformId)?localStorage.length:0}getItem(e){return n(this.platformId)?null:localStorage.getItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`)??null}setItem(e,t){if(!n(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`,t)}removeItem(e){n(this.platformId)||(localStorage.removeItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`),localStorage.removeItem(`${this.STORAGE_VERSION}:${this.PERSISTED_PREFIX}${this.APP_NAME}:${e}`))}clearAllNotCurrentVersion(){if(!n(this.platformId))for(var e in localStorage)!e.startsWith(this.STORAGE_VERSION)&&e.includes(this.APP_NAME)&&localStorage.removeItem(e)}clearAll(){n(this.platformId)||localStorage.clear()}clear(){if(!n(this.platformId))for(var e in localStorage)e.includes(this.APP_NAME)&&!e.includes(this.PERSISTED_PREFIX)&&localStorage.removeItem(e)}key(e){return n(this.platformId)?null:localStorage.key(e)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=c({token:r,factory:r.\u0275fac})};function M(){try{let r=document.querySelector('meta[name="duplicati-proxy-config"]');if(r){let e=(r.getAttribute("content")||"").trim();if(e&&e.startsWith("/"))return e}}catch(r){console.warn("Failed to read proxy configuration from meta tag:",r)}return null}function _(){try{let r=document.querySelector('meta[name="duplicati-enable-iframe-hosting"]');if(r){let e=(r.getAttribute("content")||"").trim();if(e&&e.length>0)return e.toLowerCase()!=="true"}}catch(r){console.warn("Failed to read disable relay support configuration from meta tag:",r)}return!0}function L(){try{let r=document.querySelector('meta[name="duplicati-xsrf-config"]');if(r){let e=(r.getAttribute("data-header-name")||"").trim(),t=(r.getAttribute("data-query-name")||"").trim();if(e&&t&&e.length>0&&t.length>0){let s=new URLSearchParams(window.location.search).get(t);if(s)return{headerName:e,queryName:t,headerValue:s}}}}catch(r){console.warn("Failed to read XSRF configuration from meta tags:",r)}return null}function x(){let r=L();return r?`${r.queryName}=${encodeURIComponent(r.headerValue)}`:null}function G(){let r=M();if(r&&r.length>0){let t=r;t.startsWith("/")||(t=`/${t}`),t.endsWith("/")&&(t=t.slice(0,-1)),l.BASE=t}else l.BASE="";let e=L();e&&(l.HEADERS={[e.headerName]:e.headerValue})}var h=class r{#s=i(g);#o=a(null);#t=window.self!==window.top&&_();#r=a(this.#t);relayIsEnabled=this.#r.asReadonly();config=this.#o.asReadonly();configLoaded=this.#t?new E:null;isLoading=a(this.#t);parentIframeListner=null;parentOrigin="*";fetchConfig(){this.#n(),this.#t&&(this.#r.set(!0),this.parentIframeListner=new AbortController,this.#e("connected"),window.addEventListener("message",e=>{if(e.data.startsWith("access:")){let t=e.data.replace("access:",""),o=JSON.parse(t);if(!o?.accessToken||!o?.clientId){this.#e("error:invalid-config"),this.#r.set(!1);return}if(typeof o.clientId!="string"){this.#e("error:invalid-config"),this.#r.set(!1);return}if(typeof o.accessToken!="string"){this.#e("error:invalid-config"),this.#r.set(!1);return}let s=this.#s.getItem("locale")??"en-US",S=o.locale??"en-US";s!==S&&(this.#s.setItem("locale",S),window.location.reload()),this.#o.set(o),this.configLoaded?.next(!0),this.isLoading.set(!1),this.#e("handshake-complete")}},{signal:this.parentIframeListner.signal}))}#e(e){window.parent.postMessage(e,"*")}#n(){this.parentIframeListner&&(this.parentIframeListner.abort(),this.parentIframeListner=null)}setConfig(e){this.#o.set(e)}clearConfig(){this.#o.set(null)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})};var $="PROXY_AUTHED_FAKE_TOKEN",d="refreshNonce",p="v1:persist:duplicati:refreshNonce",D=class r{#s=i(O);#o=i(b);#t=i(k);#r=i(h);#e=a(null);#n=a(!1);#i=a(!1);#a=a(x());xsrfQueryParam=this.#a.asReadonly();token=this.#e.asReadonly();isLoggingOut=this.#n.asReadonly();setRefreshNonce(e,t){if(!e){sessionStorage.removeItem(d);return}t?localStorage.setItem(p,e||""):sessionStorage.setItem(d,e||"")}getRefreshNonceBody(){let e=sessionStorage.getItem(d),t=localStorage.getItem(p),o=e||t;return{requestBody:o?{requestBody:{Nonce:o}}:void 0,local:o===t}}login(e,t){return this.#t.postApiV1AuthLogin({requestBody:{Password:e,RememberMe:t}}).pipe(u(1),f(o=>{o.AccessToken?(this.#e.set(o.AccessToken),this.setRefreshNonce(o.RefreshNonce,t)):this.#e.set(null)}))}refreshToken(){if(this.#r.relayIsEnabled())return this.#e.set($),new A(o=>{o.next({AccessToken:$}),o.complete()});if(this.#i())return this.#t.postApiV1AuthIssuetokenByOperation({operation:"websocket"}).pipe(u(1),f(o=>{o.Token&&this.#e.set(o.Token)}),m(o=>({AccessToken:o.Token})));let{requestBody:e,local:t}=this.getRefreshNonceBody();return this.#t.postApiV1AuthRefresh(e).pipe(u(1),f(o=>{o.AccessToken&&(this.#e.set(o.AccessToken),this.setRefreshNonce(o.RefreshNonce,t))}))}checkProxyAuthed(){let e=new T(I({"custom-proxy-check":"true"},l.HEADERS??{})),t=l.BASE||"";return this.#o.post(`${t}/api/v1/auth/status`,null,{headers:e}).pipe(m(o=>{let s=o;return s?.authorized&&s?.socketToken?(this.#e.set(s.socketToken),this.#i.set(!0),!0):!1}),y(()=>R(!1)))}logout(){this.#n.set(!0);let{requestBody:e,local:t}=this.getRefreshNonceBody();sessionStorage.removeItem(d),t&&localStorage.removeItem(p),this.#t.postApiV1AuthRefreshLogout(e).pipe(u(1),N(()=>{this.#n.set(!1),this.#e.set(null),this.#s.navigate(["/login"])})).subscribe()}static \u0275fac=function(t){return new(t||r)};static \u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})};export{g as a,G as b,h as c,$ as d,D as e};
@@ -0,0 +1 @@
1
+ import{a as le}from"./chunk-GGW26MAG.js";import"./chunk-6Q6SSTBK.js";import{a as ae}from"./chunk-EG3PT3XW.js";import{a as _e}from"./chunk-7E5J43IH.js";import"./chunk-QY5UGQ3R.js";import{c as re}from"./chunk-4VYR5E5I.js";import"./chunk-KLAJGS5T.js";import"./chunk-NGKFJLI2.js";import"./chunk-KUX6NGQU.js";import{B as ie,D as ne,b as H,e as Q,i as Y,s as Z,v as ee,z as te}from"./chunk-Y46QCSB5.js";import{d as oe}from"./chunk-JJY6UOEY.js";import{d as j,e as q}from"./chunk-2K74TI2N.js";import"./chunk-G3FMV74P.js";import"./chunk-LU7RSOI6.js";import"./chunk-VLMNSWR3.js";import"./chunk-VKNFRCHQ.js";import{Ac as J,Bb as N,Bc as X,Cb as n,Db as o,E as K,Fc as z,Ic as V,Lb as g,Pc as M,Sa as r,Ub as c,Uc as W,Vb as A,Wb as L,Xb as F,Yb as $,Z as u,_b as C,ca as p,da as P,fb as y,jc as x,l as k,mc as E,oa as T,p as U,rc as S,sc as D,tc as h,uc as G,vb as m,vc as w,wb as f,wc as v,z as I}from"./chunk-QY4Y5NJB.js";import"./chunk-7CGTOI24.js";var ce=l=>["/backup",l,"export"],se=()=>["/"];function Ee(l,_){if(l&1){let t=g();n(0,"section")(1,"h4"),c(2,4),o(),n(3,"p"),c(4,5),o(),n(5,"sh-checkbox",11),E(6," Delete local database "),n(7,"input",12),h("ngModelChange",function(e){p(t);let a=C();return D(a.deleteLocalDb,e)||(a.deleteLocalDb=e),P(e)}),o()()()}if(l&2){let t=C();r(7),S("ngModel",t.deleteLocalDb)}}function ue(l,_){if(l&1){let t=g();n(0,"section")(1,"h4"),c(2,6),o(),n(3,"p"),c(4,7),z(5,"bytes"),o(),n(6,"sh-checkbox",11),E(7," Delete remote files "),n(8,"input",12),h("ngModelChange",function(e){p(t);let a=C();return D(a.deleteRemoteFiles,e)||(a.deleteRemoteFiles=e),P(e)}),o()()()}if(l&2){let t=C(),i=v(0),e=(i==null||i.Backup==null||i.Backup.Metadata==null?null:i.Backup.Metadata.TargetFilesSize)??0;r(5),A(t.fileCount())(t.fileCount())(V(5,4,e,!0,!0)),L(4),r(3),S("ngModel",t.deleteRemoteFiles)}}var B=class l{#t=u(oe);#i=u(te);#e=u(le);#n=u(j);id=W.required();backup=M(()=>this.#e.getBackupById(this.id()));noLocalDbResource=re({params:()=>({dbPath:this.backup()?.Backup?.DBPath}),stream:({params:_})=>this.#t.postApiV1FilesystemValidate({requestBody:{path:_.dbPath}}).pipe(U(()=>!0),I(()=>k(!1)))});fileCount=M(()=>parseInt(this.backup()?.Backup?.Metadata?.TargetFilesCount??"0",10));deleteLocalDb=T(!1);deleteRemoteFiles=T(!1);isDeleting=T(!1);deleteBackup(){let _=this.id(),t=this.deleteLocalDb(),i=this.deleteRemoteFiles();this.isDeleting.set(!0),this.#i.open(_e,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete this backup?`,confirmText:$localize`Delete backup`,cancelText:$localize`Cancel`},closed:e=>{e&&this.#e.deleteBackup({id:_,deleteLocalDb:t,deleteRemoteFiles:i}).pipe(K(()=>this.isDeleting.set(!1))).subscribe({next:()=>{this.#n.navigate(["/"])}})}})}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=y({type:l,selectors:[["app-delete-backup"]],inputs:{id:[1,"id"]},decls:19,vars:11,consts:()=>{let _;_=$localize`Delete backup: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;t=$localize`Export configuration`;let i;i=$localize`If you want to use the backup later, you can export the configuration before deleting it.`;let e;e=$localize`Cancel`;let a;a=$localize`Delete local database`;let b;b=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. When deleting a backup, you can also delete the local database without affecting the ability to restore the remote files. If you are using the local database for backups from the commandline, you should keep the database. `;let R;R=$localize`Delete remote files`;let d;d=$localize`{VAR_PLURAL, plural, =1 {1 file} other {{INTERPOLATION} files}}`,d=F(d,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let O;return O=$localize` Delete ${d}:ICU@@2159106180826349718: (${"\uFFFD2\uFFFD"}:INTERPOLATION_1:) from the remote storage? `,[_,t,i,e,a,b,R,O,["shButton","",3,"routerLink"],[1,"actions"],["shButton","",1,"raised","error",3,"click"],[1,"primary","raised"],["type","checkbox",3,"ngModelChange","ngModel"]]},template:function(t,i){if(t&1){let e=g();G(0),n(1,"h3"),c(2,0),o(),m(3,Ee,8,1,"section"),n(4,"section")(5,"h4"),c(6,1),o(),n(7,"p"),c(8,2),o(),n(9,"button",8),E(10," Export configuration "),n(11,"sh-icon"),E(12,"caret-right"),o()()(),m(13,ue,9,8,"section"),n(14,"div",9)(15,"button",8),c(16,3),o(),n(17,"button",10),$("click",function(){return p(e),P(i.deleteBackup())}),E(18,"Delete backup"),o()()}if(t&2){let e=w(i.backup()),a=i.noLocalDbResource.value();r(2),A(e==null||e.Backup==null?null:e.Backup.Name),L(2),r(),f(a?3:-1),r(6),N("routerLink",X(8,ce,i.id())),r(4),f(a?13:-1),r(2),N("routerLink",J(10,se)),r(2),x("loading",i.isDeleting())}},dependencies:[ne,ie,ee,Z,H,Q,Y,q,ae],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:2.5rem;max-width:43.75rem}section[_ngcontent-%COMP%]{padding:2rem 0;display:flex;align-items:flex-start;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}h4[_ngcontent-%COMP%]{font:var(--paragraph-20);margin-bottom:.5rem}p[_ngcontent-%COMP%]{margin-bottom:1rem}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;padding:2rem 0}"],changeDetection:0})};export{B as default};
@@ -1,2 +1,2 @@
1
- import{d as ge,g as Te,h as ve}from"./chunk-KDSMLI73.js";import{A as ae,E as ce,K as de,O,R as w,Sa as me,U as D,V as I,W as f,X as le,Z as Q,_ as ue,ea as he,f as q,fa as fe,ia as pe,l as Z,ma as ye,p as C,x as ie}from"./chunk-26Z7TPJB.js";import{a as Y}from"./chunk-7CGTOI24.js";var v=class t{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(r){r?typeof r=="string"?this.lazyInit=()=>{this.headers=new Map,r.split(`
1
+ import{d as ge,g as Te,h as ve}from"./chunk-VKNFRCHQ.js";import{A as ae,E as ce,K as de,R as O,U as w,Va as me,X as D,Y as I,Z as f,_ as le,aa as Q,ba as ue,f as q,ha as he,ia as fe,l as Z,la as pe,p as C,pa as ye,x as ie}from"./chunk-QY4Y5NJB.js";import{a as Y}from"./chunk-7CGTOI24.js";var v=class t{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(r){r?typeof r=="string"?this.lazyInit=()=>{this.headers=new Map,r.split(`
2
2
  `).forEach(e=>{let n=e.indexOf(":");if(n>0){let o=e.slice(0,n),s=e.slice(n+1).trim();this.addHeaderEntry(o,s)}})}:typeof Headers<"u"&&r instanceof Headers?(this.headers=new Map,r.forEach((e,n)=>{this.addHeaderEntry(n,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(r).forEach(([e,n])=>{this.setHeaderEntries(e,n)})}:this.headers=new Map}has(r){return this.init(),this.headers.has(r.toLowerCase())}get(r){this.init();let e=this.headers.get(r.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(r){return this.init(),this.headers.get(r.toLowerCase())||null}append(r,e){return this.clone({name:r,value:e,op:"a"})}set(r,e){return this.clone({name:r,value:e,op:"s"})}delete(r,e){return this.clone({name:r,value:e,op:"d"})}maybeSetNormalizedName(r,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,r)}init(){this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(r=>this.applyUpdate(r)),this.lazyUpdate=null))}copyFrom(r){r.init(),Array.from(r.headers.keys()).forEach(e=>{this.headers.set(e,r.headers.get(e)),this.normalizedNames.set(e,r.normalizedNames.get(e))})}clone(r){let e=new t;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([r]),e}applyUpdate(r){let e=r.name.toLowerCase();switch(r.op){case"a":case"s":let n=r.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(r.name,e);let o=(r.op==="a"?this.headers.get(e):void 0)||[];o.push(...n),this.headers.set(e,o);break;case"d":let s=r.value;if(!s)this.headers.delete(e),this.normalizedNames.delete(e);else{let i=this.headers.get(e);if(!i)return;i=i.filter(l=>s.indexOf(l)===-1),i.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,i)}break}}addHeaderEntry(r,e){let n=r.toLowerCase();this.maybeSetNormalizedName(r,n),this.headers.has(n)?this.headers.get(n).push(e):this.headers.set(n,[e])}setHeaderEntries(r,e){let n=(Array.isArray(e)?e:[e]).map(s=>s.toString()),o=r.toLowerCase();this.headers.set(o,n),this.maybeSetNormalizedName(r,o)}forEach(r){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>r(this.normalizedNames.get(e),this.headers.get(e)))}};var X=class{map=new Map;set(r,e){return this.map.set(r,e),this}get(r){return this.map.has(r)||this.map.set(r,r.defaultValue()),this.map.get(r)}delete(r){return this.map.delete(r),this}has(r){return this.map.has(r)}keys(){return this.map.keys()}},J=class{encodeKey(r){return Ee(r)}encodeValue(r){return Ee(r)}decodeKey(r){return decodeURIComponent(r)}decodeValue(r){return decodeURIComponent(r)}};function Fe(t,r){let e=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(o=>{let s=o.indexOf("="),[i,l]=s==-1?[r.decodeKey(o),""]:[r.decodeKey(o.slice(0,s)),r.decodeValue(o.slice(s+1))],a=e.get(i)||[];a.push(l),e.set(i,a)}),e}var je=/%(\d[a-f0-9])/gi,Le={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Ee(t){return encodeURIComponent(t).replace(je,(r,e)=>Le[e]??r)}function B(t){return`${t}`}var b=class t{map;encoder;updates=null;cloneFrom=null;constructor(r={}){if(this.encoder=r.encoder||new J,r.fromString){if(r.fromObject)throw new O(2805,!1);this.map=Fe(r.fromString,this.encoder)}else r.fromObject?(this.map=new Map,Object.keys(r.fromObject).forEach(e=>{let n=r.fromObject[e],o=Array.isArray(n)?n.map(B):[B(n)];this.map.set(e,o)})):this.map=null}has(r){return this.init(),this.map.has(r)}get(r){this.init();let e=this.map.get(r);return e?e[0]:null}getAll(r){return this.init(),this.map.get(r)||null}keys(){return this.init(),Array.from(this.map.keys())}append(r,e){return this.clone({param:r,value:e,op:"a"})}appendAll(r){let e=[];return Object.keys(r).forEach(n=>{let o=r[n];Array.isArray(o)?o.forEach(s=>{e.push({param:n,value:s,op:"a"})}):e.push({param:n,value:o,op:"a"})}),this.clone(e)}set(r,e){return this.clone({param:r,value:e,op:"s"})}delete(r,e){return this.clone({param:r,value:e,op:"d"})}toString(){return this.init(),this.keys().map(r=>{let e=this.encoder.encodeKey(r);return this.map.get(r).map(n=>e+"="+this.encoder.encodeValue(n)).join("&")}).filter(r=>r!=="").join("&")}clone(r){let e=new t({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(r),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(r=>this.map.set(r,this.cloneFrom.map.get(r))),this.updates.forEach(r=>{switch(r.op){case"a":case"s":let e=(r.op==="a"?this.map.get(r.param):void 0)||[];e.push(B(r.value)),this.map.set(r.param,e);break;case"d":if(r.value!==void 0){let n=this.map.get(r.param)||[],o=n.indexOf(B(r.value));o!==-1&&n.splice(o,1),n.length>0?this.map.set(r.param,n):this.map.delete(r.param)}else{this.map.delete(r.param);break}}}),this.cloneFrom=this.updates=null)}};function Ce(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function we(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function be(t){return typeof Blob<"u"&&t instanceof Blob}function Re(t){return typeof FormData<"u"&&t instanceof FormData}function Ue(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}var U="Content-Type",V="Accept",Pe="text/plain",Me="application/json",Ne=`${Me}, ${Pe}, */*`,x=class t{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;referrerPolicy;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(r,e,n,o){this.url=e,this.method=r.toUpperCase();let s;if(Ce(this.method)||o?(this.body=n!==void 0?n:null,s=o):s=n,s){if(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,this.keepalive=!!s.keepalive,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.context&&(this.context=s.context),s.params&&(this.params=s.params),s.priority&&(this.priority=s.priority),s.cache&&(this.cache=s.cache),s.credentials&&(this.credentials=s.credentials),typeof s.timeout=="number"){if(s.timeout<1||!Number.isInteger(s.timeout))throw new O(2822,"");this.timeout=s.timeout}s.mode&&(this.mode=s.mode),s.redirect&&(this.redirect=s.redirect),s.integrity&&(this.integrity=s.integrity),s.referrer&&(this.referrer=s.referrer),s.referrerPolicy&&(this.referrerPolicy=s.referrerPolicy),this.transferCache=s.transferCache}if(this.headers??=new v,this.context??=new X,!this.params)this.params=new b,this.urlWithParams=e;else{let i=this.params.toString();if(i.length===0)this.urlWithParams=e;else{let l=e.indexOf("?"),a=l===-1?"?":l<e.length-1?"&":"";this.urlWithParams=e+a+i}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||we(this.body)||be(this.body)||Re(this.body)||Ue(this.body)?this.body:this.body instanceof b?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||Re(this.body)?null:be(this.body)?this.body.type||null:we(this.body)?null:typeof this.body=="string"?Pe:this.body instanceof b?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?Me:null}clone(r={}){let e=r.method||this.method,n=r.url||this.url,o=r.responseType||this.responseType,s=r.keepalive??this.keepalive,i=r.priority||this.priority,l=r.cache||this.cache,a=r.mode||this.mode,p=r.redirect||this.redirect,m=r.credentials||this.credentials,g=r.referrer||this.referrer,A=r.integrity||this.integrity,k=r.referrerPolicy||this.referrerPolicy,_=r.transferCache??this.transferCache,h=r.timeout??this.timeout,c=r.body!==void 0?r.body:this.body,d=r.withCredentials??this.withCredentials,y=r.reportProgress??this.reportProgress,P=r.headers||this.headers,u=r.params||this.params,M=r.context??this.context;return r.setHeaders!==void 0&&(P=Object.keys(r.setHeaders).reduce((N,E)=>N.set(E,r.setHeaders[E]),P)),r.setParams&&(u=Object.keys(r.setParams).reduce((N,E)=>N.set(E,r.setParams[E]),u)),new t(e,n,c,{params:u,headers:P,context:M,reportProgress:y,responseType:o,withCredentials:d,transferCache:_,keepalive:s,cache:l,priority:i,timeout:h,mode:a,redirect:p,credentials:m,referrer:g,integrity:A,referrerPolicy:k})}},R=(function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t})(R||{}),F=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(r,e=200,n="OK"){this.headers=r.headers||new v,this.status=r.status!==void 0?r.status:e,this.statusText=r.statusText||n,this.url=r.url||null,this.redirected=r.redirected,this.responseType=r.responseType,this.ok=this.status>=200&&this.status<300}},S=class t extends F{constructor(r={}){super(r)}type=R.ResponseHeader;clone(r={}){return new t({headers:r.headers||this.headers,status:r.status!==void 0?r.status:this.status,statusText:r.statusText||this.statusText,url:r.url||this.url||void 0})}},j=class t extends F{body;constructor(r={}){super(r),this.body=r.body!==void 0?r.body:null}type=R.Response;clone(r={}){return new t({body:r.body!==void 0?r.body:this.body,headers:r.headers||this.headers,status:r.status!==void 0?r.status:this.status,statusText:r.statusText||this.statusText,url:r.url||this.url||void 0,redirected:r.redirected??this.redirected,responseType:r.responseType??this.responseType})}},T=class extends F{name="HttpErrorResponse";message;error;ok=!1;constructor(r){super(r,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${r.url||"(unknown url)"}`:this.message=`Http failure response for ${r.url||"(unknown url)"}: ${r.status} ${r.statusText}`,this.error=r.error||null}},Oe=200,Se=204;var Be=/^\)\]\}',?\n/,De=new D(""),z=(()=>{class t{fetchImpl=f(ee,{optional:!0})?.fetch??((...e)=>globalThis.fetch(...e));ngZone=f(pe);destroyRef=f(fe);handle(e){return new q(n=>{let o=new AbortController;this.doRequest(e,o.signal,n).then(re,i=>n.error(new T({error:i})));let s;return e.timeout&&(s=this.ngZone.runOutsideAngular(()=>setTimeout(()=>{o.signal.aborted||o.abort(new DOMException("signal timed out","TimeoutError"))},e.timeout))),()=>{s!==void 0&&clearTimeout(s),o.abort()}})}async doRequest(e,n,o){let s=this.createRequestInit(e),i;try{let h=this.ngZone.runOutsideAngular(()=>this.fetchImpl(e.urlWithParams,Y({signal:n},s)));ze(h),o.next({type:R.Sent}),i=await h}catch(h){o.error(new T({error:h,status:h.status??0,statusText:h.statusText,url:e.urlWithParams,headers:h.headers}));return}let l=new v(i.headers),a=i.statusText,p=i.url||e.urlWithParams,m=i.status,g=null;if(e.reportProgress&&o.next(new S({headers:l,status:m,statusText:a,url:p})),i.body){let h=i.headers.get("content-length"),c=[],d=i.body.getReader(),y=0,P,u,M=typeof Zone<"u"&&Zone.current,N=!1;if(await this.ngZone.runOutsideAngular(async()=>{for(;;){if(this.destroyRef.destroyed){await d.cancel(),N=!0;break}let{done:L,value:K}=await d.read();if(L)break;if(c.push(K),y+=K.length,e.reportProgress){u=e.responseType==="text"?(u??"")+(P??=new TextDecoder).decode(K,{stream:!0}):void 0;let se=()=>o.next({type:R.DownloadProgress,total:h?+h:void 0,loaded:y,partialText:u});M?M.run(se):se()}}}),N){o.complete();return}let E=this.concatChunks(c,y);try{let L=i.headers.get(U)??"";g=this.parseBody(e,E,L,m)}catch(L){o.error(new T({error:L,headers:new v(i.headers),status:i.status,statusText:i.statusText,url:i.url||e.urlWithParams}));return}}m===0&&(m=g?Oe:0);let A=m>=200&&m<300,k=i.redirected,_=i.type;A?(o.next(new j({body:g,headers:l,status:m,statusText:a,url:p,redirected:k,responseType:_})),o.complete()):o.error(new T({error:g,headers:l,status:m,statusText:a,url:p,redirected:k,responseType:_}))}parseBody(e,n,o,s){switch(e.responseType){case"json":let i=new TextDecoder().decode(n).replace(Be,"");if(i==="")return null;try{return JSON.parse(i)}catch(l){if(s<200||s>=300)return i;throw l}case"text":return new TextDecoder().decode(n);case"blob":return new Blob([n],{type:o});case"arraybuffer":return n.buffer}}createRequestInit(e){let n={},o;if(o=e.credentials,e.withCredentials&&(o="include"),e.headers.forEach((s,i)=>n[s]=i.join(",")),e.headers.has(V)||(n[V]=Ne),!e.headers.has(U)){let s=e.detectContentTypeHeader();s!==null&&(n[U]=s)}return{body:e.serializeBody(),method:e.method,headers:n,credentials:o,keepalive:e.keepalive,cache:e.cache,priority:e.priority,mode:e.mode,redirect:e.redirect,referrer:e.referrer,integrity:e.integrity,referrerPolicy:e.referrerPolicy}}concatChunks(e,n){let o=new Uint8Array(n),s=0;for(let i of e)o.set(i,s),s+=i.length;return o}static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:t.\u0275fac})}return t})(),ee=class{};function re(){}function ze(t){t.then(re,re)}var Xe=/^\)\]\}',?\n/;var te=(()=>{class t{xhrFactory;tracingService=f(me,{optional:!0});constructor(e){this.xhrFactory=e}maybePropagateTrace(e){return this.tracingService?.propagate?this.tracingService.propagate(e):e}handle(e){if(e.method==="JSONP")throw new O(-2800,!1);let n=this.xhrFactory;return Z(null).pipe(de(()=>new q(s=>{let i=n.build();if(i.open(e.method,e.urlWithParams),e.withCredentials&&(i.withCredentials=!0),e.headers.forEach((c,d)=>i.setRequestHeader(c,d.join(","))),e.headers.has(V)||i.setRequestHeader(V,Ne),!e.headers.has(U)){let c=e.detectContentTypeHeader();c!==null&&i.setRequestHeader(U,c)}if(e.timeout&&(i.timeout=e.timeout),e.responseType){let c=e.responseType.toLowerCase();i.responseType=c!=="json"?c:"text"}let l=e.serializeBody(),a=null,p=()=>{if(a!==null)return a;let c=i.statusText||"OK",d=new v(i.getAllResponseHeaders()),y=i.responseURL||e.url;return a=new S({headers:d,status:i.status,statusText:c,url:y}),a},m=this.maybePropagateTrace(()=>{let{headers:c,status:d,statusText:y,url:P}=p(),u=null;d!==Se&&(u=typeof i.response>"u"?i.responseText:i.response),d===0&&(d=u?Oe:0);let M=d>=200&&d<300;if(e.responseType==="json"&&typeof u=="string"){let N=u;u=u.replace(Xe,"");try{u=u!==""?JSON.parse(u):null}catch(E){u=N,M&&(M=!1,u={error:E,text:u})}}M?(s.next(new j({body:u,headers:c,status:d,statusText:y,url:P||void 0})),s.complete()):s.error(new T({error:u,headers:c,status:d,statusText:y,url:P||void 0}))}),g=this.maybePropagateTrace(c=>{let{url:d}=p(),y=new T({error:c,status:i.status||0,statusText:i.statusText||"Unknown Error",url:d||void 0});s.error(y)}),A=g;e.timeout&&(A=this.maybePropagateTrace(c=>{let{url:d}=p(),y=new T({error:new DOMException("Request timed out","TimeoutError"),status:i.status||0,statusText:i.statusText||"Request timeout",url:d||void 0});s.error(y)}));let k=!1,_=this.maybePropagateTrace(c=>{k||(s.next(p()),k=!0);let d={type:R.DownloadProgress,loaded:c.loaded};c.lengthComputable&&(d.total=c.total),e.responseType==="text"&&i.responseText&&(d.partialText=i.responseText),s.next(d)}),h=this.maybePropagateTrace(c=>{let d={type:R.UploadProgress,loaded:c.loaded};c.lengthComputable&&(d.total=c.total),s.next(d)});return i.addEventListener("load",m),i.addEventListener("error",g),i.addEventListener("timeout",A),i.addEventListener("abort",g),e.reportProgress&&(i.addEventListener("progress",_),l!==null&&i.upload&&i.upload.addEventListener("progress",h)),i.send(l),s.next({type:R.Sent}),()=>{i.removeEventListener("error",g),i.removeEventListener("abort",g),i.removeEventListener("load",m),i.removeEventListener("timeout",A),e.reportProgress&&(i.removeEventListener("progress",_),l!==null&&i.upload&&i.upload.removeEventListener("progress",h)),i.readyState!==i.DONE&&i.abort()}})))}static \u0275fac=function(n){return new(n||t)(I(ve))};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Je(t,r){return r(t)}function Ve(t,r,e){return(n,o)=>ue(e,()=>r(n,s=>t(s,o)))}var ne=new D("",{factory:()=>[]}),Ie=new D(""),Ae=new D("",{factory:()=>!0});var G=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:function(n){let o=null;return n?o=new(n||t):o=I(te),o},providedIn:"root"})}return t})();var $=(()=>{class t{backend;injector;chain=null;pendingTasks=f(ye);contributeToStability=f(Ae);constructor(e,n){this.backend=e,this.injector=n}handle(e){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(ne),...this.injector.get(Ie,[])]));this.chain=n.reduceRight((o,s)=>Ve(o,s,this.injector),Je)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(e,o=>this.backend.handle(o)).pipe(ce(n))}else return this.chain(e,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||t)(I(G),I(Q))};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),oe=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:function(n){let o=null;return n?o=new(n||t):o=I($),o},providedIn:"root"})}return t})();function H(t,r){return{body:r,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials,credentials:t.credentials,transferCache:t.transferCache,timeout:t.timeout,keepalive:t.keepalive,priority:t.priority,cache:t.cache,mode:t.mode,redirect:t.redirect,integrity:t.integrity,referrer:t.referrer,referrerPolicy:t.referrerPolicy}}var ke=(()=>{class t{handler;constructor(e){this.handler=e}request(e,n,o={}){let s;if(e instanceof x)s=e;else{let a;o.headers instanceof v?a=o.headers:a=new v(o.headers);let p;o.params&&(o.params instanceof b?p=o.params:p=new b({fromObject:o.params})),s=new x(e,n,o.body!==void 0?o.body:null,{headers:a,context:o.context,params:p,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache,keepalive:o.keepalive,priority:o.priority,cache:o.cache,mode:o.mode,redirect:o.redirect,credentials:o.credentials,referrer:o.referrer,referrerPolicy:o.referrerPolicy,integrity:o.integrity,timeout:o.timeout})}let i=Z(s).pipe(ae(a=>this.handler.handle(a)));if(e instanceof x||o.observe==="events")return i;let l=i.pipe(ie(a=>a instanceof j));switch(o.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return l.pipe(C(a=>{if(a.body!==null&&!(a.body instanceof ArrayBuffer))throw new O(2806,!1);return a.body}));case"blob":return l.pipe(C(a=>{if(a.body!==null&&!(a.body instanceof Blob))throw new O(2807,!1);return a.body}));case"text":return l.pipe(C(a=>{if(a.body!==null&&typeof a.body!="string")throw new O(2808,!1);return a.body}));default:return l.pipe(C(a=>a.body))}case"response":return l;default:throw new O(2809,!1)}}delete(e,n={}){return this.request("DELETE",e,n)}get(e,n={}){return this.request("GET",e,n)}head(e,n={}){return this.request("HEAD",e,n)}jsonp(e,n){return this.request("JSONP",e,{params:new b().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,n={}){return this.request("OPTIONS",e,n)}patch(e,n,o={}){return this.request("PATCH",e,H(o,n))}post(e,n,o={}){return this.request("POST",e,H(o,n))}put(e,n,o={}){return this.request("PUT",e,H(o,n))}static \u0275fac=function(n){return new(n||t)(I(oe))};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var $e=new D("",{factory:()=>!0}),Ge="XSRF-TOKEN",We=new D("",{factory:()=>Ge}),Ke="X-XSRF-TOKEN",Ye=new D("",{factory:()=>Ke}),qe=(()=>{class t{cookieName=f(We);doc=f(he);lastCookieString="";lastToken=null;parseCount=0;getToken(){let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=Te(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),_e=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:function(n){let o=null;return n?o=new(n||t):o=I(qe),o},providedIn:"root"})}return t})();function Ze(t,r){if(!f($e)||t.method==="GET"||t.method==="HEAD")return r(t);try{let o=f(ge).href,{origin:s}=new URL(o),{origin:i}=new URL(t.url,s);if(s!==i)return r(t)}catch{return r(t)}let e=f(_e).getToken(),n=f(Ye);return e!=null&&!t.headers.has(n)&&(t=t.clone({headers:t.headers.set(n,e)})),r(t)}var W=(function(t){return t[t.Interceptors=0]="Interceptors",t[t.LegacyInterceptors=1]="LegacyInterceptors",t[t.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",t[t.NoXsrfProtection=3]="NoXsrfProtection",t[t.JsonpSupport=4]="JsonpSupport",t[t.RequestsMadeViaParent=5]="RequestsMadeViaParent",t[t.Fetch=6]="Fetch",t})(W||{});function xe(t,r){return{\u0275kind:t,\u0275providers:r}}function Qe(...t){let r=[ke,$,{provide:oe,useExisting:$},{provide:G,useFactory:()=>f(De,{optional:!0})??f(te)},{provide:ne,useValue:Ze,multi:!0}];for(let e of t)r.push(...e.\u0275providers);return le(r)}function He(t){return xe(W.Interceptors,t.map(r=>({provide:ne,useValue:r,multi:!0})))}function er(){return xe(W.Fetch,[z,{provide:De,useExisting:z},{provide:G,useExisting:z}])}export{v as a,j as b,T as c,ke as d,Qe as e,He as f,er as g};
@@ -0,0 +1 @@
1
+ import{b as y}from"./chunk-4VYR5E5I.js";import{b as w}from"./chunk-KLAJGS5T.js";import{a as b}from"./chunk-NGKFJLI2.js";import"./chunk-KUX6NGQU.js";import{B as U,L as $,v as k}from"./chunk-Y46QCSB5.js";import{d as x}from"./chunk-JJY6UOEY.js";import"./chunk-2K74TI2N.js";import"./chunk-G3FMV74P.js";import"./chunk-LU7RSOI6.js";import"./chunk-VLMNSWR3.js";import"./chunk-VKNFRCHQ.js";import{Bb as L,Cb as a,Db as r,E as g,Eb as d,Lb as E,Pa as O,Pc as I,Sa as l,Sb as M,Tb as R,Ub as T,Vb as f,Wb as F,Yb as N,Z as p,_b as c,ca as m,da as C,fb as P,jc as v,mc as u,nc as D,oa as S,p as G,vb as s,wb as _}from"./chunk-QY4Y5NJB.js";import"./chunk-7CGTOI24.js";function V(n,o){n&1&&d(0,"sh-progress-bar",3)}function B(n,o){if(n&1&&(a(0,"a",7),M(1,2),d(2,"sh-icon"),R(),r()),n&2){let e,t,i=c(2);L("href",(e=i.serverState())==null?null:e.UpdateDownloadLink,O),l(2),f((t=i.serverState())==null?null:t.UpdatedVersion),F(1)}}function J(n,o){if(n&1){let e=E();a(0,"button",6),N("click",function(){m(e);let i=c();return C(i.checkForUpdates())}),u(1,"Check for updates"),r(),s(2,B,3,2,"a",7)}if(n&2){let e,t=c();v("loading",t.checkingForUpdates()),l(2),_((e=t.serverState())!=null&&e.UpdateDownloadLink?2:-1)}}function X(n,o){if(n&1){let e=E();a(0,"button",6),N("click",function(){m(e);let i=c();return C(i.checkForUpdates())}),u(1,"Checking for updates \u2026"),r()}}function z(n,o){n&1&&d(0,"sh-progress-bar",3)}var h=class n{#e=p(x);#t=p(w);#n=p(b);isLoading=S(!0);checkingForUpdates=S(!1);serverState=this.#t.serverState;duplicatiVersion=I(()=>this.#n.systemInfo()?.ServerVersionName??"Unknown");generalInfo=y(this.#e.getApiV1Acknowledgements().pipe(G(o=>o.Acknowledgements),g(()=>this.isLoading.set(!1))));checkForUpdates(){this.checkingForUpdates.set(!0),this.#e.postApiV1UpdatesCheck().pipe(g(()=>this.checkingForUpdates.set(!1))).subscribe()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=P({type:n,selectors:[["app-general"]],decls:12,vars:5,consts:()=>{let o;o=$localize`General`;let e;e=$localize`You're running Duplicati with - ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;return t=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:download${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Download update - ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[o,e,t,[1,"indeterminate","primary"],[1,"actions"],["shButton",""],["shButton","",3,"click"],["shButton","","target","_blank",1,"primary","raised",3,"href"]]},template:function(e,t){if(e&1&&(s(0,V,1,0,"sh-progress-bar",3),a(1,"section")(2,"h3"),T(3,0),r(),a(4,"p"),T(5,1),r(),a(6,"div",4),s(7,J,3,3)(8,X,2,0,"button",5),s(9,z,1,0,"sh-progress-bar",3),r(),a(10,"div"),u(11),r()()),e&2){let i,A;_(t.isLoading()?0:-1),l(5),f(t.duplicatiVersion()),F(5),l(2),_(((i=t.serverState())==null?null:i.UpdaterState)==="Waiting"?7:((i=t.serverState())==null?null:i.UpdaterState)==="Checking"?8:-1),l(2),_(((A=t.serverState())==null?null:A.UpdaterState)==="Downloading"?9:-1),l(2),D(t.generalInfo())}},dependencies:[$,U,k],styles:["[_nghost-%COMP%]{display:block;position:relative;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}sh-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{h as default};
@@ -0,0 +1 @@
1
+ import{g as pe}from"./chunk-NWNCATHF.js";import"./chunk-ZKGGCQ2N.js";import{b as de,c as Se,l as ue,p as Ee,q as Ce}from"./chunk-AWL7E6ZQ.js";import"./chunk-RWDQ3L3C.js";import"./chunk-V5ZJABDA.js";import{c as Te,d as ge}from"./chunk-ZPIR5QIQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-EG3PT3XW.js";import"./chunk-O3GGVB2B.js";import"./chunk-OAAXQ2BE.js";import{a as M}from"./chunk-7E5J43IH.js";import"./chunk-3MS6SVET.js";import"./chunk-4VYR5E5I.js";import"./chunk-KLAJGS5T.js";import"./chunk-NGKFJLI2.js";import"./chunk-KUX6NGQU.js";import{B as le,H as _e,K as ce,c as Q,e as Y,f as Z,g as ee,i as te,j as ne,s as ie,v as oe,w as re,y as ae,z as se}from"./chunk-Y46QCSB5.js";import"./chunk-JJY6UOEY.js";import{b as j,d as q}from"./chunk-2K74TI2N.js";import"./chunk-G3FMV74P.js";import"./chunk-LU7RSOI6.js";import"./chunk-VLMNSWR3.js";import"./chunk-VKNFRCHQ.js";import{Ac as K,Bb as D,Cb as r,Db as a,Eb as O,Ib as V,Jb as W,Lb as u,Pc as $,Sa as T,Sb as E,Tb as C,Ub as I,Vc as w,Xb as z,Yb as d,Z as m,_b as c,ca as l,da as _,fb as B,fc as J,ga as v,gc as X,mc as P,oa as N,rc as f,sc as R,tc as h,uc as A,vb as p,vc as y,wb as F,wc as L,zc as H}from"./chunk-QY4Y5NJB.js";import"./chunk-7CGTOI24.js";var Fe=["formRef"],Oe=["testUrl"],me=()=>({maxWidth:"700px",width:"100%"});function Re(o,i){if(o&1){let e=u();r(0,"button",24),d("click",function(){l(e);let t=c();return _(t.openTargetUrlDialog())}),E(1,5),O(2,"sh-icon"),C(),a()}}function Ne(o,i){if(o&1){let e=u();r(0,"button",24),d("click",function(){l(e);let t=c(2);return _(t.copyTargetUrl())}),E(1,7),O(2,"sh-icon"),C(),a()}}function De(o,i){if(o&1){let e=u();r(0,"sh-menu")(1,"button",15)(2,"sh-icon"),P(3,"dots-three-vertical"),a()(),V(4,25),r(5,"button",24),d("click",function(){l(e);let t=c();return _(t.openTargetUrlDialog())}),E(6,6),O(7,"sh-icon"),C(),a(),p(8,Ne,3,0,"button",15),W(),a()}if(o&2){c();let e=L(0);T(8),F(e?8:-1)}}function Ie(o,i){if(o&1){let e=u();r(0,"app-destination-list-item",17)(1,"button",20),d("click",function(){l(e);let t=c();return _(t.removeDestination())}),I(2,8),a()()}if(o&2){c();let e=L(12);D("destination",e)}}function fe(o,i){if(o&1){let e=u();r(0,"app-destination-list",26),d("setDestination",function(t){l(e);let s=c();return _(s.setDestination(t))}),a()}}function he(o,i){if(o&1){let e=u();r(0,"app-single-destination",27),h("targetUrlChange",function(t){l(e);let s=c();return R(s.targetUrlModel,t)||(s.targetUrlModel=t),_(t)}),a()}if(o&2){let e=c();f("targetUrl",e.targetUrlModel)}}function Me(o,i){o&1&&(E(0,4,1),O(1,"sh-icon",22),C())}function Pe(o,i){o&1&&(E(0,4,2),O(1,"sh-icon"),C())}function Ae(o,i){if(o&1){let e=u();r(0,"sh-dialog",28),h("isOpenChange",function(t){l(e);let s=c();return R(s.targetUrlDialogOpen,t)||(s.targetUrlDialogOpen=t),_(t)}),r(1,"header",29)(2,"div",30)(3,"h2"),I(4,9),a(),r(5,"sh-alert",31),I(6,10),a()()(),r(7,"div",32)(8,"sh-form-field")(9,"textarea",33),h("ngModelChange",function(t){l(e);let s=c();return R(s.targetUrlCtrl,t)||(s.targetUrlCtrl=t),_(t)}),a()()(),r(10,"footer",34)(11,"button",20),d("click",function(){l(e);let t=c();return _(t.closeTargetUrlDialog(!1))}),P(12,"Cancel"),a(),r(13,"button",35),d("click",function(){l(e);let t=c();return _(t.closeTargetUrlDialog(!0))}),E(14,11),O(15,"sh-icon"),C(),a()()()}if(o&2){let e=c();f("isOpen",e.targetUrlDialogOpen),D("options",K(3,me)),T(9),f("ngModel",e.targetUrlCtrl)}}var x=class o{#i=m(q);#o=m(j);#n=m(se);injector=m(v);#e=m(pe);formRef=w.required("formRef");testUrlComponent=w.required("testUrl");testSignal=this.#e.destinationTestSignal;targetUrlModel=this.#e.destinationTargetUrl;targetUrlCtrl=N(null);targetUrlInitial=N(null);targetUrlDialogOpen=N(!1);toggleNewDestination=N(!0);selectedDestinationType=$(()=>{let i=this.#e.destinationTargetUrl();return i?Te(i):null});selectedDestinationTypeOption=$(()=>{let i=this.selectedDestinationType();return i?{key:i.customKey??i.key,customKey:i.customKey??null,displayName:i.displayName,description:i.description,icon:i.icon}:null});copyTargetUrl(){navigator.clipboard.writeText(this.#e.destinationTargetUrl()??"")}openTargetUrlDialog(){let i=this.#e.destinationTargetUrl();this.targetUrlCtrl.set(i),this.targetUrlInitial.set(i),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl(),n=this.targetUrlInitial();!i||e===n||!e||this.#e.updateTargetUrl(e)}setDestination(i){let e=ge(i??"");if(e){if(e.mapper.default){let n=e.mapper.default("");this.#e.updateTargetUrl(n);return}this.#e.updateTargetUrl(`${i}://`)}}removeDestination(){this.#e.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let i=this.testSignal();if(i===null){this.#n.open(M,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:n=>{n?this.testUrlComponent()?.testDestination(!1)?.then(t=>{t.action==="success"&&t.containsBackup?this.#t():this.#n.open(M,{data:{title:$localize`Test did not succeed`,message:t.errorMessage??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#t()}});return}let e=typeof i=="string"?null:i;if(e?.action!=="success"||!e.containsBackup){this.#n.open(M,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Edit destination`,cancelText:$localize`Yes, continue`},closed:n=>{n||this.#t()}});return}this.#t()}#t(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=B({type:o,selectors:[["app-restore-destination"]],viewQuery:function(e,n){e&1&&J(n.formRef,Fe,5)(n.testUrlComponent,Oe,5),e&2&&X(2)},features:[H([Ee])],decls:25,vars:17,consts:()=>{let i;i=$localize`Backup destination`;let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let n;n=$localize`${"\uFFFD*22:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*22:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*23:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*23:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,n=z(n);let t;t=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Set target URL `;let s;s=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let g;g=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let U;U=$localize`Change`;let b;b=$localize`Edit target URL`;let G;G=$localize`Be careful, this will overwrite everything you have in your destination.`;let k;return k=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["testUrl",""],i,e,n,t,s,g,U,b,G,k,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","moduleType"],[1,"current-destination",3,"destination"],[3,"targetUrl"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click"],["menu",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],[1,"warn"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,n){if(e&1){let t=u();A(0),r(1,"form",12,0),d("submit",function(){return l(t),_(n.next())}),r(3,"header")(4,"h3",13)(5,"span"),I(6,2),a(),r(7,"div",14),p(8,Re,3,0,"button",15)(9,De,9,1,"sh-menu"),a()(),r(10,"app-test-url",16,1),h("targetUrlChange",function(g){return l(t),R(n.targetUrlModel,g)||(n.targetUrlModel=g),_(g)})("testSignalChange",function(g){return l(t),R(n.testSignal,g)||(n.testSignal=g),_(g)}),a(),A(12),p(13,Ie,3,1,"app-destination-list-item",17),a(),p(14,fe,1,0,"app-destination-list"),p(15,he,1,1,"app-single-destination",18),r(16,"div",19)(17,"button",20),d("click",function(){return l(t),_(n.goBack())}),E(18,3),O(19,"sh-icon"),C(),a(),r(20,"button",21),E(21,4),p(22,Me,2,0,"sh-icon",22)(23,Pe,2,0,"sh-icon"),C(),a()()(),p(24,Ae,16,4,"sh-dialog",23)}if(e&2){let t=y(!!n.targetUrlModel());T(8),F(t?9:8),T(2),f("targetUrl",n.targetUrlModel)("testSignal",n.testSignal),D("backupId",null)("sourcePrefix",null)("suppressErrorDialogs",!1)("askToCreate",!1)("testExpectation","containsBackup")("moduleType","Backend"),T(2);let s=y(n.selectedDestinationTypeOption());T(),F(s?13:-1),T(),F(t?-1:14),T(),F(t?15:-1),T(5),D("disabled",n.testSignal()=="testing"||!t),T(2),F(n.testSignal()=="testing"?22:23),T(2),F(n.targetUrlDialogOpen()?24:-1)}},dependencies:[Ce,Se,de,ie,ne,Q,Y,Z,te,ee,le,_e,ce,oe,ae,re,ue],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-8)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}"],changeDetection:0})};export{x as default};
@@ -0,0 +1 @@
1
+ import{a as z}from"./chunk-GTZRHPRV.js";import{A as X,B as H,K as V,v as J}from"./chunk-Y46QCSB5.js";import"./chunk-JJY6UOEY.js";import{a as x,c as B,d as w,e as U,f as k}from"./chunk-2K74TI2N.js";import"./chunk-G3FMV74P.js";import"./chunk-LU7RSOI6.js";import"./chunk-VLMNSWR3.js";import"./chunk-VKNFRCHQ.js";import{Bb as P,Cb as i,Db as t,Eb as _,Ib as R,Jb as M,Lb as f,Sa as C,Sb as l,Tb as s,Ub as b,Vb as v,Wb as y,Yb as a,Z as g,_b as c,ca as F,da as T,fb as $,oa as p,vb as m,wb as D}from"./chunk-QY4Y5NJB.js";import"./chunk-7CGTOI24.js";function W(u,S){if(u&1){let n=f();i(0,"sh-menu",15)(1,"button",16),b(2,2),t(),R(3,17),i(4,"button",18),a("click",function(){F(n);let e=c();return T(e.updateLogLevel("Disabled"))}),l(5,3),_(6,"sh-icon"),s(),t(),i(7,"button",18),a("click",function(){F(n);let e=c();return T(e.updateLogLevel("Verbose"))}),l(8,4),_(9,"sh-icon"),s(),t(),i(10,"button",18),a("click",function(){F(n);let e=c();return T(e.updateLogLevel("ExplicitOnly"))}),l(11,5),_(12,"sh-icon"),s(),t(),i(13,"button",18),a("click",function(){F(n);let e=c();return T(e.updateLogLevel("Profiling"))}),l(14,6),_(15,"sh-icon"),s(),t(),i(16,"button",18),a("click",function(){F(n);let e=c();return T(e.updateLogLevel("Retry"))}),l(17,7),_(18,"sh-icon"),s(),t(),i(19,"button",18),a("click",function(){F(n);let e=c();return T(e.updateLogLevel("Information"))}),l(20,8),_(21,"sh-icon"),s(),t(),i(22,"button",18),a("click",function(){F(n);let e=c();return T(e.updateLogLevel("DryRun"))}),l(23,9),_(24,"sh-icon"),s(),t(),i(25,"button",18),a("click",function(){F(n);let e=c();return T(e.updateLogLevel("Warning"))}),l(26,10),_(27,"sh-icon"),s(),t(),i(28,"button",18),a("click",function(){F(n);let e=c();return T(e.updateLogLevel("Error"))}),l(29,11),_(30,"sh-icon"),s(),t(),M(),t()}if(u&2){let n=c();P("openIndicator",!0),C(2),v(n.logLevelByLabel()),y(2)}}var O=class u{#n=g(w);#e=g(z);logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;currentUrl=p(this.#n.url);constructor(){this.#n.events.subscribe(S=>{S instanceof x&&this.currentUrl.set(S.urlAfterRedirects)})}updateLogLevel(S){this.#e.isPolling.set(!0),this.#e.updateLogLevel(S)}static \u0275fac=function(n){return new(n||u)};static \u0275cmp=$({type:u,selectors:[["app-logs"]],decls:10,vars:1,consts:()=>{let S;S=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:archive${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: Stored `;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:play${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Live `;let o;o=$localize`Log level: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:bell-simple-slash${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON: Disabled `;let E;E=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:megaphone-simple${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Verbose `;let L;L=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Explicit only `;let N;N=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:speedometer${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Profiling `;let I;I=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:arrow-arc-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Retry `;let d;d=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Information `;let h;h=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SH_ICON:person-simple-run${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SH_ICON: Dry run `;let G;G=$localize`${"\uFFFD#27\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SH_ICON: Warning `;let A;return A=$localize`${"\uFFFD#30\uFFFD"}:START_TAG_SH_ICON:warning-octagon${"\uFFFD/#30\uFFFD"}:CLOSE_TAG_SH_ICON: Error `,[S,n,o,e,E,L,N,I,d,h,G,A,[1,"filters"],["type","button","routerLink","/about/logs/stored","routerLinkActive","active"],["type","button","routerLink","/about/logs/live","routerLinkActive","active"],[3,"openIndicator"],["shButton","","type","button"],["menu",""],["shButton","","type","button",1,"small",3,"click"]]},template:function(n,o){n&1&&(i(0,"div",12)(1,"sh-button-group")(2,"button",13),l(3,0),_(4,"sh-icon"),s(),t(),i(5,"button",14),l(6,1),_(7,"sh-icon"),s(),t()(),m(8,W,31,2,"sh-menu",15),t(),_(9,"router-outlet")),n&2&&(C(8),D(o.currentUrl().startsWith("/about/logs/live")?8:-1))},dependencies:[H,X,J,V,B,k,U],styles:["[_nghost-%COMP%]{display:block}.filters[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;padding:0 2rem;margin-bottom:1.25rem}"],changeDetection:0})};export{O as default};
@@ -1 +1 @@
1
- import{c as l}from"./chunk-CFNARBNK.js";import{E as a,M as u,Mc as s,R as p,W as d,la as i}from"./chunk-26Z7TPJB.js";var m=class r{#s=d(l);isLoaded=i(!1);systemInfo=i(null);filterGroups=i(null);backendModules=s(()=>this.systemInfo()?.BackendModules??[]);sourceProviderModules=s(()=>this.systemInfo()?.SourceProviderModules??[]);restoreDestinationProviderModules=s(()=>this.systemInfo()?.RestoreDestinationProviderModules??[]);allOptionsGrouped=s(()=>{let e={displayName:"Default",options:this.systemInfo()?.Options?.map(this.#e)??[]},t=this.systemInfo()?.GenericModules?.map(n=>({displayName:n.DisplayName??n.Key,options:n.Options?.map(this.#e)??[]}))??[],o=this.systemInfo()?.CompressionModules?.map(n=>({displayName:n.DisplayName??n.Key,options:n.Options?.map(this.#e)??[]}))??[],c=this.systemInfo()?.EncryptionModules?.map(n=>({displayName:n.DisplayName??n.Key,options:n.Options?.map(this.#e)??[]}))??[];return[e,...t,...o,...c]});allOptions=s(()=>this.allOptionsGrouped().reduce((e,t)=>[...e,...t.options],[]));hasWebSocket=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket"));hasV2ListOperations=s(()=>{let e=this.systemInfo()?.APIExtensions??[];return e.includes("v2:backup:list-filesets")&&e.includes("v2:backup:list-folder")});hasV2TestOperations=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v2:destination:test"));hasProgressSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:progress"));hasTaskSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:taskqueue"));hasTaskCompletedOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:taskcompleted"));hasBackupListSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:backuplist"));hasWebSocketAuth=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket:authenticate"));defaultOAuthUrl=s(()=>{let e=this.systemInfo()?.DefaultOAuthURL??"https://duplicati-oauth-handler.appspot.com/";return e.endsWith("/refresh")?e.slice(0,-8):e});defaultOAuthUrlV2=s(()=>{let e=this.systemInfo()?.DefaultOAuthURLv2??"https://oauth-service.duplicati.com/";return e.endsWith("/refresh")?e.slice(0,-8):e});preload(e=!1){let t=this.#s.getApiV1Systeminfo().pipe(u(o=>{this.systemInfo.set(o)}),a(()=>this.isLoaded.set(!0)));if(e)return t;t.subscribe()}preloadFilterGroups(e=!1){let t=this.#s.getApiV1SysteminfoFiltergroups().pipe(u(o=>{this.filterGroups.set(o)}),a(()=>this.isLoaded.set(!0)));if(e)return t;t.subscribe()}#e(e){return{name:e.Name,type:e.Type,shortDescription:e.ShortDescription??void 0,longDescription:e.LongDescription??void 0,deprecatedDescription:e.Deprecated??!1?e.DeprecationMessage??void 0:void 0,options:e.ValidValues,defaultValue:e.DefaultValue}}static \u0275fac=function(t){return new(t||r)};static \u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})};export{m as a};
1
+ import{d as m}from"./chunk-JJY6UOEY.js";import{E as u,M as d,Pc as s,U as p,Z as l,oa as i}from"./chunk-QY4Y5NJB.js";var c=class r{#s=l(m);isLoaded=i(!1);systemInfo=i(null);filterGroups=i(null);backendModules=s(()=>this.systemInfo()?.BackendModules??[]);sourceProviderModules=s(()=>this.systemInfo()?.SourceProviderModules??[]);restoreDestinationProviderModules=s(()=>this.systemInfo()?.RestoreDestinationProviderModules??[]);allOptionsGrouped=s(()=>{let e={displayName:"Default",options:this.systemInfo()?.Options?.map(this.#e)??[]},t=this.systemInfo()?.GenericModules?.map(n=>({displayName:n.DisplayName??n.Key,options:n.Options?.map(this.#e)??[]}))??[],o=this.systemInfo()?.CompressionModules?.map(n=>({displayName:n.DisplayName??n.Key,options:n.Options?.map(this.#e)??[]}))??[],a=this.systemInfo()?.EncryptionModules?.map(n=>({displayName:n.DisplayName??n.Key,options:n.Options?.map(this.#e)??[]}))??[];return[e,...t,...o,...a]});allOptions=s(()=>this.allOptionsGrouped().reduce((e,t)=>[...e,...t.options],[]));hasWebSocket=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket"));hasV2ListOperations=s(()=>{let e=this.systemInfo()?.APIExtensions??[];return e.includes("v2:backup:list-filesets")&&e.includes("v2:backup:list-folder")});hasV2TestOperations=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v2:destination:test"));hasProgressSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:progress"));hasTaskSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:taskqueue"));hasTaskCompletedOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:taskcompleted"));hasBackupListSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:backuplist"));hasWebSocketAuth=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket:authenticate"));defaultOAuthUrl=s(()=>{let e=this.systemInfo()?.DefaultOAuthURL??"https://duplicati-oauth-handler.appspot.com/";return e.endsWith("/refresh")?e.slice(0,-8):e});defaultOAuthUrlV2=s(()=>{let e=this.systemInfo()?.DefaultOAuthURLv2??"https://oauth-service.duplicati.com/";return e.endsWith("/refresh")?e.slice(0,-8):e});resolveShorthandPath(e){if(!e.startsWith("%")||!e.endsWith("%"))return e;let t=this.systemInfo()?.SpecialFolders;return t?t.find(a=>a.ID?.startsWith(e))?.Path??e:e}preload(e=!1){let t=this.#s.getApiV1Systeminfo().pipe(d(o=>{this.systemInfo.set(o)}),u(()=>this.isLoaded.set(!0)));if(e)return t;t.subscribe()}preloadFilterGroups(e=!1){let t=this.#s.getApiV1SysteminfoFiltergroups().pipe(d(o=>{this.filterGroups.set(o)}),u(()=>this.isLoaded.set(!0)));if(e)return t;t.subscribe()}#e(e){return{name:e.Name,type:e.Type,shortDescription:e.ShortDescription??void 0,longDescription:e.LongDescription??void 0,deprecatedDescription:e.Deprecated??!1?e.DeprecationMessage??void 0:void 0,options:e.ValidValues,defaultValue:e.DefaultValue}}static \u0275fac=function(t){return new(t||r)};static \u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})};export{c as a};
@@ -0,0 +1 @@
1
+ import{a as ye,b as $e}from"./chunk-AGMFKAHM.js";import{a as be}from"./chunk-CTQKCCGM.js";import{a as V}from"./chunk-6COK7FLL.js";import"./chunk-23UYU3M3.js";import{a as Re}from"./chunk-GGW26MAG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-EG3PT3XW.js";import"./chunk-OAAXQ2BE.js";import"./chunk-7E5J43IH.js";import{a as ve}from"./chunk-3QS6DB3O.js";import"./chunk-QY5UGQ3R.js";import{a as Ge}from"./chunk-3MS6SVET.js";import"./chunk-4VYR5E5I.js";import"./chunk-KLAJGS5T.js";import{a as De}from"./chunk-NGKFJLI2.js";import{c as Se,e as Me}from"./chunk-KUX6NGQU.js";import{B as R,G as Ne,H as fe,J as Pe,Q as Ie,Y as Le,c as ge,d as Ce,e as Te,i as he,r as me,s as Fe,t as Ee,v as M,w as Y,x as Ae,z as Oe}from"./chunk-Y46QCSB5.js";import{d as J}from"./chunk-JJY6UOEY.js";import{c as ue,e as de,f as pe}from"./chunk-2K74TI2N.js";import"./chunk-G3FMV74P.js";import"./chunk-LU7RSOI6.js";import"./chunk-VLMNSWR3.js";import"./chunk-VKNFRCHQ.js";import{Ab as ne,Ac as le,Bb as A,Cb as s,Db as o,E as j,Eb as _,Lb as O,Pc as B,Sa as r,Sb as p,Tb as S,Tc as _e,Ub as f,Vc as ce,Xb as y,Yb as T,Yc as K,Z as d,_b as c,ca as m,da as F,fb as D,fc as ie,gc as oe,jc as U,lc as L,mc as u,nc as Q,oa as E,oc as $,qa as q,rc as b,sc as H,tc as w,uc as se,vb as g,vc as ae,wb as C,wc as x,xb as ee,xc as re,zb as te}from"./chunk-QY4Y5NJB.js";import{a as z,b as W}from"./chunk-7CGTOI24.js";var ke=["scroller"];function Ue(i,n){i&1&&(s(0,"sh-icon"),u(1,"bell-ringing"),o())}function Be(i,n){i&1&&(s(0,"sh-icon"),u(1,"bell"),o())}function Ye(i,n){if(i&1&&_(0,"app-notification",8),i&2){c(2);let e=x(6);A("index",0)("notification",e.content)}}function Je(i,n){if(i&1&&(s(0,"div",11),u(1),o()),i&2){c(3);let e=x(6);r(),$(" ",e.content.content," ")}}function Ve(i,n){if(i&1&&(s(0,"sh-alert")(1,"div",10),u(2),o(),g(3,Je,2,1,"div",11),o()),i&2){c(2);let e=x(6);L(e.content.type||"error"),r(2),Q(e.content.title),r(),C(e.content.content?3:-1)}}function Xe(i,n){if(i&1&&(s(0,"div",6),g(1,Ye,1,2,"app-notification",8)(2,Ve,4,4,"sh-alert",9),o()),i&2){c();let e=x(6);r(),C(e.type==="notification"?1:2)}}function ze(i,n){if(i&1){let e=O();s(0,"div",7)(1,"div",12)(2,"h6",13),p(3,2),s(4,"button",5),T("click",function(){m(e);let a=c();return F(a.toggleNotifications())}),_(5,"sh-icon"),o(),S(),o(),s(6,"div",14,0)(8,"div",15),_(9,"app-notifications"),o()()()()}}function We(i,n){if(i&1&&(s(0,"div",20),u(1),o()),i&2){let e=c().$implicit;r(),$(" ",e.content," ")}}function je(i,n){if(i&1){let e=O();s(0,"sh-alert",18,1),T("click",function(){let a=m(e).$implicit,l=c(2);return F(l.deleteAlertByIndex(a.id))}),s(2,"div",19),u(3),o(),g(4,We,2,1,"div",20),o()}if(i&2){let e=n.$implicit;L(e.type),A("id",e.id),r(3),Q(e.title),r(),C(e.content?4:-1)}}function qe(i,n){i&1&&(s(0,"p",17),f(1,4),o())}function Qe(i,n){if(i&1){let e=O();s(0,"div",7)(1,"div",12)(2,"h6",13),p(3,3),s(4,"button",5),T("click",function(){m(e);let a=c();return F(a.toggleAlerts())}),_(5,"sh-icon"),o(),S(),o(),s(6,"div",14,0)(8,"div",15),te(9,je,5,5,"sh-alert",16,ee,!1,qe,2,0,"p",17),o()()()()}if(i&2){let e=c();r(9),ne(e.alertHistory())}}var He=new me,k=class i{#e=d(Ae);#t=d(V);isSubmitting=E(!1);messageSent=E(!1);form=He.group({message:He.control("",[Ce.required])});notifications=this.#t.notifications;shownMessage=E(null);shownMessageInterval=null;alertHistory=this.#e.alertHistory;alertHistoryIsOpen=this.#e.alertHistoryIsOpen;alertHistoryIsHidden=this.#e.alertHistoryIsHidden;numberOfOpenAlerts=B(()=>this.alertHistory().filter(n=>n.isOpen).length);scroller=ce("scroller");isAlertsOpen=K(!1);isNotificationsOpen=K(!1);previousHistoryCount=E(null);previousNotificationsCount=E(null);constructor(){q(()=>{let n=this.alertHistory(),e=this.notifications();if(e.length===0){this.shownMessage.set(null);return}e.length&&this.previousHistoryCount()!==n.length&&!this.isNotificationsOpen()?(this.shownMessage.set({content:e[0],countDown:3,type:"notification"}),this.previousHistoryCount.set(n.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(a=>W(z({},a),{countDown:a.countDown-1}))},1e3)):n.length&&this.previousHistoryCount()!==n.length&&!this.isAlertsOpen()&&(this.shownMessage.set({content:n[0],countDown:3,type:"alert"}),this.previousHistoryCount.set(n.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(a=>W(z({},a),{countDown:a.countDown-1}))},1e3))}),q(()=>{this.alertHistoryIsOpen(),this.scrollToBottom()})}resetPreviewMessage(){this.shownMessage.set(null),this.shownMessageInterval=null}toggleAlerts(){this.isAlertsOpen()?this.isAlertsOpen.set(!1):(this.isAlertsOpen.set(!0),this.isNotificationsOpen.set(!1),this.resetPreviewMessage())}toggleNotifications(){this.isNotificationsOpen.set(!this.isNotificationsOpen()),this.isAlertsOpen()&&this.isAlertsOpen.set(!1)}deleteAlertByIndex(n){this.#e.removeAlert(n)}scrollToBottom(){this.scroller()&&this.scroller()?.nativeElement&&this.scroller().nativeElement.scrollTo(0,this.scroller().nativeElement.scrollHeight)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-service-hub"]],viewQuery:function(e,t){e&1&&ie(t.scroller,ke,5),e&2&&oe()},inputs:{isAlertsOpen:[1,"isAlertsOpen"],isNotificationsOpen:[1,"isNotificationsOpen"]},outputs:{isAlertsOpen:"isAlertsOpenChange",isNotificationsOpen:"isNotificationsOpenChange"},decls:10,vars:9,consts:()=>{let n;n=$localize` Notifications ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let e;e=$localize` Alerts ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let t;return t=$localize`No alerts yet`,[["scroller",""],["alerts",""],n,e,t,["shButton","",3,"click"],[1,"preview-alert-wrap"],[1,"alert-stream-modal"],[3,"index","notification"],[3,"class"],["ship-alert-title",""],["ship-alert-content",""],[1,"alert-stream-modal-content"],[1,"paragraph-20"],[1,"alert-stream-modal-list-scroller"],[1,"alert-stream-modal-list"],[3,"class","id"],[1,"no-alerts"],[3,"click","id"],["title",""],["content",""]]},template:function(e,t){if(e&1){let a=O();s(0,"button",5),T("click",function(){return m(a),F(t.toggleAlerts())}),s(1,"sh-icon"),u(2,"info"),o()(),s(3,"button",5),T("click",function(){return m(a),F(t.toggleNotifications())}),g(4,Ue,2,0,"sh-icon")(5,Be,2,0,"sh-icon"),o(),se(6),g(7,Xe,3,1,"div",6),g(8,ze,10,0,"div",7),g(9,Qe,12,1,"div",7)}if(e&2){L(t.alertHistory().length?"error":""),r(3),L(t.notifications().length?"error":""),r(),C(t.notifications().length?4:5),r(2);let a=ae(t.shownMessage());r(),C(a?7:-1),r(),C(t.isNotificationsOpen()?8:-1),r(),C(t.isAlertsOpen()?9:-1)}},dependencies:[Ee,Y,M,R,$e,ye],styles:["[_nghost-%COMP%]{display:flex;position:fixed;gap:.5rem;bottom:1.5rem;right:1.5rem;z-index:5000}@media only screen and (max-width:768px){[_nghost-%COMP%]{bottom:1rem;right:1rem}}[_nghost-%COMP%] h6[_ngcontent-%COMP%]{margin:0}.preview-alert-wrap[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column;min-width:15.625rem}.helpdesk-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width:768px){.helpdesk-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.helpdesk-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;gap:1rem;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.helpdesk-modal-content[_ngcontent-%COMP%] .message-sent[_ngcontent-%COMP%]{padding:0 1rem 1rem;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{padding:0 1rem 1rem;display:flex;flex-direction:column;align-items:flex-end;gap:1rem}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{width:100%;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.alert-stream-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width:768px){.alert-stream-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.alert-stream-modal-list-scroller[_ngcontent-%COMP%]{overflow-y:auto;max-height:18.75rem}.alert-stream-modal-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:1rem;border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.no-alerts[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};function Ke(i,n){i&1&&(s(0,"sh-icon",14),u(1,"check"),o())}function Ze(i,n){i&1&&(s(0,"sh-icon",15),u(1,"prohibit"),o())}function et(i,n){if(i&1){let e=O();s(0,"button",20),T("click",function(){m(e);let a=c();return F(a.updatePassphrase())}),f(1,5),o()}if(i&2){let e=c();U("loading",e.isUpdating())}}function tt(i,n){if(i&1){let e=O();s(0,"button",21),T("click",function(){m(e);let a=c();return F(a.updatePassphrase())}),f(1,6),o()}if(i&2){let e=c();U("loading",e.isUpdating()),A("disabled",!0)}}var X=class i{#e=d(J);closed=_e();isUpdating=E(!1);passphrase=E("");repeatPassphrase=E("");updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(j(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()}))}cancel(){this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"has-asked-for-password-change":"True"}}).pipe(j(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-change-passphrase-alert-dialog"]],outputs:{closed:"closed"},decls:23,vars:7,consts:()=>{let n;n=$localize`Enter new password`;let e;e=$localize`Repeat password`;let t;t=$localize`Password have to be filled and have to match`;let a;a=$localize`Change passphrase`;let l;l=$localize` Duplicati needs to be secured with a passphrase and a random passphrase has been generated for you. ${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK:${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK: If you open Duplicati from the tray icon, you do not need a passphrase, but if you plan to open it from another location you need to set a passphrase you know. Do you want to set a passphrase now? `,l=y(l);let G;G=$localize`Passphrase`;let P;P=$localize`Repeat passphrase`;let I;I=$localize`Not now thanks`;let v;v=$localize` Yes, update passphrase now `;let h;return h=$localize` Yes, update passphrase now `,[a,l,G,P,I,v,h,["header",""],["content",""],["type","warning"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",n,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",e,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loading"],["shButton","","shTooltip",t,1,"raised","primary",3,"loading","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",t,1,"raised","primary",3,"click","disabled"]]},template:function(e,t){e&1&&(s(0,"header",7)(1,"h3"),f(2,0),o()(),s(3,"div",8)(4,"sh-alert",9),p(5,1),_(6,"br")(7,"br"),S(),o(),s(8,"sh-form-field")(9,"label",10),f(10,2),o(),s(11,"input",11),w("ngModelChange",function(l){return H(t.passphrase,l)||(t.passphrase=l),l}),o()(),s(12,"sh-form-field")(13,"label",12),f(14,3),o(),s(15,"input",13),w("ngModelChange",function(l){return H(t.repeatPassphrase,l)||(t.repeatPassphrase=l),l}),o(),g(16,Ke,2,0,"sh-icon",14)(17,Ze,2,0,"sh-icon",15),o()(),s(18,"footer",16)(19,"button",17),T("click",function(){return t.cancel()}),f(20,4),o(),g(21,et,2,2,"button",18)(22,tt,2,3,"button",19),o()),e&2&&(r(11),b("ngModel",t.passphrase),r(4),A("disabled",t.passphrase().length===0),b("ngModel",t.repeatPassphrase),r(),C(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?16:17),r(3),U("loading",t.isUpdating()),r(2),C(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?21:22))},dependencies:[Fe,ge,Te,he,Y,fe,M,Le,R],styles:["[_nghost-%COMP%]{display:block;--dialog-p: 1.5rem}[content][_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"],changeDetection:0})};var nt=()=>({exact:!0});function it(i,n){i&1&&(s(0,"sh-icon"),u(1,"sun"),o())}function ot(i,n){i&1&&(s(0,"sh-icon"),u(1,"moon"),o())}function st(i,n){if(i&1){let e=O();s(0,"button",26),T("click",function(){m(e);let a=c();return F(a.logout())}),p(1,8),_(2,"sh-icon"),S(),o()}}var Z=class i{#e=d(be);#t=d(J);#i=d(Re);#o=d(Se);#s=d(Oe);#a=d(V);#r=d(Me);#l=d(Ge);#n=d(De);relayIsEnabled=this.#o.relayIsEnabled;isDarkMode=this.#e.isDarkMode;isNavOpen=this.#e.isNavOpen;sidenavType=this.#e.sidenavType;machineName=B(()=>{let n=this.#l.serverSettings();if(n&&n["--machine-name"])return n["--machine-name"];if(n&&n["machine-name"])return n["machine-name"];let e=this.#n.allOptions().find(t=>t.name==="machine-name");return e&&e.defaultValue?e.defaultValue:this.#n.systemInfo()?.MachineName??"Unknown"});ngOnInit(){return this.#a.init(),this.#i.getBackups(!0),this.#t.getApiV1Serversettings().subscribe({next:n=>{let e=n["autogenerated-passphrase"]==="True",t=n["has-asked-for-password-change"]==="True";e&&!t&&this.#s.open(X,{maxWidth:"500px"})}})}toggleBodyClass(){this.#e.toggleBodyClass()}changeDefaultClientTo(n){this.#_(n),window.location.replace(`/${n}`)}logout(){this.#r.logout()}#_(n){var e=new Date;e.setTime(e.getTime()+2160*60*60*1e3),document.cookie="default-client="+n+"; expires="+e.toUTCString()+"; path=/"}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-layout"]],decls:44,vars:11,consts:()=>{let n;n=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:house${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON: Home `;let e;e=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON: Add backup `;let t;t=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let a;a=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:link-simple${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Destinations `;let l;l=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:gear${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Settings `;let G;G=$localize`${"\uFFFD#32\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#32\uFFFD"}:CLOSE_TAG_SH_ICON: About Duplicati `;let P;P=$localize`${"\uFFFD#35\uFFFD"}:START_TAG_SH_ICON:files${"[\uFFFD/#35\uFFFD|\uFFFD/#36\uFFFD]"}:CLOSE_TAG_SH_ICON: Documentation ${"\uFFFD#36\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#35\uFFFD|\uFFFD/#36\uFFFD]"}:CLOSE_TAG_SH_ICON:`,P=y(P);let I;I=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SH_ICON:chats-circle${"[\uFFFD/#39\uFFFD|\uFFFD/#40\uFFFD]"}:CLOSE_TAG_SH_ICON: Visit forum ${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#39\uFFFD|\uFFFD/#40\uFFFD]"}:CLOSE_TAG_SH_ICON:`,I=y(I);let v;return v=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:sign-out${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Log out `,[n,e,t,a,l,G,P,I,v,[3,"isOpenChange","isOpen","disableDrag"],["sidenav",""],["shButton","",1,"icon","small",3,"click"],[1,"base-1","primary"],["action","","routerLink","/","routerLinkActive","active",3,"routerLinkActiveOptions"],["action","","routerLink","/add-backup","routerLinkActive","active"],["action","","routerLink","/restore","routerLinkActive","active"],["action","","routerLink","/destinations","routerLinkActive","active"],["action","","routerLink","/settings","routerLinkActive","active"],[1,"spacer"],[1,"base-1l","primary"],["action","",1,"machine-name",3,"title"],["action","","routerLink","/about","routerLinkActive","active"],["href","https://docs.duplicati.com","target","_blank","action",""],["suffix",""],["href","https://forum.duplicati.com","target","_blank","action",""],["action",""],["action","",3,"click"]]},template:function(e,t){e&1&&(s(0,"sh-sidenav",9),w("isOpenChange",function(l){return H(t.isNavOpen,l)||(t.isNavOpen=l),l}),s(1,"div",10)(2,"header"),_(3,"app-logo"),s(4,"button",11),T("click",function(){return t.toggleBodyClass()}),g(5,it,2,0,"sh-icon")(6,ot,2,0,"sh-icon"),o()(),s(7,"sh-list",12)(8,"button",13),p(9,0),_(10,"sh-icon"),S(),o(),s(11,"button",14),p(12,1),_(13,"sh-icon"),S(),o(),s(14,"button",15),p(15,2),_(16,"sh-icon"),S(),o(),s(17,"button",16),p(18,3),_(19,"sh-icon"),S(),o(),s(20,"button",17),p(21,4),_(22,"sh-icon"),S(),o()(),_(23,"div",18),s(24,"sh-list",19)(25,"div",20)(26,"sh-icon"),u(27,"desktop"),o(),u(28),o(),_(29,"sh-divider"),s(30,"button",21),p(31,5),_(32,"sh-icon"),S(),o(),s(33,"a",22),p(34,6),_(35,"sh-icon")(36,"sh-icon",23),S(),o(),s(37,"a",24),p(38,7),_(39,"sh-icon")(40,"sh-icon",23),S(),o(),g(41,st,3,0,"button",25),o()(),_(42,"router-outlet")(43,"app-service-hub"),o()),e&2&&(L(t.sidenavType()),b("isOpen",t.isNavOpen),A("disableDrag",!0),r(5),C(t.isDarkMode()?5:6),r(3),A("routerLinkActiveOptions",le(10,nt)),r(17),A("title",re(t.machineName())),r(3),$(" ",t.machineName()," "),r(13),C(t.relayIsEnabled()?-1:41))},dependencies:[ue,de,pe,Ie,M,Pe,R,Ne,k,ve],styles:["[_nghost-%COMP%]{height:100vh;width:100%;overflow:hidden}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1.25rem;gap:.75rem}h3[title][_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}div[sidenav][_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100vh}.machine-name[_ngcontent-%COMP%]{margin:0;cursor:default}"],changeDetection:0})};export{Z as default};
@@ -0,0 +1 @@
1
+ import{a as Q}from"./chunk-O3GGVB2B.js";import{a as H}from"./chunk-OAAXQ2BE.js";import"./chunk-7E5J43IH.js";import{a as q}from"./chunk-3MS6SVET.js";import"./chunk-4VYR5E5I.js";import"./chunk-KLAJGS5T.js";import"./chunk-NGKFJLI2.js";import"./chunk-KUX6NGQU.js";import{B as X,C as z,H as K,L as j,c as B,e as U,i as G,s as W,v as V,w as J}from"./chunk-Y46QCSB5.js";import"./chunk-JJY6UOEY.js";import{d as A,e as I}from"./chunk-2K74TI2N.js";import"./chunk-G3FMV74P.js";import"./chunk-LU7RSOI6.js";import"./chunk-VLMNSWR3.js";import"./chunk-VKNFRCHQ.js";import{Bb as y,Cb as r,Db as l,Eb as T,Ec as $,Lb as f,Pc as O,Sa as a,Sb as S,Tb as P,Ub as p,Uc as v,Xb as D,Yb as h,Z as E,_b as s,ca as m,da as F,fb as b,lc as x,mc as d,oa as N,qa as M,rc as w,sc as L,tc as k,vb as c,wb as _}from"./chunk-QY4Y5NJB.js";import"./chunk-7CGTOI24.js";var Y=(t,n,e,i,o)=>({"loading-state":t,"ready-to-add-link":n,"is-connected":e,"failed-to-connect":i,"is-registered":o});function Z(t,n){t&1&&p(0,0,1)}function ee(t,n){t&1&&p(0,0,2)}function te(t,n){if(t&1){let e=f();r(0,"button",10),h("click",function(){m(e);let o=s(2);return F(o.cancel())}),d(1,"Cancel registration"),l()}}function ne(t,n){if(t&1&&(r(0,"div",7)(1,"p"),S(2,0),c(3,Z,1,0)(4,ee,1,0),P(),l(),T(5,"sh-progress-bar",8),c(6,te,2,0,"button",9),l()),t&2){let e=s();a(3),_(e.state()==="unknown"?3:4),a(3),_((e.registeringCounter()??0)>=5&&e.state()==="registering"?6:-1)}}function ie(t,n){if(t&1){let e=f();r(0,"sh-form-field")(1,"label",11),p(2,1),l(),r(3,"input",12),k("ngModelChange",function(o){m(e);let C=s();return L(C.customRegisterUrl,o)||(C.customRegisterUrl=o),F(o)}),l()(),r(4,"div",13)(5,"button",14),d(6,"Go back"),l(),r(7,"button",15),h("click",function(){m(e);let o=s();return F(o.registerViaCustomUrl())}),p(8,2),l()()}if(t&2){let e=s();a(3),w("ngModel",e.customRegisterUrl),a(4),y("disabled",!e.customRegisterUrlValid())}}function oe(t,n){if(t&1){let e=f();r(0,"p"),p(1,3),l(),T(2,"sh-progress-bar",8),r(3,"button",10),h("click",function(){m(e);let o=s(2);return F(o.retryWhenFaulted())}),d(4,"Cancel"),l()}}function re(t,n){if(t&1){let e=f();r(0,"p"),p(1,4),l(),r(2,"button",10),h("click",function(){m(e);let o=s(2);return F(o.retryWhenFaulted())}),d(3,"Retry"),l()}}function le(t,n){if(t&1&&c(0,oe,5,0)(1,re,4,0),t&2){let e=s();_(e.claimUrl()!==null?0:1)}}function ae(t,n){t&1&&(S(0,5,1),T(1,"p"),P())}function se(t,n){t&1&&(S(0,5,2),T(1,"p"),P())}function ce(t,n){if(t&1){let e=f();r(0,"sh-alert",16),S(1,5),c(2,ae,2,0,"p")(3,se,2,0,"p"),P(),l(),r(4,"button",10),h("click",function(){m(e);let o=s();return F(o.retryWhenFaulted())}),d(5," Retry "),r(6,"sh-icon"),d(7,"arrow-arc-left"),l()()}if(t&2){let e=s();a(2),_(e.typeParam()==="link"?2:3)}}function _e(t,n){t&1&&(r(0,"h3"),d(1,"Successfully connected"),l(),r(2,"p"),d(3,"We're going to redirect you to the home page"),l())}var R=class t{#t=E(A);#i=E(H);#e=E(Q);#n=E(q);isOldOpen=N(!1);typeParam=v.required();state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;customRegisterUrl=this.#e.customRegisterUrl;additionalReportingUrl=O(()=>{let n=this.#n.serverSettings();return this.#e.state()==="inactive"?"":n&&n["additional-report-url"]||""});copiedReportingUrl=N(!1);customRegisterUrlValid=O(()=>{let n=this.customRegisterUrl(),e=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/;return!(n.length===0||!e.test(n))});registeringCounter=N(null);didTry=!1;triedFinishConnection=!1;stateEffect=M(()=>{let n=this.#e.registerUrl(),e=this.state(),i=this.typeParam(),o=this.registeringCounter();e==="inactive"&&i==="logon"&&n!==""&&(this.didTry||(this.#e.beginRemoteRegistration(),this.didTry=!0)),e==="registered"&&this.claimUrl()!==null&&(this.triedFinishConnection||(this.triedFinishConnection=!0,this.#o())),e==="registering"?(o===null&&this.registeringCounter.set(0),setTimeout(()=>{this.registeringCounter.set((o??0)+1)},1e3)):this.registeringCounter.set(null),(e==="connected"||e==="disabled"||e==="connecting")&&this.#n.setShownWelcomePage().subscribe(()=>{this.#t.navigate([""])})});ngOnInit(){this.#e.refreshRemoteControlStatus()}#o(){let n=this.#e.claimUrl();this.#i.open(`${n}?closeAfterConnection=true`,"_blank")}registerViaCustomUrl(){this.#e.beginRemoteRegistration(!0)}retryWhenFaulted(){this.#e.cancelRemoteRegistration(),this.customRegisterUrl.set(""),this.didTry=!1,this.triedFinishConnection=!1,this.typeParam()==="logon"&&this.#t.navigate(["/welcome/select"])}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let n=this.additionalReportingUrl();n&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(n))}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=b({type:t,selectors:[["app-connect"]],inputs:{typeParam:[1,"typeParam"]},decls:6,vars:13,consts:()=>{let n;n=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Loading... ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE: Connecting to console ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let e;e=$localize`Paste registration URL here`;let i;i=$localize` Connect machine to console `;let o;o=$localize`We're now connecting you to the console`;let C;C=$localize`Something failed during registration we're missing claimUrl, please try again`;let u;return u=$localize` Failed to register ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: Check if the connection link are correct, alternatively it could be your internet connection or the service might be down ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: There might be a problem with your internet connection or the service might be down, please try again later ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,u=D(u),[n,e,i,o,C,u,[1,"main-card","type-b"],[1,"loader-content"],[1,"primary","indeterminate"],["shButton",""],["shButton","",3,"click"],["for","remoteControlRegisterUrl"],["type","text","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],[1,"nav-buttons"],["type","button","shButton","","routerLink","/welcome",1,"raised"],["type","button","shButton","",1,"raised","primary",3,"click","disabled"],[1,"error"]]},template:function(e,i){if(e&1&&(r(0,"sh-card",6),c(1,ne,7,2,"div",7),c(2,ie,9,2),c(3,le,2,1),c(4,ce,8,1),c(5,_e,4,0),l()),e&2){let o=i.state()==="unknown"||i.typeParam()!=="link"&&i.state()==="inactive"||i.state()==="registering",C=i.typeParam()==="link"&&i.state()==="inactive",u=i.state()==="connected"||i.state()==="disabled"||i.state()==="connecting",g=i.state()==="registeringfaulted";x($(7,Y,o,C,u,g,i.state()==="registered")),a(),_(o?1:-1),a(),_(C?2:-1),a(),_(i.state()==="registered"?3:-1),a(),_(g?4:-1),a(),_(u?5:-1)}},dependencies:[I,W,B,U,G,K,X,j,z,J,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:100%;width:100%;flex:1 0;overflow:hidden;padding:2rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{padding:1rem}}.main-card[_ngcontent-%COMP%]{width:100%;height:100%;max-width:31.25rem;max-height:min-content;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1rem;padding:2rem}.main-card.failed-to-connect[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}.main-card.failed-to-connect[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.main-card.is-registered[_ngcontent-%COMP%], .main-card.is-connected[_ngcontent-%COMP%]{align-items:center}.loader-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;width:100%}.loader-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{--pb-b: var(--base-3);border:1px solid var(--pb-b)}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}.state[_ngcontent-%COMP%]{position:fixed;top:1rem;right:1rem;margin:0;color:var(--base-7);font-size:.75rem}.old[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative;gap:.5rem;padding:1rem;border:1px solid var(--base-4);background:var(--base-1);position:fixed;top:0;right:0;bottom:0;width:35rem;transform:translate(100%)}.old.open[_ngcontent-%COMP%]{transform:translate(0)}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:.5rem;cursor:pointer;position:absolute;background-color:var(--base-1);border:1px solid var(--base-4);border-width:.0625rem 0 .0625rem .0625rem;width:2rem;height:2.5rem;border-radius:var(--shape-2) 0 0 var(--shape-2);top:3.75rem;left:-2rem;-webkit-user-select:none;user-select:none}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.nav-buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;flex-direction:row}"],changeDetection:0})};export{R as default};
@@ -0,0 +1 @@
1
+ import{a as tt}from"./chunk-ZKGGCQ2N.js";import{k as Ze,m as et}from"./chunk-AWL7E6ZQ.js";import{a as re}from"./chunk-V5ZJABDA.js";import{a as Ke}from"./chunk-EG3PT3XW.js";import{a as y}from"./chunk-7E5J43IH.js";import{b as _e}from"./chunk-4VYR5E5I.js";import{b as Qe}from"./chunk-KLAJGS5T.js";import{a as K}from"./chunk-NGKFJLI2.js";import{B as j,H as Xe,L as Ue,M as Ye,P as He,V as je,W as qe,b as Be,c as W,e as B,f as V,i as Ve,j as z,l as ze,p as J,q as X,r as U,s as Je,t as Y,v as H,z as se}from"./chunk-Y46QCSB5.js";import{d as q}from"./chunk-JJY6UOEY.js";import{b as D,d as L}from"./chunk-2K74TI2N.js";import{fa as ne}from"./chunk-VLMNSWR3.js";import{Ac as ke,Bb as S,C as Q,Cb as r,Db as a,E as I,Eb as c,Fc as le,Gc as we,H as Me,Hc as We,Ib as A,Jb as v,K as De,L as ee,Lb as M,Pc as N,Sa as d,Sb as m,Tb as T,U as Le,Ub as C,Vb as $e,Wb as be,Yb as f,Z as p,_b as O,ca as R,da as h,fb as w,g as Re,jc as Ae,kb as ye,m as he,mc as G,oa as u,oc as ve,pc as Ge,qa as k,rc as te,sc as oe,tc as ie,v as ae,vb as g,w as Pe,wb as E,z as Ie,zc as xe}from"./chunk-QY4Y5NJB.js";function lt(s,t){s&1&&(r(0,"p"),C(1,3),a())}function _t(s,t){s&1&&(r(0,"sh-form-field")(1,"label",11),C(2,4),a(),c(3,"input",12),a())}var ot=new U,st=()=>ot.group({passphrase:ot.control("")}),ue=class s{#e=p(q);#t=p($);#n=p(L);#i=p(D);encryptionForm=this.#t.encryptionForm;creatingTemporaryBackup=u(!1);settings=u([]);hasEncryptedBackup=N(()=>{let t=this.#t.destinationTestSignal();return t==="testing"||typeof t=="string"?!0:t?.containsEncryptedBackupFiles??!0});showEncryptionField=u(!1);next(){let t=this.#t.destinationTargetUrl();if(!t)throw new Error("No target URL");this.creatingTemporaryBackup.set(!0);let e=this.encryptionForm.value?.passphrase??null,o=[];e?o.push({Name:"--passphrase",Value:e}):o.push({Name:"--no-encryption",Value:"true"}),this.settings().forEach(i=>{let n=i.Name?.trim();n&&n!=="--"&&(n.startsWith("--")||(n=`--${n}`),o.push({Name:n,Value:i.Value??""}))}),this.#e.postApiV1Backups({requestBody:{Backup:{TargetURL:t,Settings:o}},temporary:!0}).pipe(I(()=>this.creatingTemporaryBackup.set(!1))).subscribe({next:i=>{let n=i.ID;this.#n.navigate([`/restore-draft/${n}`])},error:i=>{console.error(i)}})}back(){this.#t.isFileRestore()?this.#n.navigate(["destination"],{relativeTo:this.#i.parent}):this.#t.exit()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=w({type:s,selectors:[["app-restore-encryption"]],decls:14,vars:5,consts:()=>{let t;t=$localize`Advanced options`;let e;e=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let o;o=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let i;i=$localize`The backup does not contain encrypted files.`;let n;n=$localize`Enter backup passphrase if defined.`;let l;return l=$localize`Password`,[t,e,o,i,l,[3,"submit","formGroup"],["title",""],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["for","password"],["type","password","id","password","autocomplete","disabled","placeholder",n,"formControlName","passphrase"]]},template:function(e,o){e&1&&(r(0,"form",5),f("submit",function(){return o.next()}),g(1,lt,2,0,"p"),g(2,_t,4,0,"sh-form-field"),r(3,"sh-toggle-card"),A(4,6),C(5,0),v(),r(6,"app-options-list",7),ie("optionsChange",function(n){return oe(o.settings,n)||(o.settings=n),n}),a()(),r(7,"div",8)(8,"button",9),f("click",function(){return o.back()}),m(9,1),c(10,"sh-icon"),T(),a(),r(11,"button",10),m(12,2),c(13,"sh-icon"),T(),a()()()),e&2&&(S("formGroup",o.encryptionForm),d(),E(o.hasEncryptedBackup()?-1:1),d(),E(o.hasEncryptedBackup()||o.showEncryptionField()?2:-1),d(4),te("options",o.settings),S("hasFreeTextSettings",!0))},dependencies:[Y,z,W,B,V,X,J,Xe,H,j,je,tt],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 ut=()=>({standalone:!0});function ct(s,t){s&1&&c(0,"sh-progress-bar",8)}function pt(s,t){if(s&1&&(G(0),le(1,"bytes")),s&2){let e=O().$implicit;ve(" (",we(1,1,e.FileSizes),") ")}}function dt(s,t){s&1&&(r(0,"span",16),C(1,4),a())}function mt(s,t){if(s&1&&(r(0,"div",15),G(1),le(2,"date"),g(3,pt,2,3),g(4,dt,2,0,"span",16),a()),s&2){let e=t.$implicit;d(),Ge(" ",e.Version,": ",We(2,4,e.Time,"medium")," "),d(2),E(e.FileSizes?3:-1),d(),E(e.IsFullBackup===!1?4:-1)}}function Tt(s,t){s&1&&c(0,"sh-progress-bar",8)}function Ft(s,t){if(s&1){let e=M();r(0,"app-file-tree",17),f("hasExtendedData",function(i){R(e);let n=O(2);return h(n.extendedDataType.set(i))}),r(1,"label",18),C(2,5),a(),c(3,"input",19),a()}if(s&2){let e=O(2);S("rootPaths",e.rootPaths())("initialNodes",e.initialNodes())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)("loadExtendedData",!0)}}function St(s,t){if(s&1){let e=M();r(0,"sh-select",12),f("cleared",function(){R(e);let i=O();return h(i.abortLoading())}),r(1,"input",13),ie("ngModelChange",function(i){R(e);let n=O();return oe(n.selectOption,i)||(n.selectOption=i),h(i)}),a(),ye(2,mt,5,7,"ng-template"),a(),g(3,Tt,1,0,"sh-progress-bar",8),g(4,Ft,4,6,"app-file-tree",14)}if(s&2){let e=O();S("options",e.versionOptions())("isClearable",!1),d(),te("ngModel",e.selectOption),S("ngModelOptions",ke(6,ut)),d(2),E(e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),d(),E(e.showFileTree()?4:-1)}}var pe=new U,rt=()=>pe.group({filesToRestore:pe.control(""),passphrase:pe.control(null)}),de=class s{#e=p(q);#t=p($);#n=p(Qe);#i=p(K);#o=p(L);#s=p(D);#a=p(ne);#l=null;#_=null;#r=u([]);selectFilesForm=this.#t.selectFilesForm;selectFilesFormSignal=this.#t.selectFilesFormSignal;selectOption=this.#t.selectOption;backupId=this.#t.backupId;versionOptionsLoading=this.#t.versionOptionsLoading;versionOptions=this.#t.versionOptions;isFileRestore=this.#t.isFileRestore;extendedDataType=this.#t.extendedDataType;needsDatabaseRepair=N(()=>this.#t.backup()?.Backup?.IsTemporary??!0);showFileTree=u(!1);backupSettings=u(null);rootPaths=u([]);initialNodes=u([]);loadingRootPath=u(!1);isRepairing=N(()=>this.#r().length>0);loadedVersions=u({});loadingEffect=k(()=>{if(this.versionOptionsLoading())return;let e=this.versionOptions();if(e&&e?.length>0){let o=e[0].Version;this.selectOption.set(o.toString())}});backupSettingsEffect=k(()=>{let t=this.backupId(),e=this.selectOption(),o=this.isRepairing(),i=this.loadedVersions();if(!e||!t)return;let l=this.versionOptions()?.find(Z=>Z.Version===parseInt(e))?.Time??null;if(!l)return;let _=`${t}+${l}`,P=i[_];if(this.needsDatabaseRepair()&&(!P||o))return;let b={id:t+"",time:l};this.backupSettings.set(b),this.getRootPath(b)});repairEffect=k(()=>{if(!this.needsDatabaseRepair())return;let t=this.selectOption(),e=this.versionOptions();if(t){let o=e.find(l=>l.Version===parseInt(t));if(o===void 0)return;let i=this.backupId(),n=`${i}+${o.Time}`;if(this.#_===n||(this.#_=n,this.#r().includes(n)))return;this.#r.update(l=>[...l,n]),this.#e.postApiV1BackupByIdRepairupdate({id:i,requestBody:{only_paths:!0,time:o.Time}}).pipe(ee(this.abortLoading$),I(()=>{this.#_=null})).subscribe(l=>{let _=l.ID;this.#n.waitForTaskToComplete(_).pipe(Q(1)).subscribe(()=>{this.#r.update(P=>P.filter(b=>b!==n)),this.loadedVersions.update(P=>(P[n]=!0,P))})})}});getRootPath(t){let e={id:t.id+"",time:t.time,prefixOnly:!0,folderContents:!1},o=t.id+"";this.isRepairing()||this.#l===o||(this.#l=o,this.loadingRootPath.set(!0),this.showFileTree.set(!1),this.#i.hasV2ListOperations()?this.#e.postApiV2BackupListFolder({requestBody:{BackupId:t.id,Time:t.time,Paths:null,PageSize:0,Page:0,ReturnExtended:!0}}).pipe(ee(this.abortLoading$),I(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1),this.#l=null})).subscribe({next:i=>{let n=(i.Data??[]).find(_=>_.Metadata&&_.Metadata.ExtType&&_.Metadata.ExtType.length>0);n&&this.extendedDataType.set(n.Metadata.ExtType);let l=(i.Data??[]).map(_=>_.Path??"");l.length>0?(this.initialNodes.set([]),this.rootPaths.set(l)):(this.initialNodes.set([]),this.rootPaths.set(["/"]))}}):this.#e.getApiV1BackupByIdFiles(e).pipe(ee(this.abortLoading$),I(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1)})).subscribe({next:i=>{let n=i.Files.map(l=>l.Path??"");n.length>0?(this.initialNodes.set([]),this.rootPaths.set(n)):(this.initialNodes.set([]),this.rootPaths.set(["/"]))}}))}abortLoading$=new Re;abortLoading(){this.showFileTree.set(!1),this.loadingRootPath.set(!1),this.abortLoading$.next(!0)}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.#a.transform(o.Time,"medium")}`:""}}next(){this.#o.navigate(["options"],{relativeTo:this.#s.parent})}back(){this.#t.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#s.parent}):this.#t.exit()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=w({type:s,selectors:[["app-select-files"]],features:[xe([ne])],decls:13,vars:3,consts:()=>{let t;t=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let o;o=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let i;i=$localize`Select an option...`;let n;n=$localize`(partial)`;let l;return l=$localize`Path`,[["formRef",""],t,e,o,n,l,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["value","Version",3,"cleared","options","isClearable"],["type","text","placeholder",i,3,"ngModelChange","ngModel","ngModelOptions"],[3,"rootPaths","initialNodes","backupSettings","multiSelect","showFiles","loadExtendedData"],[1,"custom-option"],[1,"partial"],[3,"hasExtendedData","rootPaths","initialNodes","backupSettings","multiSelect","showFiles","loadExtendedData"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]]},template:function(e,o){if(e&1){let i=M();r(0,"form",6,0),f("submit",function(){return R(i),h(o.next())}),r(2,"h3",7),C(3,1),a(),g(4,ct,1,0,"sh-progress-bar",8)(5,St,5,7),r(6,"div",9)(7,"button",10),f("click",function(){return R(i),h(o.back())}),m(8,2),c(9,"sh-icon"),T(),a(),r(10,"button",11),m(11,3),c(12,"sh-icon"),T(),a()()()}e&2&&(S("formGroup",o.selectFilesForm),d(4),E(o.versionOptionsLoading()?4:5),d(5),$e(o.isFileRestore()?"Back":"Exit"),be(8))},dependencies:[Je,z,W,B,V,Ve,Y,X,J,re,j,H,He,Ue,ne,Ke],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}.partial[_ngcontent-%COMP%]{color:var(--base-9);font-style:italic}"],changeDetection:0})};var $=class s{#e=p(L);#t=p(D);#n=p(K);#i=p(se);#o=p(q);backupId=u(null);backup=u(null);destinationTargetUrl=u(null);destinationTestSignal=u(null);selectFilesForm=rt();optionsForm=at();encryptionForm=st();optionsFormSignal=_e(this.optionsForm.valueChanges);selectFilesFormSignal=_e(this.selectFilesForm.valueChanges);selectOption=u(null);versionOptionsLoading=u(!1);versionOptions=u([]);isSubmitting=u(!1);isFileRestore=u(!1);isFullWidthPage=u(!1);extendedDataType=u(null);alternateRestorePath=u(null);alternateRestorePathSourcePrefix=u(null);init(t,e=!1){this.backupId.set(t),this.isFileRestore.set(e),this.alternateRestorePath.set(null),this.extendedDataType.set(null),e&&this.#e.navigate(["/restore-from-files/destination"]),e||this.getBackup()}updateTargetUrl(t){this.destinationTargetUrl.set(t)}setAlternateRestorePath(t,e){this.alternateRestorePath.set(t),this.alternateRestorePathSourcePrefix.set(e)}submit(){this.isSubmitting.set(!0);let t=this.backupId();this.backup()?.Backup?.IsTemporary??!1?this.#o.postApiV1BackupByIdCopytotemp({id:this.backupId()??""}).subscribe({next:o=>{this.#s(o.ID??"")},error:o=>this.showErrorDialog($localize`An error occurred while copying the backup to a temporary location: ${o.message}`)}):this.#s(t??"")}showErrorDialog(t){this.#i.open(y,{data:{title:$localize`Error occured`,message:t,confirmText:$localize`OK`,cancelText:void 0},closed:e=>{}})}#s(t){let e=this.optionsForm.value,o=this.selectFilesForm.value,i=this.selectOption(),n=this.versionOptions()?.find(l=>l.Version===(i&&parseInt(i)));this.#o.postApiV1BackupByIdRestore({id:t??"",requestBody:{paths:o.filesToRestore?.split("\0").map(l=>l.endsWith("/")||l.endsWith("\\")?`${l}*`:l)??[],passphrase:o.passphrase??null,time:n?.Time,restore_path:this.alternateRestorePath()??e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!e.includeMetadata,source_prefix:this.alternateRestorePathSourcePrefix(),connection_string_id:null}}).pipe(I(()=>this.isSubmitting.set(!1))).subscribe({next:l=>{this.#e.navigate([`./${l.ID}`,"progress"],{relativeTo:this.#t})},error:l=>{console.error("restore error",l)}})}exit(){this.#i.open(y,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:t=>{t&&(this.#a(),this.#e.navigate(["/"]))}})}getVersionOptions(){this.versionOptions()}loadFilesetsWithRetryv2(t,e=2){return this.#o.postApiV2BackupListFilesets({requestBody:{BackupId:t}}).pipe(Ie(o=>{let i=o?.error?.body?.StatusCode??o?.error?.requestBody?.StatusCode;return i==="EncryptedStorageNoPassphrase"||i==="FolderMissing"||i==="EmptyRemoteFolder"||e===0?he(()=>o):Pe(1e3).pipe(De(()=>this.loadFilesetsWithRetryv2(t,e-1)))}))}getBackup(){let t=this.backupId();this.versionOptionsLoading.set(!0),this.#n.hasV2ListOperations()?ae([this.#o.getApiV1BackupById({id:t}),this.loadFilesetsWithRetryv2(t)]).pipe(Q(1),I(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([e,o])=>{if(o.Error)throw new Error(o.Error);if(!(e.Backup?.IsTemporary??!0)&&e?.Backup?.DBPathExists===!1){this.#i.open(y,{data:{title:$localize`Missing Local Database`,message:$localize`The local database for this backup is missing. Please repair or recreate the local database before restoring.`,confirmText:$localize`OK`,cancelText:void 0},closed:n=>{this.#e.navigate(["/backup",t,"database"])}});return}this.versionOptions.set((o.Data??[]).map(n=>({Version:n.Version??-1,IsFullBackup:n.IsFullBackup??void 0,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(e)},error:e=>{let o=e?.error?.body?.StatusCode??e?.error?.requestBody?.StatusCode,i=o==="EncryptedStorageNoPassphrase",n=o==="FolderMissing",l=o==="EmptyRemoteFolder",_=$localize`An error occurred while loading the backup filesets: ${e.message}`;i&&(_=$localize`The remote storage is encrypted. Please enter the passphrase to access the backup.`),n&&(_=$localize`The backup storage folder was not found.`),l&&(_=$localize`The backup storage folder does not contain any filesets.`),this.#i.open(y,{data:{title:$localize`Failed to load backup filesets`,message:_,confirmText:$localize`OK`,cancelText:void 0},closed:P=>{this.#e.navigate([i?"/restore-from-files/encryption":"/restore-from-files/destination"])}})}}):ae([this.#o.getApiV1BackupById({id:t}),this.#o.getApiV1BackupByIdFilesets({id:t}).pipe(Me(3))]).pipe(Q(1),I(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([e,o])=>{this.versionOptions.set(o.map(i=>({Version:i.Version??-1,IsFullBackup:(i.IsFullBackup??1)==1,Time:i.Time??"<missing>",FileCount:i.FileCount??void 0,FileSizes:i.FileSizes??void 0}))),this.backup.set(e)}})}#a(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||s)};static \u0275prov=Le({token:s,factory:s.\u0275fac,providedIn:"root"})};function gt(s,t){if(s&1){let e=M();r(0,"sh-radio",27),m(1,6),c(2,"input",31),T(),a(),r(3,"sh-radio",27),m(4,7),r(5,"input",32),f("click",function(){R(e);let i=O(2);return h(i.chooseCustomRemoteDestination())}),a(),T(),a()}}function Et(s,t){if(s&1){let e=M();r(0,"sh-radio",27),m(1,8),c(2,"input",31),T(),a(),r(3,"sh-radio",27),m(4,9),r(5,"input",32),f("click",function(){R(e);let i=O(2);return h(i.chooseCustomRemoteDestination())}),a(),T(),a()}}function Ct(s,t){if(s&1&&(r(0,"app-file-tree",29)(1,"label",33),G(2,"Path"),a(),c(3,"input",34),a()),s&2){let e,o=O(2);S("disabled",((e=o.optionsFormSignal())==null?null:e.restoreFrom)!=="pickLocation")("enableCreateFolder",!0)}}function Ot(s,t){if(s&1&&(r(0,"app-file-tree",30)(1,"label",33),G(2,"Path"),a(),c(3,"input",34),a()),s&2){let e=O(2);S("customRemoteMode",e.extendedDataType())("backupId",e.backupId())("sourcePrefix",e.remoteCustomSourcePrefix())("destinationUrl",e.customDestinationUrl())}}function Nt(s,t){if(s&1&&(g(0,gt,6,0)(1,Et,6,0),r(2,"sh-radio",27),m(3,5),c(4,"input",28),T(),a(),g(5,Ct,4,2,"app-file-tree",29),g(6,Ot,4,4,"app-file-tree",30)),s&2){let e,o=O();E(o.extendedDataType()==="o365"?0:o.extendedDataType()==="gsuite"?1:-1),d(5),E(((e=o.optionsFormSignal())==null?null:e.restoreFrom)==="pickLocation"?5:-1),d(),E(o.showCustomRemoteRestoreTree()?6:-1)}}function ft(s,t){if(s&1&&(r(0,"sh-radio",27),m(1,10),c(2,"input",35),T(),a(),r(3,"sh-radio",27),m(4,11),c(5,"input",28),T(),a(),r(6,"app-file-tree",29)(7,"label",33),G(8,"Path"),a(),c(9,"input",34),a()),s&2){let e,o=O();d(6),S("disabled",((e=o.optionsFormSignal())==null?null:e.restoreFrom)!=="pickLocation")("enableCreateFolder",!0)}}function Rt(s,t){s&1&&(r(0,"app-toggle-card",22),A(1,23),C(2,12),v(),r(3,"sh-toggle",27),m(4,13),c(5,"input",36),T(),a()()),s&2&&S("disableToggle",!0)}function ht(s,t){s&1&&(r(0,"app-toggle-card",22),A(1,23),C(2,14),v(),r(3,"sh-radio",27),m(4,15),c(5,"input",37),T(),a(),r(6,"sh-radio",27),m(7,16),c(8,"input",38),T(),a()(),r(9,"app-toggle-card"),A(10,23),C(11,17),v(),r(12,"sh-toggle",39),m(13,18),c(14,"input",40),T(),a(),r(15,"sh-toggle",39),m(16,19),c(17,"input",41),T(),a()()),s&2&&S("disableToggle",!0)}var x=new U,at=()=>x.group({restoreFrom:x.control("original"),restoreFromPath:x.control(""),handleExisting:x.control("saveTimestamp"),permissions:x.control(!1),includeMetadata:x.control(!0),customRemoteIgnoreExisting:x.control(!1)}),me=class s{#e=p($);#t=p(L);#n=p(D);#i=p(K);#o=p(se);optionsForm=this.#e.optionsForm;optionsFormSignal=this.#e.optionsFormSignal;isSubmitting=this.#e.isSubmitting;extendedData=this.#e.extendedDataType;remoteCustomTargetUrl=u(null);backupId=N(()=>this.#e.backup()?.Backup?.ID??null);extendedDataType=N(()=>{let t=this.#e.extendedDataType();return t==="o365"?"o365":t==="gsuite"?"gsuite":null});remoteCustomSourceEntry=N(()=>this.#e.backup()?.Backup?.Sources?.filter(t=>t.startsWith("@")&&(t.includes("|office365://")||t.includes("|googleworkspace://")))[0]??null);remoteCustomSourceUrl=N(()=>this.remoteCustomSourceEntry()?.split("|")[1]??null);remoteCustomSourcePrefix=N(()=>this.remoteCustomSourceEntry()?.split("|")[0]??null);customDestinationUrl=N(()=>{let t=this.optionsFormSignal()?.restoreFrom,e=this.extendedDataType()!==null;return t==="same-custom"&&e?this.remoteCustomSourceUrl():t==="other-custom"&&e?this.remoteCustomTargetUrl():null});showCustomRemoteRestoreTree=N(()=>!!(this.optionsFormSignal()?.restoreFrom==="same-custom"&&this.customDestinationUrl()&&this.backupId()||this.optionsFormSignal()?.restoreFrom==="other-custom"&&this.customDestinationUrl()));isCustomRemoteRestore=N(()=>{let t=this.optionsFormSignal()?.restoreFrom;return t==="same-custom"||t==="other-custom"});chooseCustomRemoteDestination(){let t=this.extendedDataType()==="o365"?"office365://":"googleworkspace://";return this.#o.open(et,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:!1,data:{targetUrlModel:this.remoteCustomTargetUrl()||this.remoteCustomSourceUrl()||t,moduleType:"RestoreDestinationProvider",askToCreate:!0,expectedResult:"any",suppressErrorDialogs:!0,backupId:this.backupId(),sourcePrefix:this.remoteCustomSourcePrefix()}}).closed.subscribe(o=>{o&&(this.remoteCustomTargetUrl.set(o),this.optionsForm.controls.restoreFrom.setValue("other-custom"))}),!1}#s=k(()=>{let t=this.optionsFormSignal()?.restoreFrom;this.extendedDataType()!=null&&(t==="original"||t===void 0)&&(this.optionsForm.controls.restoreFrom.setValue("pickLocation"),this.optionsForm.controls.handleExisting.setValue("overwrite")),this.extendedDataType()==null&&(t==="same-custom"||t==="other-custom")&&(this.optionsForm.controls.restoreFrom.setValue("original"),this.optionsForm.controls.handleExisting.setValue("saveTimestamp"))});goBack(){this.#t.navigate(["select-files"],{relativeTo:this.#n.parent})}submit(){let t=this.#e.selectFilesFormSignal()?.filesToRestore??[];if(t.length>0&&this.optionsFormSignal()?.restoreFrom=="original"&&(t[0].includes("/")?"/":"\\")!==this.#i.systemInfo()?.DirectorySeparator){this.#o.open(y,{data:{title:$localize`Confirm target folder`,message:$localize`This backup was created on another operating system. Restoring files without specifying a destination folder can cause files to be restored in unexpected places. Are you sure you want to continue without choosing a destination folder?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:i=>{i&&this.#e.submit()}});return}if(this.optionsFormSignal()?.restoreFrom==="same-custom"||this.optionsFormSignal()?.restoreFrom==="other-custom"){let o=this.optionsFormSignal()?.restoreFromPath;if(o&&o.startsWith("/")&&(o=o.substring(1)),!o||o.trim()===""){this.#o.open(y,{data:{title:$localize`No path specified`,message:this.extendedDataType()==="gsuite"?$localize`Please choose a path to restore to in the Google Workspace account.`:$localize`Please choose a path to restore to in the Office 365 tenant.`,confirmText:$localize`OK`,cancelText:void 0}});return}let i=this.optionsFormSignal()?.customRemoteIgnoreExisting,n=this.customDestinationUrl()?.substring(this.customDestinationUrl().indexOf("?")),l=this.extendedDataType()==="gsuite"?`@googleworkspace://${encodeURIComponent(o)}${n}&google-ignore-existing=${i?"true":"false"}`:`@office365://${encodeURIComponent(o)}${n}&office365-ignore-existing=${i?"true":"false"}`;this.#e.setAlternateRestorePath(l,this.remoteCustomSourcePrefix()),this.optionsForm.controls.includeMetadata.setValue(!0),this.optionsForm.controls.permissions.setValue(!0)}else this.#e.setAlternateRestorePath(null,null);this.#e.submit()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=w({type:s,selectors:[["app-advanced-options-settings"]],decls:18,vars:6,consts:()=>{let t;t=$localize`Restore options`;let e;e=$localize`Where do you want to restore files to?`;let o;o=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let i;i=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `;let n;n=$localize` Local file system ${"\uFFFD#4\uFFFD\uFFFD/#4\uFFFD"}:TAG_INPUT:`;let l;l=$localize` Same Office 365 Tenant ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let _;_=$localize` Different Office 365 Tenant ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let P;P=$localize` Same Google Workspace Account ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let b;b=$localize` Different Google Workspace Account ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let Z;Z=$localize` Original location ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let Te;Te=$localize` Pick location ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let Fe;Fe=$localize`Restore settings`;let Se;Se=$localize` Ignore existing resources in the destination ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let ge;ge=$localize`How do you want to handle existing files?`;let Ee;Ee=$localize` Overwrite ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let Ce;Ce=$localize` Save different versions with timestamp in file name ${"\uFFFD#8\uFFFD\uFFFD/#8\uFFFD"}:TAG_INPUT:`;let Oe;Oe=$localize`Metadata settings`;let Ne;Ne=$localize` Restore file metadata ${"\uFFFD#14\uFFFD\uFFFD/#14\uFFFD"}:TAG_INPUT:`;let fe;return fe=$localize` Restore read/write permissions ${"\uFFFD#17\uFFFD\uFFFD/#17\uFFFD"}:TAG_INPUT:`,[["formRef",""],t,e,o,i,n,l,_,P,b,Z,Te,Fe,Se,ge,Ee,Ce,Oe,Ne,fe,[3,"submit","formGroup"],[1,"title-30"],[3,"disableToggle"],["title",""],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],[1,"raised","primary"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled","enableCreateFolder"],[3,"customRemoteMode","backupId","sourcePrefix","destinationUrl"],["type","radio","name","restoreFrom","value","same-custom","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","other-custom","formControlName","restoreFrom",3,"click"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","restoreFrom","value","original","formControlName","restoreFrom"],["type","checkbox","formControlName","customRemoteIgnoreExisting"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","includeMetadata"],["type","checkbox","formControlName","permissions"]]},template:function(e,o){if(e&1){let i=M();r(0,"form",20,0),f("submit",function(){return R(i),h(o.submit())}),r(2,"h3",21),C(3,1),a(),r(4,"app-toggle-card",22),A(5,23),C(6,2),v(),g(7,Nt,7,3)(8,ft,10,2),a(),g(9,Rt,6,1,"app-toggle-card",22)(10,ht,18,1),r(11,"div",24)(12,"button",25),f("click",function(){return R(i),h(o.goBack())}),m(13,3),c(14,"sh-icon"),T(),a(),r(15,"button",26),m(16,4),c(17,"sh-icon"),T(),a()()()}e&2&&(S("formGroup",o.optionsForm),d(4),S("disableToggle",!0),d(3),E(o.extendedDataType()!==null?7:8),d(2),E(o.isCustomRemoteRestore()?9:10),d(6),Ae("loading",o.isSubmitting()))},dependencies:[Y,z,W,Be,ze,B,V,X,J,Ze,re,qe,Ye,j,H],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{at as a,me as b,st as c,ue as d,rt as e,de as f,$ as g};
@@ -1 +1 @@
1
- import{a as p}from"./chunk-7LTHH6OG.js";import{a as h}from"./chunk-HSHF5HR7.js";import{a as d}from"./chunk-D6IP567E.js";import{a as f}from"./chunk-HUZXJWCG.js";import{z as u}from"./chunk-UNMDSCAN.js";import{c as m}from"./chunk-CFNARBNK.js";import{Mc as g,R as a,W as s,la as o,na as c}from"./chunk-26Z7TPJB.js";var R=class n{#s=s(p);#o=s(u);#e=s(m);#r=s(f);#n=s(d);repeatRegisterTimer=null;state=o("unknown");claimUrl=o(null);registerUrl=o("");customRegisterUrl=o("");status=g(()=>{let e=this.state();return e==="connecting"?$localize`Console connection is enabled but not connected`:e==="connected"?$localize`Connected to console`:e==="registering"?$localize`Registering machine...`:e==="registeringfaulted"?$localize`Registration failed`:e==="registered"?$localize`Registered, waiting for accept`:e==="disabled"?$localize`Console connection is configured but not enabled`:e==="unknown"?$localize`...loading...`:$localize`Console connection is not set up`});sysInfoEffect=c(()=>{let e=this.#r.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"")});#t(e){e.RegistrationUrl&&this.claimUrl.set(e.RegistrationUrl),e.IsConnected?this.state.set("connected"):e.IsEnabled?this.state.set("connecting"):e.CanEnable?this.state.set("disabled"):e.IsRegisteringFaulted?this.state.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");let i=this.state();this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),i==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.postApiV1RemotecontrolRegisterWait().subscribe({next:t=>this.#t(t),error:t=>this.#i(t)})},5e3)),(i==="connecting"||i==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#t(t),error:t=>this.#i(t)})},5e3)),e.IsRegistering&&e.CanEnable&&this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:t=>this.#t(t)})}#i(e){this.#e.getApiV1RemotecontrolStatus().subscribe({next:i=>{this.#t(i)}})}refreshRemoteControlStatus(){this.#e.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}beginRemoteRegistration(e=!1){this.state.set("registering"),this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:e?this.customRegisterUrl():this.registerUrl()}}).subscribe({next:i=>this.#t(i),error:i=>this.#i(i)})}cancelRemoteRegistration(){this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}enableRemoteControl(){this.#e.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}disableRemoteControl(){this.#e.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}deleteRemoteControl(){let e=this;this.#o.open(h,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete the console registration?`,confirmText:$localize`Delete registration`,cancelText:$localize`Cancel`},closed:i=>{i&&e.#e.deleteApiV1RemotecontrolRegistration().subscribe({next:t=>e.#t(t),error:t=>e.#i(t)})}})}openConsole(e="/app/machines",i){let t=this.#n.serverSettings(),b=this.#r.systemInfo(),r="https://app.duplicati.com",l=b?.RemoteControlDashboardUrl??"";if(l.length>0&&(r=l),t&&t["remote-control-dashboard-url"]&&(r=t["remote-control-dashboard-url"]),r=new URL(r).origin+e,i){let S=new URLSearchParams(i);r+=`?${S.toString()}`}this.#s.open(r,"_blank")}static \u0275fac=function(i){return new(i||n)};static \u0275prov=a({token:n,factory:n.\u0275fac,providedIn:"root"})};export{R as a};
1
+ import{a as p}from"./chunk-OAAXQ2BE.js";import{a as h}from"./chunk-7E5J43IH.js";import{a as d}from"./chunk-3MS6SVET.js";import{a as f}from"./chunk-NGKFJLI2.js";import{z as u}from"./chunk-Y46QCSB5.js";import{d as m}from"./chunk-JJY6UOEY.js";import{Pc as g,U as a,Z as s,oa as o,qa as c}from"./chunk-QY4Y5NJB.js";var R=class n{#s=s(p);#o=s(u);#e=s(m);#r=s(f);#n=s(d);repeatRegisterTimer=null;state=o("unknown");claimUrl=o(null);registerUrl=o("");customRegisterUrl=o("");status=g(()=>{let e=this.state();return e==="connecting"?$localize`Console connection is enabled but not connected`:e==="connected"?$localize`Connected to console`:e==="registering"?$localize`Registering machine...`:e==="registeringfaulted"?$localize`Registration failed`:e==="registered"?$localize`Registered, waiting for accept`:e==="disabled"?$localize`Console connection is configured but not enabled`:e==="unknown"?$localize`...loading...`:$localize`Console connection is not set up`});sysInfoEffect=c(()=>{let e=this.#r.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"")});#t(e){e.RegistrationUrl&&this.claimUrl.set(e.RegistrationUrl),e.IsConnected?this.state.set("connected"):e.IsEnabled?this.state.set("connecting"):e.CanEnable?this.state.set("disabled"):e.IsRegisteringFaulted?this.state.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");let i=this.state();this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),i==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.postApiV1RemotecontrolRegisterWait().subscribe({next:t=>this.#t(t),error:t=>this.#i(t)})},5e3)),(i==="connecting"||i==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#t(t),error:t=>this.#i(t)})},5e3)),e.IsRegistering&&e.CanEnable&&this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:t=>this.#t(t)})}#i(e){this.#e.getApiV1RemotecontrolStatus().subscribe({next:i=>{this.#t(i)}})}refreshRemoteControlStatus(){this.#e.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}beginRemoteRegistration(e=!1){this.state.set("registering"),this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:e?this.customRegisterUrl():this.registerUrl()}}).subscribe({next:i=>this.#t(i),error:i=>this.#i(i)})}cancelRemoteRegistration(){this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}enableRemoteControl(){this.#e.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}disableRemoteControl(){this.#e.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}deleteRemoteControl(){let e=this;this.#o.open(h,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete the console registration?`,confirmText:$localize`Delete registration`,cancelText:$localize`Cancel`},closed:i=>{i&&e.#e.deleteApiV1RemotecontrolRegistration().subscribe({next:t=>e.#t(t),error:t=>e.#i(t)})}})}openConsole(e="/app/machines",i){let t=this.#n.serverSettings(),b=this.#r.systemInfo(),r="https://app.duplicati.com",l=b?.RemoteControlDashboardUrl??"";if(l.length>0&&(r=l),t&&t["remote-control-dashboard-url"]&&(r=t["remote-control-dashboard-url"]),r=new URL(r).origin+e,i){let S=new URLSearchParams(i);r+=`?${S.toString()}`}this.#s.open(r,"_blank")}static \u0275fac=function(i){return new(i||n)};static \u0275prov=a({token:n,factory:n.\u0275fac,providedIn:"root"})};export{R as a};
@@ -1 +1 @@
1
- import{U as o}from"./chunk-26Z7TPJB.js";var d=new o("WindowToken",{providedIn:"root",factory:()=>typeof window<"u"?window:{}});export{d as a};
1
+ import{X as o}from"./chunk-QY4Y5NJB.js";var d=new o("WindowToken",{providedIn:"root",factory:()=>typeof window<"u"?window:{}});export{d as a};
@@ -1 +1 @@
1
- import{e as M}from"./chunk-7TWUW4XJ.js";import{B as P}from"./chunk-UNMDSCAN.js";import"./chunk-CFNARBNK.js";import{e as E}from"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{Ab as a,Cb as r,Db as l,Eb as c,Pa as C,Rb as d,W as u,Yb as h,Zb as m,cb as g,jc as T,sb as f,tb as O,zb as i}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";var L=["*",[["","footer",""]]],v=["*","[footer]"],s=class t{static \u0275fac=function(e){return new(e||t)};static \u0275cmp=g({type:t,selectors:[["app-custom-card"]],ngContentSelectors:v,decls:11,vars:0,consts:[[1,"card"],["src","/assets/noise/auth-noise.svg",1,"noise"],[1,"header-title"],["src","/assets/duplicati/duplicati.svg","alt",""],[1,"bg"]],template:function(e,o){e&1&&(h(L),r(0,"div",0),c(1,"img",1),r(2,"header")(3,"div",2),c(4,"img",3),T(5," Duplicati "),l()(),r(6,"main"),m(7),r(8,"footer"),m(9,1),l()()(),c(10,"div",4))},styles:['[_nghost-%COMP%]{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center;background-color:var(--base-2)}body.dark [_nghost-%COMP%] .card[_ngcontent-%COMP%]:before{background:radial-gradient(rgba(var(--primary-rgb-900),1),#0000 60%)}.card[_ngcontent-%COMP%]{max-width:30rem;width:100%;position:relative;z-index:100;background-color:var(--base-1);border-radius:var(--shape-5);box-shadow:var(--box-shadow-40);border:1px solid var(--base-3);overflow:hidden}.card[_ngcontent-%COMP%]:before{content:"";position:absolute;height:30rem;transform:translateY(-17.8125rem);left:0;right:0;z-index:-2;background:radial-gradient(rgb(from var(--primary-1) r g b/1),#0000 60%)}.card[_ngcontent-%COMP%] img.noise[_ngcontent-%COMP%]{position:absolute;height:30rem;width:100%;transform:translateY(-17.8125rem);left:0;right:0;z-index:-1;-webkit-mask-image:radial-gradient(#000,#0000 60%);mask-image:radial-gradient(#000,#0000 60%)}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 0;gap:.75rem;position:relative;z-index:10}.header-title[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;gap:.625rem}.header-title[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1.75rem;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3))}main[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:2rem;gap:2.5rem;position:relative;z-index:10}main[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{font:var(--paragraph-40);color:var(--base-9);text-align:center;text-wrap:balance}.bg[_ngcontent-%COMP%]{position:fixed;inset:0;width:100vw;height:100vh;background-image:url(/assets/backgrounds/base-bg.svg);background-size:cover;background-position:center;background-repeat:no-repeat}body.dark[_ngcontent-%COMP%] .bg[_ngcontent-%COMP%]{opacity:1}footer[_ngcontent-%COMP%]:empty{display:none}'],changeDetection:0})};function N(t,n){t&1&&(i(0,"h3"),d(1,0),a())}function y(t,n){t&1&&(i(0,"h3"),d(1,1),a(),i(2,"button",3),d(3,2),a())}var p=class t{#e=u(M);isLoggingOut=this.#e.isLoggingOut;ngOnInit(){this.#e.logout()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=g({type:t,selectors:[["app-logout"]],decls:3,vars:1,consts:()=>{let n;n=$localize`Logging out...`;let e;e=$localize`You have successfully logged out your being redirected to login page.`;let o;return o=$localize`Go to login page`,[n,e,o,["shButton","","routerLink","/",1,"raised","primary"]]},template:function(e,o){e&1&&(i(0,"app-custom-card"),f(1,N,2,0,"h3")(2,y,4,0),a()),e&2&&(C(),O(o.isLoggingOut()?1:2))},dependencies:[s,P,E],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{p as default};
1
+ import{e as M}from"./chunk-KUX6NGQU.js";import{B as P}from"./chunk-Y46QCSB5.js";import"./chunk-JJY6UOEY.js";import{e as E}from"./chunk-2K74TI2N.js";import"./chunk-G3FMV74P.js";import"./chunk-LU7RSOI6.js";import"./chunk-VLMNSWR3.js";import"./chunk-VKNFRCHQ.js";import{$b as h,Cb as i,Db as a,Fb as r,Gb as l,Hb as c,Sa as C,Ub as d,Z as u,ac as m,fb as g,mc as T,vb as f,wb as O}from"./chunk-QY4Y5NJB.js";import"./chunk-7CGTOI24.js";var L=["*",[["","footer",""]]],v=["*","[footer]"],s=class t{static \u0275fac=function(e){return new(e||t)};static \u0275cmp=g({type:t,selectors:[["app-custom-card"]],ngContentSelectors:v,decls:11,vars:0,consts:[[1,"card"],["src","/assets/noise/auth-noise.svg",1,"noise"],[1,"header-title"],["src","/assets/duplicati/duplicati.svg","alt",""],[1,"bg"]],template:function(e,o){e&1&&(h(L),r(0,"div",0),c(1,"img",1),r(2,"header")(3,"div",2),c(4,"img",3),T(5," Duplicati "),l()(),r(6,"main"),m(7),r(8,"footer"),m(9,1),l()()(),c(10,"div",4))},styles:['[_nghost-%COMP%]{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center;background-color:var(--base-2)}body.dark [_nghost-%COMP%] .card[_ngcontent-%COMP%]:before{background:radial-gradient(rgba(var(--primary-rgb-900),1),#0000 60%)}.card[_ngcontent-%COMP%]{max-width:30rem;width:100%;position:relative;z-index:100;background-color:var(--base-1);border-radius:var(--shape-5);box-shadow:var(--box-shadow-40);border:1px solid var(--base-3);overflow:hidden}.card[_ngcontent-%COMP%]:before{content:"";position:absolute;height:30rem;transform:translateY(-17.8125rem);left:0;right:0;z-index:-2;background:radial-gradient(rgb(from var(--primary-1) r g b/1),#0000 60%)}.card[_ngcontent-%COMP%] img.noise[_ngcontent-%COMP%]{position:absolute;height:30rem;width:100%;transform:translateY(-17.8125rem);left:0;right:0;z-index:-1;-webkit-mask-image:radial-gradient(#000,#0000 60%);mask-image:radial-gradient(#000,#0000 60%)}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 0;gap:.75rem;position:relative;z-index:10}.header-title[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;gap:.625rem}.header-title[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1.75rem;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3))}main[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:2rem;gap:2.5rem;position:relative;z-index:10}main[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{font:var(--paragraph-40);color:var(--base-9);text-align:center;text-wrap:balance}.bg[_ngcontent-%COMP%]{position:fixed;inset:0;width:100vw;height:100vh;background-image:url(/assets/backgrounds/base-bg.svg);background-size:cover;background-position:center;background-repeat:no-repeat}body.dark[_ngcontent-%COMP%] .bg[_ngcontent-%COMP%]{opacity:1}footer[_ngcontent-%COMP%]:empty{display:none}'],changeDetection:0})};function N(t,n){t&1&&(i(0,"h3"),d(1,0),a())}function y(t,n){t&1&&(i(0,"h3"),d(1,1),a(),i(2,"button",3),d(3,2),a())}var p=class t{#e=u(M);isLoggingOut=this.#e.isLoggingOut;ngOnInit(){this.#e.logout()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=g({type:t,selectors:[["app-logout"]],decls:3,vars:1,consts:()=>{let n;n=$localize`Logging out...`;let e;e=$localize`You have successfully logged out your being redirected to login page.`;let o;return o=$localize`Go to login page`,[n,e,o,["shButton","","routerLink","/",1,"raised","primary"]]},template:function(e,o){e&1&&(i(0,"app-custom-card"),f(1,N,2,0,"h3")(2,y,4,0),a()),e&2&&(C(),O(o.isLoggingOut()?1:2))},dependencies:[s,P,E],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{p as default};