@duplicati/ngclient 0.0.84 → 0.0.85
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-2VH4NDQH.js +1 -0
- package/chunk-2WZR3NHU.js +6 -0
- package/chunk-4WK5KLP3.js +1 -0
- package/{chunk-3YTSQTLM.js → chunk-7G6LF4RE.js} +1 -1
- package/{chunk-4YHGG4LR.js → chunk-7IPKE42T.js} +1 -1
- package/{chunk-XRL6GPXW.js → chunk-7QNL2MJX.js} +1 -1
- package/{chunk-2AYDM3FG.js → chunk-AO6V5EDZ.js} +1 -1
- package/{chunk-DURFGYD7.js → chunk-AYWJL6PH.js} +1 -1
- package/{chunk-BKSXG3Z5.js → chunk-CI7PYMKD.js} +1 -1
- package/{chunk-H2DNOMMP.js → chunk-DTCM7OB2.js} +1 -1
- package/{chunk-BRMUJELY.js → chunk-DW725235.js} +1 -1
- package/{chunk-RAUCDBVO.js → chunk-FMSANFAF.js} +1 -1
- package/{chunk-D6NUBCKD.js → chunk-FQPMHKLD.js} +1 -1
- package/{chunk-ODDKCMXA.js → chunk-FXXGCONI.js} +1 -1
- package/{chunk-ZWADJ4OM.js → chunk-G3KME6QI.js} +1 -1
- package/{chunk-PN3DBUJI.js → chunk-G56SHWBZ.js} +1 -1
- package/{chunk-4IO6Y7PY.js → chunk-IYQIIJKE.js} +1 -1
- package/{chunk-GJSG762N.js → chunk-IZYAOMPF.js} +1 -1
- package/{chunk-YA3PYBIG.js → chunk-JGOWJDLZ.js} +1 -1
- package/{chunk-7LJ7CTKL.js → chunk-MNR2YI5Q.js} +1 -1
- package/chunk-OKERRNQC.js +6 -0
- package/{chunk-UI6ZWFOT.js → chunk-OQ3EADZK.js} +1 -1
- package/{chunk-NBBSISDC.js → chunk-P6HOXQHE.js} +1 -1
- package/{chunk-VAAQUFLX.js → chunk-PHQM25ND.js} +1 -1
- package/{chunk-KH7GOUWD.js → chunk-RGSJ6UVN.js} +1 -1
- package/{chunk-7DD5DAWU.js → chunk-SWGKS3QC.js} +1 -1
- package/{chunk-BGBEOEU2.js → chunk-TO5QMMUQ.js} +1 -1
- package/chunk-UIC2LGAH.js +1 -0
- package/{chunk-UZM3TLJO.js → chunk-UXQIJ2H5.js} +1 -1
- package/chunk-WLQUMVWA.js +1 -0
- package/chunk-WQDSSB2V.js +3 -0
- package/{chunk-DL6QZSL6.js → chunk-X6SCWL5V.js} +1 -1
- package/{chunk-KXU2UTG4.js → chunk-XB5GDNN5.js} +1 -1
- package/{chunk-77PHTQYN.js → chunk-XFS2LSEM.js} +1 -1
- package/{chunk-RSXKKDD4.js → chunk-Y2422GIA.js} +1 -1
- package/{chunk-AFQ6FL3D.js → chunk-Y5WADXF5.js} +1 -1
- package/{chunk-TZYGTULV.js → chunk-YO6IQOER.js} +1 -1
- package/{chunk-FUH4327W.js → chunk-ZLMSSTXT.js} +1 -1
- package/chunk-ZNTSJUHI.js +1 -0
- package/index.html +2 -2
- package/{main-SOHQOOGR.js → main-JZ3UOPVL.js} +1 -1
- package/package.json +1 -1
- package/styles-HDO6WYV2.css +1 -0
- package/chunk-34SHHWMR.js +0 -6
- package/chunk-6KER52JR.js +0 -1
- package/chunk-C52XP2RC.js +0 -1
- package/chunk-MEFACGK4.js +0 -6
- package/chunk-P724RQTD.js +0 -1
- package/chunk-RCPMSNTW.js +0 -1
- package/chunk-RE4L7JTP.js +0 -1
- package/chunk-RLYI2YCZ.js +0 -3
- package/styles-5VTLDYYE.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-C6Q5SG76.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-FMSANFAF.js")},{path:"destination",loadComponent:()=>import("./chunk-TO5QMMUQ.js")},{path:"source-data",loadComponent:()=>import("./chunk-G56SHWBZ.js")},{path:"schedule",loadComponent:()=>import("./chunk-FQPMHKLD.js")},{path:"options",loadComponent:()=>import("./chunk-DTCM7OB2.js")}];export{o as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{a as We}from"./chunk-AYWJL6PH.js";import{a as Ue}from"./chunk-DW725235.js";import{a as Ot,b as Wt}from"./chunk-DNHLTHLR.js";import{b as H}from"./chunk-PNJEVGID.js";import{a as pt}from"./chunk-YOP6HOXH.js";import{a as nt}from"./chunk-RTVM3BJK.js";import{a as Re,b as se,c as Ee,d as le,e as ye,f as ct,g as Kt,h as Pe,i as be,k as mt,l as Ne,m as Ge,n as zt,o as Oe,p as ne,q as ut,r as Ae}from"./chunk-XKAASYKO.js";import{b as He}from"./chunk-PPRHD3ZV.js";import{a as De,c as ae}from"./chunk-LJ3ULEOG.js";import{a as pe,b as _t,d as Xt,e as Ht,g as Ve,i as dt,l as ce,n as Ft,o as jt,r as me,s as ue,x as Le,y as je}from"./chunk-UIC2LGAH.js";import{c as Bt}from"./chunk-MCLDJCPW.js";import{ia as lt}from"./chunk-7IRVNC4S.js";import{A as Et,Ab as v,Bb as a,Cb as r,Db as _,E as Ze,Eb as W,Fb as q,Gb as Ke,Hb as k,Lc as B,Nb as C,Nc as st,Ob as f,Pb as w,Qb as Je,Ra as s,Rb as et,S as Me,Sb as xe,Tb as D,Ub as p,Xb as j,Y as $,Ya as fe,Zb as Q,_b as X,da as S,dc as Se,ea as T,eb as re,ec as Te,fc as he,gc as m,hc as Y,ia as Rt,ic as V,jb as d,jc as Nt,l as Dt,lc as bt,mc as Gt,nc as Vt,p as Ye,pa as yt,qa as Pt,sb as c,sc as Lt,tc as ze,ua as A,ub as $e,uc as Ut,vc as tt,xb as F,yb as x,zb as I,zc as at}from"./chunk-2M52SFS6.js";import{a as O,c as Mt}from"./chunk-C6Q5SG76.js";var gt=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=Me({token:e,factory:e.\u0275fac,providedIn:"root"})};var ke=class e{#e=$(He);s3Providers=H(this.getS3Config("Providers"));s3Regions=H(this.getS3Config("Regions"));s3RegionHosts=H(this.getS3Config("RegionHosts"));s3StorageClasses=H(this.getS3Config("StorageClasses"));storjSatellites=H(this.getStorjConfig("Satellites"));storjAuthenticationMethods=H(this.getStorjConfig("AuthenticationMethods"));openstackProviders=H(this.getOpenstackConfig("Providers"));openstackVersions=H(this.getOpenstackConfig("Versions"));gcsLocations=H(this.getGcsConfig("Locations"));gcsStorageClasses=H(this.getGcsConfig("StorageClasses"));getS3Config(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":n}}).pipe(Ye(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(Ye(t=>this.#t(t)))}getOpenstackConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":n}}).pipe(Ye(t=>this.#t(t)))}getGcsConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":n}}).pipe(Ye(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=Me({token:e,factory:e.\u0275fac,providedIn:"root"})};function Be(e){return e==null?"":":"+e.toString()}function oe(e){return e==null?"":e.startsWith("/")?e:"/"+e}function b(e,n){let t={},o={};return n.searchParams.forEach((i,l)=>{ve.find(u=>u.key===e)?.dynamicFields?.includes(l)?o[l]=decodeURIComponent(i):t[l]=decodeURIComponent(i)}),{advanced:t,dynamic:o}}function G(e,n=!1){let t=e.map(([i,l])=>`${i}=${l?encodeURIComponent(l.toString()):""}`).join("&");return t?(n?"":"?")+t:""}function Ct(e){let n=e.destinationType,t=ve.find(o=>o.customKey===n||o.key===n);if(!t)throw new Error("Invalid destination type");return t?.mapper.to(e)??""}function At(e){let n=URL.canParse(e),t=e.split("://")[0],o=e.split("://")[1],i="http://"+o;if(o.startsWith("%")&&t==="file")return ve.find(l=>l.customKey===t||l.key===t)?.mapper.from(t,new URL("http://localhost"),e);try{let l=new URL(i);return ve.find(u=>u.customKey===t||u.key===t)?.mapper.from(t,l,e)}catch(l){console.error("Error while parsing target path",l)}if(!n)throw new Error("Invalid target path");return null}var h=new ne,ve=[{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=>h.control(e??"")}},mapper:{to:e=>{let n=G([...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],l=i.startsWith("%"),g=i.slice(1).startsWith(":\\")||l?i:"/"+i;return O({destinationType:e,custom:{path:g}},b(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=>h.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:e=>h.control(e??"",[Ee.required,Ee.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>h.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=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Be(t)+oe(i)+n}`},from:(e,n,t)=>O({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},b(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=>h.control(e??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>h.control(e??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:e=>e.get(ke).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(ke).s3StorageClasses}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+oe(t)+o}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},b(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=>h.control(e??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(ke).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(ke).gcsStorageClasses},"authid"],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${e.custom.path}${n}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},b(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=>h.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},b(e,n))}},{key:"pcloud",displayName:"pCloud",description:"Store backups in pCloud.",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>A([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:"Server",longDescription:"Server",formElement:e=>h.control(e??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>h.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>{let o=n.pathname.replace(/^\//,"");return O({destinationType:e,custom:{server:n.hostname,path:o}},b(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=>h.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},b(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=>h.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},b(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=>h.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>h.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Be(t)+oe(i)+n}`},from:(e,n,t)=>O({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},b(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=>h.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>h.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Be(t)+oe(i)+n}`},from:(e,n,t)=>O({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},b(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=>h.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},b(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=>h.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},b(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=>h.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},b(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=>h.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},b(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=>h.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>h.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=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+oe(t)+o}`},from:(e,n,t)=>O({destinationType:e,custom:{bucket:n.hostname,path:n.pathname}},b(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=>h.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>h.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=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+oe(t)+o}`},from:(e,n,t)=>O({destinationType:e,custom:{bucket:n.hostname,path:n.pathname}},b(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=>h.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},b(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=>h.control(e??"",[Ee.email])},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},b(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=>h.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>h.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Be(t)+oe(i)+n}`},from:(e,n,t)=>O({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},b(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(([l])=>!["rclone-remote-repository","rclone-remote-path"].includes(l)),i=G([...Object.entries(e.advanced),...o]);return`${e.destinationType}://${n}/${t+i}`},from:(e,n,t)=>{let{advanced:o,dynamic:i}=b(e,n);return O({destinationType:e,dynamic:O({"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=>h.control(e??"")}},dynamicFields:[{name:"openstack-authuri",shortDescription:"Auth URI",type:"Enumeration",loadOptions:e=>e.get(ke).openstackProviders},{name:"openstack-version",shortDescription:"Version",type:"Enumeration",loadOptions:e=>e.get(ke).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=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{bucket:t}=e.custom;return`${e.destinationType}://${t+n}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},b(e,n))}},{key:"webdav",displayName:"WebDAV",description:"Store backups in WebDAV.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>h.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>h.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.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"],l=G([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([u])=>u!=="use-ssl")]);return`${e.destinationType}${i?"s":""}://${t+Be(n)+oe(o)+l}`},from:(e,n,t)=>O({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},b(e,n))}},{key:"aftp",displayName:"FTP",description:"Store backups in FTP.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>h.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>h.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.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=G([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([l])=>l!=="use-ssl")]);return`${e.destinationType}://${t+Be(n)+oe(o)+i}`},from:(e,n,t)=>O({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},b(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=>h.control(e??"")}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let n=e.custom.server,t=e.dynamic["sia-targetpath"],o=G([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([i])=>i!=="sia-targetpath")]);return`${e.destinationType}://${n+oe(t)+o}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.pathname}},b(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=>h.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=G([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([o])=>o!=="cos-targetpath")]);return`${e.destinationType}://${n+t}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.pathname}},b(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=>h.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>h.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.control(e??"")},username:{type:"String",name:"username",shortDescription:"Username",longDescription:"Username",formElement:e=>h.control(e??"")},password:{type:"Password",name:"password",shortDescription:"Password",longDescription:"Password",formElement:e=>h.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"}],mapper:{to:e=>{let{port:n,server:t,path:o,username:i,password:l}=e.custom,u={"auth-username":i,"auth-password":l},g=e.dynamic["use-ssl"],P=G([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([N])=>N!=="use-ssl"),...Object.entries(u)]);return`${e.destinationType}${g?"s":""}://${t+Be(n)+oe(o)+P}`},from:(e,n,t)=>O({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},b(e,n))}},{key:"cifs",displayName:"CIFS",description:"Store backups in CIFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>h.control(e??"")},share:{type:"String",name:"share",shortDescription:"Share Name",longDescription:"Share Name",formElement:e=>h.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.control(e??"")}},dynamicFields:["transport","auth-username","auth-password","auth-domain"],mapper:{to:e=>{let{share:n,server:t,path:o,username:i,password:l}=e.custom,u={"auth-username":i,"auth-password":l},g=G([...Object.entries(e.advanced),...Object.entries(u)]);return`${e.destinationType}://${t+oe(n)+oe(o)+g}`},from:(e,n,t)=>{let o=n.pathname.split("/")[1],i=n.pathname.split("/").slice(2).join("/");return O({destinationType:e,custom:{server:n.hostname,share:o,path:i}},b(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&${G([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>O({destinationType:e},b(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(ke).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&${G([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>O({destinationType:e},b(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=Me({token:e,factory:e.\u0275fac,providedIn:"root"})};var an=["formRef"];function sn(e,n){if(e&1&&(a(0,"spk-option",27),m(1),r()),e&2){let t=n.$implicit;c("value",t.Key),s(),Y(t.DisplayName)}}function ln(e,n){if(e&1&&_(0,"spk-progress-bar",38),e&2){let t=p(3);$e("error",t.calculatePasswordStrength()===1)("warn",t.calculatePasswordStrength()===2)("primary",t.calculatePasswordStrength()===4)("success",t.calculatePasswordStrength()===5),c("value",t.calculatePasswordStrength()*(100/5))}}function pn(e,n){e&1&&(a(0,"span",33),w(1,9),r())}function cn(e,n){e&1&&(C(0,7,1),_(1,"spk-icon"),f())}function mn(e,n){e&1&&(C(0,7,2),_(1,"spk-icon"),f())}function un(e,n){e&1&&(C(0,10,1),_(1,"spk-icon",40),f())}function _n(e,n){e&1&&(C(0,10,2),_(1,"spk-icon"),f())}function dn(e,n){if(e&1){let t=k();a(0,"button",39),D("click",function(){S(t);let i=p(3);return T(i.copyPassword())}),C(1,10),d(2,un,2,0)(3,_n,2,0),f(),r()}if(e&2){let t=p(3);s(2),F(t.copiedPassword()?2:3)}}function Fn(e,n){e&1&&(a(0,"spk-alert",37),w(1,11),r())}function gn(e,n){if(e&1){let t=k();a(0,"div",28)(1,"spk-form-field")(2,"label",29),C(3,6),_(4,"sup"),f(),r(),_(5,"input",30),r(),d(6,ln,1,9,"spk-progress-bar",31),a(7,"spk-form-field"),_(8,"input",32),d(9,pn,2,0,"span",33),r(),a(10,"div",34)(11,"button",35),D("click",function(){S(t);let i=p(2);return T(i.showPassword.set(!i.showPassword()))}),C(12,7),d(13,cn,2,0)(14,mn,2,0),f(),r(),a(15,"button",35),D("click",function(){S(t);let i=p(2);return T(i.generatePassword())}),C(16,8),_(17,"spk-icon"),f(),r(),d(18,dn,4,1,"button",36),r(),d(19,Fn,2,0,"spk-alert",37),r()}if(e&2){let t=p(2);s(5),c("type",t.showPassword()?"text":"password"),s(),F(t.generalForm.value.password?6:-1),s(2),c("type",t.showPassword()?"text":"password"),s(),F(t.generalForm.value.repeatPassword&&t.generalForm.value.repeatPassword!==t.generalForm.value.password?9:-1),s(4),F(t.showPassword()?13:14),s(5),F(t.showCopyPassword()?18:-1),s(),F(t.generalForm.value.password&&t.generalForm.value.password===t.generalForm.value.repeatPassword?19:-1)}}function Cn(e,n){if(e&1&&(a(0,"spk-select",24)(1,"label",25),w(2,5),r(),_(3,"input",26),I(4,sn,2,2,"spk-option",27,x),r(),d(6,gn,20,7,"div",28)),e&2){let t=p();c("displayFn",t.displayFn()),s(4),v(t.encryptionOptions()),s(2),F(t.encryptionFieldSignal()!==""?6:-1)}}function fn(e,n){if(e&1&&(a(0,"button",22),C(1,12),_(2,"spk-icon"),f(),r()),e&2){let t=p();c("disabled",t.generalForm.invalid)}}function Sn(e,n){if(e&1&&(a(0,"spk-tooltip",23)(1,"button",22),C(2,13),_(3,"spk-icon"),f(),r()()),e&2){let t=p();c("disabled",!(t.showCopyPassword()&&!t.copiedPassword())),s(),c("disabled",t.generalForm.invalid||t.showCopyPassword()&&!t.copiedPassword())}}var qe=new ne,Qt=(e={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>qe.group({name:qe.control(e.name,[Ee.required]),description:qe.control(e.description),encryption:qe.control(e.encryption,[Wt()]),password:qe.control(e.password,[Ot(n=>n?.value.encryption!=="",[Ee.required])]),repeatPassword:qe.control(e.repeatPassword,[Ot(n=>n?.value.encryption!=="",[Ee.required])])}),$t={Key:"",DisplayName:"None"},kt=class e{#e=$(ae);#t=$(De);#o=$(ft);#i=$(_e);#n=$(pt);formRef=fe.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=A(!1);copiedPassword=A(!1);showCopyPassword=A(!1);encryptionEffect=st(()=>{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=[$t,...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=re({type:e,selectors:[["app-general"]],viewQuery:function(t,o){t&1&&Se(o.formRef,an,5),t&2&&Te()},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 l;l=$localize`Backup description`;let u;u=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let g;g=$localize`Encryption`;let P;P=$localize`Encryption`;let N;N=$localize`Password`;let M;M=$localize`Repeat password`;let K;K=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let Z;Z=$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:`,Z=xe(Z);let U;U=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let J;J=$localize`Passwords do not match`;let te;te=$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:`,te=xe(te);let E;E=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let y;y=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let z;return z=$localize` Continue ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],o,i,l,u,P,K,Z,U,J,te,E,y,z,["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"],[3,"displayFn"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",g,"formControlName","encryption"],[3,"value"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",N,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",M,"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=k();a(0,"form",14,0),D("submit",function(){return S(i),T(o.next())}),a(2,"h3",15),w(3,1),r(),a(4,"spk-form-field")(5,"label",16),C(6,2),_(7,"sup"),f(),r(),_(8,"input",17),r(),a(9,"spk-form-field")(10,"label",18),w(11,3),r(),_(12,"textarea",19),r(),d(13,Cn,7,2),a(14,"div",20)(15,"button",21),D("click",function(){return S(i),T(o.exit())}),C(16,4),_(17,"spk-icon"),f(),r(),d(18,fn,3,1,"button",22)(19,Sn,4,2,"spk-tooltip",23),r()()}t&2&&(c("formGroup",o.generalForm),s(13),F(o.isNew()?13:-1),s(5),F(o.encryptionFieldSignal()===""?18:19))},dependencies:[Ae,Pe,se,le,ye,Ne,Oe,ce,ue,Ve,pe,me,jt,_t,je],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 Tn=["formRef"],hn=(e,n)=>({index:e,formView:n,formGroupName:"advancedOptions",destinationType:null,oauthField:null}),Dn=e=>({$implicit:e});function En(e,n){e&1&&(C(0,4,1),_(1,"spk-icon",16),f())}function yn(e,n){if(e&1&&(a(0,"spk-option",19),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),Y(t)}}function Pn(e,n){e&1&&(a(0,"p",16),w(1,10),r())}function Nn(e,n){if(e&1&&(a(0,"spk-option",19),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),Y(t.name)}}function On(e,n){if(e&1){let t=k();C(0,7,1),a(1,"button",33,2),D("click",function(){let i=S(t).$implicit,l=p();return T(l.addNewOption(i))}),r(),f()}if(e&2){let t=n.$implicit;s(),Je(t.name),et(0)}}function An(e,n){e&1&&Ke(0)}function kn(e,n){if(e&1&&d(0,An,1,0,"ng-container",34),e&2){let t=n.$implicit,o=n.$index;p();let i=he(38);c("ngTemplateOutlet",i)("ngTemplateOutletContext",ze(5,Dn,Ut(2,hn,o,t)))}}function $n(e,n){if(e&1&&(a(0,"spk-tooltip",44)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function xn(e,n){if(e&1&&(a(0,"app-file-tree",37)(1,"label",43),m(2),d(3,$n,3,1,"spk-tooltip",44),r(),_(4,"input",45),r()),e&2){let t,o=p().$implicit,i=p();c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name))("accepts",o.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name)}}function In(e,n){if(e&1&&(a(0,"spk-tooltip",44)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function vn(e,n){if(e&1&&(a(0,"app-file-tree",38)(1,"label",43),m(2),d(3,In,3,1,"spk-tooltip",44),r(),_(4,"input",45),r()),e&2){let t,o=p().$implicit,i=p();c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name)),s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name)}}function wn(e,n){if(e&1&&(a(0,"spk-tooltip",44)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Mn(e,n){e&1&&(a(0,"spk-icon",46),m(1,"link"),r())}function Rn(e,n){e&1&&(a(0,"spk-icon",46),m(1,"textbox"),r())}function bn(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",43),m(2),d(3,wn,3,1,"spk-tooltip",44),r(),_(4,"input",45),d(5,Mn,2,0,"spk-icon",46)(6,Rn,2,0,"spk-icon",46),r()),e&2){let t,o=p().$implicit;s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name),s(),F(o.formView.type==="Path"?5:6)}}function Gn(e,n){if(e&1){let t=k();a(0,"span",50),D("click",function(){S(t);let i=p(2).$implicit,l=p();return T(l.oauthStartTokenCreation(i.formViewType))}),m(1,"AuthID"),r()}}function Vn(e,n){e&1&&(a(0,"spk-icon",46),m(1,"password"),r())}function Ln(e,n){if(e&1){let t=k();a(0,"spk-icon",51),D("click",function(){S(t);let i=p(2).$implicit;return T(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye "),r()}}function Un(e,n){if(e&1){let t=k();a(0,"spk-icon",51),D("click",function(){S(t);let i=p(2).$implicit;return T(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye-slash "),r()}}function Bn(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",43),m(2),r(),_(3,"input",47),d(4,Gn,2,0,"span",48)(5,Vn,2,0,"spk-icon",46)(6,Ln,2,0,"spk-icon",49)(7,Un,2,0,"spk-icon",49),r()),e&2){let t,o=p().$implicit;s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name),c("type",o.formView.showPassword?"text":"password"),s(),F(o.oauthField===o.formView.name?4:5),s(2),F(o.formView.showPassword?6:7)}}function Kn(e,n){if(e&1&&(a(0,"spk-tooltip",44)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function zn(e,n){if(e&1&&(a(0,"spk-option",19),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),Y(t)}}function Xn(e,n){if(e&1&&(a(0,"spk-select")(1,"label",43),m(2),d(3,Kn,3,1,"spk-tooltip",44),r(),_(4,"input",52),I(5,zn,2,2,"spk-option",19,x),r()),e&2){let t,o=p().$implicit;s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name),s(),v(o.formView.options)}}function Hn(e,n){if(e&1&&(a(0,"spk-tooltip",44)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function jn(e,n){if(e&1&&(a(0,"spk-option",19),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),Y(t)}}function Wn(e,n){if(e&1&&(a(0,"div",39)(1,"label",43),m(2),d(3,Hn,3,1,"spk-tooltip",44),r(),a(4,"div",53)(5,"spk-form-field"),_(6,"input",54),a(7,"spk-icon",46),m(8,"resize"),r()(),a(9,"spk-select"),_(10,"label")(11,"input",55),I(12,jn,2,2,"spk-option",19,x),r()()()),e&2){let t,o=p().$implicit,i=p();c("formGroupName",o.formView.name),s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(3),Q("id","destination-",o.formGroupName,"-",o.index,""),s(6),v(i.sizeOptions())}}function qn(e,n){if(e&1&&(a(0,"spk-tooltip",44)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Qn(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",43),m(2),d(3,qn,3,1,"spk-tooltip",44),r(),_(4,"input",56),a(5,"spk-icon",46),m(6,"numpad"),r()()),e&2){let t,o=p().$implicit;s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name)}}function Yn(e,n){if(e&1&&(a(0,"spk-tooltip",44)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Zn(e,n){if(e&1&&(a(0,"spk-toggle",40)(1,"label",43),m(2),d(3,Yn,3,1,"spk-tooltip",44),r(),_(4,"input",57),r()),e&2){let t,o=p().$implicit;s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name)}}function Jn(e,n){if(e&1&&(a(0,"spk-tooltip",44)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function eo(e,n){e&1&&(a(0,"spk-option",59),m(1,"None"),r()),e&2&&c("value","None")}function to(e,n){if(e&1&&(a(0,"spk-option",19),m(1),_(2,"spk-checkbox",60),r()),e&2){let t=p().$implicit;c("value",t),s(),V(" ",t," ")}}function no(e,n){if(e&1&&d(0,eo,2,1,"spk-option",59)(1,to,3,2,"spk-option",19),e&2){let t=n.$implicit;F(t==="None"?0:1)}}function oo(e,n){if(e&1&&(a(0,"spk-select",41)(1,"label",43),m(2),d(3,Jn,3,1,"spk-tooltip",44),r(),_(4,"input",58),I(5,no,2,1,null,null,x),r()),e&2){let t,o=p().$implicit;c("selectMultiple",!0),s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),j("formControlName",o.formView.name),s(),v(o.formView.options)}}function io(e,n){if(e&1&&(a(0,"spk-tooltip",44)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function ro(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",43),m(2),d(3,io,3,1,"spk-tooltip",44),r(),_(4,"input",45),r()),e&2){let t,o=p().$implicit;s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name)}}function ao(e,n){if(e&1){let t=k();a(0,"div",35),W(1,36),d(2,xn,5,14,"app-file-tree",37)(3,vn,5,10,"app-file-tree",38)(4,bn,7,10,"spk-form-field")(5,Bn,8,11,"spk-form-field")(6,Xn,7,9,"spk-select")(7,Wn,14,9,"div",39)(8,Qn,7,9,"spk-form-field")(9,Zn,5,9,"spk-toggle",40)(10,oo,7,7,"spk-select",41)(11,ro,5,9,"spk-form-field"),q(),a(12,"button",42),D("click",function(){let i=S(t).$implicit,l=p();return T(l.removeFormView(i.formView,0))}),a(13,"spk-icon"),m(14,"x-circle"),r()()()}if(e&2){let t=n.$implicit;s(),c("formGroupName",t.formGroupName),s(),F(t.formView.type==="FileTree"?2:t.formView.type==="FolderTree"?3:t.formView.type==="String"||t.formView.type==="Path"?4:t.formView.type==="Password"?5:t.formView.type==="Enumeration"?6:t.formView.type==="Size"?7:t.formView.type==="Integer"?8:t.formView.type==="Boolean"?9:t.formView.type==="Flags"?10:t.formView.type==="Timespan"?11:-1)}}var Qe=new ne,Yt=["Bytes","KB","MB","GB","TB","PB"],so=[{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`}],lo=1024*1024*1024*2,po=1024*1024*5,Zt=(e={remoteVolumeSize:50,size:"MB",backupRetention:"",advancedOptions:[]})=>Qe.group({remoteVolumeSize:Qe.group({size:Qe.control(e.remoteVolumeSize),unit:Qe.control(e.size)}),backupRetention:Qe.control(e.backupRetention),advancedOptions:Qe.group({})}),xt=class e{#e=$(_e);#t=$(ae);#o=$(De);formRef=fe.required("formRef");optionsForm=this.#e.optionsForm;selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;sizeOptions=A(Yt);retentionOptions=A(so);volumeSizeSignal=H(this.optionsForm.controls.remoteVolumeSize.get("size")?.valueChanges.pipe(Et(300))??Dt(null));volumeUnitSignal=H(this.optionsForm.controls.remoteVolumeSize.get("unit")?.valueChanges.pipe(Et(300))??Dt(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,Yt.indexOf(t));return o>lo||o<po});oauthStartTokenCreation(n){}getFormFieldValue(n,t,o){return this.optionsForm.controls.advancedOptions.controls[o].value}removeFormView(n,t){this.#e.removeOptionFromFormGroup(n)}addNewOption(n){this.#e.addOptionToFormGroup(n)}retentionOptionDisplayFn(){let n=this.retentionOptions();return t=>{let o=n.find(i=>i.value===t);return o?o.name:""}}displayFn(){let n=this.#e.advancedOptions();return t=>{let o=n.find(i=>i.name===t);return o?`${o.name}`:""}}goBack(){this.#t.navigate(["schedule"],{relativeTo:this.#o.parent})}submit(){this.#e.submit()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({type:e,selectors:[["app-advanced-options-settings"]],viewQuery:function(t,o){t&1&&Se(o.formRef,Tn,5),t&2&&Te()},decls:46,vars:8,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#18\uFFFD"}:START_LINK: Read more ${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-square-out${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#18\uFFFD"}:CLOSE_LINK:`;let l;l=$localize`Backup retention`;let u;u=$localize` Advanced options ${"\uFFFD#29\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#30\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#30\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#32\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*34:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1:${"\uFFFD0:1\uFFFD"}:INTERPOLATION:${"[\uFFFD/#30\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*34:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#32\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SPK_MENU:`,u=xe(u);let g;g=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#42\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let P;P=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#45\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `;let N;return N=$localize` The chosen size is outside the recommended range. This may cause performance issues, excessively large temporary files or other problems. `,[["formRef",""],["fieldTemplate",""],["option",""],t,o,i,l,u,g,P,N,[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"],["type","text","placeholder",n,"formControlName","unit"],[3,"value"],["href","https://forum.duplicati.com/t/choosing-sizes-in-duplicati/17683","target","_blank",1,"spk-primary"],["suffix",""],[3,"displayFn"],["type","text","formControlName","backupRetention"],[3,"disallowToggle"],["title",""],[3,"searchable"],["spk-button","","type","button",1,"outlined","small"],["menu",""],["type","button"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["type","button",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["type","search",3,"id","formControlName"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["type","search","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],["type","text","id","text",3,"formControlName"],["deselect","",3,"value"],[1,"raised","primary"]]},template:function(t,o){if(t&1){let i=k();a(0,"form",11,0),D("submit",function(){return S(i),T(o.submit())}),a(2,"h3",12),w(3,3),r(),a(4,"div",13)(5,"div",14)(6,"spk-form-field")(7,"label",15),C(8,4),d(9,En,2,0,"spk-icon",16),f(),r(),_(10,"input",17),r(),a(11,"spk-select"),_(12,"input",18),I(13,yn,2,2,"spk-option",19,x),r()(),d(15,Pn,2,0,"p",16),a(16,"p"),C(17,5),a(18,"a",20),_(19,"spk-icon",21),r(),f(),r()(),a(20,"spk-select",22)(21,"label",15),w(22,6),r(),_(23,"input",23),I(24,Nn,2,2,"spk-option",19,x),r(),a(26,"app-toggle-card",24),W(27,25),C(28,7),a(29,"spk-menu",26)(30,"button",27),_(31,"spk-icon"),r(),W(32,28),I(33,On,3,1,"button",29,x),q(),r(),f(),q(),I(35,kn,1,7,"ng-container",null,x),r(),d(37,ao,15,2,"ng-template",null,1,at),a(39,"div",30)(40,"button",31),D("click",function(){return S(i),T(o.goBack())}),C(41,8),_(42,"spk-icon"),f(),r(),a(43,"button",32),C(44,9),_(45,"spk-icon"),f(),r()()()}t&2&&(c("formGroup",o.optionsForm),s(9),F(o.exceededVolumeSize()?9:-1),s(4),v(o.sizeOptions()),s(2),F(o.exceededVolumeSize()?15:-1),s(5),c("displayFn",o.retentionOptionDisplayFn()),s(4),v(o.retentionOptions()),s(2),c("disallowToggle",!0),s(3),c("searchable",!0),s(4),v(o.nonSelectedOptions()),s(2),v(o.selectedOptions()),s(8),$e("loader",o.isSubmitting()))},dependencies:[Ae,Pe,se,be,Re,le,ye,Ne,Oe,Ge,lt,Ft,ue,Ve,pe,ce,Le,dt,me,je,We,Ue],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}"],changeDetection:0})};var co=["formRef"];function mo(e,n){if(e&1&&(a(0,"spk-option",38),m(1),r()),e&2){let t=n.$implicit;c("value",t.key),s(),Y(t.label)}}function uo(e,n){if(e&1){let t=k();a(0,"div",26)(1,"spk-form-field")(2,"label",27),w(3,8),r(),a(4,"input",28,1),D("focus",function(){S(t);let i=he(5);return T(i.showPicker())}),r(),a(6,"spk-icon",29),m(7,"clock"),r()(),a(8,"spk-form-field"),_(9,"label",30),a(10,"input",31,2),D("focus",function(){S(t);let i=he(11);return T(i.showPicker())}),r(),a(12,"spk-icon",29),m(13,"calendar"),r()()(),W(14,32),a(15,"div",33)(16,"spk-form-field")(17,"label",34),w(18,9),r(),_(19,"input",35),r(),a(20,"spk-select",36),_(21,"input",37),I(22,mo,2,2,"spk-option",38,x),r()(),a(24,"app-toggle-card",39),W(25,40),w(26,10),q(),a(27,"div",41)(28,"spk-toggle",21),C(29,11),_(30,"input",42),f(),r(),a(31,"spk-toggle",21),C(32,12),_(33,"input",43),f(),r(),a(34,"spk-toggle",21),C(35,13),_(36,"input",44),f(),r(),a(37,"spk-toggle",21),C(38,14),_(39,"input",45),f(),r(),a(40,"spk-toggle",21),C(41,15),_(42,"input",46),f(),r(),a(43,"spk-toggle",21),C(44,16),_(45,"input",47),f(),r(),a(46,"spk-toggle",21),C(47,17),_(48,"input",48),f(),r()()(),q()}if(e&2){let t=p();s(20),c("displayFn",t.displayFn),s(2),v(t.unitOptions),s(2),c("disallowToggle",!0)}}var ee=new ne,Jt=[{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`}],en=(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}}})=>ee.group({autoRun:ee.control(e.autoRun),nextTime:ee.group({time:ee.control(e.nextTime.time),date:ee.control(e.nextTime.date)}),runAgain:ee.group({repeatValue:ee.control(e.runAgain.repeatValue),repeatUnit:ee.control(e.runAgain.repeatUnit),allowedDays:ee.group({mon:ee.control(e.runAgain.allowedDays.mon),tue:ee.control(e.runAgain.allowedDays.tue),wed:ee.control(e.runAgain.allowedDays.wed),thu:ee.control(e.runAgain.allowedDays.thu),fri:ee.control(e.runAgain.allowedDays.fri),sat:ee.control(e.runAgain.allowedDays.sat),sun:ee.control(e.runAgain.allowedDays.sun)})})}),It=class e{#e=$(_e);#t=$(ae);#o=$(De);formRef=fe.required("formRef");scheduleForm=this.#e.scheduleForm;scheduleFormSignal=this.#e.scheduleFormSignal;unitOptions=Jt;displayFn(n){let t=Jt.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=re({type:e,selectors:[["app-schedule"]],viewQuery:function(t,o){t&1&&Se(o.formRef,co,5),t&2&&Te()},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 l;l=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let u;u=$localize`Next time`;let g;g=$localize`Run again every`;let P;P=$localize`Allowed days`;let N;N=$localize` Monday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let M;M=$localize` Tuesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Wednesday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let Z;Z=$localize` Thursday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let U;U=$localize` Friday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let J;J=$localize` Saturday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`;let te;return te=$localize` Sunday ${"\uFFFD#48\uFFFD\uFFFD/#48\uFFFD"}:TAG_INPUT:`,[["formRef",""],["timeRef",""],["dateRef",""],n,t,o,i,l,u,g,P,N,M,K,Z,U,J,te,[3,"submit","formGroup"],[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox","formControlName","autoRun"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["formGroupName","nextTime",1,"row-inputs"],["for","time"],["type","time","id","time","formControlName","time",3,"focus"],["suffix",""],["for","date"],["type","date","id","date","formControlName","date",3,"focus"],["formGroupName","runAgain"],[1,"row-inputs"],["for","repeatValue"],["type","number","id","repeatValue","formControlName","repeatValue"],[3,"displayFn"],["type","text","id","repeatUnit","formControlName","repeatUnit"],[3,"value"],["formGroupName","allowedDays",3,"disallowToggle"],["title",""],[1,"days-wrap"],["type","checkbox","formControlName","mon"],["type","checkbox","formControlName","tue"],["type","checkbox","formControlName","wed"],["type","checkbox","formControlName","thu"],["type","checkbox","formControlName","fri"],["type","checkbox","formControlName","sat"],["type","checkbox","formControlName","sun"]]},template:function(t,o){if(t&1){let i=k();a(0,"form",18,0),D("submit",function(){return S(i),T(o.next())}),a(2,"h3",19),w(3,3),r(),a(4,"div",20)(5,"spk-toggle",21),C(6,4),_(7,"input",22),f(),r(),a(8,"p"),w(9,5),r()(),d(10,uo,49,2),a(11,"div",23)(12,"button",24),D("click",function(){return S(i),T(o.goBack())}),C(13,6),_(14,"spk-icon"),f(),r(),a(15,"button",25),C(16,7),_(17,"spk-icon"),f(),r()()()}if(t&2){let i;c("formGroup",o.scheduleForm),s(10),F((i=o.scheduleFormSignal())!=null&&i.autoRun?10:-1)}},dependencies:[Ae,Pe,se,be,Re,le,ye,Ne,Oe,Ge,ce,ue,me,Le,pe,Ve,Ue],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 _o(e,n){if(e&1&&(a(0,"spk-option",2),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),Y(t.key)}}function Fo(e,n){if(e&1&&(a(0,"spk-option",2),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),Y(t.key)}}function go(e,n){if(e&1){let t=k();a(0,"spk-select",0)(1,"input",5),D("ngModelChange",function(i){S(t);let l=p(2);return T(l.updateStateExpression(i))}),r(),I(2,Fo,2,2,"spk-option",2,x),r()}if(e&2){let t,o=p(2);c("hideClearButton",!0)("displayFn",o.displayFn),s(),c("ngModel",(t=o.pathState())==null?null:t.expression),s(),v(o.fileGroupOptions())}}function Co(e,n){if(e&1){let t=k();a(0,"spk-form-field")(1,"input",5),D("ngModelChange",function(i){S(t);let l=p(2);return T(l.updateStateExpression(i))}),r()()}if(e&2){let t,o=p(2);s(),c("ngModel",(t=o.pathState())==null?null:t.expression)}}function fo(e,n){if(e&1){let t=k();a(0,"spk-select",0)(1,"input",1),D("ngModelChange",function(i){S(t);let l=p();return T(l.updateStateType(i))}),r(),I(2,_o,2,2,"spk-option",2,x),r(),d(4,go,4,3,"spk-select",0)(5,Co,2,1,"spk-form-field"),a(6,"div",3),D("click",function(){S(t);let i=p();return T(i.removeFilter())}),a(7,"spk-icon",4),m(8,"x-circle"),r()()}if(e&2){let t,o,i=p();c("hideClearButton",!0)("displayFn",i.displayFn),s(),c("ngModel",(t=i.pathState())==null?null:t.type),s(),v(i.expressionOptions()),s(2),F(((o=i.pathState())==null?null:o.type)==="-FileGroup"||((o=i.pathState())==null?null:o.type)==="+FileGroup"?4:5)}}var tn=[{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"}],So=[{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"}],St=class e{path=Pt.required();osType=Pt();pathChange=yt();remove=yt();expressionOptions=A(tn);fileGroupOptions=A(So);pathState=A(null);typeState=B(()=>{let n=this.pathState();return n?n.type:null});pathEffect=st(()=>{let n=this.path(),t=n.slice(1),o=n.startsWith("-")?"-":"+",i=this.osType()==="Windows",l=i?"\\":"/",u=t.startsWith("%");return t===""?this.pathState.set({type:"-Unknown",path:"___none___",expression:""}):u&&t.endsWith(l)||i&&t.slice(2).startsWith("\\")&&t.endsWith("\\")||t.startsWith(l)&&t.endsWith(l)?this.pathState.set({type:`${o}Folder`,path:t,expression:t}):t.startsWith("*")&&t.endsWith(`*${l}`)?this.pathState.set({type:`${o}FolderNameIncludes`,path:t,expression:t.slice(1,-2)}):t.startsWith("[.*")&&t.endsWith(`[^\\${l}]*]`)?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",l=i?"\\":"/",g=i&&!n.expression.startsWith("%")?n.expression.slice(2):n.expression,P=n.path.startsWith("%");if(o==="Unknown")return`${t}${n.expression}`;if(o==="Folder"){let N=P||g.startsWith(l),M=g.endsWith(l);return M&&N?`${t}${n.expression}`:M?`${t}${n.expression}${l}`:N?`${t}${l}${n.expression}`:`${t}${l}${n.expression}${l}`}return o==="FolderNameIncludes"?`${t}*${n.expression}*${l}`:o==="FileNameIncludes"?`${t}[.*${n.expression}[^\\${l}]*]`: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=tn.find(o=>o.value===n);return t?t.key:""}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({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...`,[[3,"hideClearButton","displayFn"],["type","text","placeholder",n,3,"ngModelChange","ngModel"],[3,"value"],[1,"filter-removal",3,"click"],[1,"spk-primary"],["type","text",3,"ngModelChange","ngModel"]]},template:function(t,o){t&1&&d(0,fo,9,4),t&2&&F(o.pathState()?0:-1)},dependencies:[ut,se,le,Kt,ue,me,pe,ce],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 To=["formRef"];function ho(e,n){if(e&1){let t=k();a(0,"app-filter",42),D("pathChange",function(i){let l=S(t).$index,u=p(2);return T(u.patchPathAt(i,l))})("remove",function(){let i=S(t).$index,l=p(2);return T(l.removePathAt(i))}),r()}if(e&2){let t,o=n.$implicit,i=p(2);c("path",o)("osType",(t=i.osType())!==null&&t!==void 0?t:"")}}function Do(e,n){if(e&1&&I(0,ho,1,2,"app-filter",41,x),e&2){let t=p();v(t.pathArray())}}function Eo(e,n){if(e&1&&(a(0,"spk-option",45),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),Y(t)}}function yo(e,n){if(e&1&&(a(0,"div",40)(1,"spk-form-field"),_(2,"input",43),r(),a(3,"spk-select"),_(4,"input",44),I(5,Eo,2,2,"spk-option",45,x),r()()),e&2){let t=p();s(5),v(t.sizeOptions())}}var we=new ne,Po=["Bytes","KB","MB","GB","TB","PB"],nn=(e={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>we.group({path:we.control(e.path),excludes:we.group({hidden:we.control(e.excludes.hidden),system:we.control(e.excludes.system),temporary:we.control(e.excludes.temporary),filesLargerThan:we.group({size:we.control(null),unit:we.control(null)})})}),vt=class e{#e=$(_e);#t=$(ae);#o=$(De);formRef=fe.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new ct("");filesLargerThan=B(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=A(Po);osType=this.#e.osType;pathSignal=H(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(u=>!u.startsWith("-")&&!u.startsWith("+")).join("\0"),l=this.pathArray().map((u,g)=>g===t?`${n}`:`${u}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${l}`)}removePathAt(n){let o=this.sourceDataForm.controls.path.value.split("\0").filter(l=>!l.startsWith("-")&&!l.startsWith("+")).join("\0"),i=this.pathArray().filter((l,u)=>u!==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=re({type:e,selectors:[["app-source-data"]],viewQuery:function(t,o){t&1&&Se(o.formRef,To,5),t&2&&Te()},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 l;l=$localize`Temporary files`;let u;u=$localize`Source Data`;let g;g=$localize`Folder path`;let P;P=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let N;N=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let M;M=$localize`Source Data`;let K;K=$localize`Add Path`;let Z;Z=$localize`Add a path directly from your machine.`;let U;U=$localize`Filters`;let J;J=$localize`Customize your filters.`;let te;te=$localize`Add filter`;let E;E=$localize`Exclude`;let y;y=$localize`Choose if there’s any files you want to exclude.`;let z;z=$localize` Hidden files ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`;let R;R=$localize` System files ${"\uFFFD#48\uFFFD\uFFFD/#48\uFFFD"}:TAG_INPUT:`;let ie;ie=$localize` Temporary files ${"\uFFFD#51\uFFFD\uFFFD/#51\uFFFD"}:TAG_INPUT:`;let ge;ge=$localize` Files larger than `;let de;return de=$localize`Select an option...`,[["formRef",""],u,g,P,N,M,K,Z,U,J,te,E,y,z,R,ie,ge,[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",l,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],["type","number","formControlName","size"],["type","text","formControlName","unit","placeholder",de],[3,"value"]]},template:function(t,o){if(t&1){let i=k();a(0,"form",17,0),D("submit",function(){return S(i),T(o.next())}),a(2,"div",18)(3,"h3",19),w(4,1),r(),a(5,"app-file-tree",20)(6,"label",21),w(7,2),r(),_(8,"input",22),r(),a(9,"div",23)(10,"button",24),D("click",function(){return S(i),T(o.goBack())}),C(11,3),_(12,"spk-icon"),f(),r(),a(13,"button",25),C(14,4),_(15,"spk-icon"),f(),r()()(),a(16,"div",26)(17,"h3",19),w(18,5),r(),a(19,"app-toggle-card",27),W(20,28),w(21,6),q(),a(22,"p",29),w(23,7),r(),a(24,"div",30)(25,"spk-form-field"),_(26,"input",31),r(),a(27,"button",32),D("click",function(){return S(i),T(o.addNewPath())}),a(28,"spk-icon"),m(29,"plus"),r()()()(),a(30,"app-toggle-card",27),W(31,28),w(32,8),q(),a(33,"p",29),w(34,9),r(),a(35,"button",33),D("click",function(){return S(i),T(o.addFilter())}),w(36,10),r(),d(37,Do,2,0),r(),a(38,"app-toggle-card",34),W(39,28),w(40,11),q(),a(41,"p",29),w(42,12),r(),a(43,"spk-toggle",35),C(44,13),_(45,"input",36),f(),r(),a(46,"spk-toggle",35),C(47,14),_(48,"input",37),f(),r(),a(49,"spk-toggle",35),C(50,15),_(51,"input",38),f(),r(),a(52,"spk-toggle",39),D("click",function(){return S(i),T(o.toggleFilesLargerThan())}),w(53,16),r(),d(54,yo,7,0,"div",40),r()()()}if(t&2){let i;c("formGroup",o.sourceDataForm),s(5),c("multiSelect",!0)("startingPath",o.getPath())("showFiles",!0),s(14),c("disallowToggle",!0),s(7),c("formControl",o.newPathCtrl),s(4),c("disallowToggle",!0),s(7),F((i=o.pathSignal())!=null&&i.length?37:-1),s(),c("disallowToggle",!0),s(14),$e("active",o.filesLargerThan()),s(2),F(o.filesLargerThan()?54:-1)}},dependencies:[ut,Pe,se,be,Re,le,ye,Ae,mt,Ne,Oe,Ge,ce,me,pe,Ve,ue,Le,We,Ue,St],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 Fe=new ne,_e=class e{#e=$(ae);#t=$(pt);#o=$(He);#i=$(gt);generalForm=Qt();sourceDataForm=nn();scheduleForm=en();destinationForm=on();optionsForm=Zt();isDraft=A(!1);backupId=A(null);isSubmitting=A(!1);finishedLoading=A(!1);backupDefaults=A(null);isNew=B(()=>this.backupId()==="new");osType=B(()=>this.#t.systemInfo()?.OSType);selectedOptions=A([]);selectedAdvancedFormPair=A([]);destinationFormPair=A({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=A([]);notSelectedHttpOptions=B(()=>{let n=this.httpOptions(),t=this.selectedHttpOptions()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});sourceDataFormSignal=H(this.sourceDataForm.valueChanges);destinationFormSignal=H(this.destinationForm.valueChanges);generalFormSignal=H(this.generalForm.valueChanges);encryptionFieldSignal=H(this.generalForm.controls.encryption.valueChanges);scheduleFormSignal=H(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[$t,...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(l=>l.name===n);i&&this.addAdvancedFormPair(i,t,o)}addHttpOptionByName(n,t,o){let i=this.notSelectedHttpOptions().find(l=>l.name===n);i&&this.addHttpOption(i,t,o)}addAdvancedFormPair(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,l=o??n.defaultValue;this.createFormField(i,n,l),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),n])}addHttpOption(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,l=o??n.defaultValue;this.createFormField(i,n,l),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(l=>l.name!==n.name),i)):this.selectedHttpOptions.update(i=>(i=i.filter(l=>l.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(Ze(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{this.exit()},error:o=>{}}):this.#o.putApiV1BackupById({id:t,requestBody:n}).pipe(Ze(()=>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(N=>`${N.Include?"":"-"}${N.Expression}`)??[],i=n.Settings?.find(N=>N.Name==="--exclude-files-attributes")?.Value??"",l=n.Settings?.find(N=>N.Name==="--skip-files-larger-than")??null,u=l?.Value.replace(/[0-9]/g,"")??null,g=l?.Value.replace(/[^0-9]/g,"")??null,P={path:[...t,...o].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:u&&g?{size:parseInt(g),unit:u.toUpperCase()}:null}};this.sourceDataForm.patchValue(P)}mapDestinationToForm(n){let t=n.TargetURL?At(n.TargetURL):null;t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}#s(n){let t=At(n);t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}mapGeneralToForm(n){let t=n.Settings?.find(l=>l.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=this.advancedOptions();n.Settings?.forEach(i=>{if(i.Name==="encryption-module")return this.generalForm.controls.encryption.setValue(i.Value??"");if(!(i.Name&&t.includes(i.Name))){if(i.Name==="dblock-size"){let l=i.Value?.replace(/[^0-9]/g,""),u=i.Value?.replace(/[0-9]/g,"");return this.optionsForm.controls.remoteVolumeSize.setValue({size:l?parseInt(l):null,unit:u?u.toUpperCase():null})}if(i.Name&&i.Value){let l=o.find(u=>u.name===i.Name);if(!l)return;this.addOptionToFormGroup(l,i.Value)}}})}getCurrentTargetUrl(){return this.#a(this.destinationForm.controls.destinations)}#l(){let n=this.generalForm.value,t=this.optionsForm.value,o=this.scheduleForm.value,i=this.sourceDataForm.value,u=this.destinationForm.value.destinations?.length?this.#a(this.destinationForm.controls.destinations):[],g=null;o.runAgain?.repeatUnit&&o.runAgain?.repeatValue&&(g=this.#i.toString(o.runAgain.repeatValue,o.runAgain.repeatUnit));let P=o.runAgain?.allowedDays?Object.entries(o.runAgain?.allowedDays).filter(([U,J])=>J).map(([U,J])=>U):[],N=i.path?.split("\0")??[],M=this.mapFormsToSettings(),K=Object.entries(i.excludes??{}).filter(([U,J])=>J&&U!=="filesLargerThan").map(([U])=>U),Z=i.excludes?.filesLargerThan;return K.length&&M.push({Name:"--exclude-files-attributes",Value:K.join(",")}),Z&&Z.size!==null&&Z.unit!==null&&M.push({Name:"--skip-files-larger-than",Value:`${Z.size}${Z.unit}`}),{Backup:{Name:n.name,Description:n.description,TargetURL:u[0]??null,Sources:N.filter(U=>!U.startsWith("-")),Settings:M,Filters:N.filter(U=>U.startsWith("-")).map((U,J)=>({Order:J,Include:!1,Expression:U.slice(1)}))},Schedule:o.autoRun?{Repeat:g,Time:o.nextTime?.date?new Date(`${o.nextTime.date}T${o.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:P}:null}}mapFormsToSettings(){let n=this.advancedOptions(),t=this.optionsForm.value,o=this.generalForm.value,i=[{Name:"--no-encryption",Value:"True"}];o.encryption!==""&&(i=[{Name:"encryption-module",Value:o.encryption??null},{Name:"passphrase",Value:o.password??null}]);let l=t.remoteVolumeSize?.size?{Name:"dblock-size",Value:`${t.remoteVolumeSize.size}${t.remoteVolumeSize.unit.toLowerCase()}`}:{Name:"dblock-size",Value:"50mb"},u=Object.entries(t.advancedOptions??{}).filter(([g,P])=>g&&P).map(([g,P])=>{let N=n.find(M=>M.name===g);return N?.type==="Size"?{Name:g,Value:`${P.size}${P.unit.toLowerCase()}`}:N?.type==="Integer"?{Name:g,Value:P.toString()}:N?.type==="Boolean"?{Name:g,Value:P.toString()}:{Name:g,Value:P}});return[...i,l,...u]}#a(n){return n.controls.map(t=>Ct(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,l=O({name:n,type:"String",defaultValue:t},o);this.createFormField(i,l,t),this.selectedOptions.update(u=>(u.push(l),u))}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,Fe.control(o));return}if(t.type==="Size"){let i=o.replace(/[0-9]/g,""),l=o.replace(/[^0-9]/g,"");n.addControl(t.name,Fe.group({size:Fe.control(l?parseInt(l):50),unit:Fe.control(i?i.toUpperCase():"MB")}));return}if(t.type==="Integer"){n.addControl(t.name,Fe.control(o?parseInt(o):0));return}if(t.type==="Boolean"){n.addControl(t.name,Fe.control(o==="true"||o==="True"));return}if(t.type==="Flags"){n.addControl(t.name,Fe.control(o??""));return}if(t.type==="Timespan"){n.addControl(t.name,Fe.control(o,[Ee.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(n,t,o=!1){let i=ve.find(E=>E.customKey===n||E.key===n),l=i?.key,u=this.destinationOptions().find(E=>E.Key===l),g=this.httpOptions();if(!u||!u.Options)return;let P=i&&i.oauthField?i.oauthField:null,N=i&&i.customFields?i.customFields:{},M=i&&i.dynamicFields?i.dynamicFields:[],K=i&&i.advancedFields?i.advancedFields:[],Z=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:P,custom:[],dynamic:[],advanced:[]});let U=Fe.group({}),J=Fe.group({}),te=Fe.group({});N&&Object.entries(N).forEach(([E,y],z)=>{let ge=y,{formElement:R}=ge,ie=Mt(ge,["formElement"]);U.addControl(E,R(t?.custom[E])),this.destinationFormPair.update(de=>(de.custom.push(O({order:900+z},ie)),de))});for(let E=0;E<u.Options.length;E++){let y=u.Options[E];if(y.Deprecated)continue;let z=M.find(R=>R===y.Name||R.name===y.Name);if(z){let R=z&&typeof z!="string",ie=R?z?.defaultValue??y.DefaultValue:y.DefaultValue,ge={name:y.Name,type:y.Type,shortDescription:y.ShortDescription??void 0,longDescription:y.LongDescription??void 0,options:y.ValidValues,order:900+E},de=R?O(O({},ge),z):ge,rt=t?.dynamic[y.Name]??ie??y.DefaultValue;this.createFormField(J,de,rt),this.destinationFormPair.update(Xe=>(Xe.dynamic.push(de),Xe))}else{if(Z.find(Ce=>Ce===y.Name))continue;let ie=K.find(Ce=>Ce===y.Name||Ce.name===y.Name),ge=ie&&typeof ie!="string",de=t?.advanced[y.Name],L=de??y.DefaultValue,rt={name:y.Name,type:y.Type,shortDescription:y.ShortDescription??void 0,longDescription:y.LongDescription??void 0,options:y.ValidValues,defaultValue:L,order:900+E},Xe=ge?O(O({},rt),ie):rt;o&&de&&(this.createFormField(te,Xe,L),this.selectedAdvancedFormPair.update(Ce=>(Ce.push(Xe),Ce))),this.destinationFormPair.update(Ce=>(Ce.advanced.push(Xe),Ce))}}for(let E=0;E<g.length;E++){let y=g[E],z=t?.advanced[y.name],R=z??y.defaultValue;o&&z&&(this.createFormField(te,y,R),this.selectedHttpOptions.update(ie=>(ie.push(y),ie)))}this.destinationFormPair.update(E=>({oauthField:E.oauthField,custom:E.custom.sort((y,z)=>y.order-z.order),dynamic:E.dynamic.sort((y,z)=>y.order-z.order),advanced:E.advanced.sort((y,z)=>y.order-z.order)})),this.destinationForm.controls.destinations.push(rn({key:i?.customKey??n,customGroup:U,dynamicGroup:J,advancedGroup:te}))}#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=Me({token:e,factory:e.\u0275fac,providedIn:"root"})};var No=["formRef"],Oo=(e,n,t,o)=>({index:e,formView:n,formGroupName:"custom",destinationType:t,oauthField:o}),ht=e=>({$implicit:e}),Ao=(e,n,t,o)=>({index:e,formView:n,formGroupName:"dynamic",destinationType:t,oauthField:o}),ko=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",destinationType:t,oauthField:o}),$o=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",asHttpOptions:!0,destinationType:t,oauthField:o}),xo=()=>({maxWidth:"700px",width:"100%"});function Io(e,n){e&1&&(C(0,3,2),_(1,"spk-icon"),f())}function vo(e,n){e&1&&w(0,3,3)}function wo(e,n){if(e&1){let t=k();C(0,3,1),a(1,"button",19),D("click",function(){S(t);let i=p();return T(i.testDestination())}),d(2,Io,2,0)(3,vo,1,0),r(),f()}if(e&2){let t=p();s(),$e("success",t.successfulTest()),s(),F(t.successfulTest()?2:3)}}function Mo(e,n){if(e&1){let t=k();a(0,"p",25),D("click",function(){S(t);let i=p();return T(i.removeDestinationFormGroup(i.destinationCount()-1))}),C(1,6),_(2,"span",26),f(),r()}}function Ro(e,n){if(e&1){let t=k();a(0,"div",32),D("click",function(){let i=S(t).$implicit,l=p(2);return T(l.addDestinationFormGroup(i.key))}),a(1,"h3"),m(2),r(),a(3,"p"),m(4),r()()}if(e&2){let t=n.$implicit;s(2),Y(t.displayName),s(2),Y(t.description)}}function bo(e,n){if(e&1){let t=k();a(0,"button",33,1),D("click",function(){let i=S(t).$implicit,l=p(2);return T(l.addDestinationFormGroup(i.key))}),m(2),r()}if(e&2){let t=n.$implicit;s(2),V(" ",t.displayName," ")}}function Go(e,n){if(e&1&&(a(0,"div",27),I(1,Ro,5,2,"div",28,x),r(),a(3,"spk-menu",29)(4,"button",30),w(5,7),r(),W(6,18),I(7,bo,3,1,"button",31,x),q(),r()),e&2){let t=p();s(),v(t.destinationTypeOptionsFocused()),s(2),c("searchable",!0),s(4),v(t.destinationTypeOptionsNotFocused())}}function Vo(e,n){e&1&&Ke(0)}function Lo(e,n){if(e&1&&d(0,Vo,1,0,"ng-container",38),e&2){let t,o=n.$implicit,i=n.$index;p();let l=he(29),u=p();c("ngTemplateOutlet",l)("ngTemplateOutletContext",ze(7,ht,tt(2,Oo,i,o,(t=u.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,u.destinationFormPair().oauthField)))}}function Uo(e,n){e&1&&Ke(0)}function Bo(e,n){if(e&1&&d(0,Uo,1,0,"ng-container",38),e&2){let t,o=n.$implicit,i=n.$index;p();let l=he(29),u=p();c("ngTemplateOutlet",l)("ngTemplateOutletContext",ze(7,ht,tt(2,Ao,i,o,(t=u.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,u.destinationFormPair().oauthField)))}}function Ko(e,n){if(e&1){let t=k();C(0,8,1),a(1,"button",33,1),D("click",function(){let i=S(t).$implicit,l=p(2);return T(l.addAdvancedFormPair(i,0))}),r(),f()}if(e&2){let t=n.$implicit;s(),Je(t.name),et(0)}}function zo(e,n){e&1&&Ke(0)}function Xo(e,n){if(e&1&&d(0,zo,1,0,"ng-container",38),e&2){let t,o=n.$implicit,i=n.$index;p();let l=he(29),u=p();c("ngTemplateOutlet",l)("ngTemplateOutletContext",ze(7,ht,tt(2,ko,i,o,(t=u.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,u.destinationFormPair().oauthField)))}}function Ho(e,n){if(e&1){let t=k();C(0,9,1),a(1,"button",33,1),D("click",function(){let i=S(t).$implicit,l=p(2);return T(l.addHttpOption(i,0))}),r(),f()}if(e&2){let t=n.$implicit;s(),Je(t.name),et(0)}}function jo(e,n){e&1&&Ke(0)}function Wo(e,n){if(e&1&&d(0,jo,1,0,"ng-container",38),e&2){let t,o=n.$implicit,i=n.$index;p();let l=he(29),u=p();c("ngTemplateOutlet",l)("ngTemplateOutletContext",ze(7,ht,tt(2,$o,i,o,(t=u.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,u.destinationFormPair().oauthField)))}}function qo(e,n){if(e&1&&(a(0,"spk-tooltip",49)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Qo(e,n){if(e&1&&(a(0,"app-file-tree",41)(1,"label",48),m(2),d(3,qo,3,1,"spk-tooltip",49),r(),_(4,"input",50),r()),e&2){let t,o=p().$implicit,i=p(2);c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name))("accepts",o.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name)}}function Yo(e,n){if(e&1&&(a(0,"spk-tooltip",49)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Zo(e,n){if(e&1&&(a(0,"app-file-tree",42)(1,"label",48),m(2),d(3,Yo,3,1,"spk-tooltip",49),r(),_(4,"input",50),r()),e&2){let t,o=p().$implicit,i=p(2);c("hideShortcuts",!0)("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name)),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name)}}function Jo(e,n){if(e&1&&(a(0,"spk-tooltip",49)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function ei(e,n){e&1&&(a(0,"spk-icon",52),m(1,"link"),r())}function ti(e,n){e&1&&(a(0,"spk-icon",52),m(1,"envelope"),r())}function ni(e,n){e&1&&(a(0,"spk-icon",52),m(1,"textbox"),r())}function oi(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",48),m(2),d(3,Jo,3,1,"spk-tooltip",49),r(),_(4,"input",51),d(5,ei,2,0,"spk-icon",52)(6,ti,2,0,"spk-icon",52)(7,ni,2,0,"spk-icon",52),r()),e&2){let t,o=p().$implicit;s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name),c("type",o.formView.type==="Email"?"email":"text"),s(),F(o.formView.type==="Path"?5:o.formView.type==="Email"?6:7)}}function ii(e,n){if(e&1){let t=k();a(0,"span",56),D("click",function(){S(t);let i=p(2).$implicit,l=p(2);return T(l.oauthStartTokenCreation(i.destinationType))}),m(1,"AuthID"),r()}}function ri(e,n){e&1&&(a(0,"spk-icon",52),m(1,"password"),r())}function ai(e,n){if(e&1){let t=k();a(0,"spk-icon",57),D("click",function(){S(t);let i=p(2).$implicit;return T(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye "),r()}}function si(e,n){if(e&1){let t=k();a(0,"spk-icon",57),D("click",function(){S(t);let i=p(2).$implicit;return T(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye-slash "),r()}}function li(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",48),m(2),r(),_(3,"input",53),d(4,ii,2,0,"span",54)(5,ri,2,0,"spk-icon",52)(6,ai,2,0,"spk-icon",55)(7,si,2,0,"spk-icon",55),r()),e&2){let t,o=p().$implicit;s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name),c("type",o.formView.showPassword?"text":"password"),s(),F(o.oauthField===o.formView.name?4:5),s(2),F(o.formView.showPassword?6:7)}}function pi(e,n){if(e&1&&(a(0,"spk-tooltip",49)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function ci(e,n){if(e&1&&(a(0,"spk-option",58),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),Nt(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function mi(e,n){if(e&1&&I(0,ci,2,3,"spk-option",58,x),e&2){let t=p(2).$implicit,o=p(2);v(t.formView.loadOptions(o.injector)())}}function ui(e,n){if(e&1&&(a(0,"spk-option",58),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),Y(t)}}function _i(e,n){if(e&1&&I(0,ui,2,2,"spk-option",58,x),e&2){let t=p(2).$implicit;v(t.formView.options)}}function di(e,n){if(e&1&&(a(0,"spk-select",43)(1,"label",48),m(2),d(3,pi,3,1,"spk-tooltip",49),r(),_(4,"input",50),d(5,mi,2,0)(6,_i,2,0),r()),e&2){let t,o=p().$implicit;c("hideClearButton",!0),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name),s(),F(o.formView.loadOptions?5:-1),s(),F(o.formView.options?6:-1)}}function Fi(e,n){if(e&1&&(a(0,"spk-tooltip",49)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function gi(e,n){if(e&1&&(a(0,"spk-option",58),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),Nt(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function Ci(e,n){if(e&1&&I(0,gi,2,3,"spk-option",58,x),e&2){let t=p(2).$implicit,o=p(2);v(t.formView.loadOptions(o.injector)())}}function fi(e,n){if(e&1&&(a(0,"spk-option",58),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),Y(t)}}function Si(e,n){if(e&1&&I(0,fi,2,2,"spk-option",58,x),e&2){let t=p(2).$implicit;v(t.formView.options)}}function Ti(e,n){if(e&1&&(a(0,"spk-select",44)(1,"label",48),m(2),d(3,Fi,3,1,"spk-tooltip",49),r(),_(4,"input",59),d(5,Ci,2,0)(6,Si,2,0),r()),e&2){let t,o=p().$implicit;c("isFreeText",!0),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name),s(),F(o.formView.loadOptions?5:-1),s(),F(o.formView.options?6:-1)}}function hi(e,n){if(e&1&&(a(0,"spk-tooltip",49)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Di(e,n){if(e&1&&(a(0,"spk-option",58),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),Y(t)}}function Ei(e,n){if(e&1&&(a(0,"div",45)(1,"label",48),m(2),d(3,hi,3,1,"spk-tooltip",49),r(),a(4,"div",60)(5,"spk-form-field"),_(6,"input",61),a(7,"spk-icon",52),m(8,"resize"),r()(),a(9,"spk-select"),_(10,"label")(11,"input",62),I(12,Di,2,2,"spk-option",58,x),r()()()),e&2){let t,o=p().$implicit,i=p(2);c("formGroupName",o.formView.name),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(3),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(6),v(i.sizeOptions())}}function yi(e,n){if(e&1&&(a(0,"spk-tooltip",49)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Pi(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",48),m(2),d(3,yi,3,1,"spk-tooltip",49),r(),_(4,"input",63),a(5,"spk-icon",52),m(6,"numpad"),r()()),e&2){let t,o=p().$implicit;s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name)}}function Ni(e,n){if(e&1&&(a(0,"spk-tooltip",49)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Oi(e,n){if(e&1&&(a(0,"spk-toggle",46)(1,"label",48),m(2),d(3,Ni,3,1,"spk-tooltip",49),r(),_(4,"input",64),r()),e&2){let t,o=p().$implicit;s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name)}}function Ai(e,n){if(e&1&&(a(0,"spk-tooltip",49)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function ki(e,n){e&1&&(a(0,"spk-option",66),m(1,"None"),r()),e&2&&c("value","None")}function $i(e,n){if(e&1&&(a(0,"spk-option",58),m(1),_(2,"spk-checkbox",67),r()),e&2){let t=p().$implicit;c("value",t),s(),V(" ",t," ")}}function xi(e,n){if(e&1&&d(0,ki,2,1,"spk-option",66)(1,$i,3,2,"spk-option",58),e&2){let t=n.$implicit;F(t==="None"?0:1)}}function Ii(e,n){if(e&1&&(a(0,"spk-select",47)(1,"label",48),m(2),d(3,Ai,3,1,"spk-tooltip",49),r(),_(4,"input",65),I(5,xi,2,1,null,null,x),r()),e&2){let t,o=p().$implicit;c("selectMultiple",!0),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),j("formControlName",o.formView.name),s(),v(o.formView.options)}}function vi(e,n){if(e&1&&(a(0,"spk-tooltip",49)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function wi(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",48),m(2),d(3,vi,3,1,"spk-tooltip",49),r(),_(4,"input",50),r()),e&2){let t,o=p().$implicit;s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name)}}function Mi(e,n){if(e&1){let t=k();a(0,"button",68),D("click",function(){S(t);let i=p().$implicit,l=p(2);return T(l.removeFormView(i.formView,0))}),a(1,"spk-icon"),m(2,"x-circle"),r()()}}function Ri(e,n){if(e&1&&(a(0,"div",39),W(1,40),d(2,Qo,5,17,"app-file-tree",41)(3,Zo,5,13,"app-file-tree",42)(4,oi,8,13,"spk-form-field")(5,li,8,13,"spk-form-field")(6,di,7,14,"spk-select",43)(7,Ti,7,14,"spk-select",44)(8,Ei,14,11,"div",45)(9,Pi,7,11,"spk-form-field")(10,Oi,5,11,"spk-toggle",46)(11,Ii,7,8,"spk-select",47)(12,wi,5,11,"spk-form-field"),q(),d(13,Mi,3,0,"button",30),r()),e&2){let t=n.$implicit;$e("single-field",t.formGroupName!=="advanced"),s(),c("formGroupName",t.formGroupName),s(),F(t.formView.type==="FileTree"?2:t.formView.type==="FolderTree"?3:t.formView.type==="String"||t.formView.type==="Path"||t.formView.type==="Email"?4:t.formView.type==="Password"?5:t.formView.type==="Enumeration"?6:t.formView.type==="NonValidatedSelectableString"?7:t.formView.type==="Size"?8:t.formView.type==="Integer"?9:t.formView.type==="Boolean"?10:t.formView.type==="Flags"?11:t.formView.type==="Timespan"?12:-1),s(11),F(t.formGroupName==="advanced"?13:-1)}}function bi(e,n){if(e&1&&(W(0,20)(1,34),I(2,Lo,1,9,"ng-container",null,x),I(4,Bo,1,9,"ng-container",null,x),a(6,"app-toggle-card",35),W(7,36),C(8,8),a(9,"spk-menu",29)(10,"button",37),_(11,"spk-icon"),r(),W(12,18),I(13,Ko,3,1,"button",31,x),q(),r(),f(),q(),I(15,Xo,1,9,"ng-container",null,x),r(),a(17,"app-toggle-card",35),W(18,36),C(19,9),a(20,"spk-menu",29)(21,"button",37),_(22,"spk-icon"),r(),W(23,18),I(24,Ho,3,1,"button",31,x),q(),r(),f(),q(),I(26,Wo,1,9,"ng-container",null,x),r(),d(28,Ri,14,5,"ng-template",null,2,at),q()()),e&2){let t=p();s(2),v(t.destinationFormPair().custom),s(2),v(t.destinationFormPair().dynamic),s(2),c("disallowToggle",!0),s(3),c("searchable",!0),s(),c("disabled",t.notSelectedAdvancedFormPair().length===0),s(3),v(t.notSelectedAdvancedFormPair()),s(2),v(t.selectedAdvancedFormPair()),s(2),c("disallowToggle",!0),s(3),c("searchable",!0),s(),c("disabled",t.notSelectedHttpOptions().length===0),s(3),v(t.notSelectedHttpOptions()),s(2),v(t.selectedHttpOptions())}}function Gi(e,n){if(e&1){let t=k();a(0,"spk-dialog",69),Vt("isOpenChange",function(i){S(t);let l=p();return Gt(l.targetUrlDialogOpen,i)||(l.targetUrlDialogOpen=i),T(i)}),a(1,"header",70)(2,"h2"),w(3,10),r(),a(4,"spk-alert",71),w(5,11),r()(),a(6,"div",72)(7,"spk-form-field"),_(8,"textarea",73),r()(),a(9,"footer",74)(10,"button",22),D("click",function(){S(t);let i=p();return T(i.closeTargetUrlDialog(!1))}),m(11,"Cancel"),r(),a(12,"button",75),D("click",function(){S(t);let i=p();return T(i.closeTargetUrlDialog(!0))}),C(13,12),_(14,"spk-icon"),f(),r()()()}if(e&2){let t=p();bt("isOpen",t.targetUrlDialogOpen),c("options",Lt(3,xo)),s(8),c("formControl",t.targetUrlCtrl)}}var Vi=["Bytes","KB","MB","GB","TB","PB"],Tt=new ne,on=(e={destinations:[]})=>Tt.group({destinations:Tt.array(e.destinations)}),rn=({key:e,customGroup:n,dynamicGroup:t,advancedGroup:o})=>Tt.group({destinationType:Tt.control(e),custom:n,dynamic:t,advanced:o}),wt=class e{#e=$(ae);#t=$(De);#o=$(Bt);#i=$(He);#n=$(_e);#r=$(Ht);injector=$(Rt);formRef=fe.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=A(Vi);successfulTest=A(!1);destinationTypeOptionsInFocus=A(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=A(ve.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 ct;targetUrlInitial=A(null);targetUrlDialogOpen=A(!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 l=i.error.error.Error;if(l==="missing-folder"&&this.#r.open(nt,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`},closed:u=>{u&&this.#i.postApiV1RemoteoperationCreate({requestBody:{path:o}}).subscribe()}}),l.startsWith("incorrect-cert:")){let u=l.split("incorrect-cert:")[1];this.#r.open(nt,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
|
|
2
|
+
If this is a self-signed certificate, you can choose to trust this certificate.
|
|
3
|
+
The server reported the certificate hash: ${u}`,confirmText:"Trust the certificate",cancelText:"Cancel"},closed:g=>{g&&this.#n.addHttpOptionByName("accept-specified-ssl-hash",u)}})}if(l.startsWith("incorrect-host-key:")){let u=l.split('incorrect-host-key:"')[1].split('",')[0],g=l.split('accepted-host-key:"')[1].split('",')[0];g?this.#r.open(nt,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
|
|
4
|
+
otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
|
|
5
|
+
Do you want to REPLACE your CURRENT host key ${g}
|
|
6
|
+
with the REPORTED host key: ${u}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:P=>{P&&this.#n.addAdvancedFormPairByName("ssh-fingerprint",n,u)}}):this.#r.open(nt,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${u}`,confirmText:"Approve",cancelText:"Cancel"},closed:P=>{P&&this.#n.addAdvancedFormPairByName("ssh-fingerprint",n,u)}})}}})}mapToTargetUrl(n){return Ct(n.value)}removeDestinationFormGroup(n){this.destinationForm.controls.destinations.removeAt(n)}displayFn(n){let t=this.destinationOptions().find(o=>o.Key===n);return t?`${t.DisplayName}`:""}goBack(){this.#e.navigate(["general"],{relativeTo:this.#t.parent})}next(){this.#e.navigate(["source-data"],{relativeTo:this.#t.parent})}#s=A("https://duplicati-oauth-handler.appspot.com/").asReadonly();#l=A(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#a=A(!1);#p=A(null);keyCreation(){}oauthStartTokenCreation(n){this.#a.set(!0);let t=450,o=600,i=this.#s()+"?type="+n+"&token="+this.#l(),l=screen.width/2-t/2,u=screen.height/2-o/2,g=window.open(i,"_blank","height="+o+",width="+t+",menubar=0,status=0,titlebar=0,toolbar=0,left="+l+",top="+u);g?.addEventListener("blur",P=>{console.log("event blur",P)}),g?.addEventListener("beforeunload",P=>{console.log("event beforeunload",P),this.#o.get(this.#s()+"fetch?callback=JSON_CALLBACK",{params:{token:this.#l()}}).pipe(Ze(()=>this.#a.set(!1))).subscribe({next:N=>{console.log("res",N),N?.authid&&this.#p.set(N.authid)}})})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({type:e,selectors:[["app-destination"]],viewQuery:function(t,o){t&1&&Se(o.formRef,No,5),t&2&&Te()},decls:24,vars:6,consts:()=>{let n;n=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"\uFFFD*6:1\uFFFD"}:START_BLOCK_IF_1:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON:${"\uFFFD*2:2\uFFFD"}:START_BLOCK_IF: Connected ${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*3:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*3:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:dots-three-vertical${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:link${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,n=xe(n);let t;t=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let o;o=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$localize` Want to select another destination? ${"\uFFFD#2\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPAN:`;let l;l=$localize`Other destinations`;let u;u=$localize` Advanced options ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#10\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#12\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*14:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*14:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_MENU:`,u=xe(u);let g;g=$localize` Http options ${"\uFFFD#20\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#21\uFFFD"}:START_TAG_BUTTON: Add http option ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#23\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*25:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*25:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#23\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SPK_MENU:`,g=xe(g);let P;P=$localize`Edit target URL`;let N;N=$localize` Be careful, this will overwrite everything you have in your destination. `;let M;return M=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],["fieldTemplate",""],n,t,o,i,l,u,g,P,N,M,[3,"submit","formGroup"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"success"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],["formArrayName","destinations"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"isOpen","options"],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["spk-button","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],["formGroupName","0"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small",3,"disabled"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","startingPath"],[3,"hideClearButton"],[3,"isFreeText"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],[3,"type","id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],[3,"value"],["type","search",3,"id","formControlName"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["type","search","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],["type","text","id","text",3,"formControlName"],["deselect","",3,"value"],[1,"raised","primary"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"warning"],["content",""],["id","targetUrl","autocomplete","off",3,"formControl"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,o){if(t&1){let i=k();a(0,"form",13,0),D("submit",function(){return S(i),T(o.next())}),a(2,"header")(3,"h3",14),C(4,3),a(5,"div",15),d(6,wo,4,3,"button",16),a(7,"spk-menu")(8,"button",17),_(9,"spk-icon"),r(),W(10,18),a(11,"button",19),D("click",function(){return S(i),T(o.openTargetUrlDialog())}),_(12,"spk-icon"),r(),q(),r()(),f(),r(),d(13,Mo,3,0,"p"),r(),d(14,Go,9,1)(15,bi,30,6,"ng-container",20),a(16,"div",21)(17,"button",22),D("click",function(){return S(i),T(o.goBack())}),C(18,4),_(19,"spk-icon"),f(),r(),a(20,"button",23),C(21,5),_(22,"spk-icon"),f(),r()()(),d(23,Gi,15,4,"spk-dialog",24)}if(t&2){let i;c("formGroup",o.destinationForm),s(6),F(o.destinationCount()>0?6:-1),s(7),F(o.destinationCount()>0?13:-1),s(),F(o.destinationCount()===0?14:-1),s(),F(!((i=o.destinationFormSignal())==null||i.destinations==null)&&i.destinations.length?15:-1),s(8),F(o.targetUrlDialogOpen()?23:-1)}},dependencies:[Ae,Pe,se,be,Re,le,ye,mt,Ne,Oe,Ge,zt,lt,ce,ue,Ft,dt,me,pe,Le,je,Xt,_t,Ue,We],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] spk-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 1fr;gap:.5rem;align-items:flex-end}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1);background-color:var(--base-level-20);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{Ct as a,ve as b,on as c,rn as d,wt as e,Qt as f,$t as g,kt as h,Zt as i,xt as j,en as k,It as l,nn as m,vt as n,_e as o};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-C6Q5SG76.js";var t=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-OKERRNQC.js")},{path:"encryption",loadComponent:()=>import("./chunk-ZLMSSTXT.js")},{path:"select-files",loadComponent:()=>import("./chunk-FXXGCONI.js")},{path:"options",loadComponent:()=>import("./chunk-CI7PYMKD.js")}],o=t;export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as A}from"./chunk-PNJEVGID.js";import{b as S}from"./chunk-PPRHD3ZV.js";import{c as M}from"./chunk-C5EHOW7U.js";import{o as P}from"./chunk-
|
|
1
|
+
import{b as A}from"./chunk-PNJEVGID.js";import{b as S}from"./chunk-PPRHD3ZV.js";import{c as M}from"./chunk-C5EHOW7U.js";import{o as P}from"./chunk-UIC2LGAH.js";import"./chunk-MCLDJCPW.js";import"./chunk-7IRVNC4S.js";import{Bb as i,Cb as r,Db as _,E as p,Pb as C,Ra as c,Y as o,eb as g,gc as u,hc as E,jb as d,p as l,ua as m,xb as f}from"./chunk-2M52SFS6.js";import"./chunk-C6Q5SG76.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as $}from"./chunk-PNJEVGID.js";import{a as R}from"./chunk-
|
|
1
|
+
import{b as $}from"./chunk-PNJEVGID.js";import{a as R}from"./chunk-X6SCWL5V.js";import"./chunk-7LRQSKYZ.js";import"./chunk-L5D4JLN3.js";import"./chunk-W4MEGIZH.js";import"./chunk-AXHB6A4N.js";import"./chunk-XKAASYKO.js";import"./chunk-MADB4EX7.js";import{b as k}from"./chunk-PPRHD3ZV.js";import{a as A,d as N}from"./chunk-LJ3ULEOG.js";import"./chunk-C5EHOW7U.js";import{a as B,g as O}from"./chunk-UIC2LGAH.js";import"./chunk-MCLDJCPW.js";import"./chunk-7IRVNC4S.js";import"./chunk-DNDOALN6.js";import{Ab as g,Bb as F,Cb as a,Db as r,Lc as M,Nb as _,Ob as c,Pb as u,Ra as i,Sb as T,Tb as I,Y as m,eb as C,gc as E,ic as L,jb as p,ua as l,xb as s,yb as f,zb as S}from"./chunk-2M52SFS6.js";import"./chunk-C6Q5SG76.js";function b(e,t){e&1&&u(0,2,1)}function P(e,t){e&1&&u(0,2,2)}function h(e,t){e&1&&u(0,2,3)}function v(e,t){e&1&&u(0,2,4)}function U(e,t){if(e&1&&(E(0),r(1,"br")),e&2){let n=t.$implicit;L(" ",n," ")}}var D=class e{#t=m(k);#e=m(A);#n=$(this.#e.params);runId=M(()=>this.#n()?.runId);offset=l(0);status=l("starting");messageLog=l([]);interval=setInterval(()=>{this.#t.getApiV1CommandlineByRunid({runid:this.runId(),offset:this.offset(),pagesize:100}).subscribe(t=>{this.offset.set(t.Count),this.evalStatus(t),this.messageLog.update(n=>[...n,...t.Items])})},1e3);evalStatus(t){t.Started===!0&&t.Finished===!0&&(this.status.set("finished"),clearInterval(this.interval)),t.Started===!0&&t.Finished===!1&&this.status.set("started")}abort(){this.#t.postApiV1CommandlineByRunidAbort({runid:this.runId()}).subscribe({next:t=>{this.status.set("aborted"),clearInterval(this.interval)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=C({type:e,selectors:[["app-commandline-result"]],decls:18,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let n;n=$localize` Running commandline task... ${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON:Abort${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_BUTTON:`;let o;return o=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Starting... ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_IF_1: Started! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_IF_2: Finished! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_IF_3: Aborted! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:`,o=T(o),[t,n,o,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],["type","button","spk-button","",1,"small",3,"click"],[1,"status"]]},template:function(n,o){n&1&&(r(0,"app-status-bar"),F(1,"section")(2,"div",3)(3,"button",4),_(4,0),r(5,"spk-icon"),c(),a()(),F(6,"h3"),_(7,1),F(8,"button",5),I("click",function(){return o.abort()}),a(),c(),a(),F(9,"div",6),_(10,2),p(11,b,1,0)(12,P,1,0)(13,h,1,0)(14,v,1,0),c(),a(),F(15,"code"),S(16,U,2,1,null,null,f),a()()),n&2&&(i(11),s(o.status()==="starting"?11:-1),i(),s(o.status()==="started"?12:-1),i(),s(o.status()==="finished"?13:-1),i(),s(o.status()==="aborted"?14:-1),i(2),g(o.messageLog()))},dependencies:[R,B,O,N],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:2.5rem;gap:1.25rem}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{D as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as b}from"./chunk-AXHB6A4N.js";import{a as $,b as y,d as B,e as h,h as v,l as G,o as L,p as U,r as K}from"./chunk-XKAASYKO.js";import{b as N}from"./chunk-PPRHD3ZV.js";import{c as E,d as R}from"./chunk-LJ3ULEOG.js";import"./chunk-C5EHOW7U.js";import{a as w,c as X,g as x,l as V,x as z,z as j}from"./chunk-
|
|
1
|
+
import{a as b}from"./chunk-AXHB6A4N.js";import{a as $,b as y,d as B,e as h,h as v,l as G,o as L,p as U,r as K}from"./chunk-XKAASYKO.js";import{b as N}from"./chunk-PPRHD3ZV.js";import{c as E,d as R}from"./chunk-LJ3ULEOG.js";import"./chunk-C5EHOW7U.js";import{a as w,c as X,g as x,l as V,x as z,z as j}from"./chunk-UIC2LGAH.js";import"./chunk-MCLDJCPW.js";import"./chunk-7IRVNC4S.js";import{Bb as r,Cb as n,Db as l,E as g,Nb as I,Ob as M,Pb as u,Ra as F,Sb as O,Tb as f,Y as p,eb as S,gc as A,jb as D,sb as d,sc as k,ua as m,ub as C,xb as P}from"./chunk-2M52SFS6.js";import"./chunk-C6Q5SG76.js";var q=()=>["/"];function H(c,e){c&1&&(r(0,"spk-form-field")(1,"label",18),u(2,4),n(),l(3,"input",19),n())}var s=new U,T=class c{#e=p(X);#t=p(N);#o=p(b);#n=p(E);isImporting=m(!1);isSecureFile=m(!1);importForm=s.group({config:s.control(""),cmdline:s.control(!1),importMetadata:s.control(!1),direct:s.control(!1),passphrase:s.control("")});selectedFile=m(null);onFileDropped(e){let t=e.target?.files?.item(0);if(t){let i=new FileReader;this.isSecureFile.set(t.type!=="application/json"),i.onload=this.#i.bind(this),i.readAsArrayBuffer(t)}}#i(e){let o=e.target?.result;this.importForm.patchValue({config:this.#r(o)})}#r(e){let o=new Uint8Array(e),t=o.byteLength,i="";for(let a=0;a<t;a++)i+=String.fromCharCode(o[a]);return btoa(i)}submit(){this.isImporting.set(!0),this.#t.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(g(()=>this.isImporting.set(!1))).subscribe({next:e=>{let o=this.#o.addDraftBackup(e.data);this.#n.navigate(["/backup-draft",o])},error:e=>{this.#e.error(e.message)}})}static \u0275fac=function(o){return new(o||c)};static \u0275cmp=S({type:c,selectors:[["app-import"]],decls:24,vars:7,consts:()=>{let e;e=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,e=O(e);let o;o=$localize`Select a configuration file`;let t;t=$localize`Import Metadata`;let i;i=$localize`Save now`;let a;return a=$localize`Passphrase`,[e,o,t,i,a,[1,"actions"],["spk-button","","type","button",1,"outlined",3,"routerLink"],["spk-button","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["spkDragDrop","",3,"fileDropped"],["for","file"],["type","file","accept",".json,.aes",3,"change"],["suffix",""],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","importMetadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(o,t){o&1&&(r(0,"header")(1,"h3"),I(2,0),r(3,"div",5)(4,"button",6),l(5,"spk-icon"),n(),r(6,"button",7),f("click",function(){return t.submit()}),l(7,"spk-icon"),n()(),M(),n()(),r(8,"form",8)(9,"spk-form-field",9),f("fileDropped",function(a){return t.onFileDropped(a)}),r(10,"label",10),u(11,1),n(),r(12,"input",11),f("change",function(a){return t.onFileDropped(a)}),n(),r(13,"spk-icon",12),A(14,"upload"),n()(),D(15,H,4,0,"spk-form-field"),r(16,"spk-toggle",13)(17,"label",14),u(18,2),n(),l(19,"input",15),n(),r(20,"spk-toggle",13)(21,"label",16),u(22,3),n(),l(23,"input",17),n()()),o&2&&(F(4),d("routerLink",k(6,q)),F(2),C("loader",t.isImporting()),d("disabled",t.isImporting()),F(2),d("formGroup",t.importForm),F(7),P(t.isSecureFile()?15:-1))},dependencies:[K,v,y,$,B,h,G,L,R,j,V,w,x,z],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}"],changeDetection:0})};export{T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b,d as $,e as h,h as G,l as P,o as B,p as v,r as L}from"./chunk-XKAASYKO.js";import{b as I}from"./chunk-PPRHD3ZV.js";import{c as y,d as A}from"./chunk-LJ3ULEOG.js";import"./chunk-C5EHOW7U.js";import{a as w,c as V,g as x,l as X,z as U}from"./chunk-
|
|
1
|
+
import{b,d as $,e as h,h as G,l as P,o as B,p as v,r as L}from"./chunk-XKAASYKO.js";import{b as I}from"./chunk-PPRHD3ZV.js";import{c as y,d as A}from"./chunk-LJ3ULEOG.js";import"./chunk-C5EHOW7U.js";import{a as w,c as V,g as x,l as X,z as U}from"./chunk-UIC2LGAH.js";import"./chunk-MCLDJCPW.js";import"./chunk-7IRVNC4S.js";import{Bb as i,Cb as r,Db as _,E as g,M as T,Nb as C,Ob as O,Pb as f,Ra as F,Sb as N,Tb as m,Y as u,eb as R,gc as M,jb as S,sb as c,sc as k,ua as p,ub as D,xb as E}from"./chunk-2M52SFS6.js";import"./chunk-C6Q5SG76.js";var j=()=>["/"];function z(l,e){l&1&&(i(0,"spk-form-field")(1,"label",11),f(2,2),r(),_(3,"input",12),r())}var a=new v,d=class l{#t=u(V);#e=u(I);#o=u(y);isRestoring=p(!1);isSecureFile=p(!1);importForm=a.group({config:a.control(""),cmdline:a.control(!1),importMetadata:a.control(!1),direct:a.control(!1),passphrase:a.control("")});selectedFile=p(null);onFileDropped(e){let t=e.target?.files?.item(0);if(t){let n=new FileReader;this.isSecureFile.set(t.type!=="application/json"),n.onload=this.#n.bind(this),n.readAsArrayBuffer(t)}}#n(e){let o=e.target?.result;this.importForm.patchValue({config:this.#r(o)})}#r(e){let o=new Uint8Array(e),t=o.byteLength,n="";for(let s=0;s<t;s++)n+=String.fromCharCode(o[s]);return btoa(n)}submit(){this.isRestoring.set(!0),this.#e.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(T(e=>this.#e.postApiV1Backups({requestBody:e.data,temporary:!0})),g(()=>this.isRestoring.set(!1))).subscribe({next:e=>{this.#o.navigate(["/restore-draft",e.ID])},error:e=>{this.#t.error(e.message)}})}static \u0275fac=function(o){return new(o||l)};static \u0275cmp=R({type:l,selectors:[["app-restore-from-config"]],decls:16,vars:7,consts:()=>{let e;e=$localize` Restore from config ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Restore ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,e=N(e);let o;o=$localize`Select a configuration file`;let t;return t=$localize`Passphrase`,[e,o,t,[1,"actions"],["spk-button","","type","button",1,"outlined",3,"routerLink"],["spk-button","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["spkDragDrop","",3,"fileDropped"],["for","file"],["type","file","accept",".json,.aes",3,"change"],["suffix",""],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(o,t){o&1&&(i(0,"header")(1,"h3"),C(2,0),i(3,"div",3)(4,"button",4),_(5,"spk-icon"),r(),i(6,"button",5),m("click",function(){return t.submit()}),_(7,"spk-icon"),r()(),O(),r()(),i(8,"form",6)(9,"spk-form-field",7),m("fileDropped",function(s){return t.onFileDropped(s)}),i(10,"label",8),f(11,1),r(),i(12,"input",9),m("change",function(s){return t.onFileDropped(s)}),r(),i(13,"spk-icon",10),M(14,"upload"),r()(),S(15,z,4,0,"spk-form-field"),r()),o&2&&(F(4),c("routerLink",k(6,j)),F(2),D("loader",t.isRestoring()),c("disabled",t.isRestoring()),F(2),c("formGroup",t.importForm),F(7),E(t.isSecureFile()?15:-1))},dependencies:[L,G,b,$,h,P,B,A,U,X,w,x],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}"],changeDetection:0})};export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as pe}from"./chunk-YOP6HOXH.js";import{q as ue}from"./chunk-XKAASYKO.js";import{b as de}from"./chunk-PPRHD3ZV.js";import{a as he,f as _e,l as fe,m as ge,o as me,x as Ce}from"./chunk-6KER52JR.js";import{ia as ce}from"./chunk-7IRVNC4S.js";import{Ab as ee,Bb as u,Cb as h,Db as te,E as V,Gb as X,Hb as I,Lc as A,Nc as R,Pb as W,Qb as ne,Ra as g,Rb as ie,Tb as k,Ub as p,Vb as re,Wb as L,Y as H,Ya as G,da as N,dc as Q,ea as y,eb as J,ec as oe,fc as K,gc as S,ic as se,jb as x,pa as j,qa as E,sb as q,tb as Y,tc as $,ua as M,ub as T,uc as le,v as U,xb as O,zb as Z,zc as ae}from"./chunk-2M52SFS6.js";import{a as D,b as B}from"./chunk-C6Q5SG76.js";var ve=["treeContainer"],Te=["formRef"],xe=[[["label"]],[["label"]],[["input"]]],be=["label","label","input"],Me=s=>({children:s,level:0}),Ee=s=>({$implicit:s}),Oe=(s,t)=>({children:s,level:t}),Se=(s,t)=>t.id;function we(s,t){if(s&1){let e=I();u(0,"spk-button-group")(1,"button",13),k("click",function(){N(e);let r=p();return y(r.pathDiscoveryMethod.set("browse"))}),W(2,4),h(),u(3,"button",13),k("click",function(){N(e);let r=p();return y(r.pathDiscoveryMethod.set("path"))}),W(4,5),h()()}if(s&2){let e=p();g(),T("active",e.pathDiscoveryMethod()==="browse"),g(2),T("active",e.pathDiscoveryMethod()==="path")}}function Fe(s,t){s&1&&te(0,"spk-progress-bar",9)}function Ne(s,t){s&1&&(u(0,"spk-icon",18),S(1,"caret-down"),h(),u(2,"spk-icon",16),S(3,"folder-open"),h())}function ye(s,t){s&1&&(u(0,"spk-icon"),S(1,"file"),h())}function ke(s,t){s&1&&(u(0,"spk-icon",18),S(1,"caret-right"),h(),u(2,"spk-icon",16),S(3,"folder"),h())}function Re(s,t){if(s&1&&x(0,Ne,4,0)(1,ye,2,0,"spk-icon")(2,ke,4,0),s&2){let e=p(2).$implicit;O(e.children.length?0:e.cls==="file"?1:2)}}function Ie(s,t){s&1&&(u(0,"spk-icon",16),S(1,"desktop-tower"),h())}function We(s,t){s&1&&X(0)}function Le(s,t){if(s&1&&x(0,We,1,0,"ng-container",10),s&2){let e=p(2).$implicit,n=p().$implicit;p();let r=K(7);q("ngTemplateOutlet",r)("ngTemplateOutletContext",$(5,Ee,le(2,Oe,e.children,n.level+1)))}}function $e(s,t){if(s&1){let e=I();u(0,"div",14,3),k("click",function(){N(e);let r=p().$implicit,i=p(2);return y(i.toggleNode(r.id,r))}),u(2,"div",15),x(3,Re,3,1)(4,Ie,2,0,"spk-icon",16),h(),u(5,"div",17),k("click",function(r){N(e);let i=p().$implicit,o=p(2);return y(o.toggleSelectedNode(r,i))}),S(6),h()(),x(7,Le,1,7,"ng-container")}if(s&2){let e=p().$implicit,n=p().$implicit,r=p();T("accepted",e.accepted===!0)("active",e.evalState===r.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",n.level===0),g(2),T("file",e.cls==="file"),g(),O(e.id!=="/"?3:4),g(3),se(" ",e.text," "),g(),O(e.children.length>0?7:-1)}}function Ae(s,t){if(s&1&&x(0,$e,8,17),s&2){let e=t.$implicit,n=p(2);O(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function De(s,t){if(s&1&&(u(0,"spk-list"),Z(1,Ae,1,1,null,null,Se),h()),s&2){let e=t.$implicit;Y("padding-left",e.level*.25,"rem"),g(),ee(e.children)}}function Be(s,t){s&1&&X(0)}function Ve(s,t){if(s&1){let e=I();u(0,"spk-toggle",19),k("click",function(){N(e);let r=p();return y(r._showHiddenNodes.set(!r._showHiddenNodes()))}),W(1,6),h()}if(s&2){let e=p();T("active",e._showHiddenNodes()),g(),ne(e.showFiles()?"files":"folders"),ie(1)}}var Pe=(i=>(i[i.ExcludedByParent=-2]="ExcludedByParent",i[i.Excluded=-1]="Excluded",i[i.None=0]="None",i[i.Included=1]="Included",i[i.IncludedByParent=2]="IncludedByParent",i))(Pe||{}),z=class s{#t=H(de);#o=H(pe);multiSelect=E(!1);disabled=E(!1);showFiles=E(!1);selectFiles=E(!1);accepts=E(null);startingPath=E(null);rootPath=E(void 0);backupSettings=E(null);pathRefreshTrigger=E(!1);showHiddenNodes=E(!1);hideShortcuts=E(!1);includes=j();excludes=j();_showHiddenNodes=M(!1);treeContainerRef=G("treeContainer");formRef=G("formRef");pathDiscoveryMethod=M("browse");isLoading=M(!1);currentPath=M("/");#e=M(null);treeSearchQuery=M("");treeNodes=M([]);filterGroups=this.#o.filterGroups();isByBackupSettings=A(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=A(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Pe;treeStructure=A(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(c=>c!==""&&c!=="/"),n=structuredClone(e);for(let c=0;c<n.length;c++){let d=n[c].slice(1);if(d.startsWith("{")&&d.endsWith("}")){let m=d.slice(1,-1),f=this.filterGroups?.FilterGroups[m];if(f&&f.length){let P=f.map(v=>`-${v}`);n.splice(c,1,...P)}}}let r=this.searchableTreeNodes(),i=new Map,o=this.rootPath(),_=this.accepts(),l=o?{id:o,resolvedpath:o,text:o,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}:{id:"/",resolvedpath:"/",text:"Computer",parentPath:"",children:[],evalState:0,isIndeterminate:!1};_&&(l.accepted=!0),i.set("/",l);for(let c of r){let a=c.id.replace(o??"",""),m=a.includes("\\")?"\\":"/",f=a.split(m).filter(Boolean),P="",v=l;for(let C of f){if(P+="/"+C,!i.has(P)){let w=c.hidden===!0&&t?0:this.#s(n,c.id,c.cls,v),b={id:c.id,isIndeterminate:this.isIndeterminate(n,c.id),evalState:w,parentPath:P,resolvedpath:c.id?.startsWith("%")?c.resolvedpath+"/":P,hidden:c.hidden,text:c.text,cls:c.cls,children:[]};_&&(b.accepted=this.matchAccepts(_,b)),i.set(P,b),v.children.push(b)}v=i.get(P)}}return[l]});#s(t,e,n,r){if(r.evalState===-1)return-2;let i=0,o=t.filter(l=>!l.startsWith("-")&&!l.startsWith("+")),_=t.filter(l=>l.startsWith("-")||l.startsWith("+"));if(o.length===0)return i;for(let l=0;l<o.length;l++){let c=o[l];if(e?.startsWith(c)){i=1;break}}if(_.length===0)return i;for(let l=0;l<_.length;l++){let c=_[l],a=c.slice(1),d=c.startsWith("-")?"exclude":"include",m=e.includes("\\"),f=m?"\\":"/";if((m?a.slice(2):a).startsWith(f)&&a.endsWith(f)){if(n!=="folder")continue;if(e===a){i=d==="include"?1:-1;break}}if(a.startsWith("*")&&a.endsWith(`*${f}`)){if(n!=="folder")continue;let C=a.slice(1,-2);if(C==="")break;if(e?.includes(C+f)){i=d==="include"?1:-1;break}}if(a.startsWith("[.*")&&a.endsWith(`[^\\${f}]*]`)){if(n!=="file")continue;let C=a.slice(3,-7);if(new RegExp(C).test(e)){i=d==="include"?1:-1;break}}if(a.startsWith("[")&&a.endsWith("]")){let C=a.slice(1,-1),w=this.translateCSharpRegex(C);if(new RegExp(`${w}`).test(e)){i=d==="include"?1:-1;break}}if(a.startsWith("*.")){if(n!=="file"||a.replace("*.","").length===0)continue;if(this.#n(e,a,!0)){i=d==="include"?1:-1;break}}if(a==="")continue;if(a===e){i=d==="include"?1:-1;break}if(this.#n(e,a,!0)){i=d==="include"?1:-1;break}}return i}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(r,i,o)=>`(${o})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.some(n=>n.startsWith(e))}#n(t,e,n=!1){let r=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${r}${n?"$":""}`).test(t)}showHiddenNodesEffect=R(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=R(()=>{let t=this.pathDiscoveryMethod(),e=this.#e();t==="browse"&&e&&this.currentPath.set(e.value)});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id==="/")return!0;let n=t.split(",");if(n.length===0)return!0;let r="."+e.id.slice(e.id.indexOf("."));return r?n.some(i=>r.endsWith(i)):!1}currentPathEffect=R(()=>{let t=this.#e();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=R(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#a(t),this.inputValueChangeAbortController&&this.inputValueChangeAbortController.abort(),this.inputValueChangeAbortController=new AbortController,t.addEventListener("inputValueChanged",e=>{this.currentPath.set(e.detail.value)},{signal:this.inputValueChangeAbortController.signal}),this.#e.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();t?(this.currentPath.set(t),this.#p(t)):this.#r(null,this.rootPath())}toggleSelectedNode(t,e){if(e.id==="/"||(t.stopPropagation(),e.evalState===-2))return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(e.id,e);return}if(this.accepts()&&!e.accepted)return;let r=this.currentPath().split("\0").filter(o=>o!==""&&o!=="/"),i=this.isChildOfSelected(e)?`-${e.id}`:e.id;this.multiSelect()?r.includes(e.id)?this.currentPath.set(r.filter(o=>o!==e.id).join("\0")):r.some(o=>o.startsWith(i))?this.currentPath.set(r.filter(o=>o!==i).join("\0")):this.currentPath.set([...r,i].join("\0")):r.includes(e.id)?this.currentPath.set(r.filter(o=>o!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(n=>n!==""&&n!=="/").some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(n=>n.filter(r=>!r.id?.startsWith(e.id)||r.id===e.id)):this.#r(e,t))}#l(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)}#a(t){return Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(e){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,e),this.dispatchEvent(new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}})),e}}),t}#c(t){return this.#t.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#d(t){let e=this.backupSettings(),n={id:e.id+"",prefixOnly:!1,folderContents:!0,time:e.time,filter:t?"@"+t:void 0};return this.#t.getApiV1BackupByIdFiles(n)}#i(t){return this.isByBackupSettings()?this.#d(t):this.#c(t)}#p(t){let e=t.split("\0").filter(o=>o.startsWith("-")).map(o=>o.slice(1,-1)),n=t.split("\0").filter(o=>!o.startsWith("-")).filter(Boolean),r=n.map(o=>{let _=o.indexOf(":")===1;return o.split(_?"\\":"/").filter(l=>l.includes(".")?!1:l)}),i=[this.rootPath()??"/"];r.forEach(o=>{o.forEach((_,l)=>{let c=o[0].endsWith(":"),a=o.slice(0,l+1).join(c?"\\":"/"),d=a;d.indexOf(":")===-1&&!d.startsWith("%")&&(d="/"+a),i.includes(d)||i.push(d)})}),this.isLoading.set(!0),U([...i.map(o=>this.#i(o))]).pipe(V(()=>this.isLoading.set(!1))).subscribe({next:o=>{this.treeNodes.update(_=>{let l=o.flatMap(a=>a.map(d=>{let m=d.id,f=m&&m.split("/").filter(Boolean).slice(0,-1).join("/"),v="/"+(m&&m.split("/").filter(Boolean).join("/")),C=n.findIndex(F=>this.multiSelect()?v.startsWith(F):v===F)>-1,w=n.findIndex(F=>F===m)>-1,b=e.findIndex(F=>F===v)>-1;return B(D({},d),{parentPath:f.startsWith("%")?f:"/"+f,isSelected:C&&!b||w})})),c=[...new Map([..._,...l].map(a=>[a.resolvedpath??a.id,a])).values()];return this.#l(),c})}})}#r(t=null,e="/"){this.isLoading.set(!0),this.#i(e).pipe(V(()=>this.isLoading.set(!1))).subscribe({next:n=>{let r=this.isByBackupSettings()?n.Files.map(i=>({text:i.Path.split("/").filter(o=>o!=="").pop(),id:i.Path,cls:i.Path.endsWith("/")||i.Path.endsWith("\\")?"folder":"file",leaf:t!==null,resolvedpath:i.Path,hidden:!1})):n;this.treeNodes.update(i=>{let o=r.map(l=>{let c=l.id.startsWith("%")&&l.id.endsWith("%")||l.id.endsWith("/")||l.id.endsWith("\\")?"folder":"file";return B(D({},l),{cls:c,parentPath:e})}),_=[...new Map([...i,...o].map(l=>[l.resolvedpath??l.id,l])).values()];return this.hideShortcuts()?_.filter(l=>!l.id.startsWith("%")):_})}})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=J({type:s,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&(Q(n.treeContainerRef,ve,5),Q(n.formRef,Te,5)),e&2&&oe(2)},hostVars:2,hostBindings:function(e,n){e&2&&T("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPath:[1,"rootPath"],backupSettings:[1,"backupSettings"],pathRefreshTrigger:[1,"pathRefreshTrigger"],showHiddenNodes:[1,"showHiddenNodes"],hideShortcuts:[1,"hideShortcuts"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:be,decls:15,vars:15,consts:()=>{let t;t=$localize` Browser path `;let e;e=$localize` Manually type path `;let n;return n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"primary","raised","browse-files-toggle",3,"active"],[1,"form-field"],["type","button",3,"click"],["action","",3,"click"],[1,"icon"],[1,"spk-primary"],[1,"text",3,"click"],[1,"small"],[1,"primary","raised","browse-files-toggle",3,"click"]]},template:function(e,n){if(e&1&&(re(xe),x(0,we,5,4,"spk-button-group"),u(1,"div",7),L(2,0,["ngProjectAs","label",5,["label"]]),u(3,"div",8,0),x(5,Fe,1,0,"spk-progress-bar",9)(6,De,3,2,"ng-template",null,1,ae)(8,Be,1,0,"ng-container",10),h(),x(9,Ve,2,3,"spk-toggle",11),h(),u(10,"div",12,2)(12,"spk-form-field"),L(13,1,["ngProjectAs","label",5,["label"]]),L(14,2,["ngProjectAs","input",5,["input"]]),h()()),e&2){let r=K(7);O(n.multiSelect()?-1:0),g(),T("hidden",n.pathDiscoveryMethod()!=="browse"),g(2),T("visualize-accepted",n.accepts()),g(2),O(n.isLoading()?5:-1),g(3),q("ngTemplateOutlet",r)("ngTemplateOutletContext",$(13,Ee,$(11,Me,n.treeStructure()))),g(),O(n.accepts()?-1:9),g(),T("hidden",n.pathDiscoveryMethod()!=="path")}},dependencies:[_e,Ce,he,fe,ge,me,ce,ue],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] spk-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-level-10);position:relative}.browse-files[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-level-30);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:0;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:transparent;--list-active-bg: var(--primary-level-20)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-level-40)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%]{gap:.25rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:3rem;gap:.25rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon.file[_ngcontent-%COMP%]{width:2rem;padding:0 .25rem}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-level-60R)}.hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};export{z as a};
|
|
1
|
+
import{a as pe}from"./chunk-YOP6HOXH.js";import{q as ue}from"./chunk-XKAASYKO.js";import{b as de}from"./chunk-PPRHD3ZV.js";import{a as he,f as _e,l as fe,m as ge,o as me,x as Ce}from"./chunk-UIC2LGAH.js";import{ia as ce}from"./chunk-7IRVNC4S.js";import{Ab as ee,Bb as u,Cb as h,Db as te,E as V,Gb as X,Hb as I,Lc as A,Nc as R,Pb as W,Qb as ne,Ra as g,Rb as ie,Tb as k,Ub as p,Vb as re,Wb as L,Y as H,Ya as G,da as N,dc as Q,ea as y,eb as J,ec as oe,fc as K,gc as S,ic as se,jb as x,pa as j,qa as E,sb as q,tb as Y,tc as $,ua as M,ub as T,uc as le,v as U,xb as O,zb as Z,zc as ae}from"./chunk-2M52SFS6.js";import{a as D,b as B}from"./chunk-C6Q5SG76.js";var ve=["treeContainer"],Te=["formRef"],xe=[[["label"]],[["label"]],[["input"]]],be=["label","label","input"],Me=s=>({children:s,level:0}),Ee=s=>({$implicit:s}),Oe=(s,t)=>({children:s,level:t}),Se=(s,t)=>t.id;function we(s,t){if(s&1){let e=I();u(0,"spk-button-group")(1,"button",13),k("click",function(){N(e);let r=p();return y(r.pathDiscoveryMethod.set("browse"))}),W(2,4),h(),u(3,"button",13),k("click",function(){N(e);let r=p();return y(r.pathDiscoveryMethod.set("path"))}),W(4,5),h()()}if(s&2){let e=p();g(),T("active",e.pathDiscoveryMethod()==="browse"),g(2),T("active",e.pathDiscoveryMethod()==="path")}}function Fe(s,t){s&1&&te(0,"spk-progress-bar",9)}function Ne(s,t){s&1&&(u(0,"spk-icon",18),S(1,"caret-down"),h(),u(2,"spk-icon",16),S(3,"folder-open"),h())}function ye(s,t){s&1&&(u(0,"spk-icon"),S(1,"file"),h())}function ke(s,t){s&1&&(u(0,"spk-icon",18),S(1,"caret-right"),h(),u(2,"spk-icon",16),S(3,"folder"),h())}function Re(s,t){if(s&1&&x(0,Ne,4,0)(1,ye,2,0,"spk-icon")(2,ke,4,0),s&2){let e=p(2).$implicit;O(e.children.length?0:e.cls==="file"?1:2)}}function Ie(s,t){s&1&&(u(0,"spk-icon",16),S(1,"desktop-tower"),h())}function We(s,t){s&1&&X(0)}function Le(s,t){if(s&1&&x(0,We,1,0,"ng-container",10),s&2){let e=p(2).$implicit,n=p().$implicit;p();let r=K(7);q("ngTemplateOutlet",r)("ngTemplateOutletContext",$(5,Ee,le(2,Oe,e.children,n.level+1)))}}function $e(s,t){if(s&1){let e=I();u(0,"div",14,3),k("click",function(){N(e);let r=p().$implicit,i=p(2);return y(i.toggleNode(r.id,r))}),u(2,"div",15),x(3,Re,3,1)(4,Ie,2,0,"spk-icon",16),h(),u(5,"div",17),k("click",function(r){N(e);let i=p().$implicit,o=p(2);return y(o.toggleSelectedNode(r,i))}),S(6),h()(),x(7,Le,1,7,"ng-container")}if(s&2){let e=p().$implicit,n=p().$implicit,r=p();T("accepted",e.accepted===!0)("active",e.evalState===r.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",n.level===0),g(2),T("file",e.cls==="file"),g(),O(e.id!=="/"?3:4),g(3),se(" ",e.text," "),g(),O(e.children.length>0?7:-1)}}function Ae(s,t){if(s&1&&x(0,$e,8,17),s&2){let e=t.$implicit,n=p(2);O(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function De(s,t){if(s&1&&(u(0,"spk-list"),Z(1,Ae,1,1,null,null,Se),h()),s&2){let e=t.$implicit;Y("padding-left",e.level*.25,"rem"),g(),ee(e.children)}}function Be(s,t){s&1&&X(0)}function Ve(s,t){if(s&1){let e=I();u(0,"spk-toggle",19),k("click",function(){N(e);let r=p();return y(r._showHiddenNodes.set(!r._showHiddenNodes()))}),W(1,6),h()}if(s&2){let e=p();T("active",e._showHiddenNodes()),g(),ne(e.showFiles()?"files":"folders"),ie(1)}}var Pe=(i=>(i[i.ExcludedByParent=-2]="ExcludedByParent",i[i.Excluded=-1]="Excluded",i[i.None=0]="None",i[i.Included=1]="Included",i[i.IncludedByParent=2]="IncludedByParent",i))(Pe||{}),z=class s{#t=H(de);#o=H(pe);multiSelect=E(!1);disabled=E(!1);showFiles=E(!1);selectFiles=E(!1);accepts=E(null);startingPath=E(null);rootPath=E(void 0);backupSettings=E(null);pathRefreshTrigger=E(!1);showHiddenNodes=E(!1);hideShortcuts=E(!1);includes=j();excludes=j();_showHiddenNodes=M(!1);treeContainerRef=G("treeContainer");formRef=G("formRef");pathDiscoveryMethod=M("browse");isLoading=M(!1);currentPath=M("/");#e=M(null);treeSearchQuery=M("");treeNodes=M([]);filterGroups=this.#o.filterGroups();isByBackupSettings=A(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=A(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Pe;treeStructure=A(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(c=>c!==""&&c!=="/"),n=structuredClone(e);for(let c=0;c<n.length;c++){let d=n[c].slice(1);if(d.startsWith("{")&&d.endsWith("}")){let m=d.slice(1,-1),f=this.filterGroups?.FilterGroups[m];if(f&&f.length){let P=f.map(v=>`-${v}`);n.splice(c,1,...P)}}}let r=this.searchableTreeNodes(),i=new Map,o=this.rootPath(),_=this.accepts(),l=o?{id:o,resolvedpath:o,text:o,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}:{id:"/",resolvedpath:"/",text:"Computer",parentPath:"",children:[],evalState:0,isIndeterminate:!1};_&&(l.accepted=!0),i.set("/",l);for(let c of r){let a=c.id.replace(o??"",""),m=a.includes("\\")?"\\":"/",f=a.split(m).filter(Boolean),P="",v=l;for(let C of f){if(P+="/"+C,!i.has(P)){let w=c.hidden===!0&&t?0:this.#s(n,c.id,c.cls,v),b={id:c.id,isIndeterminate:this.isIndeterminate(n,c.id),evalState:w,parentPath:P,resolvedpath:c.id?.startsWith("%")?c.resolvedpath+"/":P,hidden:c.hidden,text:c.text,cls:c.cls,children:[]};_&&(b.accepted=this.matchAccepts(_,b)),i.set(P,b),v.children.push(b)}v=i.get(P)}}return[l]});#s(t,e,n,r){if(r.evalState===-1)return-2;let i=0,o=t.filter(l=>!l.startsWith("-")&&!l.startsWith("+")),_=t.filter(l=>l.startsWith("-")||l.startsWith("+"));if(o.length===0)return i;for(let l=0;l<o.length;l++){let c=o[l];if(e?.startsWith(c)){i=1;break}}if(_.length===0)return i;for(let l=0;l<_.length;l++){let c=_[l],a=c.slice(1),d=c.startsWith("-")?"exclude":"include",m=e.includes("\\"),f=m?"\\":"/";if((m?a.slice(2):a).startsWith(f)&&a.endsWith(f)){if(n!=="folder")continue;if(e===a){i=d==="include"?1:-1;break}}if(a.startsWith("*")&&a.endsWith(`*${f}`)){if(n!=="folder")continue;let C=a.slice(1,-2);if(C==="")break;if(e?.includes(C+f)){i=d==="include"?1:-1;break}}if(a.startsWith("[.*")&&a.endsWith(`[^\\${f}]*]`)){if(n!=="file")continue;let C=a.slice(3,-7);if(new RegExp(C).test(e)){i=d==="include"?1:-1;break}}if(a.startsWith("[")&&a.endsWith("]")){let C=a.slice(1,-1),w=this.translateCSharpRegex(C);if(new RegExp(`${w}`).test(e)){i=d==="include"?1:-1;break}}if(a.startsWith("*.")){if(n!=="file"||a.replace("*.","").length===0)continue;if(this.#n(e,a,!0)){i=d==="include"?1:-1;break}}if(a==="")continue;if(a===e){i=d==="include"?1:-1;break}if(this.#n(e,a,!0)){i=d==="include"?1:-1;break}}return i}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(r,i,o)=>`(${o})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.some(n=>n.startsWith(e))}#n(t,e,n=!1){let r=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${r}${n?"$":""}`).test(t)}showHiddenNodesEffect=R(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=R(()=>{let t=this.pathDiscoveryMethod(),e=this.#e();t==="browse"&&e&&this.currentPath.set(e.value)});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id==="/")return!0;let n=t.split(",");if(n.length===0)return!0;let r="."+e.id.slice(e.id.indexOf("."));return r?n.some(i=>r.endsWith(i)):!1}currentPathEffect=R(()=>{let t=this.#e();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=R(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#a(t),this.inputValueChangeAbortController&&this.inputValueChangeAbortController.abort(),this.inputValueChangeAbortController=new AbortController,t.addEventListener("inputValueChanged",e=>{this.currentPath.set(e.detail.value)},{signal:this.inputValueChangeAbortController.signal}),this.#e.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();t?(this.currentPath.set(t),this.#p(t)):this.#r(null,this.rootPath())}toggleSelectedNode(t,e){if(e.id==="/"||(t.stopPropagation(),e.evalState===-2))return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(e.id,e);return}if(this.accepts()&&!e.accepted)return;let r=this.currentPath().split("\0").filter(o=>o!==""&&o!=="/"),i=this.isChildOfSelected(e)?`-${e.id}`:e.id;this.multiSelect()?r.includes(e.id)?this.currentPath.set(r.filter(o=>o!==e.id).join("\0")):r.some(o=>o.startsWith(i))?this.currentPath.set(r.filter(o=>o!==i).join("\0")):this.currentPath.set([...r,i].join("\0")):r.includes(e.id)?this.currentPath.set(r.filter(o=>o!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(n=>n!==""&&n!=="/").some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(n=>n.filter(r=>!r.id?.startsWith(e.id)||r.id===e.id)):this.#r(e,t))}#l(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)}#a(t){return Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(e){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,e),this.dispatchEvent(new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}})),e}}),t}#c(t){return this.#t.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#d(t){let e=this.backupSettings(),n={id:e.id+"",prefixOnly:!1,folderContents:!0,time:e.time,filter:t?"@"+t:void 0};return this.#t.getApiV1BackupByIdFiles(n)}#i(t){return this.isByBackupSettings()?this.#d(t):this.#c(t)}#p(t){let e=t.split("\0").filter(o=>o.startsWith("-")).map(o=>o.slice(1,-1)),n=t.split("\0").filter(o=>!o.startsWith("-")).filter(Boolean),r=n.map(o=>{let _=o.indexOf(":")===1;return o.split(_?"\\":"/").filter(l=>l.includes(".")?!1:l)}),i=[this.rootPath()??"/"];r.forEach(o=>{o.forEach((_,l)=>{let c=o[0].endsWith(":"),a=o.slice(0,l+1).join(c?"\\":"/"),d=a;d.indexOf(":")===-1&&!d.startsWith("%")&&(d="/"+a),i.includes(d)||i.push(d)})}),this.isLoading.set(!0),U([...i.map(o=>this.#i(o))]).pipe(V(()=>this.isLoading.set(!1))).subscribe({next:o=>{this.treeNodes.update(_=>{let l=o.flatMap(a=>a.map(d=>{let m=d.id,f=m&&m.split("/").filter(Boolean).slice(0,-1).join("/"),v="/"+(m&&m.split("/").filter(Boolean).join("/")),C=n.findIndex(F=>this.multiSelect()?v.startsWith(F):v===F)>-1,w=n.findIndex(F=>F===m)>-1,b=e.findIndex(F=>F===v)>-1;return B(D({},d),{parentPath:f.startsWith("%")?f:"/"+f,isSelected:C&&!b||w})})),c=[...new Map([..._,...l].map(a=>[a.resolvedpath??a.id,a])).values()];return this.#l(),c})}})}#r(t=null,e="/"){this.isLoading.set(!0),this.#i(e).pipe(V(()=>this.isLoading.set(!1))).subscribe({next:n=>{let r=this.isByBackupSettings()?n.Files.map(i=>({text:i.Path.split("/").filter(o=>o!=="").pop(),id:i.Path,cls:i.Path.endsWith("/")||i.Path.endsWith("\\")?"folder":"file",leaf:t!==null,resolvedpath:i.Path,hidden:!1})):n;this.treeNodes.update(i=>{let o=r.map(l=>{let c=l.id.startsWith("%")&&l.id.endsWith("%")||l.id.endsWith("/")||l.id.endsWith("\\")?"folder":"file";return B(D({},l),{cls:c,parentPath:e})}),_=[...new Map([...i,...o].map(l=>[l.resolvedpath??l.id,l])).values()];return this.hideShortcuts()?_.filter(l=>!l.id.startsWith("%")):_})}})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=J({type:s,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&(Q(n.treeContainerRef,ve,5),Q(n.formRef,Te,5)),e&2&&oe(2)},hostVars:2,hostBindings:function(e,n){e&2&&T("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPath:[1,"rootPath"],backupSettings:[1,"backupSettings"],pathRefreshTrigger:[1,"pathRefreshTrigger"],showHiddenNodes:[1,"showHiddenNodes"],hideShortcuts:[1,"hideShortcuts"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:be,decls:15,vars:15,consts:()=>{let t;t=$localize` Browser path `;let e;e=$localize` Manually type path `;let n;return n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"primary","raised","browse-files-toggle",3,"active"],[1,"form-field"],["type","button",3,"click"],["action","",3,"click"],[1,"icon"],[1,"spk-primary"],[1,"text",3,"click"],[1,"small"],[1,"primary","raised","browse-files-toggle",3,"click"]]},template:function(e,n){if(e&1&&(re(xe),x(0,we,5,4,"spk-button-group"),u(1,"div",7),L(2,0,["ngProjectAs","label",5,["label"]]),u(3,"div",8,0),x(5,Fe,1,0,"spk-progress-bar",9)(6,De,3,2,"ng-template",null,1,ae)(8,Be,1,0,"ng-container",10),h(),x(9,Ve,2,3,"spk-toggle",11),h(),u(10,"div",12,2)(12,"spk-form-field"),L(13,1,["ngProjectAs","label",5,["label"]]),L(14,2,["ngProjectAs","input",5,["input"]]),h()()),e&2){let r=K(7);O(n.multiSelect()?-1:0),g(),T("hidden",n.pathDiscoveryMethod()!=="browse"),g(2),T("visualize-accepted",n.accepts()),g(2),O(n.isLoading()?5:-1),g(3),q("ngTemplateOutlet",r)("ngTemplateOutletContext",$(13,Ee,$(11,Me,n.treeStructure()))),g(),O(n.accepts()?-1:9),g(),T("hidden",n.pathDiscoveryMethod()!=="path")}},dependencies:[_e,Ce,he,fe,ge,me,ce,ue],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] spk-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-level-10);position:relative}.browse-files[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-level-30);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:0;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:transparent;--list-active-bg: var(--primary-level-20)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-level-40)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%]{gap:.25rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:3rem;gap:.25rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon.file[_ngcontent-%COMP%]{width:2rem;padding:0 .25rem}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-level-60R)}.hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};export{z as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"./chunk-
|
|
1
|
+
import{a,b}from"./chunk-YO6IQOER.js";import"./chunk-AYWJL6PH.js";import"./chunk-DW725235.js";import"./chunk-PNJEVGID.js";import"./chunk-YOP6HOXH.js";import"./chunk-XKAASYKO.js";import"./chunk-PPRHD3ZV.js";import"./chunk-LJ3ULEOG.js";import"./chunk-C5EHOW7U.js";import"./chunk-UIC2LGAH.js";import"./chunk-MCLDJCPW.js";import"./chunk-7IRVNC4S.js";import"./chunk-2M52SFS6.js";import"./chunk-C6Q5SG76.js";export{a as createRestoreOptionsForm,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as a,j as b}from"./chunk-
|
|
1
|
+
import{i as a,j as b}from"./chunk-2WZR3NHU.js";import"./chunk-AYWJL6PH.js";import"./chunk-DW725235.js";import"./chunk-DNHLTHLR.js";import"./chunk-PNJEVGID.js";import"./chunk-YOP6HOXH.js";import"./chunk-RTVM3BJK.js";import"./chunk-XKAASYKO.js";import"./chunk-PPRHD3ZV.js";import"./chunk-LJ3ULEOG.js";import"./chunk-C5EHOW7U.js";import"./chunk-UIC2LGAH.js";import"./chunk-MCLDJCPW.js";import"./chunk-7IRVNC4S.js";import"./chunk-2M52SFS6.js";import"./chunk-C6Q5SG76.js";export{a as createOptionsForm,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
1
|
+
import{a as u}from"./chunk-UIC2LGAH.js";import{$a as d,Bb as o,Cb as n,Ra as g,Tb as h,Vb as _,Wb as a,eb as p,gc as s,jb as m,qa as r,ub as f,xb as C}from"./chunk-2M52SFS6.js";var v=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],P=["[title]","[description]","[action]","*"];function M(e,l){e&1&&s(0,"Title")}function T(e,l){e&1&&(o(0,"spk-icon"),s(1,"caret-down"),n())}var c=class e{isActive=d(!1);disallowToggle=r(!1);ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=p({type:e,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(t,i){t&2&&f("active",i.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:P,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(t,i){t&1&&(_(v),o(0,"header")(1,"div",0)(2,"h3",1),h("click",function(){return i.disallowToggle()||i.toggle()}),a(3,0,null,M,1,0),m(5,T,2,0,"spk-icon"),n(),a(6,1),n(),o(7,"div",2),a(8,2),n()(),o(9,"div",3),a(10,3),n()),t&2&&(g(5),C(i.disallowToggle()?-1:5))},dependencies:[u],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;border-radius:var(--shape-3);background-color:var(--base-level-20)}.active[_nghost-%COMP%] .content[_ngcontent-%COMP%]{max-height:1000px;transition:max-height 1s linear;padding:0 1rem 1rem}.active[_nghost-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}[_nghost-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;font:var(--paragraph-10);cursor:pointer;-webkit-user-select:none;user-select:none}[_nghost-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(0);transform-origin:center;transition:transform .2s ease}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1 0}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]:empty{display:none}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0 1rem;overflow:hidden;max-height:0;transition:max-height .25s linear,padding .25s linear}.content[_ngcontent-%COMP%]:empty{display:none}"],changeDetection:0})};export{c as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as a,g as b,h as c}from"./chunk-
|
|
1
|
+
import{f as a,g as b,h as c}from"./chunk-2WZR3NHU.js";import"./chunk-AYWJL6PH.js";import"./chunk-DW725235.js";import"./chunk-DNHLTHLR.js";import"./chunk-PNJEVGID.js";import"./chunk-YOP6HOXH.js";import"./chunk-RTVM3BJK.js";import"./chunk-XKAASYKO.js";import"./chunk-PPRHD3ZV.js";import"./chunk-LJ3ULEOG.js";import"./chunk-C5EHOW7U.js";import"./chunk-UIC2LGAH.js";import"./chunk-MCLDJCPW.js";import"./chunk-7IRVNC4S.js";import"./chunk-2M52SFS6.js";import"./chunk-C6Q5SG76.js";export{b as NONE_OPTION,a as createGeneralForm,c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{k as a,l as b}from"./chunk-
|
|
1
|
+
import{k as a,l as b}from"./chunk-2WZR3NHU.js";import"./chunk-AYWJL6PH.js";import"./chunk-DW725235.js";import"./chunk-DNHLTHLR.js";import"./chunk-PNJEVGID.js";import"./chunk-YOP6HOXH.js";import"./chunk-RTVM3BJK.js";import"./chunk-XKAASYKO.js";import"./chunk-PPRHD3ZV.js";import"./chunk-LJ3ULEOG.js";import"./chunk-C5EHOW7U.js";import"./chunk-UIC2LGAH.js";import"./chunk-MCLDJCPW.js";import"./chunk-7IRVNC4S.js";import"./chunk-2M52SFS6.js";import"./chunk-C6Q5SG76.js";export{a as createScheduleForm,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as a,f as b}from"./chunk-
|
|
1
|
+
import{e as a,f as b}from"./chunk-YO6IQOER.js";import"./chunk-AYWJL6PH.js";import"./chunk-DW725235.js";import"./chunk-PNJEVGID.js";import"./chunk-YOP6HOXH.js";import"./chunk-XKAASYKO.js";import"./chunk-PPRHD3ZV.js";import"./chunk-LJ3ULEOG.js";import"./chunk-C5EHOW7U.js";import"./chunk-UIC2LGAH.js";import"./chunk-MCLDJCPW.js";import"./chunk-7IRVNC4S.js";import"./chunk-2M52SFS6.js";import"./chunk-C6Q5SG76.js";export{a as createRestoreSelectFilesForm,b as default};
|