@duplicati/ngclient 0.0.101 → 0.0.102

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 (119) hide show
  1. package/assets/spk.woff2 +0 -0
  2. package/{chunk-M7VDIUGU.js → chunk-2IDHF5MN.js} +1 -1
  3. package/chunk-2PAPG5UW.js +1 -0
  4. package/chunk-4B4SNBSE.js +1 -0
  5. package/chunk-4HAKE425.js +1 -0
  6. package/{chunk-ULTH3Z7H.js → chunk-4IMMYDEZ.js} +1 -1
  7. package/chunk-4YHLU5WJ.js +1 -0
  8. package/chunk-4YRHMBJK.js +1 -0
  9. package/{chunk-ZP273LXY.js → chunk-5242ZMFS.js} +1 -1
  10. package/chunk-56OFRQFF.js +1 -0
  11. package/chunk-5EOQSHY6.js +1 -0
  12. package/chunk-5XWXETE2.js +1 -0
  13. package/chunk-66XKA75B.js +1 -0
  14. package/{chunk-SFWQDWHT.js → chunk-6OYKPS4F.js} +1 -1
  15. package/chunk-6WLXFV43.js +1 -0
  16. package/{chunk-EO2PLY2Q.js → chunk-73FGPZLT.js} +1 -1
  17. package/{chunk-4FF7PF7J.js → chunk-7NSKVKO7.js} +1 -1
  18. package/chunk-7WCKE7GY.js +1 -0
  19. package/chunk-A7BKUGJT.js +1 -0
  20. package/{chunk-MM22YS5Z.js → chunk-ARQ6YMHX.js} +1 -1
  21. package/{chunk-CQTSWNP2.js → chunk-AX2OTUX5.js} +1 -1
  22. package/{chunk-MEQPT4C3.js → chunk-B7AEDFNS.js} +1 -1
  23. package/{chunk-2SGDSXNW.js → chunk-BIHIR35J.js} +1 -1
  24. package/chunk-C4IFBLYB.js +1 -0
  25. package/chunk-CEHXBQ6Q.js +3 -0
  26. package/chunk-CVF2Q2H6.js +8 -0
  27. package/chunk-D36FLK4W.js +1 -0
  28. package/chunk-DYCJPQSE.js +1 -0
  29. package/chunk-EQ74YCX7.js +1 -0
  30. package/{chunk-O6GWHO26.js → chunk-FQMZSQUI.js} +1 -1
  31. package/chunk-FUAUSLOF.js +1 -0
  32. package/chunk-GGDMQHEQ.js +1 -0
  33. package/chunk-GM25ACCR.js +7 -0
  34. package/chunk-GON7FNZR.js +1 -0
  35. package/{chunk-I457VUEG.js → chunk-GWH4FCBZ.js} +1 -1
  36. package/{chunk-FDMBNUIK.js → chunk-HFKG5ODC.js} +1 -1
  37. package/{chunk-DJWNLIDJ.js → chunk-HPSQUH4S.js} +1 -1
  38. package/chunk-IYJFFIHQ.js +1 -0
  39. package/{chunk-FQPH5MIV.js → chunk-K4BJJNFG.js} +1 -1
  40. package/chunk-KEHATBLP.js +1 -0
  41. package/chunk-LOR4VCVG.js +1 -0
  42. package/chunk-LU6KVNOT.js +1 -0
  43. package/{chunk-TLY4PQBT.js → chunk-N35UIMLP.js} +1 -1
  44. package/chunk-NTGNZYL7.js +1 -0
  45. package/chunk-NYZVIDDD.js +1 -0
  46. package/{chunk-BWYJMRKB.js → chunk-OD5LGCQE.js} +1 -1
  47. package/{chunk-WCLOWI5G.js → chunk-OELZQ6RK.js} +1 -1
  48. package/{chunk-E2LHQGCK.js → chunk-OP5UYIDM.js} +1 -1
  49. package/{chunk-FKTH6XCB.js → chunk-OPC7T2MU.js} +1 -1
  50. package/{chunk-WSLU6K4D.js → chunk-OQNO5JCJ.js} +1 -1
  51. package/chunk-P3QRASBZ.js +1 -0
  52. package/chunk-PX25CWH6.js +1 -0
  53. package/chunk-PXG6UWRT.js +1 -0
  54. package/chunk-Q4OHMO5N.js +1 -0
  55. package/chunk-QBYHBPBT.js +1 -0
  56. package/{chunk-JJQARMUD.js → chunk-QTTYDT3P.js} +1 -1
  57. package/{chunk-3IZBE2NA.js → chunk-R5DUA6AR.js} +1 -1
  58. package/chunk-RO3W2TTH.js +1 -0
  59. package/{chunk-KABJYPCP.js → chunk-S2EID4MC.js} +1 -1
  60. package/{chunk-K3CYM6ID.js → chunk-TKVTCBLW.js} +1 -1
  61. package/{chunk-UXWTPWS6.js → chunk-U34D3G4S.js} +1 -1
  62. package/chunk-UKQTVYRS.js +1 -0
  63. package/{chunk-BKWTKAB4.js → chunk-W2OVJAGT.js} +1 -1
  64. package/chunk-X7KD2725.js +1 -0
  65. package/chunk-XYENMXJU.js +1 -0
  66. package/{chunk-LBZ753XE.js → chunk-Y5T3G6PP.js} +1 -1
  67. package/chunk-YBGYY3E5.js +1 -0
  68. package/{chunk-VRGLHRK2.js → chunk-YC7JUCYS.js} +1 -1
  69. package/{chunk-J6XKFGF5.js → chunk-YCVMFFKU.js} +1 -1
  70. package/{chunk-ISRMJKPG.js → chunk-YRQ33MKD.js} +1 -1
  71. package/chunk-ZJWHMCU4.js +1 -0
  72. package/chunk-ZLTJTLNJ.js +1 -0
  73. package/{chunk-D5WIWFNP.js → chunk-ZVBVR6H4.js} +1 -1
  74. package/index.html +2 -2
  75. package/locale/messages.json +268 -49
  76. package/main-SGSJMHZH.js +1 -0
  77. package/package.json +1 -1
  78. package/styles-7QQPZCZ2.css +1 -0
  79. package/chunk-2VHTET54.js +0 -1
  80. package/chunk-36ZZ3COU.js +0 -1
  81. package/chunk-3NDOYD25.js +0 -1
  82. package/chunk-3UJUWE5B.js +0 -1
  83. package/chunk-3V622MYY.js +0 -1
  84. package/chunk-436ZVGPO.js +0 -1
  85. package/chunk-4DZRXRA3.js +0 -1
  86. package/chunk-54SNAQYD.js +0 -1
  87. package/chunk-5SLAQVCB.js +0 -3
  88. package/chunk-6UVVDGKQ.js +0 -8
  89. package/chunk-7QUJNAXH.js +0 -1
  90. package/chunk-BA7NYTFR.js +0 -1
  91. package/chunk-CEOO3F5U.js +0 -1
  92. package/chunk-DRBDCRHV.js +0 -1
  93. package/chunk-FRXAEGHW.js +0 -1
  94. package/chunk-I3TLRILF.js +0 -1
  95. package/chunk-LHTAXP73.js +0 -1
  96. package/chunk-MYK7A3PZ.js +0 -1
  97. package/chunk-NEZX7ARK.js +0 -1
  98. package/chunk-NFME267J.js +0 -1
  99. package/chunk-OH33D663.js +0 -1
  100. package/chunk-ONSJL7VA.js +0 -1
  101. package/chunk-PFAU4FFV.js +0 -1
  102. package/chunk-PGUALKQ6.js +0 -1
  103. package/chunk-PWLZT57L.js +0 -1
  104. package/chunk-QFKEUN2J.js +0 -1
  105. package/chunk-RQSCZC6C.js +0 -1
  106. package/chunk-TUR6D3AC.js +0 -1
  107. package/chunk-UH6BCOA6.js +0 -1
  108. package/chunk-UJZB6UQE.js +0 -1
  109. package/chunk-VDQCSHBX.js +0 -1
  110. package/chunk-XGARKXE4.js +0 -7
  111. package/chunk-XH2A67YP.js +0 -1
  112. package/chunk-XQKR67WI.js +0 -1
  113. package/chunk-YBLCACKN.js +0 -1
  114. package/chunk-YOTPPWSO.js +0 -1
  115. package/chunk-YPSSTA3J.js +0 -1
  116. package/chunk-YTJB3DGU.js +0 -1
  117. package/chunk-ZHAXIU33.js +0 -1
  118. package/main-CVAZAPFI.js +0 -1
  119. package/styles-2KPDWK5U.css +0 -1
package/chunk-6UVVDGKQ.js DELETED
@@ -1,8 +0,0 @@
1
- import{a as zt,b as Wt}from"./chunk-LBZ753XE.js";import{a as pt}from"./chunk-XH2A67YP.js";import{a as Xe}from"./chunk-ISRMJKPG.js";import{a as Pt,b as Xt}from"./chunk-DNHLTHLR.js";import{a as K}from"./chunk-3V622MYY.js";import{a as it}from"./chunk-WCLOWI5G.js";import{a as ke}from"./chunk-MM22YS5Z.js";import{b as Kt}from"./chunk-RHW5QVAY.js";import{b as be,c as de,d as _e,e as Fe,f as Ge,g as rt,h as at,i as Le,j as Ue,m as st,n as Ve,o as lt,p as Ht,q as Be,r as ge,s as Ke,t as He}from"./chunk-JJQARMUD.js";import{b as Ee,d as pe}from"./chunk-I3TLRILF.js";import{A as ot,a as ce,b as tt,d as Ut,e as Vt,g as Ie,l as ue,o as Bt,p as nt,t as me,z as ve}from"./chunk-XQKR67WI.js";import{b as xe}from"./chunk-CEOO3F5U.js";import{c as Lt}from"./chunk-K3CYM6ID.js";import{i as Gt}from"./chunk-M7VDIUGU.js";import{$b as vt,D as je,Db as D,Eb as E,Fb as w,Gb as ft,Hb as Tt,Ib as Ne,Jb as N,Kb as c,Na as l,Nb as le,Pb as It,Q as De,Qb as V,Ua as Me,Vb as Re,W as R,Wb as we,Xb as ie,Yb as S,Za as se,Zb as Dt,_b as H,ba as F,bc as W,ca as g,cb as C,cc as j,dc as q,ec as Et,fc as yt,ga as xt,gc as At,ic as bt,jc as Qe,kb as u,lc as Ye,mb as Pe,na as St,oa as ht,p as We,pb as T,pc as Je,qb as te,ra as P,rb as ne,sb as oe,tb as s,ub as a,vb as d,wb as X,xb as z,xc as L,yb as qe,yc as et,zb as I}from"./chunk-XGARKXE4.js";import{a as A,c as wt}from"./chunk-7CGTOI24.js";var ct=class e{fromString(n){if(!n)return null;let t=n.match(/(\d+)([smhDWMY])/);return t&&{value:parseInt(t[1]),unit:t[2]}}toString(n,t){return`${n}${t}`}static \u0275fac=function(t){return new(t||e)};static \u0275prov=De({token:e,factory:e.\u0275fac,providedIn:"root"})};var Ce=class e{#n=R(xe);s3Providers=K(this.getS3Config("Providers"));s3Regions=K(this.getS3Config("Regions"));s3RegionHosts=K(this.getS3Config("RegionHosts"));s3StorageClasses=K(this.getS3Config("StorageClasses"));storjSatellites=K(this.getStorjConfig("Satellites"));storjAuthenticationMethods=K(this.getStorjConfig("AuthenticationMethods"));openstackProviders=K(this.getOpenstackConfig("Providers"));openstackVersions=K(this.getOpenstackConfig("Versions"));gcsLocations=K(this.getGcsConfig("Locations"));gcsStorageClasses=K(this.getGcsConfig("StorageClasses"));getS3Config(n){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":n}}).pipe(We(t=>this.#e(t)))}createS3IamUser(n,t){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":n,"s3-password":t}})}createS3PolicyIAM(n){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:n}})}getStorjConfig(n){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":n}}).pipe(We(t=>this.#e(t)))}getOpenstackConfig(n){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":n}}).pipe(We(t=>this.#e(t)))}getGcsConfig(n){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":n}}).pipe(We(t=>this.#e(t)))}#e(n){return(n.Result&&typeof n.Result=="object"&&Object.entries(n.Result).map(([t,o])=>({key:t,value:o})))??[]}static \u0275fac=function(t){return new(t||e)};static \u0275prov=De({token:e,factory:e.\u0275fac,providedIn:"root"})};function Ae(e){return e==null?"":":"+e.toString()}function Q(e){return e==null?"":e.startsWith("/")?e:"/"+e}function k(e,n){let t={},o={},i=he.find(r=>r.key===e);return n.searchParams.forEach((r,p)=>{i?.dynamicFields?.some(f=>f===p||f?.name===p)?o[p]=decodeURIComponent(r):t[p]=decodeURIComponent(r)}),{advanced:t,dynamic:o}}function O(e,n=!1){let t=e.map(([i,r])=>`${i}=${r?encodeURIComponent(r.toString()):""}`).join("&");return t?(n?"":"?")+t:""}function ut(e){let n=e.destinationType,t=he.find(o=>o.customKey===n||o.key===n);if(!t)throw new Error("Invalid destination type");return t?.mapper.to(e)??""}function Nt(e){let n=URL.canParse(e),t=e.split("://")[0],o=e.split("://")[1],i="http://"+o;if(o.startsWith("%")&&t==="file")return he.find(r=>r.customKey===t||r.key===t)?.mapper.from(t,new URL("http://localhost"),e);try{let r=new URL(i);return he.find(p=>p.customKey===t||p.key===t)?.mapper.from(t,r,e)}catch(r){console.error("Error while parsing target path",r)}if(!n)throw new Error("Invalid target path");return null}var _=new ge,he=[{key:"file",displayName:"File system",description:"Store backups on your local file system.",customFields:{path:{type:"FolderTree",name:"path",shortDescription:"File path",longDescription:"The path to store the backup",formElement:e=>_.control(e??"")}},mapper:{to:e=>{let n=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${e.custom.path}${n}`},from:(e,n,t)=>{let i=t.startsWith("file:///")?t.split("file:///")[1]:t.split("file://")[1],r=i.startsWith("%"),m=i.slice(1).startsWith(":\\")||r?i:"/"+i;return A({destinationType:e,custom:{path:m}},k(e,n))}}},{key:"ssh",displayName:"SSH",description:"Store backups in SSH.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"The server to connect to",formElement:e=>_.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:e=>_.control(e??"",[_e.required,_e.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>_.control(e??"")}},dynamicFields:["auth-username"],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:"This is a path to a private key file locally on the machine",longDescription:"This is a path to a private key file locally on the machine"}],mapper:{to:e=>{let n=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Ae(t)+Q(i)+n}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},k(e,n))}},{key:"s3",displayName:"S3 compatible bucket",description:"Store backups in any S3 compatible bucket.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>_.control(e??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Ce).s3Providers},"use-ssl","auth-username","auth-password"],advancedFields:[{name:"s3-client",type:"Enumeration",options:["aws","minio"]},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Ce).s3StorageClasses}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+Q(t)+o}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},k(e,n))}},{key:"gcs",displayName:"Google Cloud Storage",description:"Store backups in Google Cloud Storage.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Ce).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Ce).gcsStorageClasses},"authid"],mapper:{to:e=>{let n=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${e.custom.path}${n}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},k(e,n))}},{key:"googledrive",displayName:"Google Drive",description:"Store backups in Google Drive.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>_.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},k(e,n))}},{key:"pcloud",displayName:"pCloud",description:"Store backups in pCloud.",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>P([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:"Server",longDescription:"Server",formElement:e=>_.control(e??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>_.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{server:t,path:o}=e.custom;return`${e.destinationType}://${t+Q(o)+n}`},from:(e,n,t)=>{let o=n.pathname.replace(/^\//,"");return A({destinationType:e,custom:{server:n.hostname,path:o}},k(e,n))}}},{key:"azure",displayName:"Azure Blob Storage",description:"Store backups in Azure Blob Storage.",customFields:{path:{type:"String",name:"path",shortDescription:"Container name",longDescription:"Container name",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=e.custom.path,t=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},k(e,n))}},{key:"onedrivev2",displayName:"OneDrive",description:"Store backups in OneDrive.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},k(e,n))}},{key:"od4b",displayName:"OneDrive Business",description:"Store backups in OneDrive Business.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>_.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>_.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Ae(t)+Q(i)+n}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},k(e,n))}},{key:"mssp",displayName:"Microsoft SharePoint",description:"Store backups in Microsoft SharePoint.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>_.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>_.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Ae(t)+Q(i)+n}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},k(e,n))}},{key:"sharepoint",displayName:"Microsoft SharePoint v2",description:"Store backups in Microsoft SharePoint.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},k(e,n))}},{key:"dropbox",displayName:"Dropbox",description:"Store backups in Dropbox.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},k(e,n))}},{key:"box",displayName:"Box.com",description:"Store backups in Box.com.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},k(e,n))}},{key:"jottacloud",displayName:"Jottacloud",description:"Store backups in Jottacloud.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},k(e,n))}},{key:"b2",displayName:"B2 Cloud Storage",description:"Store backups in B2 Cloud Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>_.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Application ID"},{name:"auth-password",shortDescription:"Application Key"}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+Q(t)+o}`},from:(e,n,t)=>A({destinationType:e,custom:{bucket:n.hostname,path:decodeURIComponent(n.pathname)}},k(e,n))}},{key:"e2",displayName:"IDrive e2",description:"Store backups in IDrive e2.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>_.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Access ID"},{name:"auth-password",shortDescription:"Access Secret"}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+Q(t)+o}`},from:(e,n,t)=>A({destinationType:e,custom:{bucket:n.hostname,path:n.pathname}},k(e,n))}},{key:"mega",displayName:"Mega.nz",description:"Store backups in Mega.nz.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let n=e.custom.path,t=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},k(e,n))}},{key:"msgroup",displayName:"Microsoft Office 365 Group",description:"Store backups in Microsoft Office 365 Group.",oauthField:"authid",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:"Group email",longDescription:"Group email",formElement:e=>_.control(e??"",[_e.email])},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},k(e,n))}},{key:"cloudfiles",displayName:"Rackspace CloudFiles",description:"Store backups in Rackspace CloudFiles.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>_.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>_.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let n=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Ae(t)+Q(i)+n}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},k(e,n))}},{key:"rclone",displayName:"Rclone",description:"Store backups in Rclone.",dynamicFields:[{name:"rclone-local-repository",shortDescription:"Local repository",defaultValue:""},{name:"rclone-remote-repository",shortDescription:"Remote repository",defaultValue:""},{name:"rclone-remote-path",shortDescription:"Path on remote repository",defaultValue:""}],mapper:{to:e=>{let n=e.dynamic["rclone-remote-repository"],t=e.dynamic["rclone-remote-path"],o=Object.entries(e.dynamic).filter(([r])=>!["rclone-remote-repository","rclone-remote-path"].includes(r)),i=O([...Object.entries(e.advanced),...o]);return`${e.destinationType}://${n}/${t+i}`},from:(e,n,t)=>{let{advanced:o,dynamic:i}=k(e,n);return A({destinationType:e,dynamic:A({"rclone-remote-repository":n.hostname,"rclone-remote-path":n.pathname},i)},o)}}},{key:"openstack",displayName:"OpenStack Object Storage",description:"Store backups in OpenStack Object Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket",longDescription:"Bucket",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"openstack-authuri",shortDescription:"Auth URI",type:"Enumeration",loadOptions:e=>e.get(Ce).openstackProviders},{name:"openstack-version",shortDescription:"Version",type:"Enumeration",loadOptions:e=>e.get(Ce).openstackVersions},{name:"openstack-domain-name",shortDescription:"Domain name"},{name:"openstack-tenant-name",shortDescription:"Tenant name"},{name:"openstack-region",shortDescription:"Region"}],mapper:{to:e=>{let n=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{bucket:t}=e.custom;return`${e.destinationType}://${t+n}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},k(e,n))}},{key:"webdav",displayName:"WebDAV",description:"Store backups in WebDAV.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>_.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>_.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"},{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let{port:n,server:t,path:o}=e.custom,i=e.dynamic["use-ssl"],r=O([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([p])=>p!=="use-ssl")]);return`${e.destinationType}${i?"s":""}://${t+Ae(n)+Q(o)+r}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},k(e,n))}},{key:"aftp",displayName:"FTP",description:"Store backups in FTP.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>_.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>_.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let{port:n,server:t,path:o}=e.custom,i=O([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([r])=>r!=="use-ssl")]);return`${e.destinationType}://${t+Ae(n)+Q(o)+i}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},k(e,n))}},{key:"sia",displayName:"Sia Decentrilized Cloud",description:"Store backups in Sia Decentrilized Cloud.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>_.control(e??"")}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let n=e.custom.server,t=e.dynamic["sia-targetpath"],o=O([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([i])=>i!=="sia-targetpath")]);return`${e.destinationType}://${n+Q(t)+o}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.pathname}},k(e,n))}},{key:"cos",displayName:"Tencent COS",description:"Store backups in Tencent COS.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"cos-bucket",shortDescription:"Bucket",order:1},{name:"cos-region",shortDescription:"Region",order:2},{name:"cos-app-id",shortDescription:"COS App Id",order:3},{name:"cos-secret-id",shortDescription:"COS Secret Id",order:4},{name:"cos-secret-key",shortDescription:"COS Secret Key",order:5}],mapper:{to:e=>{let n=e.custom.path,t=O([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([o])=>o!=="cos-targetpath")]);return`${e.destinationType}://${n+t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.pathname}},k(e,n))}},{key:"tahoe",displayName:"Tahoe LAFS",description:"Store backups in Tahoe LAFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>_.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>_.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")},username:{type:"String",name:"username",shortDescription:"Username",longDescription:"Username",formElement:e=>_.control(e??"")},password:{type:"Password",name:"password",shortDescription:"Password",longDescription:"Password",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"}],mapper:{to:e=>{let{port:n,server:t,path:o,username:i,password:r}=e.custom,p={"auth-username":i,"auth-password":r},m=e.dynamic["use-ssl"],f=O([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([$])=>$!=="use-ssl"),...Object.entries(p)]);return`${e.destinationType}${m?"s":""}://${t+Ae(n)+Q(o)+f}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},k(e,n))}},{key:"cifs",displayName:"CIFS",description:"Store backups in CIFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>_.control(e??"")},share:{type:"String",name:"share",shortDescription:"Share Name",longDescription:"Share Name",formElement:e=>_.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:["transport","auth-username","auth-password","auth-domain"],mapper:{to:e=>{let{share:n,server:t,path:o,username:i,password:r}=e.custom,p={"auth-username":i,"auth-password":r},m=new Map([...Object.entries(p),...Object.entries(e.advanced),...Object.entries(e.dynamic)]),f=O(Array.from(m));return`${e.destinationType}://${t+Q(n)+Q(o)+f}`},from:(e,n,t)=>{let o=n.pathname.split("/")[1],i=n.pathname.split("/").slice(2).join("/");return A({destinationType:e,custom:{server:n.hostname,share:o,path:i}},k(e,n))}}},{key:"filen",displayName:"Filen.io",description:"Store backups in Filen.io.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on Filen",longDescription:"Path on Filen",formElement:e=>_.control(e??"")}},dynamicFields:["auth-username","auth-password"],mapper:{to:e=>{let{path:n,username:t,password:o}=e.custom,i={"auth-username":t,"auth-password":o},r=new Map([...Object.entries(i),...Object.entries(e.advanced),...Object.entries(e.dynamic)]),p=O(Array.from(r));return`${e.destinationType}://${n+p}`},from:(e,n,t)=>{let o=n.hostname??"";return n.pathname&&o!==""&&n.pathname[0]!="/"&&(o+="/"),o+=n.pathname,A({destinationType:e,custom:{path:o}},k(e,n))}}},{key:"filejump",displayName:"Filejump",description:"Store backups in Filejump.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on Filejump",longDescription:"Path on Filejump",formElement:e=>_.control(e??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:"API Token",longDescription:"Filejump API Token",formElement:e=>_.control(e??"")}],mapper:{to:e=>{let{path:n,username:t,password:o,apitoken:i}=e.custom,r=(i||"").trim()===""?{"auth-username":t,"auth-password":o}:{"api-token":i},p=new Map([...Object.entries(r),...Object.entries(e.advanced),...Object.entries(e.dynamic)]),m=O(Array.from(p));return`${e.destinationType}://${n+m}`},from:(e,n,t)=>{let o=n.hostname??"";return n.pathname&&o!==""&&n.pathname[0]!="/"&&(o+="/"),o+=n.pathname,A({destinationType:e,custom:{path:o}},k(e,n))}}},{key:"storj",customKey:"storjAccessGrant",displayName:"Storj Access Grant",description:"Store backups in Storj Access Grant.",dynamicFields:[{name:"storj-shared-access",shortDescription:"Access Grant"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server"}],mapper:{to:e=>`storj://storj.io/config?storj-auth-method=Access%20grant&storj-satellite=us1.storj.io%3A7777&storj-api-key&storj-secret&${O([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>A({destinationType:e},k(e,n))}},{key:"storj",customKey:"storjApiKey",displayName:"Storj API Key",description:"Store backups in Storj API Key.",dynamicFields:[{name:"storj-satellite",shortDescription:"Satellite",type:"Enumeration",loadOptions:e=>e.get(Ce).storjSatellites},{name:"storj-api-key",shortDescription:"API Key"},{name:"storj-secret",shortDescription:"Secret"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server"}],mapper:{to:e=>`storj://storj.io/config?storj-auth-method=API%20key&${O([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>A({destinationType:e},k(e,n))}}];var jt=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,mt=class e{generate(n,t=jt){let o;do o=this.generatePassword(n,t);while(this.calculatePasswordStrength(o)<5);return o}generatePassword(n,t=jt){return Array.apply(null,{length:n}).map(()=>{let o;for(;;)if(o=String.fromCharCode(Kt()),t.test(o))return o},this).join("")}calculatePasswordStrength(n){let t=1;return n.length>=8&&t++,n.match(/[a-z]/)&&n.match(/[A-Z]/)&&t++,n.match(/\d+/)&&t++,n.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&t++,Math.min(t,5)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=De({token:e,factory:e.\u0275fac,providedIn:"root"})};var tn=["formRef"];function nn(e,n){if(e&1&&S(0),e&2){let t=n.$implicit;H(" ",t.DisplayName," ")}}function on(e,n){if(e&1&&d(0,"spk-progress-bar",37),e&2){let t=c(3);Pe("error",t.calculatePasswordStrength()===1)("warn",t.calculatePasswordStrength()===2)("primary",t.calculatePasswordStrength()===4)("success",t.calculatePasswordStrength()===5),u("value",t.calculatePasswordStrength()*(100/5))}}function rn(e,n){e&1&&(s(0,"span",32),w(1,9),a())}function an(e,n){e&1&&(D(0,7,1),d(1,"spk-icon"),E())}function sn(e,n){e&1&&(D(0,7,2),d(1,"spk-icon"),E())}function ln(e,n){e&1&&(D(0,10,1),d(1,"spk-icon",39),E())}function pn(e,n){e&1&&(D(0,10,2),d(1,"spk-icon"),E())}function cn(e,n){if(e&1){let t=I();s(0,"button",38),N("click",function(){F(t);let i=c(3);return g(i.copyPassword())}),D(1,10),C(2,ln,2,0)(3,pn,2,0),E(),a()}if(e&2){let t=c(3);l(2),T(t.copiedPassword()?2:3)}}function un(e,n){e&1&&(s(0,"spk-alert",36),w(1,11),a())}function mn(e,n){if(e&1){let t=I();s(0,"div",27)(1,"spk-form-field")(2,"label",28),D(3,6),d(4,"sup"),E(),a(),d(5,"input",29),a(),C(6,on,1,9,"spk-progress-bar",30),s(7,"spk-form-field"),d(8,"input",31),C(9,rn,2,0,"span",32),a(),s(10,"div",33)(11,"button",34),N("click",function(){F(t);let i=c(2);return g(i.showPassword.set(!i.showPassword()))}),D(12,7),C(13,an,2,0)(14,sn,2,0),E(),a(),s(15,"button",34),N("click",function(){F(t);let i=c(2);return g(i.generatePassword())}),D(16,8),d(17,"spk-icon"),E(),a(),C(18,cn,4,1,"button",35),a(),C(19,un,2,0,"spk-alert",36),a()}if(e&2){let t=c(2);l(5),u("type",t.showPassword()?"text":"password"),l(),T(t.generalForm.value.password?6:-1),l(2),u("type",t.showPassword()?"text":"password"),l(),T(t.generalForm.value.repeatPassword&&t.generalForm.value.repeatPassword!==t.generalForm.value.password?9:-1),l(4),T(t.showPassword()?13:14),l(5),T(t.showCopyPassword()?18:-1),l(),T(t.generalForm.value.password&&t.generalForm.value.password===t.generalForm.value.repeatPassword?19:-1)}}function dn(e,n){if(e&1&&(s(0,"spk-select",24)(1,"label",25),w(2,5),a(),d(3,"input",26),C(4,nn,1,1,"ng-template"),a(),C(5,mn,20,7,"div",27)),e&2){let t=c();u("options",t.encryptionOptions())("isClearable",!1),l(5),T(t.encryptionFieldSignal()!==""?5:-1)}}function _n(e,n){if(e&1&&(s(0,"button",22),D(1,12),d(2,"spk-icon"),E(),a()),e&2){let t=c();u("disabled",t.generalForm.invalid)}}function Fn(e,n){if(e&1&&(s(0,"spk-tooltip",23)(1,"button",22),D(2,13),d(3,"spk-icon"),E(),a()()),e&2){let t=c();u("disabled",!(t.showCopyPassword()&&!t.copiedPassword())),l(),u("disabled",t.generalForm.invalid||t.showCopyPassword()&&!t.copiedPassword())}}var ze=new ge,qt=(e={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>ze.group({name:ze.control(e.name,[_e.required]),description:ze.control(e.description),encryption:ze.control(e.encryption,[Xt()]),password:ze.control(e.password,[Pt(n=>n?.value.encryption!=="",[_e.required])]),repeatPassword:ze.control(e.repeatPassword,[Pt(n=>n?.value.encryption!=="",[_e.required])])}),Ot={Key:"",DisplayName:"None"},kt=class e{#n=R(pe);#e=R(Ee);#o=R(mt);#i=R(Se);#t=R(it);formRef=Me.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=P(!1);copiedPassword=P(!1);showCopyPassword=P(!1);encryptionEffect=et(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});calculatePasswordStrength=L(()=>{let t=this.generalFormSignal()?.password??"";return this.#o.calculatePasswordStrength(t)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit()}async copyPassword(){let n=this.generalForm.controls.password.value;await this.#r(n??""),this.copiedPassword.set(!0)}async#r(n){try{await navigator.clipboard.writeText(n)}catch{try{let o=document.createElement("textarea");o.value=n,document.body.appendChild(o),o.select(),document.execCommand("copy"),document.body.removeChild(o)}catch(o){console.error("Failed to copy text: ",o)}}}displayFn(){let n=this.#t.systemInfo()?.EncryptionModules??[];return t=>{let o=[Ot,...n].find(i=>i.Key===t);return o?`${o.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let n=this.#o.generate(16);this.generalForm.controls.password.setValue(n),this.generalForm.controls.repeatPassword.setValue(n),this.showCopyPassword.set(!0)}next(){this.#n.navigate(["destination"],{relativeTo:this.#e.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=se({type:e,selectors:[["app-general"]],viewQuery:function(t,o){t&1&&Re(o.formRef,tn,5),t&2&&we()},decls:20,vars:3,consts:()=>{let n;n=$localize`Your backup name`;let t;t=$localize`Your backup description`;let o;o=$localize`General backup settings`;let i;i=$localize` Backup name ${"\uFFFD#7\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#7\uFFFD"}:CLOSE_SUPERSCRIPT:`;let r;r=$localize`Backup description`;let p;p=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let m;m=$localize`Encryption`;let f;f=$localize`Encryption`;let $;$=$localize`Password`;let U;U=$localize`Repeat password`;let x;x=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let v;v=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,v=Ne(v);let B;B=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let Z;Z=$localize`Passwords do not match`;let Y;Y=$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:`,Y=Ne(Y);let h;h=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let y;y=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let 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,p,f,x,v,B,Z,Y,h,y,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",t,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["message","Remember to copy the password",1,"primary",3,"disabled"],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",m,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",$,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",U,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(t,o){if(t&1){let i=I();s(0,"form",14,0),N("submit",function(){return F(i),g(o.next())}),s(2,"h3",15),w(3,1),a(),s(4,"spk-form-field")(5,"label",16),D(6,2),d(7,"sup"),E(),a(),d(8,"input",17),a(),s(9,"spk-form-field")(10,"label",18),w(11,3),a(),d(12,"textarea",19),a(),C(13,dn,6,3),s(14,"div",20)(15,"button",21),N("click",function(){return F(i),g(o.exit())}),D(16,4),d(17,"spk-icon"),E(),a(),C(18,_n,3,1,"button",22)(19,Fn,4,2,"spk-tooltip",23),a()()}t&2&&(u("formGroup",o.generalForm),l(13),T(o.isNew()?13:-1),l(5),T(o.encryptionFieldSignal()===""?18:19))},dependencies:[He,Le,de,Fe,Ge,Ve,Be,ue,me,Ie,ce,nt,tt,ot],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 gn(e,n){if(e&1){let t=I();s(0,"div",24)(1,"spk-form-field")(2,"label",25),w(3,7),a(),s(4,"input",26,0),q("ngModelChange",function(i){F(t);let r=c();return j(r.scheduleFields.nextTime().time,i)||(r.scheduleFields.nextTime().time=i),g(i)}),N("focus",function(){F(t);let i=ie(5);return g(i.showPicker())}),a(),s(6,"spk-icon",27),S(7,"clock"),a()(),s(8,"spk-form-field"),d(9,"label",28),s(10,"input",29,1),q("ngModelChange",function(i){F(t);let r=c();return j(r.scheduleFields.nextTime().date,i)||(r.scheduleFields.nextTime().date=i),g(i)}),N("focus",function(){F(t);let i=ie(11);return g(i.showPicker())}),a(),s(12,"spk-icon",27),S(13,"calendar"),a()()(),s(14,"div",24)(15,"spk-form-field")(16,"label",30),w(17,8),a(),s(18,"input",31),q("ngModelChange",function(i){F(t);let r=c();return j(r.scheduleFields.runAgain().repeatValue,i)||(r.scheduleFields.runAgain().repeatValue=i),g(i)}),a()(),s(19,"spk-select",32)(20,"input",33),q("ngModelChange",function(i){F(t);let r=c();return j(r.scheduleFields.runAgain().repeatUnit,i)||(r.scheduleFields.runAgain().repeatUnit=i),g(i)}),a()()(),s(21,"app-toggle-card",34),X(22,35),w(23,9),z(),s(24,"div",36)(25,"spk-toggle",19),D(26,10),s(27,"input",20),q("ngModelChange",function(i){F(t);let r=c();return j(r.scheduleFields.runAgain().allowedDays.mon,i)||(r.scheduleFields.runAgain().allowedDays.mon=i),g(i)}),a(),E(),a(),s(28,"spk-toggle",19),D(29,11),s(30,"input",20),q("ngModelChange",function(i){F(t);let r=c();return j(r.scheduleFields.runAgain().allowedDays.tue,i)||(r.scheduleFields.runAgain().allowedDays.tue=i),g(i)}),a(),E(),a(),s(31,"spk-toggle",19),D(32,12),s(33,"input",20),q("ngModelChange",function(i){F(t);let r=c();return j(r.scheduleFields.runAgain().allowedDays.wed,i)||(r.scheduleFields.runAgain().allowedDays.wed=i),g(i)}),a(),E(),a(),s(34,"spk-toggle",19),D(35,13),s(36,"input",20),q("ngModelChange",function(i){F(t);let r=c();return j(r.scheduleFields.runAgain().allowedDays.thu,i)||(r.scheduleFields.runAgain().allowedDays.thu=i),g(i)}),a(),E(),a(),s(37,"spk-toggle",19),D(38,14),s(39,"input",20),q("ngModelChange",function(i){F(t);let r=c();return j(r.scheduleFields.runAgain().allowedDays.fri,i)||(r.scheduleFields.runAgain().allowedDays.fri=i),g(i)}),a(),E(),a(),s(40,"spk-toggle",19),D(41,15),s(42,"input",20),q("ngModelChange",function(i){F(t);let r=c();return j(r.scheduleFields.runAgain().allowedDays.sat,i)||(r.scheduleFields.runAgain().allowedDays.sat=i),g(i)}),a(),E(),a(),s(43,"spk-toggle",19),D(44,16),s(45,"input",20),q("ngModelChange",function(i){F(t);let r=c();return j(r.scheduleFields.runAgain().allowedDays.sun,i)||(r.scheduleFields.runAgain().allowedDays.sun=i),g(i)}),a(),E(),a()()()}if(e&2){let t=c();l(4),W("ngModel",t.scheduleFields.nextTime().time),l(6),W("ngModel",t.scheduleFields.nextTime().date),l(8),W("ngModel",t.scheduleFields.runAgain().repeatValue),l(),u("options",t.unitOptions)("isClearable",!1),l(),W("ngModel",t.scheduleFields.runAgain().repeatUnit),l(),u("disallowToggle",!0),l(6),W("ngModel",t.scheduleFields.runAgain().allowedDays.mon),l(3),W("ngModel",t.scheduleFields.runAgain().allowedDays.tue),l(3),W("ngModel",t.scheduleFields.runAgain().allowedDays.wed),l(3),W("ngModel",t.scheduleFields.runAgain().allowedDays.thu),l(3),W("ngModel",t.scheduleFields.runAgain().allowedDays.fri),l(3),W("ngModel",t.scheduleFields.runAgain().allowedDays.sat),l(3),W("ngModel",t.scheduleFields.runAgain().allowedDays.sun)}}var Cn=[{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`}],Oe={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}}},$t=class e{#n=R(Se);#e=R(pe);#o=R(Ee);unitOptions=Cn;scheduleFields=this.#n.scheduleFields;goBack(){this.#e.navigate(["source-data"],{relativeTo:this.#o.parent})}next(){this.#e.navigate(["options"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=se({type:e,selectors:[["app-schedule"]],decls:16,vars:2,consts:()=>{let n;n=$localize`Schedule`;let t;t=$localize` Automatically run backups ${"\uFFFD#5\uFFFD\uFFFD/#5\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#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let r;r=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let p;p=$localize`Next time`;let m;m=$localize`Run again every`;let f;f=$localize`Allowed days`;let $;$=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let U;U=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let x;x=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let v;v=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let B;B=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let Z;Z=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let Y;return Y=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],n,t,o,i,r,p,m,f,$,U,x,v,B,Z,Y,[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","",1,"raised","primary",3,"click"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","focus","ngModel"],["suffix",""],["for","date"],["type","date","id","date",3,"ngModelChange","focus","ngModel"],["for","repeatValue"],["type","number","id","repeatValue",3,"ngModelChange","ngModel"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit",3,"ngModelChange","ngModel"],[3,"disallowToggle"],["title",""],[1,"days-wrap"]]},template:function(t,o){t&1&&(s(0,"h3",17),w(1,2),a(),s(2,"div",18)(3,"spk-toggle",19),D(4,3),s(5,"input",20),q("ngModelChange",function(r){return j(o.scheduleFields.autoRun,r)||(o.scheduleFields.autoRun=r),r}),a(),E(),a(),s(6,"p"),w(7,4),a()(),C(8,gn,46,14),s(9,"div",21)(10,"button",22),N("click",function(){return o.goBack()}),D(11,5),d(12,"spk-icon"),E(),a(),s(13,"button",23),N("click",function(){return o.next()}),D(14,6),d(15,"spk-icon"),E(),a()()),t&2&&(l(5),W("ngModel",o.scheduleFields.autoRun),l(3),T(o.scheduleFields.autoRun()?8:-1))},dependencies:[Ke,de,Ue,be,Fe,at,ue,ve,ce,Ie,me,Xe],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem 2.5rem 1.5rem;display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function Sn(e,n){if(e&1){let t=I();s(0,"spk-select",0)(1,"input",4),N("ngModelChange",function(i){F(t);let r=c(2);return g(r.updateStateExpression(i))}),a()()}if(e&2){let t,o=c(2);u("options",o.fileGroupOptions())("isClearable",!1),l(),u("ngModel",(t=o.pathState())==null?null:t.expression)}}function hn(e,n){if(e&1){let t=I();s(0,"spk-form-field")(1,"input",4),N("ngModelChange",function(i){F(t);let r=c(2);return g(r.updateStateExpression(i))}),a()()}if(e&2){let t,o=c(2);l(),u("ngModel",(t=o.pathState())==null?null:t.expression)}}function fn(e,n){if(e&1){let t=I();s(0,"spk-select",0)(1,"input",1),N("ngModelChange",function(i){F(t);let r=c();return g(r.updateStateType(i))}),a()(),C(2,Sn,2,3,"spk-select",0)(3,hn,2,1,"spk-form-field"),s(4,"div",2),N("click",function(){F(t);let i=c();return g(i.removeFilter())}),s(5,"spk-icon",3),S(6,"x-circle"),a()()}if(e&2){let t,o,i=c();u("options",i.expressionOptions())("isClearable",!1),l(),u("ngModel",(t=i.pathState())==null?null:t.type),l(),T(((o=i.pathState())==null?null:o.type)==="-FileGroup"||((o=i.pathState())==null?null:o.type)==="+FileGroup"?2:3)}}var Qt=[{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"}],Tn=[{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"}],Ft=class e{path=ht.required();osType=ht();pathChange=St();remove=St();expressionOptions=P(Qt);fileGroupOptions=P(Tn);pathState=P(null);typeState=L(()=>{let n=this.pathState();return n?n.type:null});pathEffect=et(()=>{let n=this.path(),t=n.slice(1),o=n.startsWith("-")?"-":"+",i=this.osType()==="Windows",r=i?"\\":"/",p=t.startsWith("%");return t===""?this.pathState.set({type:"-Unknown",path:"___none___",expression:""}):p&&t.endsWith(r)||i&&t.slice(2).startsWith("\\")&&t.endsWith("\\")||t.startsWith(r)&&t.endsWith(r)?this.pathState.set({type:`${o}Folder`,path:t,expression:t}):t.startsWith("*")&&t.endsWith(`*${r}`)?this.pathState.set({type:`${o}FolderNameIncludes`,path:t,expression:t.slice(1,-2)}):t.startsWith("[.*")&&t.endsWith(`[^\\${r}]*]`)?this.pathState.set({type:`${o}FileNameIncludes`,path:t,expression:t.slice(3,-7)}):t.startsWith("{")&&t.endsWith("}")?this.pathState.set({type:`${o}FileGroup`,path:t,expression:t.slice(1,-1)}):t.startsWith("[")&&t.endsWith("]")?this.pathState.set({type:`${o}Regex`,path:t,expression:t.slice(1,-1)}):t.startsWith("*.")?this.pathState.set({type:`${o}Extension`,path:t,expression:t.slice(2)}):this.pathState.set({type:`${o}Expression`,path:t,expression:t})});updateStateType(n){this.pathState.update(t=>(t.type=n,t.path=this.#e(t),t)),this.#n()}updateStateExpression(n){this.pathState.update(t=>(t.expression=n,t.path=this.#e(t),t)),this.#n()}#n(){setTimeout(()=>this.pathChange.emit(this.pathState().path))}#e(n){let t=n.type.slice(0,1),o=n.type.slice(1),i=this.osType()==="Windows",r=i?"\\":"/",m=i&&!n.expression.startsWith("%")?n.expression.slice(2):n.expression,f=n.path.startsWith("%");if(o==="Unknown")return`${t}${n.expression}`;if(o==="Folder"){let $=f||m.startsWith(r),U=m.endsWith(r);return U&&$?`${t}${n.expression}`:U?`${t}${n.expression}${r}`:$?`${t}${r}${n.expression}`:`${t}${r}${n.expression}${r}`}return o==="FolderNameIncludes"?`${t}*${n.expression}*${r}`:o==="FileNameIncludes"?`${t}[.*${n.expression}[^\\${r}]*]`:o==="FileGroup"?`${t}{${n.expression}}`:o==="Regex"?`${t}[${n.expression}]`:o==="Extension"?`${t}*.${n.expression}`:`${t}${n.expression}`}removeFilter(){this.remove.emit()}displayFn(n){let t=Qt.find(o=>o.value===n);return t?t.key:""}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=se({type:e,selectors:[["app-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:1,vars:1,consts:()=>{let n;return n=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",n,3,"ngModelChange","ngModel"],[1,"filter-removal",3,"click"],[1,"spk-primary"],["type","text",3,"ngModelChange","ngModel"]]},template:function(t,o){t&1&&C(0,fn,7,4),t&2&&T(o.pathState()?0:-1)},dependencies:[Ke,de,Fe,at,ce,ue,me],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 Dn=["formRef"];function En(e,n){if(e&1){let t=I();s(0,"app-filter",42),N("pathChange",function(i){let r=F(t).$index,p=c(2);return g(p.patchPathAt(i,r))})("remove",function(){let i=F(t).$index,r=c(2);return g(r.removePathAt(i))}),a()}if(e&2){let t,o=n.$implicit,i=c(2);u("path",o)("osType",(t=i.osType())!==null&&t!==void 0?t:"")}}function yn(e,n){if(e&1&&ne(0,En,1,2,"app-filter",41,te),e&2){let t=c();oe(t.pathArray())}}function An(e,n){if(e&1&&(s(0,"div",40)(1,"spk-form-field"),d(2,"input",43),a(),s(3,"spk-select",44),d(4,"input",45),a()()),e&2){let t=c();l(3),u("options",t.sizeOptions())("isClearable",!1)}}var fe=new ge,Pn=["Bytes","KB","MB","GB","TB","PB"],Yt=(e={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>fe.group({path:fe.control(e.path),excludes:fe.group({hidden:fe.control(e.excludes.hidden),system:fe.control(e.excludes.system),temporary:fe.control(e.excludes.temporary),filesLargerThan:fe.group({size:fe.control(null),unit:fe.control(null)})})}),Mt=class e{#n=R(Se);#e=R(pe);#o=R(Ee);formRef=Me.required("formRef");sourceDataForm=this.#n.sourceDataForm;sourceDataFormSignal=this.#n.sourceDataFormSignal;newPathCtrl=new rt("");filesLargerThan=L(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=P(Pn);osType=this.#n.osType;pathSignal=K(this.sourceDataForm.controls.path.valueChanges);pathArray=L(()=>this.pathSignal()?.split("\0").filter(n=>n.startsWith("-")||n.startsWith("+")||n==="___none___")??[]);addFilter(n="-*"){let t=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${t}\0${n}`)}patchPathAt(n,t){let i=this.sourceDataForm.controls.path.value.split("\0").filter(p=>!p.startsWith("-")&&!p.startsWith("+")).join("\0"),r=this.pathArray().map((p,m)=>m===t?`${n}`:`${p}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${r}`)}removePathAt(n){let o=this.sourceDataForm.controls.path.value.split("\0").filter(r=>!r.startsWith("-")&&!r.startsWith("+")).join("\0"),i=this.pathArray().filter((r,p)=>p!==n).join("\0");this.sourceDataForm.controls.path.setValue(`${o}\0${i}`)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let n=this.sourceDataForm.controls.path.value,t=this.newPathCtrl.value;this.sourceDataForm.controls.path.setValue(`${n}\0${t}`),this.newPathCtrl.setValue("")}goBack(){this.#e.navigate(["destination"],{relativeTo:this.#o.parent})}next(){this.#e.navigate(["schedule"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=se({type:e,selectors:[["app-source-data"]],viewQuery:function(t,o){t&1&&Re(o.formRef,Dn,5),t&2&&we()},decls:55,vars:12,consts:()=>{let n;n=$localize`Path`;let t;t=$localize`Add a direct path`;let o;o=$localize`Hidden files`;let i;i=$localize`System files`;let r;r=$localize`Temporary files`;let p;p=$localize`Source Data`;let m;m=$localize`Folder path`;let f;f=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let $;$=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let U;U=$localize`Source Data`;let x;x=$localize`Add Path`;let v;v=$localize`Add a path directly from your machine.`;let B;B=$localize`Filters`;let Z;Z=$localize`Customize your filters.`;let Y;Y=$localize`Add filter`;let h;h=$localize`Exclude`;let y;y=$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 J;J=$localize` Temporary files ${"\uFFFD#51\uFFFD\uFFFD/#51\uFFFD"}:TAG_INPUT:`;let re;re=$localize` Files larger than `;let ee;return ee=$localize`Select an option...`,[["formRef",""],p,m,f,$,U,x,v,B,Z,Y,h,y,G,M,J,re,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",n,"formControlName","path"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"row-inputs"],["type","text","placeholder",t,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",o,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",r,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],["type","number","formControlName","size"],[3,"options","isClearable"],["type","text","formControlName","unit","placeholder",ee]]},template:function(t,o){if(t&1){let i=I();s(0,"form",17,0),N("submit",function(){return F(i),g(o.next())}),s(2,"div",18)(3,"h3",19),w(4,1),a(),s(5,"app-file-tree",20)(6,"label",21),w(7,2),a(),d(8,"input",22),a(),s(9,"div",23)(10,"button",24),N("click",function(){return F(i),g(o.goBack())}),D(11,3),d(12,"spk-icon"),E(),a(),s(13,"button",25),D(14,4),d(15,"spk-icon"),E(),a()()(),s(16,"div",26)(17,"h3",19),w(18,5),a(),s(19,"app-toggle-card",27),X(20,28),w(21,6),z(),s(22,"p",29),w(23,7),a(),s(24,"div",30)(25,"spk-form-field"),d(26,"input",31),a(),s(27,"button",32),N("click",function(){return F(i),g(o.addNewPath())}),s(28,"spk-icon"),S(29,"plus"),a()()()(),s(30,"app-toggle-card",27),X(31,28),w(32,8),z(),s(33,"p",29),w(34,9),a(),s(35,"button",33),N("click",function(){return F(i),g(o.addFilter())}),w(36,10),a(),C(37,yn,2,0),a(),s(38,"app-toggle-card",34),X(39,28),w(40,11),z(),s(41,"p",29),w(42,12),a(),s(43,"spk-toggle",35),D(44,13),d(45,"input",36),E(),a(),s(46,"spk-toggle",35),D(47,14),d(48,"input",37),E(),a(),s(49,"spk-toggle",35),D(50,15),d(51,"input",38),E(),a(),s(52,"spk-toggle",39),N("click",function(){return F(i),g(o.toggleFilesLargerThan())}),w(53,16),a(),C(54,An,5,2,"div",40),a()()()}if(t&2){let i;u("formGroup",o.sourceDataForm),l(5),u("multiSelect",!0)("startingPath",o.getPath())("showFiles",!0),l(14),u("disallowToggle",!0),l(7),u("formControl",o.newPathCtrl),l(4),u("disallowToggle",!0),l(7),T((i=o.pathSignal())!=null&&i.length?37:-1),l(),u("disallowToggle",!0),l(14),Pe("active",o.filesLargerThan()),l(2),T(o.filesLargerThan()?54:-1)}},dependencies:[Ke,Le,de,Ue,be,Fe,Ge,He,st,Ve,Be,lt,ue,ce,Ie,ve,me,pt,Xe,Ft],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 Jt="1W:1D,4W:1W,12M:1M",Te=new ge,Se=class e{#n=R(pe);#e=R(it);#o=R(xe);#i=R(ct);generalForm=qt();sourceDataForm=Yt();scheduleFields={autoRun:P(Oe.autoRun),nextTime:P(Oe.nextTime),runAgain:P(Oe.runAgain)};destinationForm=Zt();settings=P([]);optionsFields={remoteVolumeSize:P("50MB"),backupRetention:P("all"),backupRetentionTime:P(""),backupRetentionVersions:P(0),backupRetentionCustom:P("")};isDraft=P(!1);backupId=P(null);isSubmitting=P(!1);finishedLoading=P(!1);backupDefaults=P(null);isNew=L(()=>this.backupId()==="new");osType=L(()=>this.#e.systemInfo()?.OSType);selectedOptions=P([]);selectedAdvancedFormPair=P([]);destinationFormPair=P({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=L(()=>{let n=this.destinationFormPair()?.advanced??[],t=this.selectedAdvancedFormPair()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});selectedHttpOptions=P([]);notSelectedHttpOptions=L(()=>{let n=this.httpOptions(),t=this.selectedHttpOptions()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});sourceDataFormSignal=K(this.sourceDataForm.valueChanges);destinationFormSignal=K(this.destinationForm.valueChanges);generalFormSignal=K(this.generalForm.valueChanges);encryptionFieldSignal=K(this.generalForm.controls.encryption.valueChanges);destinationOptions=L(()=>this.#e.backendModules()??[]);httpOptions=L(()=>this.#e.systemInfo()?.GenericModules?.find(n=>n.Key==="http-options")?.Options?.map(this.#t)??[]);advancedOptions=L(()=>this.#e.systemInfo()?.Options?.map(this.#t)??[]);#t(n){return{name:n.Name,type:n.Type,shortDescription:n.ShortDescription??void 0,longDescription:n.LongDescription??void 0,options:n.ValidValues}}encryptionOptions=L(()=>{let n=this.#e.systemInfo()?.EncryptionModules??[];return[Ot,...n]});nonSelectedOptions=L(()=>this.advancedOptions().sort((n,t)=>n?.name&&t?.name?n?.name.localeCompare(t?.name):0).filter(n=>this.selectedOptions()?.findIndex(t=>t.name===n.name)===-1));addAdvancedFormPairByName(n,t,o){let i=this.notSelectedAdvancedFormPair().find(r=>r.name===n);i&&this.addAdvancedFormPair(i,t,o)}addHttpOptionByName(n,t,o){let i=this.notSelectedHttpOptions().find(r=>r.name===n);i&&this.addHttpOption(i,t,o)}addAdvancedFormPair(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,r=o??n.defaultValue;this.createFormField(i,n,r),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),n])}addHttpOption(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,r=o??n.defaultValue;this.createFormField(i,n,r),this.selectedHttpOptions.set([...this.selectedHttpOptions(),n])}removeAdvancedFormPair(n,t){this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced.removeControl(n.name),this.selectedAdvancedFormPair().findIndex(i=>i.name===n.name)!==-1?this.selectedAdvancedFormPair.update(i=>(i=i.filter(r=>r.name!==n.name),i)):this.selectedHttpOptions.update(i=>(i=i.filter(r=>r.name!==n.name),i))}removeHttpOption(n,t){this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced.removeControl(n.name),this.selectedHttpOptions.update(o=>(o=o.filter(i=>i.name!==n.name),o))}submit(){this.isSubmitting.set(!0);let n=this.#l(),t=this.backupId();t==="new"||!t||this.isDraft()?this.#o.postApiV1Backups({requestBody:n}).pipe(je(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{this.exit()},error:o=>{}}):this.#o.putApiV1BackupById({id:t,requestBody:n}).pipe(je(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{this.exit()},error:o=>{}})}exit(){this.#c(),this.#n.navigate(["/"])}updateFieldsFromTargetUrl(n){this.#r(),setTimeout(()=>{this.#s(n)})}#r(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.selectedHttpOptions.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(n){let t=n.Sources??"",o=n.Filters?.map(m=>`${m.Include?"":"-"}${m.Expression}`)??[],i=n.Settings?.find(m=>m.Name==="--exclude-files-attributes")?.Value??"",r=n.Settings?.find(m=>m.Name==="--skip-files-larger-than")??null,p={path:[...t,...o].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:r?.Value?.toUpperCase()??null}};this.sourceDataForm.patchValue(p)}mapDestinationToForm(n){let t=n.TargetURL?Nt(n.TargetURL):null;t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}#s(n){let t=Nt(n);t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}mapGeneralToForm(n){let t=n.Settings?.find(r=>r.Name==="encryption-module"),o=t?.Value&&t.Value.length?t.Value:"",i={name:n.Name??"",description:n.Description??""};o&&o!==""&&(i.encryption=o),this.generalForm.patchValue(i)}mapScheduleToForm(n){if(!n){this.scheduleFields.autoRun.set(!1);return}let t=this.#i.fromString(n.Repeat)??null,o=this.#p(n.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>A(A({},i),o)),this.scheduleFields.runAgain.set({repeatValue:t?.value??1,repeatUnit:t?.unit??"D",allowedDays:{mon:n.AllowedDays?.includes("mon")??!1,tue:n.AllowedDays?.includes("tue")??!1,wed:n.AllowedDays?.includes("wed")??!1,thu:n.AllowedDays?.includes("thu")??!1,fri:n.AllowedDays?.includes("fri")??!1,sat:n.AllowedDays?.includes("sat")??!1,sun:n.AllowedDays?.includes("sun")??!1}})}mapOptionsToForms(n){let t=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","keep-time","keep-versions","retention-policy"],o=n.Settings?.filter(p=>!t.includes(p.Name)),i=n.Settings?.filter(p=>t.includes(p.Name));this.settings.set(o??[]),o?.forEach(p=>{if(p.Name==="encryption-module")return this.generalForm.controls.encryption.setValue(p.Value??"")});var r="all";i?.forEach(p=>{if(console.log("x",p.Name),p.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(p.Value??"50MB"),p.Name==="keep-time"&&(p.Value??"")!=="")return r="time",this.optionsFields.backupRetentionTime.set(p.Value??"");if(p.Name==="keep-versions"&&(p.Value??"")!=="")return r="versions",this.optionsFields.backupRetentionVersions.set(p.Value?parseInt(p.Value):null);if(p.Name==="retention-policy"&&(p.Value??"")!=="")if(p.Value===Jt)r="smart";else return r="custom",this.optionsFields.backupRetentionCustom.set(p.Value??"")}),this.optionsFields.backupRetention.set(r)}getCurrentTargetUrl(){return this.#a(this.destinationForm.controls.destinations)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#l(){let n=this.generalForm.value,t=this.getScheduleFormValue(),o=this.sourceDataForm.value,r=this.destinationForm.value.destinations?.length?this.#a(this.destinationForm.controls.destinations):[],p=null;t.runAgain?.repeatUnit&&t.runAgain?.repeatValue&&(p=this.#i.toString(t.runAgain.repeatValue,t.runAgain.repeatUnit));let m=t.runAgain?.allowedDays?Object.entries(t.runAgain?.allowedDays).filter(([v,B])=>B).map(([v,B])=>v):[],f=o.path?.split("\0")??[],$=this.mapFormsToSettings(),U=Object.entries(o.excludes??{}).filter(([v,B])=>B&&v!=="filesLargerThan").map(([v])=>v),x=o.excludes?.filesLargerThan;return U.length&&$.push({Name:"--exclude-files-attributes",Value:U.join(",")}),x&&x.size!==null&&x.unit!==null&&$.push({Name:"--skip-files-larger-than",Value:`${x.size}${x.unit}`}),{Backup:{Name:n.name,Description:n.description,TargetURL:r[0]??null,Sources:f.filter(v=>!v.startsWith("-")),Settings:$,Filters:f.filter(v=>v.startsWith("-")).map((v,B)=>({Order:B,Include:!1,Expression:v.slice(1)}))},Schedule:t.autoRun?{Repeat:p,Time:t.nextTime?.date?new Date(`${t.nextTime.date}T${t.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:m}:null}}mapFormsToSettings(n=[]){let t=this.generalForm.value,o=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","keep-time","keep-versions","retention-policy","dblock-size"],i=[{Name:"--no-encryption",Value:"True"}];t.encryption!==""&&(i=[{Name:"encryption-module",Value:t.encryption??null},{Name:"passphrase",Value:t.password??null}]);let r=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":r.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":r.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":r.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":r.push({Name:"retention-policy",Value:Jt});break}let p=[...n,...o],m=this.settings().filter(f=>!p.includes(f.Name)).map(f=>{let $=f.Value;return typeof f.Value=="number"&&($=f.Value.toString()),typeof f.Value=="boolean"&&($=f.Value?"True":"False"),{Name:f.Name,Value:$}});return[...i,...r,...m]}#a(n){return n.controls.map(t=>ut(t.value))}#p(n){if(!n||n?.indexOf("T")===-1)return{time:n??"13:00"};let t=new Date(n);return{time:`${(""+t.getHours()).padStart(2,"0")}:${(""+t.getMinutes()).padStart(2,"0")}`,date:t.toISOString().split("T")[0]}}createFormField(n,t,o){if(t.type==="String"||t.type==="FileTree"||t.type==="FolderTree"||t.type==="Password"||t.type==="Enumeration"||t.type==="NonValidatedSelectableString"||t.type==="Path"){n.addControl(t.name,Te.control(o));return}if(t.type==="Size"){n.addControl(t.name,Te.control(o));return}if(t.type==="Integer"){n.addControl(t.name,Te.control(o?parseInt(o):0));return}if(t.type==="Boolean"){n.addControl(t.name,Te.control(o==="true"||o==="True"));return}if(t.type==="Flags"){n.addControl(t.name,Te.control(o??""));return}if(t.type==="Timespan"||t.type==="DateTime"){n.addControl(t.name,Te.control(o,[_e.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(n,t,o=!1){let i=he.find(h=>h.customKey===n||h.key===n),r=i?.key,p=this.destinationOptions().find(h=>h.Key===r),m=this.httpOptions();if(!p||!p.Options)return;let f=i&&i.oauthField?i.oauthField:null,$=i&&i.customFields?i.customFields:{},U=i&&i.dynamicFields?i.dynamicFields:[],x=i&&i.advancedFields?i.advancedFields:[],v=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:f,custom:[],dynamic:[],advanced:[]});let B=Te.group({}),Z=Te.group({}),Y=Te.group({});$&&Object.entries($).forEach(([h,y],G)=>{let re=y,{formElement:M}=re,J=wt(re,["formElement"]);B.addControl(h,M(t?.custom[h])),this.destinationFormPair.update(ee=>(ee.custom.push(A({order:900+G},J)),ee))});for(let h=0;h<p.Options.length;h++){let y=p.Options[h];if(y.Deprecated)continue;let G=U.find(M=>M===y.Name||M.name===y.Name);if(G){let M=G&&typeof G!="string",J=M?G?.defaultValue??y.DefaultValue:y.DefaultValue,re={name:y.Name,type:y.Type,shortDescription:y.ShortDescription??void 0,longDescription:y.LongDescription??void 0,options:y.ValidValues,order:900+h},ee=M?A(A({},re),G):re,Ze=t?.dynamic[y.Name]??J??y.DefaultValue;this.createFormField(Z,ee,Ze),this.destinationFormPair.update($e=>($e.dynamic.push(ee),$e))}else{if(v.find(ae=>ae===y.Name))continue;let J=x.find(ae=>ae===y.Name||ae.name===y.Name),re=J&&typeof J!="string",ee=t?.advanced[y.Name],b=ee??y.DefaultValue,Ze={name:y.Name,type:y.Type,shortDescription:y.ShortDescription??void 0,longDescription:y.LongDescription??void 0,options:y.ValidValues,defaultValue:b,order:900+h},$e=re?A(A({},Ze),J):Ze;o&&ee&&(this.createFormField(Y,$e,b),this.selectedAdvancedFormPair.update(ae=>(ae.push($e),ae))),this.destinationFormPair.update(ae=>(ae.advanced.push($e),ae))}}for(let h=0;h<m.length;h++){let y=m[h],G=t?.advanced[y.name],M=G??y.defaultValue;o&&G&&(this.createFormField(Y,y,M),this.selectedHttpOptions.update(J=>(J.push(y),J)))}this.destinationFormPair.update(h=>({oauthField:h.oauthField,custom:h.custom.sort((y,G)=>y.order-G.order),dynamic:h.dynamic.sort((y,G)=>y.order-G.order),advanced:h.advanced.sort((y,G)=>y.order-G.order)})),this.destinationForm.controls.destinations.push(en({key:i?.customKey??n,customGroup:B,dynamicGroup:Z,advancedGroup:Y}))}#c(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(Oe.autoRun),this.scheduleFields.nextTime.set(Oe.nextTime),this.scheduleFields.runAgain.set(Oe.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([])}static \u0275fac=function(t){return new(t||e)};static \u0275prov=De({token:e,factory:e.\u0275fac,providedIn:"root"})};var Nn=["formRef"],kn=(e,n,t,o)=>({index:e,formView:n,formGroupName:"custom",destinationType:t,oauthField:o}),Ct=e=>({$implicit:e}),On=(e,n,t,o)=>({index:e,formView:n,formGroupName:"dynamic",destinationType:t,oauthField:o}),$n=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",destinationType:t,oauthField:o}),Mn=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",asHttpOptions:!0,destinationType:t,oauthField:o}),Rn=()=>({maxWidth:"700px",width:"100%"});function wn(e,n){e&1&&(D(0,5,2),d(1,"spk-icon"),E())}function xn(e,n){e&1&&w(0,5,3)}function In(e,n){if(e&1){let t=I();D(0,5,1),s(1,"button",21),N("click",function(){F(t);let i=c();return g(i.testDestination())}),C(2,wn,2,0)(3,xn,1,0),a(),E()}if(e&2){let t=c();l(),Pe("success",t.successfulTest()),l(),T(t.successfulTest()?2:3)}}function vn(e,n){if(e&1){let t=I();s(0,"p",27),N("click",function(){F(t);let i=c();return g(i.removeDestinationFormGroup(i.destinationCount()-1))}),D(1,8),d(2,"span",28),E(),a()}}function bn(e,n){if(e&1){let t=I();s(0,"div",34),N("click",function(){let i=F(t).$implicit,r=c(2);return g(r.addDestinationFormGroup(i.key))}),s(1,"h3"),S(2),a(),s(3,"p"),S(4),a()()}if(e&2){let t=n.$implicit;l(2),Dt(t.displayName),l(2),Dt(t.description)}}function Gn(e,n){if(e&1){let t=I();s(0,"button",35,1),N("click",function(){let i=F(t).$implicit,r=c(2);return g(r.addDestinationFormGroup(i.key))}),S(2),a()}if(e&2){let t=n.$implicit;l(2),H(" ",t.displayName," ")}}function Ln(e,n){if(e&1&&(s(0,"div",29),ne(1,bn,5,2,"div",30,te),a(),s(3,"spk-menu",31)(4,"button",32),w(5,9),a(),X(6,20),ne(7,Gn,3,1,"button",33,te),z(),a()),e&2){let t=c();l(),oe(t.destinationTypeOptionsFocused()),l(2),u("searchable",!0),l(4),oe(t.destinationTypeOptionsNotFocused())}}function Un(e,n){e&1&&qe(0)}function Vn(e,n){if(e&1&&C(0,Un,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;c();let r=ie(29),p=c();u("ngTemplateOutlet",r)("ngTemplateOutletContext",Qe(7,Ct,Ye(2,kn,i,o,(t=p.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function Bn(e,n){e&1&&qe(0)}function Kn(e,n){if(e&1&&C(0,Bn,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;c();let r=ie(29),p=c();u("ngTemplateOutlet",r)("ngTemplateOutletContext",Qe(7,Ct,Ye(2,On,i,o,(t=p.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function Hn(e,n){if(e&1){let t=I();D(0,10,1),s(1,"button",35,1),N("click",function(){let i=F(t).$implicit,r=c(2);return g(r.addAdvancedFormPair(i,0))}),a(),E()}if(e&2){let t=n.$implicit;l(),ft(t.name),Tt(0)}}function Xn(e,n){e&1&&qe(0)}function zn(e,n){if(e&1&&C(0,Xn,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;c();let r=ie(29),p=c();u("ngTemplateOutlet",r)("ngTemplateOutletContext",Qe(7,Ct,Ye(2,$n,i,o,(t=p.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function Wn(e,n){if(e&1){let t=I();D(0,11,1),s(1,"button",35,1),N("click",function(){let i=F(t).$implicit,r=c(2);return g(r.addHttpOption(i,0))}),a(),E()}if(e&2){let t=n.$implicit;l(),ft(t.name),Tt(0)}}function jn(e,n){e&1&&qe(0)}function qn(e,n){if(e&1&&C(0,jn,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;c();let r=ie(29),p=c();u("ngTemplateOutlet",r)("ngTemplateOutletContext",Qe(7,Ct,Ye(2,Mn,i,o,(t=p.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function Qn(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function Yn(e,n){if(e&1&&(s(0,"app-file-tree",43)(1,"label",47),S(2),C(3,Qn,3,1,"spk-tooltip",48),a(),d(4,"input",49),a()),e&2){let t,o=c().$implicit,i=c(2);u("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name))("accepts",o.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),H(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),T(o.formView.longDescription?3:-1),l(),V("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),le("formControlName",o.formView.name)}}function Jn(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function Zn(e,n){if(e&1&&(s(0,"app-file-tree",44)(1,"label",47),S(2),C(3,Jn,3,1,"spk-tooltip",48),a(),d(4,"input",49),a()),e&2){let t,o=c().$implicit,i=c(2);u("hideShortcuts",!0)("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name)),l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),H(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),T(o.formView.longDescription?3:-1),l(),V("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),le("formControlName",o.formView.name)}}function eo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function to(e,n){e&1&&(s(0,"spk-icon",51),S(1,"link"),a())}function no(e,n){e&1&&(s(0,"spk-icon",51),S(1,"envelope"),a())}function oo(e,n){e&1&&(s(0,"spk-icon",51),S(1,"textbox"),a())}function io(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",47),S(2),C(3,eo,3,1,"spk-tooltip",48),a(),d(4,"input",50),C(5,to,2,0,"spk-icon",51)(6,no,2,0,"spk-icon",51)(7,oo,2,0,"spk-icon",51),a()),e&2){let t,o=c().$implicit;l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),H(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),T(o.formView.longDescription?3:-1),l(),V("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),le("formControlName",o.formView.name),u("type",o.formView.type==="Email"?"email":"text"),l(),T(o.formView.type==="Path"?5:o.formView.type==="Email"?6:7)}}function ro(e,n){if(e&1){let t=I();s(0,"span",55),N("click",function(){F(t);let i=c(2).$implicit,r=c(2);return g(r.oauthStartTokenCreation(i.destinationType))}),S(1,"AuthID"),a()}}function ao(e,n){e&1&&(s(0,"spk-icon",51),S(1,"password"),a())}function so(e,n){if(e&1){let t=I();s(0,"spk-icon",56),N("click",function(){F(t);let i=c(2).$implicit;return g(i.formView.showPassword=!i.formView.showPassword)}),S(1," eye "),a()}}function lo(e,n){if(e&1){let t=I();s(0,"spk-icon",56),N("click",function(){F(t);let i=c(2).$implicit;return g(i.formView.showPassword=!i.formView.showPassword)}),S(1," eye-slash "),a()}}function po(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",47),S(2),a(),d(3,"input",52),C(4,ro,2,0,"span",53)(5,ao,2,0,"spk-icon",51)(6,so,2,0,"spk-icon",54)(7,lo,2,0,"spk-icon",54),a()),e&2){let t,o=c().$implicit;l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),H(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),V("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),le("formControlName",o.formView.name),u("type",o.formView.showPassword?"text":"password"),l(),T(o.oauthField===o.formView.name?4:5),l(2),T(o.formView.showPassword?6:7)}}function co(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(3).$implicit;u("message",t.formView.longDescription)}}function uo(e,n){if(e&1&&S(0),e&2){let t=n.$implicit;H(" ",t," ")}}function mo(e,n){if(e&1&&(s(0,"spk-select",57)(1,"label",47),S(2),C(3,co,3,1,"spk-tooltip",48),a(),d(4,"input",49),a(),C(5,uo,1,1,"ng-template",null,3,Je)),e&2){let t,o=ie(6);c();let i=At(0),r=c().$implicit;u("options",i)("isClearable",!1)("optionTemplate",o),l(),V("for","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),l(),H(" ",(t=r.formView.shortDescription)!==null&&t!==void 0?t:r.formView.name," "),l(),T(r.formView.longDescription?3:-1),l(),V("id","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),le("formControlName",r.formView.name)}}function _o(e,n){if(e&1&&(Et(0),C(1,mo,7,14)),e&2){let t=c().$implicit,o=yt(t.formView.loadOptions?t.formView.loadOptions(c(2).injector)():t.formView.options);l(),T(o?1:-1)}}function Fo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(3).$implicit;u("message",t.formView.longDescription)}}function go(e,n){if(e&1&&S(0),e&2){let t=n.$implicit;vt(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function Co(e,n){if(e&1&&(s(0,"spk-select",59)(1,"label",47),S(2),C(3,Fo,3,1,"spk-tooltip",48),a(),d(4,"input",49),a(),C(5,go,1,2,"ng-template",null,4,Je)),e&2){let t,o=ie(6);c();let i=At(0),r=c().$implicit;u("options",i)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",o),l(),V("for","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),l(),H(" ",(t=r.formView.shortDescription)!==null&&t!==void 0?t:r.formView.name," "),l(),T(r.formView.longDescription?3:-1),l(),V("id","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),le("formControlName",r.formView.name)}}function So(e,n){e&1&&d(0,"spk-progress-bar",58)}function ho(e,n){if(e&1&&(Et(0),C(1,Co,7,15)(2,So,1,0,"spk-progress-bar",58)),e&2){let t=c().$implicit,o=yt(t.formView.loadOptions?t.formView.loadOptions(c(2).injector)():t.formView.options);l(),T(o?1:2)}}function fo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function To(e,n){if(e&1&&(s(0,"app-size",45)(1,"label",47),S(2),C(3,fo,3,1,"spk-tooltip",48),a()()),e&2){let t,o=c().$implicit;u("inputType",o.Name)("formControlName",o.formView.name)("customId",`destination-{{ item.formGroupName }}-{{ item.index }}-{{
2
- item.asHttpOptions ? 'http' : 'other'
3
- }}`),l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),H(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),T(o.formView.longDescription?3:-1)}}function Do(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function Eo(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",47),S(2),C(3,Do,3,1,"spk-tooltip",48),a(),d(4,"input",60),s(5,"spk-icon",51),S(6,"numpad"),a()()),e&2){let t,o=c().$implicit;l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),H(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),T(o.formView.longDescription?3:-1),l(),V("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),le("formControlName",o.formView.name)}}function yo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function Ao(e,n){if(e&1&&(s(0,"spk-toggle",46)(1,"label",47),S(2),C(3,yo,3,1,"spk-tooltip",48),a(),d(4,"input",61),a()),e&2){let t,o=c().$implicit;l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),H(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),T(o.formView.longDescription?3:-1),l(),V("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),le("formControlName",o.formView.name)}}function Po(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function No(e,n){if(e&1&&S(0),e&2){let t=n.$implicit;H(" ",t," ")}}function ko(e,n){if(e&1&&(s(0,"spk-select",62)(1,"label",47),S(2),C(3,Po,3,1,"spk-tooltip",48),a(),d(4,"input",63),a(),C(5,No,1,1,"ng-template",null,4,Je)),e&2){let t,o=ie(6),i=c().$implicit;u("options",i.formView.options)("selectMultiple",!0)("optionTemplate",o),l(),It("for","destination-",i.formGroupName,"-",i.index,""),l(),H(" ",(t=i.formView.shortDescription)!==null&&t!==void 0?t:i.formView.name," "),l(),T(i.formView.longDescription?3:-1),l(),le("formControlName",i.formView.name)}}function Oo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function $o(e,n){if(e&1&&(s(0,"app-timespan",45)(1,"label",47),S(2),C(3,Oo,3,1,"spk-tooltip",48),a()()),e&2){let t,o=c().$implicit;u("inputType",o.formView.name)("formControlName",o.formView.name)("customId","destination-"+o.formGroupName+"-"+o.index+"-"+(o.asHttpOptions?"http":"other")),l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),H(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),T(o.formView.longDescription?3:-1)}}function Mo(e,n){if(e&1){let t=I();s(0,"button",64),N("click",function(){F(t);let i=c().$implicit,r=c(2);return g(r.removeFormView(i.formView,0))}),s(1,"spk-icon"),S(2,"x-circle"),a()()}}function Ro(e,n){if(e&1&&(s(0,"div",41),X(1,42),C(2,Yn,5,17,"app-file-tree",43)(3,Zn,5,13,"app-file-tree",44)(4,io,8,13,"spk-form-field")(5,po,8,13,"spk-form-field")(6,_o,2,2)(7,ho,3,2)(8,To,4,9,"app-size",45)(9,Eo,7,11,"spk-form-field")(10,Ao,5,11,"spk-toggle",46)(11,ko,7,9)(12,$o,4,9,"app-timespan",45),z(),C(13,Mo,3,0,"button",32),a()),e&2){let t=n.$implicit;Pe("single-field",t.formGroupName!=="advanced"),l(),u("formGroupName",t.formGroupName),l(),T(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"||t.formView.type==="DateTime"?12:-1),l(11),T(t.formGroupName==="advanced"?13:-1)}}function wo(e,n){if(e&1&&(X(0,22)(1,36),ne(2,Vn,1,9,"ng-container",null,te),ne(4,Kn,1,9,"ng-container",null,te),s(6,"app-toggle-card",37),X(7,38),D(8,10),s(9,"spk-menu",31)(10,"button",39),d(11,"spk-icon"),a(),X(12,20),ne(13,Hn,3,1,"button",33,te),z(),a(),E(),z(),ne(15,zn,1,9,"ng-container",null,te),a(),s(17,"app-toggle-card",37),X(18,38),D(19,11),s(20,"spk-menu",31)(21,"button",39),d(22,"spk-icon"),a(),X(23,20),ne(24,Wn,3,1,"button",33,te),z(),a(),E(),z(),ne(26,qn,1,9,"ng-container",null,te),a(),C(28,Ro,14,5,"ng-template",null,2,Je),z()()),e&2){let t=c();l(2),oe(t.destinationFormPair().custom),l(2),oe(t.destinationFormPair().dynamic),l(2),u("disallowToggle",!0),l(3),u("searchable",!0),l(),u("disabled",t.notSelectedAdvancedFormPair().length===0),l(3),oe(t.notSelectedAdvancedFormPair()),l(2),oe(t.selectedAdvancedFormPair()),l(2),u("disallowToggle",!0),l(3),u("searchable",!0),l(),u("disabled",t.notSelectedHttpOptions().length===0),l(3),oe(t.notSelectedHttpOptions()),l(2),oe(t.selectedHttpOptions())}}function xo(e,n){if(e&1){let t=I();s(0,"spk-dialog",65),q("isOpenChange",function(i){F(t);let r=c();return j(r.targetUrlDialogOpen,i)||(r.targetUrlDialogOpen=i),g(i)}),s(1,"header",66)(2,"h2"),w(3,12),a(),s(4,"spk-alert",67),w(5,13),a()(),s(6,"div",68)(7,"spk-form-field"),d(8,"textarea",69),a()(),s(9,"footer",70)(10,"button",24),N("click",function(){F(t);let i=c();return g(i.closeTargetUrlDialog(!1))}),S(11,"Cancel"),a(),s(12,"button",71),N("click",function(){F(t);let i=c();return g(i.closeTargetUrlDialog(!0))}),D(13,14),d(14,"spk-icon"),E(),a()()()}if(e&2){let t=c();W("isOpen",t.targetUrlDialogOpen),u("options",bt(3,Rn)),l(8),u("formControl",t.targetUrlCtrl)}}var gt=new ge,Zt=(e={destinations:[]})=>gt.group({destinations:gt.array(e.destinations)}),en=({key:e,customGroup:n,dynamicGroup:t,advancedGroup:o})=>gt.group({destinationType:gt.control(e),custom:n,dynamic:t,advanced:o}),Rt=class e{#n=R(pe);#e=R(Ee);#o=R(Lt);#i=R(xe);#t=R(Se);#r=R(Vt);injector=R(xt);formRef=Me.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=L(()=>this.destinationFormSignal()?.destinations?.length??0);successfulTest=P(!1);destinationTypeOptionsInFocus=P(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=P(he.map(n=>({key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description})));destinationTypeOptionsFocused=L(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(i=>i.key===o))});destinationTypeOptionsNotFocused=L(()=>{let n=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(o=>!n.includes(o.key))});getFormFieldValue(n,t,o){return((this.destinationForm.controls.destinations.controls?.[n]).controls?.[t]).controls[o].value}addDestinationFormGroup(n){this.#t.addDestinationFormGroup(n)}addAdvancedFormPair(n,t){this.#t.addAdvancedFormPair(n,t)}removeFormView(n,t){this.#t.removeAdvancedFormPair(n,t)}addHttpOption(n,t){this.#t.addHttpOption(n,t)}targetUrl=L(()=>this.#t.getCurrentTargetUrl()[0]);targetUrlCtrl=new rt;targetUrlInitial=P(null);targetUrlDialogOpen=P(!1);openTargetUrlDialog(){let t=this.#t.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(t),this.targetUrlInitial.set(t),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl.value,o=this.targetUrlInitial();!n||t===o||this.#t.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(n=0){let o=this.#t.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(this.successfulTest.set(!1),r==="missing-folder"){this.#r.open(ke,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`,confirmText:$localize`Create folder`,cancelText:$localize`Cancel`},closed:p=>{p&&this.#i.postApiV1RemoteoperationCreate({requestBody:{path:o}}).subscribe({next:()=>{this.#r.open(ke,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{this.testDestination(n)}})}})}});return}if(r.startsWith("incorrect-cert:")){let p=r.split("incorrect-cert:")[1];this.#r.open(ke,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
4
- If this is a self-signed certificate, you can choose to trust this certificate.
5
- The server reported the certificate hash: ${p}`,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:m=>{m&&this.#t.addHttpOptionByName("accept-specified-ssl-hash",p)}});return}if(r.startsWith("incorrect-host-key:")){let p=r.split('incorrect-host-key:"')[1].split('",')[0],m=r.split('accepted-host-key:"')[1].split('",')[0];m?this.#r.open(ke,{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,
6
- otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
7
- Do you want to REPLACE your CURRENT host key ${m}
8
- with the REPORTED host key: ${p}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:f=>{f&&this.#t.addAdvancedFormPairByName("ssh-fingerprint",n,p)}}):this.#r.open(ke,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${p}`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:f=>{f&&this.#t.addAdvancedFormPairByName("ssh-fingerprint",n,p)}});return}this.#r.open(ke,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:r,cancelText:$localize`OK`},closed:p=>{}})}})}mapToTargetUrl(n){return ut(n.value)}removeDestinationFormGroup(n){this.destinationForm.controls.destinations.removeAt(n)}displayFn(n){let t=this.destinationOptions().find(o=>o.Key===n);return t?`${t.DisplayName}`:""}goBack(){this.#n.navigate(["general"],{relativeTo:this.#e.parent})}next(){this.#n.navigate(["source-data"],{relativeTo:this.#e.parent})}#s=P("https://duplicati-oauth-handler.appspot.com/").asReadonly();#l=P(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#a=P(!1);#p=P(null);keyCreation(){}oauthStartTokenCreation(n){this.#a.set(!0);let t=450,o=600,i=this.#s()+"?type="+n+"&token="+this.#l(),r=screen.width/2-t/2,p=screen.height/2-o/2,m=window.open(i,"_blank","height="+o+",width="+t+",menubar=0,status=0,titlebar=0,toolbar=0,left="+r+",top="+p);m?.addEventListener("blur",f=>{console.log("event blur",f)}),m?.addEventListener("beforeunload",f=>{console.log("event beforeunload",f),this.#o.get(this.#s()+"fetch?callback=JSON_CALLBACK",{params:{token:this.#l()}}).pipe(je(()=>this.#a.set(!1))).subscribe({next:$=>{console.log("res",$),$?.authid&&this.#p.set($.authid)}})})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=se({type:e,selectors:[["app-destination"]],viewQuery:function(t,o){t&1&&Re(o.formRef,Nn,5),t&2&&we()},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=Ne(n);let t;t=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let o;o=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$localize` Want to select another destination? ${"\uFFFD#2\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPAN:`;let r;r=$localize`Other destinations`;let p;p=$localize` Advanced options ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#10\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#12\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*14:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*14:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_MENU:`,p=Ne(p);let m;m=$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:`,m=Ne(m);let f;f=$localize`Edit target URL`;let $;$=$localize` Be careful, this will overwrite everything you have in your destination. `;let U;return U=$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,t,o,i,r,p,m,f,$,U,[3,"submit","formGroup"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"success"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],["formArrayName","destinations"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"isOpen","options"],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["spk-button","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],["formGroupName","0"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small",3,"disabled"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","startingPath"],[3,"inputType","formControlName","customId"],[1,"primary","raised"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],[3,"type","id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"formControlName"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"warning"],["content",""],["id","targetUrl","autocomplete","off",3,"formControl"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,o){if(t&1){let i=I();s(0,"form",15,0),N("submit",function(){return F(i),g(o.next())}),s(2,"header")(3,"h3",16),D(4,5),s(5,"div",17),C(6,In,4,3,"button",18),s(7,"spk-menu")(8,"button",19),d(9,"spk-icon"),a(),X(10,20),s(11,"button",21),N("click",function(){return F(i),g(o.openTargetUrlDialog())}),d(12,"spk-icon"),a(),z(),a()(),E(),a(),C(13,vn,3,0,"p"),a(),C(14,Ln,9,1)(15,wo,30,6,"ng-container",22),s(16,"div",23)(17,"button",24),N("click",function(){return F(i),g(o.goBack())}),D(18,6),d(19,"spk-icon"),E(),a(),s(20,"button",25),D(21,7),d(22,"spk-icon"),E(),a()()(),C(23,xo,15,4,"spk-dialog",26)}if(t&2){let i;u("formGroup",o.destinationForm),l(6),T(o.destinationCount()>0?6:-1),l(7),T(o.destinationCount()>0?13:-1),l(),T(o.destinationCount()===0?14:-1),l(),T(!((i=o.destinationFormSignal())==null||i.destinations==null)&&i.destinations.length?15:-1),l(8),T(o.targetUrlDialogOpen()?23:-1)}},dependencies:[He,Le,de,Ue,be,Fe,Ge,st,Ve,Be,lt,Ht,Gt,ue,Bt,ce,ve,ot,Ut,tt,me,nt,Wt,Xe,pt,zt],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{ut as a,he as b,Zt as c,en as d,Rt as e,qt as f,Ot as g,kt as h,Oe as i,$t as j,Yt as k,Mt as l,Se as m};
package/chunk-7QUJNAXH.js DELETED
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-BA7NYTFR.js";import"./chunk-XH2A67YP.js";import"./chunk-ISRMJKPG.js";import"./chunk-3V622MYY.js";import"./chunk-WCLOWI5G.js";import"./chunk-ZP273LXY.js";import"./chunk-D5WIWFNP.js";import"./chunk-WSLU6K4D.js";import"./chunk-UJZB6UQE.js";import"./chunk-RHW5QVAY.js";import"./chunk-JJQARMUD.js";import"./chunk-3UJUWE5B.js";import"./chunk-I3TLRILF.js";import"./chunk-2SGDSXNW.js";import"./chunk-XQKR67WI.js";import"./chunk-CEOO3F5U.js";import"./chunk-K3CYM6ID.js";import"./chunk-M7VDIUGU.js";import"./chunk-XGARKXE4.js";import"./chunk-7CGTOI24.js";export{a as createRestoreOptionsForm,b as default};
package/chunk-BA7NYTFR.js DELETED
@@ -1 +0,0 @@
1
- import{a as J}from"./chunk-XH2A67YP.js";import{a as he}from"./chunk-ISRMJKPG.js";import{a as H}from"./chunk-3V622MYY.js";import{a as Re}from"./chunk-ZP273LXY.js";import{b as Ne,c as M,e as L,f as $,i as D,k as Pe,n as y,q as A,r as b,s as Ie,t as v}from"./chunk-JJQARMUD.js";import{b as P,d}from"./chunk-I3TLRILF.js";import{a as h,g as k,l as Ee,p as de,q as Oe,t as fe,z as Ce}from"./chunk-XQKR67WI.js";import{b as I}from"./chunk-CEOO3F5U.js";import{j as q}from"./chunk-M7VDIUGU.js";import{$b as Se,C as ae,D as f,Db as u,Eb as F,Fb as T,Gb as ue,H as le,Hb as Fe,Jb as E,Kb as B,M as pe,Na as S,Q as _e,W as p,Yb as K,Za as N,ba as C,ca as R,cb as w,g as re,hc as me,kb as m,mb as ce,mc as ge,oc as Te,pb as G,ra as _,tb as s,ub as a,v as se,vb as l,wb as Y,xb as U,yc as j,zb as x}from"./chunk-XGARKXE4.js";var ke=new b,$e=()=>ke.group({passphrase:ke.control("")}),Z=class n{#t=p(I);#e=p(O);#o=p(d);#i=p(P);encryptionForm=this.#e.encryptionForm;creatingTemporaryBackup=_(!1);next(){let o=this.#e.destinationTargetUrl();if(!o)throw new Error("No target URL");this.creatingTemporaryBackup.set(!0);let e=this.encryptionForm.value?.passphrase??null,t=[{Name:"--no-encryption",Value:"true"}];e&&(t=[{Name:"--passphrase",Value:e}]),this.#t.postApiV1Backups({requestBody:{Backup:{TargetURL:o,Settings:t}},temporary:!0}).pipe(f(()=>this.creatingTemporaryBackup.set(!1))).subscribe({next:i=>{let r=i.ID;this.#e.getBackup(r),this.#o.navigate([`/restore-draft/${r}`])},error:i=>{console.error(i)}})}back(){this.#e.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#i.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-restore-encryption"]],decls:12,vars:1,consts:()=>{let o;o=$localize`Enter backup passphrase if defined.`;let e;e=$localize`Password`;let t;t=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let i;return i=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `,[e,t,i,[3,"submit","formGroup"],["for","password"],["type","password","id","password","placeholder",o,"formControlName","passphrase"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,t){e&1&&(s(0,"form",3),E("submit",function(){return t.next()}),s(1,"spk-form-field")(2,"label",4),T(3,0),a(),l(4,"input",5),a(),s(5,"div",6)(6,"button",7),E("click",function(){return t.back()}),u(7,1),l(8,"spk-icon"),F(),a(),s(9,"button",8),u(10,2),l(11,"spk-icon"),F(),a()()()),e&2&&m("formGroup",t.encryptionForm)},dependencies:[v,D,M,L,$,y,A,Ee,h,k],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function Ae(n,o){n&1&&l(0,"spk-progress-bar",7)}function be(n,o){if(n&1&&(s(0,"div",13),K(1),ge(2,"date"),a()),n&2){let e=o.$implicit;S(),Se("",e.Version,": ",Te(2,2,e.Time,"medium"),"")}}function ve(n,o){n&1&&l(0,"spk-progress-bar",7)}function we(n,o){if(n&1&&(s(0,"app-file-tree",14)(1,"label",15),T(2,4),a(),l(3,"input",16),a()),n&2){let e=B(3);m("rootPath",e.rootPath())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)}}function Ge(n,o){if(n&1&&w(0,we,4,4,"app-file-tree",14),n&2){let e=B(2);G((e.isDraft()&&!e.isRepairing()||!e.isDraft())&&e.backupSettings()?0:-1)}}function xe(n,o){if(n&1){let e=x();s(0,"spk-select",11),E("cleared",function(){C(e);let i=B();return R(i.abortLoading())}),l(1,"input",12),w(2,be,3,5,"ng-template"),a(),w(3,ve,1,0,"spk-progress-bar",7)(4,Ge,1,1)}if(n&2){let e=B();m("options",e.versionOptions())("isClearable",!0),S(3),G(e.isDraft()&&e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),S(),G(e.showFileTree()?4:-1)}}var Q=new b,De=()=>Q.group({filesToRestore:Q.control(""),selectedOption:Q.control(null),passphrase:Q.control(null)}),te=class n{#t=p(I);#e=p(O);#o=p(d);#i=p(P);#n=p(q);#r=p(Re);selectFilesForm=this.#e.selectFilesForm;selectFilesFormSignal=this.#e.selectFilesFormSignal;selectOptionSignal=this.#e.selectOptionSignal;backupId=this.#e.backupId;versionOptionsLoading=this.#e.versionOptionsLoading;versionOptions=this.#e.versionOptions;isDraft=this.#e.isDraft;isFileRestore=this.#e.isFileRestore;showFileTree=_(!1);backupSettings=_(null);rootPath=_(void 0);loadingRootPath=_(!1);isRepairing=_(!1);loadingEffect=j(()=>{if(this.versionOptionsLoading())return;let e=this.versionOptions();if(e&&e?.length>0){let t=e[0].Version;Number.isInteger(t)&&this.selectFilesForm.controls.selectedOption.setValue(t)}});backupSettingsEffect=j(()=>{let o=this.backupId(),e=this.isRepairing(),t=typeof this.selectOptionSignal()=="string"?parseInt(this.selectOptionSignal()):this.selectOptionSignal();if(typeof t!="number"||!o)return;let r=this.versionOptions()?.find(c=>c.Version===t)?.Time??null;!r||e||(this.showFileTree.set(!1),queueMicrotask(()=>{let c={id:o+"",time:r};this.backupSettings.set(c),this.getRootPath(c)}))});repairEffect=j(()=>{let o=this.#e.isDraft(),e=this.selectOptionSignal(),t=this.versionOptions();if(o&&e){let i=t.find(c=>c.Version===parseInt(e));if(i===void 0)return;let r=this.backupId();this.isRepairing.set(!0),this.#t.postApiV1BackupByIdRepairupdate({id:r,requestBody:{only_paths:!0,time:i.Time}}).subscribe(c=>{let W=c.ID;var X=window.setInterval(()=>{this.#t.getApiV1TaskByTaskid({taskid:W}).subscribe(z=>{z.Status==="Completed"&&(clearInterval(X),this.isRepairing.set(!1))})},1e3)})}});getRootPath(o){let e={id:o.id+"",time:o.time,prefixOnly:!0,folderContents:!1};this.isRepairing()||(this.loadingRootPath.set(!0),this.#t.getApiV1BackupByIdFiles(e).pipe(pe(this.abortLoading$),f(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1)})).subscribe({next:t=>{let i=t.Files[0].Path;this.rootPath.set(i)}}))}abortLoading$=new re;abortLoading(){this.showFileTree.set(!1),this.loadingRootPath.set(!1),this.abortLoading$.next(!0)}displayFn(){let o=this.versionOptions();return e=>{if(!e)return"";let t=o?.find(i=>typeof i.Version=="number"&&i.Version.toString()===e);return t?`${t.Version}: ${this.#n.transform(t.Time,"medium")}`:""}}next(){this.#o.navigate(["options"],{relativeTo:this.#i.parent})}back(){this.#e.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#i.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-select-files"]],features:[me([q])],decls:13,vars:3,consts:()=>{let o;o=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let t;t=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$localize`Select an option...`;let r;return r=$localize`Path`,[["formRef",""],o,e,t,r,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["value","Version",3,"cleared","options","isClearable"],["type","text","placeholder",i,"formControlName","selectedOption"],[1,"custom-option"],[3,"rootPath","backupSettings","multiSelect","showFiles"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]]},template:function(e,t){if(e&1){let i=x();s(0,"form",5,0),E("submit",function(){return C(i),R(t.next())}),s(2,"h3",6),T(3,1),a(),w(4,Ae,1,0,"spk-progress-bar",7)(5,xe,5,4),s(6,"div",8)(7,"button",9),E("click",function(){return C(i),R(t.back())}),u(8,2),l(9,"spk-icon"),F(),a(),s(10,"button",10),u(11,3),l(12,"spk-icon"),F(),a()()()}e&2&&(m("formGroup",t.selectFilesForm),S(4),G(t.versionOptionsLoading()?4:5),S(5),ue(t.isFileRestore()?"Back":"Exit"),Fe(8))},dependencies:[Ie,D,M,L,$,v,y,A,q,J,k,h,fe,de],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var O=class n{#t=p(d);#e=p(I);backupId=_(null);backup=_(null);destinationTargetUrl=_(null);selectFilesForm=De();optionsForm=ye();encryptionForm=$e();optionsFormSignal=H(this.optionsForm.valueChanges);selectFilesFormSignal=H(this.selectFilesForm.valueChanges);selectOptionSignal=H(this.selectFilesForm.controls.selectedOption.valueChanges);versionOptionsLoading=_(!1);versionOptions=_([]);isSubmitting=_(!1);isDraft=_(!1);isFileRestore=_(!1);init(o,e=!1,t=!1){this.backupId.set(o),this.isFileRestore.set(e),this.isDraft.set(t),e&&this.#t.navigate(["/restore-from-files/destination"]),e||this.getBackup(o,!0)}updateTargetUrl(o){this.destinationTargetUrl.set(o)}submit(){this.isSubmitting.set(!0);let o=this.backupId(),e=this.optionsForm.value,t=this.selectFilesForm.value,i=this.versionOptions()?.find(r=>r.Version===t.selectedOption);this.#e.postApiV1BackupByIdRestore({id:o??"",requestBody:{paths:t.filesToRestore?.split("\0").map(r=>`${r}*`)??[],passphrase:t.passphrase??null,time:i?.Time,restore_path:e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!0}}).pipe(f(()=>this.isSubmitting.set(!1))).subscribe({next:()=>this.exit(),error:r=>{console.error("restore error",r)}})}exit(){this.#o(),this.#t.navigate(["/"])}getVersionOptions(){this.versionOptions()}getBackup(o,e=!1){this.versionOptionsLoading.set(!0),se([this.#e.getApiV1BackupById({id:o}),this.#e.getApiV1BackupByIdFilesets({id:o}).pipe(le(3))]).pipe(ae(1),f(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([t,i])=>{this.versionOptions.set(i),this.backup.set(t)}})}#o(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||n)};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})};var V=new b,ye=()=>V.group({restoreFrom:V.control("orignal"),restoreFromPath:V.control(""),handleExisting:V.control("overwrite"),permissions:V.control(!1)}),oe=class n{#t=p(O);#e=p(d);#o=p(P);optionsForm=this.#t.optionsForm;optionsFormSignal=this.#t.optionsFormSignal;isSubmitting=this.#t.isSubmitting;goBack(){this.#e.navigate(["select-files"],{relativeTo:this.#o.parent})}submit(){this.#t.submit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-advanced-options-settings"]],decls:39,vars:6,consts:()=>{let o;o=$localize`Restore options`;let e;e=$localize`Where do you want to restore files to?`;let t;t=$localize` Original location ${"\uFFFD#9\uFFFD\uFFFD/#9\uFFFD"}:TAG_INPUT:`;let i;i=$localize` Pick location ${"\uFFFD#12\uFFFD\uFFFD/#12\uFFFD"}:TAG_INPUT:`;let r;r=$localize`How do you want to handle existing files?`;let c;c=$localize` Overwrite ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let W;W=$localize` Save different versions with timestamp in file name ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let X;X=$localize`Permissions`;let z;z=$localize` Restore read/write permissions ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let ie;ie=$localize`${"\uFFFD#35\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#35\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let ne;return ne=$localize`${"\uFFFD#38\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `,[["formRef",""],o,e,t,i,r,c,W,X,z,ie,ne,[3,"submit","formGroup"],[1,"title-30"],[3,"disallowToggle"],["title",""],[1,"raised","primary"],["type","radio","name","restoreFrom","value","orignal","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","permissions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,t){if(e&1){let i=x();s(0,"form",12,0),E("submit",function(){return C(i),R(t.submit())}),s(2,"h3",13),T(3,1),a(),s(4,"app-toggle-card",14),Y(5,15),T(6,2),U(),s(7,"spk-radio",16),u(8,3),l(9,"input",17),F(),a(),s(10,"spk-radio",16),u(11,4),l(12,"input",18),F(),a(),s(13,"app-file-tree",19)(14,"label",20),K(15,"Path"),a(),l(16,"input",21),a()(),s(17,"app-toggle-card",14),Y(18,15),T(19,5),U(),s(20,"spk-radio",16),u(21,6),l(22,"input",22),F(),a(),s(23,"spk-radio",16),u(24,7),l(25,"input",23),F(),a()(),s(26,"app-toggle-card"),Y(27,15),T(28,8),U(),s(29,"spk-toggle",24),u(30,9),l(31,"input",25),F(),a()(),s(32,"div",26)(33,"button",27),E("click",function(){return C(i),R(t.goBack())}),u(34,10),l(35,"spk-icon"),F(),a(),s(36,"button",28),u(37,11),l(38,"spk-icon"),F(),a()()()}if(e&2){let i;m("formGroup",t.optionsForm),S(4),m("disallowToggle",!0),S(9),m("disabled",((i=t.optionsFormSignal())==null?null:i.restoreFrom)!=="pickLocation"),S(4),m("disallowToggle",!0),S(19),ce("loader",t.isSubmitting())}},dependencies:[v,D,M,Ne,Pe,L,$,y,A,he,J,Ce,Oe,k,h],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};export{ye as a,oe as b,$e as c,Z as d,De as e,te as f,O as g};
package/chunk-CEOO3F5U.js DELETED
@@ -1 +0,0 @@
1
- import{a as D,c}from"./chunk-K3CYM6ID.js";import{L as g,Q as d,V as l,l as I,m,p as R,v as O,y as k}from"./chunk-XGARKXE4.js";import{a as y,b as T}from"./chunk-7CGTOI24.js";var v=class{_fns;constructor(){this._fns=[]}eject(e){let i=this._fns.indexOf(e);i!==-1&&(this._fns=[...this._fns.slice(0,i),...this._fns.slice(i+1)])}use(e){this._fns=[...this._fns,e]}},t={BASE:"",CREDENTIALS:"include",ENCODE_PATH:void 0,HEADERS:void 0,PASSWORD:void 0,TOKEN:void 0,USERNAME:void 0,VERSION:"1",WITH_CREDENTIALS:!1,interceptors:{response:new v}};var A=class extends Error{url;status;statusText;body;request;constructor(e,i,a){super(a),this.name="ApiError",this.url=i.url,this.status=i.status,this.statusText=i.statusText,this.body=i.body,this.request=e}};var h=p=>typeof p=="string",P=p=>h(p)&&p!=="",f=p=>p instanceof Blob,G=p=>p instanceof FormData,L=p=>{try{return btoa(p)}catch{return Buffer.from(p).toString("base64")}},j=p=>{let e=[],i=(r,n)=>{e.push(`${encodeURIComponent(r)}=${encodeURIComponent(String(n))}`)},a=(r,n)=>{n!=null&&(n instanceof Date?i(r,n.toISOString()):Array.isArray(n)?n.forEach(o=>a(r,o)):typeof n=="object"?Object.entries(n).forEach(([o,u])=>a(`${r}[${o}]`,u)):i(r,n))};return Object.entries(p).forEach(([r,n])=>a(r,n)),e.length?`?${e.join("&")}`:""},F=(p,e)=>{let i=p.ENCODE_PATH||encodeURI,a=e.url.replace("{api-version}",p.VERSION).replace(/{(.*?)}/g,(n,o)=>e.path?.hasOwnProperty(o)?i(String(e.path[o])):n),r=p.BASE+a;return e.query?r+j(e.query):r},N=p=>{if(p.formData){let e=new FormData,i=(a,r)=>{h(r)||f(r)?e.append(a,r):e.append(a,JSON.stringify(r))};return Object.entries(p.formData).filter(([,a])=>a!=null).forEach(([a,r])=>{Array.isArray(r)?r.forEach(n=>i(a,n)):i(a,r)}),e}},V=async(p,e)=>typeof e=="function"?e(p):e,U=(p,e)=>O({token:V(e,p.TOKEN),username:V(e,p.USERNAME),password:V(e,p.PASSWORD),additionalHeaders:V(e,p.HEADERS)}).pipe(R(({token:i,username:a,password:r,additionalHeaders:n})=>{let o=Object.entries(y(y({Accept:"application/json"},n),e.headers)).filter(([,u])=>u!=null).reduce((u,[B,b])=>T(y({},u),{[B]:String(b)}),{});if(P(i)&&(o.Authorization=`Bearer ${i}`),P(a)&&P(r)){let u=L(`${a}:${r}`);o.Authorization=`Basic ${u}`}return e.body!==void 0&&(e.mediaType?o["Content-Type"]=e.mediaType:f(e.body)?o["Content-Type"]=e.body.type||"application/octet-stream":h(e.body)?o["Content-Type"]="text/plain":G(e.body)||(o["Content-Type"]="application/json")),new D(o)})),M=p=>{if(p.body)return p.mediaType?.includes("application/json")||p.mediaType?.includes("+json")?JSON.stringify(p.body):h(p.body)||f(p.body)||G(p.body)?p.body:JSON.stringify(p.body)},K=(p,e,i,a,r,n,o)=>i.request(e.method,a,{headers:o,body:r??n,withCredentials:p.WITH_CREDENTIALS,observe:"response"}),z=(p,e)=>{if(e){let i=p.headers.get(e);if(h(i))return i}},W=p=>{if(p.status!==204&&p.body!==null)return p.body},$=(p,e)=>{let a=y({400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"Im a teapot",421:"Misdirected Request",422:"Unprocessable Content",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"},p.errors)[e.status];if(a)throw new A(p,e,a);if(!e.ok){let r=e.status??"unknown",n=e.statusText??"unknown",o=(()=>{try{return JSON.stringify(e.body,null,2)}catch{return}})();throw new A(p,e,`Generic Error: status: ${r}; status text: ${n}; body: ${o}`)}},s=(p,e,i)=>{let a=F(p,i),r=N(i),n=M(i);return U(p,i).pipe(g(o=>K(p,i,e,a,n,r,o)),g(async o=>{for(let w of p.interceptors.response._fns)o=await w(o);let u=W(o),B=z(o,i.responseHeader),b=u;return i.responseTransformer&&o.ok&&(b=await i.responseTransformer(u)),{url:a,ok:o.ok,status:o.status,statusText:o.statusText,body:B??b}}),k(o=>o.status?I({url:a,ok:o.ok,status:o.status,statusText:o.statusText,body:o.error??o.statusText}):m(()=>o)),R(o=>($(i,o),o.body)),k(o=>m(()=>o)))};var S=class p{constructor(e){this.http=e}getApiV1Commandline(){return s(t,this.http,{method:"GET",url:"/api/v1/commandline"})}static \u0275fac=function(i){return new(i||p)(l(c))};static \u0275prov=d({token:p,factory:p.\u0275fac,providedIn:"root"})},E=class p{constructor(e){this.http=e}postApiV1Commandline(e){return s(t,this.http,{method:"POST",url:"/api/v1/commandline",body:e.requestBody,mediaType:"application/json"})}getApiV1Acknowledgements(){return s(t,this.http,{method:"GET",url:"/api/v1/acknowledgements"})}postApiV1AuthRefresh(){return s(t,this.http,{method:"POST",url:"/api/v1/auth/refresh"})}postApiV1AuthSignin(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/signin",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthLogin(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/login",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuesignintoken(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issuesignintoken",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthRefreshLogout(){return s(t,this.http,{method:"POST",url:"/api/v1/auth/refresh/logout"})}postApiV1AuthIssuetokenByOperation(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issuetoken/{operation}",path:{operation:e.operation}})}postApiV1AuthIssueForeverToken(){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issue-forever-token"})}getApiV1Backupdefaults(){return s(t,this.http,{method:"GET",url:"/api/v1/backupdefaults"})}getApiV1Backups(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/backups",query:{orderBy:e.orderBy}})}postApiV1Backups(e){return s(t,this.http,{method:"POST",url:"/api/v1/backups",query:{temporary:e.temporary,existingdb:e.existingdb},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupsImport(e){return s(t,this.http,{method:"POST",url:"/api/v1/backups/import",body:e.requestBody,mediaType:"application/json"})}getApiV1BugreportByReportid(e){return s(t,this.http,{method:"GET",url:"/api/v1/bugreport/{reportid}",path:{reportid:e.reportid},query:{token:e.token}})}getApiV1Changelog(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/changelog",query:{"from-update":e.fromUpdate}})}getApiV1CommandlineByRunid(e){return s(t,this.http,{method:"GET",url:"/api/v1/commandline/{runid}",path:{runid:e.runid},query:{offset:e.offset,pagesize:e.pagesize}})}postApiV1CommandlineByRunidAbort(e){return s(t,this.http,{method:"POST",url:"/api/v1/commandline/{runid}/abort",path:{runid:e.runid}})}postApiV1Filesystem(e){return s(t,this.http,{method:"POST",url:"/api/v1/filesystem",query:{onlyFolders:e.onlyFolders,showHidden:e.showHidden},body:e.requestBody,mediaType:"application/json"})}postApiV1FilesystemValidate(e){return s(t,this.http,{method:"POST",url:"/api/v1/filesystem/validate",body:e.requestBody,mediaType:"application/json"})}getApiV1Hyperv(){return s(t,this.http,{method:"GET",url:"/api/v1/hyperv"})}getApiV1HypervByKey(e){return s(t,this.http,{method:"GET",url:"/api/v1/hyperv/{key}",path:{key:e.key}})}getApiV1Licenses(){return s(t,this.http,{method:"GET",url:"/api/v1/licenses"})}getApiV1LogdataPoll(e){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/poll",query:{level:e.level,id:e.id,offset:e.offset,pagesize:e.pagesize}})}getApiV1LogdataLog(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/log",query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1LogdataCrashlog(){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/crashlog"})}getApiV1Mssql(){return s(t,this.http,{method:"GET",url:"/api/v1/mssql"})}getApiV1MssqlByKey(e){return s(t,this.http,{method:"GET",url:"/api/v1/mssql/{key}",path:{key:e.key}})}getApiV1NotificationById(e){return s(t,this.http,{method:"GET",url:"/api/v1/notification/{id}",path:{id:e.id}})}deleteApiV1NotificationById(e){return s(t,this.http,{method:"DELETE",url:"/api/v1/notification/{id}",path:{id:e.id}})}getApiV1Notifications(){return s(t,this.http,{method:"GET",url:"/api/v1/notifications"})}getApiV1RemotecontrolStatus(){return s(t,this.http,{method:"GET",url:"/api/v1/remotecontrol/status"})}postApiV1RemotecontrolEnable(){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/enable"})}postApiV1RemotecontrolDisable(){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/disable"})}deleteApiV1RemotecontrolRegistration(){return s(t,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/registration"})}postApiV1RemotecontrolRegister(e){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/register",body:e.requestBody,mediaType:"application/json"})}deleteApiV1RemotecontrolRegister(){return s(t,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/register"})}postApiV1RemoteoperationDbpath(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/dbpath",body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationTest(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/test",query:{autocreate:e.autocreate},body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationCreate(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/create",body:e.requestBody,mediaType:"application/json"})}getApiV1Serversettings(){return s(t,this.http,{method:"GET",url:"/api/v1/serversettings"})}patchApiV1Serversettings(e){return s(t,this.http,{method:"PATCH",url:"/api/v1/serversettings",body:e.requestBody,mediaType:"application/json"})}getApiV1ServersettingByKey(e){return s(t,this.http,{method:"GET",url:"/api/v1/serversetting/{key}",path:{key:e.key}})}putApiV1ServersettingByKey(e){return s(t,this.http,{method:"PUT",url:"/api/v1/serversetting/{key}",path:{key:e.key},body:e.requestBody,mediaType:"application/json"})}getApiV1Serverstate(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/serverstate",query:{lastEventId:e.lastEventId,longpoll:e.longpoll,duration:e.duration}})}postApiV1ServerstatePause(e={}){return s(t,this.http,{method:"POST",url:"/api/v1/serverstate/pause",query:{duration:e.duration,pauseTransfers:e.pauseTransfers}})}postApiV1ServerstateResume(){return s(t,this.http,{method:"POST",url:"/api/v1/serverstate/resume"})}getApiV1Systeminfo(){return s(t,this.http,{method:"GET",url:"/api/v1/systeminfo"})}getApiV1SysteminfoFiltergroups(){return s(t,this.http,{method:"GET",url:"/api/v1/systeminfo/filtergroups"})}getApiV1TaskByTaskid(e){return s(t,this.http,{method:"GET",url:"/api/v1/task/{taskid}",path:{taskid:e.taskid}})}postApiV1TaskByTaskidStop(e){return s(t,this.http,{method:"POST",url:"/api/v1/task/{taskid}/stop",path:{taskid:e.taskid}})}postApiV1TaskByTaskidAbort(e){return s(t,this.http,{method:"POST",url:"/api/v1/task/{taskid}/abort",path:{taskid:e.taskid}})}getApiV1Uisettings(){return s(t,this.http,{method:"GET",url:"/api/v1/uisettings"})}postApiV1Uisettings(e){return s(t,this.http,{method:"POST",url:"/api/v1/uisettings",body:e.requestBody,mediaType:"application/json"})}getApiV1UisettingsByScheme(e){return s(t,this.http,{method:"GET",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme}})}patchApiV1UisettingsByScheme(e){return s(t,this.http,{method:"PATCH",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme},body:e.requestBody,mediaType:"application/json"})}postApiV1WebmoduleByModulekey(e){return s(t,this.http,{method:"POST",url:"/api/v1/webmodule/{modulekey}",path:{modulekey:e.modulekey},body:e.requestBody,mediaType:"application/json"})}getApiV1BackupById(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}",path:{id:e.id}})}putApiV1BackupById(e){return s(t,this.http,{method:"PUT",url:"/api/v1/backup/{id}",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}deleteApiV1BackupById(e){return s(t,this.http,{method:"DELETE",url:"/api/v1/backup/{id}",path:{id:e.id},query:{"delete-remote-files":e.deleteRemoteFiles,"delete-local-db":e.deleteLocalDb,force:e.force}})}getApiV1BackupByIdFiles(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/files",path:{id:e.id},query:{filter:e.filter,time:e.time,"all-versions":e.allVersions,"prefix-only":e.prefixOnly,"folder-contents":e.folderContents}})}getApiV1BackupByIdLog(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/log",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdRemotelog(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/remotelog",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdFilesets(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/filesets",path:{id:e.id},query:{"include-metadata":e.includeMetadata,"from-remote-only":e.fromRemoteOnly}})}getApiV1BackupByIdExportArgsonly(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-argsonly",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExportCmdline(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-cmdline",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExport(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase,token:e.token}})}getApiV1BackupByIdIsdbusedelsewhere(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/isdbusedelsewhere",path:{id:e.id}})}getApiV1BackupByIdIsactive(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/isactive",path:{id:e.id}})}postApiV1BackupByIdDeletedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/deletedb",path:{id:e.id}})}postApiV1BackupByIdMovedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/movedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdUpdatedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/updatedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRestore(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/restore",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdCreatereport(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/createreport",path:{id:e.id}})}postApiV1BackupByIdRepair(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/repair",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRepairupdate(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/repairupdate",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdVacuum(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/vacuum",path:{id:e.id}})}postApiV1BackupByIdVerify(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/verify",path:{id:e.id}})}postApiV1BackupByIdCompact(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/compact",path:{id:e.id}})}postApiV1BackupByIdStart(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/start",path:{id:e.id}})}postApiV1BackupByIdRun(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/run",path:{id:e.id}})}postApiV1BackupByIdReportRemoteSize(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/report-remote-size",path:{id:e.id}})}postApiV1BackupByIdCopytotemp(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/copytotemp",path:{id:e.id}})}static \u0275fac=function(i){return new(i||p)(l(c))};static \u0275prov=d({token:p,factory:p.\u0275fac,providedIn:"root"})},C=class p{constructor(e){this.http=e}getApiV1Progressstate(){return s(t,this.http,{method:"GET",url:"/api/v1/progressstate"})}static \u0275fac=function(i){return new(i||p)(l(c))};static \u0275prov=d({token:p,factory:p.\u0275fac,providedIn:"root"})},q=class p{constructor(e){this.http=e}getApiV1Tasks(){return s(t,this.http,{method:"GET",url:"/api/v1/tasks"})}static \u0275fac=function(i){return new(i||p)(l(c))};static \u0275prov=d({token:p,factory:p.\u0275fac,providedIn:"root"})},x=class p{constructor(e){this.http=e}postApiV1UpdatesCheck(){return s(t,this.http,{method:"POST",url:"/api/v1/updates/check"})}static \u0275fac=function(i){return new(i||p)(l(c))};static \u0275prov=d({token:p,factory:p.\u0275fac,providedIn:"root"})},H=class p{constructor(e){this.http=e}getApiV1Webmodules(){return s(t,this.http,{method:"GET",url:"/api/v1/webmodules"})}static \u0275fac=function(i){return new(i||p)(l(c))};static \u0275prov=d({token:p,factory:p.\u0275fac,providedIn:"root"})};export{S as a,E as b,C as c,H as d};
package/chunk-DRBDCRHV.js DELETED
@@ -1 +0,0 @@
1
- import{a as Ke}from"./chunk-ISRMJKPG.js";import{a as he,b as se}from"./chunk-3V622MYY.js";import{a as pe}from"./chunk-UXWTPWS6.js";import{a as be}from"./chunk-SFWQDWHT.js";import"./chunk-ZP273LXY.js";import{a as le}from"./chunk-D5WIWFNP.js";import"./chunk-WSLU6K4D.js";import{a as Be}from"./chunk-UJZB6UQE.js";import"./chunk-RHW5QVAY.js";import"./chunk-JJQARMUD.js";import"./chunk-3UJUWE5B.js";import{b as Ie,e as ke}from"./chunk-I3TLRILF.js";import"./chunk-2SGDSXNW.js";import{a as z,g as _e,j as ve,k as ye,p as re,x as xe}from"./chunk-XQKR67WI.js";import{b as ae}from"./chunk-CEOO3F5U.js";import"./chunk-K3CYM6ID.js";import"./chunk-O6GWHO26.js";import{j as w,k as oe}from"./chunk-M7VDIUGU.js";import"./chunk-BWYJMRKB.js";import{Db as N,Eb as M,Fb as _,Gb as s,Hb as d,Ib as U,Jb as y,Kb as m,Na as o,W as R,Yb as F,Za as b,Zb as x,_b as S,ac as Re,ba as D,ca as $,cb as C,ec as De,fc as $e,gc as X,kb as h,mb as f,mc as u,nc as g,oa as ie,oc as T,p as B,pb as E,qb as I,ra as G,rb as k,sb as v,tb as i,ub as t,vb as c,wb as A,xb as P,xc as fe,zb as K}from"./chunk-XGARKXE4.js";import{a as te}from"./chunk-7CGTOI24.js";function we(n,a){n&1&&c(0,"spk-progress-bar",31)}function ze(n,a){n&1&&c(0,"div",34)}function Ve(n,a){n&1&&c(0,"div",35)}function We(n,a){n&1&&c(0,"div",36)}function je(n,a){if(n&1&&F(0),n&2){let e=m().$implicit;S(" (",e.data==null?null:e.data.WarningsActualLength," warnings) ")}}function qe(n,a){if(n&1&&(i(0,"details",45)(1,"summary"),N(2,15),c(3,"spk-icon"),i(4,"div",46),c(5,"spk-icon",39),t(),M(),t(),i(6,"div",47)(7,"p"),_(8,16),u(9,"date"),t(),i(10,"p"),_(11,17),u(12,"date"),t(),i(13,"p"),_(14,18),u(15,"durationFormat"),t(),i(16,"p"),_(17,19),t(),c(18,"spk-divider"),i(19,"p"),_(20,20),t(),i(21,"p"),_(22,21),t()()(),i(23,"details",45)(24,"summary")(25,"spk-icon"),F(26,"file-archive"),t(),F(27," Compression phase "),i(28,"div",46)(29,"spk-icon",39),F(30,"caret-down"),t()()(),i(31,"div",47)(32,"p"),_(33,22),u(34,"date"),t(),i(35,"p"),_(36,23),u(37,"date"),t(),i(38,"p"),_(39,24),u(40,"durationFormat"),t(),c(41,"spk-divider"),i(42,"p"),_(43,25),u(44,"bytes"),t(),i(45,"p"),_(46,26),u(47,"bytes"),t(),i(48,"p"),_(49,27),u(50,"bytes"),t(),c(51,"spk-divider"),i(52,"p"),_(53,28),t(),i(54,"p"),_(55,29),t()()()),n&2){let e=m(2).$implicit;o(9),s(T(9,17,e.data==null||e.data.TestResults==null?null:e.data.TestResults.BeginTime,"medium")),d(8),o(3),s(T(12,20,e.data==null||e.data.TestResults==null?null:e.data.TestResults.EndTime,"medium")),d(11),o(3),s(g(15,23,e.data==null||e.data.TestResults==null?null:e.data.TestResults.Duration)),d(14),o(2),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.VerificationsActualLength),d(17),o(3),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.WarningsActualLength),d(20),o(2),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.ErrorsActualLength),d(22),o(12),s(T(34,25,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.BeginTime,"medium")),d(33),o(3),s(T(37,28,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.EndTime,"medium")),d(36),o(3),s(g(40,31,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.Duration)),d(39),o(4),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileCount)(g(44,33,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileSize)),d(43),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileCount)(g(47,35,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileSize)),d(46),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileCount)(g(50,37,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileSize)),d(49),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.WarningsActualLength),d(53),o(2),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.ErrorsActualLength),d(55)}}function Je(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function He(n,a){if(n&1&&(i(0,"details",45)(1,"summary"),N(2,30),c(3,"spk-icon"),i(4,"div",46),c(5,"spk-icon",39),t(),M(),t(),i(6,"div",47),k(7,Je,3,3,"code",null,I),t()()),n&2){let e=m(2).$implicit;o(5),s(e.data.VerificationsActualLength),d(2),o(2),v(e.data.Verifications)}}function Qe(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function Ye(n,a){n&1&&(i(0,"p"),F(1,"No errors"),t())}function Ze(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function en(n,a){if(n&1&&(i(0,"section",40)(1,"app-toggle-card",41),A(2,42),i(3,"h3"),_(4,0),t(),P(),A(5,43),i(6,"p"),_(7,1),u(8,"date"),t(),i(9,"p"),_(10,2),u(11,"date"),t(),i(12,"p"),_(13,3),u(14,"durationFormat"),t(),P(),t(),i(15,"app-toggle-card",41),A(16,42),i(17,"h3"),_(18,4),t(),P(),A(19,43),i(20,"p"),_(21,5),u(22,"bytes"),t(),i(23,"p"),_(24,6),u(25,"bytes"),t(),i(26,"p"),_(27,7),u(28,"bytes"),t(),i(29,"p"),_(30,8),u(31,"bytes"),t(),i(32,"p"),_(33,9),t(),i(34,"p"),_(35,10),t(),i(36,"p"),_(37,11),t(),P(),t(),i(38,"div",44),c(39,"spk-divider"),C(40,qe,56,39)(41,He,9,1,"details",45),i(42,"details",45)(43,"summary"),N(44,12),c(45,"spk-icon"),i(46,"div",46),c(47,"spk-icon",39),t(),M(),t(),i(48,"div",47),k(49,Qe,3,3,"code",null,I),t()(),i(51,"details",45)(52,"summary"),N(53,13),c(54,"spk-icon"),i(55,"div",46),c(56,"spk-icon",39),t(),M(),t(),i(57,"div",47),C(58,Ye,2,0,"p"),k(59,Ze,3,3,"code",null,I),t()(),c(61,"spk-divider"),i(62,"details")(63,"summary"),N(64,14),c(65,"spk-icon"),i(66,"div",46),c(67,"spk-icon",39),t(),M(),t(),i(68,"code")(69,"button",48),F(70,"Copy"),t(),F(71),u(72,"json"),t()()()()),n&2){let e=m().$implicit;o(),h("disallowToggle",!0),o(7),s(T(8,22,e.data==null?null:e.data.BeginTime,"medium")),d(7),o(3),s(T(11,25,e.data==null?null:e.data.EndTime,"medium")),d(10),o(3),s(g(14,28,e.data==null?null:e.data.Duration)),d(13),o(),h("disallowToggle",!0),o(7),s(e.data==null?null:e.data.ExaminedFiles)(g(22,30,e.data==null?null:e.data.SizeOfExaminedFiles)),d(21),o(3),s(e.data==null?null:e.data.OpenedFiles)(g(25,32,e.data==null?null:e.data.SizeOfOpenedFiles)),d(24),o(3),s(e.data==null?null:e.data.AddedFiles)(g(28,34,e.data==null?null:e.data.SizeOfAddedFiles)),d(27),o(3),s(e.data==null?null:e.data.ModifiedFiles)(g(31,36,e.data==null?null:e.data.SizeOfModifiedFiles)),d(30),o(2),s(e.data==null?null:e.data.DeletedFiles),d(33),o(2),s(e.data==null?null:e.data.TooLargeFiles),d(35),o(2),s(e.data==null?null:e.data.FilesWithError),d(37),o(3),E((e.data==null?null:e.data.MainOperation)==="Backup"?40:-1),o(),E((e.data==null?null:e.data.MainOperation)==="Test"?41:-1),o(6),s(e.data==null?null:e.data.WarningsActualLength),d(44),o(2),v(e.data==null?null:e.data.Warnings),o(7),s(e.data==null?null:e.data.ErrorsActualLength),d(53),o(2),E((e.data==null||e.data.Errors==null?null:e.data.Errors.length)===0?58:-1),o(),v(e.data==null?null:e.data.Errors),o(12),S(" ",g(72,38,e.data)," ")}}function nn(n,a){if(n&1){let e=K();i(0,"article",32)(1,"header",33),y("click",function(){let r=D(e).$implicit,L=m();return $(L.toggleOpenEntry(r.id))}),C(2,ze,1,0,"div",34)(3,Ve,1,0,"div",35)(4,We,1,0,"div",36),i(5,"h3"),F(6),u(7,"date"),t(),i(8,"p"),F(9),C(10,je,1,1),t(),c(11,"div",37),i(12,"div",38)(13,"spk-icon",39),F(14,"caret-down"),t()()(),C(15,en,73,40,"section",40),t()}if(n&2){let e=a.$implicit,l=m();o(2),E(e.data!=null&&e.data.ErrorsActualLength&&(e.data==null?null:e.data.ErrorsActualLength)>0?2:e.data!=null&&e.data.WarningsActualLength&&(e.data==null?null:e.data.WarningsActualLength)>0?3:4),o(4),x(T(7,7,e.timestamp,"medium")),o(3),S(" ",e.data==null?null:e.data.MainOperation," "),o(),E(e.data!=null&&e.data.WarningsActualLength&&(e.data==null?null:e.data.WarningsActualLength)>0?10:-1),o(3),f("open",e.id===l.openEntry()),o(2),E(e.id===l.openEntry()?15:-1)}}var de=class n{#e=R(ae);backupId=ie.required();openEntry=G(null);pagination=G({offset:0,pagesize:100});resource=se({request:()=>te({id:this.backupId()},this.pagination()),loader:({request:a})=>this.#e.getApiV1BackupByIdLog({id:a.id,pagesize:100}).pipe(B(e=>e.map(l=>({id:l.ID,operationId:l.OperationID,timestamp:l.Timestamp*1e3,type:l.Type,data:JSON.parse(l.Message),exception:JSON.stringify(l.Exception)==="{}"?null:l.Exception}))))});toggleOpenEntry(a){if(this.openEntry()===a){this.openEntry.set(null);return}this.openEntry.set(a)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-general-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let a;a=$localize`Time`;let e;e=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let l;l=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let r;r=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let L;L=$localize`Source files`;let V;V=$localize`Evaluated: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let W;W=$localize`Opened: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let j;j=$localize`Added: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let q;q=$localize`Modified: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let J;J=$localize`Deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let H;H=$localize`Too large: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Q;Q=$localize`Files with error: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let O;O=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:warning-circle${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SPK_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#46\uFFFD"}:START_TAG_DIV:${"\uFFFD#47\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_DIV:`,O=U(O);let Y;Y=$localize`${"\uFFFD#54\uFFFD"}:START_TAG_SPK_ICON:warning${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SPK_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#55\uFFFD"}:START_TAG_DIV:${"\uFFFD#56\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#55\uFFFD"}:CLOSE_TAG_DIV:`,Y=U(Y);let Z;Z=$localize`${"\uFFFD#65\uFFFD"}:START_TAG_SPK_ICON:notepad${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SPK_ICON: Complete log ${"\uFFFD#66\uFFFD"}:START_TAG_DIV:${"\uFFFD#67\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#66\uFFFD"}:CLOSE_TAG_DIV:`,Z=U(Z);let ee;ee=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:circle-half-tilt${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON: Test phase ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ee=U(ee);let Fe;Fe=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ge;ge=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ee;Ee=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let me;me=$localize`Verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ce;Ce=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Oe;Oe=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Le;Le=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Te;Te=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ae;Ae=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Pe;Pe=$localize` Deleted files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Se;Se=$localize` Downloaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ge;Ge=$localize` Uploaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ne;Ne=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Me;Me=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ne;return ne=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:warning-circle${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON: Verifications ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ne=U(ne),[a,e,l,r,L,V,W,j,q,J,H,Q,O,Y,Z,ee,Fe,ge,Ee,me,Ce,Oe,Le,Te,Ae,Pe,Se,Ge,Ne,Me,ne,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"status","error"],[1,"status","warn"],[1,"status"],[1,"spacer"],[1,"action"],[1,"toggle-indicator"],[1,"log-content"],[3,"disallowToggle"],["title",""],["content",""],[1,"extra-info"],["name","details"],[1,"actions"],[1,"content"],["spk-button","",1,"small"]]},template:function(e,l){e&1&&(C(0,we,1,0,"spk-progress-bar",31),k(1,nn,16,10,"article",32,I)),e&2&&(E(l.resource.isLoading()?0:-1),o(),v(l.resource.value()))},dependencies:[Ke,ye,re,_e,z,le,w,pe,oe],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column;cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-level-40);background-color:var(--base-level-10);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-level-20)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%]{display:flex;flex-direction:column}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;gap:.5rem;padding:.75rem;border-radius:var(--shape-2);background-color:var(--base-level-20)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:focus{outline:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:hover{background-color:var(--base-level-30)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]::marker{font-size:0}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex:1 0;gap:.5rem;-webkit-user-select:none;user-select:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:2rem;transition:transform 125ms linear}details[open][_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:.75rem 1rem 0;display:flex;flex-direction:column;gap:.75rem}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{margin-top:.75rem;position:relative}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:.75rem;right:.75rem}.extra-info[_ngcontent-%COMP%]{grid-column:1/-1;display:flex;flex-direction:column;gap:1rem}.extra-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.extra-info[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-level-20)}.log-content[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:1fr 1fr;gap:1rem}.status[_ngcontent-%COMP%]{display:block;width:1rem;height:1rem;background-color:var(--success-500);border-radius:50%}.status.error[_ngcontent-%COMP%]{background-color:var(--error-500)}.status.warn[_ngcontent-%COMP%]{background-color:var(--warn-500)}"],changeDetection:0})};function tn(n,a){n&1&&c(0,"spk-progress-bar",0)}function on(n,a){if(n&1&&(i(0,"section",5)(1,"code"),F(2),u(3,"json"),t()()),n&2){let e=m().$implicit;o(2),x(g(3,1,e.data))}}function an(n,a){if(n&1){let e=K();i(0,"article",1)(1,"header",2),y("click",function(){let r=D(e).$implicit,L=m();return $(L.toggleOpenEntry(r.id))}),i(2,"h3"),F(3),u(4,"date"),t(),i(5,"div",3)(6,"spk-icon",4),F(7,"caret-down"),t()()(),C(8,on,4,3,"section",5),t()}if(n&2){let e=a.$implicit,l=m();o(3),Re("",T(4,6,e.timestamp,"medium"),": ",e.operation," ",e.path,""),o(3),f("open",e.id===l.openEntry()),o(2),E(e.id===l.openEntry()?8:-1)}}var ue=class n{#e=R(ae);backupId=ie.required();openEntry=G(null);pagination=G({offset:0,pagesize:100});resource=se({request:()=>te({id:this.backupId()},this.pagination()),loader:({request:a})=>this.#e.getApiV1BackupByIdRemotelog({id:a.id,pagesize:100}).pipe(B(e=>e.map((l,r)=>({id:l.ID,operationId:l.OperationID,timestamp:l.Timestamp*1e3,operation:l.Operation,path:l.Path,data:typeof l.Data=="string"?JSON.parse(l.Data):null}))))});toggleOpenEntry(a){if(this.openEntry()===a){this.openEntry.set(null);return}this.openEntry.set(a)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-remote-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:[[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"actions"],[1,"toggle-indicator"],[1,"log-content"]],template:function(e,l){e&1&&(C(0,tn,1,0,"spk-progress-bar",0),k(1,an,9,9,"article",1,I)),e&2&&(E(l.resource.isLoading()?0:-1),o(),v(l.resource.value()))},dependencies:[oe,re,z,w],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-level-40);background-color:var(--base-level-10);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-level-20)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0;-webkit-user-select:none;user-select:none}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}.log-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem}code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-level-20)}"],changeDetection:0})};function ln(n,a){if(n&1&&(F(0," - "),A(1),_(2,6),P(),F(3),u(4,"durationFormat")),n&2){m(2);let e=X(6);o(3),S(" ",g(4,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration)," ")}}function _n(n,a){n&1&&(A(0),_(1,7),P())}function rn(n,a){if(n&1&&(F(0),u(1,"bytes")),n&2){m(2);let e=X(6);S(" ",g(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function pn(n,a){n&1&&(A(0),_(1,8),P())}function sn(n,a){if(n&1&&(F(0),u(1,"bytes")),n&2){m(2);let e=X(6);S(" ",g(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function dn(n,a){n&1&&(A(0),_(1,9),P())}function un(n,a){if(n&1&&(i(0,"spk-chip",19),_(1,10),t()),n&2){m(2);let e=X(6);o(),s(e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount),d(1)}}function cn(n,a){n&1&&(i(0,"spk-chip",20),_(1,11),t())}function Fn(n,a){if(n&1&&(i(0,"div",14)(1,"div",18)(2,"h3"),F(3),i(4,"spk-icon"),F(5,"database"),t()(),i(6,"p")(7,"span"),_(8,3),t(),F(9),u(10,"date"),C(11,ln,5,3)(12,_n,2,0,"ng-container"),t(),i(13,"p")(14,"span"),_(15,4),t(),C(16,rn,2,3)(17,pn,2,0,"ng-container"),t(),i(18,"p")(19,"span"),_(20,5),t(),C(21,sn,2,3)(22,dn,2,0,"ng-container"),t()(),C(23,un,2,1,"spk-chip",19)(24,cn,2,0,"spk-chip",20),t()),n&2){let e,l=m(),r=X(6);o(3),S(" ",(e=r.Backup==null?null:r.Backup.Name)!==null&&e!==void 0?e:l.MISSING_BACKUP_NAME," "),o(6),S(" ",T(10,6,r.Backup==null||r.Backup.Metadata==null?null:r.Backup.Metadata.LastBackupDate,"short")," "),o(2),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.LastBackupDuration?11:12),o(5),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.SourceFilesSize?16:17),o(5),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.TargetFilesSize?21:22),o(2),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.BackupListCount?23:24)}}function gn(n,a){if(n&1&&c(0,"app-general-log",17),n&2){let e=m();h("backupId",e.backupId())}}function En(n,a){if(n&1&&c(0,"app-remote-log",17),n&2){let e=m();h("backupId",e.backupId())}}var ce=class n{#e=R(Ie);#n=R(Be);MISSING_BACKUP_NAME=$localize`Backup name missing`;activeTab=G("general");backupId=he(this.#e.params.pipe(B(a=>a.id)));backup=fe(()=>{let a=this.backupId();return a?this.#n.getBackupById(a):null});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-log"]],decls:15,vars:8,consts:()=>{let a;a=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`General`;let l;l=$localize` Destination `;let r;r=$localize`Last successful backup:`;let L;L=$localize`Source:`;let V;V=$localize`Destination:`;let W;W=$localize`took`;let j;j=$localize`N/A`;let q;q=$localize`N/A`;let J;J=$localize`N/A`;let H;H=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION: Version`;let Q;return Q=$localize`No version yet`,[a,e,l,r,L,V,W,j,q,J,H,Q,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"backup"],[1,"primary"],["tab","",3,"click"],[3,"backupId"],[1,"text"],[1,"simple","success"],[1,"simple"]]},template:function(e,l){if(e&1){let r=K();c(0,"app-status-bar"),i(1,"section")(2,"div",12)(3,"button",13),N(4,0),c(5,"spk-icon"),M(),t()(),De(6),C(7,Fn,25,9,"div",14),i(8,"spk-tabs",15)(9,"button",16),y("click",function(){return D(r),$(l.activeTab.set("general"))}),_(10,1),t(),i(11,"button",16),y("click",function(){return D(r),$(l.activeTab.set("destination"))}),_(12,2),t()(),C(13,gn,1,1,"app-general-log",17)(14,En,1,1,"app-remote-log",17),t()}if(e&2){o(6);let r=$e(l.backup());o(),E(r?7:-1),o(2),f("active",l.activeTab()==="general"),o(2),f("active",l.activeTab()==="destination"),o(2),E(l.activeTab()==="general"?13:-1),o(),E(l.activeTab()==="destination"?14:-1)}},dependencies:[xe,de,ue,ke,le,pe,w,be,z,_e,ve],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 1.5rem;gap:1rem}spk-tabs[_ngcontent-%COMP%]{margin-bottom:1rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-level-70)}"],changeDetection:0})};export{ce as default};
package/chunk-FRXAEGHW.js DELETED
@@ -1 +0,0 @@
1
- import{a as Re}from"./chunk-SFWQDWHT.js";import"./chunk-ZP273LXY.js";import"./chunk-D5WIWFNP.js";import"./chunk-WSLU6K4D.js";import{a as De}from"./chunk-UJZB6UQE.js";import"./chunk-RHW5QVAY.js";import"./chunk-JJQARMUD.js";import"./chunk-3UJUWE5B.js";import{e as y}from"./chunk-I3TLRILF.js";import"./chunk-2SGDSXNW.js";import{a as L,g as B,h as $e,j as fe,k as Ae,o as G,p as Ie}from"./chunk-XQKR67WI.js";import{b as Ne}from"./chunk-CEOO3F5U.js";import"./chunk-K3CYM6ID.js";import"./chunk-O6GWHO26.js";import"./chunk-M7VDIUGU.js";import"./chunk-BWYJMRKB.js";import{Db as u,Eb as p,Fb as c,Gb as f,Hb as A,Jb as d,Kb as S,Na as r,W as I,Yb as F,Za as Me,_b as N,ba as m,ca as k,cb as C,hb as ge,ib as Te,ic as R,jc as O,kb as M,mb as D,mc as $,nc as H,oc as b,pb as P,qb as Ce,ra as Fe,rb as Oe,sb as me,tb as o,ub as t,vb as s,wb as g,xb as T,xc as Pe,zb as ke}from"./chunk-XGARKXE4.js";import"./chunk-7CGTOI24.js";var He=()=>[y,B,L,fe,Ae,G,import("./chunk-436ZVGPO.js").then(e=>e.DurationFormatPipe),import("./chunk-36ZZ3COU.js").then(e=>e.BytesPipe),import("./chunk-PGUALKQ6.js").then(e=>e.RelativeTimePipe)],be=()=>["/add-backup"],ye=()=>["/restore"],Le=e=>["/backup",e],Be=e=>["/restore",e],Ge=e=>["/backup",e,"export"],xe=e=>["/backup",e,"database"],ve=e=>["/backup",e,"commandline"],Xe=e=>["/backup",e,"log"];function he(e,a){if(e&1&&(F(0),$(1,"durationFormat")),e&2){let i=S().$implicit,n=S(3);N(" ",b(1,1,i.Backup==null||i.Backup.Metadata==null?null:i.Backup.Metadata.LastBackupDuration,n.timeType()==="actual")," ")}}function ze(e,a){e&1&&(g(0),c(1,29),T())}function we(e,a){if(e&1&&(F(0),$(1,"bytes")),e&2){let i=S().$implicit;N(" ",H(1,1,i.Backup==null||i.Backup.Metadata==null?null:i.Backup.Metadata.SourceFilesSize)," ")}}function Ke(e,a){e&1&&(g(0),c(1,30),T())}function Ve(e,a){if(e&1&&(F(0),$(1,"bytes")),e&2){let i=S().$implicit;N(" ",H(1,1,i.Backup==null||i.Backup.Metadata==null?null:i.Backup.Metadata.TargetFilesSize)," ")}}function je(e,a){e&1&&(g(0),c(1,31),T())}function qe(e,a){if(e&1&&(o(0,"spk-chip",48),c(1,32),t()),e&2){let i=S().$implicit;r(),f(i.Backup==null||i.Backup.Metadata==null?null:i.Backup.Metadata.BackupListCount),A(1)}}function Ue(e,a){e&1&&(o(0,"spk-chip",49),c(1,33),t())}function We(e,a){if(e&1){let i=ke();o(0,"div",47)(1,"div",38)(2,"h3"),F(3),o(4,"spk-icon"),F(5,"database"),t()(),o(6,"p")(7,"span"),c(8,15),t(),F(9),$(10,"relativeTime"),t(),o(11,"p")(12,"span"),c(13,16),t(),C(14,he,2,4)(15,ze,2,0,"ng-container"),t(),o(16,"p")(17,"span"),c(18,17),t(),C(19,we,2,3)(20,Ke,2,0,"ng-container"),t(),o(21,"p")(22,"span"),c(23,18),t(),C(24,Ve,2,3)(25,je,2,0,"ng-container"),t()(),C(26,qe,2,1,"spk-chip",48)(27,Ue,2,0,"spk-chip",49),o(28,"div",42)(29,"button",50),d("click",function(){let l=m(i).$implicit,E=S(3);return k(E.startBackup(l.Backup==null?null:l.Backup.ID))}),u(30,19),s(31,"spk-icon"),p(),t(),o(32,"button",51)(33,"spk-icon"),F(34,"pencil-simple"),t()(),o(35,"spk-menu",52)(36,"button",39)(37,"spk-icon"),F(38,"dots-three-vertical"),t()(),g(39,44),o(40,"h3",53),F(41,"Operations"),t(),o(42,"button",54),u(43,20),s(44,"spk-icon"),p(),t(),o(45,"button",54),u(46,21),s(47,"spk-icon"),p(),t(),o(48,"button",55),d("click",function(){let l=m(i).$implicit,E=S(3);return k(E.deleteBackup(l.Backup==null?null:l.Backup.ID))}),u(49,22),s(50,"spk-icon"),p(),t(),s(51,"spk-divider"),o(52,"h3",53),F(53,"Advanced"),t(),o(54,"button",54),u(55,23),s(56,"spk-icon"),p(),t(),o(57,"button",45),d("click",function(){let l=m(i).$implicit,E=S(3);return k(E.verifyFiles(l.Backup==null?null:l.Backup.ID))}),u(58,24),s(59,"spk-icon"),p(),t(),o(60,"button",45),d("click",function(){let l=m(i).$implicit,E=S(3);return k(E.compressBackup(l.Backup==null?null:l.Backup.ID))}),u(61,25),s(62,"spk-icon"),p(),t(),o(63,"button",54),u(64,26),s(65,"spk-icon"),p(),t(),s(66,"spk-divider"),o(67,"h3",53),F(68,"Reporting"),t(),o(69,"button",54),u(70,27),s(71,"spk-icon"),p(),t(),o(72,"button",45),d("click",function(){let l=m(i).$implicit,E=S(3);return k(E.createErrorReport(l.Backup==null?null:l.Backup.ID))}),u(73,28),s(74,"spk-icon"),p(),t(),T(),t()()()}if(e&2){let i,n=a.$implicit,l=S(3);r(3),N(" ",(i=n.Backup==null?null:n.Backup.Name)!==null&&i!==void 0?i:l.MISSING_BACKUP_NAME," "),r(6),N(" ",b(10,17,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,l.timeType()==="actual")," "),r(5),P(!(n.Backup==null||n.Backup.Metadata==null)&&n.Backup.Metadata.LastBackupDuration?14:15),r(5),P(!(n.Backup==null||n.Backup.Metadata==null)&&n.Backup.Metadata.SourceFilesSize?19:20),r(5),P(!(n.Backup==null||n.Backup.Metadata==null)&&n.Backup.Metadata.TargetFilesSize?24:25),r(2),P(!(n.Backup==null||n.Backup.Metadata==null)&&n.Backup.Metadata.BackupListCount?26:27),r(3),D("loader",l.startingBackup()),r(3),M("routerLink",O(20,Le,n.Backup==null?null:n.Backup.ID)),r(3),M("right",!0),r(7),M("routerLink",O(22,Be,n.Backup==null?null:n.Backup.ID)),r(3),M("routerLink",O(24,Ge,n.Backup==null?null:n.Backup.ID)),r(3),D("loader",l.deletingBackup()===(n.Backup==null?null:n.Backup.ID)),r(6),M("routerLink",O(26,xe,n.Backup==null?null:n.Backup.ID)),r(9),M("routerLink",O(28,ve,n.Backup==null?null:n.Backup.ID)),r(6),M("routerLink",O(30,Xe,n.Backup==null?null:n.Backup.ID))}}function Ye(e,a){if(e&1&&Oe(0,We,75,32,"div",47,Ce),e&2){let i=S(2);me(i.backups())}}function Je(e,a){e&1&&(g(0),c(1,34),T())}function Qe(e,a){if(e&1&&C(0,Ye,2,0)(1,Je,2,0,"ng-container"),e&2){let i=S();P(i.backups().length?0:1)}}function Ze(e,a){e&1&&(o(0,"div",56),s(1,"spk-progress-bar",57),o(2,"div",38)(3,"h3"),c(4,35),t()()())}var en=[{value:"id",label:$localize`Create order`},{value:"backend",label:$localize`Destination type`},{value:"lastrun",label:$localize`Last run`},{value:"name",label:$localize`Name`}],x=class e{#e=I(De);#n=I(Ne);MISSING_BACKUP_NAME=$localize`Backup name missing`;orderBy=Pe(()=>en.find(a=>a.value===this.#e.orderBy())?.label);backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;timeType=Fe("relative");ngOnInit(){this.#e.getBackups(!0)}setOrderBy(a){this.#e.setOrderBy(a)}startBackup(a){this.#e.startBackup(a)}deleteBackup(a){window.confirm("Are you sure you want to delete this backup?")&&this.#e.deleteBackup(a)}verifyFiles(a){this.#n.postApiV1BackupByIdVerify({id:a}).subscribe()}compressBackup(a){this.#n.postApiV1BackupByIdCompact({id:a}).subscribe()}createErrorReport(a){this.#n.postApiV1BackupByIdCreatereport({id:a}).subscribe()}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=Me({type:e,selectors:[["app-home"]],decls:57,vars:7,consts:()=>{let a;a=$localize`Backups`;let i;i=$localize`Backups are stored in the cloud and can be restored at any time.`;let n;n=$localize` Add ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let l;l=$localize`Restores`;let E;E=$localize`Restores allow you to restore your data from the cloud.`;let v;v=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let X;X=$localize`My backups`;let h;h=$localize` Time: ${"\uFFFD#31\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#32\uFFFD"}:START_TAG_SPK_ICON:clock${"\uFFFD/#32\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let z;z=$localize`Relative time`;let w;w=$localize`Actual time`;let K;K=$localize` Order by: ${"\uFFFD#41\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#41\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#42\uFFFD"}:START_TAG_SPK_ICON:arrows-down-up${"\uFFFD/#42\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let V;V=$localize`Create order`;let j;j=$localize`Destination type`;let q;q=$localize`Last run`;let U;U=$localize`Name`;let W;W=$localize`Last successful backup:`;let Y;Y=$localize`Duration:`;let J;J=$localize`Source:`;let Q;Q=$localize`Destination:`;let Z;Z=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:play-circle${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON: Start `;let ee;ee=$localize`${"\uFFFD#44\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#44\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore `;let ne;ne=$localize`${"\uFFFD#47\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#47\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let te;te=$localize`${"\uFFFD#50\uFFFD"}:START_TAG_SPK_ICON:x-circle${"\uFFFD/#50\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let oe;oe=$localize`${"\uFFFD#56\uFFFD"}:START_TAG_SPK_ICON:database${"\uFFFD/#56\uFFFD"}:CLOSE_TAG_SPK_ICON: Database `;let ie;ie=$localize`${"\uFFFD#59\uFFFD"}:START_TAG_SPK_ICON:check-square-offset${"\uFFFD/#59\uFFFD"}:CLOSE_TAG_SPK_ICON: Verify files `;let _e;_e=$localize`${"\uFFFD#62\uFFFD"}:START_TAG_SPK_ICON:file-archive${"\uFFFD/#62\uFFFD"}:CLOSE_TAG_SPK_ICON: Compress now `;let ae;ae=$localize`${"\uFFFD#65\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#65\uFFFD"}:CLOSE_TAG_SPK_ICON: Commandline `;let le;le=$localize`${"\uFFFD#71\uFFFD"}:START_TAG_SPK_ICON:notepad${"\uFFFD/#71\uFFFD"}:CLOSE_TAG_SPK_ICON: Log `;let ce;ce=$localize`${"\uFFFD#74\uFFFD"}:START_TAG_SPK_ICON:file-plus${"\uFFFD/#74\uFFFD"}:CLOSE_TAG_SPK_ICON: Create error report `;let re;re=$localize`N/A`;let se;se=$localize`N/A`;let ue;ue=$localize`N/A`;let pe;pe=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: Version `;let Se;Se=$localize`No version yet`;let Ee;Ee=$localize`No backups founds`;let de;return de=$localize`Loading backups...`,[a,i,n,l,E,v,X,h,z,w,K,V,j,q,U,W,Y,J,Q,Z,ee,ne,te,oe,ie,_e,ae,le,ce,re,se,ue,pe,Se,Ee,de,[1,"type-a",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","spk-button",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],["type","button","spk-button","",1,"small"],["menu",""],["type","button",3,"click"],[1,"backups"],[1,"backup"],[1,"simple","success"],[1,"simple"],["spk-button","",3,"click"],["type","button","spk-button","",3,"routerLink"],[3,"right"],["title",""],["type","button",3,"routerLink"],[3,"click"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(i,n){i&1&&(s(0,"app-status-bar"),o(1,"section")(2,"header")(3,"spk-card",36),s(4,"img",37),o(5,"div",38)(6,"h3"),c(7,0),t(),o(8,"p"),c(9,1),t()(),o(10,"button",39),u(11,2),s(12,"spk-icon"),p(),t()(),o(13,"spk-card",36),s(14,"img",40),o(15,"div",38)(16,"h3"),c(17,3),t(),o(18,"p"),c(19,4),t()(),o(20,"button",39),u(21,5),s(22,"spk-icon"),p(),t()()(),o(23,"div",41)(24,"h2"),g(25),c(26,6),T(),o(27,"div",42)(28,"spk-menu")(29,"button",43),u(30,7),s(31,"strong")(32,"spk-icon"),p(),t(),g(33,44),o(34,"button",45),d("click",function(){return n.timeType.set("relative")}),c(35,8),t(),o(36,"button",45),d("click",function(){return n.timeType.set("actual")}),c(37,9),t(),T(),t(),o(38,"spk-menu")(39,"button",43),u(40,10),s(41,"strong")(42,"spk-icon"),p(),t(),g(43,44),o(44,"button",45),d("click",function(){return n.setOrderBy("id")}),c(45,11),t(),o(46,"button",45),d("click",function(){return n.setOrderBy("backend")}),c(47,12),t(),o(48,"button",45),d("click",function(){return n.setOrderBy("lastrun")}),c(49,13),t(),o(50,"button",45),d("click",function(){return n.setOrderBy("name")}),c(51,14),t(),T(),t()()(),o(52,"div",46),C(53,Qe,2,1)(54,Ze,5,0),ge(55,53,He,null,54),t()()()),i&2&&(r(3),M("routerLink",R(5,be)),r(10),M("routerLink",R(6,ye)),r(19),f(n.timeType()),A(30),r(10),f(n.orderBy()),A(40),r(13),Te(!n.backupsLoading()))},dependencies:[y,Re,$e,B,L,G,Ie],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:1rem}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-level-70)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{x as default};