@duplicati/ngclient 0.0.94 → 0.0.95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/assets/spk.woff2 +0 -0
  2. package/{chunk-NWWH6FOD.js → chunk-2FWU7B4D.js} +1 -1
  3. package/{chunk-L7FLOT6V.js → chunk-3HJFVNAL.js} +1 -1
  4. package/chunk-3TZIEZUP.js +1 -0
  5. package/{chunk-P5DXOHSO.js → chunk-3ZLHMSKS.js} +1 -1
  6. package/{chunk-G2H5UWAV.js → chunk-5RLVPRCW.js} +1 -1
  7. package/chunk-APEDZMBI.js +1 -0
  8. package/{chunk-VKM32I64.js → chunk-AVNZ3OXK.js} +1 -1
  9. package/{chunk-VTG6KYFA.js → chunk-DTR7JZFL.js} +1 -1
  10. package/chunk-DUPZCVLU.js +3 -0
  11. package/chunk-ETPUKEDV.js +1 -0
  12. package/chunk-F4AVB6VB.js +1 -0
  13. package/chunk-FAZH6E7O.js +6 -0
  14. package/chunk-HWVDZXYD.js +1 -0
  15. package/{chunk-WVLWUQUO.js → chunk-ICOF6OY2.js} +1 -1
  16. package/{chunk-7B4DII5K.js → chunk-IR7OYLKR.js} +1 -1
  17. package/{chunk-NWVBCPMZ.js → chunk-L4B5RE7R.js} +1 -1
  18. package/chunk-LFPZBC5Y.js +1 -0
  19. package/chunk-LVHYWUFN.js +1 -0
  20. package/chunk-M5YHW43W.js +6 -0
  21. package/chunk-MLJFOQOI.js +1 -0
  22. package/chunk-NU46HB6T.js +1 -0
  23. package/{chunk-Z5XE4ZV2.js → chunk-ORA656R6.js} +1 -1
  24. package/chunk-P5GYPUJD.js +1 -0
  25. package/{chunk-T3IB73UA.js → chunk-QXYKZKGV.js} +1 -1
  26. package/{chunk-SK4EP46J.js → chunk-R6R4GFBX.js} +1 -1
  27. package/chunk-RCP6EKCC.js +1 -0
  28. package/{chunk-RKQDFV7W.js → chunk-RDRLCN5M.js} +1 -1
  29. package/{chunk-4MLA2ZG7.js → chunk-RHPHTHFC.js} +1 -1
  30. package/{chunk-7NYCYOKS.js → chunk-S5JZJBJS.js} +1 -1
  31. package/{chunk-WAE42BEK.js → chunk-SNZ7FE6B.js} +1 -1
  32. package/chunk-SSXZ4GVY.js +1 -0
  33. package/{chunk-ZA4X5BZG.js → chunk-TBPNAHEA.js} +1 -1
  34. package/{chunk-QJWNFRD3.js → chunk-TLNQL27Q.js} +1 -1
  35. package/chunk-TX5R4CFB.js +1 -0
  36. package/{chunk-OQEGPSC6.js → chunk-TYO44G6M.js} +1 -1
  37. package/{chunk-CMNODR42.js → chunk-VFLEQIHL.js} +1 -1
  38. package/{chunk-L667SCU5.js → chunk-VS2WUXLN.js} +1 -1
  39. package/{chunk-6XMTMDI4.js → chunk-WNQBKJ3M.js} +1 -1
  40. package/chunk-WYXI4BXE.js +1 -0
  41. package/{chunk-7LD5V64E.js → chunk-XL5J65PI.js} +1 -1
  42. package/chunk-XQXYPXR7.js +1 -0
  43. package/{chunk-FYSTW7IN.js → chunk-YKB6KLXM.js} +1 -1
  44. package/{chunk-PVBMNMGK.js → chunk-ZHWVTLKA.js} +1 -1
  45. package/index.html +2 -2
  46. package/{main-XIRMJMWZ.js → main-ZZ5NOUMD.js} +1 -1
  47. package/package.json +1 -1
  48. package/{styles-XDXFMHQT.css → styles-IOWRSZHV.css} +1 -1
  49. package/chunk-2ZYPGUOW.js +0 -6
  50. package/chunk-47XDI5B5.js +0 -1
  51. package/chunk-7XMYLRVX.js +0 -1
  52. package/chunk-FF6XUK27.js +0 -1
  53. package/chunk-HAZC7QF4.js +0 -1
  54. package/chunk-IY2EGNYQ.js +0 -1
  55. package/chunk-LGGACMIA.js +0 -1
  56. package/chunk-OVA6G4AJ.js +0 -6
  57. package/chunk-PQWBOXD7.js +0 -1
  58. package/chunk-PWQHMEDY.js +0 -1
  59. package/chunk-PZSY4DRF.js +0 -1
  60. package/chunk-QPRM4V75.js +0 -1
  61. package/chunk-UENFWA7U.js +0 -3
  62. package/chunk-WZQNMWLT.js +0 -1
  63. package/chunk-XR74M6VT.js +0 -1
  64. package/chunk-YKV265HA.js +0 -1
package/chunk-2ZYPGUOW.js DELETED
@@ -1,6 +0,0 @@
1
- import{a as We}from"./chunk-L7FLOT6V.js";import{a as qe}from"./chunk-Q67EYU7V.js";import{a as wt,b as Zt}from"./chunk-DNHLTHLR.js";import{a as U}from"./chunk-N5K6ODRA.js";import{a as He}from"./chunk-47XDI5B5.js";import{a as at}from"./chunk-CK5N2PPF.js";import{a as Le,b as ie,c as De,d as re,e as Ee,f as Ct,g as St,h as ye,i as Pe,l as ft,m as Oe,n as Ge,o as Yt,p as Ne,q as ae,r as je,s as Ae}from"./chunk-4IJQ7AAQ.js";import{b as ze}from"./chunk-KLIPTMVG.js";import{a as Te,c as pe}from"./chunk-AIOUSVMR.js";import{a as te,b as dt,d as Wt,e as qt,g as he,l as ne,n as Ft,o as gt,r as oe,w as Qt,x as be,y as Xe}from"./chunk-ECH6I3YN.js";import{c as jt}from"./chunk-V5GVLIPJ.js";import{ia as Ht}from"./chunk-2HS3CYRN.js";import{A as At,Ab as s,Bb as a,Cb as _,D as tt,Db as X,Eb as H,Fb as ot,Gb as y,Lc as b,Mb as T,Mc as _t,Nb as h,Ob as I,Pb as Be,Qa as l,Qb as Ke,R as Re,Rb as Ie,Sb as f,Tb as p,Wb as _e,X as x,Xa as Ce,Yb as V,Zb as B,_a as zt,ca as F,cc as Se,da as g,db as J,dc as fe,ec as ee,fc as u,gc as $t,ha as Kt,hc as w,ib as d,ic as Xt,kc as pt,l as Nt,lc as ct,mc as mt,nc as xt,oa as kt,oc as It,p as et,pa as nt,pc as Mt,rb as m,rc as ut,sa as A,sc as it,tb as xe,uc as rt,wb as S,xb as q,yb as Q,yc as ve,zb as Y}from"./chunk-DTPZU6NP.js";import{a as N,b as lt,c as Bt}from"./chunk-C6Q5SG76.js";var Tt=class t{fromString(n){if(!n)return null;let e=n.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(n,e){return`${n}${e}`}static \u0275fac=function(e){return new(e||t)};static \u0275prov=Re({token:t,factory:t.\u0275fac,providedIn:"root"})};var $e=class t{#e=x(ze);s3Providers=U(this.getS3Config("Providers"));s3Regions=U(this.getS3Config("Regions"));s3RegionHosts=U(this.getS3Config("RegionHosts"));s3StorageClasses=U(this.getS3Config("StorageClasses"));storjSatellites=U(this.getStorjConfig("Satellites"));storjAuthenticationMethods=U(this.getStorjConfig("AuthenticationMethods"));openstackProviders=U(this.getOpenstackConfig("Providers"));openstackVersions=U(this.getOpenstackConfig("Versions"));gcsLocations=U(this.getGcsConfig("Locations"));gcsStorageClasses=U(this.getGcsConfig("StorageClasses"));getS3Config(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":n}}).pipe(et(e=>this.#t(e)))}createS3IamUser(n,e){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":n,"s3-password":e}})}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(et(e=>this.#t(e)))}getOpenstackConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":n}}).pipe(et(e=>this.#t(e)))}getGcsConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":n}}).pipe(et(e=>this.#t(e)))}#t(n){return(n.Result&&typeof n.Result=="object"&&Object.entries(n.Result).map(([e,o])=>({key:e,value:o})))??[]}static \u0275fac=function(e){return new(e||t)};static \u0275prov=Re({token:t,factory:t.\u0275fac,providedIn:"root"})};function Ve(t){return t==null?"":":"+t.toString()}function se(t){return t==null?"":t.startsWith("/")?t:"/"+t}function R(t,n){let e={},o={};return n.searchParams.forEach((i,r)=>{Me.find(c=>c.key===t)?.dynamicFields?.includes(r)?o[r]=decodeURIComponent(i):e[r]=decodeURIComponent(i)}),{advanced:e,dynamic:o}}function v(t,n=!1){let e=t.map(([i,r])=>`${i}=${r?encodeURIComponent(r.toString()):""}`).join("&");return e?(n?"":"?")+e:""}function ht(t){let n=t.destinationType,e=Me.find(o=>o.customKey===n||o.key===n);if(!e)throw new Error("Invalid destination type");return e?.mapper.to(t)??""}function Rt(t){let n=URL.canParse(t),e=t.split("://")[0],o=t.split("://")[1],i="http://"+o;if(o.startsWith("%")&&e==="file")return Me.find(r=>r.customKey===e||r.key===e)?.mapper.from(e,new URL("http://localhost"),t);try{let r=new URL(i);return Me.find(c=>c.customKey===e||c.key===e)?.mapper.from(e,r,t)}catch(r){console.error("Error while parsing target path",r)}if(!n)throw new Error("Invalid target path");return null}var D=new ae,Me=[{key:"file",displayName:"File system",description:"Store backups on your local file system.",customFields:{path:{type:"FolderTree",name:"path",shortDescription:"File path",longDescription:"The path to store the backup",formElement:t=>D.control(t??"")}},mapper:{to:t=>{let n=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.path}${n}`},from:(t,n,e)=>{let i=e.startsWith("file:///")?e.split("file:///")[1]:e.split("file://")[1],r=i.startsWith("%"),C=i.slice(1).startsWith(":\\")||r?i:"/"+i;return N({destinationType:t,custom:{path:C}},R(t,n))}}},{key:"ssh",displayName:"SSH",description:"Store backups in SSH.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"The server to connect to",formElement:t=>D.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:t=>D.control(t??"",[De.required,De.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>D.control(t??"")}},dynamicFields:["auth-username"],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:"This is a path to a private key file locally on the machine",longDescription:"This is a path to a private key file locally on the machine"}],mapper:{to:t=>{let n=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:e,server:o,path:i}=t.custom;return`${t.destinationType}://${o+Ve(e)+se(i)+n}`},from:(t,n,e)=>N({destinationType:t,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(t,n))}},{key:"s3",displayName:"S3 compatible bucket",description:"Store backups in any S3 compatible bucket.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:t=>D.control(t??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>D.control(t??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:t=>t.get($e).s3Providers},"use-ssl","auth-username","auth-password"],advancedFields:[{name:"s3-client",type:"Enumeration",options:["aws","minio"]},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:t=>t.get($e).s3StorageClasses}],mapper:{to:t=>{let{bucket:n,path:e}=t.custom,o=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n+se(e)+o}`},from:(t,n,e)=>N({destinationType:t,custom:{path:n.pathname,bucket:n.hostname}},R(t,n))}},{key:"gcs",displayName:"Google Cloud Storage",description:"Store backups in Google Cloud Storage.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:t=>D.control(t??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:t=>t.get($e).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:t=>t.get($e).gcsStorageClasses},"authid"],mapper:{to:t=>{let n=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.path}${n}`},from:(t,n,e)=>N({destinationType:t,custom:{path:n.hostname+n.pathname}},R(t,n))}},{key:"googledrive",displayName:"Google Drive",description:"Store backups in Google Drive.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>D.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=t.custom.path,e=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>N({destinationType:t,custom:{path:n.hostname+n.pathname}},R(t,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:t=>D.control(t??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>D.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=t.custom.path,e=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>{let o=n.pathname.replace(/^\//,"");return N({destinationType:t,custom:{server:n.hostname,path:o}},R(t,n))}}},{key:"azure",displayName:"Azure Blob Storage",description:"Store backups in Azure Blob Storage.",customFields:{path:{type:"String",name:"path",shortDescription:"Container name",longDescription:"Container name",formElement:t=>D.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:t=>{let n=t.custom.path,e=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>N({destinationType:t,custom:{path:n.hostname+n.pathname}},R(t,n))}},{key:"onedrivev2",displayName:"OneDrive",description:"Store backups in OneDrive.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>D.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=t.custom.path,e=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>N({destinationType:t,custom:{path:n.hostname+n.pathname}},R(t,n))}},{key:"od4b",displayName:"OneDrive Business",description:"Store backups in OneDrive Business.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>D.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>D.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>D.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:t=>{let n=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:e,server:o,path:i}=t.custom;return`${t.destinationType}://${o+Ve(e)+se(i)+n}`},from:(t,n,e)=>N({destinationType:t,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(t,n))}},{key:"mssp",displayName:"Microsoft SharePoint",description:"Store backups in Microsoft SharePoint.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>D.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>D.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>D.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:t=>{let n=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:e,server:o,path:i}=t.custom;return`${t.destinationType}://${o+Ve(e)+se(i)+n}`},from:(t,n,e)=>N({destinationType:t,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(t,n))}},{key:"sharepoint",displayName:"Microsoft SharePoint v2",description:"Store backups in Microsoft SharePoint.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>D.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=t.custom.path,e=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>N({destinationType:t,custom:{path:n.hostname+n.pathname}},R(t,n))}},{key:"dropbox",displayName:"Dropbox",description:"Store backups in Dropbox.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>D.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=t.custom.path,e=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>N({destinationType:t,custom:{path:n.hostname+n.pathname}},R(t,n))}},{key:"box",displayName:"Box.com",description:"Store backups in Box.com.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>D.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=t.custom.path,e=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>N({destinationType:t,custom:{path:n.hostname+n.pathname}},R(t,n))}},{key:"jottacloud",displayName:"Jottacloud",description:"Store backups in Jottacloud.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>D.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=t.custom.path,e=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>N({destinationType:t,custom:{path:n.hostname+n.pathname}},R(t,n))}},{key:"b2",displayName:"B2 Cloud Storage",description:"Store backups in B2 Cloud Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:t=>D.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:t=>D.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Application ID"},{name:"auth-password",shortDescription:"Application Key"}],mapper:{to:t=>{let{bucket:n,path:e}=t.custom,o=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n+se(e)+o}`},from:(t,n,e)=>N({destinationType:t,custom:{bucket:n.hostname,path:n.pathname}},R(t,n))}},{key:"e2",displayName:"IDrive e2",description:"Store backups in IDrive e2.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:t=>D.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:t=>D.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Access ID"},{name:"auth-password",shortDescription:"Access Secret"}],mapper:{to:t=>{let{bucket:n,path:e}=t.custom,o=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n+se(e)+o}`},from:(t,n,e)=>N({destinationType:t,custom:{bucket:n.hostname,path:n.pathname}},R(t,n))}},{key:"mega",displayName:"Mega.nz",description:"Store backups in Mega.nz.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>D.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let n=t.custom.path,e=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>N({destinationType:t,custom:{path:n.hostname+n.pathname}},R(t,n))}},{key:"msgroup",displayName:"Microsoft Office 365 Group",description:"Store backups in Microsoft Office 365 Group.",oauthField:"authid",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:"Group email",longDescription:"Group email",formElement:t=>D.control(t??"",[De.email])},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>D.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=t.custom.path,e=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>N({destinationType:t,custom:{path:n.hostname+n.pathname}},R(t,n))}},{key:"cloudfiles",displayName:"Rackspace CloudFiles",description:"Store backups in Rackspace CloudFiles.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>D.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>D.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>D.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let n=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:e,server:o,path:i}=t.custom;return`${t.destinationType}://${o+Ve(e)+se(i)+n}`},from:(t,n,e)=>N({destinationType:t,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(t,n))}},{key:"rclone",displayName:"Rclone",description:"Store backups in Rclone.",dynamicFields:[{name:"rclone-local-repository",shortDescription:"Local repository",defaultValue:""},{name:"rclone-remote-repository",shortDescription:"Remote repository",defaultValue:""},{name:"rclone-remote-path",shortDescription:"Path on remote repository",defaultValue:""}],mapper:{to:t=>{let n=t.dynamic["rclone-remote-repository"],e=t.dynamic["rclone-remote-path"],o=Object.entries(t.dynamic).filter(([r])=>!["rclone-remote-repository","rclone-remote-path"].includes(r)),i=v([...Object.entries(t.advanced),...o]);return`${t.destinationType}://${n}/${e+i}`},from:(t,n,e)=>{let{advanced:o,dynamic:i}=R(t,n);return N({destinationType:t,dynamic:N({"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:t=>D.control(t??"")}},dynamicFields:[{name:"openstack-authuri",shortDescription:"Auth URI",type:"Enumeration",loadOptions:t=>t.get($e).openstackProviders},{name:"openstack-version",shortDescription:"Version",type:"Enumeration",loadOptions:t=>t.get($e).openstackVersions},{name:"openstack-domain-name",shortDescription:"Domain name"},{name:"openstack-tenant-name",shortDescription:"Tenant name"},{name:"openstack-region",shortDescription:"Region"}],mapper:{to:t=>{let n=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{bucket:e}=t.custom;return`${t.destinationType}://${e+n}`},from:(t,n,e)=>N({destinationType:t,custom:{path:n.pathname,bucket:n.hostname}},R(t,n))}},{key:"webdav",displayName:"WebDAV",description:"Store backups in WebDAV.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>D.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>D.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>D.control(t??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"},{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let{port:n,server:e,path:o}=t.custom,i=t.dynamic["use-ssl"],r=v([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([c])=>c!=="use-ssl")]);return`${t.destinationType}${i?"s":""}://${e+Ve(n)+se(o)+r}`},from:(t,n,e)=>N({destinationType:t,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(t,n))}},{key:"aftp",displayName:"FTP",description:"Store backups in FTP.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>D.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>D.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>D.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let{port:n,server:e,path:o}=t.custom,i=v([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([r])=>r!=="use-ssl")]);return`${t.destinationType}://${e+Ve(n)+se(o)+i}`},from:(t,n,e)=>N({destinationType:t,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(t,n))}},{key:"sia",displayName:"Sia Decentrilized Cloud",description:"Store backups in Sia Decentrilized Cloud.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>D.control(t??"")}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:t=>{let n=t.custom.server,e=t.dynamic["sia-targetpath"],o=v([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([i])=>i!=="sia-targetpath")]);return`${t.destinationType}://${n+se(e)+o}`},from:(t,n,e)=>N({destinationType:t,custom:{path:n.pathname}},R(t,n))}},{key:"cos",displayName:"Tencent COS",description:"Store backups in Tencent COS.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>D.control(t??"")}},dynamicFields:[{name:"cos-bucket",shortDescription:"Bucket",order:1},{name:"cos-region",shortDescription:"Region",order:2},{name:"cos-app-id",shortDescription:"COS App Id",order:3},{name:"cos-secret-id",shortDescription:"COS Secret Id",order:4},{name:"cos-secret-key",shortDescription:"COS Secret Key",order:5}],mapper:{to:t=>{let n=t.custom.path,e=v([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([o])=>o!=="cos-targetpath")]);return`${t.destinationType}://${n+e}`},from:(t,n,e)=>N({destinationType:t,custom:{path:n.pathname}},R(t,n))}},{key:"tahoe",displayName:"Tahoe LAFS",description:"Store backups in Tahoe LAFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>D.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>D.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>D.control(t??"")},username:{type:"String",name:"username",shortDescription:"Username",longDescription:"Username",formElement:t=>D.control(t??"")},password:{type:"Password",name:"password",shortDescription:"Password",longDescription:"Password",formElement:t=>D.control(t??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"}],mapper:{to:t=>{let{port:n,server:e,path:o,username:i,password:r}=t.custom,c={"auth-username":i,"auth-password":r},C=t.dynamic["use-ssl"],O=v([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([E])=>E!=="use-ssl"),...Object.entries(c)]);return`${t.destinationType}${C?"s":""}://${e+Ve(n)+se(o)+O}`},from:(t,n,e)=>N({destinationType:t,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(t,n))}},{key:"cifs",displayName:"CIFS",description:"Store backups in CIFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>D.control(t??"")},share:{type:"String",name:"share",shortDescription:"Share Name",longDescription:"Share Name",formElement:t=>D.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>D.control(t??"")}},dynamicFields:["transport","auth-username","auth-password","auth-domain"],mapper:{to:t=>{let{share:n,server:e,path:o,username:i,password:r}=t.custom,c={"auth-username":i,"auth-password":r},C=v([...Object.entries(t.advanced),...Object.entries(c)]);return`${t.destinationType}://${e+se(n)+se(o)+C}`},from:(t,n,e)=>{let o=n.pathname.split("/")[1],i=n.pathname.split("/").slice(2).join("/");return N({destinationType:t,custom:{server:n.hostname,share:o,path:i}},R(t,n))}}},{key:"storj",customKey:"storjAccessGrant",displayName:"Storj Access Grant",description:"Store backups in Storj Access Grant.",dynamicFields:[{name:"storj-shared-access",shortDescription:"Access Grant"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server"}],mapper:{to:t=>`storj://storj.io/config?storj-auth-method=Access%20grant&storj-satellite=us1.storj.io%3A7777&storj-api-key&storj-secret&${v([...Object.entries(t.advanced),...Object.entries(t.dynamic)],!0)}`,from:(t,n,e)=>N({destinationType:t},R(t,n))}},{key:"storj",customKey:"storjApiKey",displayName:"Storj API Key",description:"Store backups in Storj API Key.",dynamicFields:[{name:"storj-satellite",shortDescription:"Satellite",type:"Enumeration",loadOptions:t=>t.get($e).storjSatellites},{name:"storj-api-key",shortDescription:"API Key"},{name:"storj-secret",shortDescription:"Secret"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server"}],mapper:{to:t=>`storj://storj.io/config?storj-auth-method=API%20key&${v([...Object.entries(t.advanced),...Object.entries(t.dynamic)],!0)}`,from:(t,n,e)=>N({destinationType:t},R(t,n))}}];var Jt=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,Dt=class t{generate(n,e=Jt){let o;do o=this.generatePassword(n,e);while(this.calculatePasswordStrength(o)<5);return o}generatePassword(n,e=Jt){let o=this;return Array.apply(null,{length:n}).map(()=>{let i;for(;;)if(i=String.fromCharCode(o.#e()),e.test(i))return i},this).join("")}calculatePasswordStrength(n){let e=1;return n.length>=8&&e++,n.match(/[a-z]/)&&n.match(/[A-Z]/)&&e++,n.match(/\d+/)&&e++,n.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&e++,Math.min(e,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(e){return new(e||t)};static \u0275prov=Re({token:t,factory:t.\u0275fac,providedIn:"root"})};var cn=["formRef"];function mn(t,n){if(t&1&&u(0),t&2){let e=n.$implicit;w(" ",e.DisplayName," ")}}function un(t,n){if(t&1&&_(0,"spk-progress-bar",37),t&2){let e=p(3);xe("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),m("value",e.calculatePasswordStrength()*(100/5))}}function _n(t,n){t&1&&(s(0,"span",32),I(1,9),a())}function dn(t,n){t&1&&(T(0,7,1),_(1,"spk-icon"),h())}function Fn(t,n){t&1&&(T(0,7,2),_(1,"spk-icon"),h())}function gn(t,n){t&1&&(T(0,10,1),_(1,"spk-icon",39),h())}function Cn(t,n){t&1&&(T(0,10,2),_(1,"spk-icon"),h())}function Sn(t,n){if(t&1){let e=y();s(0,"button",38),f("click",function(){F(e);let i=p(3);return g(i.copyPassword())}),T(1,10),d(2,gn,2,0)(3,Cn,2,0),h(),a()}if(t&2){let e=p(3);l(2),S(e.copiedPassword()?2:3)}}function fn(t,n){t&1&&(s(0,"spk-alert",36),I(1,11),a())}function Tn(t,n){if(t&1){let e=y();s(0,"div",27)(1,"spk-form-field")(2,"label",28),T(3,6),_(4,"sup"),h(),a(),_(5,"input",29),a(),d(6,un,1,9,"spk-progress-bar",30),s(7,"spk-form-field"),_(8,"input",31),d(9,_n,2,0,"span",32),a(),s(10,"div",33)(11,"button",34),f("click",function(){F(e);let i=p(2);return g(i.showPassword.set(!i.showPassword()))}),T(12,7),d(13,dn,2,0)(14,Fn,2,0),h(),a(),s(15,"button",34),f("click",function(){F(e);let i=p(2);return g(i.generatePassword())}),T(16,8),_(17,"spk-icon"),h(),a(),d(18,Sn,4,1,"button",35),a(),d(19,fn,2,0,"spk-alert",36),a()}if(t&2){let e=p(2);l(5),m("type",e.showPassword()?"text":"password"),l(),S(e.generalForm.value.password?6:-1),l(2),m("type",e.showPassword()?"text":"password"),l(),S(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),l(4),S(e.showPassword()?13:14),l(5),S(e.showCopyPassword()?18:-1),l(),S(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function hn(t,n){if(t&1&&(s(0,"spk-select",24)(1,"label",25),I(2,5),a(),_(3,"input",26),d(4,mn,1,1,"ng-template"),a(),d(5,Tn,20,7,"div",27)),t&2){let e=p();m("options",e.encryptionOptions())("isClearable",!1),l(5),S(e.encryptionFieldSignal()!==""?5:-1)}}function Dn(t,n){if(t&1&&(s(0,"button",22),T(1,12),_(2,"spk-icon"),h(),a()),t&2){let e=p();m("disabled",e.generalForm.invalid)}}function En(t,n){if(t&1&&(s(0,"spk-tooltip",23)(1,"button",22),T(2,13),_(3,"spk-icon"),h(),a()()),t&2){let e=p();m("disabled",!(e.showCopyPassword()&&!e.copiedPassword())),l(),m("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var Qe=new ae,en=(t={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>Qe.group({name:Qe.control(t.name,[De.required]),description:Qe.control(t.description),encryption:Qe.control(t.encryption,[Zt()]),password:Qe.control(t.password,[wt(n=>n?.value.encryption!=="",[De.required])]),repeatPassword:Qe.control(t.repeatPassword,[wt(n=>n?.value.encryption!=="",[De.required])])}),bt={Key:"",DisplayName:"None"},vt=class t{#e=x(pe);#t=x(Te);#o=x(Dt);#i=x(ce);#n=x(He);formRef=Ce.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=_t(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});calculatePasswordStrength=b(()=>{let e=this.generalFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});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 e=>{let o=[bt,...n].find(i=>i.Key===e);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(e){return new(e||t)};static \u0275cmp=J({type:t,selectors:[["app-general"]],viewQuery:function(e,o){e&1&&Se(o.formRef,cn,5),e&2&&fe()},decls:20,vars:3,consts:()=>{let n;n=$localize`Your backup name`;let e;e=$localize`Your backup description`;let o;o=$localize`General backup settings`;let i;i=$localize` Backup name ${"\uFFFD#7\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#7\uFFFD"}:CLOSE_SUPERSCRIPT:`;let r;r=$localize`Backup description`;let c;c=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let C;C=$localize`Encryption`;let O;O=$localize`Encryption`;let E;E=$localize`Password`;let K;K=$localize`Repeat password`;let z;z=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let $;$=$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:`,$=Ie($);let j;j=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let me;me=$localize`Passwords do not match`;let Z;Z=$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:`,Z=Ie(Z);let P;P=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let k;k=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let G;return G=$localize` Continue ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],o,i,r,c,O,z,$,j,me,Z,P,k,G,["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",e,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["message","Remember to copy the password",1,"primary",3,"disabled"],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",C,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",E,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",K,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(e,o){if(e&1){let i=y();s(0,"form",14,0),f("submit",function(){return F(i),g(o.next())}),s(2,"h3",15),I(3,1),a(),s(4,"spk-form-field")(5,"label",16),T(6,2),_(7,"sup"),h(),a(),_(8,"input",17),a(),s(9,"spk-form-field")(10,"label",18),I(11,3),a(),_(12,"textarea",19),a(),d(13,hn,6,3),s(14,"div",20)(15,"button",21),f("click",function(){return F(i),g(o.exit())}),T(16,4),_(17,"spk-icon"),h(),a(),d(18,Dn,3,1,"button",22)(19,En,4,2,"spk-tooltip",23),a()()}e&2&&(m("formGroup",o.generalForm),l(13),S(o.isNew()?13:-1),l(5),S(o.encryptionFieldSignal()===""?18:19))},dependencies:[Ae,ye,ie,re,Ee,Oe,Ne,ne,oe,he,te,gt,dt,Xe],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-500)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}"],changeDetection:0})};function yn(t,n){if(t&1){let e=y();T(0,3,2),s(1,"button",11,0),f("click",function(){let i=F(e).$implicit,r=p(2);return g(r.addSetting(i))}),a(),h()}if(t&2){let e=n.$implicit;l(),Be(e.name),Ke(0)}}function Pn(t,n){if(t&1&&(T(0,3,1),_(1,"h3",5),Q(2,yn,3,1,"button",10,q),h()),t&2){let e=n.$implicit;l(2),Y(e.options),Be(e.displayName),Ke(0)}}function On(t,n){if(t&1&&(s(0,"spk-tooltip",18)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.FormView.longDescription)}}function Nn(t,n){if(t&1){let e=y();s(0,"app-file-tree",12)(1,"label",17),u(2),d(3,On,3,1,"spk-tooltip",18),a(),s(4,"input",19),f("ngModelChange",function(i){F(e);let r=p().$implicit,c=p();return g(c.updateSettingValue(r,i))}),a()()}if(t&2){let e=p(),o=e.$implicit,i=e.$index;m("startingPath",o.Value())("accepts",o.FormView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),V("for","destination-",o.Name,"-",i,""),l(),w(" ",o.FormView.shortDescription," "),l(),S(o.FormView.longDescription?3:-1),l(),V("id","destination-",o.Name,"-",i,""),m("ngModel",o.Value())}}function An(t,n){if(t&1&&(s(0,"spk-tooltip",18)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.FormView.longDescription)}}function kn(t,n){if(t&1){let e=y();s(0,"app-file-tree",13)(1,"label",17),u(2),d(3,An,3,1,"spk-tooltip",18),a(),s(4,"input",19),f("ngModelChange",function(i){F(e);let r=p().$implicit,c=p();return g(c.updateSettingValue(r,i))}),a()()}if(t&2){let e=p(),o=e.$implicit,i=e.$index;m("startingPath",o.Value()),l(),V("for","destination-",o.Name,"-",i,""),l(),w(" ",o.FormView.shortDescription," "),l(),S(o.FormView.longDescription?3:-1),l(),V("id","destination-",o.Name,"-",i,""),m("ngModel",o.Value())}}function $n(t,n){if(t&1&&(s(0,"spk-tooltip",18)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.FormView.longDescription)}}function xn(t,n){t&1&&(s(0,"spk-icon",20),u(1,"link"),a())}function In(t,n){t&1&&(s(0,"spk-icon",20),u(1,"textbox"),a())}function Mn(t,n){if(t&1){let e=y();s(0,"spk-form-field")(1,"label",17),u(2),d(3,$n,3,1,"spk-tooltip",18),a(),s(4,"input",19),f("ngModelChange",function(i){F(e);let r=p().$implicit,c=p();return g(c.updateSettingValue(r,i))}),a(),d(5,xn,2,0,"spk-icon",20)(6,In,2,0,"spk-icon",20),a()}if(t&2){let e=p(),o=e.$implicit,i=e.$index;l(),V("for","destination-",o.Name,"-",i,""),l(),w(" ",o.FormView.shortDescription," "),l(),S(o.FormView.longDescription?3:-1),l(),V("id","destination-",o.Name,"-",i,""),m("ngModel",o.Value()),l(),S(o.FormView.type==="Path"?5:6)}}function wn(t,n){if(t&1){let e=y();s(0,"spk-icon",23),f("click",function(){F(e);let i=p(2).$implicit;return g(i.showPassword=!i.showPassword)}),u(1," eye "),a()}}function Rn(t,n){if(t&1){let e=y();s(0,"spk-icon",23),f("click",function(){F(e);let i=p(2).$implicit;return g(i.showPassword=!i.showPassword)}),u(1," eye-slash "),a()}}function vn(t,n){if(t&1){let e=y();s(0,"spk-form-field")(1,"label",17),u(2),a(),s(3,"input",21),f("ngModelChange",function(i){F(e);let r=p().$implicit,c=p();return g(c.updateSettingValue(r,i))}),a(),s(4,"spk-icon",20),u(5,"password"),a(),d(6,wn,2,0,"spk-icon",22)(7,Rn,2,0,"spk-icon",22),a()}if(t&2){let e=p(),o=e.$implicit,i=e.$index;l(),V("for","destination-",o.Name,"-",i,""),l(),w(" ",o.FormView.shortDescription," "),l(),V("id","destination-",o.Name,"-",i,""),m("type",o.showPassword?"text":"password")("ngModel",o.Value()),l(3),S(o.showPassword?6:7)}}function bn(t,n){if(t&1&&(s(0,"spk-tooltip",18)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.FormView.longDescription)}}function Ln(t,n){if(t&1&&u(0),t&2){let e=n.$implicit;w(" ",e," ")}}function Gn(t,n){if(t&1){let e=y();s(0,"spk-select",24)(1,"label",17),u(2),d(3,bn,3,1,"spk-tooltip",18),a(),s(4,"input",19),f("ngModelChange",function(i){F(e);let r=p().$implicit,c=p();return g(c.updateSettingValue(r,i))}),a()(),d(5,Ln,1,1,"ng-template",null,1,ve)}if(t&2){let e=ee(6),o=p(),i=o.$implicit,r=o.$index;m("options",i.FormView.options)("isClearable",!1)("optionTemplate",e),l(),V("for","destination-",i.Name,"-",r,""),l(),w(" ",i.FormView.shortDescription," "),l(),S(i.FormView.longDescription?3:-1),l(),V("id","destination-",i.Name,"-",r,""),m("ngModel",i.Value())}}function Vn(t,n){if(t&1&&(s(0,"spk-tooltip",18)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.FormView.longDescription)}}function Un(t,n){if(t&1){let e=y();s(0,"div",14)(1,"label",17),u(2),d(3,Vn,3,1,"spk-tooltip",18),a(),s(4,"div",25)(5,"spk-form-field")(6,"input",26),f("ngModelChange",function(i){F(e);let r=p().$implicit,c=p();return g(c.updateSizeSetting(r,i,"size"))}),a(),s(7,"spk-icon",20),u(8,"resize"),a()(),s(9,"spk-select",27)(10,"input",28),f("ngModelChange",function(i){F(e);let r=p().$implicit,c=p();return g(c.updateSizeSetting(r,i,"unit"))}),a()()()()}if(t&2){let e=p(),o=e.$implicit,i=e.$index,r=p();l(),V("for","destination-",o.Name,"-",i,""),l(),w(" ",o.FormView.shortDescription," "),l(),S(o.FormView.longDescription?3:-1),l(3),V("id","destination-",o.Name,"-",i,""),m("ngModel",o.size()),l(3),m("options",r.sizeOptions())("isClearable",!1),l(),m("ngModel",o.unit())}}function Bn(t,n){if(t&1&&(s(0,"spk-tooltip",18)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.FormView.longDescription)}}function Kn(t,n){if(t&1){let e=y();s(0,"spk-form-field")(1,"label",17),u(2),d(3,Bn,3,1,"spk-tooltip",18),a(),s(4,"input",26),f("ngModelChange",function(i){F(e);let r=p().$implicit,c=p();return g(c.updateSettingValue(r,i))}),a(),s(5,"spk-icon",20),u(6,"numpad"),a()()}if(t&2){let e=p(),o=e.$implicit,i=e.$index;l(),V("for","destination-",o.Name,"-",i,""),l(),w(" ",o.FormView.shortDescription," "),l(),S(o.FormView.longDescription?3:-1),l(),V("id","destination-",o.Name,"-",i,""),m("ngModel",o.Value())}}function zn(t,n){if(t&1&&(s(0,"spk-tooltip",18)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.FormView.longDescription)}}function Xn(t,n){if(t&1){let e=y();s(0,"spk-toggle",15)(1,"label",17),u(2),d(3,zn,3,1,"spk-tooltip",18),a(),s(4,"input",29),f("ngModelChange",function(i){F(e);let r=p().$implicit,c=p();return g(c.updateSettingValue(r,i))}),a()()}if(t&2){let e=p(),o=e.$implicit,i=e.$index;l(),V("for","destination-",o.Name,"-",i,""),l(),w(" ",o.FormView.shortDescription," "),l(),S(o.FormView.longDescription?3:-1),l(),V("id","destination-",o.Name,"-",i,""),m("ngModel",o.Value())}}function Hn(t,n){if(t&1&&(s(0,"spk-tooltip",18)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.FormView.longDescription)}}function jn(t,n){if(t&1&&u(0),t&2){let e=n.$implicit;w(" ",e," ")}}function Wn(t,n){if(t&1){let e=y();s(0,"spk-select",30)(1,"label",17),u(2),d(3,Hn,3,1,"spk-tooltip",18),a(),s(4,"input",31),f("ngModelChange",function(i){F(e);let r=p().$implicit,c=p();return g(c.updateSettingValue(r,i))}),a()(),d(5,jn,1,1,"ng-template",null,2,ve)}if(t&2){let e=ee(6),o=p(),i=o.$implicit,r=o.$index;m("options",i.FormView.options)("selectMultiple",!0)("optionTemplate",e),l(),V("for","destination-",i.Name,"-",r,""),l(),w(" ",i.FormView.shortDescription," "),l(),S(i.FormView.longDescription?3:-1),l(),m("ngModel",i.Value())}}function qn(t,n){if(t&1&&(s(0,"spk-tooltip",18)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.FormView.longDescription)}}function Qn(t,n){if(t&1){let e=y();s(0,"spk-form-field")(1,"label",17),u(2),d(3,qn,3,1,"spk-tooltip",18),a(),s(4,"input",19),f("ngModelChange",function(i){F(e);let r=p().$implicit,c=p();return g(c.updateSettingValue(r,i))}),a()()}if(t&2){let e=p(),o=e.$implicit,i=e.$index;l(),V("for","destination-",o.Name,"-",i,""),l(),w(" ",o.FormView.shortDescription," "),l(),S(o.FormView.longDescription?3:-1),l(),V("id","destination-",o.Name,"-",i,""),m("ngModel",o.Value())}}function Yn(t,n){if(t&1){let e=y();s(0,"div",9),d(1,Nn,5,14,"app-file-tree",12)(2,kn,5,10,"app-file-tree",13)(3,Mn,7,10,"spk-form-field")(4,vn,8,10,"spk-form-field")(5,Gn,7,12)(6,Un,11,12,"div",14)(7,Kn,7,9,"spk-form-field")(8,Xn,5,9,"spk-toggle",15)(9,Wn,7,9)(10,Qn,5,9,"spk-form-field"),s(11,"button",16),f("click",function(){let i=F(e).$implicit,r=p();return g(r.removeSetting(i))}),s(12,"spk-icon"),u(13,"x-bold"),a()()()}if(t&2){let e=n.$implicit;l(),S(e.FormView.type==="FileTree"?1:e.FormView.type==="FolderTree"?2:e.FormView.type==="String"||e.FormView.type==="Path"||e.FormView.type==="Decimal"?3:e.FormView.type==="Password"?4:e.FormView.type==="Enumeration"?5:e.FormView.type==="Size"?6:e.FormView.type==="Integer"?7:e.FormView.type==="Boolean"?8:e.FormView.type==="Flags"?9:e.FormView.type==="Timespan"?10:-1)}}var Zn=["Bytes","KB","MB","GB","TB","PB"],Et=class t{#e=x(He);options=zt.required();hiddenOptions=nt([]);allOptionsGrouped=this.#e.allOptionsGrouped;selectedSettings=b(()=>{let n=this.hiddenOptions();return this.options().map(e=>{let o=this.allOptionsGrouped().flatMap(i=>i.options).find(i=>i.name===e.Name);if(o&&!n.includes(o.name)){if(o.type==="Size"){let c=e.Value?.replace(/[0-9]/g,""),C=e.Value?.replace(/[^0-9]/g,""),O=A(c&&c!==""?c:"MB"),E=A(C&&C!==""?parseInt(C):"");return lt(N({},e),{Value:b(()=>E()+O()),unit:O,size:E,FormView:o})}let i=e.Value??"";o.type==="Boolean"&&(i=i&&i.toLowerCase()==="true"||!1),o.type==="Integer"&&(i=parseInt(i)||0);let r=A(i);return lt(N({},e),{Value:r,FormView:o})}return null}).filter(Boolean)});nonSelectedOptionsGrouped=b(()=>{let n=this.options().map(o=>o.Name),e=this.hiddenOptions();return this.allOptionsGrouped().map(o=>lt(N({},o),{options:o.options.filter(i=>!n.includes(i.name)&&!e.includes(i.name))})).filter(o=>o.options.length>0)});sizeOptions=A(Zn);addSetting(n){this.options.update(e=>{let o=n.defaultValue??"";return n.type==="Boolean"&&(o=o.toLowerCase()==="true"||!1),n.type==="Integer"&&(o=parseInt(o)||0),[...e,{Name:n.name,Value:o}]})}updateSettingValue(n,e){this.options.update(o=>{let i=[...o],r=i.findIndex(c=>c.Name===n.Name);return n.FormView.type==="Boolean"?(i[r].Value=e?"True":"False",i):n.FormView.type==="Integer"?(i[r].Value=e.toString(),i):(i[r].Value=e,i)})}updateSizeSetting(n,e,o){let i=n;this.options.update(r=>{let c=[...r],C=c.findIndex(O=>O.Name===i.Name);return o==="size"&&(c[C].Value=`${e}${i.unit()}`),o==="unit"&&(c[C].Value=`${i.size()}${e}`),c})}removeSetting(n){this.options.update(e=>e.filter(o=>o.Name!==n.Name))}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=J({type:t,selectors:[["app-options-list"]],inputs:{options:[1,"options"],hiddenOptions:[1,"hiddenOptions"]},outputs:{options:"optionsChange"},decls:11,vars:2,consts:()=>{let n;n=$localize` Advanced options ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#4\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*8:1\uFFFD"}:START_BLOCK_FOR_1:${"\uFFFD#1:1\uFFFD"}:START_HEADING_LEVEL3:${"\uFFFD0:1\uFFFD"}:INTERPOLATION:${"\uFFFD/#1:1\uFFFD"}:CLOSE_HEADING_LEVEL3:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:2\uFFFD"}:START_TAG_BUTTON_1:${"\uFFFD0:2\uFFFD"}:INTERPOLATION_1:${"[\uFFFD/#4\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*3:2\uFFFD|\uFFFD/*8:1\uFFFD]"}:CLOSE_BLOCK_FOR:${"[\uFFFD/*3:2\uFFFD|\uFFFD/*8:1\uFFFD]"}:CLOSE_BLOCK_FOR:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_MENU:`,n=Ie(n);let e;return e=$localize`Select an item...`,[["option",""],["enumOptionTemplate",""],["optionTemplate",""],n,[3,"disallowToggle"],["title",""],[3,"searchable"],["spk-button","","type","button",1,"outlined","small"],["menu",""],[1,"field-row"],["type","button"],["type","button",3,"click"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[1,"form-column"],[1,"primary","raised"],["spk-button","","type","button",1,"outlined","remove-btn",3,"click"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"ngModelChange","id","ngModel"],["prefix",""],["autocomplete","off",3,"ngModelChange","type","id","ngModel"],["suffix","",1,"clickable"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[1,"form-row"],["type","number",3,"ngModelChange","id","ngModel"],["placeholder",e,3,"options","isClearable"],["type","text",3,"ngModelChange","ngModel"],["type","checkbox",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"ngModelChange","ngModel"]]},template:function(e,o){e&1&&(s(0,"spk-toggle-card",4),X(1,5),T(2,3),s(3,"spk-menu",6)(4,"button",7),_(5,"spk-icon"),a(),X(6,8),Q(7,Pn,4,1,null,null,q),H(),a(),h(),H(),Q(9,Yn,14,1,"div",9,q),a()),e&2&&(m("disallowToggle",!0),l(3),m("searchable",!0),l(4),Y(o.nonSelectedOptionsGrouped()),l(2),Y(o.selectedSettings()))},dependencies:[je,ie,Pe,Le,re,St,We,Qt,ne,he,Ft,Xe,te,oe,be],styles:["[_nghost-%COMP%]{display:block}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}spk-toggle[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-end}.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:3fr 1fr;gap:.5rem;align-items:flex-end}"],changeDetection:0})};var Jn=["formRef"],eo=()=>["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","no-encryption"];function to(t,n){t&1&&(T(0,2,1),_(1,"spk-icon",13),h())}function no(t,n){t&1&&(s(0,"p",13),I(1,7),a())}var Je=new ae,tn=["Bytes","KB","MB","GB","TB","PB"],oo=[{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`}],io=1024*1024*1024*2,ro=1024*1024*5,nn=(t={remoteVolumeSize:50,size:"MB",backupRetention:"",advancedOptions:[]})=>Je.group({remoteVolumeSize:Je.group({size:Je.control(t.remoteVolumeSize),unit:Je.control(t.size)}),backupRetention:Je.control(t.backupRetention),advancedOptions:Je.group({})}),Lt=class t{#e=x(ce);#t=x(pe);#o=x(Te);formRef=Ce.required("formRef");optionsForm=this.#e.optionsForm;selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;settings=this.#e.settings;sizeOptions=A(tn);retentionOptions=A(oo);volumeSizeSignal=U(this.optionsForm.controls.remoteVolumeSize.get("size")?.valueChanges.pipe(At(300))??Nt(null));volumeUnitSignal=U(this.optionsForm.controls.remoteVolumeSize.get("unit")?.valueChanges.pipe(At(300))??Nt(null));exceededVolumeSize=b(()=>{let n=this.volumeSizeSignal()??this.optionsForm.controls.remoteVolumeSize.get("size")?.value,e=this.volumeUnitSignal()??this.optionsForm.controls.remoteVolumeSize.get("unit")?.value;if(n==null||e===null||e===void 0)return!1;let o=n*Math.pow(1024,tn.indexOf(e));return o>io||o<ro});goBack(){this.#t.navigate(["schedule"],{relativeTo:this.#o.parent})}submit(){this.#e.submit()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=J({type:t,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,o){e&1&&Se(o.formRef,Jn,5),e&2&&fe()},decls:30,vars:12,consts:()=>{let n;n=$localize`Select an option...`;let e;e=$localize`Options`;let o;o=$localize` Remote volume size ${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/*9:1\uFFFD"}:CLOSE_BLOCK_IF:`;let i;i=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#16\uFFFD"}:START_LINK: Read more ${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-square-out${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#16\uFFFD"}:CLOSE_LINK:`;let r;r=$localize`Backup retention`;let c;c=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let C;C=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `;let O;return O=$localize` The chosen size is outside the recommended range. This may cause performance issues, excessively large temporary files or other problems. `,[["formRef",""],e,o,i,r,c,C,O,[3,"submit","formGroup"],[1,"title-30"],[1,"remote-volume-wrap"],["formGroupName","remoteVolumeSize",1,"row-inputs"],["for","size"],[1,"warning"],["type","number","id","size","formControlName","size"],["placeholder",n,3,"options","inlineSearch"],["type","text","formControlName","unit"],["href","https://forum.duplicati.com/t/choosing-sizes-in-duplicati/17683","target","_blank",1,"spk-primary"],["suffix",""],["value","value","label","name",3,"options","inlineSearch"],["type","text","formControlName","backupRetention"],[3,"optionsChange","options","hiddenOptions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,o){if(e&1){let i=y();s(0,"form",8,0),f("submit",function(){return F(i),g(o.submit())}),s(2,"h3",9),I(3,1),a(),s(4,"div",10)(5,"div",11)(6,"spk-form-field")(7,"label",12),T(8,2),d(9,to,2,0,"spk-icon",13),h(),a(),_(10,"input",14),a(),s(11,"spk-select",15),_(12,"input",16),a()(),d(13,no,2,0,"p",13),s(14,"p"),T(15,3),s(16,"a",17),_(17,"spk-icon",18),a(),h(),a()(),s(18,"spk-select",19)(19,"label",12),I(20,4),a(),_(21,"input",20),a(),s(22,"app-options-list",21),mt("optionsChange",function(c){return F(i),ct(o.settings,c)||(o.settings=c),g(c)}),a(),s(23,"div",22)(24,"button",23),f("click",function(){return F(i),g(o.goBack())}),T(25,5),_(26,"spk-icon"),h(),a(),s(27,"button",24),T(28,6),_(29,"spk-icon"),h(),a()()()}e&2&&(m("formGroup",o.optionsForm),l(9),S(o.exceededVolumeSize()?9:-1),l(2),m("options",o.sizeOptions())("inlineSearch",!0),l(2),S(o.exceededVolumeSize()?13:-1),l(5),m("options",o.retentionOptions())("inlineSearch",!0),l(4),pt("options",o.settings),m("hiddenOptions",ut(11,eo)),l(5),xe("loader",o.isSubmitting()))},dependencies:[Ae,ye,ie,Pe,re,Ee,Oe,Ne,Ge,Et,he,te,ne,oe],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 40px;align-items:flex-end}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};var ao=["formRef"];function so(t,n){if(t&1){let e=y();s(0,"div",26)(1,"spk-form-field")(2,"label",27),I(3,8),a(),s(4,"input",28,1),f("focus",function(){F(e);let i=ee(5);return g(i.showPicker())}),a(),s(6,"spk-icon",29),u(7,"clock"),a()(),s(8,"spk-form-field"),_(9,"label",30),s(10,"input",31,2),f("focus",function(){F(e);let i=ee(11);return g(i.showPicker())}),a(),s(12,"spk-icon",29),u(13,"calendar"),a()()(),X(14,32),s(15,"div",33)(16,"spk-form-field")(17,"label",34),I(18,9),a(),_(19,"input",35),a(),s(20,"spk-select",36),_(21,"input",37),a()(),s(22,"app-toggle-card",38),X(23,39),I(24,10),H(),s(25,"div",40)(26,"spk-toggle",21),T(27,11),_(28,"input",41),h(),a(),s(29,"spk-toggle",21),T(30,12),_(31,"input",42),h(),a(),s(32,"spk-toggle",21),T(33,13),_(34,"input",43),h(),a(),s(35,"spk-toggle",21),T(36,14),_(37,"input",44),h(),a(),s(38,"spk-toggle",21),T(39,15),_(40,"input",45),h(),a(),s(41,"spk-toggle",21),T(42,16),_(43,"input",46),h(),a(),s(44,"spk-toggle",21),T(45,17),_(46,"input",47),h(),a()()(),H()}if(t&2){let e=p();l(20),m("options",e.unitOptions)("isClearable",!1),l(2),m("disallowToggle",!0)}}var W=new ae,on=[{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`}],rn=(t={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}}})=>W.group({autoRun:W.control(t.autoRun),nextTime:W.group({time:W.control(t.nextTime.time),date:W.control(t.nextTime.date)}),runAgain:W.group({repeatValue:W.control(t.runAgain.repeatValue),repeatUnit:W.control(t.runAgain.repeatUnit),allowedDays:W.group({mon:W.control(t.runAgain.allowedDays.mon),tue:W.control(t.runAgain.allowedDays.tue),wed:W.control(t.runAgain.allowedDays.wed),thu:W.control(t.runAgain.allowedDays.thu),fri:W.control(t.runAgain.allowedDays.fri),sat:W.control(t.runAgain.allowedDays.sat),sun:W.control(t.runAgain.allowedDays.sun)})})}),Gt=class t{#e=x(ce);#t=x(pe);#o=x(Te);formRef=Ce.required("formRef");scheduleForm=this.#e.scheduleForm;scheduleFormSignal=this.#e.scheduleFormSignal;unitOptions=on;displayFn(n){let e=on.find(o=>o.key===n);return e?`${e.label}`:""}goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#o.parent})}next(){this.#t.navigate(["options"],{relativeTo:this.#o.parent})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=J({type:t,selectors:[["app-schedule"]],viewQuery:function(e,o){e&1&&Se(o.formRef,ao,5),e&2&&fe()},decls:18,vars:2,consts:()=>{let n;n=$localize`Schedule`;let e;e=$localize` Automatically run backups ${"\uFFFD#7\uFFFD\uFFFD/#7\uFFFD"}:TAG_INPUT:`;let o;o=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let r;r=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let c;c=$localize`Next time`;let C;C=$localize`Run again every`;let O;O=$localize`Allowed days`;let E;E=$localize` Monday ${"\uFFFD#28\uFFFD\uFFFD/#28\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Tuesday ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let z;z=$localize` Wednesday ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let $;$=$localize` Thursday ${"\uFFFD#37\uFFFD\uFFFD/#37\uFFFD"}:TAG_INPUT:`;let j;j=$localize` Friday ${"\uFFFD#40\uFFFD\uFFFD/#40\uFFFD"}:TAG_INPUT:`;let me;me=$localize` Saturday ${"\uFFFD#43\uFFFD\uFFFD/#43\uFFFD"}:TAG_INPUT:`;let Z;return Z=$localize` Sunday ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`,[["formRef",""],["timeRef",""],["dateRef",""],n,e,o,i,r,c,C,O,E,K,z,$,j,me,Z,[3,"submit","formGroup"],[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox","formControlName","autoRun"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["formGroupName","nextTime",1,"row-inputs"],["for","time"],["type","time","id","time","formControlName","time",3,"focus"],["suffix",""],["for","date"],["type","date","id","date","formControlName","date",3,"focus"],["formGroupName","runAgain"],[1,"row-inputs"],["for","repeatValue"],["type","number","id","repeatValue","formControlName","repeatValue"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit","formControlName","repeatUnit"],["formGroupName","allowedDays",3,"disallowToggle"],["title",""],[1,"days-wrap"],["type","checkbox","formControlName","mon"],["type","checkbox","formControlName","tue"],["type","checkbox","formControlName","wed"],["type","checkbox","formControlName","thu"],["type","checkbox","formControlName","fri"],["type","checkbox","formControlName","sat"],["type","checkbox","formControlName","sun"]]},template:function(e,o){if(e&1){let i=y();s(0,"form",18,0),f("submit",function(){return F(i),g(o.next())}),s(2,"h3",19),I(3,3),a(),s(4,"div",20)(5,"spk-toggle",21),T(6,4),_(7,"input",22),h(),a(),s(8,"p"),I(9,5),a()(),d(10,so,47,3),s(11,"div",23)(12,"button",24),f("click",function(){return F(i),g(o.goBack())}),T(13,6),_(14,"spk-icon"),h(),a(),s(15,"button",25),T(16,7),_(17,"spk-icon"),h(),a()()()}if(e&2){let i;m("formGroup",o.scheduleForm),l(10),S((i=o.scheduleFormSignal())!=null&&i.autoRun?10:-1)}},dependencies:[Ae,ye,ie,Pe,Le,re,Ee,Oe,Ne,Ge,ne,be,te,he,oe,qe],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 lo(t,n){if(t&1){let e=y();s(0,"spk-select",0)(1,"input",4),f("ngModelChange",function(i){F(e);let r=p(2);return g(r.updateStateExpression(i))}),a()()}if(t&2){let e,o=p(2);m("options",o.fileGroupOptions())("isClearable",!1),l(),m("ngModel",(e=o.pathState())==null?null:e.expression)}}function po(t,n){if(t&1){let e=y();s(0,"spk-form-field")(1,"input",4),f("ngModelChange",function(i){F(e);let r=p(2);return g(r.updateStateExpression(i))}),a()()}if(t&2){let e,o=p(2);l(),m("ngModel",(e=o.pathState())==null?null:e.expression)}}function co(t,n){if(t&1){let e=y();s(0,"spk-select",0)(1,"input",1),f("ngModelChange",function(i){F(e);let r=p();return g(r.updateStateType(i))}),a()(),d(2,lo,2,3,"spk-select",0)(3,po,2,1,"spk-form-field"),s(4,"div",2),f("click",function(){F(e);let i=p();return g(i.removeFilter())}),s(5,"spk-icon",3),u(6,"x-circle"),a()()}if(t&2){let e,o,i=p();m("options",i.expressionOptions())("isClearable",!1),l(),m("ngModel",(e=i.pathState())==null?null:e.type),l(),S(((o=i.pathState())==null?null:o.type)==="-FileGroup"||((o=i.pathState())==null?null:o.type)==="+FileGroup"?2:3)}}var an=[{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"}],mo=[{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"}],yt=class t{path=nt.required();osType=nt();pathChange=kt();remove=kt();expressionOptions=A(an);fileGroupOptions=A(mo);pathState=A(null);typeState=b(()=>{let n=this.pathState();return n?n.type:null});pathEffect=_t(()=>{let n=this.path(),e=n.slice(1),o=n.startsWith("-")?"-":"+",i=this.osType()==="Windows",r=i?"\\":"/",c=e.startsWith("%");return e===""?this.pathState.set({type:"-Unknown",path:"___none___",expression:""}):c&&e.endsWith(r)||i&&e.slice(2).startsWith("\\")&&e.endsWith("\\")||e.startsWith(r)&&e.endsWith(r)?this.pathState.set({type:`${o}Folder`,path:e,expression:e}):e.startsWith("*")&&e.endsWith(`*${r}`)?this.pathState.set({type:`${o}FolderNameIncludes`,path:e,expression:e.slice(1,-2)}):e.startsWith("[.*")&&e.endsWith(`[^\\${r}]*]`)?this.pathState.set({type:`${o}FileNameIncludes`,path:e,expression:e.slice(3,-7)}):e.startsWith("{")&&e.endsWith("}")?this.pathState.set({type:`${o}FileGroup`,path:e,expression:e.slice(1,-1)}):e.startsWith("[")&&e.endsWith("]")?this.pathState.set({type:`${o}Regex`,path:e,expression:e.slice(1,-1)}):e.startsWith("*.")?this.pathState.set({type:`${o}Extension`,path:e,expression:e.slice(2)}):this.pathState.set({type:`${o}Expression`,path:e,expression:e})});updateStateType(n){this.pathState.update(e=>(e.type=n,e.path=this.#t(e),e)),this.#e()}updateStateExpression(n){this.pathState.update(e=>(e.expression=n,e.path=this.#t(e),e)),this.#e()}#e(){setTimeout(()=>this.pathChange.emit(this.pathState().path))}#t(n){let e=n.type.slice(0,1),o=n.type.slice(1),i=this.osType()==="Windows",r=i?"\\":"/",C=i&&!n.expression.startsWith("%")?n.expression.slice(2):n.expression,O=n.path.startsWith("%");if(o==="Unknown")return`${e}${n.expression}`;if(o==="Folder"){let E=O||C.startsWith(r),K=C.endsWith(r);return K&&E?`${e}${n.expression}`:K?`${e}${n.expression}${r}`:E?`${e}${r}${n.expression}`:`${e}${r}${n.expression}${r}`}return o==="FolderNameIncludes"?`${e}*${n.expression}*${r}`:o==="FileNameIncludes"?`${e}[.*${n.expression}[^\\${r}]*]`:o==="FileGroup"?`${e}{${n.expression}}`:o==="Regex"?`${e}[${n.expression}]`:o==="Extension"?`${e}*.${n.expression}`:`${e}${n.expression}`}removeFilter(){this.remove.emit()}displayFn(n){let e=an.find(o=>o.value===n);return e?e.key:""}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=J({type:t,selectors:[["app-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:1,vars:1,consts:()=>{let n;return n=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",n,3,"ngModelChange","ngModel"],[1,"filter-removal",3,"click"],[1,"spk-primary"],["type","text",3,"ngModelChange","ngModel"]]},template:function(e,o){e&1&&d(0,co,7,4),e&2&&S(o.pathState()?0:-1)},dependencies:[je,ie,re,St,te,ne,oe],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 uo=["formRef"];function _o(t,n){if(t&1){let e=y();s(0,"app-filter",42),f("pathChange",function(i){let r=F(e).$index,c=p(2);return g(c.patchPathAt(i,r))})("remove",function(){let i=F(e).$index,r=p(2);return g(r.removePathAt(i))}),a()}if(t&2){let e,o=n.$implicit,i=p(2);m("path",o)("osType",(e=i.osType())!==null&&e!==void 0?e:"")}}function Fo(t,n){if(t&1&&Q(0,_o,1,2,"app-filter",41,q),t&2){let e=p();Y(e.pathArray())}}function go(t,n){if(t&1&&(s(0,"div",40)(1,"spk-form-field"),_(2,"input",43),a(),s(3,"spk-select",44),_(4,"input",45),a()()),t&2){let e=p();l(3),m("options",e.sizeOptions())("isClearable",!1)}}var we=new ae,Co=["Bytes","KB","MB","GB","TB","PB"],sn=(t={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>we.group({path:we.control(t.path),excludes:we.group({hidden:we.control(t.excludes.hidden),system:we.control(t.excludes.system),temporary:we.control(t.excludes.temporary),filesLargerThan:we.group({size:we.control(null),unit:we.control(null)})})}),Vt=class t{#e=x(ce);#t=x(pe);#o=x(Te);formRef=Ce.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new Ct("");filesLargerThan=b(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=A(Co);osType=this.#e.osType;pathSignal=U(this.sourceDataForm.controls.path.valueChanges);pathArray=b(()=>this.pathSignal()?.split("\0").filter(n=>n.startsWith("-")||n.startsWith("+")||n==="___none___")??[]);addFilter(n="-*"){let e=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${e}\0${n}`)}patchPathAt(n,e){let i=this.sourceDataForm.controls.path.value.split("\0").filter(c=>!c.startsWith("-")&&!c.startsWith("+")).join("\0"),r=this.pathArray().map((c,C)=>C===e?`${n}`:`${c}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${r}`)}removePathAt(n){let o=this.sourceDataForm.controls.path.value.split("\0").filter(r=>!r.startsWith("-")&&!r.startsWith("+")).join("\0"),i=this.pathArray().filter((r,c)=>c!==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(e){return new(e||t)};static \u0275cmp=J({type:t,selectors:[["app-source-data"]],viewQuery:function(e,o){e&1&&Se(o.formRef,uo,5),e&2&&fe()},decls:55,vars:12,consts:()=>{let n;n=$localize`Path`;let e;e=$localize`Add a direct path`;let o;o=$localize`Hidden files`;let i;i=$localize`System files`;let r;r=$localize`Temporary files`;let c;c=$localize`Source Data`;let C;C=$localize`Folder path`;let O;O=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let E;E=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let K;K=$localize`Source Data`;let z;z=$localize`Add Path`;let $;$=$localize`Add a path directly from your machine.`;let j;j=$localize`Filters`;let me;me=$localize`Customize your filters.`;let Z;Z=$localize`Add filter`;let P;P=$localize`Exclude`;let k;k=$localize`Choose if there’s any files you want to exclude.`;let G;G=$localize` Hidden files ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`;let M;M=$localize` System files ${"\uFFFD#48\uFFFD\uFFFD/#48\uFFFD"}:TAG_INPUT:`;let le;le=$localize` Temporary files ${"\uFFFD#51\uFFFD\uFFFD/#51\uFFFD"}:TAG_INPUT:`;let Fe;Fe=$localize` Files larger than `;let ue;return ue=$localize`Select an option...`,[["formRef",""],c,C,O,E,K,z,$,j,me,Z,P,k,G,M,le,Fe,[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",e,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",o,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",r,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],["type","number","formControlName","size"],[3,"options","isClearable"],["type","text","formControlName","unit","placeholder",ue]]},template:function(e,o){if(e&1){let i=y();s(0,"form",17,0),f("submit",function(){return F(i),g(o.next())}),s(2,"div",18)(3,"h3",19),I(4,1),a(),s(5,"app-file-tree",20)(6,"label",21),I(7,2),a(),_(8,"input",22),a(),s(9,"div",23)(10,"button",24),f("click",function(){return F(i),g(o.goBack())}),T(11,3),_(12,"spk-icon"),h(),a(),s(13,"button",25),T(14,4),_(15,"spk-icon"),h(),a()()(),s(16,"div",26)(17,"h3",19),I(18,5),a(),s(19,"app-toggle-card",27),X(20,28),I(21,6),H(),s(22,"p",29),I(23,7),a(),s(24,"div",30)(25,"spk-form-field"),_(26,"input",31),a(),s(27,"button",32),f("click",function(){return F(i),g(o.addNewPath())}),s(28,"spk-icon"),u(29,"plus"),a()()()(),s(30,"app-toggle-card",27),X(31,28),I(32,8),H(),s(33,"p",29),I(34,9),a(),s(35,"button",33),f("click",function(){return F(i),g(o.addFilter())}),I(36,10),a(),d(37,Fo,2,0),a(),s(38,"app-toggle-card",34),X(39,28),I(40,11),H(),s(41,"p",29),I(42,12),a(),s(43,"spk-toggle",35),T(44,13),_(45,"input",36),h(),a(),s(46,"spk-toggle",35),T(47,14),_(48,"input",37),h(),a(),s(49,"spk-toggle",35),T(50,15),_(51,"input",38),h(),a(),s(52,"spk-toggle",39),f("click",function(){return F(i),g(o.toggleFilesLargerThan())}),I(53,16),a(),d(54,go,5,2,"div",40),a()()()}if(e&2){let i;m("formGroup",o.sourceDataForm),l(5),m("multiSelect",!0)("startingPath",o.getPath())("showFiles",!0),l(14),m("disallowToggle",!0),l(7),m("formControl",o.newPathCtrl),l(4),m("disallowToggle",!0),l(7),S((i=o.pathSignal())!=null&&i.length?37:-1),l(),m("disallowToggle",!0),l(14),xe("active",o.filesLargerThan()),l(2),S(o.filesLargerThan()?54:-1)}},dependencies:[je,ye,ie,Pe,Le,re,Ee,Ae,ft,Oe,Ne,Ge,ne,te,he,be,oe,We,qe,yt],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 de=new ae,ce=class t{#e=x(pe);#t=x(He);#o=x(ze);#i=x(Tt);generalForm=en();sourceDataForm=sn();scheduleForm=rn();destinationForm=ln();optionsForm=nn();settings=A([]);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??[],e=this.selectedAdvancedFormPair()??[];return n.filter(o=>e.findIndex(i=>i.name===o.name)===-1)});selectedHttpOptions=A([]);notSelectedHttpOptions=b(()=>{let n=this.httpOptions(),e=this.selectedHttpOptions()??[];return n.filter(o=>e.findIndex(i=>i.name===o.name)===-1)});sourceDataFormSignal=U(this.sourceDataForm.valueChanges);destinationFormSignal=U(this.destinationForm.valueChanges);generalFormSignal=U(this.generalForm.valueChanges);encryptionFieldSignal=U(this.generalForm.controls.encryption.valueChanges);scheduleFormSignal=U(this.scheduleForm.valueChanges);destinationOptions=b(()=>this.#t.backendModules()??[]);httpOptions=b(()=>this.#t.systemInfo()?.GenericModules?.find(n=>n.Key==="http-options")?.Options?.map(this.#n)??[]);advancedOptions=b(()=>this.#t.systemInfo()?.Options?.map(this.#n)??[]);#n(n){return{name:n.Name,type:n.Type,shortDescription:n.ShortDescription??void 0,longDescription:n.LongDescription??void 0,options:n.ValidValues}}encryptionOptions=b(()=>{let n=this.#t.systemInfo()?.EncryptionModules??[];return[bt,...n]});nonSelectedOptions=b(()=>this.advancedOptions().sort((n,e)=>n?.name&&e?.name?n?.name.localeCompare(e?.name):0).filter(n=>this.selectedOptions()?.findIndex(e=>e.name===n.name)===-1));addAdvancedFormPairByName(n,e,o){let i=this.notSelectedAdvancedFormPair().find(r=>r.name===n);i&&this.addAdvancedFormPair(i,e,o)}addHttpOptionByName(n,e,o){let i=this.notSelectedHttpOptions().find(r=>r.name===n);i&&this.addHttpOption(i,e,o)}addAdvancedFormPair(n,e,o){let i=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,r=o??n.defaultValue;this.createFormField(i,n,r),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),n])}addHttpOption(n,e,o){let i=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,r=o??n.defaultValue;this.createFormField(i,n,r),this.selectedHttpOptions.set([...this.selectedHttpOptions(),n])}removeAdvancedFormPair(n,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(n.name),this.selectedAdvancedFormPair().findIndex(i=>i.name===n.name)!==-1?this.selectedAdvancedFormPair.update(i=>(i=i.filter(r=>r.name!==n.name),i)):this.selectedHttpOptions.update(i=>(i=i.filter(r=>r.name!==n.name),i))}removeHttpOption(n,e){this.destinationForm.controls.destinations.controls.at(e)?.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(),e=this.backupId();e==="new"||!e||this.isDraft()?this.#o.postApiV1Backups({requestBody:n}).pipe(tt(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{this.exit()},error:o=>{}}):this.#o.putApiV1BackupById({id:e,requestBody:n}).pipe(tt(()=>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 e=n.Sources??"",o=n.Filters?.map(E=>`${E.Include?"":"-"}${E.Expression}`)??[],i=n.Settings?.find(E=>E.Name==="--exclude-files-attributes")?.Value??"",r=n.Settings?.find(E=>E.Name==="--skip-files-larger-than")??null,c=r?.Value.replace(/[0-9]/g,"")??null,C=r?.Value.replace(/[^0-9]/g,"")??null,O={path:[...e,...o].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:c&&C?{size:parseInt(C),unit:c.toUpperCase()}:null}};this.sourceDataForm.patchValue(O)}mapDestinationToForm(n){let e=n.TargetURL?Rt(n.TargetURL):null;e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}#s(n){let e=Rt(n);e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}mapGeneralToForm(n){let e=n.Settings?.find(r=>r.Name==="encryption-module"),o=e?.Value&&e.Value.length?e.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 e=this.#i.fromString(n.Repeat)??null,i={nextTime:this.#p(n.Time),runAgain:{repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:n.AllowedDays?.includes("mon")??!1,tue:n.AllowedDays?.includes("tue")??!1,wed:n.AllowedDays?.includes("wed")??!1,thu:n.AllowedDays?.includes("thu")??!1,fri:n.AllowedDays?.includes("fri")??!1,sat:n.AllowedDays?.includes("sat")??!1,sun:n.AllowedDays?.includes("sun")??!1}}};this.scheduleForm.patchValue(i)}mapOptionsToForms(n){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than"],o=n.Settings?.filter(i=>![...e,"dblock-size"].includes(i.Name));this.settings.set(o??[]),o?.forEach(i=>{if(i.Name==="encryption-module")return this.generalForm.controls.encryption.setValue(i.Value??"");if(i.Name==="dblock-size"){let r=i.Value?.replace(/[^0-9]/g,""),c=i.Value?.replace(/[0-9]/g,"");return this.optionsForm.controls.remoteVolumeSize.setValue({size:r?parseInt(r):null,unit:c?c.toUpperCase():null})}})}getCurrentTargetUrl(){return this.#a(this.destinationForm.controls.destinations)}#l(){let n=this.generalForm.value,e=this.scheduleForm.value,o=this.sourceDataForm.value,r=this.destinationForm.value.destinations?.length?this.#a(this.destinationForm.controls.destinations):[],c=null;e.runAgain?.repeatUnit&&e.runAgain?.repeatValue&&(c=this.#i.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let C=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([$,j])=>j).map(([$,j])=>$):[],O=o.path?.split("\0")??[],E=this.mapFormsToSettings(),K=Object.entries(o.excludes??{}).filter(([$,j])=>j&&$!=="filesLargerThan").map(([$])=>$),z=o.excludes?.filesLargerThan;return K.length&&E.push({Name:"--exclude-files-attributes",Value:K.join(",")}),z&&z.size!==null&&z.unit!==null&&E.push({Name:"--skip-files-larger-than",Value:`${z.size}${z.unit}`}),{Backup:{Name:n.name,Description:n.description,TargetURL:r[0]??null,Sources:O.filter($=>!$.startsWith("-")),Settings:E,Filters:O.filter($=>$.startsWith("-")).map(($,j)=>({Order:j,Include:!1,Expression:$.slice(1)}))},Schedule:e.autoRun?{Repeat:c,Time:e.nextTime?.date?new Date(`${e.nextTime.date}T${e.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:C}:null}}mapFormsToSettings(){let n=this.optionsForm.value,e=this.generalForm.value,o=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than"],i=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&(i=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let r=n.remoteVolumeSize?.size?{Name:"dblock-size",Value:`${n.remoteVolumeSize.size}${n.remoteVolumeSize.unit.toLowerCase()}`}:{Name:"dblock-size",Value:"50mb"},c=this.settings().filter(C=>!o.includes(C.Name)).map(C=>{let O=C.Value;return typeof C.Value=="number"&&(O=C.Value.toString()),typeof C.Value=="boolean"&&(O=C.Value?"True":"False"),{Name:C.Name,Value:O}});return[...i,r,...c]}#a(n){return n.controls.map(e=>ht(e.value))}#p(n){if(!n||n?.indexOf("T")===-1)return{time:n??"13:00"};let e=new Date(n),o={time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`};return n.indexOf("T")!==-1&&(o.date=e.toISOString().split("T")[0]),o}removeOptionFromFormGroup(n){let e=n.name;e&&(this.optionsForm.controls.advancedOptions.removeControl(e),this.selectedOptions.update(o=>(o=o.filter(i=>i.name!==e),o)))}addOptionToFormGroup(n,e){let o=this.optionsForm.controls.advancedOptions;this.createFormField(o,n,e??n.defaultValue),this.selectedOptions.update(i=>(i.push(n),i))}addFreeTextOption(n,e,o){let i=this.optionsForm.controls.advancedOptions,r=N({name:n,type:"String",defaultValue:e},o);this.createFormField(i,r,e),this.selectedOptions.update(c=>(c.push(r),c))}createFormField(n,e,o){if(e.type==="String"||e.type==="FileTree"||e.type==="FolderTree"||e.type==="Password"||e.type==="Enumeration"||e.type==="NonValidatedSelectableString"||e.type==="Path"){n.addControl(e.name,de.control(o));return}if(e.type==="Size"){let i=(o??"").replace(/[0-9]/g,""),r=(o??"").replace(/[^0-9]/g,"");n.addControl(e.name,de.group({size:de.control(r?parseInt(r):50),unit:de.control(i?i.toUpperCase():"MB")}));return}if(e.type==="Integer"){n.addControl(e.name,de.control(o?parseInt(o):0));return}if(e.type==="Boolean"){n.addControl(e.name,de.control(o==="true"||o==="True"));return}if(e.type==="Flags"){n.addControl(e.name,de.control(o??""));return}if(e.type==="Timespan"){n.addControl(e.name,de.control(o,[De.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(n,e,o=!1){let i=Me.find(P=>P.customKey===n||P.key===n),r=i?.key,c=this.destinationOptions().find(P=>P.Key===r),C=this.httpOptions();if(!c||!c.Options)return;let O=i&&i.oauthField?i.oauthField:null,E=i&&i.customFields?i.customFields:{},K=i&&i.dynamicFields?i.dynamicFields:[],z=i&&i.advancedFields?i.advancedFields:[],$=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:O,custom:[],dynamic:[],advanced:[]});let j=de.group({}),me=de.group({}),Z=de.group({});E&&Object.entries(E).forEach(([P,k],G)=>{let Fe=k,{formElement:M}=Fe,le=Bt(Fe,["formElement"]);j.addControl(P,M(e?.custom[P])),this.destinationFormPair.update(ue=>(ue.custom.push(N({order:900+G},le)),ue))});for(let P=0;P<c.Options.length;P++){let k=c.Options[P];if(k.Deprecated)continue;let G=K.find(M=>M===k.Name||M.name===k.Name);if(G){let M=G&&typeof G!="string",le=M?G?.defaultValue??k.DefaultValue:k.DefaultValue,Fe={name:k.Name,type:k.Type,shortDescription:k.ShortDescription??void 0,longDescription:k.LongDescription??void 0,options:k.ValidValues,order:900+P},ue=M?N(N({},Fe),G):Fe,st=e?.dynamic[k.Name]??le??k.DefaultValue;this.createFormField(me,ue,st),this.destinationFormPair.update(Ue=>(Ue.dynamic.push(ue),Ue))}else{if($.find(ge=>ge===k.Name))continue;let le=z.find(ge=>ge===k.Name||ge.name===k.Name),Fe=le&&typeof le!="string",ue=e?.advanced[k.Name],L=ue??k.DefaultValue,st={name:k.Name,type:k.Type,shortDescription:k.ShortDescription??void 0,longDescription:k.LongDescription??void 0,options:k.ValidValues,defaultValue:L,order:900+P},Ue=Fe?N(N({},st),le):st;o&&ue&&(this.createFormField(Z,Ue,L),this.selectedAdvancedFormPair.update(ge=>(ge.push(Ue),ge))),this.destinationFormPair.update(ge=>(ge.advanced.push(Ue),ge))}}for(let P=0;P<C.length;P++){let k=C[P],G=e?.advanced[k.name],M=G??k.defaultValue;o&&G&&(this.createFormField(Z,k,M),this.selectedHttpOptions.update(le=>(le.push(k),le)))}this.destinationFormPair.update(P=>({oauthField:P.oauthField,custom:P.custom.sort((k,G)=>k.order-G.order),dynamic:P.dynamic.sort((k,G)=>k.order-G.order),advanced:P.advanced.sort((k,G)=>k.order-G.order)})),this.destinationForm.controls.destinations.push(pn({key:i?.customKey??n,customGroup:j,dynamicGroup:me,advancedGroup:Z}))}#c(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=Re({token:t,factory:t.\u0275fac,providedIn:"root"})};var So=["formRef"],fo=(t,n,e,o)=>({index:t,formView:n,formGroupName:"custom",destinationType:e,oauthField:o}),Ot=t=>({$implicit:t}),To=(t,n,e,o)=>({index:t,formView:n,formGroupName:"dynamic",destinationType:e,oauthField:o}),ho=(t,n,e,o)=>({index:t,formView:n,formGroupName:"advanced",destinationType:e,oauthField:o}),Do=(t,n,e,o)=>({index:t,formView:n,formGroupName:"advanced",asHttpOptions:!0,destinationType:e,oauthField:o}),Eo=()=>({maxWidth:"700px",width:"100%"});function yo(t,n){t&1&&(T(0,5,2),_(1,"spk-icon"),h())}function Po(t,n){t&1&&I(0,5,3)}function Oo(t,n){if(t&1){let e=y();T(0,5,1),s(1,"button",21),f("click",function(){F(e);let i=p();return g(i.testDestination())}),d(2,yo,2,0)(3,Po,1,0),a(),h()}if(t&2){let e=p();l(),xe("success",e.successfulTest()),l(),S(e.successfulTest()?2:3)}}function No(t,n){if(t&1){let e=y();s(0,"p",27),f("click",function(){F(e);let i=p();return g(i.removeDestinationFormGroup(i.destinationCount()-1))}),T(1,8),_(2,"span",28),h(),a()}}function Ao(t,n){if(t&1){let e=y();s(0,"div",34),f("click",function(){let i=F(e).$implicit,r=p(2);return g(r.addDestinationFormGroup(i.key))}),s(1,"h3"),u(2),a(),s(3,"p"),u(4),a()()}if(t&2){let e=n.$implicit;l(2),$t(e.displayName),l(2),$t(e.description)}}function ko(t,n){if(t&1){let e=y();s(0,"button",35,1),f("click",function(){let i=F(e).$implicit,r=p(2);return g(r.addDestinationFormGroup(i.key))}),u(2),a()}if(t&2){let e=n.$implicit;l(2),w(" ",e.displayName," ")}}function $o(t,n){if(t&1&&(s(0,"div",29),Q(1,Ao,5,2,"div",30,q),a(),s(3,"spk-menu",31)(4,"button",32),I(5,9),a(),X(6,20),Q(7,ko,3,1,"button",33,q),H(),a()),t&2){let e=p();l(),Y(e.destinationTypeOptionsFocused()),l(2),m("searchable",!0),l(4),Y(e.destinationTypeOptionsNotFocused())}}function xo(t,n){t&1&&ot(0)}function Io(t,n){if(t&1&&d(0,xo,1,0,"ng-container",40),t&2){let e,o=n.$implicit,i=n.$index;p();let r=ee(29),c=p();m("ngTemplateOutlet",r)("ngTemplateOutletContext",it(7,Ot,rt(2,fo,i,o,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function Mo(t,n){t&1&&ot(0)}function wo(t,n){if(t&1&&d(0,Mo,1,0,"ng-container",40),t&2){let e,o=n.$implicit,i=n.$index;p();let r=ee(29),c=p();m("ngTemplateOutlet",r)("ngTemplateOutletContext",it(7,Ot,rt(2,To,i,o,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function Ro(t,n){if(t&1){let e=y();T(0,10,1),s(1,"button",35,1),f("click",function(){let i=F(e).$implicit,r=p(2);return g(r.addAdvancedFormPair(i,0))}),a(),h()}if(t&2){let e=n.$implicit;l(),Be(e.name),Ke(0)}}function vo(t,n){t&1&&ot(0)}function bo(t,n){if(t&1&&d(0,vo,1,0,"ng-container",40),t&2){let e,o=n.$implicit,i=n.$index;p();let r=ee(29),c=p();m("ngTemplateOutlet",r)("ngTemplateOutletContext",it(7,Ot,rt(2,ho,i,o,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function Lo(t,n){if(t&1){let e=y();T(0,11,1),s(1,"button",35,1),f("click",function(){let i=F(e).$implicit,r=p(2);return g(r.addHttpOption(i,0))}),a(),h()}if(t&2){let e=n.$implicit;l(),Be(e.name),Ke(0)}}function Go(t,n){t&1&&ot(0)}function Vo(t,n){if(t&1&&d(0,Go,1,0,"ng-container",40),t&2){let e,o=n.$implicit,i=n.$index;p();let r=ee(29),c=p();m("ngTemplateOutlet",r)("ngTemplateOutletContext",it(7,Ot,rt(2,Do,i,o,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function Uo(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.formView.longDescription)}}function Bo(t,n){if(t&1&&(s(0,"app-file-tree",43)(1,"label",47),u(2),d(3,Uo,3,1,"spk-tooltip",48),a(),_(4,"input",49),a()),t&2){let e,o=p().$implicit,i=p(2);m("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name))("accepts",o.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),B("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),w(" ",(e=o.formView.shortDescription)!==null&&e!==void 0?e:o.formView.name," "),l(),S(o.formView.longDescription?3:-1),l(),B("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),_e("formControlName",o.formView.name)}}function Ko(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.formView.longDescription)}}function zo(t,n){if(t&1&&(s(0,"app-file-tree",44)(1,"label",47),u(2),d(3,Ko,3,1,"spk-tooltip",48),a(),_(4,"input",49),a()),t&2){let e,o=p().$implicit,i=p(2);m("hideShortcuts",!0)("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name)),l(),B("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),w(" ",(e=o.formView.shortDescription)!==null&&e!==void 0?e:o.formView.name," "),l(),S(o.formView.longDescription?3:-1),l(),B("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),_e("formControlName",o.formView.name)}}function Xo(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.formView.longDescription)}}function Ho(t,n){t&1&&(s(0,"spk-icon",51),u(1,"link"),a())}function jo(t,n){t&1&&(s(0,"spk-icon",51),u(1,"envelope"),a())}function Wo(t,n){t&1&&(s(0,"spk-icon",51),u(1,"textbox"),a())}function qo(t,n){if(t&1&&(s(0,"spk-form-field")(1,"label",47),u(2),d(3,Xo,3,1,"spk-tooltip",48),a(),_(4,"input",50),d(5,Ho,2,0,"spk-icon",51)(6,jo,2,0,"spk-icon",51)(7,Wo,2,0,"spk-icon",51),a()),t&2){let e,o=p().$implicit;l(),B("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),w(" ",(e=o.formView.shortDescription)!==null&&e!==void 0?e:o.formView.name," "),l(),S(o.formView.longDescription?3:-1),l(),B("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),_e("formControlName",o.formView.name),m("type",o.formView.type==="Email"?"email":"text"),l(),S(o.formView.type==="Path"?5:o.formView.type==="Email"?6:7)}}function Qo(t,n){if(t&1){let e=y();s(0,"span",55),f("click",function(){F(e);let i=p(2).$implicit,r=p(2);return g(r.oauthStartTokenCreation(i.destinationType))}),u(1,"AuthID"),a()}}function Yo(t,n){t&1&&(s(0,"spk-icon",51),u(1,"password"),a())}function Zo(t,n){if(t&1){let e=y();s(0,"spk-icon",56),f("click",function(){F(e);let i=p(2).$implicit;return g(i.formView.showPassword=!i.formView.showPassword)}),u(1," eye "),a()}}function Jo(t,n){if(t&1){let e=y();s(0,"spk-icon",56),f("click",function(){F(e);let i=p(2).$implicit;return g(i.formView.showPassword=!i.formView.showPassword)}),u(1," eye-slash "),a()}}function ei(t,n){if(t&1&&(s(0,"spk-form-field")(1,"label",47),u(2),a(),_(3,"input",52),d(4,Qo,2,0,"span",53)(5,Yo,2,0,"spk-icon",51)(6,Zo,2,0,"spk-icon",54)(7,Jo,2,0,"spk-icon",54),a()),t&2){let e,o=p().$implicit;l(),B("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),w(" ",(e=o.formView.shortDescription)!==null&&e!==void 0?e:o.formView.name," "),l(),B("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),_e("formControlName",o.formView.name),m("type",o.formView.showPassword?"text":"password"),l(),S(o.oauthField===o.formView.name?4:5),l(2),S(o.formView.showPassword?6:7)}}function ti(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(3).$implicit;m("message",e.formView.longDescription)}}function ni(t,n){if(t&1&&u(0),t&2){let e=n.$implicit;w(" ",e," ")}}function oi(t,n){if(t&1&&(s(0,"spk-select",57)(1,"label",47),u(2),d(3,ti,3,1,"spk-tooltip",48),a(),_(4,"input",49),a(),d(5,ni,1,1,"ng-template",null,3,ve)),t&2){let e,o=ee(6);p();let i=Mt(0),r=p().$implicit;m("options",i)("isClearable",!1)("optionTemplate",o),l(),B("for","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),l(),w(" ",(e=r.formView.shortDescription)!==null&&e!==void 0?e:r.formView.name," "),l(),S(r.formView.longDescription?3:-1),l(),B("id","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),_e("formControlName",r.formView.name)}}function ii(t,n){if(t&1&&(xt(0),d(1,oi,7,14)),t&2){let e=p().$implicit,o=It(e.formView.loadOptions?e.formView.loadOptions(p(2).injector)():e.formView.options);l(),S(o?1:-1)}}function ri(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(3).$implicit;m("message",e.formView.longDescription)}}function ai(t,n){if(t&1&&u(0),t&2){let e=n.$implicit;Xt(" ",e.key," ",e.value?"("+e.value+")":""," ")}}function si(t,n){if(t&1&&(s(0,"spk-select",59)(1,"label",47),u(2),d(3,ri,3,1,"spk-tooltip",48),a(),_(4,"input",49),a(),d(5,ai,1,2,"ng-template",null,4,ve)),t&2){let e,o=ee(6);p();let i=Mt(0),r=p().$implicit;m("options",i)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",o),l(),B("for","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),l(),w(" ",(e=r.formView.shortDescription)!==null&&e!==void 0?e:r.formView.name," "),l(),S(r.formView.longDescription?3:-1),l(),B("id","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),_e("formControlName",r.formView.name)}}function li(t,n){t&1&&_(0,"spk-progress-bar",58)}function pi(t,n){if(t&1&&(xt(0),d(1,si,7,15)(2,li,1,0,"spk-progress-bar",58)),t&2){let e=p().$implicit,o=It(e.formView.loadOptions?e.formView.loadOptions(p(2).injector)():e.formView.options);l(),S(o?1:2)}}function ci(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.formView.longDescription)}}function mi(t,n){if(t&1&&(s(0,"div",45)(1,"label",47),u(2),d(3,ci,3,1,"spk-tooltip",48),a(),s(4,"div",60)(5,"spk-form-field"),_(6,"input",61),s(7,"spk-icon",51),u(8,"resize"),a()(),s(9,"spk-select",62),_(10,"input",63),a()()()),t&2){let e,o=p().$implicit,i=p(2);m("formGroupName",o.formView.name),l(),B("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),w(" ",(e=o.formView.shortDescription)!==null&&e!==void 0?e:o.formView.name," "),l(),S(o.formView.longDescription?3:-1),l(3),B("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(3),m("options",i.sizeOptions())("inlineSearch",!0)}}function ui(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.formView.longDescription)}}function _i(t,n){if(t&1&&(s(0,"spk-form-field")(1,"label",47),u(2),d(3,ui,3,1,"spk-tooltip",48),a(),_(4,"input",64),s(5,"spk-icon",51),u(6,"numpad"),a()()),t&2){let e,o=p().$implicit;l(),B("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),w(" ",(e=o.formView.shortDescription)!==null&&e!==void 0?e:o.formView.name," "),l(),S(o.formView.longDescription?3:-1),l(),B("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),_e("formControlName",o.formView.name)}}function di(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.formView.longDescription)}}function Fi(t,n){if(t&1&&(s(0,"spk-toggle",46)(1,"label",47),u(2),d(3,di,3,1,"spk-tooltip",48),a(),_(4,"input",65),a()),t&2){let e,o=p().$implicit;l(),B("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),w(" ",(e=o.formView.shortDescription)!==null&&e!==void 0?e:o.formView.name," "),l(),S(o.formView.longDescription?3:-1),l(),B("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),_e("formControlName",o.formView.name)}}function gi(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.formView.longDescription)}}function Ci(t,n){if(t&1&&u(0),t&2){let e=n.$implicit;w(" ",e," ")}}function Si(t,n){if(t&1&&(s(0,"spk-select",66)(1,"label",47),u(2),d(3,gi,3,1,"spk-tooltip",48),a(),_(4,"input",67),a(),d(5,Ci,1,1,"ng-template",null,4,ve)),t&2){let e,o=ee(6),i=p().$implicit;m("options",i.formView.options)("selectMultiple",!0)("optionTemplate",o),l(),V("for","destination-",i.formGroupName,"-",i.index,""),l(),w(" ",(e=i.formView.shortDescription)!==null&&e!==void 0?e:i.formView.name," "),l(),S(i.formView.longDescription?3:-1),l(),_e("formControlName",i.formView.name)}}function fi(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.formView.longDescription)}}function Ti(t,n){if(t&1&&(s(0,"spk-form-field")(1,"label",47),u(2),d(3,fi,3,1,"spk-tooltip",48),a(),_(4,"input",49),a()),t&2){let e,o=p().$implicit;l(),B("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),w(" ",(e=o.formView.shortDescription)!==null&&e!==void 0?e:o.formView.name," "),l(),S(o.formView.longDescription?3:-1),l(),B("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),_e("formControlName",o.formView.name)}}function hi(t,n){if(t&1){let e=y();s(0,"button",68),f("click",function(){F(e);let i=p().$implicit,r=p(2);return g(r.removeFormView(i.formView,0))}),s(1,"spk-icon"),u(2,"x-circle"),a()()}}function Di(t,n){if(t&1&&(s(0,"div",41),X(1,42),d(2,Bo,5,17,"app-file-tree",43)(3,zo,5,13,"app-file-tree",44)(4,qo,8,13,"spk-form-field")(5,ei,8,13,"spk-form-field")(6,ii,2,2)(7,pi,3,2)(8,mi,11,13,"div",45)(9,_i,7,11,"spk-form-field")(10,Fi,5,11,"spk-toggle",46)(11,Si,7,9)(12,Ti,5,11,"spk-form-field"),H(),d(13,hi,3,0,"button",32),a()),t&2){let e=n.$implicit;xe("single-field",e.formGroupName!=="advanced"),l(),m("formGroupName",e.formGroupName),l(),S(e.formView.type==="FileTree"?2:e.formView.type==="FolderTree"?3:e.formView.type==="String"||e.formView.type==="Path"||e.formView.type==="Email"?4:e.formView.type==="Password"?5:e.formView.type==="Enumeration"?6:e.formView.type==="NonValidatedSelectableString"?7:e.formView.type==="Size"?8:e.formView.type==="Integer"?9:e.formView.type==="Boolean"?10:e.formView.type==="Flags"?11:e.formView.type==="Timespan"?12:-1),l(11),S(e.formGroupName==="advanced"?13:-1)}}function Ei(t,n){if(t&1&&(X(0,22)(1,36),Q(2,Io,1,9,"ng-container",null,q),Q(4,wo,1,9,"ng-container",null,q),s(6,"app-toggle-card",37),X(7,38),T(8,10),s(9,"spk-menu",31)(10,"button",39),_(11,"spk-icon"),a(),X(12,20),Q(13,Ro,3,1,"button",33,q),H(),a(),h(),H(),Q(15,bo,1,9,"ng-container",null,q),a(),s(17,"app-toggle-card",37),X(18,38),T(19,11),s(20,"spk-menu",31)(21,"button",39),_(22,"spk-icon"),a(),X(23,20),Q(24,Lo,3,1,"button",33,q),H(),a(),h(),H(),Q(26,Vo,1,9,"ng-container",null,q),a(),d(28,Di,14,5,"ng-template",null,2,ve),H()()),t&2){let e=p();l(2),Y(e.destinationFormPair().custom),l(2),Y(e.destinationFormPair().dynamic),l(2),m("disallowToggle",!0),l(3),m("searchable",!0),l(),m("disabled",e.notSelectedAdvancedFormPair().length===0),l(3),Y(e.notSelectedAdvancedFormPair()),l(2),Y(e.selectedAdvancedFormPair()),l(2),m("disallowToggle",!0),l(3),m("searchable",!0),l(),m("disabled",e.notSelectedHttpOptions().length===0),l(3),Y(e.notSelectedHttpOptions()),l(2),Y(e.selectedHttpOptions())}}function yi(t,n){if(t&1){let e=y();s(0,"spk-dialog",69),mt("isOpenChange",function(i){F(e);let r=p();return ct(r.targetUrlDialogOpen,i)||(r.targetUrlDialogOpen=i),g(i)}),s(1,"header",70)(2,"h2"),I(3,12),a(),s(4,"spk-alert",71),I(5,13),a()(),s(6,"div",72)(7,"spk-form-field"),_(8,"textarea",73),a()(),s(9,"footer",74)(10,"button",24),f("click",function(){F(e);let i=p();return g(i.closeTargetUrlDialog(!1))}),u(11,"Cancel"),a(),s(12,"button",75),f("click",function(){F(e);let i=p();return g(i.closeTargetUrlDialog(!0))}),T(13,14),_(14,"spk-icon"),h(),a()()()}if(t&2){let e=p();pt("isOpen",e.targetUrlDialogOpen),m("options",ut(3,Eo)),l(8),m("formControl",e.targetUrlCtrl)}}var Pi=["Bytes","KB","MB","GB","TB","PB"],Pt=new ae,ln=(t={destinations:[]})=>Pt.group({destinations:Pt.array(t.destinations)}),pn=({key:t,customGroup:n,dynamicGroup:e,advancedGroup:o})=>Pt.group({destinationType:Pt.control(t),custom:n,dynamic:e,advanced:o}),Ut=class t{#e=x(pe);#t=x(Te);#o=x(jt);#i=x(ze);#n=x(ce);#r=x(qt);injector=x(Kt);formRef=Ce.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(Pi);successfulTest=A(!1);destinationTypeOptionsInFocus=A(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=A(Me.map(n=>({key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description})));destinationTypeOptionsFocused=b(()=>{let n=this.destinationTypeOptionsInFocus(),e=this.destinationTypeOptions();return n.map(o=>e.find(i=>i.key===o))});destinationTypeOptionsNotFocused=b(()=>{let n=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(o=>!n.includes(o.key))});getFormFieldValue(n,e,o){return((this.destinationForm.controls.destinations.controls?.[n]).controls?.[e]).controls[o].value}addDestinationFormGroup(n){this.#n.addDestinationFormGroup(n)}addAdvancedFormPair(n,e){this.#n.addAdvancedFormPair(n,e)}removeFormView(n,e){this.#n.removeAdvancedFormPair(n,e)}addHttpOption(n,e){this.#n.addHttpOption(n,e)}targetUrl=b(()=>this.#n.getCurrentTargetUrl()[0]);targetUrlCtrl=new Ct;targetUrlInitial=A(null);targetUrlDialogOpen=A(!1);openTargetUrlDialog(){let e=this.#n.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(e),this.targetUrlInitial.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl.value,o=this.targetUrlInitial();!n||e===o||this.#n.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(n=0){let o=this.#n.getCurrentTargetUrl()[n];o&&this.#i.postApiV1RemoteoperationTest({requestBody:{path:o}}).subscribe({next:()=>{this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3)},error:i=>{let r=i.error.error.Error;if(r==="missing-folder"&&this.#r.open(at,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`},closed:c=>{c&&this.#i.postApiV1RemoteoperationCreate({requestBody:{path:o}}).subscribe()}}),r.startsWith("incorrect-cert:")){let c=r.split("incorrect-cert:")[1];this.#r.open(at,{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: ${c}`,confirmText:"Trust the certificate",cancelText:"Cancel"},closed:C=>{C&&this.#n.addHttpOptionByName("accept-specified-ssl-hash",c)}})}if(r.startsWith("incorrect-host-key:")){let c=r.split('incorrect-host-key:"')[1].split('",')[0],C=r.split('accepted-host-key:"')[1].split('",')[0];C?this.#r.open(at,{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 ${C}
6
- with the REPORTED host key: ${c}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:O=>{O&&this.#n.addAdvancedFormPairByName("ssh-fingerprint",n,c)}}):this.#r.open(at,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${c}`,confirmText:"Approve",cancelText:"Cancel"},closed:O=>{O&&this.#n.addAdvancedFormPairByName("ssh-fingerprint",n,c)}})}}})}mapToTargetUrl(n){return ht(n.value)}removeDestinationFormGroup(n){this.destinationForm.controls.destinations.removeAt(n)}displayFn(n){let e=this.destinationOptions().find(o=>o.Key===n);return e?`${e.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 e=450,o=600,i=this.#s()+"?type="+n+"&token="+this.#l(),r=screen.width/2-e/2,c=screen.height/2-o/2,C=window.open(i,"_blank","height="+o+",width="+e+",menubar=0,status=0,titlebar=0,toolbar=0,left="+r+",top="+c);C?.addEventListener("blur",O=>{console.log("event blur",O)}),C?.addEventListener("beforeunload",O=>{console.log("event beforeunload",O),this.#o.get(this.#s()+"fetch?callback=JSON_CALLBACK",{params:{token:this.#l()}}).pipe(tt(()=>this.#a.set(!1))).subscribe({next:E=>{console.log("res",E),E?.authid&&this.#p.set(E.authid)}})})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=J({type:t,selectors:[["app-destination"]],viewQuery:function(e,o){e&1&&Se(o.formRef,So,5),e&2&&fe()},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=Ie(n);let e;e=$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 r;r=$localize`Other destinations`;let c;c=$localize` Advanced options ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#10\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#12\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*14:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*14:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_MENU:`,c=Ie(c);let C;C=$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:`,C=Ie(C);let O;O=$localize`Select an option...`;let E;E=$localize`Edit target URL`;let K;K=$localize` Be careful, this will overwrite everything you have in your destination. `;let z;return z=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],["fieldTemplate",""],["enumOptionTemplate",""],["optionTemplate",""],n,e,o,i,r,c,C,E,K,z,[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"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],[3,"type","id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["placeholder",O,3,"options","inlineSearch"],["type","text","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"formControlName"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"warning"],["content",""],["id","targetUrl","autocomplete","off",3,"formControl"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,o){if(e&1){let i=y();s(0,"form",15,0),f("submit",function(){return F(i),g(o.next())}),s(2,"header")(3,"h3",16),T(4,5),s(5,"div",17),d(6,Oo,4,3,"button",18),s(7,"spk-menu")(8,"button",19),_(9,"spk-icon"),a(),X(10,20),s(11,"button",21),f("click",function(){return F(i),g(o.openTargetUrlDialog())}),_(12,"spk-icon"),a(),H(),a()(),h(),a(),d(13,No,3,0,"p"),a(),d(14,$o,9,1)(15,Ei,30,6,"ng-container",22),s(16,"div",23)(17,"button",24),f("click",function(){return F(i),g(o.goBack())}),T(18,6),_(19,"spk-icon"),h(),a(),s(20,"button",25),T(21,7),_(22,"spk-icon"),h(),a()()(),d(23,yi,15,4,"spk-dialog",26)}if(e&2){let i;m("formGroup",o.destinationForm),l(6),S(o.destinationCount()>0?6:-1),l(7),S(o.destinationCount()>0?13:-1),l(),S(o.destinationCount()===0?14:-1),l(),S(!((i=o.destinationFormSignal())==null||i.destinations==null)&&i.destinations.length?15:-1),l(8),S(o.targetUrlDialogOpen()?23:-1)}},dependencies:[Ae,ye,ie,Pe,Le,re,Ee,ft,Oe,Ne,Ge,Yt,Ht,ne,Ft,te,be,Xe,Wt,dt,oe,gt,qe,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}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{ht as a,Me as b,ln as c,pn as d,Ut as e,en as f,bt as g,vt as h,nn as i,Lt as j,rn as k,Gt as l,sn as m,Vt as n,ce as o};
package/chunk-47XDI5B5.js DELETED
@@ -1 +0,0 @@
1
- import{b as u}from"./chunk-KLIPTMVG.js";import{D as n,Lc as a,N as p,R as m,X as l,sa as i}from"./chunk-DTPZU6NP.js";var d=class r{#s=l(u);isLoaded=i(!1);systemInfo=i(null);filterGroups=i(null);backendModules=a(()=>this.systemInfo()?.BackendModules??[]);allOptionsGrouped=a(()=>{let e={displayName:"Default",options:this.systemInfo()?.Options?.map(this.#e)??[]},s=this.systemInfo()?.GenericModules?.map(t=>({displayName:t.DisplayName??t.Key,options:t.Options?.map(this.#e)??[]}))??[],o=this.systemInfo()?.CompressionModules?.map(t=>({displayName:t.DisplayName??t.Key,options:t.Options?.map(this.#e)??[]}))??[];return[e,...s,...o]});preload(e=!1){let s=this.#s.getApiV1Systeminfo().pipe(p(o=>{this.systemInfo.set(o)}),n(()=>this.isLoaded.set(!0)));if(e)return s;s.subscribe()}preloadFilterGroups(e=!1){let s=this.#s.getApiV1SysteminfoFiltergroups().pipe(p(o=>{this.filterGroups.set(o)}),n(()=>this.isLoaded.set(!0)));if(e)return s;s.subscribe()}#e(e){return{name:e.Name,type:e.Type,shortDescription:e.ShortDescription??void 0,longDescription:e.LongDescription??void 0,options:e.ValidValues}}static \u0275fac=function(s){return new(s||r)};static \u0275prov=m({token:r,factory:r.\u0275fac,providedIn:"root"})};export{d as a};
package/chunk-7XMYLRVX.js DELETED
@@ -1 +0,0 @@
1
- import{o as g}from"./chunk-2ZYPGUOW.js";import"./chunk-L7FLOT6V.js";import"./chunk-Q67EYU7V.js";import"./chunk-DNHLTHLR.js";import{a as k}from"./chunk-N5K6ODRA.js";import"./chunk-47XDI5B5.js";import"./chunk-CK5N2PPF.js";import{a as I}from"./chunk-CMNODR42.js";import"./chunk-RKQDFV7W.js";import"./chunk-GEEPH37P.js";import"./chunk-7LD5V64E.js";import{a as N}from"./chunk-WZG34QS3.js";import"./chunk-4IJQ7AAQ.js";import"./chunk-OQEGPSC6.js";import{b as O}from"./chunk-KLIPTMVG.js";import{a as P,b as h,d as E,e as B}from"./chunk-AIOUSVMR.js";import"./chunk-THUAAYGA.js";import{o as $,p as M,t as b}from"./chunk-ECH6I3YN.js";import"./chunk-V5GVLIPJ.js";import"./chunk-2HS3CYRN.js";import"./chunk-UQH5ZQG7.js";import{Ab as s,Bb as p,C as m,Cb as n,Mb as d,Mc as A,Nb as c,Qa as r,X as l,db as f,ib as C,qc as R,rb as u,tc as _,wb as D}from"./chunk-DTPZU6NP.js";import"./chunk-C6Q5SG76.js";var K=(i,e)=>[i,e,"general"],L=(i,e)=>[i,e,"destination"],v=(i,e)=>[i,e,"source-data"],G=(i,e)=>[i,e,"schedule"],y=(i,e)=>[i,e,"options"];function U(i,e){i&1&&n(0,"spk-progress-bar",6)}function X(i,e){i&1&&(s(0,"section"),n(1,"router-outlet"),p())}var T=class i{#t=l(P);#e=l(g);#a=l(N);#i=l(O);isDraft=this.#e.isDraft;backupId=this.#e.backupId;finishedLoading=this.#e.finishedLoading;#o=k(this.#t.params);#n=k(this.#t.url);paramsChanged=A(()=>{let e=this.#o()?.id,a=!!this.#n()?.find(t=>t.path==="backup-draft");this.#e.backupId.set(e),e!=="new"?this.getBackup(e,a):this.getDefaults()});getDefaults(){this.#i.getApiV1Backupdefaults().pipe(m(1)).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(e.Backup),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(!0)}})}getBackup(e,a=!1){let t=o=>{this.#e.mapScheduleToForm(o.Schedule??null),o.Backup&&(this.#e.mapGeneralToForm(o.Backup),this.#e.mapDestinationToForm(o.Backup),this.#e.mapSourceDataToForm(o.Backup),this.#e.mapOptionsToForms(o.Backup)),this.#e.finishedLoading.set(!0)};if(a){this.isDraft.set(a);let o=this.#a.draftBackups().find(F=>F.id===e);if(!o){alert("Backup not found");return}t(o.data)}else this.#i.getApiV1BackupById({id:e}).subscribe({next:t})}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=f({type:i,selectors:[["app-backup"]],features:[R([g])],decls:20,vars:21,consts:()=>{let e;e=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: General `;let a;a=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let t;t=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_RADIO: Source Data `;let o;o=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_RADIO: Schedule `;let F;return F=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `,[e,a,t,o,F,["step","","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(a,t){a&1&&(n(0,"app-status-bar"),s(1,"header")(2,"spk-stepper")(3,"div",5),d(4,0),n(5,"spk-radio"),c(),p(),s(6,"div",5),d(7,1),n(8,"spk-radio"),c(),p(),s(9,"div",5),d(10,2),n(11,"spk-radio"),c(),p(),s(12,"div",5),d(13,3),n(14,"spk-radio"),c(),p(),s(15,"div",5),d(16,4),n(17,"spk-radio"),c(),p()()(),C(18,U,1,0,"spk-progress-bar",6)(19,X,2,0,"section")),a&2&&(r(3),u("routerLink",_(6,K,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(9,L,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(12,v,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(15,G,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(18,y,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),D(t.finishedLoading()?19:18))},dependencies:[h,E,B,I,M,b,$],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-level-40)}header[_ngcontent-%COMP%] spk-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:auto}"],changeDetection:0})};export{T as default};
package/chunk-FF6XUK27.js DELETED
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-NWVBCPMZ.js";import"./chunk-L7FLOT6V.js";import"./chunk-Q67EYU7V.js";import"./chunk-N5K6ODRA.js";import"./chunk-47XDI5B5.js";import"./chunk-RKQDFV7W.js";import"./chunk-GEEPH37P.js";import"./chunk-7LD5V64E.js";import"./chunk-WZG34QS3.js";import"./chunk-4IJQ7AAQ.js";import"./chunk-OQEGPSC6.js";import"./chunk-KLIPTMVG.js";import"./chunk-AIOUSVMR.js";import"./chunk-THUAAYGA.js";import"./chunk-ECH6I3YN.js";import"./chunk-V5GVLIPJ.js";import"./chunk-2HS3CYRN.js";import"./chunk-DTPZU6NP.js";import"./chunk-C6Q5SG76.js";export{a as createRestoreOptionsForm,b as default};
package/chunk-HAZC7QF4.js DELETED
@@ -1 +0,0 @@
1
- import{i as a,j as b}from"./chunk-2ZYPGUOW.js";import"./chunk-L7FLOT6V.js";import"./chunk-Q67EYU7V.js";import"./chunk-DNHLTHLR.js";import"./chunk-N5K6ODRA.js";import"./chunk-47XDI5B5.js";import"./chunk-CK5N2PPF.js";import"./chunk-4IJQ7AAQ.js";import"./chunk-KLIPTMVG.js";import"./chunk-AIOUSVMR.js";import"./chunk-THUAAYGA.js";import"./chunk-ECH6I3YN.js";import"./chunk-V5GVLIPJ.js";import"./chunk-2HS3CYRN.js";import"./chunk-DTPZU6NP.js";import"./chunk-C6Q5SG76.js";export{a as createOptionsForm,b as default};
package/chunk-IY2EGNYQ.js DELETED
@@ -1 +0,0 @@
1
- import"./chunk-C6Q5SG76.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-LGGACMIA.js")},{path:"destination",loadComponent:()=>import("./chunk-YKV265HA.js")},{path:"source-data",loadComponent:()=>import("./chunk-QPRM4V75.js")},{path:"schedule",loadComponent:()=>import("./chunk-PZSY4DRF.js")},{path:"options",loadComponent:()=>import("./chunk-HAZC7QF4.js")}];export{o as default};
package/chunk-LGGACMIA.js DELETED
@@ -1 +0,0 @@
1
- import{f as a,g as b,h as c}from"./chunk-2ZYPGUOW.js";import"./chunk-L7FLOT6V.js";import"./chunk-Q67EYU7V.js";import"./chunk-DNHLTHLR.js";import"./chunk-N5K6ODRA.js";import"./chunk-47XDI5B5.js";import"./chunk-CK5N2PPF.js";import"./chunk-4IJQ7AAQ.js";import"./chunk-KLIPTMVG.js";import"./chunk-AIOUSVMR.js";import"./chunk-THUAAYGA.js";import"./chunk-ECH6I3YN.js";import"./chunk-V5GVLIPJ.js";import"./chunk-2HS3CYRN.js";import"./chunk-DTPZU6NP.js";import"./chunk-C6Q5SG76.js";export{b as NONE_OPTION,a as createGeneralForm,c as default};
package/chunk-OVA6G4AJ.js DELETED
@@ -1,6 +0,0 @@
1
- import{g as Zt}from"./chunk-NWVBCPMZ.js";import{a as jt,b as Qt,o as tt}from"./chunk-2ZYPGUOW.js";import{a as Xt}from"./chunk-L7FLOT6V.js";import{a as qt}from"./chunk-Q67EYU7V.js";import"./chunk-DNHLTHLR.js";import"./chunk-N5K6ODRA.js";import"./chunk-47XDI5B5.js";import{a as U}from"./chunk-CK5N2PPF.js";import"./chunk-RKQDFV7W.js";import"./chunk-GEEPH37P.js";import"./chunk-7LD5V64E.js";import"./chunk-WZG34QS3.js";import{a as wt,b as vt,d as Pt,e as Vt,f as Mt,h as bt,i as Gt,l as Bt,m as Lt,n as Ut,o as Ht,p as Kt,q as Wt,s as zt}from"./chunk-4IJQ7AAQ.js";import"./chunk-OQEGPSC6.js";import{b as Et}from"./chunk-KLIPTMVG.js";import{a as Dt,c as St}from"./chunk-AIOUSVMR.js";import"./chunk-THUAAYGA.js";import{a as Ot,b as xt,d as Rt,e as kt,l as Nt,n as ht,o as It,r as yt,x as $t,y as At}from"./chunk-ECH6I3YN.js";import{c as ft}from"./chunk-V5GVLIPJ.js";import{ia as gt}from"./chunk-2HS3CYRN.js";import{Ab as l,Bb as r,Cb as d,D as ot,Db as w,Eb as v,Fb as M,Gb as S,Lc as K,Mb as O,Mc as Ct,Nb as x,Ob as b,Pb as q,Qa as o,Qb as j,Rb as H,Sb as f,Tb as p,Wb as k,X as I,Xa as rt,Yb as st,Zb as T,ca as C,cc as pt,da as g,db as lt,dc as _t,ec as P,fc as _,gc as Q,ha as at,hc as D,ib as m,ic as ct,kc as mt,lc as Ft,mc as ut,nc as Z,oc as J,pc as Y,qc as dt,rb as c,rc as Tt,sa as R,sc as G,tb as X,uc as B,wb as u,xb as y,yb as $,yc as L,zb as A}from"./chunk-DTPZU6NP.js";import"./chunk-C6Q5SG76.js";var Jt=["formRef"],Yt=(n,i,t,e)=>({index:n,formView:i,formGroupName:"custom",destinationType:t,oauthField:e}),z=n=>({$implicit:n}),te=(n,i,t,e)=>({index:n,formView:i,formGroupName:"dynamic",destinationType:t,oauthField:e}),ee=(n,i,t,e)=>({index:n,formView:i,formGroupName:"advanced",destinationType:t,oauthField:e}),ne=(n,i,t,e)=>({index:n,formView:i,formGroupName:"advanced",asHttpOptions:!0,destinationType:t,oauthField:e}),ie=()=>({maxWidth:"700px",width:"100%"});function oe(n,i){n&1&&(O(0,5,2),d(1,"spk-icon"),x())}function ae(n,i){n&1&&b(0,5,3)}function re(n,i){if(n&1){let t=S();O(0,5,1),l(1,"button",21),f("click",function(){C(t);let a=p();return g(a.testDestination())}),m(2,oe,2,0)(3,ae,1,0),r(),x()}if(n&2){let t=p();o(),X("success",t.successfulTest()),o(),u(t.successfulTest()?2:3)}}function le(n,i){if(n&1){let t=S();l(0,"p",27),f("click",function(){C(t);let a=p();return g(a.removeDestinationFormGroup(a.destinationCount()-1))}),O(1,8),d(2,"span",28),x(),r()}}function se(n,i){if(n&1){let t=S();l(0,"div",34),f("click",function(){let a=C(t).$implicit,s=p(2);return g(s.addDestinationFormGroup(a.key))}),l(1,"h3"),_(2),r(),l(3,"p"),_(4),r()()}if(n&2){let t=i.$implicit;o(2),Q(t.displayName),o(2),Q(t.description)}}function pe(n,i){if(n&1){let t=S();l(0,"button",35,1),f("click",function(){let a=C(t).$implicit,s=p(2);return g(s.addDestinationFormGroup(a.key))}),_(2),r()}if(n&2){let t=i.$implicit;o(2),D(" ",t.displayName," ")}}function _e(n,i){if(n&1&&(l(0,"div",29),$(1,se,5,2,"div",30,y),r(),l(3,"spk-menu",31)(4,"button",32),b(5,9),r(),w(6,20),$(7,pe,3,1,"button",33,y),v(),r()),n&2){let t=p();o(),A(t.destinationTypeOptionsFocused()),o(2),c("searchable",!0),o(4),A(t.destinationTypeOptionsNotFocused())}}function ce(n,i){n&1&&M(0)}function me(n,i){if(n&1&&m(0,ce,1,0,"ng-container",40),n&2){let t,e=i.$implicit,a=i.$index;p();let s=P(29),F=p();c("ngTemplateOutlet",s)("ngTemplateOutletContext",G(7,z,B(2,Yt,a,e,(t=F.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,F.destinationFormPair().oauthField)))}}function Fe(n,i){n&1&&M(0)}function ue(n,i){if(n&1&&m(0,Fe,1,0,"ng-container",40),n&2){let t,e=i.$implicit,a=i.$index;p();let s=P(29),F=p();c("ngTemplateOutlet",s)("ngTemplateOutletContext",G(7,z,B(2,te,a,e,(t=F.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,F.destinationFormPair().oauthField)))}}function de(n,i){if(n&1){let t=S();O(0,10,1),l(1,"button",35,1),f("click",function(){let a=C(t).$implicit,s=p(2);return g(s.addAdvancedFormPair(a,0))}),r(),x()}if(n&2){let t=i.$implicit;o(),q(t.name),j(0)}}function Te(n,i){n&1&&M(0)}function Ce(n,i){if(n&1&&m(0,Te,1,0,"ng-container",40),n&2){let t,e=i.$implicit,a=i.$index;p();let s=P(29),F=p();c("ngTemplateOutlet",s)("ngTemplateOutletContext",G(7,z,B(2,ee,a,e,(t=F.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,F.destinationFormPair().oauthField)))}}function ge(n,i){if(n&1){let t=S();O(0,11,1),l(1,"button",35,1),f("click",function(){let a=C(t).$implicit,s=p(2);return g(s.addHttpOption(a,0))}),r(),x()}if(n&2){let t=i.$implicit;o(),q(t.name),j(0)}}function fe(n,i){n&1&&M(0)}function De(n,i){if(n&1&&m(0,fe,1,0,"ng-container",40),n&2){let t,e=i.$implicit,a=i.$index;p();let s=P(29),F=p();c("ngTemplateOutlet",s)("ngTemplateOutletContext",G(7,z,B(2,ne,a,e,(t=F.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,F.destinationFormPair().oauthField)))}}function Se(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Ee(n,i){if(n&1&&(l(0,"app-file-tree",43)(1,"label",47),_(2),m(3,Se,3,1,"spk-tooltip",48),r(),d(4,"input",49),r()),n&2){let t,e=p().$implicit,a=p(2);c("startingPath",a.getFormFieldValue(0,e.formGroupName,e.formView.name))("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name)}}function Oe(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function xe(n,i){if(n&1&&(l(0,"app-file-tree",44)(1,"label",47),_(2),m(3,Oe,3,1,"spk-tooltip",48),r(),d(4,"input",49),r()),n&2){let t,e=p().$implicit,a=p(2);c("hideShortcuts",!0)("startingPath",a.getFormFieldValue(0,e.formGroupName,e.formView.name)),o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name)}}function Re(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function ke(n,i){n&1&&(l(0,"spk-icon",51),_(1,"link"),r())}function Ne(n,i){n&1&&(l(0,"spk-icon",51),_(1,"envelope"),r())}function he(n,i){n&1&&(l(0,"spk-icon",51),_(1,"textbox"),r())}function Ie(n,i){if(n&1&&(l(0,"spk-form-field")(1,"label",47),_(2),m(3,Re,3,1,"spk-tooltip",48),r(),d(4,"input",50),m(5,ke,2,0,"spk-icon",51)(6,Ne,2,0,"spk-icon",51)(7,he,2,0,"spk-icon",51),r()),n&2){let t,e=p().$implicit;o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name),c("type",e.formView.type==="Email"?"email":"text"),o(),u(e.formView.type==="Path"?5:e.formView.type==="Email"?6:7)}}function ye(n,i){if(n&1){let t=S();l(0,"span",55),f("click",function(){C(t);let a=p(2).$implicit,s=p(2);return g(s.oauthStartTokenCreation(a.destinationType))}),_(1,"AuthID"),r()}}function $e(n,i){n&1&&(l(0,"spk-icon",51),_(1,"password"),r())}function Ae(n,i){if(n&1){let t=S();l(0,"spk-icon",56),f("click",function(){C(t);let a=p(2).$implicit;return g(a.formView.showPassword=!a.formView.showPassword)}),_(1," eye "),r()}}function we(n,i){if(n&1){let t=S();l(0,"spk-icon",56),f("click",function(){C(t);let a=p(2).$implicit;return g(a.formView.showPassword=!a.formView.showPassword)}),_(1," eye-slash "),r()}}function ve(n,i){if(n&1&&(l(0,"spk-form-field")(1,"label",47),_(2),r(),d(3,"input",52),m(4,ye,2,0,"span",53)(5,$e,2,0,"spk-icon",51)(6,Ae,2,0,"spk-icon",54)(7,we,2,0,"spk-icon",54),r()),n&2){let t,e=p().$implicit;o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name),c("type",e.formView.showPassword?"text":"password"),o(),u(e.oauthField===e.formView.name?4:5),o(2),u(e.formView.showPassword?6:7)}}function Pe(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(3).$implicit;c("message",t.formView.longDescription)}}function Ve(n,i){if(n&1&&_(0),n&2){let t=i.$implicit;D(" ",t," ")}}function Me(n,i){if(n&1&&(l(0,"spk-select",57)(1,"label",47),_(2),m(3,Pe,3,1,"spk-tooltip",48),r(),d(4,"input",49),r(),m(5,Ve,1,1,"ng-template",null,3,L)),n&2){let t,e=P(6);p();let a=Y(0),s=p().$implicit;c("options",a)("isClearable",!1)("optionTemplate",e),o(),T("for","destination-",s.formGroupName,"-",s.index,"-",s.asHttpOptions?"http":"other",""),o(),D(" ",(t=s.formView.shortDescription)!==null&&t!==void 0?t:s.formView.name," "),o(),u(s.formView.longDescription?3:-1),o(),T("id","destination-",s.formGroupName,"-",s.index,"-",s.asHttpOptions?"http":"other",""),k("formControlName",s.formView.name)}}function be(n,i){if(n&1&&(Z(0),m(1,Me,7,14)),n&2){let t=p().$implicit,e=J(t.formView.loadOptions?t.formView.loadOptions(p(2).injector)():t.formView.options);o(),u(e?1:-1)}}function Ge(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(3).$implicit;c("message",t.formView.longDescription)}}function Be(n,i){if(n&1&&_(0),n&2){let t=i.$implicit;ct(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function Le(n,i){if(n&1&&(l(0,"spk-select",59)(1,"label",47),_(2),m(3,Ge,3,1,"spk-tooltip",48),r(),d(4,"input",49),r(),m(5,Be,1,2,"ng-template",null,4,L)),n&2){let t,e=P(6);p();let a=Y(0),s=p().$implicit;c("options",a)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),o(),T("for","destination-",s.formGroupName,"-",s.index,"-",s.asHttpOptions?"http":"other",""),o(),D(" ",(t=s.formView.shortDescription)!==null&&t!==void 0?t:s.formView.name," "),o(),u(s.formView.longDescription?3:-1),o(),T("id","destination-",s.formGroupName,"-",s.index,"-",s.asHttpOptions?"http":"other",""),k("formControlName",s.formView.name)}}function Ue(n,i){n&1&&d(0,"spk-progress-bar",58)}function He(n,i){if(n&1&&(Z(0),m(1,Le,7,15)(2,Ue,1,0,"spk-progress-bar",58)),n&2){let t=p().$implicit,e=J(t.formView.loadOptions?t.formView.loadOptions(p(2).injector)():t.formView.options);o(),u(e?1:2)}}function Ke(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function We(n,i){if(n&1&&(l(0,"div",45)(1,"label",47),_(2),m(3,Ke,3,1,"spk-tooltip",48),r(),l(4,"div",60)(5,"spk-form-field"),d(6,"input",61),l(7,"spk-icon",51),_(8,"resize"),r()(),l(9,"spk-select",62),d(10,"input",63),r()()()),n&2){let t,e=p().$implicit,a=p(2);c("formGroupName",e.formView.name),o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1),o(3),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(3),c("options",a.sizeOptions())("inlineSearch",!0)}}function ze(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Xe(n,i){if(n&1&&(l(0,"spk-form-field")(1,"label",47),_(2),m(3,ze,3,1,"spk-tooltip",48),r(),d(4,"input",64),l(5,"spk-icon",51),_(6,"numpad"),r()()),n&2){let t,e=p().$implicit;o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name)}}function qe(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function je(n,i){if(n&1&&(l(0,"spk-toggle",46)(1,"label",47),_(2),m(3,qe,3,1,"spk-tooltip",48),r(),d(4,"input",65),r()),n&2){let t,e=p().$implicit;o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name)}}function Qe(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Ze(n,i){if(n&1&&_(0),n&2){let t=i.$implicit;D(" ",t," ")}}function Je(n,i){if(n&1&&(l(0,"spk-select",66)(1,"label",47),_(2),m(3,Qe,3,1,"spk-tooltip",48),r(),d(4,"input",67),r(),m(5,Ze,1,1,"ng-template",null,4,L)),n&2){let t,e=P(6),a=p().$implicit;c("options",a.formView.options)("selectMultiple",!0)("optionTemplate",e),o(),st("for","destination-",a.formGroupName,"-",a.index,""),o(),D(" ",(t=a.formView.shortDescription)!==null&&t!==void 0?t:a.formView.name," "),o(),u(a.formView.longDescription?3:-1),o(),k("formControlName",a.formView.name)}}function Ye(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function tn(n,i){if(n&1&&(l(0,"spk-form-field")(1,"label",47),_(2),m(3,Ye,3,1,"spk-tooltip",48),r(),d(4,"input",49),r()),n&2){let t,e=p().$implicit;o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name)}}function en(n,i){if(n&1){let t=S();l(0,"button",68),f("click",function(){C(t);let a=p().$implicit,s=p(2);return g(s.removeFormView(a.formView,0))}),l(1,"spk-icon"),_(2,"x-circle"),r()()}}function nn(n,i){if(n&1&&(l(0,"div",41),w(1,42),m(2,Ee,5,17,"app-file-tree",43)(3,xe,5,13,"app-file-tree",44)(4,Ie,8,13,"spk-form-field")(5,ve,8,13,"spk-form-field")(6,be,2,2)(7,He,3,2)(8,We,11,13,"div",45)(9,Xe,7,11,"spk-form-field")(10,je,5,11,"spk-toggle",46)(11,Je,7,9)(12,tn,5,11,"spk-form-field"),v(),m(13,en,3,0,"button",32),r()),n&2){let t=i.$implicit;X("single-field",t.formGroupName!=="advanced"),o(),c("formGroupName",t.formGroupName),o(),u(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),o(11),u(t.formGroupName==="advanced"?13:-1)}}function on(n,i){if(n&1&&(w(0,22)(1,36),$(2,me,1,9,"ng-container",null,y),$(4,ue,1,9,"ng-container",null,y),l(6,"app-toggle-card",37),w(7,38),O(8,10),l(9,"spk-menu",31)(10,"button",39),d(11,"spk-icon"),r(),w(12,20),$(13,de,3,1,"button",33,y),v(),r(),x(),v(),$(15,Ce,1,9,"ng-container",null,y),r(),l(17,"app-toggle-card",37),w(18,38),O(19,11),l(20,"spk-menu",31)(21,"button",39),d(22,"spk-icon"),r(),w(23,20),$(24,ge,3,1,"button",33,y),v(),r(),x(),v(),$(26,De,1,9,"ng-container",null,y),r(),m(28,nn,14,5,"ng-template",null,2,L),v()()),n&2){let t=p();o(2),A(t.destinationFormPair().custom),o(2),A(t.destinationFormPair().dynamic),o(2),c("disallowToggle",!0),o(3),c("searchable",!0),o(),c("disabled",t.notSelectedAdvancedFormPair().length===0),o(3),A(t.notSelectedAdvancedFormPair()),o(2),A(t.selectedAdvancedFormPair()),o(2),c("disallowToggle",!0),o(3),c("searchable",!0),o(),c("disabled",t.notSelectedHttpOptions().length===0),o(3),A(t.notSelectedHttpOptions()),o(2),A(t.selectedHttpOptions())}}function an(n,i){if(n&1){let t=S();l(0,"spk-dialog",69),ut("isOpenChange",function(a){C(t);let s=p();return Ft(s.targetUrlDialogOpen,a)||(s.targetUrlDialogOpen=a),g(a)}),l(1,"header",70)(2,"h2"),b(3,12),r(),l(4,"spk-alert",71),b(5,13),r()(),l(6,"div",72)(7,"spk-form-field"),d(8,"textarea",73),r()(),l(9,"footer",74)(10,"button",24),f("click",function(){C(t);let a=p();return g(a.closeTargetUrlDialog(!1))}),_(11,"Cancel"),r(),l(12,"button",75),f("click",function(){C(t);let a=p();return g(a.closeTargetUrlDialog(!0))}),O(13,14),d(14,"spk-icon"),x(),r()()()}if(n&2){let t=p();mt("isOpen",t.targetUrlDialogOpen),c("options",Tt(3,ie)),o(8),c("formControl",t.targetUrlCtrl)}}var rn=["Bytes","KB","MB","GB","TB","PB"],W=new Wt,$n=(n={destinations:[]})=>W.group({destinations:W.array(n.destinations)}),An=({key:n,customGroup:i,dynamicGroup:t,advancedGroup:e})=>W.group({destinationType:W.control(n),custom:i,dynamic:t,advanced:e}),et=class n{#l=I(St);#s=I(Dt);#p=I(ft);#t=I(tt);#i=I(Et);#e=I(kt);#n=I(Zt);injector=I(at);formRef=rt.required("formRef");destinationForm=this.#t.destinationForm;destinationFormPair=this.#t.destinationFormPair;selectedAdvancedFormPair=this.#t.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#t.notSelectedAdvancedFormPair;selectedHttpOptions=this.#t.selectedHttpOptions;notSelectedHttpOptions=this.#t.notSelectedHttpOptions;destinationOptions=this.#t.destinationOptions;destinationFormSignal=this.#t.destinationFormSignal;destinationCount=K(()=>this.destinationFormSignal()?.destinations?.length??0);sizeOptions=R(rn);successfulTest=R(!1);destinationTypeOptionsInFocus=R(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=R(Qt.map(i=>({key:i.customKey??i.key,customKey:i.customKey??null,displayName:i.displayName,description:i.description})));destinationTypeOptionsFocused=K(()=>{let i=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return i.map(e=>t.find(a=>a.key===e))});destinationTypeOptionsNotFocused=K(()=>{let i=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(e=>!i.includes(e.key))});targetUrlEffect=Ct(()=>{if(this.destinationFormSignal(),this.destinationForm.valid){let i=this.#t.getCurrentTargetUrl();this.#n.updateTargetUrl(i[0])}else this.#n.updateTargetUrl(null)});ngOnInit(){let i=this.#n.destinationTargetUrl();i&&this.#t.updateFieldsFromTargetUrl(i)}getFormFieldValue(i,t,e){return((this.destinationForm.controls.destinations.controls?.[i]).controls?.[t]).controls[e].value}addDestinationFormGroup(i){this.#t.addDestinationFormGroup(i)}addAdvancedFormPair(i,t){this.#t.addAdvancedFormPair(i,t)}removeFormView(i,t){this.#t.removeAdvancedFormPair(i,t)}addHttpOption(i,t){this.#t.addHttpOption(i,t)}targetUrlCtrl=new Mt;targetUrlInitial=R(null);targetUrlDialogOpen=R(!1);openTargetUrlDialog(){let t=this.#t.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(t),this.targetUrlInitial.set(t),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl.value,e=this.targetUrlInitial();!i||t===e||this.#t.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(i=0){let e=this.#t.getCurrentTargetUrl()[i];e&&this.#i.postApiV1RemoteoperationTest({requestBody:{path:e}}).subscribe({next:()=>{this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3)},error:a=>{let s=a.error.error.Error;if(s==="missing-folder"&&this.#e.open(U,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`},closed:F=>{F&&this.#i.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe()}}),s.startsWith("incorrect-cert:")){let F=s.split("incorrect-cert:")[1];this.#e.open(U,{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: ${F}`,confirmText:"Trust the certificate",cancelText:"Cancel"},closed:E=>{E&&this.#t.addHttpOptionByName("accept-specified-ssl-hash",F)}})}if(s.startsWith("incorrect-host-key:")){let F=s.split('incorrect-host-key:"')[1].split('",')[0],E=s.split('accepted-host-key:"')[1].split('",')[0];E?this.#e.open(U,{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 ${E}
6
- with the REPORTED host key: ${F}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:N=>{N&&this.#t.addAdvancedFormPairByName("ssh-fingerprint",i,F)}}):this.#e.open(U,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${F}`,confirmText:"Approve",cancelText:"Cancel"},closed:N=>{N&&this.#t.addAdvancedFormPairByName("ssh-fingerprint",i,F)}})}}})}mapToTargetUrl(i){return jt(i.value)}removeDestinationFormGroup(i){this.destinationForm.controls.destinations.removeAt(i)}displayFn(i){let t=this.destinationOptions().find(e=>e.Key===i);return t?`${t.DisplayName}`:""}goBack(){this.#n.exit()}next(){this.#l.navigate(["encryption"],{relativeTo:this.#s.parent})}#o=R("https://duplicati-oauth-handler.appspot.com/").asReadonly();#a=R(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#r=R(!1);#_=R(null);keyCreation(){}oauthStartTokenCreation(i){this.#r.set(!0);let t=450,e=600,a=this.#o()+"?type="+i+"&token="+this.#a(),s=screen.width/2-t/2,F=screen.height/2-e/2,E=window.open(a,"_blank","height="+e+",width="+t+",menubar=0,status=0,titlebar=0,toolbar=0,left="+s+",top="+F);E?.addEventListener("blur",N=>{console.log("event blur",N)}),E?.addEventListener("beforeunload",N=>{console.log("event beforeunload",N),this.#p.get(this.#o()+"fetch?callback=JSON_CALLBACK",{params:{token:this.#a()}}).pipe(ot(()=>this.#r.set(!1))).subscribe({next:V=>{console.log("res",V),V?.authid&&this.#_.set(V.authid)}})})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=lt({type:n,selectors:[["app-restore-destination"]],viewQuery:function(t,e){t&1&&pt(e.formRef,Jt,5),t&2&&_t()},features:[dt([tt])],decls:24,vars:6,consts:()=>{let i;i=$localize` Backup placement ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"\uFFFD*6:1\uFFFD"}:START_BLOCK_IF_1:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON:${"\uFFFD*2:2\uFFFD"}:START_BLOCK_IF: Connected ${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*3:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*3:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:dots-three-vertical${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:link${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,i=H(i);let t;t=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let e;e=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let a;a=$localize` Want to select another destination? ${"\uFFFD#2\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPAN:`;let s;s=$localize`Other destinations`;let F;F=$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:`,F=H(F);let E;E=$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:`,E=H(E);let N;N=$localize`Select an option...`;let V;V=$localize`Edit target URL`;let nt;nt=$localize` Be careful, this will overwrite everything you have in your destination. `;let it;return it=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],["fieldTemplate",""],["enumOptionTemplate",""],["optionTemplate",""],i,t,e,a,s,F,E,V,nt,it,[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"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],[3,"type","id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["placeholder",N,3,"options","inlineSearch"],["type","text","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"formControlName"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"warning"],["content",""],["id","targetUrl","autocomplete","off",3,"formControl"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,e){if(t&1){let a=S();l(0,"form",15,0),f("submit",function(){return C(a),g(e.next())}),l(2,"header")(3,"h3",16),O(4,5),l(5,"div",17),m(6,re,4,3,"button",18),l(7,"spk-menu")(8,"button",19),d(9,"spk-icon"),r(),w(10,20),l(11,"button",21),f("click",function(){return C(a),g(e.openTargetUrlDialog())}),d(12,"spk-icon"),r(),v(),r()(),x(),r(),m(13,le,3,0,"p"),r(),m(14,_e,9,1)(15,on,30,6,"ng-container",22),l(16,"div",23)(17,"button",24),f("click",function(){return C(a),g(e.goBack())}),O(18,6),d(19,"spk-icon"),x(),r(),l(20,"button",25),O(21,7),d(22,"spk-icon"),x(),r()()(),m(23,an,15,4,"spk-dialog",26)}if(t&2){let a;c("formGroup",e.destinationForm),o(6),u(e.destinationCount()>0?6:-1),o(7),u(e.destinationCount()>0?13:-1),o(),u(e.destinationCount()===0?14:-1),o(),u(!((a=e.destinationFormSignal())==null||a.destinations==null)&&a.destinations.length?15:-1),o(8),u(e.targetUrlDialogOpen()?23:-1)}},dependencies:[zt,bt,vt,Gt,wt,Pt,Vt,Bt,Lt,Kt,Ut,Ht,gt,Nt,ht,Ot,$t,At,Rt,xt,yt,It,qt,Xt],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] spk-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 1fr;gap:.5rem;align-items:flex-end}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1);background-color:var(--base-level-20);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{$n as createDestinationForm,An as createDestinationFormGroup,et as default};
package/chunk-PQWBOXD7.js DELETED
@@ -1 +0,0 @@
1
- import{c as a,d as b}from"./chunk-NWVBCPMZ.js";import"./chunk-L7FLOT6V.js";import"./chunk-Q67EYU7V.js";import"./chunk-N5K6ODRA.js";import"./chunk-47XDI5B5.js";import"./chunk-RKQDFV7W.js";import"./chunk-GEEPH37P.js";import"./chunk-7LD5V64E.js";import"./chunk-WZG34QS3.js";import"./chunk-4IJQ7AAQ.js";import"./chunk-OQEGPSC6.js";import"./chunk-KLIPTMVG.js";import"./chunk-AIOUSVMR.js";import"./chunk-THUAAYGA.js";import"./chunk-ECH6I3YN.js";import"./chunk-V5GVLIPJ.js";import"./chunk-2HS3CYRN.js";import"./chunk-DTPZU6NP.js";import"./chunk-C6Q5SG76.js";export{a as createEncryptionForm,b as default};