@duplicati/ngclient 0.0.96 → 0.0.97

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 (36) hide show
  1. package/chunk-2SYN2ATG.js +1 -0
  2. package/{chunk-UBZDIRFY.js → chunk-4SOUVJR6.js} +1 -1
  3. package/{chunk-T2KQRNAJ.js → chunk-7NEOVOUN.js} +1 -1
  4. package/{chunk-YPQUTPBQ.js → chunk-7XGYQRKR.js} +1 -1
  5. package/chunk-BYMCE7VW.js +1 -0
  6. package/{chunk-WVKWOGDQ.js → chunk-CPOAOTIS.js} +1 -1
  7. package/{chunk-WGIELPP6.js → chunk-FWWMGA32.js} +1 -1
  8. package/chunk-HE6PHO5B.js +1 -0
  9. package/{chunk-CNWIFYHZ.js → chunk-HLLAB5VQ.js} +1 -1
  10. package/chunk-HYBV36HG.js +1 -0
  11. package/{chunk-IZOZII2D.js → chunk-ILQK4A72.js} +1 -1
  12. package/{chunk-6EQS5NZL.js → chunk-INK3KQF2.js} +1 -1
  13. package/chunk-N7UCCMLS.js +1 -0
  14. package/{chunk-NB32XJ7B.js → chunk-NL7QPU6R.js} +1 -1
  15. package/{chunk-27RULQ7Y.js → chunk-OL4IJVKD.js} +1 -1
  16. package/{chunk-A6XFGG4U.js → chunk-Q6U2NFPI.js} +1 -1
  17. package/{chunk-76MUKWQP.js → chunk-RIGBDLYY.js} +1 -1
  18. package/{chunk-MURCWMUG.js → chunk-S5VSZG5H.js} +1 -1
  19. package/{chunk-VFJL5JPI.js → chunk-UMUPSIIL.js} +1 -1
  20. package/chunk-USGQSK2Z.js +1 -0
  21. package/{chunk-TNK2MVSP.js → chunk-VYKAGJXY.js} +1 -1
  22. package/{chunk-F5S33WHR.js → chunk-XBZX6CUW.js} +1 -1
  23. package/{chunk-YDN2L342.js → chunk-ZFE5M6M3.js} +1 -1
  24. package/{chunk-UT45C7WK.js → chunk-ZOUY24KQ.js} +1 -1
  25. package/{chunk-ZCB4RYTS.js → chunk-ZRXUUC26.js} +1 -1
  26. package/index.html +18 -2
  27. package/main-GMFQCDBZ.js +1 -0
  28. package/package.json +1 -1
  29. package/chunk-3XY4ZNIY.js +0 -1
  30. package/chunk-57MYGQMW.js +0 -1
  31. package/chunk-ASQFBDFK.js +0 -1
  32. package/chunk-FHW4WHNO.js +0 -1
  33. package/chunk-FJKXCOAH.js +0 -1
  34. package/chunk-LXEGFP53.js +0 -1
  35. package/chunk-RUWWC6BD.js +0 -1
  36. package/main-JSU2T7AW.js +0 -1
package/chunk-ASQFBDFK.js DELETED
@@ -1 +0,0 @@
1
- import{e as a,f as b}from"./chunk-ZCB4RYTS.js";import"./chunk-XC6KYSRC.js";import"./chunk-NV2YMSSM.js";import"./chunk-3YOT5OAB.js";import"./chunk-CMXSHXAU.js";import"./chunk-F5S33WHR.js";import"./chunk-HGERKLOF.js";import"./chunk-UT45C7WK.js";import"./chunk-QX5XWUM2.js";import"./chunk-LHSJLKCF.js";import"./chunk-FHW4WHNO.js";import"./chunk-WBNOGAKJ.js";import"./chunk-G3YJXHRY.js";import"./chunk-PUSUA4U7.js";import"./chunk-L3T52MCL.js";import"./chunk-4XPN5ZGE.js";import"./chunk-3GK4TNUH.js";import"./chunk-PTC4N7TU.js";import"./chunk-7CGTOI24.js";export{a as createRestoreSelectFilesForm,b as default};
package/chunk-FHW4WHNO.js DELETED
@@ -1 +0,0 @@
1
- import{c as I}from"./chunk-WBNOGAKJ.js";import{b as A}from"./chunk-L3T52MCL.js";import{a as y,c as k}from"./chunk-4XPN5ZGE.js";import{C as o,D as m,N as l,R as a,X as r,d as p,i as h,l as u,p as g,sa as i,y as d}from"./chunk-PTC4N7TU.js";var c=class s{#i=i(null);#n=window.self!==window.top;#e=i(this.#n);relayIsEnabled=this.#e.asReadonly();config=this.#i.asReadonly();configLoaded=this.#n?new h:null;isLoading=i(this.#n);parentIframeListner=null;parentOrigin="*";fetchConfig(){this.#t(),this.#n&&(this.#e.set(!0),this.parentIframeListner=new AbortController,this.#s("connected"),window.addEventListener("message",e=>{if(e.data.startsWith("access:")){let t=e.data.replace("access:",""),n=JSON.parse(t);if(!n?.accessToken||!n?.clientId){this.#s("error:invalid-config"),this.#e.set(!1);return}if(typeof n.clientId!="string"){this.#s("error:invalid-config"),this.#e.set(!1);return}if(typeof n.accessToken!="string"){this.#s("error:invalid-config"),this.#e.set(!1);return}console.info("postMessage config set"),this.#i.set(n),this.configLoaded?.next(!0),this.isLoading.set(!1),this.#s("handshake-complete")}},{signal:this.parentIframeListner.signal}))}#s(e){window.parent.postMessage(e,"*")}#t(){this.parentIframeListner&&(this.parentIframeListner.abort(),this.parentIframeListner=null)}setConfig(e){this.#i.set(e)}clearConfig(){this.#i.set(null)}static \u0275fac=function(t){return new(t||s)};static \u0275prov=a({token:s,factory:s.\u0275fac,providedIn:"root"})};var f="PROXY_AUTHED_FAKE_TOKEN",b=class s{#i=r(I);#n=r(k);#e=r(A);#s=r(c);#t=i(null);#r=i(!1);token=this.#t.asReadonly();isLoggingOut=this.#r.asReadonly();login(e){return this.#e.postApiV1AuthLogin({requestBody:{Password:e,RememberMe:!0}}).pipe(o(1),l(t=>t.AccessToken&&this.#t.set(t.AccessToken)))}refreshToken(){return this.#s.relayIsEnabled()?(this.#t.set(f),new p(e=>{e.next({AccessToken:f}),e.complete()})):this.#e.postApiV1AuthRefresh().pipe(o(1),l(e=>e.AccessToken&&this.#t.set(e.AccessToken)))}checkProxyAuthed(){let e=new y({"custom-proxy-check":"true"});return this.#n.get("/api/v1/systeminfo",{headers:e}).pipe(g(()=>(this.#t.set(f),!0)),d(()=>u(!1)))}logout(){this.#r.set(!0),this.#e.postApiV1AuthRefreshLogout().pipe(o(1),m(()=>{this.#r.set(!1),this.#t.set(null),this.#i.navigate(["/login"])})).subscribe()}static \u0275fac=function(t){return new(t||s)};static \u0275prov=a({token:s,factory:s.\u0275fac,providedIn:"root"})};export{c as a,f as b,b as c};
package/chunk-FJKXCOAH.js DELETED
@@ -1 +0,0 @@
1
- import{o as _e}from"./chunk-5COOM7FC.js";import"./chunk-XC6KYSRC.js";import"./chunk-DNHLTHLR.js";import{a as oe}from"./chunk-NV2YMSSM.js";import"./chunk-CR2UB7UZ.js";import"./chunk-3YOT5OAB.js";import{a as ce}from"./chunk-W5YK2JJZ.js";import{a as J}from"./chunk-CMXSHXAU.js";import{a as Ct}from"./chunk-T2KQRNAJ.js";import"./chunk-OS4AAJLB.js";import{a as it}from"./chunk-3XY4ZNIY.js";import{a as Et}from"./chunk-76MUKWQP.js";import"./chunk-F5S33WHR.js";import"./chunk-HGERKLOF.js";import"./chunk-UT45C7WK.js";import"./chunk-QX5XWUM2.js";import{b as Y,d as ee,e as dt,g as te,h as pt,k as St,m as gt,n as Tt,p as ut,q as mt,r as ne,s as ie}from"./chunk-LHSJLKCF.js";import"./chunk-FHW4WHNO.js";import"./chunk-WBNOGAKJ.js";import"./chunk-G3YJXHRY.js";import{a as j,b as K,g as Q,k as ot,l as Z,o as st,p as rt,q as at,r as lt,x as _t,y as ct}from"./chunk-PUSUA4U7.js";import{b as v}from"./chunk-L3T52MCL.js";import"./chunk-4XPN5ZGE.js";import"./chunk-3GK4TNUH.js";import"./chunk-CHZ7TMI7.js";import{Ab as i,Bb as o,Cb as P,D as R,Gb as O,Lc as b,Mb as U,Mc as w,Nb as B,Oa as je,Ob as a,Pb as ae,Qa as l,Qb as le,R as z,Rb as Je,Sb as S,Tb as p,Wb as Ye,X as T,Xa as Ke,c as qe,ca as u,cc as et,da as m,db as $,dc as tt,fc as I,gc as H,hc as W,ib as E,kc as y,l as L,lc as G,mc as A,ob as Qe,pb as Ze,qc as nt,rb as h,rc as q,sa as c,tb as f,wb as C,y as x}from"./chunk-PTC4N7TU.js";import"./chunk-7CGTOI24.js";var k=class s{#e=T(v);#i=oe(this.#e.getApiV1Serversettings());#t=c(void 0);serverSettings=b(()=>this.#t()||this.#i());refreshServerSettings(){this.#e.getApiV1Serversettings().subscribe({next:t=>{this.#t.set(t)}})}withRefresh(){return qe(R(()=>this.refreshServerSettings()))}static \u0275fac=function(e){return new(e||s)};static \u0275prov=z({token:s,factory:s.\u0275fac,providedIn:"root"})};var ht=["formRef"],Pt=()=>[import("./chunk-Q3FF4WG3.js").then(s=>s.OptionsListComponent)],Ot=()=>["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","no-encryption"];function Rt(s,t){s&1&&(i(0,"spk-alert",3),a(1,1),o())}function It(s,t){if(s&1){let e=O();i(0,"app-options-list",5),A("optionsChange",function(r){u(e);let d=p();return G(d.settings,r)||(d.settings=r),m(r)}),o()}if(s&2){let e=p();y("options",e.settings),h("hasFreeTextSettings",!0)("hiddenOptions",q(3,Ot))}}var yt=["Bytes","KB","MB","GB","TB","PB"],D=class s{#e=T(_e);#i=T(k);#t=T(v);formRef=Ke.required("formRef");optionsForm=this.#e.optionsForm;settings=this.#e.settings;isSubmitting=c(!1);isLoadingOptions=c(!0);saved=c(!1);sizeOptions=c(yt);lastRecievedServerSettings=c({});serverSettingsEffect=w(()=>{let t=this.#i.serverSettings();if(t===void 0)return;this.lastRecievedServerSettings.set(t),this.isLoadingOptions.set(!0);let e=Object.entries(t);e.forEach(([n,r],d)=>{if(n.startsWith("--")){let N=n.replace("--","");this.settings.update(g=>(g.some(M=>M.Name===N)||g.push({Name:N,Value:r}),g))}d===e.length-1&&this.isLoadingOptions.set(!1)})});submit(){this.isSubmitting.set(!0);let t=this.settings(),e=this.lastRecievedServerSettings(),n=t.map(g=>g.Name),d=Object.keys(e).filter(g=>!n.includes(g.replace("--",""))),N=t.reduce((g,M)=>(g[`--${M.Name}`]=M.Value,g),{});d.forEach(g=>{N[g]=null}),this.#t.patchApiV1Serversettings({requestBody:N}).pipe(R(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#i.refreshServerSettings(),this.saved.set(!0),setTimeout(()=>{this.saved.set(!1)},3e3)}})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=$({type:s,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,n){e&1&&et(n.formRef,ht,5),e&2&&tt()},features:[nt([_e])],decls:8,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON: Save settings `;let e;return e=$localize`Settings saved`,[t,e,[1,"actions"],[1,"success"],["spk-button","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings","hiddenOptions"]]},template:function(e,n){e&1&&(i(0,"div",2),E(1,Rt,2,0,"spk-alert",3),i(2,"button",4),S("click",function(){return n.submit()}),U(3,0),P(4,"spk-icon"),B(),o()(),E(5,It,1,4),Qe(6,5,Pt)),e&2&&(l(),C(n.saved()?1:-1),l(),f("loader",n.isSubmitting()),l(4),Ze(!n.isLoadingOptions()))},dependencies:[ie,Q,j,K],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40.625rem;justify-self:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end;margin-bottom:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 40px;align-items:flex-end}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var F=class s{#e=T(v);#i=T(J);repeatRegisterTimer=null;state=c("unknown");claimUrl=c(null);registerUrl=c("");status=b(()=>{let t=this.state();return t==="enabled"?"Remote control is enabled but not connected":t==="connected"?"Remote control is connected":t==="registering"?"Registering machine...":t==="registeringfaulted"?"Registration failed":t==="registered"?"Registered, waiting for accept":t==="disabled"?"Remote control is configured but not enabled":t==="unknown"?"...loading...":"Remote control is not set up"});sysInfoEffect=w(()=>{let t=this.#i.systemInfo();t&&this.registerUrl.set(t.RemoteControlRegistrationUrl??"")});#t(t){t.RegistrationUrl&&this.claimUrl.set(t.RegistrationUrl),t.IsConnected?this.state.set("connected"):t.IsEnabled?this.state.set("enabled"):t.CanEnable?this.state.set("disabled"):t.IsRegisteringFaulted?this.state.set("registeringfaulted"):t.IsRegistering?t.RegistrationUrl!=null&&t.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");let e=this.state();this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),e==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})},5e3)),(e==="enabled"||e==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.getApiV1RemotecontrolStatus().subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})},5e3)),t.IsRegistering&&t.CanEnable&&this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:n=>this.#t(n)})}#n(t){this.#e.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#t(e)})}refreshRemoteControlStatus(){this.#e.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#t(t),error:t=>this.#n(t)})}beginRemoteRegistration(){this.state.set("registering"),this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:this.registerUrl()}}).subscribe({next:t=>this.#t(t),error:t=>this.#n(t)})}cancelRemoteRegistration(){this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:t=>this.#t(t),error:t=>this.#n(t)})}enableRemoteControl(){this.#e.postApiV1RemotecontrolEnable().subscribe({next:t=>this.#t(t),error:t=>this.#n(t)})}disableRemoteControl(){this.#e.postApiV1RemotecontrolDisable().subscribe({next:t=>this.#t(t),error:t=>this.#n(t)})}deleteRemoteControl(){let t=this;confirm("Are you sure you want to delete the remote control registration?")&&t.#e.deleteApiV1RemotecontrolRegistration().subscribe({next:e=>t.#t(e),error:e=>t.#n(e)})}static \u0275fac=function(e){return new(e||s)};static \u0275prov=z({token:s,factory:s.\u0275fac,providedIn:"root"})};function At(s,t){if(s&1){let e=O();i(0,"spk-form-field",10)(1,"input",11),A("ngModelChange",function(r){u(e);let d=p(2);return G(d.registerUrl,r)||(d.registerUrl=r),m(r)}),o()(),i(2,"button",12),S("click",function(){u(e);let r=p(2);return m(r.register())}),a(3,0),o()}if(s&2){let e=p(2);l(),y("ngModel",e.registerUrl)}}function vt(s,t){if(s&1&&(i(0,"div",8)(1,"label"),a(2,1),o(),i(3,"a",13),I(4),o()()),s&2){let e=p(2);l(3),Ye("href",e.claimUrl(),je),l(),H(e.claimUrl())}}function $t(s,t){s&1&&(i(0,"div",8)(1,"label"),a(2,2),o()())}function bt(s,t){if(s&1){let e=O();i(0,"button",12),S("click",function(){u(e);let r=p(2);return m(r.cancel())}),a(1,3),o()}}function wt(s,t){if(s&1){let e=O();i(0,"button",12),S("click",function(){u(e);let r=p(2);return m(r.disable())}),a(1,4),o()}}function kt(s,t){if(s&1){let e=O();i(0,"button",12),S("click",function(){u(e);let r=p(2);return m(r.enable())}),a(1,5),o(),i(2,"button",14),S("click",function(){u(e);let r=p(2);return m(r.delete())}),a(3,6),o()}}function Ft(s,t){if(s&1&&(i(0,"div",7),E(1,At,4,1)(2,vt,5,2,"div",8)(3,$t,3,0,"div",8)(4,bt,2,0,"button",9)(5,wt,2,0,"button",9)(6,kt,4,0),o()),s&2){let e=p();l(),C(e.state()==="inactive"?1:-1),l(),C(e.state()==="registered"?2:-1),l(),C(e.state()==="registering"?3:-1),l(),C(e.state()==="registering"||e.state()==="registeringfaulted"||e.state()==="registered"?4:-1),l(),C(e.state()==="connected"||e.state()==="enabled"?5:-1),l(),C(e.state()==="disabled"?6:-1)}}var re=class s{#e=T(F);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=$({type:s,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let t;t=$localize`Register for remote control`;let e;e=$localize`Machine is now registered, open this link to add it to your account:`;let n;n=$localize`Registering, please wait...`;let r;r=$localize`Cancel registration`;let d;d=$localize`Disable remote control`;let N;N=$localize`Enable remote control`;let g;return g=$localize`Delete remote control setup`,[t,e,n,r,d,N,g,[1,"field-row"],[1,"field-col"],["type","button","spk-button","",1,"raised"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","spk-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","spk-button","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","spk-button","",1,"raised","error",3,"click"]]},template:function(e,n){e&1&&E(0,Ft,7,6,"div",7),e&2&&C(n.state()!=="unknown"?0:-1)},dependencies:[ne,Y,ee,te,Z],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};var Lt=()=>({standalone:!0});function xt(s,t){s&1&&(i(0,"spk-icon",73),I(1,"check"),o())}function Dt(s,t){s&1&&(i(0,"spk-icon",74),I(1,"prohibit"),o())}function Xt(s,t){if(s&1){let e=O();i(0,"button",78),S("click",function(){u(e);let r=p(2);return m(r.updatePassphrase())}),a(1,35),o()}if(s&2){let e=p(2);f("loader",e.isUpdating())}}function Vt(s,t){if(s&1){let e=O();i(0,"spk-tooltip",77)(1,"button",79),S("click",function(){u(e);let r=p(2);return m(r.updatePassphrase())}),a(2,36),o()()}if(s&2){let e=p(2);l(),f("loader",e.isUpdating()),h("disabled",!0)}}function zt(s,t){if(s&1){let e=O();i(0,"spk-form-field")(1,"label",69),a(2,32),o(),i(3,"input",70),A("ngModelChange",function(r){u(e);let d=p();return G(d.passphrase,r)||(d.passphrase=r),m(r)}),o()(),i(4,"spk-form-field")(5,"label",71),a(6,33),o(),i(7,"input",72),A("ngModelChange",function(r){u(e);let d=p();return G(d.repeatPassphrase,r)||(d.repeatPassphrase=r),m(r)}),o(),E(8,xt,2,0,"spk-icon",73)(9,Dt,2,0,"spk-icon",74),o(),i(10,"div",50)(11,"button",75),S("click",function(){u(e);let r=p();return m(r.cancelPasswordChange())}),a(12,34),o(),E(13,Xt,2,2,"button",76)(14,Vt,3,3,"spk-tooltip",77),o()}if(s&2){let e=p();l(3),y("ngModel",e.passphrase),l(4),h("disabled",e.passphrase().length===0),y("ngModel",e.repeatPassphrase),l(),C(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?8:9),l(3),f("loader",e.isUpdating()),l(2),C(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?13:14)}}function Ut(s,t){s&1&&(i(0,"spk-icon",80),I(1,"check"),o())}function Bt(s,t){if(s&1){let e=O();i(0,"div",50)(1,"button",75),S("click",function(){u(e);let r=p();return m(r.openPassphraseForm())}),a(2,37),o(),E(3,Ut,2,0,"spk-icon",80),o()}if(s&2){let e=p();l(3),C(e.passwordUpdated()?3:-1)}}function Ht(s,t){if(s&1){let e=O();i(0,"spk-form-field")(1,"label",81),a(2,38),o(),i(3,"textarea",82),A("ngModelChange",function(r){u(e);let d=p();return G(d.allowedHostnames,r)||(d.allowedHostnames=r),m(r)}),o()(),i(4,"spk-alert",83),a(5,39),o(),i(6,"button",78),S("click",function(){u(e);let r=p();return m(r.updateAllowedHostnames())}),a(7,40),o()}if(s&2){let e=p();l(3),y("ngModel",e.allowedHostnames),l(3),f("loader",e.updatingAllowedHosts())}}function Wt(s,t){if(s&1&&I(0),s&2){let e,n=p();W(" ",(e=n.sysinfo())==null?null:e.ServerVersion," ")}}function qt(s,t){s&1&&P(0,"spk-progress-bar",55)}function jt(s,t){if(s&1&&I(0),s&2){let e=t.$implicit;W(" ",e.label," ")}}function Kt(s,t){if(s&1&&I(0),s&2){let e=t.$implicit;W(" ",e.label," ")}}var X=new mt,Nt=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],Mt=[{value:"",label:$localize`System default (information)`},{value:"information",label:$localize`Usage statistics, warnings, errors, and crashes`},{value:"warning",label:$localize`Warnings, errors and crashes`},{value:"error",label:$localize`Errors and crashes`},{value:"crash",label:$localize`Crashes only`},{value:"none",label:$localize`None / disabled`}],de=class s{#e=T(Ct);#i=T(J);#t=T(v);#n=T(k);#r=T(F);#o=T(it);#s=this.#o.getItem("locale")??"en-US";sysinfo=this.#i.systemInfo;isDarkMode=this.#e.isDarkMode;editAs=c("list");previousLang=this.#s;langCtrl=c(this.#s);remoteControlStatus=this.#r.status;settingsForm=X.group({pauseSettings:X.group({time:X.control(0),timeType:X.control("s")}),usageStatistics:X.control("")});updatingChannel=c(!1);updateChannel=c("");setNewChannel(t){let e=this.updateChannel();this.updateChannel.set(t),this.#t.patchApiV1Serversettings({requestBody:{"update-channel":t}}).pipe(this.#n.withRefresh(),R(()=>this.updatingChannel.set(!1)),x(()=>(this.updateChannel.set(e),L(null)))).subscribe()}allowRemoteAccess=c(!1);allowedHostnames=c("");loadedAllowedHostnames=c("");updatingRemoteAccess=c(!1);updatingAllowedHosts=c(!1);updateRemoteAccess(){let t=this.allowRemoteAccess(),e=!t;this.allowRemoteAccess.set(e),e||this.#t.patchApiV1Serversettings({requestBody:{"server-listen-interface":e?"any":"loopback"}}).pipe(this.#n.withRefresh(),R(()=>this.updatingRemoteAccess.set(!1)),x(()=>(this.allowRemoteAccess.set(t),L(null)))).subscribe()}updateAllowedHostnames(){let t=this.loadedAllowedHostnames(),e=this.allowedHostnames();this.updatingAllowedHosts.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"server-listen-interface":"any","allowed-hostnames":e}}).pipe(this.#n.withRefresh(),R(()=>this.updatingAllowedHosts.set(!1)),x(()=>(this.allowedHostnames.set(t),L(null)))).subscribe()}updatingDisableTrayIconLogin=c(!1);disableTrayIconLogin=c(!1);saveDisableTrayIconLogin(){let t=this.disableTrayIconLogin(),e=!t;this.updatingDisableTrayIconLogin.set(!0),this.disableTrayIconLogin.set(e),this.#t.patchApiV1Serversettings({requestBody:{"disable-tray-icon-login":e?"True":"False"}}).pipe(this.#n.withRefresh(),R(()=>this.updatingDisableTrayIconLogin.set(!1)),x(()=>(this.disableTrayIconLogin.set(t),L(null)))).subscribe()}showPassphraseForm=c(!1);isUpdating=c(!1);passphrase=c("");repeatPassphrase=c("");passwordUpdated=c(!1);updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(this.#n.withRefresh(),R(()=>this.isUpdating.set(!1))).subscribe({next:()=>{this.showPassphraseForm.set(!1),this.passwordUpdated.set(!0),setTimeout(()=>{this.passwordUpdated.set(!1)},3e3)}}))}openPassphraseForm(){this.showPassphraseForm.set(!0)}cancelPasswordChange(){this.showPassphraseForm.set(!1)}get pauseSettings(){return this.settingsForm.controls.pauseSettings}languageOptions=c(ce);usageStatisticsOptions=c(Mt);timeTypeOptions=c(Nt);timeTypeSignal=oe(this.pauseSettings.controls.timeType.valueChanges);timeRange=b(()=>this.timeTypeSignal()==="h"?[0,24]:[0,60]);updateLocale(t){let n=t[0]?.value??"";!n||n===""||n===this.previousLang||(this.#o.setItem("locale",n),window.location.reload())}submit(){let t=this.pauseSettings.value,e=`${t.time}${t.timeType}`;this.#t.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.settingsForm.controls.usageStatistics.value,"startup-delay":e==="0s"?"":e}}).pipe(this.#n.withRefresh()).subscribe()}serverSettingsEffect=w(()=>{let t=this.#n.serverSettings();if(t===void 0)return;let e=t["startup-delay"],n=e.slice(-1),r=e.slice(0,-1),d=["s","m","h"];this.disableTrayIconLogin.set(t["disable-tray-icon-login"]!=="False"),this.updateChannel.set(t["update-channel"]),this.allowRemoteAccess.set(t["server-listen-interface"]==="any"),this.allowedHostnames.set(t["allowed-hostnames"]),this.loadedAllowedHostnames.set(t["allowed-hostnames"]),console.log(t["usage-reporter-level"]),queueMicrotask(()=>{this.settingsForm.patchValue({pauseSettings:{time:parseInt(r==""?"0":r),timeType:d.includes(n)?n:"s"},usageStatistics:t["usage-reporter-level"]??""})})});languageDisplay(){let t=this;return()=>{let e=t.langCtrl();return e?ce.find(n=>n.value===e)?.label??null:null}}typeDisplay(){let t=this;return()=>{let e=t.settingsForm.value.pauseSettings?.timeType;return e==null?null:Nt.find(n=>n.value===e)?.label??null}}usageDisplay(){let t=this;return()=>{let e=t.settingsForm.value.usageStatistics;return e==null?null:Mt.find(n=>n.value===e)?.label??null}}setDarkMode(){this.#e.setDarkMode()}setLightMode(){this.#e.setLightMode()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=$({type:s,selectors:[["app-settings"]],decls:134,vars:39,consts:()=>{let t;t=$localize`Settings`;let e;e=$localize`Configure your backup settings.`;let n;n=$localize` Save changes `;let r;r=$localize`Remote access control`;let d;d=$localize`Color theme`;let N;N=$localize`Customize your application theme`;let g;g=$localize`Passwords`;let M;M=$localize`Change server passphrase`;let pe;pe=$localize`Language`;let Se;Se=$localize`Select a language for the platform`;let ge;ge=$localize`Allow remote access (requires restart)`;let Te;Te=$localize` By allowing remote access, the server listens to requests from any machine on your network. If you enable this option, make sure you are always using the computer on a secure firewall protected network. `;let ue;ue=$localize`Allow remote access`;let me;me=$localize`Prevent tray icon automatic log-in`;let Ce;Ce=$localize` By default, the tray icon will open the user interface with a token that unlocks the user interface. This ensures that you can access the user interface from the tray icon, while requiring others to enter a password. If you prefer having to type in the password, even when accessing the user interface from the tray icon, enable this option. `;let Ee;Ee=$localize`Prevent tray icon automatic log-in`;let fe;fe=$localize`Update channel`;let Ne;Ne=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let Me;Me=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let he;he=$localize`Stable`;let Pe;Pe=$localize`Official releases`;let Oe;Oe=$localize`Beta`;let Re;Re=$localize` Try out the new features that we are working on. Currently the most stable version available. Test Restore data before using this in production environments. `;let Ie;Ie=$localize` Experimental `;let ye;ye=$localize`Specific builds for developers only. Not for use with important data.`;let Ge;Ge=$localize`Canary`;let Ae;Ae=$localize`Individual builds for developers only. Not for use with important data.`;let ve;ve=$localize`Pause after startup or hibernation`;let $e;$e=$localize` Duplicati will run when started, but will remain in paused state for the duration. Duplicati will occupy minimal system resources and no backups will be run. `;let be;be=$localize`Usage statistics`;let V;V=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#121\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#121\uFFFD"}:CLOSE_LINK:${"[\uFFFD#122\uFFFD\uFFFD/#122\uFFFD|\uFFFD#123\uFFFD\uFFFD/#123\uFFFD]"}:LINE_BREAK:${"[\uFFFD#122\uFFFD\uFFFD/#122\uFFFD|\uFFFD#123\uFFFD\uFFFD/#123\uFFFD]"}:LINE_BREAK: All usage reports are sent anonymously and do not contain any personal information. They contain information about hardware and operating system, the type of backend, backup duration, overall size of source data and similar data. They do not contain paths, filenames, usernames, passwords or similar sensitive information. `,V=Je(V);let we;we=$localize`Advanced options`;let ke;ke=$localize`Enter new password`;let Fe;Fe=$localize`Repeat password`;let Le;Le=$localize`Password have to be filled and have to match`;let xe;xe=$localize`Passphrase`;let De;De=$localize`Repeat passphrase`;let Xe;Xe=$localize`Cancel`;let Ve;Ve=$localize` Update passphrase `;let ze;ze=$localize` Update passphrase `;let Ue;Ue=$localize`Change password`;let Be;Be=$localize`Allowed hostnames`;let He;He=$localize` To prevent various DNS based attacks, Duplicati limits the allowed hostnames to the ones listed here. Direct IP access and localhost is always allowed. Multiple hostnames can be supplied with a semicolon separator. If any of the allowed hostnames is an asterisk (*), all hostnames are allowed and this feature is disabled. If the field is empty, only IP address and localhost access is allowed. `;let We;return We=$localize` Update allowed hostnames `,[t,e,n,r,d,N,g,M,pe,Se,ge,Te,ue,me,Ce,Ee,fe,Ne,Me,he,Pe,Oe,Re,Ie,ye,Ge,Ae,ve,$e,be,V,we,xe,De,Xe,Ve,ze,Ue,Be,He,We,[1,"content"],[1,"title"],["type","submit","spk-button","",1,"raised","primary",3,"click","disabled"],[1,"left"],[1,"right"],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[1,"right","passphrase-form"],[1,"actions"],["value","value","label","label",3,"selectedOptionsChange","options","isClearable","inlineSearch"],["type","text",3,"ngModel","ngModelOptions"],[1,"right","remote-access-form"],[1,"primary","raised",3,"click"],[1,"indeterminate","primary"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"primary","raised"],[1,"content",3,"submit","formGroup"],["formGroupName","pauseSettings",1,"field-row"],[1,"raised","primary",3,"unit"],["type","range","formControlName","time",3,"min","max"],["label","label","value","value",3,"options","isClearable"],["type","text","formControlName","timeType"],["href","#"],["label","label","value","value",3,"options"],["type","text","formControlName","usageStatistics"],[1,"advanced-settings"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",ke,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",Fe,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"spk-success"],["suffix",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"loader"],["message",Le,1,"primary"],["spk-button","",1,"raised","primary",3,"click"],["spk-button","",1,"raised","primary",3,"click","disabled"],[1,"spk-success"],["for","allowedHostnames"],["type","text","id","allowedHostnames",3,"ngModelChange","ngModel"],["type","primary"]]},template:function(e,n){if(e&1&&(P(0,"app-status-bar"),i(1,"div",41)(2,"header")(3,"div",42)(4,"h2"),a(5,0),o(),i(6,"p"),a(7,1),o()(),i(8,"button",43),S("click",function(){return n.submit()}),a(9,2),o()(),i(10,"section")(11,"div",44)(12,"h3"),a(13,3),o(),i(14,"p"),I(15),o()(),i(16,"div",45),P(17,"app-remote-control"),o()(),i(18,"section")(19,"div",44)(20,"h3"),a(21,4),o(),i(22,"p"),a(23,5),o()(),i(24,"div",45)(25,"div",46)(26,"img",47),S("click",function(){return n.setLightMode()}),o(),i(27,"img",48),S("click",function(){return n.setDarkMode()}),o()()()(),i(28,"section")(29,"div",44)(30,"h3"),a(31,6),o(),i(32,"p"),a(33,7),o()(),i(34,"div",49),E(35,zt,15,7)(36,Bt,4,1,"div",50),o()(),i(37,"section")(38,"div",44)(39,"h3"),a(40,8),o(),i(41,"p"),a(42,9),o()(),i(43,"div",45)(44,"spk-select",51),S("selectedOptionsChange",function(d){return n.updateLocale(d)}),P(45,"input",52),o()()(),i(46,"section")(47,"div",44)(48,"h3"),a(49,10),o(),i(50,"p"),a(51,11),o()(),i(52,"div",53)(53,"spk-toggle",54),S("click",function(){return n.updateRemoteAccess()}),i(54,"label"),a(55,12),o()(),E(56,Ht,8,3),o()(),i(57,"section")(58,"div",44)(59,"h3"),a(60,13),o(),i(61,"p"),a(62,14),o()(),i(63,"div",45)(64,"spk-toggle",54),S("click",function(){return n.saveDisableTrayIconLogin()}),i(65,"label"),a(66,15),o()()()(),i(67,"section")(68,"div",44)(69,"h3"),a(70,16),o(),i(71,"p"),E(72,Wt,1,1),o(),E(73,qt,1,0,"spk-progress-bar",55),o(),i(74,"div",56)(75,"div",57),S("click",function(){return n.setNewChannel("")}),i(76,"spk-radio",58),a(77,17),o(),i(78,"p"),a(79,18),o()(),i(80,"div",57),S("click",function(){return n.setNewChannel("stable")}),i(81,"spk-radio",58),a(82,19),o(),i(83,"p"),a(84,20),o()(),i(85,"div",57),S("click",function(){return n.setNewChannel("beta")}),i(86,"spk-radio",58),a(87,21),o(),i(88,"p"),a(89,22),o()(),i(90,"div",57),S("click",function(){return n.setNewChannel("experimental")}),i(91,"spk-radio",58),a(92,23),o(),i(93,"p"),a(94,24),o()(),i(95,"div",57),S("click",function(){return n.setNewChannel("canary")}),i(96,"spk-radio",58),a(97,25),o(),i(98,"p"),a(99,26),o()()()()(),P(100,"spk-divider"),i(101,"form",59),S("submit",function(){return n.submit()}),i(102,"section")(103,"div",44)(104,"h3"),a(105,27),o(),i(106,"p"),a(107,28),o()(),i(108,"div",45)(109,"div",60)(110,"spk-range-slider",61),P(111,"input",62),o(),i(112,"spk-select",63),P(113,"input",64),E(114,jt,1,1,"ng-template"),o()()()(),i(115,"section")(116,"div",44)(117,"h3"),a(118,29),o(),i(119,"p"),U(120,30),P(121,"a",65)(122,"br")(123,"br"),B(),o()(),i(124,"div",45)(125,"spk-select",66),P(126,"input",67),E(127,Kt,1,1,"ng-template"),o()()()(),i(128,"div",41)(129,"section")(130,"div",68)(131,"h3"),a(132,31),o(),P(133,"app-advanced-options-settings"),o()()()),e&2){let r,d,N,g;l(8),h("disabled",n.settingsForm.untouched),l(7),H(n.remoteControlStatus()),l(11),f("active",!n.isDarkMode()),l(),f("active",n.isDarkMode()),l(8),C(n.showPassphraseForm()?35:36),l(9),h("options",n.languageOptions())("isClearable",!1)("inlineSearch",!0),l(),h("ngModel",n.langCtrl())("ngModelOptions",q(38,Lt)),l(8),f("active",n.allowRemoteAccess()),l(3),C(n.allowRemoteAccess()?56:-1),l(8),f("active",n.disableTrayIconLogin()),l(8),C(n.updateChannel()!==""&&((r=n.sysinfo())!=null&&r.ServerVersion)?72:-1),l(),C(n.updatingChannel()?73:-1),l(3),f("active",n.updateChannel()===""),l(),ae((d=n.sysinfo())==null?null:d.DefaultUpdateChannel),le(77),l(2),ae((N=n.sysinfo())==null?null:N.ServerVersionType),le(79),l(2),f("active",n.updateChannel()==="stable"),l(5),f("active",n.updateChannel()==="beta"),l(5),f("active",n.updateChannel()==="experimental"),l(5),f("active",n.updateChannel()==="canary"),l(5),h("formGroup",n.settingsForm),l(9),h("unit",(g=n.timeTypeSignal())!==null&&g!==void 0?g:""),l(),h("min",n.timeRange()[0])("max",n.timeRange()[1]),l(),h("options",n.timeTypeOptions())("isClearable",!1),l(13),h("options",n.usageStatisticsOptions())}},dependencies:[ne,pt,Y,St,ee,dt,te,ie,gt,ut,Tt,Et,re,D,Q,rt,at,st,_t,ct,Z,j,ot,K,lt],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem 2rem}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem 0;position:sticky;top:0;background:var(--base-level-10);z-index:1000;border-bottom:1px solid var(--base-level-40)}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}section[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:2rem 0;border-top:1px solid var(--base-level-40)}section[_ngcontent-%COMP%]:first-of-type{border-top:0}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;align-items:flex-start}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] spk-button-group[_ngcontent-%COMP%]{margin-top:.25rem}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;width:50%}.passphrase-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:1rem}.passphrase-form[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.remote-access-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:240px;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-500)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] spk-radio[_ngcontent-%COMP%]{color:var(--base-level-60);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-level-60R)}.field-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}.advanced-settings[_ngcontent-%COMP%]{grid-column:1/-1;display:grid;grid-template-columns:auto 1fr;gap:1rem}"],changeDetection:0})};export{de as default};
package/chunk-LXEGFP53.js DELETED
@@ -1 +0,0 @@
1
- import"./chunk-7CGTOI24.js";var t=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-YDN2L342.js")},{path:"encryption",loadComponent:()=>import("./chunk-RUWWC6BD.js")},{path:"select-files",loadComponent:()=>import("./chunk-ASQFBDFK.js")},{path:"options",loadComponent:()=>import("./chunk-TNK2MVSP.js")}],o=t;export{o as default};
package/chunk-RUWWC6BD.js DELETED
@@ -1 +0,0 @@
1
- import{c as a,d as b}from"./chunk-ZCB4RYTS.js";import"./chunk-XC6KYSRC.js";import"./chunk-NV2YMSSM.js";import"./chunk-3YOT5OAB.js";import"./chunk-CMXSHXAU.js";import"./chunk-F5S33WHR.js";import"./chunk-HGERKLOF.js";import"./chunk-UT45C7WK.js";import"./chunk-QX5XWUM2.js";import"./chunk-LHSJLKCF.js";import"./chunk-FHW4WHNO.js";import"./chunk-WBNOGAKJ.js";import"./chunk-G3YJXHRY.js";import"./chunk-PUSUA4U7.js";import"./chunk-L3T52MCL.js";import"./chunk-4XPN5ZGE.js";import"./chunk-3GK4TNUH.js";import"./chunk-PTC4N7TU.js";import"./chunk-7CGTOI24.js";export{a as createEncryptionForm,b as default};
package/main-JSU2T7AW.js DELETED
@@ -1 +0,0 @@
1
- import{b as me,c as de}from"./chunk-W5YK2JJZ.js";import{a as N}from"./chunk-CMXSHXAU.js";import{a as ce}from"./chunk-A6XFGG4U.js";import{a as y}from"./chunk-3XY4ZNIY.js";import{a as w}from"./chunk-F5S33WHR.js";import{a as ie}from"./chunk-HGERKLOF.js";import"./chunk-UT45C7WK.js";import"./chunk-QX5XWUM2.js";import{a as b,b as pe,c as T}from"./chunk-FHW4WHNO.js";import{b as te,c as oe,f as ne,g as re}from"./chunk-WBNOGAKJ.js";import{a as ee}from"./chunk-G3YJXHRY.js";import{c as ae}from"./chunk-PUSUA4U7.js";import{d as se}from"./chunk-L3T52MCL.js";import{a as q,b as X,d as Q,e as Y,f as Z}from"./chunk-4XPN5ZGE.js";import{ua as z}from"./chunk-3GK4TNUH.js";import{b as le}from"./chunk-CHZ7TMI7.js";import{Bc as $,Cb as B,Cc as K,D as S,J as U,L as C,Mc as _,N as F,R,U as D,X as s,d as H,db as J,g as P,ha as G,l as V,m as j,p as A,sa as d,x as O,y as W}from"./chunk-PTC4N7TU.js";import"./chunk-7CGTOI24.js";var I=class o{#o=s(y);#s=s(b);ngOnInit(){this.#s.fetchConfig(),this.#o.clearAllNotCurrentVersion()}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=J({type:o,selectors:[["app-root"]],decls:1,vars:0,template:function(t,n){t&1&&B(0,"router-outlet")},dependencies:[te],encapsulation:2})};var he={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var f=new D("ENVIRONMENT");var k=class o{#o=s(se);isLoaded=d(!1);webmodules=d(null);preload(e=!1){let t=this.#o.getApiV1Webmodules().pipe(F(n=>this.webmodules.set(n)),S(()=>this.isLoaded.set(!0)));if(e)return t;t.subscribe()}static \u0275fac=function(t){return new(t||o)};static \u0275prov=R({token:o,factory:o.\u0275fac,providedIn:"root"})};var Re=()=>{let o=s(T);return o.token()?!0:o.checkProxyAuthed().pipe(C(e=>e?V(!0):o.refreshToken().pipe(A(()=>!0))))},Te=()=>{let o=s(b),e=s(w),t=s(G),n=o.relayIsEnabled()?"longpoll":"websocket",i=[t.get(N).preload(!0),t.get(N).preloadFilterGroups(!0),t.get(k).preload(!0)];return o.configLoaded===null?O(i).pipe(A(()=>n)):o.configLoaded?.pipe(C(()=>O(i)))},fe=[{path:"",children:[{path:"login",canActivate:[],loadComponent:()=>import("./chunk-WGIELPP6.js")},{path:"logout",loadComponent:()=>import("./chunk-MURCWMUG.js")},{path:"",canActivate:[Re],children:[{path:"",canActivate:[Te],loadComponent:()=>import("./chunk-57MYGQMW.js"),children:[{path:"",loadComponent:()=>import("./chunk-27RULQ7Y.js")},{path:"add-backup",loadComponent:()=>import("./chunk-6EQS5NZL.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-GI6WORKU.js")},{path:"backup/import",loadComponent:()=>import("./chunk-V6OHLKTK.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-YPQUTPBQ.js"),loadChildren:()=>import("./chunk-7EPQLKGD.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-YPQUTPBQ.js"),loadChildren:()=>import("./chunk-7EPQLKGD.js")},{path:"backup/:id/log",loadComponent:()=>import("./chunk-VFJL5JPI.js")},{path:"backup/:id/database",loadComponent:()=>import("./chunk-WVKWOGDQ.js")},{path:"backup/:id/commandline",loadComponent:()=>import("./chunk-CNWIFYHZ.js")},{path:"backup/:id/commandline/:runId",loadComponent:()=>import("./chunk-NB32XJ7B.js")},{path:"restore",children:[{path:"",loadComponent:()=>import("./chunk-IZOZII2D.js")},{path:"from-config",loadComponent:()=>import("./chunk-MJUYFS7O.js")}]},{path:"restore-from-files",loadComponent:()=>import("./chunk-UBZDIRFY.js"),loadChildren:()=>import("./chunk-LXEGFP53.js")},{path:"restore-draft/:id",loadComponent:()=>import("./chunk-UBZDIRFY.js"),loadChildren:()=>import("./chunk-LXEGFP53.js")},{path:"restore/:id",loadComponent:()=>import("./chunk-UBZDIRFY.js"),loadChildren:()=>import("./chunk-LXEGFP53.js")},{path:"settings",loadComponent:()=>import("./chunk-FJKXCOAH.js")},{path:"about",loadComponent:()=>import("./chunk-WNWGY2FM.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-6LVGSIUU.js")},{path:"changelog",loadComponent:()=>import("./chunk-LO4MUZS2.js")},{path:"libraries",loadComponent:()=>import("./chunk-QPO2N2OR.js")},{path:"system-info",loadComponent:()=>import("./chunk-IAVOZTCR.js")},{path:"logs",loadComponent:()=>import("./chunk-5UL3RRQI.js")}]}]}]}]}];var x=null,ge=(o,e)=>{let t=s(T),n=s(oe),i=s(y),c=s(f),r=i.getItem("locale"),u=s(ae),a=me(r),p=o.url==="/api/v1/auth/login",m=o.url==="/api/v1/auth/refresh",v=o.url==="/api/v1/progressstate",h=t.token(),g=o,L=o.headers.has("custom-proxy-check")||h===pe;if(h&&o.url.startsWith(c.baseUrl)&&!L){let l=o.headers.set("Authorization",`Bearer ${h}`);r&&r!=="en-US"&&(l=l.set("X-Ui-Language",a)),g=o.clone({headers:l})}return e(g).pipe(W(l=>{if(!L&&(v&&l.status===404||u.error(l.message),m&&l.status===401&&(t.logout(),n.navigate(["/logout"])),!p&&!m&&l.status===401))return x??=t.refreshToken().pipe(U()),x.pipe(C(()=>e(o.clone({headers:o.headers.set("Authorization",`Bearer ${t.token()}`)}))),S(()=>x=null));let Se=`Error Code: ${l.status}, Message: ${l.message}`;return j(()=>({error:l,message:Se}))}))};var we="1.0.0",ye=`portal-proxy-client-${crypto.randomUUID()}`,Ie=1,M=class o{#o=1e3;#s=s(f);#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=_(()=>{let e=this.#i(),t=this.#l(),n=this.#a();if(!n||!e||!t||t<this.#o){this.#c&&window.clearInterval(this.#c);return}this.#c=window.setInterval(()=>{this.connectToMachineServer(n)},t)});utf8Atob(e){let t=Uint8Array.from(atob(e),i=>i.charCodeAt(0)),n=this.#m.decode(t);return n?JSON.parse(n):null}connectToMachineServer(e,t){let n=t?.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(e),this.#i.set(!0)},this.#e.onerror=()=>{this.#t.set("error")},this.#e.onmessage=c=>{let r=JSON.parse(c.data);if(this.wsState()==="connect"){if(r.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${r.type}'`);return}let a={token:e,publicKey:"",clientVersion:we,protocolVersion:Ie},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(e=null){e&&console.error(e),this.#e?.close(),this.#e=null,this.#t.set("disconnected"),this.#n.set(!1)}createResponse(e,t,n){let i={from:ye,to:e.from,type:t,messageId:e.messageId,payload:JSON.stringify(n)};return JSON.stringify(i)}sendCommand(e,t,n,i,c,r,u=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(e),new Promise((a,p)=>{let m=crypto.randomUUID(),h={from:ye,to:t,type:"command",messageId:m,payload:JSON.stringify({method:n,path:i,body:c,headers:r})},g={resolve:a,reject:p,timer:window.setTimeout(()=>{let E=this.#r[m];E&&(delete this.#r[m],E.reject("Timeout"))},u)};this.#r[m]=g,this.#n()?this.activateCommand(h):this.#p.push(h)})}activateCommand(e){this.#e?.send(JSON.stringify(e))}static \u0275fac=function(t){return new(t||o)};static \u0275prov=R({token:o,factory:o.\u0275fac,providedIn:"root"})};function ke(o){if(typeof o!="string")return null;let t=new TextEncoder().encode(o);return window.btoa(String.fromCharCode(...t))}function be(o,e,t){let n=o.relayconfigState.config();if(n===null)return t(e);let i=ke(e.body),c={};e.headers.keys().forEach(p=>{c[p]=e.headers.get(p)??""});let r=e.headers.get("timeout"),u=r!==null?parseInt(r):o.defaultTimeout;e.url.startsWith("/api/v1/serverstate")&&e.url.includes("longpoll=true")&&(u=1e3*99);let a=o.relayWebsocket.sendCommand(n.accessToken,n.clientId,e.method,e.url,i,c,u);return new H(p=>{a.then(m=>{let v=new q;c!=null&&Object.keys(c).forEach(g=>{v.set(g,c[g])});let h=new X({body:m.body,status:m.code,statusText:"OK",headers:v});p.next(h),p.complete()})})}var ve=(o,e)=>{let t={relayconfigState:s(b),defaultTimeout:s(f).defaultTimeout,relayWebsocket:s(M)},n=t.relayconfigState.config();if(t.relayconfigState.configLoaded!==null&&n===null){let i=new P;return t.relayconfigState.configLoaded.subscribe(c=>{c&&be(t,o,e).subscribe(i)}),i}return be(t,o,e)};var Ce={providers:[$(),ne(fe,re()),Q(Z(),Y([ve,ge])),y,{provide:f,useValue:he},{provide:K,useValue:de()},ce,w,le,z,ie]};ee(I,Ce);