@duplicati/ngclient 0.0.211 → 0.0.213

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 (134) hide show
  1. package/assets/sh.woff2 +0 -0
  2. package/{chunk-SUY5AQLW.js → chunk-22PELS6R.js} +1 -1
  3. package/{chunk-U3SGWHNI.js → chunk-2NLWVJNK.js} +1 -1
  4. package/{chunk-RFB5A3B7.js → chunk-35APLYI4.js} +1 -1
  5. package/{chunk-6FBNKISB.js → chunk-3IZWJV72.js} +1 -1
  6. package/chunk-3PUCEFO5.js +1 -0
  7. package/{chunk-LGILJ5LY.js → chunk-3XCT4PYH.js} +1 -1
  8. package/{chunk-DV7RWC4G.js → chunk-5FQ5SDPZ.js} +1 -1
  9. package/{chunk-ITA7DTN3.js → chunk-5L2OOKRZ.js} +1 -1
  10. package/chunk-5REJ6F23.js +1 -0
  11. package/chunk-7FDLOZXV.js +1 -0
  12. package/{chunk-SLS3DCJP.js → chunk-ADB5QRUO.js} +1 -1
  13. package/{chunk-C6RVYQ4M.js → chunk-AMSFSVKQ.js} +1 -1
  14. package/{chunk-IZCDGVXJ.js → chunk-APAWDC4O.js} +1 -1
  15. package/{chunk-I7HI454U.js → chunk-AZRNX5LU.js} +1 -1
  16. package/{chunk-OQ6BKP5N.js → chunk-BDQJFOCO.js} +1 -1
  17. package/{chunk-JTO22TJU.js → chunk-BLPTBPXV.js} +1 -1
  18. package/chunk-BME6TJIR.js +1 -0
  19. package/{chunk-NBTTYKXH.js → chunk-BRL4YYWO.js} +1 -1
  20. package/chunk-C5OIC3DB.js +1 -0
  21. package/chunk-CFJXIOSV.js +1 -0
  22. package/{chunk-ZY64T3CX.js → chunk-CQYKOCGO.js} +1 -1
  23. package/chunk-CW43F6WE.js +1 -0
  24. package/{chunk-WOZTK7S5.js → chunk-CYY7RVDE.js} +1 -1
  25. package/chunk-DFVPFPMV.js +11 -0
  26. package/{chunk-3KMV4PTJ.js → chunk-DTIGWCAE.js} +1 -1
  27. package/{chunk-LIDIFLHF.js → chunk-EGTYGTQI.js} +1 -1
  28. package/{chunk-X64LSE6Y.js → chunk-EQNDYV43.js} +1 -1
  29. package/chunk-EU6N52DH.js +1 -0
  30. package/{chunk-YIM56S4M.js → chunk-FMDSOHVR.js} +1 -1
  31. package/{chunk-VAQ435AR.js → chunk-FSHBOASN.js} +1 -1
  32. package/{chunk-VTFVTC7O.js → chunk-GE3DHZ5E.js} +1 -1
  33. package/chunk-GO22QPW4.js +1 -0
  34. package/{chunk-YQD4QIGG.js → chunk-HHDCI6IF.js} +1 -1
  35. package/chunk-I625OICV.js +1 -0
  36. package/chunk-IWDA6CMP.js +1 -0
  37. package/{chunk-Z772CHAB.js → chunk-J5TWEZOP.js} +1 -1
  38. package/chunk-J5VU6VA4.js +1 -0
  39. package/{chunk-BKQA64HZ.js → chunk-J6WVOYQ6.js} +1 -1
  40. package/chunk-JLSU6WKG.js +1 -0
  41. package/{chunk-KAZ3YMHR.js → chunk-JMLM4A3C.js} +1 -1
  42. package/{chunk-3ZCJK7PY.js → chunk-KHFOQETZ.js} +1 -1
  43. package/{chunk-BMWZYMK6.js → chunk-KHZ5AXGT.js} +1 -1
  44. package/chunk-KMGGFCBZ.js +1 -0
  45. package/chunk-L2QOWZDR.js +1 -0
  46. package/chunk-LOFKRPRH.js +1 -0
  47. package/{chunk-SA6PEMWL.js → chunk-LQKECNBH.js} +1 -1
  48. package/{chunk-HUJGWHH6.js → chunk-LU7TIW3P.js} +1 -1
  49. package/chunk-M5RTYP7N.js +2 -0
  50. package/{chunk-I4XRVBRQ.js → chunk-MRSBKQQM.js} +1 -1
  51. package/{chunk-MNK3XRJD.js → chunk-NBKLLQQO.js} +1 -1
  52. package/chunk-NCXKMSRH.js +1 -0
  53. package/{chunk-NXF5BMPG.js → chunk-OBF6ZSYT.js} +1 -1
  54. package/chunk-OO32MPRQ.js +1 -0
  55. package/{chunk-36J3WTHV.js → chunk-OZEGNE5W.js} +1 -1
  56. package/chunk-PBYZZEYM.js +1 -0
  57. package/{chunk-2LSZ2I43.js → chunk-QAQMMCTH.js} +1 -1
  58. package/{chunk-GROPRXXJ.js → chunk-QQLV7J6T.js} +1 -1
  59. package/{chunk-DGPSGSEP.js → chunk-QRLREAIK.js} +1 -1
  60. package/chunk-QUXPHHDZ.js +1 -0
  61. package/chunk-R5OX4JTJ.js +1 -0
  62. package/{chunk-BEXYTIOL.js → chunk-R6TFME5I.js} +1 -1
  63. package/{chunk-KQZRDX7C.js → chunk-S3FBC24H.js} +1 -1
  64. package/chunk-SGLY2D7Y.js +1 -0
  65. package/chunk-T2X5J6MQ.js +1 -0
  66. package/chunk-TGZAL6DJ.js +1 -0
  67. package/chunk-TJNL6F5S.js +1 -0
  68. package/{chunk-PSRISEFO.js → chunk-TPHRU6NP.js} +1 -1
  69. package/{chunk-NBPZDFGF.js → chunk-TZEOQBIX.js} +2 -2
  70. package/{chunk-GCFBX62M.js → chunk-U34FLIYL.js} +1 -1
  71. package/chunk-UE37PPYX.js +1 -0
  72. package/chunk-UH2E7MMT.js +4 -0
  73. package/chunk-V7UJAXBT.js +2 -0
  74. package/chunk-VCIINZCU.js +1 -0
  75. package/{chunk-3DFXRSFL.js → chunk-VDHWNNO7.js} +1 -1
  76. package/{chunk-3A4HTZ7B.js → chunk-VGBTP4QP.js} +1 -1
  77. package/{chunk-YIKPWYEP.js → chunk-VI7MBIGT.js} +1 -1
  78. package/{chunk-64W3VKAP.js → chunk-WALKMFYR.js} +1 -1
  79. package/{chunk-7HXPIZN6.js → chunk-WIE7KXIC.js} +1 -1
  80. package/{chunk-CCUGG5E4.js → chunk-XAYG4QT7.js} +1 -1
  81. package/{chunk-WBTDGQME.js → chunk-XCVBN7EK.js} +1 -1
  82. package/chunk-XZNYCTQB.js +1 -0
  83. package/chunk-Y3BYCXUX.js +1 -0
  84. package/{chunk-LJBFPDG2.js → chunk-YGHS3INE.js} +1 -1
  85. package/chunk-YHVGLFWL.js +1 -0
  86. package/{chunk-UY2WEUKC.js → chunk-YMUS7QSB.js} +1 -1
  87. package/chunk-YPWKWP5H.js +1 -0
  88. package/chunk-Z7CZCI7E.js +1 -0
  89. package/chunk-ZJOUYWI2.js +1 -0
  90. package/{chunk-COT66FJB.js → chunk-ZK3S23CJ.js} +1 -1
  91. package/{chunk-AYOFR344.js → chunk-ZXQSQRKN.js} +1 -1
  92. package/index.html +2 -2
  93. package/{main-4RMOPKNF.js → main-ZP6YWLCN.js} +1 -1
  94. package/package.json +1 -1
  95. package/ship-ui-assets/mcp/components.json +118 -47
  96. package/styles-43GHZ572.css +1 -0
  97. package/chunk-2DOT6WAE.js +0 -1
  98. package/chunk-2TGB7FK7.js +0 -1
  99. package/chunk-5MOLXRIQ.js +0 -1
  100. package/chunk-5N2VOOTZ.js +0 -11
  101. package/chunk-7FYL7MVA.js +0 -1
  102. package/chunk-A7BE7GAK.js +0 -1
  103. package/chunk-ANLSBAWJ.js +0 -1
  104. package/chunk-AXBVBB2B.js +0 -1
  105. package/chunk-BKEVAAWN.js +0 -1
  106. package/chunk-CJ5SZZQC.js +0 -1
  107. package/chunk-CVTB53TL.js +0 -1
  108. package/chunk-EGJL4XXZ.js +0 -1
  109. package/chunk-ERITO7WM.js +0 -4
  110. package/chunk-FCVVFGU2.js +0 -1
  111. package/chunk-FXZ3K2FU.js +0 -1
  112. package/chunk-G6ZV6LAU.js +0 -1
  113. package/chunk-GSDHTV3P.js +0 -1
  114. package/chunk-HDJL2F2F.js +0 -1
  115. package/chunk-IHB6NRMQ.js +0 -1
  116. package/chunk-IV3M3Q6B.js +0 -1
  117. package/chunk-KEHA3UWS.js +0 -1
  118. package/chunk-MI32HHLT.js +0 -1
  119. package/chunk-N35VE3MO.js +0 -1
  120. package/chunk-NDLPNBGE.js +0 -1
  121. package/chunk-NQIZGFSO.js +0 -1
  122. package/chunk-PAPOSE5G.js +0 -1
  123. package/chunk-Q72Y55NB.js +0 -1
  124. package/chunk-SP3KG7FO.js +0 -1
  125. package/chunk-SSUCTZ3H.js +0 -1
  126. package/chunk-UCR4I5MD.js +0 -1
  127. package/chunk-W4HWOC3K.js +0 -1
  128. package/chunk-WQVQC2MC.js +0 -2
  129. package/chunk-WSFAOFM3.js +0 -1
  130. package/chunk-XE42CXGY.js +0 -1
  131. package/chunk-XRSDTFDU.js +0 -2
  132. package/chunk-YCLTQEU6.js +0 -1
  133. package/chunk-ZVWTSTR6.js +0 -1
  134. package/styles-6WG7TD6T.css +0 -1
@@ -1,2 +1,2 @@
1
- import{d as O,r as M}from"./chunk-YCLTQEU6.js";import{d as B}from"./chunk-2LSZ2I43.js";import{E as N,Pc as w,U as L,Z as I,oa as z,p as f}from"./chunk-ERITO7WM.js";import{a,b as D}from"./chunk-7CGTOI24.js";var y=class{constructor(t){this.loader=t}_data=z(void 0);_isLoading=!1;_loaded=!1;load(){return!this._loaded&&!this._isLoading&&(this._isLoading=!0,this.loader().pipe(N(()=>this._isLoading=!1)).subscribe(t=>{this._data.set(t),this._loaded=!0})),this._data.asReadonly()}value(){return this._data.asReadonly()}isLoading(){return this._isLoading}isLoaded(){return this._loaded}reset(){this._data.set(void 0),this._loaded=!1}};var d=class e{#e=I(B);#o=new y(()=>this.getS3Config("Providers"));#n=new y(()=>this.getS3Config("Regions"));#r=new y(()=>this.getS3Config("RegionHosts"));#s=new y(()=>this.getS3Config("StorageClasses"));#i=w(()=>{let t=this.#o.value()(),o=this.#r.value()(),r=[...t??[],...o?.map(n=>({key:`Amazon ${n.key}`,value:n.value}))??[]];return Array.from(new Map(r.map(n=>[n.value,n])).values())});#a=new y(()=>this.getStorjConfig("Satellites"));#l=new y(()=>this.getStorjConfig("AuthenticationMethods"));#c=new y(()=>this.getOpenstackConfig("Providers"));#p=new y(()=>this.getOpenstackConfig("Versions"));#u=new y(()=>this.getGcsConfig("Locations"));#m=new y(()=>this.getGcsConfig("StorageClasses"));getS3AllProviders(){return this.#o.load(),this.#r.load(),this.#i}getS3ProvidersFiltered(t){return w(()=>this.getS3AllProviders()().filter(t))}getS3Providers(){return this.#o.load()}getS3Regions(){return this.#n.load()}getS3RegionHosts(){return this.#r.load()}getS3StorageClasses(){return this.#s.load()}getStorjSatellites(){return this.#a.load()}getStorjAuthenticationMethods(){return this.#l.load()}getOpenstackProviders(){return this.#c.load()}getOpenstackVersions(){return this.#p.load()}getGcsLocations(){return this.#u.load()}getGcsStorageClasses(){return this.#m.load()}getS3Config(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":t}}).pipe(f(o=>this.#t(o)))}createS3IamUser(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":t,"s3-password":o}})}createS3PolicyIAM(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:t}})}getStorjConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":t}}).pipe(f(o=>this.#t(o)))}getOpenstackConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":t}}).pipe(f(o=>this.#t(o)))}getGcsConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":t}}).pipe(f(o=>this.#t(o)))}#t(t){return(t.Result&&typeof t.Result=="object"&&Object.entries(t.Result).map(([o,r])=>({key:o,value:r})))??[]}getDuplicatiStorageBackups(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"duplicati-list-backups",requestBody:{action:"ListBackups",url:t}}).pipe(f(o=>this.#t(o)),f(o=>o.find(r=>r.key==="folders")?.value),f(o=>JSON.parse(o)))}getFilenApiKey(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"filen-get-api-key",requestBody:{"filen-operation":"GetApiKey","backup-id":o??"",url:t}}).pipe(f(r=>this.#t(r)),f(r=>r.find(n=>n.key==="api-key")?.value))}static \u0275fac=function(o){return new(o||e)};static \u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"})};var s=new M,p={type:"error",message:$localize`Using a leading slash is most likely wrong, and will result in objects being created with a leading slash in the name.`},U={description:$localize`Unknown destination type`,icon:"assets/dest-icons/file-system.png",isDefaultEntry:!0,customFields:{path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path`,formElement:e=>s.control(e??"")}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let n=o.startsWith(`${e}:///`)?o.split(`${e}:///`)[1]:o.split(`${e}://`)[1];return a({destinationType:e,custom:{path:n.split("?")[0]}},l(e,t))}}},F={key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,icon:"assets/dest-icons/s3compat.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3AllProviders(),isMandatory:!0,formElement:e=>s.control(e??"")},{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0},{name:"use-ssl"}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>z([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}]),validate:e=>({type:"warning",message:$localize`Invalid client selected`})}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},P=[{key:"file",displayName:$localize`File system`,description:$localize`Store backups on your local file system.`,icon:"assets/dest-icons/file-system.png",searchTerms:"local disk harddrive localdisk filesystem unc server share drive",sortOrder:100,customFields:{path:{type:"FolderTree",name:"path",doubleSlash:p,shortDescription:$localize`File path`,longDescription:$localize`The path to store the backup`,formElement:e=>s.control(e??""),isMandatory:!0}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let r=o.startsWith("file:///"),n=decodeURIComponent(r?o.split("file:///")[1]:o.split("file://")[1]),u=n.slice(1).startsWith(":\\")||n.slice(1).startsWith(":/")||n.startsWith("\\\\")?n:"/"+n;return a({destinationType:e,custom:{path:u.split("?")[0]}},l(e,t))}}},{key:"duplicati",displayName:$localize`Duplicati Storage`,description:$localize`Store backups with Duplicati Storage.`,icon:"assets/dest-icons/duplicati.png",searchTerms:"duplicati internal built-in",sortOrder:-2,dynamicFields:[{name:"duplicati-backup-id",type:"DuplicatiBackupId",isMandatory:!0,shortDescription:$localize`Unique Backup ID`,longDescription:$localize`A unique identifier for the backup job. It is recommended to not change this value.`}],mapper:{to:e=>c(e,null,null,null),from:(e,t,o)=>a({destinationType:e},l(e,t)),default:e=>e&&e.length>0?`duplicati://?duplicati-backup-id=${encodeURIComponent(e)}`:"duplicati://"}},{key:"ssh",displayName:$localize`SFTP (SSH)`,description:$localize`Store backups with SFTP (SSH).`,icon:"assets/dest-icons/ssh.png",searchTerms:"sftp scp secure shell",sortOrder:80,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`The server to connect to`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`The port to connect to`,formElement:e=>s.control(e??"",[O.required,O.max(65535)])},path:{type:"Path",name:"path",shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,longDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,longDescription:$localize`Password`}],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:$localize`This is a path to a private key file locally on the machine`,longDescription:$localize`This is a path to a private key file locally on the machine`},{type:"FreeText",name:"ssh-key",shortDescription:$localize`SSH private key`,longDescription:$localize`An SSH private key. Supported formats are OpenSSL, OpenSSH, PuTTY, and PEM.`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,icon:"assets/dest-icons/s3compat.png",searchTerms:"spaces cloud digitalocean cloudian minio linode bunnycdn oracle cloudflare alibaba huawei tencent baidu jd ucloud qiniu aliyun tcloud tencent ",sortOrder:90,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3AllProviders(),isMandatory:!0,formElement:e=>s.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>z([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"s3",customKey:"s3-aws",displayName:$localize`Amazon S3`,description:$localize`Store backups in Amazon S3.`,icon:"assets/dest-icons/aws.png",searchTerms:"amazon aws",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3ProvidersFiltered(t=>t.value.endsWith(".amazonaws.com")),isMandatory:!0,formElement:e=>s.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>z([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return e.dynamic["s3-server-name"]?.endsWith(".amazonaws.com")&&(e.destinationType="s3"),c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))},default:e=>"s3-aws://?use-ssl=true",intercept:e=>e.searchParams.get("s3-server-name")?.endsWith(".amazonaws.com")??!1}},{key:"gcs",displayName:$localize`Google Cloud Storage`,description:$localize`Store backups in Google Cloud Storage.`,icon:"assets/dest-icons/google-cloud.png",oauthField:"authid",searchTerms:"gcp googlecloud",sortOrder:70,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0,longDescription:$localize`An OAuth token with access to the Google Cloud Storage. Not required if service account JSON is provided.`}],advancedFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getGcsLocations()},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getGcsStorageClasses()},{name:"gcs-service-account-file",type:"FileTree",accepts:".json,",shortDescription:$localize`Service account JSON file`,longDescription:$localize`Pick the path to a file with service account JSON.`},{name:"gcs-service-account-json",type:"FreeText",shortDescription:$localize`Service account JSON`,longDescription:$localize`Paste the service account JSON here.`}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"googledrive",displayName:$localize`Google Drive`,description:$localize`Store backups in Google Drive.`,icon:"assets/dest-icons/google-drive.png",oauthField:"authid",searchTerms:"gdrive",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"pcloud",displayName:$localize`pCloud`,description:$localize`Store backups in pCloud.`,icon:"assets/dest-icons/pcloud.png",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>z([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",oauthVersion:2,isMandatory:!0}],mapper:{to:e=>{let{server:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return a({destinationType:e,custom:{server:r,path:n}},l(e,t))}}},{key:"azure",displayName:$localize`Azure Blob Storage`,description:$localize`Store backups in Azure Blob Storage.`,icon:"assets/dest-icons/azure.png",searchTerms:"microsoft ms",sortOrder:60,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Container name`,longDescription:$localize`Container name`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"onedrivev2",displayName:$localize`OneDrive`,description:$localize`Store backups in OneDrive.`,icon:"assets/dest-icons/one-drive.png",oauthField:"authid",searchTerms:"micorsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"od4b",displayName:$localize`OneDrive Business`,description:$localize`Store backups in OneDrive Business.`,icon:"assets/dest-icons/one-drive.png",searchTerms:"microsoft ms",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"mssp",displayName:$localize`Microsoft SharePoint`,description:$localize`Store backups in Microsoft SharePoint.`,icon:"assets/dest-icons/sharepoint.png",searchTerms:"microsoft ms",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"sharepoint",displayName:$localize`Microsoft SharePoint v2`,description:$localize`Store backups in Microsoft SharePoint.`,icon:"assets/dest-icons/sharepoint.png",oauthField:"authid",searchTerms:"microsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"site-id",isMandatory:!0},{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"dropbox",displayName:$localize`Dropbox`,description:$localize`Store backups in Dropbox.`,icon:"assets/dest-icons/dropbox.png",oauthField:"authid",searchTerms:"dbx",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"box",displayName:$localize`Box.com`,description:$localize`Store backups in Box.com.`,icon:"assets/dest-icons/box-com.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"jottacloud",displayName:$localize`Jottacloud`,description:$localize`Store backups in Jottacloud.`,icon:"assets/dest-icons/jottacloud.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"b2",displayName:$localize`B2 Cloud Storage`,description:$localize`Store backups in B2 Cloud Storage.`,icon:"assets/dest-icons/backblaze.png",searchTerms:"backblaze",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0,validate:e=>{function t(o){if(!o)return!1;let r=o.length;return!(r<6||r>63||!/^[a-zA-Z0-9.-]+$/.test(o)||!/^[a-zA-Z0-9]/.test(o)||!/[a-zA-Z0-9]$/.test(o)||/^\d{1,3}(\.\d{1,3}){3}$/.test(o)||/(\.\.)|(\.-)|(-\.)/.test(o)||o.toLowerCase().startsWith("b2-"))}return t(e)?null:{type:"error",message:$localize`Invalid bucket name.`}}},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Application ID`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Application Key`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"e2",displayName:$localize`IDrive e2`,description:$localize`Store backups in IDrive e2.`,icon:"assets/dest-icons/idrive-e2.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Access ID`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access Secret`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{bucket:r,path:n}},l(e,t))}}},{key:"mega",displayName:$localize`Mega.nz`,description:$localize`Store backups in Mega.nz.`,icon:"assets/dest-icons/mega-nz.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let t=e.custom.path;return c(e,null,null,t)},from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"msgroup",displayName:$localize`Microsoft Office 365 Group`,description:$localize`Store backups in Microsoft Office 365 Group.`,icon:"assets/dest-icons/office-365.png",oauthField:"authid",searchTerms:"ms",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:$localize`Group email`,longDescription:$localize`Group email`,formElement:e=>s.control(e??"",[O.email]),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"cloudfiles",displayName:$localize`Rackspace CloudFiles`,description:$localize`Store backups in Rackspace CloudFiles.`,icon:"assets/dest-icons/rackspace.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"rclone",displayName:$localize`Rclone`,description:$localize`Store backups in Rclone.`,icon:"assets/dest-icons/rclone.png",searchTerms:"rcl",dynamicFields:[{name:"rclone-local-repository",shortDescription:$localize`Local repository`,defaultValue:""},{name:"rclone-remote-repository",shortDescription:$localize`Remote repository`,defaultValue:""},{name:"rclone-remote-path",type:"Path",shortDescription:$localize`Path on remote repository`,defaultValue:""}],mapper:{to:e=>{let t=e.dynamic["rclone-remote-repository"],o=e.dynamic["rclone-remote-path"],r=Object.entries(e.dynamic).filter(([n])=>!["rclone-remote-repository","rclone-remote-path"].includes(n));return V(e.destinationType??"rclone",t,null,o,[...Object.entries(e.advanced??{}),...r])},from:(e,t,o)=>{let{advanced:r,dynamic:n}=l(e,t),{bucket:i,path:u}=m(t);return{destinationType:e,dynamic:a({"rclone-remote-repository":i,"rclone-remote-path":u},n),advanced:a({},r)}}}},{key:"openstack",displayName:$localize`OpenStack Object Storage`,description:$localize`Store backups in OpenStack Object Storage.`,icon:"assets/dest-icons/open-stack.png",searchTerms:"swift",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket`,longDescription:$localize`Bucket`,formElement:e=>s.control(e??""),isMandatory:!0}},dynamicFields:[{name:"openstack-authuri",shortDescription:$localize`Auth URI`,type:"Enumeration",loadOptions:e=>e.get(d).getOpenstackProviders(),isMandatory:!0},{name:"openstack-version",shortDescription:$localize`Version`,type:"Enumeration",loadOptions:e=>e.get(d).getOpenstackVersions()},{name:"openstack-domain-name",type:"Hostname",shortDescription:$localize`Domain name`},{name:"openstack-tenant-name",shortDescription:$localize`Tenant name`},{name:"openstack-region",shortDescription:$localize`Region`}],mapper:{to:e=>{let{bucket:t}=e.custom;return c(e,t,null,null)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"webdav",displayName:$localize`WebDAV`,description:$localize`Store backups in WebDAV.`,icon:"assets/dest-icons/webdav.png",searchTerms:"web dav",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`},{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"aftp",displayName:$localize`Alternative FTP`,description:$localize`Store backups in FTP.`,icon:"assets/dest-icons/ftp.png",searchTerms:"alt file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"ftp",displayName:$localize`FTP`,description:$localize`Store backups in FTP.`,icon:"assets/dest-icons/ftp.png",searchTerms:"file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"sia",displayName:$localize`Sia Decentrilized Cloud`,description:$localize`Store backups in Sia Decentrilized Cloud.`,icon:"assets/dest-icons/sia-cloud.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let t=e.custom.server,o=e.dynamic["sia-targetpath"],r=[...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([n])=>n!=="sia-targetpath")];return V(e.destinationType??"sia",t,null,o,r)},from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"cos",displayName:$localize`Tencent COS`,description:$localize`Store backups in Tencent COS.`,icon:"assets/dest-icons/tencent-cloud.png",customFields:{bucket:{name:"bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"cos-region",shortDescription:$localize`Region`},{name:"cos-app-id",shortDescription:$localize`COS App Id`,isMandatory:!0},{name:"cos-secret-id",shortDescription:$localize`COS Secret Id`,isMandatory:!0},{name:"cos-secret-key",shortDescription:$localize`COS Secret Key`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=D(a({},e),{advanced:D(a({},e.advanced),{"cos-bucket":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),n=r.advanced["cos-bucket"];return delete r.advanced["cos-bucket"],a({destinationType:e,custom:{path:h(t),bucket:n}},r)}}},{key:"tahoe",displayName:$localize`Tahoe LAFS`,description:$localize`Store backups in Tahoe LAFS.`,icon:"assets/dest-icons/tahoelafs.png",searchTerms:"least authority file system",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"smb",displayName:$localize`Windows Share (SMB)`,description:$localize`Store backups on SMB storage.`,icon:"assets/dest-icons/smb.png",searchTerms:"cifs samba",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},share:{type:"Hostname",name:"share",shortDescription:$localize`Share Name`,longDescription:$localize`Share Name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:["transport",{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0},"auth-domain"],mapper:{to:e=>{let{share:t,server:o,path:r}=e.custom;return c(e,o,null,E(t,r))},from:(e,t,o)=>{let{server:r,path:n}=m(t),i=n.split("/")[0],u=n.split("/").slice(1).join("/");return a({destinationType:e,custom:{server:r,share:i,path:u}},l(e,t))}}},{key:"cifs",displayName:$localize`CIFS (deprecated)`,description:$localize`Same as SMB backend, but with a different name. Use SMB instead.`,icon:"assets/dest-icons/smb.png",sortOrder:-1,mapper:U.mapper},{key:"filen",displayName:$localize`Filen.io`,description:$localize`Store backups in Filen.io.`,icon:"assets/dest-icons/filen.png",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filen`,longDescription:$localize`Path on Filen`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0},{name:"two-factor-code",type:"Filen2FACode"}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"filejump",displayName:$localize`Filejump`,description:$localize`Store backups in Filejump.`,icon:"assets/dest-icons/file-jump.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filejump`,longDescription:$localize`Path on Filejump`,formElement:e=>s.control(e??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:$localize`API Token`,longDescription:$localize`Filejump API Token`,formElement:e=>s.control(e??""),isMandatory:!0}],mapper:{to:e=>{let{path:t}=e.custom;return c(e,null,null,t)},from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"storj",customKey:"storjAccessGrant",displayName:$localize`Storj Access Grant`,description:$localize`Store backups in Storj Access Grant.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-shared-access",shortDescription:$localize`Access Grant`,isMandatory:!0},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p},{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getStorjSatellites(),isMandatory:!0}],mapper:{to:e=>{let t={"storj-auth-method":"Acccess grant"};return`storj://storj.io/config${b([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l(e,t);return delete r.advanced["storj-auth-method"],a({destinationType:e},r)},intercept:e=>e.protocol!=="storj:"?!1:!!(e.searchParams.get("storj-shared-access")||e.searchParams.get("storj-auth-method")==="Acccess grant"),default:()=>"storj://?storj-shared-access=&storj-auth-method=Acccess+grant"}},{key:"storj",customKey:"storjApiKey",displayName:$localize`Storj API Key`,description:$localize`Store backups in Storj API Key.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getStorjSatellites(),isMandatory:!0},{name:"storj-api-key",shortDescription:$localize`API Key`,isMandatory:!0},{name:"storj-secret",shortDescription:$localize`Secret`,isMandatory:!0},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p}],mapper:{to:e=>{let t={"storj-auth-method":"API key"};return`storj://storj.io/config${b([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l("storjApiKey",t);return delete r.advanced["storj-auth-method"],a({destinationType:e},r)},intercept:e=>e.protocol!=="storj:"?!1:!!(e.searchParams.get("storj-api-key")||e.searchParams.get("storj-secret")||e.searchParams.get("storj-auth-method")==="API key"),default:()=>"storj://?storj-api-key=&storj-secret=&storj-auth-method=API+key"}},{key:"aliyunoss",displayName:$localize`Aliyun OSS`,description:$localize`Store backups in Aliyun OSS`,icon:"assets/dest-icons/aliyun.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in bucket`,longDescription:$localize`Path in bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"oss-endpoint",isMandatory:!0},{name:"oss-access-key-id",isMandatory:!0},{name:"oss-access-key-secret",isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=D(a({},e),{advanced:D(a({},e.advanced),{"oss-bucket-name":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),n=r.advanced["oss-bucket-name"];return delete r.advanced["oss-bucket-name"],a({destinationType:e,custom:{path:h(t),bucket:n}},r)}}},{key:"office365",displayName:$localize`Microsoft Office 365`,description:$localize`Create backups of Microsoft Office 365 data.`,icon:"assets/dest-icons/office365.png",isNonFree:!0,dynamicFields:[{name:"auth-username",shortDescription:$localize`Client ID`,longDescription:$localize`Application (client) ID from your Azure AD app registration.`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Client Secret`,longDescription:$localize`Client Secret from your Azure AD app registration.`,isMandatory:!0},{name:"office365-tenant-id",shortDescription:$localize`Tenant ID`,isMandatory:!0}],advancedFields:[{name:"office365-certificate-path",type:"FileTree"}],mapper:{to:e=>`office365://${b([...Object.entries(e.advanced),...Object.entries(e.dynamic)])}`,from:(e,t,o)=>{let{advanced:r,dynamic:n}=l(e,t);return{destinationType:e,advanced:a({},r),dynamic:a({},n)}}}},{key:"googleworkspace",displayName:$localize`Google Workspace`,description:$localize`Create backups of Google Workspace data.`,icon:"assets/dest-icons/googleworkspace.png",isNonFree:!0,dynamicFields:[{name:"google-admin-email",type:"Email",shortDescription:$localize`Admin Email`,longDescription:$localize`Email address of the Google Workspace admin user.`,isMandatory:!0},{name:"google-service-account-json",type:"FreeText",shortDescription:$localize`Service account JSON`,longDescription:$localize`Paste the service account JSON here.`,isMandatory:!0}],advancedFields:[{name:"google-service-account-file",type:"FileTree",accepts:".json,",shortDescription:$localize`Service account JSON file`,longDescription:$localize`Pick the path to a file with service account JSON.`}],mapper:{to:e=>`googleworkspace://${b([...Object.entries(e.advanced),...Object.entries(e.dynamic)])}`,from:(e,t,o)=>{let{advanced:r,dynamic:n}=l(e,t);return{destinationType:e,advanced:a({},r),dynamic:a({},n)}}}},g("rabata","Rabata.io",null,"assets/dest-icons/rabata.png",[".rabata.io"]),g("wasabi","Wasabi Hot Storage",null,"assets/dest-icons/wasabi.png",[".wasabisys.com"]),g("impossiblecloud","Impossible Cloud",null,"assets/dest-icons/impossiblecloud.png",[".impossibleapi.net"]),g("scaleway","Scaleway",null,"assets/dest-icons/scaleway.png",[".scw.cloud"]),g("hosteurope","Hosteurope",null,"assets/dest-icons/hosteurope.png",[".hosteurope.de"]),g("dunkel","Dunkel",null,"assets/dest-icons/dunkel.png",[".dunkel.de"]),g("dreamhost","DreamHost",null,"assets/dest-icons/dreamhost.png",[".dreamhost.com"]),g("dincloud","dinCloud",null,"assets/dest-icons/dincloud.png",[".dincloud.com"]),g("polisystems","Poli Systems",null,"assets/dest-icons/polisystems.png",[".polisystems.ch"]),g("ibmcos","IBM COS",null,"assets/dest-icons/ibmcos.png",[".softlayer.net"]),g("storadera","Storadera",null,"assets/dest-icons/storadera.png",[".storadera.com"]),g("infomaniak","Infomaniak",null,"assets/dest-icons/infomaniak.png",[".infomaniak.com",".infomaniak.cloud"]),g("sakuracloud","\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9",null,"assets/dest-icons/sakuracloud.png",[".sakurastorage.jp"]),g("seagatelyve","Seagate Lyve",null,"assets/dest-icons/seagatelyve.png",[".lyvecloud.seagate.com"]),g("internxt","Internxt",null,"assets/dest-icons/internxt.png",[".internxt.com"]),g("selectel","Selectel",null,"assets/dest-icons/selectel.png",[".storage.selcloud.ru",".srvstorage.uz",".srvstorage.kz"])],he={".amazonaws.com":"Amazon 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",".rabata.io":"Rabata S3",".internxt.com":"Internxt S3",".storage.selcloud.ru":"Selectel S3",".srvstorage.uz":"Selectel S3",".srvstorage.kz":"Selectel S3"};var x=new M,v=class{host;hostname;exactHostname;pathname;port;protocol;search;username;password;searchParams;originalUrl;constructor(t){let o=new URL(t);this.originalUrl=t,this.host=o.host,this.hostname=o.hostname,this.exactHostname=this.extractExactHostname(t),this.pathname=o.pathname,this.port=o.port,this.protocol=o.protocol,this.search=o.search,this.username=o.username,this.password=o.password,this.searchParams=o.searchParams}extractExactHostname(t){let o=t.match(/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\/(?:[^@\/?#]*@)?(\[[a-fA-F0-9:.]+\]|[^:\/?#]+)/);return o?o[1]:""}};function c(e,t,o,r){return V(e.destinationType??"file",t,o,r,[...Object.entries(e.advanced),...Object.entries(e.dynamic)])}function V(e,t,o,r,n){let i=b(n),u=encodeURIComponent(R(t)),k=u==""?"":u+H(o),S=r??"",A=S.slice(1).startsWith(":\\")&&e=="file"?"file:///":`${e}://`,$=E(k,W(S));return`${A}${$}${i}`}function T(e){return e==null||e===""?"":e.startsWith("/")?e.substring(1):e}function E(...e){if(e.length===0)return"";if(e.length===1)return e[0]??"";let t="";for(let o of e)o==null||o===""||(t+=t.endsWith("/")||t==""?o:"/"+o);return t}function W(e){return e.split("/").map(encodeURIComponent).join("/")}function h(e){if(e==null||e==="")return"";if(typeof e=="string")try{e=new v(e)}catch{return""}return decodeURIComponent(e.exactHostname??"")+decodeURIComponent(e.pathname=="/"?"":e.pathname??"")}function R(e){return e==null||e===""?"":e.endsWith("/")?e.substring(0,e.length-1):e}function H(e){return e==null||e===""?"":":"+e.toString()}function _(e){try{let o=new v(e),r=P.find(n=>n.mapper.intercept?.(o));if(r)return r}catch{}let t=e.split("://")[0];return C(t)}function C(e){return P.find(o=>o.key===e||o.customKey===e)??P.find(o=>`${o.key}s`===e)??null??a({key:e,displayName:e},U)}function ve(e){return P.filter(t=>t.key===e||t.customKey===e)}function m(e){return{bucket:decodeURIComponent(e.exactHostname),server:decodeURIComponent(e.exactHostname||e.hostname),port:e.port,path:T(decodeURIComponent(e.pathname))}}function l(e,t){let o={},r={},n=C(e);return t.searchParams.forEach((i,u)=>{n?.dynamicFields?.some(S=>S===u||S?.name===u)?r[u]=decodeURIComponent(i):o[u]=decodeURIComponent(i)}),{advanced:o,dynamic:r}}function b(e,t=!1){let o=e.map(([n,i])=>`${n}=${i?encodeURIComponent(i.toString()):""}`).join("&");return o?(t?"":"?")+o:""}function Fe(e){let t=e.destinationType??"";return C(t)?.mapper.to(e)??""}function Pe(e){let t=e.split("://")[0],o=e.split("://")[1],r=t==="file"?"http://dummy":o==""||o.startsWith("?")?`${t}://`+o:"http://"+o;if(!o)return null;let n=_(e),i="";if(`${n.key}s`===t&&(i+=r.indexOf("?")===-1?"?":"&",i+="use-ssl=true",e=n.key+e.substring(t.length)),t==="file"&&o.indexOf("?")!==-1&&(i+=i.indexOf("?")===-1?"?":"&",i+=o.split("?")[1]??""),t==="file"&&o.startsWith("%")&&!o.startsWith("%5C"))return C(t).mapper.from(t,new v("http://localhost"+i),e);try{let u=new v(r+i);if(u.host==="undefined")return null;let k=o.split("?")[0].split("/")[0],S=u.host!=""&&!isNaN(Number(u.host.replaceAll(".",""))),G=k.split("."),A=G.length===4&&G.every($=>$.length&&$.length<=3&&!isNaN(Number($))&&parseInt($)<=255);return S&&!A?null:n.mapper.from(n.key,u,e)}catch(u){return console.error("Error while parsing target path",e,r+i,u),null}}function j(e){return typeof e!="string"||!e.trim()?[]:e.split(`
1
+ import{d as O,r as M}from"./chunk-NCXKMSRH.js";import{d as B}from"./chunk-QAQMMCTH.js";import{F as N,Rc as w,V as L,_ as I,pa as z,q as f}from"./chunk-UH2E7MMT.js";import{a,b as D}from"./chunk-7CGTOI24.js";var y=class{constructor(t){this.loader=t}_data=z(void 0);_isLoading=!1;_loaded=!1;load(){return!this._loaded&&!this._isLoading&&(this._isLoading=!0,this.loader().pipe(N(()=>this._isLoading=!1)).subscribe(t=>{this._data.set(t),this._loaded=!0})),this._data.asReadonly()}value(){return this._data.asReadonly()}isLoading(){return this._isLoading}isLoaded(){return this._loaded}reset(){this._data.set(void 0),this._loaded=!1}};var d=class e{#e=I(B);#o=new y(()=>this.getS3Config("Providers"));#n=new y(()=>this.getS3Config("Regions"));#r=new y(()=>this.getS3Config("RegionHosts"));#s=new y(()=>this.getS3Config("StorageClasses"));#i=w(()=>{let t=this.#o.value()(),o=this.#r.value()(),r=[...t??[],...o?.map(n=>({key:`Amazon ${n.key}`,value:n.value}))??[]];return Array.from(new Map(r.map(n=>[n.value,n])).values())});#a=new y(()=>this.getStorjConfig("Satellites"));#l=new y(()=>this.getStorjConfig("AuthenticationMethods"));#c=new y(()=>this.getOpenstackConfig("Providers"));#p=new y(()=>this.getOpenstackConfig("Versions"));#u=new y(()=>this.getGcsConfig("Locations"));#m=new y(()=>this.getGcsConfig("StorageClasses"));getS3AllProviders(){return this.#o.load(),this.#r.load(),this.#i}getS3ProvidersFiltered(t){return w(()=>this.getS3AllProviders()().filter(t))}getS3Providers(){return this.#o.load()}getS3Regions(){return this.#n.load()}getS3RegionHosts(){return this.#r.load()}getS3StorageClasses(){return this.#s.load()}getStorjSatellites(){return this.#a.load()}getStorjAuthenticationMethods(){return this.#l.load()}getOpenstackProviders(){return this.#c.load()}getOpenstackVersions(){return this.#p.load()}getGcsLocations(){return this.#u.load()}getGcsStorageClasses(){return this.#m.load()}getS3Config(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":t}}).pipe(f(o=>this.#t(o)))}createS3IamUser(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":t,"s3-password":o}})}createS3PolicyIAM(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:t}})}getStorjConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":t}}).pipe(f(o=>this.#t(o)))}getOpenstackConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":t}}).pipe(f(o=>this.#t(o)))}getGcsConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":t}}).pipe(f(o=>this.#t(o)))}#t(t){return(t.Result&&typeof t.Result=="object"&&Object.entries(t.Result).map(([o,r])=>({key:o,value:r})))??[]}getDuplicatiStorageBackups(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"duplicati-list-backups",requestBody:{action:"ListBackups",url:t}}).pipe(f(o=>this.#t(o)),f(o=>o.find(r=>r.key==="folders")?.value),f(o=>JSON.parse(o)))}getFilenApiKey(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"filen-get-api-key",requestBody:{"filen-operation":"GetApiKey","backup-id":o??"",url:t}}).pipe(f(r=>this.#t(r)),f(r=>r.find(n=>n.key==="api-key")?.value))}static \u0275fac=function(o){return new(o||e)};static \u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"})};var s=new M,p={type:"error",message:$localize`Using a leading slash is most likely wrong, and will result in objects being created with a leading slash in the name.`},U={description:$localize`Unknown destination type`,icon:"assets/dest-icons/file-system.png",isDefaultEntry:!0,customFields:{path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path`,formElement:e=>s.control(e??"")}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let n=o.startsWith(`${e}:///`)?o.split(`${e}:///`)[1]:o.split(`${e}://`)[1];return a({destinationType:e,custom:{path:n.split("?")[0]}},l(e,t))}}},F={key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,icon:"assets/dest-icons/s3compat.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3AllProviders(),isMandatory:!0,formElement:e=>s.control(e??"")},{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0},{name:"use-ssl"}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>z([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}]),validate:e=>({type:"warning",message:$localize`Invalid client selected`})}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},P=[{key:"file",displayName:$localize`File system`,description:$localize`Store backups on your local file system.`,icon:"assets/dest-icons/file-system.png",searchTerms:"local disk harddrive localdisk filesystem unc server share drive",sortOrder:100,customFields:{path:{type:"FolderTree",name:"path",doubleSlash:p,shortDescription:$localize`File path`,longDescription:$localize`The path to store the backup`,formElement:e=>s.control(e??""),isMandatory:!0}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let r=o.startsWith("file:///"),n=decodeURIComponent(r?o.split("file:///")[1]:o.split("file://")[1]),u=n.slice(1).startsWith(":\\")||n.slice(1).startsWith(":/")||n.startsWith("\\\\")?n:"/"+n;return a({destinationType:e,custom:{path:u.split("?")[0]}},l(e,t))}}},{key:"duplicati",displayName:$localize`Duplicati Storage`,description:$localize`Store backups with Duplicati Storage.`,icon:"assets/dest-icons/duplicati.png",searchTerms:"duplicati internal built-in",sortOrder:-2,dynamicFields:[{name:"duplicati-backup-id",type:"DuplicatiBackupId",isMandatory:!0,shortDescription:$localize`Unique Backup ID`,longDescription:$localize`A unique identifier for the backup job. It is recommended to not change this value.`}],mapper:{to:e=>c(e,null,null,null),from:(e,t,o)=>a({destinationType:e},l(e,t)),default:e=>e&&e.length>0?`duplicati://?duplicati-backup-id=${encodeURIComponent(e)}`:"duplicati://"}},{key:"ssh",displayName:$localize`SFTP (SSH)`,description:$localize`Store backups with SFTP (SSH).`,icon:"assets/dest-icons/ssh.png",searchTerms:"sftp scp secure shell",sortOrder:80,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`The server to connect to`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`The port to connect to`,formElement:e=>s.control(e??"",[O.required,O.max(65535)])},path:{type:"Path",name:"path",shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,longDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,longDescription:$localize`Password`}],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:$localize`This is a path to a private key file locally on the machine`,longDescription:$localize`This is a path to a private key file locally on the machine`},{type:"FreeText",name:"ssh-key",shortDescription:$localize`SSH private key`,longDescription:$localize`An SSH private key. Supported formats are OpenSSL, OpenSSH, PuTTY, and PEM.`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,icon:"assets/dest-icons/s3compat.png",searchTerms:"spaces cloud digitalocean cloudian minio linode bunnycdn oracle cloudflare alibaba huawei tencent baidu jd ucloud qiniu aliyun tcloud tencent ",sortOrder:90,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3AllProviders(),isMandatory:!0,formElement:e=>s.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>z([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"s3",customKey:"s3-aws",displayName:$localize`Amazon S3`,description:$localize`Store backups in Amazon S3.`,icon:"assets/dest-icons/aws.png",searchTerms:"amazon aws",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3ProvidersFiltered(t=>t.value.endsWith(".amazonaws.com")),isMandatory:!0,formElement:e=>s.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>z([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return e.dynamic["s3-server-name"]?.endsWith(".amazonaws.com")&&(e.destinationType="s3"),c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))},default:e=>"s3-aws://?use-ssl=true",intercept:e=>e.searchParams.get("s3-server-name")?.endsWith(".amazonaws.com")??!1}},{key:"gcs",displayName:$localize`Google Cloud Storage`,description:$localize`Store backups in Google Cloud Storage.`,icon:"assets/dest-icons/google-cloud.png",oauthField:"authid",searchTerms:"gcp googlecloud",sortOrder:70,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0,longDescription:$localize`An OAuth token with access to the Google Cloud Storage. Not required if service account JSON is provided.`}],advancedFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getGcsLocations()},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getGcsStorageClasses()},{name:"gcs-service-account-file",type:"FileTree",accepts:".json,",shortDescription:$localize`Service account JSON file`,longDescription:$localize`Pick the path to a file with service account JSON.`},{name:"gcs-service-account-json",type:"FreeText",shortDescription:$localize`Service account JSON`,longDescription:$localize`Paste the service account JSON here.`}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"googledrive",displayName:$localize`Google Drive`,description:$localize`Store backups in Google Drive.`,icon:"assets/dest-icons/google-drive.png",oauthField:"authid",searchTerms:"gdrive",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"pcloud",displayName:$localize`pCloud`,description:$localize`Store backups in pCloud.`,icon:"assets/dest-icons/pcloud.png",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>z([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",oauthVersion:2,isMandatory:!0}],mapper:{to:e=>{let{server:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return a({destinationType:e,custom:{server:r,path:n}},l(e,t))}}},{key:"azure",displayName:$localize`Azure Blob Storage`,description:$localize`Store backups in Azure Blob Storage.`,icon:"assets/dest-icons/azure.png",searchTerms:"microsoft ms",sortOrder:60,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Container name`,longDescription:$localize`Container name`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"onedrivev2",displayName:$localize`OneDrive`,description:$localize`Store backups in OneDrive.`,icon:"assets/dest-icons/one-drive.png",oauthField:"authid",searchTerms:"micorsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"od4b",displayName:$localize`OneDrive Business`,description:$localize`Store backups in OneDrive Business.`,icon:"assets/dest-icons/one-drive.png",searchTerms:"microsoft ms",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"mssp",displayName:$localize`Microsoft SharePoint`,description:$localize`Store backups in Microsoft SharePoint.`,icon:"assets/dest-icons/sharepoint.png",searchTerms:"microsoft ms",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"sharepoint",displayName:$localize`Microsoft SharePoint v2`,description:$localize`Store backups in Microsoft SharePoint.`,icon:"assets/dest-icons/sharepoint.png",oauthField:"authid",searchTerms:"microsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"site-id",isMandatory:!0},{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"dropbox",displayName:$localize`Dropbox`,description:$localize`Store backups in Dropbox.`,icon:"assets/dest-icons/dropbox.png",oauthField:"authid",searchTerms:"dbx",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"box",displayName:$localize`Box.com`,description:$localize`Store backups in Box.com.`,icon:"assets/dest-icons/box-com.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"jottacloud",displayName:$localize`Jottacloud`,description:$localize`Store backups in Jottacloud.`,icon:"assets/dest-icons/jottacloud.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"b2",displayName:$localize`B2 Cloud Storage`,description:$localize`Store backups in B2 Cloud Storage.`,icon:"assets/dest-icons/backblaze.png",searchTerms:"backblaze",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0,validate:e=>{function t(o){if(!o)return!1;let r=o.length;return!(r<6||r>63||!/^[a-zA-Z0-9.-]+$/.test(o)||!/^[a-zA-Z0-9]/.test(o)||!/[a-zA-Z0-9]$/.test(o)||/^\d{1,3}(\.\d{1,3}){3}$/.test(o)||/(\.\.)|(\.-)|(-\.)/.test(o)||o.toLowerCase().startsWith("b2-"))}return t(e)?null:{type:"error",message:$localize`Invalid bucket name.`}}},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Application ID`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Application Key`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"e2",displayName:$localize`IDrive e2`,description:$localize`Store backups in IDrive e2.`,icon:"assets/dest-icons/idrive-e2.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Access ID`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access Secret`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{bucket:r,path:n}},l(e,t))}}},{key:"mega",displayName:$localize`Mega.nz`,description:$localize`Store backups in Mega.nz.`,icon:"assets/dest-icons/mega-nz.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let t=e.custom.path;return c(e,null,null,t)},from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"msgroup",displayName:$localize`Microsoft Office 365 Group`,description:$localize`Store backups in Microsoft Office 365 Group.`,icon:"assets/dest-icons/office-365.png",oauthField:"authid",searchTerms:"ms",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:$localize`Group email`,longDescription:$localize`Group email`,formElement:e=>s.control(e??"",[O.email]),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"cloudfiles",displayName:$localize`Rackspace CloudFiles`,description:$localize`Store backups in Rackspace CloudFiles.`,icon:"assets/dest-icons/rackspace.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"rclone",displayName:$localize`Rclone`,description:$localize`Store backups in Rclone.`,icon:"assets/dest-icons/rclone.png",searchTerms:"rcl",dynamicFields:[{name:"rclone-local-repository",shortDescription:$localize`Local repository`,defaultValue:""},{name:"rclone-remote-repository",shortDescription:$localize`Remote repository`,defaultValue:""},{name:"rclone-remote-path",type:"Path",shortDescription:$localize`Path on remote repository`,defaultValue:""}],mapper:{to:e=>{let t=e.dynamic["rclone-remote-repository"],o=e.dynamic["rclone-remote-path"],r=Object.entries(e.dynamic).filter(([n])=>!["rclone-remote-repository","rclone-remote-path"].includes(n));return V(e.destinationType??"rclone",t,null,o,[...Object.entries(e.advanced??{}),...r])},from:(e,t,o)=>{let{advanced:r,dynamic:n}=l(e,t),{bucket:i,path:u}=m(t);return{destinationType:e,dynamic:a({"rclone-remote-repository":i,"rclone-remote-path":u},n),advanced:a({},r)}}}},{key:"openstack",displayName:$localize`OpenStack Object Storage`,description:$localize`Store backups in OpenStack Object Storage.`,icon:"assets/dest-icons/open-stack.png",searchTerms:"swift",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket`,longDescription:$localize`Bucket`,formElement:e=>s.control(e??""),isMandatory:!0}},dynamicFields:[{name:"openstack-authuri",shortDescription:$localize`Auth URI`,type:"Enumeration",loadOptions:e=>e.get(d).getOpenstackProviders(),isMandatory:!0},{name:"openstack-version",shortDescription:$localize`Version`,type:"Enumeration",loadOptions:e=>e.get(d).getOpenstackVersions()},{name:"openstack-domain-name",type:"Hostname",shortDescription:$localize`Domain name`},{name:"openstack-tenant-name",shortDescription:$localize`Tenant name`},{name:"openstack-region",shortDescription:$localize`Region`}],mapper:{to:e=>{let{bucket:t}=e.custom;return c(e,t,null,null)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"webdav",displayName:$localize`WebDAV`,description:$localize`Store backups in WebDAV.`,icon:"assets/dest-icons/webdav.png",searchTerms:"web dav",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`},{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"aftp",displayName:$localize`Alternative FTP`,description:$localize`Store backups in FTP.`,icon:"assets/dest-icons/ftp.png",searchTerms:"alt file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"ftp",displayName:$localize`FTP`,description:$localize`Store backups in FTP.`,icon:"assets/dest-icons/ftp.png",searchTerms:"file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"sia",displayName:$localize`Sia Decentrilized Cloud`,description:$localize`Store backups in Sia Decentrilized Cloud.`,icon:"assets/dest-icons/sia-cloud.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let t=e.custom.server,o=e.dynamic["sia-targetpath"],r=[...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([n])=>n!=="sia-targetpath")];return V(e.destinationType??"sia",t,null,o,r)},from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"cos",displayName:$localize`Tencent COS`,description:$localize`Store backups in Tencent COS.`,icon:"assets/dest-icons/tencent-cloud.png",customFields:{bucket:{name:"bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"cos-region",shortDescription:$localize`Region`},{name:"cos-app-id",shortDescription:$localize`COS App Id`,isMandatory:!0},{name:"cos-secret-id",shortDescription:$localize`COS Secret Id`,isMandatory:!0},{name:"cos-secret-key",shortDescription:$localize`COS Secret Key`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=D(a({},e),{advanced:D(a({},e.advanced),{"cos-bucket":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),n=r.advanced["cos-bucket"];return delete r.advanced["cos-bucket"],a({destinationType:e,custom:{path:h(t),bucket:n}},r)}}},{key:"tahoe",displayName:$localize`Tahoe LAFS`,description:$localize`Store backups in Tahoe LAFS.`,icon:"assets/dest-icons/tahoelafs.png",searchTerms:"least authority file system",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"smb",displayName:$localize`Windows Share (SMB)`,description:$localize`Store backups on SMB storage.`,icon:"assets/dest-icons/smb.png",searchTerms:"cifs samba",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},share:{type:"Hostname",name:"share",shortDescription:$localize`Share Name`,longDescription:$localize`Share Name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:["transport",{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0},"auth-domain"],mapper:{to:e=>{let{share:t,server:o,path:r}=e.custom;return c(e,o,null,E(t,r))},from:(e,t,o)=>{let{server:r,path:n}=m(t),i=n.split("/")[0],u=n.split("/").slice(1).join("/");return a({destinationType:e,custom:{server:r,share:i,path:u}},l(e,t))}}},{key:"cifs",displayName:$localize`CIFS (deprecated)`,description:$localize`Same as SMB backend, but with a different name. Use SMB instead.`,icon:"assets/dest-icons/smb.png",sortOrder:-1,mapper:U.mapper},{key:"filen",displayName:$localize`Filen.io`,description:$localize`Store backups in Filen.io.`,icon:"assets/dest-icons/filen.png",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filen`,longDescription:$localize`Path on Filen`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0},{name:"two-factor-code",type:"Filen2FACode"}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"filejump",displayName:$localize`Filejump`,description:$localize`Store backups in Filejump.`,icon:"assets/dest-icons/file-jump.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filejump`,longDescription:$localize`Path on Filejump`,formElement:e=>s.control(e??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:$localize`API Token`,longDescription:$localize`Filejump API Token`,formElement:e=>s.control(e??""),isMandatory:!0}],mapper:{to:e=>{let{path:t}=e.custom;return c(e,null,null,t)},from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"storj",customKey:"storjAccessGrant",displayName:$localize`Storj Access Grant`,description:$localize`Store backups in Storj Access Grant.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-shared-access",shortDescription:$localize`Access Grant`,isMandatory:!0},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p},{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getStorjSatellites(),isMandatory:!0}],mapper:{to:e=>{let t={"storj-auth-method":"Acccess grant"};return`storj://storj.io/config${b([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l(e,t);return delete r.advanced["storj-auth-method"],a({destinationType:e},r)},intercept:e=>e.protocol!=="storj:"?!1:!!(e.searchParams.get("storj-shared-access")||e.searchParams.get("storj-auth-method")==="Acccess grant"),default:()=>"storj://?storj-shared-access=&storj-auth-method=Acccess+grant"}},{key:"storj",customKey:"storjApiKey",displayName:$localize`Storj API Key`,description:$localize`Store backups in Storj API Key.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getStorjSatellites(),isMandatory:!0},{name:"storj-api-key",shortDescription:$localize`API Key`,isMandatory:!0},{name:"storj-secret",shortDescription:$localize`Secret`,isMandatory:!0},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p}],mapper:{to:e=>{let t={"storj-auth-method":"API key"};return`storj://storj.io/config${b([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l("storjApiKey",t);return delete r.advanced["storj-auth-method"],a({destinationType:e},r)},intercept:e=>e.protocol!=="storj:"?!1:!!(e.searchParams.get("storj-api-key")||e.searchParams.get("storj-secret")||e.searchParams.get("storj-auth-method")==="API key"),default:()=>"storj://?storj-api-key=&storj-secret=&storj-auth-method=API+key"}},{key:"aliyunoss",displayName:$localize`Aliyun OSS`,description:$localize`Store backups in Aliyun OSS`,icon:"assets/dest-icons/aliyun.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in bucket`,longDescription:$localize`Path in bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"oss-endpoint",isMandatory:!0},{name:"oss-access-key-id",isMandatory:!0},{name:"oss-access-key-secret",isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=D(a({},e),{advanced:D(a({},e.advanced),{"oss-bucket-name":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),n=r.advanced["oss-bucket-name"];return delete r.advanced["oss-bucket-name"],a({destinationType:e,custom:{path:h(t),bucket:n}},r)}}},{key:"office365",displayName:$localize`Microsoft Office 365`,description:$localize`Create backups of Microsoft Office 365 data.`,icon:"assets/dest-icons/office365.png",isNonFree:!0,dynamicFields:[{name:"auth-username",shortDescription:$localize`Client ID`,longDescription:$localize`Application (client) ID from your Azure AD app registration.`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Client Secret`,longDescription:$localize`Client Secret from your Azure AD app registration.`,isMandatory:!0},{name:"office365-tenant-id",shortDescription:$localize`Tenant ID`,isMandatory:!0}],advancedFields:[{name:"office365-certificate-path",type:"FileTree"}],mapper:{to:e=>`office365://${b([...Object.entries(e.advanced),...Object.entries(e.dynamic)])}`,from:(e,t,o)=>{let{advanced:r,dynamic:n}=l(e,t);return{destinationType:e,advanced:a({},r),dynamic:a({},n)}}}},{key:"googleworkspace",displayName:$localize`Google Workspace`,description:$localize`Create backups of Google Workspace data.`,icon:"assets/dest-icons/googleworkspace.png",isNonFree:!0,dynamicFields:[{name:"google-admin-email",type:"Email",shortDescription:$localize`Admin Email`,longDescription:$localize`Email address of the Google Workspace admin user.`,isMandatory:!0},{name:"google-service-account-json",type:"FreeText",shortDescription:$localize`Service account JSON`,longDescription:$localize`Paste the service account JSON here.`,isMandatory:!0}],advancedFields:[{name:"google-service-account-file",type:"FileTree",accepts:".json,",shortDescription:$localize`Service account JSON file`,longDescription:$localize`Pick the path to a file with service account JSON.`}],mapper:{to:e=>`googleworkspace://${b([...Object.entries(e.advanced),...Object.entries(e.dynamic)])}`,from:(e,t,o)=>{let{advanced:r,dynamic:n}=l(e,t);return{destinationType:e,advanced:a({},r),dynamic:a({},n)}}}},g("rabata","Rabata.io",null,"assets/dest-icons/rabata.png",[".rabata.io"]),g("wasabi","Wasabi Hot Storage",null,"assets/dest-icons/wasabi.png",[".wasabisys.com"]),g("impossiblecloud","Impossible Cloud",null,"assets/dest-icons/impossiblecloud.png",[".impossibleapi.net"]),g("scaleway","Scaleway",null,"assets/dest-icons/scaleway.png",[".scw.cloud"]),g("hosteurope","Hosteurope",null,"assets/dest-icons/hosteurope.png",[".hosteurope.de"]),g("dunkel","Dunkel",null,"assets/dest-icons/dunkel.png",[".dunkel.de"]),g("dreamhost","DreamHost",null,"assets/dest-icons/dreamhost.png",[".dreamhost.com"]),g("dincloud","dinCloud",null,"assets/dest-icons/dincloud.png",[".dincloud.com"]),g("polisystems","Poli Systems",null,"assets/dest-icons/polisystems.png",[".polisystems.ch"]),g("ibmcos","IBM COS",null,"assets/dest-icons/ibmcos.png",[".softlayer.net"]),g("storadera","Storadera",null,"assets/dest-icons/storadera.png",[".storadera.com"]),g("infomaniak","Infomaniak",null,"assets/dest-icons/infomaniak.png",[".infomaniak.com",".infomaniak.cloud"]),g("sakuracloud","\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9",null,"assets/dest-icons/sakuracloud.png",[".sakurastorage.jp"]),g("seagatelyve","Seagate Lyve",null,"assets/dest-icons/seagatelyve.png",[".lyvecloud.seagate.com"]),g("internxt","Internxt",null,"assets/dest-icons/internxt.png",[".internxt.com"]),g("selectel","Selectel",null,"assets/dest-icons/selectel.png",[".storage.selcloud.ru",".srvstorage.uz",".srvstorage.kz"])],he={".amazonaws.com":"Amazon 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",".rabata.io":"Rabata S3",".internxt.com":"Internxt S3",".storage.selcloud.ru":"Selectel S3",".srvstorage.uz":"Selectel S3",".srvstorage.kz":"Selectel S3"};var x=new M,v=class{host;hostname;exactHostname;pathname;port;protocol;search;username;password;searchParams;originalUrl;constructor(t){let o=new URL(t);this.originalUrl=t,this.host=o.host,this.hostname=o.hostname,this.exactHostname=this.extractExactHostname(t),this.pathname=o.pathname,this.port=o.port,this.protocol=o.protocol,this.search=o.search,this.username=o.username,this.password=o.password,this.searchParams=o.searchParams}extractExactHostname(t){let o=t.match(/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\/(?:[^@\/?#]*@)?(\[[a-fA-F0-9:.]+\]|[^:\/?#]+)/);return o?o[1]:""}};function c(e,t,o,r){return V(e.destinationType??"file",t,o,r,[...Object.entries(e.advanced),...Object.entries(e.dynamic)])}function V(e,t,o,r,n){let i=b(n),u=encodeURIComponent(R(t)),k=u==""?"":u+H(o),S=r??"",A=S.slice(1).startsWith(":\\")&&e=="file"?"file:///":`${e}://`,$=E(k,W(S));return`${A}${$}${i}`}function T(e){return e==null||e===""?"":e.startsWith("/")?e.substring(1):e}function E(...e){if(e.length===0)return"";if(e.length===1)return e[0]??"";let t="";for(let o of e)o==null||o===""||(t+=t.endsWith("/")||t==""?o:"/"+o);return t}function W(e){return e.split("/").map(encodeURIComponent).join("/")}function h(e){if(e==null||e==="")return"";if(typeof e=="string")try{e=new v(e)}catch{return""}return decodeURIComponent(e.exactHostname??"")+decodeURIComponent(e.pathname=="/"?"":e.pathname??"")}function R(e){return e==null||e===""?"":e.endsWith("/")?e.substring(0,e.length-1):e}function H(e){return e==null||e===""?"":":"+e.toString()}function _(e){try{let o=new v(e),r=P.find(n=>n.mapper.intercept?.(o));if(r)return r}catch{}let t=e.split("://")[0];return C(t)}function C(e){return P.find(o=>o.key===e||o.customKey===e)??P.find(o=>`${o.key}s`===e)??null??a({key:e,displayName:e},U)}function ve(e){return P.filter(t=>t.key===e||t.customKey===e)}function m(e){return{bucket:decodeURIComponent(e.exactHostname),server:decodeURIComponent(e.exactHostname||e.hostname),port:e.port,path:T(decodeURIComponent(e.pathname))}}function l(e,t){let o={},r={},n=C(e);return t.searchParams.forEach((i,u)=>{n?.dynamicFields?.some(S=>S===u||S?.name===u)?r[u]=decodeURIComponent(i):o[u]=decodeURIComponent(i)}),{advanced:o,dynamic:r}}function b(e,t=!1){let o=e.map(([n,i])=>`${n}=${i?encodeURIComponent(i.toString()):""}`).join("&");return o?(t?"":"?")+o:""}function Fe(e){let t=e.destinationType??"";return C(t)?.mapper.to(e)??""}function Pe(e){let t=e.split("://")[0],o=e.split("://")[1],r=t==="file"?"http://dummy":o==""||o.startsWith("?")?`${t}://`+o:"http://"+o;if(!o)return null;let n=_(e),i="";if(`${n.key}s`===t&&(i+=r.indexOf("?")===-1?"?":"&",i+="use-ssl=true",e=n.key+e.substring(t.length)),t==="file"&&o.indexOf("?")!==-1&&(i+=i.indexOf("?")===-1?"?":"&",i+=o.split("?")[1]??""),t==="file"&&o.startsWith("%")&&!o.startsWith("%5C"))return C(t).mapper.from(t,new v("http://localhost"+i),e);try{let u=new v(r+i);if(u.host==="undefined")return null;let k=o.split("?")[0].split("/")[0],S=u.host!=""&&!isNaN(Number(u.host.replaceAll(".",""))),G=k.split("."),A=G.length===4&&G.every($=>$.length&&$.length<=3&&!isNaN(Number($))&&parseInt($)<=255);return S&&!A?null:n.mapper.from(n.key,u,e)}catch(u){return console.error("Error while parsing target path",e,r+i,u),null}}function j(e){return typeof e!="string"||!e.trim()?[]:e.split(`
2
2
  `).map(t=>t.trim()).filter(t=>t).map(t=>{let[o,...r]=t.split("="),n=r.join("=").trim();return o.trim()?[o.trim(),n]:null}).filter(t=>t!==null)}function Oe(e){return j(e).map(([t,o])=>({Name:t,Value:o}))}function Me(e){return Object.fromEntries(j(e))}function Ve(e){if(!e)return!1;let t=e.length;return!(t<3||t>63||!/^[a-z0-9.-]+$/.test(e)||!/^[a-z0-9]/.test(e)||!/[a-z0-9]$/.test(e)||/^\d{1,3}(\.\d{1,3}){3}$/.test(e)||/(\.\.)|(\.-)|(-\.)/.test(e))}function Ce(e){if(!e||e.length>253)return!1;let t=e.split(".");for(let o of t)if(!o||o.length>63||!/^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?$/.test(o))return!1;return!0}function g(e,t,o,r,n){return D(a({},F),{customKey:`s3-${e}`,icon:r??F.icon,displayName:$localize`${t} (S3)`,description:o??$localize`Store backups in ${t} storage.`,dynamicFields:[...(F.dynamicFields??[]).filter(i=>i?.name!=="s3-server-name"),{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the ${t} endpoint`,type:"NonValidatedSelectableString",loadOptions:i=>i.get(d).getS3ProvidersFiltered(u=>n.some(k=>u.value.endsWith(k))),isMandatory:!0,formElement:i=>x.control(i??"")}],mapper:D(a({},F.mapper),{to:i=>{let{bucket:u,path:k}=i.custom;return n.some(S=>i.dynamic["s3-server-name"]?.endsWith(S))&&(i.destinationType="s3"),c(i,u,null,k)},default:i=>`s3-${e}://?use-ssl=true`,intercept:i=>n.some(u=>i.searchParams.get("s3-server-name")?.endsWith(u))??!1})})}export{d as a,h as b,_ as c,C as d,ve as e,Fe as f,Pe as g,Oe as h,Me as i,Ve as j,Ce as k,he as l};
@@ -0,0 +1 @@
1
+ import{a as ze}from"./chunk-35APLYI4.js";import{a as Ge}from"./chunk-R6TFME5I.js";import{A as Le,B as ce,H as J,J as Ae,K as ke,L as Be,P as $e,W as We,a as ae,c as G,e as z,i as j,k as de,s as H,v as De,y as we,z as Ie}from"./chunk-NCXKMSRH.js";import{d as Ve}from"./chunk-QAQMMCTH.js";import{aa as Re}from"./chunk-BDQJFOCO.js";import{$b as _,A as Ce,Ab as te,Ac as se,Bb as ne,Bc as ve,Cb as T,Cc as le,Db as a,Dc as Fe,Eb as d,F as ue,Fb as ie,Jb as Te,Kb as Pe,Kc as ye,Lb as pe,Mb as L,Rc as O,Sa as p,Tb as Me,Ub as be,Vb as x,Wb as q,Wc as xe,Xb as K,Xc as m,Yc as _e,Zb as A,_ as Z,ac as V,bc as S,da as b,ea as N,gb as W,gc as Ne,hc as Se,ic as ge,jc as oe,kc as B,l as me,lb as X,nc as P,pa as C,pc as Oe,q as k,qc as re,ra as y,sc as R,tc as D,uc as w,vb as ee,w as fe,wb as v,xb as F,yb as Ee}from"./chunk-UH2E7MMT.js";import{a as Q,b as Y}from"./chunk-7CGTOI24.js";var Qe=["treeContainer"],Ye=["formRef"],Ze=[[["label"]],[["label"]],[["input"]]],et=["label","label","input"],tt=r=>({children:r,level:0}),Ue=r=>({$implicit:r}),nt=(r,t)=>({children:r,level:t}),it=()=>({maxWidth:"700px",width:"100%"}),ot=(r,t)=>t.id;function rt(r,t){if(r&1){let e=L();a(0,"sh-button-group",21),w("valueChange",function(i){b(e);let o=_();return D(o.pathDiscoveryMethod,i)||(o.pathDiscoveryMethod=i),N(i)}),a(1,"button",22),x(2,4),d(),a(3,"button",23),x(4,5),d()()}if(r&2){let e=_();R("value",e.pathDiscoveryMethod)}}function st(r,t){r&1&&ie(0,"sh-progress-bar",14)}function lt(r,t){r&1&&(a(0,"sh-icon",28),P(1,"caret-down"),d())}function at(r,t){r&1&&ie(0,"sh-icon",28)}function dt(r,t){r&1&&(a(0,"sh-icon",28),P(1,"spinner"),d())}function ct(r,t){r&1&&(a(0,"sh-icon",28),P(1,"caret-right"),d())}function ut(r,t){r&1&&(a(0,"sh-icon",26),P(1,"folder-open"),d())}function pt(r,t){r&1&&(a(0,"sh-icon",26),P(1,"folder-user"),d())}function gt(r,t){r&1&&(a(0,"sh-icon",26),P(1,"file"),d())}function _t(r,t){r&1&&(a(0,"sh-icon",26),P(1,"folder"),d())}function ht(r,t){if(r&1&&(v(0,lt,2,0,"sh-icon",28)(1,at,1,0,"sh-icon",28)(2,dt,2,0,"sh-icon",28)(3,ct,2,0,"sh-icon",28),v(4,ut,2,0,"sh-icon",26)(5,pt,2,0,"sh-icon",26)(6,gt,2,0,"sh-icon",26)(7,_t,2,0,"sh-icon",26)),r&2){let e=_(2).$implicit,n=_(2);F(e.children.length?0:e.cls==="file"?1:e.id===n.isLoading()?2:3),p(4),F(e.children.length?4:e.id==="%HOME%"?5:e.cls==="file"?6:7)}}function mt(r,t){r&1&&(a(0,"sh-icon",26),P(1,"desktop-tower"),d())}function ft(r,t){r&1&&pe(0)}function Ct(r,t){if(r&1&&X(0,ft,1,0,"ng-container",15),r&2){let e=_(2).$implicit,n=_().$implicit;_();let i=ge(7);T("ngTemplateOutlet",i)("ngTemplateOutletContext",le(5,Ue,Fe(2,nt,e.children,n.level+1)))}}function Et(r,t){if(r&1){let e=L();a(0,"div",24,3),A("click",function(){b(e);let i=_().$implicit,o=_(2);return N(o.toggleNode(i.id,i))}),a(2,"div",25),v(3,ht,8,2)(4,mt,2,0,"sh-icon",26),d(),a(5,"div",27),A("click",function(i){b(e);let o=_().$implicit,l=_(2);return N(l.toggleSelectedNode(i,o))}),P(6),d()(),v(7,Ct,1,7,"ng-container")}if(r&2){let e=_().$implicit,n=_().$implicit,i=_();B("accepted",e.accepted===!0)("active",e.evalState===i.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",n.level===0)("loading",i.isLoading()===e.id),p(2),B("file",e.cls==="file"),p(),F(e.id!=="/"?3:4),p(3),Oe(" ",e.text," "),p(),F(e.children.length>0?7:-1)}}function Tt(r,t){if(r&1&&v(0,Et,8,19),r&2){let e=t.$implicit,n=_(2);F(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function Pt(r,t){if(r&1&&(a(0,"sh-list"),te(1,Tt,1,1,null,null,ot),d()),r&2){let e=t.$implicit;oe("padding-left",e.level*.25,"rem"),p(),ne(e.children)}}function Mt(r,t){r&1&&pe(0)}function bt(r,t){if(r&1){let e=L();a(0,"sh-toggle",29),w("checkedChange",function(i){b(e);let o=_();return D(o._showHiddenNodes,i)||(o._showHiddenNodes=i),N(i)}),x(1,6),d()}if(r&2){let e=_();R("checked",e._showHiddenNodes),p(),q(e.showFiles()?"files":"folders"),K(1)}}function Nt(r,t){if(r&1){let e=L();a(0,"button",30),A("click",function(){b(e);let i=_();return N(i.openCreateFolderDialog())}),x(1,7),d()}if(r&2){let e=_();T("disabled",!e.isCurrentPathFolder())}}function St(r,t){if(r&1){let e=L();a(0,"sh-dialog",31),w("isOpenChange",function(i){b(e);let o=_();return D(o.createFolderDialogOpen,i)||(o.createFolderDialogOpen=i),N(i)}),a(1,"header",32)(2,"h2"),x(3,8),d()(),a(4,"div",33)(5,"div",34)(6,"p"),x(7,9),d(),a(8,"div",35)(9,"pre"),P(10),d()()(),a(11,"sh-form-field")(12,"textarea",36),w("ngModelChange",function(i){b(e);let o=_();return D(o.createFolderPath,i)||(o.createFolderPath=i),N(i)}),d()()(),a(13,"footer",37)(14,"button",38),A("click",function(){b(e);let i=_();return N(i.closeCreateFolderDialog(!1))}),P(15,"Cancel"),d(),a(16,"button",39),A("click",function(){b(e);let i=_();return N(i.closeCreateFolderDialog(!0))}),Me(17,10),ie(18,"sh-icon"),be(),d()()()}if(r&2){let e,n=_();R("isOpen",n.createFolderDialogOpen),T("options",ve(6,it)),p(10),re("",n.currentPathResolvedShorthands(),"",n.createFolderPath()?"/"+n.createFolderPath():""),p(2),R("ngModel",n.createFolderPath),p(4),T("disabled",!((e=n.createFolderPath())!=null&&e.length))}}var Xe=(o=>(o[o.ExcludedByParent=-2]="ExcludedByParent",o[o.Excluded=-1]="Excluded",o[o.None=0]="None",o[o.Included=1]="Included",o[o.IncludedByParent=2]="IncludedByParent",o))(Xe||{}),M="/",he=class r{#e=Z(Ve);#n=Z(Ge);#u=Z(Ie);multiSelect=m(!1);disabled=m(!1);showFiles=m(!1);selectFiles=m(!1);accepts=m(null);startingPath=m(null);rootPaths=m([]);initialNodes=m([]);backupSettings=m(null);pathRefreshTrigger=m(!1);showHiddenNodes=m(!1);enableCreateFolder=m(!1);hideShortcuts=m(!1);customRemoteMode=m(null);backupId=m("");sourcePrefix=m("");destinationUrl=m("");loadExtendedData=m(!0);hasExtendedData=xe();_showHiddenNodes=C(!1);createFolderDialogOpen=C(!1);createFolderPath=C(null);treeContainerRef=_e("treeContainer");formRef=_e("formRef");pathDiscoveryMethod=C("browse");isLoading=C(null);currentPath=C("");currentPathResolvedShorthands=O(()=>this.#n.resolveShorthandPath(this.currentPath()));#r=C(null);treeSearchQuery=C("");treeNodes=C([]);pathDelimiter=O(()=>this.#n.systemInfo()?.DirectorySeparator??"");filterGroups=this.#n.filterGroups();isByBackupSettings=O(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=O(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Xe;treeStructure=O(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(s=>s!==""&&s!==M),n=structuredClone(e);for(let s=0;s<n.length;s++){let f=n[s].slice(1);if(f.startsWith("{")&&f.endsWith("}")){let h=f.slice(1,-1),g=this.filterGroups?.FilterGroups[h];if(g&&g.length){let I=g.map(E=>`-${E}`);n.splice(s,1,...I)}}}let i=this.searchableTreeNodes(),o=this.rootPaths(),l=this.accepts(),u=[];return o.length>0?u=o.map(s=>{let c=this.#s(n,s,"folder",null);return{id:s,resolvedpath:s,text:s,parentPath:"",children:[],evalState:c,isIndeterminate:!1,cls:this.#t(s)?"folder":"file"}}):u=[{id:M,resolvedpath:M,text:$localize`Computer`,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}],u.map(s=>{let c=new Map;if(!s.id)return;let f=s.id;l&&(s.accepted=!0),c.set(f,s);let h=o.length>0?i.filter(g=>g.parentPath.startsWith(f)):i;for(let g of h){if(!g.id)continue;let I=g.id;if(!g.cls||c.has(I))continue;let E=c.get(g.parentPath),U=g.hidden===!0&&t?0:this.#s(n,I,g.cls,E),$=Y(Q({},g),{isIndeterminate:this.isIndeterminate(n,I),evalState:U,children:[]});l&&($.accepted=this.matchAccepts(l,$)),c.set(I,$),E&&E.children.push($)}return s}),u});#p(t){if(!t)return M;let e=this.#i(t);return t.endsWith("/")||t.endsWith("\\")||t===M?t:t+e}#s(t,e,n,i){if(i&&i.evalState===-1)return-2;let o=0,l=t.filter(c=>!c.startsWith("-")&&!c.startsWith("+")),u=t.filter(c=>c.startsWith("-")||c.startsWith("+")),s=this.multiSelect();if(l.length===0)return o;for(let c=0;c<l.length;c++){let f=l[c];if(e===f){o=1;break}if(!s||!this.#t(f))continue;if(e?.startsWith(f)){o=1;break}}if(u.length===0)return o;for(let c=0;c<u.length;c++){let f=u[c],h=f.slice(1),g=f.startsWith("-")?-1:1;if(this.#t(h)){if(n!=="folder")continue;if(e===h){o=g;break}}if(h.startsWith("*")&&(h.endsWith("*\\")||h.endsWith("*/"))){if(n!=="folder")continue;let E=h.slice(1,-2);if(E==="")break;if(e?.includes(E+"\\")||e?.includes(E+"/")){o=g;break}}if(h.startsWith("[.*")&&(h.endsWith("[^\\/]*]")||h.endsWith("[^\\\\]*]"))){if(n!=="file")continue;let E=h.slice(3,-7);if(new RegExp(E).test(e)){o=g;break}}if(h.startsWith("[")&&h.endsWith("]")){let E=h.slice(1,-1),U=this.translateCSharpRegex(E);if(new RegExp(`${U}`).test(e)){o=g;break}}if(h.startsWith("*.")){if(n!=="file"||h.replace("*.","").length===0)continue;if(this.#l(e,h,!0)){o=g;break}}if(h==="")continue;if(h===e){o=g;break}if(this.#l(e,h,!0)){o=g;break}}return o}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(i,o,l)=>`(${l})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.filter(n=>!n.startsWith("-")&&this.#t(n)).some(n=>n.startsWith(e))}isCurrentPathFolder(){let t=this.currentPath();return t?t.endsWith("/")||t.endsWith("\\")||t.startsWith("%")&&t.endsWith("%")&&!t.includes("/")&&!t.includes("\\"):!1}#l(t,e,n=!1){let i=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${i}${n?"$":""}`).test(t)}#i(t){return t?t.includes("/")?"/":t.includes("\\")?"\\":this.pathDelimiter():this.pathDelimiter()}showHiddenNodesEffect=y(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=y(()=>{let t=this.pathDiscoveryMethod(),e=this.#r();if(t==="browse"&&e){let n=e.value;if(n==null||n==="")return;this.currentPath.set(n)}});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id===M)return!0;let n=t.split(",");if(n.length===0)return!0;let i="."+e.id.slice(e.id.indexOf("."));return i?n.some(o=>i.endsWith(o)):!1}currentPathEffect=y(()=>{let t=this.#r();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=y(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#g(t),this.inputValueChangeAbortController&&this.inputValueChangeAbortController.abort(),this.inputValueChangeAbortController=new AbortController,t.addEventListener("inputValueChanged",e=>{this.currentPath.set(e.detail.value)},{signal:this.inputValueChangeAbortController.signal}),this.#r.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();if(t)this.currentPath.set(t),this.#E(t);else{let e=this.rootPaths(),n=this.initialNodes();e&&e.length>0?(n&&n.length>0&&this.treeNodes.set(n.map(i=>({id:i.id,leaf:i.leaf,cls:i.cls,text:this.#c(i.text,i?.Metadata),iconCls:i.iconCls,fileSize:i.fileSize,resolvedpath:i.resolvedpath,parentPath:this.getParentPath(i.id??"")}))),this.#o(null,e[0])):this.#o(null,M)}}getParentPath(t){let e=this.#i(t),n=t.split(e);return n.length<=1?M:(n.pop(),n.length!==0&&n.pop(),n.join(e)+e)}toggleSelectedNode(t,e){if(e.id===M||(t.stopPropagation(),e.evalState===-2))return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(e.id,e);return}if(this.accepts()&&!e.accepted)return;let i=this.currentPath().split("\0").filter(s=>s!==""&&s!==M),l=this.isChildOfSelected(e)?`-${e.id}`:e.id,u=this.#t(e.id);if(this.multiSelect())if(i.includes(e.id))this.currentPath.set(i.filter(s=>s!==e.id&&!(u&&s.startsWith(l))).join("\0"));else if(i.some(s=>s==l))this.currentPath.set(i.filter(s=>s!==l).join("\0"));else{let s=u?i.filter(c=>!c.startsWith(e.id)):i;this.currentPath.set([...s,l].join("\0"))}else i.includes(e.id)?this.currentPath.set(i.filter(s=>s!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(n=>n!==""&&n!==M&&this.#t(n)).some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(n=>n.filter(i=>!i.id?.startsWith(e.id)||i.id===e.id)):this.#o(e,t))}openCreateFolderDialog(){return this.createFolderPath.set(null),this.createFolderDialogOpen.set(!0),!1}closeCreateFolderDialog(t){if(t&&this.createFolderPath()?.length&&this.isCurrentPathFolder()){let e=this.createFolderPath()?.trim();if(e){let n=this.currentPath(),i=this.currentPathResolvedShorthands(),o=this.#p(e),l=`${i}/${o}`;this.#e.postApiV1RemoteoperationCreate({requestBody:{path:"file://"+l}}).subscribe({next:()=>{this.currentPath.set(l),this.#o(null,n),setTimeout(()=>{this.#a()},500),this.createFolderDialogOpen.set(!1)},error:u=>{let s=u?.message?.match(/user-information\s*:\s*(.*?)(?:\s*,|$)/i),c=s?s[1]:u?.message||$localize`An error occurred while trying to create the folder.`;this.#u.open(ze,{data:{title:$localize`Cannot create folder`,message:c,confirmText:$localize`OK`,cancelText:void 0}})}})}}else this.createFolderDialogOpen.set(!1);return!1}#a(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)}#g(t){return Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(e){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,e),this.dispatchEvent(new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}})),e}}),t}#_(t){return this.#e.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#h(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"office365",requestBody:{"backup-id":this.backupId()??"","source-prefix":this.sourcePrefix()??"",operation:"ListDestinationRestoreTargets",url:this.destinationUrl()??"",path:t??"/"}}).pipe(k(e=>{let n=e.Result;return Object.keys(n).map(i=>({Path:i,Metadata:JSON.parse(n[i])}))}))}#m(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"googleworkspace",requestBody:{"backup-id":this.backupId()??"","source-prefix":this.sourcePrefix()??"",operation:"ListDestinationRestoreTargets",url:this.destinationUrl()??"",path:t??"/"}}).pipe(k(e=>{let n=e.Result;return Object.keys(n).map(i=>({Path:i,Metadata:JSON.parse(n[i])}))}))}#f(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"diskimage",requestBody:{operation:"ListDestinationRestoreTargets",path:t??"/"}}).pipe(k(e=>{let n=e.Result;return Object.keys(n).map(i=>({Path:i,Metadata:JSON.parse(n[i])}))}))}#C(t){let e=this.backupSettings();if(this.#n.hasV2ListOperations())return this.#e.postApiV2BackupListFolder({requestBody:{BackupId:e.id,Time:e.time,Paths:t?[t]:null,PageSize:0,Page:0,ReturnExtended:this.customRemoteMode()!==null||this.loadExtendedData()}}).pipe(k(n=>n.Data??[]));{let n={id:e.id+"",prefixOnly:!1,folderContents:!0,time:e.time,filter:t?"@"+t:void 0};return this.#e.getApiV1BackupByIdFiles(n).pipe(k(i=>i.Files??[]))}}#d(t){return this.customRemoteMode()==="o365"?this.#h(t):this.customRemoteMode()==="gsuite"?this.#m(t):this.customRemoteMode()==="diskimage"?this.#f(t):this.isByBackupSettings()?this.#C(t):this.#_(t)}#E(t){let n=t.split("\0").filter(l=>!l.startsWith("-")&&!l.startsWith("+")&&!l.startsWith("@")).filter(Boolean).map(l=>{let u=this.#i(l),s=l.split(u);return s.at(-1)!==""&&s.pop(),{split:s,sep:u}}),i=[M];n.forEach(({split:l,sep:u})=>{l.forEach((s,c)=>{let f=l.slice(0,c+1).join(u)+u;f===""||f===u||i.includes(f)||i.push(f)})});let o=i.map(l=>(this.isLoading.set(l),this.#d(l).pipe(k(u=>({status:"success",value:u,url:l})),Ce(u=>me({status:"error",value:u,url:l})))));fe(o).pipe(ue(()=>this.isLoading.set(null))).subscribe({next:l=>{let u=l.filter(c=>c.status==="success"),s=l.filter(c=>c.status==="error");this.treeNodes.update(c=>{let f=u.flatMap(g=>Array.isArray(g.value)?g.value.map(I=>Y(Q({},I),{parentPath:g.url})):[]),h=[...new Map([...c,...f].map(g=>[g.id,g])).values()];return this.#a(),this.hideShortcuts()?h.filter(g=>!g.id.startsWith("%")):h})}})}#c(t,e){if(e){let n=e["o365:Name"]||e["o365:DisplayName"]||e["gsuite:Name"]||e["gsuite:DisplayName"]||e["diskimage:Name"];if(n)return n}return t}#T(t){t&&t.ExtType&&t.ExtType.length>0&&this.hasExtendedData.emit(t.ExtType)}#t(t){return t.startsWith("%")&&t.endsWith("%")&&!t.includes("/")&&!t.includes("\\")||t.endsWith("/")||t.endsWith("\\")}#o(t=null,e=M){this.isLoading.set(e),this.#d(e).pipe(ue(()=>this.isLoading.set(null))).subscribe({next:n=>{let i=this.isByBackupSettings()||this.customRemoteMode()!==null?n.map(o=>{this.#T(o.Metadata);let l=this.#i(o.Path);return{text:this.#c(o.Path.split(l).filter(s=>s!=="").pop(),o.Metadata),id:o.Path,cls:this.#t(o.Path)?"folder":"file",leaf:t!==null,resolvedpath:o.Path,hidden:!1}}):n;this.treeNodes.update(o=>{let l=i.map(s=>{let c=this.#t(s.id)?"folder":"file";return Y(Q({},s),{cls:c,parentPath:e})}),u=[...new Map([...o,...l].map(s=>[s.id,s])).values()];return this.hideShortcuts()?u.filter(s=>!s.id.startsWith("%")):u})}})}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=W({type:r,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&Ne(n.treeContainerRef,Qe,5)(n.formRef,Ye,5),e&2&&Se(2)},hostVars:2,hostBindings:function(e,n){e&2&&B("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPaths:[1,"rootPaths"],initialNodes:[1,"initialNodes"],backupSettings:[1,"backupSettings"],pathRefreshTrigger:[1,"pathRefreshTrigger"],showHiddenNodes:[1,"showHiddenNodes"],enableCreateFolder:[1,"enableCreateFolder"],hideShortcuts:[1,"hideShortcuts"],customRemoteMode:[1,"customRemoteMode"],backupId:[1,"backupId"],sourcePrefix:[1,"sourcePrefix"],destinationUrl:[1,"destinationUrl"],loadExtendedData:[1,"loadExtendedData"]},outputs:{hasExtendedData:"hasExtendedData"},ngContentSelectors:et,decls:18,vars:17,consts:()=>{let t;t=$localize`Browse path`;let e;e=$localize`Manually type path`;let n;n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let i;i=$localize` Create folder `;let o;o=$localize`Enter new folder path`;let l;l=$localize`Will be created as:`;let u;return u=$localize` Create folder ${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:folder-plus${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,i,o,l,u,[1,"type-b","small",3,"value"],[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"footer"],[1,"primary","raised","browse-files-toggle",3,"checked"],["shButton","","type","button",1,"small","create-folder",3,"disabled"],[1,"form-field"],[3,"isOpen","options"],[1,"type-b","small",3,"valueChange","value"],["type","button","value","browse"],["type","button","value","path"],["action","",3,"click"],[1,"icon"],[1,"primary"],[1,"text",3,"click"],[1,"small"],[1,"primary","raised","browse-files-toggle",3,"checkedChange","checked"],["shButton","","type","button",1,"small","create-folder",3,"click","disabled"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"wrap-box"],[1,"box"],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click","disabled"]]},template:function(e,n){if(e&1&&(V(Ze),v(0,rt,5,1,"sh-button-group",11),a(1,"div",12),S(2,0,["ngProjectAs","label",5,["label"]]),a(3,"div",13,0),v(5,st,1,0,"sh-progress-bar",14),X(6,Pt,3,2,"ng-template",null,1,ye)(8,Mt,1,0,"ng-container",15),d(),a(9,"div",16),v(10,bt,2,2,"sh-toggle",17),v(11,Nt,2,1,"button",18),d()(),a(12,"div",19,2)(14,"sh-form-field"),S(15,1,["ngProjectAs","label",5,["label"]]),S(16,2,["ngProjectAs","input",5,["input"]]),d()(),v(17,St,19,7,"sh-dialog",20)),e&2){let i=ge(7);F(!n.multiSelect()&&n.customRemoteMode()===null?0:-1),p(),B("hidden",n.pathDiscoveryMethod()!=="browse"),p(2),B("visualize-accepted",n.accepts()),p(2),F(n.isLoading()!=null?5:-1),p(3),T("ngTemplateOutlet",i)("ngTemplateOutletContext",le(15,Ue,le(13,tt,n.treeStructure()))),p(2),F(!n.accepts()&&!n.isByBackupSettings()&&n.customRemoteMode()===null?10:-1),p(),F(n.enableCreateFolder()&&n.customRemoteMode()===null?11:-1),p(),B("hidden",n.pathDiscoveryMethod()!=="path"),p(5),F(n.createFolderDialogOpen()?17:-1)}},dependencies:[ce,Le,We,De,J,Ae,Be,we,Re,H,G,z,j],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] sh-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;border:1px solid var(--base-4);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-1);position:relative}.browse-files[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-3);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:0;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:transparent;--list-active-bg: var(--primary-2)}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-4)}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%]{gap:.25rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:has(sh-icon:nth-child(2)){width:3rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].loading[_ngcontent-%COMP%]{opacity:.7}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:3rem;gap:.25rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon.file[_ngcontent-%COMP%]{width:3rem;padding:0 .25rem}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-9)}.hidden[_ngcontent-%COMP%]{display:none}.footer[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.box[_ngcontent-%COMP%]{border:1px solid var(--base-4);border-radius:var(--shape-3);padding:.5rem;background:var(--base-2)}.box[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:0}.wrap-box[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;margin-bottom:1rem}'],changeDetection:0})};var Ot=[[["label"]],[["","prefix",""]],[["","suffix",""]]],vt=["label","[prefix]","[suffix]"];function Ft(r,t){if(r&1&&P(0),r&2){let e=t.$implicit,n=_();re("",e.label,"",n.hasPerSecond()?"/s":"")}}var yt=["throttle-upload","throttle-download"],xt=[{value:"B",label:"Bytes"},{value:"KB",label:"KB"},{value:"MB",label:"MB"},{value:"GB",label:"GB"},{value:"TB",label:"TB"},{value:"PB",label:"PB"}],Rt=r=>{if(!r||typeof r!="string"||r.length===0)return{size:0,unit:"MB"};let t=r.match(/^(\d+)(bytes|kb|mb|gb|tb|pb|b|kib|mib|gib|tib|pib)$/i);return t&&(t[2].toUpperCase()==="B"||t[2].toUpperCase()==="BYTES")?{size:1,unit:"KB"}:{size:t?parseInt(t[1],10):0,unit:t?t[2].toUpperCase():"MB"}},qe=class r{customId=m();inputType=m();timespan=C(0);unit=C("MB");sizeOptions=C(xt);readonly=C(!1);hasPerSecond=O(()=>{let t=this.inputType();return t&&yt.includes(t)});onChange=()=>{};onTouched=()=>{};onChangeEffect=y(()=>{this.onChange(this.getValue())});writeValue(t){if(t){let e=Rt(t);e?queueMicrotask(()=>{this.timespan.set(e.size),this.unit.set(e.unit)}):(this.timespan.set(0),this.unit.set("MB"))}else this.timespan.set(0),this.unit.set("MB")}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.readonly.set(t)}getValue(){return`${this.timespan()}${this.unit()}`}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=W({type:r,selectors:[["app-size"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[se([{provide:ae,useExisting:r,multi:!0}])],ngContentSelectors:vt,decls:9,vars:10,consts:[[1,"label"],["type","number",3,"ngModelChange","id","ngModel","disabled"],["value","value","label","label",3,"options","readonly","isClearable"],["type","text",3,"ngModelChange","ngModel"]],template:function(e,n){e&1&&(V(Ot),a(0,"div",0),S(1,0,["ngProjectAs","label",5,["label"]]),d(),a(2,"sh-form-field")(3,"input",1),w("ngModelChange",function(o){return D(n.timespan,o)||(n.timespan=o),o}),d(),S(4,1),S(5,2),d(),a(6,"sh-select",2)(7,"input",3),w("ngModelChange",function(o){return D(n.unit,o)||(n.unit=o),o}),d(),X(8,Ft,1,2,"ng-template"),d()),e&2&&(p(2),ee("readonly",n.readonly()||void 0),p(),T("id",n.customId()),R("ngModel",n.timespan),T("disabled",n.readonly()),p(3),oe("--miw",0),T("options",n.sizeOptions())("readonly",n.readonly())("isClearable",!1),p(),R("ngModel",n.unit))},dependencies:[$e,J,H,G,de,z,j],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] sh-select[_ngcontent-%COMP%]{grid-area:unit}'],changeDetection:0})};var Dt=[[["label"]],[["","prefix",""]],[["","suffix",""]]],wt=["label","[prefix]","[suffix]"];function It(r,t){if(r&1){let e=L();a(0,"button",7),A("click",function(){let i=b(e).$implicit,o=_();return N(o.updateUnit(i.value))}),x(1,1),d()}if(r&2){let e=t.$implicit;p(),q(e.label),K(1)}}var Lt=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],At=[{value:"Y",label:$localize`Years`},{value:"M",label:$localize`Months`},{value:"W",label:$localize`Weeks`},{value:"D",label:$localize`Days`}],kt=["retry-delay","web-timeout","read-write-timeout","run-script-timeout","list-timeout","short-timeout"],Ke=class r{customId=m();inputType=m();timespan=C(0);#e="D";unit=C(this.#e);unitLabel=O(()=>{let t=this.timeOptions(),e=t.findIndex(n=>n.value===this.unit());return t[e]?.label??this.unit()});isShortTime=O(()=>{let t=this.inputType();return t&&kt.includes(t.replace("--",""))});timeOptions=O(()=>this.isShortTime()?Lt:At);readonly=C(!1);onChange=()=>{};onTouched=()=>{};onChangeEffect=y(()=>{this.onChange(this.getValue())});inputTypeEffect=y(()=>{let t=this.timeOptions(),e=this.isShortTime()?"s":"D";this.#e=e,this.unit.set(e)});updateUnit(t){this.unit.set(t)}writeValue(t){let e=this.isShortTime();if(t){let n=e?/(\d+)([smh])/i:/^(\d+)([YMWD])$/i,i=t.match(n);i?(this.timespan.set(parseInt(i[1],10)),this.unit.set(i[2])):(this.timespan.set(0),this.unit.set(this.#e))}else this.timespan.set(0),this.unit.set(this.#e)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.readonly.set(t)}getValue(){return`${this.timespan()}${this.unit()}`}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=W({type:r,selectors:[["app-timespan"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[se([{provide:ae,useExisting:r,multi:!0}])],ngContentSelectors:wt,decls:11,vars:6,consts:()=>{let t;t=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;return e=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`,[t,e,["type","number",3,"ngModelChange","id","ngModel","disabled"],[3,"openIndicator"],["shButton","","type","button",1,"trigger"],["menu",""],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"]]},template:function(e,n){e&1&&(V(Dt),S(0,0,["ngProjectAs","label",5,["label"]]),a(1,"sh-form-field")(2,"input",2),w("ngModelChange",function(o){return D(n.timespan,o)||(n.timespan=o),o}),d(),S(3,1),S(4,2),d(),a(5,"sh-menu",3)(6,"button",4),x(7,0),d(),Te(8,5),te(9,It,2,1,"button",6,Ee),Pe(),d()),e&2&&(p(),ee("readonly",n.readonly()||void 0),p(),T("id",n.customId()),R("ngModel",n.timespan),T("disabled",n.readonly()),p(3),T("openIndicator",!0),p(2),q(n.unitLabel()),K(7),p(2),ne(n.timeOptions()))},dependencies:[ke,J,H,G,de,z,j,ce],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] sh-menu[_ngcontent-%COMP%]{grid-area:unit}[_nghost-%COMP%] sh-menu[_ngcontent-%COMP%] button.trigger[_ngcontent-%COMP%]{width:100%}'],changeDetection:0})};export{he as a,Rt as b,qe as c,Ke as d};
@@ -1 +1 @@
1
- import{e as M}from"./chunk-I7HI454U.js";import{B as P}from"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import{e as E}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{$b as m,Bb as i,Cb as a,Eb as r,Fb as l,Gb as c,Ra as C,Tb as d,Z as u,_b as h,eb as g,lc as T,ub as f,vb as O}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var L=["*",[["","footer",""]]],v=["*","[footer]"],s=class t{static \u0275fac=function(e){return new(e||t)};static \u0275cmp=g({type:t,selectors:[["app-custom-card"]],ngContentSelectors:v,decls:11,vars:0,consts:[[1,"card"],["src","/assets/noise/auth-noise.svg",1,"noise"],[1,"header-title"],["src","/assets/duplicati/duplicati.svg","alt",""],[1,"bg"]],template:function(e,o){e&1&&(h(L),r(0,"div",0),c(1,"img",1),r(2,"header")(3,"div",2),c(4,"img",3),T(5," Duplicati "),l()(),r(6,"main"),m(7),r(8,"footer"),m(9,1),l()()(),c(10,"div",4))},styles:['[_nghost-%COMP%]{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center;background-color:var(--base-2)}body.dark [_nghost-%COMP%] .card[_ngcontent-%COMP%]:before{background:radial-gradient(rgba(var(--primary-rgb-900),1),#0000 60%)}.card[_ngcontent-%COMP%]{max-width:30rem;width:100%;position:relative;z-index:100;background-color:var(--base-1);border-radius:var(--shape-5);box-shadow:var(--box-shadow-40);border:1px solid var(--base-3);overflow:hidden}.card[_ngcontent-%COMP%]:before{content:"";position:absolute;height:30rem;transform:translateY(-17.8125rem);left:0;right:0;z-index:-2;background:radial-gradient(rgb(from var(--primary-1) r g b/1),#0000 60%)}.card[_ngcontent-%COMP%] img.noise[_ngcontent-%COMP%]{position:absolute;height:30rem;width:100%;transform:translateY(-17.8125rem);left:0;right:0;z-index:-1;-webkit-mask-image:radial-gradient(#000,#0000 60%);mask-image:radial-gradient(#000,#0000 60%)}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 0;gap:.75rem;position:relative;z-index:10}.header-title[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;gap:.625rem}.header-title[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1.75rem;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3))}main[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:2rem;gap:2.5rem;position:relative;z-index:10}main[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{font:var(--paragraph-40);color:var(--base-9);text-align:center;text-wrap:balance}.bg[_ngcontent-%COMP%]{position:fixed;inset:0;width:100vw;height:100vh;background-image:url(/assets/backgrounds/base-bg.svg);background-size:cover;background-position:center;background-repeat:no-repeat}body.dark[_ngcontent-%COMP%] .bg[_ngcontent-%COMP%]{opacity:1}footer[_ngcontent-%COMP%]:empty{display:none}'],changeDetection:0})};function N(t,n){t&1&&(i(0,"h3"),d(1,0),a())}function y(t,n){t&1&&(i(0,"h3"),d(1,1),a(),i(2,"button",3),d(3,2),a())}var p=class t{#e=u(M);isLoggingOut=this.#e.isLoggingOut;ngOnInit(){this.#e.logout()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=g({type:t,selectors:[["app-logout"]],decls:3,vars:1,consts:()=>{let n;n=$localize`Logging out...`;let e;e=$localize`You have successfully logged out your being redirected to login page.`;let o;return o=$localize`Go to login page`,[n,e,o,["shButton","","routerLink","/",1,"raised","primary"]]},template:function(e,o){e&1&&(i(0,"app-custom-card"),f(1,N,2,0,"h3")(2,y,4,0),a()),e&2&&(C(),O(o.isLoggingOut()?1:2))},dependencies:[s,P,E],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{p as default};
1
+ import{e as M}from"./chunk-AZRNX5LU.js";import{B as P}from"./chunk-NCXKMSRH.js";import"./chunk-QAQMMCTH.js";import{e as E}from"./chunk-KHZ5AXGT.js";import"./chunk-L2QOWZDR.js";import"./chunk-BRL4YYWO.js";import"./chunk-BDQJFOCO.js";import"./chunk-FSHBOASN.js";import{Db as i,Eb as a,Gb as r,Hb as l,Ib as c,Sa as C,Vb as d,_ as u,ac as h,bc as m,gb as g,nc as T,wb as f,xb as O}from"./chunk-UH2E7MMT.js";import"./chunk-7CGTOI24.js";var L=["*",[["","footer",""]]],v=["*","[footer]"],s=class t{static \u0275fac=function(e){return new(e||t)};static \u0275cmp=g({type:t,selectors:[["app-custom-card"]],ngContentSelectors:v,decls:11,vars:0,consts:[[1,"card"],["src","/assets/noise/auth-noise.svg",1,"noise"],[1,"header-title"],["src","/assets/duplicati/duplicati.svg","alt",""],[1,"bg"]],template:function(e,o){e&1&&(h(L),r(0,"div",0),c(1,"img",1),r(2,"header")(3,"div",2),c(4,"img",3),T(5," Duplicati "),l()(),r(6,"main"),m(7),r(8,"footer"),m(9,1),l()()(),c(10,"div",4))},styles:['[_nghost-%COMP%]{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center;background-color:var(--base-2)}body.dark [_nghost-%COMP%] .card[_ngcontent-%COMP%]:before{background:radial-gradient(rgba(var(--primary-rgb-900),1),#0000 60%)}.card[_ngcontent-%COMP%]{max-width:30rem;width:100%;position:relative;z-index:100;background-color:var(--base-1);border-radius:var(--shape-5);box-shadow:var(--box-shadow-40);border:1px solid var(--base-3);overflow:hidden}.card[_ngcontent-%COMP%]:before{content:"";position:absolute;height:30rem;transform:translateY(-17.8125rem);left:0;right:0;z-index:-2;background:radial-gradient(rgb(from var(--primary-1) r g b/1),#0000 60%)}.card[_ngcontent-%COMP%] img.noise[_ngcontent-%COMP%]{position:absolute;height:30rem;width:100%;transform:translateY(-17.8125rem);left:0;right:0;z-index:-1;-webkit-mask-image:radial-gradient(#000,#0000 60%);mask-image:radial-gradient(#000,#0000 60%)}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 0;gap:.75rem;position:relative;z-index:10}.header-title[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;gap:.625rem}.header-title[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1.75rem;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3))}main[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:2rem;gap:2.5rem;position:relative;z-index:10}main[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{font:var(--paragraph-40);color:var(--base-9);text-align:center;text-wrap:balance}.bg[_ngcontent-%COMP%]{position:fixed;inset:0;width:100vw;height:100vh;background-image:url(/assets/backgrounds/base-bg.svg);background-size:cover;background-position:center;background-repeat:no-repeat}body.dark[_ngcontent-%COMP%] .bg[_ngcontent-%COMP%]{opacity:1}footer[_ngcontent-%COMP%]:empty{display:none}'],changeDetection:0})};function N(t,n){t&1&&(i(0,"h3"),d(1,0),a())}function y(t,n){t&1&&(i(0,"h3"),d(1,1),a(),i(2,"button",3),d(3,2),a())}var p=class t{#e=u(M);isLoggingOut=this.#e.isLoggingOut;ngOnInit(){this.#e.logout()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=g({type:t,selectors:[["app-logout"]],decls:3,vars:1,consts:()=>{let n;n=$localize`Logging out...`;let e;e=$localize`You have successfully logged out your being redirected to login page.`;let o;return o=$localize`Go to login page`,[n,e,o,["shButton","","routerLink","/",1,"raised","primary"]]},template:function(e,o){e&1&&(i(0,"app-custom-card"),f(1,N,2,0,"h3")(2,y,4,0),a()),e&2&&(C(),O(o.isLoggingOut()?1:2))},dependencies:[s,P,E],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{p as default};
@@ -0,0 +1 @@
1
+ import{a as Z}from"./chunk-7FDLOZXV.js";import{a as Q}from"./chunk-EQNDYV43.js";import"./chunk-35APLYI4.js";import{a as Y}from"./chunk-YMUS7QSB.js";import"./chunk-ZXQSQRKN.js";import"./chunk-XZNYCTQB.js";import"./chunk-R6TFME5I.js";import"./chunk-AZRNX5LU.js";import{B as K,C as j,H,L as q,c as G,e as W,i as V,s as J,v as X,w as z}from"./chunk-NCXKMSRH.js";import"./chunk-QAQMMCTH.js";import{d as B,e as U}from"./chunk-KHZ5AXGT.js";import"./chunk-L2QOWZDR.js";import"./chunk-BRL4YYWO.js";import"./chunk-BDQJFOCO.js";import"./chunk-FSHBOASN.js";import{$b as a,Cb as x,Db as r,Eb as l,Fb as T,Fc as A,Mb as h,Qc as R,Rc as O,Sa as s,Tb as S,Ub as P,Vb as p,Xc as I,Yb as k,Zb as E,_ as f,da as m,ea as F,gb as D,ja as b,mc as w,nc as d,pa as N,ra as y,sc as L,tc as $,uc as v,wb as c,xb as _}from"./chunk-UH2E7MMT.js";import"./chunk-7CGTOI24.js";var ee=(n,t,e,i,o)=>({"loading-state":n,"ready-to-add-link":t,"is-connected":e,"failed-to-connect":i,"is-registered":o});function te(n,t){n&1&&p(0,0,1)}function ne(n,t){n&1&&p(0,0,2)}function ie(n,t){if(n&1){let e=h();r(0,"button",10),E("click",function(){m(e);let o=a(2);return F(o.cancel())}),d(1,"Cancel registration"),l()}}function oe(n,t){if(n&1&&(r(0,"div",7)(1,"p"),S(2,0),c(3,te,1,0)(4,ne,1,0),P(),l(),T(5,"sh-progress-bar",8),c(6,ie,2,0,"button",9),l()),n&2){let e=a();s(3),_(e.state()==="unknown"?3:4),s(3),_((e.registeringCounter()??0)>=5&&e.state()==="registering"?6:-1)}}function re(n,t){if(n&1){let e=h();r(0,"sh-form-field")(1,"label",11),p(2,1),l(),r(3,"input",12),v("ngModelChange",function(o){m(e);let C=a();return $(C.customRegisterUrl,o)||(C.customRegisterUrl=o),F(o)}),l()(),r(4,"div",13)(5,"button",14),d(6,"Go back"),l(),r(7,"button",15),E("click",function(){m(e);let o=a();return F(o.registerViaCustomUrl())}),p(8,2),l()()}if(n&2){let e=a();s(3),L("ngModel",e.customRegisterUrl),s(4),x("disabled",!e.customRegisterUrlValid())}}function le(n,t){if(n&1){let e=h();r(0,"p"),p(1,3),l(),T(2,"sh-progress-bar",8),r(3,"button",10),E("click",function(){m(e);let o=a(2);return F(o.retryWhenFaulted())}),d(4,"Cancel"),l()}}function se(n,t){if(n&1){let e=h();r(0,"p"),p(1,4),l(),r(2,"button",10),E("click",function(){m(e);let o=a(2);return F(o.retryWhenFaulted())}),d(3,"Retry"),l()}}function ae(n,t){if(n&1&&c(0,le,5,0)(1,se,4,0),n&2){let e=a();_(e.claimUrl()!==null?0:1)}}function ce(n,t){n&1&&(S(0,5,1),T(1,"p"),P())}function _e(n,t){n&1&&(S(0,5,2),T(1,"p"),P())}function de(n,t){if(n&1){let e=h();r(0,"sh-alert",16),S(1,5),c(2,ce,2,0,"p")(3,_e,2,0,"p"),P(),l(),r(4,"button",10),E("click",function(){m(e);let o=a();return F(o.retryWhenFaulted())}),d(5," Retry "),r(6,"sh-icon"),d(7,"arrow-arc-left"),l()()}if(n&2){let e=a();s(2),_(e.typeParam()==="link"?2:3)}}function Ce(n,t){n&1&&(r(0,"h3"),d(1,"Successfully connected"),l(),r(2,"p"),d(3,"We're going to redirect you to the home page"),l())}var M=class n{#n=f(B);#l=f(Q);#e=f(Z);#i=f(Y);isOldOpen=N(!1);typeParam=I.required();state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;customRegisterUrl=this.#e.customRegisterUrl;additionalReportingUrl=O(()=>{let t=this.#i.serverSettings();return this.#e.state()==="inactive"?"":t&&t["additional-report-url"]||""});copiedReportingUrl=N(!1);customRegisterUrlValid=O(()=>{let t=this.customRegisterUrl(),e=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/;return!(t.length===0||!e.test(t))});registeringCounter=N(null);didTry=!1;triedFinishConnection=!1;#t=null;#s=f(b);constructor(){this.#s.onDestroy(()=>{this.#r()})}stateEffect=y(()=>{let t=this.#e.registerUrl(),e=this.state(),i=this.typeParam();e==="inactive"&&i==="logon"&&t!==""&&(this.didTry||(this.didTry=!0,queueMicrotask(()=>this.#e.beginRemoteRegistration()))),e==="registered"&&(this.triedFinishConnection||R(()=>this.claimUrl())!==null&&(this.triedFinishConnection=!0,this.#a())),e==="registering"?R(()=>{this.registeringCounter()===null&&this.registeringCounter.set(0),this.#o()}):(this.#r(),R(()=>this.registeringCounter.set(null))),(e==="connected"||e==="disabled"||e==="connecting")&&queueMicrotask(()=>{this.#i.setShownWelcomePage().subscribe(()=>{this.#n.navigate([""])})})});#o(){this.#t!==null&&clearTimeout(this.#t),this.#t=setTimeout(()=>{this.#t=null;let t=this.registeringCounter()??0;this.registeringCounter.set(t+1),this.state()==="registering"&&this.#o()},1e3)}#r(){this.#t!==null&&(clearTimeout(this.#t),this.#t=null)}ngOnInit(){this.#e.refreshRemoteControlStatus()}#a(){let t=this.#e.claimUrl();this.#l.open(`${t}?closeAfterConnection=true`,"_blank")}registerViaCustomUrl(){this.#e.beginRemoteRegistration(!0)}retryWhenFaulted(){this.#e.cancelRemoteRegistration(),this.customRegisterUrl.set(""),this.didTry=!1,this.triedFinishConnection=!1,this.typeParam()==="logon"&&this.#n.navigate(["/welcome/select"])}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let t=this.additionalReportingUrl();t&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(t))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=D({type:n,selectors:[["app-connect"]],inputs:{typeParam:[1,"typeParam"]},decls:6,vars:13,consts:()=>{let t;t=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Loading... ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE: Connecting to console ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let e;e=$localize`Paste registration URL here`;let i;i=$localize` Connect machine to console `;let o;o=$localize`We're now connecting you to the console`;let C;C=$localize`Something failed during registration we're missing claimUrl, please try again`;let u;return u=$localize` Failed to register ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: Check if the connection link are correct, alternatively it could be your internet connection or the service might be down ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: There might be a problem with your internet connection or the service might be down, please try again later ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,u=k(u),[t,e,i,o,C,u,[1,"main-card","type-b"],[1,"loader-content"],[1,"primary","indeterminate"],["shButton",""],["shButton","",3,"click"],["for","remoteControlRegisterUrl"],["type","text","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],[1,"nav-buttons"],["type","button","shButton","","routerLink","/welcome",1,"raised"],["type","button","shButton","",1,"raised","primary",3,"click","disabled"],[1,"error"]]},template:function(e,i){if(e&1&&(r(0,"sh-card",6),c(1,oe,7,2,"div",7),c(2,re,9,2),c(3,ae,2,1),c(4,de,8,1),c(5,Ce,4,0),l()),e&2){let o=i.state()==="unknown"||i.typeParam()!=="link"&&i.state()==="inactive"||i.state()==="registering",C=i.typeParam()==="link"&&i.state()==="inactive",u=i.state()==="connected"||i.state()==="disabled"||i.state()==="connecting",g=i.state()==="registeringfaulted";w(A(7,ee,o,C,u,g,i.state()==="registered")),s(),_(o?1:-1),s(),_(C?2:-1),s(),_(i.state()==="registered"?3:-1),s(),_(g?4:-1),s(),_(u?5:-1)}},dependencies:[U,J,G,W,V,H,K,q,j,z,X],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:100%;width:100%;flex:1 0;overflow:hidden;padding:2rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{padding:1rem}}.main-card[_ngcontent-%COMP%]{width:100%;height:100%;max-width:31.25rem;max-height:min-content;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1rem;padding:2rem}.main-card.failed-to-connect[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}.main-card.failed-to-connect[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.main-card.is-registered[_ngcontent-%COMP%], .main-card.is-connected[_ngcontent-%COMP%]{align-items:center}.loader-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;width:100%}.loader-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{--pb-b: var(--base-3);border:1px solid var(--pb-b)}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}.state[_ngcontent-%COMP%]{position:fixed;top:1rem;right:1rem;margin:0;color:var(--base-7);font-size:.75rem}.old[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative;gap:.5rem;padding:1rem;border:1px solid var(--base-4);background:var(--base-1);position:fixed;top:0;right:0;bottom:0;width:35rem;transform:translate(100%)}.old.open[_ngcontent-%COMP%]{transform:translate(0)}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:.5rem;cursor:pointer;position:absolute;background-color:var(--base-1);border:1px solid var(--base-4);border-width:.0625rem 0 .0625rem .0625rem;width:2rem;height:2.5rem;border-radius:var(--shape-2) 0 0 var(--shape-2);top:3.75rem;left:-2rem;-webkit-user-select:none;user-select:none}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.nav-buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;flex-direction:row}"],changeDetection:0})};export{M as default};
@@ -1 +1 @@
1
- import{a as O,d as y}from"./chunk-NBTTYKXH.js";import{K as g,U as c,Y as A,l as f,m,p as R,v as D,z as k}from"./chunk-ERITO7WM.js";import{a as l,b as I}from"./chunk-7CGTOI24.js";var P=class{_fns;constructor(){this._fns=[]}eject(e){let p=this._fns.indexOf(e);p!==-1&&(this._fns=[...this._fns.slice(0,p),...this._fns.slice(p+1)])}use(e){this._fns=[...this._fns,e]}},t={BASE:"",CREDENTIALS:"include",ENCODE_PATH:void 0,HEADERS:void 0,PASSWORD:void 0,TOKEN:void 0,USERNAME:void 0,VERSION:"1",WITH_CREDENTIALS:!1,interceptors:{response:new P}};var d=class extends Error{url;status;statusText;body;request;constructor(e,p,r){super(r),this.name="ApiError",this.url=p.url,this.status=p.status,this.statusText=p.statusText,this.body=p.body,this.request=e}};var h=i=>typeof i=="string",v=i=>h(i)&&i!=="",T=i=>i instanceof Blob,S=i=>i instanceof FormData,L=i=>{try{return btoa(i)}catch{return Buffer.from(i).toString("base64")}},w=i=>{let e=[],p=(a,n)=>{e.push(`${encodeURIComponent(a)}=${encodeURIComponent(String(n))}`)},r=(a,n)=>{n!=null&&(n instanceof Date?p(a,n.toISOString()):Array.isArray(n)?n.forEach(o=>r(a,o)):typeof n=="object"?Object.entries(n).forEach(([o,u])=>r(`${a}[${o}]`,u)):p(a,n))};return Object.entries(i).forEach(([a,n])=>r(a,n)),e.length?`?${e.join("&")}`:""},F=(i,e)=>{let p=i.ENCODE_PATH||encodeURI,r=e.url.replace("{api-version}",i.VERSION).replace(/{(.*?)}/g,(n,o)=>e.path?.hasOwnProperty(o)?p(String(e.path[o])):n),a=i.BASE+r;return e.query?a+w(e.query):a},j=i=>{if(i.formData){let e=new FormData,p=(r,a)=>{h(a)||T(a)?e.append(r,a):e.append(r,JSON.stringify(a))};return Object.entries(i.formData).filter(([,r])=>r!=null).forEach(([r,a])=>{Array.isArray(a)?a.forEach(n=>p(r,n)):p(r,a)}),e}},V=async(i,e)=>typeof e=="function"?e(i):e,U=(i,e)=>D({token:V(e,i.TOKEN),username:V(e,i.USERNAME),password:V(e,i.PASSWORD),additionalHeaders:V(e,i.HEADERS)}).pipe(R(({token:p,username:r,password:a,additionalHeaders:n})=>{let o=Object.entries(l(l({Accept:"application/json"},n),e.headers)).filter(([,u])=>u!=null).reduce((u,[B,b])=>I(l({},u),{[B]:String(b)}),{});if(v(p)&&(o.Authorization=`Bearer ${p}`),v(r)&&v(a)){let u=L(`${r}:${a}`);o.Authorization=`Basic ${u}`}return e.body!==void 0&&(e.mediaType?o["Content-Type"]=e.mediaType:T(e.body)?o["Content-Type"]=e.body.type||"application/octet-stream":h(e.body)?o["Content-Type"]="text/plain":S(e.body)||(o["Content-Type"]="application/json")),new O(o)})),H=i=>{if(i.body)return i.mediaType?.includes("application/json")||i.mediaType?.includes("+json")?JSON.stringify(i.body):h(i.body)||T(i.body)||S(i.body)?i.body:JSON.stringify(i.body)},N=(i,e,p,r,a,n,o)=>p.request(e.method,r,{headers:o,body:a??n,withCredentials:i.WITH_CREDENTIALS,observe:"response"}),M=(i,e)=>{if(e){let p=i.headers.get(e);if(h(p))return p}},z=i=>{if(i.status!==204&&i.body!==null)return i.body},W=(i,e)=>{let r=l({400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"Im a teapot",421:"Misdirected Request",422:"Unprocessable Content",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"},i.errors)[e.status];if(r)throw new d(i,e,r);if(!e.ok){let a=e.status??"unknown",n=e.statusText??"unknown",o=(()=>{try{return JSON.stringify(e.body,null,2)}catch{return}})();throw new d(i,e,`Generic Error: status: ${a}; status text: ${n}; body: ${o}`)}},s=(i,e,p)=>{let r=F(i,p),a=j(p),n=H(p);return U(i,p).pipe(g(o=>N(i,p,e,r,n,a,o)),g(async o=>{for(let x of i.interceptors.response._fns)o=await x(o);let u=z(o),B=M(o,p.responseHeader),b=u;return p.responseTransformer&&o.ok&&(b=await p.responseTransformer(u)),{url:r,ok:o.ok,status:o.status,statusText:o.statusText,body:B??b}}),k(o=>o.status?f({url:r,ok:o.ok,status:o.status,statusText:o.statusText,body:o.error??o.statusText}):m(()=>o)),R(o=>(W(p,o),o.body)),k(o=>m(()=>o)))};var G=class i{constructor(e){this.http=e}getApiV1Commandline(){return s(t,this.http,{method:"GET",url:"/api/v1/commandline"})}static \u0275fac=function(p){return new(p||i)(A(y))};static \u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})},E=class i{constructor(e){this.http=e}getApiV2ConnectionStrings(){return s(t,this.http,{method:"GET",url:"/api/v2/connection-strings"})}postApiV2ConnectionStrings(e){return s(t,this.http,{method:"POST",url:"/api/v2/connection-strings",body:e.requestBody,mediaType:"application/json"})}getApiV2ConnectionStringById(e){return s(t,this.http,{method:"GET",url:"/api/v2/connection-string/{id}",path:{id:e.id}})}putApiV2ConnectionStringById(e){return s(t,this.http,{method:"PUT",url:"/api/v2/connection-string/{id}",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}deleteApiV2ConnectionStringById(e){return s(t,this.http,{method:"DELETE",url:"/api/v2/connection-string/{id}",path:{id:e.id}})}postApiV2ConnectionStringByIdUpdateBackups(e){return s(t,this.http,{method:"POST",url:"/api/v2/connection-string/{id}/update-backups",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}static \u0275fac=function(p){return new(p||i)(A(y))};static \u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})},C=class i{constructor(e){this.http=e}postApiV1Commandline(e){return s(t,this.http,{method:"POST",url:"/api/v1/commandline",body:e.requestBody,mediaType:"application/json"})}getApiV1Acknowledgements(){return s(t,this.http,{method:"GET",url:"/api/v1/acknowledgements"})}postApiV1AuthRefresh(e={}){return s(t,this.http,{method:"POST",url:"/api/v1/auth/refresh",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthSignin(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/signin",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthLogin(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/login",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuesignintoken(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issuesignintoken",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthRefreshLogout(e={}){return s(t,this.http,{method:"POST",url:"/api/v1/auth/refresh/logout",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuetokenByOperation(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issuetoken/{operation}",path:{operation:e.operation}})}postApiV1AuthIssueForeverToken(){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issue-forever-token"})}postApiV1AuthStatus(){return s(t,this.http,{method:"POST",url:"/api/v1/auth/status"})}getApiV1Backupdefaults(){return s(t,this.http,{method:"GET",url:"/api/v1/backupdefaults"})}getApiV1Backups(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/backups",query:{orderBy:e.orderBy}})}postApiV1Backups(e){return s(t,this.http,{method:"POST",url:"/api/v1/backups",query:{temporary:e.temporary,existingdb:e.existingdb},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupsImport(e){return s(t,this.http,{method:"POST",url:"/api/v1/backups/import",body:e.requestBody,mediaType:"application/json"})}getApiV1BugreportByReportid(e){return s(t,this.http,{method:"GET",url:"/api/v1/bugreport/{reportid}",path:{reportid:e.reportid},query:{token:e.token}})}getApiV1Changelog(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/changelog",query:{"from-update":e.fromUpdate}})}getApiV1CommandlineByRunid(e){return s(t,this.http,{method:"GET",url:"/api/v1/commandline/{runid}",path:{runid:e.runid},query:{offset:e.offset,pagesize:e.pagesize}})}postApiV1CommandlineByRunidAbort(e){return s(t,this.http,{method:"POST",url:"/api/v1/commandline/{runid}/abort",path:{runid:e.runid}})}postApiV1Filesystem(e){return s(t,this.http,{method:"POST",url:"/api/v1/filesystem",query:{onlyFolders:e.onlyFolders,showHidden:e.showHidden},body:e.requestBody,mediaType:"application/json"})}postApiV1FilesystemValidate(e){return s(t,this.http,{method:"POST",url:"/api/v1/filesystem/validate",body:e.requestBody,mediaType:"application/json"})}getApiV1Licenses(){return s(t,this.http,{method:"GET",url:"/api/v1/licenses"})}getApiV1LogdataPoll(e){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/poll",query:{level:e.level,id:e.id,pagesize:e.pagesize}})}getApiV1LogdataLog(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/log",query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1LogdataCrashlog(){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/crashlog"})}getApiV1NotificationById(e){return s(t,this.http,{method:"GET",url:"/api/v1/notification/{id}",path:{id:e.id}})}deleteApiV1NotificationById(e){return s(t,this.http,{method:"DELETE",url:"/api/v1/notification/{id}",path:{id:e.id}})}getApiV1Notifications(){return s(t,this.http,{method:"GET",url:"/api/v1/notifications"})}getApiV1Progressstate(){return s(t,this.http,{method:"GET",url:"/api/v1/progressstate"})}getApiV1RemotecontrolStatus(){return s(t,this.http,{method:"GET",url:"/api/v1/remotecontrol/status"})}postApiV1RemoteoperationDbpath(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/dbpath",body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationTest(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/test",query:{autocreate:e.autocreate,type:e.type},body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationCreate(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/create",body:e.requestBody,mediaType:"application/json"})}getApiV1Serversettings(){return s(t,this.http,{method:"GET",url:"/api/v1/serversettings"})}patchApiV1Serversettings(e){return s(t,this.http,{method:"PATCH",url:"/api/v1/serversettings",body:e.requestBody,mediaType:"application/json"})}getApiV1ServersettingByKey(e){return s(t,this.http,{method:"GET",url:"/api/v1/serversetting/{key}",path:{key:e.key}})}putApiV1ServersettingByKey(e){return s(t,this.http,{method:"PUT",url:"/api/v1/serversetting/{key}",path:{key:e.key},body:e.requestBody,mediaType:"application/json"})}getApiV1Serverstate(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/serverstate",query:{lastEventId:e.lastEventId,longpoll:e.longpoll,duration:e.duration}})}postApiV1ServerstatePause(e={}){return s(t,this.http,{method:"POST",url:"/api/v1/serverstate/pause",query:{duration:e.duration,pauseTransfers:e.pauseTransfers}})}postApiV1ServerstateResume(){return s(t,this.http,{method:"POST",url:"/api/v1/serverstate/resume"})}getApiV1Systeminfo(){return s(t,this.http,{method:"GET",url:"/api/v1/systeminfo"})}getApiV1SysteminfoFiltergroups(){return s(t,this.http,{method:"GET",url:"/api/v1/systeminfo/filtergroups"})}getApiV1Tasks(){return s(t,this.http,{method:"GET",url:"/api/v1/tasks"})}getApiV1TaskByTaskid(e){return s(t,this.http,{method:"GET",url:"/api/v1/task/{taskid}",path:{taskid:e.taskid}})}postApiV1TaskByTaskidStop(e){return s(t,this.http,{method:"POST",url:"/api/v1/task/{taskid}/stop",path:{taskid:e.taskid}})}postApiV1TaskByTaskidAbort(e){return s(t,this.http,{method:"POST",url:"/api/v1/task/{taskid}/abort",path:{taskid:e.taskid}})}getApiV1Uisettings(){return s(t,this.http,{method:"GET",url:"/api/v1/uisettings"})}postApiV1Uisettings(e){return s(t,this.http,{method:"POST",url:"/api/v1/uisettings",body:e.requestBody,mediaType:"application/json"})}getApiV1UisettingsByScheme(e){return s(t,this.http,{method:"GET",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme}})}patchApiV1UisettingsByScheme(e){return s(t,this.http,{method:"PATCH",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme},body:e.requestBody,mediaType:"application/json"})}postApiV1UpdatesCheck(){return s(t,this.http,{method:"POST",url:"/api/v1/updates/check"})}postApiV1WebmoduleByModulekey(e){return s(t,this.http,{method:"POST",url:"/api/v1/webmodule/{modulekey}",path:{modulekey:e.modulekey},body:e.requestBody,mediaType:"application/json"})}getApiV1BackupById(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}",path:{id:e.id}})}putApiV1BackupById(e){return s(t,this.http,{method:"PUT",url:"/api/v1/backup/{id}",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}deleteApiV1BackupById(e){return s(t,this.http,{method:"DELETE",url:"/api/v1/backup/{id}",path:{id:e.id},query:{"delete-remote-files":e.deleteRemoteFiles,"delete-local-db":e.deleteLocalDb,force:e.force}})}getApiV1BackupByIdFiles(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/files",path:{id:e.id},query:{filter:e.filter,time:e.time,"all-versions":e.allVersions,"prefix-only":e.prefixOnly,"folder-contents":e.folderContents}})}getApiV1BackupByIdLog(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/log",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdRemotelog(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/remotelog",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdFilesets(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/filesets",path:{id:e.id},query:{"include-metadata":e.includeMetadata,"from-remote-only":e.fromRemoteOnly}})}getApiV1BackupByIdExportArgsonly(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-argsonly",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExportCmdline(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-cmdline",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExport(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase,token:e.token}})}getApiV1BackupByIdIsdbusedelsewhere(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/isdbusedelsewhere",path:{id:e.id}})}getApiV1BackupByIdIsactive(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/isactive",path:{id:e.id}})}postApiV1BackupByIdDeletedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/deletedb",path:{id:e.id}})}postApiV1BackupByIdMovedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/movedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdUpdatedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/updatedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRestore(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/restore",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdCreatereport(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/createreport",path:{id:e.id}})}postApiV1BackupByIdRepair(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/repair",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRepairupdate(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/repairupdate",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdVacuum(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/vacuum",path:{id:e.id}})}postApiV1BackupByIdVerify(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/verify",path:{id:e.id}})}postApiV1BackupByIdCompact(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/compact",path:{id:e.id}})}postApiV1BackupByIdStart(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/start",path:{id:e.id},query:{skipQueue:e.skipQueue}})}postApiV1BackupByIdRun(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/run",path:{id:e.id},query:{skipQueue:e.skipQueue}})}postApiV1BackupByIdReportRemoteSize(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/report-remote-size",path:{id:e.id}})}postApiV1BackupByIdCopytotemp(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/copytotemp",path:{id:e.id}})}postApiV1RemotecontrolEnable(){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/enable"})}postApiV1RemotecontrolDisable(){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/disable"})}deleteApiV1RemotecontrolRegistration(){return s(t,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/registration"})}postApiV1RemotecontrolRegister(e){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/register",body:e.requestBody,mediaType:"application/json"})}deleteApiV1RemotecontrolRegister(){return s(t,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/register"})}postApiV1RemotecontrolRegisterWait(){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/register/wait"})}postApiV2SystemTempDiskSpace(e){return s(t,this.http,{method:"POST",url:"/api/v2/system/temp-disk-space",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListFilesets(e){return s(t,this.http,{method:"POST",url:"/api/v2/backup/list-filesets",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListFolder(e){return s(t,this.http,{method:"POST",url:"/api/v2/backup/list-folder",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListVersions(e){return s(t,this.http,{method:"POST",url:"/api/v2/backup/list-versions",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupSearch(e){return s(t,this.http,{method:"POST",url:"/api/v2/backup/search",body:e.requestBody,mediaType:"application/json"})}postApiV2DestinationTest(e){return s(t,this.http,{method:"POST",url:"/api/v2/destination/test",body:e.requestBody,mediaType:"application/json"})}static \u0275fac=function(p){return new(p||i)(A(y))};static \u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})},q=class i{constructor(e){this.http=e}getApiV1Webmodules(){return s(t,this.http,{method:"GET",url:"/api/v1/webmodules"})}static \u0275fac=function(p){return new(p||i)(A(y))};static \u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})};export{t as a,G as b,E as c,C as d,q as e};
1
+ import{a as O,d as y}from"./chunk-BRL4YYWO.js";import{A as k,L as g,V as c,Z as A,l as f,m,q as R,w as D}from"./chunk-UH2E7MMT.js";import{a as l,b as I}from"./chunk-7CGTOI24.js";var P=class{_fns;constructor(){this._fns=[]}eject(e){let p=this._fns.indexOf(e);p!==-1&&(this._fns=[...this._fns.slice(0,p),...this._fns.slice(p+1)])}use(e){this._fns=[...this._fns,e]}},t={BASE:"",CREDENTIALS:"include",ENCODE_PATH:void 0,HEADERS:void 0,PASSWORD:void 0,TOKEN:void 0,USERNAME:void 0,VERSION:"1",WITH_CREDENTIALS:!1,interceptors:{response:new P}};var d=class extends Error{url;status;statusText;body;request;constructor(e,p,r){super(r),this.name="ApiError",this.url=p.url,this.status=p.status,this.statusText=p.statusText,this.body=p.body,this.request=e}};var h=i=>typeof i=="string",v=i=>h(i)&&i!=="",T=i=>i instanceof Blob,S=i=>i instanceof FormData,L=i=>{try{return btoa(i)}catch{return Buffer.from(i).toString("base64")}},w=i=>{let e=[],p=(a,n)=>{e.push(`${encodeURIComponent(a)}=${encodeURIComponent(String(n))}`)},r=(a,n)=>{n!=null&&(n instanceof Date?p(a,n.toISOString()):Array.isArray(n)?n.forEach(o=>r(a,o)):typeof n=="object"?Object.entries(n).forEach(([o,u])=>r(`${a}[${o}]`,u)):p(a,n))};return Object.entries(i).forEach(([a,n])=>r(a,n)),e.length?`?${e.join("&")}`:""},F=(i,e)=>{let p=i.ENCODE_PATH||encodeURI,r=e.url.replace("{api-version}",i.VERSION).replace(/{(.*?)}/g,(n,o)=>e.path?.hasOwnProperty(o)?p(String(e.path[o])):n),a=i.BASE+r;return e.query?a+w(e.query):a},j=i=>{if(i.formData){let e=new FormData,p=(r,a)=>{h(a)||T(a)?e.append(r,a):e.append(r,JSON.stringify(a))};return Object.entries(i.formData).filter(([,r])=>r!=null).forEach(([r,a])=>{Array.isArray(a)?a.forEach(n=>p(r,n)):p(r,a)}),e}},V=async(i,e)=>typeof e=="function"?e(i):e,U=(i,e)=>D({token:V(e,i.TOKEN),username:V(e,i.USERNAME),password:V(e,i.PASSWORD),additionalHeaders:V(e,i.HEADERS)}).pipe(R(({token:p,username:r,password:a,additionalHeaders:n})=>{let o=Object.entries(l(l({Accept:"application/json"},n),e.headers)).filter(([,u])=>u!=null).reduce((u,[B,b])=>I(l({},u),{[B]:String(b)}),{});if(v(p)&&(o.Authorization=`Bearer ${p}`),v(r)&&v(a)){let u=L(`${r}:${a}`);o.Authorization=`Basic ${u}`}return e.body!==void 0&&(e.mediaType?o["Content-Type"]=e.mediaType:T(e.body)?o["Content-Type"]=e.body.type||"application/octet-stream":h(e.body)?o["Content-Type"]="text/plain":S(e.body)||(o["Content-Type"]="application/json")),new O(o)})),H=i=>{if(i.body)return i.mediaType?.includes("application/json")||i.mediaType?.includes("+json")?JSON.stringify(i.body):h(i.body)||T(i.body)||S(i.body)?i.body:JSON.stringify(i.body)},N=(i,e,p,r,a,n,o)=>p.request(e.method,r,{headers:o,body:a??n,withCredentials:i.WITH_CREDENTIALS,observe:"response"}),M=(i,e)=>{if(e){let p=i.headers.get(e);if(h(p))return p}},z=i=>{if(i.status!==204&&i.body!==null)return i.body},W=(i,e)=>{let r=l({400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"Im a teapot",421:"Misdirected Request",422:"Unprocessable Content",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"},i.errors)[e.status];if(r)throw new d(i,e,r);if(!e.ok){let a=e.status??"unknown",n=e.statusText??"unknown",o=(()=>{try{return JSON.stringify(e.body,null,2)}catch{return}})();throw new d(i,e,`Generic Error: status: ${a}; status text: ${n}; body: ${o}`)}},s=(i,e,p)=>{let r=F(i,p),a=j(p),n=H(p);return U(i,p).pipe(g(o=>N(i,p,e,r,n,a,o)),g(async o=>{for(let x of i.interceptors.response._fns)o=await x(o);let u=z(o),B=M(o,p.responseHeader),b=u;return p.responseTransformer&&o.ok&&(b=await p.responseTransformer(u)),{url:r,ok:o.ok,status:o.status,statusText:o.statusText,body:B??b}}),k(o=>o.status?f({url:r,ok:o.ok,status:o.status,statusText:o.statusText,body:o.error??o.statusText}):m(()=>o)),R(o=>(W(p,o),o.body)),k(o=>m(()=>o)))};var G=class i{constructor(e){this.http=e}getApiV1Commandline(){return s(t,this.http,{method:"GET",url:"/api/v1/commandline"})}static \u0275fac=function(p){return new(p||i)(A(y))};static \u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})},E=class i{constructor(e){this.http=e}getApiV2ConnectionStrings(){return s(t,this.http,{method:"GET",url:"/api/v2/connection-strings"})}postApiV2ConnectionStrings(e){return s(t,this.http,{method:"POST",url:"/api/v2/connection-strings",body:e.requestBody,mediaType:"application/json"})}getApiV2ConnectionStringById(e){return s(t,this.http,{method:"GET",url:"/api/v2/connection-string/{id}",path:{id:e.id}})}putApiV2ConnectionStringById(e){return s(t,this.http,{method:"PUT",url:"/api/v2/connection-string/{id}",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}deleteApiV2ConnectionStringById(e){return s(t,this.http,{method:"DELETE",url:"/api/v2/connection-string/{id}",path:{id:e.id}})}postApiV2ConnectionStringByIdUpdateBackups(e){return s(t,this.http,{method:"POST",url:"/api/v2/connection-string/{id}/update-backups",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}static \u0275fac=function(p){return new(p||i)(A(y))};static \u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})},C=class i{constructor(e){this.http=e}postApiV1Commandline(e){return s(t,this.http,{method:"POST",url:"/api/v1/commandline",body:e.requestBody,mediaType:"application/json"})}getApiV1Acknowledgements(){return s(t,this.http,{method:"GET",url:"/api/v1/acknowledgements"})}postApiV1AuthRefresh(e={}){return s(t,this.http,{method:"POST",url:"/api/v1/auth/refresh",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthSignin(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/signin",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthLogin(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/login",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuesignintoken(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issuesignintoken",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthRefreshLogout(e={}){return s(t,this.http,{method:"POST",url:"/api/v1/auth/refresh/logout",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuetokenByOperation(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issuetoken/{operation}",path:{operation:e.operation}})}postApiV1AuthIssueForeverToken(){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issue-forever-token"})}postApiV1AuthStatus(){return s(t,this.http,{method:"POST",url:"/api/v1/auth/status"})}getApiV1Backupdefaults(){return s(t,this.http,{method:"GET",url:"/api/v1/backupdefaults"})}getApiV1Backups(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/backups",query:{orderBy:e.orderBy}})}postApiV1Backups(e){return s(t,this.http,{method:"POST",url:"/api/v1/backups",query:{temporary:e.temporary,existingdb:e.existingdb},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupsImport(e){return s(t,this.http,{method:"POST",url:"/api/v1/backups/import",body:e.requestBody,mediaType:"application/json"})}getApiV1BugreportByReportid(e){return s(t,this.http,{method:"GET",url:"/api/v1/bugreport/{reportid}",path:{reportid:e.reportid},query:{token:e.token}})}getApiV1Changelog(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/changelog",query:{"from-update":e.fromUpdate}})}getApiV1CommandlineByRunid(e){return s(t,this.http,{method:"GET",url:"/api/v1/commandline/{runid}",path:{runid:e.runid},query:{offset:e.offset,pagesize:e.pagesize}})}postApiV1CommandlineByRunidAbort(e){return s(t,this.http,{method:"POST",url:"/api/v1/commandline/{runid}/abort",path:{runid:e.runid}})}postApiV1Filesystem(e){return s(t,this.http,{method:"POST",url:"/api/v1/filesystem",query:{onlyFolders:e.onlyFolders,showHidden:e.showHidden},body:e.requestBody,mediaType:"application/json"})}postApiV1FilesystemValidate(e){return s(t,this.http,{method:"POST",url:"/api/v1/filesystem/validate",body:e.requestBody,mediaType:"application/json"})}getApiV1Licenses(){return s(t,this.http,{method:"GET",url:"/api/v1/licenses"})}getApiV1LogdataPoll(e){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/poll",query:{level:e.level,id:e.id,pagesize:e.pagesize}})}getApiV1LogdataLog(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/log",query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1LogdataCrashlog(){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/crashlog"})}getApiV1NotificationById(e){return s(t,this.http,{method:"GET",url:"/api/v1/notification/{id}",path:{id:e.id}})}deleteApiV1NotificationById(e){return s(t,this.http,{method:"DELETE",url:"/api/v1/notification/{id}",path:{id:e.id}})}getApiV1Notifications(){return s(t,this.http,{method:"GET",url:"/api/v1/notifications"})}getApiV1Progressstate(){return s(t,this.http,{method:"GET",url:"/api/v1/progressstate"})}getApiV1RemotecontrolStatus(){return s(t,this.http,{method:"GET",url:"/api/v1/remotecontrol/status"})}postApiV1RemoteoperationDbpath(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/dbpath",body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationTest(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/test",query:{autocreate:e.autocreate,type:e.type},body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationCreate(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/create",body:e.requestBody,mediaType:"application/json"})}getApiV1Serversettings(){return s(t,this.http,{method:"GET",url:"/api/v1/serversettings"})}patchApiV1Serversettings(e){return s(t,this.http,{method:"PATCH",url:"/api/v1/serversettings",body:e.requestBody,mediaType:"application/json"})}getApiV1ServersettingByKey(e){return s(t,this.http,{method:"GET",url:"/api/v1/serversetting/{key}",path:{key:e.key}})}putApiV1ServersettingByKey(e){return s(t,this.http,{method:"PUT",url:"/api/v1/serversetting/{key}",path:{key:e.key},body:e.requestBody,mediaType:"application/json"})}getApiV1Serverstate(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/serverstate",query:{lastEventId:e.lastEventId,longpoll:e.longpoll,duration:e.duration}})}postApiV1ServerstatePause(e={}){return s(t,this.http,{method:"POST",url:"/api/v1/serverstate/pause",query:{duration:e.duration,pauseTransfers:e.pauseTransfers}})}postApiV1ServerstateResume(){return s(t,this.http,{method:"POST",url:"/api/v1/serverstate/resume"})}getApiV1Systeminfo(){return s(t,this.http,{method:"GET",url:"/api/v1/systeminfo"})}getApiV1SysteminfoFiltergroups(){return s(t,this.http,{method:"GET",url:"/api/v1/systeminfo/filtergroups"})}getApiV1Tasks(){return s(t,this.http,{method:"GET",url:"/api/v1/tasks"})}getApiV1TaskByTaskid(e){return s(t,this.http,{method:"GET",url:"/api/v1/task/{taskid}",path:{taskid:e.taskid}})}postApiV1TaskByTaskidStop(e){return s(t,this.http,{method:"POST",url:"/api/v1/task/{taskid}/stop",path:{taskid:e.taskid}})}postApiV1TaskByTaskidAbort(e){return s(t,this.http,{method:"POST",url:"/api/v1/task/{taskid}/abort",path:{taskid:e.taskid}})}getApiV1Uisettings(){return s(t,this.http,{method:"GET",url:"/api/v1/uisettings"})}postApiV1Uisettings(e){return s(t,this.http,{method:"POST",url:"/api/v1/uisettings",body:e.requestBody,mediaType:"application/json"})}getApiV1UisettingsByScheme(e){return s(t,this.http,{method:"GET",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme}})}patchApiV1UisettingsByScheme(e){return s(t,this.http,{method:"PATCH",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme},body:e.requestBody,mediaType:"application/json"})}postApiV1UpdatesCheck(){return s(t,this.http,{method:"POST",url:"/api/v1/updates/check"})}postApiV1WebmoduleByModulekey(e){return s(t,this.http,{method:"POST",url:"/api/v1/webmodule/{modulekey}",path:{modulekey:e.modulekey},body:e.requestBody,mediaType:"application/json"})}getApiV1BackupById(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}",path:{id:e.id}})}putApiV1BackupById(e){return s(t,this.http,{method:"PUT",url:"/api/v1/backup/{id}",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}deleteApiV1BackupById(e){return s(t,this.http,{method:"DELETE",url:"/api/v1/backup/{id}",path:{id:e.id},query:{"delete-remote-files":e.deleteRemoteFiles,"delete-local-db":e.deleteLocalDb,force:e.force}})}getApiV1BackupByIdFiles(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/files",path:{id:e.id},query:{filter:e.filter,time:e.time,"all-versions":e.allVersions,"prefix-only":e.prefixOnly,"folder-contents":e.folderContents}})}getApiV1BackupByIdLog(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/log",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdRemotelog(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/remotelog",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdFilesets(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/filesets",path:{id:e.id},query:{"include-metadata":e.includeMetadata,"from-remote-only":e.fromRemoteOnly}})}getApiV1BackupByIdExportArgsonly(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-argsonly",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExportCmdline(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-cmdline",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExport(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase,token:e.token}})}getApiV1BackupByIdIsdbusedelsewhere(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/isdbusedelsewhere",path:{id:e.id}})}getApiV1BackupByIdIsactive(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/isactive",path:{id:e.id}})}postApiV1BackupByIdDeletedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/deletedb",path:{id:e.id}})}postApiV1BackupByIdMovedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/movedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdUpdatedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/updatedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRestore(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/restore",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdCreatereport(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/createreport",path:{id:e.id}})}postApiV1BackupByIdRepair(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/repair",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRepairupdate(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/repairupdate",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdVacuum(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/vacuum",path:{id:e.id}})}postApiV1BackupByIdVerify(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/verify",path:{id:e.id}})}postApiV1BackupByIdCompact(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/compact",path:{id:e.id}})}postApiV1BackupByIdStart(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/start",path:{id:e.id},query:{skipQueue:e.skipQueue}})}postApiV1BackupByIdRun(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/run",path:{id:e.id},query:{skipQueue:e.skipQueue}})}postApiV1BackupByIdReportRemoteSize(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/report-remote-size",path:{id:e.id}})}postApiV1BackupByIdCopytotemp(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/copytotemp",path:{id:e.id}})}postApiV1RemotecontrolEnable(){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/enable"})}postApiV1RemotecontrolDisable(){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/disable"})}deleteApiV1RemotecontrolRegistration(){return s(t,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/registration"})}postApiV1RemotecontrolRegister(e){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/register",body:e.requestBody,mediaType:"application/json"})}deleteApiV1RemotecontrolRegister(){return s(t,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/register"})}postApiV1RemotecontrolRegisterWait(){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/register/wait"})}postApiV2SystemTempDiskSpace(e){return s(t,this.http,{method:"POST",url:"/api/v2/system/temp-disk-space",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListFilesets(e){return s(t,this.http,{method:"POST",url:"/api/v2/backup/list-filesets",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListFolder(e){return s(t,this.http,{method:"POST",url:"/api/v2/backup/list-folder",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListVersions(e){return s(t,this.http,{method:"POST",url:"/api/v2/backup/list-versions",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupSearch(e){return s(t,this.http,{method:"POST",url:"/api/v2/backup/search",body:e.requestBody,mediaType:"application/json"})}postApiV2DestinationTest(e){return s(t,this.http,{method:"POST",url:"/api/v2/destination/test",body:e.requestBody,mediaType:"application/json"})}static \u0275fac=function(p){return new(p||i)(A(y))};static \u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})},q=class i{constructor(e){this.http=e}getApiV1Webmodules(){return s(t,this.http,{method:"GET",url:"/api/v1/webmodules"})}static \u0275fac=function(p){return new(p||i)(A(y))};static \u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})};export{t as a,G as b,E as c,C as d,q as e};