@duplicati/ngclient 0.0.88 → 0.0.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/{chunk-UUNZQKSW.js → chunk-2FAACUDI.js} +1 -1
  2. package/{chunk-Z55AE6ZP.js → chunk-2UJP6WUU.js} +1 -1
  3. package/{chunk-IOCSGWZ3.js → chunk-6BPJFTZW.js} +1 -1
  4. package/{chunk-RZ4FUSBJ.js → chunk-6CW3SAXM.js} +1 -1
  5. package/{chunk-F4QKO25T.js → chunk-76MZP6D5.js} +1 -1
  6. package/{chunk-GWK5ZGTC.js → chunk-7AHZCQM7.js} +1 -1
  7. package/{chunk-KD4DXWHW.js → chunk-B6FHJOT5.js} +1 -1
  8. package/{chunk-KL4KTR4Z.js → chunk-C4CQLUE6.js} +1 -1
  9. package/{chunk-H3MGI3SF.js → chunk-DJWDNTTP.js} +1 -1
  10. package/chunk-DJZUZAH5.js +1 -0
  11. package/{chunk-25GEPULG.js → chunk-DKICGIGJ.js} +1 -1
  12. package/{chunk-SK5UJPNU.js → chunk-DPNFOEAN.js} +1 -1
  13. package/chunk-DPPV7DVK.js +1 -0
  14. package/{chunk-Z4U4LDKL.js → chunk-EAGORY3U.js} +1 -1
  15. package/{chunk-UK7OJJ5S.js → chunk-EMLPXGRD.js} +1 -1
  16. package/{chunk-7CDKTUA7.js → chunk-FCQHE46G.js} +2 -2
  17. package/{chunk-O4ZJY3TF.js → chunk-H5V5U4VH.js} +1 -1
  18. package/{chunk-UJMJKY2E.js → chunk-JCIUBQIN.js} +1 -1
  19. package/{chunk-3CXMAX4S.js → chunk-JFC5Z7YL.js} +1 -1
  20. package/{chunk-SXPBIWPS.js → chunk-L2LZKY4R.js} +1 -1
  21. package/chunk-LAGOXMVK.js +1 -0
  22. package/chunk-LBJYPZA5.js +1 -0
  23. package/{chunk-GLM4XFEI.js → chunk-LRB2TMMB.js} +1 -1
  24. package/{chunk-BIVRH4JH.js → chunk-MMNUKDWS.js} +1 -1
  25. package/{chunk-G3LEXMG4.js → chunk-MTCSELIF.js} +1 -1
  26. package/{chunk-OEVX57MC.js → chunk-PEA355CX.js} +1 -1
  27. package/{chunk-AM4I6XHR.js → chunk-RS7BKRUH.js} +1 -1
  28. package/{chunk-5KNWZI2J.js → chunk-S3L5VJJF.js} +3 -3
  29. package/{chunk-Q3SDBZEH.js → chunk-SJBPW65N.js} +1 -1
  30. package/{chunk-DJD73EPX.js → chunk-T7LDHEC3.js} +1 -1
  31. package/{chunk-M5PD5WBV.js → chunk-U7UIU734.js} +1 -1
  32. package/{chunk-3T23UBO4.js → chunk-UPW4CQ72.js} +1 -1
  33. package/{chunk-5XP5TOQE.js → chunk-VP3M4CWS.js} +1 -1
  34. package/chunk-XTSJURO6.js +6 -0
  35. package/{chunk-GUJTHKVP.js → chunk-ZEMCELQ7.js} +1 -1
  36. package/chunk-ZI4ZJIB3.js +1 -0
  37. package/{chunk-FDQ7IWYZ.js → chunk-ZIKYV2TR.js} +1 -1
  38. package/{chunk-MHTKXCYS.js → chunk-ZSKZUTTA.js} +1 -1
  39. package/index.html +2 -2
  40. package/{main-QHLXX2KA.js → main-NR6TAXFB.js} +1 -1
  41. package/package.json +1 -1
  42. package/styles-OABXKND4.css +1 -0
  43. package/chunk-CDH4KG7H.js +0 -1
  44. package/chunk-GMW5Y454.js +0 -1
  45. package/chunk-JJOXLPZI.js +0 -1
  46. package/chunk-KTUAPEOD.js +0 -1
  47. package/chunk-N7MNI34K.js +0 -1
  48. package/chunk-W7Y2VKMS.js +0 -6
  49. package/styles-EJ7NNNKB.css +0 -1
@@ -1 +1 @@
1
- import{c as h}from"./chunk-ZZPLRWQP.js";import"./chunk-UIOTKB6J.js";import"./chunk-N7DO2BHU.js";import"./chunk-4RXMJUN5.js";import{g as M}from"./chunk-CDH4KG7H.js";import"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import{Ab as i,Bb as g,Nb as l,Pa as u,Tb as C,Ub as c,W as m,cb as s,ec as O,hb as _,vb as f,zb as t}from"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";var v=["*",[["","footer",""]]],T=["*","[footer]"],r=class n{static \u0275fac=function(e){return new(e||n)};static \u0275cmp=s({type:n,selectors:[["app-custom-card"]],ngContentSelectors:T,decls:11,vars:0,consts:[[1,"card"],["src","/assets/noise/auth-noise.svg",1,"noise"],[1,"header-title"],["src","/assets/duplicati/duplicati.svg","alt",""],[1,"bg"]],template:function(e,a){e&1&&(C(v),t(0,"div",0),g(1,"img",1),t(2,"header")(3,"div",2),g(4,"img",3),O(5," Duplicati "),i()(),t(6,"main"),c(7),t(8,"footer"),c(9,1),i()()(),g(10,"div",4))},styles:['[_nghost-%COMP%]{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center;background-color:var(--base-level-20)}body.dark [_nghost-%COMP%] .card[_ngcontent-%COMP%]:before{background:radial-gradient(rgba(var(--primary-rgb-900),1),#0000 60%)}.card[_ngcontent-%COMP%]{max-width:480px;width:100%;position:relative;z-index:100;background-color:var(--base-level-10);border-radius:var(--shape-5);box-shadow:var(--box-shadow-40);border:1px solid var(--base-level-30);overflow:hidden}.card[_ngcontent-%COMP%]:before{content:"";position:absolute;height:480px;transform:translateY(-285px);left:0;right:0;z-index:-2;background:radial-gradient(rgba(var(--primary-rgb-100),1),#0000 60%)}.card[_ngcontent-%COMP%] img.noise[_ngcontent-%COMP%]{position:absolute;height:480px;width:100%;transform:translateY(-285px);left:0;right:0;z-index:-1;mask-image:radial-gradient(#000,#0000 60%)}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 0;gap:12px;position:relative;z-index:10}.header-title[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;gap:10px}.header-title[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:28px;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3))}main[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:2rem;gap:2.5rem;position:relative;z-index:10}main[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{font:var(--paragraph-40);color:var(--base-level-60R);text-align:center;text-wrap:balance}.bg[_ngcontent-%COMP%]{position:fixed;inset:0;width:100vw;height:100vh;background-image:url(/assets/backgrounds/base-bg.svg);background-size:cover;background-position:center;background-repeat:no-repeat}body.dark[_ngcontent-%COMP%] .bg[_ngcontent-%COMP%]{opacity:1}footer[_ngcontent-%COMP%]:empty{display:none}'],changeDetection:0})};function x(n,o){n&1&&(t(0,"h3"),l(1,0),i())}function y(n,o){n&1&&(t(0,"h3"),l(1,1),i(),t(2,"button",3),l(3,2),i())}var d=class n{#e=m(h);isLoggingOut=this.#e.isLoggingOut;ngOnInit(){this.#e.logout()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=s({type:n,selectors:[["app-logout"]],decls:3,vars:1,consts:()=>{let o;o=$localize`Logging out...`;let e;e=$localize`You have successfully logged out your being redirected to login page.`;let a;return a=$localize`Go to login page`,[o,e,a,["spk-button","","routerLink","/",1,"raised","primary"]]},template:function(e,a){e&1&&(t(0,"app-custom-card"),_(1,x,2,0,"h3")(2,y,4,0),i()),e&2&&(u(),f(a.isLoggingOut()?1:2))},dependencies:[r,M],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{d as default};
1
+ import{c as h}from"./chunk-ZZPLRWQP.js";import"./chunk-UIOTKB6J.js";import"./chunk-N7DO2BHU.js";import"./chunk-4RXMJUN5.js";import{g as M}from"./chunk-ZI4ZJIB3.js";import"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import{Ab as i,Bb as g,Nb as l,Pa as u,Tb as C,Ub as c,W as m,cb as s,ec as O,hb as _,vb as f,zb as t}from"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";var v=["*",[["","footer",""]]],T=["*","[footer]"],r=class n{static \u0275fac=function(e){return new(e||n)};static \u0275cmp=s({type:n,selectors:[["app-custom-card"]],ngContentSelectors:T,decls:11,vars:0,consts:[[1,"card"],["src","/assets/noise/auth-noise.svg",1,"noise"],[1,"header-title"],["src","/assets/duplicati/duplicati.svg","alt",""],[1,"bg"]],template:function(e,a){e&1&&(C(v),t(0,"div",0),g(1,"img",1),t(2,"header")(3,"div",2),g(4,"img",3),O(5," Duplicati "),i()(),t(6,"main"),c(7),t(8,"footer"),c(9,1),i()()(),g(10,"div",4))},styles:['[_nghost-%COMP%]{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center;background-color:var(--base-level-20)}body.dark [_nghost-%COMP%] .card[_ngcontent-%COMP%]:before{background:radial-gradient(rgba(var(--primary-rgb-900),1),#0000 60%)}.card[_ngcontent-%COMP%]{max-width:480px;width:100%;position:relative;z-index:100;background-color:var(--base-level-10);border-radius:var(--shape-5);box-shadow:var(--box-shadow-40);border:1px solid var(--base-level-30);overflow:hidden}.card[_ngcontent-%COMP%]:before{content:"";position:absolute;height:480px;transform:translateY(-285px);left:0;right:0;z-index:-2;background:radial-gradient(rgba(var(--primary-rgb-100),1),#0000 60%)}.card[_ngcontent-%COMP%] img.noise[_ngcontent-%COMP%]{position:absolute;height:480px;width:100%;transform:translateY(-285px);left:0;right:0;z-index:-1;mask-image:radial-gradient(#000,#0000 60%)}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 0;gap:12px;position:relative;z-index:10}.header-title[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;gap:10px}.header-title[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:28px;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3))}main[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:2rem;gap:2.5rem;position:relative;z-index:10}main[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{font:var(--paragraph-40);color:var(--base-level-60R);text-align:center;text-wrap:balance}.bg[_ngcontent-%COMP%]{position:fixed;inset:0;width:100vw;height:100vh;background-image:url(/assets/backgrounds/base-bg.svg);background-size:cover;background-position:center;background-repeat:no-repeat}body.dark[_ngcontent-%COMP%] .bg[_ngcontent-%COMP%]{opacity:1}footer[_ngcontent-%COMP%]:empty{display:none}'],changeDetection:0})};function x(n,o){n&1&&(t(0,"h3"),l(1,0),i())}function y(n,o){n&1&&(t(0,"h3"),l(1,1),i(),t(2,"button",3),l(3,2),i())}var d=class n{#e=m(h);isLoggingOut=this.#e.isLoggingOut;ngOnInit(){this.#e.logout()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=s({type:n,selectors:[["app-logout"]],decls:3,vars:1,consts:()=>{let o;o=$localize`Logging out...`;let e;e=$localize`You have successfully logged out your being redirected to login page.`;let a;return a=$localize`Go to login page`,[o,e,a,["spk-button","","routerLink","/",1,"raised","primary"]]},template:function(e,a){e&1&&(t(0,"app-custom-card"),_(1,x,2,0,"h3")(2,y,4,0),i()),e&2&&(u(),f(a.isLoggingOut()?1:2))},dependencies:[r,M],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{d as default};
@@ -1 +1 @@
1
- import{a as R,b as oe}from"./chunk-DNHLTHLR.js";import{a as te}from"./chunk-ODIN2IGP.js";import{a as G}from"./chunk-W3VTD2H4.js";import{a as L,b as K,c as S,d as U,e as z,h as j,m as V,p as q,q as H,s as Q}from"./chunk-5OX72VKG.js";import{b as v}from"./chunk-UIOTKB6J.js";import{a as b,c as w,d as B}from"./chunk-N7DO2BHU.js";import"./chunk-4RXMJUN5.js";import{a as W,f as J,g as Y,l as Z,w as ee}from"./chunk-CDH4KG7H.js";import{c as h}from"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import{Ab as n,Bb as a,C as E,Jc as O,K as M,Lb as l,Mb as c,Nb as f,Pa as s,Rb as P,W as _,cb as I,ec as k,hb as x,hc as y,qb as C,qc as X,sa as T,sb as g,vb as D,zb as r}from"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";var ne=()=>["/"];function ie(d,e){d&1&&(r(0,"spk-form-field")(1,"label",17),f(2,6),n(),a(3,"input",18),n(),r(4,"spk-form-field")(5,"label",19),f(6,7),n(),a(7,"input",20),n())}var u=new H,N=class d{#t=_(v);#e=_(b);#o=_(w);#n=_(h);#i=_(G);isExporting=T(!1);exportType=T("file");exportedCmd=T(null);exportForm=u.group({exportPasswords:u.control(!0),encryption:u.control(!1,[S.required,oe()]),password:u.control("",[R(e=>e?.value.encryption,[S.required])]),repeatPassword:u.control("",[R(e=>e?.value.encryption,[S.required])])});exportFormSignal=te(this.exportForm.valueChanges);encryptionFieldSignal=O(()=>this.exportFormSignal()?.encryption??!1);activeBackup=O(()=>this.#i.backups().find(e=>e.Backup?.ID===this.#e.snapshot.params.id));submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(M(e=>{let i=o=>{let t=Object.entries(o);return t?"?"+t.map(([F,m])=>`${F}=${m}`).join("&"):""};return this.#n.get(`/api/v1/backup/${this.#e.snapshot.params.id}/export${i({exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0,token:e.Token})}`,{responseType:"blob"})}),E(()=>this.isExporting.set(!1))).subscribe({next:e=>{let o=this.activeBackup()?.Backup?.Name??"Backup",t=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(e,`${o}.${t}`),this.#o.navigate(["/"])},error:e=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(E(()=>this.isExporting.set(!1))).subscribe({next:e=>{this.exportedCmd.set(e.Command??null)},error:e=>{}})}downloadFile(e,i){let o=window.URL.createObjectURL(e),t=document.createElement("a");t.href=o,t.download=i,t.click(),window.URL.revokeObjectURL(o)}static \u0275fac=function(i){return new(i||d)};static \u0275cmp=I({type:d,selectors:[["app-export"]],decls:27,vars:12,consts:()=>{let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let i;i=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let o;o=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SPK_ICON: As command line `;let t;t=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:file${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: To file `;let F;F=$localize` Export passwords ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let m;m=$localize` Encrypt file ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let A;A=$localize`Password`;let $;return $=$localize`Repeat password`,[e,i,o,t,F,m,A,$,[1,"actions"],["spk-button","",1,"outlined",3,"routerLink"],["spk-button","",1,"raised","primary",3,"click"],["autocomplete","off",3,"formGroup"],["type","button",3,"click"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],["type","checkbox","formControlName","encryption"],["for","password"],["type","password","id","password","formControlName","password"],["for","repeatPassword"],["type","password","id","repeatPassword","formControlName","repeatPassword"]]},template:function(i,o){if(i&1&&(r(0,"header")(1,"h3"),k(2," Export backup configuration "),r(3,"div",8)(4,"button",9),l(5,0),a(6,"spk-icon"),c(),n(),r(7,"button",10),P("click",function(){return o.submit()}),l(8,1),a(9,"spk-icon"),c(),n()()(),r(10,"p"),k(11),n()(),r(12,"form",11)(13,"spk-button-group")(14,"button",12),P("click",function(){return o.exportType.set("cmd")}),l(15,2),a(16,"spk-icon"),c(),n(),r(17,"button",12),P("click",function(){return o.exportType.set("file")}),l(18,3),a(19,"spk-icon"),c(),n()(),r(20,"spk-toggle",13),l(21,4),a(22,"input",14),c(),n(),r(23,"spk-toggle",15),l(24,5),a(25,"input",16),c(),n(),x(26,ie,8,0),n()),i&2){let t;s(4),C("routerLink",X(11,ne)),s(3),g("loading",o.isExporting()),s(4),y("#",(t=o.activeBackup())==null||t.Backup==null?null:t.Backup.ID,": ",(t=o.activeBackup())==null||t.Backup==null?null:t.Backup.Name,""),s(),C("formGroup",o.exportForm),s(2),g("active",o.exportType()==="cmd"),s(3),g("active",o.exportType()==="file"),s(9),D(o.encryptionFieldSignal()?26:-1)}},dependencies:[Q,j,K,L,U,z,V,q,B,J,ee,W,Z,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}"],changeDetection:0})};export{N as default};
1
+ import{a as R,b as oe}from"./chunk-DNHLTHLR.js";import{a as te}from"./chunk-ODIN2IGP.js";import{a as G}from"./chunk-W3VTD2H4.js";import{a as L,b as K,c as S,d as U,e as z,h as j,m as V,p as q,q as H,s as Q}from"./chunk-5OX72VKG.js";import{b as v}from"./chunk-UIOTKB6J.js";import{a as b,c as w,d as B}from"./chunk-N7DO2BHU.js";import"./chunk-4RXMJUN5.js";import{a as W,f as J,g as Y,l as Z,w as ee}from"./chunk-ZI4ZJIB3.js";import{c as h}from"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import{Ab as n,Bb as a,C as E,Jc as O,K as M,Lb as l,Mb as c,Nb as f,Pa as s,Rb as P,W as _,cb as I,ec as k,hb as x,hc as y,qb as C,qc as X,sa as T,sb as g,vb as D,zb as r}from"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";var ne=()=>["/"];function ie(d,e){d&1&&(r(0,"spk-form-field")(1,"label",17),f(2,6),n(),a(3,"input",18),n(),r(4,"spk-form-field")(5,"label",19),f(6,7),n(),a(7,"input",20),n())}var u=new H,N=class d{#t=_(v);#e=_(b);#o=_(w);#n=_(h);#i=_(G);isExporting=T(!1);exportType=T("file");exportedCmd=T(null);exportForm=u.group({exportPasswords:u.control(!0),encryption:u.control(!1,[S.required,oe()]),password:u.control("",[R(e=>e?.value.encryption,[S.required])]),repeatPassword:u.control("",[R(e=>e?.value.encryption,[S.required])])});exportFormSignal=te(this.exportForm.valueChanges);encryptionFieldSignal=O(()=>this.exportFormSignal()?.encryption??!1);activeBackup=O(()=>this.#i.backups().find(e=>e.Backup?.ID===this.#e.snapshot.params.id));submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(M(e=>{let i=o=>{let t=Object.entries(o);return t?"?"+t.map(([F,m])=>`${F}=${m}`).join("&"):""};return this.#n.get(`/api/v1/backup/${this.#e.snapshot.params.id}/export${i({exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0,token:e.Token})}`,{responseType:"blob"})}),E(()=>this.isExporting.set(!1))).subscribe({next:e=>{let o=this.activeBackup()?.Backup?.Name??"Backup",t=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(e,`${o}.${t}`),this.#o.navigate(["/"])},error:e=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(E(()=>this.isExporting.set(!1))).subscribe({next:e=>{this.exportedCmd.set(e.Command??null)},error:e=>{}})}downloadFile(e,i){let o=window.URL.createObjectURL(e),t=document.createElement("a");t.href=o,t.download=i,t.click(),window.URL.revokeObjectURL(o)}static \u0275fac=function(i){return new(i||d)};static \u0275cmp=I({type:d,selectors:[["app-export"]],decls:27,vars:12,consts:()=>{let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let i;i=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let o;o=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SPK_ICON: As command line `;let t;t=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:file${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: To file `;let F;F=$localize` Export passwords ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let m;m=$localize` Encrypt file ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let A;A=$localize`Password`;let $;return $=$localize`Repeat password`,[e,i,o,t,F,m,A,$,[1,"actions"],["spk-button","",1,"outlined",3,"routerLink"],["spk-button","",1,"raised","primary",3,"click"],["autocomplete","off",3,"formGroup"],["type","button",3,"click"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],["type","checkbox","formControlName","encryption"],["for","password"],["type","password","id","password","formControlName","password"],["for","repeatPassword"],["type","password","id","repeatPassword","formControlName","repeatPassword"]]},template:function(i,o){if(i&1&&(r(0,"header")(1,"h3"),k(2," Export backup configuration "),r(3,"div",8)(4,"button",9),l(5,0),a(6,"spk-icon"),c(),n(),r(7,"button",10),P("click",function(){return o.submit()}),l(8,1),a(9,"spk-icon"),c(),n()()(),r(10,"p"),k(11),n()(),r(12,"form",11)(13,"spk-button-group")(14,"button",12),P("click",function(){return o.exportType.set("cmd")}),l(15,2),a(16,"spk-icon"),c(),n(),r(17,"button",12),P("click",function(){return o.exportType.set("file")}),l(18,3),a(19,"spk-icon"),c(),n()(),r(20,"spk-toggle",13),l(21,4),a(22,"input",14),c(),n(),r(23,"spk-toggle",15),l(24,5),a(25,"input",16),c(),n(),x(26,ie,8,0),n()),i&2){let t;s(4),C("routerLink",X(11,ne)),s(3),g("loading",o.isExporting()),s(4),y("#",(t=o.activeBackup())==null||t.Backup==null?null:t.Backup.ID,": ",(t=o.activeBackup())==null||t.Backup==null?null:t.Backup.Name,""),s(),C("formGroup",o.exportForm),s(2),g("active",o.exportType()==="cmd"),s(3),g("active",o.exportType()==="file"),s(9),D(o.encryptionFieldSignal()?26:-1)}},dependencies:[Q,j,K,L,U,z,V,q,B,J,ee,W,Z,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}"],changeDetection:0})};export{N as default};
@@ -1 +1 @@
1
- import{c as a,d as b}from"./chunk-GMW5Y454.js";import"./chunk-3T23UBO4.js";import"./chunk-BIVRH4JH.js";import"./chunk-ODIN2IGP.js";import"./chunk-KDCTRSPO.js";import"./chunk-5OX72VKG.js";import"./chunk-UIOTKB6J.js";import"./chunk-N7DO2BHU.js";import"./chunk-4RXMJUN5.js";import"./chunk-CDH4KG7H.js";import"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";export{a as createEncryptionForm,b as default};
1
+ import{c as a,d as b}from"./chunk-DPPV7DVK.js";import"./chunk-UPW4CQ72.js";import"./chunk-MMNUKDWS.js";import"./chunk-ODIN2IGP.js";import"./chunk-KDCTRSPO.js";import"./chunk-5OX72VKG.js";import"./chunk-UIOTKB6J.js";import"./chunk-N7DO2BHU.js";import"./chunk-4RXMJUN5.js";import"./chunk-ZI4ZJIB3.js";import"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";export{a as createEncryptionForm,b as default};
@@ -1 +1 @@
1
- import{a as pe}from"./chunk-KDCTRSPO.js";import{r as ue}from"./chunk-5OX72VKG.js";import{b as de}from"./chunk-UIOTKB6J.js";import{a as he,f as _e,l as fe,m as ge,o as me,w as Ce}from"./chunk-CDH4KG7H.js";import{ia as ce}from"./chunk-WYTHNCNI.js";import{Ab as h,Bb as te,C as V,Eb as X,Fb as I,Jc as A,Lc as R,Nb as W,Ob as ne,Pa as g,Pb as ie,Rb as k,Sb as p,Tb as oe,Ub as L,W as H,Wa as G,ba as N,bc as Q,ca as y,cb as J,cc as re,dc as K,ec as S,gc as se,hb as x,na as j,oa as E,qb as q,rb as Y,rc as $,sa as M,sb as T,sc as le,u as U,vb as O,xb as Z,xc as ae,yb as ee,zb as u}from"./chunk-ZSSQBIRK.js";import{a as D,b as B}from"./chunk-C6Q5SG76.js";var ve=["treeContainer"],Te=["formRef"],xe=[[["label"]],[["label"]],[["input"]]],be=["label","label","input"],Me=s=>({children:s,level:0}),Ee=s=>({$implicit:s}),Oe=(s,t)=>({children:s,level:t}),Se=(s,t)=>t.id;function we(s,t){if(s&1){let e=I();u(0,"spk-button-group")(1,"button",13),k("click",function(){N(e);let o=p();return y(o.pathDiscoveryMethod.set("browse"))}),W(2,4),h(),u(3,"button",13),k("click",function(){N(e);let o=p();return y(o.pathDiscoveryMethod.set("path"))}),W(4,5),h()()}if(s&2){let e=p();g(),T("active",e.pathDiscoveryMethod()==="browse"),g(2),T("active",e.pathDiscoveryMethod()==="path")}}function Fe(s,t){s&1&&te(0,"spk-progress-bar",9)}function Ne(s,t){s&1&&(u(0,"spk-icon",18),S(1,"caret-down"),h(),u(2,"spk-icon",16),S(3,"folder-open"),h())}function ye(s,t){s&1&&(u(0,"spk-icon"),S(1,"file"),h())}function ke(s,t){s&1&&(u(0,"spk-icon",18),S(1,"caret-right"),h(),u(2,"spk-icon",16),S(3,"folder"),h())}function Re(s,t){if(s&1&&x(0,Ne,4,0)(1,ye,2,0,"spk-icon")(2,ke,4,0),s&2){let e=p(2).$implicit;O(e.children.length?0:e.cls==="file"?1:2)}}function Ie(s,t){s&1&&(u(0,"spk-icon",16),S(1,"desktop-tower"),h())}function We(s,t){s&1&&X(0)}function Le(s,t){if(s&1&&x(0,We,1,0,"ng-container",10),s&2){let e=p(2).$implicit,n=p().$implicit;p();let o=K(7);q("ngTemplateOutlet",o)("ngTemplateOutletContext",$(5,Ee,le(2,Oe,e.children,n.level+1)))}}function $e(s,t){if(s&1){let e=I();u(0,"div",14,3),k("click",function(){N(e);let o=p().$implicit,i=p(2);return y(i.toggleNode(o.id,o))}),u(2,"div",15),x(3,Re,3,1)(4,Ie,2,0,"spk-icon",16),h(),u(5,"div",17),k("click",function(o){N(e);let i=p().$implicit,r=p(2);return y(r.toggleSelectedNode(o,i))}),S(6),h()(),x(7,Le,1,7,"ng-container")}if(s&2){let e=p().$implicit,n=p().$implicit,o=p();T("accepted",e.accepted===!0)("active",e.evalState===o.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",n.level===0),g(2),T("file",e.cls==="file"),g(),O(e.id!=="/"?3:4),g(3),se(" ",e.text," "),g(),O(e.children.length>0?7:-1)}}function Ae(s,t){if(s&1&&x(0,$e,8,17),s&2){let e=t.$implicit,n=p(2);O(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function De(s,t){if(s&1&&(u(0,"spk-list"),Z(1,Ae,1,1,null,null,Se),h()),s&2){let e=t.$implicit;Y("padding-left",e.level*.25,"rem"),g(),ee(e.children)}}function Be(s,t){s&1&&X(0)}function Ve(s,t){if(s&1){let e=I();u(0,"spk-toggle",19),k("click",function(){N(e);let o=p();return y(o._showHiddenNodes.set(!o._showHiddenNodes()))}),W(1,6),h()}if(s&2){let e=p();T("active",e._showHiddenNodes()),g(),ne(e.showFiles()?"files":"folders"),ie(1)}}var Pe=(i=>(i[i.ExcludedByParent=-2]="ExcludedByParent",i[i.Excluded=-1]="Excluded",i[i.None=0]="None",i[i.Included=1]="Included",i[i.IncludedByParent=2]="IncludedByParent",i))(Pe||{}),z=class s{#t=H(de);#r=H(pe);multiSelect=E(!1);disabled=E(!1);showFiles=E(!1);selectFiles=E(!1);accepts=E(null);startingPath=E(null);rootPath=E(void 0);backupSettings=E(null);pathRefreshTrigger=E(!1);showHiddenNodes=E(!1);hideShortcuts=E(!1);includes=j();excludes=j();_showHiddenNodes=M(!1);treeContainerRef=G("treeContainer");formRef=G("formRef");pathDiscoveryMethod=M("browse");isLoading=M(!1);currentPath=M("/");#e=M(null);treeSearchQuery=M("");treeNodes=M([]);filterGroups=this.#r.filterGroups();isByBackupSettings=A(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=A(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Pe;treeStructure=A(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(c=>c!==""&&c!=="/"),n=structuredClone(e);for(let c=0;c<n.length;c++){let d=n[c].slice(1);if(d.startsWith("{")&&d.endsWith("}")){let m=d.slice(1,-1),f=this.filterGroups?.FilterGroups[m];if(f&&f.length){let P=f.map(v=>`-${v}`);n.splice(c,1,...P)}}}let o=this.searchableTreeNodes(),i=new Map,r=this.rootPath(),_=this.accepts(),l=r?{id:r,resolvedpath:r,text:r,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}:{id:"/",resolvedpath:"/",text:"Computer",parentPath:"",children:[],evalState:0,isIndeterminate:!1};_&&(l.accepted=!0),i.set("/",l);for(let c of o){let a=c.id.replace(r??"",""),m=a.includes("\\")?"\\":"/",f=a.split(m).filter(Boolean),P="",v=l;for(let C of f){if(P+="/"+C,!i.has(P)){let w=c.hidden===!0&&t?0:this.#s(n,c.id,c.cls,v),b={id:c.id,isIndeterminate:this.isIndeterminate(n,c.id),evalState:w,parentPath:P,resolvedpath:c.id?.startsWith("%")?c.resolvedpath+"/":P,hidden:c.hidden,text:c.text,cls:c.cls,children:[]};_&&(b.accepted=this.matchAccepts(_,b)),i.set(P,b),v.children.push(b)}v=i.get(P)}}return[l]});#s(t,e,n,o){if(o.evalState===-1)return-2;let i=0,r=t.filter(l=>!l.startsWith("-")&&!l.startsWith("+")),_=t.filter(l=>l.startsWith("-")||l.startsWith("+"));if(r.length===0)return i;for(let l=0;l<r.length;l++){let c=r[l];if(e?.startsWith(c)){i=1;break}}if(_.length===0)return i;for(let l=0;l<_.length;l++){let c=_[l],a=c.slice(1),d=c.startsWith("-")?"exclude":"include",m=e.includes("\\"),f=m?"\\":"/";if((m?a.slice(2):a).startsWith(f)&&a.endsWith(f)){if(n!=="folder")continue;if(e===a){i=d==="include"?1:-1;break}}if(a.startsWith("*")&&a.endsWith(`*${f}`)){if(n!=="folder")continue;let C=a.slice(1,-2);if(C==="")break;if(e?.includes(C+f)){i=d==="include"?1:-1;break}}if(a.startsWith("[.*")&&a.endsWith(`[^\\${f}]*]`)){if(n!=="file")continue;let C=a.slice(3,-7);if(new RegExp(C).test(e)){i=d==="include"?1:-1;break}}if(a.startsWith("[")&&a.endsWith("]")){let C=a.slice(1,-1),w=this.translateCSharpRegex(C);if(new RegExp(`${w}`).test(e)){i=d==="include"?1:-1;break}}if(a.startsWith("*.")){if(n!=="file"||a.replace("*.","").length===0)continue;if(this.#n(e,a,!0)){i=d==="include"?1:-1;break}}if(a==="")continue;if(a===e){i=d==="include"?1:-1;break}if(this.#n(e,a,!0)){i=d==="include"?1:-1;break}}return i}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(o,i,r)=>`(${r})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.some(n=>n.startsWith(e))}#n(t,e,n=!1){let o=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${o}${n?"$":""}`).test(t)}showHiddenNodesEffect=R(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=R(()=>{let t=this.pathDiscoveryMethod(),e=this.#e();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 o="."+e.id.slice(e.id.indexOf("."));return o?n.some(i=>o.endsWith(i)):!1}currentPathEffect=R(()=>{let t=this.#e();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=R(()=>{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.#e.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();t?(this.currentPath.set(t),this.#p(t)):this.#o(null,this.rootPath())}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 o=this.currentPath().split("\0").filter(r=>r!==""&&r!=="/"),i=this.isChildOfSelected(e)?`-${e.id}`:e.id;this.multiSelect()?o.includes(e.id)?this.currentPath.set(o.filter(r=>r!==e.id).join("\0")):o.some(r=>r.startsWith(i))?this.currentPath.set(o.filter(r=>r!==i).join("\0")):this.currentPath.set([...o,i].join("\0")):o.includes(e.id)?this.currentPath.set(o.filter(r=>r!==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(o=>!o.id?.startsWith(e.id)||o.id===e.id)):this.#o(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.#t.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#d(t){let e=this.backupSettings(),n={id:e.id+"",prefixOnly:!1,folderContents:!0,time:e.time,filter:t?"@"+t:void 0};return this.#t.getApiV1BackupByIdFiles(n)}#i(t){return this.isByBackupSettings()?this.#d(t):this.#c(t)}#p(t){let e=t.split("\0").filter(r=>r.startsWith("-")).map(r=>r.slice(1,-1)),n=t.split("\0").filter(r=>!r.startsWith("-")).filter(Boolean),o=n.map(r=>{let _=r.indexOf(":")===1;return r.split(_?"\\":"/").filter(l=>l.includes(".")?!1:l)}),i=[this.rootPath()??"/"];o.forEach(r=>{r.forEach((_,l)=>{let c=r[0].endsWith(":"),a=r.slice(0,l+1).join(c?"\\":"/"),d=a;d.indexOf(":")===-1&&!d.startsWith("%")&&(d="/"+a),i.includes(d)||i.push(d)})}),this.isLoading.set(!0),U([...i.map(r=>this.#i(r))]).pipe(V(()=>this.isLoading.set(!1))).subscribe({next:r=>{this.treeNodes.update(_=>{let l=r.flatMap(a=>a.map(d=>{let m=d.id,f=m&&m.split("/").filter(Boolean).slice(0,-1).join("/"),v="/"+(m&&m.split("/").filter(Boolean).join("/")),C=n.findIndex(F=>this.multiSelect()?v.startsWith(F):v===F)>-1,w=n.findIndex(F=>F===m)>-1,b=e.findIndex(F=>F===v)>-1;return B(D({},d),{parentPath:f.startsWith("%")?f:"/"+f,isSelected:C&&!b||w})})),c=[...new Map([..._,...l].map(a=>[a.resolvedpath??a.id,a])).values()];return this.#l(),c})}})}#o(t=null,e="/"){this.isLoading.set(!0),this.#i(e).pipe(V(()=>this.isLoading.set(!1))).subscribe({next:n=>{let o=this.isByBackupSettings()?n.Files.map(i=>({text:i.Path.split("/").filter(r=>r!=="").pop(),id:i.Path,cls:i.Path.endsWith("/")||i.Path.endsWith("\\")?"folder":"file",leaf:t!==null,resolvedpath:i.Path,hidden:!1})):n;this.treeNodes.update(i=>{let r=o.map(l=>{let c=l.id.startsWith("%")&&l.id.endsWith("%")||l.id.endsWith("/")||l.id.endsWith("\\")?"folder":"file";return B(D({},l),{cls:c,parentPath:e})}),_=[...new Map([...i,...r].map(l=>[l.resolvedpath??l.id,l])).values()];return this.hideShortcuts()?_.filter(l=>!l.id.startsWith("%")):_})}})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=J({type:s,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&(Q(n.treeContainerRef,ve,5),Q(n.formRef,Te,5)),e&2&&re(2)},hostVars:2,hostBindings:function(e,n){e&2&&T("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPath:[1,"rootPath"],backupSettings:[1,"backupSettings"],pathRefreshTrigger:[1,"pathRefreshTrigger"],showHiddenNodes:[1,"showHiddenNodes"],hideShortcuts:[1,"hideShortcuts"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:be,decls:15,vars:15,consts:()=>{let t;t=$localize` Browser 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,"spk-primary"],[1,"text",3,"click"],[1,"small"],[1,"primary","raised","browse-files-toggle",3,"click"]]},template:function(e,n){if(e&1&&(oe(xe),x(0,we,5,4,"spk-button-group"),u(1,"div",7),L(2,0,["ngProjectAs","label",5,["label"]]),u(3,"div",8,0),x(5,Fe,1,0,"spk-progress-bar",9)(6,De,3,2,"ng-template",null,1,ae)(8,Be,1,0,"ng-container",10),h(),x(9,Ve,2,3,"spk-toggle",11),h(),u(10,"div",12,2)(12,"spk-form-field"),L(13,1,["ngProjectAs","label",5,["label"]]),L(14,2,["ngProjectAs","input",5,["input"]]),h()()),e&2){let o=K(7);O(n.multiSelect()?-1:0),g(),T("hidden",n.pathDiscoveryMethod()!=="browse"),g(2),T("visualize-accepted",n.accepts()),g(2),O(n.isLoading()?5:-1),g(3),q("ngTemplateOutlet",o)("ngTemplateOutletContext",$(13,Ee,$(11,Me,n.treeStructure()))),g(),O(n.accepts()?-1:9),g(),T("hidden",n.pathDiscoveryMethod()!=="path")}},dependencies:[_e,Ce,he,fe,ge,me,ce,ue],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-level-40);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-level-10);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-level-30);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-level-20)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-level-40)}.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-level-60R)}.hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};export{z as a};
1
+ import{a as pe}from"./chunk-KDCTRSPO.js";import{r as ue}from"./chunk-5OX72VKG.js";import{b as de}from"./chunk-UIOTKB6J.js";import{a as he,f as _e,l as fe,m as ge,o as me,w as Ce}from"./chunk-ZI4ZJIB3.js";import{ia as ce}from"./chunk-WYTHNCNI.js";import{Ab as h,Bb as te,C as V,Eb as X,Fb as I,Jc as A,Lc as R,Nb as W,Ob as ne,Pa as g,Pb as ie,Rb as k,Sb as p,Tb as oe,Ub as L,W as H,Wa as G,ba as N,bc as Q,ca as y,cb as J,cc as re,dc as K,ec as S,gc as se,hb as x,na as j,oa as E,qb as q,rb as Y,rc as $,sa as M,sb as T,sc as le,u as U,vb as O,xb as Z,xc as ae,yb as ee,zb as u}from"./chunk-ZSSQBIRK.js";import{a as D,b as B}from"./chunk-C6Q5SG76.js";var ve=["treeContainer"],Te=["formRef"],xe=[[["label"]],[["label"]],[["input"]]],be=["label","label","input"],Me=s=>({children:s,level:0}),Ee=s=>({$implicit:s}),Oe=(s,t)=>({children:s,level:t}),Se=(s,t)=>t.id;function we(s,t){if(s&1){let e=I();u(0,"spk-button-group")(1,"button",13),k("click",function(){N(e);let o=p();return y(o.pathDiscoveryMethod.set("browse"))}),W(2,4),h(),u(3,"button",13),k("click",function(){N(e);let o=p();return y(o.pathDiscoveryMethod.set("path"))}),W(4,5),h()()}if(s&2){let e=p();g(),T("active",e.pathDiscoveryMethod()==="browse"),g(2),T("active",e.pathDiscoveryMethod()==="path")}}function Fe(s,t){s&1&&te(0,"spk-progress-bar",9)}function Ne(s,t){s&1&&(u(0,"spk-icon",18),S(1,"caret-down"),h(),u(2,"spk-icon",16),S(3,"folder-open"),h())}function ye(s,t){s&1&&(u(0,"spk-icon"),S(1,"file"),h())}function ke(s,t){s&1&&(u(0,"spk-icon",18),S(1,"caret-right"),h(),u(2,"spk-icon",16),S(3,"folder"),h())}function Re(s,t){if(s&1&&x(0,Ne,4,0)(1,ye,2,0,"spk-icon")(2,ke,4,0),s&2){let e=p(2).$implicit;O(e.children.length?0:e.cls==="file"?1:2)}}function Ie(s,t){s&1&&(u(0,"spk-icon",16),S(1,"desktop-tower"),h())}function We(s,t){s&1&&X(0)}function Le(s,t){if(s&1&&x(0,We,1,0,"ng-container",10),s&2){let e=p(2).$implicit,n=p().$implicit;p();let o=K(7);q("ngTemplateOutlet",o)("ngTemplateOutletContext",$(5,Ee,le(2,Oe,e.children,n.level+1)))}}function $e(s,t){if(s&1){let e=I();u(0,"div",14,3),k("click",function(){N(e);let o=p().$implicit,i=p(2);return y(i.toggleNode(o.id,o))}),u(2,"div",15),x(3,Re,3,1)(4,Ie,2,0,"spk-icon",16),h(),u(5,"div",17),k("click",function(o){N(e);let i=p().$implicit,r=p(2);return y(r.toggleSelectedNode(o,i))}),S(6),h()(),x(7,Le,1,7,"ng-container")}if(s&2){let e=p().$implicit,n=p().$implicit,o=p();T("accepted",e.accepted===!0)("active",e.evalState===o.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",n.level===0),g(2),T("file",e.cls==="file"),g(),O(e.id!=="/"?3:4),g(3),se(" ",e.text," "),g(),O(e.children.length>0?7:-1)}}function Ae(s,t){if(s&1&&x(0,$e,8,17),s&2){let e=t.$implicit,n=p(2);O(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function De(s,t){if(s&1&&(u(0,"spk-list"),Z(1,Ae,1,1,null,null,Se),h()),s&2){let e=t.$implicit;Y("padding-left",e.level*.25,"rem"),g(),ee(e.children)}}function Be(s,t){s&1&&X(0)}function Ve(s,t){if(s&1){let e=I();u(0,"spk-toggle",19),k("click",function(){N(e);let o=p();return y(o._showHiddenNodes.set(!o._showHiddenNodes()))}),W(1,6),h()}if(s&2){let e=p();T("active",e._showHiddenNodes()),g(),ne(e.showFiles()?"files":"folders"),ie(1)}}var Pe=(i=>(i[i.ExcludedByParent=-2]="ExcludedByParent",i[i.Excluded=-1]="Excluded",i[i.None=0]="None",i[i.Included=1]="Included",i[i.IncludedByParent=2]="IncludedByParent",i))(Pe||{}),z=class s{#t=H(de);#r=H(pe);multiSelect=E(!1);disabled=E(!1);showFiles=E(!1);selectFiles=E(!1);accepts=E(null);startingPath=E(null);rootPath=E(void 0);backupSettings=E(null);pathRefreshTrigger=E(!1);showHiddenNodes=E(!1);hideShortcuts=E(!1);includes=j();excludes=j();_showHiddenNodes=M(!1);treeContainerRef=G("treeContainer");formRef=G("formRef");pathDiscoveryMethod=M("browse");isLoading=M(!1);currentPath=M("/");#e=M(null);treeSearchQuery=M("");treeNodes=M([]);filterGroups=this.#r.filterGroups();isByBackupSettings=A(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=A(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Pe;treeStructure=A(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(c=>c!==""&&c!=="/"),n=structuredClone(e);for(let c=0;c<n.length;c++){let d=n[c].slice(1);if(d.startsWith("{")&&d.endsWith("}")){let m=d.slice(1,-1),f=this.filterGroups?.FilterGroups[m];if(f&&f.length){let P=f.map(v=>`-${v}`);n.splice(c,1,...P)}}}let o=this.searchableTreeNodes(),i=new Map,r=this.rootPath(),_=this.accepts(),l=r?{id:r,resolvedpath:r,text:r,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}:{id:"/",resolvedpath:"/",text:"Computer",parentPath:"",children:[],evalState:0,isIndeterminate:!1};_&&(l.accepted=!0),i.set("/",l);for(let c of o){let a=c.id.replace(r??"",""),m=a.includes("\\")?"\\":"/",f=a.split(m).filter(Boolean),P="",v=l;for(let C of f){if(P+="/"+C,!i.has(P)){let w=c.hidden===!0&&t?0:this.#s(n,c.id,c.cls,v),b={id:c.id,isIndeterminate:this.isIndeterminate(n,c.id),evalState:w,parentPath:P,resolvedpath:c.id?.startsWith("%")?c.resolvedpath+"/":P,hidden:c.hidden,text:c.text,cls:c.cls,children:[]};_&&(b.accepted=this.matchAccepts(_,b)),i.set(P,b),v.children.push(b)}v=i.get(P)}}return[l]});#s(t,e,n,o){if(o.evalState===-1)return-2;let i=0,r=t.filter(l=>!l.startsWith("-")&&!l.startsWith("+")),_=t.filter(l=>l.startsWith("-")||l.startsWith("+"));if(r.length===0)return i;for(let l=0;l<r.length;l++){let c=r[l];if(e?.startsWith(c)){i=1;break}}if(_.length===0)return i;for(let l=0;l<_.length;l++){let c=_[l],a=c.slice(1),d=c.startsWith("-")?"exclude":"include",m=e.includes("\\"),f=m?"\\":"/";if((m?a.slice(2):a).startsWith(f)&&a.endsWith(f)){if(n!=="folder")continue;if(e===a){i=d==="include"?1:-1;break}}if(a.startsWith("*")&&a.endsWith(`*${f}`)){if(n!=="folder")continue;let C=a.slice(1,-2);if(C==="")break;if(e?.includes(C+f)){i=d==="include"?1:-1;break}}if(a.startsWith("[.*")&&a.endsWith(`[^\\${f}]*]`)){if(n!=="file")continue;let C=a.slice(3,-7);if(new RegExp(C).test(e)){i=d==="include"?1:-1;break}}if(a.startsWith("[")&&a.endsWith("]")){let C=a.slice(1,-1),w=this.translateCSharpRegex(C);if(new RegExp(`${w}`).test(e)){i=d==="include"?1:-1;break}}if(a.startsWith("*.")){if(n!=="file"||a.replace("*.","").length===0)continue;if(this.#n(e,a,!0)){i=d==="include"?1:-1;break}}if(a==="")continue;if(a===e){i=d==="include"?1:-1;break}if(this.#n(e,a,!0)){i=d==="include"?1:-1;break}}return i}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(o,i,r)=>`(${r})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.some(n=>n.startsWith(e))}#n(t,e,n=!1){let o=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${o}${n?"$":""}`).test(t)}showHiddenNodesEffect=R(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=R(()=>{let t=this.pathDiscoveryMethod(),e=this.#e();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 o="."+e.id.slice(e.id.indexOf("."));return o?n.some(i=>o.endsWith(i)):!1}currentPathEffect=R(()=>{let t=this.#e();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=R(()=>{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.#e.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();t?(this.currentPath.set(t),this.#p(t)):this.#o(null,this.rootPath())}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 o=this.currentPath().split("\0").filter(r=>r!==""&&r!=="/"),i=this.isChildOfSelected(e)?`-${e.id}`:e.id;this.multiSelect()?o.includes(e.id)?this.currentPath.set(o.filter(r=>r!==e.id).join("\0")):o.some(r=>r.startsWith(i))?this.currentPath.set(o.filter(r=>r!==i).join("\0")):this.currentPath.set([...o,i].join("\0")):o.includes(e.id)?this.currentPath.set(o.filter(r=>r!==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(o=>!o.id?.startsWith(e.id)||o.id===e.id)):this.#o(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.#t.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#d(t){let e=this.backupSettings(),n={id:e.id+"",prefixOnly:!1,folderContents:!0,time:e.time,filter:t?"@"+t:void 0};return this.#t.getApiV1BackupByIdFiles(n)}#i(t){return this.isByBackupSettings()?this.#d(t):this.#c(t)}#p(t){let e=t.split("\0").filter(r=>r.startsWith("-")).map(r=>r.slice(1,-1)),n=t.split("\0").filter(r=>!r.startsWith("-")).filter(Boolean),o=n.map(r=>{let _=r.indexOf(":")===1;return r.split(_?"\\":"/").filter(l=>l.includes(".")?!1:l)}),i=[this.rootPath()??"/"];o.forEach(r=>{r.forEach((_,l)=>{let c=r[0].endsWith(":"),a=r.slice(0,l+1).join(c?"\\":"/"),d=a;d.indexOf(":")===-1&&!d.startsWith("%")&&(d="/"+a),i.includes(d)||i.push(d)})}),this.isLoading.set(!0),U([...i.map(r=>this.#i(r))]).pipe(V(()=>this.isLoading.set(!1))).subscribe({next:r=>{this.treeNodes.update(_=>{let l=r.flatMap(a=>a.map(d=>{let m=d.id,f=m&&m.split("/").filter(Boolean).slice(0,-1).join("/"),v="/"+(m&&m.split("/").filter(Boolean).join("/")),C=n.findIndex(F=>this.multiSelect()?v.startsWith(F):v===F)>-1,w=n.findIndex(F=>F===m)>-1,b=e.findIndex(F=>F===v)>-1;return B(D({},d),{parentPath:f.startsWith("%")?f:"/"+f,isSelected:C&&!b||w})})),c=[...new Map([..._,...l].map(a=>[a.resolvedpath??a.id,a])).values()];return this.#l(),c})}})}#o(t=null,e="/"){this.isLoading.set(!0),this.#i(e).pipe(V(()=>this.isLoading.set(!1))).subscribe({next:n=>{let o=this.isByBackupSettings()?n.Files.map(i=>({text:i.Path.split("/").filter(r=>r!=="").pop(),id:i.Path,cls:i.Path.endsWith("/")||i.Path.endsWith("\\")?"folder":"file",leaf:t!==null,resolvedpath:i.Path,hidden:!1})):n;this.treeNodes.update(i=>{let r=o.map(l=>{let c=l.id.startsWith("%")&&l.id.endsWith("%")||l.id.endsWith("/")||l.id.endsWith("\\")?"folder":"file";return B(D({},l),{cls:c,parentPath:e})}),_=[...new Map([...i,...r].map(l=>[l.resolvedpath??l.id,l])).values()];return this.hideShortcuts()?_.filter(l=>!l.id.startsWith("%")):_})}})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=J({type:s,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&(Q(n.treeContainerRef,ve,5),Q(n.formRef,Te,5)),e&2&&re(2)},hostVars:2,hostBindings:function(e,n){e&2&&T("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPath:[1,"rootPath"],backupSettings:[1,"backupSettings"],pathRefreshTrigger:[1,"pathRefreshTrigger"],showHiddenNodes:[1,"showHiddenNodes"],hideShortcuts:[1,"hideShortcuts"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:be,decls:15,vars:15,consts:()=>{let t;t=$localize` Browser 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,"spk-primary"],[1,"text",3,"click"],[1,"small"],[1,"primary","raised","browse-files-toggle",3,"click"]]},template:function(e,n){if(e&1&&(oe(xe),x(0,we,5,4,"spk-button-group"),u(1,"div",7),L(2,0,["ngProjectAs","label",5,["label"]]),u(3,"div",8,0),x(5,Fe,1,0,"spk-progress-bar",9)(6,De,3,2,"ng-template",null,1,ae)(8,Be,1,0,"ng-container",10),h(),x(9,Ve,2,3,"spk-toggle",11),h(),u(10,"div",12,2)(12,"spk-form-field"),L(13,1,["ngProjectAs","label",5,["label"]]),L(14,2,["ngProjectAs","input",5,["input"]]),h()()),e&2){let o=K(7);O(n.multiSelect()?-1:0),g(),T("hidden",n.pathDiscoveryMethod()!=="browse"),g(2),T("visualize-accepted",n.accepts()),g(2),O(n.isLoading()?5:-1),g(3),q("ngTemplateOutlet",o)("ngTemplateOutletContext",$(13,Ee,$(11,Me,n.treeStructure()))),g(),O(n.accepts()?-1:9),g(),T("hidden",n.pathDiscoveryMethod()!=="path")}},dependencies:[_e,Ce,he,fe,ge,me,ce,ue],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-level-40);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-level-10);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-level-30);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-level-20)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-level-40)}.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-level-60R)}.hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};export{z as a};
@@ -1 +1 @@
1
- import{a as ke}from"./chunk-25GEPULG.js";import"./chunk-WJQN3BOF.js";import"./chunk-C2JCNHTZ.js";import"./chunk-AUVMOLMG.js";import{a as Me}from"./chunk-W3VTD2H4.js";import"./chunk-5OX72VKG.js";import"./chunk-ZZPLRWQP.js";import{b as Se}from"./chunk-UIOTKB6J.js";import{d as R}from"./chunk-N7DO2BHU.js";import"./chunk-4RXMJUN5.js";import{a as H,g as b,h as Ee,j as ge,k as Fe,n as Ce,o as Te}from"./chunk-CDH4KG7H.js";import"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import"./chunk-2D7EACVA.js";import{Ab as i,Bb as r,Cb as F,Db as C,Fb as pe,Lb as s,Mb as u,Nb as p,Ob as se,Pa as c,Pb as ue,Rb as P,Sb as d,W as I,ba as k,ca as O,cb as ie,ec as S,gc as N,hb as g,nb as _e,ob as ae,qb as E,qc as D,rc as T,sb as A,uc as $,vb as m,vc as f,wb as le,wc as de,xb as ce,yb as re,zb as o}from"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";var Oe=()=>[R,b,H,ge,Fe,Ce,import("./chunk-K3LOA2DX.js").then(e=>e.DatePipe),import("./chunk-CLJTLGUH.js").then(e=>e.DurationFormatPipe),import("./chunk-LVA7V7CT.js").then(e=>e.BytesPipe)],me=()=>["/add-backup"],Pe=()=>["/restore"],Ne=e=>["/backup",e],$e=e=>["/restore",e],fe=e=>["/backup",e,"export"],Ie=e=>["/backup",e,"database"],Ae=e=>["/backup",e,"commandline"],De=e=>["/backup",e,"log"];function Re(e,_){if(e&1&&(S(0," - "),F(1),p(2,21),C(),S(3),$(4,"durationFormat")),e&2){let t=d().$implicit;c(3),N(" ",f(4,1,t.Backup==null||t.Backup.Metadata==null?null:t.Backup.Metadata.LastBackupDuration)," ")}}function He(e,_){e&1&&(F(0),p(1,22),C())}function be(e,_){if(e&1&&(S(0),$(1,"bytes")),e&2){let t=d().$implicit;N(" ",f(1,1,t.Backup==null||t.Backup.Metadata==null?null:t.Backup.Metadata.SourceFilesSize)," ")}}function xe(e,_){e&1&&(F(0),p(1,23),C())}function Be(e,_){if(e&1&&(S(0),$(1,"bytes")),e&2){let t=d().$implicit;N(" ",f(1,1,t.Backup==null||t.Backup.Metadata==null?null:t.Backup.Metadata.TargetFilesSize)," ")}}function Le(e,_){e&1&&(F(0),p(1,24),C())}function ye(e,_){if(e&1&&(o(0,"spk-chip",37),p(1,25),i()),e&2){let t=d().$implicit;c(),se(t.Backup==null||t.Backup.Metadata==null?null:t.Backup.Metadata.BackupListCount),ue(1)}}function Ge(e,_){e&1&&(o(0,"spk-chip",38),p(1,26),i())}function he(e,_){if(e&1){let t=pe();o(0,"div",36)(1,"div",31)(2,"h3"),S(3),o(4,"spk-icon"),S(5,"database"),i()(),o(6,"p")(7,"span"),p(8,8),i(),S(9),$(10,"date"),g(11,Re,5,3)(12,He,2,0,"ng-container"),i(),o(13,"p")(14,"span"),p(15,9),i(),g(16,be,2,3)(17,xe,2,0,"ng-container"),i(),o(18,"p")(19,"span"),p(20,10),i(),g(21,Be,2,3)(22,Le,2,0,"ng-container"),i()(),g(23,ye,2,1,"spk-chip",37)(24,Ge,2,0,"spk-chip",38),o(25,"div",39)(26,"button",40),P("click",function(){let l=k(t).$implicit,M=d(3);return O(M.startBackup(l.Backup==null?null:l.Backup.ID))}),s(27,11),r(28,"spk-icon"),u(),i(),o(29,"button",41)(30,"spk-icon"),S(31,"pencil-simple"),i()(),o(32,"spk-menu",42)(33,"button",32)(34,"spk-icon"),S(35,"dots-three-vertical"),i()(),F(36,43),o(37,"h3",44),S(38,"Operations"),i(),o(39,"button",45,0),s(41,12),r(42,"spk-icon"),u(),i(),o(43,"button",45,0),s(45,13),r(46,"spk-icon"),u(),i(),o(47,"button",46,0),P("click",function(){let l=k(t).$implicit,M=d(3);return O(M.deleteBackup(l.Backup==null?null:l.Backup.ID))}),s(49,14),r(50,"spk-icon"),u(),i(),r(51,"spk-divider"),o(52,"h3",44),S(53,"Advanced"),i(),o(54,"button",45,0),s(56,15),r(57,"spk-icon"),u(),i(),o(58,"button",47,0),P("click",function(){let l=k(t).$implicit,M=d(3);return O(M.verifyFiles(l.Backup==null?null:l.Backup.ID))}),s(60,16),r(61,"spk-icon"),u(),i(),o(62,"button",47,0),P("click",function(){let l=k(t).$implicit,M=d(3);return O(M.compressBackup(l.Backup==null?null:l.Backup.ID))}),s(64,17),r(65,"spk-icon"),u(),i(),o(66,"button",45,0),s(68,18),r(69,"spk-icon"),u(),i(),r(70,"spk-divider"),o(71,"h3",44),S(72,"Reporting"),i(),o(73,"button",45,0),s(75,19),r(76,"spk-icon"),u(),i(),o(77,"button",47,0),P("click",function(){let l=k(t).$implicit,M=d(3);return O(M.createErrorReport(l.Backup==null?null:l.Backup.ID))}),s(79,20),r(80,"spk-icon"),u(),i(),C(),i()()()}if(e&2){let t,n=_.$implicit,l=d(3);c(3),N(" ",(t=n.Backup==null?null:n.Backup.Name)!==null&&t!==void 0?t:l.MISSING_BACKUP_NAME," "),c(6),N(" ",de(10,17,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,"short")," "),c(2),m(!(n.Backup==null||n.Backup.Metadata==null)&&n.Backup.Metadata.LastBackupDuration?11:12),c(5),m(!(n.Backup==null||n.Backup.Metadata==null)&&n.Backup.Metadata.SourceFilesSize?16:17),c(5),m(!(n.Backup==null||n.Backup.Metadata==null)&&n.Backup.Metadata.TargetFilesSize?21:22),c(2),m(!(n.Backup==null||n.Backup.Metadata==null)&&n.Backup.Metadata.BackupListCount?23:24),c(3),A("loader",l.startingBackup()),c(3),E("routerLink",T(20,Ne,n.Backup==null?null:n.Backup.ID)),c(3),E("right",!0),c(7),E("routerLink",T(22,$e,n.Backup==null?null:n.Backup.ID)),c(4),E("routerLink",T(24,fe,n.Backup==null?null:n.Backup.ID)),c(4),A("loader",l.deletingBackup()===(n.Backup==null?null:n.Backup.ID)),c(7),E("routerLink",T(26,Ie,n.Backup==null?null:n.Backup.ID)),c(12),E("routerLink",T(28,Ae,n.Backup==null?null:n.Backup.ID)),c(7),E("routerLink",T(30,De,n.Backup==null?null:n.Backup.ID))}}function ve(e,_){if(e&1&&ce(0,he,81,32,"div",36,le),e&2){let t=d(2);re(t.backups())}}function Xe(e,_){e&1&&(F(0),p(1,27),C())}function we(e,_){if(e&1&&g(0,ve,2,0)(1,Xe,2,0,"ng-container"),e&2){let t=d();m(t.backups().length?0:1)}}function ze(e,_){e&1&&(o(0,"div",48),r(1,"spk-progress-bar",49),o(2,"div",31)(3,"h3"),p(4,28),i()()())}var x=class e{#e=I(Me);#n=I(Se);MISSING_BACKUP_NAME=$localize`Backup name missing`;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;ngOnInit(){this.#e.getBackups(!0)}startBackup(_){this.#e.startBackup(_)}deleteBackup(_){window.confirm("Are you sure you want to delete this backup?")&&this.#e.deleteBackup(_)}verifyFiles(_){this.#n.postApiV1BackupByIdVerify({id:_}).subscribe()}compressBackup(_){this.#n.postApiV1BackupByIdCompact({id:_}).subscribe()}createErrorReport(_){this.#n.postApiV1BackupByIdCreatereport({id:_}).subscribe()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=ie({type:e,selectors:[["app-home"]],decls:31,vars:5,consts:()=>{let _;_=$localize`Backups`;let t;t=$localize`Backups are stored in the cloud and can be restored at any time.`;let n;n=$localize` Add ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let l;l=$localize`Restores`;let M;M=$localize`Restores allow you to restore your data from the cloud.`;let B;B=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let L;L=$localize`My backups`;let y;y=$localize`Last successful backup:`;let G;G=$localize`Source:`;let h;h=$localize`Destination:`;let v;v=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SPK_ICON:play-circle${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SPK_ICON: Start `;let X;X=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#42\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore `;let w;w=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let z;z=$localize`${"\uFFFD#50\uFFFD"}:START_TAG_SPK_ICON:x-circle${"\uFFFD/#50\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let K;K=$localize`${"\uFFFD#57\uFFFD"}:START_TAG_SPK_ICON:database${"\uFFFD/#57\uFFFD"}:CLOSE_TAG_SPK_ICON: Database `;let V;V=$localize`${"\uFFFD#61\uFFFD"}:START_TAG_SPK_ICON:check-square-offset${"\uFFFD/#61\uFFFD"}:CLOSE_TAG_SPK_ICON: Verify files `;let j;j=$localize`${"\uFFFD#65\uFFFD"}:START_TAG_SPK_ICON:file-archive${"\uFFFD/#65\uFFFD"}:CLOSE_TAG_SPK_ICON: Compress now `;let q;q=$localize`${"\uFFFD#69\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#69\uFFFD"}:CLOSE_TAG_SPK_ICON: Commandline `;let U;U=$localize`${"\uFFFD#76\uFFFD"}:START_TAG_SPK_ICON:notepad${"\uFFFD/#76\uFFFD"}:CLOSE_TAG_SPK_ICON: Log `;let W;W=$localize`${"\uFFFD#80\uFFFD"}:START_TAG_SPK_ICON:file-plus${"\uFFFD/#80\uFFFD"}:CLOSE_TAG_SPK_ICON: Create error report `;let J;J=$localize`took`;let Q;Q=$localize`N/A`;let Y;Y=$localize`N/A`;let Z;Z=$localize`N/A`;let ee;ee=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: Version `;let ne;ne=$localize`No version yet`;let te;te=$localize`No backups founds`;let oe;return oe=$localize`Loading backups...`,[["option",""],_,t,n,l,M,B,L,y,G,h,v,X,w,z,K,V,j,q,U,W,J,Q,Y,Z,ee,ne,te,oe,[1,"type-a",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","spk-button",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"backups"],[1,"backup"],[1,"simple","success"],[1,"simple"],[1,"actions"],["spk-button","",3,"click"],["type","button","spk-button","",3,"routerLink"],[3,"right"],["menu",""],["title",""],["type","button",3,"routerLink"],[3,"click"],["type","button",3,"click"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(t,n){t&1&&(r(0,"app-status-bar"),o(1,"section")(2,"header")(3,"spk-card",29),r(4,"img",30),o(5,"div",31)(6,"h3"),p(7,1),i(),o(8,"p"),p(9,2),i()(),o(10,"button",32),s(11,3),r(12,"spk-icon"),u(),i()(),o(13,"spk-card",29),r(14,"img",33),o(15,"div",31)(16,"h3"),p(17,4),i(),o(18,"p"),p(19,5),i()(),o(20,"button",32),s(21,6),r(22,"spk-icon"),u(),i()()(),o(23,"div",34)(24,"h2"),p(25,7),i(),o(26,"div",35),g(27,we,2,1)(28,ze,5,0),_e(29,27,Oe,null,28),i()()()),t&2&&(c(3),E("routerLink",D(3,me)),c(10),E("routerLink",D(4,Pe)),c(16),ae(!n.backupsLoading()))},dependencies:[R,ke,Ee,b,H,Te],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:1rem}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-level-70)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{x as default};
1
+ import{a as ke}from"./chunk-DKICGIGJ.js";import"./chunk-WJQN3BOF.js";import"./chunk-C2JCNHTZ.js";import"./chunk-AUVMOLMG.js";import{a as Me}from"./chunk-W3VTD2H4.js";import"./chunk-5OX72VKG.js";import"./chunk-ZZPLRWQP.js";import{b as Se}from"./chunk-UIOTKB6J.js";import{d as R}from"./chunk-N7DO2BHU.js";import"./chunk-4RXMJUN5.js";import{a as H,g as b,h as Ee,j as ge,k as Fe,n as Ce,o as Te}from"./chunk-ZI4ZJIB3.js";import"./chunk-W4YAOQRI.js";import"./chunk-WYTHNCNI.js";import"./chunk-2D7EACVA.js";import{Ab as i,Bb as r,Cb as F,Db as C,Fb as pe,Lb as s,Mb as u,Nb as p,Ob as se,Pa as c,Pb as ue,Rb as P,Sb as d,W as I,ba as k,ca as O,cb as ie,ec as S,gc as N,hb as g,nb as _e,ob as ae,qb as E,qc as D,rc as T,sb as A,uc as $,vb as m,vc as f,wb as le,wc as de,xb as ce,yb as re,zb as o}from"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";var Oe=()=>[R,b,H,ge,Fe,Ce,import("./chunk-K3LOA2DX.js").then(e=>e.DatePipe),import("./chunk-CLJTLGUH.js").then(e=>e.DurationFormatPipe),import("./chunk-LVA7V7CT.js").then(e=>e.BytesPipe)],me=()=>["/add-backup"],Pe=()=>["/restore"],Ne=e=>["/backup",e],$e=e=>["/restore",e],fe=e=>["/backup",e,"export"],Ie=e=>["/backup",e,"database"],Ae=e=>["/backup",e,"commandline"],De=e=>["/backup",e,"log"];function Re(e,_){if(e&1&&(S(0," - "),F(1),p(2,21),C(),S(3),$(4,"durationFormat")),e&2){let t=d().$implicit;c(3),N(" ",f(4,1,t.Backup==null||t.Backup.Metadata==null?null:t.Backup.Metadata.LastBackupDuration)," ")}}function He(e,_){e&1&&(F(0),p(1,22),C())}function be(e,_){if(e&1&&(S(0),$(1,"bytes")),e&2){let t=d().$implicit;N(" ",f(1,1,t.Backup==null||t.Backup.Metadata==null?null:t.Backup.Metadata.SourceFilesSize)," ")}}function xe(e,_){e&1&&(F(0),p(1,23),C())}function Be(e,_){if(e&1&&(S(0),$(1,"bytes")),e&2){let t=d().$implicit;N(" ",f(1,1,t.Backup==null||t.Backup.Metadata==null?null:t.Backup.Metadata.TargetFilesSize)," ")}}function Le(e,_){e&1&&(F(0),p(1,24),C())}function ye(e,_){if(e&1&&(o(0,"spk-chip",37),p(1,25),i()),e&2){let t=d().$implicit;c(),se(t.Backup==null||t.Backup.Metadata==null?null:t.Backup.Metadata.BackupListCount),ue(1)}}function Ge(e,_){e&1&&(o(0,"spk-chip",38),p(1,26),i())}function he(e,_){if(e&1){let t=pe();o(0,"div",36)(1,"div",31)(2,"h3"),S(3),o(4,"spk-icon"),S(5,"database"),i()(),o(6,"p")(7,"span"),p(8,8),i(),S(9),$(10,"date"),g(11,Re,5,3)(12,He,2,0,"ng-container"),i(),o(13,"p")(14,"span"),p(15,9),i(),g(16,be,2,3)(17,xe,2,0,"ng-container"),i(),o(18,"p")(19,"span"),p(20,10),i(),g(21,Be,2,3)(22,Le,2,0,"ng-container"),i()(),g(23,ye,2,1,"spk-chip",37)(24,Ge,2,0,"spk-chip",38),o(25,"div",39)(26,"button",40),P("click",function(){let l=k(t).$implicit,M=d(3);return O(M.startBackup(l.Backup==null?null:l.Backup.ID))}),s(27,11),r(28,"spk-icon"),u(),i(),o(29,"button",41)(30,"spk-icon"),S(31,"pencil-simple"),i()(),o(32,"spk-menu",42)(33,"button",32)(34,"spk-icon"),S(35,"dots-three-vertical"),i()(),F(36,43),o(37,"h3",44),S(38,"Operations"),i(),o(39,"button",45,0),s(41,12),r(42,"spk-icon"),u(),i(),o(43,"button",45,0),s(45,13),r(46,"spk-icon"),u(),i(),o(47,"button",46,0),P("click",function(){let l=k(t).$implicit,M=d(3);return O(M.deleteBackup(l.Backup==null?null:l.Backup.ID))}),s(49,14),r(50,"spk-icon"),u(),i(),r(51,"spk-divider"),o(52,"h3",44),S(53,"Advanced"),i(),o(54,"button",45,0),s(56,15),r(57,"spk-icon"),u(),i(),o(58,"button",47,0),P("click",function(){let l=k(t).$implicit,M=d(3);return O(M.verifyFiles(l.Backup==null?null:l.Backup.ID))}),s(60,16),r(61,"spk-icon"),u(),i(),o(62,"button",47,0),P("click",function(){let l=k(t).$implicit,M=d(3);return O(M.compressBackup(l.Backup==null?null:l.Backup.ID))}),s(64,17),r(65,"spk-icon"),u(),i(),o(66,"button",45,0),s(68,18),r(69,"spk-icon"),u(),i(),r(70,"spk-divider"),o(71,"h3",44),S(72,"Reporting"),i(),o(73,"button",45,0),s(75,19),r(76,"spk-icon"),u(),i(),o(77,"button",47,0),P("click",function(){let l=k(t).$implicit,M=d(3);return O(M.createErrorReport(l.Backup==null?null:l.Backup.ID))}),s(79,20),r(80,"spk-icon"),u(),i(),C(),i()()()}if(e&2){let t,n=_.$implicit,l=d(3);c(3),N(" ",(t=n.Backup==null?null:n.Backup.Name)!==null&&t!==void 0?t:l.MISSING_BACKUP_NAME," "),c(6),N(" ",de(10,17,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,"short")," "),c(2),m(!(n.Backup==null||n.Backup.Metadata==null)&&n.Backup.Metadata.LastBackupDuration?11:12),c(5),m(!(n.Backup==null||n.Backup.Metadata==null)&&n.Backup.Metadata.SourceFilesSize?16:17),c(5),m(!(n.Backup==null||n.Backup.Metadata==null)&&n.Backup.Metadata.TargetFilesSize?21:22),c(2),m(!(n.Backup==null||n.Backup.Metadata==null)&&n.Backup.Metadata.BackupListCount?23:24),c(3),A("loader",l.startingBackup()),c(3),E("routerLink",T(20,Ne,n.Backup==null?null:n.Backup.ID)),c(3),E("right",!0),c(7),E("routerLink",T(22,$e,n.Backup==null?null:n.Backup.ID)),c(4),E("routerLink",T(24,fe,n.Backup==null?null:n.Backup.ID)),c(4),A("loader",l.deletingBackup()===(n.Backup==null?null:n.Backup.ID)),c(7),E("routerLink",T(26,Ie,n.Backup==null?null:n.Backup.ID)),c(12),E("routerLink",T(28,Ae,n.Backup==null?null:n.Backup.ID)),c(7),E("routerLink",T(30,De,n.Backup==null?null:n.Backup.ID))}}function ve(e,_){if(e&1&&ce(0,he,81,32,"div",36,le),e&2){let t=d(2);re(t.backups())}}function Xe(e,_){e&1&&(F(0),p(1,27),C())}function we(e,_){if(e&1&&g(0,ve,2,0)(1,Xe,2,0,"ng-container"),e&2){let t=d();m(t.backups().length?0:1)}}function ze(e,_){e&1&&(o(0,"div",48),r(1,"spk-progress-bar",49),o(2,"div",31)(3,"h3"),p(4,28),i()()())}var x=class e{#e=I(Me);#n=I(Se);MISSING_BACKUP_NAME=$localize`Backup name missing`;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;ngOnInit(){this.#e.getBackups(!0)}startBackup(_){this.#e.startBackup(_)}deleteBackup(_){window.confirm("Are you sure you want to delete this backup?")&&this.#e.deleteBackup(_)}verifyFiles(_){this.#n.postApiV1BackupByIdVerify({id:_}).subscribe()}compressBackup(_){this.#n.postApiV1BackupByIdCompact({id:_}).subscribe()}createErrorReport(_){this.#n.postApiV1BackupByIdCreatereport({id:_}).subscribe()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=ie({type:e,selectors:[["app-home"]],decls:31,vars:5,consts:()=>{let _;_=$localize`Backups`;let t;t=$localize`Backups are stored in the cloud and can be restored at any time.`;let n;n=$localize` Add ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let l;l=$localize`Restores`;let M;M=$localize`Restores allow you to restore your data from the cloud.`;let B;B=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let L;L=$localize`My backups`;let y;y=$localize`Last successful backup:`;let G;G=$localize`Source:`;let h;h=$localize`Destination:`;let v;v=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SPK_ICON:play-circle${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SPK_ICON: Start `;let X;X=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#42\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore `;let w;w=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let z;z=$localize`${"\uFFFD#50\uFFFD"}:START_TAG_SPK_ICON:x-circle${"\uFFFD/#50\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let K;K=$localize`${"\uFFFD#57\uFFFD"}:START_TAG_SPK_ICON:database${"\uFFFD/#57\uFFFD"}:CLOSE_TAG_SPK_ICON: Database `;let V;V=$localize`${"\uFFFD#61\uFFFD"}:START_TAG_SPK_ICON:check-square-offset${"\uFFFD/#61\uFFFD"}:CLOSE_TAG_SPK_ICON: Verify files `;let j;j=$localize`${"\uFFFD#65\uFFFD"}:START_TAG_SPK_ICON:file-archive${"\uFFFD/#65\uFFFD"}:CLOSE_TAG_SPK_ICON: Compress now `;let q;q=$localize`${"\uFFFD#69\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#69\uFFFD"}:CLOSE_TAG_SPK_ICON: Commandline `;let U;U=$localize`${"\uFFFD#76\uFFFD"}:START_TAG_SPK_ICON:notepad${"\uFFFD/#76\uFFFD"}:CLOSE_TAG_SPK_ICON: Log `;let W;W=$localize`${"\uFFFD#80\uFFFD"}:START_TAG_SPK_ICON:file-plus${"\uFFFD/#80\uFFFD"}:CLOSE_TAG_SPK_ICON: Create error report `;let J;J=$localize`took`;let Q;Q=$localize`N/A`;let Y;Y=$localize`N/A`;let Z;Z=$localize`N/A`;let ee;ee=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: Version `;let ne;ne=$localize`No version yet`;let te;te=$localize`No backups founds`;let oe;return oe=$localize`Loading backups...`,[["option",""],_,t,n,l,M,B,L,y,G,h,v,X,w,z,K,V,j,q,U,W,J,Q,Y,Z,ee,ne,te,oe,[1,"type-a",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","spk-button",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"backups"],[1,"backup"],[1,"simple","success"],[1,"simple"],[1,"actions"],["spk-button","",3,"click"],["type","button","spk-button","",3,"routerLink"],[3,"right"],["menu",""],["title",""],["type","button",3,"routerLink"],[3,"click"],["type","button",3,"click"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(t,n){t&1&&(r(0,"app-status-bar"),o(1,"section")(2,"header")(3,"spk-card",29),r(4,"img",30),o(5,"div",31)(6,"h3"),p(7,1),i(),o(8,"p"),p(9,2),i()(),o(10,"button",32),s(11,3),r(12,"spk-icon"),u(),i()(),o(13,"spk-card",29),r(14,"img",33),o(15,"div",31)(16,"h3"),p(17,4),i(),o(18,"p"),p(19,5),i()(),o(20,"button",32),s(21,6),r(22,"spk-icon"),u(),i()()(),o(23,"div",34)(24,"h2"),p(25,7),i(),o(26,"div",35),g(27,we,2,1)(28,ze,5,0),_e(29,27,Oe,null,28),i()()()),t&2&&(c(3),E("routerLink",D(3,me)),c(10),E("routerLink",D(4,Pe)),c(16),ae(!n.backupsLoading()))},dependencies:[R,ke,Ee,b,H,Te],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:1rem}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-level-70)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{x as default};
@@ -0,0 +1,6 @@
1
+ import{a as je}from"./chunk-UPW4CQ72.js";import{a as Le}from"./chunk-MMNUKDWS.js";import{a as At,b as qt}from"./chunk-DNHLTHLR.js";import{a as z}from"./chunk-ODIN2IGP.js";import{a as st}from"./chunk-KDCTRSPO.js";import{a as tt}from"./chunk-BRWHKZV2.js";import{a as Re,b as se,c as he,d as le,e as De,f as lt,g as Xt,h as Ee,i as ve,l as pt,m as ye,n as be,o as Ht,p as Pe,q as ne,r as ct,s as Ne}from"./chunk-5OX72VKG.js";import{b as Xe}from"./chunk-UIOTKB6J.js";import{a as Te,c as ae}from"./chunk-N7DO2BHU.js";import{a as pe,b as mt,d as jt,e as Wt,g as Ge,l as ce,n as ut,o as _t,r as me,w as Ve,x as He}from"./chunk-ZI4ZJIB3.js";import{c as zt}from"./chunk-W4YAOQRI.js";import{ia as at}from"./chunk-WYTHNCNI.js";import{Ab as r,Bb as u,C as Ye,Cb as H,Db as j,Eb as Be,Fb as k,Jc as B,Lb as C,Lc as rt,Mb as f,Nb as x,Ob as Ze,Pa as l,Pb as Je,Q as we,Qb as ke,Rb as D,Sb as p,Vb as X,W as $,Wa as Ce,Xb as W,Yb as U,ba as S,bc as fe,ca as T,cb as re,cc as Se,dc as Y,ec as _,fc as yt,ga as bt,gc as M,hb as d,hc as Gt,jc as Vt,k as Tt,kc as Lt,lc as Ut,mc as Pt,na as Dt,nc as Nt,o as Qe,oa as Et,oc as Ot,qb as c,qc as Bt,rc as Ke,sa as A,sb as Ae,sc as Kt,tc as et,vb as F,wb as J,xb as ee,xc as $e,yb as te,z as ht,zb as s}from"./chunk-ZSSQBIRK.js";import{a as O,c as vt}from"./chunk-C6Q5SG76.js";var dt=class e{fromString(n){if(!n)return null;let t=n.match(/(\d+)([smhDWMY])/);return t&&{value:parseInt(t[1]),unit:t[2]}}toString(n,t){return`${n}${t}`}static \u0275fac=function(t){return new(t||e)};static \u0275prov=we({token:e,factory:e.\u0275fac,providedIn:"root"})};var Oe=class e{#e=$(Xe);s3Providers=z(this.getS3Config("Providers"));s3Regions=z(this.getS3Config("Regions"));s3RegionHosts=z(this.getS3Config("RegionHosts"));s3StorageClasses=z(this.getS3Config("StorageClasses"));storjSatellites=z(this.getStorjConfig("Satellites"));storjAuthenticationMethods=z(this.getStorjConfig("AuthenticationMethods"));openstackProviders=z(this.getOpenstackConfig("Providers"));openstackVersions=z(this.getOpenstackConfig("Versions"));gcsLocations=z(this.getGcsConfig("Locations"));gcsStorageClasses=z(this.getGcsConfig("StorageClasses"));getS3Config(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":n}}).pipe(Qe(t=>this.#t(t)))}createS3IamUser(n,t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":n,"s3-password":t}})}createS3PolicyIAM(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:n}})}getStorjConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":n}}).pipe(Qe(t=>this.#t(t)))}getOpenstackConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":n}}).pipe(Qe(t=>this.#t(t)))}getGcsConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":n}}).pipe(Qe(t=>this.#t(t)))}#t(n){return(n.Result&&typeof n.Result=="object"&&Object.entries(n.Result).map(([t,o])=>({key:t,value:o})))??[]}static \u0275fac=function(t){return new(t||e)};static \u0275prov=we({token:e,factory:e.\u0275fac,providedIn:"root"})};function Ue(e){return e==null?"":":"+e.toString()}function oe(e){return e==null?"":e.startsWith("/")?e:"/"+e}function w(e,n){let t={},o={};return n.searchParams.forEach((i,a)=>{Ie.find(m=>m.key===e)?.dynamicFields?.includes(a)?o[a]=decodeURIComponent(i):t[a]=decodeURIComponent(i)}),{advanced:t,dynamic:o}}function R(e,n=!1){let t=e.map(([i,a])=>`${i}=${a?encodeURIComponent(a.toString()):""}`).join("&");return t?(n?"":"?")+t:""}function Ft(e){let n=e.destinationType,t=Ie.find(o=>o.customKey===n||o.key===n);if(!t)throw new Error("Invalid destination type");return t?.mapper.to(e)??""}function kt(e){let n=URL.canParse(e),t=e.split("://")[0],o=e.split("://")[1],i="http://"+o;if(o.startsWith("%")&&t==="file")return Ie.find(a=>a.customKey===t||a.key===t)?.mapper.from(t,new URL("http://localhost"),e);try{let a=new URL(i);return Ie.find(m=>m.customKey===t||m.key===t)?.mapper.from(t,a,e)}catch(a){console.error("Error while parsing target path",a)}if(!n)throw new Error("Invalid target path");return null}var h=new ne,Ie=[{key:"file",displayName:"File system",description:"Store backups on your local file system.",customFields:{path:{type:"FolderTree",name:"path",shortDescription:"File path",longDescription:"The path to store the backup",formElement:e=>h.control(e??"")}},mapper:{to:e=>{let n=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${e.custom.path}${n}`},from:(e,n,t)=>{let i=t.startsWith("file:///")?t.split("file:///")[1]:t.split("file://")[1],a=i.startsWith("%"),g=i.slice(1).startsWith(":\\")||a?i:"/"+i;return O({destinationType:e,custom:{path:g}},w(e,n))}}},{key:"ssh",displayName:"SSH",description:"Store backups in SSH.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"The server to connect to",formElement:e=>h.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:e=>h.control(e??"",[he.required,he.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>h.control(e??"")}},dynamicFields:["auth-username"],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:"This is a path to a private key file locally on the machine",longDescription:"This is a path to a private key file locally on the machine"}],mapper:{to:e=>{let n=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Ue(t)+oe(i)+n}`},from:(e,n,t)=>O({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},w(e,n))}},{key:"s3",displayName:"S3 compatible bucket",description:"Store backups in any S3 compatible bucket.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>h.control(e??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>h.control(e??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Oe).s3Providers},"use-ssl","auth-username","auth-password"],advancedFields:[{name:"s3-client",type:"Enumeration",options:["aws","minio"]},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Oe).s3StorageClasses}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+oe(t)+o}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},w(e,n))}},{key:"gcs",displayName:"Google Cloud Storage",description:"Store backups in Google Cloud Storage.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>h.control(e??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Oe).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Oe).gcsStorageClasses},"authid"],mapper:{to:e=>{let n=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${e.custom.path}${n}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},w(e,n))}},{key:"googledrive",displayName:"Google Drive",description:"Store backups in Google Drive.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>h.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},w(e,n))}},{key:"pcloud",displayName:"pCloud",description:"Store backups in pCloud.",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>A([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:"Server",longDescription:"Server",formElement:e=>h.control(e??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>h.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>{let o=n.pathname.replace(/^\//,"");return O({destinationType:e,custom:{server:n.hostname,path:o}},w(e,n))}}},{key:"azure",displayName:"Azure Blob Storage",description:"Store backups in Azure Blob Storage.",customFields:{path:{type:"String",name:"path",shortDescription:"Container name",longDescription:"Container name",formElement:e=>h.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=e.custom.path,t=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},w(e,n))}},{key:"onedrivev2",displayName:"OneDrive",description:"Store backups in OneDrive.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},w(e,n))}},{key:"od4b",displayName:"OneDrive Business",description:"Store backups in OneDrive Business.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>h.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>h.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Ue(t)+oe(i)+n}`},from:(e,n,t)=>O({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},w(e,n))}},{key:"mssp",displayName:"Microsoft SharePoint",description:"Store backups in Microsoft SharePoint.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>h.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>h.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Ue(t)+oe(i)+n}`},from:(e,n,t)=>O({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},w(e,n))}},{key:"sharepoint",displayName:"Microsoft SharePoint v2",description:"Store backups in Microsoft SharePoint.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},w(e,n))}},{key:"dropbox",displayName:"Dropbox",description:"Store backups in Dropbox.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},w(e,n))}},{key:"box",displayName:"Box.com",description:"Store backups in Box.com.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},w(e,n))}},{key:"jottacloud",displayName:"Jottacloud",description:"Store backups in Jottacloud.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},w(e,n))}},{key:"b2",displayName:"B2 Cloud Storage",description:"Store backups in B2 Cloud Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>h.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>h.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Application ID"},{name:"auth-password",shortDescription:"Application Key"}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+oe(t)+o}`},from:(e,n,t)=>O({destinationType:e,custom:{bucket:n.hostname,path:n.pathname}},w(e,n))}},{key:"e2",displayName:"IDrive e2",description:"Store backups in IDrive e2.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>h.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>h.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Access ID"},{name:"auth-password",shortDescription:"Access Secret"}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+oe(t)+o}`},from:(e,n,t)=>O({destinationType:e,custom:{bucket:n.hostname,path:n.pathname}},w(e,n))}},{key:"mega",displayName:"Mega.nz",description:"Store backups in Mega.nz.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let n=e.custom.path,t=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},w(e,n))}},{key:"msgroup",displayName:"Microsoft Office 365 Group",description:"Store backups in Microsoft Office 365 Group.",oauthField:"authid",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:"Group email",longDescription:"Group email",formElement:e=>h.control(e??"",[he.email])},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},w(e,n))}},{key:"cloudfiles",displayName:"Rackspace CloudFiles",description:"Store backups in Rackspace CloudFiles.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>h.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>h.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let n=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Ue(t)+oe(i)+n}`},from:(e,n,t)=>O({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},w(e,n))}},{key:"rclone",displayName:"Rclone",description:"Store backups in Rclone.",dynamicFields:[{name:"rclone-local-repository",shortDescription:"Local repository",defaultValue:""},{name:"rclone-remote-repository",shortDescription:"Remote repository",defaultValue:""},{name:"rclone-remote-path",shortDescription:"Path on remote repository",defaultValue:""}],mapper:{to:e=>{let n=e.dynamic["rclone-remote-repository"],t=e.dynamic["rclone-remote-path"],o=Object.entries(e.dynamic).filter(([a])=>!["rclone-remote-repository","rclone-remote-path"].includes(a)),i=R([...Object.entries(e.advanced),...o]);return`${e.destinationType}://${n}/${t+i}`},from:(e,n,t)=>{let{advanced:o,dynamic:i}=w(e,n);return O({destinationType:e,dynamic:O({"rclone-remote-repository":n.hostname,"rclone-remote-path":n.pathname},i)},o)}}},{key:"openstack",displayName:"OpenStack Object Storage",description:"Store backups in OpenStack Object Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket",longDescription:"Bucket",formElement:e=>h.control(e??"")}},dynamicFields:[{name:"openstack-authuri",shortDescription:"Auth URI",type:"Enumeration",loadOptions:e=>e.get(Oe).openstackProviders},{name:"openstack-version",shortDescription:"Version",type:"Enumeration",loadOptions:e=>e.get(Oe).openstackVersions},{name:"openstack-domain-name",shortDescription:"Domain name"},{name:"openstack-tenant-name",shortDescription:"Tenant name"},{name:"openstack-region",shortDescription:"Region"}],mapper:{to:e=>{let n=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{bucket:t}=e.custom;return`${e.destinationType}://${t+n}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},w(e,n))}},{key:"webdav",displayName:"WebDAV",description:"Store backups in WebDAV.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>h.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>h.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"},{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let{port:n,server:t,path:o}=e.custom,i=e.dynamic["use-ssl"],a=R([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([m])=>m!=="use-ssl")]);return`${e.destinationType}${i?"s":""}://${t+Ue(n)+oe(o)+a}`},from:(e,n,t)=>O({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},w(e,n))}},{key:"aftp",displayName:"FTP",description:"Store backups in FTP.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>h.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>h.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let{port:n,server:t,path:o}=e.custom,i=R([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([a])=>a!=="use-ssl")]);return`${e.destinationType}://${t+Ue(n)+oe(o)+i}`},from:(e,n,t)=>O({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},w(e,n))}},{key:"sia",displayName:"Sia Decentrilized Cloud",description:"Store backups in Sia Decentrilized Cloud.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>h.control(e??"")}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let n=e.custom.server,t=e.dynamic["sia-targetpath"],o=R([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([i])=>i!=="sia-targetpath")]);return`${e.destinationType}://${n+oe(t)+o}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.pathname}},w(e,n))}},{key:"cos",displayName:"Tencent COS",description:"Store backups in Tencent COS.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.control(e??"")}},dynamicFields:[{name:"cos-bucket",shortDescription:"Bucket",order:1},{name:"cos-region",shortDescription:"Region",order:2},{name:"cos-app-id",shortDescription:"COS App Id",order:3},{name:"cos-secret-id",shortDescription:"COS Secret Id",order:4},{name:"cos-secret-key",shortDescription:"COS Secret Key",order:5}],mapper:{to:e=>{let n=e.custom.path,t=R([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([o])=>o!=="cos-targetpath")]);return`${e.destinationType}://${n+t}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.pathname}},w(e,n))}},{key:"tahoe",displayName:"Tahoe LAFS",description:"Store backups in Tahoe LAFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>h.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>h.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.control(e??"")},username:{type:"String",name:"username",shortDescription:"Username",longDescription:"Username",formElement:e=>h.control(e??"")},password:{type:"Password",name:"password",shortDescription:"Password",longDescription:"Password",formElement:e=>h.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"}],mapper:{to:e=>{let{port:n,server:t,path:o,username:i,password:a}=e.custom,m={"auth-username":i,"auth-password":a},g=e.dynamic["use-ssl"],P=R([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([N])=>N!=="use-ssl"),...Object.entries(m)]);return`${e.destinationType}${g?"s":""}://${t+Ue(n)+oe(o)+P}`},from:(e,n,t)=>O({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},w(e,n))}},{key:"cifs",displayName:"CIFS",description:"Store backups in CIFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>h.control(e??"")},share:{type:"String",name:"share",shortDescription:"Share Name",longDescription:"Share Name",formElement:e=>h.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.control(e??"")}},dynamicFields:["transport","auth-username","auth-password","auth-domain"],mapper:{to:e=>{let{share:n,server:t,path:o,username:i,password:a}=e.custom,m={"auth-username":i,"auth-password":a},g=R([...Object.entries(e.advanced),...Object.entries(m)]);return`${e.destinationType}://${t+oe(n)+oe(o)+g}`},from:(e,n,t)=>{let o=n.pathname.split("/")[1],i=n.pathname.split("/").slice(2).join("/");return O({destinationType:e,custom:{server:n.hostname,share:o,path:i}},w(e,n))}}},{key:"storj",customKey:"storjAccessGrant",displayName:"Storj Access Grant",description:"Store backups in Storj Access Grant.",dynamicFields:[{name:"storj-shared-access",shortDescription:"Access Grant"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server"}],mapper:{to:e=>`storj://storj.io/config?storj-auth-method=Access%20grant&storj-satellite=us1.storj.io%3A7777&storj-api-key&storj-secret&${R([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>O({destinationType:e},w(e,n))}},{key:"storj",customKey:"storjApiKey",displayName:"Storj API Key",description:"Store backups in Storj API Key.",dynamicFields:[{name:"storj-satellite",shortDescription:"Satellite",type:"Enumeration",loadOptions:e=>e.get(Oe).storjSatellites},{name:"storj-api-key",shortDescription:"API Key"},{name:"storj-secret",shortDescription:"Secret"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server"}],mapper:{to:e=>`storj://storj.io/config?storj-auth-method=API%20key&${R([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>O({destinationType:e},w(e,n))}}];var Qt=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,gt=class e{generate(n,t=Qt){let o;do o=this.generatePassword(n,t);while(this.calculatePasswordStrength(o)<5);return o}generatePassword(n,t=Qt){let o=this;return Array.apply(null,{length:n}).map(()=>{let i;for(;;)if(i=String.fromCharCode(o.#e()),t.test(i))return i},this).join("")}calculatePasswordStrength(n){let t=1;return n.length>=8&&t++,n.match(/[a-z]/)&&n.match(/[A-Z]/)&&t++,n.match(/\d+/)&&t++,n.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&t++,Math.min(t,5)}#e(){if(window.crypto&&window.crypto.getRandomValues){let n=new Uint8Array(1);return window.crypto.getRandomValues(n),n[0]}else if(window.msCrypto&&window.msCrypto.getRandomValues){let n=new Uint8Array(1);return window.msCrypto.getRandomValues(n),n[0]}else return Math.floor(Math.random()*256)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=we({token:e,factory:e.\u0275fac,providedIn:"root"})};var sn=["formRef"];function ln(e,n){if(e&1&&_(0),e&2){let t=n.$implicit;M(" ",t.DisplayName," ")}}function pn(e,n){if(e&1&&u(0,"spk-progress-bar",37),e&2){let t=p(3);Ae("error",t.calculatePasswordStrength()===1)("warn",t.calculatePasswordStrength()===2)("primary",t.calculatePasswordStrength()===4)("success",t.calculatePasswordStrength()===5),c("value",t.calculatePasswordStrength()*(100/5))}}function cn(e,n){e&1&&(s(0,"span",32),x(1,9),r())}function mn(e,n){e&1&&(C(0,7,1),u(1,"spk-icon"),f())}function un(e,n){e&1&&(C(0,7,2),u(1,"spk-icon"),f())}function _n(e,n){e&1&&(C(0,10,1),u(1,"spk-icon",39),f())}function dn(e,n){e&1&&(C(0,10,2),u(1,"spk-icon"),f())}function Fn(e,n){if(e&1){let t=k();s(0,"button",38),D("click",function(){S(t);let i=p(3);return T(i.copyPassword())}),C(1,10),d(2,_n,2,0)(3,dn,2,0),f(),r()}if(e&2){let t=p(3);l(2),F(t.copiedPassword()?2:3)}}function gn(e,n){e&1&&(s(0,"spk-alert",36),x(1,11),r())}function Cn(e,n){if(e&1){let t=k();s(0,"div",27)(1,"spk-form-field")(2,"label",28),C(3,6),u(4,"sup"),f(),r(),u(5,"input",29),r(),d(6,pn,1,9,"spk-progress-bar",30),s(7,"spk-form-field"),u(8,"input",31),d(9,cn,2,0,"span",32),r(),s(10,"div",33)(11,"button",34),D("click",function(){S(t);let i=p(2);return T(i.showPassword.set(!i.showPassword()))}),C(12,7),d(13,mn,2,0)(14,un,2,0),f(),r(),s(15,"button",34),D("click",function(){S(t);let i=p(2);return T(i.generatePassword())}),C(16,8),u(17,"spk-icon"),f(),r(),d(18,Fn,4,1,"button",35),r(),d(19,gn,2,0,"spk-alert",36),r()}if(e&2){let t=p(2);l(5),c("type",t.showPassword()?"text":"password"),l(),F(t.generalForm.value.password?6:-1),l(2),c("type",t.showPassword()?"text":"password"),l(),F(t.generalForm.value.repeatPassword&&t.generalForm.value.repeatPassword!==t.generalForm.value.password?9:-1),l(4),F(t.showPassword()?13:14),l(5),F(t.showCopyPassword()?18:-1),l(),F(t.generalForm.value.password&&t.generalForm.value.password===t.generalForm.value.repeatPassword?19:-1)}}function fn(e,n){if(e&1&&(s(0,"spk-select",24)(1,"label",25),x(2,5),r(),u(3,"input",26),d(4,ln,1,1,"ng-template"),r(),d(5,Cn,20,7,"div",27)),e&2){let t=p();c("options",t.encryptionOptions())("isClearable",!1),l(5),F(t.encryptionFieldSignal()!==""?5:-1)}}function Sn(e,n){if(e&1&&(s(0,"button",22),C(1,12),u(2,"spk-icon"),f(),r()),e&2){let t=p();c("disabled",t.generalForm.invalid)}}function Tn(e,n){if(e&1&&(s(0,"spk-tooltip",23)(1,"button",22),C(2,13),u(3,"spk-icon"),f(),r()()),e&2){let t=p();c("disabled",!(t.showCopyPassword()&&!t.copiedPassword())),l(),c("disabled",t.generalForm.invalid||t.showCopyPassword()&&!t.copiedPassword())}}var We=new ne,Yt=(e={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>We.group({name:We.control(e.name,[he.required]),description:We.control(e.description),encryption:We.control(e.encryption,[qt()]),password:We.control(e.password,[At(n=>n?.value.encryption!=="",[he.required])]),repeatPassword:We.control(e.repeatPassword,[At(n=>n?.value.encryption!=="",[he.required])])}),xt={Key:"",DisplayName:"None"},$t=class e{#e=$(ae);#t=$(Te);#o=$(gt);#i=$(ue);#n=$(st);formRef=Ce.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=A(!1);copiedPassword=A(!1);showCopyPassword=A(!1);encryptionEffect=rt(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});calculatePasswordStrength=B(()=>{let t=this.generalFormSignal()?.password??"";return this.#o.calculatePasswordStrength(t)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit()}async copyPassword(){let n=this.generalForm.controls.password.value;await this.#r(n??""),this.copiedPassword.set(!0)}async#r(n){try{await navigator.clipboard.writeText(n)}catch{try{let o=document.createElement("textarea");o.value=n,document.body.appendChild(o),o.select(),document.execCommand("copy"),document.body.removeChild(o)}catch(o){console.error("Failed to copy text: ",o)}}}displayFn(){let n=this.#n.systemInfo()?.EncryptionModules??[];return t=>{let o=[xt,...n].find(i=>i.Key===t);return o?`${o.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let n=this.#o.generate(16);this.generalForm.controls.password.setValue(n),this.generalForm.controls.repeatPassword.setValue(n),this.showCopyPassword.set(!0)}next(){this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({type:e,selectors:[["app-general"]],viewQuery:function(t,o){t&1&&fe(o.formRef,sn,5),t&2&&Se()},decls:20,vars:3,consts:()=>{let n;n=$localize`Your backup name`;let t;t=$localize`Your backup description`;let o;o=$localize`General backup settings`;let i;i=$localize` Backup name ${"\uFFFD#7\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#7\uFFFD"}:CLOSE_SUPERSCRIPT:`;let a;a=$localize`Backup description`;let m;m=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let g;g=$localize`Encryption`;let P;P=$localize`Encryption`;let N;N=$localize`Password`;let G;G=$localize`Repeat password`;let b;b=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let v;v=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,v=ke(v);let L;L=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let q;q=$localize`Passwords do not match`;let Z;Z=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,Z=ke(Z);let E;E=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let y;y=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let K;return K=$localize` Continue ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],o,i,a,m,P,b,v,L,q,Z,E,y,K,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],["for","backupName"],["type","text","tabindex","1","placeholder",n,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",t,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["message","Remember to copy the password",1,"primary",3,"disabled"],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",g,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",N,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",G,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(t,o){if(t&1){let i=k();s(0,"form",14,0),D("submit",function(){return S(i),T(o.next())}),s(2,"h3",15),x(3,1),r(),s(4,"spk-form-field")(5,"label",16),C(6,2),u(7,"sup"),f(),r(),u(8,"input",17),r(),s(9,"spk-form-field")(10,"label",18),x(11,3),r(),u(12,"textarea",19),r(),d(13,fn,6,3),s(14,"div",20)(15,"button",21),D("click",function(){return S(i),T(o.exit())}),C(16,4),u(17,"spk-icon"),f(),r(),d(18,Sn,3,1,"button",22)(19,Tn,4,2,"spk-tooltip",23),r()()}t&2&&(c("formGroup",o.generalForm),l(13),F(o.isNew()?13:-1),l(5),F(o.encryptionFieldSignal()===""?18:19))},dependencies:[Ne,Ee,se,le,De,ye,Pe,ce,me,Ge,pe,_t,mt,He],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-500)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}"],changeDetection:0})};var hn=["formRef"],Dn=(e,n)=>({index:e,formView:n,formGroupName:"advancedOptions",destinationType:null,oauthField:null}),En=e=>({$implicit:e});function yn(e,n){e&1&&(C(0,6,1),u(1,"spk-icon",18),f())}function Pn(e,n){e&1&&(s(0,"p",18),x(1,12),r())}function Nn(e,n){if(e&1){let t=k();C(0,9,1),s(1,"button",35,2),D("click",function(){let i=S(t).$implicit,a=p();return T(a.addNewOption(i))}),r(),f()}if(e&2){let t=n.$implicit;l(),Ze(t.name),Je(0)}}function On(e,n){e&1&&Be(0)}function An(e,n){if(e&1&&d(0,On,1,0,"ng-container",36),e&2){let t=n.$implicit,o=n.$index;p();let i=Y(34);c("ngTemplateOutlet",i)("ngTemplateOutletContext",Ke(5,En,Kt(2,Dn,o,t)))}}function kn(e,n){if(e&1&&(s(0,"spk-tooltip",45)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function $n(e,n){if(e&1&&(s(0,"app-file-tree",39)(1,"label",44),_(2),d(3,kn,3,1,"spk-tooltip",45),r(),u(4,"input",46),r()),e&2){let t,o=p().$implicit,i=p();c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name))("accepts",o.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),W("for","destination-",o.formGroupName,"-",o.index,""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),F(o.formView.longDescription?3:-1),l(),W("id","destination-",o.formGroupName,"-",o.index,""),X("formControlName",o.formView.name)}}function xn(e,n){if(e&1&&(s(0,"spk-tooltip",45)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function In(e,n){if(e&1&&(s(0,"app-file-tree",40)(1,"label",44),_(2),d(3,xn,3,1,"spk-tooltip",45),r(),u(4,"input",46),r()),e&2){let t,o=p().$implicit,i=p();c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name)),l(),W("for","destination-",o.formGroupName,"-",o.index,""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),F(o.formView.longDescription?3:-1),l(),W("id","destination-",o.formGroupName,"-",o.index,""),X("formControlName",o.formView.name)}}function Mn(e,n){if(e&1&&(s(0,"spk-tooltip",45)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function wn(e,n){e&1&&(s(0,"spk-icon",47),_(1,"link"),r())}function Rn(e,n){e&1&&(s(0,"spk-icon",47),_(1,"textbox"),r())}function vn(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",44),_(2),d(3,Mn,3,1,"spk-tooltip",45),r(),u(4,"input",46),d(5,wn,2,0,"spk-icon",47)(6,Rn,2,0,"spk-icon",47),r()),e&2){let t,o=p().$implicit;l(),W("for","destination-",o.formGroupName,"-",o.index,""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),F(o.formView.longDescription?3:-1),l(),W("id","destination-",o.formGroupName,"-",o.index,""),X("formControlName",o.formView.name),l(),F(o.formView.type==="Path"?5:6)}}function bn(e,n){if(e&1){let t=k();s(0,"span",51),D("click",function(){S(t);let i=p(2).$implicit,a=p();return T(a.oauthStartTokenCreation(i.formViewType))}),_(1,"AuthID"),r()}}function Gn(e,n){e&1&&(s(0,"spk-icon",47),_(1,"password"),r())}function Vn(e,n){if(e&1){let t=k();s(0,"spk-icon",52),D("click",function(){S(t);let i=p(2).$implicit;return T(i.formView.showPassword=!i.formView.showPassword)}),_(1," eye "),r()}}function Ln(e,n){if(e&1){let t=k();s(0,"spk-icon",52),D("click",function(){S(t);let i=p(2).$implicit;return T(i.formView.showPassword=!i.formView.showPassword)}),_(1," eye-slash "),r()}}function Un(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",44),_(2),r(),u(3,"input",48),d(4,bn,2,0,"span",49)(5,Gn,2,0,"spk-icon",47)(6,Vn,2,0,"spk-icon",50)(7,Ln,2,0,"spk-icon",50),r()),e&2){let t,o=p().$implicit;l(),W("for","destination-",o.formGroupName,"-",o.index,""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),W("id","destination-",o.formGroupName,"-",o.index,""),X("formControlName",o.formView.name),c("type",o.formView.showPassword?"text":"password"),l(),F(o.oauthField===o.formView.name?4:5),l(2),F(o.formView.showPassword?6:7)}}function Bn(e,n){if(e&1&&(s(0,"spk-tooltip",45)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Kn(e,n){if(e&1&&_(0),e&2){let t=n.$implicit;M(" ",t," ")}}function zn(e,n){if(e&1&&(s(0,"spk-select",53)(1,"label",44),_(2),d(3,Bn,3,1,"spk-tooltip",45),r(),u(4,"input",46),r(),d(5,Kn,1,1,"ng-template",null,3,$e)),e&2){let t,o=Y(6),i=p().$implicit;c("options",i.formView.options)("isClearable",!1)("optionTemplate",o),l(),U("for","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),l(),M(" ",(t=i.formView.shortDescription)!==null&&t!==void 0?t:i.formView.name," "),l(),F(i.formView.longDescription?3:-1),l(),U("id","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),X("formControlName",i.formView.name)}}function Xn(e,n){if(e&1&&(s(0,"spk-tooltip",45)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Hn(e,n){if(e&1&&(s(0,"div",41)(1,"label",44),_(2),d(3,Xn,3,1,"spk-tooltip",45),r(),s(4,"div",54)(5,"spk-form-field"),u(6,"input",55),s(7,"spk-icon",47),_(8,"resize"),r()(),s(9,"spk-select",56),u(10,"input",21),r()()()),e&2){let t,o=p().$implicit,i=p();c("formGroupName",o.formView.name),l(),W("for","destination-",o.formGroupName,"-",o.index,""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),F(o.formView.longDescription?3:-1),l(3),W("id","destination-",o.formGroupName,"-",o.index,""),l(3),c("options",i.sizeOptions())("inlineSearch",!0)}}function jn(e,n){if(e&1&&(s(0,"spk-tooltip",45)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Wn(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",44),_(2),d(3,jn,3,1,"spk-tooltip",45),r(),u(4,"input",57),s(5,"spk-icon",47),_(6,"numpad"),r()()),e&2){let t,o=p().$implicit;l(),W("for","destination-",o.formGroupName,"-",o.index,""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),F(o.formView.longDescription?3:-1),l(),W("id","destination-",o.formGroupName,"-",o.index,""),X("formControlName",o.formView.name)}}function qn(e,n){if(e&1&&(s(0,"spk-tooltip",45)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Qn(e,n){if(e&1&&(s(0,"spk-toggle",42)(1,"label",44),_(2),d(3,qn,3,1,"spk-tooltip",45),r(),u(4,"input",58),r()),e&2){let t,o=p().$implicit;l(),W("for","destination-",o.formGroupName,"-",o.index,""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),F(o.formView.longDescription?3:-1),l(),W("id","destination-",o.formGroupName,"-",o.index,""),X("formControlName",o.formView.name)}}function Yn(e,n){if(e&1&&(s(0,"spk-tooltip",45)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Zn(e,n){if(e&1&&_(0),e&2){let t=n.$implicit;M(" ",t," ")}}function Jn(e,n){if(e&1&&(s(0,"spk-select",59)(1,"label",44),_(2),d(3,Yn,3,1,"spk-tooltip",45),r(),u(4,"input",60),r(),d(5,Zn,1,1,"ng-template",null,4,$e)),e&2){let t,o=Y(6),i=p().$implicit;c("options",i.formView.options)("selectMultiple",!0)("optionTemplate",o),l(),W("for","destination-",i.formGroupName,"-",i.index,""),l(),M(" ",(t=i.formView.shortDescription)!==null&&t!==void 0?t:i.formView.name," "),l(),F(i.formView.longDescription?3:-1),l(),X("formControlName",i.formView.name)}}function eo(e,n){if(e&1&&(s(0,"spk-tooltip",45)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function to(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",44),_(2),d(3,eo,3,1,"spk-tooltip",45),r(),u(4,"input",46),r()),e&2){let t,o=p().$implicit;l(),W("for","destination-",o.formGroupName,"-",o.index,""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),F(o.formView.longDescription?3:-1),l(),W("id","destination-",o.formGroupName,"-",o.index,""),X("formControlName",o.formView.name)}}function no(e,n){if(e&1){let t=k();s(0,"div",37),H(1,38),d(2,$n,5,14,"app-file-tree",39)(3,In,5,10,"app-file-tree",40)(4,vn,7,10,"spk-form-field")(5,Un,8,11,"spk-form-field")(6,zn,7,14)(7,Hn,11,11,"div",41)(8,Wn,7,9,"spk-form-field")(9,Qn,5,9,"spk-toggle",42)(10,Jn,7,9)(11,to,5,9,"spk-form-field"),j(),s(12,"button",43),D("click",function(){let i=S(t).$implicit,a=p();return T(a.removeFormView(i.formView,0))}),s(13,"spk-icon"),_(14,"x-circle"),r()()()}if(e&2){let t=n.$implicit;l(),c("formGroupName",t.formGroupName),l(),F(t.formView.type==="FileTree"?2:t.formView.type==="FolderTree"?3:t.formView.type==="String"||t.formView.type==="Path"?4:t.formView.type==="Password"?5:t.formView.type==="Enumeration"?6:t.formView.type==="Size"?7:t.formView.type==="Integer"?8:t.formView.type==="Boolean"?9:t.formView.type==="Flags"?10:t.formView.type==="Timespan"?11:-1)}}var qe=new ne,Zt=["Bytes","KB","MB","GB","TB","PB"],oo=[{value:"",name:$localize`Keep all backups`},{value:"time",name:$localize`Delete backups that are older than`},{value:"versions",name:$localize`Keep a specific number of backups`},{value:"smart",name:$localize`Smart backup retention`},{value:"custom",name:$localize`Custom backup retention`}],io=1024*1024*1024*2,ro=1024*1024*5,Jt=(e={remoteVolumeSize:50,size:"MB",backupRetention:"",advancedOptions:[]})=>qe.group({remoteVolumeSize:qe.group({size:qe.control(e.remoteVolumeSize),unit:qe.control(e.size)}),backupRetention:qe.control(e.backupRetention),advancedOptions:qe.group({})}),It=class e{#e=$(ue);#t=$(ae);#o=$(Te);formRef=Ce.required("formRef");optionsForm=this.#e.optionsForm;selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;sizeOptions=A(Zt);retentionOptions=A(oo);volumeSizeSignal=z(this.optionsForm.controls.remoteVolumeSize.get("size")?.valueChanges.pipe(ht(300))??Tt(null));volumeUnitSignal=z(this.optionsForm.controls.remoteVolumeSize.get("unit")?.valueChanges.pipe(ht(300))??Tt(null));exceededVolumeSize=B(()=>{let n=this.volumeSizeSignal()??this.optionsForm.controls.remoteVolumeSize.get("size")?.value,t=this.volumeUnitSignal()??this.optionsForm.controls.remoteVolumeSize.get("unit")?.value;if(n==null||t===null||t===void 0)return!1;let o=n*Math.pow(1024,Zt.indexOf(t));return o>io||o<ro});oauthStartTokenCreation(n){}getFormFieldValue(n,t,o){return this.optionsForm.controls.advancedOptions.controls[o].value}removeFormView(n,t){this.#e.removeOptionFromFormGroup(n)}addNewOption(n){this.#e.addOptionToFormGroup(n)}retentionOptionDisplayFn(){let n=this.retentionOptions();return t=>{let o=n.find(i=>i.value===t);return o?o.name:""}}displayFn(){let n=this.#e.advancedOptions();return t=>{let o=n.find(i=>i.name===t);return o?`${o.name}`:""}}goBack(){this.#t.navigate(["schedule"],{relativeTo:this.#o.parent})}submit(){this.#e.submit()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({type:e,selectors:[["app-advanced-options-settings"]],viewQuery:function(t,o){t&1&&fe(o.formRef,hn,5),t&2&&Se()},decls:42,vars:11,consts:()=>{let n;n=$localize`Select an option...`;let t;t=$localize`Options`;let o;o=$localize` Remote volume size ${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/*9:1\uFFFD"}:CLOSE_BLOCK_IF:`;let i;i=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#16\uFFFD"}:START_LINK: Read more ${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-square-out${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#16\uFFFD"}:CLOSE_LINK:`;let a;a=$localize`Backup retention`;let m;m=$localize` Advanced options ${"\uFFFD#25\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#26\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#27\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#26\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#28\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*30:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1:${"\uFFFD0:1\uFFFD"}:INTERPOLATION:${"[\uFFFD/#26\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*30:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SPK_MENU:`,m=ke(m);let g;g=$localize`${"\uFFFD#38\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let P;P=$localize`${"\uFFFD#41\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#41\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `;let N;N=$localize` The chosen size is outside the recommended range. This may cause performance issues, excessively large temporary files or other problems. `;let G;return G=$localize`Select an option...`,[["formRef",""],["fieldTemplate",""],["option",""],["enumOptionTemplate",""],["optionTemplate",""],t,o,i,a,m,g,P,N,[3,"submit","formGroup"],[1,"title-30"],[1,"remote-volume-wrap"],["formGroupName","remoteVolumeSize",1,"row-inputs"],["for","size"],[1,"warning"],["type","number","id","size","formControlName","size"],["placeholder",n,3,"options","inlineSearch"],["type","text","formControlName","unit"],["href","https://forum.duplicati.com/t/choosing-sizes-in-duplicati/17683","target","_blank",1,"spk-primary"],["suffix",""],["value","value","label","name",3,"options","inlineSearch"],["type","text","formControlName","backupRetention"],[3,"disallowToggle"],["title",""],[3,"searchable"],["spk-button","","type","button",1,"outlined","small"],["menu",""],["type","button"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["type","button",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["placeholder",G,3,"options","inlineSearch"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"formControlName"]]},template:function(t,o){if(t&1){let i=k();s(0,"form",13,0),D("submit",function(){return S(i),T(o.submit())}),s(2,"h3",14),x(3,5),r(),s(4,"div",15)(5,"div",16)(6,"spk-form-field")(7,"label",17),C(8,6),d(9,yn,2,0,"spk-icon",18),f(),r(),u(10,"input",19),r(),s(11,"spk-select",20),u(12,"input",21),r()(),d(13,Pn,2,0,"p",18),s(14,"p"),C(15,7),s(16,"a",22),u(17,"spk-icon",23),r(),f(),r()(),s(18,"spk-select",24)(19,"label",17),x(20,8),r(),u(21,"input",25),r(),s(22,"app-toggle-card",26),H(23,27),C(24,9),s(25,"spk-menu",28)(26,"button",29),u(27,"spk-icon"),r(),H(28,30),ee(29,Nn,3,1,"button",31,J),j(),r(),f(),j(),ee(31,An,1,7,"ng-container",null,J),r(),d(33,no,15,2,"ng-template",null,1,$e),s(35,"div",32)(36,"button",33),D("click",function(){return S(i),T(o.goBack())}),C(37,10),u(38,"spk-icon"),f(),r(),s(39,"button",34),C(40,11),u(41,"spk-icon"),f(),r()()()}t&2&&(c("formGroup",o.optionsForm),l(9),F(o.exceededVolumeSize()?9:-1),l(2),c("options",o.sizeOptions())("inlineSearch",!0),l(2),F(o.exceededVolumeSize()?13:-1),l(5),c("options",o.retentionOptions())("inlineSearch",!0),l(4),c("disallowToggle",!0),l(3),c("searchable",!0),l(4),te(o.nonSelectedOptions()),l(2),te(o.selectedOptions()),l(8),Ae("loader",o.isSubmitting()))},dependencies:[Ne,Ee,se,ve,Re,le,De,ye,Pe,be,at,ut,Ge,pe,ce,Ve,me,He,je,Le],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 40px;align-items:flex-end}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};var ao=["formRef"];function so(e,n){if(e&1){let t=k();s(0,"div",26)(1,"spk-form-field")(2,"label",27),x(3,8),r(),s(4,"input",28,1),D("focus",function(){S(t);let i=Y(5);return T(i.showPicker())}),r(),s(6,"spk-icon",29),_(7,"clock"),r()(),s(8,"spk-form-field"),u(9,"label",30),s(10,"input",31,2),D("focus",function(){S(t);let i=Y(11);return T(i.showPicker())}),r(),s(12,"spk-icon",29),_(13,"calendar"),r()()(),H(14,32),s(15,"div",33)(16,"spk-form-field")(17,"label",34),x(18,9),r(),u(19,"input",35),r(),s(20,"spk-select",36),u(21,"input",37),r()(),s(22,"app-toggle-card",38),H(23,39),x(24,10),j(),s(25,"div",40)(26,"spk-toggle",21),C(27,11),u(28,"input",41),f(),r(),s(29,"spk-toggle",21),C(30,12),u(31,"input",42),f(),r(),s(32,"spk-toggle",21),C(33,13),u(34,"input",43),f(),r(),s(35,"spk-toggle",21),C(36,14),u(37,"input",44),f(),r(),s(38,"spk-toggle",21),C(39,15),u(40,"input",45),f(),r(),s(41,"spk-toggle",21),C(42,16),u(43,"input",46),f(),r(),s(44,"spk-toggle",21),C(45,17),u(46,"input",47),f(),r()()(),j()}if(e&2){let t=p();l(20),c("options",t.unitOptions)("isClearable",!1),l(2),c("disallowToggle",!0)}}var Q=new ne,en=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],tn=(e={autoRun:!0,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}})=>Q.group({autoRun:Q.control(e.autoRun),nextTime:Q.group({time:Q.control(e.nextTime.time),date:Q.control(e.nextTime.date)}),runAgain:Q.group({repeatValue:Q.control(e.runAgain.repeatValue),repeatUnit:Q.control(e.runAgain.repeatUnit),allowedDays:Q.group({mon:Q.control(e.runAgain.allowedDays.mon),tue:Q.control(e.runAgain.allowedDays.tue),wed:Q.control(e.runAgain.allowedDays.wed),thu:Q.control(e.runAgain.allowedDays.thu),fri:Q.control(e.runAgain.allowedDays.fri),sat:Q.control(e.runAgain.allowedDays.sat),sun:Q.control(e.runAgain.allowedDays.sun)})})}),Mt=class e{#e=$(ue);#t=$(ae);#o=$(Te);formRef=Ce.required("formRef");scheduleForm=this.#e.scheduleForm;scheduleFormSignal=this.#e.scheduleFormSignal;unitOptions=en;displayFn(n){let t=en.find(o=>o.key===n);return t?`${t.label}`:""}goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#o.parent})}next(){this.#t.navigate(["options"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({type:e,selectors:[["app-schedule"]],viewQuery:function(t,o){t&1&&fe(o.formRef,ao,5),t&2&&Se()},decls:18,vars:2,consts:()=>{let n;n=$localize`Schedule`;let t;t=$localize` Automatically run backups ${"\uFFFD#7\uFFFD\uFFFD/#7\uFFFD"}:TAG_INPUT:`;let o;o=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let a;a=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let m;m=$localize`Next time`;let g;g=$localize`Run again every`;let P;P=$localize`Allowed days`;let N;N=$localize` Monday ${"\uFFFD#28\uFFFD\uFFFD/#28\uFFFD"}:TAG_INPUT:`;let G;G=$localize` Tuesday ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let b;b=$localize` Wednesday ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let v;v=$localize` Thursday ${"\uFFFD#37\uFFFD\uFFFD/#37\uFFFD"}:TAG_INPUT:`;let L;L=$localize` Friday ${"\uFFFD#40\uFFFD\uFFFD/#40\uFFFD"}:TAG_INPUT:`;let q;q=$localize` Saturday ${"\uFFFD#43\uFFFD\uFFFD/#43\uFFFD"}:TAG_INPUT:`;let Z;return Z=$localize` Sunday ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`,[["formRef",""],["timeRef",""],["dateRef",""],n,t,o,i,a,m,g,P,N,G,b,v,L,q,Z,[3,"submit","formGroup"],[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox","formControlName","autoRun"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["formGroupName","nextTime",1,"row-inputs"],["for","time"],["type","time","id","time","formControlName","time",3,"focus"],["suffix",""],["for","date"],["type","date","id","date","formControlName","date",3,"focus"],["formGroupName","runAgain"],[1,"row-inputs"],["for","repeatValue"],["type","number","id","repeatValue","formControlName","repeatValue"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit","formControlName","repeatUnit"],["formGroupName","allowedDays",3,"disallowToggle"],["title",""],[1,"days-wrap"],["type","checkbox","formControlName","mon"],["type","checkbox","formControlName","tue"],["type","checkbox","formControlName","wed"],["type","checkbox","formControlName","thu"],["type","checkbox","formControlName","fri"],["type","checkbox","formControlName","sat"],["type","checkbox","formControlName","sun"]]},template:function(t,o){if(t&1){let i=k();s(0,"form",18,0),D("submit",function(){return S(i),T(o.next())}),s(2,"h3",19),x(3,3),r(),s(4,"div",20)(5,"spk-toggle",21),C(6,4),u(7,"input",22),f(),r(),s(8,"p"),x(9,5),r()(),d(10,so,47,3),s(11,"div",23)(12,"button",24),D("click",function(){return S(i),T(o.goBack())}),C(13,6),u(14,"spk-icon"),f(),r(),s(15,"button",25),C(16,7),u(17,"spk-icon"),f(),r()()()}if(t&2){let i;c("formGroup",o.scheduleForm),l(10),F((i=o.scheduleFormSignal())!=null&&i.autoRun?10:-1)}},dependencies:[Ne,Ee,se,ve,Re,le,De,ye,Pe,be,ce,Ve,pe,Ge,me,Le],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function lo(e,n){if(e&1){let t=k();s(0,"spk-select",0)(1,"input",4),D("ngModelChange",function(i){S(t);let a=p(2);return T(a.updateStateExpression(i))}),r()()}if(e&2){let t,o=p(2);c("options",o.fileGroupOptions())("isClearable",!1),l(),c("ngModel",(t=o.pathState())==null?null:t.expression)}}function po(e,n){if(e&1){let t=k();s(0,"spk-form-field")(1,"input",4),D("ngModelChange",function(i){S(t);let a=p(2);return T(a.updateStateExpression(i))}),r()()}if(e&2){let t,o=p(2);l(),c("ngModel",(t=o.pathState())==null?null:t.expression)}}function co(e,n){if(e&1){let t=k();s(0,"spk-select",0)(1,"input",1),D("ngModelChange",function(i){S(t);let a=p();return T(a.updateStateType(i))}),r()(),d(2,lo,2,3,"spk-select",0)(3,po,2,1,"spk-form-field"),s(4,"div",2),D("click",function(){S(t);let i=p();return T(i.removeFilter())}),s(5,"spk-icon",3),_(6,"x-circle"),r()()}if(e&2){let t,o,i=p();c("options",i.expressionOptions())("isClearable",!1),l(),c("ngModel",(t=i.pathState())==null?null:t.type),l(),F(((o=i.pathState())==null?null:o.type)==="-FileGroup"||((o=i.pathState())==null?null:o.type)==="+FileGroup"?2:3)}}var nn=[{key:"Excludes folders where name contains",value:"-FolderNameIncludes"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileNameIncludes"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],mo=[{key:"Applications",value:"Applications"},{key:"CacheFiles",value:"Cache Files"},{key:"TemporaryFiles",value:"Temporary Files"},{key:"OperatingSystem",value:"Operating System"},{key:"SystemFiles",value:"System Files"},{key:"DefaultExcludes",value:"Standard Excludes"}],Ct=class e{path=Et.required();osType=Et();pathChange=Dt();remove=Dt();expressionOptions=A(nn);fileGroupOptions=A(mo);pathState=A(null);typeState=B(()=>{let n=this.pathState();return n?n.type:null});pathEffect=rt(()=>{let n=this.path(),t=n.slice(1),o=n.startsWith("-")?"-":"+",i=this.osType()==="Windows",a=i?"\\":"/",m=t.startsWith("%");return t===""?this.pathState.set({type:"-Unknown",path:"___none___",expression:""}):m&&t.endsWith(a)||i&&t.slice(2).startsWith("\\")&&t.endsWith("\\")||t.startsWith(a)&&t.endsWith(a)?this.pathState.set({type:`${o}Folder`,path:t,expression:t}):t.startsWith("*")&&t.endsWith(`*${a}`)?this.pathState.set({type:`${o}FolderNameIncludes`,path:t,expression:t.slice(1,-2)}):t.startsWith("[.*")&&t.endsWith(`[^\\${a}]*]`)?this.pathState.set({type:`${o}FileNameIncludes`,path:t,expression:t.slice(3,-7)}):t.startsWith("{")&&t.endsWith("}")?this.pathState.set({type:`${o}FileGroup`,path:t,expression:t.slice(1,-1)}):t.startsWith("[")&&t.endsWith("]")?this.pathState.set({type:`${o}Regex`,path:t,expression:t.slice(1,-1)}):t.startsWith("*.")?this.pathState.set({type:`${o}Extension`,path:t,expression:t.slice(2)}):this.pathState.set({type:`${o}Expression`,path:t,expression:t})});updateStateType(n){this.pathState.update(t=>(t.type=n,t.path=this.#t(t),t)),this.#e()}updateStateExpression(n){this.pathState.update(t=>(t.expression=n,t.path=this.#t(t),t)),this.#e()}#e(){setTimeout(()=>this.pathChange.emit(this.pathState().path))}#t(n){let t=n.type.slice(0,1),o=n.type.slice(1),i=this.osType()==="Windows",a=i?"\\":"/",g=i&&!n.expression.startsWith("%")?n.expression.slice(2):n.expression,P=n.path.startsWith("%");if(o==="Unknown")return`${t}${n.expression}`;if(o==="Folder"){let N=P||g.startsWith(a),G=g.endsWith(a);return G&&N?`${t}${n.expression}`:G?`${t}${n.expression}${a}`:N?`${t}${a}${n.expression}`:`${t}${a}${n.expression}${a}`}return o==="FolderNameIncludes"?`${t}*${n.expression}*${a}`:o==="FileNameIncludes"?`${t}[.*${n.expression}[^\\${a}]*]`:o==="FileGroup"?`${t}{${n.expression}}`:o==="Regex"?`${t}[${n.expression}]`:o==="Extension"?`${t}*.${n.expression}`:`${t}${n.expression}`}removeFilter(){this.remove.emit()}displayFn(n){let t=nn.find(o=>o.value===n);return t?t.key:""}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({type:e,selectors:[["app-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:1,vars:1,consts:()=>{let n;return n=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",n,3,"ngModelChange","ngModel"],[1,"filter-removal",3,"click"],[1,"spk-primary"],["type","text",3,"ngModelChange","ngModel"]]},template:function(t,o){t&1&&d(0,co,7,4),t&2&&F(o.pathState()?0:-1)},dependencies:[ct,se,le,Xt,pe,ce,me],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] spk-select[_ngcontent-%COMP%]{--miw: initial}[_nghost-%COMP%] spk-form-field[_ngcontent-%COMP%]{min-width:110px}[_nghost-%COMP%] spk-form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{min-width:110px}[_nghost-%COMP%] .filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var uo=["formRef"];function _o(e,n){if(e&1){let t=k();s(0,"app-filter",42),D("pathChange",function(i){let a=S(t).$index,m=p(2);return T(m.patchPathAt(i,a))})("remove",function(){let i=S(t).$index,a=p(2);return T(a.removePathAt(i))}),r()}if(e&2){let t,o=n.$implicit,i=p(2);c("path",o)("osType",(t=i.osType())!==null&&t!==void 0?t:"")}}function Fo(e,n){if(e&1&&ee(0,_o,1,2,"app-filter",41,J),e&2){let t=p();te(t.pathArray())}}function go(e,n){if(e&1&&(s(0,"div",40)(1,"spk-form-field"),u(2,"input",43),r(),s(3,"spk-select",44),u(4,"input",45),r()()),e&2){let t=p();l(3),c("options",t.sizeOptions())("isClearable",!1)}}var Me=new ne,Co=["Bytes","KB","MB","GB","TB","PB"],on=(e={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>Me.group({path:Me.control(e.path),excludes:Me.group({hidden:Me.control(e.excludes.hidden),system:Me.control(e.excludes.system),temporary:Me.control(e.excludes.temporary),filesLargerThan:Me.group({size:Me.control(null),unit:Me.control(null)})})}),wt=class e{#e=$(ue);#t=$(ae);#o=$(Te);formRef=Ce.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new lt("");filesLargerThan=B(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=A(Co);osType=this.#e.osType;pathSignal=z(this.sourceDataForm.controls.path.valueChanges);pathArray=B(()=>this.pathSignal()?.split("\0").filter(n=>n.startsWith("-")||n.startsWith("+")||n==="___none___")??[]);addFilter(n="-*"){let t=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${t}\0${n}`)}patchPathAt(n,t){let i=this.sourceDataForm.controls.path.value.split("\0").filter(m=>!m.startsWith("-")&&!m.startsWith("+")).join("\0"),a=this.pathArray().map((m,g)=>g===t?`${n}`:`${m}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${a}`)}removePathAt(n){let o=this.sourceDataForm.controls.path.value.split("\0").filter(a=>!a.startsWith("-")&&!a.startsWith("+")).join("\0"),i=this.pathArray().filter((a,m)=>m!==n).join("\0");this.sourceDataForm.controls.path.setValue(`${o}\0${i}`)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${n}\0${this.newPathCtrl.value}`),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#o.parent})}next(){this.#t.navigate(["schedule"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({type:e,selectors:[["app-source-data"]],viewQuery:function(t,o){t&1&&fe(o.formRef,uo,5),t&2&&Se()},decls:55,vars:12,consts:()=>{let n;n=$localize`Path`;let t;t=$localize`Add a direct path`;let o;o=$localize`Hidden files`;let i;i=$localize`System files`;let a;a=$localize`Temporary files`;let m;m=$localize`Source Data`;let g;g=$localize`Folder path`;let P;P=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let N;N=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let G;G=$localize`Source Data`;let b;b=$localize`Add Path`;let v;v=$localize`Add a path directly from your machine.`;let L;L=$localize`Filters`;let q;q=$localize`Customize your filters.`;let Z;Z=$localize`Add filter`;let E;E=$localize`Exclude`;let y;y=$localize`Choose if there’s any files you want to exclude.`;let K;K=$localize` Hidden files ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`;let I;I=$localize` System files ${"\uFFFD#48\uFFFD\uFFFD/#48\uFFFD"}:TAG_INPUT:`;let ie;ie=$localize` Temporary files ${"\uFFFD#51\uFFFD\uFFFD/#51\uFFFD"}:TAG_INPUT:`;let Fe;Fe=$localize` Files larger than `;let _e;return _e=$localize`Select an option...`,[["formRef",""],m,g,P,N,G,b,v,L,q,Z,E,y,K,I,ie,Fe,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",n,"formControlName","path"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"row-inputs"],["type","text","placeholder",t,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",o,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",a,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],["type","number","formControlName","size"],[3,"options","isClearable"],["type","text","formControlName","unit","placeholder",_e]]},template:function(t,o){if(t&1){let i=k();s(0,"form",17,0),D("submit",function(){return S(i),T(o.next())}),s(2,"div",18)(3,"h3",19),x(4,1),r(),s(5,"app-file-tree",20)(6,"label",21),x(7,2),r(),u(8,"input",22),r(),s(9,"div",23)(10,"button",24),D("click",function(){return S(i),T(o.goBack())}),C(11,3),u(12,"spk-icon"),f(),r(),s(13,"button",25),C(14,4),u(15,"spk-icon"),f(),r()()(),s(16,"div",26)(17,"h3",19),x(18,5),r(),s(19,"app-toggle-card",27),H(20,28),x(21,6),j(),s(22,"p",29),x(23,7),r(),s(24,"div",30)(25,"spk-form-field"),u(26,"input",31),r(),s(27,"button",32),D("click",function(){return S(i),T(o.addNewPath())}),s(28,"spk-icon"),_(29,"plus"),r()()()(),s(30,"app-toggle-card",27),H(31,28),x(32,8),j(),s(33,"p",29),x(34,9),r(),s(35,"button",33),D("click",function(){return S(i),T(o.addFilter())}),x(36,10),r(),d(37,Fo,2,0),r(),s(38,"app-toggle-card",34),H(39,28),x(40,11),j(),s(41,"p",29),x(42,12),r(),s(43,"spk-toggle",35),C(44,13),u(45,"input",36),f(),r(),s(46,"spk-toggle",35),C(47,14),u(48,"input",37),f(),r(),s(49,"spk-toggle",35),C(50,15),u(51,"input",38),f(),r(),s(52,"spk-toggle",39),D("click",function(){return S(i),T(o.toggleFilesLargerThan())}),x(53,16),r(),d(54,go,5,2,"div",40),r()()()}if(t&2){let i;c("formGroup",o.sourceDataForm),l(5),c("multiSelect",!0)("startingPath",o.getPath())("showFiles",!0),l(14),c("disallowToggle",!0),l(7),c("formControl",o.newPathCtrl),l(4),c("disallowToggle",!0),l(7),F((i=o.pathSignal())!=null&&i.length?37:-1),l(),c("disallowToggle",!0),l(14),Ae("active",o.filesLargerThan()),l(2),F(o.filesLargerThan()?54:-1)}},dependencies:[ct,Ee,se,ve,Re,le,De,Ne,pt,ye,Pe,be,ce,pe,Ge,Ve,me,je,Le,Ct],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-level-40)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.5rem}"],changeDetection:0})};var de=new ne,ue=class e{#e=$(ae);#t=$(st);#o=$(Xe);#i=$(dt);generalForm=Yt();sourceDataForm=on();scheduleForm=tn();destinationForm=rn();optionsForm=Jt();isDraft=A(!1);backupId=A(null);isSubmitting=A(!1);finishedLoading=A(!1);backupDefaults=A(null);isNew=B(()=>this.backupId()==="new");osType=B(()=>this.#t.systemInfo()?.OSType);selectedOptions=A([]);selectedAdvancedFormPair=A([]);destinationFormPair=A({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=B(()=>{let n=this.destinationFormPair()?.advanced??[],t=this.selectedAdvancedFormPair()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});selectedHttpOptions=A([]);notSelectedHttpOptions=B(()=>{let n=this.httpOptions(),t=this.selectedHttpOptions()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});sourceDataFormSignal=z(this.sourceDataForm.valueChanges);destinationFormSignal=z(this.destinationForm.valueChanges);generalFormSignal=z(this.generalForm.valueChanges);encryptionFieldSignal=z(this.generalForm.controls.encryption.valueChanges);scheduleFormSignal=z(this.scheduleForm.valueChanges);destinationOptions=B(()=>this.#t.backendModules()??[]);httpOptions=B(()=>this.#t.systemInfo()?.GenericModules?.find(n=>n.Key==="http-options")?.Options?.map(this.#n)??[]);advancedOptions=B(()=>this.#t.systemInfo()?.Options?.map(this.#n)??[]);#n(n){return{name:n.Name,type:n.Type,shortDescription:n.ShortDescription??void 0,longDescription:n.LongDescription??void 0,options:n.ValidValues}}encryptionOptions=B(()=>{let n=this.#t.systemInfo()?.EncryptionModules??[];return[xt,...n]});nonSelectedOptions=B(()=>this.advancedOptions().sort((n,t)=>n?.name&&t?.name?n?.name.localeCompare(t?.name):0).filter(n=>this.selectedOptions()?.findIndex(t=>t.name===n.name)===-1));addAdvancedFormPairByName(n,t,o){let i=this.notSelectedAdvancedFormPair().find(a=>a.name===n);i&&this.addAdvancedFormPair(i,t,o)}addHttpOptionByName(n,t,o){let i=this.notSelectedHttpOptions().find(a=>a.name===n);i&&this.addHttpOption(i,t,o)}addAdvancedFormPair(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,a=o??n.defaultValue;this.createFormField(i,n,a),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),n])}addHttpOption(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,a=o??n.defaultValue;this.createFormField(i,n,a),this.selectedHttpOptions.set([...this.selectedHttpOptions(),n])}removeAdvancedFormPair(n,t){this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced.removeControl(n.name),this.selectedAdvancedFormPair().findIndex(i=>i.name===n.name)!==-1?this.selectedAdvancedFormPair.update(i=>(i=i.filter(a=>a.name!==n.name),i)):this.selectedHttpOptions.update(i=>(i=i.filter(a=>a.name!==n.name),i))}removeHttpOption(n,t){this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced.removeControl(n.name),this.selectedHttpOptions.update(o=>(o=o.filter(i=>i.name!==n.name),o))}submit(){this.isSubmitting.set(!0);let n=this.#l(),t=this.backupId();t==="new"||!t||this.isDraft()?this.#o.postApiV1Backups({requestBody:n}).pipe(Ye(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{this.exit()},error:o=>{}}):this.#o.putApiV1BackupById({id:t,requestBody:n}).pipe(Ye(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{this.exit()},error:o=>{}})}exit(){this.#c(),this.#e.navigate(["/"])}updateFieldsFromTargetUrl(n){this.#r(),setTimeout(()=>{this.#s(n)})}#r(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.selectedHttpOptions.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(n){let t=n.Sources??"",o=n.Filters?.map(N=>`${N.Include?"":"-"}${N.Expression}`)??[],i=n.Settings?.find(N=>N.Name==="--exclude-files-attributes")?.Value??"",a=n.Settings?.find(N=>N.Name==="--skip-files-larger-than")??null,m=a?.Value.replace(/[0-9]/g,"")??null,g=a?.Value.replace(/[^0-9]/g,"")??null,P={path:[...t,...o].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:m&&g?{size:parseInt(g),unit:m.toUpperCase()}:null}};this.sourceDataForm.patchValue(P)}mapDestinationToForm(n){let t=n.TargetURL?kt(n.TargetURL):null;t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}#s(n){let t=kt(n);t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}mapGeneralToForm(n){let t=n.Settings?.find(a=>a.Name==="encryption-module"),o=t?.Value&&t.Value.length?t.Value:"",i={name:n.Name??"",description:n.Description??""};o&&o!==""&&(i.encryption=o),this.generalForm.patchValue(i)}mapScheduleToForm(n){if(!n){this.scheduleForm.patchValue({autoRun:!1});return}let t=this.#i.fromString(n.Repeat)??null,i={nextTime:this.#p(n.Time),runAgain:{repeatValue:t?.value??1,repeatUnit:t?.unit??"D",allowedDays:{mon:n.AllowedDays?.includes("mon")??!1,tue:n.AllowedDays?.includes("tue")??!1,wed:n.AllowedDays?.includes("wed")??!1,thu:n.AllowedDays?.includes("thu")??!1,fri:n.AllowedDays?.includes("fri")??!1,sat:n.AllowedDays?.includes("sat")??!1,sun:n.AllowedDays?.includes("sun")??!1}}};this.scheduleForm.patchValue(i)}mapOptionsToForms(n){let t=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than"],o=this.advancedOptions();n.Settings?.forEach(i=>{if(i.Name==="encryption-module")return this.generalForm.controls.encryption.setValue(i.Value??"");if(!(i.Name&&t.includes(i.Name))){if(i.Name==="dblock-size"){let a=i.Value?.replace(/[^0-9]/g,""),m=i.Value?.replace(/[0-9]/g,"");return this.optionsForm.controls.remoteVolumeSize.setValue({size:a?parseInt(a):null,unit:m?m.toUpperCase():null})}if(i.Name&&i.Value){let a=o.find(m=>m.name===i.Name);if(!a)return;this.addOptionToFormGroup(a,i.Value)}}})}getCurrentTargetUrl(){return this.#a(this.destinationForm.controls.destinations)}#l(){let n=this.generalForm.value,t=this.optionsForm.value,o=this.scheduleForm.value,i=this.sourceDataForm.value,m=this.destinationForm.value.destinations?.length?this.#a(this.destinationForm.controls.destinations):[],g=null;o.runAgain?.repeatUnit&&o.runAgain?.repeatValue&&(g=this.#i.toString(o.runAgain.repeatValue,o.runAgain.repeatUnit));let P=o.runAgain?.allowedDays?Object.entries(o.runAgain?.allowedDays).filter(([L,q])=>q).map(([L,q])=>L):[],N=i.path?.split("\0")??[],G=this.mapFormsToSettings(),b=Object.entries(i.excludes??{}).filter(([L,q])=>q&&L!=="filesLargerThan").map(([L])=>L),v=i.excludes?.filesLargerThan;return b.length&&G.push({Name:"--exclude-files-attributes",Value:b.join(",")}),v&&v.size!==null&&v.unit!==null&&G.push({Name:"--skip-files-larger-than",Value:`${v.size}${v.unit}`}),{Backup:{Name:n.name,Description:n.description,TargetURL:m[0]??null,Sources:N.filter(L=>!L.startsWith("-")),Settings:G,Filters:N.filter(L=>L.startsWith("-")).map((L,q)=>({Order:q,Include:!1,Expression:L.slice(1)}))},Schedule:o.autoRun?{Repeat:g,Time:o.nextTime?.date?new Date(`${o.nextTime.date}T${o.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:P}:null}}mapFormsToSettings(){let n=this.advancedOptions(),t=this.optionsForm.value,o=this.generalForm.value,i=[{Name:"--no-encryption",Value:"True"}];o.encryption!==""&&(i=[{Name:"encryption-module",Value:o.encryption??null},{Name:"passphrase",Value:o.password??null}]);let a=t.remoteVolumeSize?.size?{Name:"dblock-size",Value:`${t.remoteVolumeSize.size}${t.remoteVolumeSize.unit.toLowerCase()}`}:{Name:"dblock-size",Value:"50mb"},m=Object.entries(t.advancedOptions??{}).filter(([g,P])=>g&&P).map(([g,P])=>{let N=n.find(G=>G.name===g);return N?.type==="Size"?{Name:g,Value:`${P.size}${P.unit.toLowerCase()}`}:N?.type==="Integer"?{Name:g,Value:P.toString()}:N?.type==="Boolean"?{Name:g,Value:P.toString()}:{Name:g,Value:P}});return[...i,a,...m]}#a(n){return n.controls.map(t=>Ft(t.value))}#p(n){if(!n||n?.indexOf("T")===-1)return{time:n??"13:00"};let t=new Date(n),o={time:`${(""+t.getHours()).padStart(2,"0")}:${(""+t.getMinutes()).padStart(2,"0")}`};return n.indexOf("T")!==-1&&(o.date=t.toISOString().split("T")[0]),o}removeOptionFromFormGroup(n){let t=n.name;t&&(this.optionsForm.controls.advancedOptions.removeControl(t),this.selectedOptions.update(o=>(o=o.filter(i=>i.name!==t),o)))}addOptionToFormGroup(n,t){let o=this.optionsForm.controls.advancedOptions;this.createFormField(o,n,t??n.defaultValue),this.selectedOptions.update(i=>(i.push(n),i))}addFreeTextOption(n,t,o){let i=this.optionsForm.controls.advancedOptions,a=O({name:n,type:"String",defaultValue:t},o);this.createFormField(i,a,t),this.selectedOptions.update(m=>(m.push(a),m))}createFormField(n,t,o){if(t.type==="String"||t.type==="FileTree"||t.type==="FolderTree"||t.type==="Password"||t.type==="Enumeration"||t.type==="NonValidatedSelectableString"||t.type==="Path"){n.addControl(t.name,de.control(o));return}if(t.type==="Size"){let i=(o??"").replace(/[0-9]/g,""),a=(o??"").replace(/[^0-9]/g,"");n.addControl(t.name,de.group({size:de.control(a?parseInt(a):50),unit:de.control(i?i.toUpperCase():"MB")}));return}if(t.type==="Integer"){n.addControl(t.name,de.control(o?parseInt(o):0));return}if(t.type==="Boolean"){n.addControl(t.name,de.control(o==="true"||o==="True"));return}if(t.type==="Flags"){n.addControl(t.name,de.control(o??""));return}if(t.type==="Timespan"){n.addControl(t.name,de.control(o,[he.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(n,t,o=!1){let i=Ie.find(E=>E.customKey===n||E.key===n),a=i?.key,m=this.destinationOptions().find(E=>E.Key===a),g=this.httpOptions();if(!m||!m.Options)return;let P=i&&i.oauthField?i.oauthField:null,N=i&&i.customFields?i.customFields:{},G=i&&i.dynamicFields?i.dynamicFields:[],b=i&&i.advancedFields?i.advancedFields:[],v=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:P,custom:[],dynamic:[],advanced:[]});let L=de.group({}),q=de.group({}),Z=de.group({});N&&Object.entries(N).forEach(([E,y],K)=>{let Fe=y,{formElement:I}=Fe,ie=vt(Fe,["formElement"]);L.addControl(E,I(t?.custom[E])),this.destinationFormPair.update(_e=>(_e.custom.push(O({order:900+K},ie)),_e))});for(let E=0;E<m.Options.length;E++){let y=m.Options[E];if(y.Deprecated)continue;let K=G.find(I=>I===y.Name||I.name===y.Name);if(K){let I=K&&typeof K!="string",ie=I?K?.defaultValue??y.DefaultValue:y.DefaultValue,Fe={name:y.Name,type:y.Type,shortDescription:y.ShortDescription??void 0,longDescription:y.LongDescription??void 0,options:y.ValidValues,order:900+E},_e=I?O(O({},Fe),K):Fe,it=t?.dynamic[y.Name]??ie??y.DefaultValue;this.createFormField(q,_e,it),this.destinationFormPair.update(ze=>(ze.dynamic.push(_e),ze))}else{if(v.find(ge=>ge===y.Name))continue;let ie=b.find(ge=>ge===y.Name||ge.name===y.Name),Fe=ie&&typeof ie!="string",_e=t?.advanced[y.Name],V=_e??y.DefaultValue,it={name:y.Name,type:y.Type,shortDescription:y.ShortDescription??void 0,longDescription:y.LongDescription??void 0,options:y.ValidValues,defaultValue:V,order:900+E},ze=Fe?O(O({},it),ie):it;o&&_e&&(this.createFormField(Z,ze,V),this.selectedAdvancedFormPair.update(ge=>(ge.push(ze),ge))),this.destinationFormPair.update(ge=>(ge.advanced.push(ze),ge))}}for(let E=0;E<g.length;E++){let y=g[E],K=t?.advanced[y.name],I=K??y.defaultValue;o&&K&&(this.createFormField(Z,y,I),this.selectedHttpOptions.update(ie=>(ie.push(y),ie)))}this.destinationFormPair.update(E=>({oauthField:E.oauthField,custom:E.custom.sort((y,K)=>y.order-K.order),dynamic:E.dynamic.sort((y,K)=>y.order-K.order),advanced:E.advanced.sort((y,K)=>y.order-K.order)})),this.destinationForm.controls.destinations.push(an({key:i?.customKey??n,customGroup:L,dynamicGroup:q,advancedGroup:Z}))}#c(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleForm.reset(),this.optionsForm.reset()}static \u0275fac=function(t){return new(t||e)};static \u0275prov=we({token:e,factory:e.\u0275fac,providedIn:"root"})};var fo=["formRef"],So=(e,n,t,o)=>({index:e,formView:n,formGroupName:"custom",destinationType:t,oauthField:o}),St=e=>({$implicit:e}),To=(e,n,t,o)=>({index:e,formView:n,formGroupName:"dynamic",destinationType:t,oauthField:o}),ho=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",destinationType:t,oauthField:o}),Do=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",asHttpOptions:!0,destinationType:t,oauthField:o}),Eo=()=>({maxWidth:"700px",width:"100%"});function yo(e,n){e&1&&(C(0,5,2),u(1,"spk-icon"),f())}function Po(e,n){e&1&&x(0,5,3)}function No(e,n){if(e&1){let t=k();C(0,5,1),s(1,"button",21),D("click",function(){S(t);let i=p();return T(i.testDestination())}),d(2,yo,2,0)(3,Po,1,0),r(),f()}if(e&2){let t=p();l(),Ae("success",t.successfulTest()),l(),F(t.successfulTest()?2:3)}}function Oo(e,n){if(e&1){let t=k();s(0,"p",27),D("click",function(){S(t);let i=p();return T(i.removeDestinationFormGroup(i.destinationCount()-1))}),C(1,8),u(2,"span",28),f(),r()}}function Ao(e,n){if(e&1){let t=k();s(0,"div",34),D("click",function(){let i=S(t).$implicit,a=p(2);return T(a.addDestinationFormGroup(i.key))}),s(1,"h3"),_(2),r(),s(3,"p"),_(4),r()()}if(e&2){let t=n.$implicit;l(2),yt(t.displayName),l(2),yt(t.description)}}function ko(e,n){if(e&1){let t=k();s(0,"button",35,1),D("click",function(){let i=S(t).$implicit,a=p(2);return T(a.addDestinationFormGroup(i.key))}),_(2),r()}if(e&2){let t=n.$implicit;l(2),M(" ",t.displayName," ")}}function $o(e,n){if(e&1&&(s(0,"div",29),ee(1,Ao,5,2,"div",30,J),r(),s(3,"spk-menu",31)(4,"button",32),x(5,9),r(),H(6,20),ee(7,ko,3,1,"button",33,J),j(),r()),e&2){let t=p();l(),te(t.destinationTypeOptionsFocused()),l(2),c("searchable",!0),l(4),te(t.destinationTypeOptionsNotFocused())}}function xo(e,n){e&1&&Be(0)}function Io(e,n){if(e&1&&d(0,xo,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;p();let a=Y(29),m=p();c("ngTemplateOutlet",a)("ngTemplateOutletContext",Ke(7,St,et(2,So,i,o,(t=m.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,m.destinationFormPair().oauthField)))}}function Mo(e,n){e&1&&Be(0)}function wo(e,n){if(e&1&&d(0,Mo,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;p();let a=Y(29),m=p();c("ngTemplateOutlet",a)("ngTemplateOutletContext",Ke(7,St,et(2,To,i,o,(t=m.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,m.destinationFormPair().oauthField)))}}function Ro(e,n){if(e&1){let t=k();C(0,10,1),s(1,"button",35,1),D("click",function(){let i=S(t).$implicit,a=p(2);return T(a.addAdvancedFormPair(i,0))}),r(),f()}if(e&2){let t=n.$implicit;l(),Ze(t.name),Je(0)}}function vo(e,n){e&1&&Be(0)}function bo(e,n){if(e&1&&d(0,vo,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;p();let a=Y(29),m=p();c("ngTemplateOutlet",a)("ngTemplateOutletContext",Ke(7,St,et(2,ho,i,o,(t=m.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,m.destinationFormPair().oauthField)))}}function Go(e,n){if(e&1){let t=k();C(0,11,1),s(1,"button",35,1),D("click",function(){let i=S(t).$implicit,a=p(2);return T(a.addHttpOption(i,0))}),r(),f()}if(e&2){let t=n.$implicit;l(),Ze(t.name),Je(0)}}function Vo(e,n){e&1&&Be(0)}function Lo(e,n){if(e&1&&d(0,Vo,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;p();let a=Y(29),m=p();c("ngTemplateOutlet",a)("ngTemplateOutletContext",Ke(7,St,et(2,Do,i,o,(t=m.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,m.destinationFormPair().oauthField)))}}function Uo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Bo(e,n){if(e&1&&(s(0,"app-file-tree",43)(1,"label",47),_(2),d(3,Uo,3,1,"spk-tooltip",48),r(),u(4,"input",49),r()),e&2){let t,o=p().$implicit,i=p(2);c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name))("accepts",o.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),U("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),F(o.formView.longDescription?3:-1),l(),U("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),X("formControlName",o.formView.name)}}function Ko(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function zo(e,n){if(e&1&&(s(0,"app-file-tree",44)(1,"label",47),_(2),d(3,Ko,3,1,"spk-tooltip",48),r(),u(4,"input",49),r()),e&2){let t,o=p().$implicit,i=p(2);c("hideShortcuts",!0)("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name)),l(),U("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),F(o.formView.longDescription?3:-1),l(),U("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),X("formControlName",o.formView.name)}}function Xo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Ho(e,n){e&1&&(s(0,"spk-icon",51),_(1,"link"),r())}function jo(e,n){e&1&&(s(0,"spk-icon",51),_(1,"envelope"),r())}function Wo(e,n){e&1&&(s(0,"spk-icon",51),_(1,"textbox"),r())}function qo(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",47),_(2),d(3,Xo,3,1,"spk-tooltip",48),r(),u(4,"input",50),d(5,Ho,2,0,"spk-icon",51)(6,jo,2,0,"spk-icon",51)(7,Wo,2,0,"spk-icon",51),r()),e&2){let t,o=p().$implicit;l(),U("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),F(o.formView.longDescription?3:-1),l(),U("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),X("formControlName",o.formView.name),c("type",o.formView.type==="Email"?"email":"text"),l(),F(o.formView.type==="Path"?5:o.formView.type==="Email"?6:7)}}function Qo(e,n){if(e&1){let t=k();s(0,"span",55),D("click",function(){S(t);let i=p(2).$implicit,a=p(2);return T(a.oauthStartTokenCreation(i.destinationType))}),_(1,"AuthID"),r()}}function Yo(e,n){e&1&&(s(0,"spk-icon",51),_(1,"password"),r())}function Zo(e,n){if(e&1){let t=k();s(0,"spk-icon",56),D("click",function(){S(t);let i=p(2).$implicit;return T(i.formView.showPassword=!i.formView.showPassword)}),_(1," eye "),r()}}function Jo(e,n){if(e&1){let t=k();s(0,"spk-icon",56),D("click",function(){S(t);let i=p(2).$implicit;return T(i.formView.showPassword=!i.formView.showPassword)}),_(1," eye-slash "),r()}}function ei(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",47),_(2),r(),u(3,"input",52),d(4,Qo,2,0,"span",53)(5,Yo,2,0,"spk-icon",51)(6,Zo,2,0,"spk-icon",54)(7,Jo,2,0,"spk-icon",54),r()),e&2){let t,o=p().$implicit;l(),U("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),U("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),X("formControlName",o.formView.name),c("type",o.formView.showPassword?"text":"password"),l(),F(o.oauthField===o.formView.name?4:5),l(2),F(o.formView.showPassword?6:7)}}function ti(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(3).$implicit;c("message",t.formView.longDescription)}}function ni(e,n){if(e&1&&_(0),e&2){let t=n.$implicit;M(" ",t," ")}}function oi(e,n){if(e&1&&(s(0,"spk-select",57)(1,"label",47),_(2),d(3,ti,3,1,"spk-tooltip",48),r(),u(4,"input",49),r(),d(5,ni,1,1,"ng-template",null,3,$e)),e&2){let t,o=Y(6);p();let i=Ot(0),a=p().$implicit;c("options",i)("isClearable",!1)("optionTemplate",o),l(),U("for","destination-",a.formGroupName,"-",a.index,"-",a.asHttpOptions?"http":"other",""),l(),M(" ",(t=a.formView.shortDescription)!==null&&t!==void 0?t:a.formView.name," "),l(),F(a.formView.longDescription?3:-1),l(),U("id","destination-",a.formGroupName,"-",a.index,"-",a.asHttpOptions?"http":"other",""),X("formControlName",a.formView.name)}}function ii(e,n){if(e&1&&(Pt(0),d(1,oi,7,14)),e&2){let t=p().$implicit,o=Nt(t.formView.loadOptions?t.formView.loadOptions(p(2).injector)():t.formView.options);l(),F(o?1:-1)}}function ri(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(3).$implicit;c("message",t.formView.longDescription)}}function ai(e,n){if(e&1&&_(0),e&2){let t=n.$implicit;Gt(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function si(e,n){if(e&1&&(s(0,"spk-select",59)(1,"label",47),_(2),d(3,ri,3,1,"spk-tooltip",48),r(),u(4,"input",49),r(),d(5,ai,1,2,"ng-template",null,4,$e)),e&2){let t,o=Y(6);p();let i=Ot(0),a=p().$implicit;c("options",i)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",o),l(),U("for","destination-",a.formGroupName,"-",a.index,"-",a.asHttpOptions?"http":"other",""),l(),M(" ",(t=a.formView.shortDescription)!==null&&t!==void 0?t:a.formView.name," "),l(),F(a.formView.longDescription?3:-1),l(),U("id","destination-",a.formGroupName,"-",a.index,"-",a.asHttpOptions?"http":"other",""),X("formControlName",a.formView.name)}}function li(e,n){e&1&&u(0,"spk-progress-bar",58)}function pi(e,n){if(e&1&&(Pt(0),d(1,si,7,15)(2,li,1,0,"spk-progress-bar",58)),e&2){let t=p().$implicit,o=Nt(t.formView.loadOptions?t.formView.loadOptions(p(2).injector)():t.formView.options);l(),F(o?1:2)}}function ci(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function mi(e,n){if(e&1&&(s(0,"div",45)(1,"label",47),_(2),d(3,ci,3,1,"spk-tooltip",48),r(),s(4,"div",60)(5,"spk-form-field"),u(6,"input",61),s(7,"spk-icon",51),_(8,"resize"),r()(),s(9,"spk-select",62),u(10,"input",63),r()()()),e&2){let t,o=p().$implicit,i=p(2);c("formGroupName",o.formView.name),l(),U("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),F(o.formView.longDescription?3:-1),l(3),U("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(3),c("options",i.sizeOptions())("inlineSearch",!0)}}function ui(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function _i(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",47),_(2),d(3,ui,3,1,"spk-tooltip",48),r(),u(4,"input",64),s(5,"spk-icon",51),_(6,"numpad"),r()()),e&2){let t,o=p().$implicit;l(),U("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),F(o.formView.longDescription?3:-1),l(),U("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),X("formControlName",o.formView.name)}}function di(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Fi(e,n){if(e&1&&(s(0,"spk-toggle",46)(1,"label",47),_(2),d(3,di,3,1,"spk-tooltip",48),r(),u(4,"input",65),r()),e&2){let t,o=p().$implicit;l(),U("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),F(o.formView.longDescription?3:-1),l(),U("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),X("formControlName",o.formView.name)}}function gi(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Ci(e,n){if(e&1&&_(0),e&2){let t=n.$implicit;M(" ",t," ")}}function fi(e,n){if(e&1&&(s(0,"spk-select",66)(1,"label",47),_(2),d(3,gi,3,1,"spk-tooltip",48),r(),u(4,"input",67),r(),d(5,Ci,1,1,"ng-template",null,4,$e)),e&2){let t,o=Y(6),i=p().$implicit;c("options",i.formView.options)("selectMultiple",!0)("optionTemplate",o),l(),W("for","destination-",i.formGroupName,"-",i.index,""),l(),M(" ",(t=i.formView.shortDescription)!==null&&t!==void 0?t:i.formView.name," "),l(),F(i.formView.longDescription?3:-1),l(),X("formControlName",i.formView.name)}}function Si(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Ti(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",47),_(2),d(3,Si,3,1,"spk-tooltip",48),r(),u(4,"input",49),r()),e&2){let t,o=p().$implicit;l(),U("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),F(o.formView.longDescription?3:-1),l(),U("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),X("formControlName",o.formView.name)}}function hi(e,n){if(e&1){let t=k();s(0,"button",68),D("click",function(){S(t);let i=p().$implicit,a=p(2);return T(a.removeFormView(i.formView,0))}),s(1,"spk-icon"),_(2,"x-circle"),r()()}}function Di(e,n){if(e&1&&(s(0,"div",41),H(1,42),d(2,Bo,5,17,"app-file-tree",43)(3,zo,5,13,"app-file-tree",44)(4,qo,8,13,"spk-form-field")(5,ei,8,13,"spk-form-field")(6,ii,2,2)(7,pi,3,2)(8,mi,11,13,"div",45)(9,_i,7,11,"spk-form-field")(10,Fi,5,11,"spk-toggle",46)(11,fi,7,9)(12,Ti,5,11,"spk-form-field"),j(),d(13,hi,3,0,"button",32),r()),e&2){let t=n.$implicit;Ae("single-field",t.formGroupName!=="advanced"),l(),c("formGroupName",t.formGroupName),l(),F(t.formView.type==="FileTree"?2:t.formView.type==="FolderTree"?3:t.formView.type==="String"||t.formView.type==="Path"||t.formView.type==="Email"?4:t.formView.type==="Password"?5:t.formView.type==="Enumeration"?6:t.formView.type==="NonValidatedSelectableString"?7:t.formView.type==="Size"?8:t.formView.type==="Integer"?9:t.formView.type==="Boolean"?10:t.formView.type==="Flags"?11:t.formView.type==="Timespan"?12:-1),l(11),F(t.formGroupName==="advanced"?13:-1)}}function Ei(e,n){if(e&1&&(H(0,22)(1,36),ee(2,Io,1,9,"ng-container",null,J),ee(4,wo,1,9,"ng-container",null,J),s(6,"app-toggle-card",37),H(7,38),C(8,10),s(9,"spk-menu",31)(10,"button",39),u(11,"spk-icon"),r(),H(12,20),ee(13,Ro,3,1,"button",33,J),j(),r(),f(),j(),ee(15,bo,1,9,"ng-container",null,J),r(),s(17,"app-toggle-card",37),H(18,38),C(19,11),s(20,"spk-menu",31)(21,"button",39),u(22,"spk-icon"),r(),H(23,20),ee(24,Go,3,1,"button",33,J),j(),r(),f(),j(),ee(26,Lo,1,9,"ng-container",null,J),r(),d(28,Di,14,5,"ng-template",null,2,$e),j()()),e&2){let t=p();l(2),te(t.destinationFormPair().custom),l(2),te(t.destinationFormPair().dynamic),l(2),c("disallowToggle",!0),l(3),c("searchable",!0),l(),c("disabled",t.notSelectedAdvancedFormPair().length===0),l(3),te(t.notSelectedAdvancedFormPair()),l(2),te(t.selectedAdvancedFormPair()),l(2),c("disallowToggle",!0),l(3),c("searchable",!0),l(),c("disabled",t.notSelectedHttpOptions().length===0),l(3),te(t.notSelectedHttpOptions()),l(2),te(t.selectedHttpOptions())}}function yi(e,n){if(e&1){let t=k();s(0,"spk-dialog",69),Ut("isOpenChange",function(i){S(t);let a=p();return Lt(a.targetUrlDialogOpen,i)||(a.targetUrlDialogOpen=i),T(i)}),s(1,"header",70)(2,"h2"),x(3,12),r(),s(4,"spk-alert",71),x(5,13),r()(),s(6,"div",72)(7,"spk-form-field"),u(8,"textarea",73),r()(),s(9,"footer",74)(10,"button",24),D("click",function(){S(t);let i=p();return T(i.closeTargetUrlDialog(!1))}),_(11,"Cancel"),r(),s(12,"button",75),D("click",function(){S(t);let i=p();return T(i.closeTargetUrlDialog(!0))}),C(13,14),u(14,"spk-icon"),f(),r()()()}if(e&2){let t=p();Vt("isOpen",t.targetUrlDialogOpen),c("options",Bt(3,Eo)),l(8),c("formControl",t.targetUrlCtrl)}}var Pi=["Bytes","KB","MB","GB","TB","PB"],ft=new ne,rn=(e={destinations:[]})=>ft.group({destinations:ft.array(e.destinations)}),an=({key:e,customGroup:n,dynamicGroup:t,advancedGroup:o})=>ft.group({destinationType:ft.control(e),custom:n,dynamic:t,advanced:o}),Rt=class e{#e=$(ae);#t=$(Te);#o=$(zt);#i=$(Xe);#n=$(ue);#r=$(Wt);injector=$(bt);formRef=Ce.required("formRef");destinationForm=this.#n.destinationForm;destinationFormPair=this.#n.destinationFormPair;selectedAdvancedFormPair=this.#n.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#n.notSelectedAdvancedFormPair;selectedHttpOptions=this.#n.selectedHttpOptions;notSelectedHttpOptions=this.#n.notSelectedHttpOptions;destinationOptions=this.#n.destinationOptions;destinationFormSignal=this.#n.destinationFormSignal;destinationCount=B(()=>this.destinationFormSignal()?.destinations?.length??0);sizeOptions=A(Pi);successfulTest=A(!1);destinationTypeOptionsInFocus=A(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=A(Ie.map(n=>({key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description})));destinationTypeOptionsFocused=B(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(i=>i.key===o))});destinationTypeOptionsNotFocused=B(()=>{let n=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(o=>!n.includes(o.key))});getFormFieldValue(n,t,o){return((this.destinationForm.controls.destinations.controls?.[n]).controls?.[t]).controls[o].value}addDestinationFormGroup(n){this.#n.addDestinationFormGroup(n)}addAdvancedFormPair(n,t){this.#n.addAdvancedFormPair(n,t)}removeFormView(n,t){this.#n.removeAdvancedFormPair(n,t)}addHttpOption(n,t){this.#n.addHttpOption(n,t)}targetUrl=B(()=>this.#n.getCurrentTargetUrl()[0]);targetUrlCtrl=new lt;targetUrlInitial=A(null);targetUrlDialogOpen=A(!1);openTargetUrlDialog(){let t=this.#n.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(t),this.targetUrlInitial.set(t),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl.value,o=this.targetUrlInitial();!n||t===o||this.#n.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(n=0){let o=this.#n.getCurrentTargetUrl()[n];o&&this.#i.postApiV1RemoteoperationTest({requestBody:{path:o}}).subscribe({next:()=>{this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3)},error:i=>{let a=i.error.error.Error;if(a==="missing-folder"&&this.#r.open(tt,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`},closed:m=>{m&&this.#i.postApiV1RemoteoperationCreate({requestBody:{path:o}}).subscribe()}}),a.startsWith("incorrect-cert:")){let m=a.split("incorrect-cert:")[1];this.#r.open(tt,{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: ${m}`,confirmText:"Trust the certificate",cancelText:"Cancel"},closed:g=>{g&&this.#n.addHttpOptionByName("accept-specified-ssl-hash",m)}})}if(a.startsWith("incorrect-host-key:")){let m=a.split('incorrect-host-key:"')[1].split('",')[0],g=a.split('accepted-host-key:"')[1].split('",')[0];g?this.#r.open(tt,{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 ${g}
6
+ with the REPORTED host key: ${m}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:P=>{P&&this.#n.addAdvancedFormPairByName("ssh-fingerprint",n,m)}}):this.#r.open(tt,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${m}`,confirmText:"Approve",cancelText:"Cancel"},closed:P=>{P&&this.#n.addAdvancedFormPairByName("ssh-fingerprint",n,m)}})}}})}mapToTargetUrl(n){return Ft(n.value)}removeDestinationFormGroup(n){this.destinationForm.controls.destinations.removeAt(n)}displayFn(n){let t=this.destinationOptions().find(o=>o.Key===n);return t?`${t.DisplayName}`:""}goBack(){this.#e.navigate(["general"],{relativeTo:this.#t.parent})}next(){this.#e.navigate(["source-data"],{relativeTo:this.#t.parent})}#s=A("https://duplicati-oauth-handler.appspot.com/").asReadonly();#l=A(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#a=A(!1);#p=A(null);keyCreation(){}oauthStartTokenCreation(n){this.#a.set(!0);let t=450,o=600,i=this.#s()+"?type="+n+"&token="+this.#l(),a=screen.width/2-t/2,m=screen.height/2-o/2,g=window.open(i,"_blank","height="+o+",width="+t+",menubar=0,status=0,titlebar=0,toolbar=0,left="+a+",top="+m);g?.addEventListener("blur",P=>{console.log("event blur",P)}),g?.addEventListener("beforeunload",P=>{console.log("event beforeunload",P),this.#o.get(this.#s()+"fetch?callback=JSON_CALLBACK",{params:{token:this.#l()}}).pipe(Ye(()=>this.#a.set(!1))).subscribe({next:N=>{console.log("res",N),N?.authid&&this.#p.set(N.authid)}})})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({type:e,selectors:[["app-destination"]],viewQuery:function(t,o){t&1&&fe(o.formRef,fo,5),t&2&&Se()},decls:24,vars:6,consts:()=>{let n;n=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"\uFFFD*6:1\uFFFD"}:START_BLOCK_IF_1:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON:${"\uFFFD*2:2\uFFFD"}:START_BLOCK_IF: Connected ${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*3:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*3:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:dots-three-vertical${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:link${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,n=ke(n);let t;t=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let o;o=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$localize` Want to select another destination? ${"\uFFFD#2\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPAN:`;let a;a=$localize`Other destinations`;let m;m=$localize` Advanced options ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#10\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#12\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*14:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*14:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_MENU:`,m=ke(m);let g;g=$localize` Http options ${"\uFFFD#20\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#21\uFFFD"}:START_TAG_BUTTON: Add http option ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#23\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*25:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*25:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#23\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SPK_MENU:`,g=ke(g);let P;P=$localize`Select an option...`;let N;N=$localize`Edit target URL`;let G;G=$localize` Be careful, this will overwrite everything you have in your destination. `;let b;return b=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],["fieldTemplate",""],["enumOptionTemplate",""],["optionTemplate",""],n,t,o,i,a,m,g,N,G,b,[3,"submit","formGroup"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"success"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],["formArrayName","destinations"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"isOpen","options"],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["spk-button","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],["formGroupName","0"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small",3,"disabled"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","startingPath"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],[3,"type","id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["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"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["placeholder",P,3,"options","inlineSearch"],["type","text","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"formControlName"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"warning"],["content",""],["id","targetUrl","autocomplete","off",3,"formControl"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,o){if(t&1){let i=k();s(0,"form",15,0),D("submit",function(){return S(i),T(o.next())}),s(2,"header")(3,"h3",16),C(4,5),s(5,"div",17),d(6,No,4,3,"button",18),s(7,"spk-menu")(8,"button",19),u(9,"spk-icon"),r(),H(10,20),s(11,"button",21),D("click",function(){return S(i),T(o.openTargetUrlDialog())}),u(12,"spk-icon"),r(),j(),r()(),f(),r(),d(13,Oo,3,0,"p"),r(),d(14,$o,9,1)(15,Ei,30,6,"ng-container",22),s(16,"div",23)(17,"button",24),D("click",function(){return S(i),T(o.goBack())}),C(18,6),u(19,"spk-icon"),f(),r(),s(20,"button",25),C(21,7),u(22,"spk-icon"),f(),r()()(),d(23,yi,15,4,"spk-dialog",26)}if(t&2){let i;c("formGroup",o.destinationForm),l(6),F(o.destinationCount()>0?6:-1),l(7),F(o.destinationCount()>0?13:-1),l(),F(o.destinationCount()===0?14:-1),l(),F(!((i=o.destinationFormSignal())==null||i.destinations==null)&&i.destinations.length?15:-1),l(8),F(o.targetUrlDialogOpen()?23:-1)}},dependencies:[Ne,Ee,se,ve,Re,le,De,pt,ye,Pe,be,Ht,at,ce,ut,pe,Ve,He,jt,mt,me,_t,Le,je],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] spk-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 1fr;gap:.5rem;align-items:flex-end}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1);background-color:var(--base-level-20);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{Ft as a,Ie as b,rn as c,an as d,Rt as e,Yt as f,xt as g,$t as h,Jt as i,It as j,tn as k,Mt as l,on as m,wt as n,ue as o};
@@ -1 +1 @@
1
- import{a as b}from"./chunk-KDCTRSPO.js";import"./chunk-UIOTKB6J.js";import{a as w,m as D}from"./chunk-CDH4KG7H.js";import"./chunk-W4YAOQRI.js";import{ia as A}from"./chunk-WYTHNCNI.js";import{Ab as r,Eb as u,Fb as v,Jc as $,Nb as P,Pa as l,Rb as k,Sb as s,W as y,ba as O,ca as x,cb as T,dc as C,ec as p,fc as E,hb as a,qb as d,rb as h,rc as _,sa as m,sb as f,sc as N,vb as g,xb as I,xc as F,yb as M,zb as c}from"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";var L=e=>({children:e,level:0}),R=e=>({$implicit:e}),V=(e,t)=>({children:e,level:t}),j=(e,t)=>t.id;function z(e,t){if(e&1&&(c(0,"spk-icon"),p(1,"caret-down"),r()),e&2){let n=s().$implicit;f("open",n.isOpen())}}function B(e,t){e&1&&(c(0,"spk-icon"),p(1,"dot"),r())}function G(e,t){e&1&&u(0)}function U(e,t){if(e&1&&a(0,G,1,0,"ng-container",3),e&2){let n=s().$implicit,o=s().$implicit;s();let i=C(3);d("ngTemplateOutlet",i)("ngTemplateOutletContext",_(5,R,N(2,V,n.children,o.level+1)))}}function X(e,t){if(e&1){let n=v();c(0,"div",4,1),k("click",function(){let i=O(n).$implicit,Y=s(2);return x(i.children.length>0&&Y.toggleNode(i))}),a(2,z,2,2,"spk-icon",5)(3,B,2,0,"spk-icon"),c(4,"div",6),p(5),r()(),a(6,U,1,7,"ng-container")}if(e&2){let n=t.$implicit;f("cannot-toggle",n.children.length===0)("open",n.isOpen()),l(2),g(n.children.length>0?2:3),l(3),E(n.text),l(),g(n.isOpen()?6:-1)}}function q(e,t){if(e&1&&(c(0,"spk-list"),I(1,X,7,7,null,null,j),r()),e&2){let n=t.$implicit;h("padding-left",n.level*.25,"rem"),l(),M(n.children)}}function H(e,t){e&1&&u(0)}var S=class e{#e=y(b);treeStructure=$(()=>{let t=this.#e.systemInfo();return this.processObject(t,0)});toggleNode(t){t.isOpen.update(n=>!n)}processObject(t,n){let o=[];for(let i in t)typeof t[i]=="object"?o.push({id:i,text:i,children:this.processObject(t[i],n+1),level:n,isOpen:m(!1)}):o.push({id:i,text:`${i}: ${t[i]}`,children:[],level:n,isOpen:m(!1)});return o}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=T({type:e,selectors:[["app-system-info"]],decls:5,vars:6,consts:()=>{let t;return t=$localize`System info`,[["recursiveTree",""],["treeNode",""],t,[4,"ngTemplateOutlet","ngTemplateOutletContext"],["action","",3,"click"],[3,"open"],[1,"text"]]},template:function(n,o){if(n&1&&(c(0,"h3"),P(1,2),r(),a(2,q,3,2,"ng-template",null,0,F)(4,H,1,0,"ng-container",3)),n&2){let i=C(3);l(4),d("ngTemplateOutlet",i)("ngTemplateOutletContext",_(4,R,_(2,L,o.treeStructure())))}},dependencies:[D,w,A],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-icon[_ngcontent-%COMP%]{font-size:1rem}spk-list[_ngcontent-%COMP%]{padding:0}spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0}spk-list[_ngcontent-%COMP%] [action].cannot-toggle[_ngcontent-%COMP%]{cursor:initial}"],changeDetection:0})};export{S as default};
1
+ import{a as b}from"./chunk-KDCTRSPO.js";import"./chunk-UIOTKB6J.js";import{a as w,m as D}from"./chunk-ZI4ZJIB3.js";import"./chunk-W4YAOQRI.js";import{ia as A}from"./chunk-WYTHNCNI.js";import{Ab as r,Eb as u,Fb as v,Jc as $,Nb as P,Pa as l,Rb as k,Sb as s,W as y,ba as O,ca as x,cb as T,dc as C,ec as p,fc as E,hb as a,qb as d,rb as h,rc as _,sa as m,sb as f,sc as N,vb as g,xb as I,xc as F,yb as M,zb as c}from"./chunk-ZSSQBIRK.js";import"./chunk-C6Q5SG76.js";var L=e=>({children:e,level:0}),R=e=>({$implicit:e}),V=(e,t)=>({children:e,level:t}),j=(e,t)=>t.id;function z(e,t){if(e&1&&(c(0,"spk-icon"),p(1,"caret-down"),r()),e&2){let n=s().$implicit;f("open",n.isOpen())}}function B(e,t){e&1&&(c(0,"spk-icon"),p(1,"dot"),r())}function G(e,t){e&1&&u(0)}function U(e,t){if(e&1&&a(0,G,1,0,"ng-container",3),e&2){let n=s().$implicit,o=s().$implicit;s();let i=C(3);d("ngTemplateOutlet",i)("ngTemplateOutletContext",_(5,R,N(2,V,n.children,o.level+1)))}}function X(e,t){if(e&1){let n=v();c(0,"div",4,1),k("click",function(){let i=O(n).$implicit,Y=s(2);return x(i.children.length>0&&Y.toggleNode(i))}),a(2,z,2,2,"spk-icon",5)(3,B,2,0,"spk-icon"),c(4,"div",6),p(5),r()(),a(6,U,1,7,"ng-container")}if(e&2){let n=t.$implicit;f("cannot-toggle",n.children.length===0)("open",n.isOpen()),l(2),g(n.children.length>0?2:3),l(3),E(n.text),l(),g(n.isOpen()?6:-1)}}function q(e,t){if(e&1&&(c(0,"spk-list"),I(1,X,7,7,null,null,j),r()),e&2){let n=t.$implicit;h("padding-left",n.level*.25,"rem"),l(),M(n.children)}}function H(e,t){e&1&&u(0)}var S=class e{#e=y(b);treeStructure=$(()=>{let t=this.#e.systemInfo();return this.processObject(t,0)});toggleNode(t){t.isOpen.update(n=>!n)}processObject(t,n){let o=[];for(let i in t)typeof t[i]=="object"?o.push({id:i,text:i,children:this.processObject(t[i],n+1),level:n,isOpen:m(!1)}):o.push({id:i,text:`${i}: ${t[i]}`,children:[],level:n,isOpen:m(!1)});return o}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=T({type:e,selectors:[["app-system-info"]],decls:5,vars:6,consts:()=>{let t;return t=$localize`System info`,[["recursiveTree",""],["treeNode",""],t,[4,"ngTemplateOutlet","ngTemplateOutletContext"],["action","",3,"click"],[3,"open"],[1,"text"]]},template:function(n,o){if(n&1&&(c(0,"h3"),P(1,2),r(),a(2,q,3,2,"ng-template",null,0,F)(4,H,1,0,"ng-container",3)),n&2){let i=C(3);l(4),d("ngTemplateOutlet",i)("ngTemplateOutletContext",_(4,R,_(2,L,o.treeStructure())))}},dependencies:[D,w,A],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-icon[_ngcontent-%COMP%]{font-size:1rem}spk-list[_ngcontent-%COMP%]{padding:0}spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0}spk-list[_ngcontent-%COMP%] [action].cannot-toggle[_ngcontent-%COMP%]{cursor:initial}"],changeDetection:0})};export{S as default};