@duplicati/ngclient 0.0.116 → 0.0.118

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 (79) hide show
  1. package/chunk-2GCIICW5.js +1 -0
  2. package/chunk-2WGKWTVM.js +4 -0
  3. package/{chunk-SFSNPREM.js → chunk-3GYZOEPN.js} +1 -1
  4. package/chunk-3PDXD5UG.js +1 -0
  5. package/{chunk-S24RG6QP.js → chunk-3RIVWHQR.js} +1 -1
  6. package/{chunk-DJYSOUD7.js → chunk-42DBG4A6.js} +1 -1
  7. package/{chunk-PUEJXHBQ.js → chunk-44DHERTN.js} +1 -1
  8. package/{chunk-XVGPU3ZE.js → chunk-476PQHLI.js} +1 -1
  9. package/chunk-4RAO2JRJ.js +1 -0
  10. package/{chunk-HTJ5CVNN.js → chunk-54VPI5KJ.js} +1 -1
  11. package/{chunk-Q52UOSQY.js → chunk-5BHYO5SK.js} +1 -1
  12. package/chunk-AGPUJOBO.js +1 -0
  13. package/{chunk-Y6ZPPRT6.js → chunk-B5MQU4UL.js} +1 -1
  14. package/{chunk-JDSUBKXI.js → chunk-BJIL3R5K.js} +1 -1
  15. package/{chunk-ZGKHK6QQ.js → chunk-C3M5C7JC.js} +2 -2
  16. package/chunk-CCJ5LW7S.js +1 -0
  17. package/chunk-CDWP7I44.js +1 -0
  18. package/chunk-COT4PUVO.js +1 -0
  19. package/chunk-ETX7VKB3.js +1 -0
  20. package/chunk-F7E55RI6.js +1 -0
  21. package/chunk-FBX4Q2XW.js +1 -0
  22. package/{chunk-JUVUG5N3.js → chunk-GWVX5STR.js} +1 -1
  23. package/{chunk-S5FFZRTF.js → chunk-HCBCZ5NX.js} +1 -1
  24. package/chunk-HWBBTXU3.js +1 -0
  25. package/{chunk-MZ677J6Y.js → chunk-I5SC52QU.js} +1 -1
  26. package/{chunk-Y7K42OXA.js → chunk-IZFSAAIF.js} +1 -1
  27. package/{chunk-JOIFJV7F.js → chunk-JE3JBXTZ.js} +1 -1
  28. package/{chunk-RI2SWQGS.js → chunk-M7ENBMEW.js} +1 -1
  29. package/{chunk-PH5P3W5Z.js → chunk-MU24KCIK.js} +1 -1
  30. package/{chunk-CRR7DNOY.js → chunk-N2MDNESH.js} +1 -1
  31. package/{chunk-GZDT4MSC.js → chunk-NIBE7CI2.js} +1 -1
  32. package/chunk-O445WX5K.js +1 -0
  33. package/{chunk-GM4QKN65.js → chunk-P7O2NK5N.js} +1 -1
  34. package/{chunk-SOXAVKMK.js → chunk-PVLYH62N.js} +1 -1
  35. package/{chunk-DMI4A75F.js → chunk-SKABVF5Q.js} +1 -1
  36. package/chunk-SL6SRYFT.js +1 -0
  37. package/{chunk-Z2ISC3PW.js → chunk-SQQKW2DQ.js} +1 -1
  38. package/{chunk-ZIR6PET2.js → chunk-TEYVVULJ.js} +1 -1
  39. package/{chunk-IINSQSHJ.js → chunk-TRR5XEEM.js} +1 -1
  40. package/{chunk-DL56XS75.js → chunk-UNXP3IN4.js} +1 -1
  41. package/chunk-V756QT7J.js +1 -0
  42. package/{chunk-O4S6BJVY.js → chunk-VJQVHIW5.js} +1 -1
  43. package/chunk-WFAZP46A.js +1 -0
  44. package/chunk-WLU27TDA.js +1 -0
  45. package/chunk-WRPHCCP7.js +6 -0
  46. package/{chunk-T6SML6VO.js → chunk-X3TVMZLM.js} +1 -1
  47. package/{chunk-GWH2WEBY.js → chunk-XDHEMLPD.js} +1 -1
  48. package/chunk-XL7YUTMF.js +1 -0
  49. package/chunk-XZ7HNUSV.js +1 -0
  50. package/{chunk-M5CGJUYP.js → chunk-YDLHVAEO.js} +1 -1
  51. package/{chunk-7LOECBLM.js → chunk-YTDBBO6I.js} +1 -1
  52. package/chunk-ZRFL62SL.js +2 -0
  53. package/index.html +3 -3
  54. package/locale/messages.de.json +35 -3
  55. package/{main-7GKFJWB5.js → main-I7BOOCNM.js} +1 -1
  56. package/package.json +1 -1
  57. package/styles-EXA64NMM.css +1 -0
  58. package/chunk-36ZCEF76.js +0 -1
  59. package/chunk-3KPWJPKG.js +0 -1
  60. package/chunk-B26K7HTR.js +0 -1
  61. package/chunk-BYSLHWG6.js +0 -1
  62. package/chunk-CK7BEV2X.js +0 -1
  63. package/chunk-CVYWOUO3.js +0 -1
  64. package/chunk-ETELPN3O.js +0 -1
  65. package/chunk-FPFUN6JC.js +0 -2
  66. package/chunk-G3SK7TBB.js +0 -1
  67. package/chunk-GVTMU7Q2.js +0 -1
  68. package/chunk-JYXXSXNP.js +0 -8
  69. package/chunk-NF45E5CN.js +0 -1
  70. package/chunk-P4ZFQZCA.js +0 -1
  71. package/chunk-RG2UOHQD.js +0 -1
  72. package/chunk-RNSVPE4U.js +0 -1
  73. package/chunk-TCJ2X76T.js +0 -1
  74. package/chunk-U467ZTQ4.js +0 -1
  75. package/chunk-UWRVKCWT.js +0 -4
  76. package/chunk-W2YH5ADR.js +0 -1
  77. package/chunk-WA5HD4WO.js +0 -1
  78. package/chunk-XWHL2DXG.js +0 -1
  79. package/styles-NHBDA2ZX.css +0 -1
package/chunk-FPFUN6JC.js DELETED
@@ -1,2 +0,0 @@
1
- import{a as K}from"./chunk-TQHNKGRL.js";import{a as X,d as z,g as J}from"./chunk-P4ZFQZCA.js";import{h as q}from"./chunk-S5EF63OY.js";import"./chunk-7L2WUS2V.js";import{Ab as P,Bb as R,Cb as x,Db as i,Eb as a,Fb as g,Jb as u,Pb as A,Pc as W,Qb as D,Ra as E,Rb as y,Ua as l,Vb as f,Wb as S,Z as v,Zb as w,ea as d,fa as _,gb as h,ic as c,jc as C,kc as I,lb as k,lc as N,nc as $,oc as B,pc as V,qc as U,r as T,ub as F,uc as G,va as m,zb as M}from"./chunk-L72ALLHJ.js";import{a as b,b as O}from"./chunk-7CGTOI24.js";var j=()=>({maxWidth:"700px",width:"100%"});function H(s,t){if(s&1&&(i(0,"a",9)(1,"spk-icon"),c(2,"link"),a()()),s&2){let e=S().$implicit;w("href",e.Url,E)}}function Q(s,t){if(s&1){let e=u();i(0,"div",2)(1,"h4"),c(2),k(3,H,3,1,"a",9),a(),i(4,"p"),c(5),g(6,"br"),i(7,"i"),c(8),a()(),i(9,"div",10)(10,"button",11),f("click",function(){let o=d(e).$implicit,r=S();return _(r.openLicense(o))}),A(11,1),g(12,"spk-icon"),D(),a()()()}if(s&2){let e=t.$implicit;l(2),N(" ",e.Title," - ",e.data==null?null:e.data.license," "),l(),M(e.Url?3:-1),l(2),I(" ",e.data==null?null:e.data.description," "),l(3),C(e.data==null?null:e.data.notes)}}var L=class s{#e=v(q);licenses=K(this.#e.getApiV1Licenses().pipe(T(t=>t.map(e=>O(b({},e),{data:e.Jsondata?JSON.parse(e.Jsondata):null})))));dialogIsOpen=m(!1);dialogLicense=m(null);#t=W(()=>{this.dialogLicense()&&this.dialogIsOpen.set(!0)});openLicense(t){this.dialogLicense.set(t)}closeLicense(){this.dialogIsOpen.set(!1),this.dialogLicense.set(null)}breakIntoLines(t){let e=t.split(`
2
- `),n="";for(let o=0;o<e.length;o++)n+=`<li>${e[o]}</li>`;return n}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=h({type:s,selectors:[["app-libraries"]],decls:15,vars:5,consts:()=>{let t;t=$localize`Libraries`;let e;return e=$localize` Details ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-square-in${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[t,e,[1,"license"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"license-dialog"],["footer",""],["spk-button","","type","button",3,"click"],[3,"href"],[1,"actions"],["spk-button","",3,"click"]]},template:function(e,n){if(e&1){let o=u();i(0,"h3"),y(1,0),a(),R(2,Q,13,5,"div",2,P),i(4,"spk-dialog",3),V("isOpenChange",function(p){return d(o),B(n.dialogIsOpen,p)||(n.dialogIsOpen=p),_(p)}),i(5,"header",4)(6,"h3"),c(7),a()(),i(8,"div",5),U(9),i(10,"div",6),c(11),a()(),i(12,"footer",7)(13,"button",8),f("click",function(){return d(o),n.dialogLicense.set(null),_(n.dialogIsOpen.set(!1))}),c(14,"Close"),a()()()}if(e&2){let o,r;l(2),x(n.licenses()),l(2),$("isOpen",n.dialogIsOpen),F("options",G(4,j)),l(3),C((o=n.dialogLicense())==null?null:o.Title);let p=(r=(r=n.dialogLicense())==null?null:r.License)!==null&&r!==void 0?r:"";l(4),I(" ",p," ")}},dependencies:[X,J,z],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}h4[_ngcontent-%COMP%]{font:var(--paragraph-10)}a[_ngcontent-%COMP%]{text-decoration:none}.license[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-level-40);display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}.license[_ngcontent-%COMP%]:first-of-type{border-top:1px solid var(--base-level-40)}.license[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;align-items:center}.license-dialog[_ngcontent-%COMP%]{background-color:var(--base-level-10);color:var(--base-level-70);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;max-height:31.25rem;white-space:pre;border:1px solid var(--base-level-40)}"],changeDetection:0})};export{L as default};
package/chunk-G3SK7TBB.js DELETED
@@ -1 +0,0 @@
1
- import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-UWRVKCWT.js")},{path:"encryption",loadComponent:()=>import("./chunk-DL56XS75.js")},{path:"select-files",loadComponent:()=>import("./chunk-Y7K42OXA.js")},{path:"options",loadComponent:()=>import("./chunk-M5CGJUYP.js")},{path:"progress",loadComponent:()=>import("./chunk-GWH2WEBY.js")}],t=o;export{t as default};
package/chunk-GVTMU7Q2.js DELETED
@@ -1 +0,0 @@
1
- import"./chunk-7CGTOI24.js";var o=[{path:"",loadComponent:()=>import("./chunk-S5FFZRTF.js"),children:[{path:"",redirectTo:"stored",pathMatch:"full"},{path:"stored",loadComponent:()=>import("./chunk-S24RG6QP.js")},{path:"live",loadComponent:()=>import("./chunk-NF45E5CN.js")}]}],t=o;export{t as default};
package/chunk-JYXXSXNP.js DELETED
@@ -1,8 +0,0 @@
1
- import{a as Bt,b as Kt}from"./chunk-PUEJXHBQ.js";import{a as pt}from"./chunk-HTJ5CVNN.js";import{a as Ve}from"./chunk-U467ZTQ4.js";import{a as lt,b as At,c as ct}from"./chunk-3KPWJPKG.js";import{a as Ut,b as Nt,c as Vt}from"./chunk-EQWH3TBL.js";import{a as fe}from"./chunk-TQHNKGRL.js";import{a as Me}from"./chunk-F2GEUOGZ.js";import{a as W}from"./chunk-BIZAKOYU.js";import{b as $e,c as ce,d as we,e as pe,f as xe,g as at,h as Re,i as Ie,j as ve,m as rt,n as Ge,o as st,p as bt,q as Le,r as ge,s as be,t as Ue}from"./chunk-ELMONRIG.js";import{b as Fe,d as ae}from"./chunk-C6XTRC7P.js";import{A as ke,B as it,a as re,b as tt,d as Gt,e as ye,g as Oe,l as se,o as Lt,p as nt,t as le}from"./chunk-P4ZFQZCA.js";import{h as ot}from"./chunk-S5EF63OY.js";import{ia as vt}from"./chunk-7L2WUS2V.js";import{$a as he,$b as It,Ab as Y,Bb as Q,Bc as qe,Cb as Z,Db as s,Eb as r,F as ze,Fb as u,Gb as B,Hb as K,Ib as He,Jb as R,Oc as $,Pb as S,Pc as et,Qb as E,Rb as O,Sb as Ze,T as De,Tb as Je,Ua as l,Ub as Te,Vb as h,Wb as c,Z as P,Zb as oe,ac as U,ea as F,f as Qe,fa as g,fc as Ae,gb as ie,gc as Ne,hc as ee,ic as d,jc as Pe,ka as xt,kc as H,lb as m,lc as St,nc as G,oc as L,pc as b,qc as Et,ra as Tt,rc as Dt,sa as ft,sc as ht,tb as Rt,ub as _,uc as Xe,va as D,vc as We,wb as Ce,xc as je,zb as T}from"./chunk-L72ALLHJ.js";import{a as X,b as me,c as wt}from"./chunk-7CGTOI24.js";var _t=class o{#n=P(ot);#t=P(ye);#e=P(Me);testDestination(n,e,t){return this.#e.hasV2TestOperations()?this.testDestinationv2(n,e,t):this.testDestinationv1(n,e,t)}testDestinationv2(n,e,t){return new Qe(i=>{this.#n.postApiV2DestinationTest({requestBody:{DestinationUrl:n,AutoCreate:!1,Options:null}}).subscribe({next:a=>{if(a.Success){i.next({action:"success",targetUrl:n,testAgain:!1,destinationIndex:e,anyFilesFound:!a.Data?.FolderIsEmpty,containsBackup:a.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:a.Data?.FolderContainsEncryptedBackupFiles??void 0}),i.complete();return}this.handleGenericError(i,n,e,a.Error??"Unknown error")},error:a=>{let p=a?.error?.body;if(p?.Data?.FolderExists===!1||p?.StatusCode==="missing-folder"){t?this.handleMissingFolder(i,n,e):this.handleGenericError(i,n,e,$localize`The remote destination folder does not exist.`);return}if(p?.Data?.HostCertificate){this.handleMissingCertificate(i,n,e,p.Data?.HostCertificate);return}if(p?.Data?.ReportedHostKey){this.handleIncorrectKey(i,n,e,p.Data.ReportedHostKey,p.Data.AcceptedHostKey??null);return}this.handleGenericError(i,n,e,a?.message??"Unknown error")}})})}testDestinationv1(n,e,t){return new Qe(i=>{this.#n.postApiV1RemoteoperationTest({requestBody:{path:n}}).subscribe({next:a=>{i.next({action:"success",targetUrl:n,testAgain:!1,destinationIndex:e}),i.complete()},error:a=>{this.handleDestinationErrorv1(a.message,n,e,t).subscribe(p=>{i.next(p)})}})})}handleMissingFolder(n,e,t){this.#t.open(W,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`,confirmText:$localize`Create folder`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.#e.hasV2TestOperations()?this.#n.postApiV2DestinationTest({requestBody:{DestinationUrl:e,AutoCreate:!0,Options:null}}).subscribe({next:a=>{a.Success?this.handleFolderCreated(n,e,t):this.handleFolderCreateFailure(n,e,t,a.Error??$localize`Unknown error`)},error:a=>{this.handleFolderCreateFailure(n,e,t,a.message??$localize`Unknown error`)}}):this.#n.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe({next:()=>{this.handleFolderCreated(n,e,t)},error:a=>{this.handleFolderCreateFailure(n,e,t,a.message??$localize`Unknown error`)}}))}})}handleFolderCreateFailure(n,e,t,i){this.#t.open(W,{data:{title:$localize`Error creating folder`,message:$localize`The remote destination folder could not be created. ${i}`,confirmText:$localize`OK`,cancelText:null},closed:()=>{n.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:t}),n.complete()}})}handleFolderCreated(n,e,t){this.#t.open(W,{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:t}),n.complete()}})}reportNoAction(n,e,t){n.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:t}),n.complete()}handleMissingCertificate(n,e,t,i){this.#t.open(W,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
2
- If this is a self-signed certificate, you can choose to trust this certificate.
3
- The server reported the certificate hash: ${i}`,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:a=>{if(!a){this.reportNoAction(n,e,t);return}n.next({action:"trust-cert",targetUrl:e,testAgain:!0,certData:i,destinationIndex:t}),n.complete()}})}handleIncorrectKey(n,e,t,i,a){a?this.#t.open(W,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
4
- otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
5
- Do you want to REPLACE your CURRENT host key ${a}
6
- with the REPORTED host key: ${i}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:p=>{if(!p){this.reportNoAction(n,e,t);return}n.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:t}),n.complete()}}):this.#t.open(W,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${i}`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:p=>{if(!p){this.reportNoAction(n,e,t);return}n.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:t}),n.complete()}})}handleGenericError(n,e,t,i){this.#t.open(W,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:i,cancelText:$localize`OK`},closed:a=>{n.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:t}),n.complete()}})}handleDestinationErrorv1(n,e,t,i){return new Qe(a=>{if(n==="missing-folder"){i?this.handleMissingFolder(a,e,t):this.handleGenericError(a,e,t,$localize`The remote destination folder does not exist.`);return}if(n.startsWith("incorrect-cert:")){let p=n.split("incorrect-cert:")[1];this.handleMissingCertificate(a,e,t,p);return}if(n.startsWith("incorrect-host-key:")){let p=n.split('incorrect-host-key:"')[1].split('",')[0],A=n.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(a,e,t,p,A);return}this.handleGenericError(a,e,t,n)})}static \u0275fac=function(e){return new(e||o)};static \u0275prov=De({token:o,factory:o.\u0275fac,providedIn:"root"})};var ut=class o{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||o)};static \u0275prov=De({token:o,factory:o.\u0275fac,providedIn:"root"})};var Yt=["formRef"];function Qt(o,n){o&1&&(s(0,"spk-alert",17),S(1,5),u(2,"spk-icon",26),E(),r())}function Zt(o,n){if(o&1&&d(0),o&2){let e=n.$implicit;H(" ",e.DisplayName," ")}}function Jt(o,n){if(o&1&&u(0,"spk-progress-bar",40),o&2){let e=c(3);Ce("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),_("value",e.calculatePasswordStrength()*(100/5))}}function en(o,n){o&1&&(s(0,"span",35),O(1,10),r())}function tn(o,n){o&1&&(S(0,8,1),u(1,"spk-icon"),E())}function nn(o,n){o&1&&(S(0,8,2),u(1,"spk-icon"),E())}function on(o,n){o&1&&(S(0,11,1),u(1,"spk-icon",42),E())}function an(o,n){o&1&&(S(0,11,2),u(1,"spk-icon"),E())}function rn(o,n){if(o&1){let e=R();s(0,"button",41),h("click",function(){F(e);let i=c(3);return g(i.copyPassword())}),S(1,11),m(2,on,2,0)(3,an,2,0),E(),r()}if(o&2){let e=c(3);l(2),T(e.copiedPassword()?2:3)}}function sn(o,n){o&1&&(s(0,"spk-alert",39),O(1,12),r())}function ln(o,n){if(o&1){let e=R();s(0,"div",30)(1,"spk-form-field")(2,"label",31),S(3,7),u(4,"sup"),E(),r(),u(5,"input",32),r(),m(6,Jt,1,9,"spk-progress-bar",33),s(7,"spk-form-field"),u(8,"input",34),m(9,en,2,0,"span",35),r(),s(10,"div",36)(11,"button",37),h("click",function(){F(e);let i=c(2);return g(i.showPassword.set(!i.showPassword()))}),S(12,8),m(13,tn,2,0)(14,nn,2,0),E(),r(),s(15,"button",37),h("click",function(){F(e);let i=c(2);return g(i.generatePassword())}),S(16,9),u(17,"spk-icon"),E(),r(),m(18,rn,4,1,"button",38),r(),m(19,sn,2,0,"spk-alert",39),r()}if(o&2){let e=c(2);l(5),_("type",e.showPassword()?"text":"password"),l(),T(e.generalForm.value.password?6:-1),l(2),_("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 cn(o,n){if(o&1&&(s(0,"spk-select",27)(1,"label",28),O(2,6),r(),u(3,"input",29),m(4,Zt,1,1,"ng-template"),r(),m(5,ln,20,7,"div",30)),o&2){let e=c();_("options",e.encryptionOptions())("isClearable",!1),l(5),T(e.encryptionFieldSignal()!==""?5:-1)}}function pn(o,n){if(o&1&&(s(0,"button",24),S(1,13),u(2,"spk-icon"),E(),r()),o&2){let e=c();_("disabled",e.nameAndDescriptionValid()===!1)}}function _n(o,n){if(o&1&&(s(0,"spk-tooltip",25)(1,"button",24),S(2,14),u(3,"spk-icon"),E(),r()()),o&2){let e=c();_("disabled",!(e.showCopyPassword()&&!e.copiedPassword())),l(),_("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var Be=new ge,zt=(o={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>Be.group({name:Be.control(o.name,[we.required]),description:Be.control(o.description),encryption:Be.control(o.encryption,[Vt()]),password:Be.control(o.password,[Nt(n=>n?.value.encryption!=="",[we.required])]),repeatPassword:Be.control(o.repeatPassword,[Nt(n=>n?.value.encryption!=="",[we.required])])}),yt={Key:"",DisplayName:"None"},Pt=class o{#n=P(ae);#t=P(Fe);#e=P(Ut);#i=P(_e);#o=P(Me);formRef=he.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=D(!1);copiedPassword=D(!1);showCopyPassword=D(!1);encryptionEffect=et(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=$(()=>{let n=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=$(()=>{let e=this.generalFormSignal()?.password??"";return this.#e.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit(!0)}async copyPassword(){let n=this.generalForm.controls.password.value;await this.#a(n??""),this.copiedPassword.set(!0)}async#a(n){try{await navigator.clipboard.writeText(n)}catch{try{let t=document.createElement("textarea");t.value=n,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}catch(t){console.error("Failed to copy text: ",t)}}}displayFn(){let n=this.#o.systemInfo()?.EncryptionModules??[];return e=>{let t=[yt,...n].find(i=>i.Key===e);return t?`${t.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||o)};static \u0275cmp=ie({type:o,selectors:[["app-general"]],viewQuery:function(e,t){e&1&&Ae(t.formRef,Yt,5),e&2&&Ne()},decls:21,vars:4,consts:()=>{let n;n=$localize`Your backup name`;let e;e=$localize`Your backup description`;let t;t=$localize`General backup settings`;let i;i=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let a;a=$localize`Backup description`;let p;p=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let A;A=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Encrypted backup `;let k;k=$localize`Encryption`;let x;x=$localize`Encryption`;let V;V=$localize`Password`;let y;y=$localize`Repeat password`;let w;w=$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=Te(v);let J;J=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let j;j=$localize`Passwords do not match`;let C;C=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,C=Te(C);let f;f=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let I;I=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let z;return z=$localize` Continue ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],t,i,a,p,A,x,w,v,J,j,C,f,I,z,["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",k,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",V,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",y,"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,t){if(e&1){let i=R();s(0,"form",15,0),h("submit",function(){return F(i),g(t.next())}),s(2,"h3",16),O(3,1),r(),m(4,Qt,3,0,"spk-alert",17),s(5,"spk-form-field")(6,"label",18),S(7,2),u(8,"sup"),E(),r(),u(9,"input",19),r(),s(10,"spk-form-field")(11,"label",20),O(12,3),r(),u(13,"textarea",21),r(),m(14,cn,6,3),s(15,"div",22)(16,"button",23),h("click",function(){return F(i),g(t.exit())}),S(17,4),u(18,"spk-icon"),E(),r(),m(19,pn,3,1,"button",24)(20,_n,4,2,"spk-tooltip",25),r()()}if(e&2){let i;_("formGroup",t.generalForm),l(4),T(!t.isNew()&&((i=t.generalFormSignal())==null?null:i.encryption)!==""?4:-1),l(10),T(t.isNew()?14:-1),l(5),T(t.encryptionFieldSignal()===""||!t.isNew()?19:20)}},dependencies:[Ue,Ie,ce,pe,xe,Ge,Le,se,le,Oe,re,nt,tt,it],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 un(o,n){if(o&1){let e=R();s(0,"div",24)(1,"spk-form-field")(2,"label",25),O(3,7),r(),s(4,"input",26,0),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.nextTime().time,i)||(a.scheduleFields.nextTime().time=i),g(i)}),h("focus",function(){F(e);let i=ee(5);return g(i.showPicker())}),r(),s(6,"spk-icon",27),d(7,"clock"),r()(),s(8,"spk-form-field"),u(9,"label",28),s(10,"input",29,1),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.nextTime().date,i)||(a.scheduleFields.nextTime().date=i),g(i)}),h("focus",function(){F(e);let i=ee(11);return g(i.showPicker())}),r(),s(12,"spk-icon",27),d(13,"calendar"),r()()(),s(14,"div",24)(15,"spk-form-field")(16,"label",30),O(17,8),r(),s(18,"input",31),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.runAgain().repeatValue,i)||(a.scheduleFields.runAgain().repeatValue=i),g(i)}),r()(),s(19,"spk-select",32)(20,"input",33),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.runAgain().repeatUnit,i)||(a.scheduleFields.runAgain().repeatUnit=i),g(i)}),r()()(),s(21,"app-toggle-card",34),B(22,35),O(23,9),K(),s(24,"div",36)(25,"spk-toggle",19),S(26,10),s(27,"input",20),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.runAgain().allowedDays.mon,i)||(a.scheduleFields.runAgain().allowedDays.mon=i),g(i)}),r(),E(),r(),s(28,"spk-toggle",19),S(29,11),s(30,"input",20),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.runAgain().allowedDays.tue,i)||(a.scheduleFields.runAgain().allowedDays.tue=i),g(i)}),r(),E(),r(),s(31,"spk-toggle",19),S(32,12),s(33,"input",20),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.runAgain().allowedDays.wed,i)||(a.scheduleFields.runAgain().allowedDays.wed=i),g(i)}),r(),E(),r(),s(34,"spk-toggle",19),S(35,13),s(36,"input",20),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.runAgain().allowedDays.thu,i)||(a.scheduleFields.runAgain().allowedDays.thu=i),g(i)}),r(),E(),r(),s(37,"spk-toggle",19),S(38,14),s(39,"input",20),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.runAgain().allowedDays.fri,i)||(a.scheduleFields.runAgain().allowedDays.fri=i),g(i)}),r(),E(),r(),s(40,"spk-toggle",19),S(41,15),s(42,"input",20),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.runAgain().allowedDays.sat,i)||(a.scheduleFields.runAgain().allowedDays.sat=i),g(i)}),r(),E(),r(),s(43,"spk-toggle",19),S(44,16),s(45,"input",20),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.runAgain().allowedDays.sun,i)||(a.scheduleFields.runAgain().allowedDays.sun=i),g(i)}),r(),E(),r()()()}if(o&2){let e=c();l(4),G("ngModel",e.scheduleFields.nextTime().time),l(6),G("ngModel",e.scheduleFields.nextTime().date),l(8),G("ngModel",e.scheduleFields.runAgain().repeatValue),l(),_("options",e.unitOptions)("isClearable",!1),l(),G("ngModel",e.scheduleFields.runAgain().repeatUnit),l(),_("disallowToggle",!0),l(6),G("ngModel",e.scheduleFields.runAgain().allowedDays.mon),l(3),G("ngModel",e.scheduleFields.runAgain().allowedDays.tue),l(3),G("ngModel",e.scheduleFields.runAgain().allowedDays.wed),l(3),G("ngModel",e.scheduleFields.runAgain().allowedDays.thu),l(3),G("ngModel",e.scheduleFields.runAgain().allowedDays.fri),l(3),G("ngModel",e.scheduleFields.runAgain().allowedDays.sat),l(3),G("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var dn=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],Ee={autoRun:!0,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}},Ot=class o{#n=P(_e);#t=P(ae);#e=P(Fe);unitOptions=dn;scheduleFields=this.#n.scheduleFields;goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#e.parent})}next(){this.#t.navigate(["options"],{relativeTo:this.#e.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=ie({type:o,selectors:[["app-schedule"]],decls:16,vars:2,consts:()=>{let n;n=$localize`Schedule`;let e;e=$localize` Automatically run backups ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let t;t=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let a;a=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let p;p=$localize`Next time`;let A;A=$localize`Run again every`;let k;k=$localize`Allowed days`;let x;x=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let V;V=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let y;y=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let w;w=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let v;v=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let J;J=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let j;return j=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],n,e,t,i,a,p,A,k,x,V,y,w,v,J,j,[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,t){e&1&&(s(0,"h3",17),O(1,2),r(),s(2,"div",18)(3,"spk-toggle",19),S(4,3),s(5,"input",20),b("ngModelChange",function(a){return L(t.scheduleFields.autoRun,a)||(t.scheduleFields.autoRun=a),a}),r(),E(),r(),s(6,"p"),O(7,4),r()(),m(8,un,46,14),s(9,"div",21)(10,"button",22),h("click",function(){return t.goBack()}),S(11,5),u(12,"spk-icon"),E(),r(),s(13,"button",23),h("click",function(){return t.next()}),S(14,6),u(15,"spk-icon"),E(),r()()),e&2&&(l(5),G("ngModel",t.scheduleFields.autoRun),l(3),T(t.scheduleFields.autoRun()?8:-1))},dependencies:[be,ce,ve,$e,pe,Re,se,ke,re,Oe,le,Ve],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 mn(o,n){if(o&1&&(B(0,4),d(1),K()),o&2){let e,t=c();l(),Pe((e=t.currentExpressionOption())==null?null:e.startsWith)}}function Fn(o,n){if(o&1&&(B(0,5),d(1),K()),o&2){let e,t=c();l(),Pe((e=t.currentExpressionOption())==null?null:e.endsWith)}}var gn=[{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"}],Ft=class o{path=ft.required();osType=ft();pathChange=Tt();remove=Tt();internalPath=D("");pathType=D("-Expression");currentExpressionOption=$(()=>{let n=this.pathType();return this.expressionOptions().find(e=>e.value===n)});expressionOptions=$(()=>{let e=this.osType()==="Windows"?"\\":"/";return gn.map(t=>t.value==="-Folder"||t.value==="+Folder"?me(X({},t),{startsWith:"",endsWith:""}):t.value==="-FolderName"||t.value==="+FolderName"?me(X({},t),{startsWith:"*",endsWith:`*${e}`}):t.value==="-FileName"||t.value==="+FileName"?me(X({},t),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):t.value==="-FileGroup"||t.value==="+FileGroup"?me(X({},t),{startsWith:"{",endsWith:"}"}):t.value==="-Regex"||t.value==="+Regex"?me(X({},t),{startsWith:"[",endsWith:"]"}):t.value==="-Extension"||t.value==="+Extension"?me(X({},t),{startsWith:"*.",endsWith:""}):me(X({},t),{startsWith:"",endsWith:""}))});pathEffect=et(()=>{let n=this.path(),e=n.slice(1),t=n.startsWith("-")?"-":"+",i=this.osType()==="Windows",a=i?"\\":"/";e.startsWith("%")&&e.endsWith(a)||i&&e.slice(2).startsWith(a)&&e.endsWith(a)||e.startsWith(a)&&e.endsWith(a)?(this.pathType.set(`${t}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${a}`)?(this.pathType.set(`${t}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${a}]*]`)?(this.pathType.set(`${t}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${t}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${t}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${t}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${t}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||o)};static \u0275cmp=ie({type:o,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:9,vars:6,consts:()=>{let 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,t){if(e&1&&(s(0,"spk-select",0)(1,"input",1),b("ngModelChange",function(a){return L(t.pathType,a)||(t.pathType=a),a}),h("ngModelChange",function(){return t.updateFilter()}),r()(),s(2,"spk-form-field",2)(3,"input",3),b("ngModelChange",function(a){return L(t.internalPath,a)||(t.internalPath=a),a}),h("ngModelChange",function(){return t.updateFilter()}),r(),m(4,mn,2,1,"ng-container",4)(5,Fn,2,1,"ng-container",5),r(),s(6,"div",6),h("click",function(){return t.removeFilter()}),s(7,"spk-icon",7),d(8,"x-circle"),r()()),e&2){let i,a;_("options",t.expressionOptions())("isClearable",!1),l(),G("ngModel",t.pathType),l(2),G("ngModel",t.internalPath),l(),T(!((i=t.currentExpressionOption())==null||i.startsWith==null)&&i.startsWith.length?4:-1),l(),T(!((a=t.currentExpressionOption())==null||a.endsWith==null)&&a.endsWith.length?5:-1)}},dependencies:[be,ce,pe,Re,le,se,re],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 Cn=["formRef"],Ht=()=>({standalone:!0});function Tn(o,n){if(o&1){let e=R();s(0,"spk-form-field",42)(1,"input",43),b("ngModelChange",function(i){F(e);let a=c(2);return L(a.editingPath,i)||(a.editingPath=i),g(i)}),r()(),s(2,"button",44),h("click",function(){F(e);let i=c(2);return g(i.updatePath())}),s(3,"spk-icon"),d(4,"floppy-disk"),r()(),s(5,"button",44),h("click",function(){F(e);let i=c(2);return g(i.cancelEditPath())}),s(6,"spk-icon"),d(7,"x-bold"),r()()}if(o&2){let e=c(2);l(),G("ngModel",e.editingPath),_("ngModelOptions",Xe(2,Ht))}}function fn(o,n){if(o&1){let e=R();s(0,"spk-form-field",42),u(1,"input",45),r(),s(2,"button",44),h("click",function(){F(e);let i=c().$implicit,a=c();return g(a.editPath(i))}),s(3,"spk-icon"),d(4,"pen"),r()(),s(5,"button",44),h("click",function(){F(e);let i=c().$implicit,a=c();return g(a.removePath(i))}),s(6,"spk-icon"),d(7,"trash-simple"),r()()}if(o&2){let e=c().$implicit;Rt("readonly",!0),l(),_("ngModel",e)("ngModelOptions",Xe(3,Ht))}}function Sn(o,n){if(o&1&&(s(0,"div",30),m(1,Tn,8,3)(2,fn,8,4),r()),o&2){let e=n.$implicit,t=c();l(),T(t.oldPath()===e?1:2)}}function En(o,n){if(o&1){let e=R();s(0,"app-new-filter",47),h("pathChange",function(i){let a=F(e).$index,p=c(2);return g(p.patchPathAt(i,a))})("remove",function(){let i=F(e).$index,a=c(2);return g(a.removePathAt(i))}),r()}if(o&2){let e,t=n.$implicit,i=c(2);_("path",t)("osType",(e=i.osType())!==null&&e!==void 0?e:"")}}function Dn(o,n){if(o&1&&Q(0,En,1,2,"app-new-filter",46,Y),o&2){let e=c();Z(e.pathArray())}}function hn(o,n){if(o&1&&(s(0,"div",41)(1,"spk-form-field"),u(2,"input",48),r(),s(3,"spk-select",49),u(4,"input",50),r()()),o&2){let e=c();l(3),_("options",e.sizeOptions())("isClearable",!1)}}var ue=new ge,An=["Bytes","KB","MB","GB","TB","PB"],Xt=(o={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>ue.group({path:ue.control(o.path),excludes:ue.group({hidden:ue.control(o.excludes.hidden),system:ue.control(o.excludes.system),temporary:ue.control(o.excludes.temporary),filesLargerThan:ue.group({size:ue.control(null),unit:ue.control(null)})})}),kt=class o{#n=P(_e);#t=P(ae);#e=P(Fe);formRef=he.required("formRef");sourceDataForm=this.#n.sourceDataForm;sourceDataFormSignal=this.#n.sourceDataFormSignal;newPathCtrl=new at("");filesLargerThan=$(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=D(An);osType=this.#n.osType;pathSignal=fe(this.sourceDataForm.controls.path.valueChanges);pathArray=$(()=>this.pathSignal()?.split("\0").filter(n=>n.startsWith("-")||n.startsWith("+")||n==="___none___")??[]);nonFilterPaths=$(()=>this.pathSignal()?.split("\0").filter(n=>!n.startsWith("-")&&!n.startsWith("+")&&n!==""));oldPath=D(null);editingPath=D(null);addingNewPath=D(!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 t=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(t?.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??"",t=e.indexOf(n);if(t===-1)return;let i=t===0?n:"\0"+n,a=e.replace(i,"");this.sourceDataForm.controls.path.setValue(a)}addFilter(n="-*"){let e=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${e}\0${n}`)}patchPathAt(n,e){let i=this.sourceDataForm.controls.path.value.split("\0").filter(p=>!p.startsWith("-")&&!p.startsWith("+")).join("\0"),a=this.pathArray().map((p,A)=>A===e?`${n}`:`${p}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${a}`)}removePathAt(n){let t=this.sourceDataForm.controls.path.value.split("\0").filter(a=>!a.startsWith("-")&&!a.startsWith("+")).join("\0"),i=this.pathArray().filter((a,p)=>p!==n).join("\0");this.sourceDataForm.controls.path.setValue(`${t}\0${i}`)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let n=this.sourceDataForm.controls.path.value,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||o)};static \u0275cmp=ie({type:o,selectors:[["app-source-data"]],viewQuery:function(e,t){e&1&&Ae(t.formRef,Cn,5),e&2&&Ne()},decls:56,vars:12,consts:()=>{let n;n=$localize`Path`;let e;e=$localize`Add a direct path`;let t;t=$localize`Hidden files`;let i;i=$localize`System files`;let a;a=$localize`Temporary files`;let p;p=$localize`Source Data`;let A;A=$localize`Folder path`;let k;k=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let x;x=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let V;V=$localize`Paths`;let y;y=$localize`Add a path directly from your machine.`;let w;w=$localize`Filters`;let v;v=$localize`Customize your filters.`;let J;J=$localize`Add filter`;let j;j=$localize`Exclude`;let C;C=$localize`Choose if there’s any files you want to exclude.`;let f;f=$localize` Hidden files ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let I;I=$localize` System files ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let z;z=$localize` Temporary files ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let N;N=$localize` Files larger than `;let te;te=$localize`Edit path`;let ne;return ne=$localize`Select an option...`,[["formRef",""],p,A,k,x,V,y,w,v,J,j,C,f,I,z,N,[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",t,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",a,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[1,"small"],["type","text","placeholder",te,3,"ngModelChange","ngModel","ngModelOptions"],["spk-button","","type","button",1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],["type","number","formControlName","size"],[3,"options","isClearable"],["type","text","formControlName","unit","placeholder",ne]]},template:function(e,t){if(e&1){let i=R();s(0,"form",16,0),h("submit",function(){return F(i),g(t.next())}),s(2,"div",17)(3,"h3",18),O(4,1),r(),s(5,"app-file-tree",19)(6,"label",20),O(7,2),r(),u(8,"input",21),r(),s(9,"div",22)(10,"button",23),h("click",function(){return F(i),g(t.goBack())}),S(11,3),u(12,"spk-icon"),E(),r(),s(13,"button",24),S(14,4),u(15,"spk-icon"),E(),r()()(),s(16,"div",25)(17,"app-toggle-card",26),B(18,27),O(19,5),K(),s(20,"p",28),O(21,6),r(),s(22,"div",29),Q(23,Sn,3,1,"div",30,Y),s(25,"div",31)(26,"spk-form-field"),u(27,"input",32),r(),s(28,"button",33),h("click",function(){return F(i),g(t.addNewPath())}),s(29,"spk-icon"),d(30,"plus"),r()()()()(),s(31,"app-toggle-card",26),B(32,27),O(33,7),K(),s(34,"p",28),O(35,8),r(),s(36,"button",34),h("click",function(){return F(i),g(t.addFilter())}),O(37,9),r(),m(38,Dn,2,0),r(),s(39,"app-toggle-card",35),B(40,27),O(41,10),K(),s(42,"p",28),O(43,11),r(),s(44,"spk-toggle",36),S(45,12),u(46,"input",37),E(),r(),s(47,"spk-toggle",36),S(48,13),u(49,"input",38),E(),r(),s(50,"spk-toggle",36),S(51,14),u(52,"input",39),E(),r(),s(53,"spk-toggle",40),h("click",function(){return F(i),g(t.toggleFilesLargerThan())}),O(54,15),r(),m(55,hn,5,2,"div",41),r()()()}if(e&2){let i;_("formGroup",t.sourceDataForm),l(5),_("multiSelect",!0)("startingPath",t.getPath())("showFiles",!0),l(12),_("disallowToggle",!0),l(6),Z(t.nonFilterPaths()),l(4),_("formControl",t.newPathCtrl),l(4),_("disallowToggle",!0),l(7),T((i=t.pathSignal())!=null&&i.length?38:-1),l(),_("disallowToggle",!0),l(14),Ce("active",t.filesLargerThan()),l(2),T(t.filesLargerThan()?55:-1)}},dependencies:[be,Ie,ce,ve,$e,pe,xe,Re,Ue,rt,Ge,Le,st,se,re,Oe,ke,le,Ft,pt,Ve],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 Wt="1W:1D,4W:1W,12M:1M",de=new ge,_e=class o{#n=P(ae);#t=P(Me);#e=P(ye);#i=P(ot);#o=P(ut);generalForm=zt();sourceDataForm=Xt();scheduleFields={autoRun:D(Ee.autoRun),nextTime:D(Ee.nextTime),runAgain:D(Ee.runAgain)};destinationForm=jt();settings=D([]);optionsFields={remoteVolumeSize:D("50MB"),backupRetention:D("all"),backupRetentionTime:D(""),backupRetentionVersions:D(0),backupRetentionCustom:D("")};isDraft=D(!1);backupId=D(null);backupName=$(()=>this.generalFormSignal()?.name??"");isSubmitting=D(!1);finishedLoading=D(!1);backupDefaults=D(null);isNew=$(()=>this.backupId()==="new");osType=$(()=>this.#t.systemInfo()?.OSType);selectedOptions=D([]);selectedAdvancedFormPair=D([]);destinationFormPair=D({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=$(()=>{let n=this.destinationFormPair()?.advanced??[],e=this.selectedAdvancedFormPair()??[];return n.filter(t=>e.findIndex(i=>i.name===t.name)===-1)});selectedHttpOptions=D([]);notSelectedHttpOptions=$(()=>{let n=this.httpOptions(),e=this.selectedHttpOptions()??[];return n.filter(t=>e.findIndex(i=>i.name===t.name)===-1)});sourceDataFormSignal=fe(this.sourceDataForm.valueChanges);destinationFormSignal=fe(this.destinationForm.valueChanges);generalFormSignal=fe(this.generalForm.valueChanges);encryptionFieldSignal=fe(this.generalForm.controls.encryption.valueChanges);destinationOptions=$(()=>this.#t.backendModules()??[]);httpOptions=$(()=>this.#t.systemInfo()?.GenericModules?.find(n=>n.Key==="http-options")?.Options?.map(this.#a)??[]);advancedOptions=$(()=>this.#t.systemInfo()?.Options?.map(this.#a)??[]);#a(n){return{name:n.Name,type:n.Type,shortDescription:n.ShortDescription??void 0,longDescription:n.LongDescription??void 0,options:n.ValidValues}}encryptionOptions=$(()=>{let n=this.#t.systemInfo()?.EncryptionModules??[];return[yt,...n]});nonSelectedOptions=$(()=>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,t){let i=this.selectedAdvancedFormPair().find(a=>a.name===n);if(i)this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.controls[i.name].setValue(t);else{let a=this.notSelectedAdvancedFormPair().find(p=>p.name===n);if(!a)return;this.addAdvancedFormPair(a,e,t)}}addAdvancedFormPairByName(n,e,t){let i=this.notSelectedAdvancedFormPair().find(a=>a.name===n);i&&this.addAdvancedFormPair(i,e,t)}addHttpOptionByName(n,e,t){let i=this.notSelectedHttpOptions().find(a=>a.name===n);i&&this.addHttpOption(i,e,t)}addAdvancedFormPair(n,e,t){let i=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,a=t??n.defaultValue;this.createFormField(i,n,a),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),n])}addHttpOption(n,e,t){let i=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,a=t??n.defaultValue;this.createFormField(i,n,a),this.selectedHttpOptions.set([...this.selectedHttpOptions(),n])}removeAdvancedFormPair(n,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(n.name),this.selectedAdvancedFormPair().findIndex(i=>i.name===n.name)!==-1?this.selectedAdvancedFormPair.update(i=>(i=i.filter(a=>a.name!==n.name),i)):this.selectedHttpOptions.update(i=>(i=i.filter(a=>a.name!==n.name),i))}removeHttpOption(n,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(n.name),this.selectedHttpOptions.update(t=>(t=t.filter(i=>i.name!==n.name),t))}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:t=>{this.exit(!1)},error:t=>{}}):this.#i.putApiV1BackupById({id:e,requestBody:n}).pipe(ze(()=>this.isSubmitting.set(!1))).subscribe({next:t=>{this.exit(!1)},error:t=>{}})}exit(n){if(!n){this.#p(),this.#n.navigate(["/"]);return}this.#e.open(W,{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.#r(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??"",t=n.Filters?.map(A=>`${A.Include?"":"-"}${A.Expression}`)??[],i=n.Settings?.find(A=>A.Name==="--exclude-files-attributes")?.Value??"",a=n.Settings?.find(A=>A.Name==="--skip-files-larger-than")??null,p={path:[...e,...t].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:a?.Value?.toUpperCase()??null}};this.sourceDataForm.patchValue(p)}mapDestinationToForm(n){let e=n.TargetURL?At(n.TargetURL):null;e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}#r(n){let e=At(n);e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}mapGeneralToForm(n){let e=n.Settings?.find(p=>p.Name==="encryption-module"),t=n.Settings?.find(p=>p.Name==="passphrase")?.Value??"",i=e?.Value&&e.Value.length?e.Value:"",a={name:n.Name??"",description:n.Description??""};i&&i!==""&&(a.encryption=i),t&&t!==""&&(a.password=t,a.repeatPassword=t),this.generalForm.patchValue(a)}mapScheduleToForm(n){if(!n){this.scheduleFields.autoRun.set(!1);return}let e=this.#o.fromString(n.Repeat)??null,t=this.#_(n.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>X(X({},i),t)),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"],t=n.Settings?.filter(p=>!e.includes(p.Name)),i=n.Settings?.filter(p=>e.includes(p.Name));this.settings.set(t??[]),t?.forEach(p=>{if(p.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(p.Value??"")});var a="all";i?.forEach(p=>{if(p.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(p.Value??"50MB"),p.Name==="keep-time"&&(p.Value??"")!=="")return a="time",this.optionsFields.backupRetentionTime.set(p.Value??"");if(p.Name==="keep-versions"&&(p.Value??"")!=="")return a="versions",this.optionsFields.backupRetentionVersions.set(p.Value?parseInt(p.Value):null);if(p.Name==="retention-policy"&&(p.Value??"")!=="")if(p.Value===Wt)a="smart";else return a="custom",this.optionsFields.backupRetentionCustom.set(p.Value??"")}),this.optionsFields.backupRetention.set(a)}getCurrentTargetUrl(){return this.#c(this.destinationForm.controls.destinations)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#l(){let n=this.generalForm.value,e=this.getScheduleFormValue(),t=this.sourceDataForm.value,a=this.destinationForm.value.destinations?.length?this.#c(this.destinationForm.controls.destinations):[],p=null;e.runAgain?.repeatUnit&&e.runAgain?.repeatValue&&(p=this.#o.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let A=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([w,v])=>v).map(([w,v])=>w):[],k=t.path?.split("\0")??[],x=this.mapFormsToSettings(),V=Object.entries(t.excludes??{}).filter(([w,v])=>v&&w!=="filesLargerThan").map(([w])=>w),y=t.excludes?.filesLargerThan;return V.length&&x.push({Name:"--exclude-files-attributes",Value:V.join(",")}),y&&y.size!==null&&y.unit!==null&&x.push({Name:"--skip-files-larger-than",Value:`${y.size}${y.unit}`}),{Backup:{Name:n.name,Description:n.description,TargetURL:a[0]??null,Sources:k.filter(w=>!w.startsWith("-")),Settings:x,Filters:k.filter(w=>w.startsWith("-")).map((w,v)=>({Order:v,Include:!1,Expression:w.slice(1)}))},Schedule:e.autoRun?{Repeat:p,Time:e.nextTime?.date?new Date(`${e.nextTime.date}T${e.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:A}:null}}mapFormsToSettings(n=[]){let e=this.generalForm.value,t=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy","dblock-size"],i=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&(i=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let a=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":a.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":a.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":a.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":a.push({Name:"retention-policy",Value:Wt});break}let p=[...n,...t],A=this.settings().filter(k=>!p.includes(k.Name)).map(k=>{let x=k.Value;return typeof k.Value=="number"&&(x=k.Value.toString()),typeof k.Value=="boolean"&&(x=k.Value?"True":"False"),{Name:k.Name,Value:x}});return[...i,...a,...A]}#c(n){return n.controls.map(e=>lt(e.value))}#_(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,t){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(t));return}if(e.type==="Size"){n.addControl(e.name,de.control(t));return}if(e.type==="Integer"){n.addControl(e.name,de.control(t?parseInt(t):0));return}if(e.type==="Boolean"){n.addControl(e.name,de.control(t==="true"||t==="True"));return}if(e.type==="Flags"){n.addControl(e.name,de.control(t??""));return}if(e.type==="Timespan"||e.type==="DateTime"){n.addControl(e.name,de.control(t,[we.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(n,e,t=!1){let i=ct.find(C=>C.customKey===n||C.key===n),a=i?.key,p=this.destinationOptions().find(C=>C.Key===a),A=this.httpOptions();if(!p||!p.Options)return;let k=i&&i.oauthField?i.oauthField:null,x=i&&i.customFields?i.customFields:{},V=i&&i.dynamicFields?i.dynamicFields:[],y=i&&i.advancedFields?i.advancedFields:[],w=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:k,custom:[],dynamic:[],advanced:[]});let v=de.group({}),J=de.group({}),j=de.group({});x&&Object.entries(x).forEach(([C,f],I)=>{let te=f,{formElement:z}=te,N=wt(te,["formElement"]);v.addControl(C,z(e?.custom[C])),this.destinationFormPair.update(ne=>(ne.custom.push(X({order:900+I},N)),ne))});for(let C=0;C<p.Options.length;C++){let f=p.Options[C];if(f.Deprecated)continue;let I=V.find(z=>z===f.Name||f.Aliases?.includes(z.name)||z.name===f.Name);if(I){let z=f.Aliases?.indexOf(I.name)??-1,N=f.Aliases&&z>-1?f.Aliases[z]:f.Name,te=I&&typeof I!="string",ne=te?I?.defaultValue??f.DefaultValue:f.DefaultValue,M={name:N,type:f.Type,shortDescription:f.ShortDescription??void 0,longDescription:f.LongDescription??void 0,options:f.ValidValues,order:900+C},Ke=te?X(X({},M),I):M,q=e?.dynamic[N]??ne??f.DefaultValue;this.createFormField(J,Ke,q),this.destinationFormPair.update($t=>($t.dynamic.push(Ke),$t))}else{if(w.find(q=>q===f.Name))continue;let N=y.find(q=>q===f.Name||q.name===f.Name),te=N&&typeof N!="string",ne=e?.advanced[f.Name],M=ne??f.DefaultValue,Ke={name:f.Name,type:f.Type,shortDescription:f.ShortDescription??void 0,longDescription:f.LongDescription??void 0,options:f.ValidValues,defaultValue:M,order:900+C},Ye=te?X(X({},Ke),N):Ke;t&&ne&&(this.createFormField(j,Ye,M),this.selectedAdvancedFormPair.update(q=>(q.push(Ye),q))),this.destinationFormPair.update(q=>(q.advanced.push(Ye),q))}}for(let C=0;C<A.length;C++){let f=A[C],I=e?.advanced[f.name],z=I??f.defaultValue;t&&I&&(this.createFormField(j,f,z),this.selectedHttpOptions.update(N=>(N.push(f),N)))}this.destinationFormPair.update(C=>({oauthField:C.oauthField,custom:C.custom.sort((f,I)=>f.order-I.order),dynamic:C.dynamic.sort((f,I)=>f.order-I.order),advanced:C.advanced.sort((f,I)=>f.order-I.order)})),this.destinationForm.controls.destinations.push(qt({key:i?.customKey??n,customGroup:v,dynamicGroup:J,advancedGroup:j}))}#p(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(Ee.autoRun),this.scheduleFields.nextTime.set(Ee.nextTime),this.scheduleFields.runAgain.set(Ee.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([])}static \u0275fac=function(e){return new(e||o)};static \u0275prov=De({token:o,factory:o.\u0275fac,providedIn:"root"})};var Nn=["formRef"],Pn=(o,n,e,t)=>({index:o,formView:n,formGroupName:"custom",destinationType:e,oauthField:t}),Ct=o=>({$implicit:o}),yn=(o,n,e,t)=>({index:o,formView:n,formGroupName:"dynamic",destinationType:e,oauthField:t}),On=(o,n,e,t)=>({index:o,formView:n,formGroupName:"advanced",destinationType:e,oauthField:t}),kn=(o,n,e,t)=>({index:o,formView:n,formGroupName:"advanced",asHttpOptions:!0,destinationType:e,oauthField:t}),Mn=()=>({maxWidth:"700px",width:"100%"});function $n(o,n){o&1&&(S(0,5,2),u(1,"spk-icon"),E())}function wn(o,n){o&1&&O(0,5,3)}function xn(o,n){if(o&1){let e=R();S(0,5,1),s(1,"button",21),h("click",function(){F(e);let i=c();return g(i.testDestination())}),m(2,$n,2,0)(3,wn,1,0),r(),E()}if(o&2){let e=c();l(),Ce("loader",e.testLoading())("success",e.successfulTest()),l(),T(e.successfulTest()?2:3)}}function Rn(o,n){if(o&1){let e=R();s(0,"p",27),h("click",function(){F(e);let i=c();return g(i.removeDestinationFormGroup(i.destinationCount()-1))}),S(1,8),u(2,"strong")(3,"br")(4,"span",28),E(),r()}if(o&2){let e,t=c();l(4),Ze((e=t.selectedDestinationType())==null?null:e.displayName),Je(1)}}function In(o,n){if(o&1){let e=R();s(0,"div",34),h("click",function(){let i=F(e).$implicit,a=c(2);return g(a.addDestinationFormGroup(i.key))}),s(1,"h3"),d(2),r(),s(3,"p"),d(4),r()()}if(o&2){let e=n.$implicit;l(2),Pe(e.displayName),l(2),Pe(e.description)}}function vn(o,n){if(o&1){let e=R();s(0,"button",35,1),h("click",function(){let i=F(e).$implicit,a=c(2);return g(a.addDestinationFormGroup(i.key))}),d(2),r()}if(o&2){let e=n.$implicit;l(2),H(" ",e.displayName," ")}}function Gn(o,n){if(o&1&&(s(0,"div",29),Q(1,In,5,2,"div",30,Y),r(),s(3,"spk-menu",31)(4,"button",32),O(5,9),r(),B(6,20),Q(7,vn,3,1,"button",33,Y),K(),r()),o&2){let e=c();l(),Z(e.destinationTypeOptionsFocused()),l(2),_("searchable",!0),l(4),Z(e.destinationTypeOptionsNotFocused())}}function Ln(o,n){o&1&&He(0)}function bn(o,n){if(o&1&&m(0,Ln,1,0,"ng-container",40),o&2){let e,t=n.$implicit,i=n.$index;c();let a=ee(29),p=c();_("ngTemplateOutlet",a)("ngTemplateOutletContext",We(7,Ct,je(2,Pn,i,t,(e=p.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function Un(o,n){o&1&&He(0)}function Vn(o,n){if(o&1&&m(0,Un,1,0,"ng-container",40),o&2){let e,t=n.$implicit,i=n.$index;c();let a=ee(29),p=c();_("ngTemplateOutlet",a)("ngTemplateOutletContext",We(7,Ct,je(2,yn,i,t,(e=p.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function Bn(o,n){if(o&1){let e=R();S(0,10,1),s(1,"button",35,1),h("click",function(){let i=F(e).$implicit,a=c(2);return g(a.addAdvancedFormPair(i,0))}),r(),E()}if(o&2){let e=n.$implicit;l(),Ze(e.name),Je(0)}}function Kn(o,n){o&1&&He(0)}function zn(o,n){if(o&1&&m(0,Kn,1,0,"ng-container",40),o&2){let e,t=n.$implicit,i=n.$index;c();let a=ee(29),p=c();_("ngTemplateOutlet",a)("ngTemplateOutletContext",We(7,Ct,je(2,On,i,t,(e=p.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function Hn(o,n){if(o&1){let e=R();S(0,11,1),s(1,"button",35,1),h("click",function(){let i=F(e).$implicit,a=c(2);return g(a.addHttpOption(i,0))}),r(),E()}if(o&2){let e=n.$implicit;l(),Ze(e.name),Je(0)}}function Xn(o,n){o&1&&He(0)}function Wn(o,n){if(o&1&&m(0,Xn,1,0,"ng-container",40),o&2){let e,t=n.$implicit,i=n.$index;c();let a=ee(29),p=c();_("ngTemplateOutlet",a)("ngTemplateOutletContext",We(7,Ct,je(2,kn,i,t,(e=p.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function jn(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(2).$implicit;_("message",e.formView.longDescription)}}function qn(o,n){if(o&1&&(s(0,"app-file-tree",43)(1,"label",47),d(2),m(3,jn,3,1,"spk-tooltip",48),r(),u(4,"input",49),r()),o&2){let e,t=c().$implicit,i=c(2);_("startingPath",i.getFormFieldValue(0,t.formGroupName,t.formView.name))("accepts",t.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),U("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),H(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),T(t.formView.longDescription?3:-1),l(),U("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),oe("formControlName",t.formView.name)}}function Yn(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(2).$implicit;_("message",e.formView.longDescription)}}function Qn(o,n){if(o&1&&(s(0,"app-file-tree",44)(1,"label",47),d(2),m(3,Yn,3,1,"spk-tooltip",48),r(),u(4,"input",49),r()),o&2){let e,t=c().$implicit,i=c(2);_("hideShortcuts",!0)("startingPath",i.getFormFieldValue(0,t.formGroupName,t.formView.name)),l(),U("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),H(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),T(t.formView.longDescription?3:-1),l(),U("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),oe("formControlName",t.formView.name)}}function Zn(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(2).$implicit;_("message",e.formView.longDescription)}}function Jn(o,n){o&1&&(s(0,"spk-icon",51),d(1,"link"),r())}function ei(o,n){o&1&&(s(0,"spk-icon",51),d(1,"envelope"),r())}function ti(o,n){o&1&&(s(0,"spk-icon",51),d(1,"textbox"),r())}function ni(o,n){if(o&1&&(s(0,"spk-form-field")(1,"label",47),d(2),m(3,Zn,3,1,"spk-tooltip",48),r(),u(4,"input",50),m(5,Jn,2,0,"spk-icon",51)(6,ei,2,0,"spk-icon",51)(7,ti,2,0,"spk-icon",51),r()),o&2){let e,t=c().$implicit;l(),U("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),H(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),T(t.formView.longDescription?3:-1),l(),U("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),oe("formControlName",t.formView.name),_("type",t.formView.type==="Email"?"email":"text"),l(),T(t.formView.type==="Path"?5:t.formView.type==="Email"?6:7)}}function ii(o,n){if(o&1){let e=R();s(0,"span",55),h("click",function(){F(e);let i=c(2).$implicit,a=c(2);return g(a.oauthStartTokenCreation(i.destinationType,i))}),d(1," AuthID "),r()}}function oi(o,n){o&1&&(s(0,"spk-icon",51),d(1,"password"),r())}function ai(o,n){if(o&1){let e=R();s(0,"spk-icon",56),h("click",function(){F(e);let i=c(2).$implicit;return g(i.formView.showPassword=!i.formView.showPassword)}),d(1," eye "),r()}}function ri(o,n){if(o&1){let e=R();s(0,"spk-icon",56),h("click",function(){F(e);let i=c(2).$implicit;return g(i.formView.showPassword=!i.formView.showPassword)}),d(1," eye-slash "),r()}}function si(o,n){if(o&1&&(s(0,"spk-form-field")(1,"label",47),d(2),r(),u(3,"input",52),m(4,ii,2,0,"span",53)(5,oi,2,0,"spk-icon",51)(6,ai,2,0,"spk-icon",54)(7,ri,2,0,"spk-icon",54),r()),o&2){let e,t=c().$implicit;l(),U("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),H(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),U("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),oe("formControlName",t.formView.name),_("type",t.formView.showPassword?"text":"password"),l(),T(t.oauthField===t.formView.name?4:5),l(2),T(t.formView.showPassword?6:7)}}function li(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(3).$implicit;_("message",e.formView.longDescription)}}function ci(o,n){if(o&1&&d(0),o&2){let e=c().$implicit;St(" ",e==null?null:e.key," (",e==null?null:e.value,") ")}}function pi(o,n){if(o&1&&d(0),o&2){let e=c().$implicit;H(" ",e," ")}}function _i(o,n){if(o&1&&m(0,ci,1,2)(1,pi,1,1),o&2){let e=c(3).$implicit;T(e.formView.loadOptions?0:1)}}function ui(o,n){if(o&1&&(s(0,"spk-select",57)(1,"label",47),d(2),m(3,li,3,1,"spk-tooltip",48),r(),u(4,"input",49),r(),m(5,_i,2,1,"ng-template",null,3,qe)),o&2){let e,t=ee(6);c();let i=ht(0),a=c().$implicit;_("options",i)("isClearable",!1)("optionTemplate",t),l(),U("for","destination-",a.formGroupName,"-",a.index,"-",a.asHttpOptions?"http":"other",""),l(),H(" ",(e=a.formView.shortDescription)!==null&&e!==void 0?e:a.formView.name," "),l(),T(a.formView.longDescription?3:-1),l(),U("id","destination-",a.formGroupName,"-",a.index,"-",a.asHttpOptions?"http":"other",""),oe("formControlName",a.formView.name)}}function di(o,n){if(o&1&&(Et(0),m(1,ui,7,14)),o&2){let e=c().$implicit,t=Dt(e.formView.loadOptions?e.formView.loadOptions(c(2).injector)():e.formView.options);l(),T(t?1:-1)}}function mi(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(3).$implicit;_("message",e.formView.longDescription)}}function Fi(o,n){if(o&1&&d(0),o&2){let e=n.$implicit;St(" ",e.key," ",e.value?"("+e.value+")":""," ")}}function gi(o,n){if(o&1&&(s(0,"spk-select",59)(1,"label",47),d(2),m(3,mi,3,1,"spk-tooltip",48),r(),u(4,"input",49),r(),m(5,Fi,1,2,"ng-template",null,4,qe)),o&2){let e,t=ee(6);c();let i=ht(0),a=c().$implicit;_("options",i)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",t),l(),U("for","destination-",a.formGroupName,"-",a.index,"-",a.asHttpOptions?"http":"other",""),l(),H(" ",(e=a.formView.shortDescription)!==null&&e!==void 0?e:a.formView.name," "),l(),T(a.formView.longDescription?3:-1),l(),U("id","destination-",a.formGroupName,"-",a.index,"-",a.asHttpOptions?"http":"other",""),oe("formControlName",a.formView.name)}}function Ci(o,n){o&1&&u(0,"spk-progress-bar",58)}function Ti(o,n){if(o&1&&(Et(0),m(1,gi,7,15)(2,Ci,1,0,"spk-progress-bar",58)),o&2){let e=c().$implicit,t=Dt(e.formView.loadOptions?e.formView.loadOptions(c(2).injector)():e.formView.options);l(),T(t?1:2)}}function fi(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(2).$implicit;_("message",e.formView.longDescription)}}function Si(o,n){if(o&1&&(s(0,"app-size",45)(1,"label",47),d(2),m(3,fi,3,1,"spk-tooltip",48),r()()),o&2){let e,t=c().$implicit;_("inputType",t.Name)("formControlName",t.formView.name)("customId",`destination-{{ item.formGroupName }}-{{ item.index }}-{{
7
- item.asHttpOptions ? 'http' : 'other'
8
- }}`),l(),U("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),H(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),T(t.formView.longDescription?3:-1)}}function Ei(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(2).$implicit;_("message",e.formView.longDescription)}}function Di(o,n){if(o&1&&(s(0,"spk-form-field")(1,"label",47),d(2),m(3,Ei,3,1,"spk-tooltip",48),r(),u(4,"input",60),s(5,"spk-icon",51),d(6,"numpad"),r()()),o&2){let e,t=c().$implicit;l(),U("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),H(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),T(t.formView.longDescription?3:-1),l(),U("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),oe("formControlName",t.formView.name)}}function hi(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(2).$implicit;_("message",e.formView.longDescription)}}function Ai(o,n){if(o&1&&(s(0,"spk-toggle",46)(1,"label",47),d(2),m(3,hi,3,1,"spk-tooltip",48),r(),u(4,"input",61),r()),o&2){let e,t=c().$implicit;l(),U("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),H(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),T(t.formView.longDescription?3:-1),l(),U("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),oe("formControlName",t.formView.name)}}function Ni(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(2).$implicit;_("message",e.formView.longDescription)}}function Pi(o,n){if(o&1&&d(0),o&2){let e=n.$implicit;H(" ",e," ")}}function yi(o,n){if(o&1&&(s(0,"spk-select",62)(1,"label",47),d(2),m(3,Ni,3,1,"spk-tooltip",48),r(),u(4,"input",63),r(),m(5,Pi,1,1,"ng-template",null,4,qe)),o&2){let e,t=ee(6),i=c().$implicit;_("options",i.formView.options)("selectMultiple",!0)("optionTemplate",t),l(),It("for","destination-",i.formGroupName,"-",i.index,""),l(),H(" ",(e=i.formView.shortDescription)!==null&&e!==void 0?e:i.formView.name," "),l(),T(i.formView.longDescription?3:-1),l(),oe("formControlName",i.formView.name)}}function Oi(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(2).$implicit;_("message",e.formView.longDescription)}}function ki(o,n){if(o&1&&(s(0,"app-timespan",45)(1,"label",47),d(2),m(3,Oi,3,1,"spk-tooltip",48),r()()),o&2){let e,t=c().$implicit;_("inputType",t.formView.name)("formControlName",t.formView.name)("customId","destination-"+t.formGroupName+"-"+t.index+"-"+(t.asHttpOptions?"http":"other")),l(),U("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),H(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),T(t.formView.longDescription?3:-1)}}function Mi(o,n){if(o&1){let e=R();s(0,"button",64),h("click",function(){F(e);let i=c().$implicit,a=c(2);return g(a.removeFormView(i.formView,0))}),s(1,"spk-icon"),d(2,"x-circle"),r()()}}function $i(o,n){if(o&1&&(s(0,"div",41),B(1,42),m(2,qn,5,17,"app-file-tree",43)(3,Qn,5,13,"app-file-tree",44)(4,ni,8,13,"spk-form-field")(5,si,8,13,"spk-form-field")(6,di,2,2)(7,Ti,3,2)(8,Si,4,9,"app-size",45)(9,Di,7,11,"spk-form-field")(10,Ai,5,11,"spk-toggle",46)(11,yi,7,9)(12,ki,4,9,"app-timespan",45),K(),m(13,Mi,3,0,"button",32),r()),o&2){let e=n.$implicit;Ce("single-field",e.formGroupName!=="advanced"),l(),_("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 wi(o,n){if(o&1&&(B(0,22)(1,36),Q(2,bn,1,9,"ng-container",null,Y),Q(4,Vn,1,9,"ng-container",null,Y),s(6,"app-toggle-card",37),B(7,38),S(8,10),s(9,"spk-menu",31)(10,"button",39),u(11,"spk-icon"),r(),B(12,20),Q(13,Bn,3,1,"button",33,Y),K(),r(),E(),K(),Q(15,zn,1,9,"ng-container",null,Y),r(),s(17,"app-toggle-card",37),B(18,38),S(19,11),s(20,"spk-menu",31)(21,"button",39),u(22,"spk-icon"),r(),B(23,20),Q(24,Hn,3,1,"button",33,Y),K(),r(),E(),K(),Q(26,Wn,1,9,"ng-container",null,Y),r(),m(28,$i,14,5,"ng-template",null,2,qe),K()()),o&2){let e=c();l(2),Z(e.destinationFormPair().custom),l(2),Z(e.destinationFormPair().dynamic),l(2),_("disallowToggle",!0),l(3),_("searchable",!0),l(),_("disabled",e.notSelectedAdvancedFormPair().length===0),l(3),Z(e.notSelectedAdvancedFormPair()),l(2),Z(e.selectedAdvancedFormPair()),l(2),_("disallowToggle",!0),l(3),_("searchable",!0),l(),_("disabled",e.notSelectedHttpOptions().length===0),l(3),Z(e.notSelectedHttpOptions()),l(2),Z(e.selectedHttpOptions())}}function xi(o,n){if(o&1){let e=R();s(0,"spk-dialog",65),b("isOpenChange",function(i){F(e);let a=c();return L(a.targetUrlDialogOpen,i)||(a.targetUrlDialogOpen=i),g(i)}),s(1,"header",66)(2,"h2"),O(3,12),r(),s(4,"spk-alert",67),O(5,13),r()(),s(6,"div",68)(7,"spk-form-field"),u(8,"textarea",69),r()(),s(9,"footer",70)(10,"button",24),h("click",function(){F(e);let i=c();return g(i.closeTargetUrlDialog(!1))}),d(11,"Cancel"),r(),s(12,"button",71),h("click",function(){F(e);let i=c();return g(i.closeTargetUrlDialog(!0))}),S(13,14),u(14,"spk-icon"),E(),r()()()}if(o&2){let e=c();G("isOpen",e.targetUrlDialogOpen),_("options",Xe(3,Mn)),l(8),_("formControl",e.targetUrlCtrl)}}var gt=new ge,jt=(o={destinations:[]})=>gt.group({destinations:gt.array(o.destinations)}),qt=({key:o,customGroup:n,dynamicGroup:e,advancedGroup:t})=>gt.group({destinationType:gt.control(o),custom:n,dynamic:e,advanced:t}),Mt=class o{#n=P(ae);#t=P(Fe);#e=P(_e);#i=P(ye);#o=P(_t);injector=P(xt);formRef=he.required("formRef");destinationForm=this.#e.destinationForm;destinationFormPair=this.#e.destinationFormPair;selectedAdvancedFormPair=this.#e.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#e.notSelectedAdvancedFormPair;selectedHttpOptions=this.#e.selectedHttpOptions;notSelectedHttpOptions=this.#e.notSelectedHttpOptions;destinationOptions=this.#e.destinationOptions;destinationFormSignal=this.#e.destinationFormSignal;destinationCount=$(()=>this.destinationFormSignal()?.destinations?.length??0);successfulTest=D(!1);testLoading=D(!1);destinationTypeOptionsInFocus=D(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=D(ct.map(n=>({key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description})));destinationTypeOptionsFocused=$(()=>{let n=this.destinationTypeOptionsInFocus(),e=this.destinationTypeOptions();return n.map(t=>e.find(i=>i.key===t))});selectedDestinationType=$(()=>{let n=this.destinationFormSignal();return this.destinationTypeOptions().find(t=>n?.destinations?.[0]?.destinationType===t.key)});destinationTypeOptionsNotFocused=$(()=>{let n=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(t=>!n.includes(t.key))});getFormFieldValue(n,e,t){return((this.destinationForm.controls.destinations.controls?.[n]).controls?.[e]).controls[t].value}getFormControl(n,e,t){return((this.destinationForm.controls.destinations.controls?.[n]).controls?.[e]).controls[t]}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=$(()=>this.#e.getCurrentTargetUrl()[0]);targetUrlCtrl=new at;targetUrlInitial=D(null);targetUrlDialogOpen=D(!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,t=this.targetUrlInitial();!n||e===t||this.#e.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(n=0){let t=this.#e.getCurrentTargetUrl()[n];t&&(this.testLoading.set(!0),this.#o.testDestination(t,n,!0).pipe(ze(()=>this.testLoading.set(!1))).subscribe({next:i=>{if(i.action==="success"){this.#e.isNew()&&(i.containsBackup===!0?this.#i.open(W,{data:{title:$localize`Folder contains backup`,message:$localize`The remote destination already contains a backup. You must use a different folder for each backup.`,confirmText:$localize`OK`,cancelText:void 0}}):i.anyFilesFound===!0&&this.#i.open(W,{data:{title:$localize`Folder is not empty`,message:$localize`The remote destination is not empty. It is recommended to use an empty folder for the backup.`,confirmText:$localize`OK`,cancelText:void 0}})),this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3);return}if(i.action==="generic-error"){this.successfulTest.set(!1);return}i.action==="trust-cert"&&this.#e.addHttpOptionByName("accept-specified-ssl-hash",i.destinationIndex,i.certData),i.action==="approve-host-key"&&this.#e.addOrUpdateAdvancedFormPairByName("ssh-fingerprint",i.destinationIndex,i.reportedHostKey),i.testAgain&&this.testDestination(i.destinationIndex)}}))}mapToTargetUrl(n){return lt(n.value)}removeDestinationFormGroup(n){this.destinationForm.controls.destinations.removeAt(n)}displayFn(n){let e=this.destinationOptions().find(t=>t.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})}#a=D("https://duplicati-oauth-handler.appspot.com/").asReadonly();#s=D(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#r=D(!1);#l=D(null);keyCreation(){}oauthStartTokenCreation(n,e){let t=this.getFormControl(e.index,e.formGroupName,e.formView.name);this.#r.set(!0);let i=this.#s(),a=450,p=600,A=this.#a()+"?type="+n+"&token="+i,k=screen.width/2-a/2,x=screen.height/2-p/2,V=window.open(A,"_blank","height="+p+",width="+a+",menubar=0,status=0,titlebar=0,toolbar=0,left="+k+",top="+x);return window.addEventListener("message",y=>{let w=y.data.startsWith("authid:"),v=w?y.data.replace("authid:",""):null;console.log("event",y),w&&(t.setValue(v),this.#r.set(!1),V?.close())}),!1}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=ie({type:o,selectors:[["app-destination"]],viewQuery:function(e,t){e&1&&Ae(t.formRef,Nn,5),e&2&&Ne()},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=Te(n);let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let t;t=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$localize` Current destination type ${"\uFFFD#2\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:.${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:LINE_BREAK: Want to select another? ${"\uFFFD#4\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPAN:`;let a;a=$localize`Other destinations`;let p;p=$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:`,p=Te(p);let A;A=$localize` Http options ${"\uFFFD#20\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#21\uFFFD"}:START_TAG_BUTTON: Add http option ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#23\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*25:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*25:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#23\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SPK_MENU:`,A=Te(A);let k;k=$localize`Edit target URL`;let x;x=$localize` Be careful, this will overwrite everything you have in your destination. `;let V;return V=$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,t,i,a,p,A,k,x,V,[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,t){if(e&1){let i=R();s(0,"form",15,0),h("submit",function(){return F(i),g(t.next())}),s(2,"header")(3,"h3",16),S(4,5),s(5,"div",17),m(6,xn,4,5,"button",18),s(7,"spk-menu")(8,"button",19),u(9,"spk-icon"),r(),B(10,20),s(11,"button",21),h("click",function(){return F(i),g(t.openTargetUrlDialog())}),u(12,"spk-icon"),r(),K(),r()(),E(),r(),m(13,Rn,5,1,"p"),r(),m(14,Gn,9,1)(15,wi,30,6,"ng-container",22),s(16,"div",23)(17,"button",24),h("click",function(){return F(i),g(t.goBack())}),S(18,6),u(19,"spk-icon"),E(),r(),s(20,"button",25),S(21,7),u(22,"spk-icon"),E(),r()()(),m(23,xi,15,4,"spk-dialog",26)}if(e&2){let i;_("formGroup",t.destinationForm),l(6),T(t.destinationCount()>0?6:-1),l(7),T(t.destinationCount()>0?13:-1),l(),T(t.destinationCount()===0?14:-1),l(),T(!((i=t.destinationFormSignal())==null||i.destinations==null)&&i.destinations.length?15:-1),l(8),T(t.targetUrlDialogOpen()?23:-1)}},dependencies:[Ue,Ie,ce,ve,$e,pe,xe,rt,Ge,Le,st,bt,vt,se,Lt,re,ke,it,Gt,tt,le,nt,Kt,Ve,pt,Bt],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{_t as a,jt as b,qt as c,Mt as d,zt as e,yt as f,Pt as g,Ee as h,Ot as i,Xt as j,kt as k,_e as l};
package/chunk-NF45E5CN.js DELETED
@@ -1 +0,0 @@
1
- import{a}from"./chunk-ZGKHK6QQ.js";import"./chunk-P7IBR2UW.js";import"./chunk-P4ZFQZCA.js";import"./chunk-S5EF63OY.js";import"./chunk-7L2WUS2V.js";import"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";export{a as default};
package/chunk-P4ZFQZCA.js DELETED
@@ -1 +0,0 @@
1
- import{ia as We}from"./chunk-7L2WUS2V.js";import{$a as j,Ab as ge,Bb as ve,Cb as Ce,Db as a,Eb as p,Fb as $,Hc as Be,Ib as ie,Jb as W,Oc as D,Pc as V,Rc as xe,T as le,Ta as Re,Ua as h,Vb as O,W as Ie,Wa as he,Wb as g,Xb as x,Ya as Pe,Yb as f,Z as I,a as Me,ab as Fe,bb as F,ca as Ve,ea as S,ec as Le,fa as k,fc as q,gb as y,gc as Q,hc as je,ib as fe,ic as _,jc as _e,ka as ce,kc as G,la as pe,lb as b,lc as se,nc as Se,oc as ke,pc as ye,qa as de,qb as Ae,qc as oe,ra as X,rc as J,sa as m,sc as z,ta as L,tb as He,ua as ue,ub as K,uc as De,va as v,vb as B,vc as re,wb as M,xb as me,yb as Y,zb as E}from"./chunk-L72ALLHJ.js";import{a as N,b as Z,c as Te}from"./chunk-7CGTOI24.js";var H=["*"],Ge=[[["","icon",""]],[["","title",""]],"*",[["","content",""]]],Ke=["[icon]","[title]","*","[content]"];function Je(n,u){n&1&&(a(0,"spk-icon",3),_(1,"info"),p())}function Ze(n,u){n&1&&(a(0,"spk-icon",3),_(1,"info"),p())}function et(n,u){n&1&&(a(0,"spk-icon",3),_(1,"warning"),p())}function tt(n,u){n&1&&(a(0,"spk-icon",3),_(1,"warning-octagon"),p())}function it(n,u){n&1&&(a(0,"spk-icon",3),_(1,"check-circle"),p())}function nt(n,u){n&1&&(a(0,"spk-icon",3),_(1,"question"),p())}function st(n,u){if(n&1){let t=W();a(0,"spk-icon",7),O("click",function(){S(t);let i=g();return k(i.removeAlert())}),_(1,"plus"),p()}}var ot=["dialogRef"];function rt(n,u){if(n&1){let t=W();a(0,"div",4),O("click",function(){S(t);let i=g();return k(i.isOpen.set(!1))}),p()}}var at=["spk-button",""];var qe=["triggerRef"],lt=["popoverRef"],ct=[[["","trigger",""]],"*"],pt=["[trigger]","*"];var dt=()=>({closeOnButton:!1,closeOnEsc:!0});var ut=[[["label"]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["textarea"]],[["","textSuffix",""]],[["","suffix",""]],[["","error",""]],[["","hint",""]]],ht=["label","[prefix]","[textPrefix]","input","textarea","[textSuffix]","[suffix]","[error]","[hint]"],ze=["input"],ft=[[["label"]]],mt=["label"];function gt(n,u){if(n&1&&(a(0,"div",3),_(1),p()),n&2){let t=g();h(),_e(t.files()[0].name)}}function vt(n,u){if(n&1&&(a(0,"div",3),_(1),p()),n&2){let t=g();h(),G("",t.files().length," files selected")}}function Ct(n,u){if(n&1&&(a(0,"div",4),_(1),p()),n&2){let t=g();h(),_e(t.filesOver()?t.overlayText():t.placeholder())}}var _t=["optionsRef"],St=["*",[["","menu",""]]],kt=["*","[menu]"];function yt(n,u){n&1&&(a(0,"spk-icon",5),_(1,"caret-down"),p())}var Dt=[[["label"]],[["input","type","range"]]],xt=["label","input[type=range]"],wt=["optionsWrap"],bt=[[["label"]],[["input"]],[["textarea"]]],Ot=["label","input","textarea"],Et=()=>({closeOnButton:!1,closeOnEsc:!1}),be=n=>({$implicit:n});function Tt(n,u){if(n&1&&_(0),n&2){let t=g();G(" ",t.inputValue()," ")}}function Mt(n,u){n&1&&ie(0)}function It(n,u){if(n&1&&b(0,Mt,1,0,"ng-container",13),n&2){let t=g(3).$implicit;g(2);let e=z(6);K("ngTemplateOutlet",e)("ngTemplateOutletContext",re(2,be,t))}}function Vt(n,u){if(n&1&&_(0),n&2){let t=g(3).$implicit,e=g(2);G(" ",e.getLabel(t)," ")}}function Rt(n,u){if(n&1){let t=W();a(0,"spk-chip",11),b(1,It,1,4,"ng-container")(2,Vt,1,1),a(3,"spk-icon",12),O("click",function(i){S(t);let s=g(2).$index,o=g(2);return k(o.removeSelectedOptionByIndex(i,s))}),_(4,"x-bold"),p()()}if(n&2){let t=g(4),e=z(6);Y(t.selectClasses()),h(),E(e?1:2)}}function Pt(n,u){n&1&&ie(0)}function Ft(n,u){if(n&1&&b(0,Pt,1,0,"ng-container",13),n&2){let t=g(4).$implicit;g(2);let e=z(6);K("ngTemplateOutlet",e)("ngTemplateOutletContext",re(2,be,t))}}function At(n,u){if(n&1&&_(0),n&2){let t=g(4).$implicit,e=g(2);G(" ",e.getLabel(t)," ")}}function Ht(n,u){if(n&1&&b(0,Ft,1,4,"ng-container")(1,At,1,1),n&2){g(5);let t=z(6);E(t?0:1)}}function Lt(n,u){if(n&1&&b(0,Ht,2,1),n&2){g(4);let t=z(9);E(t?-1:0)}}function jt(n,u){if(n&1&&b(0,Rt,5,3,"spk-chip",10)(1,Lt,1,1),n&2){g(3);let t=z(8);E(t?0:1)}}function Bt(n,u){if(n&1&&b(0,jt,2,1),n&2){let t=u.$implicit;E(t?0:-1)}}function Wt(n,u){if(n&1&&ve(0,Bt,1,1,null,null,ge),n&2){g();let t=z(4);Ce(t)}}function qt(n,u){n&1&&ie(0)}function zt(n,u){if(n&1&&b(0,qt,1,0,"ng-container",14),n&2){g(2);let t=z(0);K("ngTemplateOutlet",t)}}function Ut(n,u){if(n&1&&_(0),n&2){let t,e=g(2);G(" ",(t=e.placeholderText())!==null&&t!==void 0?t:""," ")}}function $t(n,u){if(n&1&&b(0,zt,1,1,"ng-container")(1,Ut,1,1),n&2){g();let t=z(0);E(t?0:1)}}function Qt(n,u){n&1&&(a(0,"spk-icon",6),_(1,"caret-down"),p())}function Nt(n,u){n&1&&$(0,"spk-spinner",7)}function Yt(n,u){n&1&&(a(0,"spk-icon",6),_(1,"list-magnifying-glass"),p())}function Xt(n,u){n&1&&(a(0,"spk-icon",6),_(1,"magnifying-glass"),p())}function Gt(n,u){if(n&1){let t=W();a(0,"spk-icon",15),O("click",function(i){S(t);let s=g();return k(s.clear(i))}),_(1,"x-bold"),p()}}function Kt(n,u){n&1&&(a(0,"spk-icon",6),_(1,"caret-down"),p())}function Jt(n,u){n&1&&(a(0,"spk-icon",6),_(1,"caret-up"),p())}function Zt(n,u){if(n&1&&$(0,"spk-checkbox"),n&2){let t=g().$index,e=g();Y(e.selectClasses()),M("active",e.isSelected(t))}}function ei(n,u){n&1&&ie(0)}function ti(n,u){if(n&1&&b(0,ei,1,0,"ng-container",13),n&2){let t=g().$implicit;g();let e=z(7);K("ngTemplateOutlet",e)("ngTemplateOutletContext",re(2,be,t))}}function ii(n,u){if(n&1&&_(0),n&2){let t=g().$implicit,e=g();G(" ",e.getLabel(t)," ")}}function ni(n,u){if(n&1){let t=W();a(0,"li",16),O("click",function(){let i=S(t).$index,s=g();return k(s.toggleOptionByIndex(i))}),b(1,Zt,1,4,"spk-checkbox",17)(2,ti,1,4,"ng-container")(3,ii,1,1),p()}if(n&2){let t=u.$index,e=g(),i=z(7);M("selected",e.isSelected(t))("focused",t===e.focusedOptionIndex()),h(),E(e.selectMultiple()?1:-1),h(),E(i?2:3)}}var si=["dragImageElement"],oi=[[["","sidenav",""]],[["","sidenav-closed-topbar",""]],"*"],ri=["[sidenav]","[sidenav-closed-topbar]","*"];function ai(n,u){n&1&&$(0,"div",1,0)}function li(n,u){if(n&1){let t=W();a(0,"div",7),O("drop",function(i){S(t);let s=g();return k(s.drop(i))})("dragover",function(i){S(t);let s=g();return k(s.dragOver(i))})("dragenter",function(){S(t);let i=g();return k(i.dragEnter())})("dragleave",function(){S(t);let i=g();return k(i.dragLeave())}),p()}}function ci(n,u){if(n&1){let t=W();a(0,"div",8),O("dragstart",function(i){S(t);let s=g();return k(s.dragStart(i))})("dragend",function(i){S(t);let s=g();return k(s.dragEnd(i))})("drag",function(i){S(t);let s=g();return k(s.drag(i))})("touchstart",function(i){S(t);let s=g();return k(s.touchStart(i))})("touchmove",function(i){S(t);let s=g();return k(s.touchMove(i))})("touchend",function(i){S(t);let s=g();return k(s.touchEnd(i))})("touchcancel",function(i){S(t);let s=g();return k(s.touchCancel(i))}),p()}}var pi=["thead"],di=[[["","table-header",""]],"*",[["","table-no-rows",""]]],ui=["[table-header]","*","[table-no-rows]"];function hi(n,u){n&1&&$(0,"spk-progress-bar",1)}function fi(n,u){n&1&&(a(0,"div",2),f(1,2),p())}var mi=[[["","title",""]],"*"],gi=["[title]","*"];function vi(n,u){n&1&&_(0,"Title")}function Ci(n,u){n&1&&(a(0,"spk-icon",1),_(1,"caret-down"),p())}var _i=["tooltipRef"];var we=["bold","thin","light","fill"],te=(()=>{class n{#e=I(L);get currentClass(){let t=this.#e.nativeElement.innerText;for(let e=0;e<we.length;e++)if(t.endsWith(we[e]))return we[e];return""}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-icon"]],hostVars:2,hostBindings:function(e,i){e&2&&Y(i.currentClass)},ngContentSelectors:H,decls:1,vars:0,template:function(e,i){e&1&&(x(),f(0))},encapsulation:2,changeDetection:0})}}return n})(),Gi=(()=>{class n{constructor(){this._el=I(L),this.alertService=m(null),this.id=m(null),this.alertClasses=D(()=>this._el.nativeElement.classList.toString())}removeAlert(){this.id()&&this.alertService()&&this.alertService()?.removeAlert(this.id())}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-alert"]],inputs:{alertService:[1,"alertService"],id:[1,"id"]},ngContentSelectors:Ke,decls:18,vars:4,consts:[["ref",""],[1,"alert"],[1,"icon"],[1,"state-icon"],[1,"title"],[1,"close-icon"],[1,"content"],[1,"close-icon",3,"click"]],template:function(e,i){if(e&1&&(x(Ge),a(0,"div",1)(1,"div",2,0),f(3),p(),a(4,"div",2),oe(5),b(6,Je,2,0,"spk-icon",3)(7,Ze,2,0,"spk-icon",3)(8,et,2,0,"spk-icon",3)(9,tt,2,0,"spk-icon",3)(10,it,2,0,"spk-icon",3)(11,nt,2,0,"spk-icon",3),p(),a(12,"div",4),f(13,1),f(14,2),p(),b(15,st,2,0,"spk-icon",5),a(16,"div",6),f(17,3),p()()),e&2){let s=je(2);h(),B("display",s.children.length?"block":"none");let o=i.alertClasses();h(5),E(o.includes("primary")?6:o.includes("accent")?7:o.includes("warn")?8:o.includes("error")?9:o.includes("success")?10:11),h(9),E(i.id()?15:-1)}},dependencies:[te],encapsulation:2,changeDetection:0})}}return n})();function Oe(){return Date.now().toString(36)+Math.random().toString(36).substring(2)}var Ki=(()=>{class n{constructor(){this.alertHistory=v([]),this.alertHistoryIsOpen=v(!1),this.alertHistoryIsHidden=v(!0)}error(t){this.addAlert({type:"error",title:t??"An error occured"})}success(t){this.addAlert({type:"success",title:t})}question(t){this.addAlert({type:"question",title:t})}warning(t){this.addAlert({type:"warn",title:t})}info(t){this.addAlert({type:"primary",title:t})}addAlert(t){let e=Oe();this.alertHistory.update(i=>[Z(N({},t),{isOpen:!0,animateIn:!0,animateOut:!1,id:e}),...i]),setTimeout(()=>{this.alertHistory.update(i=>i.map(s=>Z(N({},s),{animateIn:s.id===e?!1:s.animateIn})))},40),setTimeout(()=>{this.hideAlert(e)},2500)}removeAlert(t){this.alertHistory.update(e=>e.map(i=>Z(N({},i),{animateOut:i.id===t?!1:i.animateOut}))),setTimeout(()=>{this.alertHistory.update(e=>e.filter(i=>i.id!==t))},300)}hideAlert(t){this.alertHistory.update(e=>e.map(i=>Z(N({},i),{isOpen:i.id===t?!1:i.isOpen})))}setHidden(t){this.alertHistoryIsHidden.set(t)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275prov=le({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),ae=new Ie("Sparkle UI Config"),Si={class:"default",width:void 0,maxWidth:void 0,height:void 0,maxHeight:void 0,closeOnButton:!0,closeOnEsc:!0,closeOnOutsideClick:!0},ki=(()=>{class n{constructor(){this.#e=I(ae,{optional:!0}),this.dialogRef=j("dialogRef"),this.isOpen=F(!1),this.options=m(),this.closed=X(),this.defaultOptionMerge=D(()=>N(Z(N({},Si),{class:this.#e?.dialogType??"default"}),this.options())),this.abortController=null,this.isOpenEffect=V(()=>{let t=this.dialogRef()?.nativeElement;this.abortController&&this.abortController.abort(),this.abortController=new AbortController,this.isOpen()?(t?.showModal(),t?.addEventListener("close",()=>{this.isOpen.set(!1),this.closed.emit()},{signal:this.abortController?.signal}),document.addEventListener("keydown",e=>{e.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&e.preventDefault(),e.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},{signal:this.abortController?.signal})):(this.closed.emit(),t?.close())})}#e;ngOnDestroy(){this.abortController?.abort()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-dialog"]],viewQuery:function(e,i){e&1&&q(i.dialogRef,ot,5),e&2&&Q()},inputs:{isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:H,decls:6,vars:11,consts:[["dialogRef",""],["spkDialog",""],[1,"content"],[1,"closeable-overlay"],[1,"closeable-overlay",3,"click"]],template:function(e,i){if(e&1&&(x(),oe(0),a(1,"dialog",1,0)(3,"div",2),f(4),p(),b(5,rt,1,0,"div",3),p()),e&2){let s,o,r,c,l=i.defaultOptionMerge();h(),Y(l.class),B("width",(s=l.width)!==null&&s!==void 0?s:"")("max-width",(o=l.maxWidth)!==null&&o!==void 0?o:"")("max-height",(r=l.maxHeight)!==null&&r!==void 0?r:"")("height",(c=l.height)!==null&&c!==void 0?c:""),h(4),E(i.defaultOptionMerge().closeOnOutsideClick?5:-1)}},encapsulation:2,changeDetection:0})}}return n})(),Ji=(()=>{class n{constructor(){this.#e=document.querySelector("body"),this.#i=I(Ae),this.compRef=null,this.insertedCompRef=null,this.closedFieldSub=null,this.compClosedSub=null}#e;#i;open(t,e){let i=this.#i.injector,s=this.#t(),P=e||{},{data:o,closed:r}=P,c=Te(P,["data","closed"]);this.compRef&&this.#n(),this.insertedCompRef=xe(t,{environmentInjector:i}),this.compRef=xe(ki,{hostElement:s,environmentInjector:i,projectableNodes:[[this.insertedCompRef.location.nativeElement]]});let l=this.insertedCompRef.instance?.data,d=this.insertedCompRef.instance?.closed;if(o){if(ue(l))this.insertedCompRef.setInput("data",o);else if(!ue(l))throw new Error("data is not an input signal on the passed component")}d instanceof de&&(this.closedFieldSub=d.subscribe((...A)=>{r?.(...A),this.#n()})),this.#i.attachView(this.insertedCompRef.hostView),this.#i.attachView(this.compRef.hostView),this.insertedCompRef.changeDetectorRef.detectChanges(),this.compRef.changeDetectorRef.detectChanges(),this.compRef.instance.isOpen.set(!0),this.compRef.setInput("options",c),this.compRef.instance.closed.subscribe(()=>R());let w=this;function R(){d&&d instanceof de?d.emit(!1):r?.(void 0),w.#n()}return{component:this.insertedCompRef.instance,close:R}}#t(){let t=document.createElement("spk-dialog-ref");return t.id="spk-dialog-ref",document.getElementById("spk-dialog-ref")||this.#e.append(t),document.getElementById("spk-dialog-ref")}#n(){this.insertedCompRef&&(this.#i.detachView(this.insertedCompRef.hostView),this.closedFieldSub?.unsubscribe(),this.insertedCompRef.destroy()),this.compRef&&(this.#i.detachView(this.compRef.hostView),this.compClosedSub?.unsubscribe(),this.compRef.destroy())}ngOnDestroy(){this.#n()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275prov=le({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),Zi=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-button-group"]],ngContentSelectors:H,decls:1,vars:0,template:function(e,i){e&1&&(x(),f(0))},encapsulation:2,changeDetection:0})}}return n})(),yi=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["","spk-button",""]],attrs:at,ngContentSelectors:H,decls:1,vars:0,template:function(e,i){e&1&&(x(),f(0))},encapsulation:2,changeDetection:0})}}return n})(),en=(()=>{class n{constructor(){this.#e=I(ae,{optional:!0}),this.class=v(this.#e?.cardType??"default")}#e;static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-card"]],hostVars:2,hostBindings:function(e,i){e&2&&Y(i.class())},ngContentSelectors:H,decls:1,vars:0,template:function(e,i){e&1&&(x(),f(0))},encapsulation:2,changeDetection:0})}}return n})(),Di=(()=>{class n{#e=I(L);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-checkbox"]],hostBindings:function(e,i){e&1&&O("click",function(){return i.onClick()})},ngContentSelectors:H,decls:6,vars:0,consts:[[1,"box"],[1,"inherit","default-indicator"],[1,"inherit","indeterminate-indicator"]],template:function(e,i){e&1&&(x(),a(0,"div",0)(1,"spk-icon",1),_(2,"check"),p(),a(3,"spk-icon",2),_(4,"minus"),p()(),f(5))},dependencies:[te],encapsulation:2,changeDetection:0})}}return n})(),xi=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-chip"]],ngContentSelectors:H,decls:1,vars:0,template:function(e,i){e&1&&(x(),f(0))},encapsulation:2,changeDetection:0})}}return n})();var wi=["scroll","auto"],bi={width:void 0,height:void 0,closeOnButton:!0,closeOnEsc:!0},Ue=(()=>{class n{constructor(){this.#e=I(Be),this.#i=4,this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.above=m(!1),this.right=m(!1),this.markForCheck=m(null),this._above=v(this.above()),this._right=v(this.right()),this.disableOpenByClick=m(!1),this.isOpen=F(!1),this.options=m(),this.closed=X(),this.defaultOptionMerge=D(()=>N(N({},bi),this.options())),this.triggerRef=j.required("triggerRef"),this.popoverRef=j.required("popoverRef"),this.id=v("--"+Oe()),this.menuStyle=v(null),this.openAbort=null,this.openEffect=V(()=>{let t=this.popoverRef()?.nativeElement;if(this.isOpen()){this.openAbort&&this.openAbort.abort(),this.openAbort=new AbortController;let i={signal:this.openAbort?.signal};t?.showPopover(),document.addEventListener("keydown",s=>{s.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&s.preventDefault(),s.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},i),setTimeout(()=>{this.#t(this.popoverRef()?.nativeElement).addEventListener("scroll",()=>this.#n(),i),window.addEventListener("resize",()=>this.#n(),i),this.#n()})}else t.hidePopover(),this.openAbort?.abort(),this.closed.emit()}),this.markForCheckEffect=V(()=>{this.markForCheck()&&this.#e.markForCheck()})}#e;#i;toggleIsOpen(t){t.preventDefault(),t.stopPropagation(),this.disableOpenByClick()||this.isOpen.set(!this.isOpen())}eventClose(t){t.stopPropagation(),t.preventDefault(),this.isOpen.set(!1)}#t(t){let e=t.parentElement;for(;e;){if(wi.indexOf(window.getComputedStyle(e).overflowY)>-1&&e.scrollHeight>e.clientHeight)return e;e=e.parentElement}return document.documentElement}#n(){let t=this.triggerRef()?.nativeElement.getBoundingClientRect(),e=this.popoverRef()?.nativeElement.getBoundingClientRect(),i=t.left,s=t.bottom,o=i,r=s+this.#i,c=o+e.width>window.innerWidth,l=r+e.height>window.innerHeight;if(this.SUPPORTS_ANCHOR)this._above.set(l),this._right.set(c);else{if(o=i,r=s+this.#i,l){let w=t.top-e.height-this.#i;w<0||(r=w)}c&&(o=t.right-e.width,o<0&&(o=0));let d={left:o+"px",top:r+"px"};this.menuStyle.set(d)}}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-popover"]],viewQuery:function(e,i){e&1&&(q(i.triggerRef,qe,5),q(i.popoverRef,lt,5)),e&2&&Q(2)},hostVars:4,hostBindings:function(e,i){e&2&&M("above",i._above())("right",i._right())},inputs:{above:[1,"above"],right:[1,"right"],markForCheck:[1,"markForCheck"],disableOpenByClick:[1,"disableOpenByClick"],isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:pt,decls:10,vars:6,consts:[["triggerRef",""],["popoverRef",""],[1,"trigger",3,"click"],[1,"trigger-wrapper"],["spk-button","",1,"outlined"],["popover","",1,"popover"],[1,"overlay",3,"click"]],template:function(e,i){if(e&1){let s=W();x(ct),a(0,"div",2,0),O("click",function(r){return S(s),k(i.toggleIsOpen(r))}),a(2,"div",3),f(3),p(),a(4,"button",4),_(5,"Open popover"),p()(),a(6,"div",5,1)(8,"div",6),O("click",function(r){return S(s),k(i.isOpen()&&i.eventClose(r))}),p(),f(9,1),p()}e&2&&(B("anchor-name",i.id()),h(6),me(i.menuStyle()),B("position-anchor",i.id()))},dependencies:[yi],encapsulation:2,changeDetection:0})}}return n})();var tn=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-divider"]],ngContentSelectors:H,decls:1,vars:0,template:function(e,i){e&1&&(x(),f(0))},encapsulation:2,changeDetection:0})}}return n})(),Ee=(()=>{class n{#e=I(L);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus(),this.#e.nativeElement.querySelector("textarea")&&this.#e.nativeElement.querySelector("textarea").focus()}ngOnInit(){let t=typeof CSS<"u"&&CSS.supports("field-sizing","content"),e=this.#e.nativeElement.querySelector("textarea");if(!t&&e!==null){let o=function(){e.style.height="auto",e.style.height=e.scrollHeight+"px"},r=function(){window.setTimeout(o,0)};var i=o,s=r;e.addEventListener("change",o),e.addEventListener("cut",r),e.addEventListener("paste",r),e.addEventListener("drop",r),e.addEventListener("keydown",r),e.focus(),e.select(),o()}}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-form-field"]],hostBindings:function(e,i){e&1&&O("click",function(){return i.onClick()})},ngContentSelectors:ht,decls:15,vars:0,consts:[[1,"input-wrap"],[1,"prefix"],[1,"suffix"],[1,"helpers"],[1,"error"],[1,"hint"]],template:function(e,i){e&1&&(x(ut),f(0),a(1,"div",0)(2,"div",1),f(3,1),f(4,2),p(),f(5,3),f(6,4),a(7,"div",2),f(8,5),f(9,6),p()(),a(10,"div",3)(11,"div",4),f(12,7),p(),a(13,"div",5),f(14,8),p()())},encapsulation:2,changeDetection:0})}}return n})(),nn=(()=>{class n{constructor(){this._el=I(L),this.inputRef=j.required("input"),this.filesOver=v(!1),this.multiple=m(),this.accept=m(null),this.placeholder=F("Click or drag files here"),this.overlayText=m("Drop files here"),this.files=F([]),this.fileUploadClasses=D(()=>this._el.nativeElement.classList.toString()),this.inputEffect=V(()=>{let t=this.inputRef().nativeElement;t&&(t.placeholder&&this.placeholder.set(t.placeholder),t.addEventListener("dragover",e=>{e.preventDefault(),this.filesOver.set(!0)}),t.addEventListener("dragleave",e=>{e.preventDefault(),this.filesOver.set(!1)}),t.addEventListener("drop",e=>{e.preventDefault(),this.filesOver.set(!1);let i=e.dataTransfer?.files;i&&i.length>0&&(this.handleFileUpload(Array.from(i)),t.files=i)}),t.addEventListener("change",e=>{e.preventDefault(),this.handleFileUpload(Array.from(e.target.files))}))})}handleFileUpload(t){this.multiple()?this.files.update(e=>[...e,...t]):this.files.set(t)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-file-upload"]],viewQuery:function(e,i){e&1&&q(i.inputRef,ze,5),e&2&&Q()},inputs:{multiple:[1,"multiple"],accept:[1,"accept"],placeholder:[1,"placeholder"],overlayText:[1,"overlayText"],files:[1,"files"]},outputs:{placeholder:"placeholderChange",files:"filesChange"},ngContentSelectors:mt,decls:12,vars:7,consts:[["inputWrap",""],["input",""],["ngProjectAs","input",5,["input"],1,"input"],[1,"files-text"],[1,"placeholder"],["type","file"],[1,"bg-overlay"],["suffix",""]],template:function(e,i){e&1&&(x(ft),a(0,"spk-form-field"),f(1,0,["ngProjectAs","label",5,["label"]]),a(2,"div",2,0),b(4,gt,2,1,"div",3)(5,vt,2,1,"div",3)(6,Ct,2,1,"div",4),$(7,"input",5,1)(9,"div",6),p(),a(10,"spk-icon",7),_(11,"upload-simple"),p()()),e&2&&(Y(i.fileUploadClasses()),h(4),E(i.files().length===1?4:i.files().length>1?5:6),h(3),He("multiple",i.multiple())("accept",i.accept()),h(2),M("files-over",i.filesOver()))},dependencies:[Ee,te],encapsulation:2,changeDetection:0})}}return n})(),sn=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-list"]],ngContentSelectors:H,decls:1,vars:0,template:function(e,i){e&1&&(x(),f(0))},encapsulation:2,changeDetection:0})}}return n})();function $e(n,u){let t=u?.injector||(Ve($e),I(ce)),{debounce:e=0,initialValue:i=void 0,transform:s=C=>C,compare:o=(C,T)=>C===T,forceType:r=void 0,returnPreviousValue:c=!0}=u||{},l=v(i),d=t.get(pe),w=D(()=>{let C=n()?.nativeElement;if(C instanceof HTMLInputElement||C instanceof HTMLTextAreaElement)return Ne(C)}),R=!1,P,A=null;return V(()=>{let C=w();if(!C)return l.set(c&&P?s(P):void 0);i!==void 0&&C.value===""?l.set(i):C.value!==""&&ne();let T=U=>{A!==null&&clearTimeout(A),A=setTimeout(()=>{A=null,ne()},e)};C.addEventListener("input",T),C.addEventListener("inputValueChanged",T),d.onDestroy(()=>{C.removeEventListener("input",T),C.removeEventListener("inputValueChanged",T),A!==null&&clearTimeout(A)})},{injector:t}),V(()=>{let C=w();if(!C)return;let T=l()??"",U=T==null?"":String(T);C.value!==U&&(P=U,C.value=U,C.dispatchEvent(new Event("input")))},{injector:t}),l;function ne(){if(!R){R=!0;try{let C=w();if(!C)return;let T=C.value,U=r?Ye(T,r):s(T);P=T,o(l(),U)||l.set(U)}finally{R=!1}}}function Ne(C){return Object.defineProperty(C,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(C),"value").get.call(this)},set(T){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(C),"value").set.call(this,T);let Xe=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:T}});return this.dispatchEvent(Xe),T}}),C}function Ye(C,T){switch(T){case"string":return C.toString();case"number":let U=Number(C);return isNaN(U)?void 0:U;case"boolean":return C.toLowerCase()==="true"?!0:C.toLowerCase()==="false"?!1:void 0;default:return C}}}function Qe(n,u){let t=I(ce),e=t.get(pe),i=v([]),s=null,o=null,r=(l,d)=>{o&&o.disconnect();let w=Array.from(l.nativeElement.querySelectorAll(d.join(",")));i.set(w),o=new MutationObserver(R=>{requestAnimationFrame(()=>{let P=Array.from(l.nativeElement.querySelectorAll(d.join(",")));i.set(P)})}),o.observe(l.nativeElement,{childList:!0,subtree:!0}),e.onDestroy(()=>c())};s=V(()=>{let l=typeof n=="function"&&n[Me]?n():n,d=typeof u=="function"?u():u;l&&d?.length>0?r(l,d):(i.set([]),o&&(o.disconnect(),o=null))},{injector:t});function c(){s&&s.destroy(),o&&o.disconnect()}return{signal:i.asReadonly(),destroy:c}}var on=(()=>{class n{constructor(){this.#e=I(Pe),this.above=m(!1),this.right=m(!1),this.openIndicator=m(!1),this.disabled=m(!1),this.customOptionElementSelectors=m(["button"]),this.keepClickedOptionActive=m(!1),this.closeOnClick=m(!0),this.isOpen=F(!1),this.closed=X(),this.searchable=m(!1),this.activeOptionIndex=v(-1),this.inputRef=j("input"),this.optionsRef=j("optionsRef"),this.options=Qe(this.optionsRef,this.customOptionElementSelectors),this.optionsEl=D(()=>this.options.signal().filter(t=>!t.disabled)),this.inputValue=$e(this.inputRef),this.abortController=null,this.optionsEffect=V(()=>{if(!this.isOpen())return;this.abortController&&(this.abortController.abort(),this.abortController=null),this.abortController=new AbortController;let t=this.inputRef()?.nativeElement;t&&(queueMicrotask(()=>t.focus()),this.closeOnClick()||this.optionsRef()?.nativeElement?.addEventListener("click",i=>{let s=i.target,o=this.activeElements();if(!o.length){let c=this.optionsEl();this.activeElements.set(c),o=c}let r=o.findIndex(c=>c===s);r>-1&&(this.activeOptionIndex.set(r),t.focus())}),t.addEventListener("keydown",e=>{let i=this.activeOptionIndex();e.key==="ArrowDown"?(e.preventDefault(),this.activeOptionIndex.set(this.nextActiveIndex(i))):e.key==="ArrowUp"?(e.preventDefault(),this.activeOptionIndex.set(this.prevActiveIndex(i))):e.key==="Enter"?(e.preventDefault(),i>-1&&(this.activeElements()[i].click(),queueMicrotask(()=>this.close("active")))):e.key==="Tab"&&(e.preventDefault(),this.close("closed"))},{signal:this.abortController.signal}))}),this._lastElementList=[],this.activeElements=v([]),this.lastInputValue="",this.inputValueEffect=V(()=>{if(!this.searchable())return;let e=(this.inputValue()??"").toLowerCase();if(this.#t(),!e||e==="")return;let i=this._lastElementList.length&&e.length>this.lastInputValue.length?this._lastElementList:this.optionsEl();this.lastInputValue=e;for(let s=0;s<i.length;s++){let o=i[s],r=o.textContent?.toLowerCase()||"",c=this.#i(r,e);o.value=c}i=i.filter(s=>s.value>0).sort((s,o)=>o.value-s.value);for(let s=0;s<i.length;s++)this.#e.setStyle(i[s],"order",s);this.activeElements.set(i),this._lastElementList=i}),this.activeOptionIndexEffect=V(()=>{let t=this.activeElements(),e=this.activeOptionIndex();for(let i=0;i<t.length;i++)t[i].classList.remove("active");e>-1&&(t[e].scrollIntoView({block:"center"}),t[e].classList.add("active"))})}#e;#i(t,e){if(!e)return 0;let i=0,s=-1,o=0,r=!0;for(let c=0;c<e.length;c++){let l=e[c];if(t.length>s+1&&t[s+1]===l)i+=c===0?100:150,s++,o++;else{let d=t.indexOf(l,s+1);if(c>0&&(r=!1),d===-1)return 0;i+=100,s=d,o++}}return r&&e.length===o&&(i+=1e3),i+=o*20,i}nextActiveIndex(t){let e=this.activeElements();if(!e.length){let s=this.optionsEl();this.activeElements.set(s),e=s}if(t===-1||t===e.length-1)return 0;let i=t+1;return e[i].disabled?this.nextActiveIndex(i):i}prevActiveIndex(t){let e=this.activeElements();if(!e.length){let s=this.optionsEl();this.activeElements.set(s),e=s}if(t===0||t===-1)return e.length-1;let i=t-1;return e[i].disabled?this.prevActiveIndex(i):i}close(t="closed",e){this.inputValue.set(""),this.closeOnClick()&&((!this.keepClickedOptionActive()||t==="closed")&&this.#t(),this.isOpen.set(!1),this.closed.emit(t==="active"))}#t(){this.activeOptionIndex.set(-1);let t=this.optionsEl();for(let e=0;e<t.length;e++)t[e].classList.remove("active")}ngOnDestroy(){this.abortController&&(this.abortController.abort(),this.abortController=null)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-menu"]],viewQuery:function(e,i){e&1&&(q(i.inputRef,ze,5),q(i.optionsRef,_t,5)),e&2&&Q(2)},hostVars:4,hostBindings:function(e,i){e&2&&M("disabled",i.disabled())("has-search",i.searchable())},inputs:{above:[1,"above"],right:[1,"right"],openIndicator:[1,"openIndicator"],disabled:[1,"disabled"],customOptionElementSelectors:[1,"customOptionElementSelectors"],keepClickedOptionActive:[1,"keepClickedOptionActive"],closeOnClick:[1,"closeOnClick"],isOpen:[1,"isOpen"],searchable:[1,"searchable"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:kt,decls:12,vars:13,consts:[["formFieldWrapper",""],["input",""],["optionsRef",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","above","right","options"],["trigger","",3,"click"],[1,"open-indicator"],[1,"form-field-wrap"],[1,"small","stretch"],["type","text","placeholder","Search"],[1,"options",3,"click"]],template:function(e,i){if(e&1){let s=W();x(St),a(0,"spk-popover",3,0),ye("isOpenChange",function(r){return S(s),ke(i.isOpen,r)||(i.isOpen=r),k(r)}),O("closed",function(){return S(s),k(i.close("fromPopover"))}),a(2,"div",4),O("click",function(){return S(s),k(!i.disabled()&&i.isOpen.set(!0))}),f(3),b(4,yt,2,0,"spk-icon",5),p(),a(5,"div",6)(6,"spk-form-field",7),$(7,"input",8,1),p()(),a(9,"div",9,2),O("click",function(){return S(s),k(i.close("active"))}),f(11,1),p()()}e&2&&(Se("isOpen",i.isOpen),K("disableOpenByClick",!0)("above",i.above())("right",i.right())("options",De(12,dt)),h(2),M("is-open",i.isOpen()),h(2),E(i.openIndicator()?4:-1),h(2),M("hidden",i.searchable()===!1),h(3),M("searching",i.searchable()&&i.inputValue()!==""))},dependencies:[Ue,Ee,te],encapsulation:2,changeDetection:0})}}return n})(),Oi=(()=>{class n{constructor(){this.value=m(void 0)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-progress-bar"]],inputs:{value:[1,"value"]},decls:1,vars:2,consts:[[1,"progress-bar"]],template:function(e,i){e&1&&$(0,"div",0),e&2&&B("width",i.value(),"%")},encapsulation:2,changeDetection:0})}}return n})(),rn=(()=>{class n{#e=I(L);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-radio"]],hostBindings:function(e,i){e&1&&O("click",function(){return i.onClick()})},ngContentSelectors:H,decls:2,vars:0,consts:[[1,"radio"]],template:function(e,i){e&1&&(x(),$(0,"div",0),f(1))},encapsulation:2,changeDetection:0})}}return n})(),an=(()=>{class n{constructor(){this.#e=I(L),this.#i=null,this.#t=null,this.#n=0,this.alwaysShowThumb=m(!1),this.unit=m(""),this.value=F(this.#n),this.inputState=v({min:0,max:100,step:1}),this.valuePercentage=D(()=>{let{min:t,max:e}=this.inputState(),i=this.value()??t;if(isNaN(i))return 0;let s=e-t;if(s===0)return 0;let o=(i-t)/s*100;return Math.max(0,Math.min(100,o))}),this.trackFilledPercentage=D(()=>this.valuePercentage()),this.thumbPositionPercentage=D(()=>this.valuePercentage()),this.syncModelToInputEffect=V(()=>{let t=this.value();if(this.#t){let e=parseFloat(this.#t.value);(isNaN(e)||String(e)!==String(t))&&(this.#t.value=String(t))}})}#e;#i;#t;#n;get hasInputElement(){return!!this.#t}ngAfterViewInit(){this.#t=this.#e.nativeElement.querySelector('input[type="range"]'),this.#t?(this.#a(this.#t),this.#t.oninput=()=>{this.setNewInputValue(this.#t.value)},this.#t.addEventListener("inputValueChanged",t=>{this.setNewInputValue(t.detail.value)}),queueMicrotask(()=>this.#o(!0)),this.#s()):console.error('SparkleRangeSliderComponent: No <input type="range"> element found projected inside.')}setNewInputValue(t){let e=parseFloat(t??"0");if(!isNaN(e)){let{min:i,max:s}=this.inputState();this.value.set(Math.max(i,Math.min(s,e)))}}trackEvent(t){if(!this.#t||this.#t.readOnly||this.#t.disabled){t.preventDefault(),t.stopPropagation();return}if(t.target===this.#t||t.target?.closest(".thumb, .min-indicator, .max-indicator"))return;let i=t.currentTarget.getBoundingClientRect(),s=t.clientX-i.left,o=i.width,{min:r,max:c,step:l}=this.inputState(),d=c-r;if(o>0&&d!==0&&l>0){let R=(s/o*d+r-r)/l,P=r+Math.round(R)*l,A=this.#r(l);P=parseFloat(P.toFixed(A));let ne=Math.max(r,Math.min(c,P));this.value.set(ne)}}#o(t=!1){if(!this.#t)return;let e=parseFloat(this.#t.min??"0")??0,i=parseFloat(this.#t.max??"100")??100,s=this.#t.step,o=1;if(s&&s.toLowerCase()!=="any"){let c=parseFloat(s);!isNaN(c)&&c>0&&(o=c)}this.inputState.set({min:e,max:i,step:o});let r=parseFloat(this.#t.value??String(e))??e;if(t&&this.value()!==this.#n){let c=this.value(),l=Math.max(e,Math.min(i,c));r!==l&&(this.#t.value=String(l)),c!==l&&this.value.set(l)}else{let c=Math.max(e,Math.min(i,r));this.value()!==c&&this.value.set(c)}}#s(){if(!this.#t||typeof MutationObserver>"u")return;let t=["min","max","step","value","readonly","disabled"];this.#i=new MutationObserver(e=>{let i=!1;for(let s of e)if(s.type==="attributes"&&t.includes(s.attributeName??"")){i=!0;break}i&&this.#o(!1)}),this.#i.observe(this.#t,{attributes:!0})}#r(t){if(isNaN(t)||Math.floor(t)===t)return 0;let i=t.toString().split(".")[1];return i?i.length:0}#a(t){Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value").get.call(this)},set(e){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value").set.call(this,e);let s=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}});return this.dispatchEvent(s),e}})}ngOnDestroy(){this.#i&&this.#i.disconnect(),this.#t&&(this.#t.oninput=null)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-range-slider"]],hostVars:2,hostBindings:function(e,i){e&2&&M("has-input",i.hasInputElement)},inputs:{alwaysShowThumb:[1,"alwaysShowThumb"],unit:[1,"unit"],value:[1,"value"]},outputs:{value:"valueChange"},ngContentSelectors:xt,decls:15,vars:12,consts:[[1,"label"],[1,"input-wrap"],[1,"min-indicator"],[1,"track-wrap",3,"click"],[1,"track"],[1,"track-filled"],[1,"thumb-wrap"],[1,"thumb"],[1,"value-indicator"],[1,"max-indicator"]],template:function(e,i){e&1&&(x(Dt),a(0,"div",0),f(1),p(),a(2,"div",1)(3,"div",2),_(4),p(),a(5,"div",3),O("click",function(o){return i.trackEvent(o)}),f(6,1),a(7,"div",4),$(8,"div",5),p(),a(9,"div",6)(10,"div",7)(11,"div",8),_(12),p()()()(),a(13,"div",9),_(14),p()()),e&2&&(h(4),se("",i.inputState().min,"",i.unit(),""),h(4),B("width",i.trackFilledPercentage(),"%"),h(),B("left",i.thumbPositionPercentage(),"%"),h(),M("always-show",i.alwaysShowThumb()),h(2),se("",i.value(),"",i.unit(),""),h(2),se("",i.inputState().max,"",i.unit(),""))},encapsulation:2,changeDetection:0})}}return n})(),Ei=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-spinner"]],decls:0,vars:0,template:function(e,i){},encapsulation:2,changeDetection:0})}}return n})(),ln=(()=>{class n{constructor(){this.#e=I(L),this.value=m(),this.label=m(),this.asFreeText=m(!1),this.placeholder=m(),this.readonly=F(!1),this.disabled=F(!1),this.lazySearch=m(!1),this.inlineSearch=m(!1),this.asText=m(!1),this.isClearable=m(!0),this.selectMultiple=m(!1),this.optionTemplate=m(null),this.selectedOptionTemplate=m(null),this.placeholderTemplate=m(null),this.isOpen=F(!1),this.isLoading=F(!1),this.options=F([]),this.selectedOptions=F([]),this.cleared=X(),this.inlineTemplate=Fe(he),this.optionsWrapRef=j.required("optionsWrap"),this.inputRefInput=v(null),this.#i=typeof MutationObserver<"u"&&new MutationObserver(t=>{for(var e of t)e&&(e.target.nodeName==="INPUT"||e.target.nodeName==="TEXTAREA")&&(this.inputRefInput.set(new L(e.target)),this.#i.disconnect())}),this.inputValue=v(""),this.prevInputValue=v(null),this.focusedOptionIndex=v(-1),this._isClearable=D(()=>this.selectMultiple()||this.isClearable()),this.selectClasses=D(()=>this.#e.nativeElement.classList.toString()),this.stretch=D(()=>this.selectClasses().includes("stretch")),this.placeholderText=D(()=>{let t=this.placeholder(),e=this.inputRefEl();return t||e?.placeholder||null}),this.selectedOptionValues=D(()=>{let t=this.selectedOptions(),e=this.value();return e?t.map(i=>this.#s(i,e)):t}),this.filteredOptions=D(()=>{let t=this.options()||[],e=this.label(),i=this.value(),s=this.inlineSearch(),o=this.inputValue().toLowerCase(),r=this.#a(o);if(t.length<=0)return[];if(!s||o==="")return t;let l=t.filter(d=>{let w=e?(this.#s(d,e)??"").toString().toLowerCase():(d??"").toString().toLowerCase(),R=((i?this.#s(d,i):d)??"").toString().toLowerCase(),P=r.test(w),A=r.test(R);return P||A}).map(d=>{let w=e?(this.#s(d,e)??"").toString().toLowerCase():(d??"").toString().toLowerCase(),R=((i?this.#s(d,i):d)??"").toString().toLowerCase(),P=this.#t(w,o),A=this.#t(R,o);return{item:d,score:Math.max(P,A)}});return l.sort((d,w)=>w.score-d.score),l.map(d=>d.item)}),this.inputRefEl=D(()=>{let t=this.inputRefInput();if(t===null)return;let e=t?t.nativeElement:null;return e?(e.autocomplete="off",this.#r(e),e.addEventListener("focus",()=>{this.readonly()||this.open()}),this.hasSearch()&&e.addEventListener("input",i=>{let s=i.target.value,o=this.inputValue();s!==o&&(this.focusedOptionIndex.set(this.asFreeText()?-1:0),this.inputValue.set(s),this.updateInputElValue())}),e.addEventListener("inputValueChanged",i=>{let s=i.detail.value,o=this.inputValue();if(s!==o){if(s===""){this.clear();return}this.setSelectedOptionsFromValue(s),this.setInputValueFromSelectedOptions(),this.#o()}}),e):(console.warn("<spk-select> input element not found are you missing to pass an <input> or <textarea> element to select component?"),null)}),this.openAbortController=null,this.isOpenEffect=V(()=>{if(this.isOpen()){this.openAbortController||(this.openAbortController=new AbortController);let e=this.inputRefEl();if(!e)return;e.addEventListener("keydown",i=>{if((i.key==="Escape"||i.key==="Tab")&&(i.preventDefault(),this.close()),(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),this.toggleOptionByIndex(this.focusedOptionIndex())),i.key==="ArrowDown"){i.preventDefault();let s=this.focusedOptionIndex()+1;this.focusedOptionIndex.set(s>this.filteredOptions().length-1?0:s)}if(i.key==="ArrowUp"){i.preventDefault();let s=this.focusedOptionIndex()-1;this.focusedOptionIndex.set(s<0?this.filteredOptions().length-1:s)}},{signal:this.openAbortController?.signal})}else{if(!this.inputRefEl())return;this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null)}}),this._inputValue="",this.inputValueEffect=V(()=>{let t=this.inputValue();this._inputValue=t}),this.inputRefElEffect=V(()=>{let t=this.inputRefEl();t&&t.value!==this._inputValue&&(this.disabled.set(t.disabled),this.setSelectedOptionsFromValue(t.value),this.setInputValueFromSelectedOptions())}),this.selectedLabels=D(()=>{let t=this.selectedOptions();return this.label()?t.map(i=>this.getLabel(i)).join(", "):t.join(", ")}),this.inputState=D(()=>(this.selectedOptions().length>0||this.asFreeText()&&this.inputValue().length>0)&&!this.isOpen()?"selected":this.isLoading()?"loading":this.isOpen()&&(this.lazySearch()||this.inlineSearch())?"open-searching":this.isOpen()?"open":this.inlineSearch()||this.lazySearch()?"searching":"closed"),this.hasSearch=D(()=>this.inlineSearch()||this.lazySearch()),this.#n=V(()=>{if(this.selectMultiple()&&this.hasSearch())return;let t=this.selectedOptions(),e=this.value(),i=t.map(s=>e?this.#s(s,e):s).join(",");this.inputValue.set(i)})}#e;#i;#t(t,e){if(!e)return 0;let i=0,s=-1,o=0,r=!0;for(let c=0;c<e.length;c++){let l=e[c];if(t.length>s+1&&t[s+1]===l)i+=c===0?100:150,s++,o++;else{let d=t.indexOf(l,s+1);if(c>0&&(r=!1),d===-1)return 0;i+=100,s=d,o++}}return r&&e.length===o&&(i+=1e3),i+=o*20,i}#n;ngOnInit(){this.setInitInput()}setInitInput(){let t=this.#e.nativeElement.querySelector("input");if(t){this.inputRefInput.set(new L(t));return}let e=this.#e.nativeElement.querySelector("textarea");if(e){this.inputRefInput.set(new L(e));return}typeof MutationObserver<"u"&&this.#i.observe(this.#e.nativeElement,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}setSelectedOptionsFromValue(t){let e=this.options()||[],i=this.value(),s=this.selectMultiple(),o=t.toString().split(",");if(o.length===0){this.selectedOptions.set([]);return}let r=s?o:[o[0]],c=e.filter(l=>{let d=i?this.#s(l,i)?.toString():l?.toString();return d&&r.includes(d)});this.selectedOptions.set(s?c:[c[0]])}setInputValueFromSelectedOptions(){let t=this.selectedOptions(),e=this.value();if(t.length===0){this.inputValue.set(""),this.updateInputElValue();return}let i=t.map(s=>e?this.#s(s,e):s).join(",");this.inputValue.set(i),this.updateInputElValue()}getLabel(t){let e=this.label();return e?this.#s(t,e):t}toggleOptionByIndex(t,e){let i=this.filteredOptions()[t];if(this.asFreeText()&&t===-1||!i){this.close();return}e&&e.stopPropagation();let s=this.selectMultiple(),o=this._isClearable(),r=this.value(),c=this.selectedOptionValues(),l=r?this.#s(i,r):i;this.prevInputValue.set(null),this.selectedOptions.update(d=>{let w=c.indexOf(l);if(w>-1){let R=[...d.slice(0,w),...d.slice(w+1)];return o||R.length>0?R:d}else return this.focusedOptionIndex.set(t),s?[...d,i]:[i]}),s?this.inputRefEl()?.focus():this.isOpen.set(!1),this.setInputValueFromSelectedOptions(),s&&this.hasSearch()&&(this.inputValue.set(""),this.updateInputElValue())}removeSelectedOptionByIndex(t,e){t.stopPropagation(),this.selectedOptions.update(i=>[...i.slice(0,e),...i.slice(e+1)]),this.setInputValueFromSelectedOptions()}isSelected(t){let e=this.value(),i=this.filteredOptions()[t],s=e?this.#s(i,e):i;return this.selectedOptionValues().indexOf(s)>-1}open(){this.isOpen()||(this.isOpen.set(!0),this.hasSearch()&&(this.prevInputValue.set(this.inputValue()??""),this.inputValue.set(""),this.updateInputElValue()),this.selectMultiple()||this.#o())}#o(){let t=this.selectedOptionValues()[0],e=this.value();if(t){let i=this.filteredOptions().findIndex(s=>e?this.#s(s,e)===t:s===t);this.focusedOptionIndex.set(i)}else this.focusedOptionIndex.set(-1)}close(){this.isOpen.set(!1);let t=this.prevInputValue();if(this.asFreeText()){this.updateInputElValue();return}this.hasSearch()&&t&&(this.inputValue.set(t),this.setInputValueFromSelectedOptions()),this.selectMultiple()&&this.setInputValueFromSelectedOptions()}clear(t){t?.stopPropagation(),this.inputValue.set(""),this.selectedOptions.set([]),this.isOpen.set(!1),this.prevInputValue.set(null),this.cleared.emit(),this.updateInputElValue()}updateInputElValue(){let t=this.inputRefEl(),e=this.inputValue();t&&(t.value=e,t.dispatchEvent(new Event("input")))}#s(t,e){return e.split(".").reduce((i,s)=>i?.[s],t)}#r(t){Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value").get.call(this)},set(e){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value").set.call(this,e);let s=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}});return this.dispatchEvent(s),e}})}#a(t){let e=(t??"").toLowerCase(),i="^";for(let s of e)i+=".*"+this.#l(s);return i+=".*$",new RegExp(i,"i")}#l(t){return t.replace(/[-\/\\^$+?.()|[\]{}]/g,"\\$&")}ngOnDestroy(){this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null),typeof MutationObserver<"u"&&this.#i.disconnect()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-select"]],contentQueries:function(e,i,s){e&1&&Le(s,i.inlineTemplate,he,5),e&2&&Q()},viewQuery:function(e,i){e&1&&q(i.optionsWrapRef,wt,5),e&2&&Q()},hostVars:2,hostBindings:function(e,i){e&2&&M("multiple",i.selectMultiple())},inputs:{value:[1,"value"],label:[1,"label"],asFreeText:[1,"asFreeText"],placeholder:[1,"placeholder"],readonly:[1,"readonly"],disabled:[1,"disabled"],lazySearch:[1,"lazySearch"],inlineSearch:[1,"inlineSearch"],asText:[1,"asText"],isClearable:[1,"isClearable"],selectMultiple:[1,"selectMultiple"],optionTemplate:[1,"optionTemplate"],selectedOptionTemplate:[1,"selectedOptionTemplate"],placeholderTemplate:[1,"placeholderTemplate"],isOpen:[1,"isOpen"],isLoading:[1,"isLoading"],options:[1,"options"],selectedOptions:[1,"selectedOptions"]},outputs:{readonly:"readonlyChange",disabled:"disabledChange",isOpen:"isOpenChange",isLoading:"isLoadingChange",options:"optionsChange",selectedOptions:"selectedOptionsChange",cleared:"cleared"},ngContentSelectors:Ot,decls:32,vars:22,consts:[["formFieldWrapper",""],["optionsWrap",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","options"],["trigger","",3,"click"],["ngProjectAs","input",5,["input"],1,"input"],[1,"selected-value"],["suffix",""],["suffix","",1,"primary"],[1,"sparkle-options"],[1,"option",3,"selected","focused"],[1,"small",3,"class"],[1,"small"],[3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],["suffix","",3,"click"],[1,"option",3,"click"],[3,"class","active"]],template:function(e,i){if(e&1){let s=W();x(bt),oe(0)(1)(2)(3)(4)(5)(6)(7)(8)(9),a(10,"spk-popover",2,0),ye("isOpenChange",function(r){return S(s),ke(i.isOpen,r)||(i.isOpen=r),k(r)}),O("closed",function(){return S(s),k(i.close())}),a(12,"spk-form-field",3),O("click",function(){return S(s),k(i.open())}),f(13,0,["ngProjectAs","label",5,["label"]]),a(14,"div",4)(15,"div",5),b(16,Tt,1,1)(17,Wt,2,0)(18,$t,2,1),f(19,1),f(20,2),p()(),b(21,Qt,2,0,"spk-icon",6)(22,Nt,1,0,"spk-spinner",7)(23,Yt,2,0,"spk-icon",6)(24,Xt,2,0,"spk-icon",6)(25,Gt,2,0,"spk-icon",6)(26,Kt,2,0,"spk-icon",6)(27,Jt,2,0,"spk-icon",6),p(),a(28,"div",8,1),ve(30,ni,4,6,"li",9,ge),p()()}if(e&2){J(i.placeholderTemplate());let s=i.optionTemplate(),o=i.selectedOptionTemplate(),r=i.inlineTemplate();h(4);let c=J(i.selectedOptions()),l=i.inputState();h(2),J(o||s||r),h(),J(s||r),h();let d=J(!i.asText()&&i.selectMultiple());h();let w=J(i.isOpen()&&i.hasSearch()&&(d||i.inputValue().length>0));h(),Se("isOpen",i.isOpen),K("disableOpenByClick",!0)("options",De(21,Et)),h(2),M("stretch",i.stretch())("autosize",i.selectMultiple())("readonly",i.readonly()||i.disabled()),h(2),M("show-search-text",w),h(),M("is-selected",l==="selected"),h(),E(i.asFreeText()&&i.inputValue().length>0&&!i.isOpen()?16:c.length>0?17:w?-1:18),h(5),E(l==="closed"?21:l==="loading"?22:l==="open-searching"?23:l==="searching"?24:l==="selected"&&i._isClearable()?25:l==="selected"&&!i._isClearable()?26:27),h(9),Ce(i.filteredOptions())}},dependencies:[We,Ue,Ee,te,Di,Ei,xi],encapsulation:2,changeDetection:0})}}return n})(),cn=(()=>{class n{constructor(){this.#e=I(ae,{optional:!0}),this.#i=v(this.#e?.sidenavType),this.openWidth=280,this.openWidthTreshold=this.openWidth*.9,this.disableDrag=m(!1),this.isOpen=F(!1),this.type=m(void 0),this.class=D(()=>this.#i()?this.#i():this.#e?.sidenavType),this.dragImageElement=j.required("dragImageElement"),this.dragIsEnding=v(!1),this.dragIsOnScreen=v(!0),this.isDragging=v(!1),this.dragPositionX=v(0),this.dragActualPositionX=D(()=>{let t=this.dragPositionX(),e=.32;return t>this.openWidthTreshold?this.openWidthTreshold+(t-this.openWidthTreshold)*e:t}),this.draggingStyle=D(()=>this.type()!=="overlay"?null:this.isDragging()?`translateX(${this.dragActualPositionX()}px)`:this.isOpen()?`translateX(${this.openWidth}px)`:"translateX(0px)"),this.draggingEffect=V(()=>{this.isDragging()&&document.body.classList.add("dragging")})}#e;#i;drop(t){t.stopPropagation(),this.#t(t.clientX)}#t(t){this.isDragging.set(!1),t<=0?this.isOpen.set(!1):t>this.openWidthTreshold?this.isOpen.set(!0):t<this.openWidthTreshold&&(!this.isOpen()&&t<this.openWidthTreshold*.6?this.isOpen.set(!0):this.isOpen.set(!1))}dragEnd(t){(t.clientX<0||!this.dragIsOnScreen())&&this.#t(0)}dragEnter(){this.dragIsOnScreen.set(!0)}dragLeave(){this.dragIsOnScreen.set(!1)}dragOver(t){t.preventDefault(),this.#n(t)}dragStart(t){t.stopPropagation(),this.isDragging.set(!0),this.#n(t)}#n(t){t.dataTransfer?.setDragImage(this.dragImageElement().nativeElement,0,0)}drag(t){t.stopPropagation(),setTimeout(()=>{this.isDragging()&&this.dragIsOnScreen()&&this.dragPositionX.set(t.clientX)}),this.#n(t)}touchStart(t){t.stopPropagation(),this.isDragging.set(!0)}touchMove(t){t.stopPropagation(),setTimeout(()=>{this.isDragging()&&this.dragIsOnScreen()&&this.dragPositionX.set(t.touches[0].clientX)})}touchEnd(t){t.stopPropagation(),this.#t(t.changedTouches[0].clientX)}touchCancel(t){t.stopPropagation(),this.isDragging.set(!1)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-sidenav"]],viewQuery:function(e,i){e&1&&q(i.dragImageElement,si,5),e&2&&Q()},hostVars:8,hostBindings:function(e,i){e&2&&(Y(i.class()),M("open",i.isOpen())("closed",!i.isOpen())("is-dragging",i.isDragging()))},inputs:{disableDrag:[1,"disableDrag"],isOpen:[1,"isOpen"],type:[1,"type"]},outputs:{isOpen:"isOpenChange"},ngContentSelectors:ri,decls:10,vars:5,consts:[["dragImageElement",""],[1,"drag-image"],[1,"dropping-surface"],[1,"sidenav"],[1,"main-wrap"],["draggable","true",1,"dragable"],[1,"closed-topbar"],[1,"dropping-surface",3,"drop","dragover","dragenter","dragleave"],["draggable","true",1,"dragable",3,"dragstart","dragend","drag","touchstart","touchmove","touchend","touchcancel"]],template:function(e,i){e&1&&(x(oi),b(0,ai,2,0,"div",1)(1,li,1,0,"div",2),a(2,"div",3),f(3),p(),a(4,"div",4),b(5,ci,1,0,"div",5),a(6,"div",6),f(7,1),p(),a(8,"main"),f(9,2),p()()),e&2&&(E(i.type()==="overlay"?0:-1),h(),E(i.type()==="overlay"&&i.isDragging()?1:-1),h(3),B("transform",i.draggingStyle()),h(),E(i.type()==="overlay"&&!i.disableDrag()?5:-1))},encapsulation:2,changeDetection:0})}}return n})();var pn=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-stepper"]],ngContentSelectors:H,decls:1,vars:0,template:function(e,i){e&1&&(x(),f(0))},encapsulation:2,changeDetection:0})}}return n})();var dn=(()=>{class n{constructor(){this.#e=I(Ti),this.spkSort=m(),this.sortAsc=D(()=>{let t=this.#e.sortByColumn(),e=this.spkSort();return!t||!e?!1:t===e}),this.sortDesc=D(()=>{let t=this.#e.sortByColumn(),e=this.spkSort();return!t||!e?!1:t===`-${e}`})}#e;toggleSort(){let t=this.spkSort();t&&this.#e.toggleSort(t)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275dir=fe({type:n,selectors:[["","spkSort",""]],hostAttrs:[1,"sortable"],hostVars:4,hostBindings:function(e,i){e&1&&O("mousedown",function(){return i.toggleSort()}),e&2&&M("sort-asc",i.sortAsc())("sort-desc",i.sortDesc())},inputs:{spkSort:[1,"spkSort"]}})}}return n})();var ee=1.5,Ti=(()=>{class n{constructor(){this.#e=I(L),this.#i=I(ae,{optional:!0}),this.loading=m(!1),this.data=m([]),this.dataChange=X(),this.sortByColumn=F(null),this.thead=j("thead"),this.columns=Qe(this.thead,["TH"]),this.class=v(this.#i?.tableType??"default"),this.resizing=v(!1),this.sizeTrigger=v(!0),this.#t=null,this.#n=v(!1),this.scrollXState=v(-1),this.scrollYState=v(-1),this.canScrollX=v(!1),this.canScrollY=v(!1),this.columnSizes=D(()=>{this.sizeTrigger();let t=this.columns.signal();return t.reduce((e,i,s)=>{let o=i,r=s===t.length-1;return o.dataset.size?`${e} ${o.dataset.size}`:o.classList.contains("sticky")||o.classList.contains("sticky-end")?`${e} min-content`:r?`${e} 1fr`:`${e} 1fr`},"")}),this.e=V(()=>{let t=this.sortByColumn();if(t===null)return this.#n()||(this.#t=this.data(),this.#n.set(!0)),this.dataChange.emit(structuredClone(this.#t));let e=t.startsWith("-")?t.slice(1):t,i=t.startsWith("-"),s=this.data().sort((o,r)=>{let c=o[e],l=r[e],d=0;return typeof c=="number"&&typeof l=="number"&&(d=c-l),c instanceof Date&&l instanceof Date&&(d=c.getTime()-l.getTime()),typeof c=="string"&&typeof l=="string"&&(d=c.localeCompare(l,void 0,{sensitivity:"base"})),i?-d:d});this.dataChange.emit(s)})}#e;#i;#t;#n;updateColumnSizes(){this.sizeTrigger.set(!this.sizeTrigger())}onScroll(){this.#o()}onResize(t){this.#o()}ngAfterViewInit(){queueMicrotask(()=>this.#o())}toggleSort(t){let e=this.sortByColumn(),i=e===t?`-${t}`:e===`-${t}`?null:t;this.sortByColumn.set(i)}#o(){let t=this.#e.nativeElement,e=-1,i=-1,s=t.scrollWidth>t.clientWidth+ee;if(s){let r=t.scrollLeft<=ee;t.scrollWidth-(t.scrollLeft+t.clientWidth)<ee?e=1:r||(e=0)}this.scrollXState.set(e),this.canScrollX.set(s);let o=t.scrollHeight>t.clientHeight+ee;if(o){let r=t.scrollTop<=ee;t.scrollHeight-(t.scrollTop+t.clientHeight)<ee?i=1:r||(i=0)}this.scrollYState.set(i),this.canScrollY.set(o)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-table"]],viewQuery:function(e,i){e&1&&q(i.thead,pi,5),e&2&&Q()},hostVars:18,hostBindings:function(e,i){e&1&&O("scroll",function(){return i.onScroll()})("resize",function(o){return i.onResize(o)},!1,Re),e&2&&(Y(i.class()),B("grid-template-columns",i.columnSizes()),M("resizing",i.resizing())("can-scroll-x",i.canScrollX())("can-scroll-y",i.canScrollY())("scrolled-x",i.scrollXState()>=0)("scrolled-x-end",i.scrollXState()===1)("scrolled-y",i.scrollYState()>=0)("scrolled-y-end",i.scrollYState()===1))},inputs:{loading:[1,"loading"],data:[1,"data"],sortByColumn:[1,"sortByColumn"]},outputs:{dataChange:"dataChange",sortByColumn:"sortByColumnChange"},ngContentSelectors:ui,decls:7,vars:2,consts:[["thead",""],[1,"indeterminate","primary"],[1,"no-rows"]],template:function(e,i){e&1&&(x(di),a(0,"thead",null,0),f(2),b(3,hi,1,0,"spk-progress-bar",1),p(),a(4,"tbody"),f(5,1),p(),b(6,fi,2,0,"div",2)),e&2&&(h(3),E(i.loading()?3:-1),h(3),E(i.loading()?-1:6))},dependencies:[Oi],encapsulation:2,changeDetection:0})}}return n})(),un=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-tabs"]],ngContentSelectors:H,decls:1,vars:0,template:function(e,i){e&1&&(x(),f(0))},encapsulation:2,changeDetection:0})}}return n})(),hn=(()=>{class n{constructor(){this.isActive=F(!1),this.disallowToggle=m(!1)}ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-toggle-card"]],hostVars:2,hostBindings:function(e,i){e&2&&M("active",i.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:gi,decls:6,vars:1,consts:[[3,"click"],[1,"toggle-icon"],[1,"content"]],template:function(e,i){e&1&&(x(mi),a(0,"h3",0),O("click",function(){return i.disallowToggle()||i.toggle()}),f(1,0,null,vi,1,0),b(3,Ci,2,0,"spk-icon",1),p(),a(4,"div",2),f(5,1),p()),e&2&&(h(3),E(i.disallowToggle()?-1:3))},dependencies:[te],encapsulation:2,changeDetection:0})}}return n})(),fn=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-toggle"]],ngContentSelectors:H,decls:3,vars:0,consts:[[1,"box"],[1,"knob"]],template:function(e,i){e&1&&(x(),a(0,"div",0),$(1,"div",1),p(),f(2))},encapsulation:2,changeDetection:0})}}return n})(),mn=(()=>{class n{constructor(){this.#e=4,this.SUPPORTS_ANCHOR=CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.disabled=m(!1),this.above=m(!1),this.right=m(!1),this._above=v(this.above()),this._right=v(this.right()),this.message=m.required(),this.isOpen=F(!1),this.closed=X(),this.triggerRef=j.required("triggerRef"),this.tooltipRef=j.required("tooltipRef"),this.id=v("--"+Oe()),this.menuStyle=v(null),this.isCalculatingPosition=D(()=>{let t=this.tooltipRef()?.nativeElement;return this.isOpen()?(t?.showPopover(),!0):(t.hidePopover(),this.abortController?.abort(),this.closed.emit(),!1)}),this.abortController=null,this.calcPositionEffect=V(()=>{if(!this.isCalculatingPosition())return;this.abortController&&this.abortController.abort(),this.abortController=new AbortController;let e=this.abortController.signal;this.calculateMenuPosition(),this.#i(this.tooltipRef()?.nativeElement).addEventListener("scroll",()=>this.calculateMenuPosition(),{signal:e}),document.addEventListener("resize",()=>this.calculateMenuPosition(),{signal:e})}),this.scrollableStyles=["scroll","auto"]}#e;#i(t){let e=t.parentElement;for(;e;){if(this.scrollableStyles.indexOf(window.getComputedStyle(e).overflowY)>-1&&e.scrollHeight>e.clientHeight)return e;e=e.parentElement}return document.documentElement}eventClose(t){t.stopPropagation(),t.preventDefault(),this.isOpen.set(!1)}ngOnDestroy(){this.abortController&&this.abortController.abort()}calculateMenuPosition(){let t=this.triggerRef()?.nativeElement.getBoundingClientRect(),e=this.tooltipRef()?.nativeElement.getBoundingClientRect(),i=t.left,s=t.bottom,o=i,r=s+this.#e,c=o+e.width>window.innerWidth,l=r+e.height>window.innerHeight;if(this.SUPPORTS_ANCHOR)this._above.set(l),this._right.set(c);else{if(this.above()){let d=t.top-e.height-this.#e;d>=0&&(r=d)}else l&&(r=t.top-e.height-this.#e);if(this.right()){let d=t.right-e.width;d>=0&&(o=d)}else c&&(r=l?t.top+t.height-e.height:t.top,o=t.left-e.width-this.#e);this.menuStyle.set({left:o+"px",top:r+"px"})}}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-tooltip"]],viewQuery:function(e,i){e&1&&(q(i.triggerRef,qe,5),q(i.tooltipRef,_i,5)),e&2&&Q(2)},hostVars:6,hostBindings:function(e,i){e&2&&M("above",i._above())("right",i._right())("disabled",i.disabled())},inputs:{disabled:[1,"disabled"],above:[1,"above"],right:[1,"right"],message:[1,"message"],isOpen:[1,"isOpen"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:H,decls:6,vars:7,consts:[["triggerRef",""],["tooltipRef",""],[1,"trigger",3,"mouseover","mouseout"],["popover","",1,"tooltip"]],template:function(e,i){if(e&1){let s=W();x(),a(0,"div",2,0),O("mouseover",function(){return S(s),k(i.isOpen.set(!0))})("mouseout",function(){return S(s),k(i.isOpen.set(!1))}),f(2),p(),a(3,"div",3,1),_(5),p()}e&2&&(B("anchor-name",i.id()),h(3),me(i.menuStyle()),B("position-anchor",i.id()),h(2),G(" ",i.message()," "))},encapsulation:2,changeDetection:0})}}return n})();var gn=(()=>{class n{constructor(){this.filesOver=v(!1),this.filesDropped=X()}onDragOver(t){t.preventDefault(),t.stopPropagation(),this.filesOver.set(!0)}onDragLeave(t){t.preventDefault(),t.stopPropagation(),this.filesOver.set(!1)}ondrop(t){t.preventDefault(),t.stopPropagation(),this.filesOver.set(!1);let e=t.dataTransfer?.files;e&&e.length>0&&this.filesDropped.emit(e)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275dir=fe({type:n,selectors:[["","spkDragDrop",""]],hostVars:2,hostBindings:function(e,i){e&1&&O("dragover",function(o){return i.onDragOver(o)})("dragleave",function(o){return i.onDragLeave(o)})("drop",function(o){return i.ondrop(o)}),e&2&&M("filesover",i.filesOver())},outputs:{filesDropped:"filesDropped"}})}}return n})();export{te as a,Gi as b,Ki as c,ki as d,Ji as e,Zi as f,yi as g,en as h,Di as i,xi as j,tn as k,Ee as l,nn as m,sn as n,on as o,Oi as p,rn as q,an as r,Ei as s,ln as t,cn as u,pn as v,dn as w,Ti as x,un as y,hn as z,fn as A,mn as B,gn as C};
package/chunk-RG2UOHQD.js DELETED
@@ -1 +0,0 @@
1
- import{a as ke,c as Re,d as B}from"./chunk-EQWH3TBL.js";import{a as Oe}from"./chunk-TQHNKGRL.js";import{a as ue}from"./chunk-FJVMA6GA.js";import"./chunk-RHW5QVAY.js";import{b as de,c as Pe,d as S,e as Te,f as Ce,i as me,n as Ee,q as Se,r as ge,t as fe}from"./chunk-ELMONRIG.js";import"./chunk-XP7PWMT2.js";import{b as oe,d as te,e as ne}from"./chunk-C6XTRC7P.js";import"./chunk-MAVZY7BL.js";import{A as _e,B as ce,a as ie,b as re,f as se,g as ae,l as le,p as pe}from"./chunk-P4ZFQZCA.js";import{c as ee,h as Fe}from"./chunk-S5EF63OY.js";import"./chunk-7L2WUS2V.js";import{Db as a,Eb as r,F as I,Fb as p,Jb as M,N as H,Oc as N,Pb as _,Pc as Z,Qb as c,Rb as m,Sb as y,Tb as h,Ua as s,Ub as X,Vb as E,Wb as u,Z as T,ea as x,fa as D,gb as Q,ic as A,jc as J,lb as d,lc as W,ub as P,uc as Y,va as C,wb as f,zb as F}from"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";var we=()=>["/"];function $e(t,o){t&1&&(a(0,"spk-toggle",24),_(1,5),p(2,"input",27),c(),r())}function xe(t,o){t&1&&(a(0,"span",30),m(1,9),r())}function De(t,o){if(t&1&&(a(0,"span",30),m(1,10),r()),t&2){let e=u(2);s(),y(e.exportForm.controls.password.errors==null?null:e.exportForm.controls.password.errors.minlength.requiredLength),h(1)}}function Ae(t,o){if(t&1&&p(0,"spk-progress-bar",37),t&2){let e=u(2);f("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),P("value",e.calculatePasswordStrength()*(100/5))}}function Ne(t,o){t&1&&(a(0,"span",30),m(1,11),r())}function Ie(t,o){t&1&&(a(0,"span",30),m(1,12),r())}function Me(t,o){if(t&1&&(a(0,"span",30),m(1,13),r()),t&2){let e=u(2);s(),y(e.exportForm.controls.repeatPassword.errors==null?null:e.exportForm.controls.repeatPassword.errors.minlength.requiredLength),h(1)}}function ye(t,o){t&1&&(_(0,7,1),p(1,"spk-icon"),c())}function he(t,o){t&1&&(_(0,7,2),p(1,"spk-icon"),c())}function Xe(t,o){t&1&&(_(0,14,1),p(1,"spk-icon",39),c())}function Be(t,o){t&1&&(_(0,14,2),p(1,"spk-icon"),c())}function Le(t,o){if(t&1){let e=M();a(0,"button",38),E("click",function(){x(e);let i=u(2);return D(i.copyPassword())}),_(1,14),d(2,Xe,2,0)(3,Be,2,0),c(),r()}if(t&2){let e=u(2);s(2),F(e.copiedPassword()?2:3)}}function be(t,o){t&1&&(a(0,"spk-alert",36),m(1,15),r())}function ve(t,o){if(t&1){let e=M();a(0,"div",25)(1,"spk-form-field")(2,"label",28),_(3,6),p(4,"sup"),c(),r(),p(5,"input",29),d(6,xe,2,0,"span",30)(7,De,2,1,"span",30),r(),d(8,Ae,1,9,"spk-progress-bar",31),a(9,"spk-form-field"),p(10,"input",32),d(11,Ne,2,0,"span",30)(12,Ie,2,0,"span",30)(13,Me,2,1,"span",30),r(),a(14,"div",33)(15,"button",34),E("click",function(){x(e);let i=u();return D(i.showPassword.set(!i.showPassword()))}),_(16,7),d(17,ye,2,0)(18,he,2,0),c(),r(),a(19,"button",34),E("click",function(){x(e);let i=u();return D(i.generatePassword())}),_(20,8),p(21,"spk-icon"),c(),r(),d(22,Le,4,1,"button",35),r(),d(23,be,2,0,"spk-alert",36),r()}if(t&2){let e=u();s(5),P("type",e.showPassword()?"text":"password"),s(),F(e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.required?6:e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.minlength?7:-1),s(2),F(e.exportForm.value.password?8:-1),s(2),P("type",e.showPassword()?"text":"password"),s(),F(e.exportForm.value.repeatPassword&&e.exportForm.value.repeatPassword!==e.exportForm.value.password?11:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.required?12:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.minlength?13:-1),s(6),F(e.showPassword()?17:18),s(5),F(e.showCopyPassword()?22:-1),s(),F(e.exportForm.value.password&&e.exportForm.value.password===e.exportForm.value.repeatPassword?23:-1)}}function Ge(t,o){if(t&1&&(a(0,"div",26)(1,"code"),A(2),r()()),t&2){let e=u();s(2),J(e.exportedCmd())}}var O=new ge,L=class t{#o=T(ke);#t=T(Fe);#e=T(oe);#n=T(te);#i=T(ee);#r=T(ue);isExporting=C(!1);exportType=C("file");exportedCmd=C(null);exportForm=O.group({exportPasswords:O.control(!0),encryption:O.control(!1,[S.required,Re()]),password:O.control("",[B("encryption",!0,[S.required,S.minLength(3)])]),repeatPassword:O.control("",[B("encryption",!0,[S.required,S.minLength(3)])])});exportFormSignal=Oe(this.exportForm.valueChanges);encryptionFieldSignal=N(()=>this.exportFormSignal()?.encryption??!1);activeBackup=N(()=>this.#r.backups().find(o=>o.Backup?.ID===this.#e.snapshot.params.id));showPassword=C(!1);copiedPassword=C(!1);showCopyPassword=C(!1);calculatePasswordStrength=N(()=>{let e=this.exportFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});showPasswordEffect=Z(()=>{this.showPassword()&&this.exportForm.updateValueAndValidity()});submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(H(o=>{let e=i=>{let g=Object.entries(i);return g?"?"+g.map(([k,R])=>`${k}=${R}`).join("&"):""},n=this.exportFormSignal()?.password?.length?this.exportFormSignal()?.password:void 0;return this.#i.get(`/api/v1/backup/${this.#e.snapshot.params.id}/export${e({"export-passwords":this.exportFormSignal()?.exportPasswords??void 0,passphrase:n,token:o.Token})}`,{responseType:"blob"})}),I(()=>this.isExporting.set(!1))).subscribe({next:o=>{let n=this.activeBackup()?.Backup?.Name??"Backup",i=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(o,`${n}-duplicati-config.${i}`),this.#n.navigate(["/"])},error:o=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(I(()=>this.isExporting.set(!1))).subscribe({next:o=>{this.exportedCmd.set(o.Command??null)},error:o=>{}})}downloadFile(o,e){let n=window.URL.createObjectURL(o),i=document.createElement("a");i.href=n,i.download=e,i.click(),window.URL.revokeObjectURL(n)}async copyPassword(){let o=this.exportForm.controls.password.value;await this.#s(o??""),this.copiedPassword.set(!0)}async#s(o){try{await navigator.clipboard.writeText(o)}catch{try{let n=document.createElement("textarea");n.value=o,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let o=this.#o.generate(16);this.exportForm.controls.password.setValue(o),this.exportForm.controls.repeatPassword.setValue(o),this.showCopyPassword.set(!0)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=Q({type:t,selectors:[["app-export"]],decls:27,vars:16,consts:()=>{let o;o=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let n;n=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: As command line `;let i;i=$localize`${"\uFFFD#20\uFFFD"}:START_TAG_SPK_ICON:file${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SPK_ICON: To file `;let g;g=$localize` Export passwords ${"\uFFFD#23\uFFFD\uFFFD/#23\uFFFD"}:TAG_INPUT:`;let k;k=$localize` Encrypt file ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let R;R=$localize`Password`;let b;b=$localize`Repeat password`;let v;v=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let w;w=$localize`${"\uFFFD*17: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/*17:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*18: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/*18:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,w=X(w);let G;G=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let K;K=$localize`Passwords are required`;let U;U=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let z;z=$localize`Passwords do not match`;let V;V=$localize`Passwords are required`;let q;q=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let $;$=$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:`,$=X($);let j;return j=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `,[o,e,n,i,g,k,v,w,G,K,U,z,V,q,$,j,[1,"actions"],["spk-button","",1,"outlined",3,"routerLink"],["message","Remember to copy the password",1,"primary",3,"disabled"],["spk-button","",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["type","button",3,"click"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],[1,"passwords"],[1,"cmd-output"],["type","checkbox","formControlName","encryption"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",R,"formControlName","password",3,"type"],["error",""],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",b,"formControlName","repeatPassword",3,"type"],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],[1,"primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(e,n){if(e&1&&(a(0,"header")(1,"h3"),A(2," Export backup configuration "),a(3,"div",16)(4,"button",17),_(5,0),p(6,"spk-icon"),c(),r(),a(7,"spk-tooltip",18)(8,"button",19),E("click",function(){return n.submit()}),_(9,1),p(10,"spk-icon"),c(),r()()()(),a(11,"p"),A(12),r()(),a(13,"form",20)(14,"spk-button-group")(15,"button",21),E("click",function(){return n.exportType.set("cmd")}),_(16,2),p(17,"spk-icon"),c(),r(),a(18,"button",21),E("click",function(){return n.exportType.set("file")}),_(19,3),p(20,"spk-icon"),c(),r()(),a(21,"spk-toggle",22),_(22,4),p(23,"input",23),c(),r(),d(24,$e,3,0,"spk-toggle",24)(25,ve,24,8,"div",25)(26,Ge,3,1,"div",26),r()),e&2){let i;s(4),P("routerLink",Y(15,we)),s(3),f("loading",n.isExporting()),P("disabled",!(n.showCopyPassword()&&!n.copiedPassword())),s(),P("disabled",n.exportForm.invalid||n.showCopyPassword()&&!n.copiedPassword()),s(4),W("#",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.ID,": ",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.Name,""),s(),P("formGroup",n.exportForm),s(2),f("active",n.exportType()==="cmd"),s(3),f("active",n.exportType()==="file"),s(6),F(n.exportType()==="file"?24:-1),s(),F(n.encryptionFieldSignal()?25:-1),s(),F(n.exportedCmd()?26:-1)}},dependencies:[fe,me,Pe,de,Te,Ce,Ee,Se,ne,se,_e,ie,le,ae,re,pe,ce],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}.hide[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{L as default};
package/chunk-RNSVPE4U.js DELETED
@@ -1 +0,0 @@
1
- import{a as te}from"./chunk-MQJUTAQD.js";import{a as gt}from"./chunk-GM4QKN65.js";import{l as se}from"./chunk-JYXXSXNP.js";import"./chunk-PUEJXHBQ.js";import"./chunk-HTJ5CVNN.js";import"./chunk-U467ZTQ4.js";import"./chunk-3KPWJPKG.js";import"./chunk-EQWH3TBL.js";import"./chunk-TQHNKGRL.js";import{a as Tt}from"./chunk-XYMSYNUD.js";import{a as K}from"./chunk-F2GEUOGZ.js";import{a as St}from"./chunk-R3PVYKQS.js";import"./chunk-PH5P3W5Z.js";import"./chunk-IINSQSHJ.js";import"./chunk-FJVMA6GA.js";import{a as ct}from"./chunk-BIZAKOYU.js";import"./chunk-RHW5QVAY.js";import"./chunk-HFIC4JNY.js";import{c as Q,e as Z,h as J,l as pt,s as Y,t as ee}from"./chunk-ELMONRIG.js";import"./chunk-BJGA55H2.js";import{a as nt}from"./chunk-XP7PWMT2.js";import"./chunk-C6XTRC7P.js";import"./chunk-MAVZY7BL.js";import{A as _t,B as dt,a as W,b as H,e as it,g as q,k as ot,l as j,p as st,q as at,r as lt,t as rt}from"./chunk-P4ZFQZCA.js";import{h as k}from"./chunk-S5EF63OY.js";import"./chunk-JFNFY6VY.js";import"./chunk-7L2WUS2V.js";import"./chunk-DOP6RFEG.js";import{$a as je,B as b,Db as i,Eb as o,F as R,Fb as I,Jb as P,Oc as F,Pb as X,Pc as $,Qb as V,Ra as qe,Rb as l,Sb as ie,T as He,Tb as oe,Ua as r,Ub as Ze,Vb as S,Wb as p,Z as E,Zb as Je,a as Ue,b as Be,c as We,ea as u,fa as m,fc as Ye,gb as w,gc as et,ic as O,jc as z,kc as U,lb as f,n as v,nc as y,oc as G,pc as A,rb as Ke,sb as Qe,tc as tt,ub as h,uc as B,va as c,wb as N,zb as C}from"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";var Ct=["formRef"],Et=()=>[import("./chunk-ETELPN3O.js").then(s=>s.OptionsListComponent)];function ft(s,e){s&1&&(i(0,"spk-alert",3),l(1,1),o())}function Nt(s,e){if(s&1){let t=P();i(0,"app-options-list",5),A("optionsChange",function(a){u(t);let _=p();return G(_.settings,a)||(_.settings=a),m(a)}),o()}if(s&2){let t=p();y("options",t.settings),h("hasFreeTextSettings",!0)}}var Mt=["Bytes","KB","MB","GB","TB","PB"],x=class s{#e=E(se);#t=E(te);#i=E(k);formRef=je.required("formRef");settings=this.#e.settings;isSubmitting=c(!1);isLoadingOptions=c(!0);saved=c(!1);sizeOptions=c(Mt);lastRecievedServerSettings=c({});serverSettingsEffect=$(()=>{let e=this.#t.serverSettings();if(e===void 0)return;this.lastRecievedServerSettings.set(e),this.isLoadingOptions.set(!0);let t=Object.entries(e);t.forEach(([n,a],_)=>{if(n.startsWith("--")){let T=n.replace("--","");this.settings.update(g=>(g.some(M=>M.Name===T)||g.push({Name:T,Value:a}),g))}_===t.length-1&&this.isLoadingOptions.set(!1)})});submit(){this.isSubmitting.set(!0);let e=this.settings(),t=this.lastRecievedServerSettings(),n=e.map(g=>g.Name),_=Object.keys(t).filter(g=>!n.includes(g.replace("--",""))),T=e.reduce((g,M)=>(g[`--${M.Name}`]=M.Value,g),{});_.forEach(g=>{T[g]=null}),this.#i.patchApiV1Serversettings({requestBody:T}).pipe(R(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#t.refreshServerSettings(),this.saved.set(!0),setTimeout(()=>{this.saved.set(!1)},3e3)}})}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=w({type:s,selectors:[["app-advanced-options-settings"]],viewQuery:function(t,n){t&1&&Ye(n.formRef,Ct,5),t&2&&et()},features:[tt([se])],decls:8,vars:4,consts:()=>{let e;e=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON: Save settings `;let t;return t=$localize`Settings saved`,[e,t,[1,"actions"],[1,"success"],["spk-button","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings"]]},template:function(t,n){t&1&&(i(0,"div",2),f(1,ft,2,0,"spk-alert",3),i(2,"button",4),S("click",function(){return n.submit()}),X(3,0),I(4,"spk-icon"),V(),o()(),f(5,Nt,1,2),Ke(6,5,Et)),t&2&&(r(),C(n.saved()?1:-1),r(),N("loader",n.isSubmitting()),r(4),Qe(!n.isLoadingOptions()))},dependencies:[ee,q,W,H],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40.625rem;justify-self:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end;margin-bottom:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 40px;align-items:flex-end}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var L=class s{#e=E(it);#t=E(k);#i=E(K);repeatRegisterTimer=null;state=c("unknown");claimUrl=c(null);registerUrl=c("");status=F(()=>{let e=this.state();return e==="enabled"?"Remote control is enabled but not connected":e==="connected"?"Remote control is connected":e==="registering"?"Registering machine...":e==="registeringfaulted"?"Registration failed":e==="registered"?"Registered, waiting for accept":e==="disabled"?"Remote control is configured but not enabled":e==="unknown"?"...loading...":"Remote control is not set up"});sysInfoEffect=$(()=>{let e=this.#i.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"")});#n(e){e.RegistrationUrl&&this.claimUrl.set(e.RegistrationUrl),e.IsConnected?this.state.set("connected"):e.IsEnabled?this.state.set("enabled"):e.CanEnable?this.state.set("disabled"):e.IsRegisteringFaulted?this.state.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");let t=this.state();this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),t==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:n=>this.#n(n),error:n=>this.#o(n)})},5e3)),(t==="enabled"||t==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.getApiV1RemotecontrolStatus().subscribe({next:n=>this.#n(n),error:n=>this.#o(n)})},5e3)),e.IsRegistering&&e.CanEnable&&this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:n=>this.#n(n)})}#o(e){this.#t.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#n(t)})}refreshRemoteControlStatus(){this.#t.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}beginRemoteRegistration(){this.state.set("registering"),this.#t.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:this.registerUrl()}}).subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}cancelRemoteRegistration(){this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}enableRemoteControl(){this.#t.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}disableRemoteControl(){this.#t.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}deleteRemoteControl(){let e=this;this.#e.open(ct,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete the remote control registration?`,confirmText:$localize`Delete registration`,cancelText:$localize`Cancel`},closed:t=>{t&&e.#t.deleteApiV1RemotecontrolRegistration().subscribe({next:n=>e.#n(n),error:n=>e.#o(n)})}})}static \u0275fac=function(t){return new(t||s)};static \u0275prov=He({token:s,factory:s.\u0275fac,providedIn:"root"})};function Pt(s,e){if(s&1){let t=P();i(0,"spk-form-field",10)(1,"input",11),A("ngModelChange",function(a){u(t);let _=p(2);return G(_.registerUrl,a)||(_.registerUrl=a),m(a)}),o()(),i(2,"button",12),S("click",function(){u(t);let a=p(2);return m(a.register())}),l(3,0),o()}if(s&2){let t=p(2);r(),y("ngModel",t.registerUrl)}}function Ot(s,e){if(s&1&&(i(0,"div",8)(1,"label"),l(2,1),o(),i(3,"a",13),O(4),o()()),s&2){let t=p(2);r(3),Je("href",t.claimUrl(),qe),r(),z(t.claimUrl())}}function Rt(s,e){s&1&&(i(0,"div",8)(1,"label"),l(2,2),o()())}function It(s,e){if(s&1){let t=P();i(0,"button",12),S("click",function(){u(t);let a=p(2);return m(a.cancel())}),l(1,3),o()}}function yt(s,e){if(s&1){let t=P();i(0,"button",12),S("click",function(){u(t);let a=p(2);return m(a.disable())}),l(1,4),o()}}function Gt(s,e){if(s&1){let t=P();i(0,"button",12),S("click",function(){u(t);let a=p(2);return m(a.enable())}),l(1,5),o(),i(2,"button",14),S("click",function(){u(t);let a=p(2);return m(a.delete())}),l(3,6),o()}}function At(s,e){if(s&1&&(i(0,"div",7),f(1,Pt,4,1)(2,Ot,5,2,"div",8)(3,Rt,3,0,"div",8)(4,It,2,0,"button",9)(5,yt,2,0,"button",9)(6,Gt,4,0),o()),s&2){let t=p();r(),C(t.state()==="inactive"?1:-1),r(),C(t.state()==="registered"?2:-1),r(),C(t.state()==="registering"?3:-1),r(),C(t.state()==="registering"||t.state()==="registeringfaulted"||t.state()==="registered"?4:-1),r(),C(t.state()==="connected"||t.state()==="enabled"?5:-1),r(),C(t.state()==="disabled"?6:-1)}}var ne=class s{#e=E(L);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=w({type:s,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let e;e=$localize`Register for remote control`;let t;t=$localize`Machine is now registered, open this link to add it to your account:`;let n;n=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let _;_=$localize`Disable remote control`;let T;T=$localize`Enable remote control`;let g;return g=$localize`Delete remote control setup`,[e,t,n,a,_,T,g,[1,"field-row"],[1,"field-col"],["type","button","spk-button","",1,"raised"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","spk-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","spk-button","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","spk-button","",1,"raised","error",3,"click"]]},template:function(t,n){t&1&&f(0,At,7,6,"div",7),t&2&&C(n.state()!=="unknown"?0:-1)},dependencies:[Y,Q,Z,J,j],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};function mt(...s){let e=c(...s);return Object.defineProperty(e,"value",{get:e.asReadonly(),set:e.set.bind(e)})}var le=()=>({standalone:!0});function $t(s,e){s&1&&(i(0,"spk-icon",69),O(1,"check"),o())}function vt(s,e){s&1&&(i(0,"spk-icon",70),O(1,"prohibit"),o())}function bt(s,e){if(s&1){let t=P();i(0,"button",74),S("click",function(){u(t);let a=p(2);return m(a.updatePassphrase())}),l(1,34),o()}if(s&2){let t=p(2);N("loader",t.isUpdating())}}function wt(s,e){if(s&1){let t=P();i(0,"spk-tooltip",73)(1,"button",75),S("click",function(){u(t);let a=p(2);return m(a.updatePassphrase())}),l(2,35),o()()}if(s&2){let t=p(2);r(),N("loader",t.isUpdating()),h("disabled",!0)}}function kt(s,e){if(s&1){let t=P();i(0,"spk-form-field")(1,"label",65),l(2,31),o(),i(3,"input",66),A("ngModelChange",function(a){u(t);let _=p();return G(_.passphrase,a)||(_.passphrase=a),m(a)}),o()(),i(4,"spk-form-field")(5,"label",67),l(6,32),o(),i(7,"input",68),A("ngModelChange",function(a){u(t);let _=p();return G(_.repeatPassphrase,a)||(_.repeatPassphrase=a),m(a)}),o(),f(8,$t,2,0,"spk-icon",69)(9,vt,2,0,"spk-icon",70),o(),i(10,"div",48)(11,"button",71),S("click",function(){u(t);let a=p();return m(a.cancelPasswordChange())}),l(12,33),o(),f(13,bt,2,2,"button",72)(14,wt,3,3,"spk-tooltip",73),o()}if(s&2){let t=p();r(3),y("ngModel",t.passphrase),r(4),h("disabled",t.passphrase().length===0),y("ngModel",t.repeatPassphrase),r(),C(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?8:9),r(3),N("loader",t.isUpdating()),r(2),C(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?13:14)}}function Lt(s,e){s&1&&(i(0,"spk-icon",76),O(1,"check"),o())}function Ft(s,e){if(s&1){let t=P();i(0,"div",48)(1,"button",71),S("click",function(){u(t);let a=p();return m(a.openPassphraseForm())}),l(2,36),o(),f(3,Lt,2,0,"spk-icon",76),o()}if(s&2){let t=p();r(3),C(t.passwordUpdated()?3:-1)}}function xt(s,e){if(s&1){let t=P();i(0,"spk-form-field")(1,"label",77),l(2,37),o(),i(3,"textarea",78),A("ngModelChange",function(a){u(t);let _=p();return G(_.allowedHostnames,a)||(_.allowedHostnames=a),m(a)}),o()(),i(4,"spk-alert",79),l(5,38),o(),i(6,"button",74),S("click",function(){u(t);let a=p();return m(a.updateAllowedHostnames())}),l(7,39),o()}if(s&2){let t=p();r(3),y("ngModel",t.allowedHostnames),r(3),N("loader",t.updatingAllowedHosts())}}function Dt(s,e){if(s&1&&O(0),s&2){let t,n=p();U(" ",(t=n.sysinfo())==null?null:t.ServerVersion," ")}}function Xt(s,e){s&1&&I(0,"spk-progress-bar",53)}function Vt(s,e){if(s&1&&O(0),s&2){let t=e.$implicit;U(" ",t.label," ")}}function zt(s,e){if(s&1&&O(0),s&2){let t=e.$implicit;U(" ",t.label," ")}}function Ut(s,e,t){let n=mt(s),a=n[Ue];t?.equal&&(a.equal=t.equal);let _;return n.set=T=>{clearTimeout(_),_=setTimeout(()=>Be(a,T),e)},n.update=T=>{clearTimeout(_),_=setTimeout(()=>We(a,T),e)},n}var Bt=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],Wt=[{value:"none",label:$localize`System default (information)`},{value:"information",label:$localize`Usage statistics, warnings, errors, and crashes`},{value:"warning",label:$localize`Warnings, errors and crashes`},{value:"error",label:$localize`Errors and crashes`},{value:"crash",label:$localize`Crashes only`},{value:"none",label:$localize`None / disabled`}],re=class s{#e=E(St);#t=E(K);#i=E(k);#n=E(te);#o=E(L);#s=E(nt);#a=this.#s.getItem("locale")??"en-US";sysinfo=this.#t.systemInfo;isDarkMode=this.#e.isDarkMode;editAs=c("list");previousLang=this.#a;langCtrl=c(this.#a);usageStatistics=c("");updatingUsageStatistics=c(!1);remoteControlStatus=this.#o.status;updatingChannel=c(!1);updateChannel=c("");setNewChannel(e){let t=this.updateChannel();this.updateChannel.set(e),this.#i.patchApiV1Serversettings({requestBody:{"update-channel":e}}).pipe(R(()=>this.updatingChannel.set(!1)),b(()=>(this.updateChannel.set(t),v(null)))).subscribe()}allowRemoteAccess=c(!1);allowedHostnames=c("");loadedAllowedHostnames=c("");updatingRemoteAccess=c(!1);updatingAllowedHosts=c(!1);updateRemoteAccess(){let e=this.allowRemoteAccess(),t=!e;this.allowRemoteAccess.set(t),this.#i.patchApiV1Serversettings({requestBody:{"server-listen-interface":t?"any":"loopback"}}).pipe(R(()=>this.updatingRemoteAccess.set(!1)),b(()=>(this.allowRemoteAccess.set(e),v(null)))).subscribe()}updateAllowedHostnames(){let e=this.loadedAllowedHostnames(),t=this.allowedHostnames();this.updatingAllowedHosts.set(!0),this.#i.patchApiV1Serversettings({requestBody:{"server-listen-interface":"any","allowed-hostnames":t}}).pipe(R(()=>this.updatingAllowedHosts.set(!1)),b(()=>(this.allowedHostnames.set(e),v(null)))).subscribe()}updatingDisableTrayIconLogin=c(!1);disableTrayIconLogin=c(!1);saveDisableTrayIconLogin(){let e=this.disableTrayIconLogin(),t=!e;this.updatingDisableTrayIconLogin.set(!0),this.disableTrayIconLogin.set(t),this.#i.patchApiV1Serversettings({requestBody:{"disable-tray-icon-login":t?"True":"False"}}).pipe(R(()=>this.updatingDisableTrayIconLogin.set(!1)),b(()=>(this.disableTrayIconLogin.set(e),v(null)))).subscribe()}showPassphraseForm=c(!1);isUpdating=c(!1);passphrase=c("");repeatPassphrase=c("");passwordUpdated=c(!1);updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#i.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(R(()=>this.isUpdating.set(!1))).subscribe({next:()=>{this.showPassphraseForm.set(!1),this.passwordUpdated.set(!0),setTimeout(()=>{this.passwordUpdated.set(!1)},3e3)}}))}openPassphraseForm(){this.showPassphraseForm.set(!0)}cancelPasswordChange(){this.showPassphraseForm.set(!1)}languageOptions=c(Tt);usageStatisticsOptions=c(Wt);timeTypeOptions=c(Bt);timeType=c("none");timeValue=Ut(0,300);timeRange=F(()=>this.timeType()==="h"?[0,24]:[0,60]);timeValueEffect=$(()=>{let e=this.timeValue();this.updateStartupDelay()});updateLocale(e){!e||e===""||e===this.previousLang||(this.#s.setItem("locale",e),window.location.reload())}updateStartupDelay(){let e=this.timeValue(),t=this.timeType(),n="";t!=="none"&&e!==0&&(n=`${e}${t}`),this.#i.patchApiV1Serversettings({requestBody:{"startup-delay":n}}).subscribe()}updateTimeType(e){this.timeType()==="none"&&this.timeValue.set(0),this.timeType.set(e)}updateUsageStatistics(e){let t=this.usageStatistics();!e||e===""||e===t||(this.usageStatistics.set(e),this.updatingUsageStatistics.set(!0),this.#i.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.usageStatistics()==="none"?"":this.usageStatistics()}}).pipe(R(()=>this.updatingUsageStatistics.set(!1)),b(()=>(this.usageStatistics.set(t),v(null)))).subscribe())}serverSettingsEffect=$(()=>{let e=this.#n.serverSettings();if(e===void 0)return;let t=e["startup-delay"],n=t.slice(-1),a=t.slice(0,-1),_=["s","m","h"];this.disableTrayIconLogin.set(e["disable-tray-icon-login"]!=="False"),this.updateChannel.set(e["update-channel"]),this.allowRemoteAccess.set(e["server-listen-interface"]==="any"),this.allowedHostnames.set(e["allowed-hostnames"]),this.loadedAllowedHostnames.set(e["allowed-hostnames"]),this.usageStatistics.set(e["usage-reporter-level"]===""?"none":e["usage-reporter-level"]),this.timeType.set(t==""?"none":_.includes(n)?n:"none"),this.timeValue.set(t==""?0:parseInt(a))});setDarkMode(){this.#e.setDarkMode()}setLightMode(){this.#e.setLightMode()}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=w({type:s,selectors:[["app-settings"]],decls:132,vars:46,consts:()=>{let e;e=$localize`Settings`;let t;t=$localize`Configure your backup settings.`;let n;n=$localize`Remote access control`;let a;a=$localize`Color theme`;let _;_=$localize`Customize your application theme`;let T;T=$localize`Passwords`;let g;g=$localize`Change server passphrase`;let M;M=$localize`Language`;let _e;_e=$localize`Select a language for the platform`;let de;de=$localize`Allow remote access (requires restart)`;let ce;ce=$localize` By allowing remote access, the server listens to requests from any machine on your network. If you enable this option, make sure you are always using the computer on a secure firewall protected network. `;let pe;pe=$localize`Allow remote access`;let Se;Se=$localize`Prevent tray icon automatic log-in`;let ge;ge=$localize` By default, the tray icon will open the user interface with a token that unlocks the user interface. This ensures that you can access the user interface from the tray icon, while requiring others to enter a password. If you prefer having to type in the password, even when accessing the user interface from the tray icon, enable this option. `;let Te;Te=$localize`Prevent tray icon automatic log-in`;let ue;ue=$localize`Update channel`;let me;me=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let Ce;Ce=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ee;Ee=$localize`Stable`;let fe;fe=$localize`Official releases`;let Ne;Ne=$localize`Beta`;let Me;Me=$localize` Try out the new features that we are working on. Currently the most stable version available. Test Restore data before using this in production environments. `;let he;he=$localize` Experimental `;let Pe;Pe=$localize`Specific builds for developers only. Not for use with important data.`;let Oe;Oe=$localize`Canary`;let Re;Re=$localize`Individual builds for developers only. Not for use with important data.`;let Ie;Ie=$localize`Pause after startup or hibernation`;let ye;ye=$localize` Duplicati will run when started, but will remain in paused state for the duration. Duplicati will occupy minimal system resources and no backups will be run. `;let Ge;Ge=$localize`Usage statistics`;let D;D=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#119\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#119\uFFFD"}:CLOSE_LINK:${"[\uFFFD#120\uFFFD\uFFFD/#120\uFFFD|\uFFFD#121\uFFFD\uFFFD/#121\uFFFD]"}:LINE_BREAK:${"[\uFFFD#120\uFFFD\uFFFD/#120\uFFFD|\uFFFD#121\uFFFD\uFFFD/#121\uFFFD]"}:LINE_BREAK: All usage reports are sent anonymously and do not contain any personal information. They contain information about hardware and operating system, the type of backend, backup duration, overall size of source data and similar data. They do not contain paths, filenames, usernames, passwords or similar sensitive information. `,D=Ze(D);let Ae;Ae=$localize`Advanced options`;let $e;$e=$localize`Enter new password`;let ve;ve=$localize`Repeat password`;let be;be=$localize`Password have to be filled and have to match`;let we;we=$localize`Passphrase`;let ke;ke=$localize`Repeat passphrase`;let Le;Le=$localize`Cancel`;let Fe;Fe=$localize` Update passphrase `;let xe;xe=$localize` Update passphrase `;let De;De=$localize`Change password`;let Xe;Xe=$localize`Allowed hostnames`;let Ve;Ve=$localize` To prevent various DNS based attacks, Duplicati limits the allowed hostnames to the ones listed here. Direct IP access and localhost is always allowed. Multiple hostnames can be supplied with a semicolon separator. If any of the allowed hostnames is an asterisk (*), all hostnames are allowed and this feature is disabled. If the field is empty, only IP address and localhost access is allowed. `;let ze;return ze=$localize` Update allowed hostnames `,[e,t,n,a,_,T,g,M,_e,de,ce,pe,Se,ge,Te,ue,me,Ce,Ee,fe,Ne,Me,he,Pe,Oe,Re,Ie,ye,Ge,D,Ae,we,ke,Le,Fe,xe,De,Xe,Ve,ze,[1,"content"],[1,"title"],[1,"left"],[1,"right"],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[1,"right","passphrase-form"],[1,"actions"],["value","value","label","label",3,"options","isClearable","inlineSearch"],["type","text",3,"ngModelChange","ngModel","ngModelOptions"],[1,"right","remote-access-form"],[1,"primary","raised",3,"click"],[1,"indeterminate","primary"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"primary","raised"],[1,"field-row"],[1,"raised","primary",3,"unit"],["type","range",3,"ngModelChange","min","max","disabled","ngModel","ngModelOptions"],["label","label","value","value",3,"options","isClearable"],["type","text",3,"ngModelChange","ngModel"],["href","#"],["label","label","value","value",3,"options","isLoading"],[1,"advanced-settings"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",$e,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",ve,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"spk-success"],["suffix",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"loader"],["message",be,1,"primary"],["spk-button","",1,"raised","primary",3,"click"],["spk-button","",1,"raised","primary",3,"click","disabled"],[1,"spk-success"],["for","allowedHostnames"],["type","text","id","allowedHostnames",3,"ngModelChange","ngModel"],["type","primary"]]},template:function(t,n){if(t&1&&(I(0,"app-status-bar"),i(1,"div",40)(2,"header")(3,"div",41)(4,"h2"),l(5,0),o(),i(6,"p"),l(7,1),o()()(),i(8,"section")(9,"div",42)(10,"h3"),l(11,2),o(),i(12,"p"),O(13),o()(),i(14,"div",43),I(15,"app-remote-control"),o()(),i(16,"section")(17,"div",42)(18,"h3"),l(19,3),o(),i(20,"p"),l(21,4),o()(),i(22,"div",43)(23,"div",44)(24,"img",45),S("click",function(){return n.setLightMode()}),o(),i(25,"img",46),S("click",function(){return n.setDarkMode()}),o()()()(),i(26,"section")(27,"div",42)(28,"h3"),l(29,5),o(),i(30,"p"),l(31,6),o()(),i(32,"div",47),f(33,kt,15,7)(34,Ft,4,1,"div",48),o()(),i(35,"section")(36,"div",42)(37,"h3"),l(38,7),o(),i(39,"p"),l(40,8),o()(),i(41,"div",43)(42,"spk-select",49)(43,"input",50),S("ngModelChange",function(_){return n.updateLocale(_)}),o()()()(),i(44,"section")(45,"div",42)(46,"h3"),l(47,9),o(),i(48,"p"),l(49,10),o()(),i(50,"div",51)(51,"spk-toggle",52),S("click",function(){return n.updateRemoteAccess()}),i(52,"label"),l(53,11),o()(),f(54,xt,8,3),o()(),i(55,"section")(56,"div",42)(57,"h3"),l(58,12),o(),i(59,"p"),l(60,13),o()(),i(61,"div",43)(62,"spk-toggle",52),S("click",function(){return n.saveDisableTrayIconLogin()}),i(63,"label"),l(64,14),o()()()(),i(65,"section")(66,"div",42)(67,"h3"),l(68,15),o(),i(69,"p"),f(70,Dt,1,1),o(),f(71,Xt,1,0,"spk-progress-bar",53),o(),i(72,"div",54)(73,"div",55),S("click",function(){return n.setNewChannel("")}),i(74,"spk-radio",56),l(75,16),o(),i(76,"p"),l(77,17),o()(),i(78,"div",55),S("click",function(){return n.setNewChannel("stable")}),i(79,"spk-radio",56),l(80,18),o(),i(81,"p"),l(82,19),o()(),i(83,"div",55),S("click",function(){return n.setNewChannel("beta")}),i(84,"spk-radio",56),l(85,20),o(),i(86,"p"),l(87,21),o()(),i(88,"div",55),S("click",function(){return n.setNewChannel("experimental")}),i(89,"spk-radio",56),l(90,22),o(),i(91,"p"),l(92,23),o()(),i(93,"div",55),S("click",function(){return n.setNewChannel("canary")}),i(94,"spk-radio",56),l(95,24),o(),i(96,"p"),l(97,25),o()()()()(),I(98,"spk-divider"),i(99,"div",40)(100,"section")(101,"div",42)(102,"h3"),l(103,26),o(),i(104,"p"),l(105,27),o()(),i(106,"div",43)(107,"div",57)(108,"spk-range-slider",58)(109,"input",59),A("ngModelChange",function(_){return G(n.timeValue,_)||(n.timeValue=_),_}),o()(),i(110,"spk-select",60)(111,"input",61),S("ngModelChange",function(_){return n.updateTimeType(_)}),o(),f(112,Vt,1,1,"ng-template"),o()()()(),i(113,"section")(114,"div",42)(115,"h3"),l(116,28),o(),i(117,"p"),X(118,29),I(119,"a",62)(120,"br")(121,"br"),V(),o()(),i(122,"div",43)(123,"spk-select",63)(124,"input",50),S("ngModelChange",function(_){return n.updateUsageStatistics(_)}),o(),f(125,zt,1,1,"ng-template"),o()()()(),i(126,"div",40)(127,"section")(128,"div",64)(129,"h3"),l(130,30),o(),I(131,"app-advanced-options-settings"),o()()()),t&2){let a,_,T;r(13),z(n.remoteControlStatus()),r(11),N("active",!n.isDarkMode()),r(),N("active",n.isDarkMode()),r(8),C(n.showPassphraseForm()?33:34),r(9),h("options",n.languageOptions())("isClearable",!1)("inlineSearch",!0),r(),h("ngModel",n.langCtrl())("ngModelOptions",B(43,le)),r(8),N("active",n.allowRemoteAccess()),r(3),C(n.allowRemoteAccess()?54:-1),r(8),N("active",n.disableTrayIconLogin()),r(8),C(n.updateChannel()!==""&&((a=n.sysinfo())!=null&&a.ServerVersion)?70:-1),r(),C(n.updatingChannel()?71:-1),r(3),N("active",n.updateChannel()===""),r(),ie((_=n.sysinfo())==null?null:_.DefaultUpdateChannel),oe(75),r(2),ie((T=n.sysinfo())==null?null:T.ServerVersionType),oe(77),r(2),N("active",n.updateChannel()==="stable"),r(5),N("active",n.updateChannel()==="beta"),r(5),N("active",n.updateChannel()==="experimental"),r(5),N("active",n.updateChannel()==="canary"),r(14),h("unit",n.timeType()==="none"?"s":n.timeType()),r(),h("min",n.timeRange()[0])("max",n.timeRange()[1])("disabled",n.timeType()==="none"),y("ngModel",n.timeValue),h("ngModelOptions",B(44,le)),r(),h("options",n.timeTypeOptions())("isClearable",!1),r(),h("ngModel",n.timeType()),r(12),h("options",n.usageStatisticsOptions())("isLoading",n.updatingUsageStatistics()),r(),h("ngModel",n.usageStatistics())("ngModelOptions",B(45,le))}},dependencies:[Y,Q,pt,Z,J,ee,gt,ne,x,q,at,lt,st,_t,dt,j,W,ot,H,rt],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem 2rem}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem 0;position:sticky;top:0;background:var(--base-level-10);z-index:1000;border-bottom:1px solid var(--base-level-40)}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}section[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:2rem 0;border-top:1px solid var(--base-level-40)}section[_ngcontent-%COMP%]:first-of-type{border-top:0}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;align-items:flex-start}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] spk-button-group[_ngcontent-%COMP%]{margin-top:.25rem}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;width:50%}.passphrase-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:1rem}.passphrase-form[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.remote-access-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:240px;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-500)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] spk-radio[_ngcontent-%COMP%]{color:var(--base-level-60);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-level-60R)}.field-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}.advanced-settings[_ngcontent-%COMP%]{grid-column:1/-1;display:grid;grid-template-columns:auto 1fr;gap:1rem}"],changeDetection:0})};export{Ut as debounceSignal,re as default};
package/chunk-TCJ2X76T.js DELETED
@@ -1 +0,0 @@
1
- import{c as M}from"./chunk-BJGA55H2.js";import"./chunk-XP7PWMT2.js";import"./chunk-C6XTRC7P.js";import"./chunk-MAVZY7BL.js";import{g as h}from"./chunk-P4ZFQZCA.js";import"./chunk-S5EF63OY.js";import"./chunk-7L2WUS2V.js";import{Db as t,Eb as i,Fb as g,Rb as l,Ua as u,Xb as C,Yb as c,Z as m,gb as s,ic as O,lb as _,zb as f}from"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";var v=["*",[["","footer",""]]],T=["*","[footer]"],r=class n{static \u0275fac=function(e){return new(e||n)};static \u0275cmp=s({type:n,selectors:[["app-custom-card"]],ngContentSelectors:T,decls:11,vars:0,consts:[[1,"card"],["src","/assets/noise/auth-noise.svg",1,"noise"],[1,"header-title"],["src","/assets/duplicati/duplicati.svg","alt",""],[1,"bg"]],template:function(e,a){e&1&&(C(v),t(0,"div",0),g(1,"img",1),t(2,"header")(3,"div",2),g(4,"img",3),O(5," Duplicati "),i()(),t(6,"main"),c(7),t(8,"footer"),c(9,1),i()()(),g(10,"div",4))},styles:['[_nghost-%COMP%]{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center;background-color:var(--base-level-20)}body.dark [_nghost-%COMP%] .card[_ngcontent-%COMP%]:before{background:radial-gradient(rgba(var(--primary-rgb-900),1),#0000 60%)}.card[_ngcontent-%COMP%]{max-width:480px;width:100%;position:relative;z-index:100;background-color:var(--base-level-10);border-radius:var(--shape-5);box-shadow:var(--box-shadow-40);border:1px solid var(--base-level-30);overflow:hidden}.card[_ngcontent-%COMP%]:before{content:"";position:absolute;height:480px;transform:translateY(-285px);left:0;right:0;z-index:-2;background:radial-gradient(rgba(var(--primary-rgb-100),1),#0000 60%)}.card[_ngcontent-%COMP%] img.noise[_ngcontent-%COMP%]{position:absolute;height:480px;width:100%;transform:translateY(-285px);left:0;right:0;z-index:-1;mask-image:radial-gradient(#000,#0000 60%)}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 0;gap:12px;position:relative;z-index:10}.header-title[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;gap:10px}.header-title[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:28px;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3))}main[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:2rem;gap:2.5rem;position:relative;z-index:10}main[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{font:var(--paragraph-40);color:var(--base-level-60R);text-align:center;text-wrap:balance}.bg[_ngcontent-%COMP%]{position:fixed;inset:0;width:100vw;height:100vh;background-image:url(/assets/backgrounds/base-bg.svg);background-size:cover;background-position:center;background-repeat:no-repeat}body.dark[_ngcontent-%COMP%] .bg[_ngcontent-%COMP%]{opacity:1}footer[_ngcontent-%COMP%]:empty{display:none}'],changeDetection:0})};function x(n,o){n&1&&(t(0,"h3"),l(1,0),i())}function y(n,o){n&1&&(t(0,"h3"),l(1,1),i(),t(2,"button",3),l(3,2),i())}var d=class n{#e=m(M);isLoggingOut=this.#e.isLoggingOut;ngOnInit(){this.#e.logout()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=s({type:n,selectors:[["app-logout"]],decls:3,vars:1,consts:()=>{let o;o=$localize`Logging out...`;let e;e=$localize`You have successfully logged out your being redirected to login page.`;let a;return a=$localize`Go to login page`,[o,e,a,["spk-button","","routerLink","/",1,"raised","primary"]]},template:function(e,a){e&1&&(t(0,"app-custom-card"),_(1,x,2,0,"h3")(2,y,4,0),i()),e&2&&(u(),f(a.isLoggingOut()?1:2))},dependencies:[r,h],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{d as default};
package/chunk-U467ZTQ4.js DELETED
@@ -1 +0,0 @@
1
- import{a as u}from"./chunk-P4ZFQZCA.js";import{Db as o,Eb as n,Ua as g,Vb as h,Xb as _,Yb as a,bb as d,gb as p,ic as s,lb as m,sa as r,wb as f,zb as C}from"./chunk-L72ALLHJ.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};