@duplicati/ngclient 0.0.28 → 0.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/spk.woff2 +0 -0
- package/{chunk-LUAN4O53.js → chunk-2E5G54LG.js} +1 -1
- package/{chunk-6TFXXYVK.js → chunk-2VFGTKQ3.js} +1 -1
- package/chunk-3TOIJ5WO.js +2 -0
- package/chunk-4MFVXV2P.js +1 -0
- package/chunk-53HMBWP5.js +2 -0
- package/chunk-6RDPRL5W.js +7 -0
- package/{chunk-UMY3Y7LR.js → chunk-7ORKNESW.js} +1 -1
- package/{chunk-UPIWGO32.js → chunk-AALCXW7G.js} +1 -1
- package/{chunk-5X5UJ7CP.js → chunk-BDZSXP7I.js} +1 -1
- package/{chunk-WV3AOW4R.js → chunk-COO43JXP.js} +1 -1
- package/{chunk-B7SRENJI.js → chunk-DUQTXUOP.js} +1 -1
- package/{chunk-2PUTRWRI.js → chunk-FDJMCHX2.js} +1 -1
- package/{chunk-DESW2TCQ.js → chunk-FL23VQIJ.js} +1 -1
- package/{chunk-47O5BYLZ.js → chunk-GE6ONX6N.js} +1 -1
- package/{chunk-HH2EA6LF.js → chunk-H4PL4MX5.js} +1 -1
- package/{chunk-VAAI6C2V.js → chunk-HEQYI7XZ.js} +1 -1
- package/chunk-HIVOGYJW.js +1 -0
- package/chunk-IDL47L54.js +1 -0
- package/chunk-IVCLLJMP.js +1 -0
- package/chunk-K3Y54FPO.js +1 -0
- package/chunk-LDUHEMHJ.js +1 -0
- package/{chunk-ZAREJJZA.js → chunk-M6JAWID7.js} +1 -1
- package/chunk-MACZO675.js +1 -0
- package/{chunk-GAJ43GZE.js → chunk-MULBVD44.js} +1 -1
- package/{chunk-AIQQJSGP.js → chunk-N3IZHBC5.js} +1 -1
- package/{chunk-RMZR2OAY.js → chunk-NJIDVAUK.js} +1 -1
- package/{chunk-GBWXFIBZ.js → chunk-NKKY2IML.js} +1 -1
- package/{chunk-MFLGWG77.js → chunk-OL3XQXPO.js} +1 -1
- package/chunk-OOBDPKP5.js +1 -0
- package/{chunk-TLFDZKKI.js → chunk-PT7ISA6M.js} +1 -1
- package/chunk-PV7FMVA7.js +1 -0
- package/{chunk-BVTTY2FQ.js → chunk-QAOE722P.js} +1 -1
- package/chunk-QLL2CMCZ.js +1 -0
- package/{chunk-2SYB6ABM.js → chunk-QXWUZ7QN.js} +1 -1
- package/{chunk-C5O62M3L.js → chunk-R4XFPOM7.js} +1 -1
- package/{chunk-3EBWYIH7.js → chunk-RB7TVPQZ.js} +1 -1
- package/{chunk-BR45PK72.js → chunk-RENJEXE5.js} +1 -1
- package/{chunk-4Y76KESB.js → chunk-RFOUEAO7.js} +1 -1
- package/{chunk-YDJZQ6GS.js → chunk-SLC2RVWO.js} +1 -1
- package/{chunk-57W6Z6XZ.js → chunk-TTHH64Z5.js} +1 -1
- package/chunk-UROUYC5A.js +1 -0
- package/chunk-V2FTYSCJ.js +1 -0
- package/{chunk-PD6257G7.js → chunk-VN5Y4LY2.js} +1 -1
- package/{chunk-ZVT4YXH5.js → chunk-WFFR6X5F.js} +1 -1
- package/{chunk-L7M2MTRL.js → chunk-WMMDCNQV.js} +1 -1
- package/{chunk-4SJ35CHE.js → chunk-X7IF472Q.js} +1 -1
- package/chunk-XYLW6QJG.js +1 -0
- package/{chunk-T6ENXWPD.js → chunk-Y33NQYRN.js} +1 -1
- package/chunk-YBKFPTAU.js +1 -0
- package/chunk-ZJNMXPO2.js +1 -0
- package/index.html +3 -3
- package/locale/messages.de-DE.json +11 -0
- package/locale/messages.fr-FR.json +11 -0
- package/locale/messages.json +11 -0
- package/main-RUKECFB7.js +2 -0
- package/package.json +1 -1
- package/polyfills-DUGKNACR.js +1 -0
- package/styles-CLP6NP2M.css +1 -0
- package/chunk-C4S5PKAB.js +0 -1
- package/chunk-CGWELGPM.js +0 -1
- package/chunk-DOGZZDWG.js +0 -1
- package/chunk-EPVXOSHI.js +0 -1
- package/chunk-FAAAWY76.js +0 -1
- package/chunk-MHCUWVA2.js +0 -1
- package/chunk-P7LAQN3J.js +0 -1
- package/chunk-QL753AWG.js +0 -1
- package/chunk-QNP3LI3Y.js +0 -1
- package/chunk-RJDP2FPE.js +0 -7
- package/chunk-RONXYSR4.js +0 -1
- package/chunk-SDVRKDZS.js +0 -1
- package/chunk-UGZKHGQT.js +0 -1
- package/chunk-UVZO552H.js +0 -1
- package/chunk-VJACGH6X.js +0 -1
- package/chunk-ZAVS5NW7.js +0 -1
- package/main-YA4MEBAC.js +0 -1
- package/styles-QLKBXZ7T.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Me,b as ve}from"./chunk-2PUTRWRI.js";import{a as ht,b as Bt}from"./chunk-DNHLTHLR.js";import{a as tt}from"./chunk-TLFDZKKI.js";import{b as M}from"./chunk-ZVT4YXH5.js";import{a as xe,b as q,c as _e,d as K,e as se,f as nt,g as Gt,h as pe,i as ye,k as it,l as me,m as we,n as Mt,o as ce,p as Q,q as Y,r as L,s as ot,t as de}from"./chunk-6TFXXYVK.js";import{a as Ie}from"./chunk-BVTTY2FQ.js";import{a as Z,b as rt,d as $t,e as At,g as Se,i as at,k as J,m as lt,n as Rt,p as st,q as X,t as ke,u as Ge}from"./chunk-QL753AWG.js";import{H as le,X as j}from"./chunk-PD6257G7.js";import{c as It}from"./chunk-4Y76KESB.js";import{ia as et}from"./chunk-DESW2TCQ.js";import{$b as oe,Ab as _,Bb as T,Cb as V,Db as b,Dc as G,E as Le,Eb as a,Fb as o,Fc as Xe,Gb as f,Hb as k,Ib as v,Jb as Ve,Kb as w,Qb as C,R as he,Ra as s,Rb as p,Ub as P,Vb as I,Wb as N,X as y,Za as S,_a as ie,ac as re,bc as ae,cc as l,dc as E,ea as h,ec as D,fa as x,fb as H,fc as bt,gc as Dt,hc as Ot,ic as Et,ja as Vt,kc as Nt,lb as d,lc as be,mc as Pt,nc as ze,p as He,qa as We,ra as Ze,rc as Je,vb as c,xb as fe}from"./chunk-RJDP2FPE.js";import{a as U,c as Tt}from"./chunk-7CGTOI24.js";function Yt(n,i){if(n&1&&(a(0,"p"),l(1),o()),n&2){let e=p();s(),E(e._data().message)}}var Zt={title:"Are you sure?",confirmText:"Confirm",cancelText:"Cancel"},De=class n{data=Ze();_data=G(()=>U(U({},Zt),this.data()));closed=We();close(i="confirm"){this.closed.emit(i==="confirm")}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-confirm-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:10,vars:4,consts:[["header",""],["content",""],["footer",""],["spk-button","",1,"",3,"click"],["spk-button","",1,"raised","primary",3,"click"]],template:function(e,t){e&1&&(a(0,"header",0)(1,"h3"),l(2),o()(),a(3,"div",1),d(4,Yt,2,1,"p"),o(),a(5,"footer",2)(6,"button",3),C("click",function(){return t.close("cancel")}),l(7),o(),a(8,"button",4),C("click",function(){return t.close("confirm")}),l(9),o()()),e&2&&(s(2),E(t._data().title),s(2),_(t._data().message?4:-1),s(3),E(t._data().cancelText),s(2),E(t._data().confirmText))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};var pt=class n{fromString(i){if(!i)return null;let e=i.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(i,e){return`${i}${e}`}static \u0275fac=function(e){return new(e||n)};static \u0275prov=he({token:n,factory:n.\u0275fac,providedIn:"root"})};var Oe=class n{#e=y(Ie);s3Providers=M(this.getS3Config("Providers"));s3Regions=M(this.getS3Config("Regions"));s3RegionHosts=M(this.getS3Config("RegionHosts"));s3StorageClasses=M(this.getS3Config("StorageClasses"));storjSatellites=M(this.getStorjConfig("Satellites"));storjAuthenticationMethods=M(this.getStorjConfig("AuthenticationMethods"));openstackProviders=M(this.getOpenstackConfig("Providers"));openstackVersions=M(this.getOpenstackConfig("Versions"));gcsLocations=M(this.getGcsConfig("Locations"));gcsStorageClasses=M(this.getGcsConfig("StorageClasses"));getS3Config(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":i}}).pipe(He(e=>this.#n(e)))}createS3IamUser(i,e){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":i,"s3-password":e}})}createS3PolicyIAM(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:i}})}getStorjConfig(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":i}}).pipe(He(e=>this.#n(e)))}getOpenstackConfig(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":i}}).pipe(He(e=>this.#n(e)))}getGcsConfig(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":i}}).pipe(He(e=>this.#n(e)))}#n(i){return(i.Result&&typeof i.Result=="object"&&Object.entries(i.Result).map(([e,t])=>({key:e,value:t})))??[]}static \u0275fac=function(e){return new(e||n)};static \u0275prov=he({token:n,factory:n.\u0275fac,providedIn:"root"})};var Fe=new L,je={file:{customFields:{path:{type:"FolderTree",name:"path",shortDescription:"File path",longDescription:"The path to store the backup",formElement:n=>Fe.control(n??"")}}},ssh:{customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"The server to connect to",formElement:n=>Fe.control(n??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:n=>Fe.control(n??"",[_e.required,_e.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:n=>Fe.control(n??"")}},dynamicFields:["auth-username"],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:"This is a path to a private key file locally on the machine",longDescription:"This is a path to a private key file locally on the machine"}]},s3:{customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:n=>Fe.control(n??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:n=>Fe.control(n??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:n=>n.get(Oe).s3Providers},"use-ssl","auth-username","auth-password"],advancedFields:[{name:"s3-client",type:"Enumeration",options:["aws","minio"]},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:n=>n.get(Oe).s3StorageClasses}]},gcs:{oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:n=>Fe.control(n??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:n=>n.get(Oe).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:n=>n.get(Oe).gcsStorageClasses},"authid"]},googledrive:{oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:n=>Fe.control(n??"")}},dynamicFields:["authid"]}};function Ae(n,i){let e={},t={};return i.searchParams.forEach((r,m)=>{je[n].dynamicFields?.includes(m)?t[m]=decodeURIComponent(r):e[m]=decodeURIComponent(r)}),{advanced:e,dynamic:t}}function qe(n){let i=n.map(([e,t])=>`${e}=${t?encodeURIComponent(t.toString()):""}`).join("&");return i?"?"+i:""}var Re={file:{to:n=>{let i=qe([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${n.custom.path}${i}`},from:(n,i,e)=>{let t=e.indexOf("file:///")===0,r=e.split(t?"///":"//")[1].substring(0,1)+i.hostname.substring(1);return U({destinationType:n,custom:{path:`${t?"/":""}${r}${i.pathname}`}},Ae(n,i))}},ssh:{to:n=>{let i=qe([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${n.custom.server}${n.custom.port?":"+n.custom.port:""}${n.custom.path.startsWith("/")?n.custom.path:"/"+n.custom.path}${i}`},from:(n,i,e)=>U({destinationType:n,custom:{server:i.hostname,port:i.port,path:i.pathname}},Ae(n,i))},s3:{to:n=>{let i=qe([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${n.custom.bucket}${n.custom.path.startsWith("/")?n.custom.path:"/"+n.custom.path}${i}`},from:(n,i,e)=>U({destinationType:n,custom:{path:i.pathname,bucket:i.hostname}},Ae(n,i))},gcs:{to:n=>{let i=qe([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${n.custom.path}${i}`},from:(n,i,e)=>{let{advanced:t,dynamic:r}=Ae(n,i);return{destinationType:n,custom:{path:i.hostname+i.pathname},dynamic:r,advanced:t}}},googledrive:{to:n=>{let i=n.custom.path,e=qe([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${i}${e}`},from:(n,i,e)=>{let{advanced:t,dynamic:r}=Ae(n,i);return{destinationType:n,custom:{path:i.hostname+i.pathname},dynamic:r,advanced:t}}},fallbackMapper:{to:n=>"",from:(n,i,e)=>U({destinationType:n},Ae(n,i))}};function mt(n){let i=n.destinationType;return!i||!Re.hasOwnProperty(i)?Re.fallbackMapper.to(n)??"":Re[i].to(n)??""}function xt(n){let i=URL.canParse(n),e=n.split("://")[0],t="http://"+n.split("://")[1],r=new URL(t);if(!Re.hasOwnProperty(e))return Re.fallbackMapper.from(e,r);if(!i)throw new Error("Invalid target path");return Re[e].from(e,r,n)}var Ut=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,ct=class n{generate(i,e=Ut){let t;do t=this.generatePassword(i,e);while(this.calculatePasswordStrength(t)<5);return t}generatePassword(i,e=Ut){let t=this;return Array.apply(null,{length:i}).map(()=>{let r;for(;;)if(r=String.fromCharCode(t.#e()),e.test(r))return r},this).join("")}calculatePasswordStrength(i){let e=1;return i.length>=8&&e++,i.match(/[a-z]/)&&i.match(/[A-Z]/)&&e++,i.match(/\d+/)&&e++,i.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&e++,Math.min(e,5)}#e(){if(window.crypto&&window.crypto.getRandomValues){let i=new Uint8Array(1);return window.crypto.getRandomValues(i),i[0]}else if(window.msCrypto&&window.msCrypto.getRandomValues){let i=new Uint8Array(1);return window.msCrypto.getRandomValues(i),i[0]}else return Math.floor(Math.random()*256)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=he({token:n,factory:n.\u0275fac,providedIn:"root"})};var Jt=["formRef"];function Xt(n,i){if(n&1&&(a(0,"option",14),l(1),o()),n&2){let e=i.$implicit;c("value",e.Key),s(),E(e.DisplayName)}}function en(n,i){if(n&1&&f(0,"spk-progress-bar",25),n&2){let e=p(3);fe("warn",e.calculatePasswordStrength()===1)("tertiary",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),c("value",e.calculatePasswordStrength()*(100/5))}}function tn(n,i){n&1&&(a(0,"span",20),l(1,"Passwords do not match"),o())}function nn(n,i){n&1&&(a(0,"spk-icon"),l(1,"eye-slash"),o(),l(2," hide "))}function on(n,i){n&1&&(a(0,"spk-icon"),l(1,"eye"),o(),l(2," show "))}function rn(n,i){n&1&&(a(0,"spk-icon",27),l(1,"check"),o())}function an(n,i){n&1&&(a(0,"spk-icon"),l(1,"copy"),o())}function ln(n,i){if(n&1){let e=w();a(0,"button",26),C("click",function(){h(e);let r=p(3);return x(r.copyPassword())}),d(1,rn,2,0,"spk-icon",27)(2,an,2,0,"spk-icon"),l(3),o()}if(n&2){let e=p(3);s(),_(e.copiedPassword()?1:2),s(2),D(" ",e.copiedPassword()?"Copied":"Copy"," password ")}}function sn(n,i){n&1&&(a(0,"spk-alert",24),l(1," Tip: Be sure to save your password. If you loose it you will lose access to your backups. "),o())}function pn(n,i){if(n&1){let e=w();a(0,"div",15)(1,"spk-form-field")(2,"label",16),l(3," Create a password "),a(4,"sup"),l(5,"*"),o()(),f(6,"input",17),o(),d(7,en,1,9,"spk-progress-bar",18),a(8,"spk-form-field"),f(9,"input",19),d(10,tn,2,0,"span",20),o(),a(11,"div",21)(12,"button",22),C("click",function(){h(e);let r=p(2);return x(r.showPassword.set(!r.showPassword()))}),d(13,nn,3,0)(14,on,3,0),o(),a(15,"button",22),C("click",function(){h(e);let r=p(2);return x(r.generatePassword())}),a(16,"spk-icon"),l(17,"password"),o(),l(18," Generate password "),o(),d(19,ln,4,2,"button",23),o(),d(20,sn,2,0,"spk-alert",24),o()}if(n&2){let e=p(2);s(6),c("type",e.showPassword()?"text":"password"),s(),_(e.generalForm.value.password?7:-1),s(2),c("type",e.showPassword()?"text":"password"),s(),_(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?10:-1),s(3),_(e.showPassword()?13:14),s(6),_(e.showCopyPassword()?19:-1),s(),_(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?20:-1)}}function mn(n,i){if(n&1&&(a(0,"spk-select",11)(1,"label",12),l(2,"Encryption"),o(),f(3,"input",13),V(4,Xt,2,2,"option",14,T),o(),d(6,pn,21,7,"div",15)),n&2){let e=p();c("displayFn",e.displayFn()),s(4),b(e.encryptionOptions()),s(2),_(e.encryptionFieldSignal()!==""?6:-1)}}function cn(n,i){if(n&1&&(a(0,"button",9),l(1," Continue "),a(2,"spk-icon"),l(3,"arrow-right"),o()()),n&2){let e=p();c("disabled",e.generalForm.invalid)}}function dn(n,i){if(n&1&&(a(0,"spk-tooltip",10)(1,"button",9),l(2," Continue "),a(3,"spk-icon"),l(4,"arrow-right"),o()()()),n&2){let e=p();c("disabled",!(e.showCopyPassword()&&!e.copiedPassword())),s(),c("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var Be=new L,Ht=(n={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>Be.group({name:Be.control(n.name,[_e.required]),description:Be.control(n.description),encryption:Be.control(n.encryption,[Bt()]),password:Be.control(n.password,[ht(i=>i?.value.encryption!=="",[_e.required])]),repeatPassword:Be.control(n.repeatPassword,[ht(i=>i?.value.encryption!=="",[_e.required])])}),wt={Key:"",DisplayName:"None"},yt=class n{#e=y(j);#n=y(le);#i=y(ct);#o=y(ee);#t=y(tt);formRef=ie.required("formRef");generalForm=this.#o.generalForm;generalFormSignal=this.#o.generalFormSignal;encryptionFieldSignal=this.#o.encryptionFieldSignal;encryptionOptions=this.#o.encryptionOptions;isNew=this.#o.isNew;showPassword=S(!1);copiedPassword=S(!1);showCopyPassword=S(!1);encryptionEffect=Xe(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});calculatePasswordStrength=G(()=>{let e=this.generalFormSignal()?.password??"";return this.#i.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#o.exit()}async copyPassword(){let i=this.generalForm.controls.password.value;await this.#r(i??""),this.copiedPassword.set(!0)}async#r(i){try{await navigator.clipboard.writeText(i)}catch{try{let t=document.createElement("textarea");t.value=i,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}catch(t){console.error("Failed to copy text: ",t)}}}displayFn(){let i=this.#t.systemInfo()?.EncryptionModules??[];return e=>{let t=[wt,...i].find(r=>r.Key===e);return t?`${t.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let i=this.#i.generate(16);this.generalForm.controls.password.setValue(i),this.generalForm.controls.repeatPassword.setValue(i),this.showCopyPassword.set(!0)}next(){this.#e.navigate(["destination"],{relativeTo:this.#n.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-general"]],viewQuery:function(e,t){e&1&&oe(t.formRef,Jt,5),e&2&&re()},decls:22,vars:3,consts:[["formRef",""],["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],["for","backupName"],["type","text","tabindex","1","placeholder","Your backup name","formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder","Your backup description","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"],[3,"displayFn"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder","Encryption","formControlName","encryption"],[3,"value"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder","Password","formControlName","password",3,"type"],[1,"raised",3,"warn","tertiary","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder","Repeat password","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 r=w();a(0,"form",1,0),C("submit",function(){return h(r),x(t.next())}),a(2,"h3",2),l(3,"General backup settings"),o(),a(4,"spk-form-field")(5,"label",3),l(6," Backup name "),a(7,"sup"),l(8,"*"),o()(),f(9,"input",4),o(),a(10,"spk-form-field")(11,"label",5),l(12,"Backup description"),o(),f(13,"textarea",6),o(),d(14,mn,7,2),a(15,"div",7)(16,"button",8),C("click",function(){return h(r),x(t.exit())}),a(17,"spk-icon"),l(18,"arrow-left"),o(),l(19," Exit "),o(),d(20,cn,4,1,"button",9)(21,dn,5,2,"spk-tooltip",10),o()()}e&2&&(c("formGroup",t.generalForm),s(14),_(t.isNew()?14:-1),s(6),_(t.encryptionFieldSignal()===""?20:21))},dependencies:[de,pe,Q,Y,q,K,se,me,ce,J,X,Se,Z,Rt,rt,Ge],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}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--warn-500)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}"],changeDetection:0})};var un=["formRef"],fn=(n,i)=>({index:n,formView:i,formGroupName:"advancedOptions",destinationType:null,oauthField:null}),_n=n=>({$implicit:n});function gn(n,i){if(n&1&&(a(0,"option",11),l(1),o()),n&2){let e=i.$implicit;c("value",e),s(),E(e)}}function Cn(n,i){if(n&1&&(a(0,"option",11),l(1),o()),n&2){let e=i.$implicit;c("value",e.value),s(),E(e.name)}}function hn(n,i){if(n&1){let e=w();a(0,"button",23,2),C("click",function(){let r=h(e).$implicit,m=p();return x(m.addNewOption(r))}),l(2),o()}if(n&2){let e=i.$implicit;s(2),E(e.name)}}function xn(n,i){n&1&&Ve(0)}function yn(n,i){if(n&1&&d(0,xn,1,0,"ng-container",24),n&2){let e=i.$implicit,t=i.$index;p();let r=ae(39);c("ngTemplateOutlet",r)("ngTemplateOutletContext",be(5,_n,Pt(2,fn,t,e)))}}function wn(n,i){if(n&1&&(a(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Sn(n,i){if(n&1&&(a(0,"app-file-tree",27)(1,"label",33),l(2),d(3,wn,3,1,"spk-tooltip",34),o(),f(4,"input",35),o()),n&2){let e,t=p().$implicit,r=p();c("startingPath",r.getFormFieldValue(0,t.formGroupName,t.formView.name))("accepts",t.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),I("for","destination-",t.formGroupName,"-",t.index,""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),I("id","destination-",t.formGroupName,"-",t.index,""),P("formControlName",t.formView.name)}}function kn(n,i){if(n&1&&(a(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function vn(n,i){if(n&1&&(a(0,"app-file-tree",28)(1,"label",33),l(2),d(3,kn,3,1,"spk-tooltip",34),o(),f(4,"input",35),o()),n&2){let e,t=p().$implicit,r=p();c("startingPath",r.getFormFieldValue(0,t.formGroupName,t.formView.name)),s(),I("for","destination-",t.formGroupName,"-",t.index,""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),I("id","destination-",t.formGroupName,"-",t.index,""),P("formControlName",t.formView.name)}}function Fn(n,i){if(n&1&&(a(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Tn(n,i){n&1&&(a(0,"spk-icon",36),l(1,"link"),o())}function Vn(n,i){n&1&&(a(0,"spk-icon",36),l(1,"textbox"),o())}function bn(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",33),l(2),d(3,Fn,3,1,"spk-tooltip",34),o(),f(4,"input",35),d(5,Tn,2,0,"spk-icon",36)(6,Vn,2,0,"spk-icon",36),o()),n&2){let e,t=p().$implicit;s(),I("for","destination-",t.formGroupName,"-",t.index,""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),I("id","destination-",t.formGroupName,"-",t.index,""),P("formControlName",t.formView.name),s(),_(t.formView.type==="Path"?5:6)}}function Dn(n,i){if(n&1){let e=w();a(0,"span",40),C("click",function(){h(e);let r=p(2).$implicit,m=p();return x(m.oauthStartTokenCreation(r.formViewType))}),l(1,"AuthID"),o()}}function On(n,i){n&1&&(a(0,"spk-icon",36),l(1,"password"),o())}function En(n,i){if(n&1){let e=w();a(0,"spk-icon",41),C("click",function(){h(e);let r=p(2).$implicit;return x(r.formView.showPassword=!r.formView.showPassword)}),l(1," eye "),o()}}function Nn(n,i){if(n&1){let e=w();a(0,"spk-icon",41),C("click",function(){h(e);let r=p(2).$implicit;return x(r.formView.showPassword=!r.formView.showPassword)}),l(1," eye-slash "),o()}}function Pn(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",33),l(2),o(),f(3,"input",37),d(4,Dn,2,0,"span",38)(5,On,2,0,"spk-icon",36)(6,En,2,0,"spk-icon",39)(7,Nn,2,0,"spk-icon",39),o()),n&2){let e,t=p().$implicit;s(),I("for","destination-",t.formGroupName,"-",t.index,""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),I("id","destination-",t.formGroupName,"-",t.index,""),P("formControlName",t.formView.name),c("type",t.formView.showPassword?"text":"password"),s(),_(t.oauthField===t.formView.name?4:5),s(2),_(t.formView.showPassword?6:7)}}function In(n,i){if(n&1&&(a(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Gn(n,i){if(n&1&&(a(0,"option",11),l(1),o()),n&2){let e=i.$implicit;c("value",e),s(),E(e)}}function Mn(n,i){if(n&1&&(a(0,"spk-select")(1,"label",33),l(2),d(3,In,3,1,"spk-tooltip",34),o(),f(4,"input",42),k(5,10),V(6,Gn,2,2,"option",11,T),v(),o()),n&2){let e,t=p().$implicit;s(),I("for","destination-",t.formGroupName,"-",t.index,""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),I("id","destination-",t.formGroupName,"-",t.index,""),P("formControlName",t.formView.name),s(2),b(t.formView.options)}}function $n(n,i){if(n&1&&(a(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function An(n,i){if(n&1&&(a(0,"option",11),l(1),o()),n&2){let e=i.$implicit;c("value",e),s(),E(e)}}function Rn(n,i){if(n&1&&(a(0,"div",29)(1,"label",33),l(2),d(3,$n,3,1,"spk-tooltip",34),o(),a(4,"div",43)(5,"spk-form-field"),f(6,"input",44),a(7,"spk-icon",36),l(8,"resize"),o()(),a(9,"spk-select"),f(10,"label")(11,"input",45),k(12,10),V(13,An,2,2,"option",11,T),v(),o()()()),n&2){let e,t=p().$implicit,r=p();c("formGroupName",t.formView.name),s(),I("for","destination-",t.formGroupName,"-",t.index,""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(3),I("id","destination-",t.formGroupName,"-",t.index,""),s(7),b(r.sizeOptions())}}function Bn(n,i){if(n&1&&(a(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Un(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",33),l(2),d(3,Bn,3,1,"spk-tooltip",34),o(),f(4,"input",46),a(5,"spk-icon",36),l(6,"numpad"),o()()),n&2){let e,t=p().$implicit;s(),I("for","destination-",t.formGroupName,"-",t.index,""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),I("id","destination-",t.formGroupName,"-",t.index,""),P("formControlName",t.formView.name)}}function Hn(n,i){if(n&1&&(a(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Ln(n,i){if(n&1&&(a(0,"spk-toggle",30)(1,"label",33),l(2),d(3,Hn,3,1,"spk-tooltip",34),o(),f(4,"input",47),o()),n&2){let e,t=p().$implicit;s(),I("for","destination-",t.formGroupName,"-",t.index,""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),I("id","destination-",t.formGroupName,"-",t.index,""),P("formControlName",t.formView.name)}}function Wn(n,i){if(n&1&&(a(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function zn(n,i){n&1&&(a(0,"spk-option",49),l(1,"None"),o()),n&2&&c("value","None")}function jn(n,i){if(n&1&&(a(0,"spk-option",11),l(1),f(2,"spk-checkbox",50),o()),n&2){let e=p().$implicit;c("value",e),s(),D(" ",e," ")}}function qn(n,i){if(n&1&&d(0,zn,2,1,"spk-option",49)(1,jn,3,2,"spk-option",11),n&2){let e=i.$implicit;_(e==="None"?0:1)}}function Kn(n,i){if(n&1&&(a(0,"spk-select",31)(1,"label",33),l(2),d(3,Wn,3,1,"spk-tooltip",34),o(),f(4,"input",48),k(5,10),V(6,qn,2,1,null,null,T),v(),o()),n&2){let e,t=p().$implicit;c("selectMultiple",!0),s(),I("for","destination-",t.formGroupName,"-",t.index,""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),P("formControlName",t.formView.name),s(2),b(t.formView.options)}}function Qn(n,i){if(n&1&&(a(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Yn(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",33),l(2),d(3,Qn,3,1,"spk-tooltip",34),o(),f(4,"input",35),o()),n&2){let e,t=p().$implicit;s(),I("for","destination-",t.formGroupName,"-",t.index,""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),I("id","destination-",t.formGroupName,"-",t.index,""),P("formControlName",t.formView.name)}}function Zn(n,i){if(n&1){let e=w();a(0,"div",25),k(1,26),d(2,Sn,5,14,"app-file-tree",27)(3,vn,5,10,"app-file-tree",28)(4,bn,7,10,"spk-form-field")(5,Pn,8,11,"spk-form-field")(6,Mn,8,9,"spk-select")(7,Rn,15,9,"div",29)(8,Un,7,9,"spk-form-field")(9,Ln,5,9,"spk-toggle",30)(10,Kn,8,7,"spk-select",31)(11,Yn,5,9,"spk-form-field"),v(),a(12,"button",32),C("click",function(){let r=h(e).$implicit,m=p();return x(m.removeFormView(r.formView,0))}),a(13,"spk-icon"),l(14,"x-circle"),o()()()}if(n&2){let e=i.$implicit;s(),c("formGroupName",e.formGroupName),s(),_(e.formView.type==="FileTree"?2:e.formView.type==="FolderTree"?3:e.formView.type==="String"||e.formView.type==="Path"?4:e.formView.type==="Password"?5:e.formView.type==="Enumeration"?6:e.formView.type==="Size"?7:e.formView.type==="Integer"?8:e.formView.type==="Boolean"?9:e.formView.type==="Flags"?10:e.formView.type==="Timespan"?11:-1)}}var ge=new L,Jn=["Bytes","KB","MB","GB","TB","PB"],Xn=[{value:"",name:"Keep all backups"},{value:"time",name:"Delete backups that are older than"},{value:"versions",name:"Keep a specific number of backups"},{value:"smart",name:"Smart backup retention"},{value:"custom",name:"Custom backup retention"}],Lt=(n={remoteVolumeSize:50,size:"MB",backupRetention:"",advancedOptions:[]})=>ge.group({remoteVolumeSize:ge.group({size:ge.control(n.remoteVolumeSize),unit:ge.control(n.size)}),backupRetention:ge.control(n.backupRetention),advancedOptions:ge.group({})}),mr=(n,i)=>ge.group({name:ge.control(n),value:ge.control(i)}),St=class n{#e=y(ee);#n=y(j);#i=y(le);formRef=ie.required("formRef");optionsForm=this.#e.optionsForm;selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;sizeOptions=S(Jn);rentationOptions=S(Xn);oauthStartTokenCreation(i){}getFormFieldValue(i,e,t){return this.optionsForm.controls.advancedOptions.controls[t].value}removeFormView(i,e){this.#e.removeOptionFromFormGroup(i)}addNewOption(i){this.#e.addOptionToFormGroup(i)}retentionOptionDisplayFn(){let i=this.rentationOptions();return e=>{let t=i.find(r=>r.value===e);return t?t.name:""}}displayFn(){let i=this.#e.advancedOptions();return e=>{let t=i.find(r=>r.name===e);return t?`${t.name}`:""}}goBack(){this.#n.navigate(["schedule"],{relativeTo:this.#i.parent})}submit(){this.#e.submit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-options"]],viewQuery:function(e,t){e&1&&oe(t.formRef,un,5),e&2&&re()},decls:49,vars:5,consts:[["formRef",""],["fieldTemplate",""],["option",""],[3,"submit","formGroup"],[1,"title-30"],[1,"remote-volume-wrap"],["formGroupName","remoteVolumeSize",1,"row-inputs"],["for","size"],["type","number","id","size","formControlName","size"],["type","text","placeholder","Select an option...","formControlName","unit"],["options",""],[3,"value"],["href","#",1,"spk-primary"],[3,"displayFn"],["type","text","formControlName","backupRetention"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small"],["menu",""],["type","button"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["type","button",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["type","search",3,"id","formControlName"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["type","search","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],["type","text","id","text",3,"formControlName"],["deselect","",3,"value"],[1,"raised","primary"]],template:function(e,t){if(e&1){let r=w();a(0,"form",3,0),C("submit",function(){return h(r),x(t.submit())}),a(2,"h3",4),l(3,"Options"),o(),a(4,"div",5)(5,"div",6)(6,"spk-form-field")(7,"label",7),l(8,"Remote volume size"),o(),f(9,"input",8),o(),a(10,"spk-select"),f(11,"input",9),k(12,10),V(13,gn,2,2,"option",11,T),v(),o()(),a(15,"p"),l(16," The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. "),a(17,"a",12),l(18,"Read more"),o()()(),a(19,"spk-select",13)(20,"label",7),l(21,"Backup retention"),o(),f(22,"input",14),V(23,Cn,2,2,"option",11,T),o(),a(25,"app-toggle-card",15),k(26,16),l(27," Advanced options "),a(28,"spk-menu")(29,"button",17),l(30," Add advanced option "),a(31,"spk-icon"),l(32,"plus"),o()(),k(33,18),V(34,hn,3,1,"button",19,T),v(),o(),v(),V(36,yn,1,7,"ng-container",null,T),o(),d(38,Zn,15,2,"ng-template",null,1,Je),a(40,"div",20)(41,"button",21),C("click",function(){return h(r),x(t.goBack())}),a(42,"spk-icon"),l(43,"arrow-left"),o(),l(44," Go back "),o(),a(45,"button",22)(46,"spk-icon"),l(47,"arrow-right"),o(),l(48," Submit "),o()()()}e&2&&(c("formGroup",t.optionsForm),s(13),b(t.sizeOptions()),s(6),c("displayFn",t.retentionOptionDisplayFn()),s(4),b(t.rentationOptions()),s(2),c("disallowToggle",!0),s(9),b(t.nonSelectedOptions()),s(2),b(t.selectedOptions()),s(9),fe("loader",t.isSubmitting()))},dependencies:[de,pe,Q,Y,q,ye,xe,K,se,me,ce,we,et,lt,X,Se,Z,J,ke,at,st,Ge,Me,ve],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}.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}.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 ei=["formRef"];function ti(n,i){if(n&1&&(a(0,"option",24),l(1),o()),n&2){let e=i.$implicit;c("value",e.key),s(),E(e.label)}}function ni(n,i){if(n&1){let e=w();a(0,"div",11)(1,"spk-form-field")(2,"label",12),l(3,"Next time"),o(),a(4,"input",13,1),C("focus",function(){h(e);let r=ae(5);return x(r.showPicker())}),o(),a(6,"spk-icon",14),l(7,"clock"),o()(),a(8,"spk-form-field"),f(9,"label",15),a(10,"input",16,2),C("focus",function(){h(e);let r=ae(11);return x(r.showPicker())}),o(),a(12,"spk-icon",14),l(13,"calendar"),o()()(),k(14,17),a(15,"div",18)(16,"spk-form-field")(17,"label",19),l(18,"Run again every"),o(),f(19,"input",20),o(),a(20,"spk-select",21),f(21,"input",22),k(22,23),V(23,ti,2,2,"option",24,T),v(),o()(),a(25,"app-toggle-card",25),k(26,26),l(27,"Allowed days"),v(),a(28,"div",27)(29,"spk-toggle",6),l(30," Monday "),f(31,"input",28),o(),a(32,"spk-toggle",6),l(33," Tuesday "),f(34,"input",29),o(),a(35,"spk-toggle",6),l(36," Wednesday "),f(37,"input",30),o(),a(38,"spk-toggle",6),l(39," Thursday "),f(40,"input",31),o(),a(41,"spk-toggle",6),l(42," Friday "),f(43,"input",32),o(),a(44,"spk-toggle",6),l(45," Saturday "),f(46,"input",33),o(),a(47,"spk-toggle",6),l(48," Sunday "),f(49,"input",34),o()()(),v()}if(n&2){let e=p();s(20),c("displayFn",e.displayFn),s(3),b(e.unitOptions),s(2),c("disallowToggle",!0)}}var A=new L,Wt=[{key:"s",label:"Seconds"},{key:"m",label:"Minutes"},{key:"h",label:"Hours"},{key:"D",label:"Days"},{key:"W",label:"Weeks"},{key:"M",label:"Months"},{key:"Y",label:"Years"}],zt=(n={autoRun:!1,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}}})=>A.group({autoRun:A.control(n.autoRun),nextTime:A.group({time:A.control(n.nextTime.time),date:A.control(n.nextTime.date)}),runAgain:A.group({repeatValue:A.control(n.runAgain.repeatValue),repeatUnit:A.control(n.runAgain.repeatUnit),allowedDays:A.group({mon:A.control(n.runAgain.allowedDays.mon),tue:A.control(n.runAgain.allowedDays.tue),wed:A.control(n.runAgain.allowedDays.wed),thu:A.control(n.runAgain.allowedDays.thu),fri:A.control(n.runAgain.allowedDays.fri),sat:A.control(n.runAgain.allowedDays.sat),sun:A.control(n.runAgain.allowedDays.sun)})})}),kt=class n{#e=y(ee);#n=y(j);#i=y(le);formRef=ie.required("formRef");scheduleForm=this.#e.scheduleForm;scheduleFormSignal=this.#e.scheduleFormSignal;unitOptions=Wt;displayFn(i){let e=Wt.find(t=>t.key===i);return e?`${e.label}`:""}goBack(){this.#n.navigate(["source-data"],{relativeTo:this.#i.parent})}next(){this.#n.navigate(["options"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-schedule"]],viewQuery:function(e,t){e&1&&oe(t.formRef,ei,5),e&2&&re()},decls:20,vars:2,consts:[["formRef",""],["timeRef",""],["dateRef",""],[3,"submit","formGroup"],[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox","formControlName","autoRun"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["formGroupName","nextTime",1,"row-inputs"],["for","time"],["type","time","id","time","formControlName","time",3,"focus"],["suffix",""],["for","date"],["type","date","id","date","formControlName","date",3,"focus"],["formGroupName","runAgain"],[1,"row-inputs"],["for","repeatValue"],["type","number","id","repeatValue","formControlName","repeatValue"],[3,"displayFn"],["type","text","id","repeatUnit","formControlName","repeatUnit"],["options",""],[3,"value"],["formGroupName","allowedDays",3,"disallowToggle"],["title",""],[1,"days-wrap"],["type","checkbox","formControlName","mon"],["type","checkbox","formControlName","tue"],["type","checkbox","formControlName","wed"],["type","checkbox","formControlName","thu"],["type","checkbox","formControlName","fri"],["type","checkbox","formControlName","sat"],["type","checkbox","formControlName","sun"]],template:function(e,t){if(e&1){let r=w();a(0,"form",3,0),C("submit",function(){return h(r),x(t.next())}),a(2,"h3",4),l(3,"Schedule"),o(),a(4,"div",5)(5,"spk-toggle",6),l(6," Automatically run backups "),f(7,"input",7),o(),a(8,"p"),l(9,"If a date was missed, the job will run as soon as possible."),o()(),d(10,ni,50,2),a(11,"div",8)(12,"button",9),C("click",function(){return h(r),x(t.goBack())}),a(13,"spk-icon"),l(14,"arrow-left"),o(),l(15," Go back "),o(),a(16,"button",10)(17,"spk-icon"),l(18,"arrow-right"),o(),l(19," Continue "),o()()()}if(e&2){let r;c("formGroup",t.scheduleForm),s(10),_((r=t.scheduleFormSignal())!=null&&r.autoRun?10:-1)}},dependencies:[de,pe,Q,Y,q,ye,xe,K,se,me,ce,we,J,X,ke,Z,Se,ve],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}.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 ii(n,i){if(n&1&&(a(0,"option",3),l(1),o()),n&2){let e=i.$implicit;c("value",e.value),s(),E(e.key)}}function oi(n,i){if(n&1&&(a(0,"option",3),l(1),o()),n&2){let e=i.$implicit;c("value",e.value),s(),E(e.key)}}function ri(n,i){if(n&1){let e=w();a(0,"spk-select",0)(1,"input",6),C("ngModelChange",function(r){h(e);let m=p(2);return x(m.updateStateExpression(r))}),o(),V(2,oi,2,2,"option",3,T),o()}if(n&2){let e,t=p(2);c("hideClearButton",!0)("displayFn",t.displayFn),s(),c("ngModel",(e=t.pathState())==null?null:e.expression),s(),b(t.fileGroupOptions())}}function ai(n,i){if(n&1){let e=w();a(0,"spk-form-field")(1,"input",6),C("ngModelChange",function(r){h(e);let m=p(2);return x(m.updateStateExpression(r))}),o()()}if(n&2){let e,t=p(2);s(),c("ngModel",(e=t.pathState())==null?null:e.expression)}}function li(n,i){if(n&1){let e=w();a(0,"spk-select",0)(1,"input",1),C("ngModelChange",function(r){h(e);let m=p();return x(m.updateStateType(r))}),o(),k(2,2),V(3,ii,2,2,"option",3,T),v(),o(),d(5,ri,4,3,"spk-select",0)(6,ai,2,1,"spk-form-field"),a(7,"div",4),C("click",function(){h(e);let r=p();return x(r.removeFilter())}),a(8,"spk-icon",5),l(9,"x-circle"),o()()}if(n&2){let e,t,r=p();c("hideClearButton",!0)("displayFn",r.displayFn),s(),c("ngModel",(e=r.pathState())==null?null:e.type),s(2),b(r.expressionOptions()),s(2),_(((t=r.pathState())==null?null:t.type)==="-FileGroup"||((t=r.pathState())==null?null:t.type)==="+FileGroup"?5:6)}}var jt=[{key:"Excludes folders where name contains",value:"-FolderNameIncludes"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileNameIncludes"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"}],si=[{key:"Applications",value:"Applications"},{key:"CacheFiles",value:"Cache Files"},{key:"TemporaryFiles",value:"Temporary Files"},{key:"OperatingSystem",value:"Operating System"},{key:"SystemFiles",value:"System Files"},{key:"DefaultExcludes",value:"Standard Excludes"}],dt=class n{path=Ze.required();pathChange=We();remove=We();expressionOptions=S(jt);fileGroupOptions=S(si);pathState=S(null);pathEffect=Xe(()=>{let i=this.path(),e=i.slice(1),t=i.startsWith("-")?"-":"+";return e.startsWith("/")&&e.endsWith("/")?this.pathState.set({type:`${t}Folder`,path:e,expression:e}):e.startsWith("*")&&e.endsWith("*/")?this.pathState.set({type:`${t}FolderNameIncludes`,path:e,expression:e.slice(1,-2)}):e.startsWith("[.*")&&e.endsWith("[^\\/]*]")?this.pathState.set({type:`${t}FileNameIncludes`,path:e,expression:e.slice(3,-7)}):e.startsWith("{")&&e.endsWith("}")?this.pathState.set({type:`${t}FileGroup`,path:e,expression:e.slice(1,-1)}):e.startsWith("[")&&e.endsWith("]")?this.pathState.set({type:`${t}Regex`,path:e,expression:e.slice(1,-1)}):e.startsWith("*.")?this.pathState.set({type:`${t}Extension`,path:e,expression:e.slice(2)}):this.pathState.set({type:`${t}Expression`,path:e,expression:e})});updateStateType(i){this.pathState.update(e=>(e.type=i,e.path=this.#e(e),e)),this.pathChange.emit(this.pathState().path)}updateStateExpression(i){this.pathState.update(e=>(e.expression=i,e.path=this.#e(e),e)),this.pathChange.emit(this.pathState().path)}#e(i){let e=i.type.slice(0,1),t=i.type.slice(1);if(t==="Folder"){let r=i.expression.endsWith("/"),m=i.expression.startsWith("/");return r&&m?`${e}${i.expression}`:r?`${e}${i.expression}/`:m?`${e}/${i.expression}`:`${e}/${i.expression}/`}return t==="FolderNameIncludes"?`${e}*${i.expression}*/`:t==="FileNameIncludes"?`${e}[.*${i.expression}[^\\/]*]`:t==="FileGroup"?`${e}{${i.expression}}`:t==="Regex"?`${e}[${i.expression}]`:t==="Extension"?`${e}*.${i.expression}`:`${e}${i.expression}`}removeFilter(){this.remove.emit()}displayFn(i){let e=jt.find(t=>t.value===i);return e?e.key:""}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-filter"]],inputs:{path:[1,"path"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:1,vars:1,consts:[[3,"hideClearButton","displayFn"],["type","text","placeholder","Select an option...",3,"ngModelChange","ngModel"],["options",""],[3,"value"],[1,"filter-removal",3,"click"],[1,"spk-primary"],["type","text",3,"ngModelChange","ngModel"]],template:function(e,t){e&1&&d(0,li,10,4),e&2&&_(t.pathState()?0:-1)},dependencies:[ot,Q,Y,q,K,Gt,X,Z,J],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] spk-select[_ngcontent-%COMP%]{--miw: initial}[_nghost-%COMP%] .filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var pi=["formRef"];function mi(n,i){if(n&1){let e=w();a(0,"app-filter",26),C("pathChange",function(r){let m=h(e).$index,u=p();return x(u.patchPathAt(r,m))})("remove",function(){let r=h(e).$index,m=p();return x(m.removePathAt(r))}),o()}if(n&2){let e=i.$implicit;c("path",e)}}function ci(n,i){if(n&1&&(a(0,"option",30),l(1),o()),n&2){let e=i.$implicit;c("value",e),s(),E(e)}}function di(n,i){if(n&1&&(a(0,"div",25)(1,"spk-form-field"),f(2,"input",27),o(),a(3,"spk-select"),f(4,"input",28),k(5,29),V(6,ci,2,2,"option",30,T),v(),o()()),n&2){let e=p();s(6),b(e.sizeOptions())}}var Ce=new L,ui=["Bytes","KB","MB","GB","TB","PB"],qt=(n={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>Ce.group({path:Ce.control(n.path),excludes:Ce.group({hidden:Ce.control(n.excludes.hidden),system:Ce.control(n.excludes.system),temporary:Ce.control(n.excludes.temporary),filesLargerThan:Ce.group({size:Ce.control(null),unit:Ce.control(null)})})}),vt=class n{#e=y(ee);#n=y(j);#i=y(le);formRef=ie.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new nt("");filesLargerThan=G(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=S(ui);pathSignal=M(this.sourceDataForm.controls.path.valueChanges);pathArray=G(()=>this.pathSignal()?.split("\0").filter(i=>i.startsWith("-")||i.startsWith("+"))??[]);addFilter(i="-*"){let e=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${e}\0${i}`)}patchPathAt(i,e){let r=this.sourceDataForm.controls.path.value.split("\0").filter(u=>!u.startsWith("-")&&!u.startsWith("+")).join("\0"),m=this.pathArray().map((u,$)=>$===e?`${i}`:`${u}`).join("\0");this.sourceDataForm.controls.path.setValue(`${r}\0${m}`)}removePathAt(i){let t=this.sourceDataForm.controls.path.value.split("\0").filter(m=>!m.startsWith("-")&&!m.startsWith("+")).join("\0"),r=this.pathArray().filter((m,u)=>u!==i).join("\0");this.sourceDataForm.controls.path.setValue(`${t}\0${r}`)}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 i=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${i}\0${this.newPathCtrl.value}`),this.newPathCtrl.setValue("")}goBack(){this.#n.navigate(["destination"],{relativeTo:this.#i.parent})}next(){this.#n.navigate(["schedule"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-source-data"]],viewQuery:function(e,t){e&1&&oe(t.formRef,pi,5),e&2&&re()},decls:58,vars:11,consts:[["formRef",""],[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder","Path","formControlName","path"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"row-inputs"],["type","text","placeholder","Add a direct path",3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],[3,"path"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder","Hidden files","formControlName","hidden"],["type","checkbox","placeholder","System files","formControlName","system"],["type","checkbox","placeholder","Temporary files","formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[3,"pathChange","remove","path"],["type","number","formControlName","size"],["type","text","formControlName","unit","placeholder","Select an option..."],["options",""],[3,"value"]],template:function(e,t){if(e&1){let r=w();a(0,"form",1,0),C("submit",function(){return h(r),x(t.next())}),a(2,"div",2)(3,"h3",3),l(4,"Source Data"),o(),a(5,"app-file-tree",4)(6,"label",5),l(7,"Folder path"),o(),f(8,"input",6),o(),a(9,"div",7)(10,"button",8),C("click",function(){return h(r),x(t.goBack())}),a(11,"spk-icon"),l(12,"arrow-left"),o(),l(13," Go back "),o(),a(14,"button",9)(15,"spk-icon"),l(16,"arrow-right"),o(),l(17," Continue "),o()()(),a(18,"div",10)(19,"h3",3),l(20,"Source Data"),o(),a(21,"app-toggle-card",11),k(22,12),l(23,"Add Path"),v(),a(24,"p",13),l(25,"Add a path directly from your machine."),o(),a(26,"div",14)(27,"spk-form-field"),f(28,"input",15),o(),a(29,"button",16),C("click",function(){return h(r),x(t.addNewPath())}),a(30,"spk-icon"),l(31,"plus"),o()()()(),a(32,"app-toggle-card",11),k(33,12),l(34,"Filters"),v(),a(35,"p",13),l(36,"Customize your filters."),o(),a(37,"button",17),C("click",function(){return h(r),x(t.addFilter())}),l(38,"Add filter"),o(),V(39,mi,1,1,"app-filter",18,T),o(),a(41,"app-toggle-card",19),k(42,12),l(43,"Exclude"),v(),a(44,"p",13),l(45,"Choose if there\u2019s any files you want to exclude."),o(),a(46,"spk-toggle",20),l(47," Hidden files "),f(48,"input",21),o(),a(49,"spk-toggle",20),l(50," System files "),f(51,"input",22),o(),a(52,"spk-toggle",20),l(53," Temporary files "),f(54,"input",23),o(),a(55,"spk-toggle",24),C("click",function(){return h(r),x(t.toggleFilesLargerThan())}),l(56," Files larger than "),o(),d(57,di,8,0,"div",25),o()()()}e&2&&(c("formGroup",t.sourceDataForm),s(5),c("multiSelect",!0)("startingPath",t.getPath())("showFiles",!0),s(16),c("disallowToggle",!0),s(7),c("formControl",t.newPathCtrl),s(4),c("disallowToggle",!0),s(7),b(t.pathArray()),s(2),c("disallowToggle",!0),s(14),fe("active",t.filesLargerThan()),s(2),_(t.filesLargerThan()?57:-1))},dependencies:[ot,pe,Q,Y,q,ye,xe,K,se,de,it,me,ce,we,J,Z,Se,X,ke,Me,ve,dt],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-level-40)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.5rem}"],changeDetection:0})};var te=new L,ee=class n{#e=y(j);#n=y(tt);#i=y(Ie);#o=y(pt);generalForm=Ht();sourceDataForm=qt();scheduleForm=zt();destinationForm=Kt();optionsForm=Lt();isDraft=S(!1);backupId=S(null);isSubmitting=S(!1);finishedLoading=S(!1);backupDefaults=S(null);isNew=G(()=>this.backupId()==="new");selectedOptions=S([]);selectedAdvancedFormPair=S([]);destinationFormPair=S({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=G(()=>{let i=this.destinationFormPair()?.advanced??[],e=this.selectedAdvancedFormPair()??[];return i.filter(t=>e.findIndex(r=>r.name===t.name)===-1)});selectedHttpOptions=S([]);notSelectedHttpOptions=G(()=>{let i=this.httpOptions(),e=this.selectedHttpOptions()??[];return i.filter(t=>e.findIndex(r=>r.name===t.name)===-1)});sourceDataFormSignal=M(this.sourceDataForm.valueChanges);destinationFormSignal=M(this.destinationForm.valueChanges);generalFormSignal=M(this.generalForm.valueChanges);encryptionFieldSignal=M(this.generalForm.controls.encryption.valueChanges);scheduleFormSignal=M(this.scheduleForm.valueChanges);destinationOptions=G(()=>this.#n.backendModules()??[]);httpOptions=G(()=>this.#n.systemInfo()?.GenericModules?.find(i=>i.Key==="http-options")?.Options?.map(this.#t)??[]);advancedOptions=G(()=>this.#n.systemInfo()?.Options?.map(this.#t)??[]);#t(i){return{name:i.Name,type:i.Type,shortDescription:i.ShortDescription??void 0,longDescription:i.LongDescription??void 0,options:i.ValidValues}}encryptionOptions=G(()=>{let i=this.#n.systemInfo()?.EncryptionModules??[];return[wt,...i]});nonSelectedOptions=G(()=>this.advancedOptions().sort((i,e)=>i?.name&&e?.name?i?.name.localeCompare(e?.name):0).filter(i=>this.selectedOptions()?.findIndex(e=>e.name===i.name)===-1));addAdvancedFormPairByName(i,e,t){let r=this.notSelectedAdvancedFormPair().find(m=>m.name===i);r&&this.addAdvancedFormPair(r,e,t)}addHttpOptionByName(i,e,t){let r=this.notSelectedHttpOptions().find(m=>m.name===i);r&&this.addHttpOption(r,e,t)}addAdvancedFormPair(i,e,t){let r=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,m=t??i.defaultValue;this.createFormField(r,i,m),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),i])}addHttpOption(i,e,t){let r=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,m=t??i.defaultValue;this.createFormField(r,i,m),this.selectedHttpOptions.set([...this.selectedHttpOptions(),i])}removeAdvancedFormPair(i,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(i.name),this.selectedAdvancedFormPair().findIndex(r=>r.name===i.name)!==-1?this.selectedAdvancedFormPair.update(r=>(r=r.filter(m=>m.name!==i.name),r)):this.selectedHttpOptions.update(r=>(r=r.filter(m=>m.name!==i.name),r))}removeHttpOption(i,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(i.name),this.selectedHttpOptions.update(t=>(t=t.filter(r=>r.name!==i.name),t))}submit(){this.isSubmitting.set(!0);let i=this.#s(),e=this.backupId();e==="new"||!e||this.isDraft()?this.#i.postApiV1Backups({requestBody:i}).pipe(Le(()=>this.isSubmitting.set(!1))).subscribe({next:t=>{console.log("submitted res",t),this.exit()},error:t=>{console.error("submitted error",t)}}):this.#i.putApiV1BackupById({id:e,requestBody:i}).pipe(Le(()=>this.isSubmitting.set(!1))).subscribe({next:t=>{console.log("submitted res",t),this.exit()},error:t=>{console.error("submitted error",t)}})}exit(){this.#m(),this.#e.navigate(["/"])}updateFieldsFromTargetUrl(i){this.#r(),setTimeout(()=>{this.#l(i)})}#r(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.selectedHttpOptions.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(i){let e=i.Sources??"",t=i.Filters?.map(R=>`${R.Include?"":"-"}${R.Expression}`)??[],r=i.Settings?.find(R=>R.Name==="--exclude-files-attributes")?.Value??"",m=i.Settings?.find(R=>R.Name==="--skip-files-larger-than")??null,u=m?.Value.replace(/[0-9]/g,"")??null,$=m?.Value.replace(/[^0-9]/g,"")??null,B={path:[...e,...t].join("\0"),excludes:{hiddenFiles:r.includes("hidden"),systemFiles:r.includes("system"),tempFiles:r.includes("temporary"),filesLargerThan:u&&$?{size:parseInt($),unit:u.toUpperCase()}:null}};this.sourceDataForm.patchValue(B)}mapDestinationToForm(i){let e=i.TargetURL?xt(i.TargetURL):null;e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}#l(i){let e=xt(i);e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}mapGeneralToForm(i){let e=i.Settings?.find(m=>m.Name==="encryption-module"),t=e?.Value&&e.Value.length?e.Value:"",r={name:i.Name??"",description:i.Description??""};t&&t!==""&&(r.encryption=t),this.generalForm.patchValue(r)}mapScheduleToForm(i){if(!i){this.scheduleForm.patchValue({autoRun:!0});return}let e=this.#o.fromString(i.Repeat)??null,r={nextTime:this.#p(i.Time),runAgain:{repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:i.AllowedDays?.includes("mon")??!1,tue:i.AllowedDays?.includes("tue")??!1,wed:i.AllowedDays?.includes("wed")??!1,thu:i.AllowedDays?.includes("thu")??!1,fri:i.AllowedDays?.includes("fri")??!1,sat:i.AllowedDays?.includes("sat")??!1,sun:i.AllowedDays?.includes("sun")??!1}}};this.scheduleForm.patchValue(r)}mapOptionsToForms(i){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than"],t=this.advancedOptions();i.Settings?.forEach(r=>{if(r.Name==="encryption-module")return this.generalForm.controls.encryption.setValue(r.Value??"");if(!(r.Name&&e.includes(r.Name))){if(r.Name==="dblock-size"){let m=r.Value?.replace(/[^0-9]/g,""),u=r.Value?.replace(/[0-9]/g,"");return this.optionsForm.controls.remoteVolumeSize.setValue({size:m?parseInt(m):null,unit:u?u.toUpperCase():null})}if(r.Name&&r.Value){let m=t.find(u=>u.name===r.Name);if(!m)return;this.addOptionToFormGroup(m,r.Value)}}})}getCurrentTargetUrl(){return this.#a(this.destinationForm.controls.destinations)}#s(){let i=this.generalForm.value,e=this.optionsForm.value,t=this.scheduleForm.value,r=this.sourceDataForm.value,u=this.destinationForm.value.destinations?.length?this.#a(this.destinationForm.controls.destinations):[],$=null;t.runAgain?.repeatUnit&&t.runAgain?.repeatValue&&($=this.#o.toString(t.runAgain.repeatValue,t.runAgain.repeatUnit));let B=t.runAgain?.allowedDays?Object.entries(t.runAgain?.allowedDays).filter(([g,F])=>F).map(([g,F])=>g):[],R=r.path?.split("\0")??[],_t=i.encryption===""?{Name:"--no-encryption",Value:"True"}:{Name:"encryption-module",Value:i.encryption??null},gt=this.advancedOptions(),Qe=Object.entries(e.advancedOptions??{}).filter(([g,F])=>g&&F).map(([g,F])=>{let W=gt.find(z=>z.name===g);return W?.type==="Size"?{Name:g,Value:`${F.size}${F.unit.toLowerCase()}`}:W?.type==="Integer"?{Name:g,Value:F.toString()}:W?.type==="Boolean"?{Name:g,Value:F.toString()}:{Name:g,Value:F}}),Ee=[_t,...Qe],Ne=Object.entries(r.excludes??{}).filter(([g,F])=>F&&g!=="filesLargerThan").map(([g])=>g),O=r.excludes?.filesLargerThan;return Ne.length&&Ee.push({Name:"--exclude-files-attributes",Value:Ne.join(",")}),O&&O.size!==null&&O.unit!==null&&Ee.push({Name:"--skip-files-larger-than",Value:`${O.size}${O.unit}`}),{Backup:{Name:i.name,Description:i.description,TargetURL:u[0]??null,Sources:R.filter(g=>!g.startsWith("-")),Settings:Ee,Filters:R.filter(g=>g.startsWith("-")).map((g,F)=>({Order:F,Include:!1,Expression:g.slice(1)}))},Schedule:t.autoRun?{Repeat:$,Time:t.nextTime?.date?new Date(`${t.nextTime.date}T${t.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:B}:null}}#a(i){return i.controls.map(e=>mt(e.value))}#p(i){if(!i||i?.indexOf("T")===-1)return{time:i??"13:00"};let e=new Date(i),t={time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`};return i.indexOf("T")!==-1&&(t.date=e.toISOString().split("T")[0]),t}removeOptionFromFormGroup(i){let e=i.name;e&&(this.optionsForm.controls.advancedOptions.removeControl(e),this.selectedOptions.update(t=>(t=t.filter(r=>r.name!==e),t)))}addOptionToFormGroup(i,e){let t=this.optionsForm.controls.advancedOptions;this.createFormField(t,i,e??i.defaultValue),this.selectedOptions.update(r=>(r.push(i),r))}createFormField(i,e,t){if(e.type==="String"||e.type==="FileTree"||e.type==="FolderTree"||e.type==="Password"||e.type==="Enumeration"||e.type==="NonValidatedSelectableString"||e.type==="Path"){i.addControl(e.name,te.control(t));return}if(e.type==="Size"){let r=t.replace(/[0-9]/g,""),m=t.replace(/[^0-9]/g,"");i.addControl(e.name,te.group({size:te.control(m?parseInt(m):50),unit:te.control(r?r.toUpperCase():"MB")}));return}if(e.type==="Integer"){i.addControl(e.name,te.control(t?parseInt(t):0));return}if(e.type==="Boolean"){i.addControl(e.name,te.control(t==="true"));return}if(e.type==="Flags"){i.addControl(e.name,te.control(t??""));return}if(e.type==="Timespan"){i.addControl(e.name,te.control(t,[_e.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(i,e,t=!1){let r=this.destinationOptions().find(O=>O.Key===i),m=this.httpOptions();if(!r||!r.Options)return;let u=je.hasOwnProperty(i)&&je[i],$=u&&u.oauthField?u.oauthField:null,B=u&&u.customFields?u.customFields:{},R=u&&u.dynamicFields?u.dynamicFields:[],_t=u&&u.advancedFields?u.advancedFields:[],gt=u&&u.ignoredAdvancedFields?u.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:$,custom:[],dynamic:[],advanced:[]});let Qe=te.group({}),Ee=te.group({}),Ne=te.group({});B&&Object.entries(B).forEach(([O,g],F)=>{let Te=g,{formElement:W}=Te,z=Tt(Te,["formElement"]);Qe.addControl(O,W(e?.custom[O])),this.destinationFormPair.update(Pe=>(Pe.custom.push(U({order:900+F},z)),Pe))});for(let O=0;O<r.Options.length;O++){let g=r.Options[O];if(g.Deprecated)continue;let F=R.find(W=>W===g.Name||W.name===g.Name);if(F){let W=F&&typeof F!="string",z={name:g.Name,type:g.Type,shortDescription:g.ShortDescription??void 0,longDescription:g.LongDescription??void 0,options:g.ValidValues,order:900+O},Te=W?U(U({},z),F):z,Ye=e?.dynamic[g.Name]??g.DefaultValue;this.createFormField(Ee,Te,Ye),this.destinationFormPair.update(Ue=>(Ue.dynamic.push(Te),Ue))}else{if(gt.find(ne=>ne===g.Name))continue;let z=_t.find(ne=>ne===g.Name||ne.name===g.Name),Te=z&&typeof z!="string",Pe=e?.advanced[g.Name],Ye=Pe??g.DefaultValue,Ue={name:g.Name,type:g.Type,shortDescription:g.ShortDescription??void 0,longDescription:g.LongDescription??void 0,options:g.ValidValues,defaultValue:Ye,order:900+O},Ct=Te?U(U({},Ue),z):Ue;t&&Pe&&(this.createFormField(Ne,Ct,Ye),this.selectedAdvancedFormPair.update(ne=>(ne.push(Ct),ne))),this.destinationFormPair.update(ne=>(ne.advanced.push(Ct),ne))}}for(let O=0;O<m.length;O++){let g=m[O],F=e?.advanced[g.name],W=F??g.defaultValue;t&&F&&(this.createFormField(Ne,g,W),this.selectedHttpOptions.update(z=>(z.push(g),z)))}this.destinationFormPair.update(O=>({oauthField:O.oauthField,custom:O.custom.sort((g,F)=>g.order-F.order),dynamic:O.dynamic.sort((g,F)=>g.order-F.order),advanced:O.advanced.sort((g,F)=>g.order-F.order)})),this.destinationForm.controls.destinations.push(Qt({key:r.Key,customGroup:Qe,dynamicGroup:Ee,advancedGroup:Ne}))}#m(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||n)};static \u0275prov=he({token:n,factory:n.\u0275fac,providedIn:"root"})};var fi=["formRef"],_i=(n,i,e,t)=>({index:n,formView:i,formGroupName:"custom",destinationType:e,oauthField:t}),ft=n=>({$implicit:n}),gi=(n,i,e,t)=>({index:n,formView:i,formGroupName:"dynamic",destinationType:e,oauthField:t}),Ci=(n,i,e,t)=>({index:n,formView:i,formGroupName:"advanced",destinationType:e,oauthField:t}),hi=(n,i,e,t)=>({index:n,formView:i,formGroupName:"advanced",asHttpOptions:!0,destinationType:e,oauthField:t}),xi=()=>({maxWidth:"700px",width:"100%"});function yi(n,i){n&1&&(l(0," Connected "),a(1,"spk-icon"),l(2,"check"),o())}function wi(n,i){n&1&&l(0," Test destination ")}function Si(n,i){if(n&1){let e=w();a(0,"button",8),C("click",function(){h(e);let r=p();return x(r.testDestination())}),d(1,yi,3,0)(2,wi,1,0),o()}if(n&2){let e=p();fe("success",e.successfulTest()),s(),_(e.successfulTest()?1:2)}}function ki(n,i){if(n&1){let e=w();a(0,"p",14),C("click",function(){h(e);let r=p();return x(r.removeDestinationFormGroup(r.destinationCount()-1))}),l(1," Want to select another destination? "),a(2,"span",15),l(3,"Click here"),o()()}}function vi(n,i){if(n&1){let e=w();a(0,"div",16)(1,"div",17),C("click",function(){h(e);let r=p();return x(r.addDestinationFormGroup("file"))}),a(2,"h3"),l(3,"File system"),o(),a(4,"p"),l(5,"Store backups on your local file system."),o()(),a(6,"div",17),C("click",function(){h(e);let r=p();return x(r.addDestinationFormGroup("gcs"))}),a(7,"h3"),l(8,"Google Cloud Storage"),o(),a(9,"p"),l(10,"Store backups in Google Cloud Storage."),o()(),a(11,"div",17),C("click",function(){h(e);let r=p();return x(r.addDestinationFormGroup("s3"))}),a(12,"h3"),l(13,"S3 compatible bucket"),o(),a(14,"p"),l(15,"Store backups in any S3 compatible bucket."),o()(),a(16,"div",17),C("click",function(){h(e);let r=p();return x(r.addDestinationFormGroup("ssh"))}),a(17,"h3"),l(18,"SSH"),o(),a(19,"p"),l(20,"Store backups in SSH."),o()(),a(21,"div",17),C("click",function(){h(e);let r=p();return x(r.addDestinationFormGroup("googledrive"))}),a(22,"h3"),l(23,"Google Drive"),o(),a(24,"p"),l(25,"Store backups in Google Drive."),o()()(),a(26,"p"),l(27,"More destinations are coming soon."),o()}}function Fi(n,i){n&1&&Ve(0)}function Ti(n,i){if(n&1&&d(0,Fi,1,0,"ng-container",23),n&2){let e,t=i.$implicit,r=i.$index;p();let m=ae(33),u=p();c("ngTemplateOutlet",m)("ngTemplateOutletContext",be(7,ft,ze(2,_i,r,t,(e=u.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,u.destinationFormPair().oauthField)))}}function Vi(n,i){n&1&&Ve(0)}function bi(n,i){if(n&1&&d(0,Vi,1,0,"ng-container",23),n&2){let e,t=i.$implicit,r=i.$index;p();let m=ae(33),u=p();c("ngTemplateOutlet",m)("ngTemplateOutletContext",be(7,ft,ze(2,gi,r,t,(e=u.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,u.destinationFormPair().oauthField)))}}function Di(n,i){if(n&1){let e=w();a(0,"button",24),C("click",function(){let r=h(e).$implicit,m=p(2);return x(m.addAdvancedFormPair(r,0))}),l(1),o()}if(n&2){let e=i.$implicit;s(),D(" ",e.name," ")}}function Oi(n,i){n&1&&Ve(0)}function Ei(n,i){if(n&1&&d(0,Oi,1,0,"ng-container",23),n&2){let e,t=i.$implicit,r=i.$index;p();let m=ae(33),u=p();c("ngTemplateOutlet",m)("ngTemplateOutletContext",be(7,ft,ze(2,Ci,r,t,(e=u.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,u.destinationFormPair().oauthField)))}}function Ni(n,i){if(n&1){let e=w();a(0,"button",24),C("click",function(){let r=h(e).$implicit,m=p(2);return x(m.addHttpOption(r,0))}),l(1),o()}if(n&2){let e=i.$implicit;s(),D(" ",e.name," ")}}function Pi(n,i){n&1&&Ve(0)}function Ii(n,i){if(n&1&&d(0,Pi,1,0,"ng-container",23),n&2){let e,t=i.$implicit,r=i.$index;p();let m=ae(33),u=p();c("ngTemplateOutlet",m)("ngTemplateOutletContext",be(7,ft,ze(2,hi,r,t,(e=u.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,u.destinationFormPair().oauthField)))}}function Gi(n,i){if(n&1&&(a(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Mi(n,i){if(n&1&&(a(0,"app-file-tree",27)(1,"label",34),l(2),d(3,Gi,3,1,"spk-tooltip",35),o(),f(4,"input",36),o()),n&2){let e,t=p().$implicit,r=p(2);c("startingPath",r.getFormFieldValue(0,t.formGroupName,t.formView.name))("accepts",t.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),N("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),N("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),P("formControlName",t.formView.name)}}function $i(n,i){if(n&1&&(a(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Ai(n,i){if(n&1&&(a(0,"app-file-tree",28)(1,"label",34),l(2),d(3,$i,3,1,"spk-tooltip",35),o(),f(4,"input",36),o()),n&2){let e,t=p().$implicit,r=p(2);c("startingPath",r.getFormFieldValue(0,t.formGroupName,t.formView.name)),s(),N("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),N("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),P("formControlName",t.formView.name)}}function Ri(n,i){if(n&1&&(a(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Bi(n,i){n&1&&(a(0,"spk-icon",37),l(1,"link"),o())}function Ui(n,i){n&1&&(a(0,"spk-icon",37),l(1,"textbox"),o())}function Hi(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",34),l(2),d(3,Ri,3,1,"spk-tooltip",35),o(),f(4,"input",36),d(5,Bi,2,0,"spk-icon",37)(6,Ui,2,0,"spk-icon",37),o()),n&2){let e,t=p().$implicit;s(),N("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),N("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),P("formControlName",t.formView.name),s(),_(t.formView.type==="Path"?5:6)}}function Li(n,i){if(n&1){let e=w();a(0,"span",41),C("click",function(){h(e);let r=p(2).$implicit,m=p(2);return x(m.oauthStartTokenCreation(r.destinationType))}),l(1,"AuthID"),o()}}function Wi(n,i){n&1&&(a(0,"spk-icon",37),l(1,"password"),o())}function zi(n,i){if(n&1){let e=w();a(0,"spk-icon",42),C("click",function(){h(e);let r=p(2).$implicit;return x(r.formView.showPassword=!r.formView.showPassword)}),l(1," eye "),o()}}function ji(n,i){if(n&1){let e=w();a(0,"spk-icon",42),C("click",function(){h(e);let r=p(2).$implicit;return x(r.formView.showPassword=!r.formView.showPassword)}),l(1," eye-slash "),o()}}function qi(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",34),l(2),o(),f(3,"input",38),d(4,Li,2,0,"span",39)(5,Wi,2,0,"spk-icon",37)(6,zi,2,0,"spk-icon",40)(7,ji,2,0,"spk-icon",40),o()),n&2){let e,t=p().$implicit;s(),N("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),N("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),P("formControlName",t.formView.name),c("type",t.formView.showPassword?"text":"password"),s(),_(t.oauthField===t.formView.name?4:5),s(2),_(t.formView.showPassword?6:7)}}function Ki(n,i){if(n&1&&(a(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Qi(n,i){if(n&1&&(a(0,"option",45),l(1),o()),n&2){let e=i.$implicit;c("value",e),s(),E(e)}}function Yi(n,i){if(n&1&&(a(0,"spk-select")(1,"label",34),l(2),d(3,Ki,3,1,"spk-tooltip",35),o(),f(4,"input",43),k(5,44),V(6,Qi,2,2,"option",45,T),v(),o()),n&2){let e,t=p().$implicit;s(),N("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),N("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),P("formControlName",t.formView.name),s(2),b(t.formView.options)}}function Zi(n,i){if(n&1&&(a(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Ji(n,i){if(n&1&&(a(0,"option",45),l(1),o()),n&2){let e=i.$implicit;c("value",e.value),s(),bt(" ",e.key," ",e.value?"("+e.value+")":""," ")}}function Xi(n,i){if(n&1&&(a(0,"spk-select",29)(1,"label",34),l(2),d(3,Zi,3,1,"spk-tooltip",35),o(),f(4,"input",43),k(5,44),V(6,Ji,2,3,"option",45,T),v(),o()),n&2){let e,t=p().$implicit,r=p(2);c("isFreeText",!0),s(),N("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),N("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),P("formControlName",t.formView.name),s(2),b(t.formView.loadOptions(r.injector)())}}function eo(n,i){if(n&1&&(a(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function to(n,i){if(n&1&&(a(0,"option",45),l(1),o()),n&2){let e=i.$implicit;c("value",e),s(),E(e)}}function no(n,i){if(n&1&&(a(0,"div",30)(1,"label",34),l(2),d(3,eo,3,1,"spk-tooltip",35),o(),a(4,"div",46)(5,"spk-form-field"),f(6,"input",47),a(7,"spk-icon",37),l(8,"resize"),o()(),a(9,"spk-select"),f(10,"label")(11,"input",48),k(12,44),V(13,to,2,2,"option",45,T),v(),o()()()),n&2){let e,t=p().$implicit,r=p(2);c("formGroupName",t.formView.name),s(),N("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(3),N("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(7),b(r.sizeOptions())}}function io(n,i){if(n&1&&(a(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function oo(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",34),l(2),d(3,io,3,1,"spk-tooltip",35),o(),f(4,"input",49),a(5,"spk-icon",37),l(6,"numpad"),o()()),n&2){let e,t=p().$implicit;s(),N("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),N("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),P("formControlName",t.formView.name)}}function ro(n,i){if(n&1&&(a(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function ao(n,i){if(n&1&&(a(0,"spk-toggle",31)(1,"label",34),l(2),d(3,ro,3,1,"spk-tooltip",35),o(),f(4,"input",50),o()),n&2){let e,t=p().$implicit;s(),N("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),N("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),P("formControlName",t.formView.name)}}function lo(n,i){if(n&1&&(a(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function so(n,i){n&1&&(a(0,"spk-option",52),l(1,"None"),o()),n&2&&c("value","None")}function po(n,i){if(n&1&&(a(0,"spk-option",45),l(1),f(2,"spk-checkbox",53),o()),n&2){let e=p().$implicit;c("value",e),s(),D(" ",e," ")}}function mo(n,i){if(n&1&&d(0,so,2,1,"spk-option",52)(1,po,3,2,"spk-option",45),n&2){let e=i.$implicit;_(e==="None"?0:1)}}function co(n,i){if(n&1&&(a(0,"spk-select",32)(1,"label",34),l(2),d(3,lo,3,1,"spk-tooltip",35),o(),f(4,"input",51),k(5,44),V(6,mo,2,1,null,null,T),v(),o()),n&2){let e,t=p().$implicit;c("selectMultiple",!0),s(),N("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),P("formControlName",t.formView.name),s(2),b(t.formView.options)}}function uo(n,i){if(n&1&&(a(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function fo(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",34),l(2),d(3,uo,3,1,"spk-tooltip",35),o(),f(4,"input",36),o()),n&2){let e,t=p().$implicit;s(),N("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),N("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),P("formControlName",t.formView.name)}}function _o(n,i){if(n&1){let e=w();a(0,"button",54),C("click",function(){h(e);let r=p().$implicit,m=p(2);return x(m.removeFormView(r.formView,0))}),a(1,"spk-icon"),l(2,"x-circle"),o()()}}function go(n,i){if(n&1&&(a(0,"div",25),k(1,26),d(2,Mi,5,16,"app-file-tree",27)(3,Ai,5,12,"app-file-tree",28)(4,Hi,7,12,"spk-form-field")(5,qi,8,13,"spk-form-field")(6,Yi,8,11,"spk-select")(7,Xi,8,12,"spk-select",29)(8,no,15,11,"div",30)(9,oo,7,11,"spk-form-field")(10,ao,5,11,"spk-toggle",31)(11,co,8,8,"spk-select",32)(12,fo,5,11,"spk-form-field"),v(),d(13,_o,3,0,"button",33),o()),n&2){let e=i.$implicit;fe("single-field",e.formGroupName!=="advanced"),s(),c("formGroupName",e.formGroupName),s(),_(e.formView.type==="FileTree"?2:e.formView.type==="FolderTree"?3:e.formView.type==="String"||e.formView.type==="Path"?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"?12:-1),s(11),_(e.formGroupName==="advanced"?13:-1)}}function Co(n,i){if(n&1&&(k(0,9)(1,18),V(2,Ti,1,9,"ng-container",null,T),V(4,bi,1,9,"ng-container",null,T),a(6,"app-toggle-card",19),k(7,20),l(8," Advanced options "),a(9,"spk-menu")(10,"button",21),l(11," Add advanced option "),a(12,"spk-icon"),l(13,"plus"),o()(),k(14,7),V(15,Di,2,1,"button",22,T),v(),o(),v(),V(17,Ei,1,9,"ng-container",null,T),o(),a(19,"app-toggle-card",19),k(20,20),l(21," Http options "),a(22,"spk-menu")(23,"button",21),l(24," Add http option "),a(25,"spk-icon"),l(26,"plus"),o()(),k(27,7),V(28,Ni,2,1,"button",22,T),v(),o(),v(),V(30,Ii,1,9,"ng-container",null,T),o(),d(32,go,14,5,"ng-template",null,1,Je),v()()),n&2){let e=p();s(2),b(e.destinationFormPair().custom),s(2),b(e.destinationFormPair().dynamic),s(2),c("disallowToggle",!0),s(4),c("disabled",e.notSelectedAdvancedFormPair().length===0),s(5),b(e.notSelectedAdvancedFormPair()),s(2),b(e.selectedAdvancedFormPair()),s(2),c("disallowToggle",!0),s(4),c("disabled",e.notSelectedHttpOptions().length===0),s(5),b(e.notSelectedHttpOptions()),s(2),b(e.selectedHttpOptions())}}function ho(n,i){if(n&1){let e=w();a(0,"spk-dialog",55),Et("isOpenChange",function(r){h(e);let m=p();return Ot(m.targetUrlDialogOpen,r)||(m.targetUrlDialogOpen=r),x(r)}),a(1,"header",56)(2,"h2"),l(3,"Edit target URL"),o(),a(4,"spk-alert",57),l(5,"Be careful, this will overwrite everything you have in your destination."),o()(),a(6,"div",58)(7,"spk-form-field"),f(8,"textarea",59),o()(),a(9,"footer",60)(10,"button",11),C("click",function(){h(e);let r=p();return x(r.closeTargetUrlDialog(!1))}),l(11,"Cancel"),o(),a(12,"button",61),C("click",function(){h(e);let r=p();return x(r.closeTargetUrlDialog(!0))}),l(13," Override target URLc "),a(14,"spk-icon"),l(15,"swap"),o()()()()}if(n&2){let e=p();Dt("isOpen",e.targetUrlDialogOpen),c("options",Nt(3,xi)),s(8),c("formControl",e.targetUrlCtrl)}}var xo=["Bytes","KB","MB","GB","TB","PB"],ut=new L,Kt=(n={destinations:[]})=>ut.group({destinations:ut.array(n.destinations)}),Qt=({key:n,customGroup:i,dynamicGroup:e,advancedGroup:t})=>ut.group({destinationType:ut.control(n),custom:i,dynamic:e,advanced:t}),Ft=class n{#e=y(j);#n=y(le);#i=y(It);#o=y(Ie);#t=y(ee);#r=y(At);injector=y(Vt);formRef=ie.required("formRef");destinationForm=this.#t.destinationForm;destinationFormPair=this.#t.destinationFormPair;selectedAdvancedFormPair=this.#t.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#t.notSelectedAdvancedFormPair;selectedHttpOptions=this.#t.selectedHttpOptions;notSelectedHttpOptions=this.#t.notSelectedHttpOptions;destinationOptions=this.#t.destinationOptions;destinationFormSignal=this.#t.destinationFormSignal;destinationCount=G(()=>this.destinationFormSignal()?.destinations?.length??0);sizeOptions=S(xo);successfulTest=S(!1);getFormFieldValue(i,e,t){return((this.destinationForm.controls.destinations.controls?.[i]).controls?.[e]).controls[t].value}addDestinationFormGroup(i){this.#t.addDestinationFormGroup(i)}addAdvancedFormPair(i,e){this.#t.addAdvancedFormPair(i,e)}removeFormView(i,e){this.#t.removeAdvancedFormPair(i,e)}addHttpOption(i,e){this.#t.addHttpOption(i,e)}targetUrl=G(()=>this.#t.getCurrentTargetUrl()[0]);targetUrlCtrl=new nt;targetUrlInitial=S(null);targetUrlDialogOpen=S(!1);openTargetUrlDialog(){let e=this.#t.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(e),this.targetUrlInitial.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl.value,t=this.targetUrlInitial();!i||e===t||this.#t.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(i=0){let t=this.#t.getCurrentTargetUrl()[i];t&&this.#o.postApiV1RemoteoperationTest({requestBody:{path:t}}).subscribe({next:()=>{this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3)},error:r=>{let m=r.error.error.Error;if(m==="missing-folder"&&this.#r.open(De,{data:{title:"Create folder",message:"The remote destination folder does not exist, do you want to create it?"},closed:u=>{u&&this.#o.postApiV1RemoteoperationCreate({requestBody:{path:t}}).subscribe()}}),m.startsWith("incorrect-cert:")){let u=m.split("incorrect-cert:")[1];this.#r.open(De,{maxWidth:"500px",data:{title:"Trust the certificate",message:`The server is using a certificate that is not trusted.
|
|
1
|
+
import{a as Me,b as ve}from"./chunk-FDJMCHX2.js";import{a as ht,b as Bt}from"./chunk-DNHLTHLR.js";import{a as tt}from"./chunk-PT7ISA6M.js";import{b as M}from"./chunk-WFFR6X5F.js";import{a as xe,b as q,c as _e,d as K,e as se,f as nt,g as Gt,h as pe,i as ye,k as it,l as me,m as we,n as Mt,o as ce,p as Q,q as Y,r as L,s as ot,t as de}from"./chunk-2VFGTKQ3.js";import{a as Ie}from"./chunk-QAOE722P.js";import{a as Z,b as rt,d as $t,e as At,g as Se,i as at,k as J,m as lt,n as Rt,p as st,q as X,v as ke,w as Ge}from"./chunk-K3Y54FPO.js";import{H as le,X as j}from"./chunk-VN5Y4LY2.js";import{c as It}from"./chunk-RFOUEAO7.js";import{ia as et}from"./chunk-FL23VQIJ.js";import{Ab as _,Bb as T,Cb as V,Db as b,E as Le,Eb as a,Fb as o,Gb as f,Hb as k,Hc as G,Ib as v,Jb as Ve,Jc as Xe,Kb as w,R as he,Ra as s,Tb as C,Ub as p,X as y,Xb as P,Yb as I,Za as S,Zb as N,_a as ie,cc as oe,dc as re,ea as h,ec as ae,fa as x,fb as H,fc as l,gc as E,hc as D,ic as bt,ja as Vt,jc as Dt,kc as Ot,lb as d,lc as Et,oc as Nt,p as He,pc as be,qa as We,qc as Pt,ra as Ze,rc as ze,vb as c,vc as Je,xb as fe}from"./chunk-6RDPRL5W.js";import{a as U,c as Tt}from"./chunk-7CGTOI24.js";function Yt(n,i){if(n&1&&(a(0,"p"),l(1),o()),n&2){let e=p();s(),E(e._data().message)}}var Zt={title:"Are you sure?",confirmText:"Confirm",cancelText:"Cancel"},De=class n{data=Ze();_data=G(()=>U(U({},Zt),this.data()));closed=We();close(i="confirm"){this.closed.emit(i==="confirm")}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-confirm-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:10,vars:4,consts:[["header",""],["content",""],["footer",""],["spk-button","",1,"",3,"click"],["spk-button","",1,"raised","primary",3,"click"]],template:function(e,t){e&1&&(a(0,"header",0)(1,"h3"),l(2),o()(),a(3,"div",1),d(4,Yt,2,1,"p"),o(),a(5,"footer",2)(6,"button",3),C("click",function(){return t.close("cancel")}),l(7),o(),a(8,"button",4),C("click",function(){return t.close("confirm")}),l(9),o()()),e&2&&(s(2),E(t._data().title),s(2),_(t._data().message?4:-1),s(3),E(t._data().cancelText),s(2),E(t._data().confirmText))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};var pt=class n{fromString(i){if(!i)return null;let e=i.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(i,e){return`${i}${e}`}static \u0275fac=function(e){return new(e||n)};static \u0275prov=he({token:n,factory:n.\u0275fac,providedIn:"root"})};var Oe=class n{#e=y(Ie);s3Providers=M(this.getS3Config("Providers"));s3Regions=M(this.getS3Config("Regions"));s3RegionHosts=M(this.getS3Config("RegionHosts"));s3StorageClasses=M(this.getS3Config("StorageClasses"));storjSatellites=M(this.getStorjConfig("Satellites"));storjAuthenticationMethods=M(this.getStorjConfig("AuthenticationMethods"));openstackProviders=M(this.getOpenstackConfig("Providers"));openstackVersions=M(this.getOpenstackConfig("Versions"));gcsLocations=M(this.getGcsConfig("Locations"));gcsStorageClasses=M(this.getGcsConfig("StorageClasses"));getS3Config(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":i}}).pipe(He(e=>this.#n(e)))}createS3IamUser(i,e){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":i,"s3-password":e}})}createS3PolicyIAM(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:i}})}getStorjConfig(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":i}}).pipe(He(e=>this.#n(e)))}getOpenstackConfig(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":i}}).pipe(He(e=>this.#n(e)))}getGcsConfig(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":i}}).pipe(He(e=>this.#n(e)))}#n(i){return(i.Result&&typeof i.Result=="object"&&Object.entries(i.Result).map(([e,t])=>({key:e,value:t})))??[]}static \u0275fac=function(e){return new(e||n)};static \u0275prov=he({token:n,factory:n.\u0275fac,providedIn:"root"})};var Fe=new L,je={file:{customFields:{path:{type:"FolderTree",name:"path",shortDescription:"File path",longDescription:"The path to store the backup",formElement:n=>Fe.control(n??"")}}},ssh:{customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"The server to connect to",formElement:n=>Fe.control(n??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:n=>Fe.control(n??"",[_e.required,_e.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:n=>Fe.control(n??"")}},dynamicFields:["auth-username"],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:"This is a path to a private key file locally on the machine",longDescription:"This is a path to a private key file locally on the machine"}]},s3:{customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:n=>Fe.control(n??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:n=>Fe.control(n??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:n=>n.get(Oe).s3Providers},"use-ssl","auth-username","auth-password"],advancedFields:[{name:"s3-client",type:"Enumeration",options:["aws","minio"]},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:n=>n.get(Oe).s3StorageClasses}]},gcs:{oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:n=>Fe.control(n??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:n=>n.get(Oe).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:n=>n.get(Oe).gcsStorageClasses},"authid"]},googledrive:{oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:n=>Fe.control(n??"")}},dynamicFields:["authid"]}};function Ae(n,i){let e={},t={};return i.searchParams.forEach((r,m)=>{je[n].dynamicFields?.includes(m)?t[m]=decodeURIComponent(r):e[m]=decodeURIComponent(r)}),{advanced:e,dynamic:t}}function qe(n){let i=n.map(([e,t])=>`${e}=${t?encodeURIComponent(t.toString()):""}`).join("&");return i?"?"+i:""}var Re={file:{to:n=>{let i=qe([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${n.custom.path}${i}`},from:(n,i,e)=>{let t=e.indexOf("file:///")===0,r=e.split(t?"///":"//")[1].substring(0,1)+i.hostname.substring(1);return U({destinationType:n,custom:{path:`${t?"/":""}${r}${i.pathname}`}},Ae(n,i))}},ssh:{to:n=>{let i=qe([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${n.custom.server}${n.custom.port?":"+n.custom.port:""}${n.custom.path.startsWith("/")?n.custom.path:"/"+n.custom.path}${i}`},from:(n,i,e)=>U({destinationType:n,custom:{server:i.hostname,port:i.port,path:i.pathname}},Ae(n,i))},s3:{to:n=>{let i=qe([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${n.custom.bucket}${n.custom.path.startsWith("/")?n.custom.path:"/"+n.custom.path}${i}`},from:(n,i,e)=>U({destinationType:n,custom:{path:i.pathname,bucket:i.hostname}},Ae(n,i))},gcs:{to:n=>{let i=qe([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${n.custom.path}${i}`},from:(n,i,e)=>{let{advanced:t,dynamic:r}=Ae(n,i);return{destinationType:n,custom:{path:i.hostname+i.pathname},dynamic:r,advanced:t}}},googledrive:{to:n=>{let i=n.custom.path,e=qe([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${i}${e}`},from:(n,i,e)=>{let{advanced:t,dynamic:r}=Ae(n,i);return{destinationType:n,custom:{path:i.hostname+i.pathname},dynamic:r,advanced:t}}},fallbackMapper:{to:n=>"",from:(n,i,e)=>U({destinationType:n},Ae(n,i))}};function mt(n){let i=n.destinationType;return!i||!Re.hasOwnProperty(i)?Re.fallbackMapper.to(n)??"":Re[i].to(n)??""}function xt(n){let i=URL.canParse(n),e=n.split("://")[0],t="http://"+n.split("://")[1],r=new URL(t);if(!Re.hasOwnProperty(e))return Re.fallbackMapper.from(e,r);if(!i)throw new Error("Invalid target path");return Re[e].from(e,r,n)}var Ut=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,ct=class n{generate(i,e=Ut){let t;do t=this.generatePassword(i,e);while(this.calculatePasswordStrength(t)<5);return t}generatePassword(i,e=Ut){let t=this;return Array.apply(null,{length:i}).map(()=>{let r;for(;;)if(r=String.fromCharCode(t.#e()),e.test(r))return r},this).join("")}calculatePasswordStrength(i){let e=1;return i.length>=8&&e++,i.match(/[a-z]/)&&i.match(/[A-Z]/)&&e++,i.match(/\d+/)&&e++,i.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&e++,Math.min(e,5)}#e(){if(window.crypto&&window.crypto.getRandomValues){let i=new Uint8Array(1);return window.crypto.getRandomValues(i),i[0]}else if(window.msCrypto&&window.msCrypto.getRandomValues){let i=new Uint8Array(1);return window.msCrypto.getRandomValues(i),i[0]}else return Math.floor(Math.random()*256)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=he({token:n,factory:n.\u0275fac,providedIn:"root"})};var Jt=["formRef"];function Xt(n,i){if(n&1&&(a(0,"option",14),l(1),o()),n&2){let e=i.$implicit;c("value",e.Key),s(),E(e.DisplayName)}}function en(n,i){if(n&1&&f(0,"spk-progress-bar",25),n&2){let e=p(3);fe("warn",e.calculatePasswordStrength()===1)("tertiary",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),c("value",e.calculatePasswordStrength()*(100/5))}}function tn(n,i){n&1&&(a(0,"span",20),l(1,"Passwords do not match"),o())}function nn(n,i){n&1&&(a(0,"spk-icon"),l(1,"eye-slash"),o(),l(2," hide "))}function on(n,i){n&1&&(a(0,"spk-icon"),l(1,"eye"),o(),l(2," show "))}function rn(n,i){n&1&&(a(0,"spk-icon",27),l(1,"check"),o())}function an(n,i){n&1&&(a(0,"spk-icon"),l(1,"copy"),o())}function ln(n,i){if(n&1){let e=w();a(0,"button",26),C("click",function(){h(e);let r=p(3);return x(r.copyPassword())}),d(1,rn,2,0,"spk-icon",27)(2,an,2,0,"spk-icon"),l(3),o()}if(n&2){let e=p(3);s(),_(e.copiedPassword()?1:2),s(2),D(" ",e.copiedPassword()?"Copied":"Copy"," password ")}}function sn(n,i){n&1&&(a(0,"spk-alert",24),l(1," Tip: Be sure to save your password. If you loose it you will lose access to your backups. "),o())}function pn(n,i){if(n&1){let e=w();a(0,"div",15)(1,"spk-form-field")(2,"label",16),l(3," Create a password "),a(4,"sup"),l(5,"*"),o()(),f(6,"input",17),o(),d(7,en,1,9,"spk-progress-bar",18),a(8,"spk-form-field"),f(9,"input",19),d(10,tn,2,0,"span",20),o(),a(11,"div",21)(12,"button",22),C("click",function(){h(e);let r=p(2);return x(r.showPassword.set(!r.showPassword()))}),d(13,nn,3,0)(14,on,3,0),o(),a(15,"button",22),C("click",function(){h(e);let r=p(2);return x(r.generatePassword())}),a(16,"spk-icon"),l(17,"password"),o(),l(18," Generate password "),o(),d(19,ln,4,2,"button",23),o(),d(20,sn,2,0,"spk-alert",24),o()}if(n&2){let e=p(2);s(6),c("type",e.showPassword()?"text":"password"),s(),_(e.generalForm.value.password?7:-1),s(2),c("type",e.showPassword()?"text":"password"),s(),_(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?10:-1),s(3),_(e.showPassword()?13:14),s(6),_(e.showCopyPassword()?19:-1),s(),_(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?20:-1)}}function mn(n,i){if(n&1&&(a(0,"spk-select",11)(1,"label",12),l(2,"Encryption"),o(),f(3,"input",13),V(4,Xt,2,2,"option",14,T),o(),d(6,pn,21,7,"div",15)),n&2){let e=p();c("displayFn",e.displayFn()),s(4),b(e.encryptionOptions()),s(2),_(e.encryptionFieldSignal()!==""?6:-1)}}function cn(n,i){if(n&1&&(a(0,"button",9),l(1," Continue "),a(2,"spk-icon"),l(3,"arrow-right"),o()()),n&2){let e=p();c("disabled",e.generalForm.invalid)}}function dn(n,i){if(n&1&&(a(0,"spk-tooltip",10)(1,"button",9),l(2," Continue "),a(3,"spk-icon"),l(4,"arrow-right"),o()()()),n&2){let e=p();c("disabled",!(e.showCopyPassword()&&!e.copiedPassword())),s(),c("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var Be=new L,Ht=(n={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>Be.group({name:Be.control(n.name,[_e.required]),description:Be.control(n.description),encryption:Be.control(n.encryption,[Bt()]),password:Be.control(n.password,[ht(i=>i?.value.encryption!=="",[_e.required])]),repeatPassword:Be.control(n.repeatPassword,[ht(i=>i?.value.encryption!=="",[_e.required])])}),wt={Key:"",DisplayName:"None"},yt=class n{#e=y(j);#n=y(le);#i=y(ct);#o=y(ee);#t=y(tt);formRef=ie.required("formRef");generalForm=this.#o.generalForm;generalFormSignal=this.#o.generalFormSignal;encryptionFieldSignal=this.#o.encryptionFieldSignal;encryptionOptions=this.#o.encryptionOptions;isNew=this.#o.isNew;showPassword=S(!1);copiedPassword=S(!1);showCopyPassword=S(!1);encryptionEffect=Xe(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});calculatePasswordStrength=G(()=>{let e=this.generalFormSignal()?.password??"";return this.#i.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#o.exit()}async copyPassword(){let i=this.generalForm.controls.password.value;await this.#r(i??""),this.copiedPassword.set(!0)}async#r(i){try{await navigator.clipboard.writeText(i)}catch{try{let t=document.createElement("textarea");t.value=i,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}catch(t){console.error("Failed to copy text: ",t)}}}displayFn(){let i=this.#t.systemInfo()?.EncryptionModules??[];return e=>{let t=[wt,...i].find(r=>r.Key===e);return t?`${t.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let i=this.#i.generate(16);this.generalForm.controls.password.setValue(i),this.generalForm.controls.repeatPassword.setValue(i),this.showCopyPassword.set(!0)}next(){this.#e.navigate(["destination"],{relativeTo:this.#n.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-general"]],viewQuery:function(e,t){e&1&&oe(t.formRef,Jt,5),e&2&&re()},decls:22,vars:3,consts:[["formRef",""],["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],["for","backupName"],["type","text","tabindex","1","placeholder","Your backup name","formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder","Your backup description","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"],[3,"displayFn"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder","Encryption","formControlName","encryption"],[3,"value"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder","Password","formControlName","password",3,"type"],[1,"raised",3,"warn","tertiary","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder","Repeat password","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 r=w();a(0,"form",1,0),C("submit",function(){return h(r),x(t.next())}),a(2,"h3",2),l(3,"General backup settings"),o(),a(4,"spk-form-field")(5,"label",3),l(6," Backup name "),a(7,"sup"),l(8,"*"),o()(),f(9,"input",4),o(),a(10,"spk-form-field")(11,"label",5),l(12,"Backup description"),o(),f(13,"textarea",6),o(),d(14,mn,7,2),a(15,"div",7)(16,"button",8),C("click",function(){return h(r),x(t.exit())}),a(17,"spk-icon"),l(18,"arrow-left"),o(),l(19," Exit "),o(),d(20,cn,4,1,"button",9)(21,dn,5,2,"spk-tooltip",10),o()()}e&2&&(c("formGroup",t.generalForm),s(14),_(t.isNew()?14:-1),s(6),_(t.encryptionFieldSignal()===""?20:21))},dependencies:[de,pe,Q,Y,q,K,se,me,ce,J,X,Se,Z,Rt,rt,Ge],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}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--warn-500)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}"],changeDetection:0})};var un=["formRef"],fn=(n,i)=>({index:n,formView:i,formGroupName:"advancedOptions",destinationType:null,oauthField:null}),_n=n=>({$implicit:n});function gn(n,i){if(n&1&&(a(0,"option",11),l(1),o()),n&2){let e=i.$implicit;c("value",e),s(),E(e)}}function Cn(n,i){if(n&1&&(a(0,"option",11),l(1),o()),n&2){let e=i.$implicit;c("value",e.value),s(),E(e.name)}}function hn(n,i){if(n&1){let e=w();a(0,"button",23,2),C("click",function(){let r=h(e).$implicit,m=p();return x(m.addNewOption(r))}),l(2),o()}if(n&2){let e=i.$implicit;s(2),E(e.name)}}function xn(n,i){n&1&&Ve(0)}function yn(n,i){if(n&1&&d(0,xn,1,0,"ng-container",24),n&2){let e=i.$implicit,t=i.$index;p();let r=ae(39);c("ngTemplateOutlet",r)("ngTemplateOutletContext",be(5,_n,Pt(2,fn,t,e)))}}function wn(n,i){if(n&1&&(a(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Sn(n,i){if(n&1&&(a(0,"app-file-tree",27)(1,"label",33),l(2),d(3,wn,3,1,"spk-tooltip",34),o(),f(4,"input",35),o()),n&2){let e,t=p().$implicit,r=p();c("startingPath",r.getFormFieldValue(0,t.formGroupName,t.formView.name))("accepts",t.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),I("for","destination-",t.formGroupName,"-",t.index,""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),I("id","destination-",t.formGroupName,"-",t.index,""),P("formControlName",t.formView.name)}}function kn(n,i){if(n&1&&(a(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function vn(n,i){if(n&1&&(a(0,"app-file-tree",28)(1,"label",33),l(2),d(3,kn,3,1,"spk-tooltip",34),o(),f(4,"input",35),o()),n&2){let e,t=p().$implicit,r=p();c("startingPath",r.getFormFieldValue(0,t.formGroupName,t.formView.name)),s(),I("for","destination-",t.formGroupName,"-",t.index,""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),I("id","destination-",t.formGroupName,"-",t.index,""),P("formControlName",t.formView.name)}}function Fn(n,i){if(n&1&&(a(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Tn(n,i){n&1&&(a(0,"spk-icon",36),l(1,"link"),o())}function Vn(n,i){n&1&&(a(0,"spk-icon",36),l(1,"textbox"),o())}function bn(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",33),l(2),d(3,Fn,3,1,"spk-tooltip",34),o(),f(4,"input",35),d(5,Tn,2,0,"spk-icon",36)(6,Vn,2,0,"spk-icon",36),o()),n&2){let e,t=p().$implicit;s(),I("for","destination-",t.formGroupName,"-",t.index,""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),I("id","destination-",t.formGroupName,"-",t.index,""),P("formControlName",t.formView.name),s(),_(t.formView.type==="Path"?5:6)}}function Dn(n,i){if(n&1){let e=w();a(0,"span",40),C("click",function(){h(e);let r=p(2).$implicit,m=p();return x(m.oauthStartTokenCreation(r.formViewType))}),l(1,"AuthID"),o()}}function On(n,i){n&1&&(a(0,"spk-icon",36),l(1,"password"),o())}function En(n,i){if(n&1){let e=w();a(0,"spk-icon",41),C("click",function(){h(e);let r=p(2).$implicit;return x(r.formView.showPassword=!r.formView.showPassword)}),l(1," eye "),o()}}function Nn(n,i){if(n&1){let e=w();a(0,"spk-icon",41),C("click",function(){h(e);let r=p(2).$implicit;return x(r.formView.showPassword=!r.formView.showPassword)}),l(1," eye-slash "),o()}}function Pn(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",33),l(2),o(),f(3,"input",37),d(4,Dn,2,0,"span",38)(5,On,2,0,"spk-icon",36)(6,En,2,0,"spk-icon",39)(7,Nn,2,0,"spk-icon",39),o()),n&2){let e,t=p().$implicit;s(),I("for","destination-",t.formGroupName,"-",t.index,""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),I("id","destination-",t.formGroupName,"-",t.index,""),P("formControlName",t.formView.name),c("type",t.formView.showPassword?"text":"password"),s(),_(t.oauthField===t.formView.name?4:5),s(2),_(t.formView.showPassword?6:7)}}function In(n,i){if(n&1&&(a(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Gn(n,i){if(n&1&&(a(0,"option",11),l(1),o()),n&2){let e=i.$implicit;c("value",e),s(),E(e)}}function Mn(n,i){if(n&1&&(a(0,"spk-select")(1,"label",33),l(2),d(3,In,3,1,"spk-tooltip",34),o(),f(4,"input",42),k(5,10),V(6,Gn,2,2,"option",11,T),v(),o()),n&2){let e,t=p().$implicit;s(),I("for","destination-",t.formGroupName,"-",t.index,""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),I("id","destination-",t.formGroupName,"-",t.index,""),P("formControlName",t.formView.name),s(2),b(t.formView.options)}}function $n(n,i){if(n&1&&(a(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function An(n,i){if(n&1&&(a(0,"option",11),l(1),o()),n&2){let e=i.$implicit;c("value",e),s(),E(e)}}function Rn(n,i){if(n&1&&(a(0,"div",29)(1,"label",33),l(2),d(3,$n,3,1,"spk-tooltip",34),o(),a(4,"div",43)(5,"spk-form-field"),f(6,"input",44),a(7,"spk-icon",36),l(8,"resize"),o()(),a(9,"spk-select"),f(10,"label")(11,"input",45),k(12,10),V(13,An,2,2,"option",11,T),v(),o()()()),n&2){let e,t=p().$implicit,r=p();c("formGroupName",t.formView.name),s(),I("for","destination-",t.formGroupName,"-",t.index,""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(3),I("id","destination-",t.formGroupName,"-",t.index,""),s(7),b(r.sizeOptions())}}function Bn(n,i){if(n&1&&(a(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Un(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",33),l(2),d(3,Bn,3,1,"spk-tooltip",34),o(),f(4,"input",46),a(5,"spk-icon",36),l(6,"numpad"),o()()),n&2){let e,t=p().$implicit;s(),I("for","destination-",t.formGroupName,"-",t.index,""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),I("id","destination-",t.formGroupName,"-",t.index,""),P("formControlName",t.formView.name)}}function Hn(n,i){if(n&1&&(a(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Ln(n,i){if(n&1&&(a(0,"spk-toggle",30)(1,"label",33),l(2),d(3,Hn,3,1,"spk-tooltip",34),o(),f(4,"input",47),o()),n&2){let e,t=p().$implicit;s(),I("for","destination-",t.formGroupName,"-",t.index,""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),I("id","destination-",t.formGroupName,"-",t.index,""),P("formControlName",t.formView.name)}}function Wn(n,i){if(n&1&&(a(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function zn(n,i){n&1&&(a(0,"spk-option",49),l(1,"None"),o()),n&2&&c("value","None")}function jn(n,i){if(n&1&&(a(0,"spk-option",11),l(1),f(2,"spk-checkbox",50),o()),n&2){let e=p().$implicit;c("value",e),s(),D(" ",e," ")}}function qn(n,i){if(n&1&&d(0,zn,2,1,"spk-option",49)(1,jn,3,2,"spk-option",11),n&2){let e=i.$implicit;_(e==="None"?0:1)}}function Kn(n,i){if(n&1&&(a(0,"spk-select",31)(1,"label",33),l(2),d(3,Wn,3,1,"spk-tooltip",34),o(),f(4,"input",48),k(5,10),V(6,qn,2,1,null,null,T),v(),o()),n&2){let e,t=p().$implicit;c("selectMultiple",!0),s(),I("for","destination-",t.formGroupName,"-",t.index,""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),P("formControlName",t.formView.name),s(2),b(t.formView.options)}}function Qn(n,i){if(n&1&&(a(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Yn(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",33),l(2),d(3,Qn,3,1,"spk-tooltip",34),o(),f(4,"input",35),o()),n&2){let e,t=p().$implicit;s(),I("for","destination-",t.formGroupName,"-",t.index,""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),I("id","destination-",t.formGroupName,"-",t.index,""),P("formControlName",t.formView.name)}}function Zn(n,i){if(n&1){let e=w();a(0,"div",25),k(1,26),d(2,Sn,5,14,"app-file-tree",27)(3,vn,5,10,"app-file-tree",28)(4,bn,7,10,"spk-form-field")(5,Pn,8,11,"spk-form-field")(6,Mn,8,9,"spk-select")(7,Rn,15,9,"div",29)(8,Un,7,9,"spk-form-field")(9,Ln,5,9,"spk-toggle",30)(10,Kn,8,7,"spk-select",31)(11,Yn,5,9,"spk-form-field"),v(),a(12,"button",32),C("click",function(){let r=h(e).$implicit,m=p();return x(m.removeFormView(r.formView,0))}),a(13,"spk-icon"),l(14,"x-circle"),o()()()}if(n&2){let e=i.$implicit;s(),c("formGroupName",e.formGroupName),s(),_(e.formView.type==="FileTree"?2:e.formView.type==="FolderTree"?3:e.formView.type==="String"||e.formView.type==="Path"?4:e.formView.type==="Password"?5:e.formView.type==="Enumeration"?6:e.formView.type==="Size"?7:e.formView.type==="Integer"?8:e.formView.type==="Boolean"?9:e.formView.type==="Flags"?10:e.formView.type==="Timespan"?11:-1)}}var ge=new L,Jn=["Bytes","KB","MB","GB","TB","PB"],Xn=[{value:"",name:"Keep all backups"},{value:"time",name:"Delete backups that are older than"},{value:"versions",name:"Keep a specific number of backups"},{value:"smart",name:"Smart backup retention"},{value:"custom",name:"Custom backup retention"}],Lt=(n={remoteVolumeSize:50,size:"MB",backupRetention:"",advancedOptions:[]})=>ge.group({remoteVolumeSize:ge.group({size:ge.control(n.remoteVolumeSize),unit:ge.control(n.size)}),backupRetention:ge.control(n.backupRetention),advancedOptions:ge.group({})}),mr=(n,i)=>ge.group({name:ge.control(n),value:ge.control(i)}),St=class n{#e=y(ee);#n=y(j);#i=y(le);formRef=ie.required("formRef");optionsForm=this.#e.optionsForm;selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;sizeOptions=S(Jn);rentationOptions=S(Xn);oauthStartTokenCreation(i){}getFormFieldValue(i,e,t){return this.optionsForm.controls.advancedOptions.controls[t].value}removeFormView(i,e){this.#e.removeOptionFromFormGroup(i)}addNewOption(i){this.#e.addOptionToFormGroup(i)}retentionOptionDisplayFn(){let i=this.rentationOptions();return e=>{let t=i.find(r=>r.value===e);return t?t.name:""}}displayFn(){let i=this.#e.advancedOptions();return e=>{let t=i.find(r=>r.name===e);return t?`${t.name}`:""}}goBack(){this.#n.navigate(["schedule"],{relativeTo:this.#i.parent})}submit(){this.#e.submit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-options"]],viewQuery:function(e,t){e&1&&oe(t.formRef,un,5),e&2&&re()},decls:49,vars:5,consts:[["formRef",""],["fieldTemplate",""],["option",""],[3,"submit","formGroup"],[1,"title-30"],[1,"remote-volume-wrap"],["formGroupName","remoteVolumeSize",1,"row-inputs"],["for","size"],["type","number","id","size","formControlName","size"],["type","text","placeholder","Select an option...","formControlName","unit"],["options",""],[3,"value"],["href","#",1,"spk-primary"],[3,"displayFn"],["type","text","formControlName","backupRetention"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small"],["menu",""],["type","button"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["type","button",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["type","search",3,"id","formControlName"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["type","search","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],["type","text","id","text",3,"formControlName"],["deselect","",3,"value"],[1,"raised","primary"]],template:function(e,t){if(e&1){let r=w();a(0,"form",3,0),C("submit",function(){return h(r),x(t.submit())}),a(2,"h3",4),l(3,"Options"),o(),a(4,"div",5)(5,"div",6)(6,"spk-form-field")(7,"label",7),l(8,"Remote volume size"),o(),f(9,"input",8),o(),a(10,"spk-select"),f(11,"input",9),k(12,10),V(13,gn,2,2,"option",11,T),v(),o()(),a(15,"p"),l(16," The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. "),a(17,"a",12),l(18,"Read more"),o()()(),a(19,"spk-select",13)(20,"label",7),l(21,"Backup retention"),o(),f(22,"input",14),V(23,Cn,2,2,"option",11,T),o(),a(25,"app-toggle-card",15),k(26,16),l(27," Advanced options "),a(28,"spk-menu")(29,"button",17),l(30," Add advanced option "),a(31,"spk-icon"),l(32,"plus"),o()(),k(33,18),V(34,hn,3,1,"button",19,T),v(),o(),v(),V(36,yn,1,7,"ng-container",null,T),o(),d(38,Zn,15,2,"ng-template",null,1,Je),a(40,"div",20)(41,"button",21),C("click",function(){return h(r),x(t.goBack())}),a(42,"spk-icon"),l(43,"arrow-left"),o(),l(44," Go back "),o(),a(45,"button",22)(46,"spk-icon"),l(47,"arrow-right"),o(),l(48," Submit "),o()()()}e&2&&(c("formGroup",t.optionsForm),s(13),b(t.sizeOptions()),s(6),c("displayFn",t.retentionOptionDisplayFn()),s(4),b(t.rentationOptions()),s(2),c("disallowToggle",!0),s(9),b(t.nonSelectedOptions()),s(2),b(t.selectedOptions()),s(9),fe("loader",t.isSubmitting()))},dependencies:[de,pe,Q,Y,q,ye,xe,K,se,me,ce,we,et,lt,X,Se,Z,J,ke,at,st,Ge,Me,ve],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}.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}.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 ei=["formRef"];function ti(n,i){if(n&1&&(a(0,"option",24),l(1),o()),n&2){let e=i.$implicit;c("value",e.key),s(),E(e.label)}}function ni(n,i){if(n&1){let e=w();a(0,"div",11)(1,"spk-form-field")(2,"label",12),l(3,"Next time"),o(),a(4,"input",13,1),C("focus",function(){h(e);let r=ae(5);return x(r.showPicker())}),o(),a(6,"spk-icon",14),l(7,"clock"),o()(),a(8,"spk-form-field"),f(9,"label",15),a(10,"input",16,2),C("focus",function(){h(e);let r=ae(11);return x(r.showPicker())}),o(),a(12,"spk-icon",14),l(13,"calendar"),o()()(),k(14,17),a(15,"div",18)(16,"spk-form-field")(17,"label",19),l(18,"Run again every"),o(),f(19,"input",20),o(),a(20,"spk-select",21),f(21,"input",22),k(22,23),V(23,ti,2,2,"option",24,T),v(),o()(),a(25,"app-toggle-card",25),k(26,26),l(27,"Allowed days"),v(),a(28,"div",27)(29,"spk-toggle",6),l(30," Monday "),f(31,"input",28),o(),a(32,"spk-toggle",6),l(33," Tuesday "),f(34,"input",29),o(),a(35,"spk-toggle",6),l(36," Wednesday "),f(37,"input",30),o(),a(38,"spk-toggle",6),l(39," Thursday "),f(40,"input",31),o(),a(41,"spk-toggle",6),l(42," Friday "),f(43,"input",32),o(),a(44,"spk-toggle",6),l(45," Saturday "),f(46,"input",33),o(),a(47,"spk-toggle",6),l(48," Sunday "),f(49,"input",34),o()()(),v()}if(n&2){let e=p();s(20),c("displayFn",e.displayFn),s(3),b(e.unitOptions),s(2),c("disallowToggle",!0)}}var A=new L,Wt=[{key:"s",label:"Seconds"},{key:"m",label:"Minutes"},{key:"h",label:"Hours"},{key:"D",label:"Days"},{key:"W",label:"Weeks"},{key:"M",label:"Months"},{key:"Y",label:"Years"}],zt=(n={autoRun:!1,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}}})=>A.group({autoRun:A.control(n.autoRun),nextTime:A.group({time:A.control(n.nextTime.time),date:A.control(n.nextTime.date)}),runAgain:A.group({repeatValue:A.control(n.runAgain.repeatValue),repeatUnit:A.control(n.runAgain.repeatUnit),allowedDays:A.group({mon:A.control(n.runAgain.allowedDays.mon),tue:A.control(n.runAgain.allowedDays.tue),wed:A.control(n.runAgain.allowedDays.wed),thu:A.control(n.runAgain.allowedDays.thu),fri:A.control(n.runAgain.allowedDays.fri),sat:A.control(n.runAgain.allowedDays.sat),sun:A.control(n.runAgain.allowedDays.sun)})})}),kt=class n{#e=y(ee);#n=y(j);#i=y(le);formRef=ie.required("formRef");scheduleForm=this.#e.scheduleForm;scheduleFormSignal=this.#e.scheduleFormSignal;unitOptions=Wt;displayFn(i){let e=Wt.find(t=>t.key===i);return e?`${e.label}`:""}goBack(){this.#n.navigate(["source-data"],{relativeTo:this.#i.parent})}next(){this.#n.navigate(["options"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-schedule"]],viewQuery:function(e,t){e&1&&oe(t.formRef,ei,5),e&2&&re()},decls:20,vars:2,consts:[["formRef",""],["timeRef",""],["dateRef",""],[3,"submit","formGroup"],[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox","formControlName","autoRun"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["formGroupName","nextTime",1,"row-inputs"],["for","time"],["type","time","id","time","formControlName","time",3,"focus"],["suffix",""],["for","date"],["type","date","id","date","formControlName","date",3,"focus"],["formGroupName","runAgain"],[1,"row-inputs"],["for","repeatValue"],["type","number","id","repeatValue","formControlName","repeatValue"],[3,"displayFn"],["type","text","id","repeatUnit","formControlName","repeatUnit"],["options",""],[3,"value"],["formGroupName","allowedDays",3,"disallowToggle"],["title",""],[1,"days-wrap"],["type","checkbox","formControlName","mon"],["type","checkbox","formControlName","tue"],["type","checkbox","formControlName","wed"],["type","checkbox","formControlName","thu"],["type","checkbox","formControlName","fri"],["type","checkbox","formControlName","sat"],["type","checkbox","formControlName","sun"]],template:function(e,t){if(e&1){let r=w();a(0,"form",3,0),C("submit",function(){return h(r),x(t.next())}),a(2,"h3",4),l(3,"Schedule"),o(),a(4,"div",5)(5,"spk-toggle",6),l(6," Automatically run backups "),f(7,"input",7),o(),a(8,"p"),l(9,"If a date was missed, the job will run as soon as possible."),o()(),d(10,ni,50,2),a(11,"div",8)(12,"button",9),C("click",function(){return h(r),x(t.goBack())}),a(13,"spk-icon"),l(14,"arrow-left"),o(),l(15," Go back "),o(),a(16,"button",10)(17,"spk-icon"),l(18,"arrow-right"),o(),l(19," Continue "),o()()()}if(e&2){let r;c("formGroup",t.scheduleForm),s(10),_((r=t.scheduleFormSignal())!=null&&r.autoRun?10:-1)}},dependencies:[de,pe,Q,Y,q,ye,xe,K,se,me,ce,we,J,X,ke,Z,Se,ve],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}.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 ii(n,i){if(n&1&&(a(0,"option",3),l(1),o()),n&2){let e=i.$implicit;c("value",e.value),s(),E(e.key)}}function oi(n,i){if(n&1&&(a(0,"option",3),l(1),o()),n&2){let e=i.$implicit;c("value",e.value),s(),E(e.key)}}function ri(n,i){if(n&1){let e=w();a(0,"spk-select",0)(1,"input",6),C("ngModelChange",function(r){h(e);let m=p(2);return x(m.updateStateExpression(r))}),o(),V(2,oi,2,2,"option",3,T),o()}if(n&2){let e,t=p(2);c("hideClearButton",!0)("displayFn",t.displayFn),s(),c("ngModel",(e=t.pathState())==null?null:e.expression),s(),b(t.fileGroupOptions())}}function ai(n,i){if(n&1){let e=w();a(0,"spk-form-field")(1,"input",6),C("ngModelChange",function(r){h(e);let m=p(2);return x(m.updateStateExpression(r))}),o()()}if(n&2){let e,t=p(2);s(),c("ngModel",(e=t.pathState())==null?null:e.expression)}}function li(n,i){if(n&1){let e=w();a(0,"spk-select",0)(1,"input",1),C("ngModelChange",function(r){h(e);let m=p();return x(m.updateStateType(r))}),o(),k(2,2),V(3,ii,2,2,"option",3,T),v(),o(),d(5,ri,4,3,"spk-select",0)(6,ai,2,1,"spk-form-field"),a(7,"div",4),C("click",function(){h(e);let r=p();return x(r.removeFilter())}),a(8,"spk-icon",5),l(9,"x-circle"),o()()}if(n&2){let e,t,r=p();c("hideClearButton",!0)("displayFn",r.displayFn),s(),c("ngModel",(e=r.pathState())==null?null:e.type),s(2),b(r.expressionOptions()),s(2),_(((t=r.pathState())==null?null:t.type)==="-FileGroup"||((t=r.pathState())==null?null:t.type)==="+FileGroup"?5:6)}}var jt=[{key:"Excludes folders where name contains",value:"-FolderNameIncludes"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileNameIncludes"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"}],si=[{key:"Applications",value:"Applications"},{key:"CacheFiles",value:"Cache Files"},{key:"TemporaryFiles",value:"Temporary Files"},{key:"OperatingSystem",value:"Operating System"},{key:"SystemFiles",value:"System Files"},{key:"DefaultExcludes",value:"Standard Excludes"}],dt=class n{path=Ze.required();pathChange=We();remove=We();expressionOptions=S(jt);fileGroupOptions=S(si);pathState=S(null);pathEffect=Xe(()=>{let i=this.path(),e=i.slice(1),t=i.startsWith("-")?"-":"+";return e.startsWith("/")&&e.endsWith("/")?this.pathState.set({type:`${t}Folder`,path:e,expression:e}):e.startsWith("*")&&e.endsWith("*/")?this.pathState.set({type:`${t}FolderNameIncludes`,path:e,expression:e.slice(1,-2)}):e.startsWith("[.*")&&e.endsWith("[^\\/]*]")?this.pathState.set({type:`${t}FileNameIncludes`,path:e,expression:e.slice(3,-7)}):e.startsWith("{")&&e.endsWith("}")?this.pathState.set({type:`${t}FileGroup`,path:e,expression:e.slice(1,-1)}):e.startsWith("[")&&e.endsWith("]")?this.pathState.set({type:`${t}Regex`,path:e,expression:e.slice(1,-1)}):e.startsWith("*.")?this.pathState.set({type:`${t}Extension`,path:e,expression:e.slice(2)}):this.pathState.set({type:`${t}Expression`,path:e,expression:e})});updateStateType(i){this.pathState.update(e=>(e.type=i,e.path=this.#e(e),e)),this.pathChange.emit(this.pathState().path)}updateStateExpression(i){this.pathState.update(e=>(e.expression=i,e.path=this.#e(e),e)),this.pathChange.emit(this.pathState().path)}#e(i){let e=i.type.slice(0,1),t=i.type.slice(1);if(t==="Folder"){let r=i.expression.endsWith("/"),m=i.expression.startsWith("/");return r&&m?`${e}${i.expression}`:r?`${e}${i.expression}/`:m?`${e}/${i.expression}`:`${e}/${i.expression}/`}return t==="FolderNameIncludes"?`${e}*${i.expression}*/`:t==="FileNameIncludes"?`${e}[.*${i.expression}[^\\/]*]`:t==="FileGroup"?`${e}{${i.expression}}`:t==="Regex"?`${e}[${i.expression}]`:t==="Extension"?`${e}*.${i.expression}`:`${e}${i.expression}`}removeFilter(){this.remove.emit()}displayFn(i){let e=jt.find(t=>t.value===i);return e?e.key:""}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-filter"]],inputs:{path:[1,"path"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:1,vars:1,consts:[[3,"hideClearButton","displayFn"],["type","text","placeholder","Select an option...",3,"ngModelChange","ngModel"],["options",""],[3,"value"],[1,"filter-removal",3,"click"],[1,"spk-primary"],["type","text",3,"ngModelChange","ngModel"]],template:function(e,t){e&1&&d(0,li,10,4),e&2&&_(t.pathState()?0:-1)},dependencies:[ot,Q,Y,q,K,Gt,X,Z,J],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] spk-select[_ngcontent-%COMP%]{--miw: initial}[_nghost-%COMP%] .filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var pi=["formRef"];function mi(n,i){if(n&1){let e=w();a(0,"app-filter",26),C("pathChange",function(r){let m=h(e).$index,u=p();return x(u.patchPathAt(r,m))})("remove",function(){let r=h(e).$index,m=p();return x(m.removePathAt(r))}),o()}if(n&2){let e=i.$implicit;c("path",e)}}function ci(n,i){if(n&1&&(a(0,"option",30),l(1),o()),n&2){let e=i.$implicit;c("value",e),s(),E(e)}}function di(n,i){if(n&1&&(a(0,"div",25)(1,"spk-form-field"),f(2,"input",27),o(),a(3,"spk-select"),f(4,"input",28),k(5,29),V(6,ci,2,2,"option",30,T),v(),o()()),n&2){let e=p();s(6),b(e.sizeOptions())}}var Ce=new L,ui=["Bytes","KB","MB","GB","TB","PB"],qt=(n={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>Ce.group({path:Ce.control(n.path),excludes:Ce.group({hidden:Ce.control(n.excludes.hidden),system:Ce.control(n.excludes.system),temporary:Ce.control(n.excludes.temporary),filesLargerThan:Ce.group({size:Ce.control(null),unit:Ce.control(null)})})}),vt=class n{#e=y(ee);#n=y(j);#i=y(le);formRef=ie.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new nt("");filesLargerThan=G(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=S(ui);pathSignal=M(this.sourceDataForm.controls.path.valueChanges);pathArray=G(()=>this.pathSignal()?.split("\0").filter(i=>i.startsWith("-")||i.startsWith("+"))??[]);addFilter(i="-*"){let e=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${e}\0${i}`)}patchPathAt(i,e){let r=this.sourceDataForm.controls.path.value.split("\0").filter(u=>!u.startsWith("-")&&!u.startsWith("+")).join("\0"),m=this.pathArray().map((u,$)=>$===e?`${i}`:`${u}`).join("\0");this.sourceDataForm.controls.path.setValue(`${r}\0${m}`)}removePathAt(i){let t=this.sourceDataForm.controls.path.value.split("\0").filter(m=>!m.startsWith("-")&&!m.startsWith("+")).join("\0"),r=this.pathArray().filter((m,u)=>u!==i).join("\0");this.sourceDataForm.controls.path.setValue(`${t}\0${r}`)}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 i=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${i}\0${this.newPathCtrl.value}`),this.newPathCtrl.setValue("")}goBack(){this.#n.navigate(["destination"],{relativeTo:this.#i.parent})}next(){this.#n.navigate(["schedule"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-source-data"]],viewQuery:function(e,t){e&1&&oe(t.formRef,pi,5),e&2&&re()},decls:58,vars:11,consts:[["formRef",""],[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder","Path","formControlName","path"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"row-inputs"],["type","text","placeholder","Add a direct path",3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],[3,"path"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder","Hidden files","formControlName","hidden"],["type","checkbox","placeholder","System files","formControlName","system"],["type","checkbox","placeholder","Temporary files","formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[3,"pathChange","remove","path"],["type","number","formControlName","size"],["type","text","formControlName","unit","placeholder","Select an option..."],["options",""],[3,"value"]],template:function(e,t){if(e&1){let r=w();a(0,"form",1,0),C("submit",function(){return h(r),x(t.next())}),a(2,"div",2)(3,"h3",3),l(4,"Source Data"),o(),a(5,"app-file-tree",4)(6,"label",5),l(7,"Folder path"),o(),f(8,"input",6),o(),a(9,"div",7)(10,"button",8),C("click",function(){return h(r),x(t.goBack())}),a(11,"spk-icon"),l(12,"arrow-left"),o(),l(13," Go back "),o(),a(14,"button",9)(15,"spk-icon"),l(16,"arrow-right"),o(),l(17," Continue "),o()()(),a(18,"div",10)(19,"h3",3),l(20,"Source Data"),o(),a(21,"app-toggle-card",11),k(22,12),l(23,"Add Path"),v(),a(24,"p",13),l(25,"Add a path directly from your machine."),o(),a(26,"div",14)(27,"spk-form-field"),f(28,"input",15),o(),a(29,"button",16),C("click",function(){return h(r),x(t.addNewPath())}),a(30,"spk-icon"),l(31,"plus"),o()()()(),a(32,"app-toggle-card",11),k(33,12),l(34,"Filters"),v(),a(35,"p",13),l(36,"Customize your filters."),o(),a(37,"button",17),C("click",function(){return h(r),x(t.addFilter())}),l(38,"Add filter"),o(),V(39,mi,1,1,"app-filter",18,T),o(),a(41,"app-toggle-card",19),k(42,12),l(43,"Exclude"),v(),a(44,"p",13),l(45,"Choose if there\u2019s any files you want to exclude."),o(),a(46,"spk-toggle",20),l(47," Hidden files "),f(48,"input",21),o(),a(49,"spk-toggle",20),l(50," System files "),f(51,"input",22),o(),a(52,"spk-toggle",20),l(53," Temporary files "),f(54,"input",23),o(),a(55,"spk-toggle",24),C("click",function(){return h(r),x(t.toggleFilesLargerThan())}),l(56," Files larger than "),o(),d(57,di,8,0,"div",25),o()()()}e&2&&(c("formGroup",t.sourceDataForm),s(5),c("multiSelect",!0)("startingPath",t.getPath())("showFiles",!0),s(16),c("disallowToggle",!0),s(7),c("formControl",t.newPathCtrl),s(4),c("disallowToggle",!0),s(7),b(t.pathArray()),s(2),c("disallowToggle",!0),s(14),fe("active",t.filesLargerThan()),s(2),_(t.filesLargerThan()?57:-1))},dependencies:[ot,pe,Q,Y,q,ye,xe,K,se,de,it,me,ce,we,J,Z,Se,X,ke,Me,ve,dt],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-level-40)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.5rem}"],changeDetection:0})};var te=new L,ee=class n{#e=y(j);#n=y(tt);#i=y(Ie);#o=y(pt);generalForm=Ht();sourceDataForm=qt();scheduleForm=zt();destinationForm=Kt();optionsForm=Lt();isDraft=S(!1);backupId=S(null);isSubmitting=S(!1);finishedLoading=S(!1);backupDefaults=S(null);isNew=G(()=>this.backupId()==="new");selectedOptions=S([]);selectedAdvancedFormPair=S([]);destinationFormPair=S({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=G(()=>{let i=this.destinationFormPair()?.advanced??[],e=this.selectedAdvancedFormPair()??[];return i.filter(t=>e.findIndex(r=>r.name===t.name)===-1)});selectedHttpOptions=S([]);notSelectedHttpOptions=G(()=>{let i=this.httpOptions(),e=this.selectedHttpOptions()??[];return i.filter(t=>e.findIndex(r=>r.name===t.name)===-1)});sourceDataFormSignal=M(this.sourceDataForm.valueChanges);destinationFormSignal=M(this.destinationForm.valueChanges);generalFormSignal=M(this.generalForm.valueChanges);encryptionFieldSignal=M(this.generalForm.controls.encryption.valueChanges);scheduleFormSignal=M(this.scheduleForm.valueChanges);destinationOptions=G(()=>this.#n.backendModules()??[]);httpOptions=G(()=>this.#n.systemInfo()?.GenericModules?.find(i=>i.Key==="http-options")?.Options?.map(this.#t)??[]);advancedOptions=G(()=>this.#n.systemInfo()?.Options?.map(this.#t)??[]);#t(i){return{name:i.Name,type:i.Type,shortDescription:i.ShortDescription??void 0,longDescription:i.LongDescription??void 0,options:i.ValidValues}}encryptionOptions=G(()=>{let i=this.#n.systemInfo()?.EncryptionModules??[];return[wt,...i]});nonSelectedOptions=G(()=>this.advancedOptions().sort((i,e)=>i?.name&&e?.name?i?.name.localeCompare(e?.name):0).filter(i=>this.selectedOptions()?.findIndex(e=>e.name===i.name)===-1));addAdvancedFormPairByName(i,e,t){let r=this.notSelectedAdvancedFormPair().find(m=>m.name===i);r&&this.addAdvancedFormPair(r,e,t)}addHttpOptionByName(i,e,t){let r=this.notSelectedHttpOptions().find(m=>m.name===i);r&&this.addHttpOption(r,e,t)}addAdvancedFormPair(i,e,t){let r=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,m=t??i.defaultValue;this.createFormField(r,i,m),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),i])}addHttpOption(i,e,t){let r=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,m=t??i.defaultValue;this.createFormField(r,i,m),this.selectedHttpOptions.set([...this.selectedHttpOptions(),i])}removeAdvancedFormPair(i,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(i.name),this.selectedAdvancedFormPair().findIndex(r=>r.name===i.name)!==-1?this.selectedAdvancedFormPair.update(r=>(r=r.filter(m=>m.name!==i.name),r)):this.selectedHttpOptions.update(r=>(r=r.filter(m=>m.name!==i.name),r))}removeHttpOption(i,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(i.name),this.selectedHttpOptions.update(t=>(t=t.filter(r=>r.name!==i.name),t))}submit(){this.isSubmitting.set(!0);let i=this.#s(),e=this.backupId();e==="new"||!e||this.isDraft()?this.#i.postApiV1Backups({requestBody:i}).pipe(Le(()=>this.isSubmitting.set(!1))).subscribe({next:t=>{console.log("submitted res",t),this.exit()},error:t=>{console.error("submitted error",t)}}):this.#i.putApiV1BackupById({id:e,requestBody:i}).pipe(Le(()=>this.isSubmitting.set(!1))).subscribe({next:t=>{console.log("submitted res",t),this.exit()},error:t=>{console.error("submitted error",t)}})}exit(){this.#m(),this.#e.navigate(["/"])}updateFieldsFromTargetUrl(i){this.#r(),setTimeout(()=>{this.#l(i)})}#r(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.selectedHttpOptions.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(i){let e=i.Sources??"",t=i.Filters?.map(R=>`${R.Include?"":"-"}${R.Expression}`)??[],r=i.Settings?.find(R=>R.Name==="--exclude-files-attributes")?.Value??"",m=i.Settings?.find(R=>R.Name==="--skip-files-larger-than")??null,u=m?.Value.replace(/[0-9]/g,"")??null,$=m?.Value.replace(/[^0-9]/g,"")??null,B={path:[...e,...t].join("\0"),excludes:{hiddenFiles:r.includes("hidden"),systemFiles:r.includes("system"),tempFiles:r.includes("temporary"),filesLargerThan:u&&$?{size:parseInt($),unit:u.toUpperCase()}:null}};this.sourceDataForm.patchValue(B)}mapDestinationToForm(i){let e=i.TargetURL?xt(i.TargetURL):null;e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}#l(i){let e=xt(i);e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}mapGeneralToForm(i){let e=i.Settings?.find(m=>m.Name==="encryption-module"),t=e?.Value&&e.Value.length?e.Value:"",r={name:i.Name??"",description:i.Description??""};t&&t!==""&&(r.encryption=t),this.generalForm.patchValue(r)}mapScheduleToForm(i){if(!i){this.scheduleForm.patchValue({autoRun:!0});return}let e=this.#o.fromString(i.Repeat)??null,r={nextTime:this.#p(i.Time),runAgain:{repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:i.AllowedDays?.includes("mon")??!1,tue:i.AllowedDays?.includes("tue")??!1,wed:i.AllowedDays?.includes("wed")??!1,thu:i.AllowedDays?.includes("thu")??!1,fri:i.AllowedDays?.includes("fri")??!1,sat:i.AllowedDays?.includes("sat")??!1,sun:i.AllowedDays?.includes("sun")??!1}}};this.scheduleForm.patchValue(r)}mapOptionsToForms(i){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than"],t=this.advancedOptions();i.Settings?.forEach(r=>{if(r.Name==="encryption-module")return this.generalForm.controls.encryption.setValue(r.Value??"");if(!(r.Name&&e.includes(r.Name))){if(r.Name==="dblock-size"){let m=r.Value?.replace(/[^0-9]/g,""),u=r.Value?.replace(/[0-9]/g,"");return this.optionsForm.controls.remoteVolumeSize.setValue({size:m?parseInt(m):null,unit:u?u.toUpperCase():null})}if(r.Name&&r.Value){let m=t.find(u=>u.name===r.Name);if(!m)return;this.addOptionToFormGroup(m,r.Value)}}})}getCurrentTargetUrl(){return this.#a(this.destinationForm.controls.destinations)}#s(){let i=this.generalForm.value,e=this.optionsForm.value,t=this.scheduleForm.value,r=this.sourceDataForm.value,u=this.destinationForm.value.destinations?.length?this.#a(this.destinationForm.controls.destinations):[],$=null;t.runAgain?.repeatUnit&&t.runAgain?.repeatValue&&($=this.#o.toString(t.runAgain.repeatValue,t.runAgain.repeatUnit));let B=t.runAgain?.allowedDays?Object.entries(t.runAgain?.allowedDays).filter(([g,F])=>F).map(([g,F])=>g):[],R=r.path?.split("\0")??[],_t=i.encryption===""?{Name:"--no-encryption",Value:"True"}:{Name:"encryption-module",Value:i.encryption??null},gt=this.advancedOptions(),Qe=Object.entries(e.advancedOptions??{}).filter(([g,F])=>g&&F).map(([g,F])=>{let W=gt.find(z=>z.name===g);return W?.type==="Size"?{Name:g,Value:`${F.size}${F.unit.toLowerCase()}`}:W?.type==="Integer"?{Name:g,Value:F.toString()}:W?.type==="Boolean"?{Name:g,Value:F.toString()}:{Name:g,Value:F}}),Ee=[_t,...Qe],Ne=Object.entries(r.excludes??{}).filter(([g,F])=>F&&g!=="filesLargerThan").map(([g])=>g),O=r.excludes?.filesLargerThan;return Ne.length&&Ee.push({Name:"--exclude-files-attributes",Value:Ne.join(",")}),O&&O.size!==null&&O.unit!==null&&Ee.push({Name:"--skip-files-larger-than",Value:`${O.size}${O.unit}`}),{Backup:{Name:i.name,Description:i.description,TargetURL:u[0]??null,Sources:R.filter(g=>!g.startsWith("-")),Settings:Ee,Filters:R.filter(g=>g.startsWith("-")).map((g,F)=>({Order:F,Include:!1,Expression:g.slice(1)}))},Schedule:t.autoRun?{Repeat:$,Time:t.nextTime?.date?new Date(`${t.nextTime.date}T${t.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:B}:null}}#a(i){return i.controls.map(e=>mt(e.value))}#p(i){if(!i||i?.indexOf("T")===-1)return{time:i??"13:00"};let e=new Date(i),t={time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`};return i.indexOf("T")!==-1&&(t.date=e.toISOString().split("T")[0]),t}removeOptionFromFormGroup(i){let e=i.name;e&&(this.optionsForm.controls.advancedOptions.removeControl(e),this.selectedOptions.update(t=>(t=t.filter(r=>r.name!==e),t)))}addOptionToFormGroup(i,e){let t=this.optionsForm.controls.advancedOptions;this.createFormField(t,i,e??i.defaultValue),this.selectedOptions.update(r=>(r.push(i),r))}createFormField(i,e,t){if(e.type==="String"||e.type==="FileTree"||e.type==="FolderTree"||e.type==="Password"||e.type==="Enumeration"||e.type==="NonValidatedSelectableString"||e.type==="Path"){i.addControl(e.name,te.control(t));return}if(e.type==="Size"){let r=t.replace(/[0-9]/g,""),m=t.replace(/[^0-9]/g,"");i.addControl(e.name,te.group({size:te.control(m?parseInt(m):50),unit:te.control(r?r.toUpperCase():"MB")}));return}if(e.type==="Integer"){i.addControl(e.name,te.control(t?parseInt(t):0));return}if(e.type==="Boolean"){i.addControl(e.name,te.control(t==="true"));return}if(e.type==="Flags"){i.addControl(e.name,te.control(t??""));return}if(e.type==="Timespan"){i.addControl(e.name,te.control(t,[_e.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(i,e,t=!1){let r=this.destinationOptions().find(O=>O.Key===i),m=this.httpOptions();if(!r||!r.Options)return;let u=je.hasOwnProperty(i)&&je[i],$=u&&u.oauthField?u.oauthField:null,B=u&&u.customFields?u.customFields:{},R=u&&u.dynamicFields?u.dynamicFields:[],_t=u&&u.advancedFields?u.advancedFields:[],gt=u&&u.ignoredAdvancedFields?u.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:$,custom:[],dynamic:[],advanced:[]});let Qe=te.group({}),Ee=te.group({}),Ne=te.group({});B&&Object.entries(B).forEach(([O,g],F)=>{let Te=g,{formElement:W}=Te,z=Tt(Te,["formElement"]);Qe.addControl(O,W(e?.custom[O])),this.destinationFormPair.update(Pe=>(Pe.custom.push(U({order:900+F},z)),Pe))});for(let O=0;O<r.Options.length;O++){let g=r.Options[O];if(g.Deprecated)continue;let F=R.find(W=>W===g.Name||W.name===g.Name);if(F){let W=F&&typeof F!="string",z={name:g.Name,type:g.Type,shortDescription:g.ShortDescription??void 0,longDescription:g.LongDescription??void 0,options:g.ValidValues,order:900+O},Te=W?U(U({},z),F):z,Ye=e?.dynamic[g.Name]??g.DefaultValue;this.createFormField(Ee,Te,Ye),this.destinationFormPair.update(Ue=>(Ue.dynamic.push(Te),Ue))}else{if(gt.find(ne=>ne===g.Name))continue;let z=_t.find(ne=>ne===g.Name||ne.name===g.Name),Te=z&&typeof z!="string",Pe=e?.advanced[g.Name],Ye=Pe??g.DefaultValue,Ue={name:g.Name,type:g.Type,shortDescription:g.ShortDescription??void 0,longDescription:g.LongDescription??void 0,options:g.ValidValues,defaultValue:Ye,order:900+O},Ct=Te?U(U({},Ue),z):Ue;t&&Pe&&(this.createFormField(Ne,Ct,Ye),this.selectedAdvancedFormPair.update(ne=>(ne.push(Ct),ne))),this.destinationFormPair.update(ne=>(ne.advanced.push(Ct),ne))}}for(let O=0;O<m.length;O++){let g=m[O],F=e?.advanced[g.name],W=F??g.defaultValue;t&&F&&(this.createFormField(Ne,g,W),this.selectedHttpOptions.update(z=>(z.push(g),z)))}this.destinationFormPair.update(O=>({oauthField:O.oauthField,custom:O.custom.sort((g,F)=>g.order-F.order),dynamic:O.dynamic.sort((g,F)=>g.order-F.order),advanced:O.advanced.sort((g,F)=>g.order-F.order)})),this.destinationForm.controls.destinations.push(Qt({key:r.Key,customGroup:Qe,dynamicGroup:Ee,advancedGroup:Ne}))}#m(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||n)};static \u0275prov=he({token:n,factory:n.\u0275fac,providedIn:"root"})};var fi=["formRef"],_i=(n,i,e,t)=>({index:n,formView:i,formGroupName:"custom",destinationType:e,oauthField:t}),ft=n=>({$implicit:n}),gi=(n,i,e,t)=>({index:n,formView:i,formGroupName:"dynamic",destinationType:e,oauthField:t}),Ci=(n,i,e,t)=>({index:n,formView:i,formGroupName:"advanced",destinationType:e,oauthField:t}),hi=(n,i,e,t)=>({index:n,formView:i,formGroupName:"advanced",asHttpOptions:!0,destinationType:e,oauthField:t}),xi=()=>({maxWidth:"700px",width:"100%"});function yi(n,i){n&1&&(l(0," Connected "),a(1,"spk-icon"),l(2,"check"),o())}function wi(n,i){n&1&&l(0," Test destination ")}function Si(n,i){if(n&1){let e=w();a(0,"button",8),C("click",function(){h(e);let r=p();return x(r.testDestination())}),d(1,yi,3,0)(2,wi,1,0),o()}if(n&2){let e=p();fe("success",e.successfulTest()),s(),_(e.successfulTest()?1:2)}}function ki(n,i){if(n&1){let e=w();a(0,"p",14),C("click",function(){h(e);let r=p();return x(r.removeDestinationFormGroup(r.destinationCount()-1))}),l(1," Want to select another destination? "),a(2,"span",15),l(3,"Click here"),o()()}}function vi(n,i){if(n&1){let e=w();a(0,"div",16)(1,"div",17),C("click",function(){h(e);let r=p();return x(r.addDestinationFormGroup("file"))}),a(2,"h3"),l(3,"File system"),o(),a(4,"p"),l(5,"Store backups on your local file system."),o()(),a(6,"div",17),C("click",function(){h(e);let r=p();return x(r.addDestinationFormGroup("gcs"))}),a(7,"h3"),l(8,"Google Cloud Storage"),o(),a(9,"p"),l(10,"Store backups in Google Cloud Storage."),o()(),a(11,"div",17),C("click",function(){h(e);let r=p();return x(r.addDestinationFormGroup("s3"))}),a(12,"h3"),l(13,"S3 compatible bucket"),o(),a(14,"p"),l(15,"Store backups in any S3 compatible bucket."),o()(),a(16,"div",17),C("click",function(){h(e);let r=p();return x(r.addDestinationFormGroup("ssh"))}),a(17,"h3"),l(18,"SSH"),o(),a(19,"p"),l(20,"Store backups in SSH."),o()(),a(21,"div",17),C("click",function(){h(e);let r=p();return x(r.addDestinationFormGroup("googledrive"))}),a(22,"h3"),l(23,"Google Drive"),o(),a(24,"p"),l(25,"Store backups in Google Drive."),o()()(),a(26,"p"),l(27,"More destinations are coming soon."),o()}}function Fi(n,i){n&1&&Ve(0)}function Ti(n,i){if(n&1&&d(0,Fi,1,0,"ng-container",23),n&2){let e,t=i.$implicit,r=i.$index;p();let m=ae(33),u=p();c("ngTemplateOutlet",m)("ngTemplateOutletContext",be(7,ft,ze(2,_i,r,t,(e=u.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,u.destinationFormPair().oauthField)))}}function Vi(n,i){n&1&&Ve(0)}function bi(n,i){if(n&1&&d(0,Vi,1,0,"ng-container",23),n&2){let e,t=i.$implicit,r=i.$index;p();let m=ae(33),u=p();c("ngTemplateOutlet",m)("ngTemplateOutletContext",be(7,ft,ze(2,gi,r,t,(e=u.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,u.destinationFormPair().oauthField)))}}function Di(n,i){if(n&1){let e=w();a(0,"button",24),C("click",function(){let r=h(e).$implicit,m=p(2);return x(m.addAdvancedFormPair(r,0))}),l(1),o()}if(n&2){let e=i.$implicit;s(),D(" ",e.name," ")}}function Oi(n,i){n&1&&Ve(0)}function Ei(n,i){if(n&1&&d(0,Oi,1,0,"ng-container",23),n&2){let e,t=i.$implicit,r=i.$index;p();let m=ae(33),u=p();c("ngTemplateOutlet",m)("ngTemplateOutletContext",be(7,ft,ze(2,Ci,r,t,(e=u.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,u.destinationFormPair().oauthField)))}}function Ni(n,i){if(n&1){let e=w();a(0,"button",24),C("click",function(){let r=h(e).$implicit,m=p(2);return x(m.addHttpOption(r,0))}),l(1),o()}if(n&2){let e=i.$implicit;s(),D(" ",e.name," ")}}function Pi(n,i){n&1&&Ve(0)}function Ii(n,i){if(n&1&&d(0,Pi,1,0,"ng-container",23),n&2){let e,t=i.$implicit,r=i.$index;p();let m=ae(33),u=p();c("ngTemplateOutlet",m)("ngTemplateOutletContext",be(7,ft,ze(2,hi,r,t,(e=u.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,u.destinationFormPair().oauthField)))}}function Gi(n,i){if(n&1&&(a(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Mi(n,i){if(n&1&&(a(0,"app-file-tree",27)(1,"label",34),l(2),d(3,Gi,3,1,"spk-tooltip",35),o(),f(4,"input",36),o()),n&2){let e,t=p().$implicit,r=p(2);c("startingPath",r.getFormFieldValue(0,t.formGroupName,t.formView.name))("accepts",t.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),N("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),N("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),P("formControlName",t.formView.name)}}function $i(n,i){if(n&1&&(a(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Ai(n,i){if(n&1&&(a(0,"app-file-tree",28)(1,"label",34),l(2),d(3,$i,3,1,"spk-tooltip",35),o(),f(4,"input",36),o()),n&2){let e,t=p().$implicit,r=p(2);c("startingPath",r.getFormFieldValue(0,t.formGroupName,t.formView.name)),s(),N("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),N("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),P("formControlName",t.formView.name)}}function Ri(n,i){if(n&1&&(a(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Bi(n,i){n&1&&(a(0,"spk-icon",37),l(1,"link"),o())}function Ui(n,i){n&1&&(a(0,"spk-icon",37),l(1,"textbox"),o())}function Hi(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",34),l(2),d(3,Ri,3,1,"spk-tooltip",35),o(),f(4,"input",36),d(5,Bi,2,0,"spk-icon",37)(6,Ui,2,0,"spk-icon",37),o()),n&2){let e,t=p().$implicit;s(),N("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),N("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),P("formControlName",t.formView.name),s(),_(t.formView.type==="Path"?5:6)}}function Li(n,i){if(n&1){let e=w();a(0,"span",41),C("click",function(){h(e);let r=p(2).$implicit,m=p(2);return x(m.oauthStartTokenCreation(r.destinationType))}),l(1,"AuthID"),o()}}function Wi(n,i){n&1&&(a(0,"spk-icon",37),l(1,"password"),o())}function zi(n,i){if(n&1){let e=w();a(0,"spk-icon",42),C("click",function(){h(e);let r=p(2).$implicit;return x(r.formView.showPassword=!r.formView.showPassword)}),l(1," eye "),o()}}function ji(n,i){if(n&1){let e=w();a(0,"spk-icon",42),C("click",function(){h(e);let r=p(2).$implicit;return x(r.formView.showPassword=!r.formView.showPassword)}),l(1," eye-slash "),o()}}function qi(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",34),l(2),o(),f(3,"input",38),d(4,Li,2,0,"span",39)(5,Wi,2,0,"spk-icon",37)(6,zi,2,0,"spk-icon",40)(7,ji,2,0,"spk-icon",40),o()),n&2){let e,t=p().$implicit;s(),N("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),N("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),P("formControlName",t.formView.name),c("type",t.formView.showPassword?"text":"password"),s(),_(t.oauthField===t.formView.name?4:5),s(2),_(t.formView.showPassword?6:7)}}function Ki(n,i){if(n&1&&(a(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Qi(n,i){if(n&1&&(a(0,"option",45),l(1),o()),n&2){let e=i.$implicit;c("value",e),s(),E(e)}}function Yi(n,i){if(n&1&&(a(0,"spk-select")(1,"label",34),l(2),d(3,Ki,3,1,"spk-tooltip",35),o(),f(4,"input",43),k(5,44),V(6,Qi,2,2,"option",45,T),v(),o()),n&2){let e,t=p().$implicit;s(),N("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),N("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),P("formControlName",t.formView.name),s(2),b(t.formView.options)}}function Zi(n,i){if(n&1&&(a(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Ji(n,i){if(n&1&&(a(0,"option",45),l(1),o()),n&2){let e=i.$implicit;c("value",e.value),s(),bt(" ",e.key," ",e.value?"("+e.value+")":""," ")}}function Xi(n,i){if(n&1&&(a(0,"spk-select",29)(1,"label",34),l(2),d(3,Zi,3,1,"spk-tooltip",35),o(),f(4,"input",43),k(5,44),V(6,Ji,2,3,"option",45,T),v(),o()),n&2){let e,t=p().$implicit,r=p(2);c("isFreeText",!0),s(),N("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),N("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),P("formControlName",t.formView.name),s(2),b(t.formView.loadOptions(r.injector)())}}function eo(n,i){if(n&1&&(a(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function to(n,i){if(n&1&&(a(0,"option",45),l(1),o()),n&2){let e=i.$implicit;c("value",e),s(),E(e)}}function no(n,i){if(n&1&&(a(0,"div",30)(1,"label",34),l(2),d(3,eo,3,1,"spk-tooltip",35),o(),a(4,"div",46)(5,"spk-form-field"),f(6,"input",47),a(7,"spk-icon",37),l(8,"resize"),o()(),a(9,"spk-select"),f(10,"label")(11,"input",48),k(12,44),V(13,to,2,2,"option",45,T),v(),o()()()),n&2){let e,t=p().$implicit,r=p(2);c("formGroupName",t.formView.name),s(),N("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(3),N("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(7),b(r.sizeOptions())}}function io(n,i){if(n&1&&(a(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function oo(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",34),l(2),d(3,io,3,1,"spk-tooltip",35),o(),f(4,"input",49),a(5,"spk-icon",37),l(6,"numpad"),o()()),n&2){let e,t=p().$implicit;s(),N("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),N("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),P("formControlName",t.formView.name)}}function ro(n,i){if(n&1&&(a(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function ao(n,i){if(n&1&&(a(0,"spk-toggle",31)(1,"label",34),l(2),d(3,ro,3,1,"spk-tooltip",35),o(),f(4,"input",50),o()),n&2){let e,t=p().$implicit;s(),N("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),N("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),P("formControlName",t.formView.name)}}function lo(n,i){if(n&1&&(a(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function so(n,i){n&1&&(a(0,"spk-option",52),l(1,"None"),o()),n&2&&c("value","None")}function po(n,i){if(n&1&&(a(0,"spk-option",45),l(1),f(2,"spk-checkbox",53),o()),n&2){let e=p().$implicit;c("value",e),s(),D(" ",e," ")}}function mo(n,i){if(n&1&&d(0,so,2,1,"spk-option",52)(1,po,3,2,"spk-option",45),n&2){let e=i.$implicit;_(e==="None"?0:1)}}function co(n,i){if(n&1&&(a(0,"spk-select",32)(1,"label",34),l(2),d(3,lo,3,1,"spk-tooltip",35),o(),f(4,"input",51),k(5,44),V(6,mo,2,1,null,null,T),v(),o()),n&2){let e,t=p().$implicit;c("selectMultiple",!0),s(),N("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),P("formControlName",t.formView.name),s(2),b(t.formView.options)}}function uo(n,i){if(n&1&&(a(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),n&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function fo(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",34),l(2),d(3,uo,3,1,"spk-tooltip",35),o(),f(4,"input",36),o()),n&2){let e,t=p().$implicit;s(),N("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),D(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),_(t.formView.longDescription?3:-1),s(),N("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),P("formControlName",t.formView.name)}}function _o(n,i){if(n&1){let e=w();a(0,"button",54),C("click",function(){h(e);let r=p().$implicit,m=p(2);return x(m.removeFormView(r.formView,0))}),a(1,"spk-icon"),l(2,"x-circle"),o()()}}function go(n,i){if(n&1&&(a(0,"div",25),k(1,26),d(2,Mi,5,16,"app-file-tree",27)(3,Ai,5,12,"app-file-tree",28)(4,Hi,7,12,"spk-form-field")(5,qi,8,13,"spk-form-field")(6,Yi,8,11,"spk-select")(7,Xi,8,12,"spk-select",29)(8,no,15,11,"div",30)(9,oo,7,11,"spk-form-field")(10,ao,5,11,"spk-toggle",31)(11,co,8,8,"spk-select",32)(12,fo,5,11,"spk-form-field"),v(),d(13,_o,3,0,"button",33),o()),n&2){let e=i.$implicit;fe("single-field",e.formGroupName!=="advanced"),s(),c("formGroupName",e.formGroupName),s(),_(e.formView.type==="FileTree"?2:e.formView.type==="FolderTree"?3:e.formView.type==="String"||e.formView.type==="Path"?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"?12:-1),s(11),_(e.formGroupName==="advanced"?13:-1)}}function Co(n,i){if(n&1&&(k(0,9)(1,18),V(2,Ti,1,9,"ng-container",null,T),V(4,bi,1,9,"ng-container",null,T),a(6,"app-toggle-card",19),k(7,20),l(8," Advanced options "),a(9,"spk-menu")(10,"button",21),l(11," Add advanced option "),a(12,"spk-icon"),l(13,"plus"),o()(),k(14,7),V(15,Di,2,1,"button",22,T),v(),o(),v(),V(17,Ei,1,9,"ng-container",null,T),o(),a(19,"app-toggle-card",19),k(20,20),l(21," Http options "),a(22,"spk-menu")(23,"button",21),l(24," Add http option "),a(25,"spk-icon"),l(26,"plus"),o()(),k(27,7),V(28,Ni,2,1,"button",22,T),v(),o(),v(),V(30,Ii,1,9,"ng-container",null,T),o(),d(32,go,14,5,"ng-template",null,1,Je),v()()),n&2){let e=p();s(2),b(e.destinationFormPair().custom),s(2),b(e.destinationFormPair().dynamic),s(2),c("disallowToggle",!0),s(4),c("disabled",e.notSelectedAdvancedFormPair().length===0),s(5),b(e.notSelectedAdvancedFormPair()),s(2),b(e.selectedAdvancedFormPair()),s(2),c("disallowToggle",!0),s(4),c("disabled",e.notSelectedHttpOptions().length===0),s(5),b(e.notSelectedHttpOptions()),s(2),b(e.selectedHttpOptions())}}function ho(n,i){if(n&1){let e=w();a(0,"spk-dialog",55),Et("isOpenChange",function(r){h(e);let m=p();return Ot(m.targetUrlDialogOpen,r)||(m.targetUrlDialogOpen=r),x(r)}),a(1,"header",56)(2,"h2"),l(3,"Edit target URL"),o(),a(4,"spk-alert",57),l(5,"Be careful, this will overwrite everything you have in your destination."),o()(),a(6,"div",58)(7,"spk-form-field"),f(8,"textarea",59),o()(),a(9,"footer",60)(10,"button",11),C("click",function(){h(e);let r=p();return x(r.closeTargetUrlDialog(!1))}),l(11,"Cancel"),o(),a(12,"button",61),C("click",function(){h(e);let r=p();return x(r.closeTargetUrlDialog(!0))}),l(13," Override target URLc "),a(14,"spk-icon"),l(15,"swap"),o()()()()}if(n&2){let e=p();Dt("isOpen",e.targetUrlDialogOpen),c("options",Nt(3,xi)),s(8),c("formControl",e.targetUrlCtrl)}}var xo=["Bytes","KB","MB","GB","TB","PB"],ut=new L,Kt=(n={destinations:[]})=>ut.group({destinations:ut.array(n.destinations)}),Qt=({key:n,customGroup:i,dynamicGroup:e,advancedGroup:t})=>ut.group({destinationType:ut.control(n),custom:i,dynamic:e,advanced:t}),Ft=class n{#e=y(j);#n=y(le);#i=y(It);#o=y(Ie);#t=y(ee);#r=y(At);injector=y(Vt);formRef=ie.required("formRef");destinationForm=this.#t.destinationForm;destinationFormPair=this.#t.destinationFormPair;selectedAdvancedFormPair=this.#t.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#t.notSelectedAdvancedFormPair;selectedHttpOptions=this.#t.selectedHttpOptions;notSelectedHttpOptions=this.#t.notSelectedHttpOptions;destinationOptions=this.#t.destinationOptions;destinationFormSignal=this.#t.destinationFormSignal;destinationCount=G(()=>this.destinationFormSignal()?.destinations?.length??0);sizeOptions=S(xo);successfulTest=S(!1);getFormFieldValue(i,e,t){return((this.destinationForm.controls.destinations.controls?.[i]).controls?.[e]).controls[t].value}addDestinationFormGroup(i){this.#t.addDestinationFormGroup(i)}addAdvancedFormPair(i,e){this.#t.addAdvancedFormPair(i,e)}removeFormView(i,e){this.#t.removeAdvancedFormPair(i,e)}addHttpOption(i,e){this.#t.addHttpOption(i,e)}targetUrl=G(()=>this.#t.getCurrentTargetUrl()[0]);targetUrlCtrl=new nt;targetUrlInitial=S(null);targetUrlDialogOpen=S(!1);openTargetUrlDialog(){let e=this.#t.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(e),this.targetUrlInitial.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl.value,t=this.targetUrlInitial();!i||e===t||this.#t.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(i=0){let t=this.#t.getCurrentTargetUrl()[i];t&&this.#o.postApiV1RemoteoperationTest({requestBody:{path:t}}).subscribe({next:()=>{this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3)},error:r=>{let m=r.error.error.Error;if(m==="missing-folder"&&this.#r.open(De,{data:{title:"Create folder",message:"The remote destination folder does not exist, do you want to create it?"},closed:u=>{u&&this.#o.postApiV1RemoteoperationCreate({requestBody:{path:t}}).subscribe()}}),m.startsWith("incorrect-cert:")){let u=m.split("incorrect-cert:")[1];this.#r.open(De,{maxWidth:"500px",data:{title:"Trust the certificate",message:`The server is using a certificate that is not trusted.
|
|
2
2
|
If this is a self-signed certificate, you can choose to trust this certificate.
|
|
3
3
|
The server reported the certificate hash: ${u}`,confirmText:"Trust the certificate",cancelText:"Cancel"},closed:$=>{$&&this.#t.addHttpOptionByName("accept-specified-ssl-hash",u)}})}if(m.startsWith("incorrect-host-key:")){let u=m.split('incorrect-host-key:"')[1].split('",')[0],$=m.split('accepted-host-key:"')[1].split('",')[0];$?this.#r.open(De,{maxWidth:"500px",data:{title:"The host key has changed",message:`The host key has changed, please check with the server administrator if this is correct,
|
|
4
4
|
otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as se}from"./chunk-GBWXFIBZ.js";import{a as $}from"./chunk-TLFDZKKI.js";import{b as L}from"./chunk-ZVT4YXH5.js";import{a as le}from"./chunk-T6ENXWPD.js";import{b as q,d as z,e as W,h as j,j as H,l as J,m as K,o as Q,p as X,q as Y,r as Z,s as ee,t as te}from"./chunk-6TFXXYVK.js";import"./chunk-ZAREJJZA.js";import{a as ae}from"./chunk-LUAN4O53.js";import"./chunk-2SYB6ABM.js";import{a as G}from"./chunk-BVTTY2FQ.js";import{g as ne,k as ie,o as oe,q as re}from"./chunk-QL753AWG.js";import"./chunk-4Y76KESB.js";import"./chunk-DESW2TCQ.js";import"./chunk-AIQQJSGP.js";import{Ab as d,Bb as x,Cb as T,Db as R,Dc as A,Eb as n,Fb as o,Fc as B,Gb as p,Hb as I,Ib as D,K as v,Kb as h,Oa as U,Qb as m,Ra as s,Rb as c,Ub as N,X as y,Za as S,c as P,cc as r,dc as k,ea as C,ec as b,fa as _,fb as F,lb as E,p as V,vb as u,xb as w}from"./chunk-RJDP2FPE.js";import"./chunk-7CGTOI24.js";function ce(a,e){if(a&1){let t=h();n(0,"spk-form-field",30),p(1,"input",31),o(),n(2,"button",32),m("click",function(){C(t);let l=c(2);return _(l.beginRemoteRegistration())}),r(3," Register for remote control "),o()}}function ue(a,e){if(a&1&&(n(0,"div",28)(1,"label"),r(2,"Machine is now registered, open this link to add it to your account:"),o(),n(3,"a",33),r(4),o()()),a&2){let t=c(2);s(3),N("href",t.remoteControlClaimUrl(),U),s(),k(t.remoteControlClaimUrl())}}function de(a,e){a&1&&(n(0,"div",28)(1,"label"),r(2,"Registering, please wait..."),o()())}function ge(a,e){if(a&1){let t=h();n(0,"button",32),m("click",function(){C(t);let l=c(2);return _(l.cancelRemoteRegistration())}),r(1," Cancel registration "),o()}}function Ce(a,e){if(a&1){let t=h();n(0,"button",32),m("click",function(){C(t);let l=c(2);return _(l.disableRemoteControl())}),r(1," Disable remote control "),o()}}function _e(a,e){if(a&1){let t=h();n(0,"button",32),m("click",function(){C(t);let l=c(2);return _(l.enableRemoteControl())}),r(1," Enable remote control "),o(),n(2,"button",34),m("click",function(){C(t);let l=c(2);return _(l.deleteRemoteControl())}),r(3," Delete remote control setup "),o()}}function fe(a,e){if(a&1&&(n(0,"div",5),E(1,ce,4,0)(2,ue,5,2,"div",28)(3,de,3,0,"div",28)(4,ge,2,0,"button",29)(5,Ce,2,0,"button",29)(6,_e,4,0),o()),a&2){let t=c();s(),d(t.remoteControlState()==="inactive"?1:-1),s(),d(t.remoteControlState()==="registered"?2:-1),s(),d(t.remoteControlState()==="registering"?3:-1),s(),d(t.remoteControlState()==="registering"||t.remoteControlState()==="registeringfaulted"||t.remoteControlState()==="registered"?4:-1),s(),d(t.remoteControlState()==="connected"||t.remoteControlState()==="enabled"?5:-1),s(),d(t.remoteControlState()==="disabled"?6:-1)}}function Se(a,e){if(a&1&&(n(0,"option",10),r(1),o()),a&2){let t=e.$implicit;u("value",t),s(),k(t)}}function he(a,e){if(a&1){let t=h();n(0,"option",35),m("click",function(){let l=C(t).$implicit,f=c();return _(f.pauseSettings.controls.timeType.setValue(l.value))}),r(1),o()}if(a&2){let t=e.$implicit;u("value",t.value),s(),b(" ",t.label," ")}}function be(a,e){if(a&1&&(n(0,"option",10),r(1),o()),a&2){let t=e.$implicit;u("value",t.value),s(),b(" ",t.label," ")}}var g=new Z,me=[{value:"s",label:"Seconds"},{value:"m",label:"Minutes"},{value:"h",label:"Hours"}],O=[{value:"en",label:"English"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"es",label:"Spanish"},{value:"it",label:"Italian"}],pe=[{value:"",label:"System default (information)"},{value:"information",label:"Usage statistics, warnings, errors, and crashes"},{value:"warning",label:"Warnings, errors and crashes"},{value:"error",label:"Errors and crashes"},{value:"crash",label:"Crashes only"},{value:"none",label:"None / disabled"}],M=class a{#i=y(le);#o=y($);#e=y(G);sysinfo=this.#o.systemInfo;isDarkMode=this.#i.isDarkMode;editAs=S("list");settingsForm=g.group({pauseSettings:g.group({time:g.control(0),timeType:g.control("s")}),language:g.control("en"),usageStatistics:g.control(""),updateChannel:g.control(""),remoteControlRegisterUrl:g.control("")});remoteControlState=S("unknown");remoteControlClaimUrl=S(null);sysInfoEffect=B(()=>{this.settingsForm.controls.remoteControlRegisterUrl.patchValue(this.sysinfo()?.RemoteControlRegistrationUrl??"")});get pauseSettings(){return this.settingsForm.controls.pauseSettings}langSignal=L(this.settingsForm.controls.language.valueChanges);timeTypeOptions=S(me);timeOptions=se([this.pauseSettings.controls.timeType.valueChanges.pipe(v("s")),this.pauseSettings.controls.time.valueChanges.pipe(v(null))],P(V(([e,t])=>{let i=this.#r(e);return t!==null?i.filter(l=>l.toString().includes(t.toString())):i}),v([])));languageOptions=A(()=>this.langSignal()?O.filter(e=>e.value===this.langSignal()):O);usageStatisticsOptions=S(pe);ngOnInit(){this.refreshRemoteControlStatus(),this.getServerSettings()}submit(){let e=`${this.pauseSettings.controls.time.value}${this.pauseSettings.controls.timeType.value}`;this.#e.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.settingsForm.controls.usageStatistics.value,"startup-delay":e==="0s"?"":e,"update-channel":this.settingsForm.controls.updateChannel.value}}).subscribe({next:t=>{console.log("res",t)},error:t=>{console.error("err",t)}})}getServerSettings(){return this.#e.getApiV1Serversettings().subscribe({next:e=>{let t=e["startup-delay"],i=t.slice(-1),l=t.slice(0,-1),f=["s","m","h"];this.settingsForm.patchValue({pauseSettings:{time:parseInt(l==""?"0":l),timeType:f.includes(i)?i:"s"},usageStatistics:e["usage-reporter-level"],updateChannel:e["update-channel"]})}})}languageDisplay(e){return e?O.find(t=>t.value===e)?.label??null:null}typeDisplay(){let e=this;return()=>{let t=e.settingsForm.value.pauseSettings?.timeType;return t==null?null:me.find(i=>i.value===t)?.label??null}}usageDisplay(){let e=this;return()=>{let t=e.settingsForm.value.usageStatistics;return t==null?null:pe.find(i=>i.value===t)?.label??null}}setDarkMode(){this.#i.setDarkMode()}setLightMode(){this.#i.setLightMode()}#r(e){let t=e==="h"?25:61;return new Array(t).fill(0).map((i,l)=>l)}repeatRegisterTimer=null;#t(e){e.RegistrationUrl&&this.remoteControlClaimUrl.set(e.RegistrationUrl),console.log(e),e.IsConnected?this.remoteControlState.set("connected"):e.IsEnabled?this.remoteControlState.set("enabled"):e.CanEnable?this.remoteControlState.set("disabled"):e.IsRegisteringFaulted?this.remoteControlState.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.remoteControlState.set("registered"):this.remoteControlState.set("registering"):this.remoteControlState.set("inactive");let t=this.remoteControlState();console.log(t),this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),t==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:i=>{this.#t(i)},error:i=>{this.#n(i)}})},5e3)),(t==="enabled"||t==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.getApiV1RemotecontrolStatus().subscribe({next:i=>{this.#t(i)},error:i=>{this.#n(i)}})},5e3)),e.IsRegistering&&e.CanEnable&&this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:i=>{this.#t(i)}})}#n(e){this.#e.getApiV1RemotecontrolStatus().subscribe({next:t=>{this.#t(t)}})}refreshRemoteControlStatus(){this.#e.getApiV1RemotecontrolStatus().subscribe({next:e=>{this.#t(e)},error:e=>{this.#n(e)}})}beginRemoteRegistration(){this.remoteControlState.set("registering");let e=this.settingsForm.controls.remoteControlRegisterUrl.value;this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:e}}).subscribe({next:t=>{this.#t(t)},error:t=>{this.#n(t)}})}cancelRemoteRegistration(){this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:e=>{this.#t(e)},error:e=>{this.#n(e)}})}enableRemoteControl(){this.#e.postApiV1RemotecontrolEnable().subscribe({next:e=>{this.#t(e)},error:e=>{this.#n(e)}})}disableRemoteControl(){this.#e.postApiV1RemotecontrolDisable().subscribe({next:e=>{this.#t(e)},error:e=>{this.#n(e)}})}deleteRemoteControl(){let e=this;confirm("Are you sure you want to delete the remote control registration?")&&e.#e.deleteApiV1RemotecontrolRegistration().subscribe({next:t=>{e.#t(t)},error:t=>{e.#n(t)}})}getRemoteControlStatusText(){let e=this.remoteControlState();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"}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=F({type:a,selectors:[["app-settings"]],decls:98,vars:13,consts:[[1,"content",3,"submit","formGroup"],[1,"title"],["type","submit","spk-button","",1,"raised","primary"],[1,"left"],[1,"right","remote-control"],[1,"field-row"],[1,"right"],["formGroupName","pauseSettings",1,"field-row"],[3,"hideClearButton"],["type","search","formControlName","time"],[3,"value"],[3,"displayFn","hideClearButton"],["type","text","formControlName","timeType"],["options",""],[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","radios"],[1,"radio-option",3,"click"],[1,"outlined","primary"],["type","radio","name","updateChannel","value","","formControlName","updateChannel"],["type","radio","name","updateChannel","value","stable","formControlName","updateChannel"],["type","radio","name","updateChannel","value","beta","formControlName","updateChannel"],["type","radio","name","updateChannel","value","experimental","formControlName","updateChannel"],["type","radio","name","updateChannel","value","canary","formControlName","updateChannel"],["href","#"],[3,"displayFn"],["type","text","formControlName","usageStatistics"],[1,"field-col"],["type","button","spk-button","",1,"raised"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","spk-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl","formControlName","remoteControlRegisterUrl"],["type","button","spk-button","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","spk-button","",1,"raised","warn",3,"click"],[3,"click","value"]],template:function(t,i){if(t&1&&(p(0,"app-status-bar"),n(1,"form",0),m("submit",function(){return i.submit()}),n(2,"header")(3,"div",1)(4,"h2"),r(5,"Settings"),o(),n(6,"p"),r(7,"Configure your backup settings."),o()(),n(8,"button",2),r(9,"Save changes"),o()(),n(10,"section")(11,"div",3)(12,"h3"),r(13,"Remote access control"),o(),n(14,"p"),r(15),o()(),n(16,"div",4),E(17,fe,7,6,"div",5),o()(),n(18,"section")(19,"div",3)(20,"h3"),r(21,"Pause after startup or hibernation"),o(),n(22,"p"),r(23," 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. "),o()(),n(24,"div",6)(25,"div",7)(26,"spk-select",8),p(27,"input",9),T(28,Se,2,2,"option",10,x),o(),n(30,"spk-select",11),p(31,"input",12),I(32,13),T(33,he,2,2,"option",10,x),D(),o()()()(),n(35,"section")(36,"div",3)(37,"h3"),r(38,"Color theme"),o(),n(39,"p"),r(40,"Customize your application theme"),o()(),n(41,"div",6)(42,"div",14)(43,"img",15),m("click",function(){return i.setLightMode()}),o(),n(44,"img",16),m("click",function(){return i.setDarkMode()}),o()()()(),n(45,"section")(46,"div",3)(47,"h3"),r(48,"Update channel"),o(),n(49,"p"),r(50,"Update channel selection is not implemented yet."),o()(),n(51,"div",17)(52,"div",18),m("click",function(){return i.settingsForm.controls.updateChannel.setValue("")}),n(53,"spk-radio",19),r(54),p(55,"input",20),o(),n(56,"p"),r(57),o()(),n(58,"div",18),m("click",function(){return i.settingsForm.controls.updateChannel.setValue("stable")}),n(59,"spk-radio",19),r(60," Stable "),p(61,"input",21),o(),n(62,"p"),r(63,"Official releases"),o()(),n(64,"div",18),m("click",function(){return i.settingsForm.controls.updateChannel.setValue("beta")}),n(65,"spk-radio",19),r(66," Beta "),p(67,"input",22),o(),n(68,"p"),r(69," 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. "),o()(),n(70,"div",18),m("click",function(){return i.settingsForm.controls.updateChannel.setValue("experimental")}),n(71,"spk-radio",19),r(72," Experimental "),p(73,"input",23),o(),n(74,"p"),r(75,"Specific builds for developers only. Not for use with important data."),o()(),n(76,"div",18),m("click",function(){return i.settingsForm.controls.updateChannel.setValue("canary")}),n(77,"spk-radio",19),r(78," Canary "),p(79,"input",24),o(),n(80,"p"),r(81,"Individual builds for developers only. Not for use with important data."),o()()()(),n(82,"section")(83,"div",3)(84,"h3"),r(85,"Usage statistics"),o(),n(86,"p"),r(87," Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate "),n(88,"a",25),r(89,"public usage statistics."),o(),p(90,"br")(91,"br"),r(92," 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. "),o()(),n(93,"div",6)(94,"spk-select",26),p(95,"input",27),T(96,be,2,2,"option",10,x),o()()()()),t&2){let l,f;s(),u("formGroup",i.settingsForm),s(14),k(i.getRemoteControlStatusText()),s(2),d(i.remoteControlState()!=="unknown"?17:-1),s(9),u("hideClearButton",!0),s(2),R(i.timeOptions()),s(2),u("displayFn",i.typeDisplay())("hideClearButton",!0),s(3),R(i.timeTypeOptions()),s(10),w("active",!i.isDarkMode()),s(),w("active",i.isDarkMode()),s(10),b(" Default (",(l=i.sysinfo())==null?null:l.DefaultUpdateChannel,") "),s(3),b("Same as the base install version: ",(f=i.sysinfo())==null?null:f.ServerVersionType,""),s(37),u("displayFn",i.usageDisplay()),s(2),R(i.usageStatisticsOptions())}},dependencies:[ee,j,X,Y,q,H,z,W,te,J,Q,K,ae,ne,oe,ie,re],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}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%] .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%}.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}.remote-control[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}"],changeDetection:0})};export{M as default};
|
|
1
|
+
import{a as se}from"./chunk-NKKY2IML.js";import{a as $}from"./chunk-PT7ISA6M.js";import{b as L}from"./chunk-WFFR6X5F.js";import{a as le}from"./chunk-Y33NQYRN.js";import{b as q,d as z,e as W,h as j,j as H,l as J,m as K,o as Q,p as X,q as Y,r as Z,s as ee,t as te}from"./chunk-2VFGTKQ3.js";import"./chunk-M6JAWID7.js";import{a as ae}from"./chunk-2E5G54LG.js";import"./chunk-QXWUZ7QN.js";import{a as G}from"./chunk-QAOE722P.js";import{g as ne,k as ie,o as oe,q as re}from"./chunk-K3Y54FPO.js";import"./chunk-RFOUEAO7.js";import"./chunk-FL23VQIJ.js";import"./chunk-N3IZHBC5.js";import{Ab as d,Bb as x,Cb as T,Db as R,Eb as n,Fb as o,Gb as p,Hb as I,Hc as A,Ib as D,Jc as B,K as v,Kb as h,Oa as U,Ra as s,Tb as m,Ub as c,X as y,Xb as N,Za as S,c as P,ea as C,fa as _,fb as F,fc as r,gc as k,hc as b,lb as E,p as V,vb as u,xb as w}from"./chunk-6RDPRL5W.js";import"./chunk-7CGTOI24.js";function ce(a,e){if(a&1){let t=h();n(0,"spk-form-field",30),p(1,"input",31),o(),n(2,"button",32),m("click",function(){C(t);let l=c(2);return _(l.beginRemoteRegistration())}),r(3," Register for remote control "),o()}}function ue(a,e){if(a&1&&(n(0,"div",28)(1,"label"),r(2,"Machine is now registered, open this link to add it to your account:"),o(),n(3,"a",33),r(4),o()()),a&2){let t=c(2);s(3),N("href",t.remoteControlClaimUrl(),U),s(),k(t.remoteControlClaimUrl())}}function de(a,e){a&1&&(n(0,"div",28)(1,"label"),r(2,"Registering, please wait..."),o()())}function ge(a,e){if(a&1){let t=h();n(0,"button",32),m("click",function(){C(t);let l=c(2);return _(l.cancelRemoteRegistration())}),r(1," Cancel registration "),o()}}function Ce(a,e){if(a&1){let t=h();n(0,"button",32),m("click",function(){C(t);let l=c(2);return _(l.disableRemoteControl())}),r(1," Disable remote control "),o()}}function _e(a,e){if(a&1){let t=h();n(0,"button",32),m("click",function(){C(t);let l=c(2);return _(l.enableRemoteControl())}),r(1," Enable remote control "),o(),n(2,"button",34),m("click",function(){C(t);let l=c(2);return _(l.deleteRemoteControl())}),r(3," Delete remote control setup "),o()}}function fe(a,e){if(a&1&&(n(0,"div",5),E(1,ce,4,0)(2,ue,5,2,"div",28)(3,de,3,0,"div",28)(4,ge,2,0,"button",29)(5,Ce,2,0,"button",29)(6,_e,4,0),o()),a&2){let t=c();s(),d(t.remoteControlState()==="inactive"?1:-1),s(),d(t.remoteControlState()==="registered"?2:-1),s(),d(t.remoteControlState()==="registering"?3:-1),s(),d(t.remoteControlState()==="registering"||t.remoteControlState()==="registeringfaulted"||t.remoteControlState()==="registered"?4:-1),s(),d(t.remoteControlState()==="connected"||t.remoteControlState()==="enabled"?5:-1),s(),d(t.remoteControlState()==="disabled"?6:-1)}}function Se(a,e){if(a&1&&(n(0,"option",10),r(1),o()),a&2){let t=e.$implicit;u("value",t),s(),k(t)}}function he(a,e){if(a&1){let t=h();n(0,"option",35),m("click",function(){let l=C(t).$implicit,f=c();return _(f.pauseSettings.controls.timeType.setValue(l.value))}),r(1),o()}if(a&2){let t=e.$implicit;u("value",t.value),s(),b(" ",t.label," ")}}function be(a,e){if(a&1&&(n(0,"option",10),r(1),o()),a&2){let t=e.$implicit;u("value",t.value),s(),b(" ",t.label," ")}}var g=new Z,me=[{value:"s",label:"Seconds"},{value:"m",label:"Minutes"},{value:"h",label:"Hours"}],O=[{value:"en",label:"English"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"es",label:"Spanish"},{value:"it",label:"Italian"}],pe=[{value:"",label:"System default (information)"},{value:"information",label:"Usage statistics, warnings, errors, and crashes"},{value:"warning",label:"Warnings, errors and crashes"},{value:"error",label:"Errors and crashes"},{value:"crash",label:"Crashes only"},{value:"none",label:"None / disabled"}],M=class a{#i=y(le);#o=y($);#e=y(G);sysinfo=this.#o.systemInfo;isDarkMode=this.#i.isDarkMode;editAs=S("list");settingsForm=g.group({pauseSettings:g.group({time:g.control(0),timeType:g.control("s")}),language:g.control("en"),usageStatistics:g.control(""),updateChannel:g.control(""),remoteControlRegisterUrl:g.control("")});remoteControlState=S("unknown");remoteControlClaimUrl=S(null);sysInfoEffect=B(()=>{this.settingsForm.controls.remoteControlRegisterUrl.patchValue(this.sysinfo()?.RemoteControlRegistrationUrl??"")});get pauseSettings(){return this.settingsForm.controls.pauseSettings}langSignal=L(this.settingsForm.controls.language.valueChanges);timeTypeOptions=S(me);timeOptions=se([this.pauseSettings.controls.timeType.valueChanges.pipe(v("s")),this.pauseSettings.controls.time.valueChanges.pipe(v(null))],P(V(([e,t])=>{let i=this.#r(e);return t!==null?i.filter(l=>l.toString().includes(t.toString())):i}),v([])));languageOptions=A(()=>this.langSignal()?O.filter(e=>e.value===this.langSignal()):O);usageStatisticsOptions=S(pe);ngOnInit(){this.refreshRemoteControlStatus(),this.getServerSettings()}submit(){let e=`${this.pauseSettings.controls.time.value}${this.pauseSettings.controls.timeType.value}`;this.#e.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.settingsForm.controls.usageStatistics.value,"startup-delay":e==="0s"?"":e,"update-channel":this.settingsForm.controls.updateChannel.value}}).subscribe({next:t=>{console.log("res",t)},error:t=>{console.error("err",t)}})}getServerSettings(){return this.#e.getApiV1Serversettings().subscribe({next:e=>{let t=e["startup-delay"],i=t.slice(-1),l=t.slice(0,-1),f=["s","m","h"];this.settingsForm.patchValue({pauseSettings:{time:parseInt(l==""?"0":l),timeType:f.includes(i)?i:"s"},usageStatistics:e["usage-reporter-level"],updateChannel:e["update-channel"]})}})}languageDisplay(e){return e?O.find(t=>t.value===e)?.label??null:null}typeDisplay(){let e=this;return()=>{let t=e.settingsForm.value.pauseSettings?.timeType;return t==null?null:me.find(i=>i.value===t)?.label??null}}usageDisplay(){let e=this;return()=>{let t=e.settingsForm.value.usageStatistics;return t==null?null:pe.find(i=>i.value===t)?.label??null}}setDarkMode(){this.#i.setDarkMode()}setLightMode(){this.#i.setLightMode()}#r(e){let t=e==="h"?25:61;return new Array(t).fill(0).map((i,l)=>l)}repeatRegisterTimer=null;#t(e){e.RegistrationUrl&&this.remoteControlClaimUrl.set(e.RegistrationUrl),console.log(e),e.IsConnected?this.remoteControlState.set("connected"):e.IsEnabled?this.remoteControlState.set("enabled"):e.CanEnable?this.remoteControlState.set("disabled"):e.IsRegisteringFaulted?this.remoteControlState.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.remoteControlState.set("registered"):this.remoteControlState.set("registering"):this.remoteControlState.set("inactive");let t=this.remoteControlState();console.log(t),this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),t==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:i=>{this.#t(i)},error:i=>{this.#n(i)}})},5e3)),(t==="enabled"||t==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.getApiV1RemotecontrolStatus().subscribe({next:i=>{this.#t(i)},error:i=>{this.#n(i)}})},5e3)),e.IsRegistering&&e.CanEnable&&this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:i=>{this.#t(i)}})}#n(e){this.#e.getApiV1RemotecontrolStatus().subscribe({next:t=>{this.#t(t)}})}refreshRemoteControlStatus(){this.#e.getApiV1RemotecontrolStatus().subscribe({next:e=>{this.#t(e)},error:e=>{this.#n(e)}})}beginRemoteRegistration(){this.remoteControlState.set("registering");let e=this.settingsForm.controls.remoteControlRegisterUrl.value;this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:e}}).subscribe({next:t=>{this.#t(t)},error:t=>{this.#n(t)}})}cancelRemoteRegistration(){this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:e=>{this.#t(e)},error:e=>{this.#n(e)}})}enableRemoteControl(){this.#e.postApiV1RemotecontrolEnable().subscribe({next:e=>{this.#t(e)},error:e=>{this.#n(e)}})}disableRemoteControl(){this.#e.postApiV1RemotecontrolDisable().subscribe({next:e=>{this.#t(e)},error:e=>{this.#n(e)}})}deleteRemoteControl(){let e=this;confirm("Are you sure you want to delete the remote control registration?")&&e.#e.deleteApiV1RemotecontrolRegistration().subscribe({next:t=>{e.#t(t)},error:t=>{e.#n(t)}})}getRemoteControlStatusText(){let e=this.remoteControlState();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"}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=F({type:a,selectors:[["app-settings"]],decls:98,vars:13,consts:[[1,"content",3,"submit","formGroup"],[1,"title"],["type","submit","spk-button","",1,"raised","primary"],[1,"left"],[1,"right","remote-control"],[1,"field-row"],[1,"right"],["formGroupName","pauseSettings",1,"field-row"],[3,"hideClearButton"],["type","search","formControlName","time"],[3,"value"],[3,"displayFn","hideClearButton"],["type","text","formControlName","timeType"],["options",""],[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","radios"],[1,"radio-option",3,"click"],[1,"outlined","primary"],["type","radio","name","updateChannel","value","","formControlName","updateChannel"],["type","radio","name","updateChannel","value","stable","formControlName","updateChannel"],["type","radio","name","updateChannel","value","beta","formControlName","updateChannel"],["type","radio","name","updateChannel","value","experimental","formControlName","updateChannel"],["type","radio","name","updateChannel","value","canary","formControlName","updateChannel"],["href","#"],[3,"displayFn"],["type","text","formControlName","usageStatistics"],[1,"field-col"],["type","button","spk-button","",1,"raised"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","spk-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl","formControlName","remoteControlRegisterUrl"],["type","button","spk-button","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","spk-button","",1,"raised","warn",3,"click"],[3,"click","value"]],template:function(t,i){if(t&1&&(p(0,"app-status-bar"),n(1,"form",0),m("submit",function(){return i.submit()}),n(2,"header")(3,"div",1)(4,"h2"),r(5,"Settings"),o(),n(6,"p"),r(7,"Configure your backup settings."),o()(),n(8,"button",2),r(9,"Save changes"),o()(),n(10,"section")(11,"div",3)(12,"h3"),r(13,"Remote access control"),o(),n(14,"p"),r(15),o()(),n(16,"div",4),E(17,fe,7,6,"div",5),o()(),n(18,"section")(19,"div",3)(20,"h3"),r(21,"Pause after startup or hibernation"),o(),n(22,"p"),r(23," 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. "),o()(),n(24,"div",6)(25,"div",7)(26,"spk-select",8),p(27,"input",9),T(28,Se,2,2,"option",10,x),o(),n(30,"spk-select",11),p(31,"input",12),I(32,13),T(33,he,2,2,"option",10,x),D(),o()()()(),n(35,"section")(36,"div",3)(37,"h3"),r(38,"Color theme"),o(),n(39,"p"),r(40,"Customize your application theme"),o()(),n(41,"div",6)(42,"div",14)(43,"img",15),m("click",function(){return i.setLightMode()}),o(),n(44,"img",16),m("click",function(){return i.setDarkMode()}),o()()()(),n(45,"section")(46,"div",3)(47,"h3"),r(48,"Update channel"),o(),n(49,"p"),r(50,"Update channel selection is not implemented yet."),o()(),n(51,"div",17)(52,"div",18),m("click",function(){return i.settingsForm.controls.updateChannel.setValue("")}),n(53,"spk-radio",19),r(54),p(55,"input",20),o(),n(56,"p"),r(57),o()(),n(58,"div",18),m("click",function(){return i.settingsForm.controls.updateChannel.setValue("stable")}),n(59,"spk-radio",19),r(60," Stable "),p(61,"input",21),o(),n(62,"p"),r(63,"Official releases"),o()(),n(64,"div",18),m("click",function(){return i.settingsForm.controls.updateChannel.setValue("beta")}),n(65,"spk-radio",19),r(66," Beta "),p(67,"input",22),o(),n(68,"p"),r(69," 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. "),o()(),n(70,"div",18),m("click",function(){return i.settingsForm.controls.updateChannel.setValue("experimental")}),n(71,"spk-radio",19),r(72," Experimental "),p(73,"input",23),o(),n(74,"p"),r(75,"Specific builds for developers only. Not for use with important data."),o()(),n(76,"div",18),m("click",function(){return i.settingsForm.controls.updateChannel.setValue("canary")}),n(77,"spk-radio",19),r(78," Canary "),p(79,"input",24),o(),n(80,"p"),r(81,"Individual builds for developers only. Not for use with important data."),o()()()(),n(82,"section")(83,"div",3)(84,"h3"),r(85,"Usage statistics"),o(),n(86,"p"),r(87," Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate "),n(88,"a",25),r(89,"public usage statistics."),o(),p(90,"br")(91,"br"),r(92," 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. "),o()(),n(93,"div",6)(94,"spk-select",26),p(95,"input",27),T(96,be,2,2,"option",10,x),o()()()()),t&2){let l,f;s(),u("formGroup",i.settingsForm),s(14),k(i.getRemoteControlStatusText()),s(2),d(i.remoteControlState()!=="unknown"?17:-1),s(9),u("hideClearButton",!0),s(2),R(i.timeOptions()),s(2),u("displayFn",i.typeDisplay())("hideClearButton",!0),s(3),R(i.timeTypeOptions()),s(10),w("active",!i.isDarkMode()),s(),w("active",i.isDarkMode()),s(10),b(" Default (",(l=i.sysinfo())==null?null:l.DefaultUpdateChannel,") "),s(3),b("Same as the base install version: ",(f=i.sysinfo())==null?null:f.ServerVersionType,""),s(37),u("displayFn",i.usageDisplay()),s(2),R(i.usageStatisticsOptions())}},dependencies:[ee,j,X,Y,q,H,z,W,te,J,Q,K,ae,ne,oe,ie,re],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}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%] .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%}.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}.remote-control[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}"],changeDetection:0})};export{M as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,a,aa,b,ba,c,ca,d,da,e,ea,f,fa,g,ga,h,ha,i,ia,j,ja,k,ka,l,la,m,ma,n,na,o,oa,p,pa,q,qa,r,ra,s,sa,t,ta,u,ua,v,va,w,wa,x,y,z}from"./chunk-
|
|
1
|
+
import{$,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,a,aa,b,ba,c,ca,d,da,e,ea,f,fa,g,ga,h,ha,i,ia,j,ja,k,ka,l,la,m,ma,n,na,o,oa,p,pa,q,qa,r,ra,s,sa,t,ta,u,ua,v,va,w,wa,x,y,z}from"./chunk-VN5Y4LY2.js";import"./chunk-DUQTXUOP.js";import"./chunk-RFOUEAO7.js";import"./chunk-FL23VQIJ.js";import"./chunk-6RDPRL5W.js";import"./chunk-7CGTOI24.js";export{H as ActivatedRoute,I as ActivatedRouteSnapshot,C as ActivationEnd,B as ActivationStart,V as BaseRouteReuseStrategy,A as ChildActivationEnd,z as ChildActivationStart,F as ChildrenOutletContexts,O as DefaultTitleStrategy,h as DefaultUrlSerializer,j as EventType,u as GuardsCheckEnd,t as GuardsCheckStart,p as NavigationCancel,n as NavigationCancellationCode,m as NavigationEnd,r as NavigationError,q as NavigationSkipped,o as NavigationSkippedCode,l as NavigationStart,aa as NoPreloading,E as OutletContext,a as PRIMARY_OUTLET,$ as PreloadAllModules,_ as PreloadingStrategy,P as ROUTER_CONFIGURATION,qa as ROUTER_INITIALIZER,K as ROUTER_OUTLET_DATA,R as ROUTES,M as RedirectCommand,w as ResolveEnd,v as ResolveStart,y as RouteConfigLoadEnd,x as RouteConfigLoadStart,U as RouteReuseStrategy,X as Router,k as RouterEvent,Y as RouterLink,Z as RouterLinkActive,Y as RouterLinkWithHref,pa as RouterModule,L as RouterOutlet,ba as RouterPreloader,G as RouterState,J as RouterStateSnapshot,s as RoutesRecognized,D as Scroll,N as TitleStrategy,T as UrlHandlingStrategy,f as UrlSegment,e as UrlSegmentGroup,g as UrlSerializer,d as UrlTree,wa as VERSION,b as convertToParamMap,i as createUrlTreeFromSnapshot,c as defaultUrlMatcher,sa as mapToCanActivate,ta as mapToCanActivateChild,ua as mapToCanDeactivate,ra as mapToCanMatch,va as mapToResolve,ca as provideRouter,da as provideRoutes,ma as withComponentInputBinding,ha as withDebugTracing,ga as withDisabledInitialNavigation,fa as withEnabledBlockingInitialNavigation,ka as withHashLocation,ea as withInMemoryScrolling,la as withNavigationErrorHandler,ia as withPreloading,ja as withRouterConfig,na as withViewTransitions,Q as \u0275EmptyOutletComponent,oa as \u0275ROUTER_PROVIDERS,W as \u0275afterNextNavigation,S as \u0275loadChildren};
|