@duplicati/ngclient 0.0.117 → 0.0.119

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 (102) hide show
  1. package/{chunk-ZRFL62SL.js → chunk-2GE6FFGI.js} +1 -1
  2. package/{chunk-45NW2WR4.js → chunk-2P3DXYGR.js} +1 -1
  3. package/{chunk-IK7CPFZB.js → chunk-2SQBD7LN.js} +1 -1
  4. package/{chunk-BIZAKOYU.js → chunk-3AIKVVWP.js} +1 -1
  5. package/chunk-3GGSYR5J.js +1 -0
  6. package/{chunk-GWVX5STR.js → chunk-3KUVV3SB.js} +1 -1
  7. package/{chunk-XP7PWMT2.js → chunk-3XVU2YA6.js} +1 -1
  8. package/{chunk-2GCIICW5.js → chunk-4FUHLIJW.js} +1 -1
  9. package/{chunk-OHLMIBDI.js → chunk-4LLC3Q7O.js} +1 -1
  10. package/{chunk-Z5UKRQLK.js → chunk-4RIDBZOK.js} +1 -1
  11. package/{chunk-YTDBBO6I.js → chunk-4YUBZYBH.js} +1 -1
  12. package/{chunk-ELMONRIG.js → chunk-5ENRUF35.js} +1 -1
  13. package/{chunk-C6XTRC7P.js → chunk-5LKXKKAK.js} +1 -1
  14. package/{chunk-TRR5XEEM.js → chunk-65UN5LE6.js} +1 -1
  15. package/{chunk-476PQHLI.js → chunk-6KSS7VQS.js} +1 -1
  16. package/{chunk-BJIL3R5K.js → chunk-6WZGDK7U.js} +1 -1
  17. package/{chunk-3GYZOEPN.js → chunk-7NBGN46A.js} +1 -1
  18. package/{chunk-XDHEMLPD.js → chunk-A6XWHATE.js} +1 -1
  19. package/{chunk-XZ7HNUSV.js → chunk-AACJQG7X.js} +1 -1
  20. package/chunk-ADO3ABTT.js +1 -0
  21. package/{chunk-L72ALLHJ.js → chunk-AHUC7M75.js} +6 -6
  22. package/{chunk-SL6SRYFT.js → chunk-AL5KGNEF.js} +1 -1
  23. package/{chunk-P7O2NK5N.js → chunk-B3WLZK7W.js} +1 -1
  24. package/chunk-B64M2BXZ.js +1 -0
  25. package/{chunk-M7ENBMEW.js → chunk-BAX2AJJJ.js} +1 -1
  26. package/{chunk-HCBCZ5NX.js → chunk-CH7FSO4Y.js} +1 -1
  27. package/{chunk-JE3JBXTZ.js → chunk-CPTR6AJI.js} +1 -1
  28. package/chunk-CRJHIWSF.js +1 -0
  29. package/{chunk-C3M5C7JC.js → chunk-CZUGA62N.js} +2 -2
  30. package/chunk-DCYB2NQH.js +1 -0
  31. package/{chunk-I5SC52QU.js → chunk-DX6BDDDV.js} +1 -1
  32. package/{chunk-VJQVHIW5.js → chunk-ELZWH543.js} +1 -1
  33. package/{chunk-S5EF63OY.js → chunk-FRSQ5NDX.js} +1 -1
  34. package/chunk-G5CT45UH.js +1 -0
  35. package/{chunk-VRWNW26T.js → chunk-GYUN7KFJ.js} +1 -1
  36. package/{chunk-MAVZY7BL.js → chunk-HFNFJ7G2.js} +1 -1
  37. package/chunk-HHSMSBNM.js +1 -0
  38. package/{chunk-N2MDNESH.js → chunk-HTX2RSBS.js} +1 -1
  39. package/{chunk-O445WX5K.js → chunk-HXN7IX3Q.js} +1 -1
  40. package/chunk-JRZGF4BZ.js +1 -0
  41. package/{chunk-HWBBTXU3.js → chunk-K5C3JCVH.js} +1 -1
  42. package/chunk-KBJGYXKV.js +1 -0
  43. package/{chunk-44DHERTN.js → chunk-KHGD372Q.js} +1 -1
  44. package/chunk-KYQWUXYN.js +1 -0
  45. package/{chunk-54VPI5KJ.js → chunk-LDJVMU7P.js} +1 -1
  46. package/{chunk-WFAZP46A.js → chunk-LJDOQTEF.js} +1 -1
  47. package/{chunk-7L2WUS2V.js → chunk-M3WT5B3C.js} +1 -1
  48. package/{chunk-COT4PUVO.js → chunk-MUBWT5H2.js} +1 -1
  49. package/{chunk-EQWH3TBL.js → chunk-NF3MS2YP.js} +1 -1
  50. package/{chunk-NIBE7CI2.js → chunk-NPZU4SBS.js} +1 -1
  51. package/{chunk-XYMSYNUD.js → chunk-OEIF7NQ5.js} +1 -1
  52. package/{chunk-MU24KCIK.js → chunk-OHZGASM5.js} +1 -1
  53. package/{chunk-3SJW7OJO.js → chunk-PHIZVVHX.js} +1 -1
  54. package/chunk-PKRMVTCU.js +1 -0
  55. package/{chunk-B5MQU4UL.js → chunk-Q6M5VRZV.js} +1 -1
  56. package/chunk-QVNFX6ZC.js +1 -0
  57. package/{chunk-JFNFY6VY.js → chunk-RHII5WE3.js} +1 -1
  58. package/chunk-RKAIZDDW.js +1 -0
  59. package/{chunk-L2M4ZKII.js → chunk-RLUT4FSI.js} +1 -1
  60. package/{chunk-HFIC4JNY.js → chunk-RSZISHXB.js} +1 -1
  61. package/chunk-RXHYUPYG.js +6 -0
  62. package/{chunk-YCAQITZE.js → chunk-SSJ4VQB4.js} +2 -2
  63. package/{chunk-MQJUTAQD.js → chunk-T6KX6ACI.js} +1 -1
  64. package/{chunk-DOP6RFEG.js → chunk-TCDECRYI.js} +1 -1
  65. package/{chunk-R3PVYKQS.js → chunk-TJJORMQV.js} +1 -1
  66. package/{chunk-F7E55RI6.js → chunk-UABJ67OY.js} +1 -1
  67. package/{chunk-5BHYO5SK.js → chunk-UXUVYBYP.js} +1 -1
  68. package/{chunk-P7IBR2UW.js → chunk-VGAQB3OD.js} +1 -1
  69. package/chunk-W4RKRM2O.js +1 -0
  70. package/{chunk-FJVMA6GA.js → chunk-WFM6YWRN.js} +1 -1
  71. package/chunk-WU3ALGNP.js +1 -0
  72. package/{chunk-F2GEUOGZ.js → chunk-WZRSQ7XL.js} +1 -1
  73. package/{chunk-CDWP7I44.js → chunk-X6PSFVBL.js} +1 -1
  74. package/{chunk-TQHNKGRL.js → chunk-XR4SRVOQ.js} +1 -1
  75. package/{chunk-3RIVWHQR.js → chunk-XWF632WO.js} +2 -2
  76. package/{chunk-2WGKWTVM.js → chunk-YW5R7NEG.js} +2 -2
  77. package/{chunk-PVLYH62N.js → chunk-YY3JAYQZ.js} +1 -1
  78. package/chunk-Z45ZPMZS.js +1 -0
  79. package/chunk-ZHMYBX5F.js +1 -0
  80. package/{chunk-BJGA55H2.js → chunk-ZQSBINUM.js} +1 -1
  81. package/index.html +2 -2
  82. package/{main-5VIDAE2R.js → main-PDJMO4FF.js} +1 -1
  83. package/package.json +1 -1
  84. package/{styles-EXA64NMM.css → styles-P2AEFLUS.css} +1 -1
  85. package/chunk-3MP7NUXY.js +0 -1
  86. package/chunk-3PDXD5UG.js +0 -1
  87. package/chunk-4RAO2JRJ.js +0 -1
  88. package/chunk-7RELJ5CQ.js +0 -1
  89. package/chunk-I7KXABQT.js +0 -1
  90. package/chunk-IZFSAAIF.js +0 -1
  91. package/chunk-JSZOZDJQ.js +0 -1
  92. package/chunk-SKABVF5Q.js +0 -1
  93. package/chunk-SQQKW2DQ.js +0 -1
  94. package/chunk-TEYVVULJ.js +0 -1
  95. package/chunk-TRCPJYNH.js +0 -1
  96. package/chunk-UNXP3IN4.js +0 -1
  97. package/chunk-V756QT7J.js +0 -1
  98. package/chunk-WRPHCCP7.js +0 -6
  99. package/chunk-X3TVMZLM.js +0 -1
  100. package/chunk-XKDTKT43.js +0 -1
  101. package/chunk-XL7YUTMF.js +0 -1
  102. package/chunk-YDLHVAEO.js +0 -1
package/chunk-WRPHCCP7.js DELETED
@@ -1,6 +0,0 @@
1
- import{a as Ut,b as Bt}from"./chunk-44DHERTN.js";import{a as pt}from"./chunk-54VPI5KJ.js";import{a as Be}from"./chunk-WFAZP46A.js";import{a as ct,b as Dt,c as _t}from"./chunk-V756QT7J.js";import{a as bt,b as ht,c as Gt}from"./chunk-EQWH3TBL.js";import{a as Se}from"./chunk-TQHNKGRL.js";import{a as Me}from"./chunk-F2GEUOGZ.js";import{a as q}from"./chunk-BIZAKOYU.js";import{b as $e,c as le,d as xe,e as ce,f as Re,g as rt,h as we,i as Ie,j as Le,m as st,n as ve,o as lt,p as vt,q as be,r as ge,s as Ge,t as Ue}from"./chunk-ELMONRIG.js";import{b as Fe,d as oe}from"./chunk-C6XTRC7P.js";import{A as ke,C as ot,a as ae,b as nt,d as It,e as ye,g as Oe,l as re,o as Lt,p as it,t as se}from"./chunk-SL6SRYFT.js";import{h as at}from"./chunk-S5EF63OY.js";import{ia as wt}from"./chunk-7L2WUS2V.js";import{$a as he,$b as Rt,Ab as Z,Bb as J,Bc as Ye,Cb as ee,Db as s,Eb as r,F as ze,Fb as u,Gb as V,Hb as K,Ib as Xe,Jb as I,Oc as $,Pb as E,Pc as tt,Qb as D,Rb as O,Sb as Je,T as De,Tb as et,Ua as l,Ub as Ce,Vb as h,Wb as c,Z as P,ea as F,f as Ze,fa as g,fc as Ae,gb as ie,gc as Pe,hc as te,ic as d,jc as Ne,ka as $t,kc as W,lb as m,lc as Et,nc as b,oc as G,pc as U,qc as We,ra as St,rc as Te,sa as ft,sc as R,tb as xt,ub as p,uc as He,va as f,vc as je,wb as me,xc as qe,zb as T}from"./chunk-L72ALLHJ.js";import{a as H,b as de,c as Mt}from"./chunk-7CGTOI24.js";var ut=class o{#n=P(at);#t=P(ye);#e=P(Me);testDestination(t,e,n){return this.#e.hasV2TestOperations()?this.testDestinationv2(t,e,n):this.testDestinationv1(t,e,n)}testDestinationv2(t,e,n){return new Ze(i=>{this.#n.postApiV2DestinationTest({requestBody:{DestinationUrl:t,AutoCreate:!1,Options:null}}).subscribe({next:a=>{if(a.Success){i.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:e,anyFilesFound:!a.Data?.FolderIsEmpty,containsBackup:a.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:a.Data?.FolderContainsEncryptedBackupFiles??void 0}),i.complete();return}this.handleGenericError(i,t,e,a.Error??"Unknown error")},error:a=>{let _=a?.error?.body;if(_?.Data?.FolderExists===!1||_?.StatusCode==="missing-folder"){n?this.handleMissingFolder(i,t,e):this.handleGenericError(i,t,e,$localize`The remote destination folder does not exist.`);return}if(_?.Data?.HostCertificate){this.handleMissingCertificate(i,t,e,_.Data?.HostCertificate);return}if(_?.Data?.ReportedHostKey){this.handleIncorrectKey(i,t,e,_.Data.ReportedHostKey,_.Data.AcceptedHostKey??null);return}this.handleGenericError(i,t,e,a?.message??"Unknown error")}})})}testDestinationv1(t,e,n){return new Ze(i=>{this.#n.postApiV1RemoteoperationTest({requestBody:{path:t}}).subscribe({next:a=>{i.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:e}),i.complete()},error:a=>{this.handleDestinationErrorv1(a.message,t,e,n).subscribe(_=>{i.next(_)})}})})}handleMissingFolder(t,e,n){this.#t.open(q,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`,confirmText:$localize`Create folder`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.#e.hasV2TestOperations()?this.#n.postApiV2DestinationTest({requestBody:{DestinationUrl:e,AutoCreate:!0,Options:null}}).subscribe({next:a=>{a.Success?this.handleFolderCreated(t,e,n):this.handleFolderCreateFailure(t,e,n,a.Error??$localize`Unknown error`)},error:a=>{this.handleFolderCreateFailure(t,e,n,a.message??$localize`Unknown error`)}}):this.#n.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe({next:()=>{this.handleFolderCreated(t,e,n)},error:a=>{this.handleFolderCreateFailure(t,e,n,a.message??$localize`Unknown error`)}}))}})}handleFolderCreateFailure(t,e,n,i){this.#t.open(q,{data:{title:$localize`Error creating folder`,message:$localize`The remote destination folder could not be created. ${i}`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:n}),t.complete()}})}handleFolderCreated(t,e,n){this.#t.open(q,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"test-again",targetUrl:e,testAgain:!0,destinationIndex:n}),t.complete()}})}reportNoAction(t,e,n){t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:n}),t.complete()}handleMissingCertificate(t,e,n,i){this.#t.open(q,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
2
- If this is a self-signed certificate, you can choose to trust this certificate.
3
- The server reported the certificate hash: ${i}`,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:a=>{if(!a){this.reportNoAction(t,e,n);return}t.next({action:"trust-cert",targetUrl:e,testAgain:!0,certData:i,destinationIndex:n}),t.complete()}})}handleIncorrectKey(t,e,n,i,a){a?this.#t.open(q,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
4
- otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
5
- Do you want to REPLACE your CURRENT host key ${a}
6
- with the REPORTED host key: ${i}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:_=>{if(!_){this.reportNoAction(t,e,n);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:n}),t.complete()}}):this.#t.open(q,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${i}`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:_=>{if(!_){this.reportNoAction(t,e,n);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:n}),t.complete()}})}handleGenericError(t,e,n,i){this.#t.open(q,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:i,cancelText:$localize`OK`},closed:a=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:n}),t.complete()}})}handleDestinationErrorv1(t,e,n,i){return new Ze(a=>{if(t==="missing-folder"){i?this.handleMissingFolder(a,e,n):this.handleGenericError(a,e,n,$localize`The remote destination folder does not exist.`);return}if(t.startsWith("incorrect-cert:")){let _=t.split("incorrect-cert:")[1];this.handleMissingCertificate(a,e,n,_);return}if(t.startsWith("incorrect-host-key:")){let _=t.split('incorrect-host-key:"')[1].split('",')[0],A=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(a,e,n,_,A);return}this.handleGenericError(a,e,n,t)})}static \u0275fac=function(e){return new(e||o)};static \u0275prov=De({token:o,factory:o.\u0275fac,providedIn:"root"})};var dt=class o{fromString(t){if(!t)return null;let e=t.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(t,e){return`${t}${e}`}static \u0275fac=function(e){return new(e||o)};static \u0275prov=De({token:o,factory:o.\u0275fac,providedIn:"root"})};var jt=["formRef"];function qt(o,t){o&1&&(s(0,"spk-alert",17),E(1,5),u(2,"spk-icon",26),D(),r())}function Yt(o,t){if(o&1&&d(0),o&2){let e=t.$implicit;W(" ",e.DisplayName," ")}}function Qt(o,t){if(o&1&&u(0,"spk-progress-bar",40),o&2){let e=c(3);me("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),p("value",e.calculatePasswordStrength()*(100/5))}}function Zt(o,t){o&1&&(s(0,"span",35),O(1,10),r())}function Jt(o,t){o&1&&(E(0,8,1),u(1,"spk-icon"),D())}function en(o,t){o&1&&(E(0,8,2),u(1,"spk-icon"),D())}function tn(o,t){o&1&&(E(0,11,1),u(1,"spk-icon",42),D())}function nn(o,t){o&1&&(E(0,11,2),u(1,"spk-icon"),D())}function on(o,t){if(o&1){let e=I();s(0,"button",41),h("click",function(){F(e);let i=c(3);return g(i.copyPassword())}),E(1,11),m(2,tn,2,0)(3,nn,2,0),D(),r()}if(o&2){let e=c(3);l(2),T(e.copiedPassword()?2:3)}}function an(o,t){o&1&&(s(0,"spk-alert",39),O(1,12),r())}function rn(o,t){if(o&1){let e=I();s(0,"div",30)(1,"spk-form-field")(2,"label",31),E(3,7),u(4,"sup"),D(),r(),u(5,"input",32),r(),m(6,Qt,1,9,"spk-progress-bar",33),s(7,"spk-form-field"),u(8,"input",34),m(9,Zt,2,0,"span",35),r(),s(10,"div",36)(11,"button",37),h("click",function(){F(e);let i=c(2);return g(i.showPassword.set(!i.showPassword()))}),E(12,8),m(13,Jt,2,0)(14,en,2,0),D(),r(),s(15,"button",37),h("click",function(){F(e);let i=c(2);return g(i.generatePassword())}),E(16,9),u(17,"spk-icon"),D(),r(),m(18,on,4,1,"button",38),r(),m(19,an,2,0,"spk-alert",39),r()}if(o&2){let e=c(2);l(5),p("type",e.showPassword()?"text":"password"),l(),T(e.generalForm.value.password?6:-1),l(2),p("type",e.showPassword()?"text":"password"),l(),T(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),l(4),T(e.showPassword()?13:14),l(5),T(e.showCopyPassword()?18:-1),l(),T(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function sn(o,t){if(o&1&&(s(0,"spk-select",27)(1,"label",28),O(2,6),r(),u(3,"input",29),m(4,Yt,1,1,"ng-template"),r(),m(5,rn,20,7,"div",30)),o&2){let e=c();p("options",e.encryptionOptions())("isClearable",!1),l(5),T(e.encryptionFieldSignal()!==""?5:-1)}}function ln(o,t){if(o&1&&(s(0,"button",24),E(1,13),u(2,"spk-icon"),D(),r()),o&2){let e=c();p("disabled",e.nameAndDescriptionValid()===!1)}}function cn(o,t){if(o&1&&(s(0,"button",25),E(1,14),u(2,"spk-icon"),D(),r()),o&2){let e=c();p("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var Ve=new ge,Vt=(o={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>Ve.group({name:Ve.control(o.name,[xe.required]),description:Ve.control(o.description),encryption:Ve.control(o.encryption,[Gt()]),password:Ve.control(o.password,[ht(t=>t?.value.encryption!=="",[xe.required])]),repeatPassword:Ve.control(o.repeatPassword,[ht(t=>t?.value.encryption!=="",[xe.required])])}),Pt={Key:"",DisplayName:"None"},At=class o{#n=P(oe);#t=P(Fe);#e=P(bt);#i=P(_e);#o=P(Me);formRef=he.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=f(!1);copiedPassword=f(!1);showCopyPassword=f(!1);encryptionEffect=tt(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=$(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=$(()=>{let e=this.generalFormSignal()?.password??"";return this.#e.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit(!0)}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#a(t??""),this.copiedPassword.set(!0)}async#a(t){try{await navigator.clipboard.writeText(t)}catch{try{let n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}displayFn(){let t=this.#o.systemInfo()?.EncryptionModules??[];return e=>{let n=[Pt,...t].find(i=>i.Key===e);return n?`${n.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let t=this.#e.generate(16);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#n.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=ie({type:o,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&Ae(n.formRef,jt,5),e&2&&Pe()},decls:21,vars:4,consts:()=>{let t;t=$localize`Your backup name`;let e;e=$localize`Your backup description`;let n;n=$localize`Remember to copy the password`;let i;i=$localize`General backup settings`;let a;a=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let _;_=$localize`Backup description`;let A;A=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let k;k=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Encrypted backup `;let w;w=$localize`Encryption`;let B;B=$localize`Encryption`;let N;N=$localize`Password`;let x;x=$localize`Repeat password`;let v;v=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let j;j=$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:`,j=Ce(j);let Y;Y=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let S;S=$localize`Passwords do not match`;let C;C=$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:`,C=Ce(C);let L;L=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let z;z=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let X;return X=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],i,a,_,A,k,B,v,j,Y,S,C,L,z,X,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],[1,"primary"],["for","backupName"],["type","text","tabindex","1","placeholder",t,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["spk-button","","type","submit","spkTooltip",n,1,"raised","primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",w,"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",x,"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(e,n){if(e&1){let i=I();s(0,"form",15,0),h("submit",function(){return F(i),g(n.next())}),s(2,"h3",16),O(3,1),r(),m(4,qt,3,0,"spk-alert",17),s(5,"spk-form-field")(6,"label",18),E(7,2),u(8,"sup"),D(),r(),u(9,"input",19),r(),s(10,"spk-form-field")(11,"label",20),O(12,3),r(),u(13,"textarea",21),r(),m(14,sn,6,3),s(15,"div",22)(16,"button",23),h("click",function(){return F(i),g(n.exit())}),E(17,4),u(18,"spk-icon"),D(),r(),m(19,ln,3,1,"button",24)(20,cn,3,1,"button",25),r()()}if(e&2){let i;p("formGroup",n.generalForm),l(4),T(!n.isNew()&&((i=n.generalFormSignal())==null?null:i.encryption)!==""?4:-1),l(10),T(n.isNew()?14:-1),l(5),T(n.encryptionFieldSignal()===""||!n.isNew()?19:20)}},dependencies:[Ue,Ie,le,ce,Re,ve,be,re,se,Oe,ae,it,nt,ot],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})};function _n(o,t){if(o&1){let e=I();s(0,"div",24)(1,"spk-form-field")(2,"label",25),O(3,7),r(),s(4,"input",26,0),U("ngModelChange",function(i){F(e);let a=c();return G(a.scheduleFields.nextTime().time,i)||(a.scheduleFields.nextTime().time=i),g(i)}),h("focus",function(){F(e);let i=te(5);return g(i.showPicker())}),r(),s(6,"spk-icon",27),d(7,"clock"),r()(),s(8,"spk-form-field"),u(9,"label",28),s(10,"input",29,1),U("ngModelChange",function(i){F(e);let a=c();return G(a.scheduleFields.nextTime().date,i)||(a.scheduleFields.nextTime().date=i),g(i)}),h("focus",function(){F(e);let i=te(11);return g(i.showPicker())}),r(),s(12,"spk-icon",27),d(13,"calendar"),r()()(),s(14,"div",24)(15,"spk-form-field")(16,"label",30),O(17,8),r(),s(18,"input",31),U("ngModelChange",function(i){F(e);let a=c();return G(a.scheduleFields.runAgain().repeatValue,i)||(a.scheduleFields.runAgain().repeatValue=i),g(i)}),r()(),s(19,"spk-select",32)(20,"input",33),U("ngModelChange",function(i){F(e);let a=c();return G(a.scheduleFields.runAgain().repeatUnit,i)||(a.scheduleFields.runAgain().repeatUnit=i),g(i)}),r()()(),s(21,"app-toggle-card",34),V(22,35),O(23,9),K(),s(24,"div",36)(25,"spk-toggle",19),E(26,10),s(27,"input",20),U("ngModelChange",function(i){F(e);let a=c();return G(a.scheduleFields.runAgain().allowedDays.mon,i)||(a.scheduleFields.runAgain().allowedDays.mon=i),g(i)}),r(),D(),r(),s(28,"spk-toggle",19),E(29,11),s(30,"input",20),U("ngModelChange",function(i){F(e);let a=c();return G(a.scheduleFields.runAgain().allowedDays.tue,i)||(a.scheduleFields.runAgain().allowedDays.tue=i),g(i)}),r(),D(),r(),s(31,"spk-toggle",19),E(32,12),s(33,"input",20),U("ngModelChange",function(i){F(e);let a=c();return G(a.scheduleFields.runAgain().allowedDays.wed,i)||(a.scheduleFields.runAgain().allowedDays.wed=i),g(i)}),r(),D(),r(),s(34,"spk-toggle",19),E(35,13),s(36,"input",20),U("ngModelChange",function(i){F(e);let a=c();return G(a.scheduleFields.runAgain().allowedDays.thu,i)||(a.scheduleFields.runAgain().allowedDays.thu=i),g(i)}),r(),D(),r(),s(37,"spk-toggle",19),E(38,14),s(39,"input",20),U("ngModelChange",function(i){F(e);let a=c();return G(a.scheduleFields.runAgain().allowedDays.fri,i)||(a.scheduleFields.runAgain().allowedDays.fri=i),g(i)}),r(),D(),r(),s(40,"spk-toggle",19),E(41,15),s(42,"input",20),U("ngModelChange",function(i){F(e);let a=c();return G(a.scheduleFields.runAgain().allowedDays.sat,i)||(a.scheduleFields.runAgain().allowedDays.sat=i),g(i)}),r(),D(),r(),s(43,"spk-toggle",19),E(44,16),s(45,"input",20),U("ngModelChange",function(i){F(e);let a=c();return G(a.scheduleFields.runAgain().allowedDays.sun,i)||(a.scheduleFields.runAgain().allowedDays.sun=i),g(i)}),r(),D(),r()()()}if(o&2){let e=c();l(4),b("ngModel",e.scheduleFields.nextTime().time),l(6),b("ngModel",e.scheduleFields.nextTime().date),l(8),b("ngModel",e.scheduleFields.runAgain().repeatValue),l(),p("options",e.unitOptions)("isClearable",!1),l(),b("ngModel",e.scheduleFields.runAgain().repeatUnit),l(),p("disallowToggle",!0),l(6),b("ngModel",e.scheduleFields.runAgain().allowedDays.mon),l(3),b("ngModel",e.scheduleFields.runAgain().allowedDays.tue),l(3),b("ngModel",e.scheduleFields.runAgain().allowedDays.wed),l(3),b("ngModel",e.scheduleFields.runAgain().allowedDays.thu),l(3),b("ngModel",e.scheduleFields.runAgain().allowedDays.fri),l(3),b("ngModel",e.scheduleFields.runAgain().allowedDays.sat),l(3),b("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var pn=[{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`}],Ee={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}}},Nt=class o{#n=P(_e);#t=P(oe);#e=P(Fe);unitOptions=pn;scheduleFields=this.#n.scheduleFields;goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#e.parent})}next(){this.#t.navigate(["options"],{relativeTo:this.#e.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=ie({type:o,selectors:[["app-schedule"]],decls:16,vars:2,consts:()=>{let t;t=$localize`Schedule`;let e;e=$localize` Automatically run backups ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let n;n=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let a;a=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let _;_=$localize`Next time`;let A;A=$localize`Run again every`;let k;k=$localize`Allowed days`;let w;w=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let B;B=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let N;N=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let x;x=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let v;v=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let j;j=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let Y;return Y=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],t,e,n,i,a,_,A,k,w,B,N,x,v,j,Y,[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","",1,"raised","primary",3,"click"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","focus","ngModel"],["suffix",""],["for","date"],["type","date","id","date",3,"ngModelChange","focus","ngModel"],["for","repeatValue"],["type","number","id","repeatValue",3,"ngModelChange","ngModel"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit",3,"ngModelChange","ngModel"],[3,"disallowToggle"],["title",""],[1,"days-wrap"]]},template:function(e,n){e&1&&(s(0,"h3",17),O(1,2),r(),s(2,"div",18)(3,"spk-toggle",19),E(4,3),s(5,"input",20),U("ngModelChange",function(a){return G(n.scheduleFields.autoRun,a)||(n.scheduleFields.autoRun=a),a}),r(),D(),r(),s(6,"p"),O(7,4),r()(),m(8,_n,46,14),s(9,"div",21)(10,"button",22),h("click",function(){return n.goBack()}),E(11,5),u(12,"spk-icon"),D(),r(),s(13,"button",23),h("click",function(){return n.next()}),E(14,6),u(15,"spk-icon"),D(),r()()),e&2&&(l(5),b("ngModel",n.scheduleFields.autoRun),l(3),T(n.scheduleFields.autoRun()?8:-1))},dependencies:[Ge,le,Le,$e,ce,we,re,ke,ae,Oe,se,Be],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem 2.5rem 1.5rem;display:flex;flex-direction:column;gap: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 un(o,t){if(o&1&&(V(0,4),d(1),K()),o&2){let e,n=c();l(),Ne((e=n.currentExpressionOption())==null?null:e.startsWith)}}function dn(o,t){if(o&1&&(V(0,5),d(1),K()),o&2){let e,n=c();l(),Ne((e=n.currentExpressionOption())==null?null:e.endsWith)}}var mn=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileName"},{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"}],gt=class o{path=ft.required();osType=ft();pathChange=St();remove=St();internalPath=f("");pathType=f("-Expression");currentExpressionOption=$(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});expressionOptions=$(()=>{let e=this.osType()==="Windows"?"\\":"/";return mn.map(n=>n.value==="-Folder"||n.value==="+Folder"?de(H({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?de(H({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?de(H({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?de(H({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?de(H({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?de(H({},n),{startsWith:"*.",endsWith:""}):de(H({},n),{startsWith:"",endsWith:""}))});pathEffect=tt(()=>{let t=this.path(),e=t.slice(1),n=t.startsWith("-")?"-":"+",i=this.osType()==="Windows",a=i?"\\":"/";e.startsWith("%")&&e.endsWith(a)||i&&e.slice(2).startsWith(a)&&e.endsWith(a)||e.startsWith(a)&&e.endsWith(a)?(this.pathType.set(`${n}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${a}`)?(this.pathType.set(`${n}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${a}]*]`)?(this.pathType.set(`${n}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${n}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${n}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${n}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${n}Expression`),this.internalPath.set(e))});updateFilter(){let t=this.internalPath(),e=this.currentExpressionOption();t!==""&&this.pathChange.emit(`${e?.value.slice(0,1)}${e?.startsWith??""}${t}${e?.endsWith??""}`)}removeFilter(){this.remove.emit()}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=ie({type:o,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:9,vars:6,consts:()=>{let t;return t=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"expression-input"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""],[1,"filter-removal",3,"click"],[1,"spk-primary"]]},template:function(e,n){if(e&1&&(s(0,"spk-select",0)(1,"input",1),U("ngModelChange",function(a){return G(n.pathType,a)||(n.pathType=a),a}),h("ngModelChange",function(){return n.updateFilter()}),r()(),s(2,"spk-form-field",2)(3,"input",3),U("ngModelChange",function(a){return G(n.internalPath,a)||(n.internalPath=a),a}),h("ngModelChange",function(){return n.updateFilter()}),r(),m(4,un,2,1,"ng-container",4)(5,dn,2,1,"ng-container",5),r(),s(6,"div",6),h("click",function(){return n.removeFilter()}),s(7,"spk-icon",7),d(8,"x-circle"),r()()),e&2){let i,a;p("options",n.expressionOptions())("isClearable",!1),l(),b("ngModel",n.pathType),l(2),b("ngModel",n.internalPath),l(),T(!((i=n.currentExpressionOption())==null||i.startsWith==null)&&i.startsWith.length?4:-1),l(),T(!((a=n.currentExpressionOption())==null||a.endsWith==null)&&a.endsWith.length?5:-1)}},dependencies:[Ge,le,ce,we,se,re,ae],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}.expression-input[_ngcontent-%COMP%]{--ff-suffix-bg: var(--base-2)}.filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var Fn=["formRef"],Kt=()=>({standalone:!0});function gn(o,t){if(o&1){let e=I();s(0,"spk-form-field",42)(1,"input",43),U("ngModelChange",function(i){F(e);let a=c(2);return G(a.editingPath,i)||(a.editingPath=i),g(i)}),r()(),s(2,"button",44),h("click",function(){F(e);let i=c(2);return g(i.updatePath())}),s(3,"spk-icon"),d(4,"floppy-disk"),r()(),s(5,"button",44),h("click",function(){F(e);let i=c(2);return g(i.cancelEditPath())}),s(6,"spk-icon"),d(7,"x-bold"),r()()}if(o&2){let e=c(2);l(),b("ngModel",e.editingPath),p("ngModelOptions",He(2,Kt))}}function Cn(o,t){if(o&1){let e=I();s(0,"spk-form-field",42),u(1,"input",45),r(),s(2,"button",44),h("click",function(){F(e);let i=c().$implicit,a=c();return g(a.editPath(i))}),s(3,"spk-icon"),d(4,"pen"),r()(),s(5,"button",44),h("click",function(){F(e);let i=c().$implicit,a=c();return g(a.removePath(i))}),s(6,"spk-icon"),d(7,"trash-simple"),r()()}if(o&2){let e=c().$implicit;xt("readonly",!0),l(),p("ngModel",e)("ngModelOptions",He(3,Kt))}}function Tn(o,t){if(o&1&&(s(0,"div",30),m(1,gn,8,3)(2,Cn,8,4),r()),o&2){let e=t.$implicit,n=c();l(),T(n.oldPath()===e?1:2)}}function Sn(o,t){if(o&1){let e=I();s(0,"app-new-filter",47),h("pathChange",function(i){let a=F(e).$index,_=c(2);return g(_.patchPathAt(i,a))})("remove",function(){let i=F(e).$index,a=c(2);return g(a.removePathAt(i))}),r()}if(o&2){let e,n=t.$implicit,i=c(2);p("path",n)("osType",(e=i.osType())!==null&&e!==void 0?e:"")}}function fn(o,t){if(o&1&&J(0,Sn,1,2,"app-new-filter",46,Z),o&2){let e=c();ee(e.pathArray())}}function En(o,t){if(o&1&&(s(0,"div",41)(1,"spk-form-field"),u(2,"input",48),r(),s(3,"spk-select",49),u(4,"input",50),r()()),o&2){let e=c();l(3),p("options",e.sizeOptions())("isClearable",!1)}}var pe=new ge,Dn=["Bytes","KB","MB","GB","TB","PB"],zt=(o={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>pe.group({path:pe.control(o.path),excludes:pe.group({hidden:pe.control(o.excludes.hidden),system:pe.control(o.excludes.system),temporary:pe.control(o.excludes.temporary),filesLargerThan:pe.group({size:pe.control(null),unit:pe.control(null)})})}),yt=class o{#n=P(_e);#t=P(oe);#e=P(Fe);formRef=he.required("formRef");sourceDataForm=this.#n.sourceDataForm;sourceDataFormSignal=this.#n.sourceDataFormSignal;newPathCtrl=new rt("");filesLargerThan=$(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=f(Dn);osType=this.#n.osType;pathSignal=Se(this.sourceDataForm.controls.path.valueChanges);pathArray=$(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=$(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=f(null);editingPath=f(null);addingNewPath=f(!1);editPath(t){this.oldPath.set(t),this.editingPath.set(t)}updatePath(){let t=this.oldPath(),e=this.editingPath();if(!t||!e||e===t){this.oldPath.set(null),this.editingPath.set(null);return}let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(n?.replace(t,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(t){let e=this.sourceDataForm.controls.path.value??"",n=e.indexOf(t);if(n===-1)return;let i=n===0?t:"\0"+t,a=e.replace(i,"");this.sourceDataForm.controls.path.setValue(a)}addFilter(t="-*"){let e=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${e}\0${t}`)}patchPathAt(t,e){let i=this.sourceDataForm.controls.path.value.split("\0").filter(_=>!_.startsWith("-")&&!_.startsWith("+")).join("\0"),a=this.pathArray().map((_,A)=>A===e?`${t}`:`${_}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${a}`)}removePathAt(t){let n=this.sourceDataForm.controls.path.value.split("\0").filter(a=>!a.startsWith("-")&&!a.startsWith("+")).join("\0"),i=this.pathArray().filter((a,_)=>_!==t).join("\0");this.sourceDataForm.controls.path.setValue(`${n}\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 t=this.sourceDataForm.controls.path.value,e=this.newPathCtrl.value;this.sourceDataForm.controls.path.setValue(`${t}\0${e}`),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#e.parent})}next(){this.#t.navigate(["schedule"],{relativeTo:this.#e.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=ie({type:o,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&Ae(n.formRef,Fn,5),e&2&&Pe()},decls:56,vars:12,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Add a direct path`;let n;n=$localize`Hidden files`;let i;i=$localize`System files`;let a;a=$localize`Temporary files`;let _;_=$localize`Source Data`;let A;A=$localize`Folder path`;let k;k=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let w;w=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let B;B=$localize`Paths`;let N;N=$localize`Add a path directly from your machine.`;let x;x=$localize`Filters`;let v;v=$localize`Customize your filters.`;let j;j=$localize`Add filter`;let Y;Y=$localize`Exclude`;let S;S=$localize`Choose if there’s any files you want to exclude.`;let C;C=$localize` Hidden files ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let L;L=$localize` System files ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let z;z=$localize` Temporary files ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let X;X=$localize` Files larger than `;let y;y=$localize`Edit path`;let ne;return ne=$localize`Select an option...`,[["formRef",""],_,A,k,w,B,N,x,v,j,Y,S,C,L,z,X,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,"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,"paths"],[1,"path"],[1,"row-inputs"],["type","text","placeholder",e,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",n,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",a,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[1,"small"],["type","text","placeholder",y,3,"ngModelChange","ngModel","ngModelOptions"],["spk-button","","type","button",1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],["type","number","formControlName","size"],[3,"options","isClearable"],["type","text","formControlName","unit","placeholder",ne]]},template:function(e,n){if(e&1){let i=I();s(0,"form",16,0),h("submit",function(){return F(i),g(n.next())}),s(2,"div",17)(3,"h3",18),O(4,1),r(),s(5,"app-file-tree",19)(6,"label",20),O(7,2),r(),u(8,"input",21),r(),s(9,"div",22)(10,"button",23),h("click",function(){return F(i),g(n.goBack())}),E(11,3),u(12,"spk-icon"),D(),r(),s(13,"button",24),E(14,4),u(15,"spk-icon"),D(),r()()(),s(16,"div",25)(17,"app-toggle-card",26),V(18,27),O(19,5),K(),s(20,"p",28),O(21,6),r(),s(22,"div",29),J(23,Tn,3,1,"div",30,Z),s(25,"div",31)(26,"spk-form-field"),u(27,"input",32),r(),s(28,"button",33),h("click",function(){return F(i),g(n.addNewPath())}),s(29,"spk-icon"),d(30,"plus"),r()()()()(),s(31,"app-toggle-card",26),V(32,27),O(33,7),K(),s(34,"p",28),O(35,8),r(),s(36,"button",34),h("click",function(){return F(i),g(n.addFilter())}),O(37,9),r(),m(38,fn,2,0),r(),s(39,"app-toggle-card",35),V(40,27),O(41,10),K(),s(42,"p",28),O(43,11),r(),s(44,"spk-toggle",36),E(45,12),u(46,"input",37),D(),r(),s(47,"spk-toggle",36),E(48,13),u(49,"input",38),D(),r(),s(50,"spk-toggle",36),E(51,14),u(52,"input",39),D(),r(),s(53,"spk-toggle",40),h("click",function(){return F(i),g(n.toggleFilesLargerThan())}),O(54,15),r(),m(55,En,5,2,"div",41),r()()()}if(e&2){let i;p("formGroup",n.sourceDataForm),l(5),p("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0),l(12),p("disallowToggle",!0),l(6),ee(n.nonFilterPaths()),l(4),p("formControl",n.newPathCtrl),l(4),p("disallowToggle",!0),l(7),T((i=n.pathSignal())!=null&&i.length?38:-1),l(),p("disallowToggle",!0),l(14),me("active",n.filesLargerThan()),l(2),T(n.filesLargerThan()?55:-1)}},dependencies:[Ge,Ie,le,Le,$e,ce,Re,we,Ue,st,ve,be,lt,re,ae,Oe,ke,se,gt,pt,Be],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-4)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}spk-divider[_ngcontent-%COMP%]{margin:.75rem 0}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.25rem}.paths[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.path[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr min-content min-content;gap:.25rem}"],changeDetection:0})};var Xt="1W:1D,4W:1W,12M:1M",ue=new ge,_e=class o{#n=P(oe);#t=P(Me);#e=P(ye);#i=P(at);#o=P(dt);generalForm=Vt();sourceDataForm=zt();scheduleFields={autoRun:f(Ee.autoRun),nextTime:f(Ee.nextTime),runAgain:f(Ee.runAgain)};destinationForm=Wt();settings=f([]);optionsFields={remoteVolumeSize:f("50MB"),backupRetention:f("all"),backupRetentionTime:f(""),backupRetentionVersions:f(0),backupRetentionCustom:f("")};isDraft=f(!1);backupId=f(null);backupName=$(()=>this.generalFormSignal()?.name??"");isSubmitting=f(!1);finishedLoading=f(!1);backupDefaults=f(null);applicationOptions=f(null);isNew=$(()=>this.backupId()==="new");osType=$(()=>this.#t.systemInfo()?.OSType);selectedOptions=f([]);selectedAdvancedFormPair=f([]);destinationFormPair=f({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=$(()=>{let t=this.destinationFormPair()?.advanced??[],e=this.selectedAdvancedFormPair()??[];return t.filter(n=>e.findIndex(i=>i.name===n.name)===-1)});selectedHttpOptions=f([]);notSelectedHttpOptions=$(()=>{let t=this.httpOptions(),e=this.selectedHttpOptions()??[];return t.filter(n=>e.findIndex(i=>i.name===n.name)===-1)});sourceDataFormSignal=Se(this.sourceDataForm.valueChanges);destinationFormSignal=Se(this.destinationForm.valueChanges);generalFormSignal=Se(this.generalForm.valueChanges);encryptionFieldSignal=Se(this.generalForm.controls.encryption.valueChanges);destinationOptions=$(()=>this.#t.backendModules()??[]);httpOptions=$(()=>this.#t.systemInfo()?.GenericModules?.find(t=>t.Key==="http-options")?.Options?.map(this.#a)??[]);advancedOptions=$(()=>this.#t.systemInfo()?.Options?.map(this.#a)??[]);#a(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=$(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[Pt,...t]});nonSelectedOptions=$(()=>this.advancedOptions().sort((t,e)=>t?.name&&e?.name?t?.name.localeCompare(e?.name):0).filter(t=>this.selectedOptions()?.findIndex(e=>e.name===t.name)===-1));addOrUpdateAdvancedFormPairByName(t,e,n){let i=this.selectedAdvancedFormPair().find(a=>a.name===t);if(i)this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.controls[i.name].setValue(n);else{let a=this.notSelectedAdvancedFormPair().find(_=>_.name===t);if(!a)return;this.addAdvancedFormPair(a,e,n)}}addAdvancedFormPairByName(t,e,n){let i=this.notSelectedAdvancedFormPair().find(a=>a.name===t);i&&this.addAdvancedFormPair(i,e,n)}addHttpOptionByName(t,e,n){let i=this.notSelectedHttpOptions().find(a=>a.name===t);i&&this.addHttpOption(i,e,n)}addAdvancedFormPair(t,e,n){let i=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,a=n??t.defaultValue;this.createFormField(i,t,a),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),t])}addHttpOption(t,e,n){let i=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,a=n??t.defaultValue;this.createFormField(i,t,a),this.selectedHttpOptions.set([...this.selectedHttpOptions(),t])}removeAdvancedFormPair(t,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(t.name),this.selectedAdvancedFormPair().findIndex(i=>i.name===t.name)!==-1?this.selectedAdvancedFormPair.update(i=>(i=i.filter(a=>a.name!==t.name),i)):this.selectedHttpOptions.update(i=>(i=i.filter(a=>a.name!==t.name),i))}removeHttpOption(t,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(t.name),this.selectedHttpOptions.update(n=>(n=n.filter(i=>i.name!==t.name),n))}submit(){this.isSubmitting.set(!0);let t=this.#l(),e=this.backupId();e==="new"||!e||this.isDraft()?this.#i.postApiV1Backups({requestBody:t}).pipe(ze(()=>this.isSubmitting.set(!1))).subscribe({next:n=>{this.exit(!1)},error:n=>{}}):this.#i.putApiV1BackupById({id:e,requestBody:t}).pipe(ze(()=>this.isSubmitting.set(!1))).subscribe({next:n=>{this.exit(!1)},error:n=>{}})}exit(t){if(!t){this.#_(),this.#n.navigate(["/"]);return}this.#e.open(q,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#_(),this.#n.navigate(["/"]))}})}updateFieldsFromTargetUrl(t){this.#s(),setTimeout(()=>{this.#r(t)})}#s(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.selectedHttpOptions.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(A=>`${A.Include?"":"-"}${A.Expression}`)??[],i=t.Settings?.find(A=>A.Name==="--exclude-files-attributes")?.Value??"",a=t.Settings?.find(A=>A.Name==="--skip-files-larger-than")??null,_={path:[...e,...n].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:a?.Value?.toUpperCase()??null}};this.sourceDataForm.patchValue(_)}mapDestinationToForm(t){let e=t.TargetURL?Dt(t.TargetURL):null;e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}#r(t){let e=Dt(t);e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}mapGeneralToForm(t){let e=t.Settings?.find(_=>_.Name==="encryption-module"),n=t.Settings?.find(_=>_.Name==="passphrase")?.Value??"",i=e?.Value&&e.Value.length?e.Value:"",a={name:t.Name??"",description:t.Description??""};i&&i!==""&&(a.encryption=i),n&&n!==""&&(a.password=n,a.repeatPassword=n),this.generalForm.patchValue(a)}mapScheduleToForm(t){if(!t){this.scheduleFields.autoRun.set(!1);return}let e=this.#o.fromString(t.Repeat)??null,n=this.#p(t.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>H(H({},i),n)),this.scheduleFields.runAgain.set({repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:t.AllowedDays?.includes("mon")??!1,tue:t.AllowedDays?.includes("tue")??!1,wed:t.AllowedDays?.includes("wed")??!1,thu:t.AllowedDays?.includes("thu")??!1,fri:t.AllowedDays?.includes("fri")??!1,sat:t.AllowedDays?.includes("sat")??!1,sun:t.AllowedDays?.includes("sun")??!1}})}mapOptionsToForms(t){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],n=t.Settings?.filter(_=>!e.includes(_.Name)),i=t.Settings?.filter(_=>e.includes(_.Name));this.settings.set(n??[]),n?.forEach(_=>{if(_.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(_.Value??"")});var a="all";i?.forEach(_=>{if(_.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(_.Value??"50MB"),_.Name==="keep-time"&&(_.Value??"")!=="")return a="time",this.optionsFields.backupRetentionTime.set(_.Value??"");if(_.Name==="keep-versions"&&(_.Value??"")!=="")return a="versions",this.optionsFields.backupRetentionVersions.set(_.Value?parseInt(_.Value):null);if(_.Name==="retention-policy"&&(_.Value??"")!=="")if(_.Value===Xt)a="smart";else return a="custom",this.optionsFields.backupRetentionCustom.set(_.Value??"")}),this.optionsFields.backupRetention.set(a)}getCurrentTargetUrl(){return this.#c(this.destinationForm.controls.destinations)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#l(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,a=this.destinationForm.value.destinations?.length?this.#c(this.destinationForm.controls.destinations):[],_=null;e.runAgain?.repeatUnit&&e.runAgain?.repeatValue&&(_=this.#o.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let A=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([x,v])=>v).map(([x,v])=>x):[],k=n.path?.split("\0")??[],w=this.mapFormsToSettings(),B=Object.entries(n.excludes??{}).filter(([x,v])=>v&&x!=="filesLargerThan").map(([x])=>x),N=n.excludes?.filesLargerThan;return B.length&&w.push({Name:"--exclude-files-attributes",Value:B.join(",")}),N&&N.size!==null&&N.unit!==null&&w.push({Name:"--skip-files-larger-than",Value:`${N.size}${N.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:a[0]??null,Sources:k.filter(x=>!x.startsWith("-")),Settings:w,Filters:k.filter(x=>x.startsWith("-")).map((x,v)=>({Order:v,Include:!1,Expression:x.slice(1)}))},Schedule:e.autoRun?{Repeat:_,Time:e.nextTime?.date?new Date(`${e.nextTime.date}T${e.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:A}:null}}mapFormsToSettings(t=[]){let e=this.generalForm.value,n=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy","dblock-size"],i=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&(i=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let a=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":a.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":a.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":a.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":a.push({Name:"retention-policy",Value:Xt});break}let _=[...t,...n],A=this.settings().filter(k=>!_.includes(k.Name)).map(k=>{let w=k.Value;return typeof k.Value=="number"&&(w=k.Value.toString()),typeof k.Value=="boolean"&&(w=k.Value?"True":"False"),{Name:k.Name,Value:w}});return[...i,...a,...A]}#c(t){return t.controls.map(e=>ct(e.value))}#p(t){if(!t||t?.indexOf("T")===-1)return{time:t??"13:00"};let e=new Date(t);return{time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`,date:e.toISOString().split("T")[0]}}createFormField(t,e,n){if(e.type==="String"||e.type==="FileTree"||e.type==="FolderTree"||e.type==="Password"||e.type==="Enumeration"||e.type==="NonValidatedSelectableString"||e.type==="Path"){t.addControl(e.name,ue.control(n));return}if(e.type==="Size"){t.addControl(e.name,ue.control(n));return}if(e.type==="Integer"){t.addControl(e.name,ue.control(n?parseInt(n):0));return}if(e.type==="Boolean"){t.addControl(e.name,ue.control(n==="true"||n==="True"));return}if(e.type==="Flags"){t.addControl(e.name,ue.control(n??""));return}if(e.type==="Timespan"||e.type==="DateTime"){t.addControl(e.name,ue.control(n,[xe.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(t,e,n=!1){let i=_t.find(S=>S.customKey===t||S.key===t),a=i?.key,_=this.destinationOptions().find(S=>S.Key===a),A=this.httpOptions();if(!_||!_.Options)return;let k=i&&i.oauthField?i.oauthField:null,w=i&&i.customFields?i.customFields:{},B=i&&i.dynamicFields?i.dynamicFields:[],N=i&&i.advancedFields?i.advancedFields:[],x=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:k,custom:[],dynamic:[],advanced:[]});let v=ue.group({}),j=ue.group({}),Y=ue.group({});w&&Object.entries(w).forEach(([S,C],L)=>{let y=C,{formElement:z}=y,X=Mt(y,["formElement"]);v.addControl(S,z(e?.custom[S])),this.destinationFormPair.update(ne=>(ne.custom.push(H({order:900+L},X)),ne))});for(let S=0;S<_.Options.length;S++){let C=_.Options[S];if(C.Deprecated)continue;let L=B.find(z=>z===C.Name||C.Aliases?.includes(z.name)||z.name===C.Name);if(L){let z=C.Aliases?.indexOf(L.name)??-1,X=C.Aliases&&z>-1?C.Aliases[z]:C.Name,y=L&&typeof L!="string",ne=y?L?.defaultValue??C.DefaultValue:C.DefaultValue,M={name:X,type:C.Type,shortDescription:C.ShortDescription??void 0,longDescription:C.LongDescription??void 0,options:C.ValidValues,order:900+S},Ke=y?H(H({},M),L):M,Q=e?.dynamic[X]??ne??C.DefaultValue;this.createFormField(j,Ke,Q),this.destinationFormPair.update(kt=>(kt.dynamic.push(Ke),kt))}else{if(x.find(Q=>Q===C.Name))continue;let X=N.find(Q=>Q===C.Name||Q.name===C.Name),y=X&&typeof X!="string",ne=e?.advanced[C.Name],M=ne??C.DefaultValue,Ke={name:C.Name,type:C.Type,shortDescription:C.ShortDescription??void 0,longDescription:C.LongDescription??void 0,options:C.ValidValues,defaultValue:M,order:900+S},Qe=y?H(H({},Ke),X):Ke;n&&ne&&(this.createFormField(Y,Qe,M),this.selectedAdvancedFormPair.update(Q=>(Q.push(Qe),Q))),this.destinationFormPair.update(Q=>(Q.advanced.push(Qe),Q))}}for(let S=0;S<A.length;S++){let C=A[S],L=e?.advanced[C.name],z=L??C.defaultValue;n&&L&&(this.createFormField(Y,C,z),this.selectedHttpOptions.update(X=>(X.push(C),X)))}this.destinationFormPair.update(S=>({oauthField:S.oauthField,custom:S.custom.sort((C,L)=>C.order-L.order),dynamic:S.dynamic.sort((C,L)=>C.order-L.order),advanced:S.advanced.sort((C,L)=>C.order-L.order)})),this.destinationForm.controls.destinations.push(Ht({key:i?.customKey??t,customGroup:v,dynamicGroup:j,advancedGroup:Y}))}#_(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(Ee.autoRun),this.scheduleFields.nextTime.set(Ee.nextTime),this.scheduleFields.runAgain.set(Ee.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([])}static \u0275fac=function(e){return new(e||o)};static \u0275prov=De({token:o,factory:o.\u0275fac,providedIn:"root"})};var hn=["formRef"],An=(o,t,e,n)=>({index:o,formView:t,formGroupName:"custom",destinationType:e,oauthField:n}),Tt=o=>({$implicit:o}),Pn=(o,t,e,n)=>({index:o,formView:t,formGroupName:"dynamic",destinationType:e,oauthField:n}),Nn=(o,t,e,n)=>({index:o,formView:t,formGroupName:"advanced",destinationType:e,oauthField:n}),yn=(o,t,e,n)=>({index:o,formView:t,formGroupName:"advanced",asHttpOptions:!0,destinationType:e,oauthField:n}),On=()=>({maxWidth:"700px",width:"100%"});function kn(o,t){o&1&&(E(0,5,2),u(1,"spk-icon"),D())}function Mn(o,t){o&1&&O(0,5,3)}function $n(o,t){if(o&1){let e=I();E(0,5,1),s(1,"button",21),h("click",function(){F(e);let i=c();return g(i.testDestination())}),m(2,kn,2,0)(3,Mn,1,0),r(),D()}if(o&2){let e=c();l(),me("loader",e.testLoading())("success",e.successfulTest()),l(),T(e.successfulTest()?2:3)}}function xn(o,t){if(o&1){let e=I();s(0,"p",27),h("click",function(){F(e);let i=c();return g(i.removeDestinationFormGroup(i.destinationCount()-1))}),E(1,8),u(2,"strong")(3,"br")(4,"span",28),D(),r()}if(o&2){let e,n=c();l(4),Je((e=n.selectedDestinationType())==null?null:e.displayName),et(1)}}function Rn(o,t){if(o&1){let e=I();s(0,"div",34),h("click",function(){let i=F(e).$implicit,a=c(2);return g(a.addDestinationFormGroup(i.key))}),s(1,"h3"),d(2),r(),s(3,"p"),d(4),r()()}if(o&2){let e=t.$implicit;l(2),Ne(e.displayName),l(2),Ne(e.description)}}function wn(o,t){if(o&1){let e=I();s(0,"button",35,1),h("click",function(){let i=F(e).$implicit,a=c(2);return g(a.addDestinationFormGroup(i.key))}),d(2),r()}if(o&2){let e=t.$implicit;l(2),W(" ",e.displayName," ")}}function In(o,t){if(o&1&&(s(0,"div",29),J(1,Rn,5,2,"div",30,Z),r(),s(3,"spk-menu",31)(4,"button",32),O(5,9),r(),V(6,20),J(7,wn,3,1,"button",33,Z),K(),r()),o&2){let e=c();l(),ee(e.destinationTypeOptionsFocused()),l(2),p("searchable",!0),l(4),ee(e.destinationTypeOptionsNotFocused())}}function Ln(o,t){o&1&&Xe(0)}function vn(o,t){if(o&1&&m(0,Ln,1,0,"ng-container",40),o&2){let e,n=t.$implicit,i=t.$index;c();let a=te(29),_=c();p("ngTemplateOutlet",a)("ngTemplateOutletContext",je(7,Tt,qe(2,An,i,n,(e=_.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,_.destinationFormPair().oauthField)))}}function bn(o,t){o&1&&Xe(0)}function Gn(o,t){if(o&1&&m(0,bn,1,0,"ng-container",40),o&2){let e,n=t.$implicit,i=t.$index;c();let a=te(29),_=c();p("ngTemplateOutlet",a)("ngTemplateOutletContext",je(7,Tt,qe(2,Pn,i,n,(e=_.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,_.destinationFormPair().oauthField)))}}function Un(o,t){if(o&1){let e=I();E(0,10,1),s(1,"button",35,1),h("click",function(){let i=F(e).$implicit,a=c(2);return g(a.addAdvancedFormPair(i,0))}),r(),D()}if(o&2){let e=t.$implicit;l(),Je(e.name),et(0)}}function Bn(o,t){o&1&&Xe(0)}function Vn(o,t){if(o&1&&m(0,Bn,1,0,"ng-container",40),o&2){let e,n=t.$implicit,i=t.$index;c();let a=te(29),_=c();p("ngTemplateOutlet",a)("ngTemplateOutletContext",je(7,Tt,qe(2,Nn,i,n,(e=_.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,_.destinationFormPair().oauthField)))}}function Kn(o,t){if(o&1){let e=I();E(0,11,1),s(1,"button",35,1),h("click",function(){let i=F(e).$implicit,a=c(2);return g(a.addHttpOption(i,0))}),r(),D()}if(o&2){let e=t.$implicit;l(),Je(e.name),et(0)}}function zn(o,t){o&1&&Xe(0)}function Xn(o,t){if(o&1&&m(0,zn,1,0,"ng-container",40),o&2){let e,n=t.$implicit,i=t.$index;c();let a=te(29),_=c();p("ngTemplateOutlet",a)("ngTemplateOutletContext",je(7,Tt,qe(2,yn,i,n,(e=_.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,_.destinationFormPair().oauthField)))}}function Wn(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=c(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Hn(o,t){if(o&1&&(s(0,"app-file-tree",43)(1,"label",47),d(2),m(3,Wn,2,1,"spk-icon",48),r(),u(4,"input",49),r()),o&2){let e=c().$implicit,n=R(2),i=R(3),a=c(2);p("startingPath",a.getFormFieldValue(0,e.formGroupName,e.formView.name))("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),p("for",i),l(),W(" ",n," "),l(),T(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function jn(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=c(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function qn(o,t){if(o&1&&(s(0,"app-file-tree",44)(1,"label",47),d(2),m(3,jn,2,1,"spk-icon",48),r(),u(4,"input",49),r()),o&2){let e=c().$implicit,n=R(2),i=R(3),a=c(2);p("hideShortcuts",!0)("startingPath",a.getFormFieldValue(0,e.formGroupName,e.formView.name)),l(),p("for",i),l(),W(" ",n," "),l(),T(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function Yn(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=c(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Qn(o,t){if(o&1&&(s(0,"spk-icon",53),d(1," link "),r()),o&2){c();let e=R(7),n=R(8);me("error",e&&n==="error")("warn",e&&n==="warning"),p("spkTooltip",e)}}function Zn(o,t){o&1&&(s(0,"spk-icon",52),d(1,"envelope"),r())}function Jn(o,t){o&1&&(s(0,"spk-icon",52),d(1,"textbox"),r())}function ei(o,t){if(o&1&&(s(0,"spk-form-field")(1,"label",47),d(2),m(3,Yn,2,1,"spk-icon",48),r(),u(4,"input",50),We(5)(6)(7)(8),m(9,Qn,2,5,"spk-icon",51)(10,Zn,2,0,"spk-icon",52)(11,Jn,2,0,"spk-icon",52),r()),o&2){let e=c().$implicit,n=R(2),i=R(3),a=c(2);l(),p("for",i),l(),W(" ",n," "),l(),T(e.formView.longDescription?3:-1),l(),p("type",e.formView.type==="Email"?"email":"text")("id",i)("formControlName",e.formView.name);let _=a.getFormFieldValue(0,e.formGroupName,e.formView.name),A=a.hasDoubleLeadingSlashes(_);l(3),Te(A&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),l(),Te(e.formView.doubleSlash==null?null:e.formView.doubleSlash.type),l(),T(e.formView.type==="Path"?9:e.formView.type==="Email"?10:11)}}function ti(o,t){if(o&1){let e=I();s(0,"span",57),h("click",function(){F(e);let i=c(2).$implicit,a=c(2);return g(a.oauthStartTokenCreation(i.destinationType,i))}),d(1," AuthID "),r()}}function ni(o,t){o&1&&(s(0,"spk-icon",52),d(1,"password"),r())}function ii(o,t){if(o&1){let e=I();s(0,"spk-icon",58),h("click",function(){F(e);let i=c(2).$implicit;return g(i.formView.showPassword=!i.formView.showPassword)}),d(1," eye "),r()}}function oi(o,t){if(o&1){let e=I();s(0,"spk-icon",58),h("click",function(){F(e);let i=c(2).$implicit;return g(i.formView.showPassword=!i.formView.showPassword)}),d(1," eye-slash "),r()}}function ai(o,t){if(o&1&&(s(0,"spk-form-field")(1,"label",47),d(2),r(),u(3,"input",54),m(4,ti,2,0,"span",55)(5,ni,2,0,"spk-icon",52)(6,ii,2,0,"spk-icon",56)(7,oi,2,0,"spk-icon",56),r()),o&2){let e=c().$implicit,n=R(2),i=R(3);l(),p("for",i),l(),W(" ",n," "),l(),p("type",e.formView.showPassword?"text":"password")("id",i)("formControlName",e.formView.name),l(),T(e.oauthField===e.formView.name?4:5),l(2),T(e.formView.showPassword?6:7)}}function ri(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=c(3).$implicit;p("spkTooltip",e.formView.longDescription)}}function si(o,t){if(o&1&&d(0),o&2){let e=c().$implicit;Et(" ",e==null?null:e.key," (",e==null?null:e.value,") ")}}function li(o,t){if(o&1&&d(0),o&2){let e=c().$implicit;W(" ",e," ")}}function ci(o,t){if(o&1&&m(0,si,1,2)(1,li,1,1),o&2){let e=c(3).$implicit;T(e.formView.loadOptions?0:1)}}function _i(o,t){if(o&1&&(s(0,"spk-select",59)(1,"label",47),d(2),m(3,ri,2,1,"spk-icon",48),r(),u(4,"input",49),r(),m(5,ci,2,1,"ng-template",null,3,Ye)),o&2){let e=te(6);c();let n=R(0),i=c().$implicit,a=R(2),_=R(3);p("options",n)("isClearable",!1)("optionTemplate",e),l(),p("for",_),l(),W(" ",a," "),l(),T(i.formView.longDescription?3:-1),l(),p("id",_)("formControlName",i.formView.name)}}function pi(o,t){if(o&1&&(We(0),m(1,_i,7,8)),o&2){let e=c().$implicit,n=Te(e.formView.loadOptions?e.formView.loadOptions(c(2).injector)():e.formView.options);l(),T(n?1:-1)}}function ui(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=c(3).$implicit;p("spkTooltip",e.formView.longDescription)}}function di(o,t){if(o&1&&d(0),o&2){let e=t.$implicit;Et(" ",e.key," ",e.value?"("+e.value+")":""," ")}}function mi(o,t){if(o&1&&(s(0,"spk-select",61)(1,"label",47),d(2),m(3,ui,2,1,"spk-icon",48),r(),u(4,"input",49),r(),m(5,di,1,2,"ng-template",null,4,Ye)),o&2){let e=te(6);c();let n=R(0),i=c().$implicit,a=R(2),_=R(3);p("options",n)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),l(),p("for",_),l(),W(" ",a," "),l(),T(i.formView.longDescription?3:-1),l(),p("id",_)("formControlName",i.formView.name)}}function Fi(o,t){o&1&&u(0,"spk-progress-bar",60)}function gi(o,t){if(o&1&&(We(0),m(1,mi,7,9)(2,Fi,1,0,"spk-progress-bar",60)),o&2){let e=c().$implicit,n=Te(e.formView.loadOptions?e.formView.loadOptions(c(2).injector)():e.formView.options);l(),T(n?1:2)}}function Ci(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=c(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Ti(o,t){if(o&1&&(s(0,"app-size",45)(1,"label",47),d(2),m(3,Ci,2,1,"spk-icon",48),r()()),o&2){let e=c().$implicit,n=R(2),i=R(3);p("inputType",e.Name)("formControlName",e.formView.name)("customId",i),l(),p("for",i),l(),W(" ",n," "),l(),T(e.formView.longDescription?3:-1)}}function Si(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=c(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function fi(o,t){if(o&1&&(s(0,"spk-form-field")(1,"label",47),d(2),m(3,Si,2,1,"spk-icon",48),r(),u(4,"input",62),s(5,"spk-icon",52),d(6,"numpad"),r()()),o&2){let e=c().$implicit,n=R(2),i=R(3);l(),p("for",i),l(),W(" ",n," "),l(),T(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function Ei(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=c(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Di(o,t){if(o&1&&(s(0,"spk-toggle",46)(1,"label",47),d(2),m(3,Ei,2,1,"spk-icon",48),r(),u(4,"input",63),r()),o&2){let e=c().$implicit,n=R(2),i=R(3);l(),p("for",i),l(),W(" ",n," "),l(),T(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function hi(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=c(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Ai(o,t){if(o&1&&d(0),o&2){let e=t.$implicit;W(" ",e," ")}}function Pi(o,t){if(o&1&&(s(0,"spk-select",64)(1,"label",47),d(2),m(3,hi,2,1,"spk-icon",48),r(),u(4,"input",65),r(),m(5,Ai,1,1,"ng-template",null,4,Ye)),o&2){let e=te(6),n=c().$implicit,i=R(2);p("options",n.formView.options)("selectMultiple",!0)("optionTemplate",e),l(),Rt("for","destination-",n.formGroupName,"-",n.index,""),l(),W(" ",i," "),l(),T(n.formView.longDescription?3:-1),l(),p("formControlName",n.formView.name)}}function Ni(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=c(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function yi(o,t){if(o&1&&(s(0,"app-timespan",45)(1,"label",47),d(2),m(3,Ni,2,1,"spk-icon",48),r()()),o&2){let e=c().$implicit,n=R(2),i=R(3);p("inputType",e.formView.name)("formControlName",e.formView.name)("customId",i),l(),p("for",i),l(),W(" ",n," "),l(),T(e.formView.longDescription?3:-1)}}function Oi(o,t){if(o&1){let e=I();s(0,"button",66),h("click",function(){F(e);let i=c().$implicit,a=c(2);return g(a.removeFormView(i.formView,0))}),s(1,"spk-icon"),d(2,"x-circle"),r()()}}function ki(o,t){if(o&1&&(s(0,"div",41),V(1,42),We(2)(3),m(4,Hn,5,11,"app-file-tree",43)(5,qn,5,7,"app-file-tree",44)(6,ei,12,9,"spk-form-field")(7,ai,8,7,"spk-form-field")(8,pi,2,2)(9,gi,3,2)(10,Ti,4,6,"app-size",45)(11,fi,7,5,"spk-form-field")(12,Di,5,5,"spk-toggle",46)(13,Pi,7,9)(14,yi,4,6,"app-timespan",45),K(),m(15,Oi,3,0,"button",32),r()),o&2){let e,n=t.$implicit;me("single-field",n.formGroupName!=="advanced"),l(),p("formGroupName",n.formGroupName),l(),Te((e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name),l(),Te("destination-"+n.formGroupName+"-"+n.index+"-"+(n.asHttpOptions?"http":"other")),l(),T(n.formView.type==="FileTree"?4:n.formView.type==="FolderTree"?5:n.formView.type==="String"||n.formView.type==="Path"||n.formView.type==="Email"?6:n.formView.type==="Password"?7:n.formView.type==="Enumeration"?8:n.formView.type==="NonValidatedSelectableString"?9:n.formView.type==="Size"?10:n.formView.type==="Integer"?11:n.formView.type==="Boolean"?12:n.formView.type==="Flags"?13:n.formView.type==="Timespan"||n.formView.type==="DateTime"?14:-1),l(11),T(n.formGroupName==="advanced"?15:-1)}}function Mi(o,t){if(o&1&&(V(0,22)(1,36),J(2,vn,1,9,"ng-container",null,Z),J(4,Gn,1,9,"ng-container",null,Z),s(6,"app-toggle-card",37),V(7,38),E(8,10),s(9,"spk-menu",31)(10,"button",39),u(11,"spk-icon"),r(),V(12,20),J(13,Un,3,1,"button",33,Z),K(),r(),D(),K(),J(15,Vn,1,9,"ng-container",null,Z),r(),s(17,"app-toggle-card",37),V(18,38),E(19,11),s(20,"spk-menu",31)(21,"button",39),u(22,"spk-icon"),r(),V(23,20),J(24,Kn,3,1,"button",33,Z),K(),r(),D(),K(),J(26,Xn,1,9,"ng-container",null,Z),r(),m(28,ki,16,7,"ng-template",null,2,Ye),K()()),o&2){let e=c();l(2),ee(e.destinationFormPair().custom),l(2),ee(e.destinationFormPair().dynamic),l(2),p("disallowToggle",!0),l(3),p("searchable",!0),l(),p("disabled",e.notSelectedAdvancedFormPair().length===0),l(3),ee(e.notSelectedAdvancedFormPair()),l(2),ee(e.selectedAdvancedFormPair()),l(2),p("disallowToggle",!0),l(3),p("searchable",!0),l(),p("disabled",e.notSelectedHttpOptions().length===0),l(3),ee(e.notSelectedHttpOptions()),l(2),ee(e.selectedHttpOptions())}}function $i(o,t){if(o&1){let e=I();s(0,"spk-dialog",67),U("isOpenChange",function(i){F(e);let a=c();return G(a.targetUrlDialogOpen,i)||(a.targetUrlDialogOpen=i),g(i)}),s(1,"header",68)(2,"h2"),O(3,12),r(),s(4,"spk-alert",69),O(5,13),r()(),s(6,"div",70)(7,"spk-form-field"),u(8,"textarea",71),r()(),s(9,"footer",72)(10,"button",24),h("click",function(){F(e);let i=c();return g(i.closeTargetUrlDialog(!1))}),d(11,"Cancel"),r(),s(12,"button",73),h("click",function(){F(e);let i=c();return g(i.closeTargetUrlDialog(!0))}),E(13,14),u(14,"spk-icon"),D(),r()()()}if(o&2){let e=c();b("isOpen",e.targetUrlDialogOpen),p("options",He(3,On)),l(8),p("formControl",e.targetUrlCtrl)}}var Ct=new ge,Wt=(o={destinations:[]})=>Ct.group({destinations:Ct.array(o.destinations)}),Ht=({key:o,customGroup:t,dynamicGroup:e,advancedGroup:n})=>Ct.group({destinationType:Ct.control(o),custom:t,dynamic:e,advanced:n}),Ot=class o{#n=P(oe);#t=P(Fe);#e=P(_e);#i=P(ye);#o=P(ut);injector=P($t);formRef=he.required("formRef");destinationForm=this.#e.destinationForm;destinationFormPair=this.#e.destinationFormPair;selectedAdvancedFormPair=this.#e.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#e.notSelectedAdvancedFormPair;selectedHttpOptions=this.#e.selectedHttpOptions;notSelectedHttpOptions=this.#e.notSelectedHttpOptions;destinationOptions=this.#e.destinationOptions;destinationFormSignal=this.#e.destinationFormSignal;destinationCount=$(()=>this.destinationFormSignal()?.destinations?.length??0);successfulTest=f(!1);testLoading=f(!1);destinationTypeOptionsInFocus=f(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=f(_t.map(t=>({key:t.customKey??t.key,customKey:t.customKey??null,displayName:t.displayName,description:t.description})));destinationTypeOptionsFocused=$(()=>{let t=this.destinationTypeOptionsInFocus(),e=this.destinationTypeOptions();return t.map(n=>e.find(i=>i.key===n))});selectedDestinationType=$(()=>{let t=this.destinationFormSignal();return this.destinationTypeOptions().find(n=>t?.destinations?.[0]?.destinationType===n.key)});destinationTypeOptionsNotFocused=$(()=>{let t=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(n=>!t.includes(n.key))});getFormFieldValue(t,e,n){return((this.destinationForm.controls.destinations.controls?.[t]).controls?.[e]).controls[n].value}hasDoubleLeadingSlashes(t){return t.startsWith("//")}getFormControl(t,e,n){return((this.destinationForm.controls.destinations.controls?.[t]).controls?.[e]).controls[n]}addDestinationFormGroup(t){this.#e.addDestinationFormGroup(t)}addAdvancedFormPair(t,e){this.#e.addAdvancedFormPair(t,e)}removeFormView(t,e){this.#e.removeAdvancedFormPair(t,e)}addHttpOption(t,e){this.#e.addHttpOption(t,e)}targetUrl=$(()=>this.#e.getCurrentTargetUrl()[0]);targetUrlCtrl=new rt;targetUrlInitial=f(null);targetUrlDialogOpen=f(!1);openTargetUrlDialog(){let e=this.#e.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(e),this.targetUrlInitial.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(t=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl.value,n=this.targetUrlInitial();!t||e===n||this.#e.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(t=0){let n=this.#e.getCurrentTargetUrl()[t];n&&(this.testLoading.set(!0),this.#o.testDestination(n,t,!0).pipe(ze(()=>this.testLoading.set(!1))).subscribe({next:i=>{if(i.action==="success"){this.#e.isNew()&&(i.containsBackup===!0?this.#i.open(q,{data:{title:$localize`Folder contains backup`,message:$localize`The remote destination already contains a backup. You must use a different folder for each backup.`,confirmText:$localize`OK`,cancelText:void 0}}):i.anyFilesFound===!0&&this.#i.open(q,{data:{title:$localize`Folder is not empty`,message:$localize`The remote destination is not empty. It is recommended to use an empty folder for the backup.`,confirmText:$localize`OK`,cancelText:void 0}})),this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3);return}if(i.action==="generic-error"){this.successfulTest.set(!1);return}i.action==="trust-cert"&&this.#e.addHttpOptionByName("accept-specified-ssl-hash",i.destinationIndex,i.certData),i.action==="approve-host-key"&&this.#e.addOrUpdateAdvancedFormPairByName("ssh-fingerprint",i.destinationIndex,i.reportedHostKey),i.testAgain&&this.testDestination(i.destinationIndex)}}))}mapToTargetUrl(t){return ct(t.value)}removeDestinationFormGroup(t){this.destinationForm.controls.destinations.removeAt(t)}displayFn(t){let e=this.destinationOptions().find(n=>n.Key===t);return e?`${e.DisplayName}`:""}goBack(){this.#n.navigate(["general"],{relativeTo:this.#t.parent})}next(){this.#n.navigate(["source-data"],{relativeTo:this.#t.parent})}#a=f("https://duplicati-oauth-handler.appspot.com/").asReadonly();#s=f(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#r=f(!1);#l=f(null);keyCreation(){}oauthStartTokenCreation(t,e){let n=this.getFormControl(e.index,e.formGroupName,e.formView.name);this.#r.set(!0);let i=this.#s(),a=450,_=600,A=this.#a()+"?type="+t+"&token="+i,k=screen.width/2-a/2,w=screen.height/2-_/2,B=window.open(A,"_blank","height="+_+",width="+a+",menubar=0,status=0,titlebar=0,toolbar=0,left="+k+",top="+w);return window.addEventListener("message",N=>{let x=N.data.startsWith("authid:"),v=x?N.data.replace("authid:",""):null;console.log("event",N),x&&(n.setValue(v),this.#r.set(!1),B?.close())}),!1}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=ie({type:o,selectors:[["app-destination"]],viewQuery:function(e,n){e&1&&Ae(n.formRef,hn,5),e&2&&Pe()},decls:24,vars:6,consts:()=>{let t;t=$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:`,t=Ce(t);let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let n;n=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$localize` Current destination type ${"\uFFFD#2\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:.${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:LINE_BREAK: Want to select another? ${"\uFFFD#4\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPAN:`;let a;a=$localize`Other destinations`;let _;_=$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:`,_=Ce(_);let A;A=$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:`,A=Ce(A);let k;k=$localize`Edit target URL`;let w;w=$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",""],t,e,n,i,a,_,A,k,w,B,[3,"submit","formGroup"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"loader","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"],[3,"inputType","formControlName","customId"],[1,"primary","raised"],[3,"for"],[1,"primary",3,"spkTooltip"],["type","text",3,"id","formControlName"],[3,"type","id","formControlName"],["prefix","",3,"error","warn","spkTooltip"],["prefix",""],["prefix","",3,"spkTooltip"],["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"],["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(e,n){if(e&1){let i=I();s(0,"form",15,0),h("submit",function(){return F(i),g(n.next())}),s(2,"header")(3,"h3",16),E(4,5),s(5,"div",17),m(6,$n,4,5,"button",18),s(7,"spk-menu")(8,"button",19),u(9,"spk-icon"),r(),V(10,20),s(11,"button",21),h("click",function(){return F(i),g(n.openTargetUrlDialog())}),u(12,"spk-icon"),r(),K(),r()(),D(),r(),m(13,xn,5,1,"p"),r(),m(14,In,9,1)(15,Mi,30,6,"ng-container",22),s(16,"div",23)(17,"button",24),h("click",function(){return F(i),g(n.goBack())}),E(18,6),u(19,"spk-icon"),D(),r(),s(20,"button",25),E(21,7),u(22,"spk-icon"),D(),r()()(),m(23,$i,15,4,"spk-dialog",26)}if(e&2){let i;p("formGroup",n.destinationForm),l(6),T(n.destinationCount()>0?6:-1),l(7),T(n.destinationCount()>0?13:-1),l(),T(n.destinationCount()===0?14:-1),l(),T(!((i=n.destinationFormSignal())==null||i.destinations==null)&&i.destinations.length?15:-1),l(8),T(n.targetUrlDialogOpen()?23:-1)}},dependencies:[Ue,Ie,le,Le,$e,ce,Re,st,ve,be,lt,vt,wt,re,Lt,ae,ke,It,nt,se,ot,it,Bt,Be,pt,Ut],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}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}label[_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-4);border-radius:var(--shape-3);box-shadow:var(--shadow-1);background-color:var(--base-2);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{ut as a,Wt as b,Ht as c,Ot as d,Vt as e,Pt as f,At as g,Ee as h,Nt as i,zt as j,yt as k,_e as l};
package/chunk-X3TVMZLM.js DELETED
@@ -1 +0,0 @@
1
- import{e as a,f as b,g as c}from"./chunk-WRPHCCP7.js";import"./chunk-44DHERTN.js";import"./chunk-54VPI5KJ.js";import"./chunk-WFAZP46A.js";import"./chunk-V756QT7J.js";import"./chunk-EQWH3TBL.js";import"./chunk-TQHNKGRL.js";import"./chunk-F2GEUOGZ.js";import"./chunk-BIZAKOYU.js";import"./chunk-RHW5QVAY.js";import"./chunk-ELMONRIG.js";import"./chunk-C6XTRC7P.js";import"./chunk-MAVZY7BL.js";import"./chunk-SL6SRYFT.js";import"./chunk-S5EF63OY.js";import"./chunk-7L2WUS2V.js";import"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";export{b as NONE_OPTION,a as createGeneralForm,c as default};
package/chunk-XKDTKT43.js DELETED
@@ -1 +0,0 @@
1
- import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-X3TVMZLM.js")},{path:"destination",loadComponent:()=>import("./chunk-SKABVF5Q.js")},{path:"source-data",loadComponent:()=>import("./chunk-SQQKW2DQ.js")},{path:"schedule",loadComponent:()=>import("./chunk-TEYVVULJ.js")},{path:"options",loadComponent:()=>import("./chunk-VRWNW26T.js")}];export{o as default};
package/chunk-XL7YUTMF.js DELETED
@@ -1 +0,0 @@
1
- import"./chunk-7CGTOI24.js";var o=[{path:"",loadComponent:()=>import("./chunk-HCBCZ5NX.js"),children:[{path:"",redirectTo:"stored",pathMatch:"full"},{path:"stored",loadComponent:()=>import("./chunk-3RIVWHQR.js")},{path:"live",loadComponent:()=>import("./chunk-4RAO2JRJ.js")}]}],t=o;export{t as default};
package/chunk-YDLHVAEO.js DELETED
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-B5MQU4UL.js";import"./chunk-54VPI5KJ.js";import"./chunk-WFAZP46A.js";import"./chunk-TQHNKGRL.js";import"./chunk-F2GEUOGZ.js";import"./chunk-BIZAKOYU.js";import"./chunk-ELMONRIG.js";import"./chunk-C6XTRC7P.js";import"./chunk-MAVZY7BL.js";import"./chunk-SL6SRYFT.js";import"./chunk-S5EF63OY.js";import"./chunk-7L2WUS2V.js";import"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";export{a as createRestoreOptionsForm,b as default};