@duplicati/ngclient 0.0.111 → 0.0.114

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 (83) hide show
  1. package/{chunk-WQLN5T4T.js → chunk-37GXHTIP.js} +1 -1
  2. package/{chunk-MHO7INGX.js → chunk-3IIFLG6J.js} +1 -1
  3. package/{chunk-TJS6O6KD.js → chunk-554T66WI.js} +1 -1
  4. package/chunk-5G5PH7FG.js +1 -0
  5. package/{chunk-RQSBT3TK.js → chunk-66Q4TXVX.js} +1 -1
  6. package/{chunk-YJSWEW6C.js → chunk-6FFPXENZ.js} +1 -1
  7. package/{chunk-2ZVLF3KW.js → chunk-7LU4D3GR.js} +1 -1
  8. package/{chunk-T33TACR6.js → chunk-7WFWZORV.js} +1 -1
  9. package/{chunk-4RGZG24K.js → chunk-CD3DB23J.js} +1 -1
  10. package/chunk-CFVPLY5R.js +1 -0
  11. package/{chunk-QKA2VJWD.js → chunk-CPPV6EJP.js} +1 -1
  12. package/{chunk-65OCE2TY.js → chunk-CTGMG44P.js} +1 -1
  13. package/chunk-DDMQ6BLY.js +1 -0
  14. package/{chunk-KEAH5JAH.js → chunk-E2UB3K6K.js} +1 -1
  15. package/{chunk-PFE36372.js → chunk-EKIPEIC4.js} +1 -1
  16. package/{chunk-6OKAWH4X.js → chunk-EXJKKQZX.js} +1 -1
  17. package/{chunk-CHRKPWRG.js → chunk-F4EEOSGJ.js} +1 -1
  18. package/chunk-F7HHSM2V.js +1 -0
  19. package/chunk-FKJJQJD5.js +1 -0
  20. package/{chunk-URU2SLPX.js → chunk-GJROCOAD.js} +1 -1
  21. package/chunk-HVT5TILQ.js +1 -0
  22. package/{chunk-QP4QZQOW.js → chunk-HXP5ZXIT.js} +1 -1
  23. package/{chunk-NP4VUDPK.js → chunk-IEH3LYA4.js} +1 -1
  24. package/{chunk-JIPJYOH5.js → chunk-JES5INM4.js} +1 -1
  25. package/{chunk-BOBAN442.js → chunk-JLDOA36R.js} +1 -1
  26. package/{chunk-4AECHE4W.js → chunk-JSGFZ2GA.js} +1 -1
  27. package/{chunk-YJNKW5ES.js → chunk-KIGBGT77.js} +1 -1
  28. package/chunk-L76NC2T6.js +1 -0
  29. package/chunk-LVUQRMAC.js +1 -0
  30. package/chunk-N3L3HC4J.js +1 -0
  31. package/{chunk-XJAEXNPS.js → chunk-NDU4DSOM.js} +1 -1
  32. package/{chunk-DDM4R5FN.js → chunk-NE2V7X4C.js} +1 -1
  33. package/{chunk-Z4MV4ZSL.js → chunk-NHQOHNI2.js} +1 -1
  34. package/chunk-NMXJMVL5.js +1 -0
  35. package/{chunk-GDHVQU56.js → chunk-OTLEEXAA.js} +1 -1
  36. package/{chunk-WEQQEKIH.js → chunk-PAS4EMZF.js} +1 -1
  37. package/chunk-PFWSXI4B.js +1 -0
  38. package/{chunk-CR4OKZPA.js → chunk-PPP3I2ZR.js} +1 -1
  39. package/{chunk-2MCIQSK2.js → chunk-PQVEQNEN.js} +1 -1
  40. package/{chunk-45RYC5NZ.js → chunk-Q2HZC6ZI.js} +1 -1
  41. package/{chunk-HLHNKLWF.js → chunk-QBFBFWG2.js} +1 -1
  42. package/chunk-QDH6LNFG.js +1 -0
  43. package/{chunk-3M3M4YXP.js → chunk-R6GGQ2GT.js} +1 -1
  44. package/chunk-R7CDA4HX.js +1 -0
  45. package/chunk-RCU74ULS.js +1 -0
  46. package/{chunk-LQ5ORNDI.js → chunk-RGVPD4PJ.js} +1 -1
  47. package/{chunk-XTWVXTYP.js → chunk-RJ4U6XAH.js} +1 -1
  48. package/chunk-RN7NMYKV.js +8 -0
  49. package/chunk-RZN7GZTZ.js +1 -0
  50. package/chunk-S3S677ZR.js +1 -0
  51. package/{chunk-2KUDLHPP.js → chunk-S47LQILW.js} +1 -1
  52. package/{chunk-VN7JM6M3.js → chunk-SPHWZHBB.js} +1 -1
  53. package/chunk-TZUFH3TN.js +1 -0
  54. package/{chunk-IIB7YCLW.js → chunk-UTVV2FB5.js} +1 -1
  55. package/chunk-V3LXB3BU.js +1 -0
  56. package/{chunk-UMP4YQXB.js → chunk-VSSZRSCG.js} +1 -1
  57. package/{chunk-SKJ6XSV3.js → chunk-W6OH3HBG.js} +1 -1
  58. package/{chunk-6DH6O5YE.js → chunk-Z2NFEFOH.js} +1 -1
  59. package/{chunk-ZMDK6XIQ.js → chunk-ZCC3C2X4.js} +1 -1
  60. package/index.html +2 -2
  61. package/{main-S6Q4T2BU.js → main-EVBG63XG.js} +1 -1
  62. package/package.json +1 -1
  63. package/styles-UL5PH77J.css +1 -0
  64. package/chunk-25ZZFR2F.js +0 -1
  65. package/chunk-3KSBRC3X.js +0 -1
  66. package/chunk-7S5SYCMV.js +0 -1
  67. package/chunk-AADIFDNE.js +0 -1
  68. package/chunk-D3I33UIQ.js +0 -1
  69. package/chunk-HPGYPP74.js +0 -1
  70. package/chunk-JD54W4UA.js +0 -8
  71. package/chunk-JV6DGJII.js +0 -1
  72. package/chunk-LZUCVLMF.js +0 -1
  73. package/chunk-MHHVE6AV.js +0 -1
  74. package/chunk-P5SS3OV3.js +0 -1
  75. package/chunk-PN73DZ2H.js +0 -1
  76. package/chunk-QJILVQSS.js +0 -1
  77. package/chunk-VLIGMNJX.js +0 -1
  78. package/chunk-W577IVOD.js +0 -1
  79. package/chunk-WX7L7V6J.js +0 -1
  80. package/chunk-X4SAPDOB.js +0 -1
  81. package/chunk-X5YRWKCW.js +0 -1
  82. package/chunk-YD7PS7OS.js +0 -1
  83. package/styles-V3SS5M3J.css +0 -1
@@ -1 +1 @@
1
- import{a as ae}from"./chunk-VLIGMNJX.js";import{n as le}from"./chunk-JD54W4UA.js";import{a as ie,b as se}from"./chunk-6DH6O5YE.js";import"./chunk-YJSWEW6C.js";import"./chunk-VN7JM6M3.js";import"./chunk-KSP3JQHY.js";import"./chunk-HTNYQE2B.js";import"./chunk-URU2SLPX.js";import"./chunk-7L42EO7J.js";import"./chunk-RHW5QVAY.js";import{c as Z,e as J,h as ee,j as ne,s as te,t as oe}from"./chunk-T2OUHRUV.js";import{b as V,d as q}from"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{a as Y,g as H,l as Q,t as j}from"./chunk-WX7L7V6J.js";import"./chunk-4AECHE4W.js";import"./chunk-CKPICCFH.js";import{Ac as k,Cb as M,Gb as S,Hb as O,Ib as r,Mb as I,Nb as c,Qa as p,Xa as v,Y as C,Yb as U,Zb as X,ab as K,da as P,ea as f,ec as u,fb as N,fc as d,gc as m,lc as W,nb as g,pb as G,sb as F,ua as x,wb as t,xb as i,yb as T}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";var _e=["formRef"],re=()=>["--skip-files-larger-than","dblock-size","encryption-module","no-encryption","--no-encryption","--exclude-files-attributes","keep-time","keep-versions","retention-policy"];function pe(s,a){s&1&&(S(0,1,1),T(1,"spk-icon",20),O())}function ce(s,a){s&1&&(t(0,"p",20),r(1,6),i())}function ue(s,a){s&1&&(t(0,"p"),r(1,7),i())}function de(s,a){if(s&1){let e=M();t(0,"p"),r(1,8),i(),t(2,"app-timespan",18),m("ngModelChange",function(l){P(e);let o=c();return d(o.optionsFields.backupRetentionTime,l)||(o.optionsFields.backupRetentionTime=l),f(l)}),t(3,"label",29),r(4,9),i()()}if(s&2){let e=c();p(2),g("customId","backupRetentionTime"),u("ngModel",e.optionsFields.backupRetentionTime)}}function me(s,a){if(s&1){let e=M();t(0,"p"),r(1,10),i(),t(2,"spk-form-field")(3,"label",30),r(4,11),i(),t(5,"input",31),m("ngModelChange",function(l){P(e);let o=c();return d(o.optionsFields.backupRetentionVersions,l)||(o.optionsFields.backupRetentionVersions=l),f(l)}),i()()}if(s&2){let e=c();p(5),u("ngModel",e.optionsFields.backupRetentionVersions)}}function Se(s,a){s&1&&(t(0,"p"),r(1,12),i())}function Oe(s,a){if(s&1){let e=M();t(0,"p"),r(1,13),i(),t(2,"spk-form-field")(3,"p"),r(4,14),i(),t(5,"label",32),r(6,15),i(),t(7,"input",33),m("ngModelChange",function(l){P(e);let o=c();return d(o.optionsFields.backupRetentionCustom,l)||(o.optionsFields.backupRetentionCustom=l),f(l)}),i()()}if(s&2){let e=c();p(7),u("ngModel",e.optionsFields.backupRetentionCustom)}}var ge=["Bytes","KB","MB","GB","TB","PB"],Te=[{value:"all",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`}],Ce=1024*1024*1024*2,Pe=1024*1024*5,h=class s{#e=C(le);#n=C(q);#t=C(V);formRef=v.required("formRef");selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;settings=this.#e.settings;optionsFields=this.#e.optionsFields;retentionOptions=x(Te);sizeSplit=k(()=>{let e=this.optionsFields.remoteVolumeSize().match(/^(\d+)(bytes|kb|mb|gb|tb|pb|b)$/i);return{value:e?parseInt(e[1],10):0,unit:e?e[2].toUpperCase():"MB"}});exceededVolumeSize=k(()=>{let a=this.sizeSplit().value,e=this.sizeSplit().unit;if(a==null||e===null||e===void 0)return!1;let n=a*Math.pow(1024,ge.indexOf(e));return n>Ce||n<Pe});goBack(){this.#n.navigate(["schedule"],{relativeTo:this.#t.parent})}submit(){this.#e.submit()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=K({type:s,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,n){e&1&&U(n.formRef,_e,5),e&2&&X()},decls:30,vars:14,consts:()=>{let a;a=$localize`Options`;let e;e=$localize` Remote volume size ${"\uFFFD*7:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/*7:1\uFFFD"}:CLOSE_BLOCK_IF:`;let n;n=$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#11\uFFFD"}:START_LINK: Read more ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-square-out${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#11\uFFFD"}:CLOSE_LINK:`;let l;l=$localize`Backup retention`;let o;o=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let E;E=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `;let b;b=$localize` The chosen size is outside the recommended range. This may cause performance issues, excessively large temporary files or other problems. `;let A;A=$localize`Nothing will be deleted. The backup size will grow with each change.`;let R;R=$localize`If at least one newer backup is found, all backups older than this date are deleted.`;let y;y=$localize`Time to keep versions`;let $;$=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let w;w=$localize`Number of versions`;let D;D=$localize` Over time backups will be deleted automatically. There will remain one backup for each of the last 7 days, each of the last 4 weeks, each of the last 12 months. There will always be at least one remaining backup. `;let B;B=$localize` Enter a retention strategy manually. Placeholders are D/W/Y for days/weeks/years and U for unlimited. The syntax is: 7D:1D,4W:1W,36M:1M. This example keeps one backup for each of the next 7 days, one for each of the next 4 weeks, and one for each of the next 36 months. This can also be written as 1W:1D,1M:1W,3Y:1M. `;let L;L=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let z;return z=$localize`Retention expression`,[a,e,n,l,o,E,b,A,R,y,$,w,D,B,L,z,[1,"title-30"],[1,"remote-volume-wrap"],[3,"ngModelChange","customId","ngModel"],["for","size"],[1,"warning"],["href","https://forum.duplicati.com/t/choosing-sizes-in-duplicati/17683","target","_blank",1,"spk-primary"],["suffix",""],["value","value","label","name",3,"options","inlineSearch","isClearable"],["type","text",3,"ngModelChange","ngModel"],[3,"optionsChange","options","hiddenOptions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","",1,"raised","primary",3,"click"],["for","backupRetentionTime"],["for","backupRetentionVersions"],["type","number","id","backupRetentionVersions",3,"ngModelChange","ngModel"],["for","backupRetentionCustom"],["type","text","id","backupRetentionCustom",3,"ngModelChange","ngModel"]]},template:function(e,n){e&1&&(t(0,"section")(1,"h3",16),r(2,0),i(),t(3,"div",17)(4,"app-size",18),m("ngModelChange",function(o){return d(n.optionsFields.remoteVolumeSize,o)||(n.optionsFields.remoteVolumeSize=o),o}),t(5,"label",19),S(6,1),N(7,pe,2,0,"spk-icon",20),O(),i()(),N(8,ce,2,0,"p",20),t(9,"p"),S(10,2),t(11,"a",21),T(12,"spk-icon",22),i(),O(),i()(),t(13,"spk-select",23)(14,"label",19),r(15,3),i(),t(16,"input",24),m("ngModelChange",function(o){return d(n.optionsFields.backupRetention,o)||(n.optionsFields.backupRetention=o),o}),i()(),N(17,ue,2,0,"p")(18,de,5,2)(19,me,6,1)(20,Se,2,0,"p")(21,Oe,8,1),t(22,"app-options-list",25),m("optionsChange",function(o){return d(n.settings,o)||(n.settings=o),o}),i(),t(23,"div",26)(24,"button",27),I("click",function(){return n.goBack()}),S(25,4),T(26,"spk-icon"),O(),i(),t(27,"button",28),I("click",function(){return n.submit()}),S(28,5),T(29,"spk-icon"),O(),i()()()),e&2&&(p(4),g("customId","size"),u("ngModel",n.optionsFields.remoteVolumeSize),p(3),F(n.exceededVolumeSize()?7:-1),p(),F(n.exceededVolumeSize()?8:-1),p(5),g("options",n.retentionOptions())("inlineSearch",!0)("isClearable",!1),p(3),u("ngModel",n.optionsFields.backupRetention),p(),F(n.optionsFields.backupRetention()==="all"?17:n.optionsFields.backupRetention()==="time"?18:n.optionsFields.backupRetention()==="versions"?19:n.optionsFields.backupRetention()==="smart"?20:n.optionsFields.backupRetention()==="custom"?21:-1),p(5),u("options",n.settings),g("hiddenOptions",W(13,re)),p(5),G("loader",n.isSubmitting()))},dependencies:[te,Z,ne,J,ee,oe,ae,H,Y,j,ie,se,Q],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}section[_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}.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})};export{h as default};
1
+ import{a as ae}from"./chunk-5G5PH7FG.js";import{n as le}from"./chunk-RN7NMYKV.js";import{a as ie,b as se}from"./chunk-Z2NFEFOH.js";import"./chunk-6FFPXENZ.js";import"./chunk-SPHWZHBB.js";import"./chunk-KSP3JQHY.js";import"./chunk-HTNYQE2B.js";import"./chunk-GJROCOAD.js";import"./chunk-7L42EO7J.js";import"./chunk-RHW5QVAY.js";import{c as Z,e as J,h as ee,j as ne,s as te,t as oe}from"./chunk-T2OUHRUV.js";import{b as V,d as q}from"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{a as Y,g as H,l as Q,t as j}from"./chunk-NMXJMVL5.js";import"./chunk-JSGFZ2GA.js";import"./chunk-CKPICCFH.js";import{Ac as k,Cb as M,Gb as S,Hb as O,Ib as r,Mb as I,Nb as c,Qa as p,Xa as v,Y as C,Yb as U,Zb as X,ab as K,da as P,ea as f,ec as u,fb as N,fc as d,gc as m,lc as W,nb as g,pb as G,sb as F,ua as x,wb as t,xb as i,yb as T}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";var _e=["formRef"],re=()=>["--skip-files-larger-than","dblock-size","encryption-module","no-encryption","--no-encryption","--exclude-files-attributes","keep-time","keep-versions","retention-policy"];function pe(s,a){s&1&&(S(0,1,1),T(1,"spk-icon",20),O())}function ce(s,a){s&1&&(t(0,"p",20),r(1,6),i())}function ue(s,a){s&1&&(t(0,"p"),r(1,7),i())}function de(s,a){if(s&1){let e=M();t(0,"p"),r(1,8),i(),t(2,"app-timespan",18),m("ngModelChange",function(l){P(e);let o=c();return d(o.optionsFields.backupRetentionTime,l)||(o.optionsFields.backupRetentionTime=l),f(l)}),t(3,"label",29),r(4,9),i()()}if(s&2){let e=c();p(2),g("customId","backupRetentionTime"),u("ngModel",e.optionsFields.backupRetentionTime)}}function me(s,a){if(s&1){let e=M();t(0,"p"),r(1,10),i(),t(2,"spk-form-field")(3,"label",30),r(4,11),i(),t(5,"input",31),m("ngModelChange",function(l){P(e);let o=c();return d(o.optionsFields.backupRetentionVersions,l)||(o.optionsFields.backupRetentionVersions=l),f(l)}),i()()}if(s&2){let e=c();p(5),u("ngModel",e.optionsFields.backupRetentionVersions)}}function Se(s,a){s&1&&(t(0,"p"),r(1,12),i())}function Oe(s,a){if(s&1){let e=M();t(0,"p"),r(1,13),i(),t(2,"spk-form-field")(3,"p"),r(4,14),i(),t(5,"label",32),r(6,15),i(),t(7,"input",33),m("ngModelChange",function(l){P(e);let o=c();return d(o.optionsFields.backupRetentionCustom,l)||(o.optionsFields.backupRetentionCustom=l),f(l)}),i()()}if(s&2){let e=c();p(7),u("ngModel",e.optionsFields.backupRetentionCustom)}}var ge=["Bytes","KB","MB","GB","TB","PB"],Te=[{value:"all",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`}],Ce=1024*1024*1024*2,Pe=1024*1024*5,h=class s{#e=C(le);#n=C(q);#t=C(V);formRef=v.required("formRef");selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;settings=this.#e.settings;optionsFields=this.#e.optionsFields;retentionOptions=x(Te);sizeSplit=k(()=>{let e=this.optionsFields.remoteVolumeSize().match(/^(\d+)(bytes|kb|mb|gb|tb|pb|b)$/i);return{value:e?parseInt(e[1],10):0,unit:e?e[2].toUpperCase():"MB"}});exceededVolumeSize=k(()=>{let a=this.sizeSplit().value,e=this.sizeSplit().unit;if(a==null||e===null||e===void 0)return!1;let n=a*Math.pow(1024,ge.indexOf(e));return n>Ce||n<Pe});goBack(){this.#n.navigate(["schedule"],{relativeTo:this.#t.parent})}submit(){this.#e.submit()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=K({type:s,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,n){e&1&&U(n.formRef,_e,5),e&2&&X()},decls:30,vars:14,consts:()=>{let a;a=$localize`Options`;let e;e=$localize` Remote volume size ${"\uFFFD*7:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/*7:1\uFFFD"}:CLOSE_BLOCK_IF:`;let n;n=$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#11\uFFFD"}:START_LINK: Read more ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-square-out${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#11\uFFFD"}:CLOSE_LINK:`;let l;l=$localize`Backup retention`;let o;o=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let E;E=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `;let b;b=$localize` The chosen size is outside the recommended range. This may cause performance issues, excessively large temporary files or other problems. `;let A;A=$localize`Nothing will be deleted. The backup size will grow with each change.`;let R;R=$localize`If at least one newer backup is found, all backups older than this date are deleted.`;let y;y=$localize`Time to keep versions`;let $;$=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let w;w=$localize`Number of versions`;let D;D=$localize` Over time backups will be deleted automatically. There will remain one backup for each of the last 7 days, each of the last 4 weeks, each of the last 12 months. There will always be at least one remaining backup. `;let B;B=$localize` Enter a retention strategy manually. Placeholders are D/W/Y for days/weeks/years and U for unlimited. The syntax is: 7D:1D,4W:1W,36M:1M. This example keeps one backup for each of the next 7 days, one for each of the next 4 weeks, and one for each of the next 36 months. This can also be written as 1W:1D,1M:1W,3Y:1M. `;let L;L=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let z;return z=$localize`Retention expression`,[a,e,n,l,o,E,b,A,R,y,$,w,D,B,L,z,[1,"title-30"],[1,"remote-volume-wrap"],[3,"ngModelChange","customId","ngModel"],["for","size"],[1,"warning"],["href","https://forum.duplicati.com/t/choosing-sizes-in-duplicati/17683","target","_blank",1,"spk-primary"],["suffix",""],["value","value","label","name",3,"options","inlineSearch","isClearable"],["type","text",3,"ngModelChange","ngModel"],[3,"optionsChange","options","hiddenOptions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","",1,"raised","primary",3,"click"],["for","backupRetentionTime"],["for","backupRetentionVersions"],["type","number","id","backupRetentionVersions",3,"ngModelChange","ngModel"],["for","backupRetentionCustom"],["type","text","id","backupRetentionCustom",3,"ngModelChange","ngModel"]]},template:function(e,n){e&1&&(t(0,"section")(1,"h3",16),r(2,0),i(),t(3,"div",17)(4,"app-size",18),m("ngModelChange",function(o){return d(n.optionsFields.remoteVolumeSize,o)||(n.optionsFields.remoteVolumeSize=o),o}),t(5,"label",19),S(6,1),N(7,pe,2,0,"spk-icon",20),O(),i()(),N(8,ce,2,0,"p",20),t(9,"p"),S(10,2),t(11,"a",21),T(12,"spk-icon",22),i(),O(),i()(),t(13,"spk-select",23)(14,"label",19),r(15,3),i(),t(16,"input",24),m("ngModelChange",function(o){return d(n.optionsFields.backupRetention,o)||(n.optionsFields.backupRetention=o),o}),i()(),N(17,ue,2,0,"p")(18,de,5,2)(19,me,6,1)(20,Se,2,0,"p")(21,Oe,8,1),t(22,"app-options-list",25),m("optionsChange",function(o){return d(n.settings,o)||(n.settings=o),o}),i(),t(23,"div",26)(24,"button",27),I("click",function(){return n.goBack()}),S(25,4),T(26,"spk-icon"),O(),i(),t(27,"button",28),I("click",function(){return n.submit()}),S(28,5),T(29,"spk-icon"),O(),i()()()),e&2&&(p(4),g("customId","size"),u("ngModel",n.optionsFields.remoteVolumeSize),p(3),F(n.exceededVolumeSize()?7:-1),p(),F(n.exceededVolumeSize()?8:-1),p(5),g("options",n.retentionOptions())("inlineSearch",!0)("isClearable",!1),p(3),u("ngModel",n.optionsFields.backupRetention),p(),F(n.optionsFields.backupRetention()==="all"?17:n.optionsFields.backupRetention()==="time"?18:n.optionsFields.backupRetention()==="versions"?19:n.optionsFields.backupRetention()==="smart"?20:n.optionsFields.backupRetention()==="custom"?21:-1),p(5),u("options",n.settings),g("hiddenOptions",W(13,re)),p(5),G("loader",n.isSubmitting()))},dependencies:[te,Z,ne,J,ee,oe,ae,H,Y,j,ie,se,Q],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}section[_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}.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})};export{h as default};
@@ -1 +1 @@
1
- import{a as D}from"./chunk-URU2SLPX.js";import{a as b,n as w}from"./chunk-WX7L7V6J.js";import"./chunk-4AECHE4W.js";import{i as A}from"./chunk-CKPICCFH.js";import{$b as p,Ac as $,Bb as u,Cb as v,Ib as P,Mb as k,Nb as s,Qa as l,Y as y,_b as C,ab as T,ac as E,da as O,ea as x,fb as a,mc as _,nb as d,nc as N,ob as h,pb as f,sb as g,sc as F,ua as m,ub as I,vb as M,wb as c,xb as r}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.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(D);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:[w,b,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 D}from"./chunk-GJROCOAD.js";import{a as b,n as w}from"./chunk-NMXJMVL5.js";import"./chunk-JSGFZ2GA.js";import{i as A}from"./chunk-CKPICCFH.js";import{$b as p,Ac as $,Bb as u,Cb as v,Ib as P,Mb as k,Nb as s,Qa as l,Y as y,_b as C,ab as T,ac as E,da as O,ea as x,fb as a,mc as _,nb as d,nc as N,ob as h,pb as f,sb as g,sc as F,ua as m,ub as I,vb as M,wb as c,xb as r}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.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(D);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:[w,b,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};
@@ -0,0 +1,8 @@
1
+ import{a as qt,b as Yt}from"./chunk-Z2NFEFOH.js";import{a as _t}from"./chunk-6FFPXENZ.js";import{a as qe}from"./chunk-SPHWZHBB.js";import{a as Xt,b as Mt,c as jt}from"./chunk-KSP3JQHY.js";import{a as j}from"./chunk-HTNYQE2B.js";import{a as Le}from"./chunk-GJROCOAD.js";import{a as J}from"./chunk-7L42EO7J.js";import{b as Ve,c as _e,d as Fe,e as ge,f as Ue,g as ut,h as Be,i as Ke,j as We,m as dt,n as ze,o as mt,p as Ht,q as He,r as Ce,s as Xe,t as je}from"./chunk-T2OUHRUV.js";import{b as Ae,d as pe}from"./chunk-QVIZK4WW.js";import{A as pt,a as ue,b as lt,d as Wt,e as ve,g as be,l as de,o as zt,p as ct,t as me,z as Ge}from"./chunk-NMXJMVL5.js";import{h as Ie}from"./chunk-JSGFZ2GA.js";import{i as Kt}from"./chunk-CKPICCFH.js";import{$b as m,Ab as X,Ac as b,Bb as et,Bc as st,Cb as G,F as Ze,Gb as y,Hb as A,Ib as R,Jb as At,Kb as Pt,Lb as Oe,Mb as P,Nb as p,Qa as l,Qb as ce,S as ye,Sb as Bt,Tb as W,Xa as Me,Y as O,Yb as we,Zb as Re,_b as re,ab as le,ac as xe,bc as Y,cc as Nt,da as F,ea as g,ec as U,f as at,fb as _,fc as B,gc as K,hc as kt,ic as Ot,ja as Vt,jc as $t,lc as tt,mb as Ut,mc as nt,nb as u,oc as it,pb as ke,qa as Et,r as Je,ra as yt,sb as T,sc as ot,tb as te,ua as E,ub as ne,vb as ie,wb as s,xb as a,yb as d,zb as H}from"./chunk-W2F756OF.js";import{a as h,b as Ee,c as Lt}from"./chunk-7CGTOI24.js";var Ft=class t{#n=O(Ie);#t=O(ve);#e=O(Le);testDestination(n,e,i){return this.#e.hasV2TestOperations()?this.testDestinationv2(n,e,i):this.testDestinationv1(n,e,i)}testDestinationv2(n,e,i){return new at(o=>{this.#n.postApiV2DestinationTest({requestBody:{DestinationUrl:n,AutoCreate:!1,Options:null}}).subscribe({next:r=>{if(r.Success){o.next({action:"success",targetUrl:n,testAgain:!1,destinationIndex:e,anyFilesFound:!r.Data?.FolderIsEmpty,containsBackup:r.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:r.Data?.FolderContainsEncryptedBackupFiles??void 0}),o.complete();return}this.handleGenericError(o,n,e,r.Error??"Unknown error")},error:r=>{let c=r?.error?.body;if(c?.Data?.FolderExists===!1||c?.StatusCode==="missing-folder"){i?this.handleMissingFolder(o,n,e):this.handleGenericError(o,n,e,$localize`The remote destination folder does not exist.`);return}if(c?.Data?.HostCertificate){this.handleMissingCertificate(o,n,e,c.Data?.HostCertificate);return}if(c?.Data?.ReportedHostKey){this.handleIncorrectKey(o,n,e,c.Data.ReportedHostKey,c.Data.AcceptedHostKey??null);return}this.handleGenericError(o,n,e,r?.message??"Unknown error")}})})}testDestinationv1(n,e,i){return new at(o=>{this.#n.postApiV1RemoteoperationTest({requestBody:{path:n}}).subscribe({next:r=>{o.next({action:"success",targetUrl:n,testAgain:!1,destinationIndex:e}),o.complete()},error:r=>{this.handleDestinationErrorv1(r.message,n,e,i).subscribe(c=>{o.next(c)})}})})}handleMissingFolder(n,e,i){this.#t.open(J,{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:o=>{o&&(this.#e.hasV2TestOperations()?this.#n.postApiV2DestinationTest({requestBody:{DestinationUrl:e,AutoCreate:!0,Options:null}}).subscribe({next:r=>{r.Success?this.handleFolderCreated(n,e,i):this.handleFolderCreateFailure(n,e,i,r.Error??$localize`Unknown error`)},error:r=>{this.handleFolderCreateFailure(n,e,i,r.message??$localize`Unknown error`)}}):this.#n.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe({next:()=>{this.handleFolderCreated(n,e,i)},error:r=>{this.handleFolderCreateFailure(n,e,i,r.message??$localize`Unknown error`)}}))}})}handleFolderCreateFailure(n,e,i,o){this.#t.open(J,{data:{title:$localize`Error creating folder`,message:$localize`The remote destination folder could not be created. ${o}`,confirmText:$localize`OK`,cancelText:null},closed:()=>{n.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:i}),n.complete()}})}handleFolderCreated(n,e,i){this.#t.open(J,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{n.next({action:"test-again",targetUrl:e,testAgain:!0,destinationIndex:i}),n.complete()}})}reportNoAction(n,e,i){n.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:i}),n.complete()}handleMissingCertificate(n,e,i,o){this.#t.open(J,{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: ${o}`,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:r=>{if(!r){this.reportNoAction(n,e,i);return}n.next({action:"trust-cert",targetUrl:e,testAgain:!0,certData:o,destinationIndex:i}),n.complete()}})}handleIncorrectKey(n,e,i,o,r){r?this.#t.open(J,{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 ${r}
6
+ with the REPORTED host key: ${o}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:c=>{if(!c){this.reportNoAction(n,e,i);return}n.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:o,destinationIndex:i}),n.complete()}}):this.#t.open(J,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${o}`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:c=>{if(!c){this.reportNoAction(n,e,i);return}n.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:o,destinationIndex:i}),n.complete()}})}handleGenericError(n,e,i,o){this.#t.open(J,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:o,cancelText:$localize`OK`},closed:r=>{n.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:i}),n.complete()}})}handleDestinationErrorv1(n,e,i,o){return new at(r=>{if(n==="missing-folder"){o?this.handleMissingFolder(r,e,i):this.handleGenericError(r,e,i,$localize`The remote destination folder does not exist.`);return}if(n.startsWith("incorrect-cert:")){let c=n.split("incorrect-cert:")[1];this.handleMissingCertificate(r,e,i,c);return}if(n.startsWith("incorrect-host-key:")){let c=n.split('incorrect-host-key:"')[1].split('",')[0],f=n.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(r,e,i,c,f);return}this.handleGenericError(r,e,i,n)})}static \u0275fac=function(e){return new(e||t)};static \u0275prov=ye({token:t,factory:t.\u0275fac,providedIn:"root"})};var gt=class t{fromString(n){if(!n)return null;let e=n.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(n,e){return`${n}${e}`}static \u0275fac=function(e){return new(e||t)};static \u0275prov=ye({token:t,factory:t.\u0275fac,providedIn:"root"})};var he=class t{#n=O(Ie);s3Providers=j(this.getS3Config("Providers"));s3Regions=j(this.getS3Config("Regions"));s3RegionHosts=j(this.getS3Config("RegionHosts"));s3StorageClasses=j(this.getS3Config("StorageClasses"));storjSatellites=j(this.getStorjConfig("Satellites"));storjAuthenticationMethods=j(this.getStorjConfig("AuthenticationMethods"));openstackProviders=j(this.getOpenstackConfig("Providers"));openstackVersions=j(this.getOpenstackConfig("Versions"));gcsLocations=j(this.getGcsConfig("Locations"));gcsStorageClasses=j(this.getGcsConfig("StorageClasses"));getS3Config(n){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":n}}).pipe(Je(e=>this.#t(e)))}createS3IamUser(n,e){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":n,"s3-password":e}})}createS3PolicyIAM(n){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:n}})}getStorjConfig(n){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":n}}).pipe(Je(e=>this.#t(e)))}getOpenstackConfig(n){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":n}}).pipe(Je(e=>this.#t(e)))}getGcsConfig(n){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":n}}).pipe(Je(e=>this.#t(e)))}#t(n){return(n.Result&&typeof n.Result=="object"&&Object.entries(n.Result).map(([e,i])=>({key:e,value:i})))??[]}static \u0275fac=function(e){return new(e||t)};static \u0275prov=ye({token:t,factory:t.\u0275fac,providedIn:"root"})};function Ne(t){return t==null||t===""?"":":"+t.toString()}function Q(t){return t==null?"":t.startsWith("/")?t:"/"+t}function $(t,n){let e={},i={},o=Se.find(r=>r.key===t);return n.searchParams.forEach((r,c)=>{o?.dynamicFields?.some(N=>N===c||N?.name===c)?i[c]=decodeURIComponent(r):e[c]=decodeURIComponent(r)}),{advanced:e,dynamic:i}}function M(t,n=!1){let e=t.map(([o,r])=>`${o}=${r?encodeURIComponent(r.toString()):""}`).join("&");return e?(n?"":"?")+e:""}function Ct(t){let n=t.destinationType,e=Se.find(i=>i.customKey===n||i.key===n);if(!e)throw new Error("Invalid destination type");return e?.mapper.to(t)??""}function wt(t){let n=URL.canParse(t),e=t.split("://")[0],i=t.split("://")[1],o="http://"+i;if(i.startsWith("%")&&e==="file")return Se.find(r=>r.customKey===e||r.key===e)?.mapper.from(e,new URL("http://localhost"),t);try{let r=new URL(o);return Se.find(c=>c.customKey===e||c.key===e)?.mapper.from(e,r,t)}catch(r){console.error("Error while parsing target path",r)}if(!n)throw new Error("Invalid target path");return null}var C=new Ce,Se=[{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:t=>C.control(t??"")}},mapper:{to:t=>{let n=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.path}${n}`},from:(t,n,e)=>{let o=e.startsWith("file:///")?e.split("file:///")[1]:e.split("file://")[1],r=o.startsWith("%"),f=o.slice(1).startsWith(":\\")||r?o:"/"+o;return h({destinationType:t,custom:{path:f}},$(t,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:t=>C.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:t=>C.control(t??"",[Fe.required,Fe.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>C.control(t??"")}},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:t=>{let n=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:e,server:i,path:o}=t.custom;return`${t.destinationType}://${i+Ne(e)+Q(o)+n}`},from:(t,n,e)=>h({destinationType:t,custom:{server:n.hostname,port:n.port,path:n.pathname}},$(t,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:t=>C.control(t??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>C.control(t??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:t=>t.get(he).s3Providers},"use-ssl","auth-username","auth-password"],advancedFields:[{name:"s3-client",type:"Enumeration",options:["aws","minio"]},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:t=>t.get(he).s3StorageClasses}],mapper:{to:t=>{let{bucket:n,path:e}=t.custom,i=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n+Q(e)+i}`},from:(t,n,e)=>h({destinationType:t,custom:{path:n.pathname,bucket:n.hostname}},$(t,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:t=>C.control(t??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:t=>t.get(he).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:t=>t.get(he).gcsStorageClasses},"authid"],mapper:{to:t=>{let n=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.path}${n}`},from:(t,n,e)=>h({destinationType:t,custom:{path:n.hostname+n.pathname}},$(t,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:t=>C.control(t??"")}},dynamicFields:[{name:"authid",type:"Password"}],mapper:{to:t=>{let n=t.custom.path,e=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>h({destinationType:t,custom:{path:n.hostname+n.pathname}},$(t,n))}},{key:"pcloud",displayName:"pCloud",description:"Store backups in pCloud.",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>E([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:"Server",longDescription:"Server",formElement:t=>C.control(t??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>C.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{server:e,path:i}=t.custom;return`${t.destinationType}://${e+Q(i)+n}`},from:(t,n,e)=>{let i=n.pathname.replace(/^\//,"");return h({destinationType:t,custom:{server:n.hostname,path:i}},$(t,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:t=>C.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:t=>{let n=t.custom.path,e=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>h({destinationType:t,custom:{path:n.hostname+n.pathname}},$(t,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:t=>C.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=t.custom.path,e=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>h({destinationType:t,custom:{path:n.hostname+n.pathname}},$(t,n))}},{key:"od4b",displayName:"OneDrive Business",description:"Store backups in OneDrive Business.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>C.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>C.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>C.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:t=>{let n=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:e,server:i,path:o}=t.custom;return`${t.destinationType}://${i+Ne(e)+Q(o)+n}`},from:(t,n,e)=>h({destinationType:t,custom:{server:n.hostname,port:n.port,path:n.pathname}},$(t,n))}},{key:"mssp",displayName:"Microsoft SharePoint",description:"Store backups in Microsoft SharePoint.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>C.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>C.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>C.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:t=>{let n=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:e,server:i,path:o}=t.custom;return`${t.destinationType}://${i+Ne(e)+Q(o)+n}`},from:(t,n,e)=>h({destinationType:t,custom:{server:n.hostname,port:n.port,path:n.pathname}},$(t,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:t=>C.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=t.custom.path,e=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>h({destinationType:t,custom:{path:n.hostname+n.pathname}},$(t,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:t=>C.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=t.custom.path,e=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>h({destinationType:t,custom:{path:n.hostname+n.pathname}},$(t,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:t=>C.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=t.custom.path,e=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>h({destinationType:t,custom:{path:n.hostname+n.pathname}},$(t,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:t=>C.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=t.custom.path,e=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>h({destinationType:t,custom:{path:n.hostname+n.pathname}},$(t,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:t=>C.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:t=>C.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Application ID"},{name:"auth-password",shortDescription:"Application Key"}],mapper:{to:t=>{let{bucket:n,path:e}=t.custom,i=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n+Q(e)+i}`},from:(t,n,e)=>h({destinationType:t,custom:{bucket:n.hostname,path:decodeURIComponent(n.pathname)}},$(t,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:t=>C.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:t=>C.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Access ID"},{name:"auth-password",shortDescription:"Access Secret"}],mapper:{to:t=>{let{bucket:n,path:e}=t.custom,i=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n+Q(e)+i}`},from:(t,n,e)=>h({destinationType:t,custom:{bucket:n.hostname,path:n.pathname}},$(t,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:t=>C.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let n=t.custom.path,e=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>h({destinationType:t,custom:{path:n.hostname+n.pathname}},$(t,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:t=>C.control(t??"",[Fe.email])},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>C.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=t.custom.path,e=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>h({destinationType:t,custom:{path:n.hostname+n.pathname}},$(t,n))}},{key:"cloudfiles",displayName:"Rackspace CloudFiles",description:"Store backups in Rackspace CloudFiles.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>C.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>C.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>C.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let n=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:e,server:i,path:o}=t.custom;return`${t.destinationType}://${i+Ne(e)+Q(o)+n}`},from:(t,n,e)=>h({destinationType:t,custom:{server:n.hostname,port:n.port,path:n.pathname}},$(t,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:t=>{let n=t.dynamic["rclone-remote-repository"],e=t.dynamic["rclone-remote-path"],i=Object.entries(t.dynamic).filter(([r])=>!["rclone-remote-repository","rclone-remote-path"].includes(r)),o=M([...Object.entries(t.advanced),...i]);return`${t.destinationType}://${n}/${e+o}`},from:(t,n,e)=>{let{advanced:i,dynamic:o}=$(t,n);return h({destinationType:t,dynamic:h({"rclone-remote-repository":n.hostname,"rclone-remote-path":n.pathname},o)},i)}}},{key:"openstack",displayName:"OpenStack Object Storage",description:"Store backups in OpenStack Object Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket",longDescription:"Bucket",formElement:t=>C.control(t??"")}},dynamicFields:[{name:"openstack-authuri",shortDescription:"Auth URI",type:"Enumeration",loadOptions:t=>t.get(he).openstackProviders},{name:"openstack-version",shortDescription:"Version",type:"Enumeration",loadOptions:t=>t.get(he).openstackVersions},{name:"openstack-domain-name",shortDescription:"Domain name"},{name:"openstack-tenant-name",shortDescription:"Tenant name"},{name:"openstack-region",shortDescription:"Region"}],mapper:{to:t=>{let n=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{bucket:e}=t.custom;return`${t.destinationType}://${e+n}`},from:(t,n,e)=>h({destinationType:t,custom:{path:n.pathname,bucket:n.hostname}},$(t,n))}},{key:"webdav",displayName:"WebDAV",description:"Store backups in WebDAV.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>C.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>C.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>C.control(t??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"},{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let{port:n,server:e,path:i}=t.custom,o=t.dynamic["use-ssl"],r=M([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([c])=>c!=="use-ssl")]);return`${t.destinationType}${o?"s":""}://${e+Ne(n)+Q(i)+r}`},from:(t,n,e)=>h({destinationType:t,custom:{server:n.hostname,port:n.port,path:n.pathname}},$(t,n))}},{key:"aftp",displayName:"FTP",description:"Store backups in FTP.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>C.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>C.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>C.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let{port:n,server:e,path:i}=t.custom,o=M([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([r])=>r!=="use-ssl")]);return`${t.destinationType}://${e+Ne(n)+Q(i)+o}`},from:(t,n,e)=>h({destinationType:t,custom:{server:n.hostname,port:n.port,path:n.pathname}},$(t,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:t=>C.control(t??"")}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:t=>{let n=t.custom.server,e=t.dynamic["sia-targetpath"],i=M([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([o])=>o!=="sia-targetpath")]);return`${t.destinationType}://${n+Q(e)+i}`},from:(t,n,e)=>h({destinationType:t,custom:{path:n.pathname}},$(t,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:t=>C.control(t??"")}},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:t=>{let n=t.custom.path,e=M([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([i])=>i!=="cos-targetpath")]);return`${t.destinationType}://${n+e}`},from:(t,n,e)=>h({destinationType:t,custom:{path:n.pathname}},$(t,n))}},{key:"tahoe",displayName:"Tahoe LAFS",description:"Store backups in Tahoe LAFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>C.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>C.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>C.control(t??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"}],mapper:{to:t=>{let{port:n,server:e,path:i,username:o,password:r}=t.custom,c={"auth-username":o,"auth-password":r},f=t.dynamic["use-ssl"],N=M([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([I])=>I!=="use-ssl"),...Object.entries(c)]);return`${t.destinationType}${f?"s":""}://${e+Ne(n)+Q(i)+N}`},from:(t,n,e)=>h({destinationType:t,custom:{server:n.hostname,port:n.port,path:n.pathname}},$(t,n))}},{key:"cifs",displayName:"CIFS",description:"Store backups in CIFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>C.control(t??"")},share:{type:"String",name:"share",shortDescription:"Share Name",longDescription:"Share Name",formElement:t=>C.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>C.control(t??"")}},dynamicFields:["transport","auth-username","auth-password","auth-domain"],mapper:{to:t=>{let{share:n,server:e,path:i,username:o,password:r}=t.custom,c={"auth-username":o,"auth-password":r},f=new Map([...Object.entries(c),...Object.entries(t.advanced),...Object.entries(t.dynamic)]),N=M(Array.from(f));return`${t.destinationType}://${e+Q(n)+Q(i)+N}`},from:(t,n,e)=>{let i=n.pathname.split("/")[1],o=n.pathname.split("/").slice(2).join("/");return h({destinationType:t,custom:{server:n.hostname,share:i,path:o}},$(t,n))}}},{key:"filen",displayName:"Filen.io",description:"Store backups in Filen.io.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on Filen",longDescription:"Path on Filen",formElement:t=>C.control(t??"")}},dynamicFields:["auth-username","auth-password"],mapper:{to:t=>{let{path:n,username:e,password:i}=t.custom,o={"auth-username":e,"auth-password":i},r=new Map([...Object.entries(o),...Object.entries(t.advanced),...Object.entries(t.dynamic)]),c=M(Array.from(r));return`${t.destinationType}://${n+c}`},from:(t,n,e)=>{let i=n.hostname??"";return n.pathname&&i!==""&&n.pathname[0]!="/"&&(i+="/"),i+=n.pathname,h({destinationType:t,custom:{path:i}},$(t,n))}}},{key:"filejump",displayName:"Filejump",description:"Store backups in Filejump.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on Filejump",longDescription:"Path on Filejump",formElement:t=>C.control(t??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:"API Token",longDescription:"Filejump API Token",formElement:t=>C.control(t??"")}],mapper:{to:t=>{let{path:n,username:e,password:i,apitoken:o}=t.custom,r=(o||"").trim()===""?{"auth-username":e,"auth-password":i}:{"api-token":o},c=new Map([...Object.entries(r),...Object.entries(t.advanced),...Object.entries(t.dynamic)]),f=M(Array.from(c));return`${t.destinationType}://${n+f}`},from:(t,n,e)=>{let i=n.hostname??"";return n.pathname&&i!==""&&n.pathname[0]!="/"&&(i+="/"),i+=n.pathname,h({destinationType:t,custom:{path:i}},$(t,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:t=>`storj://storj.io/config?storj-auth-method=Access%20grant&storj-satellite=us1.storj.io%3A7777&storj-api-key&storj-secret&${M([...Object.entries(t.advanced),...Object.entries(t.dynamic)],!0)}`,from:(t,n,e)=>h({destinationType:t},$(t,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:t=>t.get(he).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:t=>`storj://storj.io/config?storj-auth-method=API%20key&${M([...Object.entries(t.advanced),...Object.entries(t.dynamic)],!0)}`,from:(t,n,e)=>h({destinationType:t},$(t,n))}}];var on=["formRef"];function rn(t,n){t&1&&(s(0,"spk-alert",17),y(1,5),d(2,"spk-icon",26),A(),a())}function an(t,n){if(t&1&&m(0),t&2){let e=n.$implicit;Y(" ",e.DisplayName," ")}}function sn(t,n){if(t&1&&d(0,"spk-progress-bar",40),t&2){let e=p(3);ke("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),u("value",e.calculatePasswordStrength()*(100/5))}}function ln(t,n){t&1&&(s(0,"span",35),R(1,10),a())}function cn(t,n){t&1&&(y(0,8,1),d(1,"spk-icon"),A())}function pn(t,n){t&1&&(y(0,8,2),d(1,"spk-icon"),A())}function un(t,n){t&1&&(y(0,11,1),d(1,"spk-icon",42),A())}function dn(t,n){t&1&&(y(0,11,2),d(1,"spk-icon"),A())}function mn(t,n){if(t&1){let e=G();s(0,"button",41),P("click",function(){F(e);let o=p(3);return g(o.copyPassword())}),y(1,11),_(2,un,2,0)(3,dn,2,0),A(),a()}if(t&2){let e=p(3);l(2),T(e.copiedPassword()?2:3)}}function _n(t,n){t&1&&(s(0,"spk-alert",39),R(1,12),a())}function Fn(t,n){if(t&1){let e=G();s(0,"div",30)(1,"spk-form-field")(2,"label",31),y(3,7),d(4,"sup"),A(),a(),d(5,"input",32),a(),_(6,sn,1,9,"spk-progress-bar",33),s(7,"spk-form-field"),d(8,"input",34),_(9,ln,2,0,"span",35),a(),s(10,"div",36)(11,"button",37),P("click",function(){F(e);let o=p(2);return g(o.showPassword.set(!o.showPassword()))}),y(12,8),_(13,cn,2,0)(14,pn,2,0),A(),a(),s(15,"button",37),P("click",function(){F(e);let o=p(2);return g(o.generatePassword())}),y(16,9),d(17,"spk-icon"),A(),a(),_(18,mn,4,1,"button",38),a(),_(19,_n,2,0,"spk-alert",39),a()}if(t&2){let e=p(2);l(5),u("type",e.showPassword()?"text":"password"),l(),T(e.generalForm.value.password?6:-1),l(2),u("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 gn(t,n){if(t&1&&(s(0,"spk-select",27)(1,"label",28),R(2,6),a(),d(3,"input",29),_(4,an,1,1,"ng-template"),a(),_(5,Fn,20,7,"div",30)),t&2){let e=p();u("options",e.encryptionOptions())("isClearable",!1),l(5),T(e.encryptionFieldSignal()!==""?5:-1)}}function Cn(t,n){if(t&1&&(s(0,"button",24),y(1,13),d(2,"spk-icon"),A(),a()),t&2){let e=p();u("disabled",e.nameAndDescriptionValid()===!1)}}function hn(t,n){if(t&1&&(s(0,"spk-tooltip",25)(1,"button",24),y(2,14),d(3,"spk-icon"),A(),a()()),t&2){let e=p();u("disabled",!(e.showCopyPassword()&&!e.copiedPassword())),l(),u("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var Ye=new Ce,Qt=(t={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>Ye.group({name:Ye.control(t.name,[Fe.required]),description:Ye.control(t.description),encryption:Ye.control(t.encryption,[jt()]),password:Ye.control(t.password,[Mt(n=>n?.value.encryption!=="",[Fe.required])]),repeatPassword:Ye.control(t.repeatPassword,[Mt(n=>n?.value.encryption!=="",[Fe.required])])}),xt={Key:"",DisplayName:"None"},Rt=class t{#n=O(pe);#t=O(Ae);#e=O(Xt);#i=O(fe);#o=O(Le);formRef=Me.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=E(!1);copiedPassword=E(!1);showCopyPassword=E(!1);encryptionEffect=st(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=b(()=>{let n=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=b(()=>{let e=this.generalFormSignal()?.password??"";return this.#e.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit(!0)}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 i=document.createElement("textarea");i.value=n,document.body.appendChild(i),i.select(),document.execCommand("copy"),document.body.removeChild(i)}catch(i){console.error("Failed to copy text: ",i)}}}displayFn(){let n=this.#o.systemInfo()?.EncryptionModules??[];return e=>{let i=[xt,...n].find(o=>o.Key===e);return i?`${i.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let n=this.#e.generate(16);this.generalForm.controls.password.setValue(n),this.generalForm.controls.repeatPassword.setValue(n),this.showCopyPassword.set(!0)}next(){this.#n.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=le({type:t,selectors:[["app-general"]],viewQuery:function(e,i){e&1&&we(i.formRef,on,5),e&2&&Re()},decls:21,vars:4,consts:()=>{let n;n=$localize`Your backup name`;let e;e=$localize`Your backup description`;let i;i=$localize`General backup settings`;let o;o=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let r;r=$localize`Backup description`;let c;c=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let f;f=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Encrypted backup `;let N;N=$localize`Encryption`;let I;I=$localize`Encryption`;let z;z=$localize`Password`;let w;w=$localize`Repeat password`;let v;v=$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=Oe(V);let oe;oe=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let Z;Z=$localize`Passwords do not match`;let S;S=$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:`,S=Oe(S);let D;D=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let L;L=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let q;return q=$localize` Continue ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],i,o,r,c,f,I,v,V,oe,Z,S,D,L,q,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],[1,"primary"],["for","backupName"],["type","text","tabindex","1","placeholder",n,"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"],["message","Remember to copy the password",1,"primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",N,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",z,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",w,"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,i){if(e&1){let o=G();s(0,"form",15,0),P("submit",function(){return F(o),g(i.next())}),s(2,"h3",16),R(3,1),a(),_(4,rn,3,0,"spk-alert",17),s(5,"spk-form-field")(6,"label",18),y(7,2),d(8,"sup"),A(),a(),d(9,"input",19),a(),s(10,"spk-form-field")(11,"label",20),R(12,3),a(),d(13,"textarea",21),a(),_(14,gn,6,3),s(15,"div",22)(16,"button",23),P("click",function(){return F(o),g(i.exit())}),y(17,4),d(18,"spk-icon"),A(),a(),_(19,Cn,3,1,"button",24)(20,hn,4,2,"spk-tooltip",25),a()()}if(e&2){let o;u("formGroup",i.generalForm),l(4),T(!i.isNew()&&((o=i.generalFormSignal())==null?null:o.encryption)!==""?4:-1),l(10),T(i.isNew()?14:-1),l(5),T(i.encryptionFieldSignal()===""||!i.isNew()?19:20)}},dependencies:[je,Ke,_e,ge,Ue,ze,He,de,me,be,ue,ct,lt,pt],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 fn(t,n){if(t&1){let e=G();s(0,"div",24)(1,"spk-form-field")(2,"label",25),R(3,7),a(),s(4,"input",26,0),K("ngModelChange",function(o){F(e);let r=p();return B(r.scheduleFields.nextTime().time,o)||(r.scheduleFields.nextTime().time=o),g(o)}),P("focus",function(){F(e);let o=re(5);return g(o.showPicker())}),a(),s(6,"spk-icon",27),m(7,"clock"),a()(),s(8,"spk-form-field"),d(9,"label",28),s(10,"input",29,1),K("ngModelChange",function(o){F(e);let r=p();return B(r.scheduleFields.nextTime().date,o)||(r.scheduleFields.nextTime().date=o),g(o)}),P("focus",function(){F(e);let o=re(11);return g(o.showPicker())}),a(),s(12,"spk-icon",27),m(13,"calendar"),a()()(),s(14,"div",24)(15,"spk-form-field")(16,"label",30),R(17,8),a(),s(18,"input",31),K("ngModelChange",function(o){F(e);let r=p();return B(r.scheduleFields.runAgain().repeatValue,o)||(r.scheduleFields.runAgain().repeatValue=o),g(o)}),a()(),s(19,"spk-select",32)(20,"input",33),K("ngModelChange",function(o){F(e);let r=p();return B(r.scheduleFields.runAgain().repeatUnit,o)||(r.scheduleFields.runAgain().repeatUnit=o),g(o)}),a()()(),s(21,"app-toggle-card",34),H(22,35),R(23,9),X(),s(24,"div",36)(25,"spk-toggle",19),y(26,10),s(27,"input",20),K("ngModelChange",function(o){F(e);let r=p();return B(r.scheduleFields.runAgain().allowedDays.mon,o)||(r.scheduleFields.runAgain().allowedDays.mon=o),g(o)}),a(),A(),a(),s(28,"spk-toggle",19),y(29,11),s(30,"input",20),K("ngModelChange",function(o){F(e);let r=p();return B(r.scheduleFields.runAgain().allowedDays.tue,o)||(r.scheduleFields.runAgain().allowedDays.tue=o),g(o)}),a(),A(),a(),s(31,"spk-toggle",19),y(32,12),s(33,"input",20),K("ngModelChange",function(o){F(e);let r=p();return B(r.scheduleFields.runAgain().allowedDays.wed,o)||(r.scheduleFields.runAgain().allowedDays.wed=o),g(o)}),a(),A(),a(),s(34,"spk-toggle",19),y(35,13),s(36,"input",20),K("ngModelChange",function(o){F(e);let r=p();return B(r.scheduleFields.runAgain().allowedDays.thu,o)||(r.scheduleFields.runAgain().allowedDays.thu=o),g(o)}),a(),A(),a(),s(37,"spk-toggle",19),y(38,14),s(39,"input",20),K("ngModelChange",function(o){F(e);let r=p();return B(r.scheduleFields.runAgain().allowedDays.fri,o)||(r.scheduleFields.runAgain().allowedDays.fri=o),g(o)}),a(),A(),a(),s(40,"spk-toggle",19),y(41,15),s(42,"input",20),K("ngModelChange",function(o){F(e);let r=p();return B(r.scheduleFields.runAgain().allowedDays.sat,o)||(r.scheduleFields.runAgain().allowedDays.sat=o),g(o)}),a(),A(),a(),s(43,"spk-toggle",19),y(44,16),s(45,"input",20),K("ngModelChange",function(o){F(e);let r=p();return B(r.scheduleFields.runAgain().allowedDays.sun,o)||(r.scheduleFields.runAgain().allowedDays.sun=o),g(o)}),a(),A(),a()()()}if(t&2){let e=p();l(4),U("ngModel",e.scheduleFields.nextTime().time),l(6),U("ngModel",e.scheduleFields.nextTime().date),l(8),U("ngModel",e.scheduleFields.runAgain().repeatValue),l(),u("options",e.unitOptions)("isClearable",!1),l(),U("ngModel",e.scheduleFields.runAgain().repeatUnit),l(),u("disallowToggle",!0),l(6),U("ngModel",e.scheduleFields.runAgain().allowedDays.mon),l(3),U("ngModel",e.scheduleFields.runAgain().allowedDays.tue),l(3),U("ngModel",e.scheduleFields.runAgain().allowedDays.wed),l(3),U("ngModel",e.scheduleFields.runAgain().allowedDays.thu),l(3),U("ngModel",e.scheduleFields.runAgain().allowedDays.fri),l(3),U("ngModel",e.scheduleFields.runAgain().allowedDays.sat),l(3),U("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var Sn=[{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`}],$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}}},It=class t{#n=O(fe);#t=O(pe);#e=O(Ae);unitOptions=Sn;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||t)};static \u0275cmp=le({type:t,selectors:[["app-schedule"]],decls:16,vars:2,consts:()=>{let n;n=$localize`Schedule`;let e;e=$localize` Automatically run backups ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let i;i=$localize`If a date was missed, the job will run as soon as possible.`;let o;o=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let r;r=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let c;c=$localize`Next time`;let f;f=$localize`Run again every`;let N;N=$localize`Allowed days`;let I;I=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let z;z=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let w;w=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let v;v=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let V;V=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let oe;oe=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let Z;return Z=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],n,e,i,o,r,c,f,N,I,z,w,v,V,oe,Z,[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,i){e&1&&(s(0,"h3",17),R(1,2),a(),s(2,"div",18)(3,"spk-toggle",19),y(4,3),s(5,"input",20),K("ngModelChange",function(r){return B(i.scheduleFields.autoRun,r)||(i.scheduleFields.autoRun=r),r}),a(),A(),a(),s(6,"p"),R(7,4),a()(),_(8,fn,46,14),s(9,"div",21)(10,"button",22),P("click",function(){return i.goBack()}),y(11,5),d(12,"spk-icon"),A(),a(),s(13,"button",23),P("click",function(){return i.next()}),y(14,6),d(15,"spk-icon"),A(),a()()),e&2&&(l(5),U("ngModel",i.scheduleFields.autoRun),l(3),T(i.scheduleFields.autoRun()?8:-1))},dependencies:[Xe,_e,We,Ve,ge,Be,de,Ge,ue,be,me,qe],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 Tn(t,n){if(t&1&&(H(0,4),m(1),X()),t&2){let e,i=p();l(),xe((e=i.currentExpressionOption())==null?null:e.startsWith)}}function Dn(t,n){if(t&1&&(H(0,5),m(1),X()),t&2){let e,i=p();l(),xe((e=i.currentExpressionOption())==null?null:e.endsWith)}}var En=[{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"}],St=class t{path=yt.required();osType=yt();pathChange=Et();remove=Et();internalPath=E("");pathType=E("-Expression");currentExpressionOption=b(()=>{let n=this.pathType();return this.expressionOptions().find(e=>e.value===n)});expressionOptions=b(()=>{let e=this.osType()==="Windows"?"\\":"/";return En.map(i=>i.value==="-Folder"||i.value==="+Folder"?Ee(h({},i),{startsWith:"",endsWith:""}):i.value==="-FolderName"||i.value==="+FolderName"?Ee(h({},i),{startsWith:"*",endsWith:`*${e}`}):i.value==="-FileName"||i.value==="+FileName"?Ee(h({},i),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):i.value==="-FileGroup"||i.value==="+FileGroup"?Ee(h({},i),{startsWith:"{",endsWith:"}"}):i.value==="-Regex"||i.value==="+Regex"?Ee(h({},i),{startsWith:"[",endsWith:"]"}):i.value==="-Extension"||i.value==="+Extension"?Ee(h({},i),{startsWith:"*.",endsWith:""}):Ee(h({},i),{startsWith:"",endsWith:""}))});pathEffect=st(()=>{let n=this.path(),e=n.slice(1),i=n.startsWith("-")?"-":"+",o=this.osType()==="Windows",r=o?"\\":"/";e.startsWith("%")&&e.endsWith(r)||o&&e.slice(2).startsWith(r)&&e.endsWith(r)||e.startsWith(r)&&e.endsWith(r)?(this.pathType.set(`${i}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${r}`)?(this.pathType.set(`${i}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${r}]*]`)?(this.pathType.set(`${i}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${i}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${i}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${i}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${i}Expression`),this.internalPath.set(e))});updateFilter(){let n=this.internalPath(),e=this.currentExpressionOption();n!==""&&this.pathChange.emit(`${e?.value.slice(0,1)}${e?.startsWith??""}${n}${e?.endsWith??""}`)}removeFilter(){this.remove.emit()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=le({type:t,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:9,vars:6,consts:()=>{let n;return n=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",n,3,"ngModelChange","ngModel"],[1,"expression-input"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""],[1,"filter-removal",3,"click"],[1,"spk-primary"]]},template:function(e,i){if(e&1&&(s(0,"spk-select",0)(1,"input",1),K("ngModelChange",function(r){return B(i.pathType,r)||(i.pathType=r),r}),P("ngModelChange",function(){return i.updateFilter()}),a()(),s(2,"spk-form-field",2)(3,"input",3),K("ngModelChange",function(r){return B(i.internalPath,r)||(i.internalPath=r),r}),P("ngModelChange",function(){return i.updateFilter()}),a(),_(4,Tn,2,1,"ng-container",4)(5,Dn,2,1,"ng-container",5),a(),s(6,"div",6),P("click",function(){return i.removeFilter()}),s(7,"spk-icon",7),m(8,"x-circle"),a()()),e&2){let o,r;u("options",i.expressionOptions())("isClearable",!1),l(),U("ngModel",i.pathType),l(2),U("ngModel",i.internalPath),l(),T(!((o=i.currentExpressionOption())==null||o.startsWith==null)&&o.startsWith.length?4:-1),l(),T(!((r=i.currentExpressionOption())==null||r.endsWith==null)&&r.endsWith.length?5:-1)}},dependencies:[Xe,_e,ge,Be,me,de,ue],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-level-20)}.filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var yn=["formRef"],Jt=()=>({standalone:!0});function An(t,n){if(t&1){let e=G();s(0,"spk-form-field",42)(1,"input",43),K("ngModelChange",function(o){F(e);let r=p(2);return B(r.editingPath,o)||(r.editingPath=o),g(o)}),a()(),s(2,"button",44),P("click",function(){F(e);let o=p(2);return g(o.updatePath())}),s(3,"spk-icon"),m(4,"floppy-disk"),a()(),s(5,"button",44),P("click",function(){F(e);let o=p(2);return g(o.cancelEditPath())}),s(6,"spk-icon"),m(7,"x-bold"),a()()}if(t&2){let e=p(2);l(),U("ngModel",e.editingPath),u("ngModelOptions",tt(2,Jt))}}function Pn(t,n){if(t&1){let e=G();s(0,"spk-form-field",42),d(1,"input",45),a(),s(2,"button",44),P("click",function(){F(e);let o=p().$implicit,r=p();return g(r.editPath(o))}),s(3,"spk-icon"),m(4,"pen"),a()(),s(5,"button",44),P("click",function(){F(e);let o=p().$implicit,r=p();return g(r.removePath(o))}),s(6,"spk-icon"),m(7,"trash-simple"),a()()}if(t&2){let e=p().$implicit;Ut("readonly",!0),l(),u("ngModel",e)("ngModelOptions",tt(3,Jt))}}function Nn(t,n){if(t&1&&(s(0,"div",30),_(1,An,8,3)(2,Pn,8,4),a()),t&2){let e=n.$implicit,i=p();l(),T(i.oldPath()===e?1:2)}}function kn(t,n){if(t&1){let e=G();s(0,"app-new-filter",47),P("pathChange",function(o){let r=F(e).$index,c=p(2);return g(c.patchPathAt(o,r))})("remove",function(){let o=F(e).$index,r=p(2);return g(r.removePathAt(o))}),a()}if(t&2){let e,i=n.$implicit,o=p(2);u("path",i)("osType",(e=o.osType())!==null&&e!==void 0?e:"")}}function On(t,n){if(t&1&&ne(0,kn,1,2,"app-new-filter",46,te),t&2){let e=p();ie(e.pathArray())}}function $n(t,n){if(t&1&&(s(0,"div",41)(1,"spk-form-field"),d(2,"input",48),a(),s(3,"spk-select",49),d(4,"input",50),a()()),t&2){let e=p();l(3),u("options",e.sizeOptions())("isClearable",!1)}}var Te=new Ce,Mn=["Bytes","KB","MB","GB","TB","PB"],Zt=(t={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>Te.group({path:Te.control(t.path),excludes:Te.group({hidden:Te.control(t.excludes.hidden),system:Te.control(t.excludes.system),temporary:Te.control(t.excludes.temporary),filesLargerThan:Te.group({size:Te.control(null),unit:Te.control(null)})})}),vt=class t{#n=O(fe);#t=O(pe);#e=O(Ae);formRef=Me.required("formRef");sourceDataForm=this.#n.sourceDataForm;sourceDataFormSignal=this.#n.sourceDataFormSignal;newPathCtrl=new ut("");filesLargerThan=b(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=E(Mn);osType=this.#n.osType;pathSignal=j(this.sourceDataForm.controls.path.valueChanges);pathArray=b(()=>this.pathSignal()?.split("\0").filter(n=>n.startsWith("-")||n.startsWith("+")||n==="___none___")??[]);nonFilterPaths=b(()=>this.pathSignal()?.split("\0").filter(n=>!n.startsWith("-")&&!n.startsWith("+")&&n!==""));oldPath=E(null);editingPath=E(null);addingNewPath=E(!1);editPath(n){this.oldPath.set(n),this.editingPath.set(n)}updatePath(){let n=this.oldPath(),e=this.editingPath();if(!n||!e||e===n){this.oldPath.set(null),this.editingPath.set(null);return}let i=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(i?.replace(n,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(n){let e=this.sourceDataForm.controls.path.value??"",i=e.indexOf(n);if(i===-1)return;let o=i===0?n:"\0"+n,r=e.replace(o,"");this.sourceDataForm.controls.path.setValue(r)}addFilter(n="-*"){let e=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${e}\0${n}`)}patchPathAt(n,e){let o=this.sourceDataForm.controls.path.value.split("\0").filter(c=>!c.startsWith("-")&&!c.startsWith("+")).join("\0"),r=this.pathArray().map((c,f)=>f===e?`${n}`:`${c}`).join("\0");this.sourceDataForm.controls.path.setValue(`${o}\0${r}`)}removePathAt(n){let i=this.sourceDataForm.controls.path.value.split("\0").filter(r=>!r.startsWith("-")&&!r.startsWith("+")).join("\0"),o=this.pathArray().filter((r,c)=>c!==n).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${o}`)}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,e=this.newPathCtrl.value;this.sourceDataForm.controls.path.setValue(`${n}\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||t)};static \u0275cmp=le({type:t,selectors:[["app-source-data"]],viewQuery:function(e,i){e&1&&we(i.formRef,yn,5),e&2&&Re()},decls:56,vars:12,consts:()=>{let n;n=$localize`Path`;let e;e=$localize`Add a direct path`;let i;i=$localize`Hidden files`;let o;o=$localize`System files`;let r;r=$localize`Temporary files`;let c;c=$localize`Source Data`;let f;f=$localize`Folder path`;let N;N=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let I;I=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let z;z=$localize`Paths`;let w;w=$localize`Add a path directly from your machine.`;let v;v=$localize`Filters`;let V;V=$localize`Customize your filters.`;let oe;oe=$localize`Add filter`;let Z;Z=$localize`Exclude`;let S;S=$localize`Choose if there’s any files you want to exclude.`;let D;D=$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 q;q=$localize` Temporary files ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let k;k=$localize` Files larger than `;let ae;ae=$localize`Edit path`;let se;return se=$localize`Select an option...`,[["formRef",""],c,f,N,I,z,w,v,V,oe,Z,S,D,L,q,k,[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,"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",i,"formControlName","hidden"],["type","checkbox","placeholder",o,"formControlName","system"],["type","checkbox","placeholder",r,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[1,"small"],["type","text","placeholder",ae,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",se]]},template:function(e,i){if(e&1){let o=G();s(0,"form",16,0),P("submit",function(){return F(o),g(i.next())}),s(2,"div",17)(3,"h3",18),R(4,1),a(),s(5,"app-file-tree",19)(6,"label",20),R(7,2),a(),d(8,"input",21),a(),s(9,"div",22)(10,"button",23),P("click",function(){return F(o),g(i.goBack())}),y(11,3),d(12,"spk-icon"),A(),a(),s(13,"button",24),y(14,4),d(15,"spk-icon"),A(),a()()(),s(16,"div",25)(17,"app-toggle-card",26),H(18,27),R(19,5),X(),s(20,"p",28),R(21,6),a(),s(22,"div",29),ne(23,Nn,3,1,"div",30,te),s(25,"div",31)(26,"spk-form-field"),d(27,"input",32),a(),s(28,"button",33),P("click",function(){return F(o),g(i.addNewPath())}),s(29,"spk-icon"),m(30,"plus"),a()()()()(),s(31,"app-toggle-card",26),H(32,27),R(33,7),X(),s(34,"p",28),R(35,8),a(),s(36,"button",34),P("click",function(){return F(o),g(i.addFilter())}),R(37,9),a(),_(38,On,2,0),a(),s(39,"app-toggle-card",35),H(40,27),R(41,10),X(),s(42,"p",28),R(43,11),a(),s(44,"spk-toggle",36),y(45,12),d(46,"input",37),A(),a(),s(47,"spk-toggle",36),y(48,13),d(49,"input",38),A(),a(),s(50,"spk-toggle",36),y(51,14),d(52,"input",39),A(),a(),s(53,"spk-toggle",40),P("click",function(){return F(o),g(i.toggleFilesLargerThan())}),R(54,15),a(),_(55,$n,5,2,"div",41),a()()()}if(e&2){let o;u("formGroup",i.sourceDataForm),l(5),u("multiSelect",!0)("startingPath",i.getPath())("showFiles",!0),l(12),u("disallowToggle",!0),l(6),ie(i.nonFilterPaths()),l(4),u("formControl",i.newPathCtrl),l(4),u("disallowToggle",!0),l(7),T((o=i.pathSignal())!=null&&o.length?38:-1),l(),u("disallowToggle",!0),l(14),ke("active",i.filesLargerThan()),l(2),T(i.filesLargerThan()?55:-1)}},dependencies:[Xe,Ke,_e,We,Ve,ge,Ue,Be,je,dt,ze,He,mt,de,ue,be,Ge,me,St,_t,qe],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}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 en="1W:1D,4W:1W,12M:1M",De=new Ce,fe=class t{#n=O(pe);#t=O(Le);#e=O(ve);#i=O(Ie);#o=O(gt);generalForm=Qt();sourceDataForm=Zt();scheduleFields={autoRun:E($e.autoRun),nextTime:E($e.nextTime),runAgain:E($e.runAgain)};destinationForm=tn();settings=E([]);optionsFields={remoteVolumeSize:E("50MB"),backupRetention:E("all"),backupRetentionTime:E(""),backupRetentionVersions:E(0),backupRetentionCustom:E("")};isDraft=E(!1);backupId=E(null);backupName=b(()=>this.generalFormSignal()?.name??"");isSubmitting=E(!1);finishedLoading=E(!1);backupDefaults=E(null);isNew=b(()=>this.backupId()==="new");osType=b(()=>this.#t.systemInfo()?.OSType);selectedOptions=E([]);selectedAdvancedFormPair=E([]);destinationFormPair=E({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=b(()=>{let n=this.destinationFormPair()?.advanced??[],e=this.selectedAdvancedFormPair()??[];return n.filter(i=>e.findIndex(o=>o.name===i.name)===-1)});selectedHttpOptions=E([]);notSelectedHttpOptions=b(()=>{let n=this.httpOptions(),e=this.selectedHttpOptions()??[];return n.filter(i=>e.findIndex(o=>o.name===i.name)===-1)});sourceDataFormSignal=j(this.sourceDataForm.valueChanges);destinationFormSignal=j(this.destinationForm.valueChanges);generalFormSignal=j(this.generalForm.valueChanges);encryptionFieldSignal=j(this.generalForm.controls.encryption.valueChanges);destinationOptions=b(()=>this.#t.backendModules()??[]);httpOptions=b(()=>this.#t.systemInfo()?.GenericModules?.find(n=>n.Key==="http-options")?.Options?.map(this.#r)??[]);advancedOptions=b(()=>this.#t.systemInfo()?.Options?.map(this.#r)??[]);#r(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,e)=>n?.name&&e?.name?n?.name.localeCompare(e?.name):0).filter(n=>this.selectedOptions()?.findIndex(e=>e.name===n.name)===-1));addOrUpdateAdvancedFormPairByName(n,e,i){let o=this.selectedAdvancedFormPair().find(r=>r.name===n);if(o)this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.controls[o.name].setValue(i);else{let r=this.notSelectedAdvancedFormPair().find(c=>c.name===n);if(!r)return;this.addAdvancedFormPair(r,e,i)}}addAdvancedFormPairByName(n,e,i){let o=this.notSelectedAdvancedFormPair().find(r=>r.name===n);o&&this.addAdvancedFormPair(o,e,i)}addHttpOptionByName(n,e,i){let o=this.notSelectedHttpOptions().find(r=>r.name===n);o&&this.addHttpOption(o,e,i)}addAdvancedFormPair(n,e,i){let o=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,r=i??n.defaultValue;this.createFormField(o,n,r),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),n])}addHttpOption(n,e,i){let o=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,r=i??n.defaultValue;this.createFormField(o,n,r),this.selectedHttpOptions.set([...this.selectedHttpOptions(),n])}removeAdvancedFormPair(n,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(n.name),this.selectedAdvancedFormPair().findIndex(o=>o.name===n.name)!==-1?this.selectedAdvancedFormPair.update(o=>(o=o.filter(r=>r.name!==n.name),o)):this.selectedHttpOptions.update(o=>(o=o.filter(r=>r.name!==n.name),o))}removeHttpOption(n,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(n.name),this.selectedHttpOptions.update(i=>(i=i.filter(o=>o.name!==n.name),i))}submit(){this.isSubmitting.set(!0);let n=this.#l(),e=this.backupId();e==="new"||!e||this.isDraft()?this.#i.postApiV1Backups({requestBody:n}).pipe(Ze(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{this.exit(!1)},error:i=>{}}):this.#i.putApiV1BackupById({id:e,requestBody:n}).pipe(Ze(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{this.exit(!1)},error:i=>{}})}exit(n){if(!n){this.#p(),this.#n.navigate(["/"]);return}this.#e.open(J,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#p(),this.#n.navigate(["/"]))}})}updateFieldsFromTargetUrl(n){this.#s(),setTimeout(()=>{this.#a(n)})}#s(){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 e=n.Sources??"",i=n.Filters?.map(f=>`${f.Include?"":"-"}${f.Expression}`)??[],o=n.Settings?.find(f=>f.Name==="--exclude-files-attributes")?.Value??"",r=n.Settings?.find(f=>f.Name==="--skip-files-larger-than")??null,c={path:[...e,...i].join("\0"),excludes:{hiddenFiles:o.includes("hidden"),systemFiles:o.includes("system"),tempFiles:o.includes("temporary"),filesLargerThan:r?.Value?.toUpperCase()??null}};this.sourceDataForm.patchValue(c)}mapDestinationToForm(n){let e=n.TargetURL?wt(n.TargetURL):null;e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}#a(n){let e=wt(n);e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}mapGeneralToForm(n){let e=n.Settings?.find(c=>c.Name==="encryption-module"),i=n.Settings?.find(c=>c.Name==="passphrase")?.Value??"",o=e?.Value&&e.Value.length?e.Value:"",r={name:n.Name??"",description:n.Description??""};o&&o!==""&&(r.encryption=o),i&&i!==""&&(r.password=i,r.repeatPassword=i),this.generalForm.patchValue(r)}mapScheduleToForm(n){if(!n){this.scheduleFields.autoRun.set(!1);return}let e=this.#o.fromString(n.Repeat)??null,i=this.#u(n.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(o=>h(h({},o),i)),this.scheduleFields.runAgain.set({repeatValue:e?.value??1,repeatUnit:e?.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}})}mapOptionsToForms(n){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],i=n.Settings?.filter(c=>!e.includes(c.Name)),o=n.Settings?.filter(c=>e.includes(c.Name));this.settings.set(i??[]),i?.forEach(c=>{if(c.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(c.Value??"")});var r="all";o?.forEach(c=>{if(c.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(c.Value??"50MB"),c.Name==="keep-time"&&(c.Value??"")!=="")return r="time",this.optionsFields.backupRetentionTime.set(c.Value??"");if(c.Name==="keep-versions"&&(c.Value??"")!=="")return r="versions",this.optionsFields.backupRetentionVersions.set(c.Value?parseInt(c.Value):null);if(c.Name==="retention-policy"&&(c.Value??"")!=="")if(c.Value===en)r="smart";else return r="custom",this.optionsFields.backupRetentionCustom.set(c.Value??"")}),this.optionsFields.backupRetention.set(r)}getCurrentTargetUrl(){return this.#c(this.destinationForm.controls.destinations)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#l(){let n=this.generalForm.value,e=this.getScheduleFormValue(),i=this.sourceDataForm.value,r=this.destinationForm.value.destinations?.length?this.#c(this.destinationForm.controls.destinations):[],c=null;e.runAgain?.repeatUnit&&e.runAgain?.repeatValue&&(c=this.#o.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let f=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([v,V])=>V).map(([v,V])=>v):[],N=i.path?.split("\0")??[],I=this.mapFormsToSettings(),z=Object.entries(i.excludes??{}).filter(([v,V])=>V&&v!=="filesLargerThan").map(([v])=>v),w=i.excludes?.filesLargerThan;return z.length&&I.push({Name:"--exclude-files-attributes",Value:z.join(",")}),w&&w.size!==null&&w.unit!==null&&I.push({Name:"--skip-files-larger-than",Value:`${w.size}${w.unit}`}),{Backup:{Name:n.name,Description:n.description,TargetURL:r[0]??null,Sources:N.filter(v=>!v.startsWith("-")),Settings:I,Filters:N.filter(v=>v.startsWith("-")).map((v,V)=>({Order:V,Include:!1,Expression:v.slice(1)}))},Schedule:e.autoRun?{Repeat:c,Time:e.nextTime?.date?new Date(`${e.nextTime.date}T${e.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:f}:null}}mapFormsToSettings(n=[]){let e=this.generalForm.value,i=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy","dblock-size"],o=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&(o=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let r=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":r.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":r.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":r.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":r.push({Name:"retention-policy",Value:en});break}let c=[...n,...i],f=this.settings().filter(N=>!c.includes(N.Name)).map(N=>{let I=N.Value;return typeof N.Value=="number"&&(I=N.Value.toString()),typeof N.Value=="boolean"&&(I=N.Value?"True":"False"),{Name:N.Name,Value:I}});return[...o,...r,...f]}#c(n){return n.controls.map(e=>Ct(e.value))}#u(n){if(!n||n?.indexOf("T")===-1)return{time:n??"13:00"};let e=new Date(n);return{time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`,date:e.toISOString().split("T")[0]}}createFormField(n,e,i){if(e.type==="String"||e.type==="FileTree"||e.type==="FolderTree"||e.type==="Password"||e.type==="Enumeration"||e.type==="NonValidatedSelectableString"||e.type==="Path"){n.addControl(e.name,De.control(i));return}if(e.type==="Size"){n.addControl(e.name,De.control(i));return}if(e.type==="Integer"){n.addControl(e.name,De.control(i?parseInt(i):0));return}if(e.type==="Boolean"){n.addControl(e.name,De.control(i==="true"||i==="True"));return}if(e.type==="Flags"){n.addControl(e.name,De.control(i??""));return}if(e.type==="Timespan"||e.type==="DateTime"){n.addControl(e.name,De.control(i,[Fe.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(n,e,i=!1){let o=Se.find(S=>S.customKey===n||S.key===n),r=o?.key,c=this.destinationOptions().find(S=>S.Key===r),f=this.httpOptions();if(!c||!c.Options)return;let N=o&&o.oauthField?o.oauthField:null,I=o&&o.customFields?o.customFields:{},z=o&&o.dynamicFields?o.dynamicFields:[],w=o&&o.advancedFields?o.advancedFields:[],v=o&&o.ignoredAdvancedFields?o.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:N,custom:[],dynamic:[],advanced:[]});let V=De.group({}),oe=De.group({}),Z=De.group({});I&&Object.entries(I).forEach(([S,D],L)=>{let ae=D,{formElement:q}=ae,k=Lt(ae,["formElement"]);V.addControl(S,q(e?.custom[S])),this.destinationFormPair.update(se=>(se.custom.push(h({order:900+L},k)),se))});for(let S=0;S<c.Options.length;S++){let D=c.Options[S];if(D.Deprecated)continue;let L=z.find(q=>q===D.Name||D.Aliases?.includes(q.name)||q.name===D.Name);if(L){let q=D.Aliases?.indexOf(L.name)??-1,k=D.Aliases&&q>-1?D.Aliases[q]:D.Name,ae=L&&typeof L!="string",se=ae?L?.defaultValue??D.DefaultValue:D.DefaultValue,x={name:k,type:D.Type,shortDescription:D.ShortDescription??void 0,longDescription:D.LongDescription??void 0,options:D.ValidValues,order:900+S},Qe=ae?h(h({},x),L):x,ee=e?.dynamic[k]??se??D.DefaultValue;this.createFormField(oe,Qe,ee),this.destinationFormPair.update(Gt=>(Gt.dynamic.push(Qe),Gt))}else{if(v.find(ee=>ee===D.Name))continue;let k=w.find(ee=>ee===D.Name||ee.name===D.Name),ae=k&&typeof k!="string",se=e?.advanced[D.Name],x=se??D.DefaultValue,Qe={name:D.Name,type:D.Type,shortDescription:D.ShortDescription??void 0,longDescription:D.LongDescription??void 0,options:D.ValidValues,defaultValue:x,order:900+S},rt=ae?h(h({},Qe),k):Qe;i&&se&&(this.createFormField(Z,rt,x),this.selectedAdvancedFormPair.update(ee=>(ee.push(rt),ee))),this.destinationFormPair.update(ee=>(ee.advanced.push(rt),ee))}}for(let S=0;S<f.length;S++){let D=f[S],L=e?.advanced[D.name],q=L??D.defaultValue;i&&L&&(this.createFormField(Z,D,q),this.selectedHttpOptions.update(k=>(k.push(D),k)))}this.destinationFormPair.update(S=>({oauthField:S.oauthField,custom:S.custom.sort((D,L)=>D.order-L.order),dynamic:S.dynamic.sort((D,L)=>D.order-L.order),advanced:S.advanced.sort((D,L)=>D.order-L.order)})),this.destinationForm.controls.destinations.push(nn({key:o?.customKey??n,customGroup:V,dynamicGroup:oe,advancedGroup:Z}))}#p(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set($e.autoRun),this.scheduleFields.nextTime.set($e.nextTime),this.scheduleFields.runAgain.set($e.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([])}static \u0275fac=function(e){return new(e||t)};static \u0275prov=ye({token:t,factory:t.\u0275fac,providedIn:"root"})};var wn=["formRef"],Rn=(t,n,e,i)=>({index:t,formView:n,formGroupName:"custom",destinationType:e,oauthField:i}),Dt=t=>({$implicit:t}),xn=(t,n,e,i)=>({index:t,formView:n,formGroupName:"dynamic",destinationType:e,oauthField:i}),In=(t,n,e,i)=>({index:t,formView:n,formGroupName:"advanced",destinationType:e,oauthField:i}),vn=(t,n,e,i)=>({index:t,formView:n,formGroupName:"advanced",asHttpOptions:!0,destinationType:e,oauthField:i}),bn=()=>({maxWidth:"700px",width:"100%"});function Gn(t,n){t&1&&(y(0,5,2),d(1,"spk-icon"),A())}function Ln(t,n){t&1&&R(0,5,3)}function Vn(t,n){if(t&1){let e=G();y(0,5,1),s(1,"button",21),P("click",function(){F(e);let o=p();return g(o.testDestination())}),_(2,Gn,2,0)(3,Ln,1,0),a(),A()}if(t&2){let e=p();l(),ke("loader",e.testLoading())("success",e.successfulTest()),l(),T(e.successfulTest()?2:3)}}function Un(t,n){if(t&1){let e=G();s(0,"p",27),P("click",function(){F(e);let o=p();return g(o.removeDestinationFormGroup(o.destinationCount()-1))}),y(1,8),d(2,"span",28),A(),a()}}function Bn(t,n){if(t&1){let e=G();s(0,"div",34),P("click",function(){let o=F(e).$implicit,r=p(2);return g(r.addDestinationFormGroup(o.key))}),s(1,"h3"),m(2),a(),s(3,"p"),m(4),a()()}if(t&2){let e=n.$implicit;l(2),xe(e.displayName),l(2),xe(e.description)}}function Kn(t,n){if(t&1){let e=G();s(0,"button",35,1),P("click",function(){let o=F(e).$implicit,r=p(2);return g(r.addDestinationFormGroup(o.key))}),m(2),a()}if(t&2){let e=n.$implicit;l(2),Y(" ",e.displayName," ")}}function Wn(t,n){if(t&1&&(s(0,"div",29),ne(1,Bn,5,2,"div",30,te),a(),s(3,"spk-menu",31)(4,"button",32),R(5,9),a(),H(6,20),ne(7,Kn,3,1,"button",33,te),X(),a()),t&2){let e=p();l(),ie(e.destinationTypeOptionsFocused()),l(2),u("searchable",!0),l(4),ie(e.destinationTypeOptionsNotFocused())}}function zn(t,n){t&1&&et(0)}function Hn(t,n){if(t&1&&_(0,zn,1,0,"ng-container",40),t&2){let e,i=n.$implicit,o=n.$index;p();let r=re(29),c=p();u("ngTemplateOutlet",r)("ngTemplateOutletContext",nt(7,Dt,it(2,Rn,o,i,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function Xn(t,n){t&1&&et(0)}function jn(t,n){if(t&1&&_(0,Xn,1,0,"ng-container",40),t&2){let e,i=n.$implicit,o=n.$index;p();let r=re(29),c=p();u("ngTemplateOutlet",r)("ngTemplateOutletContext",nt(7,Dt,it(2,xn,o,i,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function qn(t,n){if(t&1){let e=G();y(0,10,1),s(1,"button",35,1),P("click",function(){let o=F(e).$implicit,r=p(2);return g(r.addAdvancedFormPair(o,0))}),a(),A()}if(t&2){let e=n.$implicit;l(),At(e.name),Pt(0)}}function Yn(t,n){t&1&&et(0)}function Qn(t,n){if(t&1&&_(0,Yn,1,0,"ng-container",40),t&2){let e,i=n.$implicit,o=n.$index;p();let r=re(29),c=p();u("ngTemplateOutlet",r)("ngTemplateOutletContext",nt(7,Dt,it(2,In,o,i,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function Jn(t,n){if(t&1){let e=G();y(0,11,1),s(1,"button",35,1),P("click",function(){let o=F(e).$implicit,r=p(2);return g(r.addHttpOption(o,0))}),a(),A()}if(t&2){let e=n.$implicit;l(),At(e.name),Pt(0)}}function Zn(t,n){t&1&&et(0)}function ei(t,n){if(t&1&&_(0,Zn,1,0,"ng-container",40),t&2){let e,i=n.$implicit,o=n.$index;p();let r=re(29),c=p();u("ngTemplateOutlet",r)("ngTemplateOutletContext",nt(7,Dt,it(2,vn,o,i,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function ti(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),t&2){let e=p(2).$implicit;u("message",e.formView.longDescription)}}function ni(t,n){if(t&1&&(s(0,"app-file-tree",43)(1,"label",47),m(2),_(3,ti,3,1,"spk-tooltip",48),a(),d(4,"input",49),a()),t&2){let e,i=p().$implicit,o=p(2);u("startingPath",o.getFormFieldValue(0,i.formGroupName,i.formView.name))("accepts",i.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),W("for","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),l(),Y(" ",(e=i.formView.shortDescription)!==null&&e!==void 0?e:i.formView.name," "),l(),T(i.formView.longDescription?3:-1),l(),W("id","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),ce("formControlName",i.formView.name)}}function ii(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),t&2){let e=p(2).$implicit;u("message",e.formView.longDescription)}}function oi(t,n){if(t&1&&(s(0,"app-file-tree",44)(1,"label",47),m(2),_(3,ii,3,1,"spk-tooltip",48),a(),d(4,"input",49),a()),t&2){let e,i=p().$implicit,o=p(2);u("hideShortcuts",!0)("startingPath",o.getFormFieldValue(0,i.formGroupName,i.formView.name)),l(),W("for","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),l(),Y(" ",(e=i.formView.shortDescription)!==null&&e!==void 0?e:i.formView.name," "),l(),T(i.formView.longDescription?3:-1),l(),W("id","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),ce("formControlName",i.formView.name)}}function ri(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),t&2){let e=p(2).$implicit;u("message",e.formView.longDescription)}}function ai(t,n){t&1&&(s(0,"spk-icon",51),m(1,"link"),a())}function si(t,n){t&1&&(s(0,"spk-icon",51),m(1,"envelope"),a())}function li(t,n){t&1&&(s(0,"spk-icon",51),m(1,"textbox"),a())}function ci(t,n){if(t&1&&(s(0,"spk-form-field")(1,"label",47),m(2),_(3,ri,3,1,"spk-tooltip",48),a(),d(4,"input",50),_(5,ai,2,0,"spk-icon",51)(6,si,2,0,"spk-icon",51)(7,li,2,0,"spk-icon",51),a()),t&2){let e,i=p().$implicit;l(),W("for","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),l(),Y(" ",(e=i.formView.shortDescription)!==null&&e!==void 0?e:i.formView.name," "),l(),T(i.formView.longDescription?3:-1),l(),W("id","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),ce("formControlName",i.formView.name),u("type",i.formView.type==="Email"?"email":"text"),l(),T(i.formView.type==="Path"?5:i.formView.type==="Email"?6:7)}}function pi(t,n){if(t&1){let e=G();s(0,"span",55),P("click",function(){F(e);let o=p(2).$implicit,r=p(2);return g(r.oauthStartTokenCreation(o.destinationType,o))}),m(1," AuthID "),a()}}function ui(t,n){t&1&&(s(0,"spk-icon",51),m(1,"password"),a())}function di(t,n){if(t&1){let e=G();s(0,"spk-icon",56),P("click",function(){F(e);let o=p(2).$implicit;return g(o.formView.showPassword=!o.formView.showPassword)}),m(1," eye "),a()}}function mi(t,n){if(t&1){let e=G();s(0,"spk-icon",56),P("click",function(){F(e);let o=p(2).$implicit;return g(o.formView.showPassword=!o.formView.showPassword)}),m(1," eye-slash "),a()}}function _i(t,n){if(t&1&&(s(0,"spk-form-field")(1,"label",47),m(2),a(),d(3,"input",52),_(4,pi,2,0,"span",53)(5,ui,2,0,"spk-icon",51)(6,di,2,0,"spk-icon",54)(7,mi,2,0,"spk-icon",54),a()),t&2){let e,i=p().$implicit;l(),W("for","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),l(),Y(" ",(e=i.formView.shortDescription)!==null&&e!==void 0?e:i.formView.name," "),l(),W("id","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),ce("formControlName",i.formView.name),u("type",i.formView.showPassword?"text":"password"),l(),T(i.oauthField===i.formView.name?4:5),l(2),T(i.formView.showPassword?6:7)}}function Fi(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),t&2){let e=p(3).$implicit;u("message",e.formView.longDescription)}}function gi(t,n){if(t&1&&m(0),t&2){let e=p().$implicit;Nt(" ",e==null?null:e.key," (",e==null?null:e.value,") ")}}function Ci(t,n){if(t&1&&m(0),t&2){let e=p().$implicit;Y(" ",e," ")}}function hi(t,n){if(t&1&&_(0,gi,1,2)(1,Ci,1,1),t&2){let e=p(3).$implicit;T(e.formView.loadOptions?0:1)}}function fi(t,n){if(t&1&&(s(0,"spk-select",57)(1,"label",47),m(2),_(3,Fi,3,1,"spk-tooltip",48),a(),d(4,"input",49),a(),_(5,hi,2,1,"ng-template",null,3,ot)),t&2){let e,i=re(6);p();let o=$t(0),r=p().$implicit;u("options",o)("isClearable",!1)("optionTemplate",i),l(),W("for","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),l(),Y(" ",(e=r.formView.shortDescription)!==null&&e!==void 0?e:r.formView.name," "),l(),T(r.formView.longDescription?3:-1),l(),W("id","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),ce("formControlName",r.formView.name)}}function Si(t,n){if(t&1&&(kt(0),_(1,fi,7,14)),t&2){let e=p().$implicit,i=Ot(e.formView.loadOptions?e.formView.loadOptions(p(2).injector)():e.formView.options);l(),T(i?1:-1)}}function Ti(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),t&2){let e=p(3).$implicit;u("message",e.formView.longDescription)}}function Di(t,n){if(t&1&&m(0),t&2){let e=n.$implicit;Nt(" ",e.key," ",e.value?"("+e.value+")":""," ")}}function Ei(t,n){if(t&1&&(s(0,"spk-select",59)(1,"label",47),m(2),_(3,Ti,3,1,"spk-tooltip",48),a(),d(4,"input",49),a(),_(5,Di,1,2,"ng-template",null,4,ot)),t&2){let e,i=re(6);p();let o=$t(0),r=p().$implicit;u("options",o)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",i),l(),W("for","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),l(),Y(" ",(e=r.formView.shortDescription)!==null&&e!==void 0?e:r.formView.name," "),l(),T(r.formView.longDescription?3:-1),l(),W("id","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),ce("formControlName",r.formView.name)}}function yi(t,n){t&1&&d(0,"spk-progress-bar",58)}function Ai(t,n){if(t&1&&(kt(0),_(1,Ei,7,15)(2,yi,1,0,"spk-progress-bar",58)),t&2){let e=p().$implicit,i=Ot(e.formView.loadOptions?e.formView.loadOptions(p(2).injector)():e.formView.options);l(),T(i?1:2)}}function Pi(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),t&2){let e=p(2).$implicit;u("message",e.formView.longDescription)}}function Ni(t,n){if(t&1&&(s(0,"app-size",45)(1,"label",47),m(2),_(3,Pi,3,1,"spk-tooltip",48),a()()),t&2){let e,i=p().$implicit;u("inputType",i.Name)("formControlName",i.formView.name)("customId",`destination-{{ item.formGroupName }}-{{ item.index }}-{{
7
+ item.asHttpOptions ? 'http' : 'other'
8
+ }}`),l(),W("for","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),l(),Y(" ",(e=i.formView.shortDescription)!==null&&e!==void 0?e:i.formView.name," "),l(),T(i.formView.longDescription?3:-1)}}function ki(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),t&2){let e=p(2).$implicit;u("message",e.formView.longDescription)}}function Oi(t,n){if(t&1&&(s(0,"spk-form-field")(1,"label",47),m(2),_(3,ki,3,1,"spk-tooltip",48),a(),d(4,"input",60),s(5,"spk-icon",51),m(6,"numpad"),a()()),t&2){let e,i=p().$implicit;l(),W("for","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),l(),Y(" ",(e=i.formView.shortDescription)!==null&&e!==void 0?e:i.formView.name," "),l(),T(i.formView.longDescription?3:-1),l(),W("id","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),ce("formControlName",i.formView.name)}}function $i(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),t&2){let e=p(2).$implicit;u("message",e.formView.longDescription)}}function Mi(t,n){if(t&1&&(s(0,"spk-toggle",46)(1,"label",47),m(2),_(3,$i,3,1,"spk-tooltip",48),a(),d(4,"input",61),a()),t&2){let e,i=p().$implicit;l(),W("for","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),l(),Y(" ",(e=i.formView.shortDescription)!==null&&e!==void 0?e:i.formView.name," "),l(),T(i.formView.longDescription?3:-1),l(),W("id","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),ce("formControlName",i.formView.name)}}function wi(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),t&2){let e=p(2).$implicit;u("message",e.formView.longDescription)}}function Ri(t,n){if(t&1&&m(0),t&2){let e=n.$implicit;Y(" ",e," ")}}function xi(t,n){if(t&1&&(s(0,"spk-select",62)(1,"label",47),m(2),_(3,wi,3,1,"spk-tooltip",48),a(),d(4,"input",63),a(),_(5,Ri,1,1,"ng-template",null,4,ot)),t&2){let e,i=re(6),o=p().$implicit;u("options",o.formView.options)("selectMultiple",!0)("optionTemplate",i),l(),Bt("for","destination-",o.formGroupName,"-",o.index,""),l(),Y(" ",(e=o.formView.shortDescription)!==null&&e!==void 0?e:o.formView.name," "),l(),T(o.formView.longDescription?3:-1),l(),ce("formControlName",o.formView.name)}}function Ii(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),t&2){let e=p(2).$implicit;u("message",e.formView.longDescription)}}function vi(t,n){if(t&1&&(s(0,"app-timespan",45)(1,"label",47),m(2),_(3,Ii,3,1,"spk-tooltip",48),a()()),t&2){let e,i=p().$implicit;u("inputType",i.formView.name)("formControlName",i.formView.name)("customId","destination-"+i.formGroupName+"-"+i.index+"-"+(i.asHttpOptions?"http":"other")),l(),W("for","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),l(),Y(" ",(e=i.formView.shortDescription)!==null&&e!==void 0?e:i.formView.name," "),l(),T(i.formView.longDescription?3:-1)}}function bi(t,n){if(t&1){let e=G();s(0,"button",64),P("click",function(){F(e);let o=p().$implicit,r=p(2);return g(r.removeFormView(o.formView,0))}),s(1,"spk-icon"),m(2,"x-circle"),a()()}}function Gi(t,n){if(t&1&&(s(0,"div",41),H(1,42),_(2,ni,5,17,"app-file-tree",43)(3,oi,5,13,"app-file-tree",44)(4,ci,8,13,"spk-form-field")(5,_i,8,13,"spk-form-field")(6,Si,2,2)(7,Ai,3,2)(8,Ni,4,9,"app-size",45)(9,Oi,7,11,"spk-form-field")(10,Mi,5,11,"spk-toggle",46)(11,xi,7,9)(12,vi,4,9,"app-timespan",45),X(),_(13,bi,3,0,"button",32),a()),t&2){let e=n.$implicit;ke("single-field",e.formGroupName!=="advanced"),l(),u("formGroupName",e.formGroupName),l(),T(e.formView.type==="FileTree"?2:e.formView.type==="FolderTree"?3:e.formView.type==="String"||e.formView.type==="Path"||e.formView.type==="Email"?4:e.formView.type==="Password"?5:e.formView.type==="Enumeration"?6:e.formView.type==="NonValidatedSelectableString"?7:e.formView.type==="Size"?8:e.formView.type==="Integer"?9:e.formView.type==="Boolean"?10:e.formView.type==="Flags"?11:e.formView.type==="Timespan"||e.formView.type==="DateTime"?12:-1),l(11),T(e.formGroupName==="advanced"?13:-1)}}function Li(t,n){if(t&1&&(H(0,22)(1,36),ne(2,Hn,1,9,"ng-container",null,te),ne(4,jn,1,9,"ng-container",null,te),s(6,"app-toggle-card",37),H(7,38),y(8,10),s(9,"spk-menu",31)(10,"button",39),d(11,"spk-icon"),a(),H(12,20),ne(13,qn,3,1,"button",33,te),X(),a(),A(),X(),ne(15,Qn,1,9,"ng-container",null,te),a(),s(17,"app-toggle-card",37),H(18,38),y(19,11),s(20,"spk-menu",31)(21,"button",39),d(22,"spk-icon"),a(),H(23,20),ne(24,Jn,3,1,"button",33,te),X(),a(),A(),X(),ne(26,ei,1,9,"ng-container",null,te),a(),_(28,Gi,14,5,"ng-template",null,2,ot),X()()),t&2){let e=p();l(2),ie(e.destinationFormPair().custom),l(2),ie(e.destinationFormPair().dynamic),l(2),u("disallowToggle",!0),l(3),u("searchable",!0),l(),u("disabled",e.notSelectedAdvancedFormPair().length===0),l(3),ie(e.notSelectedAdvancedFormPair()),l(2),ie(e.selectedAdvancedFormPair()),l(2),u("disallowToggle",!0),l(3),u("searchable",!0),l(),u("disabled",e.notSelectedHttpOptions().length===0),l(3),ie(e.notSelectedHttpOptions()),l(2),ie(e.selectedHttpOptions())}}function Vi(t,n){if(t&1){let e=G();s(0,"spk-dialog",65),K("isOpenChange",function(o){F(e);let r=p();return B(r.targetUrlDialogOpen,o)||(r.targetUrlDialogOpen=o),g(o)}),s(1,"header",66)(2,"h2"),R(3,12),a(),s(4,"spk-alert",67),R(5,13),a()(),s(6,"div",68)(7,"spk-form-field"),d(8,"textarea",69),a()(),s(9,"footer",70)(10,"button",24),P("click",function(){F(e);let o=p();return g(o.closeTargetUrlDialog(!1))}),m(11,"Cancel"),a(),s(12,"button",71),P("click",function(){F(e);let o=p();return g(o.closeTargetUrlDialog(!0))}),y(13,14),d(14,"spk-icon"),A(),a()()()}if(t&2){let e=p();U("isOpen",e.targetUrlDialogOpen),u("options",tt(3,bn)),l(8),u("formControl",e.targetUrlCtrl)}}var Tt=new Ce,tn=(t={destinations:[]})=>Tt.group({destinations:Tt.array(t.destinations)}),nn=({key:t,customGroup:n,dynamicGroup:e,advancedGroup:i})=>Tt.group({destinationType:Tt.control(t),custom:n,dynamic:e,advanced:i}),bt=class t{#n=O(pe);#t=O(Ae);#e=O(fe);#i=O(ve);#o=O(Ft);injector=O(Vt);formRef=Me.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=b(()=>this.destinationFormSignal()?.destinations?.length??0);successfulTest=E(!1);testLoading=E(!1);destinationTypeOptionsInFocus=E(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=E(Se.map(n=>({key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description})));destinationTypeOptionsFocused=b(()=>{let n=this.destinationTypeOptionsInFocus(),e=this.destinationTypeOptions();return n.map(i=>e.find(o=>o.key===i))});destinationTypeOptionsNotFocused=b(()=>{let n=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(i=>!n.includes(i.key))});getFormFieldValue(n,e,i){return((this.destinationForm.controls.destinations.controls?.[n]).controls?.[e]).controls[i].value}getFormControl(n,e,i){return((this.destinationForm.controls.destinations.controls?.[n]).controls?.[e]).controls[i]}addDestinationFormGroup(n){this.#e.addDestinationFormGroup(n)}addAdvancedFormPair(n,e){this.#e.addAdvancedFormPair(n,e)}removeFormView(n,e){this.#e.removeAdvancedFormPair(n,e)}addHttpOption(n,e){this.#e.addHttpOption(n,e)}targetUrl=b(()=>this.#e.getCurrentTargetUrl()[0]);targetUrlCtrl=new ut;targetUrlInitial=E(null);targetUrlDialogOpen=E(!1);openTargetUrlDialog(){let e=this.#e.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(e),this.targetUrlInitial.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl.value,i=this.targetUrlInitial();!n||e===i||this.#e.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(n=0){let i=this.#e.getCurrentTargetUrl()[n];i&&(this.testLoading.set(!0),this.#o.testDestination(i,n,!0).pipe(Ze(()=>this.testLoading.set(!1))).subscribe({next:o=>{if(o.action==="success"){this.#e.isNew()&&(o.containsBackup===!0?this.#i.open(J,{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}}):o.anyFilesFound===!0&&this.#i.open(J,{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(o.action==="generic-error"){this.successfulTest.set(!1);return}o.action==="trust-cert"&&this.#e.addHttpOptionByName("accept-specified-ssl-hash",o.destinationIndex,o.certData),o.action==="approve-host-key"&&this.#e.addOrUpdateAdvancedFormPairByName("ssh-fingerprint",o.destinationIndex,o.reportedHostKey),o.testAgain&&this.testDestination(o.destinationIndex)}}))}mapToTargetUrl(n){return Ct(n.value)}removeDestinationFormGroup(n){this.destinationForm.controls.destinations.removeAt(n)}displayFn(n){let e=this.destinationOptions().find(i=>i.Key===n);return e?`${e.DisplayName}`:""}goBack(){this.#n.navigate(["general"],{relativeTo:this.#t.parent})}next(){this.#n.navigate(["source-data"],{relativeTo:this.#t.parent})}#r=E("https://duplicati-oauth-handler.appspot.com/").asReadonly();#s=E(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#a=E(!1);#l=E(null);keyCreation(){}oauthStartTokenCreation(n,e){let i=this.getFormControl(e.index,e.formGroupName,e.formView.name);this.#a.set(!0);let o=this.#s(),r=450,c=600,f=this.#r()+"?type="+n+"&token="+o,N=screen.width/2-r/2,I=screen.height/2-c/2,z=window.open(f,"_blank","height="+c+",width="+r+",menubar=0,status=0,titlebar=0,toolbar=0,left="+N+",top="+I);return window.addEventListener("message",w=>{let v=w.data.startsWith("authid:"),V=v?w.data.replace("authid:",""):null;console.log("event",w),v&&(i.setValue(V),this.#a.set(!1),z?.close())}),!1}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=le({type:t,selectors:[["app-destination"]],viewQuery:function(e,i){e&1&&we(i.formRef,wn,5),e&2&&Re()},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=Oe(n);let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let i;i=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let o;o=$localize` Want to select another destination? ${"\uFFFD#2\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPAN:`;let r;r=$localize`Other destinations`;let c;c=$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:`,c=Oe(c);let f;f=$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:`,f=Oe(f);let N;N=$localize`Edit target URL`;let I;I=$localize` Be careful, this will overwrite everything you have in your destination. `;let z;return z=$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,e,i,o,r,c,f,N,I,z,[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,"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"],["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,i){if(e&1){let o=G();s(0,"form",15,0),P("submit",function(){return F(o),g(i.next())}),s(2,"header")(3,"h3",16),y(4,5),s(5,"div",17),_(6,Vn,4,5,"button",18),s(7,"spk-menu")(8,"button",19),d(9,"spk-icon"),a(),H(10,20),s(11,"button",21),P("click",function(){return F(o),g(i.openTargetUrlDialog())}),d(12,"spk-icon"),a(),X(),a()(),A(),a(),_(13,Un,3,0,"p"),a(),_(14,Wn,9,1)(15,Li,30,6,"ng-container",22),s(16,"div",23)(17,"button",24),P("click",function(){return F(o),g(i.goBack())}),y(18,6),d(19,"spk-icon"),A(),a(),s(20,"button",25),y(21,7),d(22,"spk-icon"),A(),a()()(),_(23,Vi,15,4,"spk-dialog",26)}if(e&2){let o;u("formGroup",i.destinationForm),l(6),T(i.destinationCount()>0?6:-1),l(7),T(i.destinationCount()>0?13:-1),l(),T(i.destinationCount()===0?14:-1),l(),T(!((o=i.destinationFormSignal())==null||o.destinations==null)&&o.destinations.length?15:-1),l(8),T(i.targetUrlDialogOpen()?23:-1)}},dependencies:[je,Ke,_e,We,Ve,ge,Ue,dt,ze,He,mt,Ht,Kt,de,zt,ue,Ge,pt,Wt,lt,me,ct,Yt,qe,_t,qt],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,Ct as b,Se as c,tn as d,nn as e,bt as f,Qt as g,xt as h,Rt as i,$e as j,It as k,Zt as l,vt as m,fe as n};
@@ -0,0 +1 @@
1
+ import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-DDMQ6BLY.js")},{path:"destination",loadComponent:()=>import("./chunk-FKJJQJD5.js")},{path:"source-data",loadComponent:()=>import("./chunk-TZUFH3TN.js")},{path:"schedule",loadComponent:()=>import("./chunk-QDH6LNFG.js")},{path:"options",loadComponent:()=>import("./chunk-RGVPD4PJ.js")}];export{o as default};
@@ -0,0 +1 @@
1
+ import{a,b}from"./chunk-PFWSXI4B.js";import"./chunk-6FFPXENZ.js";import"./chunk-SPHWZHBB.js";import"./chunk-HTNYQE2B.js";import"./chunk-GJROCOAD.js";import"./chunk-7L42EO7J.js";import"./chunk-T2OUHRUV.js";import"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import"./chunk-NMXJMVL5.js";import"./chunk-JSGFZ2GA.js";import"./chunk-CKPICCFH.js";import"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";export{a as createRestoreOptionsForm,b as default};
@@ -1 +1 @@
1
- import{a as k}from"./chunk-TJS6O6KD.js";import"./chunk-2ZVLF3KW.js";import"./chunk-6OKAWH4X.js";import"./chunk-GDHVQU56.js";import"./chunk-RHW5QVAY.js";import"./chunk-O2YN63YI.js";import"./chunk-T2OUHRUV.js";import"./chunk-CHRKPWRG.js";import"./chunk-I3C2AEHI.js";import{e as S}from"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{a as T,g as M,h as f}from"./chunk-WX7L7V6J.js";import"./chunk-4AECHE4W.js";import"./chunk-JV6DGJII.js";import"./chunk-CKPICCFH.js";import"./chunk-EF7JWRDC.js";import{Gb as s,Hb as l,Ib as i,Qa as c,ab as D,lc as d,nb as r,wb as e,xb as n,yb as _}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";var E=()=>["/backup/new"],F=()=>["/backup/import"],u=class C{static \u0275fac=function(t){return new(t||C)};static \u0275cmp=D({type:C,selectors:[["app-add-backup"]],decls:23,vars:4,consts:()=>{let a;a=$localize`Add a new backup`;let t;t=$localize`New backup`;let p;p=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let A;A=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let g;g=$localize`Import from file`;let P;P=$localize`Import backup configuration from a file. During import you can adjust the setings.`;let m;return m=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[a,t,p,A,g,P,m,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["spk-button","",1,"raised","primary",3,"routerLink"]]},template:function(t,p){t&1&&(_(0,"app-status-bar"),e(1,"section")(2,"h2"),i(3,0),n(),e(4,"div",7)(5,"spk-card",8),_(6,"img",9),e(7,"h3"),i(8,1),n(),e(9,"p"),i(10,2),n(),e(11,"button",10),s(12,3),_(13,"spk-icon"),l(),n()(),e(14,"spk-card",8),_(15,"img",9),e(16,"h3"),i(17,4),n(),e(18,"p"),i(19,5),n(),e(20,"button",10),s(21,6),_(22,"spk-icon"),l(),n()()()()),t&2&&(c(11),r("routerLink",d(2,E)),c(9),r("routerLink",d(3,F)))},dependencies:[k,M,f,T,S],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:700px}spk-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}spk-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:300px}spk-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{u as default};
1
+ import{a as k}from"./chunk-554T66WI.js";import"./chunk-7LU4D3GR.js";import"./chunk-EXJKKQZX.js";import"./chunk-OTLEEXAA.js";import"./chunk-RHW5QVAY.js";import"./chunk-O2YN63YI.js";import"./chunk-T2OUHRUV.js";import"./chunk-F4EEOSGJ.js";import"./chunk-I3C2AEHI.js";import{e as S}from"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{a as T,g as M,h as f}from"./chunk-NMXJMVL5.js";import"./chunk-JSGFZ2GA.js";import"./chunk-L76NC2T6.js";import"./chunk-CKPICCFH.js";import"./chunk-EF7JWRDC.js";import{Gb as s,Hb as l,Ib as i,Qa as c,ab as D,lc as d,nb as r,wb as e,xb as n,yb as _}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";var E=()=>["/backup/new"],F=()=>["/backup/import"],u=class C{static \u0275fac=function(t){return new(t||C)};static \u0275cmp=D({type:C,selectors:[["app-add-backup"]],decls:23,vars:4,consts:()=>{let a;a=$localize`Add a new backup`;let t;t=$localize`New backup`;let p;p=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let A;A=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let g;g=$localize`Import from file`;let P;P=$localize`Import backup configuration from a file. During import you can adjust the setings.`;let m;return m=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[a,t,p,A,g,P,m,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["spk-button","",1,"raised","primary",3,"routerLink"]]},template:function(t,p){t&1&&(_(0,"app-status-bar"),e(1,"section")(2,"h2"),i(3,0),n(),e(4,"div",7)(5,"spk-card",8),_(6,"img",9),e(7,"h3"),i(8,1),n(),e(9,"p"),i(10,2),n(),e(11,"button",10),s(12,3),_(13,"spk-icon"),l(),n()(),e(14,"spk-card",8),_(15,"img",9),e(16,"h3"),i(17,4),n(),e(18,"p"),i(19,5),n(),e(20,"button",10),s(21,6),_(22,"spk-icon"),l(),n()()()()),t&2&&(c(11),r("routerLink",d(2,E)),c(9),r("routerLink",d(3,F)))},dependencies:[k,M,f,T,S],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:700px}spk-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}spk-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:300px}spk-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{u as default};
@@ -1 +1 @@
1
- import{a as u}from"./chunk-WX7L7V6J.js";import{$b as s,Mb as h,Ob as _,Pb as a,Qa as g,Za as d,ab as p,fb as m,pb as f,ra as r,sb as C,wb as o,xb as n}from"./chunk-W2F756OF.js";var v=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],P=["[title]","[description]","[action]","*"];function M(e,l){e&1&&s(0,"Title")}function T(e,l){e&1&&(o(0,"spk-icon"),s(1,"caret-down"),n())}var c=class e{isActive=d(!1);disallowToggle=r(!1);ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=p({type:e,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(t,i){t&2&&f("active",i.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:P,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(t,i){t&1&&(_(v),o(0,"header")(1,"div",0)(2,"h3",1),h("click",function(){return i.disallowToggle()||i.toggle()}),a(3,0,null,M,1,0),m(5,T,2,0,"spk-icon"),n(),a(6,1),n(),o(7,"div",2),a(8,2),n()(),o(9,"div",3),a(10,3),n()),t&2&&(g(5),C(i.disallowToggle()?-1:5))},dependencies:[u],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;border-radius:var(--shape-3);background-color:var(--base-level-20)}.active[_nghost-%COMP%] .content[_ngcontent-%COMP%]{max-height:1000px;transition:max-height 1s linear;padding:0 1rem 1rem}.active[_nghost-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}[_nghost-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;font:var(--paragraph-10);cursor:pointer;-webkit-user-select:none;user-select:none}[_nghost-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(0);transform-origin:center;transition:transform .2s ease}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1 0}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]:empty{display:none}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0 1rem;overflow:hidden;max-height:0;transition:max-height .25s linear,padding .25s linear}.content[_ngcontent-%COMP%]:empty{display:none}"],changeDetection:0})};export{c as a};
1
+ import{a as u}from"./chunk-NMXJMVL5.js";import{$b as s,Mb as h,Ob as _,Pb as a,Qa as g,Za as d,ab as p,fb as m,pb as f,ra as r,sb as C,wb as o,xb as n}from"./chunk-W2F756OF.js";var v=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],P=["[title]","[description]","[action]","*"];function M(e,l){e&1&&s(0,"Title")}function T(e,l){e&1&&(o(0,"spk-icon"),s(1,"caret-down"),n())}var c=class e{isActive=d(!1);disallowToggle=r(!1);ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=p({type:e,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(t,i){t&2&&f("active",i.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:P,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(t,i){t&1&&(_(v),o(0,"header")(1,"div",0)(2,"h3",1),h("click",function(){return i.disallowToggle()||i.toggle()}),a(3,0,null,M,1,0),m(5,T,2,0,"spk-icon"),n(),a(6,1),n(),o(7,"div",2),a(8,2),n()(),o(9,"div",3),a(10,3),n()),t&2&&(g(5),C(i.disallowToggle()?-1:5))},dependencies:[u],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;border-radius:var(--shape-3);background-color:var(--base-level-20)}.active[_nghost-%COMP%] .content[_ngcontent-%COMP%]{max-height:1000px;transition:max-height 1s linear;padding:0 1rem 1rem}.active[_nghost-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}[_nghost-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;font:var(--paragraph-10);cursor:pointer;-webkit-user-select:none;user-select:none}[_nghost-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(0);transform-origin:center;transition:transform .2s ease}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1 0}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]:empty{display:none}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0 1rem;overflow:hidden;max-height:0;transition:max-height .25s linear,padding .25s linear}.content[_ngcontent-%COMP%]:empty{display:none}"],changeDetection:0})};export{c as a};
@@ -0,0 +1 @@
1
+ import{l as a,m as b}from"./chunk-RN7NMYKV.js";import"./chunk-Z2NFEFOH.js";import"./chunk-6FFPXENZ.js";import"./chunk-SPHWZHBB.js";import"./chunk-KSP3JQHY.js";import"./chunk-HTNYQE2B.js";import"./chunk-GJROCOAD.js";import"./chunk-7L42EO7J.js";import"./chunk-RHW5QVAY.js";import"./chunk-T2OUHRUV.js";import"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import"./chunk-NMXJMVL5.js";import"./chunk-JSGFZ2GA.js";import"./chunk-CKPICCFH.js";import"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";export{a as createSourceDataForm,b as default};
@@ -1,4 +1,4 @@
1
- import{g as Yt}from"./chunk-X5YRWKCW.js";import{a as jt,b as Qt,c as Jt,n as Z}from"./chunk-JD54W4UA.js";import{a as zt,b as Xt}from"./chunk-6DH6O5YE.js";import{a as Wt}from"./chunk-YJSWEW6C.js";import{a as qt}from"./chunk-VN7JM6M3.js";import"./chunk-KSP3JQHY.js";import"./chunk-HTNYQE2B.js";import"./chunk-URU2SLPX.js";import{a as Kt}from"./chunk-7L42EO7J.js";import"./chunk-RHW5QVAY.js";import{b as ht,c as $t,e as wt,f as At,g as vt,i as Pt,j as Vt,m as bt,n as Mt,o as Gt,p as Bt,q as Lt,r as Ut,t as Ht}from"./chunk-T2OUHRUV.js";import{b as gt,d as ft}from"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{A as yt,a as Dt,b as St,d as Et,e as Ot,l as xt,o as kt,p as Rt,t as Nt,z as It}from"./chunk-WX7L7V6J.js";import{c as Ct}from"./chunk-4AECHE4W.js";import{i as Tt}from"./chunk-CKPICCFH.js";import{$b as _,Ab as w,Ac as H,Bb as b,Bc as dt,Cb as S,F as nt,Gb as E,Hb as O,Ib as M,Jb as X,Kb as q,Lb as U,Mb as f,Nb as s,Qa as a,Qb as k,Sb as rt,Tb as d,Xa as ot,Y as N,Yb as lt,Zb as st,_b as A,ab as at,ac as j,bc as D,cc as pt,da as C,ea as g,ec as _t,fb as m,fc as ct,gc as mt,hc as Q,ic as J,ja as it,jc as Y,kc as Ft,lc as ut,mc as G,nb as c,oc as B,pb as z,sb as F,sc as L,tb as I,ua as x,ub as y,vb as h,wb as l,xb as r,yb as u,zb as $}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";var Zt=["formRef"],te=(n,i,t,e)=>({index:n,formView:i,formGroupName:"custom",destinationType:t,oauthField:e}),W=n=>({$implicit:n}),ee=(n,i,t,e)=>({index:n,formView:i,formGroupName:"dynamic",destinationType:t,oauthField:e}),ne=(n,i,t,e)=>({index:n,formView:i,formGroupName:"advanced",destinationType:t,oauthField:e}),ie=(n,i,t,e)=>({index:n,formView:i,formGroupName:"advanced",asHttpOptions:!0,destinationType:t,oauthField:e}),oe=()=>({maxWidth:"700px",width:"100%"});function ae(n,i){n&1&&(E(0,5,2),u(1,"spk-icon"),O())}function re(n,i){n&1&&M(0,5,3)}function le(n,i){if(n&1){let t=S();E(0,5,1),l(1,"button",21),f("click",function(){C(t);let o=s();return g(o.testDestination())}),m(2,ae,2,0)(3,re,1,0),r(),O()}if(n&2){let t=s();a(),z("success",t.successfulTest()),a(),F(t.successfulTest()?2:3)}}function se(n,i){if(n&1){let t=S();l(0,"p",27),f("click",function(){C(t);let o=s();return g(o.removeDestinationFormGroup(o.destinationCount()-1))}),E(1,8),u(2,"span",28),O(),r()}}function pe(n,i){if(n&1){let t=S();l(0,"div",34),f("click",function(){let o=C(t).$implicit,p=s(2);return g(p.addDestinationFormGroup(o.key))}),l(1,"h3"),_(2),r(),l(3,"p"),_(4),r()()}if(n&2){let t=i.$implicit;a(2),j(t.displayName),a(2),j(t.description)}}function _e(n,i){if(n&1){let t=S();l(0,"button",35,1),f("click",function(){let o=C(t).$implicit,p=s(2);return g(p.addDestinationFormGroup(o.key))}),_(2),r()}if(n&2){let t=i.$implicit;a(2),D(" ",t.displayName," ")}}function ce(n,i){if(n&1&&(l(0,"div",29),y(1,pe,5,2,"div",30,I),r(),l(3,"spk-menu",31)(4,"button",32),M(5,9),r(),$(6,20),y(7,_e,3,1,"button",33,I),w(),r()),n&2){let t=s();a(),h(t.destinationTypeOptionsFocused()),a(2),c("searchable",!0),a(4),h(t.destinationTypeOptionsNotFocused())}}function me(n,i){n&1&&b(0)}function Fe(n,i){if(n&1&&m(0,me,1,0,"ng-container",40),n&2){let t,e=i.$implicit,o=i.$index;s();let p=A(29),T=s();c("ngTemplateOutlet",p)("ngTemplateOutletContext",G(7,W,B(2,te,o,e,(t=T.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,T.destinationFormPair().oauthField)))}}function ue(n,i){n&1&&b(0)}function de(n,i){if(n&1&&m(0,ue,1,0,"ng-container",40),n&2){let t,e=i.$implicit,o=i.$index;s();let p=A(29),T=s();c("ngTemplateOutlet",p)("ngTemplateOutletContext",G(7,W,B(2,ee,o,e,(t=T.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,T.destinationFormPair().oauthField)))}}function Te(n,i){if(n&1){let t=S();E(0,10,1),l(1,"button",35,1),f("click",function(){let o=C(t).$implicit,p=s(2);return g(p.addAdvancedFormPair(o,0))}),r(),O()}if(n&2){let t=i.$implicit;a(),X(t.name),q(0)}}function Ce(n,i){n&1&&b(0)}function ge(n,i){if(n&1&&m(0,Ce,1,0,"ng-container",40),n&2){let t,e=i.$implicit,o=i.$index;s();let p=A(29),T=s();c("ngTemplateOutlet",p)("ngTemplateOutletContext",G(7,W,B(2,ne,o,e,(t=T.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,T.destinationFormPair().oauthField)))}}function fe(n,i){if(n&1){let t=S();E(0,11,1),l(1,"button",35,1),f("click",function(){let o=C(t).$implicit,p=s(2);return g(p.addHttpOption(o,0))}),r(),O()}if(n&2){let t=i.$implicit;a(),X(t.name),q(0)}}function De(n,i){n&1&&b(0)}function Se(n,i){if(n&1&&m(0,De,1,0,"ng-container",40),n&2){let t,e=i.$implicit,o=i.$index;s();let p=A(29),T=s();c("ngTemplateOutlet",p)("ngTemplateOutletContext",G(7,W,B(2,ie,o,e,(t=T.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,T.destinationFormPair().oauthField)))}}function Ee(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=s(2).$implicit;c("message",t.formView.longDescription)}}function Oe(n,i){if(n&1&&(l(0,"app-file-tree",43)(1,"label",47),_(2),m(3,Ee,3,1,"spk-tooltip",48),r(),u(4,"input",49),r()),n&2){let t,e=s().$implicit,o=s(2);c("startingPath",o.getFormFieldValue(0,e.formGroupName,e.formView.name))("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),a(),d("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),a(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),a(),F(e.formView.longDescription?3:-1),a(),d("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name)}}function xe(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=s(2).$implicit;c("message",t.formView.longDescription)}}function ke(n,i){if(n&1&&(l(0,"app-file-tree",44)(1,"label",47),_(2),m(3,xe,3,1,"spk-tooltip",48),r(),u(4,"input",49),r()),n&2){let t,e=s().$implicit,o=s(2);c("hideShortcuts",!0)("startingPath",o.getFormFieldValue(0,e.formGroupName,e.formView.name)),a(),d("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),a(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),a(),F(e.formView.longDescription?3:-1),a(),d("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name)}}function Re(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=s(2).$implicit;c("message",t.formView.longDescription)}}function Ne(n,i){n&1&&(l(0,"spk-icon",51),_(1,"link"),r())}function Ie(n,i){n&1&&(l(0,"spk-icon",51),_(1,"envelope"),r())}function ye(n,i){n&1&&(l(0,"spk-icon",51),_(1,"textbox"),r())}function he(n,i){if(n&1&&(l(0,"spk-form-field")(1,"label",47),_(2),m(3,Re,3,1,"spk-tooltip",48),r(),u(4,"input",50),m(5,Ne,2,0,"spk-icon",51)(6,Ie,2,0,"spk-icon",51)(7,ye,2,0,"spk-icon",51),r()),n&2){let t,e=s().$implicit;a(),d("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),a(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),a(),F(e.formView.longDescription?3:-1),a(),d("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name),c("type",e.formView.type==="Email"?"email":"text"),a(),F(e.formView.type==="Path"?5:e.formView.type==="Email"?6:7)}}function $e(n,i){if(n&1){let t=S();l(0,"span",55),f("click",function(){C(t);let o=s(2).$implicit,p=s(2);return g(p.oauthStartTokenCreation(o.destinationType))}),_(1,"AuthID"),r()}}function we(n,i){n&1&&(l(0,"spk-icon",51),_(1,"password"),r())}function Ae(n,i){if(n&1){let t=S();l(0,"spk-icon",56),f("click",function(){C(t);let o=s(2).$implicit;return g(o.formView.showPassword=!o.formView.showPassword)}),_(1," eye "),r()}}function ve(n,i){if(n&1){let t=S();l(0,"spk-icon",56),f("click",function(){C(t);let o=s(2).$implicit;return g(o.formView.showPassword=!o.formView.showPassword)}),_(1," eye-slash "),r()}}function Pe(n,i){if(n&1&&(l(0,"spk-form-field")(1,"label",47),_(2),r(),u(3,"input",52),m(4,$e,2,0,"span",53)(5,we,2,0,"spk-icon",51)(6,Ae,2,0,"spk-icon",54)(7,ve,2,0,"spk-icon",54),r()),n&2){let t,e=s().$implicit;a(),d("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),a(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),a(),d("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name),c("type",e.formView.showPassword?"text":"password"),a(),F(e.oauthField===e.formView.name?4:5),a(2),F(e.formView.showPassword?6:7)}}function Ve(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=s(3).$implicit;c("message",t.formView.longDescription)}}function be(n,i){if(n&1&&_(0),n&2){let t=i.$implicit;D(" ",t," ")}}function Me(n,i){if(n&1&&(l(0,"spk-select",57)(1,"label",47),_(2),m(3,Ve,3,1,"spk-tooltip",48),r(),u(4,"input",49),r(),m(5,be,1,1,"ng-template",null,3,L)),n&2){let t,e=A(6);s();let o=Y(0),p=s().$implicit;c("options",o)("isClearable",!1)("optionTemplate",e),a(),d("for","destination-",p.formGroupName,"-",p.index,"-",p.asHttpOptions?"http":"other",""),a(),D(" ",(t=p.formView.shortDescription)!==null&&t!==void 0?t:p.formView.name," "),a(),F(p.formView.longDescription?3:-1),a(),d("id","destination-",p.formGroupName,"-",p.index,"-",p.asHttpOptions?"http":"other",""),k("formControlName",p.formView.name)}}function Ge(n,i){if(n&1&&(Q(0),m(1,Me,7,14)),n&2){let t=s().$implicit,e=J(t.formView.loadOptions?t.formView.loadOptions(s(2).injector)():t.formView.options);a(),F(e?1:-1)}}function Be(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=s(3).$implicit;c("message",t.formView.longDescription)}}function Le(n,i){if(n&1&&_(0),n&2){let t=i.$implicit;pt(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function Ue(n,i){if(n&1&&(l(0,"spk-select",59)(1,"label",47),_(2),m(3,Be,3,1,"spk-tooltip",48),r(),u(4,"input",49),r(),m(5,Le,1,2,"ng-template",null,4,L)),n&2){let t,e=A(6);s();let o=Y(0),p=s().$implicit;c("options",o)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),a(),d("for","destination-",p.formGroupName,"-",p.index,"-",p.asHttpOptions?"http":"other",""),a(),D(" ",(t=p.formView.shortDescription)!==null&&t!==void 0?t:p.formView.name," "),a(),F(p.formView.longDescription?3:-1),a(),d("id","destination-",p.formGroupName,"-",p.index,"-",p.asHttpOptions?"http":"other",""),k("formControlName",p.formView.name)}}function He(n,i){n&1&&u(0,"spk-progress-bar",58)}function Ke(n,i){if(n&1&&(Q(0),m(1,Ue,7,15)(2,He,1,0,"spk-progress-bar",58)),n&2){let t=s().$implicit,e=J(t.formView.loadOptions?t.formView.loadOptions(s(2).injector)():t.formView.options);a(),F(e?1:2)}}function We(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=s(2).$implicit;c("message",t.formView.longDescription)}}function ze(n,i){if(n&1&&(l(0,"app-size",45)(1,"label",47),_(2),m(3,We,3,1,"spk-tooltip",48),r()()),n&2){let t,e=s().$implicit;c("inputType",e.Name)("formControlName",e.formView.name)("customId",`destination-{{ item.formGroupName }}-{{ item.index }}-{{
1
+ import{g as Yt}from"./chunk-PFWSXI4B.js";import{a as jt,b as Qt,c as Jt,n as Z}from"./chunk-RN7NMYKV.js";import{a as zt,b as Xt}from"./chunk-Z2NFEFOH.js";import{a as Wt}from"./chunk-6FFPXENZ.js";import{a as qt}from"./chunk-SPHWZHBB.js";import"./chunk-KSP3JQHY.js";import"./chunk-HTNYQE2B.js";import"./chunk-GJROCOAD.js";import{a as Kt}from"./chunk-7L42EO7J.js";import"./chunk-RHW5QVAY.js";import{b as ht,c as $t,e as wt,f as At,g as vt,i as Pt,j as Vt,m as bt,n as Mt,o as Gt,p as Bt,q as Lt,r as Ut,t as Ht}from"./chunk-T2OUHRUV.js";import{b as gt,d as ft}from"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{A as yt,a as Dt,b as St,d as Et,e as Ot,l as xt,o as kt,p as Rt,t as Nt,z as It}from"./chunk-NMXJMVL5.js";import{c as Ct}from"./chunk-JSGFZ2GA.js";import{i as Tt}from"./chunk-CKPICCFH.js";import{$b as _,Ab as w,Ac as H,Bb as b,Bc as dt,Cb as S,F as nt,Gb as E,Hb as O,Ib as M,Jb as X,Kb as q,Lb as U,Mb as f,Nb as s,Qa as a,Qb as k,Sb as rt,Tb as d,Xa as ot,Y as N,Yb as lt,Zb as st,_b as A,ab as at,ac as j,bc as D,cc as pt,da as C,ea as g,ec as _t,fb as m,fc as ct,gc as mt,hc as Q,ic as J,ja as it,jc as Y,kc as Ft,lc as ut,mc as G,nb as c,oc as B,pb as z,sb as F,sc as L,tb as I,ua as x,ub as y,vb as h,wb as l,xb as r,yb as u,zb as $}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";var Zt=["formRef"],te=(n,i,t,e)=>({index:n,formView:i,formGroupName:"custom",destinationType:t,oauthField:e}),W=n=>({$implicit:n}),ee=(n,i,t,e)=>({index:n,formView:i,formGroupName:"dynamic",destinationType:t,oauthField:e}),ne=(n,i,t,e)=>({index:n,formView:i,formGroupName:"advanced",destinationType:t,oauthField:e}),ie=(n,i,t,e)=>({index:n,formView:i,formGroupName:"advanced",asHttpOptions:!0,destinationType:t,oauthField:e}),oe=()=>({maxWidth:"700px",width:"100%"});function ae(n,i){n&1&&(E(0,5,2),u(1,"spk-icon"),O())}function re(n,i){n&1&&M(0,5,3)}function le(n,i){if(n&1){let t=S();E(0,5,1),l(1,"button",21),f("click",function(){C(t);let o=s();return g(o.testDestination())}),m(2,ae,2,0)(3,re,1,0),r(),O()}if(n&2){let t=s();a(),z("success",t.successfulTest()),a(),F(t.successfulTest()?2:3)}}function se(n,i){if(n&1){let t=S();l(0,"p",27),f("click",function(){C(t);let o=s();return g(o.removeDestinationFormGroup(o.destinationCount()-1))}),E(1,8),u(2,"span",28),O(),r()}}function pe(n,i){if(n&1){let t=S();l(0,"div",34),f("click",function(){let o=C(t).$implicit,p=s(2);return g(p.addDestinationFormGroup(o.key))}),l(1,"h3"),_(2),r(),l(3,"p"),_(4),r()()}if(n&2){let t=i.$implicit;a(2),j(t.displayName),a(2),j(t.description)}}function _e(n,i){if(n&1){let t=S();l(0,"button",35,1),f("click",function(){let o=C(t).$implicit,p=s(2);return g(p.addDestinationFormGroup(o.key))}),_(2),r()}if(n&2){let t=i.$implicit;a(2),D(" ",t.displayName," ")}}function ce(n,i){if(n&1&&(l(0,"div",29),y(1,pe,5,2,"div",30,I),r(),l(3,"spk-menu",31)(4,"button",32),M(5,9),r(),$(6,20),y(7,_e,3,1,"button",33,I),w(),r()),n&2){let t=s();a(),h(t.destinationTypeOptionsFocused()),a(2),c("searchable",!0),a(4),h(t.destinationTypeOptionsNotFocused())}}function me(n,i){n&1&&b(0)}function Fe(n,i){if(n&1&&m(0,me,1,0,"ng-container",40),n&2){let t,e=i.$implicit,o=i.$index;s();let p=A(29),T=s();c("ngTemplateOutlet",p)("ngTemplateOutletContext",G(7,W,B(2,te,o,e,(t=T.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,T.destinationFormPair().oauthField)))}}function ue(n,i){n&1&&b(0)}function de(n,i){if(n&1&&m(0,ue,1,0,"ng-container",40),n&2){let t,e=i.$implicit,o=i.$index;s();let p=A(29),T=s();c("ngTemplateOutlet",p)("ngTemplateOutletContext",G(7,W,B(2,ee,o,e,(t=T.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,T.destinationFormPair().oauthField)))}}function Te(n,i){if(n&1){let t=S();E(0,10,1),l(1,"button",35,1),f("click",function(){let o=C(t).$implicit,p=s(2);return g(p.addAdvancedFormPair(o,0))}),r(),O()}if(n&2){let t=i.$implicit;a(),X(t.name),q(0)}}function Ce(n,i){n&1&&b(0)}function ge(n,i){if(n&1&&m(0,Ce,1,0,"ng-container",40),n&2){let t,e=i.$implicit,o=i.$index;s();let p=A(29),T=s();c("ngTemplateOutlet",p)("ngTemplateOutletContext",G(7,W,B(2,ne,o,e,(t=T.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,T.destinationFormPair().oauthField)))}}function fe(n,i){if(n&1){let t=S();E(0,11,1),l(1,"button",35,1),f("click",function(){let o=C(t).$implicit,p=s(2);return g(p.addHttpOption(o,0))}),r(),O()}if(n&2){let t=i.$implicit;a(),X(t.name),q(0)}}function De(n,i){n&1&&b(0)}function Se(n,i){if(n&1&&m(0,De,1,0,"ng-container",40),n&2){let t,e=i.$implicit,o=i.$index;s();let p=A(29),T=s();c("ngTemplateOutlet",p)("ngTemplateOutletContext",G(7,W,B(2,ie,o,e,(t=T.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,T.destinationFormPair().oauthField)))}}function Ee(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=s(2).$implicit;c("message",t.formView.longDescription)}}function Oe(n,i){if(n&1&&(l(0,"app-file-tree",43)(1,"label",47),_(2),m(3,Ee,3,1,"spk-tooltip",48),r(),u(4,"input",49),r()),n&2){let t,e=s().$implicit,o=s(2);c("startingPath",o.getFormFieldValue(0,e.formGroupName,e.formView.name))("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),a(),d("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),a(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),a(),F(e.formView.longDescription?3:-1),a(),d("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name)}}function xe(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=s(2).$implicit;c("message",t.formView.longDescription)}}function ke(n,i){if(n&1&&(l(0,"app-file-tree",44)(1,"label",47),_(2),m(3,xe,3,1,"spk-tooltip",48),r(),u(4,"input",49),r()),n&2){let t,e=s().$implicit,o=s(2);c("hideShortcuts",!0)("startingPath",o.getFormFieldValue(0,e.formGroupName,e.formView.name)),a(),d("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),a(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),a(),F(e.formView.longDescription?3:-1),a(),d("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name)}}function Re(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=s(2).$implicit;c("message",t.formView.longDescription)}}function Ne(n,i){n&1&&(l(0,"spk-icon",51),_(1,"link"),r())}function Ie(n,i){n&1&&(l(0,"spk-icon",51),_(1,"envelope"),r())}function ye(n,i){n&1&&(l(0,"spk-icon",51),_(1,"textbox"),r())}function he(n,i){if(n&1&&(l(0,"spk-form-field")(1,"label",47),_(2),m(3,Re,3,1,"spk-tooltip",48),r(),u(4,"input",50),m(5,Ne,2,0,"spk-icon",51)(6,Ie,2,0,"spk-icon",51)(7,ye,2,0,"spk-icon",51),r()),n&2){let t,e=s().$implicit;a(),d("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),a(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),a(),F(e.formView.longDescription?3:-1),a(),d("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name),c("type",e.formView.type==="Email"?"email":"text"),a(),F(e.formView.type==="Path"?5:e.formView.type==="Email"?6:7)}}function $e(n,i){if(n&1){let t=S();l(0,"span",55),f("click",function(){C(t);let o=s(2).$implicit,p=s(2);return g(p.oauthStartTokenCreation(o.destinationType))}),_(1,"AuthID"),r()}}function we(n,i){n&1&&(l(0,"spk-icon",51),_(1,"password"),r())}function Ae(n,i){if(n&1){let t=S();l(0,"spk-icon",56),f("click",function(){C(t);let o=s(2).$implicit;return g(o.formView.showPassword=!o.formView.showPassword)}),_(1," eye "),r()}}function ve(n,i){if(n&1){let t=S();l(0,"spk-icon",56),f("click",function(){C(t);let o=s(2).$implicit;return g(o.formView.showPassword=!o.formView.showPassword)}),_(1," eye-slash "),r()}}function Pe(n,i){if(n&1&&(l(0,"spk-form-field")(1,"label",47),_(2),r(),u(3,"input",52),m(4,$e,2,0,"span",53)(5,we,2,0,"spk-icon",51)(6,Ae,2,0,"spk-icon",54)(7,ve,2,0,"spk-icon",54),r()),n&2){let t,e=s().$implicit;a(),d("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),a(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),a(),d("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name),c("type",e.formView.showPassword?"text":"password"),a(),F(e.oauthField===e.formView.name?4:5),a(2),F(e.formView.showPassword?6:7)}}function Ve(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=s(3).$implicit;c("message",t.formView.longDescription)}}function be(n,i){if(n&1&&_(0),n&2){let t=i.$implicit;D(" ",t," ")}}function Me(n,i){if(n&1&&(l(0,"spk-select",57)(1,"label",47),_(2),m(3,Ve,3,1,"spk-tooltip",48),r(),u(4,"input",49),r(),m(5,be,1,1,"ng-template",null,3,L)),n&2){let t,e=A(6);s();let o=Y(0),p=s().$implicit;c("options",o)("isClearable",!1)("optionTemplate",e),a(),d("for","destination-",p.formGroupName,"-",p.index,"-",p.asHttpOptions?"http":"other",""),a(),D(" ",(t=p.formView.shortDescription)!==null&&t!==void 0?t:p.formView.name," "),a(),F(p.formView.longDescription?3:-1),a(),d("id","destination-",p.formGroupName,"-",p.index,"-",p.asHttpOptions?"http":"other",""),k("formControlName",p.formView.name)}}function Ge(n,i){if(n&1&&(Q(0),m(1,Me,7,14)),n&2){let t=s().$implicit,e=J(t.formView.loadOptions?t.formView.loadOptions(s(2).injector)():t.formView.options);a(),F(e?1:-1)}}function Be(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=s(3).$implicit;c("message",t.formView.longDescription)}}function Le(n,i){if(n&1&&_(0),n&2){let t=i.$implicit;pt(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function Ue(n,i){if(n&1&&(l(0,"spk-select",59)(1,"label",47),_(2),m(3,Be,3,1,"spk-tooltip",48),r(),u(4,"input",49),r(),m(5,Le,1,2,"ng-template",null,4,L)),n&2){let t,e=A(6);s();let o=Y(0),p=s().$implicit;c("options",o)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),a(),d("for","destination-",p.formGroupName,"-",p.index,"-",p.asHttpOptions?"http":"other",""),a(),D(" ",(t=p.formView.shortDescription)!==null&&t!==void 0?t:p.formView.name," "),a(),F(p.formView.longDescription?3:-1),a(),d("id","destination-",p.formGroupName,"-",p.index,"-",p.asHttpOptions?"http":"other",""),k("formControlName",p.formView.name)}}function He(n,i){n&1&&u(0,"spk-progress-bar",58)}function Ke(n,i){if(n&1&&(Q(0),m(1,Ue,7,15)(2,He,1,0,"spk-progress-bar",58)),n&2){let t=s().$implicit,e=J(t.formView.loadOptions?t.formView.loadOptions(s(2).injector)():t.formView.options);a(),F(e?1:2)}}function We(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=s(2).$implicit;c("message",t.formView.longDescription)}}function ze(n,i){if(n&1&&(l(0,"app-size",45)(1,"label",47),_(2),m(3,We,3,1,"spk-tooltip",48),r()()),n&2){let t,e=s().$implicit;c("inputType",e.Name)("formControlName",e.formView.name)("customId",`destination-{{ item.formGroupName }}-{{ item.index }}-{{
2
2
  item.asHttpOptions ? 'http' : 'other'
3
3
  }}`),a(),d("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),a(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),a(),F(e.formView.longDescription?3:-1)}}function Xe(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=s(2).$implicit;c("message",t.formView.longDescription)}}function qe(n,i){if(n&1&&(l(0,"spk-form-field")(1,"label",47),_(2),m(3,Xe,3,1,"spk-tooltip",48),r(),u(4,"input",60),l(5,"spk-icon",51),_(6,"numpad"),r()()),n&2){let t,e=s().$implicit;a(),d("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),a(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),a(),F(e.formView.longDescription?3:-1),a(),d("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name)}}function je(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=s(2).$implicit;c("message",t.formView.longDescription)}}function Qe(n,i){if(n&1&&(l(0,"spk-toggle",46)(1,"label",47),_(2),m(3,je,3,1,"spk-tooltip",48),r(),u(4,"input",61),r()),n&2){let t,e=s().$implicit;a(),d("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),a(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),a(),F(e.formView.longDescription?3:-1),a(),d("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name)}}function Je(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=s(2).$implicit;c("message",t.formView.longDescription)}}function Ye(n,i){if(n&1&&_(0),n&2){let t=i.$implicit;D(" ",t," ")}}function Ze(n,i){if(n&1&&(l(0,"spk-select",62)(1,"label",47),_(2),m(3,Je,3,1,"spk-tooltip",48),r(),u(4,"input",63),r(),m(5,Ye,1,1,"ng-template",null,4,L)),n&2){let t,e=A(6),o=s().$implicit;c("options",o.formView.options)("selectMultiple",!0)("optionTemplate",e),a(),rt("for","destination-",o.formGroupName,"-",o.index,""),a(),D(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),a(),F(o.formView.longDescription?3:-1),a(),k("formControlName",o.formView.name)}}function tn(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=s(2).$implicit;c("message",t.formView.longDescription)}}function en(n,i){if(n&1&&(l(0,"app-timespan",45)(1,"label",47),_(2),m(3,tn,3,1,"spk-tooltip",48),r()()),n&2){let t,e=s().$implicit;c("inputType",e.formView.name)("formControlName",e.formView.name)("customId","destination-"+e.formGroupName+"-"+e.index+"-"+(e.asHttpOptions?"http":"other")),a(),d("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),a(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),a(),F(e.formView.longDescription?3:-1)}}function nn(n,i){if(n&1){let t=S();l(0,"button",64),f("click",function(){C(t);let o=s().$implicit,p=s(2);return g(p.removeFormView(o.formView,0))}),l(1,"spk-icon"),_(2,"x-circle"),r()()}}function on(n,i){if(n&1&&(l(0,"div",41),$(1,42),m(2,Oe,5,17,"app-file-tree",43)(3,ke,5,13,"app-file-tree",44)(4,he,8,13,"spk-form-field")(5,Pe,8,13,"spk-form-field")(6,Ge,2,2)(7,Ke,3,2)(8,ze,4,9,"app-size",45)(9,qe,7,11,"spk-form-field")(10,Qe,5,11,"spk-toggle",46)(11,Ze,7,9)(12,en,4,9,"app-timespan",45),w(),m(13,nn,3,0,"button",32),r()),n&2){let t=i.$implicit;z("single-field",t.formGroupName!=="advanced"),a(),c("formGroupName",t.formGroupName),a(),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"||t.formView.type==="DateTime"?12:-1),a(11),F(t.formGroupName==="advanced"?13:-1)}}function an(n,i){if(n&1&&($(0,22)(1,36),y(2,Fe,1,9,"ng-container",null,I),y(4,de,1,9,"ng-container",null,I),l(6,"app-toggle-card",37),$(7,38),E(8,10),l(9,"spk-menu",31)(10,"button",39),u(11,"spk-icon"),r(),$(12,20),y(13,Te,3,1,"button",33,I),w(),r(),O(),w(),y(15,ge,1,9,"ng-container",null,I),r(),l(17,"app-toggle-card",37),$(18,38),E(19,11),l(20,"spk-menu",31)(21,"button",39),u(22,"spk-icon"),r(),$(23,20),y(24,fe,3,1,"button",33,I),w(),r(),O(),w(),y(26,Se,1,9,"ng-container",null,I),r(),m(28,on,14,5,"ng-template",null,2,L),w()()),n&2){let t=s();a(2),h(t.destinationFormPair().custom),a(2),h(t.destinationFormPair().dynamic),a(2),c("disallowToggle",!0),a(3),c("searchable",!0),a(),c("disabled",t.notSelectedAdvancedFormPair().length===0),a(3),h(t.notSelectedAdvancedFormPair()),a(2),h(t.selectedAdvancedFormPair()),a(2),c("disallowToggle",!0),a(3),c("searchable",!0),a(),c("disabled",t.notSelectedHttpOptions().length===0),a(3),h(t.notSelectedHttpOptions()),a(2),h(t.selectedHttpOptions())}}function rn(n,i){if(n&1){let t=S();l(0,"spk-dialog",65),mt("isOpenChange",function(o){C(t);let p=s();return ct(p.targetUrlDialogOpen,o)||(p.targetUrlDialogOpen=o),g(o)}),l(1,"header",66)(2,"h2"),M(3,12),r(),l(4,"spk-alert",67),M(5,13),r()(),l(6,"div",68)(7,"spk-form-field"),u(8,"textarea",69),r()(),l(9,"footer",70)(10,"button",24),f("click",function(){C(t);let o=s();return g(o.closeTargetUrlDialog(!1))}),_(11,"Cancel"),r(),l(12,"button",71),f("click",function(){C(t);let o=s();return g(o.closeTargetUrlDialog(!0))}),E(13,14),u(14,"spk-icon"),O(),r()()()}if(n&2){let t=s();_t("isOpen",t.targetUrlDialogOpen),c("options",ut(3,oe)),a(8),c("formControl",t.targetUrlCtrl)}}var K=new Ut,wn=(n={destinations:[]})=>K.group({destinations:K.array(n.destinations)}),An=({key:n,customGroup:i,dynamicGroup:t,advancedGroup:e})=>K.group({destinationType:K.control(n),custom:i,dynamic:t,advanced:e}),tt=class n{#a=N(ft);#r=N(gt);#l=N(Ct);#t=N(Z);#s=N(Ot);#p=N(jt);#e=N(Yt);injector=N(it);formRef=ot.required("formRef");destinationForm=this.#t.destinationForm;destinationFormPair=this.#t.destinationFormPair;selectedAdvancedFormPair=this.#t.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#t.notSelectedAdvancedFormPair;selectedHttpOptions=this.#t.selectedHttpOptions;notSelectedHttpOptions=this.#t.notSelectedHttpOptions;destinationOptions=this.#t.destinationOptions;destinationFormSignal=this.#t.destinationFormSignal;destinationCount=H(()=>this.destinationFormSignal()?.destinations?.length??0);successfulTest=x(!1);destinationTypeOptionsInFocus=x(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=x(Jt.map(i=>({key:i.customKey??i.key,customKey:i.customKey??null,displayName:i.displayName,description:i.description})));destinationTypeOptionsFocused=H(()=>{let i=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return i.map(e=>t.find(o=>o.key===e))});destinationTypeOptionsNotFocused=H(()=>{let i=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(e=>!i.includes(e.key))});targetUrlEffect=dt(()=>{if(this.destinationFormSignal(),this.destinationForm.valid){let i=this.#t.getCurrentTargetUrl();this.#e.updateTargetUrl(i[0])}else this.#e.updateTargetUrl(null)});ngOnInit(){let i=this.#e.destinationTargetUrl();i&&this.#t.updateFieldsFromTargetUrl(i)}getFormFieldValue(i,t,e){return((this.destinationForm.controls.destinations.controls?.[i]).controls?.[t]).controls[e].value}addDestinationFormGroup(i){this.#t.addDestinationFormGroup(i)}addAdvancedFormPair(i,t){this.#t.addAdvancedFormPair(i,t)}removeFormView(i,t){this.#t.removeAdvancedFormPair(i,t)}addHttpOption(i,t){this.#t.addHttpOption(i,t)}targetUrlCtrl=new vt;targetUrlInitial=x(null);targetUrlDialogOpen=x(!1);openTargetUrlDialog(){let t=this.#t.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(t),this.targetUrlInitial.set(t),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl.value,e=this.targetUrlInitial();!i||t===e||this.#t.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(i=0){let e=this.#t.getCurrentTargetUrl()[i];e&&this.#p.testDestination(e,i,!1).subscribe({next:o=>{if(o.action==="success"){o.anyFilesFound===!1&&this.#s.open(Kt,{data:{title:$localize`Empty destination`,message:$localize`The remote destination does not contain any files.
4
4
  Check that the details are correct and that the destination is not empty.`,confirmText:$localize`OK`,cancelText:void 0}}),this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3);return}if(o.action==="generic-error"){this.successfulTest.set(!1);return}o.action==="trust-cert"&&this.#t.addHttpOptionByName("accept-specified-ssl-hash",o.destinationIndex,o.certData),o.action==="approve-host-key"&&this.#t.addOrUpdateAdvancedFormPairByName("ssh-fingerprint",o.destinationIndex,o.reportedHostKey),o.testAgain&&this.testDestination(o.destinationIndex)}})}mapToTargetUrl(i){return Qt(i.value)}removeDestinationFormGroup(i){this.destinationForm.controls.destinations.removeAt(i)}displayFn(i){let t=this.destinationOptions().find(e=>e.Key===i);return t?`${t.DisplayName}`:""}goBack(){this.#e.exit()}next(){this.#a.navigate(["encryption"],{relativeTo:this.#r.parent})}#n=x("https://duplicati-oauth-handler.appspot.com/").asReadonly();#i=x(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#o=x(!1);#_=x(null);keyCreation(){}oauthStartTokenCreation(i){this.#o.set(!0);let t=450,e=600,o=this.#n()+"?type="+i+"&token="+this.#i(),p=screen.width/2-t/2,T=screen.height/2-e/2,v=window.open(o,"_blank","height="+e+",width="+t+",menubar=0,status=0,titlebar=0,toolbar=0,left="+p+",top="+T);v?.addEventListener("blur",P=>{console.log("event blur",P)}),v?.addEventListener("beforeunload",P=>{console.log("event beforeunload",P),this.#l.get(this.#n()+"fetch?callback=JSON_CALLBACK",{params:{token:this.#i()}}).pipe(nt(()=>this.#o.set(!1))).subscribe({next:V=>{console.log("res",V),V?.authid&&this.#_.set(V.authid)}})})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=at({type:n,selectors:[["app-restore-destination"]],viewQuery:function(t,e){t&1&&lt(e.formRef,Zt,5),t&2&&st()},features:[Ft([Z])],decls:24,vars:6,consts:()=>{let i;i=$localize` Backup placement ${"\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:`,i=U(i);let t;t=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let e;e=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let o;o=$localize` Want to select another destination? ${"\uFFFD#2\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPAN:`;let p;p=$localize`Other destinations`;let T;T=$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:`,T=U(T);let v;v=$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:`,v=U(v);let P;P=$localize`Edit target URL`;let V;V=$localize` Be careful, this will overwrite everything you have in your destination. `;let et;return et=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],["fieldTemplate",""],["enumOptionTemplate",""],["optionTemplate",""],i,t,e,o,p,T,v,P,V,et,[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"],[3,"inputType","formControlName","customId"],[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"],["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,e){if(t&1){let o=S();l(0,"form",15,0),f("submit",function(){return C(o),g(e.next())}),l(2,"header")(3,"h3",16),E(4,5),l(5,"div",17),m(6,le,4,3,"button",18),l(7,"spk-menu")(8,"button",19),u(9,"spk-icon"),r(),$(10,20),l(11,"button",21),f("click",function(){return C(o),g(e.openTargetUrlDialog())}),u(12,"spk-icon"),r(),w(),r()(),O(),r(),m(13,se,3,0,"p"),r(),m(14,ce,9,1)(15,an,30,6,"ng-container",22),l(16,"div",23)(17,"button",24),f("click",function(){return C(o),g(e.goBack())}),E(18,6),u(19,"spk-icon"),O(),r(),l(20,"button",25),E(21,7),u(22,"spk-icon"),O(),r()()(),m(23,rn,15,4,"spk-dialog",26)}if(t&2){let o;c("formGroup",e.destinationForm),a(6),F(e.destinationCount()>0?6:-1),a(7),F(e.destinationCount()>0?13:-1),a(),F(e.destinationCount()===0?14:-1),a(),F(!((o=e.destinationFormSignal())==null||o.destinations==null)&&o.destinations.length?15:-1),a(8),F(e.targetUrlDialogOpen()?23:-1)}},dependencies:[Ht,Pt,$t,Vt,ht,wt,At,bt,Mt,Lt,Gt,Bt,Tt,xt,kt,Dt,It,yt,Et,St,Nt,Rt,Xt,zt,qt,Wt],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}.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}"],changeDetection:0})};export{wn as createDestinationForm,An as createDestinationFormGroup,tt as default};
@@ -0,0 +1 @@
1
+ import{e as a,f as b}from"./chunk-PFWSXI4B.js";import"./chunk-6FFPXENZ.js";import"./chunk-SPHWZHBB.js";import"./chunk-HTNYQE2B.js";import"./chunk-GJROCOAD.js";import"./chunk-7L42EO7J.js";import"./chunk-T2OUHRUV.js";import"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import"./chunk-NMXJMVL5.js";import"./chunk-JSGFZ2GA.js";import"./chunk-CKPICCFH.js";import"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";export{a as createRestoreSelectFilesForm,b as default};
@@ -1,2 +1,2 @@
1
- import{a as w,w as B}from"./chunk-WX7L7V6J.js";import{h as y}from"./chunk-4AECHE4W.js";import{j as $}from"./chunk-CKPICCFH.js";import{$b as s,Cb as b,F as C,Ib as p,Mb as h,Nb as c,Qa as r,Y as T,ab as M,ac as g,da as E,ea as L,ec as D,fb as f,fc as N,gc as k,nb as P,ob as R,pb as G,pc as v,rc as A,sb as x,tb as S,ua as d,ub as m,vb as O,wb as o,xb as i,yb as I}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";function U(a,e){if(a&1&&(o(0,"li"),s(1),i()),a&2){let t=e.$implicit;r(),g(t)}}function X(a,e){if(a&1&&(o(0,"tr")(1,"td",10)(2,"code")(3,"ol",11),m(4,U,2,1,"li",null,S),i()()()()),a&2){let t=c().$implicit,n=c();r(),R("grid-column","1 / -1")("height","auto"),r(3),O(n.breakIntoLines(t.Exception))}}function F(a,e){if(a&1){let t=b();o(0,"tr",7),h("click",function(){let _=E(t).$index,l=c();return L(l.toggleRow(_))}),o(1,"td"),s(2),v(3,"date"),i(),o(4,"td",8),s(5),i(),o(6,"td"),s(7),i(),o(8,"td")(9,"button",9)(10,"spk-icon"),s(11,"caret-down"),i()()()(),f(12,X,6,4,"tr")}if(a&2){let t=e.$implicit,n=e.$index,_=c();r(2),g(A(3,6,t.Timestamp,"MMM dd. hh:mm")),r(3),g(t.BackupID>=0?t.BackupID:"-"),r(2),g(t.Message),r(2),G("rotated-icon",n===_.openRowIndex()),r(3),x(n===_.openRowIndex()?12:-1)}}var z=["BackupID","Timestamp","Message","actions"],u=class a{#e=T(y);displayedColumns=d(z);logsLoading=d(!0);openRowIndex=d(null);logs=d([]);ngOnInit(){this.init()}init(){this.#e.getApiV1LogdataLog().pipe(C(()=>this.logsLoading.set(!1))).subscribe({next:e=>{this.logs.set(e)}})}toggleRow(e){this.openRowIndex.set(e===this.openRowIndex()?null:e)}breakIntoLines(e){return e?e.split(`
1
+ import{a as w,w as B}from"./chunk-NMXJMVL5.js";import{h as y}from"./chunk-JSGFZ2GA.js";import{j as $}from"./chunk-CKPICCFH.js";import{$b as s,Cb as b,F as C,Ib as p,Mb as h,Nb as c,Qa as r,Y as T,ab as M,ac as g,da as E,ea as L,ec as D,fb as f,fc as N,gc as k,nb as P,ob as R,pb as G,pc as v,rc as A,sb as x,tb as S,ua as d,ub as m,vb as O,wb as o,xb as i,yb as I}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";function U(a,e){if(a&1&&(o(0,"li"),s(1),i()),a&2){let t=e.$implicit;r(),g(t)}}function X(a,e){if(a&1&&(o(0,"tr")(1,"td",10)(2,"code")(3,"ol",11),m(4,U,2,1,"li",null,S),i()()()()),a&2){let t=c().$implicit,n=c();r(),R("grid-column","1 / -1")("height","auto"),r(3),O(n.breakIntoLines(t.Exception))}}function F(a,e){if(a&1){let t=b();o(0,"tr",7),h("click",function(){let _=E(t).$index,l=c();return L(l.toggleRow(_))}),o(1,"td"),s(2),v(3,"date"),i(),o(4,"td",8),s(5),i(),o(6,"td"),s(7),i(),o(8,"td")(9,"button",9)(10,"spk-icon"),s(11,"caret-down"),i()()()(),f(12,X,6,4,"tr")}if(a&2){let t=e.$implicit,n=e.$index,_=c();r(2),g(A(3,6,t.Timestamp,"MMM dd. hh:mm")),r(3),g(t.BackupID>=0?t.BackupID:"-"),r(2),g(t.Message),r(2),G("rotated-icon",n===_.openRowIndex()),r(3),x(n===_.openRowIndex()?12:-1)}}var z=["BackupID","Timestamp","Message","actions"],u=class a{#e=T(y);displayedColumns=d(z);logsLoading=d(!0);openRowIndex=d(null);logs=d([]);ngOnInit(){this.init()}init(){this.#e.getApiV1LogdataLog().pipe(C(()=>this.logsLoading.set(!1))).subscribe({next:e=>{this.logs.set(e)}})}toggleRow(e){this.openRowIndex.set(e===this.openRowIndex()?null:e)}breakIntoLines(e){return e?e.split(`
2
2
  `):[]}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=M({type:a,selectors:[["app-logs-stored"]],decls:13,vars:2,consts:()=>{let e;e=$localize`Timestamp`;let t;t=$localize`Backup ID`;let n;n=$localize`Message`;let _;return _=$localize`No data available`,[e,t,n,_,[3,"dataChange","data","loading"],["table-header",""],["table-no-rows",""],[3,"click"],[1,"id"],["spk-button","","type","button",1,"outlined","small"],[2,"white-space","pre-wrap"],[1,"line-numbers-ol"]]},template:function(t,n){t&1&&(o(0,"spk-table",4),k("dataChange",function(l){return N(n.logs,l)||(n.logs=l),l}),o(1,"tr",5)(2,"th"),p(3,0),i(),o(4,"th"),p(5,1),i(),o(6,"th"),p(7,2),i(),I(8,"th"),i(),m(9,F,13,9,null,null,S),o(11,"div",6),p(12,3),i()()),t&2&&(D("data",n.logs),P("loading",n.logsLoading()),r(9),O(n.logs()))},dependencies:[B,$,w],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}spk-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background-color:var(--grey-800);color:var(--grey-100);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{u as default};