@duplicati/ngclient 0.0.133 → 0.0.134
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.
- package/{chunk-3EVYTAP3.js → chunk-3UUTPGTW.js} +1 -1
- package/{chunk-HPZ6HLJE.js → chunk-4VPA3END.js} +1 -1
- package/chunk-4WUC2NLU.js +1 -0
- package/{chunk-KAKRPBPP.js → chunk-5XSYLFRW.js} +1 -1
- package/{chunk-WCMRN2KQ.js → chunk-62DY5NTG.js} +1 -1
- package/chunk-6HFJTYBK.js +1 -0
- package/{chunk-4MAZCWVO.js → chunk-7J7GUBLS.js} +1 -1
- package/{chunk-F66HJES7.js → chunk-B6DE3TTE.js} +1 -1
- package/{chunk-Q2YREFUE.js → chunk-BC3MLJH3.js} +1 -1
- package/chunk-BHSG643V.js +1 -0
- package/{chunk-LSNBRSNG.js → chunk-CFESUDFC.js} +1 -1
- package/{chunk-B3N2KM6G.js → chunk-CRALFIWB.js} +1 -1
- package/chunk-DE64A2ZS.js +1 -0
- package/{chunk-Y4VREVFM.js → chunk-EQS67O4J.js} +1 -1
- package/{chunk-X7GQQCVS.js → chunk-EVINCUTE.js} +1 -1
- package/{chunk-YPAIKA7K.js → chunk-EWZGGCZ7.js} +1 -1
- package/{chunk-2VN6VG4I.js → chunk-FATQ7BT6.js} +1 -1
- package/chunk-FZTQVXG4.js +1 -0
- package/chunk-HD37ILAE.js +6 -0
- package/{chunk-TVOVJS5N.js → chunk-HE5L47WR.js} +1 -1
- package/{chunk-PETCW5PK.js → chunk-HLBBIEIQ.js} +1 -1
- package/chunk-HMK6M2N7.js +1 -0
- package/{chunk-EBYGIC45.js → chunk-HWUEL5ZO.js} +1 -1
- package/{chunk-VNTD2QIZ.js → chunk-IDAED3OA.js} +1 -1
- package/{chunk-32H7KC5E.js → chunk-IPC6G72N.js} +1 -1
- package/{chunk-DLVU5GHR.js → chunk-JDCGGJ7O.js} +1 -1
- package/chunk-JHVU3HSL.js +1 -0
- package/{chunk-A7BFGBWF.js → chunk-NZD6UMYZ.js} +1 -1
- package/{chunk-EGCW3WY7.js → chunk-O3JEFNCL.js} +1 -1
- package/chunk-OHEFY2D6.js +1 -0
- package/{chunk-XHUQCM6F.js → chunk-OTM4ZTG4.js} +1 -1
- package/{chunk-WZIEF5KL.js → chunk-PSPK4OPB.js} +1 -1
- package/{chunk-XKDJSEMU.js → chunk-SAISKISU.js} +1 -1
- package/chunk-SMNWIGMY.js +1 -0
- package/chunk-SSMDFXE3.js +1 -0
- package/chunk-TTFJPAWM.js +1 -0
- package/{chunk-SUMEJCXQ.js → chunk-UWF5JLY2.js} +1 -1
- package/{chunk-VWH7EODO.js → chunk-UZTRBMWL.js} +1 -1
- package/{chunk-NUL6XFC4.js → chunk-V6WRFB7W.js} +1 -1
- package/{chunk-XBP565VF.js → chunk-VFVXE2DC.js} +1 -1
- package/{chunk-LXZXQU7D.js → chunk-VG6LA5R3.js} +1 -1
- package/{chunk-UD32EXWK.js → chunk-VVJBMGZR.js} +1 -1
- package/chunk-WESN3ZUC.js +1 -0
- package/chunk-XZWXLEK2.js +3 -0
- package/{chunk-X4NRDSTJ.js → chunk-Y4IRFRVB.js} +1 -1
- package/{chunk-BD5AB4OK.js → chunk-Y7OD7PZG.js} +1 -1
- package/{chunk-MVJXYZIV.js → chunk-YW7YXFSC.js} +1 -1
- package/{chunk-TKOD3RB3.js → chunk-ZQYPQTU3.js} +2 -2
- package/{chunk-CHCHAUQD.js → chunk-ZUXVEXBA.js} +1 -1
- package/index.html +1 -1
- package/locale/messages.cs.json +15 -2
- package/locale/messages.da.json +36 -25
- package/locale/messages.de.json +169 -77
- package/locale/messages.en_GB.json +13 -2
- package/locale/messages.es.json +13 -2
- package/locale/messages.fr.json +14 -2
- package/locale/messages.it.json +184 -157
- package/locale/messages.ja_JP.json +16 -2
- package/locale/messages.nl_NL.json +184 -157
- package/locale/messages.pl.json +13 -2
- package/locale/messages.pt.json +12 -2
- package/locale/messages.pt_BR.json +13 -2
- package/locale/messages.zh-Hans.json +459 -0
- package/locale/messages.zh_CN.json +157 -157
- package/{main-BQ3NFYOR.js → main-RQTAFLAT.js} +1 -1
- package/package.json +1 -1
- package/chunk-2YHX57UE.js +0 -1
- package/chunk-7RNTRIB4.js +0 -3
- package/chunk-7V6ZELYA.js +0 -1
- package/chunk-ACVXVBJ2.js +0 -1
- package/chunk-AUWIW323.js +0 -1
- package/chunk-BWJZ3AMO.js +0 -1
- package/chunk-EK2B2CO4.js +0 -1
- package/chunk-FX2XKS5C.js +0 -1
- package/chunk-GQTJISMN.js +0 -1
- package/chunk-MOOM536C.js +0 -1
- package/chunk-PTFQBTH3.js +0 -1
- package/chunk-T27DQWUZ.js +0 -1
- package/chunk-UUOPMSDB.js +0 -1
- package/chunk-VFFFKPK4.js +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ne}from"./chunk-L6BZ6TEU.js";import{a as pt}from"./chunk-LSNBRSNG.js";import"./chunk-67XQIEG5.js";import{a as Tt}from"./chunk-TKOD3RB3.js";import{a as St}from"./chunk-PL2MNRTA.js";import"./chunk-A7BFGBWF.js";import"./chunk-F66HJES7.js";import"./chunk-XBP565VF.js";import{a as dt}from"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import{a as Q}from"./chunk-2YHX57UE.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-HPZ6HLJE.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-DLVU5GHR.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-EGCW3WY7.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-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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-EUDKD2JW.js";var o=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-SSMDFXE3.js")},{path:"encryption",loadComponent:()=>import("./chunk-SAISKISU.js")},{path:"select-files",loadComponent:()=>import("./chunk-5XSYLFRW.js")},{path:"options",loadComponent:()=>import("./chunk-UWF5JLY2.js")},{path:"progress",loadComponent:()=>import("./chunk-HLBBIEIQ.js")}],t=o;export{t as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{a as tt}from"./chunk-L6BZ6TEU.js";import{a as Ze,b as et}from"./chunk-5MMV45NA.js";import{a as J,b as Xe,c as Qe}from"./chunk-JHVU3HSL.js";import{h as Ye}from"./chunk-DE64A2ZS.js";import{a as Je}from"./chunk-HWUEL5ZO.js";import{a as O}from"./chunk-FC45TEB6.js";import{a as G}from"./chunk-BHSG643V.js";import{a as He,c as ce,e as pe,i as de,k as We,s as me,t as Ue}from"./chunk-ZCT7SRIM.js";import{A as Ke,C as qe,a as le,e as Ne,g as se,l as Pe,o as Re,p as Ge,t as Be,z as ze}from"./chunk-DNBOZ26J.js";import{h as je}from"./chunk-XD6MBGQY.js";import{ea as Le}from"./chunk-GP2W7XZF.js";import{Ab as ie,Bb as T,Fc as M,Gc as R,Hb as W,Ib as U,Kb as Se,Lb as De,Lc as Q,Mb as we,Nb as F,Oa as s,Ob as l,Oc as Ie,Pb as ye,Qb as Ve,S as te,Sb as ke,Tb as ve,Ub as be,X as V,Yb as N,_a as ne,_b as oe,ba as f,bc as _,ca as g,db as $,dc as y,ec as xe,f as ee,fa as he,gc as Ee,hc as $e,ic as Me,jc as P,kc as k,la as L,lc as d,oc as Oe,pb as C,pc as Ae,qb as x,rb as K,rc as ae,sb as q,tb as j,tc as re,ub as m,vb as c,wb as p,xb as H,yb as ge,yc as X,zb as Ce}from"./chunk-67YRCRMI.js";import{a as w}from"./chunk-EUDKD2JW.js";var nt=class n{#t=V(je);#e=V(Ne);#n=V(G);testDestination(t,e,o){return this.#n.hasV2TestOperations()?this.testDestinationv2(t,e,o):this.testDestinationv1(t,e,o)}testDestinationv2(t,e,o){return new ee(i=>{this.#t.postApiV2DestinationTest({requestBody:{DestinationUrl:t,AutoCreate:!1,Options:null}}).subscribe({next:a=>{if(a.Success){this.emitSuccessV2(i,t,e,a);return}this.handleGenericError(i,t,e,a.Error??"Unknown error")},error:a=>{let r=a?.error?.body;if(r?.Data?.FolderExists===!1||r?.StatusCode==="missing-folder"){o?this.handleMissingFolder(i,t,e):this.handleGenericError(i,t,e,$localize`The remote destination folder does not exist.`);return}if(r?.Data?.HostCertificate){this.handleMissingCertificate(i,t,e,r.Data?.HostCertificate);return}if(r?.Data?.ReportedHostKey){this.handleIncorrectKey(i,t,e,r.Data.ReportedHostKey,r.Data.AcceptedHostKey??null);return}this.handleGenericError(i,t,e,a?.message??"Unknown error")}})})}testDestinationv1(t,e,o){return new ee(i=>{this.#t.postApiV1RemoteoperationTest({requestBody:{path:t}}).subscribe({next:a=>{i.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:e}),i.complete()},error:a=>{this.handleDestinationErrorv1(a.message,t,e,o).subscribe(r=>{i.next(r)})}})})}handleMissingFolder(t,e,o){this.#e.open(O,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`,confirmText:$localize`Create folder`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.#n.hasV2TestOperations()?this.#t.postApiV2DestinationTest({requestBody:{DestinationUrl:e,AutoCreate:!0,Options:null}}).subscribe({next:a=>{if(a.Success){this.emitSuccessV2(t,e,o,a);return}else this.handleFolderCreateFailure(t,e,o,a.Error??$localize`Unknown error`)},error:a=>{this.handleFolderCreateFailure(t,e,o,a.message??$localize`Unknown error`)}}):this.#t.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe({next:()=>{this.handleFolderCreated(t,e,o)},error:a=>{this.handleFolderCreateFailure(t,e,o,a.message??$localize`Unknown error`)}}))}})}handleFolderCreateFailure(t,e,o,i){this.#e.open(O,{data:{title:$localize`Error creating folder`,message:$localize`The remote destination folder could not be created. ${i}`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:o}),t.complete()}})}emitSuccessV2(t,e,o,i){t.next({action:"success",targetUrl:e,testAgain:!1,destinationIndex:o,anyFilesFound:!i.Data?.FolderIsEmpty,containsBackup:i.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:i.Data?.FolderContainsEncryptedBackupFiles??void 0}),t.complete()}handleFolderCreated(t,e,o){this.#e.open(O,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"test-again",targetUrl:e,testAgain:!0,destinationIndex:o}),t.complete()}})}reportNoAction(t,e,o){t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:o}),t.complete()}handleMissingCertificate(t,e,o,i){this.#e.open(O,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
|
|
2
|
+
If this is a self-signed certificate, you can choose to trust this certificate.
|
|
3
|
+
The server reported the certificate hash: ${i}`,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:a=>{if(!a){this.reportNoAction(t,e,o);return}t.next({action:"trust-cert",targetUrl:e,testAgain:!0,certData:i,destinationIndex:o}),t.complete()}})}handleIncorrectKey(t,e,o,i,a){a?this.#e.open(O,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
|
|
4
|
+
otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
|
|
5
|
+
Do you want to REPLACE your CURRENT host key ${a}
|
|
6
|
+
with the REPORTED host key: ${i}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:r=>{if(!r){this.reportNoAction(t,e,o);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:o}),t.complete()}}):this.#e.open(O,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${i}`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:r=>{if(!r){this.reportNoAction(t,e,o);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:o}),t.complete()}})}handleGenericError(t,e,o,i){this.#e.open(O,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:i,cancelText:$localize`OK`},closed:a=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:o}),t.complete()}})}handleDestinationErrorv1(t,e,o,i){return new ee(a=>{if(t==="missing-folder"){i?this.handleMissingFolder(a,e,o):this.handleGenericError(a,e,o,$localize`The remote destination folder does not exist.`);return}if(t.startsWith("incorrect-cert:")){let r=t.split("incorrect-cert:")[1];this.handleMissingCertificate(a,e,o,r);return}if(t.startsWith("incorrect-host-key:")){let r=t.split('incorrect-host-key:"')[1].split('",')[0],S=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(a,e,o,r,S);return}this.handleGenericError(a,e,o,t)})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=te({token:n,factory:n.\u0275fac,providedIn:"root"})};var _e=class n{#t=V(G);supportedDestinationTypes=M(()=>this.#t.backendModules().map(t=>t.Key).filter(t=>t).map(t=>J(t)));destinationTypeOptions=M(()=>this.supportedDestinationTypes().map(t=>({key:t.customKey??t.key,customKey:t.customKey??null,displayName:t.displayName,description:t.description})));backendModules=M(()=>this.#t.backendModules()??[]);static \u0275fac=function(e){return new(e||n)};static \u0275prov=te({token:n,factory:n.\u0275fac,providedIn:"root"})};var rt=["fileInput"],lt=[[["label"]]],st=["label"],ue=class n{customId=Q();content=L("");readonly=L(!1);placeholder=Q("Drop a file here or use the browse button");fileInputRef;onFileSelected(t){let e=t.target;e.files&&e.files.length>0&&this.readFile(e.files[0])}onFileDrop(t){t.preventDefault(),t.dataTransfer?.files&&t.dataTransfer.files.length>0&&this.readFile(t.dataTransfer.files[0])}onDragOver(t){t.preventDefault()}readFile(t){let e=new FileReader;e.onload=()=>{this.content.set(e.result)},e.readAsText(t)}triggerBrowse(){return this.fileInputRef.nativeElement.click(),!1}onChange=()=>{};onTouched=()=>{};onChangeEffect=R(()=>{this.onChange(this.content())});writeValue(t){this.content.set(t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.readonly.set(t)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ne({type:n,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,o){if(e&1&&ke(rt,5),e&2){let i;ve(i=be())&&(o.fileInputRef=i.first)}},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[Ae([{provide:He,useExisting:n,multi:!0}])],ngContentSelectors:st,decls:9,vars:3,consts:()=>{let t;return t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:upload${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["fileInput",""],t,[1,"browse-btn"],["spk-button","","type","button",1,"small","outlined",3,"click"],[1,"textarea-container","textarea-wrap",3,"drop","dragover"],["rows","10",3,"ngModelChange","placeholder","ngModel","disabled"],["type","file",1,"hidden",3,"change"]]},template:function(e,o){if(e&1){let i=T();ye(lt),Ve(0,0,["ngProjectAs","label",5,["label"]]),c(1,"div",2)(2,"button",3),F("click",function(){return f(i),g(o.triggerBrowse())}),W(3,1),H(4,"spk-icon"),U(),p()(),c(5,"div",4),F("drop",function(r){return f(i),g(o.onFileDrop(r))})("dragover",function(r){return f(i),g(o.onDragOver(r))}),c(6,"textarea",5),Me("ngModelChange",function(r){return f(i),$e(o.content,r)||(o.content=r),g(r)}),p()(),c(7,"input",6,0),F("change",function(r){return f(i),g(o.onFileSelected(r))}),p()}e&2&&(s(6),m("placeholder",o.placeholder()),Ee("ngModel",o.content),m("disabled",o.readonly()))},dependencies:[me,ce,pe,de,le,se],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label browsebtn" "input input";grid-template-columns:8fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .browse-btn[_ngcontent-%COMP%]{grid-area:browsebtn}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%]{grid-area:input;width:100%;border:none;font:var(--code-20)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%;color:var(--base-8);background-color:var(--base-1);border:1px solid var(--base-4);border-radius:var(--shape-3);padding:.5rem;resize:vertical;box-shadow:var(--box-shadow-10)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%] .dark[_ngcontent-%COMP%]{background-color:var(--base-2)}[_nghost-%COMP%] .hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};var ct=(n,t,e,o)=>({index:n,fieldGroup:"custom",formView:t,destinationType:e,oauthField:o}),Te=n=>({$implicit:n}),pt=(n,t,e,o)=>({index:n,fieldGroup:"dynamic",formView:t,destinationType:e,oauthField:o}),dt=(n,t,e,o)=>({index:n,formView:t,fieldGroup:"advanced",destinationType:e,oauthField:o});function mt(n,t){n&1&&ie(0)}function _t(n,t){if(n&1&&$(0,mt,1,0,"ng-container",11),n&2){let e=t.$implicit,o=t.$index;l();let i=N(17);l();let a=d(0),r=d(1);m("ngTemplateOutlet",i)("ngTemplateOutletContext",ae(7,Te,re(2,ct,o,e,a,r.oauthField)))}}function ut(n,t){n&1&&ie(0)}function ft(n,t){if(n&1&&$(0,ut,1,0,"ng-container",11),n&2){let e=t.$implicit,o=t.$index;l();let i=N(17);l();let a=d(0),r=d(1);m("ngTemplateOutlet",i)("ngTemplateOutletContext",ae(7,Te,re(2,pt,o,e,a,r.oauthField)))}}function gt(n,t){if(n&1){let e=T();W(0,4,1),c(1,"button",12,1),F("click",function(){let i=f(e).$implicit,a=l(2);return g(a.addAdvancedOption(i))}),p(),U()}if(n&2){let e=t.$implicit;s(),Se(e.name),De(0)}}function Ct(n,t){n&1&&ie(0)}function xt(n,t){if(n&1&&$(0,Ct,1,0,"ng-container",11),n&2){let e=t.$implicit,o=t.$index;l();let i=N(17),a=l(),r=d(0),S=d(1),A=a.getFormView("advanced",e)??a.getDefaultFormView(e);m("ngTemplateOutlet",i)("ngTemplateOutletContext",ae(7,Te,re(2,dt,o,A,r,S.oauthField)))}}function Ft(n,t){if(n&1&&(c(0,"spk-icon",21),_(1,"question"),p()),n&2){let e=l(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function Tt(n,t){if(n&1){let e=T();c(0,"app-file-tree",14)(1,"label",20),_(2),C(3,Ft,2,1,"spk-icon",21),p(),c(4,"input",22),F("ngModelChange",function(i){f(e);let a=l().$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),p()()}if(n&2){let e=l().$implicit,o=d(1),i=d(2),a=d(3),r=d(4);m("startingPath",a)("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),m("for",r),s(),y(" ",o," "),s(),x(e.formView.longDescription?3:-1),s(),m("id",r)("ngModel",i)}}function ht(n,t){if(n&1&&(c(0,"spk-icon",21),_(1,"question"),p()),n&2){let e=l(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function St(n,t){if(n&1){let e=T();c(0,"app-file-tree",15)(1,"label",20),_(2),C(3,ht,2,1,"spk-icon",21),p(),c(4,"input",22),F("ngModelChange",function(i){f(e);let a=l().$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),p()()}if(n&2){let e=l().$implicit,o=d(1),i=d(2),a=d(3),r=d(4);m("hideShortcuts",!0)("startingPath",a),s(),m("for",r),s(),y(" ",o," "),s(),x(e.formView.longDescription?3:-1),s(),m("id",r)("ngModel",i)}}function Dt(n,t){if(n&1&&(c(0,"spk-icon",21),_(1,"question"),p()),n&2){let e=l(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function wt(n,t){if(n&1&&(c(0,"spk-icon",26),_(1," link "),p()),n&2){l();let e=d(5),o=d(6);oe("error",e&&o==="error")("warn",e&&o==="warning"),m("spkTooltip",e)}}function yt(n,t){n&1&&(c(0,"spk-icon",25),_(1,"envelope"),p())}function Vt(n,t){n&1&&(c(0,"spk-icon",25),_(1,"textbox"),p())}function kt(n,t){if(n&1){let e=T();c(0,"spk-form-field")(1,"label",20),_(2),C(3,Dt,2,1,"spk-icon",21),p(),c(4,"input",23),F("ngModelChange",function(i){f(e);let a=l().$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),p(),P(5)(6),C(7,wt,2,5,"spk-icon",24)(8,yt,2,0,"spk-icon",25)(9,Vt,2,0,"spk-icon",25),p()}if(n&2){let e=l().$implicit,o=d(1),i=d(2),a=d(3),r=d(4);s(),m("for",r),s(),y(" ",o," "),s(),x(e.formView.longDescription?3:-1),s(),m("type",e.formView.type==="Email"?"email":"text")("id",r)("ngModel",i);let S=a,A=l(2).hasDoubleLeadingSlashes(S??"");s(),k(A&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),s(),k(e.formView.doubleSlash==null?null:e.formView.doubleSlash.type),s(),x(e.formView.type==="Path"?7:e.formView.type==="Email"?8:9)}}function vt(n,t){if(n&1&&(c(0,"spk-icon",21),_(1,"question"),p()),n&2){let e=l(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function bt(n,t){if(n&1){let e=T();c(0,"span",30),F("click",function(){f(e);let i=l(2).$implicit,a=l(2);return g(a.oauthStartTokenCreation(i.destinationType,i.fieldGroup,i.formView.name,i.formView.oauthVersion))}),_(1," AuthID "),p()}}function Et(n,t){n&1&&(c(0,"spk-icon",25),_(1,"password"),p())}function $t(n,t){if(n&1){let e=T();c(0,"spk-icon",31),F("click",function(){f(e);let i=l(2).$implicit;return g(i.formView.showPassword=!i.formView.showPassword)}),_(1," eye "),p()}}function Mt(n,t){if(n&1){let e=T();c(0,"spk-icon",31),F("click",function(){f(e);let i=l(2).$implicit;return g(i.formView.showPassword=!i.formView.showPassword)}),_(1," eye-slash "),p()}}function Ot(n,t){if(n&1){let e=T();c(0,"spk-form-field")(1,"label",20),_(2),C(3,vt,2,1,"spk-icon",21),p(),c(4,"input",27),F("ngModelChange",function(i){f(e);let a=l().$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),p(),C(5,bt,2,0,"span",28)(6,Et,2,0,"spk-icon",25),C(7,$t,2,0,"spk-icon",29)(8,Mt,2,0,"spk-icon",29),p()}if(n&2){let e=l().$implicit,o=d(1),i=d(2),a=d(4);s(),m("for",a),s(),y(" ",o," "),s(),x(e.formView.longDescription?3:-1),s(),m("type",e.formView.showPassword?"text":"password")("id",a)("ngModel",i),s(),x(e.oauthField===e.formView.name?5:6),s(2),x(e.formView.showPassword?7:8)}}function At(n,t){if(n&1&&(c(0,"spk-icon",21),_(1,"question"),p()),n&2){let e=l(3).$implicit;m("spkTooltip",e.formView.longDescription)}}function It(n,t){if(n&1&&_(0),n&2){let e=l().$implicit;xe(" ",e==null?null:e.key," (",e==null?null:e.value,") ")}}function Lt(n,t){if(n&1&&_(0),n&2){let e=l().$implicit;y(" ",e," ")}}function Nt(n,t){if(n&1&&C(0,It,1,2)(1,Lt,1,1),n&2){let e=l(3).$implicit;x(e.formView.loadOptions?0:1)}}function Pt(n,t){if(n&1){let e=T();c(0,"spk-select",32)(1,"label",20),_(2),C(3,At,2,1,"spk-icon",21),p(),c(4,"input",22),F("ngModelChange",function(i){f(e);let a=l(2).$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),p()(),$(5,Nt,2,1,"ng-template",null,2,X)}if(n&2){let e=N(6);l();let o=d(0),i=l().$implicit,a=d(1),r=d(2),S=d(4);m("options",o)("isClearable",!1)("optionTemplate",e),s(),m("for",S),s(),y(" ",a," "),s(),x(i.formView.longDescription?3:-1),s(),m("id",S)("ngModel",r)}}function Rt(n,t){if(n&1&&(P(0),C(1,Pt,7,8)),n&2){let e=l().$implicit,o=k(e.formView.loadOptions?e.formView.loadOptions(l(2).injector)():e.formView.options);s(),x(o?1:-1)}}function Gt(n,t){if(n&1&&(c(0,"spk-icon",21),_(1,"question"),p()),n&2){let e=l(3).$implicit;m("spkTooltip",e.formView.longDescription)}}function Bt(n,t){if(n&1&&_(0),n&2){let e=t.$implicit;xe(" ",e.key," ",e.value?"("+e.value+")":""," ")}}function zt(n,t){if(n&1){let e=T();c(0,"spk-select",34)(1,"label",20),_(2),C(3,Gt,2,1,"spk-icon",21),p(),c(4,"input",22),F("ngModelChange",function(i){f(e);let a=l(2).$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),p()(),$(5,Bt,1,2,"ng-template",null,3,X)}if(n&2){let e=N(6);l();let o=d(0),i=l().$implicit,a=d(1),r=d(2),S=d(4);m("options",o)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),s(),m("for",S),s(),y(" ",a," "),s(),x(i.formView.longDescription?3:-1),s(),m("id",S)("ngModel",r)}}function Kt(n,t){n&1&&H(0,"spk-progress-bar",33)}function qt(n,t){if(n&1&&(P(0),C(1,zt,7,9)(2,Kt,1,0,"spk-progress-bar",33)),n&2){let e=l().$implicit,o=k(e.formView.loadOptions?e.formView.loadOptions(l(2).injector)():e.formView.options);s(),x(o?1:2)}}function jt(n,t){if(n&1&&(c(0,"spk-icon",21),_(1,"question"),p()),n&2){let e=l(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function Ht(n,t){if(n&1){let e=T();c(0,"app-size",35),F("ngModelChange",function(i){f(e);let a=l().$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),c(1,"label",20),_(2),C(3,jt,2,1,"spk-icon",21),p()()}if(n&2){let e=l().$implicit,o=d(1),i=d(2),a=d(4);m("inputType",e.Name)("ngModel",i)("customId",a),s(),m("for",a),s(),y(" ",o," "),s(),x(e.formView.longDescription?3:-1)}}function Wt(n,t){if(n&1&&(c(0,"spk-icon",21),_(1,"question"),p()),n&2){let e=l(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function Ut(n,t){if(n&1){let e=T();c(0,"spk-form-field")(1,"label",20),_(2),C(3,Wt,2,1,"spk-icon",21),p(),c(4,"input",36),F("ngModelChange",function(i){f(e);let a=l().$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),p(),c(5,"spk-icon",25),_(6,"numpad"),p()()}if(n&2){let e=l().$implicit,o=d(1),i=d(2),a=d(4);s(),m("for",a),s(),y(" ",o," "),s(),x(e.formView.longDescription?3:-1),s(),m("id",a)("ngModel",i)}}function Xt(n,t){if(n&1&&(c(0,"spk-icon",21),_(1,"question"),p()),n&2){let e=l(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function Qt(n,t){if(n&1){let e=T();c(0,"spk-toggle",37),F("click",function(){f(e);let i=l().$implicit,a=d(2),r=l(2);return g(r.updateFieldValue(i.fieldGroup,i.formView.name,a==="true"?"false":"true"))}),c(1,"label",20),_(2),C(3,Xt,2,1,"spk-icon",21),p()()}if(n&2){let e=l().$implicit,o=d(1),i=d(2),a=d(4);oe("active",i==="true"),s(),m("for",a),s(),y(" ",o," "),s(),x(e.formView.longDescription?3:-1)}}function Jt(n,t){if(n&1&&(c(0,"spk-icon",21),_(1,"question"),p()),n&2){let e=l(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function Yt(n,t){if(n&1&&_(0),n&2){let e=t.$implicit;y(" ",e," ")}}function Zt(n,t){if(n&1){let e=T();c(0,"spk-select",38)(1,"label",20),_(2),C(3,Jt,2,1,"spk-icon",21),p(),c(4,"input",39),F("ngModelChange",function(i){f(e);let a=l().$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),p()(),$(5,Yt,1,1,"ng-template",null,3,X)}if(n&2){let e=N(6),o=l().$implicit,i=d(1),a=d(2);m("options",o.formView.options)("selectMultiple",!0)("optionTemplate",e),s(),m("for",Oe("destination-",o.fieldGroup,"-",o.index)),s(),y(" ",i," "),s(),x(o.formView.longDescription?3:-1),s(),m("ngModel",a)}}function en(n,t){if(n&1&&(c(0,"spk-icon",21),_(1,"question"),p()),n&2){let e=l(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function tn(n,t){if(n&1){let e=T();c(0,"app-timespan",35),F("ngModelChange",function(i){f(e);let a=l().$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),c(1,"label",20),_(2),C(3,en,2,1,"spk-icon",21),p()()}if(n&2){let e=l().$implicit,o=d(1),i=d(2),a=d(4);m("inputType",e.formView.name)("ngModel",i)("customId",a),s(),m("for",a),s(),y(" ",o," "),s(),x(e.formView.longDescription?3:-1)}}function nn(n,t){if(n&1&&(c(0,"spk-icon",21),_(1,"question"),p()),n&2){let e=l(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function on(n,t){if(n&1){let e=T();c(0,"app-file-drop-textarea",40),F("ngModelChange",function(i){f(e);let a=l().$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),c(1,"label"),_(2),C(3,nn,2,1,"spk-icon",21),p()()}if(n&2){let e=l().$implicit,o=d(2),i=d(4);m("ngModel",o)("customId",i)("placeholder",e.formView.longDescription),s(2),y(" ",e.formView.shortDescription??e.formView.name," "),s(),x(e.formView.longDescription?3:-1)}}function an(n,t){if(n&1){let e=T();c(0,"button",41),F("click",function(){f(e);let i=l().$implicit,a=l(2);return g(a.removeAdvancedOption(i.formView.name))}),c(1,"spk-icon"),_(2,"x-circle"),p()()}}function rn(n,t){if(n&1&&(c(0,"div",13),P(1)(2)(3)(4),C(5,Tt,5,11,"app-file-tree",14)(6,St,5,7,"app-file-tree",15)(7,kt,10,9,"spk-form-field")(8,Ot,9,8,"spk-form-field")(9,Rt,2,2)(10,qt,3,2)(11,Ht,4,6,"app-size",16)(12,Ut,7,5,"spk-form-field")(13,Qt,4,5,"spk-toggle",17)(14,Zt,7,9)(15,tn,4,6,"app-timespan",16)(16,on,4,5,"app-file-drop-textarea",18),C(17,an,3,0,"button",19),p()),n&2){let e=t.$implicit;l();let o=d(0),i=l();oe("single-field",e.fieldGroup!=="advanced"),s(),k(e.formView.shortDescription??e.formView.name),s(),k(i.getFieldGroup(o,e.fieldGroup)[e.formView.name]),s(),k(i.getFieldValue(e.fieldGroup,e.formView.name)),s(),k("destination-"+e.fieldGroup+"-"+e.index+"-"+(e.asHttpOptions?"http":"other")),s(),x(e.formView.type==="FileTree"?5:e.formView.type==="FolderTree"?6:e.formView.type==="String"||e.formView.type==="Path"||e.formView.type==="Email"?7:e.formView.type==="Password"?8:e.formView.type==="Enumeration"?9:e.formView.type==="NonValidatedSelectableString"?10:e.formView.type==="Size"?11:e.formView.type==="Integer"?12:e.formView.type==="Boolean"?13:e.formView.type==="Flags"?14:e.formView.type==="Timespan"||e.formView.type==="DateTime"?15:e.formView.type==="FreeText"?16:-1),s(12),x(e.fieldGroup==="advanced"?17:-1)}}function ln(n,t){if(n&1&&(P(0),q(1,_t,1,9,"ng-container",null,K),q(3,ft,1,9,"ng-container",null,K),c(5,"spk-toggle-card",5),ge(6,6),W(7,4),c(8,"spk-menu",7)(9,"button",8),H(10,"spk-icon"),p(),ge(11,9),q(12,gt,3,1,"button",10,K),Ce(),p(),U(),Ce(),q(14,xt,1,9,"ng-container",null,K),p(),$(16,rn,18,8,"ng-template",null,0,X)),n&2){let e=l(),o=d(1);k(e.destinationForm()),s(),j(o.custom),s(2),j(o.dynamic),s(2),m("disallowToggle",!0);let i=e.nonSelectedAdvancedFormViews();s(3),m("searchable",!0),s(),m("disabled",i.length===0),s(3),j(i),s(2),j(e.advancedFormFieldNames())}}var it=class n{#t=V(Ye);#e=V(G);#n=V(tt);#a=V(_e);injector=V(he);targetUrl=Ie.required();useBackupState=Q(!1);#i=null;destinationType=M(()=>{let t=this.targetUrl();if(!t)return null;let e=t.split("://")[0];return this.#i=e,e});destinationForm=L({custom:{},dynamic:{},advanced:{}});advancedFormFieldNames=M(()=>Object.keys(this.destinationForm().advanced));destinationFormConfig=L(null);nonSelectedAdvancedFormViews=M(()=>{let t=this.destinationFormConfig();if(!t)return[];let e=this.advancedFormFieldNames();return t.advanced.filter(o=>e.findIndex(i=>i===o.name)===-1)});destinationTypeEffect=R(()=>{let t=this.destinationType()??"",e=J(t),o=e?.key,i=this.#a.backendModules().find(D=>D.Key===o)??{Key:t,DisplayName:t,Description:J(t).description,Options:[]};if(!i||!i.Options||!t)return;let a=e&&e.oauthField?e.oauthField:null,r=e&&e.customFields?e.customFields:{},S=e&&e.dynamicFields?e.dynamicFields:[],A=e&&e.advancedFields?e.advancedFields:[],Y=e&&e.ignoredAdvancedFields?e.ignoredAdvancedFields:[],v={destinationType:t,oauthField:a,custom:[],dynamic:[],advanced:[]};r&&Object.entries(r).forEach(([D,u],b)=>{v.custom.push(w({order:900+b},u))});for(let D=0;D<i.Options.length;D++){let u=i.Options[D];if(u.Deprecated)continue;let b=S.find(h=>h===u.Name||u.Aliases?.includes(h.name)||h.name===u.Name);if(b){let h=u.Aliases?.indexOf(b.name)??-1,I=u.Aliases&&h>-1?u.Aliases[h]:u.Name,E=b&&typeof b!="string",B=E?b?.defaultValue??u.DefaultValue:u.DefaultValue,z={name:I,type:u.Type,shortDescription:u.ShortDescription??void 0,longDescription:u.LongDescription??void 0,options:u.ValidValues,order:900+D},fe=E?w(w({},z),b):z;v.dynamic.push(fe)}else{let h=u.Name;if(Y.find(Z=>Z===h))continue;let E=A.find(Z=>Z===h||Z.name===h),B=E&&typeof E!="string",z={name:h,type:u.Type,shortDescription:u.ShortDescription??void 0,longDescription:u.LongDescription??void 0,options:u.ValidValues,defaultValue:u.DefaultValue,order:900+D},fe=B?w(w({},z),E):z;v.advanced.push(fe)}}v.custom.sort((D,u)=>D.order-u.order),v.dynamic.sort((D,u)=>D.order-u.order),v.advanced.sort((D,u)=>D.order-u.order),this.destinationFormConfig.set(v)});targetUrlEffect=R(()=>{if(!this.destinationFormConfig())return;let e=this.targetUrl();if(!e)return;let o=Qe(e);if(!o)return;let i={custom:o.custom,dynamic:o.dynamic,advanced:o.advanced};this.destinationForm.update(a=>(a.custom=w(w({},a.custom),i.custom),a.dynamic=w(w({},a.dynamic),i.dynamic),a.advanced=w(w({},a.advanced),i.advanced),a))});destinationFormEffect=R(()=>{let t=this.#i,e=this.destinationForm();if(!e||!t)return;let o=Xe({destinationType:t,custom:e.custom,dynamic:e.dynamic,advanced:e.advanced});o&&this.targetUrl.set(o)});getFieldValue(t,e){let i=this.destinationForm()[t][e];return i||null}getFormView(t,e){let i=this.destinationFormConfig()?.[t].find(a=>a.name===e);return i||null}getDefaultFormView(t){return{name:t,type:"String",shortDescription:t,longDescription:$localize`This is an undocumented option.`}}getFieldGroup(t,e){return t[e]}hasDoubleLeadingSlashes(t){return t.startsWith("//")}addAdvancedOption(t){let e=this.destinationForm();e.advanced[t.name]=t.defaultValue,this.destinationForm.set(w({},e))}updateFieldValue(t,e,o){let i=this.destinationForm();i[t][e]=o,this.destinationForm.set(w({},i))}removeAdvancedOption(t){let e=this.destinationForm();delete e.advanced[t],this.destinationForm.set(w({},e))}#o=L(!1);oauthStartTokenCreation(t,e,o,i){this.#o.set(!0);let a=(i??1)==2?this.#e.defaultOAuthUrlV2():this.#e.defaultOAuthUrl(),r=this.#n.serverSettings()?.["--oauth-url"];if(r&&r.length>0&&(a=r),this.useBackupState()){let h=this.#t.mapFormsToSettings().find(I=>I.Name==="--oauth-url")?.Value;h&&h.length>0&&(a=h)}let S=this.destinationForm().advanced["oauth-url"];S&&S.length>0&&(a=S);let A=`${a}?type=${t}`,Y=450,v=600,D=screen.width/2-Y/2,u=screen.height/2-v/2,b=window.open(A,"_blank","height="+v+",width="+Y+",menubar=0,status=0,titlebar=0,toolbar=0,left="+D+",top="+u);return window.addEventListener("message",h=>{let I=h.data.startsWith("authid:"),E=I?h.data.replace("authid:",""):null;I&&(this.destinationForm.update(B=>(B[e][o]=E,B)),this.#o.set(!1),b?.close())}),!1}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ne({type:n,selectors:[["app-single-destination"]],inputs:{targetUrl:[1,"targetUrl"],useBackupState:[1,"useBackupState"]},outputs:{targetUrl:"targetUrlChange"},decls:3,vars:3,consts:()=>{let t;return t=$localize` Advanced options ${"\uFFFD#8\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#9\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#10\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#9\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#11\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*13:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#9\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_MENU:`,t=we(t),[["fieldTemplate",""],["option",""],["enumOptionTemplate",""],["optionTemplate",""],t,[1,"advanced-options",3,"disallowToggle"],["title",""],[3,"searchable"],["spk-button","","type","button",1,"outlined","small",3,"disabled"],["menu",""],["type","button"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["type","button",3,"click"],[1,"field-row"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","startingPath"],[3,"inputType","ngModel","customId"],[1,"primary","raised",3,"active"],[3,"ngModel","customId","placeholder"],["spk-button","","type","button",1,"outlined"],[3,"for"],[1,"primary",3,"spkTooltip"],["type","text",3,"ngModelChange","id","ngModel"],[3,"ngModelChange","type","id","ngModel"],["prefix","",3,"error","warn","spkTooltip"],["prefix",""],["prefix","",3,"spkTooltip"],["autocomplete","off",3,"ngModelChange","type","id","ngModel"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],[3,"ngModelChange","inputType","ngModel","customId"],["type","number",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"click"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"ngModelChange","ngModel"],[3,"ngModelChange","ngModel","customId","placeholder"],["spk-button","","type","button",1,"outlined",3,"click"]]},template:function(e,o){if(e&1&&(P(0)(1),C(2,ln,18,4)),e&2){let i=k(o.destinationType());s();let a=k(o.destinationFormConfig());s(),x(i&&a?2:-1)}},dependencies:[Ue,ce,We,pe,me,de,Le,Je,Ze,et,ue,Pe,se,le,ze,Re,Be,qe,Ke,Ge],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.advanced-options[_ngcontent-%COMP%]{position:relative;z-index:1}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}label[_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}.field-row.single-field[_ngcontent-%COMP%]{display:block}"],changeDetection:0})};export{nt as a,_e as b,it as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c}from"./chunk-
|
|
1
|
+
import{a,b,c}from"./chunk-DE64A2ZS.js";import"./chunk-HWUEL5ZO.js";import"./chunk-ZIJ7ZEHR.js";import"./chunk-5RPDEEQ3.js";import"./chunk-67XQIEG5.js";import"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-BHSG643V.js";import"./chunk-ZCT7SRIM.js";import"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import"./chunk-DNBOZ26J.js";import"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";export{b as NONE_OPTION,a as createGeneralForm,c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as H}from"./chunk-PEPDXQBY.js";import"./chunk-U44OBOIE.js";import{g as K}from"./chunk-
|
|
1
|
+
import{a as H}from"./chunk-PEPDXQBY.js";import"./chunk-U44OBOIE.js";import{g as K}from"./chunk-7J7GUBLS.js";import"./chunk-HWUEL5ZO.js";import"./chunk-ZIJ7ZEHR.js";import"./chunk-67XQIEG5.js";import{b as j}from"./chunk-ZUXVEXBA.js";import"./chunk-EQS67O4J.js";import{a as B}from"./chunk-NZD6UMYZ.js";import"./chunk-B6DE3TTE.js";import"./chunk-VFVXE2DC.js";import"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-BHSG643V.js";import{a as z}from"./chunk-3Q5JEF3K.js";import"./chunk-ZCT7SRIM.js";import"./chunk-OQHMS5HM.js";import"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as b,h as w,p as W,s as X}from"./chunk-DNBOZ26J.js";import"./chunk-XD6MBGQY.js";import{qa as v}from"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Fc as M,Gc as x,Hb as L,Ib as A,Jb as _,Kb as D,Lb as I,Oa as l,Ob as C,X as T,_a as y,bc as u,da as $,ea as G,ec as f,la as h,pb as g,qb as O,ub as d,uc as R,vb as i,vc as E,wb as s,xb as p,yb as m,zb as P}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";function V(n,e){n&1&&(i(0,"spk-card",8),m(1,14),_(2,2),P(),i(3,"div",15),$(),i(4,"svg",16),p(5,"circle",17),s(),G(),i(6,"spk-icon"),u(7,"check-bold"),s()()())}function Z(n,e){if(n&1&&(u(0),R(1,"number"),R(2,"number")),n&2){let t,o=C(2);f(" ",E(1,2,(t=o.statusData())==null?null:t.ProcessedFileCount)," of ",E(2,4,(t=o.statusData())==null?null:t.TotalFileCount)," ")}}function q(n,e){n&1&&(m(0),_(1,6),P())}function J(n,e){if(n&1&&(u(0),R(1,"bytes"),R(2,"bytes")),n&2){let t,o=C(2);f(" ",E(1,2,(t=o.statusData())==null?null:t.ProcessedFileSize)," of ",E(2,4,(t=o.statusData())==null?null:t.TotalFileSize)," ")}}function Q(n,e){n&1&&(m(0),_(1,7),P())}function U(n,e){if(n&1&&(i(0,"spk-card",8)(1,"h3"),L(2,3),p(3,"spk-spinner",18),A(),s(),i(4,"div",19),p(5,"spk-progress-bar",20),i(6,"p")(7,"span"),_(8,4),s(),g(9,Z,3,6)(10,q,2,0,"ng-container"),s(),i(11,"p")(12,"span"),_(13,5),s(),g(14,J,3,6)(15,Q,2,0,"ng-container"),s()()()),n&2){let t,o,r,a,c=C();l(3),D((t=c.statusData())==null?null:t.statusText),I(2),l(2),d("value",(o=c.statusData())==null?null:o.OverallProgress),l(4),O((r=c.statusData())!=null&&r.ProcessedFileCount?9:10),l(5),O((a=c.statusData())!=null&&a.ProcessedFileSize?14:15)}}var F=class n{#e=T(B);#t=T(K);statusData=this.#e.statusData;backupId=this.#t.backupId;isPolling=h(!0);taskId=M(()=>this.#e.statusData()?.TaskID?.toString()??void 0);lastRestoreStarted=M(()=>{let e=this.#e.statusData()?.backup?.Backup?.Metadata?.LastRestoreStarted??null;return e?this.fixDate(e):null});completedEffect=x(()=>{this.statusData()?.task?.Status==="Completed"&&this.isPolling.set(!1)});notificationFilterPredicate=()=>{let e=this.lastRestoreStarted();return{predicate:t=>(t.BackupID===this.#t.backupId()&&e&&e.getTime()<=new Date(t.Timestamp).getTime())??!1}};ngOnInit(){this.#e.fetchProgressState(),this.#e.startPollingProgress()}fixDate(e){return new Date(`${e.slice(0,4)}-${e.slice(4,6)}-${e.slice(6,8)}T${e.slice(9,11)}:${e.slice(11,13)}:${e.slice(13,15)}Z`)}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=y({type:n,selectors:[["app-restore-progress"]],decls:12,vars:6,consts:()=>{let e;e=$localize`Notifications`;let t;t=$localize`Logs`;let o;o=$localize`Restore completed`;let r;r=$localize` Restore progress: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_SPINNER:`;let a;a=$localize`Files processed:`;let c;c=$localize`Size processed:`;let N;N=$localize`N/A`;let k;return k=$localize`N/A`,[e,t,o,r,a,c,N,k,[1,"progress","type-a"],[1,"notifications","type-a"],[1,"notification-list"],[3,"notificationFilterPredicate"],[1,"logs","type-a"],[3,"asSimpleList","polling","whenFilter","backupIdFilter"],["title",""],[1,"complete-check"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"primary"],[1,"progress-content"],[3,"value"]]},template:function(t,o){if(t&1&&(i(0,"section"),g(1,V,8,0,"spk-card",8)(2,U,16,4,"spk-card",8),i(3,"spk-card",9)(4,"h3"),_(5,0),s(),i(6,"div",10),p(7,"app-notifications",11),s()(),i(8,"spk-card",12)(9,"h3"),_(10,1),s(),p(11,"app-logs-live",13),s()()),t&2){let r,a;l(),O(((r=o.statusData())==null||r.task==null?null:r.task.Status)==="Completed"?1:2),l(6),d("notificationFilterPredicate",o.notificationFilterPredicate()),l(4),d("asSimpleList",!0)("polling",o.isPolling())("whenFilter",(a=o.lastRestoreStarted())==null?null:a.getTime())("backupIdFilter",o.backupId())}},dependencies:[H,W,X,b,w,j,z,v],styles:['[_nghost-%COMP%]{display:block;padding:0 1.25rem}section[_ngcontent-%COMP%]{display:grid;gap:1.25rem;grid-template-columns:2fr 1fr;grid-template-areas:"progress notifications" "logs logs"}section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:1rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]{grid-area:progress}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]:has(.complete-check){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.25rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] spk-spinner[_ngcontent-%COMP%]{--spinner-size: 1.25rem;--spinner-thickness: .1875rem}section[_ngcontent-%COMP%] .notifications[_ngcontent-%COMP%]{grid-area:notifications}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%]{grid-area:logs}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{max-height:50rem;overflow:auto}.notification-list[_ngcontent-%COMP%]{max-height:15rem;overflow:auto}.complete-check[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--success-8)}.complete-check[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--success-8);stroke-width:.3125rem;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-content[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{margin-bottom:.75rem}.progress-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-right:.25rem}'],changeDetection:0})};export{F as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as y}from"./chunk-67XQIEG5.js";import{a as w}from"./chunk-VFVXE2DC.js";import{a as b}from"./chunk-BHSG643V.js";import"./chunk-OQHMS5HM.js";import"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as I,g as U,p as $}from"./chunk-DNBOZ26J.js";import{h as x}from"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Bb as f,F as m,Fc as L,Hb as v,Ib as M,Jb as F,Kb as E,La as O,Lb as T,Nb as k,Oa as l,Ob as c,X as _,_a as P,_b as D,ba as g,bc as u,ca as C,cc as R,la as S,pb as s,qb as p,r as G,ub as h,vb as a,wb as r,xb as d}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";function V(n,o){n&1&&d(0,"spk-progress-bar",3)}function B(n,o){if(n&1&&(a(0,"a",7),v(1,2),d(2,"spk-icon"),M(),r()),n&2){let e,t,i=c(2);h("href",(e=i.serverState())==null?null:e.UpdateDownloadLink,O),l(2),E((t=i.serverState())==null?null:t.UpdatedVersion),T(1)}}function X(n,o){if(n&1){let e=f();a(0,"button",6),k("click",function(){g(e);let i=c();return C(i.checkForUpdates())}),u(1,"Check for updates"),r(),s(2,B,3,2,"a",7)}if(n&2){let e,t=c();D("loader",t.checkingForUpdates()),l(2),p((e=t.serverState())!=null&&e.UpdateDownloadLink?2:-1)}}function z(n,o){if(n&1){let e=f();a(0,"button",6),k("click",function(){g(e);let i=c();return C(i.checkForUpdates())}),u(1,"Checking for updates \u2026"),r()}}function K(n,o){n&1&&d(0,"spk-progress-bar",3)}var A=class n{#e=_(x);#t=_(w);#n=_(b);isLoading=S(!0);checkingForUpdates=S(!1);serverState=this.#t.serverState;duplicatiVersion=L(()=>this.#n.systemInfo()?.ServerVersionName??"Unknown");generalInfo=y(this.#e.getApiV1Acknowledgements().pipe(G(o=>o.Acknowledgements),m(()=>this.isLoading.set(!1))));checkForUpdates(){this.checkingForUpdates.set(!0),this.#e.postApiV1UpdatesCheck().pipe(m(()=>this.checkingForUpdates.set(!1))).subscribe()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=P({type:n,selectors:[["app-general"]],decls:12,vars:5,consts:()=>{let o;o=$localize`General`;let e;e=$localize`You're running Duplicati with - ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;return t=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:download${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Download update - ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[o,e,t,[1,"indeterminate","primary"],[1,"actions"],["spk-button",""],["spk-button","",3,"click"],["spk-button","","target","_blank",1,"primary","raised",3,"href"]]},template:function(e,t){if(e&1&&(s(0,V,1,0,"spk-progress-bar",3),a(1,"section")(2,"h3"),F(3,0),r(),a(4,"p"),F(5,1),r(),a(6,"div",4),s(7,X,3,3)(8,z,2,0,"button",5),s(9,K,1,0,"spk-progress-bar",3),r(),a(10,"div"),u(11),r()()),e&2){let i,N;p(t.isLoading()?0:-1),l(5),E(t.duplicatiVersion()),T(5),l(2),p(((i=t.serverState())==null?null:i.UpdaterState)==="Waiting"?7:((i=t.serverState())==null?null:i.UpdaterState)==="Checking"?8:-1),l(2),p(((N=t.serverState())==null?null:N.UpdaterState)==="Downloading"?9:-1),l(2),R(t.generalInfo())}},dependencies:[$,U,I],styles:["[_nghost-%COMP%]{display:block;position:relative}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{A as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as xe}from"./chunk-2YHX57UE.js";import{s as Me}from"./chunk-ZCT7SRIM.js";import{A as ve,a as me,f as Ce,l as Pe,n as Ee,p as Te}from"./chunk-DNBOZ26J.js";import{h as be}from"./chunk-XD6MBGQY.js";import{ea as ge}from"./chunk-GP2W7XZF.js";import{Ab as U,B as ie,Bb as B,F as q,Fc as W,Gc as A,Jb as $,Kb as ae,Kc as Y,Lb as ce,Lc as T,Mc as Z,Nb as R,Oa as g,Ob as p,Pb as de,Qb as D,Wb as z,X,Xb as pe,Yb as J,Zb as ue,_a as se,_b as b,ba as N,bc as S,ca as k,db as Q,dc as he,la as M,n as te,pb as O,qb as F,r as L,rc as V,sb as re,sc as _e,tb as oe,ub as K,vb as u,wb as _,x as ne,xb as le,yc as fe}from"./chunk-67YRCRMI.js";import{a as j,b as G}from"./chunk-EUDKD2JW.js";var we=["treeContainer"],Ne=["formRef"],ke=[[["label"]],[["label"]],[["input"]]],Re=["label","label","input"],Ie=r=>({children:r,level:0}),Oe=r=>({$implicit:r}),We=(r,t)=>({children:r,level:t}),Ae=(r,t)=>t.id;function Le(r,t){if(r&1){let e=B();u(0,"spk-button-group")(1,"button",13),R("click",function(){N(e);let i=p();return k(i.pathDiscoveryMethod.set("browse"))}),$(2,4),_(),u(3,"button",13),R("click",function(){N(e);let i=p();return k(i.pathDiscoveryMethod.set("path"))}),$(4,5),_()()}if(r&2){let e=p();g(),b("active",e.pathDiscoveryMethod()==="browse"),g(2),b("active",e.pathDiscoveryMethod()==="path")}}function Be(r,t){r&1&&le(0,"spk-progress-bar",9)}function $e(r,t){r&1&&(u(0,"spk-icon",18),S(1,"caret-down"),_(),u(2,"spk-icon",16),S(3,"folder-open"),_())}function De(r,t){r&1&&(u(0,"spk-icon"),S(1,"file"),_())}function Ve(r,t){r&1&&(u(0,"spk-icon",18),S(1,"caret-right"),_(),u(2,"spk-icon",16),S(3,"folder"),_())}function He(r,t){if(r&1&&O(0,$e,4,0)(1,De,2,0,"spk-icon")(2,Ve,4,0),r&2){let e=p(2).$implicit;F(e.children.length?0:e.cls==="file"?1:2)}}function je(r,t){r&1&&(u(0,"spk-icon",16),S(1,"desktop-tower"),_())}function Ge(r,t){r&1&&U(0)}function qe(r,t){if(r&1&&Q(0,Ge,1,0,"ng-container",10),r&2){let e=p(2).$implicit,n=p().$implicit;p();let i=J(7);K("ngTemplateOutlet",i)("ngTemplateOutletContext",V(5,Oe,_e(2,We,e.children,n.level+1)))}}function Xe(r,t){if(r&1){let e=B();u(0,"div",14,3),R("click",function(){N(e);let i=p().$implicit,o=p(2);return k(o.toggleNode(i.id,i))}),u(2,"div",15),O(3,He,3,1)(4,je,2,0,"spk-icon",16),_(),u(5,"div",17),R("click",function(i){N(e);let o=p().$implicit,c=p(2);return k(c.toggleSelectedNode(i,o))}),S(6),_()(),O(7,qe,1,7,"ng-container")}if(r&2){let e=p().$implicit,n=p().$implicit,i=p();b("accepted",e.accepted===!0)("active",e.evalState===i.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",n.level===0),g(2),b("file",e.cls==="file"),g(),F(e.id!=="/"?3:4),g(3),he(" ",e.text," "),g(),F(e.children.length>0?7:-1)}}function Qe(r,t){if(r&1&&O(0,Xe,8,17),r&2){let e=t.$implicit,n=p(2);F(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function Ke(r,t){if(r&1&&(u(0,"spk-list"),re(1,Qe,1,1,null,null,Ae),_()),r&2){let e=t.$implicit;ue("padding-left",e.level*.25,"rem"),g(),oe(e.children)}}function Ue(r,t){r&1&&U(0)}function ze(r,t){if(r&1){let e=B();u(0,"spk-toggle",19),R("click",function(){N(e);let i=p();return k(i._showHiddenNodes.set(!i._showHiddenNodes()))}),$(1,6),_()}if(r&2){let e=p();b("active",e._showHiddenNodes()),g(),ae(e.showFiles()?"files":"folders"),ce(1)}}var Fe=(o=>(o[o.ExcludedByParent=-2]="ExcludedByParent",o[o.Excluded=-1]="Excluded",o[o.None=0]="None",o[o.Included=1]="Included",o[o.IncludedByParent=2]="IncludedByParent",o))(Fe||{}),ee=class r{#e=X(be);#t=X(xe);multiSelect=T(!1);disabled=T(!1);showFiles=T(!1);selectFiles=T(!1);accepts=T(null);startingPath=T(null);rootPaths=T([]);backupSettings=T(null);pathRefreshTrigger=T(!1);showHiddenNodes=T(!1);hideShortcuts=T(!1);includes=Y();excludes=Y();_showHiddenNodes=M(!1);treeContainerRef=Z("treeContainer");formRef=Z("formRef");pathDiscoveryMethod=M("browse");isLoading=M(!1);currentPath=M("/");#n=M(null);treeSearchQuery=M("");treeNodes=M([]);isWindows=W(()=>this.#t.systemInfo()?.OSType==="Windows");filterGroups=this.#t.filterGroups();isByBackupSettings=W(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=W(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Fe;treeStructure=W(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(s=>s!==""&&s!=="/"),n=structuredClone(e);for(let s=0;s<n.length;s++){let a=n[s].slice(1);if(a.startsWith("{")&&a.endsWith("}")){let C=a.slice(1,-1),d=this.filterGroups?.FilterGroups[C];if(d&&d.length){let v=d.map(P=>`-${P}`);n.splice(s,1,...v)}}}let i=this.searchableTreeNodes(),o=this.rootPaths(),c=this.accepts(),m=this.isWindows(),l=[];return o.length>0?l=o.map(s=>({id:s,resolvedpath:s,text:s,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"})):l=[{id:"/",resolvedpath:"/",text:"Computer",parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}],l.map(s=>{let f=new Map,a=s?.id;c&&(s.accepted=!0),f.set(s.id,s);let C=o.length>0?i.filter(d=>d.parentPath===s.id):i;for(let d of C){let v=o.length>0?d.id.replace(a??"",""):d.id,P=m?"\\":"/",h=v.split(P).filter(Boolean),E="",x=s;for(let H of h){if(E+=H+P,!f.has(E)){let I=d.hidden===!0&&t?0:this.#o(n,d.id,d.cls,x,m),y={id:d.id,isIndeterminate:this.isIndeterminate(n,d.id),evalState:I,parentPath:E,resolvedpath:d.id?.startsWith("%")?d.resolvedpath+P:E,hidden:d.hidden,text:d.text,cls:d.cls,children:[]};c&&(y.accepted=this.matchAccepts(c,y)),f.set(E,y),x.children.push(y)}x=f.get(E)}}return s}),l});#o(t,e,n,i,o){if(i.evalState===-1)return-2;let c=0,m=t.filter(s=>!s.startsWith("-")&&!s.startsWith("+")),l=t.filter(s=>s.startsWith("-")||s.startsWith("+"));if(m.length===0)return c;for(let s=0;s<m.length;s++){let f=m[s];if(e?.startsWith(f)){c=1;break}}if(l.length===0)return c;for(let s=0;s<l.length;s++){let f=l[s],a=f.slice(1),C=f.startsWith("-")?"exclude":"include",d=o?"\\":"/";if((o?a.slice(2):a).startsWith(d)&&a.endsWith(d)){if(n!=="folder")continue;if(e===a){c=C==="include"?1:-1;break}}if(a.startsWith("*")&&a.endsWith(`*${d}`)){if(n!=="folder")continue;let h=a.slice(1,-2);if(h==="")break;if(e?.includes(h+d)){c=C==="include"?1:-1;break}}if(a.startsWith("[.*")&&a.endsWith(`[^\\${d}]*]`)){if(n!=="file")continue;let h=a.slice(3,-7);if(new RegExp(h).test(e)){c=C==="include"?1:-1;break}}if(a.startsWith("[")&&a.endsWith("]")){let h=a.slice(1,-1),E=this.translateCSharpRegex(h);if(new RegExp(`${E}`).test(e)){c=C==="include"?1:-1;break}}if(a.startsWith("*.")){if(n!=="file"||a.replace("*.","").length===0)continue;if(this.#s(e,a,!0)){c=C==="include"?1:-1;break}}if(a==="")continue;if(a===e){c=C==="include"?1:-1;break}if(this.#s(e,a,!0)){c=C==="include"?1:-1;break}}return c}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(i,o,c)=>`(${c})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.some(n=>n.startsWith(e))}#s(t,e,n=!1){let i=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${i}${n?"$":""}`).test(t)}showHiddenNodesEffect=A(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=A(()=>{let t=this.pathDiscoveryMethod(),e=this.#n();t==="browse"&&e&&this.currentPath.set(e.value)});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id==="/")return!0;let n=t.split(",");if(n.length===0)return!0;let i="."+e.id.slice(e.id.indexOf("."));return i?n.some(o=>i.endsWith(o)):!1}currentPathEffect=A(()=>{let t=this.#n();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=A(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#a(t),this.inputValueChangeAbortController&&this.inputValueChangeAbortController.abort(),this.inputValueChangeAbortController=new AbortController,t.addEventListener("inputValueChanged",e=>{this.currentPath.set(e.detail.value)},{signal:this.inputValueChangeAbortController.signal}),this.#n.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();if(t)this.currentPath.set(t),this.#p(t);else{let e=this.rootPaths();e&&e.length>0?this.#i(null,e[0]):this.#i(null,"/")}}toggleSelectedNode(t,e){if(e.id==="/"||(t.stopPropagation(),e.evalState===-2))return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(e.id,e);return}if(this.accepts()&&!e.accepted)return;let i=this.currentPath().split("\0").filter(c=>c!==""&&c!=="/"),o=this.isChildOfSelected(e)?`-${e.id}`:e.id;this.multiSelect()?i.includes(e.id)?this.currentPath.set(i.filter(c=>c!==e.id).join("\0")):i.some(c=>c.startsWith(o))?this.currentPath.set(i.filter(c=>c!==o).join("\0")):this.currentPath.set([...i,o].join("\0")):i.includes(e.id)?this.currentPath.set(i.filter(c=>c!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(n=>n!==""&&n!=="/").some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(n=>n.filter(i=>!i.id?.startsWith(e.id)||i.id===e.id)):this.#i(e,t))}#l(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)}#a(t){return Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(e){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,e),this.dispatchEvent(new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}})),e}}),t}#c(t){return this.#e.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#d(t){let e=this.backupSettings();if(this.#t.hasV2ListOperations())return this.#e.postApiV2BackupListFolder({requestBody:{BackupId:e.id,Time:e.time,Paths:t?[t]:null,PageSize:0,Page:0}}).pipe(L(n=>n.Data??[]));{let n={id:e.id+"",prefixOnly:!1,folderContents:!0,time:e.time,filter:t?"@"+t:void 0};return this.#e.getApiV1BackupByIdFiles(n).pipe(L(i=>i.Files??[]))}}#r(t){return this.isByBackupSettings()?this.#d(t):this.#c(t)}#p(t){let e=this.isWindows(),n=t.split("\0").filter(l=>l.startsWith("-")).map(l=>l.slice(1,-1)),i=t.split("\0").filter(l=>!l.startsWith("-")).filter(Boolean),o=i.map(l=>{let s=l.split(e?"\\":"/");return s.at(-1)!==""&&s.pop(),s}),c=["/"];o.forEach(l=>{l.forEach((s,f)=>{let a=l.slice(0,f+1).join(e?"\\":"/");a!==""&&(c.includes(a)||c.push(a))})}),this.isLoading.set(!0);let m=c.map(l=>this.#r(l).pipe(L(s=>({status:"success",value:s,url:l})),ie(s=>te({status:"error",value:s,url:l}))));ne(m).pipe(q(()=>this.isLoading.set(!1))).subscribe({next:l=>{let s=l.filter(a=>a.status==="success"),f=l.filter(a=>a.status==="error");this.treeNodes.update(a=>{let C=s.flatMap(v=>v.value.map(P=>{let h=P.id,E=P.id.startsWith("%")&&P.id.endsWith("%")?P.resolvedpath+"/":P.id,x=h&&h.split("/").filter(Boolean).slice(0,-1).join("/"),I="/"+(h&&h.split("/").filter(Boolean).join("/")),y=i.findIndex(w=>this.multiSelect()?I.startsWith(w):I===w)>-1,Se=i.findIndex(w=>w===h)>-1,ye=n.findIndex(w=>w===I)>-1;return G(j({},P),{cls:E.endsWith("/")||E.endsWith("\\")?"folder":"file",parentPath:x.startsWith("%")?x:"/"+x,isSelected:y&&!ye||Se})})),d=[...new Map([...a,...C].map(v=>[v.id,v])).values()];return this.#l(),this.hideShortcuts()?d.filter(v=>!v.id.startsWith("%")):d})}})}#i(t=null,e="/"){this.isLoading.set(!0),this.#r(e).pipe(q(()=>this.isLoading.set(!1))).subscribe({next:n=>{let i=this.isByBackupSettings()?n.map(o=>{let m=o.Path.includes("\\")?"\\":"/";return{text:o.Path.split(m).filter(l=>l!=="").pop(),id:o.Path,cls:o.Path.endsWith(m)?"folder":"file",leaf:t!==null,resolvedpath:o.Path,hidden:!1}}):n;this.treeNodes.update(o=>{let c=i.map(l=>{let f=l.id.includes("\\")?"\\":"/",a=l.id.startsWith("%")&&l.id.endsWith("%")||l.id.endsWith(f)?"folder":"file";return G(j({},l),{cls:a,parentPath:e})}),m=[...new Map([...o,...c].map(l=>[l.id,l])).values()];return this.hideShortcuts()?m.filter(l=>!l.id.startsWith("%")):m})}})}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=se({type:r,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&(z(n.treeContainerRef,we,5),z(n.formRef,Ne,5)),e&2&&pe(2)},hostVars:2,hostBindings:function(e,n){e&2&&b("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPaths:[1,"rootPaths"],backupSettings:[1,"backupSettings"],pathRefreshTrigger:[1,"pathRefreshTrigger"],showHiddenNodes:[1,"showHiddenNodes"],hideShortcuts:[1,"hideShortcuts"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:Re,decls:15,vars:15,consts:()=>{let t;t=$localize` Browse path `;let e;e=$localize` Manually type path `;let n;return n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"primary","raised","browse-files-toggle",3,"active"],[1,"form-field"],["type","button",3,"click"],["action","",3,"click"],[1,"icon"],[1,"primary"],[1,"text",3,"click"],[1,"small"],[1,"primary","raised","browse-files-toggle",3,"click"]]},template:function(e,n){if(e&1&&(de(ke),O(0,Le,5,4,"spk-button-group"),u(1,"div",7),D(2,0,["ngProjectAs","label",5,["label"]]),u(3,"div",8,0),O(5,Be,1,0,"spk-progress-bar",9),Q(6,Ke,3,2,"ng-template",null,1,fe)(8,Ue,1,0,"ng-container",10),_(),O(9,ze,2,3,"spk-toggle",11),_(),u(10,"div",12,2)(12,"spk-form-field"),D(13,1,["ngProjectAs","label",5,["label"]]),D(14,2,["ngProjectAs","input",5,["input"]]),_()()),e&2){let i=J(7);F(n.multiSelect()?-1:0),g(),b("hidden",n.pathDiscoveryMethod()!=="browse"),g(2),b("visualize-accepted",n.accepts()),g(2),F(n.isLoading()?5:-1),g(3),K("ngTemplateOutlet",i)("ngTemplateOutletContext",V(13,Oe,V(11,Ie,n.treeStructure()))),g(),F(!n.accepts()&&!n.isByBackupSettings()?9:-1),g(),b("hidden",n.pathDiscoveryMethod()!=="path")}},dependencies:[Ce,ve,me,Pe,Ee,Te,ge,Me],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] spk-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;border:1px solid var(--base-4);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-1);position:relative}.browse-files[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-3);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:0;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:transparent;--list-active-bg: var(--primary-2)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-4)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%]{gap:.25rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:has(spk-icon:nth-child(2)){width:3rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:3rem;gap:.25rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon.file[_ngcontent-%COMP%]{width:2rem;padding:0 .25rem}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-9)}.hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};export{ee as a};
|
|
1
|
+
import{a as xe}from"./chunk-BHSG643V.js";import{s as Me}from"./chunk-ZCT7SRIM.js";import{A as ve,a as me,f as Ce,l as Pe,n as Ee,p as Te}from"./chunk-DNBOZ26J.js";import{h as be}from"./chunk-XD6MBGQY.js";import{ea as ge}from"./chunk-GP2W7XZF.js";import{Ab as U,B as ie,Bb as B,F as q,Fc as W,Gc as A,Jb as $,Kb as ae,Kc as Y,Lb as ce,Lc as T,Mc as Z,Nb as R,Oa as g,Ob as p,Pb as de,Qb as D,Wb as z,X,Xb as pe,Yb as J,Zb as ue,_a as se,_b as b,ba as N,bc as S,ca as k,db as Q,dc as he,la as M,n as te,pb as O,qb as F,r as L,rc as V,sb as re,sc as _e,tb as oe,ub as K,vb as u,wb as _,x as ne,xb as le,yc as fe}from"./chunk-67YRCRMI.js";import{a as j,b as G}from"./chunk-EUDKD2JW.js";var we=["treeContainer"],Ne=["formRef"],ke=[[["label"]],[["label"]],[["input"]]],Re=["label","label","input"],Ie=r=>({children:r,level:0}),Oe=r=>({$implicit:r}),We=(r,t)=>({children:r,level:t}),Ae=(r,t)=>t.id;function Le(r,t){if(r&1){let e=B();u(0,"spk-button-group")(1,"button",13),R("click",function(){N(e);let i=p();return k(i.pathDiscoveryMethod.set("browse"))}),$(2,4),_(),u(3,"button",13),R("click",function(){N(e);let i=p();return k(i.pathDiscoveryMethod.set("path"))}),$(4,5),_()()}if(r&2){let e=p();g(),b("active",e.pathDiscoveryMethod()==="browse"),g(2),b("active",e.pathDiscoveryMethod()==="path")}}function Be(r,t){r&1&&le(0,"spk-progress-bar",9)}function $e(r,t){r&1&&(u(0,"spk-icon",18),S(1,"caret-down"),_(),u(2,"spk-icon",16),S(3,"folder-open"),_())}function De(r,t){r&1&&(u(0,"spk-icon"),S(1,"file"),_())}function Ve(r,t){r&1&&(u(0,"spk-icon",18),S(1,"caret-right"),_(),u(2,"spk-icon",16),S(3,"folder"),_())}function He(r,t){if(r&1&&O(0,$e,4,0)(1,De,2,0,"spk-icon")(2,Ve,4,0),r&2){let e=p(2).$implicit;F(e.children.length?0:e.cls==="file"?1:2)}}function je(r,t){r&1&&(u(0,"spk-icon",16),S(1,"desktop-tower"),_())}function Ge(r,t){r&1&&U(0)}function qe(r,t){if(r&1&&Q(0,Ge,1,0,"ng-container",10),r&2){let e=p(2).$implicit,n=p().$implicit;p();let i=J(7);K("ngTemplateOutlet",i)("ngTemplateOutletContext",V(5,Oe,_e(2,We,e.children,n.level+1)))}}function Xe(r,t){if(r&1){let e=B();u(0,"div",14,3),R("click",function(){N(e);let i=p().$implicit,o=p(2);return k(o.toggleNode(i.id,i))}),u(2,"div",15),O(3,He,3,1)(4,je,2,0,"spk-icon",16),_(),u(5,"div",17),R("click",function(i){N(e);let o=p().$implicit,c=p(2);return k(c.toggleSelectedNode(i,o))}),S(6),_()(),O(7,qe,1,7,"ng-container")}if(r&2){let e=p().$implicit,n=p().$implicit,i=p();b("accepted",e.accepted===!0)("active",e.evalState===i.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",n.level===0),g(2),b("file",e.cls==="file"),g(),F(e.id!=="/"?3:4),g(3),he(" ",e.text," "),g(),F(e.children.length>0?7:-1)}}function Qe(r,t){if(r&1&&O(0,Xe,8,17),r&2){let e=t.$implicit,n=p(2);F(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function Ke(r,t){if(r&1&&(u(0,"spk-list"),re(1,Qe,1,1,null,null,Ae),_()),r&2){let e=t.$implicit;ue("padding-left",e.level*.25,"rem"),g(),oe(e.children)}}function Ue(r,t){r&1&&U(0)}function ze(r,t){if(r&1){let e=B();u(0,"spk-toggle",19),R("click",function(){N(e);let i=p();return k(i._showHiddenNodes.set(!i._showHiddenNodes()))}),$(1,6),_()}if(r&2){let e=p();b("active",e._showHiddenNodes()),g(),ae(e.showFiles()?"files":"folders"),ce(1)}}var Fe=(o=>(o[o.ExcludedByParent=-2]="ExcludedByParent",o[o.Excluded=-1]="Excluded",o[o.None=0]="None",o[o.Included=1]="Included",o[o.IncludedByParent=2]="IncludedByParent",o))(Fe||{}),ee=class r{#e=X(be);#t=X(xe);multiSelect=T(!1);disabled=T(!1);showFiles=T(!1);selectFiles=T(!1);accepts=T(null);startingPath=T(null);rootPaths=T([]);backupSettings=T(null);pathRefreshTrigger=T(!1);showHiddenNodes=T(!1);hideShortcuts=T(!1);includes=Y();excludes=Y();_showHiddenNodes=M(!1);treeContainerRef=Z("treeContainer");formRef=Z("formRef");pathDiscoveryMethod=M("browse");isLoading=M(!1);currentPath=M("/");#n=M(null);treeSearchQuery=M("");treeNodes=M([]);isWindows=W(()=>this.#t.systemInfo()?.OSType==="Windows");filterGroups=this.#t.filterGroups();isByBackupSettings=W(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=W(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Fe;treeStructure=W(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(s=>s!==""&&s!=="/"),n=structuredClone(e);for(let s=0;s<n.length;s++){let a=n[s].slice(1);if(a.startsWith("{")&&a.endsWith("}")){let C=a.slice(1,-1),d=this.filterGroups?.FilterGroups[C];if(d&&d.length){let v=d.map(P=>`-${P}`);n.splice(s,1,...v)}}}let i=this.searchableTreeNodes(),o=this.rootPaths(),c=this.accepts(),m=this.isWindows(),l=[];return o.length>0?l=o.map(s=>({id:s,resolvedpath:s,text:s,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"})):l=[{id:"/",resolvedpath:"/",text:"Computer",parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}],l.map(s=>{let f=new Map,a=s?.id;c&&(s.accepted=!0),f.set(s.id,s);let C=o.length>0?i.filter(d=>d.parentPath===s.id):i;for(let d of C){let v=o.length>0?d.id.replace(a??"",""):d.id,P=m?"\\":"/",h=v.split(P).filter(Boolean),E="",x=s;for(let H of h){if(E+=H+P,!f.has(E)){let I=d.hidden===!0&&t?0:this.#o(n,d.id,d.cls,x,m),y={id:d.id,isIndeterminate:this.isIndeterminate(n,d.id),evalState:I,parentPath:E,resolvedpath:d.id?.startsWith("%")?d.resolvedpath+P:E,hidden:d.hidden,text:d.text,cls:d.cls,children:[]};c&&(y.accepted=this.matchAccepts(c,y)),f.set(E,y),x.children.push(y)}x=f.get(E)}}return s}),l});#o(t,e,n,i,o){if(i.evalState===-1)return-2;let c=0,m=t.filter(s=>!s.startsWith("-")&&!s.startsWith("+")),l=t.filter(s=>s.startsWith("-")||s.startsWith("+"));if(m.length===0)return c;for(let s=0;s<m.length;s++){let f=m[s];if(e?.startsWith(f)){c=1;break}}if(l.length===0)return c;for(let s=0;s<l.length;s++){let f=l[s],a=f.slice(1),C=f.startsWith("-")?"exclude":"include",d=o?"\\":"/";if((o?a.slice(2):a).startsWith(d)&&a.endsWith(d)){if(n!=="folder")continue;if(e===a){c=C==="include"?1:-1;break}}if(a.startsWith("*")&&a.endsWith(`*${d}`)){if(n!=="folder")continue;let h=a.slice(1,-2);if(h==="")break;if(e?.includes(h+d)){c=C==="include"?1:-1;break}}if(a.startsWith("[.*")&&a.endsWith(`[^\\${d}]*]`)){if(n!=="file")continue;let h=a.slice(3,-7);if(new RegExp(h).test(e)){c=C==="include"?1:-1;break}}if(a.startsWith("[")&&a.endsWith("]")){let h=a.slice(1,-1),E=this.translateCSharpRegex(h);if(new RegExp(`${E}`).test(e)){c=C==="include"?1:-1;break}}if(a.startsWith("*.")){if(n!=="file"||a.replace("*.","").length===0)continue;if(this.#s(e,a,!0)){c=C==="include"?1:-1;break}}if(a==="")continue;if(a===e){c=C==="include"?1:-1;break}if(this.#s(e,a,!0)){c=C==="include"?1:-1;break}}return c}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(i,o,c)=>`(${c})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.some(n=>n.startsWith(e))}#s(t,e,n=!1){let i=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${i}${n?"$":""}`).test(t)}showHiddenNodesEffect=A(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=A(()=>{let t=this.pathDiscoveryMethod(),e=this.#n();t==="browse"&&e&&this.currentPath.set(e.value)});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id==="/")return!0;let n=t.split(",");if(n.length===0)return!0;let i="."+e.id.slice(e.id.indexOf("."));return i?n.some(o=>i.endsWith(o)):!1}currentPathEffect=A(()=>{let t=this.#n();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=A(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#a(t),this.inputValueChangeAbortController&&this.inputValueChangeAbortController.abort(),this.inputValueChangeAbortController=new AbortController,t.addEventListener("inputValueChanged",e=>{this.currentPath.set(e.detail.value)},{signal:this.inputValueChangeAbortController.signal}),this.#n.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();if(t)this.currentPath.set(t),this.#p(t);else{let e=this.rootPaths();e&&e.length>0?this.#i(null,e[0]):this.#i(null,"/")}}toggleSelectedNode(t,e){if(e.id==="/"||(t.stopPropagation(),e.evalState===-2))return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(e.id,e);return}if(this.accepts()&&!e.accepted)return;let i=this.currentPath().split("\0").filter(c=>c!==""&&c!=="/"),o=this.isChildOfSelected(e)?`-${e.id}`:e.id;this.multiSelect()?i.includes(e.id)?this.currentPath.set(i.filter(c=>c!==e.id).join("\0")):i.some(c=>c.startsWith(o))?this.currentPath.set(i.filter(c=>c!==o).join("\0")):this.currentPath.set([...i,o].join("\0")):i.includes(e.id)?this.currentPath.set(i.filter(c=>c!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(n=>n!==""&&n!=="/").some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(n=>n.filter(i=>!i.id?.startsWith(e.id)||i.id===e.id)):this.#i(e,t))}#l(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)}#a(t){return Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(e){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,e),this.dispatchEvent(new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}})),e}}),t}#c(t){return this.#e.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#d(t){let e=this.backupSettings();if(this.#t.hasV2ListOperations())return this.#e.postApiV2BackupListFolder({requestBody:{BackupId:e.id,Time:e.time,Paths:t?[t]:null,PageSize:0,Page:0}}).pipe(L(n=>n.Data??[]));{let n={id:e.id+"",prefixOnly:!1,folderContents:!0,time:e.time,filter:t?"@"+t:void 0};return this.#e.getApiV1BackupByIdFiles(n).pipe(L(i=>i.Files??[]))}}#r(t){return this.isByBackupSettings()?this.#d(t):this.#c(t)}#p(t){let e=this.isWindows(),n=t.split("\0").filter(l=>l.startsWith("-")).map(l=>l.slice(1,-1)),i=t.split("\0").filter(l=>!l.startsWith("-")).filter(Boolean),o=i.map(l=>{let s=l.split(e?"\\":"/");return s.at(-1)!==""&&s.pop(),s}),c=["/"];o.forEach(l=>{l.forEach((s,f)=>{let a=l.slice(0,f+1).join(e?"\\":"/");a!==""&&(c.includes(a)||c.push(a))})}),this.isLoading.set(!0);let m=c.map(l=>this.#r(l).pipe(L(s=>({status:"success",value:s,url:l})),ie(s=>te({status:"error",value:s,url:l}))));ne(m).pipe(q(()=>this.isLoading.set(!1))).subscribe({next:l=>{let s=l.filter(a=>a.status==="success"),f=l.filter(a=>a.status==="error");this.treeNodes.update(a=>{let C=s.flatMap(v=>v.value.map(P=>{let h=P.id,E=P.id.startsWith("%")&&P.id.endsWith("%")?P.resolvedpath+"/":P.id,x=h&&h.split("/").filter(Boolean).slice(0,-1).join("/"),I="/"+(h&&h.split("/").filter(Boolean).join("/")),y=i.findIndex(w=>this.multiSelect()?I.startsWith(w):I===w)>-1,Se=i.findIndex(w=>w===h)>-1,ye=n.findIndex(w=>w===I)>-1;return G(j({},P),{cls:E.endsWith("/")||E.endsWith("\\")?"folder":"file",parentPath:x.startsWith("%")?x:"/"+x,isSelected:y&&!ye||Se})})),d=[...new Map([...a,...C].map(v=>[v.id,v])).values()];return this.#l(),this.hideShortcuts()?d.filter(v=>!v.id.startsWith("%")):d})}})}#i(t=null,e="/"){this.isLoading.set(!0),this.#r(e).pipe(q(()=>this.isLoading.set(!1))).subscribe({next:n=>{let i=this.isByBackupSettings()?n.map(o=>{let m=o.Path.includes("\\")?"\\":"/";return{text:o.Path.split(m).filter(l=>l!=="").pop(),id:o.Path,cls:o.Path.endsWith(m)?"folder":"file",leaf:t!==null,resolvedpath:o.Path,hidden:!1}}):n;this.treeNodes.update(o=>{let c=i.map(l=>{let f=l.id.includes("\\")?"\\":"/",a=l.id.startsWith("%")&&l.id.endsWith("%")||l.id.endsWith(f)?"folder":"file";return G(j({},l),{cls:a,parentPath:e})}),m=[...new Map([...o,...c].map(l=>[l.id,l])).values()];return this.hideShortcuts()?m.filter(l=>!l.id.startsWith("%")):m})}})}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=se({type:r,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&(z(n.treeContainerRef,we,5),z(n.formRef,Ne,5)),e&2&&pe(2)},hostVars:2,hostBindings:function(e,n){e&2&&b("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPaths:[1,"rootPaths"],backupSettings:[1,"backupSettings"],pathRefreshTrigger:[1,"pathRefreshTrigger"],showHiddenNodes:[1,"showHiddenNodes"],hideShortcuts:[1,"hideShortcuts"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:Re,decls:15,vars:15,consts:()=>{let t;t=$localize` Browse path `;let e;e=$localize` Manually type path `;let n;return n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"primary","raised","browse-files-toggle",3,"active"],[1,"form-field"],["type","button",3,"click"],["action","",3,"click"],[1,"icon"],[1,"primary"],[1,"text",3,"click"],[1,"small"],[1,"primary","raised","browse-files-toggle",3,"click"]]},template:function(e,n){if(e&1&&(de(ke),O(0,Le,5,4,"spk-button-group"),u(1,"div",7),D(2,0,["ngProjectAs","label",5,["label"]]),u(3,"div",8,0),O(5,Be,1,0,"spk-progress-bar",9),Q(6,Ke,3,2,"ng-template",null,1,fe)(8,Ue,1,0,"ng-container",10),_(),O(9,ze,2,3,"spk-toggle",11),_(),u(10,"div",12,2)(12,"spk-form-field"),D(13,1,["ngProjectAs","label",5,["label"]]),D(14,2,["ngProjectAs","input",5,["input"]]),_()()),e&2){let i=J(7);F(n.multiSelect()?-1:0),g(),b("hidden",n.pathDiscoveryMethod()!=="browse"),g(2),b("visualize-accepted",n.accepts()),g(2),F(n.isLoading()?5:-1),g(3),K("ngTemplateOutlet",i)("ngTemplateOutletContext",V(13,Oe,V(11,Ie,n.treeStructure()))),g(),F(!n.accepts()&&!n.isByBackupSettings()?9:-1),g(),b("hidden",n.pathDiscoveryMethod()!=="path")}},dependencies:[Ce,ve,me,Pe,Ee,Te,ge,Me],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] spk-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;border:1px solid var(--base-4);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-1);position:relative}.browse-files[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-3);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:0;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:transparent;--list-active-bg: var(--primary-2)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-4)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%]{gap:.25rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:has(spk-icon:nth-child(2)){width:3rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:3rem;gap:.25rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon.file[_ngcontent-%COMP%]{width:2rem;padding:0 .25rem}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-9)}.hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};export{ee as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as a,g as b}from"./chunk-
|
|
1
|
+
import{f as a,g as b}from"./chunk-DE64A2ZS.js";import"./chunk-HWUEL5ZO.js";import"./chunk-ZIJ7ZEHR.js";import"./chunk-5RPDEEQ3.js";import"./chunk-67XQIEG5.js";import"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-BHSG643V.js";import"./chunk-ZCT7SRIM.js";import"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import"./chunk-DNBOZ26J.js";import"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";export{a as createSourceDataForm,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h}from"./chunk-
|
|
1
|
+
import{a as h}from"./chunk-B6DE3TTE.js";import"./chunk-VFVXE2DC.js";import"./chunk-RHW5QVAY.js";import"./chunk-BHSG643V.js";import{b as v,c as G,e as L,f as w,j as U,o as K,q as X,r as x,t as V}from"./chunk-ZCT7SRIM.js";import"./chunk-OQHMS5HM.js";import{d as O,e as A}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{A as y,a as b,c as R,g as N,l as E,m as $}from"./chunk-DNBOZ26J.js";import{h as B}from"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{F as g,Hb as D,Ib as P,Jb as _,Mb as I,Nb as d,Oa as s,X as F,_a as T,_b as M,la as m,pb as C,qb as S,qc as k,ub as u,vb as r,wb as n,xb as l}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var z=()=>["/"];function j(c,t){c&1&&(r(0,"spk-form-field")(1,"label",14),_(2,3),n(),l(3,"input",15),n())}var p=new x,f=class c{#e=F(R);#t=F(B);#o=F(h);#n=F(O);isImporting=m(!1);isSecureFile=m(!1);importForm=p.group({config:p.control(""),cmdline:p.control(!1),importMetadata:p.control(!1),direct:p.control(!1),passphrase:p.control("")});selectedFile=m([]);onFileDropped(t){let e=t[0];if(e){let o=new FileReader;this.isSecureFile.set(e.type!=="application/json"),o.onload=this.#i.bind(this),o.readAsArrayBuffer(e)}}#i(t){let e=t.target?.result;this.importForm.patchValue({config:this.#r(e)})}#r(t){let e=new Uint8Array(t),o=e.byteLength,a="";for(let i=0;i<o;i++)a+=String.fromCharCode(e[i]);return btoa(a)}submit(){this.isImporting.set(!0),this.#t.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(g(()=>this.isImporting.set(!1))).subscribe({next:t=>{let e=this.#o.addDraftBackup(t.data);this.#n.navigate(["/backup-draft",e])},error:t=>{this.#e.error(t.message)}})}static \u0275fac=function(e){return new(e||c)};static \u0275cmp=T({type:c,selectors:[["app-import"]],decls:19,vars:8,consts:()=>{let t;t=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,t=I(t);let e;e=$localize`Import Metadata`;let o;o=$localize`Save now`;let a;return a=$localize`Passphrase`,[t,e,o,a,[1,"actions"],["spk-button","","type","button",1,"outlined",3,"routerLink"],["spk-button","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["accept",".json,.aes",3,"filesChange","files"],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","importMetadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(e,o){e&1&&(r(0,"header")(1,"h3"),D(2,0),r(3,"div",4)(4,"button",5),l(5,"spk-icon"),n(),r(6,"button",6),d("click",function(){return o.submit()}),l(7,"spk-icon"),n()(),P(),n()(),r(8,"form",7)(9,"spk-file-upload",8),d("filesChange",function(i){return o.onFileDropped(i)}),n(),C(10,j,4,0,"spk-form-field"),r(11,"spk-toggle",9)(12,"label",10),_(13,1),n(),l(14,"input",11),n(),r(15,"spk-toggle",9)(16,"label",12),_(17,2),n(),l(18,"input",13),n()()),e&2&&(s(4),u("routerLink",k(7,z)),s(2),M("loader",o.isImporting()),u("disabled",o.isImporting()),s(2),u("formGroup",o.importForm),s(),u("files",o.selectedFile()),s(),S(o.isSecureFile()?10:-1))},dependencies:[V,U,G,v,L,w,K,X,A,E,b,N,y,$],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}spk-file-upload[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};export{f as default};
|