@duplicati/ngclient 0.0.124 → 0.0.131

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 (212) hide show
  1. package/assets/spk.woff2 +0 -0
  2. package/chunk-3IRKJXHE.js +6 -0
  3. package/chunk-3KIPRGE2.js +1 -0
  4. package/chunk-3PYBMCOB.js +1 -0
  5. package/chunk-4D2NUH5S.js +1 -0
  6. package/chunk-5PEBIF7G.js +1 -0
  7. package/chunk-5ZODA7EN.js +1 -0
  8. package/{chunk-XUPWJEL7.js → chunk-76QLZQIX.js} +1 -1
  9. package/chunk-7LEXBIXG.js +1 -0
  10. package/{chunk-VZBWK3XF.js → chunk-ABF3SFY5.js} +1 -1
  11. package/chunk-AGU2PEL5.js +1 -0
  12. package/{chunk-6EWRKJSC.js → chunk-B5FKLIHW.js} +1 -1
  13. package/chunk-BISTLAYK.js +1 -0
  14. package/chunk-CPQOWCF6.js +2 -0
  15. package/chunk-CTRHZCKS.js +1 -0
  16. package/chunk-CYLI6ZJ3.js +1 -0
  17. package/chunk-D6CQCWWK.js +1 -0
  18. package/chunk-DDV32SDB.js +1 -0
  19. package/chunk-DM2VSIZA.js +1 -0
  20. package/chunk-E4Z6XEMU.js +1 -0
  21. package/chunk-EKZRKTLM.js +1 -0
  22. package/chunk-EUDKD2JW.js +1 -0
  23. package/{chunk-OQPUBCLB.js → chunk-F74MXVWD.js} +1 -1
  24. package/chunk-FLMFEFKM.js +1 -0
  25. package/chunk-FO4W6SOP.js +1 -0
  26. package/chunk-FPLBURO5.js +1 -0
  27. package/chunk-FWVOVJCG.js +2 -0
  28. package/chunk-FWZV4DTQ.js +2 -0
  29. package/chunk-GGT3NXAX.js +1 -0
  30. package/chunk-GU7U3EFF.js +1 -0
  31. package/chunk-GW37Y5Z7.js +1 -0
  32. package/{chunk-S75WBVE3.js → chunk-HWCTRSCV.js} +1 -1
  33. package/chunk-IAE5MH6W.js +1 -0
  34. package/{chunk-DLJSVAM2.js → chunk-JWFYA3TO.js} +1 -1
  35. package/{chunk-4V45XF67.js → chunk-K5AQUIEE.js} +1 -1
  36. package/{chunk-KPH4ZAFT.js → chunk-K5P3KNHL.js} +1 -1
  37. package/chunk-K6EZTPNQ.js +7 -0
  38. package/chunk-KA4H3PM5.js +1 -0
  39. package/chunk-KQAO2YHR.js +1 -0
  40. package/chunk-KU6D4KVX.js +1 -0
  41. package/{chunk-GQGMGFDX.js → chunk-KV7SEZ24.js} +1 -1
  42. package/chunk-LPSXYSH2.js +1 -0
  43. package/{chunk-QUOBR5MG.js → chunk-LQ2PCH6Q.js} +1 -1
  44. package/chunk-LXOONGVP.js +1 -0
  45. package/chunk-LZGUK3CQ.js +2 -0
  46. package/chunk-MHALSLG3.js +1 -0
  47. package/chunk-MXNLMTFY.js +1 -0
  48. package/{chunk-HIW2CN45.js → chunk-N334RUEQ.js} +1 -1
  49. package/chunk-OMZ3W4RW.js +1 -0
  50. package/{chunk-6DNRCK5D.js → chunk-P45GAY6A.js} +1 -1
  51. package/chunk-P4ZYFRD3.js +1 -0
  52. package/chunk-Q3ILJYED.js +1 -0
  53. package/{chunk-ED7PHXLX.js → chunk-Q5QHAGHB.js} +1 -1
  54. package/chunk-R3TWV35H.js +4 -0
  55. package/chunk-R43ZLOB3.js +1 -0
  56. package/chunk-RFBJR3ZC.js +1 -0
  57. package/chunk-RVLLX2SW.js +1 -0
  58. package/chunk-RZWJA6W3.js +3 -0
  59. package/chunk-TOP2X7ZJ.js +1 -0
  60. package/chunk-TUOSYDUU.js +1 -0
  61. package/chunk-U4OAPG74.js +2 -0
  62. package/chunk-UFZFKKK7.js +1 -0
  63. package/chunk-UHRBTTCA.js +1 -0
  64. package/chunk-UIC4BWTY.js +1 -0
  65. package/chunk-UUG7G5LZ.js +1 -0
  66. package/chunk-UVLJAD66.js +1 -0
  67. package/chunk-UYWLCW5G.js +1 -0
  68. package/chunk-VKD4Y3YQ.js +1 -0
  69. package/chunk-VNYGRDVP.js +1 -0
  70. package/chunk-W2XSKJJ5.js +1 -0
  71. package/chunk-WIDMAJIO.js +1 -0
  72. package/{chunk-M5RL4LRX.js → chunk-WIJ3HW7I.js} +1 -1
  73. package/chunk-WWHML7QK.js +56 -0
  74. package/chunk-WY2KPAVB.js +1 -0
  75. package/chunk-XD26KCAE.js +1 -0
  76. package/chunk-XHQO75TB.js +1 -0
  77. package/chunk-XOZRQBBW.js +1 -0
  78. package/chunk-YBFTPRR5.js +1 -0
  79. package/chunk-YFRT24NZ.js +1 -0
  80. package/chunk-YXIITZFM.js +1 -0
  81. package/{chunk-TCEYGZ6D.js → chunk-Z24H5QI5.js} +2 -2
  82. package/chunk-Z2VKXGKY.js +1 -0
  83. package/chunk-ZE5QAS4M.js +1 -0
  84. package/index.html +2 -2
  85. package/locale/messages.cs.json +4 -2
  86. package/locale/messages.da.json +5 -2
  87. package/locale/messages.de.json +48 -8
  88. package/locale/messages.en_GB.json +4 -2
  89. package/locale/messages.es.json +4 -2
  90. package/locale/messages.fi.json +7 -2
  91. package/locale/messages.fr.json +7 -2
  92. package/locale/messages.hu.json +6 -2
  93. package/locale/messages.it.json +32 -21
  94. package/locale/messages.ja_JP.json +8 -2
  95. package/locale/messages.nl_NL.json +53 -21
  96. package/locale/messages.pl.json +9 -2
  97. package/locale/messages.pt.json +8 -2
  98. package/locale/messages.pt_BR.json +10 -3
  99. package/locale/messages.ru.json +8 -2
  100. package/locale/messages.sr_RS.json +9 -2
  101. package/locale/messages.sv_SE.json +9 -2
  102. package/locale/messages.zh_CN.json +376 -48
  103. package/locale/messages.zh_TW.json +9 -2
  104. package/main-JMFOP3Z7.js +1 -0
  105. package/package.json +1 -1
  106. package/polyfills-COBLRUJG.js +1 -0
  107. package/{styles-P2AEFLUS.css → styles-ORRIWQJ5.css} +1 -1
  108. package/chunk-25II37TZ.js +0 -1
  109. package/chunk-2CXHZS6X.js +0 -1
  110. package/chunk-3UPH6V5C.js +0 -1
  111. package/chunk-43BIRTPL.js +0 -1
  112. package/chunk-4DR45FFH.js +0 -2
  113. package/chunk-4KE2I7OA.js +0 -7
  114. package/chunk-5C7A7QU6.js +0 -1
  115. package/chunk-65U4B3NQ.js +0 -2
  116. package/chunk-65ZYAFPI.js +0 -1
  117. package/chunk-6LCXRM3A.js +0 -1
  118. package/chunk-6V7W7EKR.js +0 -1
  119. package/chunk-7733YRW4.js +0 -1
  120. package/chunk-7BATQNXR.js +0 -1
  121. package/chunk-7CGTOI24.js +0 -1
  122. package/chunk-7V4TPS4B.js +0 -1
  123. package/chunk-ABANCAM5.js +0 -1
  124. package/chunk-BLKMQJR5.js +0 -1
  125. package/chunk-BTZEFBCF.js +0 -1
  126. package/chunk-CZDE5P4F.js +0 -1
  127. package/chunk-DYTQQHMA.js +0 -1
  128. package/chunk-EBXJGPRA.js +0 -1
  129. package/chunk-EPDVUHOD.js +0 -1
  130. package/chunk-ERHGJIOQ.js +0 -2
  131. package/chunk-ESAGJOZZ.js +0 -1
  132. package/chunk-FP6LM56A.js +0 -1
  133. package/chunk-FQ55IACT.js +0 -1
  134. package/chunk-FSKPPAVO.js +0 -1
  135. package/chunk-FWQNZX5S.js +0 -1
  136. package/chunk-GUKBMCIX.js +0 -1
  137. package/chunk-IVGY6D4N.js +0 -56
  138. package/chunk-J52HAQJB.js +0 -1
  139. package/chunk-KAFLAM3J.js +0 -1
  140. package/chunk-LUKUBN2Z.js +0 -1
  141. package/chunk-N5FH4YAX.js +0 -2
  142. package/chunk-O7TLFEOP.js +0 -1
  143. package/chunk-OAWADV5X.js +0 -1
  144. package/chunk-ONV552SH.js +0 -1
  145. package/chunk-PDODLSPH.js +0 -1
  146. package/chunk-PSVKQSIF.js +0 -1
  147. package/chunk-QMFHJSCY.js +0 -1
  148. package/chunk-QXUYK52Y.js +0 -1
  149. package/chunk-RODUXVVT.js +0 -1
  150. package/chunk-S5G6POQS.js +0 -1
  151. package/chunk-SIHNMW2E.js +0 -1
  152. package/chunk-SPAJFGWZ.js +0 -1
  153. package/chunk-SX2OA5DO.js +0 -1
  154. package/chunk-T5WAKBP3.js +0 -1
  155. package/chunk-T7QZL5YJ.js +0 -2
  156. package/chunk-TH7CWIA2.js +0 -1
  157. package/chunk-U4XTHU5I.js +0 -1
  158. package/chunk-U7YVVKGQ.js +0 -1
  159. package/chunk-UEYPJIJG.js +0 -1
  160. package/chunk-UI4M5G5W.js +0 -1
  161. package/chunk-URJQR7VG.js +0 -1
  162. package/chunk-V7XW25LT.js +0 -1
  163. package/chunk-VPTXHYYV.js +0 -6
  164. package/chunk-VTTBYFSH.js +0 -1
  165. package/chunk-VYAA7G37.js +0 -1
  166. package/chunk-W66AXGSW.js +0 -1
  167. package/chunk-WOTGLW6Y.js +0 -4
  168. package/chunk-WRKRV6RQ.js +0 -1
  169. package/chunk-XATCN7MB.js +0 -1
  170. package/chunk-XHPURHO2.js +0 -1
  171. package/chunk-YUZKJZ22.js +0 -1
  172. package/chunk-YZDNOP4R.js +0 -1
  173. package/chunk-Z2TE5POZ.js +0 -1
  174. package/chunk-ZMLGDPCK.js +0 -3
  175. package/locale/angular/cs.mjs +0 -21
  176. package/locale/angular/da.mjs +0 -17
  177. package/locale/angular/de.mjs +0 -17
  178. package/locale/angular/en-GB.mjs +0 -17
  179. package/locale/angular/es.mjs +0 -19
  180. package/locale/angular/extra/cs.mjs +0 -11
  181. package/locale/angular/extra/da.mjs +0 -11
  182. package/locale/angular/extra/de.mjs +0 -11
  183. package/locale/angular/extra/en-GB.mjs +0 -11
  184. package/locale/angular/extra/es.mjs +0 -11
  185. package/locale/angular/extra/fi.mjs +0 -11
  186. package/locale/angular/extra/fr.mjs +0 -11
  187. package/locale/angular/extra/hu.mjs +0 -11
  188. package/locale/angular/extra/it.mjs +0 -11
  189. package/locale/angular/extra/ja.mjs +0 -11
  190. package/locale/angular/extra/nl.mjs +0 -11
  191. package/locale/angular/extra/pl.mjs +0 -11
  192. package/locale/angular/extra/pt.mjs +0 -11
  193. package/locale/angular/extra/ru.mjs +0 -11
  194. package/locale/angular/extra/sr.mjs +0 -11
  195. package/locale/angular/extra/sv.mjs +0 -11
  196. package/locale/angular/extra/zh-Hans.mjs +0 -11
  197. package/locale/angular/extra/zh-Hant.mjs +0 -11
  198. package/locale/angular/fi.mjs +0 -17
  199. package/locale/angular/fr.mjs +0 -19
  200. package/locale/angular/hu.mjs +0 -17
  201. package/locale/angular/it.mjs +0 -19
  202. package/locale/angular/ja.mjs +0 -15
  203. package/locale/angular/nl.mjs +0 -17
  204. package/locale/angular/pl.mjs +0 -21
  205. package/locale/angular/pt.mjs +0 -19
  206. package/locale/angular/ru.mjs +0 -21
  207. package/locale/angular/sr.mjs +0 -19
  208. package/locale/angular/sv.mjs +0 -17
  209. package/locale/angular/zh-Hans.mjs +0 -15
  210. package/locale/angular/zh-Hant.mjs +0 -15
  211. package/main-JBXUJPKQ.js +0 -1
  212. package/polyfills-6QHLTIIN.js +0 -1
@@ -1 +1 @@
1
- import{a as h}from"./chunk-UEYPJIJG.js";import{d as k,r as C}from"./chunk-ABANCAM5.js";import{h as b}from"./chunk-N5FH4YAX.js";import{T as P,Z as v,r as D,va as F}from"./chunk-4KE2I7OA.js";import{a}from"./chunk-7CGTOI24.js";var d=class t{#t=v(b);s3Providers=h(this.getS3Config("Providers"));s3Regions=h(this.getS3Config("Regions"));s3RegionHosts=h(this.getS3Config("RegionHosts"));s3StorageClasses=h(this.getS3Config("StorageClasses"));storjSatellites=h(this.getStorjConfig("Satellites"));storjAuthenticationMethods=h(this.getStorjConfig("AuthenticationMethods"));openstackProviders=h(this.getOpenstackConfig("Providers"));openstackVersions=h(this.getOpenstackConfig("Versions"));gcsLocations=h(this.getGcsConfig("Locations"));gcsStorageClasses=h(this.getGcsConfig("StorageClasses"));getS3Config(e){return this.#t.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":e}}).pipe(D(r=>this.#e(r)))}createS3IamUser(e,r){return this.#t.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":e,"s3-password":r}})}createS3PolicyIAM(e){return this.#t.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:e}})}getStorjConfig(e){return this.#t.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":e}}).pipe(D(r=>this.#e(r)))}getOpenstackConfig(e){return this.#t.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":e}}).pipe(D(r=>this.#e(r)))}getGcsConfig(e){return this.#t.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":e}}).pipe(D(r=>this.#e(r)))}#e(e){return(e.Result&&typeof e.Result=="object"&&Object.entries(e.Result).map(([r,n])=>({key:r,value:n})))??[]}static \u0275fac=function(r){return new(r||t)};static \u0275prov=P({token:t,factory:t.\u0275fac,providedIn:"root"})};var o=new C,m={type:"error",message:$localize`Using double leading slashes is most likely wrong, and will result in objects being created with a leading slash in the name.`},f=[{key:"file",displayName:"File system",description:"Store backups on your local file system.",customFields:{path:{type:"FolderTree",name:"path",doubleSlash:m,shortDescription:"File path",longDescription:"The path to store the backup",formElement:t=>o.control(t??"")}},mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.path}${e}`},from:(t,e,r)=>{let s=r.startsWith("file:///")?r.split("file:///")[1]:r.split("file://")[1],p=s.startsWith("%"),g=s.slice(1).startsWith(":\\")||p?s:"/"+s;return a({destinationType:t,custom:{path:g}},i(t,e))}}},{key:"ssh",displayName:"SSH",description:"Store backups in SSH.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"The server to connect to",formElement:t=>o.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:t=>o.control(t??"",[k.required,k.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",doubleSlash:{type:"warning",message:$localize`Using double leading slashes makes the path absolute, pointing to the root of the filesystem.`},formElement:t=>o.control(t??"")}},dynamicFields:[{type:"String",name:"auth-username",shortDescription:"Username for authentication",longDescription:"Username for authentication with the server",formElement:t=>o.control(t??"")},{type:"Password",name:"auth-password",shortDescription:"Password for authentication",longDescription:"Password for authentication with the server. If a private key is used, this value is used as the password to decrypt the private key.",formElement:t=>o.control(t??"")}],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:"Private key path",longDescription:"This is a path to a private key file locally on the machine"},{type:"FreeText",name:"ssh-key",shortDescription:"SSH private key (PEM format)",longDescription:"Enter a PEM formatted SSH private key. OpenSSL, OpenSSH, and ssh.com formats are supported."}],mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:r,server:n,path:s}=t.custom;return`${t.destinationType}://${n+y(r)+l(s)+e}`},from:(t,e,r)=>a({destinationType:t,custom:{server:e.hostname,port:e.port,path:e.pathname}},i(t,e))}},{key:"s3",displayName:"S3 Compatible",description:"Store backups in any S3 compatible bucket.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:t=>o.control(t??"")},path:{type:"Path",name:"path",doubleSlash:m,shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:t=>t.get(d).s3Providers},"use-ssl","auth-username","auth-password"],advancedFields:[{name:"s3-client",type:"Enumeration",options:["aws","minio"]},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:t=>t.get(d).s3StorageClasses}],mapper:{to:t=>{let{bucket:e,path:r}=t.custom,n=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e+l(r)+n}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.pathname,bucket:e.hostname}},i(t,e))}},{key:"gcs",displayName:"Google Cloud Storage",description:"Store backups in Google Cloud Storage.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:m,shortDescription:"Bucket name",longDescription:"Bucket name",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:t=>t.get(d).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:t=>t.get(d).gcsStorageClasses},"authid"],mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.path}${e}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"googledrive",displayName:"Google Drive",description:"Store backups in Google Drive.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:m,shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"authid",type:"Password"}],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"pcloud",displayName:"pCloud",description:"Store backups in pCloud.",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>F([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},path:{type:"Path",name:"path",doubleSlash:m,shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>o.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{server:r,path:n}=t.custom;return`${t.destinationType}://${r+l(n)+e}`},from:(t,e,r)=>{let n=e.pathname.replace(/^\//,"");return a({destinationType:t,custom:{server:e.hostname,path:n}},i(t,e))}}},{key:"azure",displayName:"Azure Blob Storage",description:"Store backups in Azure Blob Storage.",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Container name",longDescription:"Container name",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"onedrivev2",displayName:"OneDrive",description:"Store backups in OneDrive.",oauthField:"authid",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"od4b",displayName:"OneDrive Business",description:"Store backups in OneDrive Business.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:r,server:n,path:s}=t.custom;return`${t.destinationType}://${n+y(r)+l(s)+e}`},from:(t,e,r)=>a({destinationType:t,custom:{server:e.hostname,port:e.port,path:e.pathname}},i(t,e))}},{key:"mssp",displayName:"Microsoft SharePoint",description:"Store backups in Microsoft SharePoint.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:r,server:n,path:s}=t.custom;return`${t.destinationType}://${n+y(r)+l(s)+e}`},from:(t,e,r)=>a({destinationType:t,custom:{server:e.hostname,port:e.port,path:e.pathname}},i(t,e))}},{key:"sharepoint",displayName:"Microsoft SharePoint v2",description:"Store backups in Microsoft SharePoint.",oauthField:"authid",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"dropbox",displayName:"Dropbox",description:"Store backups in Dropbox.",oauthField:"authid",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"box",displayName:"Box.com",description:"Store backups in Box.com.",oauthField:"authid",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"jottacloud",displayName:"Jottacloud",description:"Store backups in Jottacloud.",oauthField:"authid",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"b2",displayName:"B2 Cloud Storage",description:"Store backups in B2 Cloud Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Application ID"},{name:"auth-password",shortDescription:"Application Key"}],mapper:{to:t=>{let{bucket:e,path:r}=t.custom,n=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e+l(r)+n}`},from:(t,e,r)=>a({destinationType:t,custom:{bucket:e.hostname,path:decodeURIComponent(e.pathname)}},i(t,e))}},{key:"e2",displayName:"IDrive e2",description:"Store backups in IDrive e2.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Access ID"},{name:"auth-password",shortDescription:"Access Secret"}],mapper:{to:t=>{let{bucket:e,path:r}=t.custom,n=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e+l(r)+n}`},from:(t,e,r)=>a({destinationType:t,custom:{bucket:e.hostname,path:e.pathname}},i(t,e))}},{key:"mega",displayName:"Mega.nz",description:"Store backups in Mega.nz.",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"msgroup",displayName:"Microsoft Office 365 Group",description:"Store backups in Microsoft Office 365 Group.",oauthField:"authid",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:"Group email",longDescription:"Group email",formElement:t=>o.control(t??"",[k.email])},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"cloudfiles",displayName:"Rackspace CloudFiles",description:"Store backups in Rackspace CloudFiles.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:r,server:n,path:s}=t.custom;return`${t.destinationType}://${n+y(r)+l(s)+e}`},from:(t,e,r)=>a({destinationType:t,custom:{server:e.hostname,port:e.port,path:e.pathname}},i(t,e))}},{key:"rclone",displayName:"Rclone",description:"Store backups in Rclone.",dynamicFields:[{name:"rclone-local-repository",shortDescription:"Local repository",defaultValue:""},{name:"rclone-remote-repository",shortDescription:"Remote repository",defaultValue:""},{name:"rclone-remote-path",shortDescription:"Path on remote repository",defaultValue:""}],mapper:{to:t=>{let e=t.dynamic["rclone-remote-repository"],r=t.dynamic["rclone-remote-path"],n=Object.entries(t.dynamic).filter(([p])=>!["rclone-remote-repository","rclone-remote-path"].includes(p)),s=c([...Object.entries(t.advanced),...n]);return`${t.destinationType}://${e}/${r+s}`},from:(t,e,r)=>{let{advanced:n,dynamic:s}=i(t,e);return a({destinationType:t,dynamic:a({"rclone-remote-repository":e.hostname,"rclone-remote-path":e.pathname},s)},n)}}},{key:"openstack",displayName:"OpenStack Object Storage",description:"Store backups in OpenStack Object Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket",longDescription:"Bucket",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"openstack-authuri",shortDescription:"Auth URI",type:"Enumeration",loadOptions:t=>t.get(d).openstackProviders},{name:"openstack-version",shortDescription:"Version",type:"Enumeration",loadOptions:t=>t.get(d).openstackVersions},{name:"openstack-domain-name",shortDescription:"Domain name"},{name:"openstack-tenant-name",shortDescription:"Tenant name"},{name:"openstack-region",shortDescription:"Region"}],mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{bucket:r}=t.custom;return`${t.destinationType}://${r+e}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.pathname,bucket:e.hostname}},i(t,e))}},{key:"webdav",displayName:"WebDAV",description:"Store backups in WebDAV.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"},{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let{port:e,server:r,path:n}=t.custom,s=t.dynamic["use-ssl"],p=c([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([u])=>u!=="use-ssl")]);return`${t.destinationType}${s?"s":""}://${r+y(e)+l(n)+p}`},from:(t,e,r)=>a({destinationType:t,custom:{server:e.hostname,port:e.port,path:e.pathname}},i(t,e))}},{key:"aftp",displayName:"FTP",description:"Store backups in FTP.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",doubleSlash:{type:"warning",message:$localize`Using double leading slashes makes the path absolute, pointing to the root of the filesystem.`},formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let{port:e,server:r,path:n}=t.custom,s=c([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([p])=>p!=="use-ssl")]);return`${t.destinationType}://${r+y(e)+l(n)+s}`},from:(t,e,r)=>a({destinationType:t,custom:{server:e.hostname,port:e.port,path:e.pathname}},i(t,e))}},{key:"sia",displayName:"Sia Decentrilized Cloud",description:"Store backups in Sia Decentrilized Cloud.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:t=>{let e=t.custom.server,r=t.dynamic["sia-targetpath"],n=c([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([s])=>s!=="sia-targetpath")]);return`${t.destinationType}://${e+l(r)+n}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.pathname}},i(t,e))}},{key:"cos",displayName:"Tencent COS",description:"Store backups in Tencent COS.",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"cos-bucket",shortDescription:"Bucket",order:1},{name:"cos-region",shortDescription:"Region",order:2},{name:"cos-app-id",shortDescription:"COS App Id",order:3},{name:"cos-secret-id",shortDescription:"COS Secret Id",order:4},{name:"cos-secret-key",shortDescription:"COS Secret Key",order:5}],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([n])=>n!=="cos-targetpath")]);return`${t.destinationType}://${e+r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.pathname}},i(t,e))}},{key:"tahoe",displayName:"Tahoe LAFS",description:"Store backups in Tahoe LAFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"}],mapper:{to:t=>{let{port:e,server:r,path:n,username:s,password:p}=t.custom,u={"auth-username":s,"auth-password":p},g=t.dynamic["use-ssl"],S=c([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([O])=>O!=="use-ssl"),...Object.entries(u)]);return`${t.destinationType}${g?"s":""}://${r+y(e)+l(n)+S}`},from:(t,e,r)=>a({destinationType:t,custom:{server:e.hostname,port:e.port,path:e.pathname}},i(t,e))}},{key:"cifs",displayName:"CIFS",description:"Store backups in CIFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},share:{type:"String",name:"share",shortDescription:"Share Name",longDescription:"Share Name",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:["transport","auth-username","auth-password","auth-domain"],mapper:{to:t=>{let{share:e,server:r,path:n,username:s,password:p}=t.custom,u={"auth-username":s,"auth-password":p},g=new Map([...Object.entries(u),...Object.entries(t.advanced),...Object.entries(t.dynamic)]),S=c(Array.from(g));return`${t.destinationType}://${r+l(e)+l(n)+S}`},from:(t,e,r)=>{let n=e.pathname.split("/")[1],s=e.pathname.split("/").slice(2).join("/");return a({destinationType:t,custom:{server:e.hostname,share:n,path:s}},i(t,e))}}},{key:"filen",displayName:"Filen.io",description:"Store backups in Filen.io.",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on Filen",longDescription:"Path on Filen",formElement:t=>o.control(t??"")}},dynamicFields:["auth-username","auth-password"],mapper:{to:t=>{let{path:e,username:r,password:n}=t.custom,s={"auth-username":r,"auth-password":n},p=new Map([...Object.entries(s),...Object.entries(t.advanced),...Object.entries(t.dynamic)]),u=c(Array.from(p));return`${t.destinationType}://${e+u}`},from:(t,e,r)=>{let n=e.hostname??"";return e.pathname&&n!==""&&e.pathname[0]!="/"&&(n+="/"),n+=e.pathname,a({destinationType:t,custom:{path:n}},i(t,e))}}},{key:"filejump",displayName:"Filejump",description:"Store backups in Filejump.",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on Filejump",longDescription:"Path on Filejump",formElement:t=>o.control(t??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:"API Token",longDescription:"Filejump API Token",formElement:t=>o.control(t??"")}],mapper:{to:t=>{let{path:e,username:r,password:n,apitoken:s}=t.custom,p=(s||"").trim()===""?{"auth-username":r,"auth-password":n}:{"api-token":s},u=new Map([...Object.entries(p),...Object.entries(t.advanced),...Object.entries(t.dynamic)]),g=c(Array.from(u));return`${t.destinationType}://${e+g}`},from:(t,e,r)=>{let n=e.hostname??"";return e.pathname&&n!==""&&e.pathname[0]!="/"&&(n+="/"),n+=e.pathname,a({destinationType:t,custom:{path:n}},i(t,e))}}},{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",doubleSlash:m}],mapper:{to:t=>`storj://storj.io/config?storj-auth-method=Access%20grant&storj-satellite=us1.storj.io%3A7777&storj-api-key&storj-secret&${c([...Object.entries(t.advanced),...Object.entries(t.dynamic)],!0)}`,from:(t,e,r)=>a({destinationType:t},i(t,e))}},{key:"storj",customKey:"storjApiKey",displayName:"Storj API Key",description:"Store backups in Storj API Key.",dynamicFields:[{name:"storj-satellite",shortDescription:"Satellite",type:"Enumeration",loadOptions:t=>t.get(d).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",doubleSlash:m}],mapper:{to:t=>`storj://storj.io/config?storj-auth-method=API%20key&${c([...Object.entries(t.advanced),...Object.entries(t.dynamic)],!0)}`,from:(t,e,r)=>a({destinationType:t},i(t,e))}}],W={".amazonaws.com":"Amazon S3",".mycloudyplace.com":"MyCloudyPlace S3",".impossibleapi.net":"Impossible Cloud S3",".scw.cloud":"Scaleway S3",".hosteurope.de":"Hosteurope S3",".dunkel.de":"Dunkel S3",".dreamhost.com":"DreamHost S3",".dincloud.com":"dinCloud S3",".polisystems.ch":"Poli Systems S3",".softlayer.net":"IBM COS (S3)",".storadera.com":"Storadera S3",".wasabisys.com":"Wasabi S3",".infomaniak.com":"Infomaniak S3",".infomaniak.cloud":"Infomaniak S3",".sakurastorage.jp":"\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9 S3",".lyvecloud.seagate.com":"Seagate Lyve S3",".digitaloceanspaces.com":"DigitalOcean S3",".backblazeb2.com":"Backblaze B2 S3",".cloudian.com":"Cloudian S3",".min.io":"MinIO S3",".linodeobjects.com":"Linode S3",".bunnycdn.com":"BunnyCDN S3",".azure.com":"Microsoft Azure S3",".googleapis.com":"Google Cloud Storage S3",".ibm.com":"IBM Cloud S3",".oracle.com":"Oracle Cloud S3",".cloudflare.com":"Cloudflare S3",".alibaba.com":"Alibaba Cloud S3",".huawei.com":"Huawei Cloud S3",".tencent.com":"Tencent Cloud S3",".baidu.com":"Baidu Cloud S3",".jd.com":"JD Cloud S3",".ucloud.cn":"UCloud S3",".qiniu.com":"Qiniu Cloud S3",".aliyuncs.com":"Aliyun S3",".tcloud.com":"TCloud S3",".tencentcloudapi.com":"Tencent Cloud S3"};function y(t){return t==null||t===""?"":":"+t.toString()}function l(t){return t==null?"":t.startsWith("/")?t:"/"+t}function i(t,e){let r={},n={},s=f.find(p=>p.key===t);return e.searchParams.forEach((p,u)=>{s?.dynamicFields?.some(S=>S===u||S?.name===u)?n[u]=decodeURIComponent(p):r[u]=decodeURIComponent(p)}),{advanced:r,dynamic:n}}function c(t,e=!1){let r=t.map(([s,p])=>`${s}=${p?encodeURIComponent(p.toString()):""}`).join("&");return r?(e?"":"?")+r:""}function q(t){let e=t.destinationType,r=f.find(n=>n.customKey===e||n.key===e);if(!r)throw new Error("Invalid destination type");return r?.mapper.to(t)??""}function H(t){let e=URL.canParse(t),r=t.split("://")[0],n=t.split("://")[1],s="http://"+n;if(n.startsWith("%")&&r==="file")return f.find(p=>p.customKey===r||p.key===r)?.mapper.from(r,new URL("http://localhost"),t);try{let p=new URL(s);return f.find(u=>u.customKey===r||u.key===r)?.mapper.from(r,p,t)}catch(p){console.error("Error while parsing target path",p)}if(!e)throw new Error("Invalid target path");return null}export{q as a,H as b,f as c,W as d};
1
+ import{a as h}from"./chunk-WY2KPAVB.js";import{d as k,r as C}from"./chunk-3KIPRGE2.js";import{h as b}from"./chunk-FWVOVJCG.js";import{S as P,X as v,la as F,r as D}from"./chunk-K6EZTPNQ.js";import{a}from"./chunk-EUDKD2JW.js";var d=class t{#t=v(b);s3Providers=h(this.getS3Config("Providers"));s3Regions=h(this.getS3Config("Regions"));s3RegionHosts=h(this.getS3Config("RegionHosts"));s3StorageClasses=h(this.getS3Config("StorageClasses"));storjSatellites=h(this.getStorjConfig("Satellites"));storjAuthenticationMethods=h(this.getStorjConfig("AuthenticationMethods"));openstackProviders=h(this.getOpenstackConfig("Providers"));openstackVersions=h(this.getOpenstackConfig("Versions"));gcsLocations=h(this.getGcsConfig("Locations"));gcsStorageClasses=h(this.getGcsConfig("StorageClasses"));getS3Config(e){return this.#t.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":e}}).pipe(D(r=>this.#e(r)))}createS3IamUser(e,r){return this.#t.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":e,"s3-password":r}})}createS3PolicyIAM(e){return this.#t.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:e}})}getStorjConfig(e){return this.#t.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":e}}).pipe(D(r=>this.#e(r)))}getOpenstackConfig(e){return this.#t.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":e}}).pipe(D(r=>this.#e(r)))}getGcsConfig(e){return this.#t.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":e}}).pipe(D(r=>this.#e(r)))}#e(e){return(e.Result&&typeof e.Result=="object"&&Object.entries(e.Result).map(([r,n])=>({key:r,value:n})))??[]}static \u0275fac=function(r){return new(r||t)};static \u0275prov=P({token:t,factory:t.\u0275fac,providedIn:"root"})};var o=new C,m={type:"error",message:$localize`Using double leading slashes is most likely wrong, and will result in objects being created with a leading slash in the name.`},f=[{key:"file",displayName:"File system",description:"Store backups on your local file system.",customFields:{path:{type:"FolderTree",name:"path",doubleSlash:m,shortDescription:"File path",longDescription:"The path to store the backup",formElement:t=>o.control(t??"")}},mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.path}${e}`},from:(t,e,r)=>{let s=r.startsWith("file:///")?r.split("file:///")[1]:r.split("file://")[1],p=s.startsWith("%"),g=s.slice(1).startsWith(":\\")||p?s:"/"+s;return a({destinationType:t,custom:{path:g}},i(t,e))}}},{key:"ssh",displayName:"SSH",description:"Store backups in SSH.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"The server to connect to",formElement:t=>o.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:t=>o.control(t??"",[k.required,k.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",doubleSlash:{type:"warning",message:$localize`Using double leading slashes makes the path absolute, pointing to the root of the filesystem.`},formElement:t=>o.control(t??"")}},dynamicFields:[{type:"String",name:"auth-username",shortDescription:"Username for authentication",longDescription:"Username for authentication with the server",formElement:t=>o.control(t??"")},{type:"Password",name:"auth-password",shortDescription:"Password for authentication",longDescription:"Password for authentication with the server. If a private key is used, this value is used as the password to decrypt the private key.",formElement:t=>o.control(t??"")}],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:"Private key path",longDescription:"This is a path to a private key file locally on the machine"},{type:"FreeText",name:"ssh-key",shortDescription:"SSH private key (PEM format)",longDescription:"Enter a PEM formatted SSH private key. OpenSSL, OpenSSH, and ssh.com formats are supported."}],mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:r,server:n,path:s}=t.custom;return`${t.destinationType}://${n+y(r)+l(s)+e}`},from:(t,e,r)=>a({destinationType:t,custom:{server:e.hostname,port:e.port,path:e.pathname}},i(t,e))}},{key:"s3",displayName:"S3 Compatible",description:"Store backups in any S3 compatible bucket.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:t=>o.control(t??"")},path:{type:"Path",name:"path",doubleSlash:m,shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:t=>t.get(d).s3Providers},"use-ssl","auth-username","auth-password"],advancedFields:[{name:"s3-client",type:"Enumeration",options:["aws","minio"]},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:t=>t.get(d).s3StorageClasses}],mapper:{to:t=>{let{bucket:e,path:r}=t.custom,n=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e+l(r)+n}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.pathname,bucket:e.hostname}},i(t,e))}},{key:"gcs",displayName:"Google Cloud Storage",description:"Store backups in Google Cloud Storage.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:m,shortDescription:"Bucket name",longDescription:"Bucket name",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:t=>t.get(d).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:t=>t.get(d).gcsStorageClasses},"authid"],mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.path}${e}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"googledrive",displayName:"Google Drive",description:"Store backups in Google Drive.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:m,shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"authid",type:"Password"}],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"pcloud",displayName:"pCloud",description:"Store backups in pCloud.",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>F([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},path:{type:"Path",name:"path",doubleSlash:m,shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>o.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{server:r,path:n}=t.custom;return`${t.destinationType}://${r+l(n)+e}`},from:(t,e,r)=>{let n=e.pathname.replace(/^\//,"");return a({destinationType:t,custom:{server:e.hostname,path:n}},i(t,e))}}},{key:"azure",displayName:"Azure Blob Storage",description:"Store backups in Azure Blob Storage.",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Container name",longDescription:"Container name",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"onedrivev2",displayName:"OneDrive",description:"Store backups in OneDrive.",oauthField:"authid",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"od4b",displayName:"OneDrive Business",description:"Store backups in OneDrive Business.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:r,server:n,path:s}=t.custom;return`${t.destinationType}://${n+y(r)+l(s)+e}`},from:(t,e,r)=>a({destinationType:t,custom:{server:e.hostname,port:e.port,path:e.pathname}},i(t,e))}},{key:"mssp",displayName:"Microsoft SharePoint",description:"Store backups in Microsoft SharePoint.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:r,server:n,path:s}=t.custom;return`${t.destinationType}://${n+y(r)+l(s)+e}`},from:(t,e,r)=>a({destinationType:t,custom:{server:e.hostname,port:e.port,path:e.pathname}},i(t,e))}},{key:"sharepoint",displayName:"Microsoft SharePoint v2",description:"Store backups in Microsoft SharePoint.",oauthField:"authid",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"dropbox",displayName:"Dropbox",description:"Store backups in Dropbox.",oauthField:"authid",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"box",displayName:"Box.com",description:"Store backups in Box.com.",oauthField:"authid",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"jottacloud",displayName:"Jottacloud",description:"Store backups in Jottacloud.",oauthField:"authid",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"b2",displayName:"B2 Cloud Storage",description:"Store backups in B2 Cloud Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Application ID"},{name:"auth-password",shortDescription:"Application Key"}],mapper:{to:t=>{let{bucket:e,path:r}=t.custom,n=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e+l(r)+n}`},from:(t,e,r)=>a({destinationType:t,custom:{bucket:e.hostname,path:decodeURIComponent(e.pathname)}},i(t,e))}},{key:"e2",displayName:"IDrive e2",description:"Store backups in IDrive e2.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Access ID"},{name:"auth-password",shortDescription:"Access Secret"}],mapper:{to:t=>{let{bucket:e,path:r}=t.custom,n=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e+l(r)+n}`},from:(t,e,r)=>a({destinationType:t,custom:{bucket:e.hostname,path:e.pathname}},i(t,e))}},{key:"mega",displayName:"Mega.nz",description:"Store backups in Mega.nz.",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"msgroup",displayName:"Microsoft Office 365 Group",description:"Store backups in Microsoft Office 365 Group.",oauthField:"authid",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:"Group email",longDescription:"Group email",formElement:t=>o.control(t??"",[k.email])},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${e}${r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.hostname+e.pathname}},i(t,e))}},{key:"cloudfiles",displayName:"Rackspace CloudFiles",description:"Store backups in Rackspace CloudFiles.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:r,server:n,path:s}=t.custom;return`${t.destinationType}://${n+y(r)+l(s)+e}`},from:(t,e,r)=>a({destinationType:t,custom:{server:e.hostname,port:e.port,path:e.pathname}},i(t,e))}},{key:"rclone",displayName:"Rclone",description:"Store backups in Rclone.",dynamicFields:[{name:"rclone-local-repository",shortDescription:"Local repository",defaultValue:""},{name:"rclone-remote-repository",shortDescription:"Remote repository",defaultValue:""},{name:"rclone-remote-path",shortDescription:"Path on remote repository",defaultValue:""}],mapper:{to:t=>{let e=t.dynamic["rclone-remote-repository"],r=t.dynamic["rclone-remote-path"],n=Object.entries(t.dynamic).filter(([p])=>!["rclone-remote-repository","rclone-remote-path"].includes(p)),s=c([...Object.entries(t.advanced),...n]);return`${t.destinationType}://${e}/${r+s}`},from:(t,e,r)=>{let{advanced:n,dynamic:s}=i(t,e);return a({destinationType:t,dynamic:a({"rclone-remote-repository":e.hostname,"rclone-remote-path":e.pathname},s)},n)}}},{key:"openstack",displayName:"OpenStack Object Storage",description:"Store backups in OpenStack Object Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket",longDescription:"Bucket",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"openstack-authuri",shortDescription:"Auth URI",type:"Enumeration",loadOptions:t=>t.get(d).openstackProviders},{name:"openstack-version",shortDescription:"Version",type:"Enumeration",loadOptions:t=>t.get(d).openstackVersions},{name:"openstack-domain-name",shortDescription:"Domain name"},{name:"openstack-tenant-name",shortDescription:"Tenant name"},{name:"openstack-region",shortDescription:"Region"}],mapper:{to:t=>{let e=c([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{bucket:r}=t.custom;return`${t.destinationType}://${r+e}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.pathname,bucket:e.hostname}},i(t,e))}},{key:"webdav",displayName:"WebDAV",description:"Store backups in WebDAV.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"},{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let{port:e,server:r,path:n}=t.custom,s=t.dynamic["use-ssl"],p=c([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([u])=>u!=="use-ssl")]);return`${t.destinationType}${s?"s":""}://${r+y(e)+l(n)+p}`},from:(t,e,r)=>a({destinationType:t,custom:{server:e.hostname,port:e.port,path:e.pathname}},i(t,e))}},{key:"aftp",displayName:"FTP",description:"Store backups in FTP.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",doubleSlash:{type:"warning",message:$localize`Using double leading slashes makes the path absolute, pointing to the root of the filesystem.`},formElement:t=>o.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let{port:e,server:r,path:n}=t.custom,s=c([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([p])=>p!=="use-ssl")]);return`${t.destinationType}://${r+y(e)+l(n)+s}`},from:(t,e,r)=>a({destinationType:t,custom:{server:e.hostname,port:e.port,path:e.pathname}},i(t,e))}},{key:"sia",displayName:"Sia Decentrilized Cloud",description:"Store backups in Sia Decentrilized Cloud.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:t=>{let e=t.custom.server,r=t.dynamic["sia-targetpath"],n=c([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([s])=>s!=="sia-targetpath")]);return`${t.destinationType}://${e+l(r)+n}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.pathname}},i(t,e))}},{key:"cos",displayName:"Tencent COS",description:"Store backups in Tencent COS.",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"cos-bucket",shortDescription:"Bucket",order:1},{name:"cos-region",shortDescription:"Region",order:2},{name:"cos-app-id",shortDescription:"COS App Id",order:3},{name:"cos-secret-id",shortDescription:"COS Secret Id",order:4},{name:"cos-secret-key",shortDescription:"COS Secret Key",order:5}],mapper:{to:t=>{let e=t.custom.path,r=c([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([n])=>n!=="cos-targetpath")]);return`${t.destinationType}://${e+r}`},from:(t,e,r)=>a({destinationType:t,custom:{path:e.pathname}},i(t,e))}},{key:"tahoe",displayName:"Tahoe LAFS",description:"Store backups in Tahoe LAFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"}],mapper:{to:t=>{let{port:e,server:r,path:n,username:s,password:p}=t.custom,u={"auth-username":s,"auth-password":p},g=t.dynamic["use-ssl"],S=c([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([O])=>O!=="use-ssl"),...Object.entries(u)]);return`${t.destinationType}${g?"s":""}://${r+y(e)+l(n)+S}`},from:(t,e,r)=>a({destinationType:t,custom:{server:e.hostname,port:e.port,path:e.pathname}},i(t,e))}},{key:"cifs",displayName:"CIFS",description:"Store backups in CIFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>o.control(t??"")},share:{type:"String",name:"share",shortDescription:"Share Name",longDescription:"Share Name",formElement:t=>o.control(t??"")},path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>o.control(t??"")}},dynamicFields:["transport","auth-username","auth-password","auth-domain"],mapper:{to:t=>{let{share:e,server:r,path:n,username:s,password:p}=t.custom,u={"auth-username":s,"auth-password":p},g=new Map([...Object.entries(u),...Object.entries(t.advanced),...Object.entries(t.dynamic)]),S=c(Array.from(g));return`${t.destinationType}://${r+l(e)+l(n)+S}`},from:(t,e,r)=>{let n=e.pathname.split("/")[1],s=e.pathname.split("/").slice(2).join("/");return a({destinationType:t,custom:{server:e.hostname,share:n,path:s}},i(t,e))}}},{key:"filen",displayName:"Filen.io",description:"Store backups in Filen.io.",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on Filen",longDescription:"Path on Filen",formElement:t=>o.control(t??"")}},dynamicFields:["auth-username","auth-password"],mapper:{to:t=>{let{path:e,username:r,password:n}=t.custom,s={"auth-username":r,"auth-password":n},p=new Map([...Object.entries(s),...Object.entries(t.advanced),...Object.entries(t.dynamic)]),u=c(Array.from(p));return`${t.destinationType}://${e+u}`},from:(t,e,r)=>{let n=e.hostname??"";return e.pathname&&n!==""&&e.pathname[0]!="/"&&(n+="/"),n+=e.pathname,a({destinationType:t,custom:{path:n}},i(t,e))}}},{key:"filejump",displayName:"Filejump",description:"Store backups in Filejump.",customFields:{path:{type:"String",name:"path",doubleSlash:m,shortDescription:"Path on Filejump",longDescription:"Path on Filejump",formElement:t=>o.control(t??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:"API Token",longDescription:"Filejump API Token",formElement:t=>o.control(t??"")}],mapper:{to:t=>{let{path:e,username:r,password:n,apitoken:s}=t.custom,p=(s||"").trim()===""?{"auth-username":r,"auth-password":n}:{"api-token":s},u=new Map([...Object.entries(p),...Object.entries(t.advanced),...Object.entries(t.dynamic)]),g=c(Array.from(u));return`${t.destinationType}://${e+g}`},from:(t,e,r)=>{let n=e.hostname??"";return e.pathname&&n!==""&&e.pathname[0]!="/"&&(n+="/"),n+=e.pathname,a({destinationType:t,custom:{path:n}},i(t,e))}}},{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",doubleSlash:m}],mapper:{to:t=>`storj://storj.io/config?storj-auth-method=Access%20grant&storj-satellite=us1.storj.io%3A7777&storj-api-key&storj-secret&${c([...Object.entries(t.advanced),...Object.entries(t.dynamic)],!0)}`,from:(t,e,r)=>a({destinationType:t},i(t,e))}},{key:"storj",customKey:"storjApiKey",displayName:"Storj API Key",description:"Store backups in Storj API Key.",dynamicFields:[{name:"storj-satellite",shortDescription:"Satellite",type:"Enumeration",loadOptions:t=>t.get(d).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",doubleSlash:m}],mapper:{to:t=>`storj://storj.io/config?storj-auth-method=API%20key&${c([...Object.entries(t.advanced),...Object.entries(t.dynamic)],!0)}`,from:(t,e,r)=>a({destinationType:t},i(t,e))}}],W={".amazonaws.com":"Amazon S3",".mycloudyplace.com":"MyCloudyPlace S3",".impossibleapi.net":"Impossible Cloud S3",".scw.cloud":"Scaleway S3",".hosteurope.de":"Hosteurope S3",".dunkel.de":"Dunkel S3",".dreamhost.com":"DreamHost S3",".dincloud.com":"dinCloud S3",".polisystems.ch":"Poli Systems S3",".softlayer.net":"IBM COS (S3)",".storadera.com":"Storadera S3",".wasabisys.com":"Wasabi S3",".infomaniak.com":"Infomaniak S3",".infomaniak.cloud":"Infomaniak S3",".sakurastorage.jp":"\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9 S3",".lyvecloud.seagate.com":"Seagate Lyve S3",".digitaloceanspaces.com":"DigitalOcean S3",".backblazeb2.com":"Backblaze B2 S3",".cloudian.com":"Cloudian S3",".min.io":"MinIO S3",".linodeobjects.com":"Linode S3",".bunnycdn.com":"BunnyCDN S3",".azure.com":"Microsoft Azure S3",".googleapis.com":"Google Cloud Storage S3",".ibm.com":"IBM Cloud S3",".oracle.com":"Oracle Cloud S3",".cloudflare.com":"Cloudflare S3",".alibaba.com":"Alibaba Cloud S3",".huawei.com":"Huawei Cloud S3",".tencent.com":"Tencent Cloud S3",".baidu.com":"Baidu Cloud S3",".jd.com":"JD Cloud S3",".ucloud.cn":"UCloud S3",".qiniu.com":"Qiniu Cloud S3",".aliyuncs.com":"Aliyun S3",".tcloud.com":"TCloud S3",".tencentcloudapi.com":"Tencent Cloud S3"};function y(t){return t==null||t===""?"":":"+t.toString()}function l(t){return t==null?"":t.startsWith("/")?t:"/"+t}function i(t,e){let r={},n={},s=f.find(p=>p.key===t);return e.searchParams.forEach((p,u)=>{s?.dynamicFields?.some(S=>S===u||S?.name===u)?n[u]=decodeURIComponent(p):r[u]=decodeURIComponent(p)}),{advanced:r,dynamic:n}}function c(t,e=!1){let r=t.map(([s,p])=>`${s}=${p?encodeURIComponent(p.toString()):""}`).join("&");return r?(e?"":"?")+r:""}function q(t){let e=t.destinationType,r=f.find(n=>n.customKey===e||n.key===e);if(!r)throw new Error("Invalid destination type");return r?.mapper.to(t)??""}function H(t){let e=URL.canParse(t),r=t.split("://")[0],n=t.split("://")[1],s="http://"+n;if(n.startsWith("%")&&r==="file")return f.find(p=>p.customKey===r||p.key===r)?.mapper.from(r,new URL("http://localhost"),t);try{let p=new URL(s);return f.find(u=>u.customKey===r||u.key===r)?.mapper.from(r,p,t)}catch(p){console.error("Error while parsing target path",p)}if(!e)throw new Error("Invalid target path");return null}export{q as a,H as b,f as c,W as d};
@@ -0,0 +1 @@
1
+ import{c as a,d as b}from"./chunk-EKZRKTLM.js";import"./chunk-FLMFEFKM.js";import"./chunk-WIJ3HW7I.js";import"./chunk-WY2KPAVB.js";import"./chunk-3PYBMCOB.js";import"./chunk-FPLBURO5.js";import"./chunk-3KIPRGE2.js";import"./chunk-7LEXBIXG.js";import"./chunk-P4ZYFRD3.js";import"./chunk-MHALSLG3.js";import"./chunk-FWVOVJCG.js";import"./chunk-VKD4Y3YQ.js";import"./chunk-WIDMAJIO.js";import"./chunk-K6EZTPNQ.js";import"./chunk-EUDKD2JW.js";export{a as createEncryptionForm,b as default};
@@ -1 +1 @@
1
- import{a as H}from"./chunk-ERHGJIOQ.js";import"./chunk-XUPWJEL7.js";import{g as K}from"./chunk-V7XW25LT.js";import"./chunk-FP6LM56A.js";import"./chunk-M5RL4LRX.js";import"./chunk-UEYPJIJG.js";import"./chunk-2CXHZS6X.js";import{b as j}from"./chunk-SPAJFGWZ.js";import"./chunk-6EWRKJSC.js";import{a as B}from"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import"./chunk-T5WAKBP3.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import{a as z}from"./chunk-DLJSVAM2.js";import"./chunk-ABANCAM5.js";import"./chunk-FSKPPAVO.js";import"./chunk-FQ55IACT.js";import"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{a as b,h as w,p as W,s as X}from"./chunk-ESAGJOZZ.js";import"./chunk-N5FH4YAX.js";import{ua as v}from"./chunk-EBXJGPRA.js";import{Ac as E,Db as i,Eb as s,Fb as p,Gb as m,Hb as P,Pb as L,Qb as A,Qc as M,Rb as _,Rc as x,Sb as D,Tb as I,Ua as l,Wb as u,Z as T,ga as $,gb as y,ha as G,jc as C,lb as g,mc as f,ub as O,va as h,zb as d,zc as R}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";function V(n,e){n&1&&(i(0,"spk-card",8),m(1,14),_(2,2),P(),i(3,"div",15),$(),i(4,"svg",16),p(5,"circle",17),s(),G(),i(6,"spk-icon"),C(7,"check-bold"),s()()())}function Z(n,e){if(n&1&&(C(0),R(1,"number"),R(2,"number")),n&2){let t,o=u(2);f(" ",E(1,2,(t=o.statusData())==null?null:t.ProcessedFileCount)," of ",E(2,4,(t=o.statusData())==null?null:t.TotalFileCount)," ")}}function q(n,e){n&1&&(m(0),_(1,6),P())}function J(n,e){if(n&1&&(C(0),R(1,"bytes"),R(2,"bytes")),n&2){let t,o=u(2);f(" ",E(1,2,(t=o.statusData())==null?null:t.ProcessedFileSize)," of ",E(2,4,(t=o.statusData())==null?null:t.TotalFileSize)," ")}}function Q(n,e){n&1&&(m(0),_(1,7),P())}function U(n,e){if(n&1&&(i(0,"spk-card",8)(1,"h3"),L(2,3),p(3,"spk-spinner",18),A(),s(),i(4,"div",19),p(5,"spk-progress-bar",20),i(6,"p")(7,"span"),_(8,4),s(),g(9,Z,3,6)(10,q,2,0,"ng-container"),s(),i(11,"p")(12,"span"),_(13,5),s(),g(14,J,3,6)(15,Q,2,0,"ng-container"),s()()()),n&2){let t,o,r,a,c=u();l(3),D((t=c.statusData())==null?null:t.statusText),I(2),l(2),O("value",(o=c.statusData())==null?null:o.OverallProgress),l(4),d((r=c.statusData())!=null&&r.ProcessedFileCount?9:10),l(5),d((a=c.statusData())!=null&&a.ProcessedFileSize?14:15)}}var F=class n{#e=T(B);#t=T(K);statusData=this.#e.statusData;backupId=this.#t.backupId;isPolling=h(!0);taskId=M(()=>this.#e.statusData()?.TaskID?.toString()??void 0);lastRestoreStarted=M(()=>{let e=this.#e.statusData()?.backup?.Backup?.Metadata?.LastRestoreStarted??null;return e?this.fixDate(e):null});completedEffect=x(()=>{this.statusData()?.task?.Status==="Completed"&&this.isPolling.set(!1)});notificationFilterPredicate=()=>{let e=this.lastRestoreStarted();return{predicate:t=>(t.BackupID===this.#t.backupId()&&e&&e.getTime()<=new Date(t.Timestamp).getTime())??!1}};ngOnInit(){this.#e.fetchProgressState(),this.#e.startPollingProgress()}fixDate(e){return new Date(`${e.slice(0,4)}-${e.slice(4,6)}-${e.slice(6,8)}T${e.slice(9,11)}:${e.slice(11,13)}:${e.slice(13,15)}Z`)}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=y({type:n,selectors:[["app-restore-progress"]],decls:12,vars:6,consts:()=>{let e;e=$localize`Notifications`;let t;t=$localize`Logs`;let o;o=$localize`Restore completed`;let r;r=$localize` Restore progress: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_SPINNER:`;let a;a=$localize`Files processed:`;let c;c=$localize`Size processed:`;let N;N=$localize`N/A`;let k;return k=$localize`N/A`,[e,t,o,r,a,c,N,k,[1,"progress","type-a"],[1,"notifications","type-a"],[1,"notification-list"],[3,"notificationFilterPredicate"],[1,"logs","type-a"],[3,"asSimpleList","polling","whenFilter","backupIdFilter"],["title",""],[1,"complete-check"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"primary"],[1,"progress-content"],[3,"value"]]},template:function(t,o){if(t&1&&(i(0,"section"),g(1,V,8,0,"spk-card",8)(2,U,16,4,"spk-card",8),i(3,"spk-card",9)(4,"h3"),_(5,0),s(),i(6,"div",10),p(7,"app-notifications",11),s()(),i(8,"spk-card",12)(9,"h3"),_(10,1),s(),p(11,"app-logs-live",13),s()()),t&2){let r,a;l(),d(((r=o.statusData())==null||r.task==null?null:r.task.Status)==="Completed"?1:2),l(6),O("notificationFilterPredicate",o.notificationFilterPredicate()),l(4),O("asSimpleList",!0)("polling",o.isPolling())("whenFilter",(a=o.lastRestoreStarted())==null?null:a.getTime())("backupIdFilter",o.backupId())}},dependencies:[H,W,X,b,w,j,z,v],styles:['[_nghost-%COMP%]{display:block;padding:0 1.25rem}section[_ngcontent-%COMP%]{display:grid;gap:1.25rem;grid-template-columns:2fr 1fr;grid-template-areas:"progress notifications" "logs logs"}section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:1rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]{grid-area:progress}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]:has(.complete-check){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.25rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] spk-spinner[_ngcontent-%COMP%]{--spinner-size: 1.25rem;--spinner-thickness: .1875rem}section[_ngcontent-%COMP%] .notifications[_ngcontent-%COMP%]{grid-area:notifications}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%]{grid-area:logs}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{max-height:50rem;overflow:auto}.notification-list[_ngcontent-%COMP%]{max-height:15rem;overflow:auto}.complete-check[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--success-500)}.complete-check[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--success-500);stroke-width:.3125rem;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-content[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{margin-bottom:.75rem}.progress-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-right:.25rem}'],changeDetection:0})};export{F as default};
1
+ import{a as H}from"./chunk-LZGUK3CQ.js";import"./chunk-76QLZQIX.js";import{g as K}from"./chunk-EKZRKTLM.js";import"./chunk-FLMFEFKM.js";import"./chunk-WIJ3HW7I.js";import"./chunk-WY2KPAVB.js";import{b as j}from"./chunk-DDV32SDB.js";import"./chunk-B5FKLIHW.js";import{a as B}from"./chunk-4D2NUH5S.js";import"./chunk-XD26KCAE.js";import"./chunk-KQAO2YHR.js";import"./chunk-3PYBMCOB.js";import"./chunk-RHW5QVAY.js";import"./chunk-FPLBURO5.js";import{a as z}from"./chunk-JWFYA3TO.js";import"./chunk-3KIPRGE2.js";import"./chunk-UVLJAD66.js";import"./chunk-7LEXBIXG.js";import"./chunk-P4ZYFRD3.js";import{a as b,h as w,p as W,s as X}from"./chunk-MHALSLG3.js";import"./chunk-FWVOVJCG.js";import{qa as v}from"./chunk-VKD4Y3YQ.js";import"./chunk-WIDMAJIO.js";import{Gc as M,Hb as L,Hc as x,Ib as A,Jb as _,Kb as D,Lb as I,Oa as l,Ob as C,X as T,_a as y,bc as u,da as $,ea as G,ec as f,la as h,pb as g,qb as O,ub as d,vb as i,vc as R,wb as s,wc as E,xb as p,yb as m,zb as P}from"./chunk-K6EZTPNQ.js";import"./chunk-EUDKD2JW.js";function V(n,e){n&1&&(i(0,"spk-card",8),m(1,14),_(2,2),P(),i(3,"div",15),$(),i(4,"svg",16),p(5,"circle",17),s(),G(),i(6,"spk-icon"),u(7,"check-bold"),s()()())}function Z(n,e){if(n&1&&(u(0),R(1,"number"),R(2,"number")),n&2){let t,o=C(2);f(" ",E(1,2,(t=o.statusData())==null?null:t.ProcessedFileCount)," of ",E(2,4,(t=o.statusData())==null?null:t.TotalFileCount)," ")}}function q(n,e){n&1&&(m(0),_(1,6),P())}function J(n,e){if(n&1&&(u(0),R(1,"bytes"),R(2,"bytes")),n&2){let t,o=C(2);f(" ",E(1,2,(t=o.statusData())==null?null:t.ProcessedFileSize)," of ",E(2,4,(t=o.statusData())==null?null:t.TotalFileSize)," ")}}function Q(n,e){n&1&&(m(0),_(1,7),P())}function U(n,e){if(n&1&&(i(0,"spk-card",8)(1,"h3"),L(2,3),p(3,"spk-spinner",18),A(),s(),i(4,"div",19),p(5,"spk-progress-bar",20),i(6,"p")(7,"span"),_(8,4),s(),g(9,Z,3,6)(10,q,2,0,"ng-container"),s(),i(11,"p")(12,"span"),_(13,5),s(),g(14,J,3,6)(15,Q,2,0,"ng-container"),s()()()),n&2){let t,o,r,a,c=C();l(3),D((t=c.statusData())==null?null:t.statusText),I(2),l(2),d("value",(o=c.statusData())==null?null:o.OverallProgress),l(4),O((r=c.statusData())!=null&&r.ProcessedFileCount?9:10),l(5),O((a=c.statusData())!=null&&a.ProcessedFileSize?14:15)}}var F=class n{#e=T(B);#t=T(K);statusData=this.#e.statusData;backupId=this.#t.backupId;isPolling=h(!0);taskId=M(()=>this.#e.statusData()?.TaskID?.toString()??void 0);lastRestoreStarted=M(()=>{let e=this.#e.statusData()?.backup?.Backup?.Metadata?.LastRestoreStarted??null;return e?this.fixDate(e):null});completedEffect=x(()=>{this.statusData()?.task?.Status==="Completed"&&this.isPolling.set(!1)});notificationFilterPredicate=()=>{let e=this.lastRestoreStarted();return{predicate:t=>(t.BackupID===this.#t.backupId()&&e&&e.getTime()<=new Date(t.Timestamp).getTime())??!1}};ngOnInit(){this.#e.fetchProgressState(),this.#e.startPollingProgress()}fixDate(e){return new Date(`${e.slice(0,4)}-${e.slice(4,6)}-${e.slice(6,8)}T${e.slice(9,11)}:${e.slice(11,13)}:${e.slice(13,15)}Z`)}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=y({type:n,selectors:[["app-restore-progress"]],decls:12,vars:6,consts:()=>{let e;e=$localize`Notifications`;let t;t=$localize`Logs`;let o;o=$localize`Restore completed`;let r;r=$localize` Restore progress: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_SPINNER:`;let a;a=$localize`Files processed:`;let c;c=$localize`Size processed:`;let N;N=$localize`N/A`;let k;return k=$localize`N/A`,[e,t,o,r,a,c,N,k,[1,"progress","type-a"],[1,"notifications","type-a"],[1,"notification-list"],[3,"notificationFilterPredicate"],[1,"logs","type-a"],[3,"asSimpleList","polling","whenFilter","backupIdFilter"],["title",""],[1,"complete-check"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"primary"],[1,"progress-content"],[3,"value"]]},template:function(t,o){if(t&1&&(i(0,"section"),g(1,V,8,0,"spk-card",8)(2,U,16,4,"spk-card",8),i(3,"spk-card",9)(4,"h3"),_(5,0),s(),i(6,"div",10),p(7,"app-notifications",11),s()(),i(8,"spk-card",12)(9,"h3"),_(10,1),s(),p(11,"app-logs-live",13),s()()),t&2){let r,a;l(),O(((r=o.statusData())==null||r.task==null?null:r.task.Status)==="Completed"?1:2),l(6),d("notificationFilterPredicate",o.notificationFilterPredicate()),l(4),d("asSimpleList",!0)("polling",o.isPolling())("whenFilter",(a=o.lastRestoreStarted())==null?null:a.getTime())("backupIdFilter",o.backupId())}},dependencies:[H,W,X,b,w,j,z,v],styles:['[_nghost-%COMP%]{display:block;padding:0 1.25rem}section[_ngcontent-%COMP%]{display:grid;gap:1.25rem;grid-template-columns:2fr 1fr;grid-template-areas:"progress notifications" "logs logs"}section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:1rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]{grid-area:progress}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]:has(.complete-check){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.25rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] spk-spinner[_ngcontent-%COMP%]{--spinner-size: 1.25rem;--spinner-thickness: .1875rem}section[_ngcontent-%COMP%] .notifications[_ngcontent-%COMP%]{grid-area:notifications}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%]{grid-area:logs}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{max-height:50rem;overflow:auto}.notification-list[_ngcontent-%COMP%]{max-height:15rem;overflow:auto}.complete-check[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--success-500)}.complete-check[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--success-500);stroke-width:.3125rem;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-content[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{margin-bottom:.75rem}.progress-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-right:.25rem}'],changeDetection:0})};export{F as default};
@@ -0,0 +1 @@
1
+ import{a as D,b as se,c as ie}from"./chunk-VKD4Y3YQ.js";import{a as ae,b as ce,e as le,f as de}from"./chunk-WIDMAJIO.js";import{Aa as E,Ba as S,Ca as K,Da as W,Ea as q,Fa as J,Ga as Q,Ha as ee,Ia as te,Ja as v,Pa as T,Q as h,Ra as ne,S as f,Uc as oe,V as w,W as a,Z,eb as re,ga as p,gb as _,ia as P,sa as Y,ta as k,ua as X,va as M,wa as j,za as U}from"./chunk-K6EZTPNQ.js";import{a as H}from"./chunk-EUDKD2JW.js";var L=new w(""),V=(()=>{class r{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,t){this._zone=t,e.forEach(o=>{o.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,t,o,s){return this._findPluginFor(t).addEventListener(e,t,o,s)}getZone(){return this._zone}_findPluginFor(e){let t=this._eventNameToPlugin.get(e);if(t)return t;if(t=this._plugins.find(s=>s.supports(e)),!t)throw new h(5101,!1);return this._eventNameToPlugin.set(e,t),t}static \u0275fac=function(t){return new(t||r)(a(L),a(_))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),R=class{_doc;constructor(n){this._doc=n}manager},A="ng-app-id";function ue(r){for(let n of r)n.remove()}function fe(r,n){let e=n.createElement("style");return e.textContent=r,e}function Se(r,n,e,t){let o=r.head?.querySelectorAll(`style[${A}="${n}"],link[${A}="${n}"]`);if(o)for(let s of o)s.removeAttribute(A),s instanceof HTMLLinkElement?t.set(s.href.slice(s.href.lastIndexOf("/")+1),{usage:0,elements:[s]}):s.textContent&&e.set(s.textContent,{usage:0,elements:[s]})}function B(r,n){let e=n.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",r),e}var z=(()=>{class r{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(e,t,o,s={}){this.doc=e,this.appId=t,this.nonce=o,this.isServer=le(s),Se(e,t,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,t){for(let o of e)this.addUsage(o,this.inline,fe);t?.forEach(o=>this.addUsage(o,this.external,B))}removeStyles(e,t){for(let o of e)this.removeUsage(o,this.inline);t?.forEach(o=>this.removeUsage(o,this.external))}addUsage(e,t,o){let s=t.get(e);s?s.usage++:t.set(e,{usage:1,elements:[...this.hosts].map(i=>this.addElement(i,o(e,this.doc)))})}removeUsage(e,t){let o=t.get(e);o&&(o.usage--,o.usage<=0&&(ue(o.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])ue(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[t,{elements:o}]of this.inline)o.push(this.addElement(e,fe(t,this.doc)));for(let[t,{elements:o}]of this.external)o.push(this.addElement(e,B(t,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,t){return this.nonce&&t.setAttribute("nonce",this.nonce),this.isServer&&t.setAttribute(A,this.appId),e.appendChild(t)}static \u0275fac=function(t){return new(t||r)(a(p),a(k),a(j,8),a(M))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),x={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},$=/%COMP%/g;var me="%COMP%",we=`_nghost-${me}`,Me=`_ngcontent-${me}`,Te=!0,_e=new w("",{providedIn:"root",factory:()=>Te});function De(r){return Me.replace($,r)}function Re(r){return we.replace($,r)}function ge(r,n){return n.map(e=>e.replace($,r))}var G=(()=>{class r{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,t,o,s,i,c,d,u=null,l=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=i,this.platformId=c,this.ngZone=d,this.nonce=u,this.tracingService=l,this.platformIsServer=!1,this.defaultRenderer=new C(e,i,d,this.platformIsServer,this.tracingService)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;let o=this.getOrCreateRenderer(e,t);return o instanceof I?o.applyToHost(e):o instanceof b&&o.applyStyles(),o}getOrCreateRenderer(e,t){let o=this.rendererByCompId,s=o.get(t.id);if(!s){let i=this.doc,c=this.ngZone,d=this.eventManager,u=this.sharedStylesHost,l=this.removeStylesOnCompDestroy,g=this.platformIsServer,m=this.tracingService;switch(t.encapsulation){case U.Emulated:s=new I(d,u,t,this.appId,l,i,c,g,m);break;case U.ShadowDom:return new F(d,u,e,t,i,c,this.nonce,g,m);default:s=new b(d,u,t,l,i,c,g,m);break}o.set(t.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(t){return new(t||r)(a(V),a(z),a(k),a(_e),a(p),a(M),a(_),a(j),a(re,8))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),C=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(n,e,t,o,s){this.eventManager=n,this.doc=e,this.ngZone=t,this.platformIsServer=o,this.tracingService=s}destroy(){}destroyNode=null;createElement(n,e){return e?this.doc.createElementNS(x[e]||e,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,e){(pe(n)?n.content:n).appendChild(e)}insertBefore(n,e,t){n&&(pe(n)?n.content:n).insertBefore(e,t)}removeChild(n,e){e.remove()}selectRootElement(n,e){let t=typeof n=="string"?this.doc.querySelector(n):n;if(!t)throw new h(-5104,!1);return e||(t.textContent=""),t}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,t,o){if(o){e=o+":"+e;let s=x[o];s?n.setAttributeNS(s,e,t):n.setAttribute(e,t)}else n.setAttribute(e,t)}removeAttribute(n,e,t){if(t){let o=x[t];o?n.removeAttributeNS(o,e):n.removeAttribute(`${t}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,t,o){o&(T.DashCase|T.Important)?n.style.setProperty(e,t,o&T.Important?"important":""):n.style[e]=t}removeStyle(n,e,t){t&T.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,t){n!=null&&(n[e]=t)}setValue(n,e){n.nodeValue=e}listen(n,e,t,o){if(typeof n=="string"&&(n=D().getGlobalEventTarget(this.doc,n),!n))throw new h(5102,!1);let s=this.decoratePreventDefault(t);return this.tracingService?.wrapEventListener&&(s=this.tracingService.wrapEventListener(n,e,s)),this.eventManager.addEventListener(n,e,s,o)}decoratePreventDefault(n){return e=>{if(e==="__ngUnwrap__")return n;n(e)===!1&&e.preventDefault()}}};function pe(r){return r.tagName==="TEMPLATE"&&r.content!==void 0}var F=class extends C{sharedStylesHost;hostEl;shadowRoot;constructor(n,e,t,o,s,i,c,d,u){super(n,s,i,d,u),this.sharedStylesHost=e,this.hostEl=t,this.shadowRoot=t.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let l=o.styles;l=ge(o.id,l);for(let m of l){let y=document.createElement("style");c&&y.setAttribute("nonce",c),y.textContent=m,this.shadowRoot.appendChild(y)}let g=o.getExternalStyles?.();if(g)for(let m of g){let y=B(m,s);c&&y.setAttribute("nonce",c),this.shadowRoot.appendChild(y)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,t){return super.insertBefore(this.nodeOrShadowRoot(n),e,t)}removeChild(n,e){return super.removeChild(null,e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},b=class extends C{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(n,e,t,o,s,i,c,d,u){super(n,s,i,c,d),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=o;let l=t.styles;this.styles=u?ge(u,l):l,this.styleUrls=t.getExternalStyles?.(u)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},I=class extends b{contentAttr;hostAttr;constructor(n,e,t,o,s,i,c,d,u){let l=o+"-"+t.id;super(n,e,t,s,i,c,d,u,l),this.contentAttr=De(l),this.hostAttr=Re(l)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){let t=super.createElement(n,e);return super.setAttribute(t,this.contentAttr,""),t}};var N=class r extends ie{supportsDOMEvents=!0;static makeCurrent(){se(new r)}onAndCancel(n,e,t,o){return n.addEventListener(e,t,o),()=>{n.removeEventListener(e,t,o)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.remove()}createElement(n,e){return e=e||this.getDefaultDocument(),e.createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return e==="window"?window:e==="document"?n:e==="body"?n.body:null}getBaseHref(n){let e=Ae();return e==null?null:Ie(e)}resetBaseElement(){O=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return ae(document.cookie,n)}},O=null;function Ae(){return O=O||document.head.querySelector("base"),O?O.getAttribute("href"):null}function Ie(r){return new URL(r,document.baseURI).pathname}var Le=(()=>{class r{build(){return new XMLHttpRequest}static \u0275fac=function(t){return new(t||r)};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),ye=(()=>{class r extends R{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,o,s){return e.addEventListener(t,o,s),()=>this.removeEventListener(e,t,o,s)}removeEventListener(e,t,o,s){return e.removeEventListener(t,o,s)}static \u0275fac=function(t){return new(t||r)(a(p))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),ve=["alt","control","meta","shift"],Ne={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},He={alt:r=>r.altKey,control:r=>r.ctrlKey,meta:r=>r.metaKey,shift:r=>r.shiftKey},Ee=(()=>{class r extends R{constructor(e){super(e)}supports(e){return r.parseEventName(e)!=null}addEventListener(e,t,o,s){let i=r.parseEventName(t),c=r.eventCallback(i.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>D().onAndCancel(e,i.domEventName,c,s))}static parseEventName(e){let t=e.toLowerCase().split("."),o=t.shift();if(t.length===0||!(o==="keydown"||o==="keyup"))return null;let s=r._normalizeKey(t.pop()),i="",c=t.indexOf("code");if(c>-1&&(t.splice(c,1),i="code."),ve.forEach(u=>{let l=t.indexOf(u);l>-1&&(t.splice(l,1),i+=u+".")}),i+=s,t.length!=0||s.length===0)return null;let d={};return d.domEventName=o,d.fullKey=i,d}static matchEventFullKeyCode(e,t){let o=Ne[e.key]||e.key,s="";return t.indexOf("code.")>-1&&(o=e.code,s="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),ve.forEach(i=>{if(i!==o){let c=He[i];c(e)&&(s+=i+".")}}),s+=o,s===t)}static eventCallback(e,t,o){return s=>{r.matchEventFullKeyCode(s,e)&&o.runGuarded(()=>t(s))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(t){return new(t||r)(a(p))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})();function Pe(r,n){return oe(H({rootComponent:r},ke(n)))}function ke(r){return{appProviders:[...Fe,...r?.providers??[]],platformProviders:Be}}function je(){N.makeCurrent()}function Ue(){return new P}function xe(){return Y(document),document}var Be=[{provide:M,useValue:ce},{provide:X,useValue:je,multi:!0},{provide:p,useFactory:xe}];var Fe=[{provide:Z,useValue:"root"},{provide:P,useFactory:Ue},{provide:L,useClass:ye,multi:!0,deps:[p]},{provide:L,useClass:Ee,multi:!0,deps:[p]},G,z,V,{provide:ne,useExisting:G},{provide:de,useClass:Le},[]];var Ft=(()=>{class r{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(t){return new(t||r)(a(p))};static \u0275prov=f({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var ze=(()=>{class r{static \u0275fac=function(t){return new(t||r)};static \u0275prov=f({token:r,factory:function(t){let o=null;return t?o=new(t||r):o=a($e),o},providedIn:"root"})}return r})(),$e=(()=>{class r extends ze{_doc;constructor(e){super(),this._doc=e}sanitize(e,t){if(t==null)return null;switch(e){case v.NONE:return t;case v.HTML:return S(t,"HTML")?E(t):te(this._doc,String(t)).toString();case v.STYLE:return S(t,"Style")?E(t):t;case v.SCRIPT:if(S(t,"Script"))return E(t);throw new h(5200,!1);case v.URL:return S(t,"URL")?E(t):ee(String(t));case v.RESOURCE_URL:if(S(t,"ResourceURL"))return E(t);throw new h(5201,!1);default:throw new h(5202,!1)}}bypassSecurityTrustHtml(e){return K(e)}bypassSecurityTrustStyle(e){return W(e)}bypassSecurityTrustScript(e){return q(e)}bypassSecurityTrustUrl(e){return J(e)}bypassSecurityTrustResourceUrl(e){return Q(e)}static \u0275fac=function(t){return new(t||r)(a(p))};static \u0275prov=f({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{Pe as a,Ft as b,ze as c};
@@ -0,0 +1 @@
1
+ import{a as Ce}from"./chunk-4D2NUH5S.js";import{a as ge}from"./chunk-XD26KCAE.js";import{a as me}from"./chunk-KQAO2YHR.js";import{a as de}from"./chunk-FPLBURO5.js";import{c as Ee,e as Oe,h as fe,j as Ae,s as v}from"./chunk-3KIPRGE2.js";import{b as oe}from"./chunk-UVLJAD66.js";import{a as ae,b as se,e as le,g as re,i as _e,l as pe,p as ue,q as Se,s as ce,t as Te}from"./chunk-MHALSLG3.js";import{h as A}from"./chunk-FWVOVJCG.js";import{a as Pe}from"./chunk-KV7SEZ24.js";import{la as ie}from"./chunk-VKD4Y3YQ.js";import{Bb as k,F as L,Gc as y,Hb as E,Ib as O,Jb as u,Lc as $,Mb as Q,Nb as S,Oa as r,Ob as d,X as T,Zb as ee,_a as f,_b as m,ba as N,bc as g,ca as M,dc as G,ec as z,gc as h,hc as b,ic as B,la as c,pb as I,qb as D,rb as Z,sb as q,tb as J,ub as R,vb as s,vc as X,wb as l,wc as te,xb as C,xc as ne}from"./chunk-K6EZTPNQ.js";function ke(a,n){if(a&1){let i=k();s(0,"spk-radio",10),S("click",function(){let t=N(i).$implicit,o=d();return M(o.pauseOption.set(t.value))}),g(1),l()}if(a&2){let i=n.$implicit,e=d();m("active",e.pauseOption()===i.value),r(),G(" ",i.label," ")}}var he=[{label:$localize`5 minutes`,value:"5m"},{label:$localize`10 minutes`,value:"10m"},{label:$localize`15 minutes`,value:"15m"},{label:$localize`30 minutes`,value:"30m"},{label:$localize`1 hour`,value:"1h"},{label:$localize`4 hours`,value:"4h"},{label:$localize`8 hours`,value:"8h"},{label:$localize`24 hours`,value:"24h"},{label:$localize`Until resumed`,value:void 0}],x=class a{#e=T(A);pauseOptions=c(he);closed=$();isSubmitting=c(!1);pauseTransfers=c(!1);pauseOption=c(void 0);submit(){this.isSubmitting.set(!0);let n=this.pauseTransfers()||null,i=this.pauseOption();this.#e.postApiV1ServerstatePause({duration:i,pauseTransfers:n}).pipe(L(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit()}})}static \u0275fac=function(i){return new(i||a)};static \u0275cmp=f({type:a,selectors:[["app-pause-dialog"]],outputs:{closed:"closed"},decls:17,vars:4,consts:()=>{let n;n=$localize`Pause settings`;let i;i=$localize` Also pause transfers `;let e;e=$localize`If you pause transfers they could time out and cause retries or failures.`;let t;t=$localize`Cancel`;let o;return o=$localize` Update settings `,[n,i,e,t,o,["header",""],["content",""],[1,"radios"],[1,"primary","raised",3,"active"],[1,"check-wrap"],[1,"primary","raised",3,"click"],["type","warning"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(i,e){i&1&&(s(0,"header",5)(1,"h3"),u(2,0),l()(),s(3,"div",6)(4,"div",7),q(5,ke,2,3,"spk-radio",8,Z),l(),s(7,"div",9)(8,"spk-checkbox",10),S("click",function(){return e.pauseTransfers.set(!e.pauseTransfers())}),u(9,1),l(),s(10,"spk-alert",11),u(11,2),l()()(),s(12,"footer",12)(13,"button",13),S("click",function(){return e.closed.emit()}),u(14,3),l(),s(15,"button",14),S("click",function(){return e.submit()}),u(16,4),l()()),i&2&&(r(5),J(e.pauseOptions()),r(3),m("active",e.pauseTransfers()),r(7),m("loader",e.isSubmitting()))},dependencies:[v,Se,_e,se],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.check-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:2rem 0 0}"],changeDetection:0})};var Me={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},be=["mbps","gbps"],Ie=8,V=1024,w=V*1024,W=w*1024,Y=W*1024,De=Y*1024,Be={B:1,KB:V,MB:w,GB:W,TB:Y,PB:De},ye=1e3,K=ye*1e3,H=K*1e3,Ue=[{threshold:De,unitPrefix:"PByte"},{threshold:Y,unitPrefix:"TByte"},{threshold:W,unitPrefix:"GByte"},{threshold:w,unitPrefix:"MByte"},{threshold:V,unitPrefix:"KByte"},{threshold:1,unitPrefix:"Byte"}],U=class a{#e=T(A);closed=$();isSubmitting=c(!1);sizeOptions=c([...be]);maxUpload=c(0);maxDownload=c(0);maxUploadUnit=c("mbps");maxDownloadUnit=c("mbps");ngOnInit(){this.init()}convertToBitsPerSecondUnits(n,i){let t=n*(Be[i.toUpperCase()]||w)*Ie;return t===0?{value:0,unit:"mbps"}:t>=H?{value:parseFloat((t/H).toFixed(2)),unit:"gbps"}:{value:parseFloat((t/K).toFixed(2)),unit:"mbps"}}convertFromBitsPerSecondUnits(n,i){let e=0;switch(i){case"gbps":e=n*H;break;case"mbps":e=n*K;break}let t=e/Ie;if(t===0)return{valueForApi:0,unitPrefixForApi:"Byte"};for(let{threshold:o,unitPrefix:_}of Ue)if(t>=o)return{valueForApi:Math.round(t/o),unitPrefixForApi:_};return{valueForApi:Math.round(t),unitPrefixForApi:"Byte"}}init(){this.#e.getApiV1Serversettings().subscribe({next:n=>{let i=n?.["max-upload-speed"],e=n?.["max-download-speed"];if(i&&i!==""){let t=i.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(t){let o=parseFloat(t[1]),_=t[2],p=this.convertToBitsPerSecondUnits(o,_);this.maxUpload.set(p.value),this.maxUploadUnit.set(p.unit)}else console.warn("Unexpected max-upload-speed format from API:",i),this.resetUpload()}else this.resetUpload();if(e&&e!==""){let t=e.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(t){let o=parseFloat(t[1]),_=t[2],p=this.convertToBitsPerSecondUnits(o,_);this.maxDownload.set(p.value),this.maxDownloadUnit.set(p.unit)}else console.warn("Unexpected max-download-speed format from API:",e),this.resetDownload()}else this.resetDownload()},error:n=>{console.error("Failed to get server settings:",n),this.resetDownload(),this.resetUpload()}})}resetDownload(){this.maxDownload.set(0),this.maxDownloadUnit.set("mbps")}resetUpload(){this.maxUpload.set(0),this.maxUploadUnit.set("mbps")}blockDecimalKeys(n){if([".",","].includes(n.key))return n.preventDefault()}cleanupInputAfterPasting(n){n.preventDefault();let i=n.clipboardData?.getData("text/plain");if(!i)return;let e=i.replaceAll(/[\.,]/g,"");n.target.value=e}submit(){this.isSubmitting.set(!0);let n="",i="",e=this.maxUpload()??0,t=this.maxUploadUnit(),o=this.maxDownload()??0,_=this.maxDownloadUnit();if(e>0){let{valueForApi:p,unitPrefixForApi:P}=this.convertFromBitsPerSecondUnits(e,t),F=Me[P];F?n=`${p}${F}`:console.error(`Invalid unit prefix for API submission (upload): ${P}. Defaulting to empty string.`)}if(o){let{valueForApi:p,unitPrefixForApi:P}=this.convertFromBitsPerSecondUnits(o,_),F=Me[P];F?i=`${p}${F}`:console.error(`Invalid unit prefix for API submission (download): ${P}. Defaulting to empty string.`)}this.#e.patchApiV1Serversettings({requestBody:{"max-upload-speed":n,"max-download-speed":i}}).pipe(L(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.closed.emit(!0)},error:p=>{console.error("Failed to submit throttle settings:",p)}})}static \u0275fac=function(i){return new(i||a)};static \u0275cmp=f({type:a,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:26,vars:10,consts:()=>{let n;n=$localize`Throttle network speed`;let i;i=$localize`We will round bits to the nearest byte value.`;let e;e=$localize`Max upload speed`;let t;t=$localize`Max download speed`;let o;o=$localize`Cancel`;let _;return _=$localize` Update settings `,[n,i,e,t,o,_,["content",""],[1,"column"],[1,"field-row"],["type","number",3,"paste","keydown","ngModelChange","ngModel"],[3,"isClearable","options"],["type","text",3,"ngModelChange","ngModel"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(i,e){i&1&&(s(0,"header")(1,"h3"),u(2,0),l(),s(3,"p"),u(4,1),l()(),s(5,"div",6)(6,"div",7)(7,"div",8)(8,"label"),u(9,2),l(),s(10,"spk-form-field")(11,"input",9),S("paste",function(o){return e.cleanupInputAfterPasting(o)})("keydown",function(o){return e.blockDecimalKeys(o)}),B("ngModelChange",function(o){return b(e.maxUpload,o)||(e.maxUpload=o),o}),l()(),s(12,"spk-select",10)(13,"input",11),B("ngModelChange",function(o){return b(e.maxUploadUnit,o)||(e.maxUploadUnit=o),o}),l()()(),s(14,"div",8)(15,"label"),u(16,3),l(),s(17,"spk-form-field")(18,"input",9),S("paste",function(o){return e.cleanupInputAfterPasting(o)})("keydown",function(o){return e.blockDecimalKeys(o)}),B("ngModelChange",function(o){return b(e.maxDownload,o)||(e.maxDownload=o),o}),l()(),s(19,"spk-select",10)(20,"input",11),B("ngModelChange",function(o){return b(e.maxDownloadUnit,o)||(e.maxDownloadUnit=o),o}),l()()()()(),s(21,"footer",12)(22,"button",13),S("click",function(){return e.closed.emit(!1)}),u(23,4),l(),s(24,"button",14),S("click",function(){return e.submit()}),u(25,5),l()()),i&2&&(r(11),h("ngModel",e.maxUpload),r(),R("isClearable",!1)("options",e.sizeOptions()),r(),h("ngModel",e.maxUploadUnit),r(5),h("ngModel",e.maxDownload),r(),R("isClearable",!1)("options",e.sizeOptions()),r(),h("ngModel",e.maxDownloadUnit),r(4),m("loader",e.isSubmitting()))},dependencies:[v,Ee,Ae,Oe,fe,pe,Te],styles:['[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;padding:1rem;gap:.5rem;margin-bottom:1rem}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.field-row[_ngcontent-%COMP%]{display:grid;grid-template-areas:"label label" "input select";grid-template-columns:1fr auto;align-items:center;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%]{grid-area:input}.field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{grid-area:select}'],changeDetection:0})};function Le(a,n){if(a&1&&(s(0,"div"),g(1),l(),C(2,"spk-progress-bar",11)),a&2){let i=d();r(),z("",i.statusData().actionText," - ",i.statusData().statusText),r(),R("value",i.statusData().progress*100)}}function Ge(a,n){if(a&1&&(s(0,"div",7),g(1),s(2,"spk-icon"),g(3,"clock"),l(),g(4),X(5,"relativeTime"),X(6,"date"),l()),a&2){let i,e=d();r(),G(" ",(i=e.nextBackup().backup)==null||i.Backup==null?null:i.Backup.Name," - "),r(3),z(" ",te(5,3,e.nextBackup().time)," at ",ne(6,5,e.nextBackup().time,"shortTime")," ")}}function $e(a,n){a&1&&(s(0,"div",7),u(1,1),l())}function ve(a,n){a&1&&(s(0,"div",8),E(1,2),C(2,"spk-spinner"),O(),l()),a&2&&(r(2),ee("--spinner-size","12px")("--spinner-thickness","2px"))}function xe(a,n){if(a&1){let i=k();s(0,"button",10),S("click",function(){N(i);let t=d(2);return M(t.abort())}),E(1,3),C(2,"spk-icon"),O(),l()}}function we(a,n){if(a&1){let i=k();s(0,"button",10),S("click",function(){N(i);let t=d(2);return M(t.stop())}),E(1,4),C(2,"spk-icon"),O(),l()}}function ze(a,n){if(a&1&&I(0,xe,3,0,"button",12)(1,we,3,0,"button",12),a&2){let i=d();D(i.isStopping()?0:1)}}function Xe(a,n){a&1&&(E(0,0,1),C(1,"spk-icon"),O())}function He(a,n){a&1&&(E(0,0,2),C(1,"spk-icon"),O())}var Re=new Date,j=class a{#e=T(A);#t=T(Ce);#n=T(le);#a=T(ge);#s=T(oe);#l=T(de);#i=T(me);minsAgo=Re.setMinutes(Re.getMinutes()-1);statusData=this.#t.statusData;serverState=this.#t.serverState;clientIsRunning=this.#t.clientIsRunning;isResuming=this.#t.isResuming;runningTask=y(()=>this.#i.serverState()?.ActiveTask?.Item1);isStopping=y(()=>this.runningTask()==this.#o());#o=c(-1);pgState=y(()=>this.#i.serverState());nextBackup=y(()=>{let n=this.#a.backups();return{backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}});openThrottleSettingsDialog(){this.#n.open(U,{maxWidth:"550px",width:"100%"})}openPauseDialog(){this.#n.open(x,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#t.pauseResume().subscribe()}stop(){let n=this.runningTask();n&&(this.#o.set(n),this.#e.postApiV1TaskByTaskidStop({taskid:n}).subscribe())}abort(){let n=this.runningTask();n&&this.#e.postApiV1TaskByTaskidAbort({taskid:n}).subscribe()}ngAfterViewInit(){let n=this.#s.relayIsEnabled()||!this.#l.hasWebSocket()?"longpoll":"websocket";this.#t.setConnectionMethod(n)}static \u0275fac=function(i){return new(i||a)};static \u0275cmp=f({type:a,selectors:[["app-status-bar"]],decls:15,vars:5,consts:()=>{let n;n=$localize`${"\uFFFD*10:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Pause ${"\uFFFD/*10:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*11:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Start ${"\uFFFD/*11:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,n=Q(n);let i;i=$localize`No scheduled tasks`;let e;e=$localize` Loading ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_SPINNER:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_SPINNER:`;let t;t=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:skull${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Abort `;let o;return o=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:stop${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Stop `,[n,i,e,t,o,[1,"current-backup"],[1,"current-backup-progress"],[1,"label"],[1,"label","label-loading"],[1,"current-backup-actions"],["spk-button","",3,"click"],[1,"raised","primary",3,"value"],["spk-button",""]]},template:function(i,e){if(i&1&&(s(0,"div",5)(1,"div",6),I(2,Le,3,3)(3,Ge,7,8,"div",7)(4,$e,2,0,"div",7)(5,ve,3,4,"div",8),l(),s(6,"div",9),I(7,ze,2,1),s(8,"button",10),S("click",function(){return e.pauseResume()}),E(9,0),I(10,Xe,2,0)(11,He,2,0),O(),l(),s(12,"button",10),S("click",function(){return e.openThrottleSettingsDialog()}),s(13,"spk-icon"),g(14,"speedometer"),l()()()()),i&2){let t;r(2),D((t=e.serverState())!=null&&t.ActiveTask&&(!((t=e.statusData())==null||t.task==null)&&t.task.Status)&&((t=e.statusData())==null||t.task==null?null:t.task.Status)!=="Completed"?2:e.nextBackup().backup||e.nextBackup().time?3:(t=e.serverState())!=null&&t.ActiveTask?5:4),r(5),D(e.runningTask()?7:-1),r(),m("loader",e.isResuming()),r(2),D(e.clientIsRunning()?10:11)}},dependencies:[ue,Pe,ie,ae,re,ce],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-4);position:sticky;top:0;z-index:2000;background:var(--base-1)}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.current-backup-progress[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:18.75rem}.current-backup-progress[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.current-backup-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}.label-loading[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem}"],changeDetection:0})};export{j as a};
@@ -1 +1 @@
1
- import{a as Q}from"./chunk-S75WBVE3.js";import{c as F,d as G,e as T,f as A,i as R,n as D,q,r as V,t as $}from"./chunk-ABANCAM5.js";import{c as x}from"./chunk-FSKPPAVO.js";import"./chunk-FQ55IACT.js";import{d as N}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{a as I,b as k,g as O,l as P}from"./chunk-ESAGJOZZ.js";import"./chunk-N5FH4YAX.js";import"./chunk-EBXJGPRA.js";import{$a as h,Db as o,Eb as i,F as c,Fb as a,Jb as S,Rc as M,Ua as m,Vb as v,Z as l,ea as g,fa as f,gb as _,gc as b,hc as E,jc as r,lb as w,ub as C,va as p,wb as y,zb as L}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";var z=["passwordInput"];function B(s,e){s&1&&(o(0,"spk-alert",2),r(1," Remember to enter a password, if you can't remember the password open the duplicati client on the machine in question and make sure you open it through the tray icon then go into settings to change the password. "),i())}var u=new V,d=class s{#e=l(N);#t=l(x);failedLogin=p(!1);isLoading=p(!1);loginForm=u.group({user:u.control(""),pass:u.control("",G.required)});passwordInput=h("passwordInput");passwordEffect=M(()=>{this.failedLogin()&&queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())});ngOnInit(){queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())}submit(){let e=this.loginForm.value.pass;this.loginForm.value.user||e&&(this.isLoading.set(!0),this.#t.login(e).pipe(c(()=>{this.isLoading.set(!1),this.failedLogin.set(!0)})).subscribe({next:()=>this.#e.navigate(["/"])}))}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=_({type:s,selectors:[["app-login"]],viewQuery:function(t,n){t&1&&b(n.passwordInput,z,5),t&2&&E()},decls:18,vars:4,consts:()=>{let e;return e=$localize`Enter your password`,[["passwordInput",""],[3,"submit","formGroup"],["type","warning"],[1,"logo-login"],[1,"login-row"],["type","text","hidden","","autocomplete","off","name","username","formControlName","user"],["for","password"],["href","https://docs.duplicati.com/detailed-descriptions/duplicati-access-password","target","_blank","rel","noopener noreferrer"],["type","password","name","password","autocomplete","current-password","placeholder",e,"tabindex","1","formControlName","pass"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(t,n){if(t&1){let j=S();o(0,"form",1),v("submit",function(){return g(j),f(n.submit())}),w(1,B,2,0,"spk-alert",2),o(2,"div",3),a(3,"app-logo"),i(),o(4,"div",4),a(5,"input",5),o(6,"spk-form-field")(7,"label",6),r(8," Password "),o(9,"a",7)(10,"spk-icon"),r(11,"question"),i()()(),a(12,"input",8,0),i(),o(14,"button",9),r(15," Login "),o(16,"spk-icon"),r(17,"arrow-right"),i()()()()}t&2&&(C("formGroup",n.loginForm),m(),L(n.failedLogin()?1:-1),m(13),y("loader",n.isLoading()))},dependencies:[$,R,F,T,A,D,q,Q,P,I,O,k],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{width:100vw;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.5rem}spk-alert[_ngcontent-%COMP%]{max-width:20rem;margin:0 auto}h3[_ngcontent-%COMP%]{font:var(--title-30)}.login-row[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.logo-login[_ngcontent-%COMP%]{top:0;left:0;padding:1.25rem;position:fixed}"],changeDetection:0})};export{d as default};
1
+ import{a as Q}from"./chunk-HWCTRSCV.js";import{c as F,d as G,e as T,f as A,i as R,n as D,q,r as V,t as $}from"./chunk-3KIPRGE2.js";import{d as x}from"./chunk-UVLJAD66.js";import{d as N}from"./chunk-7LEXBIXG.js";import"./chunk-P4ZYFRD3.js";import{a as I,b as k,g as O,l as P}from"./chunk-MHALSLG3.js";import"./chunk-FWVOVJCG.js";import"./chunk-VKD4Y3YQ.js";import"./chunk-WIDMAJIO.js";import{Bb as y,F as c,Hc as E,Nb as L,Nc as M,Oa as m,Wb as S,X as l,Xb as v,_a as h,_b as b,ba as g,bc as r,ca as f,la as p,pb as C,qb as _,ub as w,vb as o,wb as i,xb as a}from"./chunk-K6EZTPNQ.js";import"./chunk-EUDKD2JW.js";var z=["passwordInput"];function B(s,e){s&1&&(o(0,"spk-alert",2),r(1," Remember to enter a password, if you can't remember the password open the duplicati client on the machine in question and make sure you open it through the tray icon then go into settings to change the password. "),i())}var u=new V,d=class s{#e=l(N);#t=l(x);failedLogin=p(!1);isLoading=p(!1);loginForm=u.group({user:u.control(""),pass:u.control("",G.required)});passwordInput=M("passwordInput");passwordEffect=E(()=>{this.failedLogin()&&queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())});ngOnInit(){queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())}submit(){let e=this.loginForm.value.pass;this.loginForm.value.user||e&&(this.isLoading.set(!0),this.#t.login(e).pipe(c(()=>{this.isLoading.set(!1),this.failedLogin.set(!0)})).subscribe({next:()=>this.#e.navigate(["/"])}))}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=h({type:s,selectors:[["app-login"]],viewQuery:function(t,n){t&1&&S(n.passwordInput,z,5),t&2&&v()},decls:18,vars:4,consts:()=>{let e;return e=$localize`Enter your password`,[["passwordInput",""],[3,"submit","formGroup"],["type","warning"],[1,"logo-login"],[1,"login-row"],["type","text","hidden","","autocomplete","off","name","username","formControlName","user"],["for","password"],["href","https://docs.duplicati.com/detailed-descriptions/duplicati-access-password","target","_blank","rel","noopener noreferrer"],["type","password","name","password","autocomplete","current-password","placeholder",e,"tabindex","1","formControlName","pass"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(t,n){if(t&1){let j=y();o(0,"form",1),L("submit",function(){return g(j),f(n.submit())}),C(1,B,2,0,"spk-alert",2),o(2,"div",3),a(3,"app-logo"),i(),o(4,"div",4),a(5,"input",5),o(6,"spk-form-field")(7,"label",6),r(8," Password "),o(9,"a",7)(10,"spk-icon"),r(11,"question"),i()()(),a(12,"input",8,0),i(),o(14,"button",9),r(15," Login "),o(16,"spk-icon"),r(17,"arrow-right"),i()()()()}t&2&&(w("formGroup",n.loginForm),m(),_(n.failedLogin()?1:-1),m(13),b("loader",n.isLoading()))},dependencies:[$,R,F,T,A,D,q,Q,P,I,O,k],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{width:100vw;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.5rem}spk-alert[_ngcontent-%COMP%]{max-width:20rem;margin:0 auto}h3[_ngcontent-%COMP%]{font:var(--title-30)}.login-row[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.logo-login[_ngcontent-%COMP%]{top:0;left:0;padding:1.25rem;position:fixed}"],changeDetection:0})};export{d as default};
@@ -0,0 +1,4 @@
1
+ import{g as Qt}from"./chunk-EKZRKTLM.js";import{a as jt,l as J}from"./chunk-3IRKJXHE.js";import{a as zt,b as Xt}from"./chunk-KA4H3PM5.js";import{a as Ht}from"./chunk-FLMFEFKM.js";import{a as qt}from"./chunk-WIJ3HW7I.js";import{a as Kt,c as Wt}from"./chunk-N334RUEQ.js";import"./chunk-K5AQUIEE.js";import"./chunk-WY2KPAVB.js";import{a as ht}from"./chunk-3PYBMCOB.js";import"./chunk-RHW5QVAY.js";import"./chunk-FPLBURO5.js";import{b as yt,c as It,e as wt,f as $t,g as At,i as vt,j as Pt,m as Vt,n as Mt,o as bt,p as Gt,q as Lt,r as Bt,t as Ut}from"./chunk-3KIPRGE2.js";import{b as Tt,d as Ct}from"./chunk-7LEXBIXG.js";import"./chunk-P4ZYFRD3.js";import{A as Rt,C as Nt,a as ft,b as gt,d as Dt,e as St,l as Et,o as xt,p as Ot,t as kt}from"./chunk-MHALSLG3.js";import"./chunk-FWVOVJCG.js";import{ea as ut}from"./chunk-VKD4Y3YQ.js";import"./chunk-WIDMAJIO.js";import{Ab as L,Bb as S,Gc as K,Hb as x,Hc as dt,Ib as O,Jb as V,Kb as nt,Lb as it,Mb as H,Nb as g,Nc as Ft,Oa as a,Ob as s,Wb as ot,X as N,Xb as at,Yb as v,_a as et,_b as z,ba as T,bc as c,ca as C,cc as X,db as h,dc as D,ec as rt,fa as tt,gc as lt,hc as st,ic as pt,jc as q,kc as j,la as R,lc as Q,mc as k,oc as ct,pb as m,pc as u,qb as d,qc as _t,rb as y,rc as mt,sb as I,sc as B,tb as w,ub as p,uc as U,vb as l,wb as r,xb as F,yb as $,zb as A,zc as M}from"./chunk-K6EZTPNQ.js";import"./chunk-EUDKD2JW.js";var Yt=["formRef"],Zt=(e,n,t,o)=>({index:e,formView:n,formGroupName:"custom",destinationType:t,oauthField:o}),Z=e=>({$implicit:e}),te=(e,n,t,o)=>({index:e,formView:n,formGroupName:"dynamic",destinationType:t,oauthField:o}),ee=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",destinationType:t,oauthField:o}),ne=()=>({maxWidth:"700px",width:"100%"});function ie(e,n){e&1&&(x(0,5,2),F(1,"spk-icon"),O())}function oe(e,n){e&1&&V(0,5,3)}function ae(e,n){if(e&1){let t=S();x(0,5,1),l(1,"button",20),g("click",function(){T(t);let i=s();return C(i.testDestination())}),m(2,ie,2,0)(3,oe,1,0),r(),O()}if(e&2){let t=s();a(),z("success",t.successfulTest()),a(),d(t.successfulTest()?2:3)}}function re(e,n){if(e&1){let t=S();l(0,"p",26),g("click",function(){T(t);let i=s();return C(i.removeDestinationFormGroup(i.destinationCount()-1))}),x(1,8),F(2,"span",27),O(),r()}}function le(e,n){if(e&1){let t=S();l(0,"div",33),g("click",function(){let i=T(t).$implicit,_=s(2);return C(_.addDestinationFormGroup(i.key))}),l(1,"h3"),c(2),r(),l(3,"p"),c(4),r()()}if(e&2){let t=n.$implicit;a(2),X(t.displayName),a(2),X(t.description)}}function se(e,n){if(e&1){let t=S();l(0,"button",34,1),g("click",function(){let i=T(t).$implicit,_=s(2);return C(_.addDestinationFormGroup(i.key))}),c(2),r()}if(e&2){let t=n.$implicit;a(2),D(" ",t.displayName," ")}}function pe(e,n){if(e&1&&(l(0,"div",28),I(1,le,5,2,"div",29,y),r(),l(3,"spk-menu",30)(4,"button",31),V(5,9),r(),$(6,19),I(7,se,3,1,"button",32,y),A(),r()),e&2){let t=s();a(),w(t.destinationTypeOptionsFocused()),a(2),p("searchable",!0),a(4),w(t.destinationTypeOptionsNotFocused())}}function ce(e,n){e&1&&L(0)}function _e(e,n){if(e&1&&h(0,ce,1,0,"ng-container",39),e&2){let t,o=n.$implicit,i=n.$index;s();let _=v(18),f=s();p("ngTemplateOutlet",_)("ngTemplateOutletContext",B(7,Z,U(2,Zt,i,o,(t=f.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,f.destinationFormPair().oauthField)))}}function me(e,n){e&1&&L(0)}function de(e,n){if(e&1&&h(0,me,1,0,"ng-container",39),e&2){let t,o=n.$implicit,i=n.$index;s();let _=v(18),f=s();p("ngTemplateOutlet",_)("ngTemplateOutletContext",B(7,Z,U(2,te,i,o,(t=f.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,f.destinationFormPair().oauthField)))}}function Fe(e,n){if(e&1){let t=S();x(0,10,1),l(1,"button",34,1),g("click",function(){let i=T(t).$implicit,_=s(2);return C(_.addAdvancedFormPair(i,0))}),r(),O()}if(e&2){let t=n.$implicit;a(),nt(t.name),it(0)}}function ue(e,n){e&1&&L(0)}function Te(e,n){if(e&1&&h(0,ue,1,0,"ng-container",39),e&2){let t,o=n.$implicit,i=n.$index;s();let _=v(18),f=s();p("ngTemplateOutlet",_)("ngTemplateOutletContext",B(7,Z,U(2,ee,i,o,(t=f.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,f.destinationFormPair().oauthField)))}}function Ce(e,n){if(e&1&&(l(0,"spk-icon",47),c(1,"question"),r()),e&2){let t=s(2).$implicit;p("spkTooltip",t.formView.longDescription)}}function fe(e,n){if(e&1&&(l(0,"app-file-tree",42)(1,"label",46),c(2),m(3,Ce,2,1,"spk-icon",47),r(),F(4,"input",48),r()),e&2){let t=s().$implicit,o=s(2);p("startingPath",o.getFormFieldValue(0,t.formGroupName,t.formView.name))("accepts",t.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),a(),p("for",u("destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other")),a(),D(" ",t.formView.shortDescription??t.formView.name," "),a(),d(t.formView.longDescription?3:-1),a(),p("id",u("destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other"))("formControlName",k(t.formView.name))}}function ge(e,n){if(e&1&&(l(0,"spk-icon",47),c(1,"question"),r()),e&2){let t=s(2).$implicit;p("spkTooltip",t.formView.longDescription)}}function De(e,n){if(e&1&&(l(0,"app-file-tree",43)(1,"label",46),c(2),m(3,ge,2,1,"spk-icon",47),r(),F(4,"input",48),r()),e&2){let t=s().$implicit,o=s(2);p("hideShortcuts",!0)("startingPath",o.getFormFieldValue(0,t.formGroupName,t.formView.name)),a(),p("for",u("destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other")),a(),D(" ",t.formView.shortDescription??t.formView.name," "),a(),d(t.formView.longDescription?3:-1),a(),p("id",u("destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other"))("formControlName",k(t.formView.name))}}function Se(e,n){if(e&1&&(l(0,"spk-icon",47),c(1,"question"),r()),e&2){let t=s(2).$implicit;p("spkTooltip",t.formView.longDescription)}}function Ee(e,n){e&1&&(l(0,"spk-icon",50),c(1,"link"),r())}function xe(e,n){e&1&&(l(0,"spk-icon",50),c(1,"envelope"),r())}function Oe(e,n){e&1&&(l(0,"spk-icon",50),c(1,"textbox"),r())}function ke(e,n){if(e&1&&(l(0,"spk-form-field")(1,"label",46),c(2),m(3,Se,2,1,"spk-icon",47),r(),F(4,"input",49),m(5,Ee,2,0,"spk-icon",50)(6,xe,2,0,"spk-icon",50)(7,Oe,2,0,"spk-icon",50),r()),e&2){let t=s().$implicit;a(),p("for",u("destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other")),a(),D(" ",t.formView.shortDescription??t.formView.name," "),a(),d(t.formView.longDescription?3:-1),a(),p("id",u("destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other"))("formControlName",k(t.formView.name))("type",t.formView.type==="Email"?"email":"text"),a(),d(t.formView.type==="Path"?5:t.formView.type==="Email"?6:7)}}function Re(e,n){if(e&1){let t=S();l(0,"span",54),g("click",function(){T(t);let i=s(2).$implicit,_=s(2);return C(_.oauthStartTokenCreation(i.destinationType))}),c(1,"AuthID"),r()}}function Ne(e,n){e&1&&(l(0,"spk-icon",50),c(1,"password"),r())}function he(e,n){if(e&1){let t=S();l(0,"spk-icon",55),g("click",function(){T(t);let i=s(2).$implicit;return C(i.formView.showPassword=!i.formView.showPassword)}),c(1," eye "),r()}}function ye(e,n){if(e&1){let t=S();l(0,"spk-icon",55),g("click",function(){T(t);let i=s(2).$implicit;return C(i.formView.showPassword=!i.formView.showPassword)}),c(1," eye-slash "),r()}}function Ie(e,n){if(e&1&&(l(0,"spk-form-field")(1,"label",46),c(2),r(),F(3,"input",51),m(4,Re,2,0,"span",52)(5,Ne,2,0,"spk-icon",50),m(6,he,2,0,"spk-icon",53)(7,ye,2,0,"spk-icon",53),r()),e&2){let t=s().$implicit;a(),p("for",u("destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other")),a(),D(" ",t.formView.shortDescription??t.formView.name," "),a(),p("id",u("destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other"))("formControlName",k(t.formView.name))("type",t.formView.showPassword?"text":"password"),a(),d(t.oauthField===t.formView.name?4:5),a(2),d(t.formView.showPassword?6:7)}}function we(e,n){if(e&1&&(l(0,"spk-icon",47),c(1,"question"),r()),e&2){let t=s(3).$implicit;p("spkTooltip",t.formView.longDescription)}}function $e(e,n){if(e&1&&c(0),e&2){let t=n.$implicit;D(" ",t," ")}}function Ae(e,n){if(e&1&&(l(0,"spk-select",56)(1,"label",46),c(2),m(3,we,2,1,"spk-icon",47),r(),F(4,"input",48),r(),h(5,$e,1,1,"ng-template",null,3,M)),e&2){let t=v(6);s();let o=Q(0),i=s().$implicit;p("options",o)("isClearable",!1)("optionTemplate",t),a(),p("for",u("destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other")),a(),D(" ",i.formView.shortDescription??i.formView.name," "),a(),d(i.formView.longDescription?3:-1),a(),p("id",u("destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other"))("formControlName",k(i.formView.name))}}function ve(e,n){if(e&1&&(q(0),m(1,Ae,7,15)),e&2){let t=s().$implicit,o=j(t.formView.loadOptions?t.formView.loadOptions(s(2).injector)():t.formView.options);a(),d(o?1:-1)}}function Pe(e,n){if(e&1&&(l(0,"spk-icon",47),c(1,"question"),r()),e&2){let t=s(3).$implicit;p("spkTooltip",t.formView.longDescription)}}function Ve(e,n){if(e&1&&c(0),e&2){let t=n.$implicit;rt(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function Me(e,n){if(e&1&&(l(0,"spk-select",58)(1,"label",46),c(2),m(3,Pe,2,1,"spk-icon",47),r(),F(4,"input",48),r(),h(5,Ve,1,2,"ng-template",null,4,M)),e&2){let t=v(6);s();let o=Q(0),i=s().$implicit;p("options",o)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",t),a(),p("for",u("destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other")),a(),D(" ",i.formView.shortDescription??i.formView.name," "),a(),d(i.formView.longDescription?3:-1),a(),p("id",u("destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other"))("formControlName",k(i.formView.name))}}function be(e,n){e&1&&F(0,"spk-progress-bar",57)}function Ge(e,n){if(e&1&&(q(0),m(1,Me,7,16)(2,be,1,0,"spk-progress-bar",57)),e&2){let t=s().$implicit,o=j(t.formView.loadOptions?t.formView.loadOptions(s(2).injector)():t.formView.options);a(),d(o?1:2)}}function Le(e,n){if(e&1&&(l(0,"spk-icon",47),c(1,"question"),r()),e&2){let t=s(2).$implicit;p("spkTooltip",t.formView.longDescription)}}function Be(e,n){if(e&1&&(l(0,"app-size",44)(1,"label",46),c(2),m(3,Le,2,1,"spk-icon",47),r()()),e&2){let t=s().$implicit;p("inputType",t.Name)("formControlName",t.formView.name)("customId",`destination-{{ item.formGroupName }}-{{ item.index }}-{{
2
+ item.asHttpOptions ? 'http' : 'other'
3
+ }}`),a(),p("for",u("destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other")),a(),D(" ",t.formView.shortDescription??t.formView.name," "),a(),d(t.formView.longDescription?3:-1)}}function Ue(e,n){if(e&1&&(l(0,"spk-icon",47),c(1,"question"),r()),e&2){let t=s(2).$implicit;p("spkTooltip",t.formView.longDescription)}}function Ke(e,n){if(e&1&&(l(0,"spk-form-field")(1,"label",46),c(2),m(3,Ue,2,1,"spk-icon",47),r(),F(4,"input",59),l(5,"spk-icon",50),c(6,"numpad"),r()()),e&2){let t=s().$implicit;a(),p("for",u("destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other")),a(),D(" ",t.formView.shortDescription??t.formView.name," "),a(),d(t.formView.longDescription?3:-1),a(),p("id",u("destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other"))("formControlName",k(t.formView.name))}}function We(e,n){if(e&1&&(l(0,"spk-icon",47),c(1,"question"),r()),e&2){let t=s(2).$implicit;p("spkTooltip",t.formView.longDescription)}}function He(e,n){if(e&1&&(l(0,"spk-toggle",45)(1,"label",46),c(2),m(3,We,2,1,"spk-icon",47),r(),F(4,"input",60),r()),e&2){let t=s().$implicit;a(),p("for",u("destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other")),a(),D(" ",t.formView.shortDescription??t.formView.name," "),a(),d(t.formView.longDescription?3:-1),a(),p("id",u("destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other"))("formControlName",k(t.formView.name))}}function ze(e,n){if(e&1&&(l(0,"spk-icon",47),c(1,"question"),r()),e&2){let t=s(2).$implicit;p("spkTooltip",t.formView.longDescription)}}function Xe(e,n){if(e&1&&c(0),e&2){let t=n.$implicit;D(" ",t," ")}}function qe(e,n){if(e&1&&(l(0,"spk-select",61)(1,"label",46),c(2),m(3,ze,2,1,"spk-icon",47),r(),F(4,"input",62),r(),h(5,Xe,1,1,"ng-template",null,4,M)),e&2){let t=v(6),o=s().$implicit;p("options",o.formView.options)("selectMultiple",!0)("optionTemplate",t),a(),p("for",ct("destination-",o.formGroupName,"-",o.index)),a(),D(" ",o.formView.shortDescription??o.formView.name," "),a(),d(o.formView.longDescription?3:-1),a(),p("formControlName",k(o.formView.name))}}function je(e,n){if(e&1&&(l(0,"spk-icon",47),c(1,"question"),r()),e&2){let t=s(2).$implicit;p("spkTooltip",t.formView.longDescription)}}function Qe(e,n){if(e&1&&(l(0,"app-timespan",44)(1,"label",46),c(2),m(3,je,2,1,"spk-icon",47),r()()),e&2){let t=s().$implicit;p("inputType",t.formView.name)("formControlName",t.formView.name)("customId","destination-"+t.formGroupName+"-"+t.index+"-"+(t.asHttpOptions?"http":"other")),a(),p("for",u("destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other")),a(),D(" ",t.formView.shortDescription??t.formView.name," "),a(),d(t.formView.longDescription?3:-1)}}function Je(e,n){if(e&1){let t=S();l(0,"button",63),g("click",function(){T(t);let i=s().$implicit,_=s(2);return C(_.removeFormView(i.formView,0))}),l(1,"spk-icon"),c(2,"x-circle"),r()()}}function Ye(e,n){if(e&1&&(l(0,"div",40),$(1,41),m(2,fe,5,18,"app-file-tree",42)(3,De,5,14,"app-file-tree",43)(4,ke,8,14,"spk-form-field")(5,Ie,8,14,"spk-form-field")(6,ve,2,2)(7,Ge,3,2)(8,Be,4,9,"app-size",44)(9,Ke,7,12,"spk-form-field")(10,He,5,12,"spk-toggle",45)(11,qe,7,10)(12,Qe,4,9,"app-timespan",44),A(),m(13,Je,3,0,"button",31),r()),e&2){let t=n.$implicit;z("single-field",t.formGroupName!=="advanced"),a(),p("formGroupName",t.formGroupName),a(),d(t.formView.type==="FileTree"?2:t.formView.type==="FolderTree"?3:t.formView.type==="String"||t.formView.type==="Path"||t.formView.type==="Email"?4:t.formView.type==="Password"?5:t.formView.type==="Enumeration"?6:t.formView.type==="NonValidatedSelectableString"?7:t.formView.type==="Size"?8:t.formView.type==="Integer"?9:t.formView.type==="Boolean"?10:t.formView.type==="Flags"?11:t.formView.type==="Timespan"||t.formView.type==="DateTime"?12:-1),a(11),d(t.formGroupName==="advanced"?13:-1)}}function Ze(e,n){if(e&1&&($(0,21)(1,35),I(2,_e,1,9,"ng-container",null,y),I(4,de,1,9,"ng-container",null,y),l(6,"app-toggle-card",36),$(7,37),x(8,10),l(9,"spk-menu",30)(10,"button",38),F(11,"spk-icon"),r(),$(12,19),I(13,Fe,3,1,"button",32,y),A(),r(),O(),A(),I(15,Te,1,9,"ng-container",null,y),r(),h(17,Ye,14,5,"ng-template",null,2,M),A()()),e&2){let t=s();a(2),w(t.destinationFormPair().custom),a(2),w(t.destinationFormPair().dynamic),a(2),p("disallowToggle",!0),a(3),p("searchable",!0),a(),p("disabled",t.notSelectedAdvancedFormPair().length===0),a(3),w(t.notSelectedAdvancedFormPair()),a(2),w(t.selectedAdvancedFormPair())}}function tn(e,n){if(e&1){let t=S();l(0,"spk-dialog",64),pt("isOpenChange",function(i){T(t);let _=s();return st(_.targetUrlDialogOpen,i)||(_.targetUrlDialogOpen=i),C(i)}),l(1,"header",65)(2,"h2"),V(3,11),r(),l(4,"spk-alert",66),V(5,12),r()(),l(6,"div",67)(7,"spk-form-field"),F(8,"textarea",68),r()(),l(9,"footer",69)(10,"button",23),g("click",function(){T(t);let i=s();return C(i.closeTargetUrlDialog(!1))}),c(11,"Cancel"),r(),l(12,"button",70),g("click",function(){T(t);let i=s();return C(i.closeTargetUrlDialog(!0))}),x(13,13),F(14,"spk-icon"),O(),r()()()}if(e&2){let t=s();lt("isOpen",t.targetUrlDialogOpen),p("options",mt(3,ne)),a(8),p("formControl",t.targetUrlCtrl)}}var W=new Bt,kn=(e={destinations:[]})=>W.group({destinations:W.array(e.destinations)}),Rn=({key:e,customGroup:n,dynamicGroup:t,advancedGroup:o})=>W.group({destinationType:W.control(e),custom:n,dynamic:t,advanced:o}),Y=class e{#i=N(Ct);#o=N(Tt);#t=N(J);#a=N(St);#r=N(jt);#e=N(Qt);injector=N(tt);formRef=Ft.required("formRef");destinationForm=this.#t.destinationForm;destinationFormPair=this.#t.destinationFormPair;selectedAdvancedFormPair=this.#t.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#t.notSelectedAdvancedFormPair;destinationOptions=this.#t.destinationOptions;destinationFormSignal=this.#t.destinationFormSignal;destinationCount=K(()=>this.destinationFormSignal()?.destinations?.length??0);successfulTest=R(!1);destinationTypeOptionsInFocus=R(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=R(Wt.map(n=>({key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description})));destinationTypeOptionsFocused=K(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(i=>i.key===o))});destinationTypeOptionsNotFocused=K(()=>{let n=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(o=>!n.includes(o.key))});targetUrlEffect=dt(()=>{if(this.destinationFormSignal(),this.destinationForm.valid){let n=this.#t.getCurrentTargetUrl();this.#e.updateTargetUrl(n[0])}else this.#e.updateTargetUrl(null)});ngOnInit(){let n=this.#e.destinationTargetUrl();n&&this.#t.updateFieldsFromTargetUrl(n)}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)}targetUrlCtrl=new At;targetUrlInitial=R(null);targetUrlDialogOpen=R(!1);openTargetUrlDialog(){let t=this.#t.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(t),this.targetUrlInitial.set(t),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(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.#r.testDestination(o,n,!1).subscribe({next:i=>{if(i.action==="success"){i.anyFilesFound===!1&&this.#a.open(ht,{data:{title:$localize`Empty destination`,message:$localize`The remote destination does not contain any files.
4
+ Check that the details are correct and that the destination is not empty.`,confirmText:$localize`OK`,cancelText:void 0}}),this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3);return}if(i.action==="generic-error"){this.successfulTest.set(!1);return}i.action==="trust-cert"&&this.#t.addOrUpdateAdvancedFormPairByName("accept-specified-ssl-hash",i.destinationIndex,i.certData),i.action==="approve-host-key"&&this.#t.addOrUpdateAdvancedFormPairByName("ssh-fingerprint",i.destinationIndex,i.reportedHostKey),i.testAgain&&this.testDestination(i.destinationIndex)}})}mapToTargetUrl(n){return Kt(n.value)}removeDestinationFormGroup(n){this.destinationForm.controls.destinations.removeAt(n)}displayFn(n){let t=this.destinationOptions().find(o=>o.Key===n);return t?`${t.DisplayName}`:""}goBack(){this.#e.exit()}next(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}#l=R(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#n=R(!1);#s=R(null);keyCreation(){}oauthStartTokenCreation(n){let t=n=="pcloud"?this.#t.oauthServiceLinkNew:this.#t.oauthServiceLink;this.#n.set(!0);let o=450,i=600,_=t+"?type="+n+"&token="+this.#l(),f=screen.width/2-o/2,b=screen.height/2-i/2,G=window.open(_,"_blank","height="+i+",width="+o+",menubar=0,status=0,titlebar=0,toolbar=0,left="+f+",top="+b);return window.addEventListener("message",P=>{let E=P.data.startsWith("authid:"),Jt=E?P.data.replace("authid:",""):null;E&&(this.#s.set(Jt),this.#n.set(!1),G?.close())}),!1}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=et({type:e,selectors:[["app-restore-destination"]],viewQuery:function(t,o){t&1&&ot(o.formRef,Yt,5),t&2&&at()},features:[_t([J])],decls:24,vars:6,consts:()=>{let n;n=$localize` Backup placement ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"\uFFFD*6:1\uFFFD"}:START_BLOCK_IF_1:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON:${"\uFFFD*2:2\uFFFD"}:START_BLOCK_IF: Connected ${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*3:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*3:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:dots-three-vertical${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:link${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,n=H(n);let t;t=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;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 _;_=$localize`Other destinations`;let f;f=$localize` Advanced options ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#10\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#12\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*14:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*14:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_MENU:`,f=H(f);let b;b=$localize`Edit target URL`;let G;G=$localize` Be careful, this will overwrite everything you have in your destination. `;let P;return P=$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,_,f,b,G,P,[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,"spkTooltip"],["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=S();l(0,"form",14,0),g("submit",function(){return T(i),C(o.next())}),l(2,"header")(3,"h3",15),x(4,5),l(5,"div",16),m(6,ae,4,3,"button",17),l(7,"spk-menu")(8,"button",18),F(9,"spk-icon"),r(),$(10,19),l(11,"button",20),g("click",function(){return T(i),C(o.openTargetUrlDialog())}),F(12,"spk-icon"),r(),A(),r()(),O(),r(),m(13,re,3,0,"p"),r(),m(14,pe,9,1),m(15,Ze,19,3,"ng-container",21),l(16,"div",22)(17,"button",23),g("click",function(){return T(i),C(o.goBack())}),x(18,6),F(19,"spk-icon"),O(),r(),l(20,"button",24),x(21,7),F(22,"spk-icon"),O(),r()()(),m(23,tn,15,4,"spk-dialog",25)}if(t&2){let i;p("formGroup",o.destinationForm),a(6),d(o.destinationCount()>0?6:-1),a(7),d(o.destinationCount()>0?13:-1),a(),d(o.destinationCount()===0?14:-1),a(),d(!((i=o.destinationFormSignal())==null||i.destinations==null)&&i.destinations.length?15:-1),a(8),d(o.targetUrlDialogOpen()?23:-1)}},dependencies:[Ut,vt,It,Pt,yt,wt,$t,Vt,Mt,Lt,bt,Gt,ut,Et,xt,ft,Rt,Dt,gt,kt,Ot,Nt,Xt,zt,qt,Ht],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] spk-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 1fr;gap:.5rem;align-items:flex-end}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{kn as createDestinationForm,Rn as createDestinationFormGroup,Y as default};
@@ -0,0 +1 @@
1
+ import{a as cn}from"./chunk-Q3ILJYED.js";import{c as Z,d as rn}from"./chunk-N334RUEQ.js";import"./chunk-WY2KPAVB.js";import{a as ln}from"./chunk-4D2NUH5S.js";import{a as _n}from"./chunk-XD26KCAE.js";import"./chunk-KQAO2YHR.js";import"./chunk-3PYBMCOB.js";import"./chunk-RHW5QVAY.js";import"./chunk-FPLBURO5.js";import"./chunk-JWFYA3TO.js";import"./chunk-3KIPRGE2.js";import"./chunk-UVLJAD66.js";import{e as je}from"./chunk-7LEXBIXG.js";import"./chunk-P4ZYFRD3.js";import{a as Y,f as qe,g as Je,h as Qe,j as Ye,k as Ze,o as en,p as nn,w as tn,x as on}from"./chunk-MHALSLG3.js";import{h as an}from"./chunk-FWVOVJCG.js";import"./chunk-KV7SEZ24.js";import"./chunk-VKD4Y3YQ.js";import"./chunk-WIDMAJIO.js";import"./chunk-LQ2PCH6Q.js";import{Ab as D,Bb as B,F as w,Hb as s,Hc as We,Ib as u,Jb as p,Kb as y,Lb as L,Mb as q,Nb as f,Oa as l,Ob as F,X as z,Yb as W,_a as he,_b as x,a as ve,b as j,ba as N,bc as d,ca as k,cc as ze,db as P,dc as O,gc as Ve,hc as Ke,ic as Ue,la as H,mb as Xe,nb as we,pb as S,qb as E,rb as V,rc as J,sb as K,sc as $,tb as U,ub as T,vb as o,vc as I,wb as i,wc as G,xb as g,xc as b,yb as M,zb as m,zc as Q}from"./chunk-K6EZTPNQ.js";import"./chunk-EUDKD2JW.js";function sn(...n){let t=H(...n);return Object.defineProperty(t,"value",{get:t.asReadonly(),set:t.set.bind(t)})}function un(n,t,e){let a=localStorage.getItem(t);a!=null&&(n=JSON.parse(a));let r=sn(n),c=r[ve];e?.equal&&(c.equal=e.equal);function R(C){C==null?localStorage.removeItem(t):localStorage.setItem(t,JSON.stringify(C))}return r.set=C=>{R(C),j(c,C)},r.update=C=>{let A=C(r());R(A),j(c,A)},r}var gn=()=>[import("./chunk-UHRBTTCA.js").then(n=>n.NgTemplateOutlet),Y,Ye,on,tn,import("./chunk-IAE5MH6W.js").then(n=>n.DurationFormatPipe),import("./chunk-DM2VSIZA.js").then(n=>n.BytesPipe),import("./chunk-UYWLCW5G.js").then(n=>n.RelativeTimePipe)],dn=()=>["/add-backup"],Tn=()=>["/restore"],Fn=n=>({$implicit:n}),Cn=n=>["/backup",n],Sn=n=>["/restore",n],En=n=>["/backup",n,"export"],Mn=n=>["/backup",n,"delete"],mn=n=>["/backup",n,"database"],On=n=>["/backup",n,"commandline"],Nn=n=>["/backup",n,"log"];function kn(n,t){if(n&1){let e=B();o(0,"button",57),f("click",function(){let r=N(e).$implicit,c=F(2);return k(c.sortByColumn.set(r.value))}),p(1,15),i()}if(n&2){let e=t.$implicit,a=F(2);x("active",a.orderBy()===e.value),l(),y(e.label),L(1)}}function Pn(n,t){if(n&1&&(o(0,"spk-menu",58)(1,"button",59),s(2,14),g(3,"strong")(4,"spk-icon"),u(),i(),M(5,60),K(6,kn,2,3,"button",61,V),m(),i()),n&2){let e=F();l(4),y(e.orderBy()),L(2),l(2),U(e.sortOrderOptions())}}function fn(n,t){if(n&1&&(d(0),I(1,"durationFormat")),n&2){let e=F().$implicit,a=F(4);O(" ",b(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration,a.timeType()==="actual")," ")}}function $n(n,t){n&1&&(M(0),p(1,21),m())}function Dn(n,t){if(n&1&&(d(0),I(1,"bytes")),n&2){let e=F().$implicit;O(" ",G(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function In(n,t){n&1&&(M(0),p(1,22),m())}function An(n,t){if(n&1&&(d(0),I(1,"bytes")),n&2){let e=F().$implicit;O(" ",G(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function Rn(n,t){n&1&&(M(0),p(1,23),m())}function Hn(n,t){n&1&&D(0)}function yn(n,t){if(n&1&&(o(0,"div",64)(1,"div",51)(2,"h3"),d(3),o(4,"spk-chip")(5,"spk-icon"),d(6),i(),d(7),i()(),o(8,"p")(9,"span"),p(10,16),i(),d(11),I(12,"relativeTime"),i(),o(13,"p")(14,"span"),p(15,17),i(),S(16,fn,2,4)(17,$n,2,0,"ng-container"),i(),o(18,"p")(19,"span"),p(20,18),i(),S(21,Dn,2,3)(22,In,2,0,"ng-container"),i(),o(23,"p")(24,"span"),p(25,19),i(),S(26,An,2,3)(27,Rn,2,0,"ng-container"),i()(),o(28,"spk-chip",65),p(29,20),i(),o(30,"div",55),P(31,Hn,1,0,"ng-container",66),i()()),n&2){let e=t.$implicit,a=F(4),r=W(51);l(3),O(" ",(e.Backup==null?null:e.Backup.Name)??a.MISSING_BACKUP_NAME," "),l(3),ze(a.getBackendIcon(e.Backup==null?null:e.Backup.TargetURL)),l(),O(" ",a.getBackendType(e.Backup==null?null:e.Backup.TargetURL)," "),l(4),O(" ",b(12,11,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDate,a.timeType()==="actual")," "),l(5),E(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDuration?16:17),l(5),E(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.SourceFilesSize?21:22),l(5),E(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.TargetFilesSize?26:27);let c=a.getBackupVersionCount(e);l(3),y(c)(c),L(29),l(2),T("ngTemplateOutlet",r)("ngTemplateOutletContext",$(14,Fn,e))}}function Ln(n,t){if(n&1&&K(0,yn,32,16,"div",64,V),n&2){let e=F(3);U(e.backups())}}function xn(n,t){n&1&&(M(0),p(1,24),m())}function Bn(n,t){if(n&1&&(o(0,"div",62),S(1,Ln,2,0)(2,xn,2,0,"ng-container"),i()),n&2){let e=F(2);l(),E(e.backups().length?1:2)}}function Gn(n,t){n&1&&(s(0,25,1),D(1),u())}function bn(n,t){n&1&&(s(0,26,1),D(1),u())}function vn(n,t){n&1&&(s(0,27,1),D(1),u())}function hn(n,t){n&1&&(s(0,28,1),D(1),u())}function Xn(n,t){n&1&&(s(0,29,1),D(1),u())}function wn(n,t){n&1&&(s(0,30,1),D(1),u())}function zn(n,t){if(n&1&&(d(0),I(1,"relativeTime")),n&2){let e=F().$implicit,a=F(3);O(" ",b(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDate,a.timeType()==="actual")," ")}}function Vn(n,t){n&1&&(M(0),p(1,34),m())}function Kn(n,t){if(n&1&&(d(0),I(1,"durationFormat")),n&2){let e=F().$implicit,a=F(3);O(" ",b(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration,a.timeType()==="actual")," ")}}function Un(n,t){n&1&&(M(0),p(1,35),m())}function Wn(n,t){if(n&1&&(d(0),I(1,"bytes")),n&2){let e=F().$implicit;O(" ",G(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function jn(n,t){n&1&&(M(0),p(1,36),m())}function qn(n,t){if(n&1&&(d(0),I(1,"bytes")),n&2){let e=F().$implicit;O(" ",G(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function Jn(n,t){n&1&&(M(0),p(1,37),m())}function Qn(n,t){n&1&&D(0)}function Yn(n,t){if(n&1&&(o(0,"tr")(1,"td"),d(2),i(),o(3,"td"),d(4),i(),o(5,"td"),S(6,zn,2,4)(7,Vn,2,0,"ng-container"),i(),o(8,"td"),S(9,Kn,2,4)(10,Un,2,0,"ng-container"),i(),o(11,"td"),S(12,Wn,2,3)(13,jn,2,0,"ng-container"),i(),o(14,"td"),S(15,qn,2,3)(16,Jn,2,0,"ng-container"),i(),o(17,"td")(18,"span"),p(19,33),i()(),o(20,"td"),P(21,Qn,1,0,"ng-container",66),i()()),n&2){let e=t.$implicit,a=F(3),r=W(51);l(2),O(" ",(e.Backup==null?null:e.Backup.Name)??a.MISSING_BACKUP_NAME," "),l(2),O(" ",a.getBackendType(e.Backup==null?null:e.Backup.TargetURL)," "),l(2),E(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDate?6:7),l(3),E(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDuration?9:10),l(3),E(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.SourceFilesSize?12:13),l(3),E(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.TargetFilesSize?15:16);let c=a.getBackupVersionCount(e);l(4),y(c)(c),L(19),l(2),T("ngTemplateOutlet",r)("ngTemplateOutletContext",$(10,Fn,e))}}function Zn(n,t){if(n&1){let e=B();o(0,"spk-table",67),Ue("sortByColumnChange",function(r){N(e);let c=F(2);return Ke(c.sortByColumn,r)||(c.sortByColumn=r),k(r)}),o(1,"tr",68)(2,"th",69),s(3,25),P(4,Gn,2,0,"ng-container",70),u(),i(),o(5,"th",71),s(6,26),P(7,bn,2,0,"ng-container",70),u(),i(),o(8,"th",72),s(9,27),P(10,vn,2,0,"ng-container",70),u(),i(),o(11,"th",73),s(12,28),P(13,hn,2,0,"ng-container",70),u(),i(),o(14,"th",74),s(15,29),P(16,Xn,2,0,"ng-container",70),u(),i(),o(17,"th",75),s(18,30),P(19,wn,2,0,"ng-container",70),u(),i(),o(20,"th"),p(21,31),i(),o(22,"th"),p(23,32),i()(),K(24,Yn,22,12,"tr",null,V),i()}if(n&2){let e=F(2),a=W(53);T("data",e.backups())("loading",e.backupsLoading()),Ve("sortByColumn",e.sortByColumn),l(4),T("ngTemplateOutlet",a),l(3),T("ngTemplateOutlet",a),l(3),T("ngTemplateOutlet",a),l(3),T("ngTemplateOutlet",a),l(3),T("ngTemplateOutlet",a),l(3),T("ngTemplateOutlet",a),l(5),U(e.backups())}}function et(n,t){if(n&1&&S(0,Bn,3,1,"div",62)(1,Zn,26,9,"spk-table",63),n&2){let e=F();E(e.viewMode()==="list"?0:e.viewMode()==="details"?1:-1)}}function nt(n,t){n&1&&(o(0,"div",76),g(1,"spk-progress-bar",77),o(2,"div",51)(3,"h3"),p(4,38),i()()())}function tt(n,t){n&1&&p(0,39,1)}function it(n,t){n&1&&(o(0,"spk-icon"),d(1,"check"),i())}function ot(n,t){n&1&&(o(0,"spk-icon"),d(1,"dots-three-vertical"),i())}function at(n,t){if(n&1){let e=B();o(0,"button",78),f("click",function(){let r=N(e).$implicit,c=F();return k(c.startBackup(r.Backup==null?null:r.Backup.ID))}),s(1,39),g(2,"spk-icon"),S(3,tt,1,0),u(),i(),o(4,"button",79)(5,"spk-icon"),d(6,"pencil-simple"),i()(),o(7,"spk-menu",80)(8,"button",52),S(9,it,2,0,"spk-icon")(10,ot,2,0,"spk-icon"),i(),M(11,60),o(12,"h3",81),d(13,"Operations"),i(),o(14,"button",82),s(15,40),g(16,"spk-icon"),u(),i(),o(17,"button",82),s(18,41),g(19,"spk-icon"),u(),i(),o(20,"button",82),s(21,42),g(22,"spk-icon"),u(),i(),g(23,"spk-divider"),o(24,"h3",81),d(25,"Advanced"),i(),o(26,"button",82),s(27,43),g(28,"spk-icon"),u(),i(),o(29,"button",57),f("click",function(){let r=N(e).$implicit,c=F();return k(c.verifyFiles(r.Backup==null?null:r.Backup.ID))}),s(30,44),g(31,"spk-icon"),u(),i(),o(32,"button",57),f("click",function(){let r=N(e).$implicit,c=F();return k(c.compressBackup(r.Backup==null?null:r.Backup.ID))}),s(33,45),g(34,"spk-icon"),u(),i(),o(35,"button",82),s(36,46),g(37,"spk-icon"),u(),i(),g(38,"spk-divider"),o(39,"h3",81),d(40,"Reporting"),i(),o(41,"button",82),s(42,47),g(43,"spk-icon"),u(),i(),o(44,"button",57),f("click",function(){let r=N(e).$implicit,c=F();return k(c.createErrorReport(r.Backup==null?null:r.Backup.ID))}),s(45,48),g(46,"spk-icon"),u(),i(),m(),i()}if(n&2){let e=t.$implicit,a=F();x("loader",a.startingBackup()===(e.Backup==null?null:e.Backup.ID)),l(3),E(a.viewMode()==="list"?3:-1),l(),T("routerLink",$(16,Cn,e.Backup==null?null:e.Backup.ID)),l(3),T("right",!0),l(),x("loader",a.loadingId()===(e.Backup==null?null:e.Backup.ID))("success",a.successId()===(e.Backup==null?null:e.Backup.ID)),l(),E(a.successId()===(e.Backup==null?null:e.Backup.ID)?9:10),l(5),T("routerLink",$(18,Sn,e.Backup==null?null:e.Backup.ID)),l(3),T("routerLink",$(20,En,e.Backup==null?null:e.Backup.ID)),l(3),T("routerLink",$(22,Mn,e.Backup==null?null:e.Backup.ID)),l(6),T("routerLink",$(24,mn,e.Backup==null?null:e.Backup.ID)),l(9),T("routerLink",$(26,On,e.Backup==null?null:e.Backup.ID)),l(6),T("routerLink",$(28,Nn,e.Backup==null?null:e.Backup.ID))}}function _t(n,t){n&1&&(o(0,"spk-icon",83),d(1,"funnel-simple"),i(),o(2,"spk-icon",84),d(3,"sort-ascending"),i(),o(4,"spk-icon",85),d(5,"sort-descending"),i())}var pn={file:{Display:$localize`Local`,Icon:null}},ee=class n{#n=z(an);#t=z(ln);#e=z(_n);MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;timeType=this.#e.timeType;viewMode=un("list","viewMode");sortByColumn=H(this.#e.orderBy());loadingId=H(null);successId=H(null);sortEffect=We(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}setOrderBy(t){this.#e.setOrderBy(t)}setTimeType(t){this.#e.setTimeType(t)}startBackup(t){this.#t.resumeDialogCheck(()=>this.#e.startBackup(t))}getBackendIcon(t){if(!t)return"";let e=t.split("://")[0],a=Z.find(c=>c.key===e);if(!a)return"database";let r=pn[a.key];return r?.Icon?r.Icon:"database"}getBackendType(t){if(!t)return"";let e=t.split("://")[0],a=Z.find(c=>c.key===e);if(!a)return"";let r=pn[a.key];if(r?.Display)return r.Display;if(a.key==="s3"){let c="http://null?"+t.split("?")[1],C=new URL(c).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[A,v]of Object.entries(rn))if(C.endsWith(A))return v}return a.displayName}getBackupVersionCount(t){return parseInt(t?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(t){this.loadingId.set(t),this.#n.postApiV1BackupByIdVerify({id:t}).pipe(w(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(t){this.loadingId.set(t),this.#n.postApiV1BackupByIdCompact({id:t}).pipe(w(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3)}})}createErrorReport(t){this.loadingId.set(t),this.#n.postApiV1BackupByIdCreatereport({id:t}).pipe(w(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=he({type:n,selectors:[["app-home"]],decls:54,vars:11,consts:()=>{let t;t=$localize`Backups`;let e;e=$localize`Backups are stored in the cloud and can be restored at any time.`;let a;a=$localize` Add ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let r;r=$localize`Restores`;let c;c=$localize`Restores allow you to restore your data from the cloud.`;let R;R=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let C;C=$localize`My backups`;let A;A=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:rows${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON: List `;let v;v=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SPK_ICON:list${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SPK_ICON: Details `;let ne;ne=$localize` Time: ${"\uFFFD#38\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#39\uFFFD"}:START_TAG_SPK_ICON:clock${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let te;te=$localize`Relative time`;let ie;ie=$localize`Actual time`;let oe;oe=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let ae;ae=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let _e;_e=$localize`Last successful backup:`;let le;le=$localize`Duration:`;let re;re=$localize`Source:`;let ce;ce=$localize`Destination:`;let h;h=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,h=q(h,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let se;se=$localize` ${h}:ICU@@6502601490918455200: `;let ue;ue=$localize`N/A`;let pe;pe=$localize`N/A`;let Fe;Fe=$localize`N/A`;let ge;ge=$localize`No backups founds`;let de;de=$localize` Backup ${"\uFFFD*4:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*4:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Te;Te=$localize` Type ${"\uFFFD*7:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*7:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ce;Ce=$localize` Last successful backup ${"\uFFFD*10:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*10:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Se;Se=$localize` Duration ${"\uFFFD*13:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*13:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ee;Ee=$localize` Source ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Me;Me=$localize` Destination ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let me;me=$localize`Version`;let Oe;Oe=$localize`Actions`;let X;X=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,X=q(X,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Ne;Ne=$localize` ${X}:ICU@@6502601490918455200: `;let ke;ke=$localize`N/A`;let Pe;Pe=$localize`N/A`;let fe;fe=$localize`N/A`;let $e;$e=$localize`N/A`;let De;De=$localize`Loading backups...`;let Ie;Ie=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let Ae;Ae=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore `;let Re;Re=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let He;He=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let ye;ye=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SPK_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SPK_ICON: Database `;let Le;Le=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON: Verify files `;let xe;xe=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SPK_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SPK_ICON: Compress now `;let Be;Be=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SPK_ICON: Commandline `;let Ge;Ge=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SPK_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SPK_ICON: Log `;let be;return be=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SPK_ICON:file-plus${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SPK_ICON: Create error report `,[["actions",""],["sortIcons",""],t,e,a,r,c,R,C,A,v,ne,te,ie,oe,ae,_e,le,re,ce,se,ue,pe,Fe,ge,de,Te,Ce,Se,Ee,Me,me,Oe,Ne,ke,Pe,fe,$e,De,Ie,Ae,Re,He,ye,Le,xe,Be,Ge,be,[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"],[1,"small"],["type","button",3,"click"],[1,"table-overview"],["type","button","spk-button","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backup"],[1,"simple","success"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["table-header",""],["spkSort","name"],[4,"ngTemplateOutlet"],["spkSort","type"],["spkSort","lastrun"],["spkSort","duration"],["spkSort","sourcesize"],["spkSort","destinationsize"],[1,"loading-list"],[1,"indeterminate","primary"],["spk-button","",3,"click"],["type","button","spk-button","",3,"routerLink"],[3,"right"],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(e,a){if(e&1){let r=B();g(0,"app-status-bar"),o(1,"section")(2,"header")(3,"spk-card",49),g(4,"img",50),o(5,"div",51)(6,"h3"),p(7,2),i(),o(8,"p"),p(9,3),i()(),o(10,"button",52),s(11,4),g(12,"spk-icon"),u(),i()(),o(13,"spk-card",49),g(14,"img",53),o(15,"div",51)(16,"h3"),p(17,5),i(),o(18,"p"),p(19,6),i()(),o(20,"button",52),s(21,7),g(22,"spk-icon"),u(),i()()(),o(23,"div",54)(24,"h2"),M(25),p(26,8),m(),o(27,"div",55)(28,"spk-button-group",56)(29,"button",57),f("click",function(){return N(r),k(a.viewMode.set("list"))}),s(30,9),g(31,"spk-icon"),u(),i(),o(32,"button",57),f("click",function(){return N(r),k(a.viewMode.set("details"))}),s(33,10),g(34,"spk-icon"),u(),i()(),o(35,"spk-menu",58)(36,"button",59),s(37,11),g(38,"strong")(39,"spk-icon"),u(),i(),M(40,60),o(41,"button",57),f("click",function(){return N(r),k(a.setTimeType("relative"))}),p(42,12),i(),o(43,"button",57),f("click",function(){return N(r),k(a.setTimeType("actual"))}),p(44,13),i(),m(),i(),S(45,Pn,8,1,"spk-menu",58),i()(),P(46,et,2,1)(47,nt,5,0),Xe(48,46,gn,null,47),i()(),P(50,at,47,30,"ng-template",null,0,Q)(52,_t,6,0,"ng-template",null,1,Q)}e&2&&(l(3),T("routerLink",J(9,dn)),l(10),T("routerLink",J(10,Tn)),l(16),x("active",a.viewMode()==="list"),l(3),x("active",a.viewMode()==="details"),l(7),y(a.timeType()),L(37),l(6),E(a.viewMode()==="list"?45:-1),l(3),we(!a.backupsLoading()))},dependencies:[je,cn,Qe,Je,Y,Ze,en,nn,qe],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;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.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-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) spk-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] spk-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] spk-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}"],changeDetection:0})};export{ee as default};
@@ -0,0 +1 @@
1
+ import{a as R}from"./chunk-FPLBURO5.js";import{a as w,n as D}from"./chunk-MHALSLG3.js";import"./chunk-FWVOVJCG.js";import{ea as b}from"./chunk-VKD4Y3YQ.js";import"./chunk-WIDMAJIO.js";import{Ab as u,Bb as M,Gc as A,Jb as P,Nb as k,Oa as l,Ob as s,X as O,Yb as C,Zb as E,_a as h,_b as S,ba as x,bc as a,ca as T,cc as N,db as m,la as _,pb as d,qb as f,sb as I,sc as p,tb as v,tc as F,ub as g,vb as c,wb as r,zc as $}from"./chunk-K6EZTPNQ.js";import"./chunk-EUDKD2JW.js";var V=e=>({children:e,level:0}),Y=e=>({$implicit:e}),j=(e,t)=>({children:e,level:t}),z=(e,t)=>t.id;function B(e,t){if(e&1&&(c(0,"spk-icon"),a(1,"caret-down"),r()),e&2){let n=s().$implicit;S("open",n.isOpen())}}function G(e,t){e&1&&(c(0,"spk-icon"),a(1,"dot"),r())}function U(e,t){e&1&&u(0)}function X(e,t){if(e&1&&m(0,U,1,0,"ng-container",3),e&2){let n=s().$implicit,o=s().$implicit;s();let i=C(3);g("ngTemplateOutlet",i)("ngTemplateOutletContext",p(5,Y,F(2,j,n.children,o.level+1)))}}function q(e,t){if(e&1){let n=M();c(0,"div",4,1),k("click",function(){let i=x(n).$implicit,L=s(2);return T(i.children.length>0&&L.toggleNode(i))}),d(2,B,2,2,"spk-icon",5)(3,G,2,0,"spk-icon"),c(4,"div",6),a(5),r()(),d(6,X,1,7,"ng-container")}if(e&2){let n=t.$implicit;S("cannot-toggle",n.children.length===0)("open",n.isOpen()),l(2),f(n.children.length>0?2:3),l(3),N(n.text),l(),f(n.isOpen()?6:-1)}}function H(e,t){if(e&1&&(c(0,"spk-list"),I(1,q,7,7,null,null,z),r()),e&2){let n=t.$implicit;E("padding-left",n.level*.25,"rem"),l(),v(n.children)}}function J(e,t){e&1&&u(0)}var y=class e{#e=O(R);treeStructure=A(()=>{let t=this.#e.systemInfo();return this.processObject(t,0)});toggleNode(t){t.isOpen.update(n=>!n)}processObject(t,n){let o=[];for(let i in t)typeof t[i]=="object"?o.push({id:i,text:i,children:this.processObject(t[i],n+1),level:n,isOpen:_(!1)}):o.push({id:i,text:`${i}: ${t[i]}`,children:[],level:n,isOpen:_(!1)});return o}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=h({type:e,selectors:[["app-server-settings"]],decls:5,vars:6,consts:()=>{let t;return t=$localize`System info`,[["recursiveTree",""],["treeNode",""],t,[4,"ngTemplateOutlet","ngTemplateOutletContext"],["action","",3,"click"],[3,"open"],[1,"text"]]},template:function(n,o){if(n&1&&(c(0,"h3"),P(1,2),r(),m(2,H,3,2,"ng-template",null,0,$)(4,J,1,0,"ng-container",3)),n&2){let i=C(3);l(4),g("ngTemplateOutlet",i)("ngTemplateOutletContext",p(4,Y,p(2,V,o.treeStructure())))}},dependencies:[D,w,b],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-icon[_ngcontent-%COMP%]{font-size:1rem}spk-list[_ngcontent-%COMP%]{padding:0}spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0}spk-list[_ngcontent-%COMP%] [action].cannot-toggle[_ngcontent-%COMP%]{cursor:initial}"],changeDetection:0})};export{y as default};
@@ -0,0 +1 @@
1
+ import{h as a,i as b}from"./chunk-3IRKJXHE.js";import"./chunk-KA4H3PM5.js";import"./chunk-FLMFEFKM.js";import"./chunk-WIJ3HW7I.js";import"./chunk-N334RUEQ.js";import"./chunk-K5AQUIEE.js";import"./chunk-WY2KPAVB.js";import"./chunk-3PYBMCOB.js";import"./chunk-RHW5QVAY.js";import"./chunk-FPLBURO5.js";import"./chunk-3KIPRGE2.js";import"./chunk-7LEXBIXG.js";import"./chunk-P4ZYFRD3.js";import"./chunk-MHALSLG3.js";import"./chunk-FWVOVJCG.js";import"./chunk-VKD4Y3YQ.js";import"./chunk-WIDMAJIO.js";import"./chunk-K6EZTPNQ.js";import"./chunk-EUDKD2JW.js";export{a as SCHEDULE_FIELD_DEFAULTS,b as default};
@@ -0,0 +1,3 @@
1
+ import{a as Ee}from"./chunk-TUOSYDUU.js";import{a as fe}from"./chunk-Q3ILJYED.js";import{l as P}from"./chunk-3IRKJXHE.js";import"./chunk-KA4H3PM5.js";import"./chunk-FLMFEFKM.js";import{a as Se}from"./chunk-WIJ3HW7I.js";import"./chunk-N334RUEQ.js";import"./chunk-K5AQUIEE.js";import{a as T}from"./chunk-WY2KPAVB.js";import{a as le}from"./chunk-4D2NUH5S.js";import"./chunk-XD26KCAE.js";import"./chunk-KQAO2YHR.js";import"./chunk-3PYBMCOB.js";import"./chunk-RHW5QVAY.js";import"./chunk-FPLBURO5.js";import"./chunk-JWFYA3TO.js";import{c as se,e as me,f as de,i as pe,m as _e,n as ce,o as ue,q as Ce,r as ge,s as Me,t as Ne}from"./chunk-3KIPRGE2.js";import"./chunk-UVLJAD66.js";import{b as q,d as Z,e as J}from"./chunk-7LEXBIXG.js";import"./chunk-P4ZYFRD3.js";import{a as Q,e as Y,g as ee,k as te,l as ne,p as oe,t as ie}from"./chunk-MHALSLG3.js";import{g as ae,h as re}from"./chunk-FWVOVJCG.js";import"./chunk-KV7SEZ24.js";import"./chunk-VKD4Y3YQ.js";import"./chunk-WIDMAJIO.js";import"./chunk-LQ2PCH6Q.js";import{Bb as v,Hb as M,Hc as H,Ib as N,Jb as c,Kb as G,Lb as x,Nb as U,Oa as m,Ob as f,X as _,_a as $,_b as K,ba as S,ca as E,gc as w,hc as X,ic as z,la as F,nc as V,pb as h,qb as b,qc as W,rb as B,rc as j,sb as R,tb as y,ub as C,vb as a,wb as o,xb as r,yb as A,zb as O}from"./chunk-K6EZTPNQ.js";import"./chunk-EUDKD2JW.js";var Fe=()=>[];function Ae(l,t){l&1&&r(0,"spk-progress-bar",12)}function Oe(l,t){if(l&1&&(a(0,"spk-form-field"),r(1,"input",32),o()),l&2){let e=t.$implicit,s=t.$index;m(),C("id",V("filter-",s))("formControl",e)}}function Te(l,t){if(l&1){let e=v();a(0,"form",13)(1,"spk-select",14)(2,"label",15),c(3,1),o(),r(4,"input",16),o(),a(5,"spk-form-field")(6,"label",17),c(7,2),o(),r(8,"textarea",18),o(),a(9,"spk-form-field")(10,"label",19),c(11,3),o(),r(12,"textarea",20),o()(),a(13,"spk-divider"),c(14,4),o(),a(15,"form",13)(16,"spk-form-field")(17,"label",21),c(18,5),o(),r(19,"input",22),o(),a(20,"spk-form-field")(21,"label",23),c(22,6),o(),r(23,"input",24),o(),a(24,"app-toggle-card",25),A(25,26),c(26,7),O(),A(27,27),R(28,Oe,2,3,"spk-form-field",null,B),O(),o()(),a(30,"p"),M(31,8),r(32,"a",28),N(),o(),a(33,"app-options-list",29),z("optionsChange",function(i){S(e);let u=f();return X(u.settings,i)||(u.settings=i),E(i)}),o(),a(34,"div",30)(35,"button",31),U("click",function(){S(e);let i=f();return E(i.submit())}),M(36,9),r(37,"spk-icon"),N(),o()()}if(l&2){let e=f();C("formGroup",e.baseCmdForm),m(),C("options",e.commandOptions()??j(10,Fe))("inlineSearch",!0),m(14),C("formGroup",e.standardFields),m(9),C("disallowToggle",!0),m(4),y(e.standardFields.controls.filters.controls),m(5),w("options",e.settings),C("hasFreeTextSettings",!0),m(2),K("loader",e.isSubmitting()),m(2),G(e.baseCmdForm.value.command),x(36)}}var d=new ge,Pe=["Bytes","KB","MB","GB","TB","PB"],I=class l{#e=_(P);#t=_(re);#n=_(Z);#o=_(q);#i=_(ae);#a=_(le);#s=_(Y);#r=T(this.#o.params);commandOptions=T(this.#i.getApiV1Commandline());sizeOptions=F(Pe);isSubmitting=F(!1);optionsFields=this.#e.optionsFields;standardFields=d.group({"backup-id":d.control(""),"backup-name":d.control(""),dbpath:d.control(""),filters:d.array([])});baseCmdForm=d.group({command:d.control("backup"),targetUrl:d.control(""),arguments:d.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#m=H(()=>{let t=this.#r()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#t.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup)),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),t.Filters&&t.Filters.length&&t.Filters.map(e=>{this.standardFields.controls.filters.push(d.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.#a.resumeDialogCheck(()=>this.#l())}#l(){this.isSubmitting.set(!0);let t=this.baseCmdForm.value,e=t.targetUrl??"",s=t.arguments?.split(`
2
+ `).filter(n=>n.length>0)??[],i=this.standardFields.value,u=i.filters??[],g=[t.command,e,...s,`--backup-name=${i["backup-name"]}`,`--dbpath=${i.dbpath}`,`--backup-id=${i["backup-id"]}`,...u.filter(n=>n).map(n=>n.startsWith("-")?`--exclude=${n?.slice(1)}`:`--include=${n}`),...this.#e.mapFormsToSettings(["backup-id","backup-name","dbpath"]).map(n=>n.Name.startsWith("--")?`${n.Name}=${n.Value}`:`--${n.Name}=${n.Value}`),"--disable-module=console-password-input"];this.#t.postApiV1Commandline({requestBody:g}).subscribe(n=>{n.Status==="OK"&&this.#n.navigate(["backup",this.backupId(),"commandline",n.ID])})}mapBaseCmdToForm(t){let e=t.TargetURL??null;e&&this.baseCmdForm.patchValue({targetUrl:e??"",arguments:t.Sources?.join(`
3
+ `)??""})}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=$({type:l,selectors:[["app-commandline"]],features:[W([P])],decls:8,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`Command`;let s;s=$localize`TargetUrl`;let i;i=$localize`Commandline Arguments`;let u;u=$localize`Advanced options`;let g;g=$localize`Backup ID`;let n;n=$localize`Backup Name`;let k;k=$localize`Filters`;let D;D=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#32\uFFFD"}:START_LINK:Read more${"\uFFFD/#32\uFFFD"}:CLOSE_LINK:`;let L;return L=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SPK_ICON: Run "${"\uFFFD0\uFFFD"}:INTERPOLATION:" command now `,[t,e,s,i,u,g,n,k,D,L,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"indeterminate","primary"],[3,"formGroup"],["placeholder","Select a command...",3,"options","inlineSearch"],["for","command"],["type","text","id","command","formControlName","command"],["for","targetUrl"],["id","targetUrl","autocomplete","off","formControlName","targetUrl"],["for","arguments"],["id","arguments","autocomplete","off","formControlName","arguments"],["for","backup-id"],["id","backup-id","formControlName","backup-id"],["for","backup-name"],["id","backup-name","formControlName","backup-name"],[3,"disallowToggle"],["title",""],["content","","formGroupName","filters"],["href","#",1,"spk-primary"],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["spk-button","",1,"raised","primary",3,"click"],[3,"id","formControl"]]},template:function(e,s){e&1&&(r(0,"app-status-bar"),a(1,"section")(2,"div",10)(3,"button",11),M(4,0),r(5,"spk-icon"),N(),o()(),h(6,Ae,1,0,"spk-progress-bar",12)(7,Te,38,11),o()),e&2&&(m(6),b(s.finishedLoading()?7:6))},dependencies:[Me,pe,se,me,de,fe,Ee,Se,Ne,_e,ce,Ce,ue,J,ne,ee,te,ie,oe,Q],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;max-width:40rem;padding:2.5rem;gap:1.25rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}"],changeDetection:0})};export{I as default};
@@ -0,0 +1 @@
1
+ import{a,b}from"./chunk-EKZRKTLM.js";import"./chunk-FLMFEFKM.js";import"./chunk-WIJ3HW7I.js";import"./chunk-WY2KPAVB.js";import"./chunk-3PYBMCOB.js";import"./chunk-FPLBURO5.js";import"./chunk-3KIPRGE2.js";import"./chunk-7LEXBIXG.js";import"./chunk-P4ZYFRD3.js";import"./chunk-MHALSLG3.js";import"./chunk-FWVOVJCG.js";import"./chunk-VKD4Y3YQ.js";import"./chunk-WIDMAJIO.js";import"./chunk-K6EZTPNQ.js";import"./chunk-EUDKD2JW.js";export{a as createRestoreOptionsForm,b as default};
@@ -0,0 +1 @@
1
+ import{a as se,b as _e}from"./chunk-KA4H3PM5.js";import{a as pe}from"./chunk-FLMFEFKM.js";import{a as te}from"./chunk-FPLBURO5.js";import{b as ne,c as ie,e as oe,h as re,j as le,s as ae}from"./chunk-3KIPRGE2.js";import{A as Z,C as ee,a as q,g as H,l as J,o as Q,t as W,z as Y}from"./chunk-MHALSLG3.js";import{ea as j}from"./chunk-VKD4Y3YQ.js";import{Ab as T,Bb as C,Gc as B,Hb as $,Ib as b,Jb as K,Mc as N,Nb as g,Oa as l,Ob as p,Pc as X,X as G,Yb as x,_a as z,_b as A,ba as d,bc as m,ca as u,cc as D,db as f,dc as k,jc as U,kc as R,la as E,lc as S,pb as O,qb as F,rb as V,sb as I,tb as L,ub as _,vb as a,wb as s,xb as h,yb as v,zb as M,zc as P}from"./chunk-K6EZTPNQ.js";import{a as w,b as y}from"./chunk-EUDKD2JW.js";function de(t,o){if(t&1){let e=C();a(0,"button",14),g("click",function(){d(e);let n=p();return u(n.addFreeTextSetting())}),$(1,6),h(2,"spk-icon"),b(),s()}}function ue(t,o){if(t&1){let e=C();a(0,"button",16,0),g("click",function(){let n=d(e).$implicit,r=p(2);return u(r.addSetting(n))}),m(2),s()}if(t&2){let e=o.$implicit;A("deprecated",e.deprecatedDescription),l(2),k(" ",e.name," ")}}function ge(t,o){if(t&1&&(a(0,"h3",8),m(1),s(),I(2,ue,3,3,"button",15,V)),t&2){let e=o.$implicit;l(),D(e.displayName),l(),L(e.options)}}function Ce(t,o){t&1&&(a(0,"div",13),m(1,"Add a setting above to get started."),s())}function fe(t,o){t&1&&(a(0,"spk-icon",24),m(1," warning-octagon "),s())}function xe(t,o){if(t&1&&(a(0,"spk-icon",25),m(1,"archive"),s()),t&2){let e=p(2).$implicit;_("spkTooltip",e.FormView.deprecatedDescription)}}function Se(t,o){if(t&1&&(a(0,"spk-icon",26),m(1,"question"),s()),t&2){let e=p(2).$implicit;_("spkTooltip",e.FormView.longDescription)}}function Te(t,o){if(t&1&&(O(0,fe,2,0,"spk-icon",24),a(1,"span"),m(2),s(),O(3,xe,2,1,"spk-icon",25)(4,Se,2,1,"spk-icon",26)),t&2){let e=p().$implicit,i=S(1);F(i?0:-1),l(),A("deprecated",e.FormView.deprecatedDescription),l(),D(e.FormView.shortDescription),l(),F(e.FormView.deprecatedDescription?3:e.FormView.longDescription?4:-1)}}function Oe(t,o){t&1&&T(0)}function Fe(t,o){if(t&1){let e=C();a(0,"div",18)(1,"label"),f(2,Oe,1,0,"ng-container",27),s(),a(3,"div",28)(4,"spk-form-field")(5,"input",29),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateFreeTextSettingName(r,n))}),s(),a(6,"spk-icon",30),m(7,"rectangle-dashed"),s()(),a(8,"spk-form-field")(9,"input",29),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s(),a(10,"spk-icon",30),m(11,"textbox"),s()()()()}if(t&2){let e=p().$implicit,i=x(3);l(2),_("ngTemplateOutlet",i),l(3),_("ngModel",e.Name),l(4),_("ngModel",e.Value())}}function we(t,o){t&1&&T(0)}function ye(t,o){if(t&1){let e=C();a(0,"app-file-tree",19)(1,"label",31),f(2,we,1,0,"ng-container",27),s(),a(3,"input",32),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s()()}if(t&2){let e=p().$implicit,i=x(3),n=S(0);_("startingPath",e.Value())("accepts",e.FormView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),_("for",n),l(),_("ngTemplateOutlet",i),l(),_("id",n)("ngModel",e.Value())}}function Ve(t,o){if(t&1){let e=C();a(0,"app-file-tree",20),h(1,"label",31),a(2,"input",32),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s()()}if(t&2){let e=p().$implicit,i=S(0);_("startingPath",e.Value()),l(),_("for",i),l(),_("id",i)("ngModel",e.Value())}}function Ie(t,o){t&1&&T(0)}function Le(t,o){t&1&&(a(0,"spk-icon",30),m(1,"link"),s())}function he(t,o){t&1&&(a(0,"spk-icon",30),m(1,"textbox"),s())}function Me(t,o){if(t&1){let e=C();a(0,"spk-form-field")(1,"label",31),f(2,Ie,1,0,"ng-container",27),s(),a(3,"input",32),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s(),O(4,Le,2,0,"spk-icon",30)(5,he,2,0,"spk-icon",30),s()}if(t&2){let e=p().$implicit,i=x(3),n=S(0);l(),_("for",n),l(),_("ngTemplateOutlet",i),l(),_("id",n)("ngModel",e.Value()),l(),F(e.FormView.type==="Path"?4:5)}}function ke(t,o){t&1&&T(0)}function Pe(t,o){if(t&1){let e=C();a(0,"spk-icon",35),g("click",function(){d(e);let n=p(2).$implicit;return u(n.showPassword=!n.showPassword)}),m(1," eye "),s()}}function Ne(t,o){if(t&1){let e=C();a(0,"spk-icon",35),g("click",function(){d(e);let n=p(2).$implicit;return u(n.showPassword=!n.showPassword)}),m(1," eye-slash "),s()}}function Ee(t,o){if(t&1){let e=C();a(0,"spk-form-field")(1,"label",31),f(2,ke,1,0,"ng-container",27),s(),a(3,"input",33),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s(),a(4,"spk-icon",30),m(5,"password"),s(),O(6,Pe,2,0,"spk-icon",34)(7,Ne,2,0,"spk-icon",34),s()}if(t&2){let e=p().$implicit,i=x(3),n=S(0);l(),_("for",n),l(),_("ngTemplateOutlet",i),l(),_("type",e.showPassword?"text":"password")("id",n)("ngModel",e.Value()),l(3),F(e.showPassword?6:7)}}function ve(t,o){t&1&&T(0)}function $e(t,o){if(t&1&&m(0),t&2){let e=o.$implicit;k(" ",e," ")}}function be(t,o){if(t&1){let e=C();a(0,"spk-select",36)(1,"label",31),f(2,ve,1,0,"ng-container",27),s(),a(3,"input",32),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s()(),f(4,$e,1,1,"ng-template",null,2,P)}if(t&2){let e=x(5),i=p().$implicit,n=x(3),r=S(0);_("options",i.FormView.options)("isClearable",!1)("optionTemplate",e),l(),_("for",r),l(),_("ngTemplateOutlet",n),l(),_("id",r)("ngModel",i.Value())}}function Ae(t,o){t&1&&T(0)}function De(t,o){if(t&1){let e=C();a(0,"app-size",37),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),a(1,"label",31),f(2,Ae,1,0,"ng-container",27),s()()}if(t&2){let e=p().$implicit,i=x(3),n=S(0);_("inputType",e.Name)("ngModel",e.Value())("customId",n),l(),_("for",n),l(),_("ngTemplateOutlet",i)}}function Re(t,o){t&1&&T(0)}function Be(t,o){if(t&1){let e=C();a(0,"spk-form-field")(1,"label",31),f(2,Re,1,0,"ng-container",27),s(),a(3,"input",38),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s(),a(4,"spk-icon",30),m(5,"numpad"),s()()}if(t&2){let e=p().$implicit,i=x(3),n=S(0);l(),_("for",n),l(),_("ngTemplateOutlet",i),l(),_("id",n)("ngModel",e.Value())}}function Ge(t,o){t&1&&T(0)}function ze(t,o){if(t&1){let e=C();a(0,"spk-toggle",22)(1,"label",31),f(2,Ge,1,0,"ng-container",27),s(),a(3,"input",39),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s()()}if(t&2){let e=p().$implicit,i=x(3),n=S(0);l(),_("for",n),l(),_("ngTemplateOutlet",i),l(),_("id",n)("ngModel",e.Value())}}function Ke(t,o){t&1&&T(0)}function Ue(t,o){if(t&1&&m(0),t&2){let e=o.$implicit;k(" ",e," ")}}function Xe(t,o){if(t&1){let e=C();a(0,"spk-select",40)(1,"label",31),f(2,Ke,1,0,"ng-container",27),s(),a(3,"input",41),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s()(),f(4,Ue,1,1,"ng-template",null,3,P)}if(t&2){let e=x(5),i=p().$implicit,n=x(3),r=S(0);_("options",i.FormView.options)("selectMultiple",!0)("optionTemplate",e),l(),_("for",r),l(),_("ngTemplateOutlet",n),l(),_("ngModel",i.Value())}}function je(t,o){t&1&&T(0)}function qe(t,o){if(t&1){let e=C();a(0,"app-timespan",37),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),a(1,"label",31),f(2,je,1,0,"ng-container",27),s()()}if(t&2){let e=p().$implicit,i=x(3),n=S(0);_("inputType",e.Name)("ngModel",e.Value())("customId",n),l(),_("for",n),l(),_("ngTemplateOutlet",i)}}function He(t,o){if(t&1){let e=C();U(0)(1),f(2,Te,5,5,"ng-template",null,1,P),a(4,"div",17),O(5,Fe,12,3,"div",18)(6,ye,4,9,"app-file-tree",19)(7,Ve,3,4,"app-file-tree",20)(8,Me,6,5,"spk-form-field")(9,Ee,8,6,"spk-form-field")(10,be,6,7)(11,De,3,5,"app-size",21)(12,Be,6,4,"spk-form-field")(13,ze,4,4,"spk-toggle",22)(14,Xe,6,6)(15,qe,3,5,"app-timespan",21),a(16,"button",23),g("click",function(){let n=d(e).$implicit,r=p();return u(r.removeSetting(n))}),a(17,"spk-icon"),m(18,"x-bold"),s()()()}if(t&2){let e=o.$implicit,i=o.$index,n=p();R("destination-"+e.Name+i),l(),R(n.inAppOptions(e.Name)),l(4),F(e.FormView.type==="FreeText"?5:e.FormView.type==="FileTree"?6:e.FormView.type==="FolderTree"?7:e.FormView.type==="String"||e.FormView.type==="Path"||e.FormView.type==="Decimal"?8:e.FormView.type==="Password"?9:e.FormView.type==="Enumeration"?10:e.FormView.type==="Size"?11:e.FormView.type==="Integer"?12:e.FormView.type==="Boolean"?13:e.FormView.type==="Flags"?14:e.FormView.type==="Timespan"||e.FormView.type==="DateTime"?15:-1)}}var ce=class t{#e=G(te);options=X.required();hiddenOptions=N([]);hasFreeTextSettings=N(!1);applicationOptions=N();allOptionsGrouped=this.#e.allOptionsGrouped;allOptions=this.#e.allOptions;selectedSettings=B(()=>{let o=this.hiddenOptions();return this.options().map(n=>{let r=this.allOptions().find(me=>me.name===n.Name?.replace("--","")),c=n.Value??"";return r&&!o.includes(r.name)?(r.type==="Boolean"&&(c=c&&c.toLowerCase()==="true"||!1),r.type==="Integer"&&(c=parseInt(c)||0),y(w({},n),{Value:E(c),FormView:r})):this.hasFreeTextSettings()?y(w({},n),{Value:E(c),FormView:{name:n.Name,type:"FreeText",shortDescription:"Custom settings argument",longDescription:"Custom settings argument"}}):null}).filter(n=>n!==null)});nonSelectedOptionsGrouped=B(()=>{let o=this.options().map(i=>i.Name),e=this.hiddenOptions();return this.allOptionsGrouped().map(i=>y(w({},i),{options:i.options.filter(n=>!o.includes(n.name)&&!e.includes(n.name))})).filter(i=>i.options.length>0)});inAppOptions(o){let e=this.applicationOptions()?.findIndex(i=>i.Name?.replace("--","")===o);return e===void 0?!1:e>-1}addFreeTextSetting(){this.hasFreeTextSettings()&&this.options.update(o=>[...o,{Filter:null,Name:"",Value:""}])}addSetting(o){this.options.update(e=>{let i=o.defaultValue??"";return o.type==="Boolean"&&(i=i.toLowerCase()==="true"||!1),o.type==="Integer"&&(i=parseInt(i)||0),[...e,{Name:o.name,Value:i}]})}updateSettingValue(o,e){this.options.update(i=>{let n=[...i],r=n.findIndex(c=>c.Name===o.Name);return o.FormView.type==="Boolean"?(n[r].Value=e?"True":"False",n):o.FormView.type==="Integer"?(n[r].Value=e.toString(),n):(n[r].Value=e,n)})}updateFreeTextSettingName(o,e){this.options.update(i=>{let n=[...i],r=n.findIndex(c=>c.Name===o.Name);return n[r].Name=e,n})}removeSetting(o){this.options.update(e=>e.filter(i=>i.Name!==o.Name))}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=z({type:t,selectors:[["app-options-list"]],inputs:{options:[1,"options"],hiddenOptions:[1,"hiddenOptions"],hasFreeTextSettings:[1,"hasFreeTextSettings"],applicationOptions:[1,"applicationOptions"]},outputs:{options:"optionsChange"},decls:16,vars:4,consts:()=>{let o;o=$localize`Advanced options`;let e;e=$localize` Add advanced option ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let i;i=$localize` New custom option ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:pen${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let n;return n=$localize`By adding this option it will override the matching global option`,[["option",""],["defaultLabel",""],["enumOptionTemplate",""],["optionTemplate",""],o,e,i,[3,"disallowToggle"],["title",""],[1,"actions"],["spk-button","","type","button",1,"outlined","small"],[3,"searchable"],["menu",""],[1,"placeholder"],["spk-button","","type","button",1,"outlined","small",3,"click"],["type","button",3,"deprecated"],["type","button",3,"click"],[1,"field-row"],[1,"form-column"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[3,"inputType","ngModel","customId"],[1,"primary","raised"],["spk-button","","type","button",1,"outlined","remove-btn",3,"click"],["spkTooltip",n,1,"error"],[1,"warning",3,"spkTooltip"],[1,"primary",3,"spkTooltip"],[4,"ngTemplateOutlet"],[1,"form-row"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[3,"for"],["type","text",3,"ngModelChange","id","ngModel"],["autocomplete","off",3,"ngModelChange","type","id","ngModel"],["suffix","",1,"clickable"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[3,"ngModelChange","inputType","ngModel","customId"],["type","number",3,"ngModelChange","id","ngModel"],["type","checkbox",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"ngModelChange","ngModel"]]},template:function(e,i){e&1&&(a(0,"spk-toggle-card",7),v(1,8)(2),K(3,4),M(),a(4,"div",9),O(5,de,3,0,"button",10),a(6,"spk-menu",11)(7,"button",10),$(8,5),h(9,"spk-icon"),b(),s(),v(10,12),I(11,ge,4,1,null,null,V),M(),s()(),M(),O(13,Ce,2,0,"div",13),I(14,He,19,3,null,null,V),s()),e&2&&(_("disallowToggle",!0),l(5),F(i.hasFreeTextSettings()?5:-1),l(),_("searchable",!0),l(5),L(i.nonSelectedOptionsGrouped()),l(2),F(i.selectedSettings().length===0?13:-1),l(),L(i.selectedSettings()))},dependencies:[ae,ie,le,ne,oe,re,pe,Y,J,H,Q,ee,q,W,Z,se,_e,j],styles:["[_nghost-%COMP%]{display:block}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}spk-toggle[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.placeholder[_ngcontent-%COMP%]{color:var(--base-9);text-align:center;padding:2rem 1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-end}.form-column[_ngcontent-%COMP%]{display:flex;gap:.25rem;flex-direction:column}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}spk-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end}.deprecated[_ngcontent-%COMP%]{text-decoration:line-through}"],changeDetection:0})};export{ce as a};
@@ -0,0 +1,2 @@
1
+ import{a as w,g as U,x as z}from"./chunk-MHALSLG3.js";import{h as X}from"./chunk-FWVOVJCG.js";import{la as y}from"./chunk-VKD4Y3YQ.js";import"./chunk-WIDMAJIO.js";import{Bb as M,F as k,Hb as N,Hc as v,Ib as B,Jb as _,Nb as F,Oa as l,Ob as p,X as G,Zb as I,_a as $,_b as h,ba as S,bc as d,ca as u,cc as g,la as r,pb as O,qb as f,rb as T,sb as E,tb as C,ub as L,vb as i,vc as x,wb as a,xb as b,xc as A}from"./chunk-K6EZTPNQ.js";import{a as P,b as R}from"./chunk-EUDKD2JW.js";function V(o,e){if(o&1&&(i(0,"li"),d(1),a()),o&2){let t=e.$implicit;l(),g(t)}}function K(o,e){if(o&1&&(i(0,"tr")(1,"td",12)(2,"code")(3,"ol",13),E(4,V,2,1,"li",null,T),a()()()()),o&2){let t=p().$implicit,n=p();l(),I("grid-column","1 / -1")("height","auto"),l(3),C(n.breakIntoLines(t.Exception))}}function j(o,e){if(o&1){let t=M();i(0,"tr",9),F("click",function(){let s=S(t).$index,c=p();return u(c.toggleRow(s))}),i(1,"td"),d(2),x(3,"date"),a(),i(4,"td",10),d(5),a(),i(6,"td"),d(7),a(),i(8,"td")(9,"button",11)(10,"spk-icon"),d(11,"caret-down"),a()()()(),O(12,K,6,4,"tr")}if(o&2){let t=e.$implicit,n=e.$index,s=p();l(2),g(A(3,6,t.Timestamp,"MMM dd. hh:mm")),l(3),g(t.BackupID>=0?t.BackupID:"-"),l(2),g(t.Message),l(2),h("rotated-icon",n===s.openRowIndex()),l(3),f(n===s.openRowIndex()?12:-1)}}function q(o,e){o&1&&_(0,4,1)}function H(o,e){o&1&&_(0,4,2)}var J=["BackupID","Timestamp","Message","actions"],D=class o{#e=G(X);displayedColumns=r(J);openRowIndex=r(null);noMoreItems=r(!1);logsIsLoading=r(!1);logs=r([]);pagination=r({offsetTime:void 0,pagesize:10});paginationEffect=v(()=>{let e=this.pagination();this.getLogs()});ngOnInit(){this.getLogs()}getLogs(){this.logsIsLoading.set(!0);let e=this.pagination();this.#e.getApiV1LogdataLog({pagesize:e.pagesize,offset:e.offsetTime}).pipe(k(()=>this.logsIsLoading.set(!1))).subscribe({next:t=>{t.length===0&&this.noMoreItems.set(!0),this.logs.update(n=>[...n,...t])}})}toggleRow(e){this.openRowIndex.set(e===this.openRowIndex()?null:e)}breakIntoLines(e){return e?e.split(`
2
+ `):[]}loadMore(){let e=this.logs().at(-1)?.Timestamp;this.pagination.update(t=>R(P({},t),{offsetTime:e}))}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=$({type:o,selectors:[["app-logs-stored"]],decls:18,vars:6,consts:()=>{let e;e=$localize`Timestamp`;let t;t=$localize`Backup ID`;let n;n=$localize`Message`;let s;s=$localize`No data available`;let c;return c=$localize`${"\uFFFD*16:1\uFFFD"}:START_BLOCK_IF: No more items ${"\uFFFD/*16:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*17:2\uFFFD"}:START_BLOCK_ELSE: Load more ${"\uFFFD/*17:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,[e,t,n,s,c,[1,"type-b",3,"data","loading"],["table-header",""],["table-no-rows",""],["spk-button","",1,"primary","raised",3,"click","disabled"],[3,"click"],[1,"id"],["spk-button","","type","button",1,"outlined","small"],[2,"white-space","pre-wrap"],[1,"line-numbers-ol"]]},template:function(t,n){if(t&1){let s=M();i(0,"spk-table",5)(1,"tr",6)(2,"th"),_(3,0),a(),i(4,"th"),_(5,1),a(),i(6,"th"),_(7,2),a(),b(8,"th"),a(),E(9,j,13,9,null,null,T),i(11,"div",7),_(12,3),a()(),i(13,"footer")(14,"button",8),F("click",function(){return S(s),u(n.loadMore())}),N(15,4),O(16,q,1,0)(17,H,1,0),B(),a()()}if(t&2){let s=n.logs();I("grid-template-columns","1fr 1fr 1fr auto"),L("data",s)("loading",n.logsIsLoading()),l(9),C(s),l(5),L("disabled",n.logsIsLoading()||n.noMoreItems()),l(2),f(n.noMoreItems()?16:17)}},dependencies:[z,y,w,U],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}spk-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 0 0}"],changeDetection:0})};export{D as default};
@@ -0,0 +1 @@
1
+ import{e as a,f as b,g as c}from"./chunk-3IRKJXHE.js";import"./chunk-KA4H3PM5.js";import"./chunk-FLMFEFKM.js";import"./chunk-WIJ3HW7I.js";import"./chunk-N334RUEQ.js";import"./chunk-K5AQUIEE.js";import"./chunk-WY2KPAVB.js";import"./chunk-3PYBMCOB.js";import"./chunk-RHW5QVAY.js";import"./chunk-FPLBURO5.js";import"./chunk-3KIPRGE2.js";import"./chunk-7LEXBIXG.js";import"./chunk-P4ZYFRD3.js";import"./chunk-MHALSLG3.js";import"./chunk-FWVOVJCG.js";import"./chunk-VKD4Y3YQ.js";import"./chunk-WIDMAJIO.js";import"./chunk-K6EZTPNQ.js";import"./chunk-EUDKD2JW.js";export{b as NONE_OPTION,a as createGeneralForm,c as default};