@duplicati/ngclient 0.0.137 → 0.0.138

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 (86) hide show
  1. package/assets/spk.woff2 +0 -0
  2. package/chunk-23ODVSFI.js +1 -0
  3. package/chunk-2D26BDYB.js +1 -0
  4. package/chunk-3ZVSHKLD.js +1 -0
  5. package/chunk-4DBVVUBO.js +1 -0
  6. package/chunk-5SXTGTAZ.js +1 -0
  7. package/chunk-64ZU74CD.js +1 -0
  8. package/chunk-6DSLFJ4T.js +1 -0
  9. package/chunk-74BJ4GVA.js +1 -0
  10. package/chunk-7IBACL6K.js +1 -0
  11. package/chunk-7QJG4IIT.js +1 -0
  12. package/{chunk-Y73FO7VJ.js → chunk-BQE7QZIT.js} +1 -1
  13. package/chunk-CCA5ZCEA.js +1 -0
  14. package/chunk-CF7KRXOR.js +1 -0
  15. package/chunk-DG7SFNGT.js +1 -0
  16. package/chunk-EMXIHCYQ.js +1 -0
  17. package/chunk-EN6226UP.js +1 -0
  18. package/chunk-GJXR776M.js +1 -0
  19. package/{chunk-SYUL4YZN.js → chunk-GKOS3VYR.js} +1 -1
  20. package/chunk-H52UO57S.js +8 -0
  21. package/chunk-HDDYOVZL.js +1 -0
  22. package/chunk-HRSZZWTB.js +1 -0
  23. package/chunk-IZXB2EWT.js +1 -0
  24. package/{chunk-JM7VAPIC.js → chunk-J6BHRR34.js} +1 -1
  25. package/chunk-JI7GCFQB.js +1 -0
  26. package/chunk-KSQIUDEA.js +1 -0
  27. package/chunk-LPFSQKIK.js +1 -0
  28. package/{chunk-7GUJ7DYP.js → chunk-M3CLGZMQ.js} +1 -1
  29. package/{chunk-7MV7VPDB.js → chunk-MMPTX6PS.js} +1 -1
  30. package/chunk-N57J64DN.js +3 -0
  31. package/chunk-NHAGSIVX.js +1 -0
  32. package/chunk-NZ2KKCDC.js +1 -0
  33. package/{chunk-5LGMQ3QI.js → chunk-OFFMLGEZ.js} +1 -1
  34. package/chunk-PZA4FRVJ.js +1 -0
  35. package/chunk-PZCO6IX3.js +1 -0
  36. package/{chunk-QD2GV7XN.js → chunk-QRRKPBY6.js} +1 -1
  37. package/chunk-RCKA5DTC.js +1 -0
  38. package/chunk-RNMBKZ6Y.js +3 -0
  39. package/chunk-ULLALJQ2.js +1 -0
  40. package/{chunk-ETPRQPCV.js → chunk-UT7GWYPR.js} +1 -1
  41. package/chunk-V6EWWEIG.js +1 -0
  42. package/chunk-V77N2OUE.js +1 -0
  43. package/chunk-WHFO4IFB.js +1 -0
  44. package/chunk-WZNH4JPF.js +1 -0
  45. package/chunk-WZRDKVOR.js +1 -0
  46. package/{chunk-EL7ZWMW3.js → chunk-XIOHRQ3X.js} +1 -1
  47. package/{chunk-WF6EAWTW.js → chunk-ZI2XNFAW.js} +1 -1
  48. package/index.html +1 -1
  49. package/main-4FANBYAP.js +1 -0
  50. package/package.json +1 -1
  51. package/chunk-2YMUOQLP.js +0 -1
  52. package/chunk-3B3CD5KI.js +0 -1
  53. package/chunk-42LUYQ5S.js +0 -1
  54. package/chunk-4AWC7A44.js +0 -1
  55. package/chunk-7E4SLHH6.js +0 -1
  56. package/chunk-A4BYE2OQ.js +0 -1
  57. package/chunk-BEUZGUTP.js +0 -1
  58. package/chunk-BUHA4W4I.js +0 -1
  59. package/chunk-DDOT2PJU.js +0 -3
  60. package/chunk-FY7P6D7L.js +0 -1
  61. package/chunk-FZG6OXT3.js +0 -1
  62. package/chunk-GHXNDRQC.js +0 -1
  63. package/chunk-HN6NEFVX.js +0 -1
  64. package/chunk-HYVO7UIG.js +0 -1
  65. package/chunk-JHBG6CNS.js +0 -1
  66. package/chunk-KTU3Q35O.js +0 -1
  67. package/chunk-KZQCOYF7.js +0 -1
  68. package/chunk-L5Y36SCW.js +0 -1
  69. package/chunk-MFURKVTP.js +0 -1
  70. package/chunk-NMNBM72U.js +0 -1
  71. package/chunk-OZLEURDK.js +0 -6
  72. package/chunk-P4KFR7NY.js +0 -1
  73. package/chunk-P4KOC4NP.js +0 -1
  74. package/chunk-QR64BSPX.js +0 -1
  75. package/chunk-RIVEONGL.js +0 -1
  76. package/chunk-RVPCSXUI.js +0 -1
  77. package/chunk-SMQWGV7N.js +0 -1
  78. package/chunk-UM3LTU7N.js +0 -1
  79. package/chunk-VKUSJRIK.js +0 -1
  80. package/chunk-XIIFTZ5G.js +0 -1
  81. package/chunk-XPQBJ7EY.js +0 -1
  82. package/chunk-YONVHISY.js +0 -1
  83. package/chunk-YR3TOOC3.js +0 -1
  84. package/chunk-YSJGV5SH.js +0 -1
  85. package/chunk-ZZNFOL3R.js +0 -1
  86. package/main-J4GINH4P.js +0 -1
package/main-J4GINH4P.js DELETED
@@ -1 +0,0 @@
1
- import{b as be,c as Ce}from"./chunk-V5YSQG4X.js";import{a as he}from"./chunk-QD2GV7XN.js";import{a as I}from"./chunk-MFURKVTP.js";import"./chunk-KZQCOYF7.js";import"./chunk-JM7VAPIC.js";import"./chunk-2BX65XJQ.js";import{a as P}from"./chunk-RHW5QVAY.js";import{a as L}from"./chunk-6JQM2X3B.js";import{a as de}from"./chunk-WXARH2SG.js";import{a as b,b as C,c as ue,d as E}from"./chunk-FZG6OXT3.js";import{c as ie,d as ae,g as pe,h as ce}from"./chunk-2W6BEUGU.js";import{a as ee}from"./chunk-JFOXV66M.js";import{c as le}from"./chunk-Y5IRBMLB.js";import{a as te,b as oe,d as ne,e as re,f as se,i as me}from"./chunk-DNJOKPEL.js";import{a as ge}from"./chunk-UZK7ABRM.js";import{la as Y,qa as Z}from"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import{a as ye}from"./chunk-AM7RYTIO.js";import{b as fe}from"./chunk-B6OIHB5W.js";import{A as x,Ab as z,B as G,Cc as q,Dc as X,H as w,Ic as Q,N as J,P as R,R as B,U as k,X as $,Z as s,ab as _,f as j,ha as K,i as D,n as F,na as d,o as U,r as S}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var M=class e{#o=s(b);#s=s(C);ngOnInit(){this.#s.fetchConfig(),this.#o.clearAllNotCurrentVersion()}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=_({type:e,selectors:[["app-root"]],decls:1,vars:0,template:function(o,n){o&1&&z(0,"router-outlet")},dependencies:[ie],encapsulation:2})};var Se={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var h=new $("ENVIRONMENT");var A=class e{#o=s(me);isLoaded=d(!1);webmodules=d(null);preload(t=!1){let o=this.#o.getApiV1Webmodules().pipe(B(n=>this.webmodules.set(n)),w(()=>this.isLoaded.set(!0)));if(t)return o;o.subscribe()}static \u0275fac=function(o){return new(o||e)};static \u0275prov=k({token:e,factory:e.\u0275fac,providedIn:"root"})};var Me=()=>{let e=s(E);return e.token()?!0:e.checkProxyAuthed().pipe(R(t=>t?F(!0):e.refreshToken().pipe(S(()=>!0))))},Ae=()=>{let e=s(C),t=s(I),o=s(K),n=e.relayIsEnabled()?"longpoll":"websocket",i=[o.get(L).preload(!0),o.get(L).preloadFilterGroups(!0),o.get(A).preload(!0)];return e.configLoaded===null?x(i).pipe(S(()=>n)):e.configLoaded?.pipe(R(()=>x(i)))},Re=[{path:"",children:[{path:"login",canActivate:[],loadComponent:()=>import("./chunk-42LUYQ5S.js")},{path:"logout",loadComponent:()=>import("./chunk-WF6EAWTW.js")},{path:"",canActivate:[Me],children:[{path:"",canActivate:[Ae],loadComponent:()=>import("./chunk-RVPCSXUI.js"),children:[{path:"",loadComponent:()=>import("./chunk-KTU3Q35O.js")},{path:"add-backup",loadComponent:()=>import("./chunk-4AWC7A44.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-YR3TOOC3.js")},{path:"backup/import",loadComponent:()=>import("./chunk-BEUZGUTP.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-BUHA4W4I.js"),loadChildren:()=>import("./chunk-ZZNFOL3R.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-BUHA4W4I.js"),loadChildren:()=>import("./chunk-ZZNFOL3R.js")},{path:"backup/:id/log",loadComponent:()=>import("./chunk-XPQBJ7EY.js")},{path:"backup/:id/database",loadComponent:()=>import("./chunk-JHBG6CNS.js")},{path:"backup/:id/commandline",loadComponent:()=>import("./chunk-DDOT2PJU.js")},{path:"backup/:id/commandline/:runId",loadComponent:()=>import("./chunk-HN6NEFVX.js")},{path:"backup/:id/delete",loadComponent:()=>import("./chunk-YONVHISY.js")},{path:"restore",children:[{path:"",loadComponent:()=>import("./chunk-YSJGV5SH.js")},{path:"from-config",loadComponent:()=>import("./chunk-QBJGIKPM.js")}]},{path:"restore-from-files",loadComponent:()=>import("./chunk-A4BYE2OQ.js"),loadChildren:()=>import("./chunk-QR64BSPX.js")},{path:"restore-draft/:id",loadComponent:()=>import("./chunk-A4BYE2OQ.js"),loadChildren:()=>import("./chunk-QR64BSPX.js")},{path:"restore/:id",loadComponent:()=>import("./chunk-A4BYE2OQ.js"),loadChildren:()=>import("./chunk-QR64BSPX.js")},{path:"settings",loadComponent:()=>import("./chunk-RIVEONGL.js")},{path:"about",loadComponent:()=>import("./chunk-HYVO7UIG.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-7MV7VPDB.js")},{path:"changelog",loadComponent:()=>import("./chunk-DBD6FOQL.js")},{path:"libraries",loadComponent:()=>import("./chunk-XBJRRUMO.js")},{path:"system-info",loadComponent:()=>import("./chunk-QVEGV6V6.js")},{path:"server-settings",loadComponent:()=>import("./chunk-EKP3ML6M.js")},{path:"logs",loadChildren:()=>import("./chunk-LDIHJZUP.js")},{path:"crashlogs",loadComponent:()=>import("./chunk-WRWIBPXL.js")}]}]}]}]}];var V=null,Te=(e,t)=>{let o=s(E),n=s(ae),i=s(b),l=s(h),r=i.getItem("locale"),u=s(le),a=be(r),p=e.url==="/api/v1/auth/login",m=e.url==="/api/v1/auth/refresh",v=e.url==="/api/v1/progressstate",g=e.url==="/api/v1/remoteoperation/test",y=e.url==="/api/v1/filesystem/validate",T=e.url.startsWith("/api/v2/"),N=o.token(),H=e,W=e.headers.has("custom-proxy-check")||N===ue;if(N&&e.url.startsWith(l.baseUrl)&&!W){let c=e.headers.set("Authorization",`Bearer ${N}`);r&&r!=="en-US"&&(c=c.set("X-Ui-Language",a)),H=e.clone({headers:c})}return t(H).pipe(S(c=>{if(c.type===4&&c.status===200&&T){let f=c.body;if(f?.Success===!1)throw{status:200,message:f?.Error??"Unknown error",error:{Error:f?.Error??"Unknown error"},body:f}}return c}),G(c=>{let f=c.error?.Error||`Error Code: ${c.status}, Message: ${c.message}`;return!W&&(v&&c.status===404||g||y||u.error(f),m&&c.status===401&&(o.logout(),n.navigate(["/logout"])),!p&&!m&&c.status===401)?(V??=o.refreshToken().pipe(J()),V.pipe(R(()=>t(e.clone({headers:e.headers.set("Authorization",`Bearer ${o.token()}`)}))),w(()=>V=null))):U(()=>({error:c,message:f}))}))};var Oe="1.0.0",we=`portal-proxy-client-${P()}`,Ne=1,O=class e{#o=1e3;#s=s(h);#t=d("disconnected");#l=d(this.#o);#i=d(!1);#n=d(!1);#a=d(null);isConnectedToMachineServer=this.#n.asReadonly();wsState=this.#t.asReadonly();#p=[];#r={};#e=null;#m=new TextDecoder("utf-8");#c=null;#d=Q(()=>{let t=this.#i(),o=this.#l(),n=this.#a();if(!n||!t||!o||o<this.#o){this.#c&&window.clearInterval(this.#c);return}this.#c=window.setInterval(()=>{this.connectToMachineServer(n)},o)});utf8Atob(t){let o=Uint8Array.from(atob(t),i=>i.charCodeAt(0)),n=this.#m.decode(o);return n?JSON.parse(n):null}connectToMachineServer(t,o){let n=o?.reconnect??!1,i=this.wsState();(i==="disconnected"||i==="error"||n)&&(this.#e?.close(),this.#e=null),!this.#e&&(this.#e=new WebSocket(this.#s.machineServerUrl),this.#t.set("connecting"),this.#e.onopen=()=>{this.#t.set("connect"),this.#n.set(!0),this.#i.set(!1),this.#a.set(null)},this.#e.onclose=()=>{this.#t.set("disconnected"),this.#n.set(!1),this.#a.set(t),this.#i.set(!0)},this.#e.onerror=()=>{this.#t.set("error")},this.#e.onmessage=l=>{let r=JSON.parse(l.data);if(this.wsState()==="connect"){if(r.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${r.type}'`);return}let a={token:t,publicKey:"",clientVersion:Oe,protocolVersion:Ne},p=this.createResponse(r,"authportal",a);this.#t.set("welcome"),this.#e?.send(p)}else if(this.wsState()==="welcome"){if(r.type!=="authportal"){this.disconnectFromMachineServer(`Unexpected message type, expected 'authportal' but got '${r.type}'`);return}var u=JSON.parse(r.payload??"");if(u.accepted===!1){this.disconnectFromMachineServer("Authentication failed");return}for(this.#t.set("authenticated"),this.#n.set(!0);this.#p.length>0;){let a=this.#p.pop();a&&this.#r[a.messageId]&&this.activateCommand(a)}}else if(this.wsState()==="authenticated"){if(r.type!=="command"){console.warn(`Unexpected message type, expected 'command' but got '${r.type}'`);return}let a=this.#r[r.messageId];if(a){if(r.errorMessage){a.reject(r.errorMessage);return}else{let p=JSON.parse(r.payload??"");p.body=p?.body==null?null:this.utf8Atob(p.body),a.resolve(p)}delete this.#r[r.messageId],window.clearTimeout(a.timer)}}})}disconnectFromMachineServer(t=null){t&&console.error(t),this.#e?.close(),this.#e=null,this.#t.set("disconnected"),this.#n.set(!1)}createResponse(t,o,n){let i={from:we,to:t.from,type:o,messageId:t.messageId,payload:JSON.stringify(n)};return JSON.stringify(i)}sendCommand(t,o,n,i,l,r,u=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(t),new Promise((a,p)=>{let m=P(),g={from:we,to:o,type:"command",messageId:m,payload:JSON.stringify({method:n,path:i,body:l,headers:r})},y={resolve:a,reject:p,timer:window.setTimeout(()=>{let T=this.#r[m];T&&(delete this.#r[m],T.reject("Timeout"))},u)};this.#r[m]=y,this.#n()?this.activateCommand(g):this.#p.push(g)})}activateCommand(t){this.#e?.send(JSON.stringify(t))}static \u0275fac=function(o){return new(o||e)};static \u0275prov=k({token:e,factory:e.\u0275fac,providedIn:"root"})};function xe(e){if(typeof e!="string")return null;let o=new TextEncoder().encode(e);return window.btoa(String.fromCharCode(...o))}function ke(e,t,o){let n=e.relayconfigState.config();if(n===null)return o(t);let i=xe(t.body),l={};t.headers.keys().forEach(p=>{l[p]=t.headers.get(p)??""});let r=t.headers.get("timeout"),u=r!==null?parseInt(r):e.defaultTimeout;t.url.startsWith("/api/v1/serverstate")&&t.url.includes("longpoll=true")&&(u=1e3*99);let a=e.relayWebsocket.sendCommand(n.accessToken,n.clientId,t.method,t.url,i,l,u);return new j(p=>{a.then(m=>{let v=new te;l!=null&&Object.keys(l).forEach(y=>{v.set(y,l[y])});let g=new oe({body:m.body,status:m.code,statusText:"OK",headers:v});p.next(g),p.complete()})})}var Ee=(e,t)=>{let o={relayconfigState:s(C),defaultTimeout:s(h).defaultTimeout,relayWebsocket:s(O)},n=o.relayconfigState.config();if(o.relayconfigState.configLoaded!==null&&n===null){let i=new D;return o.relayconfigState.configLoaded.subscribe(l=>{l&&ke(o,e,t).subscribe(i)}),i}return ke(o,e,t)};var Ie={providers:[q(),pe(Re,ce()),ne(se(),re([Ee,Te])),b,{provide:h,useValue:Se},{provide:X,useValue:Ce()},he,I,fe,Z,de,Y,ge,ye]};ee(M,Ie);