@duplicati/ngclient 0.0.95 → 0.0.97
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/chunk-2SYN2ATG.js +1 -0
- package/{chunk-2HS3CYRN.js → chunk-3GK4TNUH.js} +1 -1
- package/chunk-3WEATDBM.js +1 -0
- package/chunk-3WKC2CFC.js +1 -0
- package/{chunk-3HJFVNAL.js → chunk-3YOT5OAB.js} +1 -1
- package/chunk-4ERW7ITN.js +1 -0
- package/{chunk-5RLVPRCW.js → chunk-4SOUVJR6.js} +1 -1
- package/{chunk-V5GVLIPJ.js → chunk-4XPN5ZGE.js} +1 -1
- package/{chunk-M5YHW43W.js → chunk-5COOM7FC.js} +1 -1
- package/{chunk-ORA656R6.js → chunk-5UL3RRQI.js} +1 -1
- package/{chunk-ZHWVTLKA.js → chunk-6LVGSIUU.js} +1 -1
- package/chunk-7CGTOI24.js +1 -0
- package/chunk-7EPQLKGD.js +1 -0
- package/chunk-7JZ5LA6R.js +1 -0
- package/{chunk-UDBZI5KJ.js → chunk-7NEOVOUN.js} +1 -1
- package/{chunk-WYXI4BXE.js → chunk-7XGYQRKR.js} +1 -1
- package/chunk-BYMCE7VW.js +1 -0
- package/chunk-C2PMOZWR.js +1 -0
- package/chunk-CHZ7TMI7.js +1 -0
- package/{chunk-LFPZBC5Y.js → chunk-CMXSHXAU.js} +1 -1
- package/{chunk-TBPNAHEA.js → chunk-CPOAOTIS.js} +1 -1
- package/{chunk-RCP6EKCC.js → chunk-CR2UB7UZ.js} +1 -1
- package/{chunk-SNZ7FE6B.js → chunk-FWWMGA32.js} +1 -1
- package/{chunk-THUAAYGA.js → chunk-G3YJXHRY.js} +1 -1
- package/{chunk-IR7OYLKR.js → chunk-GI6WORKU.js} +1 -1
- package/chunk-HE6PHO5B.js +1 -0
- package/{chunk-GEEPH37P.js → chunk-HGERKLOF.js} +1 -1
- package/{chunk-DUPZCVLU.js → chunk-HLLAB5VQ.js} +1 -1
- package/chunk-HYBV36HG.js +1 -0
- package/{chunk-VS2WUXLN.js → chunk-IAVOZTCR.js} +1 -1
- package/{chunk-OB2RR7QV.js → chunk-IHYIT4I3.js} +1 -1
- package/{chunk-TLNQL27Q.js → chunk-ILQK4A72.js} +1 -1
- package/{chunk-AVNZ3OXK.js → chunk-INK3KQF2.js} +1 -1
- package/{chunk-KLIPTMVG.js → chunk-L3T52MCL.js} +1 -1
- package/{chunk-4IJQ7AAQ.js → chunk-LHSJLKCF.js} +1 -1
- package/{chunk-2FWU7B4D.js → chunk-LO4MUZS2.js} +1 -1
- package/chunk-MJI6X5KH.js +1 -0
- package/{chunk-YKB6KLXM.js → chunk-MJUYFS7O.js} +1 -1
- package/chunk-N7UCCMLS.js +1 -0
- package/{chunk-DTR7JZFL.js → chunk-NL7QPU6R.js} +1 -1
- package/{chunk-N5K6ODRA.js → chunk-NV2YMSSM.js} +1 -1
- package/{chunk-ICOF6OY2.js → chunk-OL4IJVKD.js} +1 -1
- package/{chunk-CK5N2PPF.js → chunk-OS4AAJLB.js} +1 -1
- package/{chunk-DTPZU6NP.js → chunk-PTC4N7TU.js} +1 -1
- package/chunk-PUSUA4U7.js +1 -0
- package/chunk-Q3FF4WG3.js +1 -0
- package/{chunk-R6R4GFBX.js → chunk-Q6U2NFPI.js} +1 -1
- package/{chunk-S5JZJBJS.js → chunk-QPO2N2OR.js} +1 -1
- package/{chunk-WZG34QS3.js → chunk-QX5XWUM2.js} +1 -1
- package/{chunk-VFLEQIHL.js → chunk-RIGBDLYY.js} +1 -1
- package/{chunk-QXYKZKGV.js → chunk-S5VSZG5H.js} +1 -1
- package/{chunk-RHPHTHFC.js → chunk-UMUPSIIL.js} +1 -1
- package/chunk-USGQSK2Z.js +1 -0
- package/{chunk-WNQBKJ3M.js → chunk-V6OHLKTK.js} +1 -1
- package/chunk-VYKAGJXY.js +1 -0
- package/{chunk-RBRHRXAU.js → chunk-W5YK2JJZ.js} +1 -1
- package/{chunk-AIOUSVMR.js → chunk-WBNOGAKJ.js} +1 -1
- package/{chunk-KJ3CPTGU.js → chunk-WNWGY2FM.js} +1 -1
- package/{chunk-RDRLCN5M.js → chunk-XBZX6CUW.js} +1 -1
- package/{chunk-Q67EYU7V.js → chunk-XC6KYSRC.js} +1 -1
- package/{chunk-SSKK33BY.js → chunk-YIWL3QAP.js} +1 -1
- package/{chunk-FAZH6E7O.js → chunk-ZFE5M6M3.js} +1 -1
- package/{chunk-XL5J65PI.js → chunk-ZOUY24KQ.js} +1 -1
- package/{chunk-L4B5RE7R.js → chunk-ZRXUUC26.js} +1 -1
- package/chunk-ZTJALQGT.js +1 -0
- package/index.html +18 -2
- package/locale/dayjs/da.js +40 -1
- package/locale/dayjs/de.js +64 -1
- package/locale/dayjs/en-gb.js +42 -1
- package/locale/dayjs/en.js +12 -1
- package/locale/dayjs/fr.js +41 -1
- package/main-GMFQCDBZ.js +1 -0
- package/package.json +1 -1
- package/chunk-25IC7WV6.js +0 -1
- package/chunk-3TZIEZUP.js +0 -1
- package/chunk-3ZLHMSKS.js +0 -1
- package/chunk-APEDZMBI.js +0 -1
- package/chunk-C6Q5SG76.js +0 -1
- package/chunk-ECH6I3YN.js +0 -1
- package/chunk-ETPUKEDV.js +0 -1
- package/chunk-F4AVB6VB.js +0 -1
- package/chunk-HWVDZXYD.js +0 -1
- package/chunk-IYKSYF2U.js +0 -1
- package/chunk-LVHYWUFN.js +0 -1
- package/chunk-MLJFOQOI.js +0 -1
- package/chunk-NU46HB6T.js +0 -1
- package/chunk-P5GYPUJD.js +0 -1
- package/chunk-QUDKB5S3.js +0 -1
- package/chunk-SSXZ4GVY.js +0 -1
- package/chunk-TX5R4CFB.js +0 -1
- package/chunk-TYO44G6M.js +0 -1
- package/chunk-UQH5ZQG7.js +0 -1
- package/chunk-XQXYPXR7.js +0 -1
- package/main-ZZ5NOUMD.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Ve}from"./chunk-Q67EYU7V.js";import{a as kt,b as Wt}from"./chunk-DNHLTHLR.js";import{a as U}from"./chunk-N5K6ODRA.js";import{a as qt}from"./chunk-RCP6EKCC.js";import{a as ut}from"./chunk-3HJFVNAL.js";import{a as lt}from"./chunk-LFPZBC5Y.js";import{a as Qe}from"./chunk-CK5N2PPF.js";import{a as Ue,b as oe,c as Te,d as ie,e as he,f as pt,g as Ht,h as De,i as Re,l as ct,m as Ee,n as xe,o as jt,p as ye,q,r as mt,s as Pe}from"./chunk-4IJQ7AAQ.js";import{a as fe,c as J}from"./chunk-AIOUSVMR.js";import{a as ee,b as rt,d as Kt,e as zt,g as Me,l as te,n as Xt,o as at,r as ne,x as Le,y as st}from"./chunk-ECH6I3YN.js";import{b as Ge}from"./chunk-KLIPTMVG.js";import{c as Bt}from"./chunk-V5GVLIPJ.js";import{ia as Vt}from"./chunk-2HS3CYRN.js";import{A as Tt,Ab as s,Bb as a,Cb as m,D as Xe,Db as X,Eb as H,Fb as He,Gb as v,Lc as b,Mb as g,Mc as it,Nb as C,Ob as I,Pb as Et,Qa as l,Qb as yt,R as Ie,Rb as we,Sb as y,Tb as c,Wb as me,X as $,Xa as ge,Yb as Lt,Zb as V,ca as T,cc as Ce,da as h,db as Z,dc as Se,ec as ue,fc as S,gc as Pt,ha as Gt,hc as z,ib as _,ic as Ut,kc as et,l as ft,lc as tt,mc as nt,nc as At,oa as ht,oc as Nt,p as ze,pa as Dt,pc as Ot,rb as u,rc as ot,sa as N,sc as je,tb as Ne,uc as We,wb as D,xb as le,yb as pe,yc as qe,zb as ce}from"./chunk-DTPZU6NP.js";import{a as A,c as bt}from"./chunk-C6Q5SG76.js";var _t=class e{fromString(n){if(!n)return null;let t=n.match(/(\d+)([smhDWMY])/);return t&&{value:parseInt(t[1]),unit:t[2]}}toString(n,t){return`${n}${t}`}static \u0275fac=function(t){return new(t||e)};static \u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})};var Ae=class e{#e=$(Ge);s3Providers=U(this.getS3Config("Providers"));s3Regions=U(this.getS3Config("Regions"));s3RegionHosts=U(this.getS3Config("RegionHosts"));s3StorageClasses=U(this.getS3Config("StorageClasses"));storjSatellites=U(this.getStorjConfig("Satellites"));storjAuthenticationMethods=U(this.getStorjConfig("AuthenticationMethods"));openstackProviders=U(this.getOpenstackConfig("Providers"));openstackVersions=U(this.getOpenstackConfig("Versions"));gcsLocations=U(this.getGcsConfig("Locations"));gcsStorageClasses=U(this.getGcsConfig("StorageClasses"));getS3Config(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":n}}).pipe(ze(t=>this.#t(t)))}createS3IamUser(n,t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":n,"s3-password":t}})}createS3PolicyIAM(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:n}})}getStorjConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":n}}).pipe(ze(t=>this.#t(t)))}getOpenstackConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":n}}).pipe(ze(t=>this.#t(t)))}getGcsConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":n}}).pipe(ze(t=>this.#t(t)))}#t(n){return(n.Result&&typeof n.Result=="object"&&Object.entries(n.Result).map(([t,o])=>({key:t,value:o})))??[]}static \u0275fac=function(t){return new(t||e)};static \u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})};function ve(e){return e==null?"":":"+e.toString()}function Q(e){return e==null?"":e.startsWith("/")?e:"/"+e}function R(e,n){let t={},o={};return n.searchParams.forEach((i,r)=>{ke.find(p=>p.key===e)?.dynamicFields?.includes(r)?o[r]=decodeURIComponent(i):t[r]=decodeURIComponent(i)}),{advanced:t,dynamic:o}}function x(e,n=!1){let t=e.map(([i,r])=>`${i}=${r?encodeURIComponent(r.toString()):""}`).join("&");return t?(n?"":"?")+t:""}function dt(e){let n=e.destinationType,t=ke.find(o=>o.customKey===n||o.key===n);if(!t)throw new Error("Invalid destination type");return t?.mapper.to(e)??""}function $t(e){let n=URL.canParse(e),t=e.split("://")[0],o=e.split("://")[1],i="http://"+o;if(o.startsWith("%")&&t==="file")return ke.find(r=>r.customKey===t||r.key===t)?.mapper.from(t,new URL("http://localhost"),e);try{let r=new URL(i);return ke.find(p=>p.customKey===t||p.key===t)?.mapper.from(t,r,e)}catch(r){console.error("Error while parsing target path",r)}if(!n)throw new Error("Invalid target path");return null}var F=new q,ke=[{key:"file",displayName:"File system",description:"Store backups on your local file system.",customFields:{path:{type:"FolderTree",name:"path",shortDescription:"File path",longDescription:"The path to store the backup",formElement:e=>F.control(e??"")}},mapper:{to:e=>{let n=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${e.custom.path}${n}`},from:(e,n,t)=>{let i=t.startsWith("file:///")?t.split("file:///")[1]:t.split("file://")[1],r=i.startsWith("%"),f=i.slice(1).startsWith(":\\")||r?i:"/"+i;return A({destinationType:e,custom:{path:f}},R(e,n))}}},{key:"ssh",displayName:"SSH",description:"Store backups in SSH.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"The server to connect to",formElement:e=>F.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:e=>F.control(e??"",[Te.required,Te.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>F.control(e??"")}},dynamicFields:["auth-username"],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:"This is a path to a private key file locally on the machine",longDescription:"This is a path to a private key file locally on the machine"}],mapper:{to:e=>{let n=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+ve(t)+Q(i)+n}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"s3",displayName:"S3 compatible bucket",description:"Store backups in any S3 compatible bucket.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>F.control(e??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>F.control(e??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Ae).s3Providers},"use-ssl","auth-username","auth-password"],advancedFields:[{name:"s3-client",type:"Enumeration",options:["aws","minio"]},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Ae).s3StorageClasses}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+Q(t)+o}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},R(e,n))}},{key:"gcs",displayName:"Google Cloud Storage",description:"Store backups in Google Cloud Storage.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>F.control(e??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Ae).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Ae).gcsStorageClasses},"authid"],mapper:{to:e=>{let n=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${e.custom.path}${n}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"googledrive",displayName:"Google Drive",description:"Store backups in Google Drive.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>F.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"pcloud",displayName:"pCloud",description:"Store backups in pCloud.",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>N([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:"Server",longDescription:"Server",formElement:e=>F.control(e??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>F.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>{let o=n.pathname.replace(/^\//,"");return A({destinationType:e,custom:{server:n.hostname,path:o}},R(e,n))}}},{key:"azure",displayName:"Azure Blob Storage",description:"Store backups in Azure Blob Storage.",customFields:{path:{type:"String",name:"path",shortDescription:"Container name",longDescription:"Container name",formElement:e=>F.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=e.custom.path,t=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"onedrivev2",displayName:"OneDrive",description:"Store backups in OneDrive.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"od4b",displayName:"OneDrive Business",description:"Store backups in OneDrive Business.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>F.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>F.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+ve(t)+Q(i)+n}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"mssp",displayName:"Microsoft SharePoint",description:"Store backups in Microsoft SharePoint.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>F.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>F.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+ve(t)+Q(i)+n}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"sharepoint",displayName:"Microsoft SharePoint v2",description:"Store backups in Microsoft SharePoint.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"dropbox",displayName:"Dropbox",description:"Store backups in Dropbox.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"box",displayName:"Box.com",description:"Store backups in Box.com.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"jottacloud",displayName:"Jottacloud",description:"Store backups in Jottacloud.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"b2",displayName:"B2 Cloud Storage",description:"Store backups in B2 Cloud Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>F.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>F.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Application ID"},{name:"auth-password",shortDescription:"Application Key"}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+Q(t)+o}`},from:(e,n,t)=>A({destinationType:e,custom:{bucket:n.hostname,path:n.pathname}},R(e,n))}},{key:"e2",displayName:"IDrive e2",description:"Store backups in IDrive e2.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>F.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>F.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Access ID"},{name:"auth-password",shortDescription:"Access Secret"}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+Q(t)+o}`},from:(e,n,t)=>A({destinationType:e,custom:{bucket:n.hostname,path:n.pathname}},R(e,n))}},{key:"mega",displayName:"Mega.nz",description:"Store backups in Mega.nz.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let n=e.custom.path,t=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"msgroup",displayName:"Microsoft Office 365 Group",description:"Store backups in Microsoft Office 365 Group.",oauthField:"authid",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:"Group email",longDescription:"Group email",formElement:e=>F.control(e??"",[Te.email])},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"cloudfiles",displayName:"Rackspace CloudFiles",description:"Store backups in Rackspace CloudFiles.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>F.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>F.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let n=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+ve(t)+Q(i)+n}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"rclone",displayName:"Rclone",description:"Store backups in Rclone.",dynamicFields:[{name:"rclone-local-repository",shortDescription:"Local repository",defaultValue:""},{name:"rclone-remote-repository",shortDescription:"Remote repository",defaultValue:""},{name:"rclone-remote-path",shortDescription:"Path on remote repository",defaultValue:""}],mapper:{to:e=>{let n=e.dynamic["rclone-remote-repository"],t=e.dynamic["rclone-remote-path"],o=Object.entries(e.dynamic).filter(([r])=>!["rclone-remote-repository","rclone-remote-path"].includes(r)),i=x([...Object.entries(e.advanced),...o]);return`${e.destinationType}://${n}/${t+i}`},from:(e,n,t)=>{let{advanced:o,dynamic:i}=R(e,n);return A({destinationType:e,dynamic:A({"rclone-remote-repository":n.hostname,"rclone-remote-path":n.pathname},i)},o)}}},{key:"openstack",displayName:"OpenStack Object Storage",description:"Store backups in OpenStack Object Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket",longDescription:"Bucket",formElement:e=>F.control(e??"")}},dynamicFields:[{name:"openstack-authuri",shortDescription:"Auth URI",type:"Enumeration",loadOptions:e=>e.get(Ae).openstackProviders},{name:"openstack-version",shortDescription:"Version",type:"Enumeration",loadOptions:e=>e.get(Ae).openstackVersions},{name:"openstack-domain-name",shortDescription:"Domain name"},{name:"openstack-tenant-name",shortDescription:"Tenant name"},{name:"openstack-region",shortDescription:"Region"}],mapper:{to:e=>{let n=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{bucket:t}=e.custom;return`${e.destinationType}://${t+n}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},R(e,n))}},{key:"webdav",displayName:"WebDAV",description:"Store backups in WebDAV.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>F.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>F.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"},{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let{port:n,server:t,path:o}=e.custom,i=e.dynamic["use-ssl"],r=x([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([p])=>p!=="use-ssl")]);return`${e.destinationType}${i?"s":""}://${t+ve(n)+Q(o)+r}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"aftp",displayName:"FTP",description:"Store backups in FTP.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>F.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>F.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let{port:n,server:t,path:o}=e.custom,i=x([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([r])=>r!=="use-ssl")]);return`${e.destinationType}://${t+ve(n)+Q(o)+i}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"sia",displayName:"Sia Decentrilized Cloud",description:"Store backups in Sia Decentrilized Cloud.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>F.control(e??"")}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let n=e.custom.server,t=e.dynamic["sia-targetpath"],o=x([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([i])=>i!=="sia-targetpath")]);return`${e.destinationType}://${n+Q(t)+o}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.pathname}},R(e,n))}},{key:"cos",displayName:"Tencent COS",description:"Store backups in Tencent COS.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")}},dynamicFields:[{name:"cos-bucket",shortDescription:"Bucket",order:1},{name:"cos-region",shortDescription:"Region",order:2},{name:"cos-app-id",shortDescription:"COS App Id",order:3},{name:"cos-secret-id",shortDescription:"COS Secret Id",order:4},{name:"cos-secret-key",shortDescription:"COS Secret Key",order:5}],mapper:{to:e=>{let n=e.custom.path,t=x([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([o])=>o!=="cos-targetpath")]);return`${e.destinationType}://${n+t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.pathname}},R(e,n))}},{key:"tahoe",displayName:"Tahoe LAFS",description:"Store backups in Tahoe LAFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>F.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>F.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")},username:{type:"String",name:"username",shortDescription:"Username",longDescription:"Username",formElement:e=>F.control(e??"")},password:{type:"Password",name:"password",shortDescription:"Password",longDescription:"Password",formElement:e=>F.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"}],mapper:{to:e=>{let{port:n,server:t,path:o,username:i,password:r}=e.custom,p={"auth-username":i,"auth-password":r},f=e.dynamic["use-ssl"],k=x([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([d])=>d!=="use-ssl"),...Object.entries(p)]);return`${e.destinationType}${f?"s":""}://${t+ve(n)+Q(o)+k}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"cifs",displayName:"CIFS",description:"Store backups in CIFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>F.control(e??"")},share:{type:"String",name:"share",shortDescription:"Share Name",longDescription:"Share Name",formElement:e=>F.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")}},dynamicFields:["transport","auth-username","auth-password","auth-domain"],mapper:{to:e=>{let{share:n,server:t,path:o,username:i,password:r}=e.custom,p={"auth-username":i,"auth-password":r},f=x([...Object.entries(e.advanced),...Object.entries(p)]);return`${e.destinationType}://${t+Q(n)+Q(o)+f}`},from:(e,n,t)=>{let o=n.pathname.split("/")[1],i=n.pathname.split("/").slice(2).join("/");return A({destinationType:e,custom:{server:n.hostname,share:o,path:i}},R(e,n))}}},{key:"storj",customKey:"storjAccessGrant",displayName:"Storj Access Grant",description:"Store backups in Storj Access Grant.",dynamicFields:[{name:"storj-shared-access",shortDescription:"Access Grant"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server"}],mapper:{to:e=>`storj://storj.io/config?storj-auth-method=Access%20grant&storj-satellite=us1.storj.io%3A7777&storj-api-key&storj-secret&${x([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>A({destinationType:e},R(e,n))}},{key:"storj",customKey:"storjApiKey",displayName:"Storj API Key",description:"Store backups in Storj API Key.",dynamicFields:[{name:"storj-satellite",shortDescription:"Satellite",type:"Enumeration",loadOptions:e=>e.get(Ae).storjSatellites},{name:"storj-api-key",shortDescription:"API Key"},{name:"storj-secret",shortDescription:"Secret"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server"}],mapper:{to:e=>`storj://storj.io/config?storj-auth-method=API%20key&${x([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>A({destinationType:e},R(e,n))}}];var Qt=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,Ft=class e{generate(n,t=Qt){let o;do o=this.generatePassword(n,t);while(this.calculatePasswordStrength(o)<5);return o}generatePassword(n,t=Qt){let o=this;return Array.apply(null,{length:n}).map(()=>{let i;for(;;)if(i=String.fromCharCode(o.#e()),t.test(i))return i},this).join("")}calculatePasswordStrength(n){let t=1;return n.length>=8&&t++,n.match(/[a-z]/)&&n.match(/[A-Z]/)&&t++,n.match(/\d+/)&&t++,n.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&t++,Math.min(t,5)}#e(){if(window.crypto&&window.crypto.getRandomValues){let n=new Uint8Array(1);return window.crypto.getRandomValues(n),n[0]}else if(window.msCrypto&&window.msCrypto.getRandomValues){let n=new Uint8Array(1);return window.msCrypto.getRandomValues(n),n[0]}else return Math.floor(Math.random()*256)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})};var sn=["formRef"];function ln(e,n){if(e&1&&S(0),e&2){let t=n.$implicit;z(" ",t.DisplayName," ")}}function pn(e,n){if(e&1&&m(0,"spk-progress-bar",37),e&2){let t=c(3);Ne("error",t.calculatePasswordStrength()===1)("warn",t.calculatePasswordStrength()===2)("primary",t.calculatePasswordStrength()===4)("success",t.calculatePasswordStrength()===5),u("value",t.calculatePasswordStrength()*(100/5))}}function cn(e,n){e&1&&(s(0,"span",32),I(1,9),a())}function mn(e,n){e&1&&(g(0,7,1),m(1,"spk-icon"),C())}function un(e,n){e&1&&(g(0,7,2),m(1,"spk-icon"),C())}function _n(e,n){e&1&&(g(0,10,1),m(1,"spk-icon",39),C())}function dn(e,n){e&1&&(g(0,10,2),m(1,"spk-icon"),C())}function Fn(e,n){if(e&1){let t=v();s(0,"button",38),y("click",function(){T(t);let i=c(3);return h(i.copyPassword())}),g(1,10),_(2,_n,2,0)(3,dn,2,0),C(),a()}if(e&2){let t=c(3);l(2),D(t.copiedPassword()?2:3)}}function gn(e,n){e&1&&(s(0,"spk-alert",36),I(1,11),a())}function Cn(e,n){if(e&1){let t=v();s(0,"div",27)(1,"spk-form-field")(2,"label",28),g(3,6),m(4,"sup"),C(),a(),m(5,"input",29),a(),_(6,pn,1,9,"spk-progress-bar",30),s(7,"spk-form-field"),m(8,"input",31),_(9,cn,2,0,"span",32),a(),s(10,"div",33)(11,"button",34),y("click",function(){T(t);let i=c(2);return h(i.showPassword.set(!i.showPassword()))}),g(12,7),_(13,mn,2,0)(14,un,2,0),C(),a(),s(15,"button",34),y("click",function(){T(t);let i=c(2);return h(i.generatePassword())}),g(16,8),m(17,"spk-icon"),C(),a(),_(18,Fn,4,1,"button",35),a(),_(19,gn,2,0,"spk-alert",36),a()}if(e&2){let t=c(2);l(5),u("type",t.showPassword()?"text":"password"),l(),D(t.generalForm.value.password?6:-1),l(2),u("type",t.showPassword()?"text":"password"),l(),D(t.generalForm.value.repeatPassword&&t.generalForm.value.repeatPassword!==t.generalForm.value.password?9:-1),l(4),D(t.showPassword()?13:14),l(5),D(t.showCopyPassword()?18:-1),l(),D(t.generalForm.value.password&&t.generalForm.value.password===t.generalForm.value.repeatPassword?19:-1)}}function Sn(e,n){if(e&1&&(s(0,"spk-select",24)(1,"label",25),I(2,5),a(),m(3,"input",26),_(4,ln,1,1,"ng-template"),a(),_(5,Cn,20,7,"div",27)),e&2){let t=c();u("options",t.encryptionOptions())("isClearable",!1),l(5),D(t.encryptionFieldSignal()!==""?5:-1)}}function fn(e,n){if(e&1&&(s(0,"button",22),g(1,12),m(2,"spk-icon"),C(),a()),e&2){let t=c();u("disabled",t.generalForm.invalid)}}function Tn(e,n){if(e&1&&(s(0,"spk-tooltip",23)(1,"button",22),g(2,13),m(3,"spk-icon"),C(),a()()),e&2){let t=c();u("disabled",!(t.showCopyPassword()&&!t.copiedPassword())),l(),u("disabled",t.generalForm.invalid||t.showCopyPassword()&&!t.copiedPassword())}}var Be=new q,Yt=(e={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>Be.group({name:Be.control(e.name,[Te.required]),description:Be.control(e.description),encryption:Be.control(e.encryption,[Wt()]),password:Be.control(e.password,[kt(n=>n?.value.encryption!=="",[Te.required])]),repeatPassword:Be.control(e.repeatPassword,[kt(n=>n?.value.encryption!=="",[Te.required])])}),Mt={Key:"",DisplayName:"None"},It=class e{#e=$(J);#t=$(fe);#o=$(Ft);#i=$(re);#n=$(lt);formRef=ge.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=N(!1);copiedPassword=N(!1);showCopyPassword=N(!1);encryptionEffect=it(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});calculatePasswordStrength=b(()=>{let t=this.generalFormSignal()?.password??"";return this.#o.calculatePasswordStrength(t)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit()}async copyPassword(){let n=this.generalForm.controls.password.value;await this.#r(n??""),this.copiedPassword.set(!0)}async#r(n){try{await navigator.clipboard.writeText(n)}catch{try{let o=document.createElement("textarea");o.value=n,document.body.appendChild(o),o.select(),document.execCommand("copy"),document.body.removeChild(o)}catch(o){console.error("Failed to copy text: ",o)}}}displayFn(){let n=this.#n.systemInfo()?.EncryptionModules??[];return t=>{let o=[Mt,...n].find(i=>i.Key===t);return o?`${o.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let n=this.#o.generate(16);this.generalForm.controls.password.setValue(n),this.generalForm.controls.repeatPassword.setValue(n),this.showCopyPassword.set(!0)}next(){this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Z({type:e,selectors:[["app-general"]],viewQuery:function(t,o){t&1&&Ce(o.formRef,sn,5),t&2&&Se()},decls:20,vars:3,consts:()=>{let n;n=$localize`Your backup name`;let t;t=$localize`Your backup description`;let o;o=$localize`General backup settings`;let i;i=$localize` Backup name ${"\uFFFD#7\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#7\uFFFD"}:CLOSE_SUPERSCRIPT:`;let r;r=$localize`Backup description`;let p;p=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let f;f=$localize`Encryption`;let k;k=$localize`Encryption`;let d;d=$localize`Password`;let G;G=$localize`Repeat password`;let B;B=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let O;O=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,O=we(O);let K;K=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let ae;ae=$localize`Passwords do not match`;let W;W=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,W=we(W);let E;E=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let P;P=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let L;return L=$localize` Continue ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],o,i,r,p,k,B,O,K,ae,W,E,P,L,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],["for","backupName"],["type","text","tabindex","1","placeholder",n,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",t,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["message","Remember to copy the password",1,"primary",3,"disabled"],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",f,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",d,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",G,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(t,o){if(t&1){let i=v();s(0,"form",14,0),y("submit",function(){return T(i),h(o.next())}),s(2,"h3",15),I(3,1),a(),s(4,"spk-form-field")(5,"label",16),g(6,2),m(7,"sup"),C(),a(),m(8,"input",17),a(),s(9,"spk-form-field")(10,"label",18),I(11,3),a(),m(12,"textarea",19),a(),_(13,Sn,6,3),s(14,"div",20)(15,"button",21),y("click",function(){return T(i),h(o.exit())}),g(16,4),m(17,"spk-icon"),C(),a(),_(18,fn,3,1,"button",22)(19,Tn,4,2,"spk-tooltip",23),a()()}t&2&&(u("formGroup",o.generalForm),l(13),D(o.isNew()?13:-1),l(5),D(o.encryptionFieldSignal()===""?18:19))},dependencies:[Pe,De,oe,ie,he,Ee,ye,te,ne,Me,ee,at,rt,st],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-500)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}"],changeDetection:0})};var hn=["formRef"],Dn=()=>["encryption-module","--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","no-encryption"];function En(e,n){e&1&&(g(0,2,1),m(1,"spk-icon",13),C())}function yn(e,n){e&1&&(s(0,"p",13),I(1,7),a())}var Ke=new q,Zt=["Bytes","KB","MB","GB","TB","PB"],Pn=[{value:"",name:$localize`Keep all backups`},{value:"time",name:$localize`Delete backups that are older than`},{value:"versions",name:$localize`Keep a specific number of backups`},{value:"smart",name:$localize`Smart backup retention`},{value:"custom",name:$localize`Custom backup retention`}],An=1024*1024*1024*2,Nn=1024*1024*5,Jt=(e={remoteVolumeSize:50,size:"MB",backupRetention:"",advancedOptions:[]})=>Ke.group({remoteVolumeSize:Ke.group({size:Ke.control(e.remoteVolumeSize),unit:Ke.control(e.size)}),backupRetention:Ke.control(e.backupRetention),advancedOptions:Ke.group({})}),Rt=class e{#e=$(re);#t=$(J);#o=$(fe);formRef=ge.required("formRef");optionsForm=this.#e.optionsForm;selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;settings=this.#e.settings;sizeOptions=N(Zt);retentionOptions=N(Pn);volumeSizeSignal=U(this.optionsForm.controls.remoteVolumeSize.get("size")?.valueChanges.pipe(Tt(300))??ft(null));volumeUnitSignal=U(this.optionsForm.controls.remoteVolumeSize.get("unit")?.valueChanges.pipe(Tt(300))??ft(null));exceededVolumeSize=b(()=>{let n=this.volumeSizeSignal()??this.optionsForm.controls.remoteVolumeSize.get("size")?.value,t=this.volumeUnitSignal()??this.optionsForm.controls.remoteVolumeSize.get("unit")?.value;if(n==null||t===null||t===void 0)return!1;let o=n*Math.pow(1024,Zt.indexOf(t));return o>An||o<Nn});goBack(){this.#t.navigate(["schedule"],{relativeTo:this.#o.parent})}submit(){this.#e.submit()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Z({type:e,selectors:[["app-advanced-options-settings"]],viewQuery:function(t,o){t&1&&Ce(o.formRef,hn,5),t&2&&Se()},decls:30,vars:12,consts:()=>{let n;n=$localize`Select an option...`;let t;t=$localize`Options`;let o;o=$localize` Remote volume size ${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/*9:1\uFFFD"}:CLOSE_BLOCK_IF:`;let i;i=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#16\uFFFD"}:START_LINK: Read more ${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-square-out${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#16\uFFFD"}:CLOSE_LINK:`;let r;r=$localize`Backup retention`;let p;p=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let f;f=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `;let k;return k=$localize` The chosen size is outside the recommended range. This may cause performance issues, excessively large temporary files or other problems. `,[["formRef",""],t,o,i,r,p,f,k,[3,"submit","formGroup"],[1,"title-30"],[1,"remote-volume-wrap"],["formGroupName","remoteVolumeSize",1,"row-inputs"],["for","size"],[1,"warning"],["type","number","id","size","formControlName","size"],["placeholder",n,3,"options","inlineSearch"],["type","text","formControlName","unit"],["href","https://forum.duplicati.com/t/choosing-sizes-in-duplicati/17683","target","_blank",1,"spk-primary"],["suffix",""],["value","value","label","name",3,"options","inlineSearch"],["type","text","formControlName","backupRetention"],[3,"optionsChange","options","hiddenOptions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(t,o){if(t&1){let i=v();s(0,"form",8,0),y("submit",function(){return T(i),h(o.submit())}),s(2,"h3",9),I(3,1),a(),s(4,"div",10)(5,"div",11)(6,"spk-form-field")(7,"label",12),g(8,2),_(9,En,2,0,"spk-icon",13),C(),a(),m(10,"input",14),a(),s(11,"spk-select",15),m(12,"input",16),a()(),_(13,yn,2,0,"p",13),s(14,"p"),g(15,3),s(16,"a",17),m(17,"spk-icon",18),a(),C(),a()(),s(18,"spk-select",19)(19,"label",12),I(20,4),a(),m(21,"input",20),a(),s(22,"app-options-list",21),nt("optionsChange",function(p){return T(i),tt(o.settings,p)||(o.settings=p),h(p)}),a(),s(23,"div",22)(24,"button",23),y("click",function(){return T(i),h(o.goBack())}),g(25,5),m(26,"spk-icon"),C(),a(),s(27,"button",24),g(28,6),m(29,"spk-icon"),C(),a()()()}t&2&&(u("formGroup",o.optionsForm),l(9),D(o.exceededVolumeSize()?9:-1),l(2),u("options",o.sizeOptions())("inlineSearch",!0),l(2),D(o.exceededVolumeSize()?13:-1),l(5),u("options",o.retentionOptions())("inlineSearch",!0),l(4),et("options",o.settings),u("hiddenOptions",ot(11,Dn)),l(5),Ne("loader",o.isSubmitting()))},dependencies:[Pe,De,oe,Re,ie,he,Ee,ye,xe,qt,Me,ee,te,ne],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 40px;align-items:flex-end}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};var On=["formRef"];function kn(e,n){if(e&1){let t=v();s(0,"div",26)(1,"spk-form-field")(2,"label",27),I(3,8),a(),s(4,"input",28,1),y("focus",function(){T(t);let i=ue(5);return h(i.showPicker())}),a(),s(6,"spk-icon",29),S(7,"clock"),a()(),s(8,"spk-form-field"),m(9,"label",30),s(10,"input",31,2),y("focus",function(){T(t);let i=ue(11);return h(i.showPicker())}),a(),s(12,"spk-icon",29),S(13,"calendar"),a()()(),X(14,32),s(15,"div",33)(16,"spk-form-field")(17,"label",34),I(18,9),a(),m(19,"input",35),a(),s(20,"spk-select",36),m(21,"input",37),a()(),s(22,"app-toggle-card",38),X(23,39),I(24,10),H(),s(25,"div",40)(26,"spk-toggle",21),g(27,11),m(28,"input",41),C(),a(),s(29,"spk-toggle",21),g(30,12),m(31,"input",42),C(),a(),s(32,"spk-toggle",21),g(33,13),m(34,"input",43),C(),a(),s(35,"spk-toggle",21),g(36,14),m(37,"input",44),C(),a(),s(38,"spk-toggle",21),g(39,15),m(40,"input",45),C(),a(),s(41,"spk-toggle",21),g(42,16),m(43,"input",46),C(),a(),s(44,"spk-toggle",21),g(45,17),m(46,"input",47),C(),a()()(),H()}if(e&2){let t=c();l(20),u("options",t.unitOptions)("isClearable",!1),l(2),u("disallowToggle",!0)}}var j=new q,en=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],tn=(e={autoRun:!0,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}})=>j.group({autoRun:j.control(e.autoRun),nextTime:j.group({time:j.control(e.nextTime.time),date:j.control(e.nextTime.date)}),runAgain:j.group({repeatValue:j.control(e.runAgain.repeatValue),repeatUnit:j.control(e.runAgain.repeatUnit),allowedDays:j.group({mon:j.control(e.runAgain.allowedDays.mon),tue:j.control(e.runAgain.allowedDays.tue),wed:j.control(e.runAgain.allowedDays.wed),thu:j.control(e.runAgain.allowedDays.thu),fri:j.control(e.runAgain.allowedDays.fri),sat:j.control(e.runAgain.allowedDays.sat),sun:j.control(e.runAgain.allowedDays.sun)})})}),xt=class e{#e=$(re);#t=$(J);#o=$(fe);formRef=ge.required("formRef");scheduleForm=this.#e.scheduleForm;scheduleFormSignal=this.#e.scheduleFormSignal;unitOptions=en;displayFn(n){let t=en.find(o=>o.key===n);return t?`${t.label}`:""}goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#o.parent})}next(){this.#t.navigate(["options"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Z({type:e,selectors:[["app-schedule"]],viewQuery:function(t,o){t&1&&Ce(o.formRef,On,5),t&2&&Se()},decls:18,vars:2,consts:()=>{let n;n=$localize`Schedule`;let t;t=$localize` Automatically run backups ${"\uFFFD#7\uFFFD\uFFFD/#7\uFFFD"}:TAG_INPUT:`;let o;o=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let r;r=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let p;p=$localize`Next time`;let f;f=$localize`Run again every`;let k;k=$localize`Allowed days`;let d;d=$localize` Monday ${"\uFFFD#28\uFFFD\uFFFD/#28\uFFFD"}:TAG_INPUT:`;let G;G=$localize` Tuesday ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let B;B=$localize` Wednesday ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let O;O=$localize` Thursday ${"\uFFFD#37\uFFFD\uFFFD/#37\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Friday ${"\uFFFD#40\uFFFD\uFFFD/#40\uFFFD"}:TAG_INPUT:`;let ae;ae=$localize` Saturday ${"\uFFFD#43\uFFFD\uFFFD/#43\uFFFD"}:TAG_INPUT:`;let W;return W=$localize` Sunday ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`,[["formRef",""],["timeRef",""],["dateRef",""],n,t,o,i,r,p,f,k,d,G,B,O,K,ae,W,[3,"submit","formGroup"],[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox","formControlName","autoRun"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["formGroupName","nextTime",1,"row-inputs"],["for","time"],["type","time","id","time","formControlName","time",3,"focus"],["suffix",""],["for","date"],["type","date","id","date","formControlName","date",3,"focus"],["formGroupName","runAgain"],[1,"row-inputs"],["for","repeatValue"],["type","number","id","repeatValue","formControlName","repeatValue"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit","formControlName","repeatUnit"],["formGroupName","allowedDays",3,"disallowToggle"],["title",""],[1,"days-wrap"],["type","checkbox","formControlName","mon"],["type","checkbox","formControlName","tue"],["type","checkbox","formControlName","wed"],["type","checkbox","formControlName","thu"],["type","checkbox","formControlName","fri"],["type","checkbox","formControlName","sat"],["type","checkbox","formControlName","sun"]]},template:function(t,o){if(t&1){let i=v();s(0,"form",18,0),y("submit",function(){return T(i),h(o.next())}),s(2,"h3",19),I(3,3),a(),s(4,"div",20)(5,"spk-toggle",21),g(6,4),m(7,"input",22),C(),a(),s(8,"p"),I(9,5),a()(),_(10,kn,47,3),s(11,"div",23)(12,"button",24),y("click",function(){return T(i),h(o.goBack())}),g(13,6),m(14,"spk-icon"),C(),a(),s(15,"button",25),g(16,7),m(17,"spk-icon"),C(),a()()()}if(t&2){let i;u("formGroup",o.scheduleForm),l(10),D((i=o.scheduleFormSignal())!=null&&i.autoRun?10:-1)}},dependencies:[Pe,De,oe,Re,Ue,ie,he,Ee,ye,xe,te,Le,ee,Me,ne,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;padding-bottom:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function $n(e,n){if(e&1){let t=v();s(0,"spk-select",0)(1,"input",4),y("ngModelChange",function(i){T(t);let r=c(2);return h(r.updateStateExpression(i))}),a()()}if(e&2){let t,o=c(2);u("options",o.fileGroupOptions())("isClearable",!1),l(),u("ngModel",(t=o.pathState())==null?null:t.expression)}}function In(e,n){if(e&1){let t=v();s(0,"spk-form-field")(1,"input",4),y("ngModelChange",function(i){T(t);let r=c(2);return h(r.updateStateExpression(i))}),a()()}if(e&2){let t,o=c(2);l(),u("ngModel",(t=o.pathState())==null?null:t.expression)}}function Mn(e,n){if(e&1){let t=v();s(0,"spk-select",0)(1,"input",1),y("ngModelChange",function(i){T(t);let r=c();return h(r.updateStateType(i))}),a()(),_(2,$n,2,3,"spk-select",0)(3,In,2,1,"spk-form-field"),s(4,"div",2),y("click",function(){T(t);let i=c();return h(i.removeFilter())}),s(5,"spk-icon",3),S(6,"x-circle"),a()()}if(e&2){let t,o,i=c();u("options",i.expressionOptions())("isClearable",!1),l(),u("ngModel",(t=i.pathState())==null?null:t.type),l(),D(((o=i.pathState())==null?null:o.type)==="-FileGroup"||((o=i.pathState())==null?null:o.type)==="+FileGroup"?2:3)}}var nn=[{key:"Excludes folders where name contains",value:"-FolderNameIncludes"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileNameIncludes"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],Rn=[{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"}],gt=class e{path=Dt.required();osType=Dt();pathChange=ht();remove=ht();expressionOptions=N(nn);fileGroupOptions=N(Rn);pathState=N(null);typeState=b(()=>{let n=this.pathState();return n?n.type:null});pathEffect=it(()=>{let n=this.path(),t=n.slice(1),o=n.startsWith("-")?"-":"+",i=this.osType()==="Windows",r=i?"\\":"/",p=t.startsWith("%");return t===""?this.pathState.set({type:"-Unknown",path:"___none___",expression:""}):p&&t.endsWith(r)||i&&t.slice(2).startsWith("\\")&&t.endsWith("\\")||t.startsWith(r)&&t.endsWith(r)?this.pathState.set({type:`${o}Folder`,path:t,expression:t}):t.startsWith("*")&&t.endsWith(`*${r}`)?this.pathState.set({type:`${o}FolderNameIncludes`,path:t,expression:t.slice(1,-2)}):t.startsWith("[.*")&&t.endsWith(`[^\\${r}]*]`)?this.pathState.set({type:`${o}FileNameIncludes`,path:t,expression:t.slice(3,-7)}):t.startsWith("{")&&t.endsWith("}")?this.pathState.set({type:`${o}FileGroup`,path:t,expression:t.slice(1,-1)}):t.startsWith("[")&&t.endsWith("]")?this.pathState.set({type:`${o}Regex`,path:t,expression:t.slice(1,-1)}):t.startsWith("*.")?this.pathState.set({type:`${o}Extension`,path:t,expression:t.slice(2)}):this.pathState.set({type:`${o}Expression`,path:t,expression:t})});updateStateType(n){this.pathState.update(t=>(t.type=n,t.path=this.#t(t),t)),this.#e()}updateStateExpression(n){this.pathState.update(t=>(t.expression=n,t.path=this.#t(t),t)),this.#e()}#e(){setTimeout(()=>this.pathChange.emit(this.pathState().path))}#t(n){let t=n.type.slice(0,1),o=n.type.slice(1),i=this.osType()==="Windows",r=i?"\\":"/",f=i&&!n.expression.startsWith("%")?n.expression.slice(2):n.expression,k=n.path.startsWith("%");if(o==="Unknown")return`${t}${n.expression}`;if(o==="Folder"){let d=k||f.startsWith(r),G=f.endsWith(r);return G&&d?`${t}${n.expression}`:G?`${t}${n.expression}${r}`:d?`${t}${r}${n.expression}`:`${t}${r}${n.expression}${r}`}return o==="FolderNameIncludes"?`${t}*${n.expression}*${r}`:o==="FileNameIncludes"?`${t}[.*${n.expression}[^\\${r}]*]`:o==="FileGroup"?`${t}{${n.expression}}`:o==="Regex"?`${t}[${n.expression}]`:o==="Extension"?`${t}*.${n.expression}`:`${t}${n.expression}`}removeFilter(){this.remove.emit()}displayFn(n){let t=nn.find(o=>o.value===n);return t?t.key:""}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Z({type:e,selectors:[["app-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:1,vars:1,consts:()=>{let n;return n=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",n,3,"ngModelChange","ngModel"],[1,"filter-removal",3,"click"],[1,"spk-primary"],["type","text",3,"ngModelChange","ngModel"]]},template:function(t,o){t&1&&_(0,Mn,7,4),t&2&&D(o.pathState()?0:-1)},dependencies:[mt,oe,ie,Ht,ee,te,ne],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] spk-select[_ngcontent-%COMP%]{--miw: initial}[_nghost-%COMP%] spk-form-field[_ngcontent-%COMP%]{min-width:110px}[_nghost-%COMP%] spk-form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{min-width:110px}[_nghost-%COMP%] .filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var xn=["formRef"];function vn(e,n){if(e&1){let t=v();s(0,"app-filter",42),y("pathChange",function(i){let r=T(t).$index,p=c(2);return h(p.patchPathAt(i,r))})("remove",function(){let i=T(t).$index,r=c(2);return h(r.removePathAt(i))}),a()}if(e&2){let t,o=n.$implicit,i=c(2);u("path",o)("osType",(t=i.osType())!==null&&t!==void 0?t:"")}}function wn(e,n){if(e&1&&pe(0,vn,1,2,"app-filter",41,le),e&2){let t=c();ce(t.pathArray())}}function bn(e,n){if(e&1&&(s(0,"div",40)(1,"spk-form-field"),m(2,"input",43),a(),s(3,"spk-select",44),m(4,"input",45),a()()),e&2){let t=c();l(3),u("options",t.sizeOptions())("isClearable",!1)}}var $e=new q,Gn=["Bytes","KB","MB","GB","TB","PB"],on=(e={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>$e.group({path:$e.control(e.path),excludes:$e.group({hidden:$e.control(e.excludes.hidden),system:$e.control(e.excludes.system),temporary:$e.control(e.excludes.temporary),filesLargerThan:$e.group({size:$e.control(null),unit:$e.control(null)})})}),vt=class e{#e=$(re);#t=$(J);#o=$(fe);formRef=ge.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new pt("");filesLargerThan=b(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=N(Gn);osType=this.#e.osType;pathSignal=U(this.sourceDataForm.controls.path.valueChanges);pathArray=b(()=>this.pathSignal()?.split("\0").filter(n=>n.startsWith("-")||n.startsWith("+")||n==="___none___")??[]);addFilter(n="-*"){let t=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${t}\0${n}`)}patchPathAt(n,t){let i=this.sourceDataForm.controls.path.value.split("\0").filter(p=>!p.startsWith("-")&&!p.startsWith("+")).join("\0"),r=this.pathArray().map((p,f)=>f===t?`${n}`:`${p}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${r}`)}removePathAt(n){let o=this.sourceDataForm.controls.path.value.split("\0").filter(r=>!r.startsWith("-")&&!r.startsWith("+")).join("\0"),i=this.pathArray().filter((r,p)=>p!==n).join("\0");this.sourceDataForm.controls.path.setValue(`${o}\0${i}`)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${n}\0${this.newPathCtrl.value}`),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#o.parent})}next(){this.#t.navigate(["schedule"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Z({type:e,selectors:[["app-source-data"]],viewQuery:function(t,o){t&1&&Ce(o.formRef,xn,5),t&2&&Se()},decls:55,vars:12,consts:()=>{let n;n=$localize`Path`;let t;t=$localize`Add a direct path`;let o;o=$localize`Hidden files`;let i;i=$localize`System files`;let r;r=$localize`Temporary files`;let p;p=$localize`Source Data`;let f;f=$localize`Folder path`;let k;k=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let d;d=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let G;G=$localize`Source Data`;let B;B=$localize`Add Path`;let O;O=$localize`Add a path directly from your machine.`;let K;K=$localize`Filters`;let ae;ae=$localize`Customize your filters.`;let W;W=$localize`Add filter`;let E;E=$localize`Exclude`;let P;P=$localize`Choose if there’s any files you want to exclude.`;let L;L=$localize` Hidden files ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`;let M;M=$localize` System files ${"\uFFFD#48\uFFFD\uFFFD/#48\uFFFD"}:TAG_INPUT:`;let Y;Y=$localize` Temporary files ${"\uFFFD#51\uFFFD\uFFFD/#51\uFFFD"}:TAG_INPUT:`;let de;de=$localize` Files larger than `;let se;return se=$localize`Select an option...`,[["formRef",""],p,f,k,d,G,B,O,K,ae,W,E,P,L,M,Y,de,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",n,"formControlName","path"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"row-inputs"],["type","text","placeholder",t,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",o,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",r,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],["type","number","formControlName","size"],[3,"options","isClearable"],["type","text","formControlName","unit","placeholder",se]]},template:function(t,o){if(t&1){let i=v();s(0,"form",17,0),y("submit",function(){return T(i),h(o.next())}),s(2,"div",18)(3,"h3",19),I(4,1),a(),s(5,"app-file-tree",20)(6,"label",21),I(7,2),a(),m(8,"input",22),a(),s(9,"div",23)(10,"button",24),y("click",function(){return T(i),h(o.goBack())}),g(11,3),m(12,"spk-icon"),C(),a(),s(13,"button",25),g(14,4),m(15,"spk-icon"),C(),a()()(),s(16,"div",26)(17,"h3",19),I(18,5),a(),s(19,"app-toggle-card",27),X(20,28),I(21,6),H(),s(22,"p",29),I(23,7),a(),s(24,"div",30)(25,"spk-form-field"),m(26,"input",31),a(),s(27,"button",32),y("click",function(){return T(i),h(o.addNewPath())}),s(28,"spk-icon"),S(29,"plus"),a()()()(),s(30,"app-toggle-card",27),X(31,28),I(32,8),H(),s(33,"p",29),I(34,9),a(),s(35,"button",33),y("click",function(){return T(i),h(o.addFilter())}),I(36,10),a(),_(37,wn,2,0),a(),s(38,"app-toggle-card",34),X(39,28),I(40,11),H(),s(41,"p",29),I(42,12),a(),s(43,"spk-toggle",35),g(44,13),m(45,"input",36),C(),a(),s(46,"spk-toggle",35),g(47,14),m(48,"input",37),C(),a(),s(49,"spk-toggle",35),g(50,15),m(51,"input",38),C(),a(),s(52,"spk-toggle",39),y("click",function(){return T(i),h(o.toggleFilesLargerThan())}),I(53,16),a(),_(54,bn,5,2,"div",40),a()()()}if(t&2){let i;u("formGroup",o.sourceDataForm),l(5),u("multiSelect",!0)("startingPath",o.getPath())("showFiles",!0),l(14),u("disallowToggle",!0),l(7),u("formControl",o.newPathCtrl),l(4),u("disallowToggle",!0),l(7),D((i=o.pathSignal())!=null&&i.length?37:-1),l(),u("disallowToggle",!0),l(14),Ne("active",o.filesLargerThan()),l(2),D(o.filesLargerThan()?54:-1)}},dependencies:[mt,De,oe,Re,Ue,ie,he,Pe,ct,Ee,ye,xe,te,ee,Me,Le,ne,ut,Ve,gt],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 _e=new q,re=class e{#e=$(J);#t=$(lt);#o=$(Ge);#i=$(_t);generalForm=Yt();sourceDataForm=on();scheduleForm=tn();destinationForm=rn();optionsForm=Jt();settings=N([]);isDraft=N(!1);backupId=N(null);isSubmitting=N(!1);finishedLoading=N(!1);backupDefaults=N(null);isNew=b(()=>this.backupId()==="new");osType=b(()=>this.#t.systemInfo()?.OSType);selectedOptions=N([]);selectedAdvancedFormPair=N([]);destinationFormPair=N({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=b(()=>{let n=this.destinationFormPair()?.advanced??[],t=this.selectedAdvancedFormPair()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});selectedHttpOptions=N([]);notSelectedHttpOptions=b(()=>{let n=this.httpOptions(),t=this.selectedHttpOptions()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});sourceDataFormSignal=U(this.sourceDataForm.valueChanges);destinationFormSignal=U(this.destinationForm.valueChanges);generalFormSignal=U(this.generalForm.valueChanges);encryptionFieldSignal=U(this.generalForm.controls.encryption.valueChanges);scheduleFormSignal=U(this.scheduleForm.valueChanges);destinationOptions=b(()=>this.#t.backendModules()??[]);httpOptions=b(()=>this.#t.systemInfo()?.GenericModules?.find(n=>n.Key==="http-options")?.Options?.map(this.#n)??[]);advancedOptions=b(()=>this.#t.systemInfo()?.Options?.map(this.#n)??[]);#n(n){return{name:n.Name,type:n.Type,shortDescription:n.ShortDescription??void 0,longDescription:n.LongDescription??void 0,options:n.ValidValues}}encryptionOptions=b(()=>{let n=this.#t.systemInfo()?.EncryptionModules??[];return[Mt,...n]});nonSelectedOptions=b(()=>this.advancedOptions().sort((n,t)=>n?.name&&t?.name?n?.name.localeCompare(t?.name):0).filter(n=>this.selectedOptions()?.findIndex(t=>t.name===n.name)===-1));addAdvancedFormPairByName(n,t,o){let i=this.notSelectedAdvancedFormPair().find(r=>r.name===n);i&&this.addAdvancedFormPair(i,t,o)}addHttpOptionByName(n,t,o){let i=this.notSelectedHttpOptions().find(r=>r.name===n);i&&this.addHttpOption(i,t,o)}addAdvancedFormPair(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,r=o??n.defaultValue;this.createFormField(i,n,r),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),n])}addHttpOption(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,r=o??n.defaultValue;this.createFormField(i,n,r),this.selectedHttpOptions.set([...this.selectedHttpOptions(),n])}removeAdvancedFormPair(n,t){this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced.removeControl(n.name),this.selectedAdvancedFormPair().findIndex(i=>i.name===n.name)!==-1?this.selectedAdvancedFormPair.update(i=>(i=i.filter(r=>r.name!==n.name),i)):this.selectedHttpOptions.update(i=>(i=i.filter(r=>r.name!==n.name),i))}removeHttpOption(n,t){this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced.removeControl(n.name),this.selectedHttpOptions.update(o=>(o=o.filter(i=>i.name!==n.name),o))}submit(){this.isSubmitting.set(!0);let n=this.#l(),t=this.backupId();t==="new"||!t||this.isDraft()?this.#o.postApiV1Backups({requestBody:n}).pipe(Xe(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{this.exit()},error:o=>{}}):this.#o.putApiV1BackupById({id:t,requestBody:n}).pipe(Xe(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{this.exit()},error:o=>{}})}exit(){this.#c(),this.#e.navigate(["/"])}updateFieldsFromTargetUrl(n){this.#r(),setTimeout(()=>{this.#s(n)})}#r(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.selectedHttpOptions.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(n){let t=n.Sources??"",o=n.Filters?.map(d=>`${d.Include?"":"-"}${d.Expression}`)??[],i=n.Settings?.find(d=>d.Name==="--exclude-files-attributes")?.Value??"",r=n.Settings?.find(d=>d.Name==="--skip-files-larger-than")??null,p=r?.Value.replace(/[0-9]/g,"")??null,f=r?.Value.replace(/[^0-9]/g,"")??null,k={path:[...t,...o].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:p&&f?{size:parseInt(f),unit:p.toUpperCase()}:null}};this.sourceDataForm.patchValue(k)}mapDestinationToForm(n){let t=n.TargetURL?$t(n.TargetURL):null;t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}#s(n){let t=$t(n);t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}mapGeneralToForm(n){let t=n.Settings?.find(r=>r.Name==="encryption-module"),o=t?.Value&&t.Value.length?t.Value:"",i={name:n.Name??"",description:n.Description??""};o&&o!==""&&(i.encryption=o),this.generalForm.patchValue(i)}mapScheduleToForm(n){if(!n){this.scheduleForm.patchValue({autoRun:!1});return}let t=this.#i.fromString(n.Repeat)??null,i={nextTime:this.#p(n.Time),runAgain:{repeatValue:t?.value??1,repeatUnit:t?.unit??"D",allowedDays:{mon:n.AllowedDays?.includes("mon")??!1,tue:n.AllowedDays?.includes("tue")??!1,wed:n.AllowedDays?.includes("wed")??!1,thu:n.AllowedDays?.includes("thu")??!1,fri:n.AllowedDays?.includes("fri")??!1,sat:n.AllowedDays?.includes("sat")??!1,sun:n.AllowedDays?.includes("sun")??!1}}};this.scheduleForm.patchValue(i)}mapOptionsToForms(n){let t=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than"],o=n.Settings?.filter(i=>![...t,"dblock-size"].includes(i.Name));this.settings.set(o??[]),o?.forEach(i=>{if(i.Name==="encryption-module")return this.generalForm.controls.encryption.setValue(i.Value??"");if(i.Name==="dblock-size"){let r=i.Value?.replace(/[^0-9]/g,""),p=i.Value?.replace(/[0-9]/g,"");return this.optionsForm.controls.remoteVolumeSize.setValue({size:r?parseInt(r):null,unit:p?p.toUpperCase():null})}})}getCurrentTargetUrl(){return this.#a(this.destinationForm.controls.destinations)}#l(){let n=this.generalForm.value,t=this.scheduleForm.value,o=this.sourceDataForm.value,r=this.destinationForm.value.destinations?.length?this.#a(this.destinationForm.controls.destinations):[],p=null;t.runAgain?.repeatUnit&&t.runAgain?.repeatValue&&(p=this.#i.toString(t.runAgain.repeatValue,t.runAgain.repeatUnit));let f=t.runAgain?.allowedDays?Object.entries(t.runAgain?.allowedDays).filter(([O,K])=>K).map(([O,K])=>O):[],k=o.path?.split("\0")??[],d=this.mapFormsToSettings(),G=Object.entries(o.excludes??{}).filter(([O,K])=>K&&O!=="filesLargerThan").map(([O])=>O),B=o.excludes?.filesLargerThan;return G.length&&d.push({Name:"--exclude-files-attributes",Value:G.join(",")}),B&&B.size!==null&&B.unit!==null&&d.push({Name:"--skip-files-larger-than",Value:`${B.size}${B.unit}`}),{Backup:{Name:n.name,Description:n.description,TargetURL:r[0]??null,Sources:k.filter(O=>!O.startsWith("-")),Settings:d,Filters:k.filter(O=>O.startsWith("-")).map((O,K)=>({Order:K,Include:!1,Expression:O.slice(1)}))},Schedule:t.autoRun?{Repeat:p,Time:t.nextTime?.date?new Date(`${t.nextTime.date}T${t.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:f}:null}}mapFormsToSettings(n=[]){let t=this.optionsForm.value,o=this.generalForm.value,i=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than"],r=[{Name:"--no-encryption",Value:"True"}];o.encryption!==""&&(r=[{Name:"encryption-module",Value:o.encryption??null},{Name:"passphrase",Value:o.password??null}]);let p=t.remoteVolumeSize?.size?{Name:"dblock-size",Value:`${t.remoteVolumeSize.size}${t.remoteVolumeSize.unit.toLowerCase()}`}:{Name:"dblock-size",Value:"50mb"},f=[...n,...i],k=this.settings().filter(d=>!f.includes(d.Name)).map(d=>{let G=d.Value;return typeof d.Value=="number"&&(G=d.Value.toString()),typeof d.Value=="boolean"&&(G=d.Value?"True":"False"),{Name:d.Name,Value:G}});return[...r,p,...k]}#a(n){return n.controls.map(t=>dt(t.value))}#p(n){if(!n||n?.indexOf("T")===-1)return{time:n??"13:00"};let t=new Date(n),o={time:`${(""+t.getHours()).padStart(2,"0")}:${(""+t.getMinutes()).padStart(2,"0")}`};return n.indexOf("T")!==-1&&(o.date=t.toISOString().split("T")[0]),o}removeOptionFromFormGroup(n){let t=n.name;t&&(this.optionsForm.controls.advancedOptions.removeControl(t),this.selectedOptions.update(o=>(o=o.filter(i=>i.name!==t),o)))}addOptionToFormGroup(n,t){let o=this.optionsForm.controls.advancedOptions;this.createFormField(o,n,t??n.defaultValue),this.selectedOptions.update(i=>(i.push(n),i))}addFreeTextOption(n,t,o){let i=this.optionsForm.controls.advancedOptions,r=A({name:n,type:"String",defaultValue:t},o);this.createFormField(i,r,t),this.selectedOptions.update(p=>(p.push(r),p))}createFormField(n,t,o){if(t.type==="String"||t.type==="FileTree"||t.type==="FolderTree"||t.type==="Password"||t.type==="Enumeration"||t.type==="NonValidatedSelectableString"||t.type==="Path"){n.addControl(t.name,_e.control(o));return}if(t.type==="Size"){let i=(o??"").replace(/[0-9]/g,""),r=(o??"").replace(/[^0-9]/g,"");n.addControl(t.name,_e.group({size:_e.control(r?parseInt(r):50),unit:_e.control(i?i.toUpperCase():"MB")}));return}if(t.type==="Integer"){n.addControl(t.name,_e.control(o?parseInt(o):0));return}if(t.type==="Boolean"){n.addControl(t.name,_e.control(o==="true"||o==="True"));return}if(t.type==="Flags"){n.addControl(t.name,_e.control(o??""));return}if(t.type==="Timespan"){n.addControl(t.name,_e.control(o,[Te.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(n,t,o=!1){let i=ke.find(E=>E.customKey===n||E.key===n),r=i?.key,p=this.destinationOptions().find(E=>E.Key===r),f=this.httpOptions();if(!p||!p.Options)return;let k=i&&i.oauthField?i.oauthField:null,d=i&&i.customFields?i.customFields:{},G=i&&i.dynamicFields?i.dynamicFields:[],B=i&&i.advancedFields?i.advancedFields:[],O=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:k,custom:[],dynamic:[],advanced:[]});let K=_e.group({}),ae=_e.group({}),W=_e.group({});d&&Object.entries(d).forEach(([E,P],L)=>{let de=P,{formElement:M}=de,Y=bt(de,["formElement"]);K.addControl(E,M(t?.custom[E])),this.destinationFormPair.update(se=>(se.custom.push(A({order:900+L},Y)),se))});for(let E=0;E<p.Options.length;E++){let P=p.Options[E];if(P.Deprecated)continue;let L=G.find(M=>M===P.Name||M.name===P.Name);if(L){let M=L&&typeof L!="string",Y=M?L?.defaultValue??P.DefaultValue:P.DefaultValue,de={name:P.Name,type:P.Type,shortDescription:P.ShortDescription??void 0,longDescription:P.LongDescription??void 0,options:P.ValidValues,order:900+E},se=M?A(A({},de),L):de,Je=t?.dynamic[P.Name]??Y??P.DefaultValue;this.createFormField(ae,se,Je),this.destinationFormPair.update(be=>(be.dynamic.push(se),be))}else{if(O.find(Fe=>Fe===P.Name))continue;let Y=B.find(Fe=>Fe===P.Name||Fe.name===P.Name),de=Y&&typeof Y!="string",se=t?.advanced[P.Name],w=se??P.DefaultValue,Je={name:P.Name,type:P.Type,shortDescription:P.ShortDescription??void 0,longDescription:P.LongDescription??void 0,options:P.ValidValues,defaultValue:w,order:900+E},be=de?A(A({},Je),Y):Je;o&&se&&(this.createFormField(W,be,w),this.selectedAdvancedFormPair.update(Fe=>(Fe.push(be),Fe))),this.destinationFormPair.update(Fe=>(Fe.advanced.push(be),Fe))}}for(let E=0;E<f.length;E++){let P=f[E],L=t?.advanced[P.name],M=L??P.defaultValue;o&&L&&(this.createFormField(W,P,M),this.selectedHttpOptions.update(Y=>(Y.push(P),Y)))}this.destinationFormPair.update(E=>({oauthField:E.oauthField,custom:E.custom.sort((P,L)=>P.order-L.order),dynamic:E.dynamic.sort((P,L)=>P.order-L.order),advanced:E.advanced.sort((P,L)=>P.order-L.order)})),this.destinationForm.controls.destinations.push(an({key:i?.customKey??n,customGroup:K,dynamicGroup:ae,advancedGroup:W}))}#c(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleForm.reset(),this.optionsForm.reset()}static \u0275fac=function(t){return new(t||e)};static \u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})};var Ln=["formRef"],Un=(e,n,t,o)=>({index:e,formView:n,formGroupName:"custom",destinationType:t,oauthField:o}),St=e=>({$implicit:e}),Vn=(e,n,t,o)=>({index:e,formView:n,formGroupName:"dynamic",destinationType:t,oauthField:o}),Bn=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",destinationType:t,oauthField:o}),Kn=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",asHttpOptions:!0,destinationType:t,oauthField:o}),zn=()=>({maxWidth:"700px",width:"100%"});function Xn(e,n){e&1&&(g(0,5,2),m(1,"spk-icon"),C())}function Hn(e,n){e&1&&I(0,5,3)}function jn(e,n){if(e&1){let t=v();g(0,5,1),s(1,"button",21),y("click",function(){T(t);let i=c();return h(i.testDestination())}),_(2,Xn,2,0)(3,Hn,1,0),a(),C()}if(e&2){let t=c();l(),Ne("success",t.successfulTest()),l(),D(t.successfulTest()?2:3)}}function Wn(e,n){if(e&1){let t=v();s(0,"p",27),y("click",function(){T(t);let i=c();return h(i.removeDestinationFormGroup(i.destinationCount()-1))}),g(1,8),m(2,"span",28),C(),a()}}function qn(e,n){if(e&1){let t=v();s(0,"div",34),y("click",function(){let i=T(t).$implicit,r=c(2);return h(r.addDestinationFormGroup(i.key))}),s(1,"h3"),S(2),a(),s(3,"p"),S(4),a()()}if(e&2){let t=n.$implicit;l(2),Pt(t.displayName),l(2),Pt(t.description)}}function Qn(e,n){if(e&1){let t=v();s(0,"button",35,1),y("click",function(){let i=T(t).$implicit,r=c(2);return h(r.addDestinationFormGroup(i.key))}),S(2),a()}if(e&2){let t=n.$implicit;l(2),z(" ",t.displayName," ")}}function Yn(e,n){if(e&1&&(s(0,"div",29),pe(1,qn,5,2,"div",30,le),a(),s(3,"spk-menu",31)(4,"button",32),I(5,9),a(),X(6,20),pe(7,Qn,3,1,"button",33,le),H(),a()),e&2){let t=c();l(),ce(t.destinationTypeOptionsFocused()),l(2),u("searchable",!0),l(4),ce(t.destinationTypeOptionsNotFocused())}}function Zn(e,n){e&1&&He(0)}function Jn(e,n){if(e&1&&_(0,Zn,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;c();let r=ue(29),p=c();u("ngTemplateOutlet",r)("ngTemplateOutletContext",je(7,St,We(2,Un,i,o,(t=p.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function eo(e,n){e&1&&He(0)}function to(e,n){if(e&1&&_(0,eo,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;c();let r=ue(29),p=c();u("ngTemplateOutlet",r)("ngTemplateOutletContext",je(7,St,We(2,Vn,i,o,(t=p.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function no(e,n){if(e&1){let t=v();g(0,10,1),s(1,"button",35,1),y("click",function(){let i=T(t).$implicit,r=c(2);return h(r.addAdvancedFormPair(i,0))}),a(),C()}if(e&2){let t=n.$implicit;l(),Et(t.name),yt(0)}}function oo(e,n){e&1&&He(0)}function io(e,n){if(e&1&&_(0,oo,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;c();let r=ue(29),p=c();u("ngTemplateOutlet",r)("ngTemplateOutletContext",je(7,St,We(2,Bn,i,o,(t=p.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function ro(e,n){if(e&1){let t=v();g(0,11,1),s(1,"button",35,1),y("click",function(){let i=T(t).$implicit,r=c(2);return h(r.addHttpOption(i,0))}),a(),C()}if(e&2){let t=n.$implicit;l(),Et(t.name),yt(0)}}function ao(e,n){e&1&&He(0)}function so(e,n){if(e&1&&_(0,ao,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;c();let r=ue(29),p=c();u("ngTemplateOutlet",r)("ngTemplateOutletContext",je(7,St,We(2,Kn,i,o,(t=p.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function lo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function po(e,n){if(e&1&&(s(0,"app-file-tree",43)(1,"label",47),S(2),_(3,lo,3,1,"spk-tooltip",48),a(),m(4,"input",49),a()),e&2){let t,o=c().$implicit,i=c(2);u("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name))("accepts",o.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),D(o.formView.longDescription?3:-1),l(),V("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),me("formControlName",o.formView.name)}}function co(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function mo(e,n){if(e&1&&(s(0,"app-file-tree",44)(1,"label",47),S(2),_(3,co,3,1,"spk-tooltip",48),a(),m(4,"input",49),a()),e&2){let t,o=c().$implicit,i=c(2);u("hideShortcuts",!0)("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name)),l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),D(o.formView.longDescription?3:-1),l(),V("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),me("formControlName",o.formView.name)}}function uo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function _o(e,n){e&1&&(s(0,"spk-icon",51),S(1,"link"),a())}function Fo(e,n){e&1&&(s(0,"spk-icon",51),S(1,"envelope"),a())}function go(e,n){e&1&&(s(0,"spk-icon",51),S(1,"textbox"),a())}function Co(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",47),S(2),_(3,uo,3,1,"spk-tooltip",48),a(),m(4,"input",50),_(5,_o,2,0,"spk-icon",51)(6,Fo,2,0,"spk-icon",51)(7,go,2,0,"spk-icon",51),a()),e&2){let t,o=c().$implicit;l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),D(o.formView.longDescription?3:-1),l(),V("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),me("formControlName",o.formView.name),u("type",o.formView.type==="Email"?"email":"text"),l(),D(o.formView.type==="Path"?5:o.formView.type==="Email"?6:7)}}function So(e,n){if(e&1){let t=v();s(0,"span",55),y("click",function(){T(t);let i=c(2).$implicit,r=c(2);return h(r.oauthStartTokenCreation(i.destinationType))}),S(1,"AuthID"),a()}}function fo(e,n){e&1&&(s(0,"spk-icon",51),S(1,"password"),a())}function To(e,n){if(e&1){let t=v();s(0,"spk-icon",56),y("click",function(){T(t);let i=c(2).$implicit;return h(i.formView.showPassword=!i.formView.showPassword)}),S(1," eye "),a()}}function ho(e,n){if(e&1){let t=v();s(0,"spk-icon",56),y("click",function(){T(t);let i=c(2).$implicit;return h(i.formView.showPassword=!i.formView.showPassword)}),S(1," eye-slash "),a()}}function Do(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",47),S(2),a(),m(3,"input",52),_(4,So,2,0,"span",53)(5,fo,2,0,"spk-icon",51)(6,To,2,0,"spk-icon",54)(7,ho,2,0,"spk-icon",54),a()),e&2){let t,o=c().$implicit;l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),V("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),me("formControlName",o.formView.name),u("type",o.formView.showPassword?"text":"password"),l(),D(o.oauthField===o.formView.name?4:5),l(2),D(o.formView.showPassword?6:7)}}function Eo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(3).$implicit;u("message",t.formView.longDescription)}}function yo(e,n){if(e&1&&S(0),e&2){let t=n.$implicit;z(" ",t," ")}}function Po(e,n){if(e&1&&(s(0,"spk-select",57)(1,"label",47),S(2),_(3,Eo,3,1,"spk-tooltip",48),a(),m(4,"input",49),a(),_(5,yo,1,1,"ng-template",null,3,qe)),e&2){let t,o=ue(6);c();let i=Ot(0),r=c().$implicit;u("options",i)("isClearable",!1)("optionTemplate",o),l(),V("for","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),l(),z(" ",(t=r.formView.shortDescription)!==null&&t!==void 0?t:r.formView.name," "),l(),D(r.formView.longDescription?3:-1),l(),V("id","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),me("formControlName",r.formView.name)}}function Ao(e,n){if(e&1&&(At(0),_(1,Po,7,14)),e&2){let t=c().$implicit,o=Nt(t.formView.loadOptions?t.formView.loadOptions(c(2).injector)():t.formView.options);l(),D(o?1:-1)}}function No(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(3).$implicit;u("message",t.formView.longDescription)}}function Oo(e,n){if(e&1&&S(0),e&2){let t=n.$implicit;Ut(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function ko(e,n){if(e&1&&(s(0,"spk-select",59)(1,"label",47),S(2),_(3,No,3,1,"spk-tooltip",48),a(),m(4,"input",49),a(),_(5,Oo,1,2,"ng-template",null,4,qe)),e&2){let t,o=ue(6);c();let i=Ot(0),r=c().$implicit;u("options",i)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",o),l(),V("for","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),l(),z(" ",(t=r.formView.shortDescription)!==null&&t!==void 0?t:r.formView.name," "),l(),D(r.formView.longDescription?3:-1),l(),V("id","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),me("formControlName",r.formView.name)}}function $o(e,n){e&1&&m(0,"spk-progress-bar",58)}function Io(e,n){if(e&1&&(At(0),_(1,ko,7,15)(2,$o,1,0,"spk-progress-bar",58)),e&2){let t=c().$implicit,o=Nt(t.formView.loadOptions?t.formView.loadOptions(c(2).injector)():t.formView.options);l(),D(o?1:2)}}function Mo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function Ro(e,n){if(e&1&&(s(0,"div",45)(1,"label",47),S(2),_(3,Mo,3,1,"spk-tooltip",48),a(),s(4,"div",60)(5,"spk-form-field"),m(6,"input",61),s(7,"spk-icon",51),S(8,"resize"),a()(),s(9,"spk-select",62),m(10,"input",63),a()()()),e&2){let t,o=c().$implicit,i=c(2);u("formGroupName",o.formView.name),l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),D(o.formView.longDescription?3:-1),l(3),V("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(3),u("options",i.sizeOptions())("inlineSearch",!0)}}function xo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function vo(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",47),S(2),_(3,xo,3,1,"spk-tooltip",48),a(),m(4,"input",64),s(5,"spk-icon",51),S(6,"numpad"),a()()),e&2){let t,o=c().$implicit;l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),D(o.formView.longDescription?3:-1),l(),V("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),me("formControlName",o.formView.name)}}function wo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function bo(e,n){if(e&1&&(s(0,"spk-toggle",46)(1,"label",47),S(2),_(3,wo,3,1,"spk-tooltip",48),a(),m(4,"input",65),a()),e&2){let t,o=c().$implicit;l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),D(o.formView.longDescription?3:-1),l(),V("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),me("formControlName",o.formView.name)}}function Go(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function Lo(e,n){if(e&1&&S(0),e&2){let t=n.$implicit;z(" ",t," ")}}function Uo(e,n){if(e&1&&(s(0,"spk-select",66)(1,"label",47),S(2),_(3,Go,3,1,"spk-tooltip",48),a(),m(4,"input",67),a(),_(5,Lo,1,1,"ng-template",null,4,qe)),e&2){let t,o=ue(6),i=c().$implicit;u("options",i.formView.options)("selectMultiple",!0)("optionTemplate",o),l(),Lt("for","destination-",i.formGroupName,"-",i.index,""),l(),z(" ",(t=i.formView.shortDescription)!==null&&t!==void 0?t:i.formView.name," "),l(),D(i.formView.longDescription?3:-1),l(),me("formControlName",i.formView.name)}}function Vo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function Bo(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",47),S(2),_(3,Vo,3,1,"spk-tooltip",48),a(),m(4,"input",49),a()),e&2){let t,o=c().$implicit;l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),D(o.formView.longDescription?3:-1),l(),V("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),me("formControlName",o.formView.name)}}function Ko(e,n){if(e&1){let t=v();s(0,"button",68),y("click",function(){T(t);let i=c().$implicit,r=c(2);return h(r.removeFormView(i.formView,0))}),s(1,"spk-icon"),S(2,"x-circle"),a()()}}function zo(e,n){if(e&1&&(s(0,"div",41),X(1,42),_(2,po,5,17,"app-file-tree",43)(3,mo,5,13,"app-file-tree",44)(4,Co,8,13,"spk-form-field")(5,Do,8,13,"spk-form-field")(6,Ao,2,2)(7,Io,3,2)(8,Ro,11,13,"div",45)(9,vo,7,11,"spk-form-field")(10,bo,5,11,"spk-toggle",46)(11,Uo,7,9)(12,Bo,5,11,"spk-form-field"),H(),_(13,Ko,3,0,"button",32),a()),e&2){let t=n.$implicit;Ne("single-field",t.formGroupName!=="advanced"),l(),u("formGroupName",t.formGroupName),l(),D(t.formView.type==="FileTree"?2:t.formView.type==="FolderTree"?3:t.formView.type==="String"||t.formView.type==="Path"||t.formView.type==="Email"?4:t.formView.type==="Password"?5:t.formView.type==="Enumeration"?6:t.formView.type==="NonValidatedSelectableString"?7:t.formView.type==="Size"?8:t.formView.type==="Integer"?9:t.formView.type==="Boolean"?10:t.formView.type==="Flags"?11:t.formView.type==="Timespan"?12:-1),l(11),D(t.formGroupName==="advanced"?13:-1)}}function Xo(e,n){if(e&1&&(X(0,22)(1,36),pe(2,Jn,1,9,"ng-container",null,le),pe(4,to,1,9,"ng-container",null,le),s(6,"app-toggle-card",37),X(7,38),g(8,10),s(9,"spk-menu",31)(10,"button",39),m(11,"spk-icon"),a(),X(12,20),pe(13,no,3,1,"button",33,le),H(),a(),C(),H(),pe(15,io,1,9,"ng-container",null,le),a(),s(17,"app-toggle-card",37),X(18,38),g(19,11),s(20,"spk-menu",31)(21,"button",39),m(22,"spk-icon"),a(),X(23,20),pe(24,ro,3,1,"button",33,le),H(),a(),C(),H(),pe(26,so,1,9,"ng-container",null,le),a(),_(28,zo,14,5,"ng-template",null,2,qe),H()()),e&2){let t=c();l(2),ce(t.destinationFormPair().custom),l(2),ce(t.destinationFormPair().dynamic),l(2),u("disallowToggle",!0),l(3),u("searchable",!0),l(),u("disabled",t.notSelectedAdvancedFormPair().length===0),l(3),ce(t.notSelectedAdvancedFormPair()),l(2),ce(t.selectedAdvancedFormPair()),l(2),u("disallowToggle",!0),l(3),u("searchable",!0),l(),u("disabled",t.notSelectedHttpOptions().length===0),l(3),ce(t.notSelectedHttpOptions()),l(2),ce(t.selectedHttpOptions())}}function Ho(e,n){if(e&1){let t=v();s(0,"spk-dialog",69),nt("isOpenChange",function(i){T(t);let r=c();return tt(r.targetUrlDialogOpen,i)||(r.targetUrlDialogOpen=i),h(i)}),s(1,"header",70)(2,"h2"),I(3,12),a(),s(4,"spk-alert",71),I(5,13),a()(),s(6,"div",72)(7,"spk-form-field"),m(8,"textarea",73),a()(),s(9,"footer",74)(10,"button",24),y("click",function(){T(t);let i=c();return h(i.closeTargetUrlDialog(!1))}),S(11,"Cancel"),a(),s(12,"button",75),y("click",function(){T(t);let i=c();return h(i.closeTargetUrlDialog(!0))}),g(13,14),m(14,"spk-icon"),C(),a()()()}if(e&2){let t=c();et("isOpen",t.targetUrlDialogOpen),u("options",ot(3,zn)),l(8),u("formControl",t.targetUrlCtrl)}}var jo=["Bytes","KB","MB","GB","TB","PB"],Ct=new q,rn=(e={destinations:[]})=>Ct.group({destinations:Ct.array(e.destinations)}),an=({key:e,customGroup:n,dynamicGroup:t,advancedGroup:o})=>Ct.group({destinationType:Ct.control(e),custom:n,dynamic:t,advanced:o}),wt=class e{#e=$(J);#t=$(fe);#o=$(Bt);#i=$(Ge);#n=$(re);#r=$(zt);injector=$(Gt);formRef=ge.required("formRef");destinationForm=this.#n.destinationForm;destinationFormPair=this.#n.destinationFormPair;selectedAdvancedFormPair=this.#n.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#n.notSelectedAdvancedFormPair;selectedHttpOptions=this.#n.selectedHttpOptions;notSelectedHttpOptions=this.#n.notSelectedHttpOptions;destinationOptions=this.#n.destinationOptions;destinationFormSignal=this.#n.destinationFormSignal;destinationCount=b(()=>this.destinationFormSignal()?.destinations?.length??0);sizeOptions=N(jo);successfulTest=N(!1);destinationTypeOptionsInFocus=N(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=N(ke.map(n=>({key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description})));destinationTypeOptionsFocused=b(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(i=>i.key===o))});destinationTypeOptionsNotFocused=b(()=>{let n=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(o=>!n.includes(o.key))});getFormFieldValue(n,t,o){return((this.destinationForm.controls.destinations.controls?.[n]).controls?.[t]).controls[o].value}addDestinationFormGroup(n){this.#n.addDestinationFormGroup(n)}addAdvancedFormPair(n,t){this.#n.addAdvancedFormPair(n,t)}removeFormView(n,t){this.#n.removeAdvancedFormPair(n,t)}addHttpOption(n,t){this.#n.addHttpOption(n,t)}targetUrl=b(()=>this.#n.getCurrentTargetUrl()[0]);targetUrlCtrl=new pt;targetUrlInitial=N(null);targetUrlDialogOpen=N(!1);openTargetUrlDialog(){let t=this.#n.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(t),this.targetUrlInitial.set(t),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl.value,o=this.targetUrlInitial();!n||t===o||this.#n.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(n=0){let o=this.#n.getCurrentTargetUrl()[n];o&&this.#i.postApiV1RemoteoperationTest({requestBody:{path:o}}).subscribe({next:()=>{this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3)},error:i=>{let r=i.error.error.Error;if(r==="missing-folder"&&this.#r.open(Qe,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`},closed:p=>{p&&this.#i.postApiV1RemoteoperationCreate({requestBody:{path:o}}).subscribe()}}),r.startsWith("incorrect-cert:")){let p=r.split("incorrect-cert:")[1];this.#r.open(Qe,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
|
|
1
|
+
import{a as Ve}from"./chunk-XC6KYSRC.js";import{a as kt,b as Wt}from"./chunk-DNHLTHLR.js";import{a as U}from"./chunk-NV2YMSSM.js";import{a as qt}from"./chunk-CR2UB7UZ.js";import{a as ut}from"./chunk-3YOT5OAB.js";import{a as lt}from"./chunk-CMXSHXAU.js";import{a as Qe}from"./chunk-OS4AAJLB.js";import{a as Ue,b as oe,c as Te,d as ie,e as he,f as pt,g as Ht,h as De,i as Re,l as ct,m as Ee,n as xe,o as jt,p as ye,q,r as mt,s as Pe}from"./chunk-LHSJLKCF.js";import{a as fe,c as J}from"./chunk-WBNOGAKJ.js";import{a as ee,b as rt,d as Kt,e as zt,g as Me,l as te,n as Xt,o as at,r as ne,x as Le,y as st}from"./chunk-PUSUA4U7.js";import{b as Ge}from"./chunk-L3T52MCL.js";import{c as Bt}from"./chunk-4XPN5ZGE.js";import{ia as Vt}from"./chunk-3GK4TNUH.js";import{A as Tt,Ab as s,Bb as a,Cb as m,D as Xe,Db as X,Eb as H,Fb as He,Gb as v,Lc as b,Mb as g,Mc as it,Nb as C,Ob as I,Pb as Et,Qa as l,Qb as yt,R as Ie,Rb as we,Sb as y,Tb as c,Wb as me,X as $,Xa as ge,Yb as Lt,Zb as V,ca as T,cc as Ce,da as h,db as Z,dc as Se,ec as ue,fc as S,gc as Pt,ha as Gt,hc as z,ib as _,ic as Ut,kc as et,l as ft,lc as tt,mc as nt,nc as At,oa as ht,oc as Nt,p as ze,pa as Dt,pc as Ot,rb as u,rc as ot,sa as N,sc as je,tb as Ne,uc as We,wb as D,xb as le,yb as pe,yc as qe,zb as ce}from"./chunk-PTC4N7TU.js";import{a as A,c as bt}from"./chunk-7CGTOI24.js";var _t=class e{fromString(n){if(!n)return null;let t=n.match(/(\d+)([smhDWMY])/);return t&&{value:parseInt(t[1]),unit:t[2]}}toString(n,t){return`${n}${t}`}static \u0275fac=function(t){return new(t||e)};static \u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})};var Ae=class e{#e=$(Ge);s3Providers=U(this.getS3Config("Providers"));s3Regions=U(this.getS3Config("Regions"));s3RegionHosts=U(this.getS3Config("RegionHosts"));s3StorageClasses=U(this.getS3Config("StorageClasses"));storjSatellites=U(this.getStorjConfig("Satellites"));storjAuthenticationMethods=U(this.getStorjConfig("AuthenticationMethods"));openstackProviders=U(this.getOpenstackConfig("Providers"));openstackVersions=U(this.getOpenstackConfig("Versions"));gcsLocations=U(this.getGcsConfig("Locations"));gcsStorageClasses=U(this.getGcsConfig("StorageClasses"));getS3Config(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":n}}).pipe(ze(t=>this.#t(t)))}createS3IamUser(n,t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":n,"s3-password":t}})}createS3PolicyIAM(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:n}})}getStorjConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":n}}).pipe(ze(t=>this.#t(t)))}getOpenstackConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":n}}).pipe(ze(t=>this.#t(t)))}getGcsConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":n}}).pipe(ze(t=>this.#t(t)))}#t(n){return(n.Result&&typeof n.Result=="object"&&Object.entries(n.Result).map(([t,o])=>({key:t,value:o})))??[]}static \u0275fac=function(t){return new(t||e)};static \u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})};function ve(e){return e==null?"":":"+e.toString()}function Q(e){return e==null?"":e.startsWith("/")?e:"/"+e}function R(e,n){let t={},o={};return n.searchParams.forEach((i,r)=>{ke.find(p=>p.key===e)?.dynamicFields?.includes(r)?o[r]=decodeURIComponent(i):t[r]=decodeURIComponent(i)}),{advanced:t,dynamic:o}}function x(e,n=!1){let t=e.map(([i,r])=>`${i}=${r?encodeURIComponent(r.toString()):""}`).join("&");return t?(n?"":"?")+t:""}function dt(e){let n=e.destinationType,t=ke.find(o=>o.customKey===n||o.key===n);if(!t)throw new Error("Invalid destination type");return t?.mapper.to(e)??""}function $t(e){let n=URL.canParse(e),t=e.split("://")[0],o=e.split("://")[1],i="http://"+o;if(o.startsWith("%")&&t==="file")return ke.find(r=>r.customKey===t||r.key===t)?.mapper.from(t,new URL("http://localhost"),e);try{let r=new URL(i);return ke.find(p=>p.customKey===t||p.key===t)?.mapper.from(t,r,e)}catch(r){console.error("Error while parsing target path",r)}if(!n)throw new Error("Invalid target path");return null}var F=new q,ke=[{key:"file",displayName:"File system",description:"Store backups on your local file system.",customFields:{path:{type:"FolderTree",name:"path",shortDescription:"File path",longDescription:"The path to store the backup",formElement:e=>F.control(e??"")}},mapper:{to:e=>{let n=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${e.custom.path}${n}`},from:(e,n,t)=>{let i=t.startsWith("file:///")?t.split("file:///")[1]:t.split("file://")[1],r=i.startsWith("%"),f=i.slice(1).startsWith(":\\")||r?i:"/"+i;return A({destinationType:e,custom:{path:f}},R(e,n))}}},{key:"ssh",displayName:"SSH",description:"Store backups in SSH.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"The server to connect to",formElement:e=>F.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:e=>F.control(e??"",[Te.required,Te.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>F.control(e??"")}},dynamicFields:["auth-username"],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:"This is a path to a private key file locally on the machine",longDescription:"This is a path to a private key file locally on the machine"}],mapper:{to:e=>{let n=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+ve(t)+Q(i)+n}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"s3",displayName:"S3 compatible bucket",description:"Store backups in any S3 compatible bucket.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>F.control(e??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>F.control(e??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Ae).s3Providers},"use-ssl","auth-username","auth-password"],advancedFields:[{name:"s3-client",type:"Enumeration",options:["aws","minio"]},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Ae).s3StorageClasses}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+Q(t)+o}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},R(e,n))}},{key:"gcs",displayName:"Google Cloud Storage",description:"Store backups in Google Cloud Storage.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>F.control(e??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Ae).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Ae).gcsStorageClasses},"authid"],mapper:{to:e=>{let n=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${e.custom.path}${n}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"googledrive",displayName:"Google Drive",description:"Store backups in Google Drive.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>F.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"pcloud",displayName:"pCloud",description:"Store backups in pCloud.",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>N([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:"Server",longDescription:"Server",formElement:e=>F.control(e??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>F.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>{let o=n.pathname.replace(/^\//,"");return A({destinationType:e,custom:{server:n.hostname,path:o}},R(e,n))}}},{key:"azure",displayName:"Azure Blob Storage",description:"Store backups in Azure Blob Storage.",customFields:{path:{type:"String",name:"path",shortDescription:"Container name",longDescription:"Container name",formElement:e=>F.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=e.custom.path,t=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"onedrivev2",displayName:"OneDrive",description:"Store backups in OneDrive.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"od4b",displayName:"OneDrive Business",description:"Store backups in OneDrive Business.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>F.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>F.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+ve(t)+Q(i)+n}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"mssp",displayName:"Microsoft SharePoint",description:"Store backups in Microsoft SharePoint.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>F.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>F.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+ve(t)+Q(i)+n}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"sharepoint",displayName:"Microsoft SharePoint v2",description:"Store backups in Microsoft SharePoint.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"dropbox",displayName:"Dropbox",description:"Store backups in Dropbox.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"box",displayName:"Box.com",description:"Store backups in Box.com.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"jottacloud",displayName:"Jottacloud",description:"Store backups in Jottacloud.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"b2",displayName:"B2 Cloud Storage",description:"Store backups in B2 Cloud Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>F.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>F.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Application ID"},{name:"auth-password",shortDescription:"Application Key"}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+Q(t)+o}`},from:(e,n,t)=>A({destinationType:e,custom:{bucket:n.hostname,path:n.pathname}},R(e,n))}},{key:"e2",displayName:"IDrive e2",description:"Store backups in IDrive e2.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>F.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>F.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Access ID"},{name:"auth-password",shortDescription:"Access Secret"}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+Q(t)+o}`},from:(e,n,t)=>A({destinationType:e,custom:{bucket:n.hostname,path:n.pathname}},R(e,n))}},{key:"mega",displayName:"Mega.nz",description:"Store backups in Mega.nz.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let n=e.custom.path,t=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"msgroup",displayName:"Microsoft Office 365 Group",description:"Store backups in Microsoft Office 365 Group.",oauthField:"authid",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:"Group email",longDescription:"Group email",formElement:e=>F.control(e??"",[Te.email])},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"cloudfiles",displayName:"Rackspace CloudFiles",description:"Store backups in Rackspace CloudFiles.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>F.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>F.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let n=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+ve(t)+Q(i)+n}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"rclone",displayName:"Rclone",description:"Store backups in Rclone.",dynamicFields:[{name:"rclone-local-repository",shortDescription:"Local repository",defaultValue:""},{name:"rclone-remote-repository",shortDescription:"Remote repository",defaultValue:""},{name:"rclone-remote-path",shortDescription:"Path on remote repository",defaultValue:""}],mapper:{to:e=>{let n=e.dynamic["rclone-remote-repository"],t=e.dynamic["rclone-remote-path"],o=Object.entries(e.dynamic).filter(([r])=>!["rclone-remote-repository","rclone-remote-path"].includes(r)),i=x([...Object.entries(e.advanced),...o]);return`${e.destinationType}://${n}/${t+i}`},from:(e,n,t)=>{let{advanced:o,dynamic:i}=R(e,n);return A({destinationType:e,dynamic:A({"rclone-remote-repository":n.hostname,"rclone-remote-path":n.pathname},i)},o)}}},{key:"openstack",displayName:"OpenStack Object Storage",description:"Store backups in OpenStack Object Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket",longDescription:"Bucket",formElement:e=>F.control(e??"")}},dynamicFields:[{name:"openstack-authuri",shortDescription:"Auth URI",type:"Enumeration",loadOptions:e=>e.get(Ae).openstackProviders},{name:"openstack-version",shortDescription:"Version",type:"Enumeration",loadOptions:e=>e.get(Ae).openstackVersions},{name:"openstack-domain-name",shortDescription:"Domain name"},{name:"openstack-tenant-name",shortDescription:"Tenant name"},{name:"openstack-region",shortDescription:"Region"}],mapper:{to:e=>{let n=x([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{bucket:t}=e.custom;return`${e.destinationType}://${t+n}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},R(e,n))}},{key:"webdav",displayName:"WebDAV",description:"Store backups in WebDAV.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>F.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>F.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"},{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let{port:n,server:t,path:o}=e.custom,i=e.dynamic["use-ssl"],r=x([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([p])=>p!=="use-ssl")]);return`${e.destinationType}${i?"s":""}://${t+ve(n)+Q(o)+r}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"aftp",displayName:"FTP",description:"Store backups in FTP.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>F.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>F.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let{port:n,server:t,path:o}=e.custom,i=x([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([r])=>r!=="use-ssl")]);return`${e.destinationType}://${t+ve(n)+Q(o)+i}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"sia",displayName:"Sia Decentrilized Cloud",description:"Store backups in Sia Decentrilized Cloud.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>F.control(e??"")}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let n=e.custom.server,t=e.dynamic["sia-targetpath"],o=x([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([i])=>i!=="sia-targetpath")]);return`${e.destinationType}://${n+Q(t)+o}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.pathname}},R(e,n))}},{key:"cos",displayName:"Tencent COS",description:"Store backups in Tencent COS.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")}},dynamicFields:[{name:"cos-bucket",shortDescription:"Bucket",order:1},{name:"cos-region",shortDescription:"Region",order:2},{name:"cos-app-id",shortDescription:"COS App Id",order:3},{name:"cos-secret-id",shortDescription:"COS Secret Id",order:4},{name:"cos-secret-key",shortDescription:"COS Secret Key",order:5}],mapper:{to:e=>{let n=e.custom.path,t=x([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([o])=>o!=="cos-targetpath")]);return`${e.destinationType}://${n+t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.pathname}},R(e,n))}},{key:"tahoe",displayName:"Tahoe LAFS",description:"Store backups in Tahoe LAFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>F.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>F.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")},username:{type:"String",name:"username",shortDescription:"Username",longDescription:"Username",formElement:e=>F.control(e??"")},password:{type:"Password",name:"password",shortDescription:"Password",longDescription:"Password",formElement:e=>F.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"}],mapper:{to:e=>{let{port:n,server:t,path:o,username:i,password:r}=e.custom,p={"auth-username":i,"auth-password":r},f=e.dynamic["use-ssl"],k=x([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([d])=>d!=="use-ssl"),...Object.entries(p)]);return`${e.destinationType}${f?"s":""}://${t+ve(n)+Q(o)+k}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"cifs",displayName:"CIFS",description:"Store backups in CIFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>F.control(e??"")},share:{type:"String",name:"share",shortDescription:"Share Name",longDescription:"Share Name",formElement:e=>F.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>F.control(e??"")}},dynamicFields:["transport","auth-username","auth-password","auth-domain"],mapper:{to:e=>{let{share:n,server:t,path:o,username:i,password:r}=e.custom,p={"auth-username":i,"auth-password":r},f=x([...Object.entries(e.advanced),...Object.entries(p)]);return`${e.destinationType}://${t+Q(n)+Q(o)+f}`},from:(e,n,t)=>{let o=n.pathname.split("/")[1],i=n.pathname.split("/").slice(2).join("/");return A({destinationType:e,custom:{server:n.hostname,share:o,path:i}},R(e,n))}}},{key:"storj",customKey:"storjAccessGrant",displayName:"Storj Access Grant",description:"Store backups in Storj Access Grant.",dynamicFields:[{name:"storj-shared-access",shortDescription:"Access Grant"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server"}],mapper:{to:e=>`storj://storj.io/config?storj-auth-method=Access%20grant&storj-satellite=us1.storj.io%3A7777&storj-api-key&storj-secret&${x([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>A({destinationType:e},R(e,n))}},{key:"storj",customKey:"storjApiKey",displayName:"Storj API Key",description:"Store backups in Storj API Key.",dynamicFields:[{name:"storj-satellite",shortDescription:"Satellite",type:"Enumeration",loadOptions:e=>e.get(Ae).storjSatellites},{name:"storj-api-key",shortDescription:"API Key"},{name:"storj-secret",shortDescription:"Secret"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server"}],mapper:{to:e=>`storj://storj.io/config?storj-auth-method=API%20key&${x([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>A({destinationType:e},R(e,n))}}];var Qt=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,Ft=class e{generate(n,t=Qt){let o;do o=this.generatePassword(n,t);while(this.calculatePasswordStrength(o)<5);return o}generatePassword(n,t=Qt){let o=this;return Array.apply(null,{length:n}).map(()=>{let i;for(;;)if(i=String.fromCharCode(o.#e()),t.test(i))return i},this).join("")}calculatePasswordStrength(n){let t=1;return n.length>=8&&t++,n.match(/[a-z]/)&&n.match(/[A-Z]/)&&t++,n.match(/\d+/)&&t++,n.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&t++,Math.min(t,5)}#e(){if(window.crypto&&window.crypto.getRandomValues){let n=new Uint8Array(1);return window.crypto.getRandomValues(n),n[0]}else if(window.msCrypto&&window.msCrypto.getRandomValues){let n=new Uint8Array(1);return window.msCrypto.getRandomValues(n),n[0]}else return Math.floor(Math.random()*256)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})};var sn=["formRef"];function ln(e,n){if(e&1&&S(0),e&2){let t=n.$implicit;z(" ",t.DisplayName," ")}}function pn(e,n){if(e&1&&m(0,"spk-progress-bar",37),e&2){let t=c(3);Ne("error",t.calculatePasswordStrength()===1)("warn",t.calculatePasswordStrength()===2)("primary",t.calculatePasswordStrength()===4)("success",t.calculatePasswordStrength()===5),u("value",t.calculatePasswordStrength()*(100/5))}}function cn(e,n){e&1&&(s(0,"span",32),I(1,9),a())}function mn(e,n){e&1&&(g(0,7,1),m(1,"spk-icon"),C())}function un(e,n){e&1&&(g(0,7,2),m(1,"spk-icon"),C())}function _n(e,n){e&1&&(g(0,10,1),m(1,"spk-icon",39),C())}function dn(e,n){e&1&&(g(0,10,2),m(1,"spk-icon"),C())}function Fn(e,n){if(e&1){let t=v();s(0,"button",38),y("click",function(){T(t);let i=c(3);return h(i.copyPassword())}),g(1,10),_(2,_n,2,0)(3,dn,2,0),C(),a()}if(e&2){let t=c(3);l(2),D(t.copiedPassword()?2:3)}}function gn(e,n){e&1&&(s(0,"spk-alert",36),I(1,11),a())}function Cn(e,n){if(e&1){let t=v();s(0,"div",27)(1,"spk-form-field")(2,"label",28),g(3,6),m(4,"sup"),C(),a(),m(5,"input",29),a(),_(6,pn,1,9,"spk-progress-bar",30),s(7,"spk-form-field"),m(8,"input",31),_(9,cn,2,0,"span",32),a(),s(10,"div",33)(11,"button",34),y("click",function(){T(t);let i=c(2);return h(i.showPassword.set(!i.showPassword()))}),g(12,7),_(13,mn,2,0)(14,un,2,0),C(),a(),s(15,"button",34),y("click",function(){T(t);let i=c(2);return h(i.generatePassword())}),g(16,8),m(17,"spk-icon"),C(),a(),_(18,Fn,4,1,"button",35),a(),_(19,gn,2,0,"spk-alert",36),a()}if(e&2){let t=c(2);l(5),u("type",t.showPassword()?"text":"password"),l(),D(t.generalForm.value.password?6:-1),l(2),u("type",t.showPassword()?"text":"password"),l(),D(t.generalForm.value.repeatPassword&&t.generalForm.value.repeatPassword!==t.generalForm.value.password?9:-1),l(4),D(t.showPassword()?13:14),l(5),D(t.showCopyPassword()?18:-1),l(),D(t.generalForm.value.password&&t.generalForm.value.password===t.generalForm.value.repeatPassword?19:-1)}}function Sn(e,n){if(e&1&&(s(0,"spk-select",24)(1,"label",25),I(2,5),a(),m(3,"input",26),_(4,ln,1,1,"ng-template"),a(),_(5,Cn,20,7,"div",27)),e&2){let t=c();u("options",t.encryptionOptions())("isClearable",!1),l(5),D(t.encryptionFieldSignal()!==""?5:-1)}}function fn(e,n){if(e&1&&(s(0,"button",22),g(1,12),m(2,"spk-icon"),C(),a()),e&2){let t=c();u("disabled",t.generalForm.invalid)}}function Tn(e,n){if(e&1&&(s(0,"spk-tooltip",23)(1,"button",22),g(2,13),m(3,"spk-icon"),C(),a()()),e&2){let t=c();u("disabled",!(t.showCopyPassword()&&!t.copiedPassword())),l(),u("disabled",t.generalForm.invalid||t.showCopyPassword()&&!t.copiedPassword())}}var Be=new q,Yt=(e={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>Be.group({name:Be.control(e.name,[Te.required]),description:Be.control(e.description),encryption:Be.control(e.encryption,[Wt()]),password:Be.control(e.password,[kt(n=>n?.value.encryption!=="",[Te.required])]),repeatPassword:Be.control(e.repeatPassword,[kt(n=>n?.value.encryption!=="",[Te.required])])}),Mt={Key:"",DisplayName:"None"},It=class e{#e=$(J);#t=$(fe);#o=$(Ft);#i=$(re);#n=$(lt);formRef=ge.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=N(!1);copiedPassword=N(!1);showCopyPassword=N(!1);encryptionEffect=it(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});calculatePasswordStrength=b(()=>{let t=this.generalFormSignal()?.password??"";return this.#o.calculatePasswordStrength(t)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit()}async copyPassword(){let n=this.generalForm.controls.password.value;await this.#r(n??""),this.copiedPassword.set(!0)}async#r(n){try{await navigator.clipboard.writeText(n)}catch{try{let o=document.createElement("textarea");o.value=n,document.body.appendChild(o),o.select(),document.execCommand("copy"),document.body.removeChild(o)}catch(o){console.error("Failed to copy text: ",o)}}}displayFn(){let n=this.#n.systemInfo()?.EncryptionModules??[];return t=>{let o=[Mt,...n].find(i=>i.Key===t);return o?`${o.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let n=this.#o.generate(16);this.generalForm.controls.password.setValue(n),this.generalForm.controls.repeatPassword.setValue(n),this.showCopyPassword.set(!0)}next(){this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Z({type:e,selectors:[["app-general"]],viewQuery:function(t,o){t&1&&Ce(o.formRef,sn,5),t&2&&Se()},decls:20,vars:3,consts:()=>{let n;n=$localize`Your backup name`;let t;t=$localize`Your backup description`;let o;o=$localize`General backup settings`;let i;i=$localize` Backup name ${"\uFFFD#7\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#7\uFFFD"}:CLOSE_SUPERSCRIPT:`;let r;r=$localize`Backup description`;let p;p=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let f;f=$localize`Encryption`;let k;k=$localize`Encryption`;let d;d=$localize`Password`;let G;G=$localize`Repeat password`;let B;B=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let O;O=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,O=we(O);let K;K=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let ae;ae=$localize`Passwords do not match`;let W;W=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,W=we(W);let E;E=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let P;P=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let L;return L=$localize` Continue ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],o,i,r,p,k,B,O,K,ae,W,E,P,L,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],["for","backupName"],["type","text","tabindex","1","placeholder",n,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",t,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["message","Remember to copy the password",1,"primary",3,"disabled"],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",f,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",d,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",G,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(t,o){if(t&1){let i=v();s(0,"form",14,0),y("submit",function(){return T(i),h(o.next())}),s(2,"h3",15),I(3,1),a(),s(4,"spk-form-field")(5,"label",16),g(6,2),m(7,"sup"),C(),a(),m(8,"input",17),a(),s(9,"spk-form-field")(10,"label",18),I(11,3),a(),m(12,"textarea",19),a(),_(13,Sn,6,3),s(14,"div",20)(15,"button",21),y("click",function(){return T(i),h(o.exit())}),g(16,4),m(17,"spk-icon"),C(),a(),_(18,fn,3,1,"button",22)(19,Tn,4,2,"spk-tooltip",23),a()()}t&2&&(u("formGroup",o.generalForm),l(13),D(o.isNew()?13:-1),l(5),D(o.encryptionFieldSignal()===""?18:19))},dependencies:[Pe,De,oe,ie,he,Ee,ye,te,ne,Me,ee,at,rt,st],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-500)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}"],changeDetection:0})};var hn=["formRef"],Dn=()=>["encryption-module","--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","no-encryption"];function En(e,n){e&1&&(g(0,2,1),m(1,"spk-icon",13),C())}function yn(e,n){e&1&&(s(0,"p",13),I(1,7),a())}var Ke=new q,Zt=["Bytes","KB","MB","GB","TB","PB"],Pn=[{value:"",name:$localize`Keep all backups`},{value:"time",name:$localize`Delete backups that are older than`},{value:"versions",name:$localize`Keep a specific number of backups`},{value:"smart",name:$localize`Smart backup retention`},{value:"custom",name:$localize`Custom backup retention`}],An=1024*1024*1024*2,Nn=1024*1024*5,Jt=(e={remoteVolumeSize:50,size:"MB",backupRetention:"",advancedOptions:[]})=>Ke.group({remoteVolumeSize:Ke.group({size:Ke.control(e.remoteVolumeSize),unit:Ke.control(e.size)}),backupRetention:Ke.control(e.backupRetention),advancedOptions:Ke.group({})}),Rt=class e{#e=$(re);#t=$(J);#o=$(fe);formRef=ge.required("formRef");optionsForm=this.#e.optionsForm;selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;settings=this.#e.settings;sizeOptions=N(Zt);retentionOptions=N(Pn);volumeSizeSignal=U(this.optionsForm.controls.remoteVolumeSize.get("size")?.valueChanges.pipe(Tt(300))??ft(null));volumeUnitSignal=U(this.optionsForm.controls.remoteVolumeSize.get("unit")?.valueChanges.pipe(Tt(300))??ft(null));exceededVolumeSize=b(()=>{let n=this.volumeSizeSignal()??this.optionsForm.controls.remoteVolumeSize.get("size")?.value,t=this.volumeUnitSignal()??this.optionsForm.controls.remoteVolumeSize.get("unit")?.value;if(n==null||t===null||t===void 0)return!1;let o=n*Math.pow(1024,Zt.indexOf(t));return o>An||o<Nn});goBack(){this.#t.navigate(["schedule"],{relativeTo:this.#o.parent})}submit(){this.#e.submit()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Z({type:e,selectors:[["app-advanced-options-settings"]],viewQuery:function(t,o){t&1&&Ce(o.formRef,hn,5),t&2&&Se()},decls:30,vars:12,consts:()=>{let n;n=$localize`Select an option...`;let t;t=$localize`Options`;let o;o=$localize` Remote volume size ${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/*9:1\uFFFD"}:CLOSE_BLOCK_IF:`;let i;i=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#16\uFFFD"}:START_LINK: Read more ${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-square-out${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#16\uFFFD"}:CLOSE_LINK:`;let r;r=$localize`Backup retention`;let p;p=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let f;f=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `;let k;return k=$localize` The chosen size is outside the recommended range. This may cause performance issues, excessively large temporary files or other problems. `,[["formRef",""],t,o,i,r,p,f,k,[3,"submit","formGroup"],[1,"title-30"],[1,"remote-volume-wrap"],["formGroupName","remoteVolumeSize",1,"row-inputs"],["for","size"],[1,"warning"],["type","number","id","size","formControlName","size"],["placeholder",n,3,"options","inlineSearch"],["type","text","formControlName","unit"],["href","https://forum.duplicati.com/t/choosing-sizes-in-duplicati/17683","target","_blank",1,"spk-primary"],["suffix",""],["value","value","label","name",3,"options","inlineSearch"],["type","text","formControlName","backupRetention"],[3,"optionsChange","options","hiddenOptions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(t,o){if(t&1){let i=v();s(0,"form",8,0),y("submit",function(){return T(i),h(o.submit())}),s(2,"h3",9),I(3,1),a(),s(4,"div",10)(5,"div",11)(6,"spk-form-field")(7,"label",12),g(8,2),_(9,En,2,0,"spk-icon",13),C(),a(),m(10,"input",14),a(),s(11,"spk-select",15),m(12,"input",16),a()(),_(13,yn,2,0,"p",13),s(14,"p"),g(15,3),s(16,"a",17),m(17,"spk-icon",18),a(),C(),a()(),s(18,"spk-select",19)(19,"label",12),I(20,4),a(),m(21,"input",20),a(),s(22,"app-options-list",21),nt("optionsChange",function(p){return T(i),tt(o.settings,p)||(o.settings=p),h(p)}),a(),s(23,"div",22)(24,"button",23),y("click",function(){return T(i),h(o.goBack())}),g(25,5),m(26,"spk-icon"),C(),a(),s(27,"button",24),g(28,6),m(29,"spk-icon"),C(),a()()()}t&2&&(u("formGroup",o.optionsForm),l(9),D(o.exceededVolumeSize()?9:-1),l(2),u("options",o.sizeOptions())("inlineSearch",!0),l(2),D(o.exceededVolumeSize()?13:-1),l(5),u("options",o.retentionOptions())("inlineSearch",!0),l(4),et("options",o.settings),u("hiddenOptions",ot(11,Dn)),l(5),Ne("loader",o.isSubmitting()))},dependencies:[Pe,De,oe,Re,ie,he,Ee,ye,xe,qt,Me,ee,te,ne],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 40px;align-items:flex-end}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};var On=["formRef"];function kn(e,n){if(e&1){let t=v();s(0,"div",26)(1,"spk-form-field")(2,"label",27),I(3,8),a(),s(4,"input",28,1),y("focus",function(){T(t);let i=ue(5);return h(i.showPicker())}),a(),s(6,"spk-icon",29),S(7,"clock"),a()(),s(8,"spk-form-field"),m(9,"label",30),s(10,"input",31,2),y("focus",function(){T(t);let i=ue(11);return h(i.showPicker())}),a(),s(12,"spk-icon",29),S(13,"calendar"),a()()(),X(14,32),s(15,"div",33)(16,"spk-form-field")(17,"label",34),I(18,9),a(),m(19,"input",35),a(),s(20,"spk-select",36),m(21,"input",37),a()(),s(22,"app-toggle-card",38),X(23,39),I(24,10),H(),s(25,"div",40)(26,"spk-toggle",21),g(27,11),m(28,"input",41),C(),a(),s(29,"spk-toggle",21),g(30,12),m(31,"input",42),C(),a(),s(32,"spk-toggle",21),g(33,13),m(34,"input",43),C(),a(),s(35,"spk-toggle",21),g(36,14),m(37,"input",44),C(),a(),s(38,"spk-toggle",21),g(39,15),m(40,"input",45),C(),a(),s(41,"spk-toggle",21),g(42,16),m(43,"input",46),C(),a(),s(44,"spk-toggle",21),g(45,17),m(46,"input",47),C(),a()()(),H()}if(e&2){let t=c();l(20),u("options",t.unitOptions)("isClearable",!1),l(2),u("disallowToggle",!0)}}var j=new q,en=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],tn=(e={autoRun:!0,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}})=>j.group({autoRun:j.control(e.autoRun),nextTime:j.group({time:j.control(e.nextTime.time),date:j.control(e.nextTime.date)}),runAgain:j.group({repeatValue:j.control(e.runAgain.repeatValue),repeatUnit:j.control(e.runAgain.repeatUnit),allowedDays:j.group({mon:j.control(e.runAgain.allowedDays.mon),tue:j.control(e.runAgain.allowedDays.tue),wed:j.control(e.runAgain.allowedDays.wed),thu:j.control(e.runAgain.allowedDays.thu),fri:j.control(e.runAgain.allowedDays.fri),sat:j.control(e.runAgain.allowedDays.sat),sun:j.control(e.runAgain.allowedDays.sun)})})}),xt=class e{#e=$(re);#t=$(J);#o=$(fe);formRef=ge.required("formRef");scheduleForm=this.#e.scheduleForm;scheduleFormSignal=this.#e.scheduleFormSignal;unitOptions=en;displayFn(n){let t=en.find(o=>o.key===n);return t?`${t.label}`:""}goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#o.parent})}next(){this.#t.navigate(["options"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Z({type:e,selectors:[["app-schedule"]],viewQuery:function(t,o){t&1&&Ce(o.formRef,On,5),t&2&&Se()},decls:18,vars:2,consts:()=>{let n;n=$localize`Schedule`;let t;t=$localize` Automatically run backups ${"\uFFFD#7\uFFFD\uFFFD/#7\uFFFD"}:TAG_INPUT:`;let o;o=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let r;r=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let p;p=$localize`Next time`;let f;f=$localize`Run again every`;let k;k=$localize`Allowed days`;let d;d=$localize` Monday ${"\uFFFD#28\uFFFD\uFFFD/#28\uFFFD"}:TAG_INPUT:`;let G;G=$localize` Tuesday ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let B;B=$localize` Wednesday ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let O;O=$localize` Thursday ${"\uFFFD#37\uFFFD\uFFFD/#37\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Friday ${"\uFFFD#40\uFFFD\uFFFD/#40\uFFFD"}:TAG_INPUT:`;let ae;ae=$localize` Saturday ${"\uFFFD#43\uFFFD\uFFFD/#43\uFFFD"}:TAG_INPUT:`;let W;return W=$localize` Sunday ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`,[["formRef",""],["timeRef",""],["dateRef",""],n,t,o,i,r,p,f,k,d,G,B,O,K,ae,W,[3,"submit","formGroup"],[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox","formControlName","autoRun"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["formGroupName","nextTime",1,"row-inputs"],["for","time"],["type","time","id","time","formControlName","time",3,"focus"],["suffix",""],["for","date"],["type","date","id","date","formControlName","date",3,"focus"],["formGroupName","runAgain"],[1,"row-inputs"],["for","repeatValue"],["type","number","id","repeatValue","formControlName","repeatValue"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit","formControlName","repeatUnit"],["formGroupName","allowedDays",3,"disallowToggle"],["title",""],[1,"days-wrap"],["type","checkbox","formControlName","mon"],["type","checkbox","formControlName","tue"],["type","checkbox","formControlName","wed"],["type","checkbox","formControlName","thu"],["type","checkbox","formControlName","fri"],["type","checkbox","formControlName","sat"],["type","checkbox","formControlName","sun"]]},template:function(t,o){if(t&1){let i=v();s(0,"form",18,0),y("submit",function(){return T(i),h(o.next())}),s(2,"h3",19),I(3,3),a(),s(4,"div",20)(5,"spk-toggle",21),g(6,4),m(7,"input",22),C(),a(),s(8,"p"),I(9,5),a()(),_(10,kn,47,3),s(11,"div",23)(12,"button",24),y("click",function(){return T(i),h(o.goBack())}),g(13,6),m(14,"spk-icon"),C(),a(),s(15,"button",25),g(16,7),m(17,"spk-icon"),C(),a()()()}if(t&2){let i;u("formGroup",o.scheduleForm),l(10),D((i=o.scheduleFormSignal())!=null&&i.autoRun?10:-1)}},dependencies:[Pe,De,oe,Re,Ue,ie,he,Ee,ye,xe,te,Le,ee,Me,ne,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;padding-bottom:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function $n(e,n){if(e&1){let t=v();s(0,"spk-select",0)(1,"input",4),y("ngModelChange",function(i){T(t);let r=c(2);return h(r.updateStateExpression(i))}),a()()}if(e&2){let t,o=c(2);u("options",o.fileGroupOptions())("isClearable",!1),l(),u("ngModel",(t=o.pathState())==null?null:t.expression)}}function In(e,n){if(e&1){let t=v();s(0,"spk-form-field")(1,"input",4),y("ngModelChange",function(i){T(t);let r=c(2);return h(r.updateStateExpression(i))}),a()()}if(e&2){let t,o=c(2);l(),u("ngModel",(t=o.pathState())==null?null:t.expression)}}function Mn(e,n){if(e&1){let t=v();s(0,"spk-select",0)(1,"input",1),y("ngModelChange",function(i){T(t);let r=c();return h(r.updateStateType(i))}),a()(),_(2,$n,2,3,"spk-select",0)(3,In,2,1,"spk-form-field"),s(4,"div",2),y("click",function(){T(t);let i=c();return h(i.removeFilter())}),s(5,"spk-icon",3),S(6,"x-circle"),a()()}if(e&2){let t,o,i=c();u("options",i.expressionOptions())("isClearable",!1),l(),u("ngModel",(t=i.pathState())==null?null:t.type),l(),D(((o=i.pathState())==null?null:o.type)==="-FileGroup"||((o=i.pathState())==null?null:o.type)==="+FileGroup"?2:3)}}var nn=[{key:"Excludes folders where name contains",value:"-FolderNameIncludes"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileNameIncludes"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],Rn=[{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"}],gt=class e{path=Dt.required();osType=Dt();pathChange=ht();remove=ht();expressionOptions=N(nn);fileGroupOptions=N(Rn);pathState=N(null);typeState=b(()=>{let n=this.pathState();return n?n.type:null});pathEffect=it(()=>{let n=this.path(),t=n.slice(1),o=n.startsWith("-")?"-":"+",i=this.osType()==="Windows",r=i?"\\":"/",p=t.startsWith("%");return t===""?this.pathState.set({type:"-Unknown",path:"___none___",expression:""}):p&&t.endsWith(r)||i&&t.slice(2).startsWith("\\")&&t.endsWith("\\")||t.startsWith(r)&&t.endsWith(r)?this.pathState.set({type:`${o}Folder`,path:t,expression:t}):t.startsWith("*")&&t.endsWith(`*${r}`)?this.pathState.set({type:`${o}FolderNameIncludes`,path:t,expression:t.slice(1,-2)}):t.startsWith("[.*")&&t.endsWith(`[^\\${r}]*]`)?this.pathState.set({type:`${o}FileNameIncludes`,path:t,expression:t.slice(3,-7)}):t.startsWith("{")&&t.endsWith("}")?this.pathState.set({type:`${o}FileGroup`,path:t,expression:t.slice(1,-1)}):t.startsWith("[")&&t.endsWith("]")?this.pathState.set({type:`${o}Regex`,path:t,expression:t.slice(1,-1)}):t.startsWith("*.")?this.pathState.set({type:`${o}Extension`,path:t,expression:t.slice(2)}):this.pathState.set({type:`${o}Expression`,path:t,expression:t})});updateStateType(n){this.pathState.update(t=>(t.type=n,t.path=this.#t(t),t)),this.#e()}updateStateExpression(n){this.pathState.update(t=>(t.expression=n,t.path=this.#t(t),t)),this.#e()}#e(){setTimeout(()=>this.pathChange.emit(this.pathState().path))}#t(n){let t=n.type.slice(0,1),o=n.type.slice(1),i=this.osType()==="Windows",r=i?"\\":"/",f=i&&!n.expression.startsWith("%")?n.expression.slice(2):n.expression,k=n.path.startsWith("%");if(o==="Unknown")return`${t}${n.expression}`;if(o==="Folder"){let d=k||f.startsWith(r),G=f.endsWith(r);return G&&d?`${t}${n.expression}`:G?`${t}${n.expression}${r}`:d?`${t}${r}${n.expression}`:`${t}${r}${n.expression}${r}`}return o==="FolderNameIncludes"?`${t}*${n.expression}*${r}`:o==="FileNameIncludes"?`${t}[.*${n.expression}[^\\${r}]*]`:o==="FileGroup"?`${t}{${n.expression}}`:o==="Regex"?`${t}[${n.expression}]`:o==="Extension"?`${t}*.${n.expression}`:`${t}${n.expression}`}removeFilter(){this.remove.emit()}displayFn(n){let t=nn.find(o=>o.value===n);return t?t.key:""}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Z({type:e,selectors:[["app-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:1,vars:1,consts:()=>{let n;return n=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",n,3,"ngModelChange","ngModel"],[1,"filter-removal",3,"click"],[1,"spk-primary"],["type","text",3,"ngModelChange","ngModel"]]},template:function(t,o){t&1&&_(0,Mn,7,4),t&2&&D(o.pathState()?0:-1)},dependencies:[mt,oe,ie,Ht,ee,te,ne],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] spk-select[_ngcontent-%COMP%]{--miw: initial}[_nghost-%COMP%] spk-form-field[_ngcontent-%COMP%]{min-width:110px}[_nghost-%COMP%] spk-form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{min-width:110px}[_nghost-%COMP%] .filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var xn=["formRef"];function vn(e,n){if(e&1){let t=v();s(0,"app-filter",42),y("pathChange",function(i){let r=T(t).$index,p=c(2);return h(p.patchPathAt(i,r))})("remove",function(){let i=T(t).$index,r=c(2);return h(r.removePathAt(i))}),a()}if(e&2){let t,o=n.$implicit,i=c(2);u("path",o)("osType",(t=i.osType())!==null&&t!==void 0?t:"")}}function wn(e,n){if(e&1&&pe(0,vn,1,2,"app-filter",41,le),e&2){let t=c();ce(t.pathArray())}}function bn(e,n){if(e&1&&(s(0,"div",40)(1,"spk-form-field"),m(2,"input",43),a(),s(3,"spk-select",44),m(4,"input",45),a()()),e&2){let t=c();l(3),u("options",t.sizeOptions())("isClearable",!1)}}var $e=new q,Gn=["Bytes","KB","MB","GB","TB","PB"],on=(e={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>$e.group({path:$e.control(e.path),excludes:$e.group({hidden:$e.control(e.excludes.hidden),system:$e.control(e.excludes.system),temporary:$e.control(e.excludes.temporary),filesLargerThan:$e.group({size:$e.control(null),unit:$e.control(null)})})}),vt=class e{#e=$(re);#t=$(J);#o=$(fe);formRef=ge.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new pt("");filesLargerThan=b(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=N(Gn);osType=this.#e.osType;pathSignal=U(this.sourceDataForm.controls.path.valueChanges);pathArray=b(()=>this.pathSignal()?.split("\0").filter(n=>n.startsWith("-")||n.startsWith("+")||n==="___none___")??[]);addFilter(n="-*"){let t=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${t}\0${n}`)}patchPathAt(n,t){let i=this.sourceDataForm.controls.path.value.split("\0").filter(p=>!p.startsWith("-")&&!p.startsWith("+")).join("\0"),r=this.pathArray().map((p,f)=>f===t?`${n}`:`${p}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${r}`)}removePathAt(n){let o=this.sourceDataForm.controls.path.value.split("\0").filter(r=>!r.startsWith("-")&&!r.startsWith("+")).join("\0"),i=this.pathArray().filter((r,p)=>p!==n).join("\0");this.sourceDataForm.controls.path.setValue(`${o}\0${i}`)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${n}\0${this.newPathCtrl.value}`),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#o.parent})}next(){this.#t.navigate(["schedule"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Z({type:e,selectors:[["app-source-data"]],viewQuery:function(t,o){t&1&&Ce(o.formRef,xn,5),t&2&&Se()},decls:55,vars:12,consts:()=>{let n;n=$localize`Path`;let t;t=$localize`Add a direct path`;let o;o=$localize`Hidden files`;let i;i=$localize`System files`;let r;r=$localize`Temporary files`;let p;p=$localize`Source Data`;let f;f=$localize`Folder path`;let k;k=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let d;d=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let G;G=$localize`Source Data`;let B;B=$localize`Add Path`;let O;O=$localize`Add a path directly from your machine.`;let K;K=$localize`Filters`;let ae;ae=$localize`Customize your filters.`;let W;W=$localize`Add filter`;let E;E=$localize`Exclude`;let P;P=$localize`Choose if there’s any files you want to exclude.`;let L;L=$localize` Hidden files ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`;let M;M=$localize` System files ${"\uFFFD#48\uFFFD\uFFFD/#48\uFFFD"}:TAG_INPUT:`;let Y;Y=$localize` Temporary files ${"\uFFFD#51\uFFFD\uFFFD/#51\uFFFD"}:TAG_INPUT:`;let de;de=$localize` Files larger than `;let se;return se=$localize`Select an option...`,[["formRef",""],p,f,k,d,G,B,O,K,ae,W,E,P,L,M,Y,de,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",n,"formControlName","path"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"row-inputs"],["type","text","placeholder",t,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",o,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",r,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],["type","number","formControlName","size"],[3,"options","isClearable"],["type","text","formControlName","unit","placeholder",se]]},template:function(t,o){if(t&1){let i=v();s(0,"form",17,0),y("submit",function(){return T(i),h(o.next())}),s(2,"div",18)(3,"h3",19),I(4,1),a(),s(5,"app-file-tree",20)(6,"label",21),I(7,2),a(),m(8,"input",22),a(),s(9,"div",23)(10,"button",24),y("click",function(){return T(i),h(o.goBack())}),g(11,3),m(12,"spk-icon"),C(),a(),s(13,"button",25),g(14,4),m(15,"spk-icon"),C(),a()()(),s(16,"div",26)(17,"h3",19),I(18,5),a(),s(19,"app-toggle-card",27),X(20,28),I(21,6),H(),s(22,"p",29),I(23,7),a(),s(24,"div",30)(25,"spk-form-field"),m(26,"input",31),a(),s(27,"button",32),y("click",function(){return T(i),h(o.addNewPath())}),s(28,"spk-icon"),S(29,"plus"),a()()()(),s(30,"app-toggle-card",27),X(31,28),I(32,8),H(),s(33,"p",29),I(34,9),a(),s(35,"button",33),y("click",function(){return T(i),h(o.addFilter())}),I(36,10),a(),_(37,wn,2,0),a(),s(38,"app-toggle-card",34),X(39,28),I(40,11),H(),s(41,"p",29),I(42,12),a(),s(43,"spk-toggle",35),g(44,13),m(45,"input",36),C(),a(),s(46,"spk-toggle",35),g(47,14),m(48,"input",37),C(),a(),s(49,"spk-toggle",35),g(50,15),m(51,"input",38),C(),a(),s(52,"spk-toggle",39),y("click",function(){return T(i),h(o.toggleFilesLargerThan())}),I(53,16),a(),_(54,bn,5,2,"div",40),a()()()}if(t&2){let i;u("formGroup",o.sourceDataForm),l(5),u("multiSelect",!0)("startingPath",o.getPath())("showFiles",!0),l(14),u("disallowToggle",!0),l(7),u("formControl",o.newPathCtrl),l(4),u("disallowToggle",!0),l(7),D((i=o.pathSignal())!=null&&i.length?37:-1),l(),u("disallowToggle",!0),l(14),Ne("active",o.filesLargerThan()),l(2),D(o.filesLargerThan()?54:-1)}},dependencies:[mt,De,oe,Re,Ue,ie,he,Pe,ct,Ee,ye,xe,te,ee,Me,Le,ne,ut,Ve,gt],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 _e=new q,re=class e{#e=$(J);#t=$(lt);#o=$(Ge);#i=$(_t);generalForm=Yt();sourceDataForm=on();scheduleForm=tn();destinationForm=rn();optionsForm=Jt();settings=N([]);isDraft=N(!1);backupId=N(null);isSubmitting=N(!1);finishedLoading=N(!1);backupDefaults=N(null);isNew=b(()=>this.backupId()==="new");osType=b(()=>this.#t.systemInfo()?.OSType);selectedOptions=N([]);selectedAdvancedFormPair=N([]);destinationFormPair=N({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=b(()=>{let n=this.destinationFormPair()?.advanced??[],t=this.selectedAdvancedFormPair()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});selectedHttpOptions=N([]);notSelectedHttpOptions=b(()=>{let n=this.httpOptions(),t=this.selectedHttpOptions()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});sourceDataFormSignal=U(this.sourceDataForm.valueChanges);destinationFormSignal=U(this.destinationForm.valueChanges);generalFormSignal=U(this.generalForm.valueChanges);encryptionFieldSignal=U(this.generalForm.controls.encryption.valueChanges);scheduleFormSignal=U(this.scheduleForm.valueChanges);destinationOptions=b(()=>this.#t.backendModules()??[]);httpOptions=b(()=>this.#t.systemInfo()?.GenericModules?.find(n=>n.Key==="http-options")?.Options?.map(this.#n)??[]);advancedOptions=b(()=>this.#t.systemInfo()?.Options?.map(this.#n)??[]);#n(n){return{name:n.Name,type:n.Type,shortDescription:n.ShortDescription??void 0,longDescription:n.LongDescription??void 0,options:n.ValidValues}}encryptionOptions=b(()=>{let n=this.#t.systemInfo()?.EncryptionModules??[];return[Mt,...n]});nonSelectedOptions=b(()=>this.advancedOptions().sort((n,t)=>n?.name&&t?.name?n?.name.localeCompare(t?.name):0).filter(n=>this.selectedOptions()?.findIndex(t=>t.name===n.name)===-1));addAdvancedFormPairByName(n,t,o){let i=this.notSelectedAdvancedFormPair().find(r=>r.name===n);i&&this.addAdvancedFormPair(i,t,o)}addHttpOptionByName(n,t,o){let i=this.notSelectedHttpOptions().find(r=>r.name===n);i&&this.addHttpOption(i,t,o)}addAdvancedFormPair(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,r=o??n.defaultValue;this.createFormField(i,n,r),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),n])}addHttpOption(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,r=o??n.defaultValue;this.createFormField(i,n,r),this.selectedHttpOptions.set([...this.selectedHttpOptions(),n])}removeAdvancedFormPair(n,t){this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced.removeControl(n.name),this.selectedAdvancedFormPair().findIndex(i=>i.name===n.name)!==-1?this.selectedAdvancedFormPair.update(i=>(i=i.filter(r=>r.name!==n.name),i)):this.selectedHttpOptions.update(i=>(i=i.filter(r=>r.name!==n.name),i))}removeHttpOption(n,t){this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced.removeControl(n.name),this.selectedHttpOptions.update(o=>(o=o.filter(i=>i.name!==n.name),o))}submit(){this.isSubmitting.set(!0);let n=this.#l(),t=this.backupId();t==="new"||!t||this.isDraft()?this.#o.postApiV1Backups({requestBody:n}).pipe(Xe(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{this.exit()},error:o=>{}}):this.#o.putApiV1BackupById({id:t,requestBody:n}).pipe(Xe(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{this.exit()},error:o=>{}})}exit(){this.#c(),this.#e.navigate(["/"])}updateFieldsFromTargetUrl(n){this.#r(),setTimeout(()=>{this.#s(n)})}#r(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.selectedHttpOptions.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(n){let t=n.Sources??"",o=n.Filters?.map(d=>`${d.Include?"":"-"}${d.Expression}`)??[],i=n.Settings?.find(d=>d.Name==="--exclude-files-attributes")?.Value??"",r=n.Settings?.find(d=>d.Name==="--skip-files-larger-than")??null,p=r?.Value.replace(/[0-9]/g,"")??null,f=r?.Value.replace(/[^0-9]/g,"")??null,k={path:[...t,...o].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:p&&f?{size:parseInt(f),unit:p.toUpperCase()}:null}};this.sourceDataForm.patchValue(k)}mapDestinationToForm(n){let t=n.TargetURL?$t(n.TargetURL):null;t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}#s(n){let t=$t(n);t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}mapGeneralToForm(n){let t=n.Settings?.find(r=>r.Name==="encryption-module"),o=t?.Value&&t.Value.length?t.Value:"",i={name:n.Name??"",description:n.Description??""};o&&o!==""&&(i.encryption=o),this.generalForm.patchValue(i)}mapScheduleToForm(n){if(!n){this.scheduleForm.patchValue({autoRun:!1});return}let t=this.#i.fromString(n.Repeat)??null,i={nextTime:this.#p(n.Time),runAgain:{repeatValue:t?.value??1,repeatUnit:t?.unit??"D",allowedDays:{mon:n.AllowedDays?.includes("mon")??!1,tue:n.AllowedDays?.includes("tue")??!1,wed:n.AllowedDays?.includes("wed")??!1,thu:n.AllowedDays?.includes("thu")??!1,fri:n.AllowedDays?.includes("fri")??!1,sat:n.AllowedDays?.includes("sat")??!1,sun:n.AllowedDays?.includes("sun")??!1}}};this.scheduleForm.patchValue(i)}mapOptionsToForms(n){let t=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than"],o=n.Settings?.filter(i=>![...t,"dblock-size"].includes(i.Name));this.settings.set(o??[]),o?.forEach(i=>{if(i.Name==="encryption-module")return this.generalForm.controls.encryption.setValue(i.Value??"");if(i.Name==="dblock-size"){let r=i.Value?.replace(/[^0-9]/g,""),p=i.Value?.replace(/[0-9]/g,"");return this.optionsForm.controls.remoteVolumeSize.setValue({size:r?parseInt(r):null,unit:p?p.toUpperCase():null})}})}getCurrentTargetUrl(){return this.#a(this.destinationForm.controls.destinations)}#l(){let n=this.generalForm.value,t=this.scheduleForm.value,o=this.sourceDataForm.value,r=this.destinationForm.value.destinations?.length?this.#a(this.destinationForm.controls.destinations):[],p=null;t.runAgain?.repeatUnit&&t.runAgain?.repeatValue&&(p=this.#i.toString(t.runAgain.repeatValue,t.runAgain.repeatUnit));let f=t.runAgain?.allowedDays?Object.entries(t.runAgain?.allowedDays).filter(([O,K])=>K).map(([O,K])=>O):[],k=o.path?.split("\0")??[],d=this.mapFormsToSettings(),G=Object.entries(o.excludes??{}).filter(([O,K])=>K&&O!=="filesLargerThan").map(([O])=>O),B=o.excludes?.filesLargerThan;return G.length&&d.push({Name:"--exclude-files-attributes",Value:G.join(",")}),B&&B.size!==null&&B.unit!==null&&d.push({Name:"--skip-files-larger-than",Value:`${B.size}${B.unit}`}),{Backup:{Name:n.name,Description:n.description,TargetURL:r[0]??null,Sources:k.filter(O=>!O.startsWith("-")),Settings:d,Filters:k.filter(O=>O.startsWith("-")).map((O,K)=>({Order:K,Include:!1,Expression:O.slice(1)}))},Schedule:t.autoRun?{Repeat:p,Time:t.nextTime?.date?new Date(`${t.nextTime.date}T${t.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:f}:null}}mapFormsToSettings(n=[]){let t=this.optionsForm.value,o=this.generalForm.value,i=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than"],r=[{Name:"--no-encryption",Value:"True"}];o.encryption!==""&&(r=[{Name:"encryption-module",Value:o.encryption??null},{Name:"passphrase",Value:o.password??null}]);let p=t.remoteVolumeSize?.size?{Name:"dblock-size",Value:`${t.remoteVolumeSize.size}${t.remoteVolumeSize.unit.toLowerCase()}`}:{Name:"dblock-size",Value:"50mb"},f=[...n,...i],k=this.settings().filter(d=>!f.includes(d.Name)).map(d=>{let G=d.Value;return typeof d.Value=="number"&&(G=d.Value.toString()),typeof d.Value=="boolean"&&(G=d.Value?"True":"False"),{Name:d.Name,Value:G}});return[...r,p,...k]}#a(n){return n.controls.map(t=>dt(t.value))}#p(n){if(!n||n?.indexOf("T")===-1)return{time:n??"13:00"};let t=new Date(n),o={time:`${(""+t.getHours()).padStart(2,"0")}:${(""+t.getMinutes()).padStart(2,"0")}`};return n.indexOf("T")!==-1&&(o.date=t.toISOString().split("T")[0]),o}removeOptionFromFormGroup(n){let t=n.name;t&&(this.optionsForm.controls.advancedOptions.removeControl(t),this.selectedOptions.update(o=>(o=o.filter(i=>i.name!==t),o)))}addOptionToFormGroup(n,t){let o=this.optionsForm.controls.advancedOptions;this.createFormField(o,n,t??n.defaultValue),this.selectedOptions.update(i=>(i.push(n),i))}addFreeTextOption(n,t,o){let i=this.optionsForm.controls.advancedOptions,r=A({name:n,type:"String",defaultValue:t},o);this.createFormField(i,r,t),this.selectedOptions.update(p=>(p.push(r),p))}createFormField(n,t,o){if(t.type==="String"||t.type==="FileTree"||t.type==="FolderTree"||t.type==="Password"||t.type==="Enumeration"||t.type==="NonValidatedSelectableString"||t.type==="Path"){n.addControl(t.name,_e.control(o));return}if(t.type==="Size"){let i=(o??"").replace(/[0-9]/g,""),r=(o??"").replace(/[^0-9]/g,"");n.addControl(t.name,_e.group({size:_e.control(r?parseInt(r):50),unit:_e.control(i?i.toUpperCase():"MB")}));return}if(t.type==="Integer"){n.addControl(t.name,_e.control(o?parseInt(o):0));return}if(t.type==="Boolean"){n.addControl(t.name,_e.control(o==="true"||o==="True"));return}if(t.type==="Flags"){n.addControl(t.name,_e.control(o??""));return}if(t.type==="Timespan"){n.addControl(t.name,_e.control(o,[Te.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(n,t,o=!1){let i=ke.find(E=>E.customKey===n||E.key===n),r=i?.key,p=this.destinationOptions().find(E=>E.Key===r),f=this.httpOptions();if(!p||!p.Options)return;let k=i&&i.oauthField?i.oauthField:null,d=i&&i.customFields?i.customFields:{},G=i&&i.dynamicFields?i.dynamicFields:[],B=i&&i.advancedFields?i.advancedFields:[],O=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:k,custom:[],dynamic:[],advanced:[]});let K=_e.group({}),ae=_e.group({}),W=_e.group({});d&&Object.entries(d).forEach(([E,P],L)=>{let de=P,{formElement:M}=de,Y=bt(de,["formElement"]);K.addControl(E,M(t?.custom[E])),this.destinationFormPair.update(se=>(se.custom.push(A({order:900+L},Y)),se))});for(let E=0;E<p.Options.length;E++){let P=p.Options[E];if(P.Deprecated)continue;let L=G.find(M=>M===P.Name||M.name===P.Name);if(L){let M=L&&typeof L!="string",Y=M?L?.defaultValue??P.DefaultValue:P.DefaultValue,de={name:P.Name,type:P.Type,shortDescription:P.ShortDescription??void 0,longDescription:P.LongDescription??void 0,options:P.ValidValues,order:900+E},se=M?A(A({},de),L):de,Je=t?.dynamic[P.Name]??Y??P.DefaultValue;this.createFormField(ae,se,Je),this.destinationFormPair.update(be=>(be.dynamic.push(se),be))}else{if(O.find(Fe=>Fe===P.Name))continue;let Y=B.find(Fe=>Fe===P.Name||Fe.name===P.Name),de=Y&&typeof Y!="string",se=t?.advanced[P.Name],w=se??P.DefaultValue,Je={name:P.Name,type:P.Type,shortDescription:P.ShortDescription??void 0,longDescription:P.LongDescription??void 0,options:P.ValidValues,defaultValue:w,order:900+E},be=de?A(A({},Je),Y):Je;o&&se&&(this.createFormField(W,be,w),this.selectedAdvancedFormPair.update(Fe=>(Fe.push(be),Fe))),this.destinationFormPair.update(Fe=>(Fe.advanced.push(be),Fe))}}for(let E=0;E<f.length;E++){let P=f[E],L=t?.advanced[P.name],M=L??P.defaultValue;o&&L&&(this.createFormField(W,P,M),this.selectedHttpOptions.update(Y=>(Y.push(P),Y)))}this.destinationFormPair.update(E=>({oauthField:E.oauthField,custom:E.custom.sort((P,L)=>P.order-L.order),dynamic:E.dynamic.sort((P,L)=>P.order-L.order),advanced:E.advanced.sort((P,L)=>P.order-L.order)})),this.destinationForm.controls.destinations.push(an({key:i?.customKey??n,customGroup:K,dynamicGroup:ae,advancedGroup:W}))}#c(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleForm.reset(),this.optionsForm.reset()}static \u0275fac=function(t){return new(t||e)};static \u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})};var Ln=["formRef"],Un=(e,n,t,o)=>({index:e,formView:n,formGroupName:"custom",destinationType:t,oauthField:o}),St=e=>({$implicit:e}),Vn=(e,n,t,o)=>({index:e,formView:n,formGroupName:"dynamic",destinationType:t,oauthField:o}),Bn=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",destinationType:t,oauthField:o}),Kn=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",asHttpOptions:!0,destinationType:t,oauthField:o}),zn=()=>({maxWidth:"700px",width:"100%"});function Xn(e,n){e&1&&(g(0,5,2),m(1,"spk-icon"),C())}function Hn(e,n){e&1&&I(0,5,3)}function jn(e,n){if(e&1){let t=v();g(0,5,1),s(1,"button",21),y("click",function(){T(t);let i=c();return h(i.testDestination())}),_(2,Xn,2,0)(3,Hn,1,0),a(),C()}if(e&2){let t=c();l(),Ne("success",t.successfulTest()),l(),D(t.successfulTest()?2:3)}}function Wn(e,n){if(e&1){let t=v();s(0,"p",27),y("click",function(){T(t);let i=c();return h(i.removeDestinationFormGroup(i.destinationCount()-1))}),g(1,8),m(2,"span",28),C(),a()}}function qn(e,n){if(e&1){let t=v();s(0,"div",34),y("click",function(){let i=T(t).$implicit,r=c(2);return h(r.addDestinationFormGroup(i.key))}),s(1,"h3"),S(2),a(),s(3,"p"),S(4),a()()}if(e&2){let t=n.$implicit;l(2),Pt(t.displayName),l(2),Pt(t.description)}}function Qn(e,n){if(e&1){let t=v();s(0,"button",35,1),y("click",function(){let i=T(t).$implicit,r=c(2);return h(r.addDestinationFormGroup(i.key))}),S(2),a()}if(e&2){let t=n.$implicit;l(2),z(" ",t.displayName," ")}}function Yn(e,n){if(e&1&&(s(0,"div",29),pe(1,qn,5,2,"div",30,le),a(),s(3,"spk-menu",31)(4,"button",32),I(5,9),a(),X(6,20),pe(7,Qn,3,1,"button",33,le),H(),a()),e&2){let t=c();l(),ce(t.destinationTypeOptionsFocused()),l(2),u("searchable",!0),l(4),ce(t.destinationTypeOptionsNotFocused())}}function Zn(e,n){e&1&&He(0)}function Jn(e,n){if(e&1&&_(0,Zn,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;c();let r=ue(29),p=c();u("ngTemplateOutlet",r)("ngTemplateOutletContext",je(7,St,We(2,Un,i,o,(t=p.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function eo(e,n){e&1&&He(0)}function to(e,n){if(e&1&&_(0,eo,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;c();let r=ue(29),p=c();u("ngTemplateOutlet",r)("ngTemplateOutletContext",je(7,St,We(2,Vn,i,o,(t=p.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function no(e,n){if(e&1){let t=v();g(0,10,1),s(1,"button",35,1),y("click",function(){let i=T(t).$implicit,r=c(2);return h(r.addAdvancedFormPair(i,0))}),a(),C()}if(e&2){let t=n.$implicit;l(),Et(t.name),yt(0)}}function oo(e,n){e&1&&He(0)}function io(e,n){if(e&1&&_(0,oo,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;c();let r=ue(29),p=c();u("ngTemplateOutlet",r)("ngTemplateOutletContext",je(7,St,We(2,Bn,i,o,(t=p.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function ro(e,n){if(e&1){let t=v();g(0,11,1),s(1,"button",35,1),y("click",function(){let i=T(t).$implicit,r=c(2);return h(r.addHttpOption(i,0))}),a(),C()}if(e&2){let t=n.$implicit;l(),Et(t.name),yt(0)}}function ao(e,n){e&1&&He(0)}function so(e,n){if(e&1&&_(0,ao,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;c();let r=ue(29),p=c();u("ngTemplateOutlet",r)("ngTemplateOutletContext",je(7,St,We(2,Kn,i,o,(t=p.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function lo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function po(e,n){if(e&1&&(s(0,"app-file-tree",43)(1,"label",47),S(2),_(3,lo,3,1,"spk-tooltip",48),a(),m(4,"input",49),a()),e&2){let t,o=c().$implicit,i=c(2);u("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name))("accepts",o.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),D(o.formView.longDescription?3:-1),l(),V("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),me("formControlName",o.formView.name)}}function co(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function mo(e,n){if(e&1&&(s(0,"app-file-tree",44)(1,"label",47),S(2),_(3,co,3,1,"spk-tooltip",48),a(),m(4,"input",49),a()),e&2){let t,o=c().$implicit,i=c(2);u("hideShortcuts",!0)("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name)),l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),D(o.formView.longDescription?3:-1),l(),V("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),me("formControlName",o.formView.name)}}function uo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function _o(e,n){e&1&&(s(0,"spk-icon",51),S(1,"link"),a())}function Fo(e,n){e&1&&(s(0,"spk-icon",51),S(1,"envelope"),a())}function go(e,n){e&1&&(s(0,"spk-icon",51),S(1,"textbox"),a())}function Co(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",47),S(2),_(3,uo,3,1,"spk-tooltip",48),a(),m(4,"input",50),_(5,_o,2,0,"spk-icon",51)(6,Fo,2,0,"spk-icon",51)(7,go,2,0,"spk-icon",51),a()),e&2){let t,o=c().$implicit;l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),D(o.formView.longDescription?3:-1),l(),V("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),me("formControlName",o.formView.name),u("type",o.formView.type==="Email"?"email":"text"),l(),D(o.formView.type==="Path"?5:o.formView.type==="Email"?6:7)}}function So(e,n){if(e&1){let t=v();s(0,"span",55),y("click",function(){T(t);let i=c(2).$implicit,r=c(2);return h(r.oauthStartTokenCreation(i.destinationType))}),S(1,"AuthID"),a()}}function fo(e,n){e&1&&(s(0,"spk-icon",51),S(1,"password"),a())}function To(e,n){if(e&1){let t=v();s(0,"spk-icon",56),y("click",function(){T(t);let i=c(2).$implicit;return h(i.formView.showPassword=!i.formView.showPassword)}),S(1," eye "),a()}}function ho(e,n){if(e&1){let t=v();s(0,"spk-icon",56),y("click",function(){T(t);let i=c(2).$implicit;return h(i.formView.showPassword=!i.formView.showPassword)}),S(1," eye-slash "),a()}}function Do(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",47),S(2),a(),m(3,"input",52),_(4,So,2,0,"span",53)(5,fo,2,0,"spk-icon",51)(6,To,2,0,"spk-icon",54)(7,ho,2,0,"spk-icon",54),a()),e&2){let t,o=c().$implicit;l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),V("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),me("formControlName",o.formView.name),u("type",o.formView.showPassword?"text":"password"),l(),D(o.oauthField===o.formView.name?4:5),l(2),D(o.formView.showPassword?6:7)}}function Eo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(3).$implicit;u("message",t.formView.longDescription)}}function yo(e,n){if(e&1&&S(0),e&2){let t=n.$implicit;z(" ",t," ")}}function Po(e,n){if(e&1&&(s(0,"spk-select",57)(1,"label",47),S(2),_(3,Eo,3,1,"spk-tooltip",48),a(),m(4,"input",49),a(),_(5,yo,1,1,"ng-template",null,3,qe)),e&2){let t,o=ue(6);c();let i=Ot(0),r=c().$implicit;u("options",i)("isClearable",!1)("optionTemplate",o),l(),V("for","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),l(),z(" ",(t=r.formView.shortDescription)!==null&&t!==void 0?t:r.formView.name," "),l(),D(r.formView.longDescription?3:-1),l(),V("id","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),me("formControlName",r.formView.name)}}function Ao(e,n){if(e&1&&(At(0),_(1,Po,7,14)),e&2){let t=c().$implicit,o=Nt(t.formView.loadOptions?t.formView.loadOptions(c(2).injector)():t.formView.options);l(),D(o?1:-1)}}function No(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(3).$implicit;u("message",t.formView.longDescription)}}function Oo(e,n){if(e&1&&S(0),e&2){let t=n.$implicit;Ut(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function ko(e,n){if(e&1&&(s(0,"spk-select",59)(1,"label",47),S(2),_(3,No,3,1,"spk-tooltip",48),a(),m(4,"input",49),a(),_(5,Oo,1,2,"ng-template",null,4,qe)),e&2){let t,o=ue(6);c();let i=Ot(0),r=c().$implicit;u("options",i)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",o),l(),V("for","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),l(),z(" ",(t=r.formView.shortDescription)!==null&&t!==void 0?t:r.formView.name," "),l(),D(r.formView.longDescription?3:-1),l(),V("id","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),me("formControlName",r.formView.name)}}function $o(e,n){e&1&&m(0,"spk-progress-bar",58)}function Io(e,n){if(e&1&&(At(0),_(1,ko,7,15)(2,$o,1,0,"spk-progress-bar",58)),e&2){let t=c().$implicit,o=Nt(t.formView.loadOptions?t.formView.loadOptions(c(2).injector)():t.formView.options);l(),D(o?1:2)}}function Mo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function Ro(e,n){if(e&1&&(s(0,"div",45)(1,"label",47),S(2),_(3,Mo,3,1,"spk-tooltip",48),a(),s(4,"div",60)(5,"spk-form-field"),m(6,"input",61),s(7,"spk-icon",51),S(8,"resize"),a()(),s(9,"spk-select",62),m(10,"input",63),a()()()),e&2){let t,o=c().$implicit,i=c(2);u("formGroupName",o.formView.name),l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),D(o.formView.longDescription?3:-1),l(3),V("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(3),u("options",i.sizeOptions())("inlineSearch",!0)}}function xo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function vo(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",47),S(2),_(3,xo,3,1,"spk-tooltip",48),a(),m(4,"input",64),s(5,"spk-icon",51),S(6,"numpad"),a()()),e&2){let t,o=c().$implicit;l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),D(o.formView.longDescription?3:-1),l(),V("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),me("formControlName",o.formView.name)}}function wo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function bo(e,n){if(e&1&&(s(0,"spk-toggle",46)(1,"label",47),S(2),_(3,wo,3,1,"spk-tooltip",48),a(),m(4,"input",65),a()),e&2){let t,o=c().$implicit;l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),D(o.formView.longDescription?3:-1),l(),V("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),me("formControlName",o.formView.name)}}function Go(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function Lo(e,n){if(e&1&&S(0),e&2){let t=n.$implicit;z(" ",t," ")}}function Uo(e,n){if(e&1&&(s(0,"spk-select",66)(1,"label",47),S(2),_(3,Go,3,1,"spk-tooltip",48),a(),m(4,"input",67),a(),_(5,Lo,1,1,"ng-template",null,4,qe)),e&2){let t,o=ue(6),i=c().$implicit;u("options",i.formView.options)("selectMultiple",!0)("optionTemplate",o),l(),Lt("for","destination-",i.formGroupName,"-",i.index,""),l(),z(" ",(t=i.formView.shortDescription)!==null&&t!==void 0?t:i.formView.name," "),l(),D(i.formView.longDescription?3:-1),l(),me("formControlName",i.formView.name)}}function Vo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function Bo(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",47),S(2),_(3,Vo,3,1,"spk-tooltip",48),a(),m(4,"input",49),a()),e&2){let t,o=c().$implicit;l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),D(o.formView.longDescription?3:-1),l(),V("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),me("formControlName",o.formView.name)}}function Ko(e,n){if(e&1){let t=v();s(0,"button",68),y("click",function(){T(t);let i=c().$implicit,r=c(2);return h(r.removeFormView(i.formView,0))}),s(1,"spk-icon"),S(2,"x-circle"),a()()}}function zo(e,n){if(e&1&&(s(0,"div",41),X(1,42),_(2,po,5,17,"app-file-tree",43)(3,mo,5,13,"app-file-tree",44)(4,Co,8,13,"spk-form-field")(5,Do,8,13,"spk-form-field")(6,Ao,2,2)(7,Io,3,2)(8,Ro,11,13,"div",45)(9,vo,7,11,"spk-form-field")(10,bo,5,11,"spk-toggle",46)(11,Uo,7,9)(12,Bo,5,11,"spk-form-field"),H(),_(13,Ko,3,0,"button",32),a()),e&2){let t=n.$implicit;Ne("single-field",t.formGroupName!=="advanced"),l(),u("formGroupName",t.formGroupName),l(),D(t.formView.type==="FileTree"?2:t.formView.type==="FolderTree"?3:t.formView.type==="String"||t.formView.type==="Path"||t.formView.type==="Email"?4:t.formView.type==="Password"?5:t.formView.type==="Enumeration"?6:t.formView.type==="NonValidatedSelectableString"?7:t.formView.type==="Size"?8:t.formView.type==="Integer"?9:t.formView.type==="Boolean"?10:t.formView.type==="Flags"?11:t.formView.type==="Timespan"?12:-1),l(11),D(t.formGroupName==="advanced"?13:-1)}}function Xo(e,n){if(e&1&&(X(0,22)(1,36),pe(2,Jn,1,9,"ng-container",null,le),pe(4,to,1,9,"ng-container",null,le),s(6,"app-toggle-card",37),X(7,38),g(8,10),s(9,"spk-menu",31)(10,"button",39),m(11,"spk-icon"),a(),X(12,20),pe(13,no,3,1,"button",33,le),H(),a(),C(),H(),pe(15,io,1,9,"ng-container",null,le),a(),s(17,"app-toggle-card",37),X(18,38),g(19,11),s(20,"spk-menu",31)(21,"button",39),m(22,"spk-icon"),a(),X(23,20),pe(24,ro,3,1,"button",33,le),H(),a(),C(),H(),pe(26,so,1,9,"ng-container",null,le),a(),_(28,zo,14,5,"ng-template",null,2,qe),H()()),e&2){let t=c();l(2),ce(t.destinationFormPair().custom),l(2),ce(t.destinationFormPair().dynamic),l(2),u("disallowToggle",!0),l(3),u("searchable",!0),l(),u("disabled",t.notSelectedAdvancedFormPair().length===0),l(3),ce(t.notSelectedAdvancedFormPair()),l(2),ce(t.selectedAdvancedFormPair()),l(2),u("disallowToggle",!0),l(3),u("searchable",!0),l(),u("disabled",t.notSelectedHttpOptions().length===0),l(3),ce(t.notSelectedHttpOptions()),l(2),ce(t.selectedHttpOptions())}}function Ho(e,n){if(e&1){let t=v();s(0,"spk-dialog",69),nt("isOpenChange",function(i){T(t);let r=c();return tt(r.targetUrlDialogOpen,i)||(r.targetUrlDialogOpen=i),h(i)}),s(1,"header",70)(2,"h2"),I(3,12),a(),s(4,"spk-alert",71),I(5,13),a()(),s(6,"div",72)(7,"spk-form-field"),m(8,"textarea",73),a()(),s(9,"footer",74)(10,"button",24),y("click",function(){T(t);let i=c();return h(i.closeTargetUrlDialog(!1))}),S(11,"Cancel"),a(),s(12,"button",75),y("click",function(){T(t);let i=c();return h(i.closeTargetUrlDialog(!0))}),g(13,14),m(14,"spk-icon"),C(),a()()()}if(e&2){let t=c();et("isOpen",t.targetUrlDialogOpen),u("options",ot(3,zn)),l(8),u("formControl",t.targetUrlCtrl)}}var jo=["Bytes","KB","MB","GB","TB","PB"],Ct=new q,rn=(e={destinations:[]})=>Ct.group({destinations:Ct.array(e.destinations)}),an=({key:e,customGroup:n,dynamicGroup:t,advancedGroup:o})=>Ct.group({destinationType:Ct.control(e),custom:n,dynamic:t,advanced:o}),wt=class e{#e=$(J);#t=$(fe);#o=$(Bt);#i=$(Ge);#n=$(re);#r=$(zt);injector=$(Gt);formRef=ge.required("formRef");destinationForm=this.#n.destinationForm;destinationFormPair=this.#n.destinationFormPair;selectedAdvancedFormPair=this.#n.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#n.notSelectedAdvancedFormPair;selectedHttpOptions=this.#n.selectedHttpOptions;notSelectedHttpOptions=this.#n.notSelectedHttpOptions;destinationOptions=this.#n.destinationOptions;destinationFormSignal=this.#n.destinationFormSignal;destinationCount=b(()=>this.destinationFormSignal()?.destinations?.length??0);sizeOptions=N(jo);successfulTest=N(!1);destinationTypeOptionsInFocus=N(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=N(ke.map(n=>({key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description})));destinationTypeOptionsFocused=b(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(i=>i.key===o))});destinationTypeOptionsNotFocused=b(()=>{let n=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(o=>!n.includes(o.key))});getFormFieldValue(n,t,o){return((this.destinationForm.controls.destinations.controls?.[n]).controls?.[t]).controls[o].value}addDestinationFormGroup(n){this.#n.addDestinationFormGroup(n)}addAdvancedFormPair(n,t){this.#n.addAdvancedFormPair(n,t)}removeFormView(n,t){this.#n.removeAdvancedFormPair(n,t)}addHttpOption(n,t){this.#n.addHttpOption(n,t)}targetUrl=b(()=>this.#n.getCurrentTargetUrl()[0]);targetUrlCtrl=new pt;targetUrlInitial=N(null);targetUrlDialogOpen=N(!1);openTargetUrlDialog(){let t=this.#n.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(t),this.targetUrlInitial.set(t),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl.value,o=this.targetUrlInitial();!n||t===o||this.#n.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(n=0){let o=this.#n.getCurrentTargetUrl()[n];o&&this.#i.postApiV1RemoteoperationTest({requestBody:{path:o}}).subscribe({next:()=>{this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3)},error:i=>{let r=i.error.error.Error;if(r==="missing-folder"&&this.#r.open(Qe,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`},closed:p=>{p&&this.#i.postApiV1RemoteoperationCreate({requestBody:{path:o}}).subscribe()}}),r.startsWith("incorrect-cert:")){let p=r.split("incorrect-cert:")[1];this.#r.open(Qe,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`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: ${p}`,confirmText:"Trust the certificate",cancelText:"Cancel"},closed:f=>{f&&this.#n.addHttpOptionByName("accept-specified-ssl-hash",p)}})}if(r.startsWith("incorrect-host-key:")){let p=r.split('incorrect-host-key:"')[1].split('",')[0],f=r.split('accepted-host-key:"')[1].split('",')[0];f?this.#r.open(Qe,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
|
|
4
4
|
otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as D,u as U}from"./chunk-
|
|
1
|
+
import{a as D,u as U}from"./chunk-PUSUA4U7.js";import{b as B}from"./chunk-L3T52MCL.js";import"./chunk-4XPN5ZGE.js";import{pa as R}from"./chunk-3GK4TNUH.js";import{Ab as o,Bb as a,Cb as u,D as S,Gb as v,Na as T,Ob as p,Qa as l,Sb as A,Tb as c,X as O,ca as M,da as L,db as f,fc as _,gc as g,ib as E,kc as $,lc as k,mc as y,rb as m,sa as d,sb as P,tb as h,vc as G,wb as b,xb as N,xc as w,yb as x,zb as I}from"./chunk-PTC4N7TU.js";import"./chunk-7CGTOI24.js";function X(s,n){if(s&1&&(o(0,"tr")(1,"td",10)(2,"code"),u(3,"ol",11),a()()()),s&2){let e=c().$implicit,t=c();l(),P("grid-column","1 / -1")("height","auto"),l(2),m("innerHTML",t.breakIntoLines(e.Exception),T)}}function z(s,n){if(s&1){let e=v();o(0,"tr",7),A("click",function(){let i=M(e).$index,r=c();return L(r.toggleRow(i))}),o(1,"td"),_(2),G(3,"date"),a(),o(4,"td",8),_(5),a(),o(6,"td"),_(7),a(),o(8,"td")(9,"button",9)(10,"spk-icon"),_(11,"caret-down"),a()()()(),E(12,X,4,5,"tr")}if(s&2){let e=n.$implicit,t=n.$index,i=c();l(2),g(w(3,6,e.Timestamp,"MMM dd. hh:mm")),l(3),g(e.BackupID>=0?e.BackupID:"-"),l(2),g(e.Message),l(2),h("rotated-icon",t===i.openRowIndex()),l(3),b(t===i.openRowIndex()?12:-1)}}var F=["BackupID","Timestamp","Message","actions"],C=class s{#e=O(B);displayedColumns=d(F);logsLoading=d(!0);openRowIndex=d(null);logs=d([]);ngOnInit(){this.init()}init(){this.#e.getApiV1LogdataLog().pipe(S(()=>this.logsLoading.set(!1))).subscribe({next:n=>{this.logs.set(n)}})}toggleRow(n){this.openRowIndex.set(n===this.openRowIndex()?null:n)}breakIntoLines(n){let e=n.split(`
|
|
2
2
|
`),t="";for(let i=0;i<e.length;i++)t+=`<li>${e[i]}</li>`;return t}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=f({type:s,selectors:[["app-logs"]],decls:15,vars:2,consts:()=>{let n;n=$localize`Timestamp`;let e;e=$localize`Backup ID`;let t;t=$localize`Message`;let i;return i=$localize`No data available`,[n,e,t,i,[3,"dataChange","data","loading"],["table-header",""],["table-no-rows",""],[3,"click"],[1,"id"],["spk-button","","type","button",1,"outlined","small"],[2,"white-space","pre-wrap"],[1,"line-numbers-ol",3,"innerHTML"]]},template:function(e,t){e&1&&(o(0,"h3"),_(1,"Logs"),a(),o(2,"spk-table",4),y("dataChange",function(r){return k(t.logs,r)||(t.logs=r),r}),o(3,"tr",5)(4,"th"),p(5,0),a(),o(6,"th"),p(7,1),a(),o(8,"th"),p(9,2),a(),u(10,"th"),a(),x(11,z,13,9,null,null,N),o(13,"div",6),p(14,3),a()()),e&2&&(l(2),$("data",t.logs),m("loading",t.logsLoading()),l(9),I(t.logs()))},dependencies:[U,R,D],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}spk-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background-color:var(--grey-800);color:var(--grey-100);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{C as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as A}from"./chunk-
|
|
1
|
+
import{a as A}from"./chunk-NV2YMSSM.js";import{c as M}from"./chunk-G3YJXHRY.js";import{o as P}from"./chunk-PUSUA4U7.js";import{b as S}from"./chunk-L3T52MCL.js";import"./chunk-4XPN5ZGE.js";import"./chunk-3GK4TNUH.js";import{Ab as i,Bb as r,Cb as _,D as p,Ob as C,Qa as c,X as o,db as g,fc as u,gc as E,ib as d,p as l,sa as m,wb as f}from"./chunk-PTC4N7TU.js";import"./chunk-7CGTOI24.js";function G(t,e){t&1&&_(0,"spk-progress-bar",1)}var a=class t{#n=o(M);#e=o(S);isLoading=m(!0);generalInfo=A(this.#e.getApiV1Acknowledgements().pipe(l(e=>e.Acknowledgements),p(()=>this.isLoading.set(!1))));static \u0275fac=function(n){return new(n||t)};static \u0275cmp=g({type:t,selectors:[["app-general"]],decls:6,vars:2,consts:()=>{let e;return e=$localize`General`,[e,[1,"indeterminate","primary"]]},template:function(n,s){n&1&&(d(0,G,1,0,"spk-progress-bar",1),i(1,"section")(2,"h3"),C(3,0),r(),i(4,"div"),u(5),r()()),n&2&&(f(s.isLoading()?0:-1),c(5),E(s.generalInfo()))},dependencies:[P],styles:["[_nghost-%COMP%]{display:block;position:relative}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}"],changeDetection:0})};export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var i=Object.defineProperty,j=Object.defineProperties;var k=Object.getOwnPropertyDescriptors;var e=Object.getOwnPropertySymbols;var g=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable;var f=(a,b,c)=>b in a?i(a,b,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[b]=c,l=(a,b)=>{for(var c in b||={})g.call(b,c)&&f(a,c,b[c]);if(e)for(var c of e(b))h.call(b,c)&&f(a,c,b[c]);return a},m=(a,b)=>j(a,k(b));var n=(a,b)=>{var c={};for(var d in a)g.call(a,d)&&b.indexOf(d)<0&&(c[d]=a[d]);if(a!=null&&e)for(var d of e(a))b.indexOf(d)<0&&h.call(a,d)&&(c[d]=a[d]);return c};export{l as a,m as b,n as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-C2PMOZWR.js")},{path:"destination",loadComponent:()=>import("./chunk-3WKC2CFC.js")},{path:"source-data",loadComponent:()=>import("./chunk-3WEATDBM.js")},{path:"schedule",loadComponent:()=>import("./chunk-7JZ5LA6R.js")},{path:"options",loadComponent:()=>import("./chunk-MJI6X5KH.js")}];export{o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{k as a,l as b}from"./chunk-5COOM7FC.js";import"./chunk-XC6KYSRC.js";import"./chunk-DNHLTHLR.js";import"./chunk-NV2YMSSM.js";import"./chunk-CR2UB7UZ.js";import"./chunk-3YOT5OAB.js";import"./chunk-CMXSHXAU.js";import"./chunk-OS4AAJLB.js";import"./chunk-LHSJLKCF.js";import"./chunk-WBNOGAKJ.js";import"./chunk-G3YJXHRY.js";import"./chunk-PUSUA4U7.js";import"./chunk-L3T52MCL.js";import"./chunk-4XPN5ZGE.js";import"./chunk-3GK4TNUH.js";import"./chunk-PTC4N7TU.js";import"./chunk-7CGTOI24.js";export{a as createScheduleForm,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-N7UCCMLS.js";import{Mc as r,R as s,X as i,sa as e}from"./chunk-PTC4N7TU.js";var o=class t{#t=i(a);#a=this.#t.getItemParsed("darkTheme",!0);#e=e(!1);#s=e(window?.innerWidth<=768);#i=e(!1);isDarkMode=this.#e.asReadonly();isMobile=this.#s.asReadonly();isNavOpen=this.#i.asReadonly();constructor(){window.matchMedia("(prefers-color-scheme:dark)").matches&&this.#a&&this.setDarkMode(),r(()=>{this.#e()?document.body.classList.add("dark"):document.body.classList.remove("dark")})}ngOnInit(){window.addEventListener("resize",this.#r)}toggleNav(){this.#i.set(!this.isNavOpen())}toggleBodyClass(){this.#t.setItemParsed("darkTheme",!this.isDarkMode(),!0),this.#e.set(!this.isDarkMode())}setDarkMode(){this.#t.setItemParsed("darkTheme",!0,!0),this.#e.set(!0)}setLightMode(){this.#t.setItemParsed("darkTheme",!1,!0),this.#e.set(!1)}#r(){this.#s.set(window.innerWidth<=768)}ngOnDestroy(){window.removeEventListener("resize",this.#r)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})};export{o as a};
|