@duplicati/ngclient 0.0.134 → 0.0.135

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.
@@ -1 +1 @@
1
- import{a as ne}from"./chunk-L6BZ6TEU.js";import{a as pt}from"./chunk-CFESUDFC.js";import"./chunk-67XQIEG5.js";import{a as Tt}from"./chunk-ZQYPQTU3.js";import{a as St}from"./chunk-PL2MNRTA.js";import"./chunk-NZD6UMYZ.js";import"./chunk-B6DE3TTE.js";import"./chunk-VFVXE2DC.js";import{a as dt}from"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import{a as Q}from"./chunk-BHSG643V.js";import"./chunk-3Q5JEF3K.js";import{c as Z,e as J,i as Y,m as ct,s as ee,t as te}from"./chunk-ZCT7SRIM.js";import{a as tt}from"./chunk-OQHMS5HM.js";import"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{A as rt,C as _t,a as H,b as q,e as nt,g as j,k as it,l as K,p as ot,q as st,r as at,t as lt}from"./chunk-DNBOZ26J.js";import{h as k}from"./chunk-XD6MBGQY.js";import"./chunk-4VPA3END.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-JDCGGJ7O.js";import{B as b,Bb as P,F as R,Fc as x,Gc as $,Hb as V,Ib as z,Jb as l,Kb as se,La as qe,Lb as ae,Mb as Qe,Mc as et,Nb as p,Oa as r,Ob as S,S as He,Wb as Ze,X as f,Xb as Je,_a as w,_b as M,a as Ue,b as Be,ba as u,bc as O,c as We,ca as m,cc as U,db as F,dc as B,gc as y,hc as G,ic as A,la as c,mb as je,mc as Ye,n as v,nb as Ke,pb as C,qb as E,qc as W,ub as N,vb as i,wb as o,xb as I}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var mt=["formRef"],Ct=()=>[import("./chunk-O3JEFNCL.js").then(s=>s.OptionsListComponent)];function Et(s,e){s&1&&(i(0,"spk-alert",3),l(1,1),o())}function ft(s,e){if(s&1){let t=P();i(0,"app-options-list",5),A("optionsChange",function(a){u(t);let _=S();return G(_.settings,a)||(_.settings=a),m(a)}),o()}if(s&2){let t=S();y("options",t.settings),N("hasFreeTextSettings",!0)}}var Nt=["Bytes","KB","MB","GB","TB","PB"],D=class s{#e=f(ne);#t=f(k);formRef=et.required("formRef");settings=c([]);isSubmitting=c(!1);isLoadingOptions=c(!0);saved=c(!1);sizeOptions=c(Nt);lastRecievedServerSettings=c({});serverSettingsEffect=$(()=>{let e=this.#e.serverSettings();if(e===void 0)return;this.lastRecievedServerSettings.set(e),this.isLoadingOptions.set(!0);let t=Object.entries(e);t.forEach(([n,a],_)=>{if(n.startsWith("--")){let g=n.replace("--","");this.settings.update(T=>(T.some(h=>h.Name===g)||T.push({Name:g,Value:a}),T))}_===t.length-1&&this.isLoadingOptions.set(!1)})});submit(){this.isSubmitting.set(!0);let e=this.settings(),t=this.lastRecievedServerSettings(),n=e.map(T=>T.Name),_=Object.keys(t).filter(T=>T.startsWith("--")).filter(T=>!n.includes(T.replace("--",""))),g=e.reduce((T,h)=>(T[`--${h.Name}`]=h.Value,T),{});_.forEach(T=>{g[T]=null}),this.#t.patchApiV1Serversettings({requestBody:g}).pipe(R(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#e.refreshServerSettings(),this.saved.set(!0),setTimeout(()=>{this.saved.set(!1)},3e3)}})}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=w({type:s,selectors:[["app-advanced-options-settings"]],viewQuery:function(t,n){t&1&&Ze(n.formRef,mt,5),t&2&&Je()},decls:8,vars:4,consts:()=>{let e;e=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON: Save settings `;let t;return t=$localize`Settings saved`,[e,t,[1,"actions"],[1,"success"],["spk-button","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings"]]},template:function(t,n){t&1&&(i(0,"div",2),C(1,Et,2,0,"spk-alert",3),i(2,"button",4),p("click",function(){return n.submit()}),V(3,0),I(4,"spk-icon"),z(),o()(),F(5,ft,1,2),je(6,5,Ct)),t&2&&(r(),E(n.saved()?1:-1),r(),M("loader",n.isSubmitting()),r(4),Ke(!n.isLoadingOptions()))},dependencies:[te,j,H,q],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-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 2.5rem;align-items:flex-end}"],changeDetection:0})};var L=class s{#e=f(nt);#t=f(k);#o=f(Q);repeatRegisterTimer=null;state=c("unknown");claimUrl=c(null);registerUrl=c("");status=x(()=>{let e=this.state();return e==="enabled"?"Remote control is enabled but not connected":e==="connected"?"Remote control is connected":e==="registering"?"Registering machine...":e==="registeringfaulted"?"Registration failed":e==="registered"?"Registered, waiting for accept":e==="disabled"?"Remote control is configured but not enabled":e==="unknown"?"...loading...":"Remote control is not set up"});sysInfoEffect=$(()=>{let e=this.#o.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"")});#n(e){e.RegistrationUrl&&this.claimUrl.set(e.RegistrationUrl),e.IsConnected?this.state.set("connected"):e.IsEnabled?this.state.set("enabled"):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 t=this.state();this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),t==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:n=>this.#n(n),error:n=>this.#i(n)})},5e3)),(t==="enabled"||t==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.getApiV1RemotecontrolStatus().subscribe({next:n=>this.#n(n),error:n=>this.#i(n)})},5e3)),e.IsRegistering&&e.CanEnable&&this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:n=>this.#n(n)})}#i(e){this.#t.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#n(t)})}refreshRemoteControlStatus(){this.#t.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#n(e),error:e=>this.#i(e)})}beginRemoteRegistration(){this.state.set("registering"),this.#t.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:this.registerUrl()}}).subscribe({next:e=>this.#n(e),error:e=>this.#i(e)})}cancelRemoteRegistration(){this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#n(e),error:e=>this.#i(e)})}enableRemoteControl(){this.#t.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#n(e),error:e=>this.#i(e)})}disableRemoteControl(){this.#t.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#n(e),error:e=>this.#i(e)})}deleteRemoteControl(){let e=this;this.#e.open(dt,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete the remote control registration?`,confirmText:$localize`Delete registration`,cancelText:$localize`Cancel`},closed:t=>{t&&e.#t.deleteApiV1RemotecontrolRegistration().subscribe({next:n=>e.#n(n),error:n=>e.#i(n)})}})}static \u0275fac=function(t){return new(t||s)};static \u0275prov=He({token:s,factory:s.\u0275fac,providedIn:"root"})};function ht(s,e){if(s&1){let t=P();i(0,"spk-form-field",10)(1,"input",11),A("ngModelChange",function(a){u(t);let _=S(2);return G(_.registerUrl,a)||(_.registerUrl=a),m(a)}),o()(),i(2,"button",12),p("click",function(){u(t);let a=S(2);return m(a.register())}),l(3,0),o()}if(s&2){let t=S(2);r(),y("ngModel",t.registerUrl)}}function Pt(s,e){if(s&1&&(i(0,"div",8)(1,"label"),l(2,1),o(),i(3,"a",13),O(4),o()()),s&2){let t=S(2);r(3),N("href",Ye(t.claimUrl()),qe),r(),U(t.claimUrl())}}function Ot(s,e){s&1&&(i(0,"div",8)(1,"label"),l(2,2),o()())}function Rt(s,e){if(s&1){let t=P();i(0,"button",12),p("click",function(){u(t);let a=S(2);return m(a.cancel())}),l(1,3),o()}}function It(s,e){if(s&1){let t=P();i(0,"button",12),p("click",function(){u(t);let a=S(2);return m(a.disable())}),l(1,4),o()}}function yt(s,e){if(s&1){let t=P();i(0,"button",12),p("click",function(){u(t);let a=S(2);return m(a.enable())}),l(1,5),o(),i(2,"button",14),p("click",function(){u(t);let a=S(2);return m(a.delete())}),l(3,6),o()}}function Gt(s,e){if(s&1&&(i(0,"div",7),C(1,ht,4,1),C(2,Pt,5,3,"div",8),C(3,Ot,3,0,"div",8),C(4,Rt,2,0,"button",9),C(5,It,2,0,"button",9),C(6,yt,4,0),o()),s&2){let t=S();r(),E(t.state()==="inactive"?1:-1),r(),E(t.state()==="registered"?2:-1),r(),E(t.state()==="registering"?3:-1),r(),E(t.state()==="registering"||t.state()==="registeringfaulted"||t.state()==="registered"?4:-1),r(),E(t.state()==="connected"||t.state()==="enabled"?5:-1),r(),E(t.state()==="disabled"?6:-1)}}var ie=class s{#e=f(L);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(t){return new(t||s)};static \u0275cmp=w({type:s,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let e;e=$localize`Register for remote control`;let t;t=$localize`Machine is now registered, open this link to add it to your account:`;let n;n=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let _;_=$localize`Disable remote control`;let g;g=$localize`Enable remote control`;let T;return T=$localize`Delete remote control setup`,[e,t,n,a,_,g,T,[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(t,n){t&1&&C(0,Gt,7,6,"div",7),t&2&&E(n.state()!=="unknown"?0:-1)},dependencies:[ee,Z,J,Y,K],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})};function ut(...s){let e=c(...s);return Object.defineProperty(e,"value",{get:e.asReadonly(),set:e.set.bind(e)})}var re=()=>({standalone:!0});function At(s,e){s&1&&(i(0,"spk-icon",69),O(1,"check"),o())}function $t(s,e){s&1&&(i(0,"spk-icon",70),O(1,"prohibit"),o())}function vt(s,e){if(s&1){let t=P();i(0,"button",74),p("click",function(){u(t);let a=S(2);return m(a.updatePassphrase())}),l(1,34),o()}if(s&2){let t=S(2);M("loader",t.isUpdating())}}function bt(s,e){if(s&1){let t=P();i(0,"button",75),p("click",function(){u(t);let a=S(2);return m(a.updatePassphrase())}),l(1,35),o()}if(s&2){let t=S(2);M("loader",t.isUpdating()),N("disabled",!0)}}function wt(s,e){if(s&1){let t=P();i(0,"spk-form-field")(1,"label",65),l(2,31),o(),i(3,"input",66),A("ngModelChange",function(a){u(t);let _=S();return G(_.passphrase,a)||(_.passphrase=a),m(a)}),o()(),i(4,"spk-form-field")(5,"label",67),l(6,32),o(),i(7,"input",68),A("ngModelChange",function(a){u(t);let _=S();return G(_.repeatPassphrase,a)||(_.repeatPassphrase=a),m(a)}),o(),C(8,At,2,0,"spk-icon",69)(9,$t,2,0,"spk-icon",70),o(),i(10,"div",48)(11,"button",71),p("click",function(){u(t);let a=S();return m(a.cancelPasswordChange())}),l(12,33),o(),C(13,vt,2,2,"button",72)(14,bt,2,3,"button",73),o()}if(s&2){let t=S();r(3),y("ngModel",t.passphrase),r(4),N("disabled",t.passphrase().length===0),y("ngModel",t.repeatPassphrase),r(),E(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?8:9),r(3),M("loader",t.isUpdating()),r(2),E(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?13:14)}}function kt(s,e){s&1&&(i(0,"spk-icon",76),O(1,"check"),o())}function Lt(s,e){if(s&1){let t=P();i(0,"div",48)(1,"button",71),p("click",function(){u(t);let a=S();return m(a.openPassphraseForm())}),l(2,36),o(),C(3,kt,2,0,"spk-icon",76),o()}if(s&2){let t=S();r(3),E(t.passwordUpdated()?3:-1)}}function Ft(s,e){if(s&1){let t=P();i(0,"spk-form-field")(1,"label",77),l(2,37),o(),i(3,"textarea",78),A("ngModelChange",function(a){u(t);let _=S();return G(_.allowedHostnames,a)||(_.allowedHostnames=a),m(a)}),o()(),i(4,"spk-alert",79),l(5,38),o(),i(6,"button",74),p("click",function(){u(t);let a=S();return m(a.updateAllowedHostnames())}),l(7,39),o()}if(s&2){let t=S();r(3),y("ngModel",t.allowedHostnames),r(3),M("loader",t.updatingAllowedHosts())}}function xt(s,e){if(s&1&&O(0),s&2){let t,n=S();B(" ",(t=n.sysinfo())==null?null:t.ServerVersion," ")}}function Dt(s,e){s&1&&I(0,"spk-progress-bar",53)}function Xt(s,e){if(s&1&&O(0),s&2){let t=e.$implicit;B(" ",t.label," ")}}function Vt(s,e){if(s&1&&O(0),s&2){let t=e.$implicit;B(" ",t.label," ")}}function zt(s,e,t){let n=ut(s),a=n[Ue];t?.equal&&(a.equal=t.equal);let _;return n.set=g=>{clearTimeout(_),_=setTimeout(()=>Be(a,g),e)},n.update=g=>{clearTimeout(_),_=setTimeout(()=>We(a,g),e)},n}var Ut=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],Bt=[{value:"none",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`}],_e=class s{#e=f(St);#t=f(Q);#o=f(k);#n=f(ne);#i=f(L);#s=f(tt);#a=this.#s.getItem("locale")??"en-US";sysinfo=this.#t.systemInfo;isDarkMode=this.#e.isDarkMode;editAs=c("list");previousLang=this.#a;langCtrl=c(this.#a);usageStatistics=c("");updatingUsageStatistics=c(!1);remoteControlStatus=this.#i.status;updatingChannel=c(!1);updateChannel=c("");setNewChannel(e){let t=this.updateChannel();this.updateChannel.set(e),this.#o.patchApiV1Serversettings({requestBody:{"update-channel":e}}).pipe(R(()=>this.updatingChannel.set(!1)),b(()=>(this.updateChannel.set(t),v(null)))).subscribe()}allowRemoteAccess=c(!1);allowedHostnames=c("");loadedAllowedHostnames=c("");updatingRemoteAccess=c(!1);updatingAllowedHosts=c(!1);updateRemoteAccess(){let e=this.allowRemoteAccess(),t=!e;this.allowRemoteAccess.set(t),this.#o.patchApiV1Serversettings({requestBody:{"server-listen-interface":t?"any":"loopback"}}).pipe(R(()=>this.updatingRemoteAccess.set(!1)),b(()=>(this.allowRemoteAccess.set(e),v(null)))).subscribe()}updateAllowedHostnames(){let e=this.loadedAllowedHostnames(),t=this.allowedHostnames();this.updatingAllowedHosts.set(!0),this.#o.patchApiV1Serversettings({requestBody:{"server-listen-interface":"any","allowed-hostnames":t}}).pipe(R(()=>this.updatingAllowedHosts.set(!1)),b(()=>(this.allowedHostnames.set(e),v(null)))).subscribe()}updatingDisableTrayIconLogin=c(!1);disableTrayIconLogin=c(!1);saveDisableTrayIconLogin(){let e=this.disableTrayIconLogin(),t=!e;this.updatingDisableTrayIconLogin.set(!0),this.disableTrayIconLogin.set(t),this.#o.patchApiV1Serversettings({requestBody:{"disable-tray-icon-login":t?"True":"False"}}).pipe(R(()=>this.updatingDisableTrayIconLogin.set(!1)),b(()=>(this.disableTrayIconLogin.set(e),v(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.#o.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(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)}languageOptions=c(Tt);usageStatisticsOptions=c(Bt);timeTypeOptions=c(Ut);timeType=c("none");timeValue=zt(0,300);timeRange=x(()=>this.timeType()==="h"?[0,24]:[0,60]);timeValueEffect=$(()=>{let e=this.timeValue(),t=this.#n.serverSettings();!t||t["startup-delay"]===""&&this.timeType()==="none"||this.updateStartupDelay()});updateLocale(e){!e||e===""||e===this.previousLang||(this.#s.setItem("locale",e),window.location.reload())}updateStartupDelay(){let e=this.timeValue(),t=this.timeType(),n="";t!=="none"&&e!==0&&(n=`${e}${t}`),this.#o.patchApiV1Serversettings({requestBody:{"startup-delay":n}}).subscribe()}updateTimeType(e){this.timeType()==="none"&&this.timeValue.set(0),this.timeType.set(e)}updateUsageStatistics(e){let t=this.usageStatistics();!e||e===""||e===t||(this.usageStatistics.set(e),this.updatingUsageStatistics.set(!0),this.#o.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.usageStatistics()==="none"?"":this.usageStatistics()}}).pipe(R(()=>this.updatingUsageStatistics.set(!1)),b(()=>(this.usageStatistics.set(t),v(null)))).subscribe())}serverSettingsEffect=$(()=>{let e=this.#n.serverSettings();if(e===void 0)return;let t=e["startup-delay"],n=t.slice(-1),a=t.slice(0,-1),_=["s","m","h"];this.disableTrayIconLogin.set(e["disable-tray-icon-login"]!=="False"),this.updateChannel.set(e["update-channel"]),this.allowRemoteAccess.set(e["server-listen-interface"]==="any"),this.allowedHostnames.set(e["allowed-hostnames"]),this.loadedAllowedHostnames.set(e["allowed-hostnames"]),this.usageStatistics.set(e["usage-reporter-level"]===""?"none":e["usage-reporter-level"]),this.timeType.set(t==""?"none":_.includes(n)?n:"none"),this.timeValue.set(t==""?0:parseInt(a))});setDarkMode(){this.#e.setDarkMode()}setLightMode(){this.#e.setLightMode()}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=w({type:s,selectors:[["app-settings"]],decls:132,vars:46,consts:()=>{let e;e=$localize`Settings`;let t;t=$localize`Configure your backup settings.`;let n;n=$localize`Remote access control`;let a;a=$localize`Color theme`;let _;_=$localize`Customize your application theme`;let g;g=$localize`Passwords`;let T;T=$localize`Change server passphrase`;let h;h=$localize`Language`;let de;de=$localize`Select a language for the platform`;let ce;ce=$localize`Allow remote access (requires restart)`;let Se;Se=$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 pe;pe=$localize`Allow remote access`;let Te;Te=$localize`Prevent tray icon automatic log-in`;let ge;ge=$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 ue;ue=$localize`Prevent tray icon automatic log-in`;let me;me=$localize`Update channel`;let Ce;Ce=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let Ee;Ee=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let fe;fe=$localize`Stable`;let Ne;Ne=$localize`Official releases`;let Me;Me=$localize`Beta`;let he;he=$localize` Try out the new features that we are working on. Currently the most stable version available. Test Restore data before using this in production environments. `;let Pe;Pe=$localize` Experimental `;let Oe;Oe=$localize`Specific builds for developers only. Not for use with important data.`;let Re;Re=$localize`Canary`;let Ie;Ie=$localize`Individual builds for developers only. Not for use with important data.`;let ye;ye=$localize`Pause after startup or hibernation`;let Ge;Ge=$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 Ae;Ae=$localize`Usage statistics`;let X;X=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#119\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#119\uFFFD"}:CLOSE_LINK:${"[\uFFFD#120\uFFFD\uFFFD/#120\uFFFD|\uFFFD#121\uFFFD\uFFFD/#121\uFFFD]"}:LINE_BREAK:${"[\uFFFD#120\uFFFD\uFFFD/#120\uFFFD|\uFFFD#121\uFFFD\uFFFD/#121\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. `,X=Qe(X);let $e;$e=$localize`Advanced options`;let ve;ve=$localize`Enter new password`;let be;be=$localize`Repeat password`;let oe;oe=$localize`Password have to be filled and have to match`;let we;we=$localize`Passphrase`;let ke;ke=$localize`Repeat passphrase`;let Le;Le=$localize`Cancel`;let Fe;Fe=$localize` Update passphrase `;let xe;xe=$localize` Update passphrase `;let De;De=$localize`Change password`;let Xe;Xe=$localize`Allowed hostnames`;let Ve;Ve=$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 ze;return ze=$localize` Update allowed hostnames `,[e,t,n,a,_,g,T,h,de,ce,Se,pe,Te,ge,ue,me,Ce,Ee,fe,Ne,Me,he,Pe,Oe,Re,Ie,ye,Ge,Ae,X,$e,we,ke,Le,Fe,xe,De,Xe,Ve,ze,[1,"content"],[1,"title"],[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,"options","isClearable","inlineSearch"],["type","text",3,"ngModelChange","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,"field-row"],[1,"raised","primary",3,"unit"],["type","range",3,"ngModelChange","min","max","disabled","ngModel","ngModelOptions"],["label","label","value","value",3,"options","isClearable"],["type","text",3,"ngModelChange","ngModel"],["href","#"],["label","label","value","value",3,"options","isLoading"],[1,"advanced-settings"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",ve,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",be,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"spk-success"],["suffix",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"loader"],["spk-button","","spkTooltip",oe,1,"raised","primary",3,"loader","disabled"],["spk-button","",1,"raised","primary",3,"click"],["spk-button","","spkTooltip",oe,1,"raised","primary",3,"click","disabled"],[1,"spk-success"],["for","allowedHostnames"],["type","text","id","allowedHostnames",3,"ngModelChange","ngModel"],["type","primary"]]},template:function(t,n){if(t&1&&(I(0,"app-status-bar"),i(1,"div",40)(2,"header")(3,"div",41)(4,"h2"),l(5,0),o(),i(6,"p"),l(7,1),o()()(),i(8,"section")(9,"div",42)(10,"h3"),l(11,2),o(),i(12,"p"),O(13),o()(),i(14,"div",43),I(15,"app-remote-control"),o()(),i(16,"section")(17,"div",42)(18,"h3"),l(19,3),o(),i(20,"p"),l(21,4),o()(),i(22,"div",43)(23,"div",44)(24,"img",45),p("click",function(){return n.setLightMode()}),o(),i(25,"img",46),p("click",function(){return n.setDarkMode()}),o()()()(),i(26,"section")(27,"div",42)(28,"h3"),l(29,5),o(),i(30,"p"),l(31,6),o()(),i(32,"div",47),C(33,wt,15,7)(34,Lt,4,1,"div",48),o()(),i(35,"section")(36,"div",42)(37,"h3"),l(38,7),o(),i(39,"p"),l(40,8),o()(),i(41,"div",43)(42,"spk-select",49)(43,"input",50),p("ngModelChange",function(_){return n.updateLocale(_)}),o()()()(),i(44,"section")(45,"div",42)(46,"h3"),l(47,9),o(),i(48,"p"),l(49,10),o()(),i(50,"div",51)(51,"spk-toggle",52),p("click",function(){return n.updateRemoteAccess()}),i(52,"label"),l(53,11),o()(),C(54,Ft,8,3),o()(),i(55,"section")(56,"div",42)(57,"h3"),l(58,12),o(),i(59,"p"),l(60,13),o()(),i(61,"div",43)(62,"spk-toggle",52),p("click",function(){return n.saveDisableTrayIconLogin()}),i(63,"label"),l(64,14),o()()()(),i(65,"section")(66,"div",42)(67,"h3"),l(68,15),o(),i(69,"p"),C(70,xt,1,1),o(),C(71,Dt,1,0,"spk-progress-bar",53),o(),i(72,"div",54)(73,"div",55),p("click",function(){return n.setNewChannel("")}),i(74,"spk-radio",56),l(75,16),o(),i(76,"p"),l(77,17),o()(),i(78,"div",55),p("click",function(){return n.setNewChannel("stable")}),i(79,"spk-radio",56),l(80,18),o(),i(81,"p"),l(82,19),o()(),i(83,"div",55),p("click",function(){return n.setNewChannel("beta")}),i(84,"spk-radio",56),l(85,20),o(),i(86,"p"),l(87,21),o()(),i(88,"div",55),p("click",function(){return n.setNewChannel("experimental")}),i(89,"spk-radio",56),l(90,22),o(),i(91,"p"),l(92,23),o()(),i(93,"div",55),p("click",function(){return n.setNewChannel("canary")}),i(94,"spk-radio",56),l(95,24),o(),i(96,"p"),l(97,25),o()()()()(),I(98,"spk-divider"),i(99,"div",40)(100,"section")(101,"div",42)(102,"h3"),l(103,26),o(),i(104,"p"),l(105,27),o()(),i(106,"div",43)(107,"div",57)(108,"spk-range-slider",58)(109,"input",59),A("ngModelChange",function(_){return G(n.timeValue,_)||(n.timeValue=_),_}),o()(),i(110,"spk-select",60)(111,"input",61),p("ngModelChange",function(_){return n.updateTimeType(_)}),o(),F(112,Xt,1,1,"ng-template"),o()()()(),i(113,"section")(114,"div",42)(115,"h3"),l(116,28),o(),i(117,"p"),V(118,29),I(119,"a",62)(120,"br")(121,"br"),z(),o()(),i(122,"div",43)(123,"spk-select",63)(124,"input",50),p("ngModelChange",function(_){return n.updateUsageStatistics(_)}),o(),F(125,Vt,1,1,"ng-template"),o()()()(),i(126,"div",40)(127,"section")(128,"div",64)(129,"h3"),l(130,30),o(),I(131,"app-advanced-options-settings"),o()()()),t&2){let a,_,g;r(13),U(n.remoteControlStatus()),r(11),M("active",!n.isDarkMode()),r(),M("active",n.isDarkMode()),r(8),E(n.showPassphraseForm()?33:34),r(9),N("options",n.languageOptions())("isClearable",!1)("inlineSearch",!0),r(),N("ngModel",n.langCtrl())("ngModelOptions",W(43,re)),r(8),M("active",n.allowRemoteAccess()),r(3),E(n.allowRemoteAccess()?54:-1),r(8),M("active",n.disableTrayIconLogin()),r(8),E(n.updateChannel()!==""&&((a=n.sysinfo())!=null&&a.ServerVersion)?70:-1),r(),E(n.updatingChannel()?71:-1),r(3),M("active",n.updateChannel()===""),r(),se((_=n.sysinfo())==null?null:_.DefaultUpdateChannel),ae(75),r(2),se((g=n.sysinfo())==null?null:g.ServerVersionType),ae(77),r(2),M("active",n.updateChannel()==="stable"),r(5),M("active",n.updateChannel()==="beta"),r(5),M("active",n.updateChannel()==="experimental"),r(5),M("active",n.updateChannel()==="canary"),r(14),N("unit",n.timeType()==="none"?"s":n.timeType()),r(),N("min",n.timeRange()[0])("max",n.timeRange()[1])("disabled",n.timeType()==="none"),y("ngModel",n.timeValue),N("ngModelOptions",W(44,re)),r(),N("options",n.timeTypeOptions())("isClearable",!1),r(),N("ngModel",n.timeType()),r(12),N("options",n.usageStatisticsOptions())("isLoading",n.updatingUsageStatistics()),r(),N("ngModel",n.usageStatistics())("ngModelOptions",W(45,re))}},dependencies:[ee,Z,ct,J,Y,te,pt,ie,D,j,st,at,ot,rt,_t,K,H,it,q,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-1);z-index:1000;border-bottom:1px solid var(--base-4)}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-4)}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:15rem;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-8);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-9)}.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{zt as debounceSignal,_e as default};
1
+ import{a as ne}from"./chunk-L6BZ6TEU.js";import{a as pt}from"./chunk-CFESUDFC.js";import"./chunk-67XQIEG5.js";import{a as Tt}from"./chunk-WZDQFHUJ.js";import{a as St}from"./chunk-PL2MNRTA.js";import"./chunk-NZD6UMYZ.js";import"./chunk-B6DE3TTE.js";import"./chunk-VFVXE2DC.js";import{a as dt}from"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import{a as Q}from"./chunk-BHSG643V.js";import"./chunk-3Q5JEF3K.js";import{c as Z,e as J,i as Y,m as ct,s as ee,t as te}from"./chunk-ZCT7SRIM.js";import{a as tt}from"./chunk-OQHMS5HM.js";import"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{A as rt,C as _t,a as H,b as q,e as nt,g as j,k as it,l as K,p as ot,q as st,r as at,t as lt}from"./chunk-DNBOZ26J.js";import{h as k}from"./chunk-XD6MBGQY.js";import"./chunk-4VPA3END.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-JDCGGJ7O.js";import{B as b,Bb as P,F as R,Fc as x,Gc as $,Hb as V,Ib as z,Jb as l,Kb as se,La as qe,Lb as ae,Mb as Qe,Mc as et,Nb as p,Oa as r,Ob as S,S as He,Wb as Ze,X as f,Xb as Je,_a as w,_b as M,a as Ue,b as Be,ba as u,bc as O,c as We,ca as m,cc as U,db as F,dc as B,gc as y,hc as G,ic as A,la as c,mb as je,mc as Ye,n as v,nb as Ke,pb as C,qb as E,qc as W,ub as N,vb as i,wb as o,xb as I}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var mt=["formRef"],Ct=()=>[import("./chunk-O3JEFNCL.js").then(s=>s.OptionsListComponent)];function Et(s,e){s&1&&(i(0,"spk-alert",3),l(1,1),o())}function ft(s,e){if(s&1){let t=P();i(0,"app-options-list",5),A("optionsChange",function(a){u(t);let _=S();return G(_.settings,a)||(_.settings=a),m(a)}),o()}if(s&2){let t=S();y("options",t.settings),N("hasFreeTextSettings",!0)}}var Nt=["Bytes","KB","MB","GB","TB","PB"],D=class s{#e=f(ne);#t=f(k);formRef=et.required("formRef");settings=c([]);isSubmitting=c(!1);isLoadingOptions=c(!0);saved=c(!1);sizeOptions=c(Nt);lastRecievedServerSettings=c({});serverSettingsEffect=$(()=>{let e=this.#e.serverSettings();if(e===void 0)return;this.lastRecievedServerSettings.set(e),this.isLoadingOptions.set(!0);let t=Object.entries(e);t.forEach(([n,a],_)=>{if(n.startsWith("--")){let g=n.replace("--","");this.settings.update(T=>(T.some(h=>h.Name===g)||T.push({Name:g,Value:a}),T))}_===t.length-1&&this.isLoadingOptions.set(!1)})});submit(){this.isSubmitting.set(!0);let e=this.settings(),t=this.lastRecievedServerSettings(),n=e.map(T=>T.Name),_=Object.keys(t).filter(T=>T.startsWith("--")).filter(T=>!n.includes(T.replace("--",""))),g=e.reduce((T,h)=>(T[`--${h.Name}`]=h.Value,T),{});_.forEach(T=>{g[T]=null}),this.#t.patchApiV1Serversettings({requestBody:g}).pipe(R(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#e.refreshServerSettings(),this.saved.set(!0),setTimeout(()=>{this.saved.set(!1)},3e3)}})}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=w({type:s,selectors:[["app-advanced-options-settings"]],viewQuery:function(t,n){t&1&&Ze(n.formRef,mt,5),t&2&&Je()},decls:8,vars:4,consts:()=>{let e;e=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON: Save settings `;let t;return t=$localize`Settings saved`,[e,t,[1,"actions"],[1,"success"],["spk-button","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings"]]},template:function(t,n){t&1&&(i(0,"div",2),C(1,Et,2,0,"spk-alert",3),i(2,"button",4),p("click",function(){return n.submit()}),V(3,0),I(4,"spk-icon"),z(),o()(),F(5,ft,1,2),je(6,5,Ct)),t&2&&(r(),E(n.saved()?1:-1),r(),M("loader",n.isSubmitting()),r(4),Ke(!n.isLoadingOptions()))},dependencies:[te,j,H,q],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-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 2.5rem;align-items:flex-end}"],changeDetection:0})};var L=class s{#e=f(nt);#t=f(k);#o=f(Q);repeatRegisterTimer=null;state=c("unknown");claimUrl=c(null);registerUrl=c("");status=x(()=>{let e=this.state();return e==="enabled"?"Remote control is enabled but not connected":e==="connected"?"Remote control is connected":e==="registering"?"Registering machine...":e==="registeringfaulted"?"Registration failed":e==="registered"?"Registered, waiting for accept":e==="disabled"?"Remote control is configured but not enabled":e==="unknown"?"...loading...":"Remote control is not set up"});sysInfoEffect=$(()=>{let e=this.#o.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"")});#n(e){e.RegistrationUrl&&this.claimUrl.set(e.RegistrationUrl),e.IsConnected?this.state.set("connected"):e.IsEnabled?this.state.set("enabled"):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 t=this.state();this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),t==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:n=>this.#n(n),error:n=>this.#i(n)})},5e3)),(t==="enabled"||t==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.getApiV1RemotecontrolStatus().subscribe({next:n=>this.#n(n),error:n=>this.#i(n)})},5e3)),e.IsRegistering&&e.CanEnable&&this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:n=>this.#n(n)})}#i(e){this.#t.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#n(t)})}refreshRemoteControlStatus(){this.#t.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#n(e),error:e=>this.#i(e)})}beginRemoteRegistration(){this.state.set("registering"),this.#t.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:this.registerUrl()}}).subscribe({next:e=>this.#n(e),error:e=>this.#i(e)})}cancelRemoteRegistration(){this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#n(e),error:e=>this.#i(e)})}enableRemoteControl(){this.#t.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#n(e),error:e=>this.#i(e)})}disableRemoteControl(){this.#t.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#n(e),error:e=>this.#i(e)})}deleteRemoteControl(){let e=this;this.#e.open(dt,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete the remote control registration?`,confirmText:$localize`Delete registration`,cancelText:$localize`Cancel`},closed:t=>{t&&e.#t.deleteApiV1RemotecontrolRegistration().subscribe({next:n=>e.#n(n),error:n=>e.#i(n)})}})}static \u0275fac=function(t){return new(t||s)};static \u0275prov=He({token:s,factory:s.\u0275fac,providedIn:"root"})};function ht(s,e){if(s&1){let t=P();i(0,"spk-form-field",10)(1,"input",11),A("ngModelChange",function(a){u(t);let _=S(2);return G(_.registerUrl,a)||(_.registerUrl=a),m(a)}),o()(),i(2,"button",12),p("click",function(){u(t);let a=S(2);return m(a.register())}),l(3,0),o()}if(s&2){let t=S(2);r(),y("ngModel",t.registerUrl)}}function Pt(s,e){if(s&1&&(i(0,"div",8)(1,"label"),l(2,1),o(),i(3,"a",13),O(4),o()()),s&2){let t=S(2);r(3),N("href",Ye(t.claimUrl()),qe),r(),U(t.claimUrl())}}function Ot(s,e){s&1&&(i(0,"div",8)(1,"label"),l(2,2),o()())}function Rt(s,e){if(s&1){let t=P();i(0,"button",12),p("click",function(){u(t);let a=S(2);return m(a.cancel())}),l(1,3),o()}}function It(s,e){if(s&1){let t=P();i(0,"button",12),p("click",function(){u(t);let a=S(2);return m(a.disable())}),l(1,4),o()}}function yt(s,e){if(s&1){let t=P();i(0,"button",12),p("click",function(){u(t);let a=S(2);return m(a.enable())}),l(1,5),o(),i(2,"button",14),p("click",function(){u(t);let a=S(2);return m(a.delete())}),l(3,6),o()}}function Gt(s,e){if(s&1&&(i(0,"div",7),C(1,ht,4,1),C(2,Pt,5,3,"div",8),C(3,Ot,3,0,"div",8),C(4,Rt,2,0,"button",9),C(5,It,2,0,"button",9),C(6,yt,4,0),o()),s&2){let t=S();r(),E(t.state()==="inactive"?1:-1),r(),E(t.state()==="registered"?2:-1),r(),E(t.state()==="registering"?3:-1),r(),E(t.state()==="registering"||t.state()==="registeringfaulted"||t.state()==="registered"?4:-1),r(),E(t.state()==="connected"||t.state()==="enabled"?5:-1),r(),E(t.state()==="disabled"?6:-1)}}var ie=class s{#e=f(L);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(t){return new(t||s)};static \u0275cmp=w({type:s,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let e;e=$localize`Register for remote control`;let t;t=$localize`Machine is now registered, open this link to add it to your account:`;let n;n=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let _;_=$localize`Disable remote control`;let g;g=$localize`Enable remote control`;let T;return T=$localize`Delete remote control setup`,[e,t,n,a,_,g,T,[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(t,n){t&1&&C(0,Gt,7,6,"div",7),t&2&&E(n.state()!=="unknown"?0:-1)},dependencies:[ee,Z,J,Y,K],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})};function ut(...s){let e=c(...s);return Object.defineProperty(e,"value",{get:e.asReadonly(),set:e.set.bind(e)})}var re=()=>({standalone:!0});function At(s,e){s&1&&(i(0,"spk-icon",69),O(1,"check"),o())}function $t(s,e){s&1&&(i(0,"spk-icon",70),O(1,"prohibit"),o())}function vt(s,e){if(s&1){let t=P();i(0,"button",74),p("click",function(){u(t);let a=S(2);return m(a.updatePassphrase())}),l(1,34),o()}if(s&2){let t=S(2);M("loader",t.isUpdating())}}function bt(s,e){if(s&1){let t=P();i(0,"button",75),p("click",function(){u(t);let a=S(2);return m(a.updatePassphrase())}),l(1,35),o()}if(s&2){let t=S(2);M("loader",t.isUpdating()),N("disabled",!0)}}function wt(s,e){if(s&1){let t=P();i(0,"spk-form-field")(1,"label",65),l(2,31),o(),i(3,"input",66),A("ngModelChange",function(a){u(t);let _=S();return G(_.passphrase,a)||(_.passphrase=a),m(a)}),o()(),i(4,"spk-form-field")(5,"label",67),l(6,32),o(),i(7,"input",68),A("ngModelChange",function(a){u(t);let _=S();return G(_.repeatPassphrase,a)||(_.repeatPassphrase=a),m(a)}),o(),C(8,At,2,0,"spk-icon",69)(9,$t,2,0,"spk-icon",70),o(),i(10,"div",48)(11,"button",71),p("click",function(){u(t);let a=S();return m(a.cancelPasswordChange())}),l(12,33),o(),C(13,vt,2,2,"button",72)(14,bt,2,3,"button",73),o()}if(s&2){let t=S();r(3),y("ngModel",t.passphrase),r(4),N("disabled",t.passphrase().length===0),y("ngModel",t.repeatPassphrase),r(),E(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?8:9),r(3),M("loader",t.isUpdating()),r(2),E(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?13:14)}}function kt(s,e){s&1&&(i(0,"spk-icon",76),O(1,"check"),o())}function Lt(s,e){if(s&1){let t=P();i(0,"div",48)(1,"button",71),p("click",function(){u(t);let a=S();return m(a.openPassphraseForm())}),l(2,36),o(),C(3,kt,2,0,"spk-icon",76),o()}if(s&2){let t=S();r(3),E(t.passwordUpdated()?3:-1)}}function Ft(s,e){if(s&1){let t=P();i(0,"spk-form-field")(1,"label",77),l(2,37),o(),i(3,"textarea",78),A("ngModelChange",function(a){u(t);let _=S();return G(_.allowedHostnames,a)||(_.allowedHostnames=a),m(a)}),o()(),i(4,"spk-alert",79),l(5,38),o(),i(6,"button",74),p("click",function(){u(t);let a=S();return m(a.updateAllowedHostnames())}),l(7,39),o()}if(s&2){let t=S();r(3),y("ngModel",t.allowedHostnames),r(3),M("loader",t.updatingAllowedHosts())}}function xt(s,e){if(s&1&&O(0),s&2){let t,n=S();B(" ",(t=n.sysinfo())==null?null:t.ServerVersion," ")}}function Dt(s,e){s&1&&I(0,"spk-progress-bar",53)}function Xt(s,e){if(s&1&&O(0),s&2){let t=e.$implicit;B(" ",t.label," ")}}function Vt(s,e){if(s&1&&O(0),s&2){let t=e.$implicit;B(" ",t.label," ")}}function zt(s,e,t){let n=ut(s),a=n[Ue];t?.equal&&(a.equal=t.equal);let _;return n.set=g=>{clearTimeout(_),_=setTimeout(()=>Be(a,g),e)},n.update=g=>{clearTimeout(_),_=setTimeout(()=>We(a,g),e)},n}var Ut=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],Bt=[{value:"none",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`}],_e=class s{#e=f(St);#t=f(Q);#o=f(k);#n=f(ne);#i=f(L);#s=f(tt);#a=this.#s.getItem("locale")??"en-US";sysinfo=this.#t.systemInfo;isDarkMode=this.#e.isDarkMode;editAs=c("list");previousLang=this.#a;langCtrl=c(this.#a);usageStatistics=c("");updatingUsageStatistics=c(!1);remoteControlStatus=this.#i.status;updatingChannel=c(!1);updateChannel=c("");setNewChannel(e){let t=this.updateChannel();this.updateChannel.set(e),this.#o.patchApiV1Serversettings({requestBody:{"update-channel":e}}).pipe(R(()=>this.updatingChannel.set(!1)),b(()=>(this.updateChannel.set(t),v(null)))).subscribe()}allowRemoteAccess=c(!1);allowedHostnames=c("");loadedAllowedHostnames=c("");updatingRemoteAccess=c(!1);updatingAllowedHosts=c(!1);updateRemoteAccess(){let e=this.allowRemoteAccess(),t=!e;this.allowRemoteAccess.set(t),this.#o.patchApiV1Serversettings({requestBody:{"server-listen-interface":t?"any":"loopback"}}).pipe(R(()=>this.updatingRemoteAccess.set(!1)),b(()=>(this.allowRemoteAccess.set(e),v(null)))).subscribe()}updateAllowedHostnames(){let e=this.loadedAllowedHostnames(),t=this.allowedHostnames();this.updatingAllowedHosts.set(!0),this.#o.patchApiV1Serversettings({requestBody:{"server-listen-interface":"any","allowed-hostnames":t}}).pipe(R(()=>this.updatingAllowedHosts.set(!1)),b(()=>(this.allowedHostnames.set(e),v(null)))).subscribe()}updatingDisableTrayIconLogin=c(!1);disableTrayIconLogin=c(!1);saveDisableTrayIconLogin(){let e=this.disableTrayIconLogin(),t=!e;this.updatingDisableTrayIconLogin.set(!0),this.disableTrayIconLogin.set(t),this.#o.patchApiV1Serversettings({requestBody:{"disable-tray-icon-login":t?"True":"False"}}).pipe(R(()=>this.updatingDisableTrayIconLogin.set(!1)),b(()=>(this.disableTrayIconLogin.set(e),v(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.#o.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(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)}languageOptions=c(Tt);usageStatisticsOptions=c(Bt);timeTypeOptions=c(Ut);timeType=c("none");timeValue=zt(0,300);timeRange=x(()=>this.timeType()==="h"?[0,24]:[0,60]);timeValueEffect=$(()=>{let e=this.timeValue(),t=this.#n.serverSettings();!t||t["startup-delay"]===""&&this.timeType()==="none"||this.updateStartupDelay()});updateLocale(e){!e||e===""||e===this.previousLang||(this.#s.setItem("locale",e),window.location.reload())}updateStartupDelay(){let e=this.timeValue(),t=this.timeType(),n="";t!=="none"&&e!==0&&(n=`${e}${t}`),this.#o.patchApiV1Serversettings({requestBody:{"startup-delay":n}}).subscribe()}updateTimeType(e){this.timeType()==="none"&&this.timeValue.set(0),this.timeType.set(e)}updateUsageStatistics(e){let t=this.usageStatistics();!e||e===""||e===t||(this.usageStatistics.set(e),this.updatingUsageStatistics.set(!0),this.#o.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.usageStatistics()==="none"?"":this.usageStatistics()}}).pipe(R(()=>this.updatingUsageStatistics.set(!1)),b(()=>(this.usageStatistics.set(t),v(null)))).subscribe())}serverSettingsEffect=$(()=>{let e=this.#n.serverSettings();if(e===void 0)return;let t=e["startup-delay"],n=t.slice(-1),a=t.slice(0,-1),_=["s","m","h"];this.disableTrayIconLogin.set(e["disable-tray-icon-login"]!=="False"),this.updateChannel.set(e["update-channel"]),this.allowRemoteAccess.set(e["server-listen-interface"]==="any"),this.allowedHostnames.set(e["allowed-hostnames"]),this.loadedAllowedHostnames.set(e["allowed-hostnames"]),this.usageStatistics.set(e["usage-reporter-level"]===""?"none":e["usage-reporter-level"]),this.timeType.set(t==""?"none":_.includes(n)?n:"none"),this.timeValue.set(t==""?0:parseInt(a))});setDarkMode(){this.#e.setDarkMode()}setLightMode(){this.#e.setLightMode()}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=w({type:s,selectors:[["app-settings"]],decls:132,vars:46,consts:()=>{let e;e=$localize`Settings`;let t;t=$localize`Configure your backup settings.`;let n;n=$localize`Remote access control`;let a;a=$localize`Color theme`;let _;_=$localize`Customize your application theme`;let g;g=$localize`Passwords`;let T;T=$localize`Change server passphrase`;let h;h=$localize`Language`;let de;de=$localize`Select a language for the platform`;let ce;ce=$localize`Allow remote access (requires restart)`;let Se;Se=$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 pe;pe=$localize`Allow remote access`;let Te;Te=$localize`Prevent tray icon automatic log-in`;let ge;ge=$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 ue;ue=$localize`Prevent tray icon automatic log-in`;let me;me=$localize`Update channel`;let Ce;Ce=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let Ee;Ee=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let fe;fe=$localize`Stable`;let Ne;Ne=$localize`Official releases`;let Me;Me=$localize`Beta`;let he;he=$localize` Try out the new features that we are working on. Currently the most stable version available. Test Restore data before using this in production environments. `;let Pe;Pe=$localize` Experimental `;let Oe;Oe=$localize`Specific builds for developers only. Not for use with important data.`;let Re;Re=$localize`Canary`;let Ie;Ie=$localize`Individual builds for developers only. Not for use with important data.`;let ye;ye=$localize`Pause after startup or hibernation`;let Ge;Ge=$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 Ae;Ae=$localize`Usage statistics`;let X;X=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#119\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#119\uFFFD"}:CLOSE_LINK:${"[\uFFFD#120\uFFFD\uFFFD/#120\uFFFD|\uFFFD#121\uFFFD\uFFFD/#121\uFFFD]"}:LINE_BREAK:${"[\uFFFD#120\uFFFD\uFFFD/#120\uFFFD|\uFFFD#121\uFFFD\uFFFD/#121\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. `,X=Qe(X);let $e;$e=$localize`Advanced options`;let ve;ve=$localize`Enter new password`;let be;be=$localize`Repeat password`;let oe;oe=$localize`Password have to be filled and have to match`;let we;we=$localize`Passphrase`;let ke;ke=$localize`Repeat passphrase`;let Le;Le=$localize`Cancel`;let Fe;Fe=$localize` Update passphrase `;let xe;xe=$localize` Update passphrase `;let De;De=$localize`Change password`;let Xe;Xe=$localize`Allowed hostnames`;let Ve;Ve=$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 ze;return ze=$localize` Update allowed hostnames `,[e,t,n,a,_,g,T,h,de,ce,Se,pe,Te,ge,ue,me,Ce,Ee,fe,Ne,Me,he,Pe,Oe,Re,Ie,ye,Ge,Ae,X,$e,we,ke,Le,Fe,xe,De,Xe,Ve,ze,[1,"content"],[1,"title"],[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,"options","isClearable","inlineSearch"],["type","text",3,"ngModelChange","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,"field-row"],[1,"raised","primary",3,"unit"],["type","range",3,"ngModelChange","min","max","disabled","ngModel","ngModelOptions"],["label","label","value","value",3,"options","isClearable"],["type","text",3,"ngModelChange","ngModel"],["href","#"],["label","label","value","value",3,"options","isLoading"],[1,"advanced-settings"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",ve,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",be,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"spk-success"],["suffix",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"loader"],["spk-button","","spkTooltip",oe,1,"raised","primary",3,"loader","disabled"],["spk-button","",1,"raised","primary",3,"click"],["spk-button","","spkTooltip",oe,1,"raised","primary",3,"click","disabled"],[1,"spk-success"],["for","allowedHostnames"],["type","text","id","allowedHostnames",3,"ngModelChange","ngModel"],["type","primary"]]},template:function(t,n){if(t&1&&(I(0,"app-status-bar"),i(1,"div",40)(2,"header")(3,"div",41)(4,"h2"),l(5,0),o(),i(6,"p"),l(7,1),o()()(),i(8,"section")(9,"div",42)(10,"h3"),l(11,2),o(),i(12,"p"),O(13),o()(),i(14,"div",43),I(15,"app-remote-control"),o()(),i(16,"section")(17,"div",42)(18,"h3"),l(19,3),o(),i(20,"p"),l(21,4),o()(),i(22,"div",43)(23,"div",44)(24,"img",45),p("click",function(){return n.setLightMode()}),o(),i(25,"img",46),p("click",function(){return n.setDarkMode()}),o()()()(),i(26,"section")(27,"div",42)(28,"h3"),l(29,5),o(),i(30,"p"),l(31,6),o()(),i(32,"div",47),C(33,wt,15,7)(34,Lt,4,1,"div",48),o()(),i(35,"section")(36,"div",42)(37,"h3"),l(38,7),o(),i(39,"p"),l(40,8),o()(),i(41,"div",43)(42,"spk-select",49)(43,"input",50),p("ngModelChange",function(_){return n.updateLocale(_)}),o()()()(),i(44,"section")(45,"div",42)(46,"h3"),l(47,9),o(),i(48,"p"),l(49,10),o()(),i(50,"div",51)(51,"spk-toggle",52),p("click",function(){return n.updateRemoteAccess()}),i(52,"label"),l(53,11),o()(),C(54,Ft,8,3),o()(),i(55,"section")(56,"div",42)(57,"h3"),l(58,12),o(),i(59,"p"),l(60,13),o()(),i(61,"div",43)(62,"spk-toggle",52),p("click",function(){return n.saveDisableTrayIconLogin()}),i(63,"label"),l(64,14),o()()()(),i(65,"section")(66,"div",42)(67,"h3"),l(68,15),o(),i(69,"p"),C(70,xt,1,1),o(),C(71,Dt,1,0,"spk-progress-bar",53),o(),i(72,"div",54)(73,"div",55),p("click",function(){return n.setNewChannel("")}),i(74,"spk-radio",56),l(75,16),o(),i(76,"p"),l(77,17),o()(),i(78,"div",55),p("click",function(){return n.setNewChannel("stable")}),i(79,"spk-radio",56),l(80,18),o(),i(81,"p"),l(82,19),o()(),i(83,"div",55),p("click",function(){return n.setNewChannel("beta")}),i(84,"spk-radio",56),l(85,20),o(),i(86,"p"),l(87,21),o()(),i(88,"div",55),p("click",function(){return n.setNewChannel("experimental")}),i(89,"spk-radio",56),l(90,22),o(),i(91,"p"),l(92,23),o()(),i(93,"div",55),p("click",function(){return n.setNewChannel("canary")}),i(94,"spk-radio",56),l(95,24),o(),i(96,"p"),l(97,25),o()()()()(),I(98,"spk-divider"),i(99,"div",40)(100,"section")(101,"div",42)(102,"h3"),l(103,26),o(),i(104,"p"),l(105,27),o()(),i(106,"div",43)(107,"div",57)(108,"spk-range-slider",58)(109,"input",59),A("ngModelChange",function(_){return G(n.timeValue,_)||(n.timeValue=_),_}),o()(),i(110,"spk-select",60)(111,"input",61),p("ngModelChange",function(_){return n.updateTimeType(_)}),o(),F(112,Xt,1,1,"ng-template"),o()()()(),i(113,"section")(114,"div",42)(115,"h3"),l(116,28),o(),i(117,"p"),V(118,29),I(119,"a",62)(120,"br")(121,"br"),z(),o()(),i(122,"div",43)(123,"spk-select",63)(124,"input",50),p("ngModelChange",function(_){return n.updateUsageStatistics(_)}),o(),F(125,Vt,1,1,"ng-template"),o()()()(),i(126,"div",40)(127,"section")(128,"div",64)(129,"h3"),l(130,30),o(),I(131,"app-advanced-options-settings"),o()()()),t&2){let a,_,g;r(13),U(n.remoteControlStatus()),r(11),M("active",!n.isDarkMode()),r(),M("active",n.isDarkMode()),r(8),E(n.showPassphraseForm()?33:34),r(9),N("options",n.languageOptions())("isClearable",!1)("inlineSearch",!0),r(),N("ngModel",n.langCtrl())("ngModelOptions",W(43,re)),r(8),M("active",n.allowRemoteAccess()),r(3),E(n.allowRemoteAccess()?54:-1),r(8),M("active",n.disableTrayIconLogin()),r(8),E(n.updateChannel()!==""&&((a=n.sysinfo())!=null&&a.ServerVersion)?70:-1),r(),E(n.updatingChannel()?71:-1),r(3),M("active",n.updateChannel()===""),r(),se((_=n.sysinfo())==null?null:_.DefaultUpdateChannel),ae(75),r(2),se((g=n.sysinfo())==null?null:g.ServerVersionType),ae(77),r(2),M("active",n.updateChannel()==="stable"),r(5),M("active",n.updateChannel()==="beta"),r(5),M("active",n.updateChannel()==="experimental"),r(5),M("active",n.updateChannel()==="canary"),r(14),N("unit",n.timeType()==="none"?"s":n.timeType()),r(),N("min",n.timeRange()[0])("max",n.timeRange()[1])("disabled",n.timeType()==="none"),y("ngModel",n.timeValue),N("ngModelOptions",W(44,re)),r(),N("options",n.timeTypeOptions())("isClearable",!1),r(),N("ngModel",n.timeType()),r(12),N("options",n.usageStatisticsOptions())("isLoading",n.updatingUsageStatistics()),r(),N("ngModel",n.usageStatistics())("ngModelOptions",W(45,re))}},dependencies:[ee,Z,ct,J,Y,te,pt,ie,D,j,st,at,ot,rt,_t,K,H,it,q,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-1);z-index:1000;border-bottom:1px solid var(--base-4)}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-4)}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:15rem;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-8);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-9)}.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{zt as debounceSignal,_e as default};
@@ -1,2 +1,2 @@
1
1
  import{wa as T}from"./chunk-GP2W7XZF.js";var d=":",x="|",z="@@",v="\u241F",E;function N(e){E??=new TextEncoder;let t=E.encode(e),n=new DataView(t.buffer,t.byteOffset,t.byteLength),s=$(n,t.length,0),l=$(n,t.length,102072);return s==0&&(l==0||l==1)&&(s=s^319790063,l=l^-1801410264),BigInt.asUintN(32,BigInt(s))<<BigInt(32)|BigInt.asUintN(32,BigInt(l))}function C(e,t=""){let n=N(e);return t&&(n=BigInt.asUintN(64,n<<BigInt(1))|n>>BigInt(63)&BigInt(1),n+=N(t)),BigInt.asUintN(63,n).toString()}function $(e,t,n){let s=2654435769,l=2654435769,a=0,o=t-12;for(;a<=o;a+=12){s+=e.getUint32(a,!0),l+=e.getUint32(a+4,!0),n+=e.getUint32(a+8,!0);let i=R(s,l,n);s=i[0],l=i[1],n=i[2]}let r=t-a;return n+=t,r>=4?(s+=e.getUint32(a,!0),a+=4,r>=8?(l+=e.getUint32(a,!0),a+=4,r>=9&&(n+=e.getUint8(a++)<<8),r>=10&&(n+=e.getUint8(a++)<<16),r===11&&(n+=e.getUint8(a++)<<24)):(r>=5&&(l+=e.getUint8(a++)),r>=6&&(l+=e.getUint8(a++)<<8),r===7&&(l+=e.getUint8(a++)<<16))):(r>=1&&(s+=e.getUint8(a++)),r>=2&&(s+=e.getUint8(a++)<<8),r===3&&(s+=e.getUint8(a++)<<16)),R(s,l,n)[2]}function R(e,t,n){return e-=t,e-=n,e^=n>>>13,t-=n,t-=e,t^=e<<8,n-=e,n-=t,n^=t>>>13,e-=t,e-=n,e^=n>>>12,t-=n,t-=e,t^=e<<16,n-=e,n-=t,n^=t>>>5,e-=t,e-=n,e^=n>>>3,t-=n,t-=e,t^=e<<10,n-=e,n-=t,n^=t>>>15,[e,t,n]}function B(e,t,n,s,l=[]){let a={},o={},r={},i=y(e[0],e.raw[0]),u=[i.text],I=[],h=i.text;for(let c=1;c<e.length;c++){let{messagePart:S,placeholderName:f=P(c),associatedMessageId:A}=j(e[c],e.raw[c]);h+=`{$${f}}${S}`,t!==void 0&&(a[f]=t[c-1],o[f]=l[c-1]),I.push(f),A!==void 0&&(r[f]=A),u.push(S)}let L=i.customId||C(h,i.meaning||""),M=i.legacyIds?i.legacyIds.filter(c=>c!==L):[];return{id:L,legacyIds:M,substitutions:a,substitutionLocations:o,text:h,customId:i.customId,meaning:i.meaning||"",description:i.description||"",messageParts:u,messagePartLocations:s,placeholderNames:I,associatedMessageIds:r,location:n}}function y(e,t){let{text:n,block:s}=O(e,t);if(s===void 0)return{text:n};{let[l,...a]=s.split(v),[o,r]=l.split(z,2),[i,u]=o.split(x,2);return u===void 0&&(u=i,i=void 0),u===""&&(u=void 0),{text:n,meaning:i,description:u,customId:r,legacyIds:a}}}function j(e,t){let{text:n,block:s}=O(e,t);if(s===void 0)return{messagePart:n};{let[l,a]=s.split(z);return{messagePart:n,placeholderName:l,associatedMessageId:a}}}function O(e,t){if(t.charAt(0)!==d)return{text:e};{let n=_(e,t);return{block:e.substring(1,n),text:e.substring(n+1)}}}function P(e){return e===1?"PH":`PH_${e-1}`}function _(e,t){for(let n=1,s=1;n<e.length;n++,s++)if(t[s]==="\\")s++;else if(e[n]===d)return n;throw new Error(`Unterminated $localize metadata block in "${t}".`)}var m=class extends Error{parsedMessage;type="MissingTranslationError";constructor(t){super(`No translation found for ${U(t)}.`),this.parsedMessage=t}};function D(e,t,n){let s=B(t,n),l=e[s.id];if(s.legacyIds!==void 0)for(let a=0;a<s.legacyIds.length&&l===void 0;a++)l=e[s.legacyIds[a]];if(l===void 0)throw new m(s);return[l.messageParts,l.placeholderNames.map(a=>{if(s.substitutions.hasOwnProperty(a))return s.substitutions[a];throw new Error(`There is a placeholder name mismatch with the translation provided for the message ${U(s)}.
2
- The translation contains a placeholder with name ${a}, which does not exist in the message.`)})]}function k(e){let t=e.split(/{\$([^}]*)}/),n=[t[0]],s=[];for(let a=1;a<t.length-1;a+=2)s.push(t[a]),n.push(`${t[a+1]}`);let l=n.map(a=>a.charAt(0)===d?"\\"+a:a);return{text:e,messageParts:G(n,l),placeholderNames:s}}function G(e,t){return Object.defineProperty(e,"raw",{value:t}),e}function U(e){let t=e.meaning&&` - "${e.meaning}"`,n=e.legacyIds&&e.legacyIds.length>0?` [${e.legacyIds.map(s=>`"${s}"`).join(", ")}]`:"";return`"${e.id}"${n} ("${e.text}"${t})`}function b(e){$localize.translate||($localize.translate=K),$localize.TRANSLATIONS||($localize.TRANSLATIONS={}),Object.keys(e).forEach(t=>{$localize.TRANSLATIONS[t]=k(e[t])})}function K(e,t){try{return D($localize.TRANSLATIONS,e,t)}catch(n){return console.warn(n.message),[e,t]}}var g="en-US",Y=[{value:"en",label:"English (en-US)"},{value:"en-GB",label:"English (en-GB)"},{value:"cs",label:"Czech (cs)"},{value:"da",label:"Danish (da)"},{value:"de",label:"German (de)"},{value:"es",label:"Spanish (es)"},{value:"fi",label:"Finnish (fi)"},{value:"fr",label:"French (fr)"},{value:"hu",label:"Hungarian (hu)"},{value:"it",label:"Italian (it)"},{value:"ja-JP",label:"Japanese (ja-JP)"},{value:"nl-NL",label:"Dutch (nl-NL)"},{value:"pl",label:"Polish (pl)"},{value:"pt-BR",label:"Portuguese (pt-BR)"},{value:"pt",label:"Portuguese (pt)"},{value:"ru",label:"Russian (ru)"},{value:"sr-RS",label:"Serbian (sr-RS)"},{value:"sv-SE",label:"Swedish (sv-SE)"},{value:"zh-CN",label:"Chinese (zh-CN)"},{value:"zh-Hans",label:"Chinese (Simplified, zh-Hans)"},{value:"zh-TW",label:"Chinese (zh-TW)"}],p={en:"en","en-US":"en","en-GB":"en-GB","en-AU":"en","en-CA":"en",cs:"cs","cs-CZ":"cs",da:"da","da-DK":"da",de:"de","de-DE":"de","de-AT":"de",es:"es","es-ES":"es","es-MX":"es",fi:"fi","fi-FI":"fi",fr:"fr","fr-FR":"fr","fr-CA":"fr",hu:"hu","hu-HU":"hu",it:"it","it-IT":"it",ja:"ja-JP","ja-JP":"ja-JP",nl:"nl-NL","nl-NL":"nl-NL","nl-BE":"nl-NL",pl:"pl","pl-PL":"pl",pt:"pt","pt-BR":"pt-BR","pt-PT":"pt",ru:"ru","ru-RU":"ru",sr:"sr-RS","sr-RS":"sr-RS",sv:"sv-SE","sv-SE":"sv-SE","sv-FI":"sv-SE",zh:"zh-CN","zh-CN":"zh-CN","zh-SG":"zh-CN","zh-TW":"zh-TW","zh-HK":"zh-TW"},F={"ja-JP":"ja","nl-NL":"nl","sr-RS":"sr","sv-SE":"sv","zh-CN":"zh-Hans","zh-TW":"zh-Hant"},H=Array.from(new Set(Object.values(p)));function Z(e){return e?p[e]??"en":"en"}function q(){let e=localStorage.getItem("v1:duplicati:locale")||g,t=H.find(o=>o===e)??g,n=p[t]??p[t.split("-")[0]]??g;if(t===g)return t;import(`/locale/angular/${F[n]??n}.mjs`).then(o=>T(o.default));var l=n.replace(/-/g,"_");let a=t==="en"?"":"."+l;return fetch(`/locale/messages${a}.json`).then(o=>o.json()).then(o=>{b(o.translations),$localize.locale=t}),t}export{Y as a,Z as b,q as c};
2
+ The translation contains a placeholder with name ${a}, which does not exist in the message.`)})]}function k(e){let t=e.split(/{\$([^}]*)}/),n=[t[0]],s=[];for(let a=1;a<t.length-1;a+=2)s.push(t[a]),n.push(`${t[a+1]}`);let l=n.map(a=>a.charAt(0)===d?"\\"+a:a);return{text:e,messageParts:G(n,l),placeholderNames:s}}function G(e,t){return Object.defineProperty(e,"raw",{value:t}),e}function U(e){let t=e.meaning&&` - "${e.meaning}"`,n=e.legacyIds&&e.legacyIds.length>0?` [${e.legacyIds.map(s=>`"${s}"`).join(", ")}]`:"";return`"${e.id}"${n} ("${e.text}"${t})`}function b(e){$localize.translate||($localize.translate=K),$localize.TRANSLATIONS||($localize.TRANSLATIONS={}),Object.keys(e).forEach(t=>{$localize.TRANSLATIONS[t]=k(e[t])})}function K(e,t){try{return D($localize.TRANSLATIONS,e,t)}catch(n){return console.warn(n.message),[e,t]}}var g="en-US",Y=[{value:"en",label:"English (en-US)"},{value:"en-GB",label:"English (en-GB)"},{value:"cs",label:"Czech (cs)"},{value:"da",label:"Danish (da)"},{value:"de",label:"German (de)"},{value:"es",label:"Spanish (es)"},{value:"fi",label:"Finnish (fi)"},{value:"fr",label:"French (fr)"},{value:"hu",label:"Hungarian (hu)"},{value:"it",label:"Italian (it)"},{value:"ja-JP",label:"Japanese (ja-JP)"},{value:"nl-NL",label:"Dutch (nl-NL)"},{value:"pl",label:"Polish (pl)"},{value:"pt-BR",label:"Portuguese (pt-BR)"},{value:"pt",label:"Portuguese (pt)"},{value:"ru",label:"Russian (ru)"},{value:"sr-RS",label:"Serbian (sr-RS)"},{value:"sv-SE",label:"Swedish (sv-SE)"},{value:"zh-CN",label:"Chinese (zh-CN)"},{value:"zh-Hans",label:"Chinese (Simplified, zh-Hans)"},{value:"zh-TW",label:"Chinese (zh-TW)"}],p={en:"en","en-US":"en","en-GB":"en-GB","en-AU":"en","en-CA":"en",cs:"cs","cs-CZ":"cs",da:"da","da-DK":"da",de:"de","de-DE":"de","de-AT":"de",es:"es","es-ES":"es","es-MX":"es",fi:"fi","fi-FI":"fi",fr:"fr","fr-FR":"fr","fr-CA":"fr",hu:"hu","hu-HU":"hu",it:"it","it-IT":"it",ja:"ja-JP","ja-JP":"ja-JP",nl:"nl-NL","nl-NL":"nl-NL","nl-BE":"nl-NL",pl:"pl","pl-PL":"pl",pt:"pt","pt-BR":"pt-BR","pt-PT":"pt",ru:"ru","ru-RU":"ru",sr:"sr-RS","sr-RS":"sr-RS",sv:"sv-SE","sv-SE":"sv-SE","sv-FI":"sv-SE",zh:"zh-CN","zh-CN":"zh-CN","zh-SG":"zh-CN","zh-TW":"zh-TW","zh-HK":"zh-TW"},F={"ja-JP":"ja","nl-NL":"nl","sr-RS":"sr","sv-SE":"sv","zh-CN":"zh-Hans","zh-TW":"zh-Hant"},H=Array.from(new Set(Object.values(p)));function Z(e){return e?p[e]??"en":"en"}function q(){let e=localStorage.getItem("v1:duplicati:locale")||g,t=H.find(o=>o===e)??g,n=p[t]??p[t.split("-")[0]]??g;if(t===g)return t;import(`locale/angular/${F[n]??n}.mjs`).then(o=>T(o.default));var l=n.replace(/-/g,"_");let a=t==="en"?"":"."+l;return fetch(`locale/messages${a}.json`).then(o=>o.json()).then(o=>{b(o.translations),$localize.locale=t}),t}export{Y as a,Z as b,q as c};
package/index.html CHANGED
@@ -63,5 +63,5 @@
63
63
  <body>
64
64
  <app-root></app-root>
65
65
  <div class="loading">Connecting ...</div>
66
- <link rel="modulepreload" href="chunk-ZQYPQTU3.js"><link rel="modulepreload" href="chunk-EQS67O4J.js"><link rel="modulepreload" href="chunk-NZD6UMYZ.js"><link rel="modulepreload" href="chunk-B6DE3TTE.js"><link rel="modulepreload" href="chunk-VFVXE2DC.js"><link rel="modulepreload" href="chunk-FC45TEB6.js"><link rel="modulepreload" href="chunk-RHW5QVAY.js"><link rel="modulepreload" href="chunk-BHSG643V.js"><link rel="modulepreload" href="chunk-3Q5JEF3K.js"><link rel="modulepreload" href="chunk-OQHMS5HM.js"><script src="polyfills-COBLRUJG.js" type="module"></script><script src="main-RQTAFLAT.js" type="module"></script></body>
66
+ <link rel="modulepreload" href="chunk-WZDQFHUJ.js"><link rel="modulepreload" href="chunk-EQS67O4J.js"><link rel="modulepreload" href="chunk-NZD6UMYZ.js"><link rel="modulepreload" href="chunk-B6DE3TTE.js"><link rel="modulepreload" href="chunk-VFVXE2DC.js"><link rel="modulepreload" href="chunk-FC45TEB6.js"><link rel="modulepreload" href="chunk-RHW5QVAY.js"><link rel="modulepreload" href="chunk-BHSG643V.js"><link rel="modulepreload" href="chunk-3Q5JEF3K.js"><link rel="modulepreload" href="chunk-OQHMS5HM.js"><script src="polyfills-COBLRUJG.js" type="module"></script><script src="main-AAKJETTU.js" type="module"></script></body>
67
67
  </html>
@@ -1 +1 @@
1
- import{b as be,c as Ce}from"./chunk-ZQYPQTU3.js";import{a as he}from"./chunk-EQS67O4J.js";import{a as I}from"./chunk-NZD6UMYZ.js";import"./chunk-B6DE3TTE.js";import"./chunk-VFVXE2DC.js";import"./chunk-FC45TEB6.js";import{a as P}from"./chunk-RHW5QVAY.js";import{a as L}from"./chunk-BHSG643V.js";import{a as de}from"./chunk-3Q5JEF3K.js";import{a as b,b as C,c as ue,d as E}from"./chunk-OQHMS5HM.js";import{c as ie,d as ae,g as pe,h as ce}from"./chunk-DQM3ATT4.js";import{a as ee}from"./chunk-BSRYIN2F.js";import{c as le}from"./chunk-DNBOZ26J.js";import{a as te,b as oe,d as ne,e as re,f as se,i as me}from"./chunk-XD6MBGQY.js";import{a as ge}from"./chunk-4VPA3END.js";import{la as Y,qa as Z}from"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{a as ye}from"./chunk-PSPK4OPB.js";import{b as fe}from"./chunk-JDCGGJ7O.js";import{A as x,Ac as q,B as G,Bc as X,F as w,Gc as Q,L as J,N as R,P as B,S as k,V as $,X as s,_a as _,f as j,fa as K,i as D,la as d,n as F,o as U,r as S,xb as z}from"./chunk-67YRCRMI.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-D3OE4S5N.js")},{path:"logout",loadComponent:()=>import("./chunk-QNWYJ7OR.js")},{path:"",canActivate:[Me],children:[{path:"",canActivate:[Ae],loadComponent:()=>import("./chunk-VG6LA5R3.js"),children:[{path:"",loadComponent:()=>import("./chunk-WESN3ZUC.js")},{path:"add-backup",loadComponent:()=>import("./chunk-TTFJPAWM.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-SMNWIGMY.js")},{path:"backup/import",loadComponent:()=>import("./chunk-IPC6G72N.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-OTM4ZTG4.js"),loadChildren:()=>import("./chunk-OHEFY2D6.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-OTM4ZTG4.js"),loadChildren:()=>import("./chunk-OHEFY2D6.js")},{path:"backup/:id/log",loadComponent:()=>import("./chunk-YW7YXFSC.js")},{path:"backup/:id/database",loadComponent:()=>import("./chunk-EWZGGCZ7.js")},{path:"backup/:id/commandline",loadComponent:()=>import("./chunk-XZWXLEK2.js")},{path:"backup/:id/commandline/:runId",loadComponent:()=>import("./chunk-UZTRBMWL.js")},{path:"backup/:id/delete",loadComponent:()=>import("./chunk-BC3MLJH3.js")},{path:"restore",children:[{path:"",loadComponent:()=>import("./chunk-62DY5NTG.js")},{path:"from-config",loadComponent:()=>import("./chunk-MDO4PWV6.js")}]},{path:"restore-from-files",loadComponent:()=>import("./chunk-3UUTPGTW.js"),loadChildren:()=>import("./chunk-FZTQVXG4.js")},{path:"restore-draft/:id",loadComponent:()=>import("./chunk-3UUTPGTW.js"),loadChildren:()=>import("./chunk-FZTQVXG4.js")},{path:"restore/:id",loadComponent:()=>import("./chunk-3UUTPGTW.js"),loadChildren:()=>import("./chunk-FZTQVXG4.js")},{path:"settings",loadComponent:()=>import("./chunk-FATQ7BT6.js")},{path:"about",loadComponent:()=>import("./chunk-VVJBMGZR.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-HMK6M2N7.js")},{path:"changelog",loadComponent:()=>import("./chunk-O4HSW7GI.js")},{path:"libraries",loadComponent:()=>import("./chunk-TIPHYMRQ.js")},{path:"system-info",loadComponent:()=>import("./chunk-CRALFIWB.js")},{path:"server-settings",loadComponent:()=>import("./chunk-5CUMYXCI.js")},{path:"logs",loadChildren:()=>import("./chunk-G6LCHQJE.js")},{path:"crashlogs",loadComponent:()=>import("./chunk-J64ETWKB.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);
1
+ import{b as be,c as Ce}from"./chunk-WZDQFHUJ.js";import{a as he}from"./chunk-EQS67O4J.js";import{a as I}from"./chunk-NZD6UMYZ.js";import"./chunk-B6DE3TTE.js";import"./chunk-VFVXE2DC.js";import"./chunk-FC45TEB6.js";import{a as P}from"./chunk-RHW5QVAY.js";import{a as L}from"./chunk-BHSG643V.js";import{a as de}from"./chunk-3Q5JEF3K.js";import{a as b,b as C,c as ue,d as E}from"./chunk-OQHMS5HM.js";import{c as ie,d as ae,g as pe,h as ce}from"./chunk-DQM3ATT4.js";import{a as ee}from"./chunk-BSRYIN2F.js";import{c as le}from"./chunk-DNBOZ26J.js";import{a as te,b as oe,d as ne,e as re,f as se,i as me}from"./chunk-XD6MBGQY.js";import{a as ge}from"./chunk-4VPA3END.js";import{la as Y,qa as Z}from"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{a as ye}from"./chunk-PSPK4OPB.js";import{b as fe}from"./chunk-JDCGGJ7O.js";import{A as x,Ac as q,B as G,Bc as X,F as w,Gc as Q,L as J,N as R,P as B,S as k,V as $,X as s,_a as _,f as j,fa as K,i as D,la as d,n as F,o as U,r as S,xb as z}from"./chunk-67YRCRMI.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-D3OE4S5N.js")},{path:"logout",loadComponent:()=>import("./chunk-QNWYJ7OR.js")},{path:"",canActivate:[Me],children:[{path:"",canActivate:[Ae],loadComponent:()=>import("./chunk-VG6LA5R3.js"),children:[{path:"",loadComponent:()=>import("./chunk-WESN3ZUC.js")},{path:"add-backup",loadComponent:()=>import("./chunk-TTFJPAWM.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-SMNWIGMY.js")},{path:"backup/import",loadComponent:()=>import("./chunk-IPC6G72N.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-OTM4ZTG4.js"),loadChildren:()=>import("./chunk-OHEFY2D6.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-OTM4ZTG4.js"),loadChildren:()=>import("./chunk-OHEFY2D6.js")},{path:"backup/:id/log",loadComponent:()=>import("./chunk-YW7YXFSC.js")},{path:"backup/:id/database",loadComponent:()=>import("./chunk-EWZGGCZ7.js")},{path:"backup/:id/commandline",loadComponent:()=>import("./chunk-XZWXLEK2.js")},{path:"backup/:id/commandline/:runId",loadComponent:()=>import("./chunk-UZTRBMWL.js")},{path:"backup/:id/delete",loadComponent:()=>import("./chunk-BC3MLJH3.js")},{path:"restore",children:[{path:"",loadComponent:()=>import("./chunk-62DY5NTG.js")},{path:"from-config",loadComponent:()=>import("./chunk-MDO4PWV6.js")}]},{path:"restore-from-files",loadComponent:()=>import("./chunk-3UUTPGTW.js"),loadChildren:()=>import("./chunk-FZTQVXG4.js")},{path:"restore-draft/:id",loadComponent:()=>import("./chunk-3UUTPGTW.js"),loadChildren:()=>import("./chunk-FZTQVXG4.js")},{path:"restore/:id",loadComponent:()=>import("./chunk-3UUTPGTW.js"),loadChildren:()=>import("./chunk-FZTQVXG4.js")},{path:"settings",loadComponent:()=>import("./chunk-VA5XDNCD.js")},{path:"about",loadComponent:()=>import("./chunk-VVJBMGZR.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-HMK6M2N7.js")},{path:"changelog",loadComponent:()=>import("./chunk-O4HSW7GI.js")},{path:"libraries",loadComponent:()=>import("./chunk-TIPHYMRQ.js")},{path:"system-info",loadComponent:()=>import("./chunk-CRALFIWB.js")},{path:"server-settings",loadComponent:()=>import("./chunk-5CUMYXCI.js")},{path:"logs",loadChildren:()=>import("./chunk-G6LCHQJE.js")},{path:"crashlogs",loadComponent:()=>import("./chunk-J64ETWKB.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);
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.134",
2
+ "version": "0.0.135",
3
3
  "name": "@duplicati/ngclient",
4
4
  "license": "MIT",
5
5
  "contributors": [