@duplicati/ngclient 0.0.231 → 0.0.232
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{chunk-SycSMD-r.js → chunk-B52v_pjw.js} +1 -1
- package/{chunk-CI8lsvKT.js → chunk-B53Wj4F9.js} +1 -1
- package/chunk-B73LRsqH.js +1 -0
- package/{chunk-PONAC1Ya.js → chunk-B8uF0dom.js} +1 -1
- package/{chunk-D3SUPUQT.js → chunk-B9maI7Xa.js} +1 -1
- package/{chunk-DfcHtA-G.js → chunk-BBU0vswn.js} +1 -1
- package/{chunk-DPpQ_8VM.js → chunk-BBsBaTWO.js} +1 -1
- package/{chunk--kVw-BwM.js → chunk-BEhUV7oX.js} +1 -1
- package/{chunk-B1FMMTzB.js → chunk-BI14DMeb.js} +1 -1
- package/{chunk-DoYGADYB.js → chunk-BO2GlieG.js} +1 -1
- package/{chunk-Bfak-Gjv.js → chunk-BS8PXjJJ.js} +1 -1
- package/{chunk-C5p3bQwH.js → chunk-BTgf5lfZ.js} +1 -1
- package/{chunk-BYJ0fSUP.js → chunk-BVEyeg9y.js} +1 -1
- package/{chunk-DlqfMbsZ.js → chunk-BYWmNy-_.js} +1 -1
- package/{chunk-d4cdVCUg.js → chunk-BaxM-kGV.js} +1 -1
- package/{chunk-DuTbfCdT.js → chunk-Bb6BmVO4.js} +1 -1
- package/{chunk-C3KPTLNN.js → chunk-Bja52qI7.js} +1 -1
- package/{chunk-5Ay2I6OJ.js → chunk-BkIXk6uR.js} +1 -1
- package/{chunk-B6VmpM-T.js → chunk-BkUa7yBI.js} +1 -1
- package/chunk-BlTnmRGU.js +1 -0
- package/{chunk-B7vxwDBG.js → chunk-Bo1yB-fQ.js} +1 -1
- package/{chunk-D3d-eReU.js → chunk-Box6Lckh.js} +1 -1
- package/{chunk-CQv4eyEK.js → chunk-BpRWdcC8.js} +1 -1
- package/chunk-BqN36tfl.js +1 -0
- package/{chunk-Baizh2Dx.js → chunk-Brvxo-yI.js} +1 -1
- package/{chunk-BjSSXg5V.js → chunk-Bt_Ie-F3.js} +1 -1
- package/chunk-BvGGBIy7.js +1 -0
- package/{chunk-CzJ3-6Pu.js → chunk-C4GeR7BF.js} +1 -1
- package/{chunk-BFfFD-XE.js → chunk-C80zvTbO.js} +1 -1
- package/{chunk-gaP3Sx_C.js → chunk-CAwTsBqQ.js} +1 -1
- package/chunk-CGArETYn.js +1 -0
- package/{chunk-CwKxis_6.js → chunk-CHzwXmsn.js} +1 -1
- package/{chunk-BRJ93eei.js → chunk-CIcBoEH1.js} +1 -1
- package/{chunk-Crs56mDy.js → chunk-CKnRcyHZ.js} +1 -1
- package/{chunk-DlTsXgG2.js → chunk-CTRzgLM9.js} +2 -2
- package/{chunk-DNUCXG8E.js → chunk-CTm37hI-.js} +1 -1
- package/{chunk-Bnu5Zyue.js → chunk-CTwO6j97.js} +1 -1
- package/{chunk-oTpkLrqH.js → chunk-CUaRQ2FJ.js} +1 -1
- package/{chunk-PGDvGDW-.js → chunk-CUuyy9Er.js} +1 -1
- package/{chunk-D5031IDL.js → chunk-CVQPUpDQ.js} +1 -1
- package/{chunk-JMkz2RrF.js → chunk-CX26gEKv.js} +1 -1
- package/{chunk-DAM-4k69.js → chunk-CZoVeRAG.js} +1 -1
- package/{chunk-7qu0Yols.js → chunk-CartdZy-.js} +1 -1
- package/{chunk-CxjTj8X0.js → chunk-Cg09iQR5.js} +1 -1
- package/{chunk-CDEvMQA2.js → chunk-CgyaUJSI.js} +1 -1
- package/{chunk-CmexLvf7.js → chunk-Cjb79u3p.js} +1 -1
- package/{chunk-CTwvkMrj.js → chunk-CkrxdjhU.js} +1 -1
- package/chunk-CtEMAj2d.js +2 -0
- package/{chunk-U0VOUPLl.js → chunk-Cu2bh6aQ.js} +1 -1
- package/{chunk-BlfsmSZO.js → chunk-Cu4siB3B.js} +3 -3
- package/{chunk-Bcxzhjj8.js → chunk-CwKy8pxa.js} +1 -1
- package/{chunk-Cng2PWKw.js → chunk-Cz0KuBHB.js} +1 -1
- package/{chunk-DA5X-TzJ.js → chunk-D5tms-6w.js} +1 -1
- package/{chunk-BAVJD-p4.js → chunk-DI7suso2.js} +1 -1
- package/{chunk-Bgx4dtaL.js → chunk-DJJ8GbYi.js} +1 -1
- package/{chunk-C6beMvkJ.js → chunk-DKZlKdfB.js} +1 -1
- package/chunk-DTu0ZYnR.js +1 -0
- package/{chunk-D7AP6g7S.js → chunk-DUYvFN8m.js} +1 -1
- package/{chunk-DH6L3nQP.js → chunk-DY3nK3tu.js} +1 -1
- package/{chunk-B_iekvt6.js → chunk-DYnVzNxt.js} +1 -1
- package/{chunk-C2H72Zk8.js → chunk-DZm4l28A.js} +1 -1
- package/{chunk-BhGD1_v8.js → chunk-Da_-7L7P.js} +1 -1
- package/{chunk-DKacf9Tj.js → chunk-DmDqcC4A.js} +1 -1
- package/{chunk-CP3edE1P.js → chunk-Dn8nZWLd.js} +1 -1
- package/{chunk-EwTTC1EW.js → chunk-DoQHDPZg.js} +1 -1
- package/{chunk-D2aWqPl_.js → chunk-DqIU7ViF.js} +1 -1
- package/{chunk-Bj1ToKwz.js → chunk-Dum38U6w.js} +1 -1
- package/{chunk-C1BwGQgo.js → chunk-DvyGZpE4.js} +1 -1
- package/{chunk-DuHXCtrV.js → chunk-DzmZd524.js} +1 -1
- package/{chunk-CqwyTVd3.js → chunk-Rp7-yjlz.js} +1 -1
- package/{chunk-RqvNv7T_.js → chunk-Saq2s7Ep.js} +1 -1
- package/{chunk-dCFVYHva.js → chunk-aOMoAKYY.js} +1 -1
- package/{chunk-DH6iiZWc.js → chunk-ihUnHtR7.js} +1 -1
- package/{chunk-BhPCHFyT.js → chunk-ivwxSoND.js} +1 -1
- package/{chunk-BC2-YuwH.js → chunk-kU0H989B.js} +2 -2
- package/{chunk-BIAFFPb6.js → chunk-mby7fvmj.js} +1 -1
- package/{chunk-DKwqdnLJ.js → chunk-umW-K0Ca.js} +1 -1
- package/{chunk-mnaJWx8D.js → chunk-vPGrgL1U.js} +1 -1
- package/{chunk-D2MSuPzM.js → chunk-vnqcxg-9.js} +1 -1
- package/index.html +1 -1
- package/{main-QLXVXD6E.js → main-VVQP2YE7.js} +4 -4
- package/package.json +1 -1
- package/chunk-6bHATzM2.js +0 -1
- package/chunk-BHERv_y8.js +0 -1
- package/chunk-CAgfvBGI.js +0 -2
- package/chunk-D9O-afXN.js +0 -1
- package/chunk-Da2vs6ff.js +0 -1
- package/chunk-Z5fN6CGR.js +0 -1
- package/chunk-tpJJunhQ.js +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {j as jn,m as me}from'./chunk-DoYGADYB.js';import {aj as l$1,T,ab as C,ax as De,I,N as Nt,aG as pt,az as t,aZ as ee$1,G as Ge,ai as m$1,H as qu,c0 as n$1}from'./main-QLXVXD6E.js';var y=class{constructor(t){this.loader=t;}loader;_data=Ge(void 0);_isLoading=false;_loaded=false;load(){return !this._loaded&&!this._isLoading&&(this._isLoading=true,this.loader().pipe(qu(()=>this._isLoading=false)).subscribe(t=>{this._data.set(t),this._loaded=true;})),this._data.asReadonly()}value(){return this._data.asReadonly()}isLoading(){return this._isLoading}isLoaded(){return this._loaded}reset(){this._data.set(void 0),this._loaded=false;}};function K(e){return !("personalLicensedUser"in e)}function q(e){if(K(e))return m$1(l$1({},e),{personal:e.personal,personalLicensedUser:null,personalUnlicensedUser:null});let s=e,{personalLicensedUser:t,personalUnlicensedUser:o}=s,r=n$1(s,["personalLicensedUser","personalUnlicensedUser"]);return m$1(l$1({},r),{personal:t+o,personalLicensedUser:t,personalUnlicensedUser:o})}var d=class e{#e=T(C);#s=T(De);#n=T(I);#o=new y(()=>this.getS3Config("Providers"));#i=new y(()=>this.getS3Config("Regions"));#r=new y(()=>this.getS3Config("RegionHosts"));#a=new y(()=>this.getS3Config("StorageClasses"));#l=Nt(()=>{let t=this.#o.value()(),o=this.#r.value()(),r=[...t??[],...o?.map(s=>({key:`Amazon ${s.key}`,value:s.value}))??[]];return Array.from(new Map(r.map(s=>[s.value,s])).values())});#c=new y(()=>this.getStorjConfig("Satellites"));#u=new y(()=>this.getStorjConfig("AuthenticationMethods"));#p=new y(()=>this.getOpenstackConfig("Providers"));#m=new y(()=>this.getOpenstackConfig("Versions"));#d=new y(()=>this.getGcsConfig("Locations"));#g=new y(()=>this.getGcsConfig("StorageClasses"));getS3AllProviders(){return this.#o.load(),this.#r.load(),this.#l}getS3ProvidersFiltered(t){return Nt(()=>this.getS3AllProviders()().filter(t))}getS3Providers(){return this.#o.load()}getS3Regions(){return this.#i.load()}getS3RegionHosts(){return this.#r.load()}getS3StorageClasses(){return this.#a.load()}getStorjSatellites(){return this.#c.load()}getStorjAuthenticationMethods(){return this.#u.load()}getOpenstackProviders(){return this.#p.load()}getOpenstackVersions(){return this.#m.load()}getGcsLocations(){return this.#d.load()}getGcsStorageClasses(){return this.#g.load()}getS3Config(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":t}}).pipe(pt(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(pt(o=>this.#t(o)))}getOpenstackConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":t}}).pipe(pt(o=>this.#t(o)))}getGcsConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":t}}).pipe(pt(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(pt(o=>this.#t(o)),pt(o=>o.find(r=>r.key==="folders")?.value),pt(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(pt(r=>this.#t(r)),pt(r=>r.find(s=>s.key==="api-key")?.value))}getOffice365Counts(t$1,o,r){let s={"Content-Type":"application/json"};return this.#n.relayIsEnabled()&&(s.timeout=`${300*1e3}`),this.#s.post(`${t.BASE}/api/v1/webmodule/office365`,JSON.stringify({"backup-id":r??"","source-prefix":o,operation:"CountItems",url:t$1}),{headers:s}).pipe(pt(i=>this.#t(i)),pt(i=>i.find(u=>u.key==="counts")?.value),pt(i=>{let u=JSON.parse(i);return {users:u.users,groups:u.groups,sites:q(u.sites)}}))}static \u0275fac=function(o){return new(o||e)};static \u0275prov=ee$1({token:e,factory:e.\u0275fac,providedIn:"root"})};var n=new jn,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.`},L={description:$localize`Unknown destination type`,sourceDescription:null,icon:"assets/dest-icons/file-system.png",isDefaultEntry:true,customFields:{path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path`,formElement:e=>n.control(e??"")}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let s=o.startsWith(`${e}:///`)?o.split(`${e}:///`)[1]:o.split(`${e}://`)[1];return l$1({destinationType:e,custom:{path:s.split("?")[0]}},l(e,t))}}},F={key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,sourceDescription:$localize`Use files from any S3 compatible bucket as a remote source.`,icon:"assets/dest-icons/s3compat.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.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:true,formElement:e=>n.control(e??"")},{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true},{name:"use-ssl"}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>Ge([{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:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},P=[{key:"file",displayName:$localize`File system`,description:$localize`Store backups on your local file system.`,sourceDescription:$localize`Use files from your local file system as a remote source.`,icon:"assets/dest-icons/file-system.png",searchTerms:"local disk harddrive localdisk filesystem unc server share drive",sortOrder:110,customFields:{path:{type:"FolderTree",name:"path",doubleSlash:p,shortDescription:$localize`File path`,longDescription:$localize`The path to store the backup`,formElement:e=>n.control(e??""),isMandatory:true}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let r=o.startsWith("file:///"),s=decodeURIComponent(r?o.split("file:///")[1]:o.split("file://")[1]),u=s.slice(1).startsWith(":\\")||s.slice(1).startsWith(":/")||s.startsWith("\\\\")?s:"/"+s;return l$1({destinationType:e,custom:{path:u.split("?")[0]}},l(e,t))}}},{key:"duplicati",displayName:$localize`Duplicati Storage`,description:$localize`Store backups with Duplicati Storage.`,sourceDescription:$localize`Use files from Duplicati Storage as a remote source.`,icon:"assets/dest-icons/duplicati.png",searchTerms:"duplicati internal built-in",sortOrder:100,dynamicFields:[{name:"duplicati-backup-id",type:"DuplicatiBackupId",isMandatory:true,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)=>l$1({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).`,sourceDescription:$localize`Use files from SFTP (SSH) as a remote source.`,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=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`The port to connect to`,formElement:e=>n.control(e??"",[me.required,me.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=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,longDescription:$localize`Username`,isMandatory:true},{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:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,sourceDescription:$localize`Use files from any S3 compatible bucket as a remote source.`,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=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.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:true,formElement:e=>n.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>Ge([{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:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},{key:"s3",customKey:"s3-aws",displayName:$localize`Amazon S3`,description:$localize`Store backups in Amazon S3.`,sourceDescription:$localize`Use files from Amazon S3 as a remote source.`,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=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.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:true,formElement:e=>n.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>Ge([{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:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))},default:e=>"s3-aws://?use-ssl=true",intercept:e=>e.searchParams.get("s3-server-name")?.endsWith(".amazonaws.com")??false}},{key:"gcs",displayName:$localize`Google Cloud Storage`,description:$localize`Store backups in Google Cloud Storage.`,sourceDescription:$localize`Use files from Google Cloud Storage as a remote source.`,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=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true,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:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},{key:"googledrive",displayName:$localize`Google Drive`,description:$localize`Store backups in Google Drive.`,sourceDescription:$localize`Use files from Google Drive as a remote source.`,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=>n.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"pcloud",displayName:$localize`pCloud`,description:$localize`Store backups in pCloud.`,sourceDescription:$localize`Use files from pCloud as a remote source.`,icon:"assets/dest-icons/pcloud.png",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>Ge([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",oauthVersion:2,isMandatory:true}],mapper:{to:e=>{let{server:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:s}=m(t);return l$1({destinationType:e,custom:{server:r,path:s}},l(e,t))}}},{key:"azure",displayName:$localize`Azure Blob Storage`,description:$localize`Store backups in Azure Blob Storage.`,sourceDescription:$localize`Use files from Azure Blob Storage as a remote source.`,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=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"onedrivev2",displayName:$localize`OneDrive`,description:$localize`Store backups in OneDrive.`,sourceDescription:$localize`Use files from OneDrive as a remote source.`,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=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"od4b",displayName:$localize`OneDrive Business (deprecated)`,description:$localize`Store backups in OneDrive Business. Deprecated, use Sharepoint instead.`,sourceDescription:$localize`Use files from OneDrive Business as a remote source. Deprecated, use SharePoint instead.`,icon:"assets/dest-icons/one-drive.png",searchTerms:"microsoft ms",sortOrder:-1,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:true}],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:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"mssp",displayName:$localize`Microsoft SharePoint (deprecated)`,description:$localize`Store backups in Microsoft SharePoint using legacy API.`,sourceDescription:$localize`Use files from Microsoft SharePoint as a remote source using the legacy API.`,icon:"assets/dest-icons/sharepoint.png",searchTerms:"microsoft ms",sortOrder:-1,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:true}],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:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"sharepoint",displayName:$localize`Microsoft SharePoint`,description:$localize`Store backups in Microsoft SharePoint.`,sourceDescription:$localize`Use files from Microsoft SharePoint as a remote source.`,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=>n.control(e??"")}},dynamicFields:[{name:"site-id",isMandatory:true},{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"dropbox",displayName:$localize`Dropbox`,description:$localize`Store backups in Dropbox.`,sourceDescription:$localize`Use files from Dropbox as a remote source.`,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=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"box",displayName:$localize`Box.com`,description:$localize`Store backups in Box.com.`,sourceDescription:$localize`Use files from Box.com as a remote source.`,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=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"jottacloud",displayName:$localize`Jottacloud`,description:$localize`Store backups in Jottacloud.`,sourceDescription:$localize`Use files from Jottacloud as a remote source.`,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=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"b2",displayName:$localize`B2 Cloud Storage`,description:$localize`Store backups in B2 Cloud Storage.`,sourceDescription:$localize`Use files from B2 Cloud Storage as a remote source.`,icon:"assets/dest-icons/backblaze.png",searchTerms:"backblaze",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true,validate:e=>{function t(o){if(!o)return false;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=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Application ID`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Application Key`,isMandatory:true}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},{key:"e2",displayName:$localize`IDrive e2`,description:$localize`Store backups in IDrive e2.`,sourceDescription:$localize`Use files from IDrive e2 as a remote source.`,icon:"assets/dest-icons/idrive-e2.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Access ID`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Access Secret`,isMandatory:true}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{bucket:r,path:s}},l(e,t))}}},{key:"mega",displayName:$localize`Mega.nz`,description:$localize`Store backups in Mega.nz.`,sourceDescription:$localize`Use files from Mega.nz as a remote source.`,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=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],mapper:{to:e=>{let t=e.custom.path;return c(e,null,null,t)},from:(e,t,o)=>l$1({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.`,sourceDescription:$localize`Use files from Microsoft Office 365 Group as a remote source.`,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=>n.control(e??"",[me.email]),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"cloudfiles",displayName:$localize`Rackspace CloudFiles`,description:$localize`Store backups in Rackspace CloudFiles.`,sourceDescription:$localize`Use files from Rackspace CloudFiles as a remote source.`,icon:"assets/dest-icons/rackspace.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],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:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"rclone",displayName:$localize`Rclone`,description:$localize`Store backups in Rclone.`,sourceDescription:$localize`Use files from Rclone as a remote source.`,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(([s])=>!["rclone-remote-repository","rclone-remote-path"].includes(s));return U(e.destinationType??"rclone",t,null,o,[...Object.entries(e.advanced??{}),...r])},from:(e,t,o)=>{let{advanced:r,dynamic:s}=l(e,t),{bucket:i,path:u}=m(t);return {destinationType:e,dynamic:l$1({"rclone-remote-repository":i,"rclone-remote-path":u},s),advanced:l$1({},r)}}}},{key:"openstack",displayName:$localize`OpenStack Object Storage`,description:$localize`Store backups in OpenStack Object Storage.`,sourceDescription:$localize`Use files from OpenStack Object Storage as a remote source.`,icon:"assets/dest-icons/open-stack.png",searchTerms:"swift",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket`,longDescription:$localize`Bucket`,formElement:e=>n.control(e??""),isMandatory:true}},dynamicFields:[{name:"openstack-authuri",shortDescription:$localize`Auth URI`,type:"Enumeration",loadOptions:e=>e.get(d).getOpenstackProviders(),isMandatory:true},{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:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},{key:"webdav",displayName:$localize`WebDAV`,description:$localize`Store backups in WebDAV.`,sourceDescription:$localize`Use files from WebDAV as a remote source.`,icon:"assets/dest-icons/webdav.png",searchTerms:"web dav",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`},{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],advancedFields:[{type:"FileTree",name:"debug-propfind-file",accepts:".txt,.log"}],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:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"aftp",displayName:$localize`Alternative FTP`,description:$localize`Store backups in FTP.`,sourceDescription:$localize`Use files from FTP as a remote source.`,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=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.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=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],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:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"ftp",displayName:$localize`FTP`,description:$localize`Store backups in FTP.`,sourceDescription:$localize`Use files from FTP as a remote source.`,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=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.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=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],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:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"sia",displayName:$localize`Sia Decentrilized Cloud`,description:$localize`Store backups in Sia Decentrilized Cloud.`,sourceDescription:$localize`Use files from Sia Decentralized Cloud as a remote source.`,icon:"assets/dest-icons/sia-cloud.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true}},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(([s])=>s!=="sia-targetpath")];return U(e.destinationType??"sia",t,null,o,r)},from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"cos",displayName:$localize`Tencent COS`,description:$localize`Store backups in Tencent COS.`,sourceDescription:$localize`Use files from Tencent COS as a remote source.`,icon:"assets/dest-icons/tencent-cloud.png",customFields:{bucket:{name:"bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:true,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"cos-region",shortDescription:$localize`Region`},{name:"cos-app-id",shortDescription:$localize`COS App Id`,isMandatory:true},{name:"cos-secret-id",shortDescription:$localize`COS Secret Id`,isMandatory:true},{name:"cos-secret-key",shortDescription:$localize`COS Secret Key`,isMandatory:true}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=m$1(l$1({},e),{advanced:m$1(l$1({},e.advanced),{"cos-bucket":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),s=r.advanced["cos-bucket"];return delete r.advanced["cos-bucket"],l$1({destinationType:e,custom:{path:h(t),bucket:s}},r)}}},{key:"tahoe",displayName:$localize`Tahoe LAFS`,description:$localize`Store backups in Tahoe LAFS.`,sourceDescription:$localize`Use files from Tahoe LAFS as a remote source.`,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=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.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:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"smb",displayName:$localize`Windows Share (SMB)`,description:$localize`Store backups on SMB storage.`,sourceDescription:$localize`Use files from SMB storage as a remote source.`,icon:"assets/dest-icons/smb.png",searchTerms:"cifs samba",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},share:{type:"Hostname",name:"share",shortDescription:$localize`Share Name`,longDescription:$localize`Share Name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:["transport",{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true},"auth-domain"],mapper:{to:e=>{let{share:t,server:o,path:r}=e.custom;return c(e,o,null,N(t,r))},from:(e,t,o)=>{let{server:r,path:s}=m(t),i=s.split("/")[0],u=s.split("/").slice(1).join("/");return l$1({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.`,sourceDescription:$localize`Use files from CIFS storage as a remote source. Deprecated, use SMB instead.`,icon:"assets/dest-icons/smb.png",sortOrder:-1,mapper:L.mapper},{key:"filen",displayName:$localize`Filen.io`,description:$localize`Store backups in Filen.io.`,sourceDescription:$localize`Use files from Filen.io as a remote source.`,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=>n.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true},{name:"two-factor-code",type:"Filen2FACode"}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"filejump",displayName:$localize`Filejump`,description:$localize`Store backups in Filejump.`,sourceDescription:$localize`Use files from Filejump as a remote source.`,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=>n.control(e??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:$localize`API Token`,longDescription:$localize`Filejump API Token`,formElement:e=>n.control(e??""),isMandatory:true}],mapper:{to:e=>{let{path:t}=e.custom;return c(e,null,null,t)},from:(e,t,o)=>l$1({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.`,sourceDescription:$localize`Use files from Storj with an access grant as a remote source.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-shared-access",shortDescription:$localize`Access Grant`,isMandatory:true},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:true},{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:true}],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"],l$1({destinationType:e},r)},intercept:e=>e.protocol!=="storj:"?false:!!(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.`,sourceDescription:$localize`Use files from Storj with an API key as a remote source.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getStorjSatellites(),isMandatory:true},{name:"storj-api-key",shortDescription:$localize`API Key`,isMandatory:true},{name:"storj-secret",shortDescription:$localize`Secret`,isMandatory:true},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:true},{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"],l$1({destinationType:e},r)},intercept:e=>e.protocol!=="storj:"?false:!!(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`,sourceDescription:$localize`Use files from Aliyun OSS as a remote source.`,icon:"assets/dest-icons/aliyun.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in bucket`,longDescription:$localize`Path in bucket`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"oss-endpoint",isMandatory:true},{name:"oss-access-key-id",isMandatory:true},{name:"oss-access-key-secret",isMandatory:true}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=m$1(l$1({},e),{advanced:m$1(l$1({},e.advanced),{"oss-bucket-name":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),s=r.advanced["oss-bucket-name"];return delete r.advanced["oss-bucket-name"],l$1({destinationType:e,custom:{path:h(t),bucket:s}},r)}}},{key:"office365",displayName:$localize`Microsoft 365`,description:$localize`Create backups of Microsoft 365 data.`,sourceDescription:$localize`Use Microsoft 365 data as a remote source.`,searchTerms:"office o365 office365 m365 ms365",icon:"assets/dest-icons/office365.png",isNonFree:true,dynamicFields:[{name:"auth-username",shortDescription:$localize`Client ID`,longDescription:$localize`Application (client) ID from your Azure AD app registration.`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Client Secret`,longDescription:$localize`Client Secret from your Azure AD app registration.`,isMandatory:true},{name:"office365-tenant-id",shortDescription:$localize`Tenant ID`,isMandatory:true}],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:s}=l(e,t);return {destinationType:e,advanced:l$1({},r),dynamic:l$1({},s)}}}},{key:"googleworkspace",displayName:$localize`Google Workspace`,description:$localize`Create backups of Google Workspace data.`,sourceDescription:$localize`Use Google Workspace data as a remote source.`,icon:"assets/dest-icons/googleworkspace.png",isNonFree:true,dynamicFields:[{name:"google-admin-email",type:"Email",shortDescription:$localize`Admin Email`,longDescription:$localize`Email address of the Google Workspace admin user.`,isMandatory:true},{name:"google-service-account-json",type:"FreeText",shortDescription:$localize`Service account JSON`,longDescription:$localize`Paste the service account JSON here.`,isMandatory:true}],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:s}=l(e,t);return {destinationType:e,advanced:l$1({},r),dynamic:l$1({},s)}}}},{key:"drimecloud",displayName:$localize`Drime Cloud`,description:$localize`Store backups in Drime Cloud.`,sourceDescription:$localize`Use files from Drime Cloud as a remote source.`,icon:"assets/dest-icons/drime.png",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in Drime Cloud`,longDescription:$localize`Path in Drime Cloud`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"api-token",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},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"])],H={".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 J=new jn,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 U(e.destinationType??"file",t,o,r,[...Object.entries(e.advanced),...Object.entries(e.dynamic)])}function U(e,t,o,r,s){let i=b(s),u=encodeURIComponent(X(t)),S=u==""?"":u+Y(o),k=r??"",w=k.slice(1).startsWith(":\\")&&e=="file"?"file:///":`${e}://`,$=N(S,Q(k));return `${w}${$}${i}`}function Z(e){return e==null||e===""?"":e.startsWith("/")?e.substring(1):e}function N(...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 Q(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 X(e){return e==null||e===""?"":e.endsWith("/")?e.substring(0,e.length-1):e}function Y(e){return e==null||e===""?"":":"+e.toString()}function Ee(e){return e?e.startsWith("diskimage:")?"assets/dest-icons/external-harddrive.png":V(e).icon:""}function Le(e){if(!e)return "";if(e.startsWith("diskimage:"))return $localize`Local disk`;let t=V(e);return t?t.displayName:"Unknown"}function V(e){try{let o=new v(e),r=P.find(s=>s.mapper.intercept?.(o));if(r)return r}catch{}let t=e.split("://")[0];return G(t)}var ee={file:{Display:$localize`Local`,Icon:null}};function Ne(e){if(!e)return "";let t=V(e);if(!t)return "";let o=ee[t.key];if(o?.Display)return o.Display;if(t.key==="s3"){let r="http://null?"+e.split("?")[1],i=new URL(r).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[u,S]of Object.entries(H))if(i.endsWith(u))return S}return t.displayName}function G(e){return P.find(o=>o.key===e||o.customKey===e)??P.find(o=>`${o.key}s`===e)??null??l$1({key:e,displayName:e},L)}function Ie(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:Z(decodeURIComponent(e.pathname))}}function l(e,t){let o={},r={},s=G(e);return t.searchParams.forEach((i,u)=>{s?.dynamicFields?.some(k=>k===u||k?.name===u)?r[u]=decodeURIComponent(i):o[u]=decodeURIComponent(i);}),{advanced:o,dynamic:r}}function b(e,t=false){let o=e.map(([s,i])=>`${s}=${i?encodeURIComponent(i.toString()):""}`).join("&");return o?(t?"":"?")+o:""}function Be(e){let t=e.destinationType??"";return G(t)?.mapper.to(e)??""}function xe(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 s=V(e),i="";if(`${s.key}s`===t&&(i+=r.indexOf("?")===-1?"?":"&",i+="use-ssl=true",e=s.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 G(t).mapper.from(t,new v("http://localhost"+i),e);try{let u=new v(r+i);if(u.host==="undefined")return null;let S=o.split("?")[0].split("/")[0],k=u.host!=""&&!isNaN(Number(u.host.replaceAll(".",""))),A=S.split("."),w=A.length===4&&A.every($=>$.length&&$.length<=3&&!isNaN(Number($))&&parseInt($)<=255);return k&&!w?null:s.mapper.from(s.key,u,e)}catch(u){return console.error("Error while parsing target path",e,r+i,u),null}}function _(e){return typeof e!="string"||!e.trim()?[]:e.split(`
|
|
1
|
+
import {j as jn,m as me}from'./chunk-BO2GlieG.js';import {aj as l$1,T,ab as C,ax as De,I,N as Nt,aG as pt,az as t,aZ as ee$1,G as Ge,ai as m$1,H as qu,c0 as n$1}from'./main-VVQP2YE7.js';var y=class{constructor(t){this.loader=t;}loader;_data=Ge(void 0);_isLoading=false;_loaded=false;load(){return !this._loaded&&!this._isLoading&&(this._isLoading=true,this.loader().pipe(qu(()=>this._isLoading=false)).subscribe(t=>{this._data.set(t),this._loaded=true;})),this._data.asReadonly()}value(){return this._data.asReadonly()}isLoading(){return this._isLoading}isLoaded(){return this._loaded}reset(){this._data.set(void 0),this._loaded=false;}};function K(e){return !("personalLicensedUser"in e)}function q(e){if(K(e))return m$1(l$1({},e),{personal:e.personal,personalLicensedUser:null,personalUnlicensedUser:null});let s=e,{personalLicensedUser:t,personalUnlicensedUser:o}=s,r=n$1(s,["personalLicensedUser","personalUnlicensedUser"]);return m$1(l$1({},r),{personal:t+o,personalLicensedUser:t,personalUnlicensedUser:o})}var d=class e{#e=T(C);#s=T(De);#n=T(I);#o=new y(()=>this.getS3Config("Providers"));#i=new y(()=>this.getS3Config("Regions"));#r=new y(()=>this.getS3Config("RegionHosts"));#a=new y(()=>this.getS3Config("StorageClasses"));#l=Nt(()=>{let t=this.#o.value()(),o=this.#r.value()(),r=[...t??[],...o?.map(s=>({key:`Amazon ${s.key}`,value:s.value}))??[]];return Array.from(new Map(r.map(s=>[s.value,s])).values())});#c=new y(()=>this.getStorjConfig("Satellites"));#u=new y(()=>this.getStorjConfig("AuthenticationMethods"));#p=new y(()=>this.getOpenstackConfig("Providers"));#m=new y(()=>this.getOpenstackConfig("Versions"));#d=new y(()=>this.getGcsConfig("Locations"));#g=new y(()=>this.getGcsConfig("StorageClasses"));getS3AllProviders(){return this.#o.load(),this.#r.load(),this.#l}getS3ProvidersFiltered(t){return Nt(()=>this.getS3AllProviders()().filter(t))}getS3Providers(){return this.#o.load()}getS3Regions(){return this.#i.load()}getS3RegionHosts(){return this.#r.load()}getS3StorageClasses(){return this.#a.load()}getStorjSatellites(){return this.#c.load()}getStorjAuthenticationMethods(){return this.#u.load()}getOpenstackProviders(){return this.#p.load()}getOpenstackVersions(){return this.#m.load()}getGcsLocations(){return this.#d.load()}getGcsStorageClasses(){return this.#g.load()}getS3Config(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":t}}).pipe(pt(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(pt(o=>this.#t(o)))}getOpenstackConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":t}}).pipe(pt(o=>this.#t(o)))}getGcsConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":t}}).pipe(pt(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(pt(o=>this.#t(o)),pt(o=>o.find(r=>r.key==="folders")?.value),pt(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(pt(r=>this.#t(r)),pt(r=>r.find(s=>s.key==="api-key")?.value))}getOffice365Counts(t$1,o,r){let s={"Content-Type":"application/json"};return this.#n.relayIsEnabled()&&(s.timeout=`${300*1e3}`),this.#s.post(`${t.BASE}/api/v1/webmodule/office365`,JSON.stringify({"backup-id":r??"","source-prefix":o,operation:"CountItems",url:t$1}),{headers:s}).pipe(pt(i=>this.#t(i)),pt(i=>i.find(u=>u.key==="counts")?.value),pt(i=>{let u=JSON.parse(i);return {users:u.users,groups:u.groups,sites:q(u.sites)}}))}static \u0275fac=function(o){return new(o||e)};static \u0275prov=ee$1({token:e,factory:e.\u0275fac,providedIn:"root"})};var n=new jn,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.`},L={description:$localize`Unknown destination type`,sourceDescription:null,icon:"assets/dest-icons/file-system.png",isDefaultEntry:true,customFields:{path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path`,formElement:e=>n.control(e??"")}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let s=o.startsWith(`${e}:///`)?o.split(`${e}:///`)[1]:o.split(`${e}://`)[1];return l$1({destinationType:e,custom:{path:s.split("?")[0]}},l(e,t))}}},F={key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,sourceDescription:$localize`Use files from any S3 compatible bucket as a remote source.`,icon:"assets/dest-icons/s3compat.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.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:true,formElement:e=>n.control(e??"")},{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true},{name:"use-ssl"}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>Ge([{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:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},P=[{key:"file",displayName:$localize`File system`,description:$localize`Store backups on your local file system.`,sourceDescription:$localize`Use files from your local file system as a remote source.`,icon:"assets/dest-icons/file-system.png",searchTerms:"local disk harddrive localdisk filesystem unc server share drive",sortOrder:110,customFields:{path:{type:"FolderTree",name:"path",doubleSlash:p,shortDescription:$localize`File path`,longDescription:$localize`The path to store the backup`,formElement:e=>n.control(e??""),isMandatory:true}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let r=o.startsWith("file:///"),s=decodeURIComponent(r?o.split("file:///")[1]:o.split("file://")[1]),u=s.slice(1).startsWith(":\\")||s.slice(1).startsWith(":/")||s.startsWith("\\\\")?s:"/"+s;return l$1({destinationType:e,custom:{path:u.split("?")[0]}},l(e,t))}}},{key:"duplicati",displayName:$localize`Duplicati Storage`,description:$localize`Store backups with Duplicati Storage.`,sourceDescription:$localize`Use files from Duplicati Storage as a remote source.`,icon:"assets/dest-icons/duplicati.png",searchTerms:"duplicati internal built-in",sortOrder:100,dynamicFields:[{name:"duplicati-backup-id",type:"DuplicatiBackupId",isMandatory:true,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)=>l$1({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).`,sourceDescription:$localize`Use files from SFTP (SSH) as a remote source.`,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=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`The port to connect to`,formElement:e=>n.control(e??"",[me.required,me.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=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,longDescription:$localize`Username`,isMandatory:true},{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:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,sourceDescription:$localize`Use files from any S3 compatible bucket as a remote source.`,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=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.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:true,formElement:e=>n.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>Ge([{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:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},{key:"s3",customKey:"s3-aws",displayName:$localize`Amazon S3`,description:$localize`Store backups in Amazon S3.`,sourceDescription:$localize`Use files from Amazon S3 as a remote source.`,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=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.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:true,formElement:e=>n.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>Ge([{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:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))},default:e=>"s3-aws://?use-ssl=true",intercept:e=>e.searchParams.get("s3-server-name")?.endsWith(".amazonaws.com")??false}},{key:"gcs",displayName:$localize`Google Cloud Storage`,description:$localize`Store backups in Google Cloud Storage.`,sourceDescription:$localize`Use files from Google Cloud Storage as a remote source.`,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=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true,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:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},{key:"googledrive",displayName:$localize`Google Drive`,description:$localize`Store backups in Google Drive.`,sourceDescription:$localize`Use files from Google Drive as a remote source.`,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=>n.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"pcloud",displayName:$localize`pCloud`,description:$localize`Store backups in pCloud.`,sourceDescription:$localize`Use files from pCloud as a remote source.`,icon:"assets/dest-icons/pcloud.png",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>Ge([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",oauthVersion:2,isMandatory:true}],mapper:{to:e=>{let{server:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:s}=m(t);return l$1({destinationType:e,custom:{server:r,path:s}},l(e,t))}}},{key:"azure",displayName:$localize`Azure Blob Storage`,description:$localize`Store backups in Azure Blob Storage.`,sourceDescription:$localize`Use files from Azure Blob Storage as a remote source.`,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=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"onedrivev2",displayName:$localize`OneDrive`,description:$localize`Store backups in OneDrive.`,sourceDescription:$localize`Use files from OneDrive as a remote source.`,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=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"od4b",displayName:$localize`OneDrive Business (deprecated)`,description:$localize`Store backups in OneDrive Business. Deprecated, use Sharepoint instead.`,sourceDescription:$localize`Use files from OneDrive Business as a remote source. Deprecated, use SharePoint instead.`,icon:"assets/dest-icons/one-drive.png",searchTerms:"microsoft ms",sortOrder:-1,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:true}],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:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"mssp",displayName:$localize`Microsoft SharePoint (deprecated)`,description:$localize`Store backups in Microsoft SharePoint using legacy API.`,sourceDescription:$localize`Use files from Microsoft SharePoint as a remote source using the legacy API.`,icon:"assets/dest-icons/sharepoint.png",searchTerms:"microsoft ms",sortOrder:-1,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:true}],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:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"sharepoint",displayName:$localize`Microsoft SharePoint`,description:$localize`Store backups in Microsoft SharePoint.`,sourceDescription:$localize`Use files from Microsoft SharePoint as a remote source.`,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=>n.control(e??"")}},dynamicFields:[{name:"site-id",isMandatory:true},{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"dropbox",displayName:$localize`Dropbox`,description:$localize`Store backups in Dropbox.`,sourceDescription:$localize`Use files from Dropbox as a remote source.`,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=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"box",displayName:$localize`Box.com`,description:$localize`Store backups in Box.com.`,sourceDescription:$localize`Use files from Box.com as a remote source.`,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=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"jottacloud",displayName:$localize`Jottacloud`,description:$localize`Store backups in Jottacloud.`,sourceDescription:$localize`Use files from Jottacloud as a remote source.`,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=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"b2",displayName:$localize`B2 Cloud Storage`,description:$localize`Store backups in B2 Cloud Storage.`,sourceDescription:$localize`Use files from B2 Cloud Storage as a remote source.`,icon:"assets/dest-icons/backblaze.png",searchTerms:"backblaze",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true,validate:e=>{function t(o){if(!o)return false;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=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Application ID`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Application Key`,isMandatory:true}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},{key:"e2",displayName:$localize`IDrive e2`,description:$localize`Store backups in IDrive e2.`,sourceDescription:$localize`Use files from IDrive e2 as a remote source.`,icon:"assets/dest-icons/idrive-e2.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Access ID`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Access Secret`,isMandatory:true}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{bucket:r,path:s}},l(e,t))}}},{key:"mega",displayName:$localize`Mega.nz`,description:$localize`Store backups in Mega.nz.`,sourceDescription:$localize`Use files from Mega.nz as a remote source.`,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=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],mapper:{to:e=>{let t=e.custom.path;return c(e,null,null,t)},from:(e,t,o)=>l$1({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.`,sourceDescription:$localize`Use files from Microsoft Office 365 Group as a remote source.`,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=>n.control(e??"",[me.email]),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"cloudfiles",displayName:$localize`Rackspace CloudFiles`,description:$localize`Store backups in Rackspace CloudFiles.`,sourceDescription:$localize`Use files from Rackspace CloudFiles as a remote source.`,icon:"assets/dest-icons/rackspace.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],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:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"rclone",displayName:$localize`Rclone`,description:$localize`Store backups in Rclone.`,sourceDescription:$localize`Use files from Rclone as a remote source.`,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(([s])=>!["rclone-remote-repository","rclone-remote-path"].includes(s));return U(e.destinationType??"rclone",t,null,o,[...Object.entries(e.advanced??{}),...r])},from:(e,t,o)=>{let{advanced:r,dynamic:s}=l(e,t),{bucket:i,path:u}=m(t);return {destinationType:e,dynamic:l$1({"rclone-remote-repository":i,"rclone-remote-path":u},s),advanced:l$1({},r)}}}},{key:"openstack",displayName:$localize`OpenStack Object Storage`,description:$localize`Store backups in OpenStack Object Storage.`,sourceDescription:$localize`Use files from OpenStack Object Storage as a remote source.`,icon:"assets/dest-icons/open-stack.png",searchTerms:"swift",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket`,longDescription:$localize`Bucket`,formElement:e=>n.control(e??""),isMandatory:true}},dynamicFields:[{name:"openstack-authuri",shortDescription:$localize`Auth URI`,type:"Enumeration",loadOptions:e=>e.get(d).getOpenstackProviders(),isMandatory:true},{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:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},{key:"webdav",displayName:$localize`WebDAV`,description:$localize`Store backups in WebDAV.`,sourceDescription:$localize`Use files from WebDAV as a remote source.`,icon:"assets/dest-icons/webdav.png",searchTerms:"web dav",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`},{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],advancedFields:[{type:"FileTree",name:"debug-propfind-file",accepts:".txt,.log"}],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:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"aftp",displayName:$localize`Alternative FTP`,description:$localize`Store backups in FTP.`,sourceDescription:$localize`Use files from FTP as a remote source.`,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=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.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=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],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:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"ftp",displayName:$localize`FTP`,description:$localize`Store backups in FTP.`,sourceDescription:$localize`Use files from FTP as a remote source.`,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=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.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=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],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:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"sia",displayName:$localize`Sia Decentrilized Cloud`,description:$localize`Store backups in Sia Decentrilized Cloud.`,sourceDescription:$localize`Use files from Sia Decentralized Cloud as a remote source.`,icon:"assets/dest-icons/sia-cloud.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true}},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(([s])=>s!=="sia-targetpath")];return U(e.destinationType??"sia",t,null,o,r)},from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"cos",displayName:$localize`Tencent COS`,description:$localize`Store backups in Tencent COS.`,sourceDescription:$localize`Use files from Tencent COS as a remote source.`,icon:"assets/dest-icons/tencent-cloud.png",customFields:{bucket:{name:"bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:true,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"cos-region",shortDescription:$localize`Region`},{name:"cos-app-id",shortDescription:$localize`COS App Id`,isMandatory:true},{name:"cos-secret-id",shortDescription:$localize`COS Secret Id`,isMandatory:true},{name:"cos-secret-key",shortDescription:$localize`COS Secret Key`,isMandatory:true}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=m$1(l$1({},e),{advanced:m$1(l$1({},e.advanced),{"cos-bucket":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),s=r.advanced["cos-bucket"];return delete r.advanced["cos-bucket"],l$1({destinationType:e,custom:{path:h(t),bucket:s}},r)}}},{key:"tahoe",displayName:$localize`Tahoe LAFS`,description:$localize`Store backups in Tahoe LAFS.`,sourceDescription:$localize`Use files from Tahoe LAFS as a remote source.`,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=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.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:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"smb",displayName:$localize`Windows Share (SMB)`,description:$localize`Store backups on SMB storage.`,sourceDescription:$localize`Use files from SMB storage as a remote source.`,icon:"assets/dest-icons/smb.png",searchTerms:"cifs samba",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},share:{type:"Hostname",name:"share",shortDescription:$localize`Share Name`,longDescription:$localize`Share Name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:["transport",{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true},"auth-domain"],mapper:{to:e=>{let{share:t,server:o,path:r}=e.custom;return c(e,o,null,N(t,r))},from:(e,t,o)=>{let{server:r,path:s}=m(t),i=s.split("/")[0],u=s.split("/").slice(1).join("/");return l$1({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.`,sourceDescription:$localize`Use files from CIFS storage as a remote source. Deprecated, use SMB instead.`,icon:"assets/dest-icons/smb.png",sortOrder:-1,mapper:L.mapper},{key:"filen",displayName:$localize`Filen.io`,description:$localize`Store backups in Filen.io.`,sourceDescription:$localize`Use files from Filen.io as a remote source.`,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=>n.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true},{name:"two-factor-code",type:"Filen2FACode"}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"filejump",displayName:$localize`Filejump`,description:$localize`Store backups in Filejump.`,sourceDescription:$localize`Use files from Filejump as a remote source.`,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=>n.control(e??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:$localize`API Token`,longDescription:$localize`Filejump API Token`,formElement:e=>n.control(e??""),isMandatory:true}],mapper:{to:e=>{let{path:t}=e.custom;return c(e,null,null,t)},from:(e,t,o)=>l$1({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.`,sourceDescription:$localize`Use files from Storj with an access grant as a remote source.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-shared-access",shortDescription:$localize`Access Grant`,isMandatory:true},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:true},{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:true}],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"],l$1({destinationType:e},r)},intercept:e=>e.protocol!=="storj:"?false:!!(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.`,sourceDescription:$localize`Use files from Storj with an API key as a remote source.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getStorjSatellites(),isMandatory:true},{name:"storj-api-key",shortDescription:$localize`API Key`,isMandatory:true},{name:"storj-secret",shortDescription:$localize`Secret`,isMandatory:true},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:true},{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"],l$1({destinationType:e},r)},intercept:e=>e.protocol!=="storj:"?false:!!(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`,sourceDescription:$localize`Use files from Aliyun OSS as a remote source.`,icon:"assets/dest-icons/aliyun.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in bucket`,longDescription:$localize`Path in bucket`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"oss-endpoint",isMandatory:true},{name:"oss-access-key-id",isMandatory:true},{name:"oss-access-key-secret",isMandatory:true}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=m$1(l$1({},e),{advanced:m$1(l$1({},e.advanced),{"oss-bucket-name":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),s=r.advanced["oss-bucket-name"];return delete r.advanced["oss-bucket-name"],l$1({destinationType:e,custom:{path:h(t),bucket:s}},r)}}},{key:"office365",displayName:$localize`Microsoft 365`,description:$localize`Create backups of Microsoft 365 data.`,sourceDescription:$localize`Use Microsoft 365 data as a remote source.`,searchTerms:"office o365 office365 m365 ms365",icon:"assets/dest-icons/office365.png",isNonFree:true,dynamicFields:[{name:"auth-username",shortDescription:$localize`Client ID`,longDescription:$localize`Application (client) ID from your Azure AD app registration.`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Client Secret`,longDescription:$localize`Client Secret from your Azure AD app registration.`,isMandatory:true},{name:"office365-tenant-id",shortDescription:$localize`Tenant ID`,isMandatory:true}],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:s}=l(e,t);return {destinationType:e,advanced:l$1({},r),dynamic:l$1({},s)}}}},{key:"googleworkspace",displayName:$localize`Google Workspace`,description:$localize`Create backups of Google Workspace data.`,sourceDescription:$localize`Use Google Workspace data as a remote source.`,icon:"assets/dest-icons/googleworkspace.png",isNonFree:true,dynamicFields:[{name:"google-admin-email",type:"Email",shortDescription:$localize`Admin Email`,longDescription:$localize`Email address of the Google Workspace admin user.`,isMandatory:true},{name:"google-service-account-json",type:"FreeText",shortDescription:$localize`Service account JSON`,longDescription:$localize`Paste the service account JSON here.`,isMandatory:true}],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:s}=l(e,t);return {destinationType:e,advanced:l$1({},r),dynamic:l$1({},s)}}}},{key:"drimecloud",displayName:$localize`Drime Cloud`,description:$localize`Store backups in Drime Cloud.`,sourceDescription:$localize`Use files from Drime Cloud as a remote source.`,icon:"assets/dest-icons/drime.png",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in Drime Cloud`,longDescription:$localize`Path in Drime Cloud`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"api-token",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},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"])],H={".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 J=new jn,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 U(e.destinationType??"file",t,o,r,[...Object.entries(e.advanced),...Object.entries(e.dynamic)])}function U(e,t,o,r,s){let i=b(s),u=encodeURIComponent(X(t)),S=u==""?"":u+Y(o),k=r??"",w=k.slice(1).startsWith(":\\")&&e=="file"?"file:///":`${e}://`,$=N(S,Q(k));return `${w}${$}${i}`}function Z(e){return e==null||e===""?"":e.startsWith("/")?e.substring(1):e}function N(...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 Q(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 X(e){return e==null||e===""?"":e.endsWith("/")?e.substring(0,e.length-1):e}function Y(e){return e==null||e===""?"":":"+e.toString()}function Ee(e){return e?e.startsWith("diskimage:")?"assets/dest-icons/external-harddrive.png":V(e).icon:""}function Le(e){if(!e)return "";if(e.startsWith("diskimage:"))return $localize`Local disk`;let t=V(e);return t?t.displayName:"Unknown"}function V(e){try{let o=new v(e),r=P.find(s=>s.mapper.intercept?.(o));if(r)return r}catch{}let t=e.split("://")[0];return G(t)}var ee={file:{Display:$localize`Local`,Icon:null}};function Ne(e){if(!e)return "";let t=V(e);if(!t)return "";let o=ee[t.key];if(o?.Display)return o.Display;if(t.key==="s3"){let r="http://null?"+e.split("?")[1],i=new URL(r).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[u,S]of Object.entries(H))if(i.endsWith(u))return S}return t.displayName}function G(e){return P.find(o=>o.key===e||o.customKey===e)??P.find(o=>`${o.key}s`===e)??null??l$1({key:e,displayName:e},L)}function Ie(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:Z(decodeURIComponent(e.pathname))}}function l(e,t){let o={},r={},s=G(e);return t.searchParams.forEach((i,u)=>{s?.dynamicFields?.some(k=>k===u||k?.name===u)?r[u]=decodeURIComponent(i):o[u]=decodeURIComponent(i);}),{advanced:o,dynamic:r}}function b(e,t=false){let o=e.map(([s,i])=>`${s}=${i?encodeURIComponent(i.toString()):""}`).join("&");return o?(t?"":"?")+o:""}function Be(e){let t=e.destinationType??"";return G(t)?.mapper.to(e)??""}function xe(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 s=V(e),i="";if(`${s.key}s`===t&&(i+=r.indexOf("?")===-1?"?":"&",i+="use-ssl=true",e=s.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 G(t).mapper.from(t,new v("http://localhost"+i),e);try{let u=new v(r+i);if(u.host==="undefined")return null;let S=o.split("?")[0].split("/")[0],k=u.host!=""&&!isNaN(Number(u.host.replaceAll(".",""))),A=S.split("."),w=A.length===4&&A.every($=>$.length&&$.length<=3&&!isNaN(Number($))&&parseInt($)<=255);return k&&!w?null:s.mapper.from(s.key,u,e)}catch(u){return console.error("Error while parsing target path",e,r+i,u),null}}function _(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("="),s=r.join("=").trim();return o.trim()?[o.trim(),s]:null}).filter(t=>t!==null)}function je(e){return _(e).map(([t,o])=>({Name:t,Value:o}))}function Te(e){return Object.fromEntries(_(e))}function Re(e){if(!e)return false;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 We(e){if(!e||e.length>253)return false;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 false;return true}function g(e,t,o,r,s){return m$1(l$1({},F),{customKey:`s3-${e}`,icon:r??F.icon,displayName:$localize`${t} (S3)`,description:$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=>s.some(S=>u.value.endsWith(S))),isMandatory:true,formElement:i=>J.control(i??"")}],mapper:m$1(l$1({},F.mapper),{to:i=>{let{bucket:u,path:S}=i.custom;return s.some(k=>i.dynamic["s3-server-name"]?.endsWith(k))&&(i.destinationType="s3"),c(i,u,null,S)},default:i=>`s3-${e}://?use-ssl=true`,intercept:i=>s.some(u=>i.searchParams.get("s3-server-name")?.endsWith(u))??false})})}
|
|
3
3
|
export{Be as B,Ee as E,G,Ie as I,Le as L,Ne as N,Re as R,Te as T,V,We as W,d,h,je as j,xe as x};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {e as ee}from'./chunk-CzJ3-6Pu.js';import'./chunk-oTpkLrqH.js';import'./chunk-dCFVYHva.js';import'./chunk--kVw-BwM.js';import'./chunk-DuTbfCdT.js';import'./chunk-DKacf9Tj.js';import'./chunk-CI8lsvKT.js';import'./chunk-C5p3bQwH.js';import {T,aw as W,a5 as g,ab as C,a6 as be,G as Ge,aG as pt,N as Nt,z as za,aE as jo,H as qu,at as h,h as hw,v,d as N$1,_ as _t,j as vg,Q as Qi,L as Lg,F as Fg,$ as $l,n as nC,V as Vg,p as cm,s as CD,f as aT,C as CE,au as jg,av as rC,Y as Yg,A as yg,g as NC,x as am,y as _D,i as cT,U as UC,aU as iy,aV as sy,w as jC}from'./main-QLXVXD6E.js';import'./chunk-PONAC1Ya.js';import {F as Fe}from'./chunk-D3SUPUQT.js';import {B as Bn,Z as Ze,R as Rn,J as Jt}from'./chunk-DoYGADYB.js';import {a as at}from'./chunk-Crs56mDy.js';import'./chunk-Bcxzhjj8.js';import'./chunk-BYJ0fSUP.js';import {L,F}from'./chunk-D3d-eReU.js';import'./chunk-D2aWqPl_.js';function ue(_,t){_&1&&(Qi(0,"sh-icon",20),jC(1,"spinner"),$l());}function pe(_,t){_&1&&(Qi(0,"sh-icon",21),jC(1,"check"),$l());}function he(_,t){_&1&&(Qi(0,"sh-icon",22),jC(1,"warning"),$l()),_&2&&yg("shTooltip","File not found");}function Te(_,t){let a=F(_).pipe(iy(t),sy());return L(a,{initialValue:_()})}var N=class _{#o=T(W);#s=T(g);#e=T(C);#a=T(be);#t=Ge("");backupId=L(this.#o.params.pipe(pt(t=>t.id)));activeBackup=Nt(()=>this.#s.backups().find(t=>t.Backup?.ID===this.backupId()));backupFilePath=Ge("");lastValidatedPath=Ge("");isValidatedPath=Nt(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=Nt(()=>this.backupFilePath()!==this.#t());isValidatingPath=Ge(false);#i=Te(this.backupFilePath,500);#n=Ge(false);isWaitingForValidation=Nt(()=>this.#i()!=this.backupFilePath()||this.isValidatingPath());backupFilePathEffect=za(()=>{let t=this.#i();this.activeBackup();this.#n();t!==""&&(this.isValidatingPath.set(true),this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).pipe(jo(1),qu(()=>this.isValidatingPath.set(false))).subscribe(()=>this.lastValidatedPath.set(t)));});isRestoring=Ge(false);isRepairing=Ge(false);isDeleting=Ge(false);isSavingDbPath=Ge(false);isSavingAndRepairing=Ge(false);isMovingDb=Ge(false);isCreatingBugReport=Ge(false);createdReport=Ge(false);isCompacting=Ge(false);activeBackupEffect=za(()=>{let t=this.activeBackup();if(!t)return;let a=t.Backup?.DBPath??"";this.backupFilePath.set(a),this.#t.set(a);});repairDatabase(){this.isRepairing.set(true),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(jo(1),qu(()=>this.isRepairing.set(false))).subscribe();}deleteDatabase(t=null){this.isValidatedPath()?this.#a.open(h,{data:{title:$localize`Confirm delete?`,message:$localize`Do you really want to delete the database for ${this.activeBackup()?.Backup?.Name}?`,confirmText:$localize`Delete database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doDeleteDatabase(t);}}):this.doDeleteDatabase(t);}doDeleteDatabase(t=null){this.isDeleting.set(true),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(jo(1),qu(()=>this.isDeleting.set(false))).subscribe(()=>{this.lastValidatedPath.set(""),t?.();});}restoreDatabase(){this.isValidatedPath()?this.deleteDatabase(()=>{this.doRepairDatabase();}):this.doRepairDatabase();}doRepairDatabase(){this.isRestoring.set(true),this.#e.postApiV1BackupByIdRepair({id:this.backupId(),requestBody:{}}).pipe(jo(1),qu(()=>this.isRestoring.set(false))).subscribe();}resetDatabasePath(){this.backupFilePath.set(this.#t());}saveDatabasePath(t=null){this.isValidatedPath()?this.#a.open(h,{data:{title:$localize`Confirm reassign?`,message:$localize`The target database path already exists and may belong to another backup. Are you sure you want to assign this backup to an existing database?`,confirmText:$localize`Assign existing database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doSaveDatabasePath(t);}}):this.doSaveDatabasePath(t);}doSaveDatabasePath(t=null){this.isSavingDbPath.set(true);let a=this.backupFilePath();this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:a}}).pipe(qu(()=>this.isSavingDbPath.set(false))).subscribe(()=>{this.#t.set(a),t?.();});}saveAndRepairDatabasePath(){this.saveDatabasePath(()=>(this.isSavingAndRepairing.set(true),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(jo(1),qu(()=>this.isSavingAndRepairing.set(false))).subscribe()));}moveDatabasePath(){this.isMovingDb.set(true);let t=this.backupFilePath();this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:t}}).pipe(qu(()=>this.isMovingDb.set(false))).subscribe(()=>{this.#n.update(a=>!a),this.#t.set(t);});}createErrorReport(){this.isCreatingBugReport.set(true),this.#e.postApiV1BackupByIdCreatereport({id:this.backupId()}).pipe(qu(()=>this.isCreatingBugReport.set(false))).subscribe({next:()=>{this.createdReport.set(true),window.setTimeout(()=>this.createdReport.set(false),3e3);}});}compactDatabase(){this.isCompacting.set(true),this.#e.postApiV1BackupByIdCompact({id:this.backupId()}).pipe(qu(()=>this.isCompacting.set(false))).subscribe();}static \u0275fac=function(a){return new(a||_)};static \u0275cmp=hw({type:_,selectors:[["app-database"]],decls:53,vars:24,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let a;a=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let r;r=$localize`Maintenance`;let S;S=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. The bug report button can be used to create a copy of the database with path information removed. This should only be used if a developer requests to investigate an issue with your database. `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Repair `;let I;I=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let M;M=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Recreate (delete and repair) `;let R;R=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:file-plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Create bug report database `;let B;B=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Compact `;let O;O=$localize`Placement`;let $;$=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:backspace${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Reset `;let v;v=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Save `;let k;k=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON: Save & Repair `;let y;return y=$localize`${"\uFFFD#52\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#52\uFFFD"}:CLOSE_TAG_SH_ICON: Move existing database `,[t,a,e,r,S,f,I,M,R,B,O,$,v,k,y,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"actions","maintenance"],["shButton","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix","",1,"primary"],["prefix",""],["prefix","",3,"shTooltip"],[1,"actions","placement"]]},template:function(a,e){a&1&&(vg(0,"app-status-bar"),Qi(1,"section")(2,"div",15)(3,"button",16),Lg(4,0),vg(5,"sh-icon"),Fg(),$l()(),Qi(6,"article")(7,"h1"),nC(8,1),$l(),Qi(9,"p"),nC(10,2),$l()(),Qi(11,"article")(12,"h2"),nC(13,3),$l(),Qi(14,"p"),nC(15,4),$l(),Qi(16,"div",17)(17,"button",18),Vg("click",function(){return e.repairDatabase()}),Lg(18,5),vg(19,"sh-icon"),Fg(),$l(),Qi(20,"button",18),Vg("click",function(){return e.deleteDatabase()}),Lg(21,6),vg(22,"sh-icon"),Fg(),$l(),Qi(23,"button",18),Vg("click",function(){return e.restoreDatabase()}),Lg(24,7),vg(25,"sh-icon"),Fg(),$l(),Qi(26,"button",18),Vg("click",function(){return e.createErrorReport()}),Lg(27,8),vg(28,"sh-icon"),Fg(),$l(),Qi(29,"button",18),Vg("click",function(){return e.compactDatabase()}),Lg(30,9),vg(31,"sh-icon"),Fg(),$l()()(),Qi(32,"article")(33,"h2"),nC(34,10),$l(),Qi(35,"sh-form-field")(36,"input",19),cm("ngModelChange",function(S){return UC(e.backupFilePath,S)||(e.backupFilePath=S),S}),$l(),CD(),aT(37,ue,2,0,"sh-icon",20)(38,pe,2,0,"sh-icon",21)(39,he,2,1,"sh-icon",22),$l(),Qi(40,"div",23)(41,"button",18),Vg("click",function(){return e.resetDatabasePath()}),Lg(42,11),vg(43,"sh-icon"),Fg(),$l(),Qi(44,"button",18),Vg("click",function(){return e.saveDatabasePath()}),Lg(45,12),vg(46,"sh-icon"),Fg(),$l(),Qi(47,"button",18),Vg("click",function(){return e.saveAndRepairDatabasePath()}),Lg(48,13),vg(49,"sh-icon"),Fg(),$l(),Qi(50,"button",18),Vg("click",function(){return e.moveDatabasePath()}),Lg(51,14),vg(52,"sh-icon"),Fg(),$l()()()()),a&2&&(CE(8),jg(e.activeBackup()?.Backup?.Name),rC(8),CE(9),Yg("loading",e.isRepairing()),yg("disabled",!e.isValidatedPath()||e.pathHasChanged()),CE(3),Yg("loading",e.isDeleting()),yg("disabled",!e.isValidatedPath()||e.pathHasChanged()),CE(3),Yg("loading",e.isRestoring()),yg("disabled",e.pathHasChanged()),CE(3),Yg("loading",e.isCreatingBugReport()),yg("disabled",e.isCreatingBugReport()||!e.isValidatedPath()||e.pathHasChanged()),CE(3),Yg("loading",e.isCompacting()),yg("disabled",e.isCompacting()||!e.isValidatedPath()||e.pathHasChanged()),CE(6),NC(e.isValidatedPath()?"success":"error"),CE(),am("ngModel",e.backupFilePath),_D(),CE(),cT(e.isWaitingForValidation()?37:e.isValidatedPath()?38:39),CE(4),yg("disabled",!e.pathHasChanged()),CE(3),yg("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),CE(3),yg("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),CE(3),yg("disabled",!e.pathHasChanged()||e.isValidatedPath()||e.isWaitingForValidation()));},dependencies:[Bn,Ze,Rn,Jt,ee,v,Fe,N$1,at,_t],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"]})};export{N as default};
|
|
1
|
+
import {e as ee}from'./chunk-C4GeR7BF.js';import'./chunk-CUaRQ2FJ.js';import'./chunk-aOMoAKYY.js';import'./chunk-BEhUV7oX.js';import'./chunk-Bb6BmVO4.js';import'./chunk-DmDqcC4A.js';import'./chunk-B53Wj4F9.js';import'./chunk-BTgf5lfZ.js';import {T,aw as W,a5 as g,ab as C,a6 as be,G as Ge,aG as pt,N as Nt,z as za,aE as jo,H as qu,at as h,h as hw,v,d as N$1,_ as _t,j as vg,Q as Qi,L as Lg,F as Fg,$ as $l,n as nC,V as Vg,p as cm,s as CD,f as aT,C as CE,au as jg,av as rC,Y as Yg,A as yg,g as NC,x as am,y as _D,i as cT,U as UC,aU as iy,aV as sy,w as jC}from'./main-VVQP2YE7.js';import'./chunk-B8uF0dom.js';import {F as Fe}from'./chunk-B9maI7Xa.js';import {B as Bn,Z as Ze,R as Rn,J as Jt}from'./chunk-BO2GlieG.js';import {a as at}from'./chunk-CKnRcyHZ.js';import'./chunk-CwKy8pxa.js';import'./chunk-BVEyeg9y.js';import {L,F}from'./chunk-Box6Lckh.js';import'./chunk-DqIU7ViF.js';function ue(_,t){_&1&&(Qi(0,"sh-icon",20),jC(1,"spinner"),$l());}function pe(_,t){_&1&&(Qi(0,"sh-icon",21),jC(1,"check"),$l());}function he(_,t){_&1&&(Qi(0,"sh-icon",22),jC(1,"warning"),$l()),_&2&&yg("shTooltip","File not found");}function Te(_,t){let a=F(_).pipe(iy(t),sy());return L(a,{initialValue:_()})}var N=class _{#o=T(W);#s=T(g);#e=T(C);#a=T(be);#t=Ge("");backupId=L(this.#o.params.pipe(pt(t=>t.id)));activeBackup=Nt(()=>this.#s.backups().find(t=>t.Backup?.ID===this.backupId()));backupFilePath=Ge("");lastValidatedPath=Ge("");isValidatedPath=Nt(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=Nt(()=>this.backupFilePath()!==this.#t());isValidatingPath=Ge(false);#i=Te(this.backupFilePath,500);#n=Ge(false);isWaitingForValidation=Nt(()=>this.#i()!=this.backupFilePath()||this.isValidatingPath());backupFilePathEffect=za(()=>{let t=this.#i();this.activeBackup();this.#n();t!==""&&(this.isValidatingPath.set(true),this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).pipe(jo(1),qu(()=>this.isValidatingPath.set(false))).subscribe(()=>this.lastValidatedPath.set(t)));});isRestoring=Ge(false);isRepairing=Ge(false);isDeleting=Ge(false);isSavingDbPath=Ge(false);isSavingAndRepairing=Ge(false);isMovingDb=Ge(false);isCreatingBugReport=Ge(false);createdReport=Ge(false);isCompacting=Ge(false);activeBackupEffect=za(()=>{let t=this.activeBackup();if(!t)return;let a=t.Backup?.DBPath??"";this.backupFilePath.set(a),this.#t.set(a);});repairDatabase(){this.isRepairing.set(true),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(jo(1),qu(()=>this.isRepairing.set(false))).subscribe();}deleteDatabase(t=null){this.isValidatedPath()?this.#a.open(h,{data:{title:$localize`Confirm delete?`,message:$localize`Do you really want to delete the database for ${this.activeBackup()?.Backup?.Name}?`,confirmText:$localize`Delete database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doDeleteDatabase(t);}}):this.doDeleteDatabase(t);}doDeleteDatabase(t=null){this.isDeleting.set(true),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(jo(1),qu(()=>this.isDeleting.set(false))).subscribe(()=>{this.lastValidatedPath.set(""),t?.();});}restoreDatabase(){this.isValidatedPath()?this.deleteDatabase(()=>{this.doRepairDatabase();}):this.doRepairDatabase();}doRepairDatabase(){this.isRestoring.set(true),this.#e.postApiV1BackupByIdRepair({id:this.backupId(),requestBody:{}}).pipe(jo(1),qu(()=>this.isRestoring.set(false))).subscribe();}resetDatabasePath(){this.backupFilePath.set(this.#t());}saveDatabasePath(t=null){this.isValidatedPath()?this.#a.open(h,{data:{title:$localize`Confirm reassign?`,message:$localize`The target database path already exists and may belong to another backup. Are you sure you want to assign this backup to an existing database?`,confirmText:$localize`Assign existing database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doSaveDatabasePath(t);}}):this.doSaveDatabasePath(t);}doSaveDatabasePath(t=null){this.isSavingDbPath.set(true);let a=this.backupFilePath();this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:a}}).pipe(qu(()=>this.isSavingDbPath.set(false))).subscribe(()=>{this.#t.set(a),t?.();});}saveAndRepairDatabasePath(){this.saveDatabasePath(()=>(this.isSavingAndRepairing.set(true),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(jo(1),qu(()=>this.isSavingAndRepairing.set(false))).subscribe()));}moveDatabasePath(){this.isMovingDb.set(true);let t=this.backupFilePath();this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:t}}).pipe(qu(()=>this.isMovingDb.set(false))).subscribe(()=>{this.#n.update(a=>!a),this.#t.set(t);});}createErrorReport(){this.isCreatingBugReport.set(true),this.#e.postApiV1BackupByIdCreatereport({id:this.backupId()}).pipe(qu(()=>this.isCreatingBugReport.set(false))).subscribe({next:()=>{this.createdReport.set(true),window.setTimeout(()=>this.createdReport.set(false),3e3);}});}compactDatabase(){this.isCompacting.set(true),this.#e.postApiV1BackupByIdCompact({id:this.backupId()}).pipe(qu(()=>this.isCompacting.set(false))).subscribe();}static \u0275fac=function(a){return new(a||_)};static \u0275cmp=hw({type:_,selectors:[["app-database"]],decls:53,vars:24,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let a;a=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let r;r=$localize`Maintenance`;let S;S=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. The bug report button can be used to create a copy of the database with path information removed. This should only be used if a developer requests to investigate an issue with your database. `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Repair `;let I;I=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let M;M=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Recreate (delete and repair) `;let R;R=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:file-plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Create bug report database `;let B;B=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Compact `;let O;O=$localize`Placement`;let $;$=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:backspace${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Reset `;let v;v=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Save `;let k;k=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON: Save & Repair `;let y;return y=$localize`${"\uFFFD#52\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#52\uFFFD"}:CLOSE_TAG_SH_ICON: Move existing database `,[t,a,e,r,S,f,I,M,R,B,O,$,v,k,y,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"actions","maintenance"],["shButton","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix","",1,"primary"],["prefix",""],["prefix","",3,"shTooltip"],[1,"actions","placement"]]},template:function(a,e){a&1&&(vg(0,"app-status-bar"),Qi(1,"section")(2,"div",15)(3,"button",16),Lg(4,0),vg(5,"sh-icon"),Fg(),$l()(),Qi(6,"article")(7,"h1"),nC(8,1),$l(),Qi(9,"p"),nC(10,2),$l()(),Qi(11,"article")(12,"h2"),nC(13,3),$l(),Qi(14,"p"),nC(15,4),$l(),Qi(16,"div",17)(17,"button",18),Vg("click",function(){return e.repairDatabase()}),Lg(18,5),vg(19,"sh-icon"),Fg(),$l(),Qi(20,"button",18),Vg("click",function(){return e.deleteDatabase()}),Lg(21,6),vg(22,"sh-icon"),Fg(),$l(),Qi(23,"button",18),Vg("click",function(){return e.restoreDatabase()}),Lg(24,7),vg(25,"sh-icon"),Fg(),$l(),Qi(26,"button",18),Vg("click",function(){return e.createErrorReport()}),Lg(27,8),vg(28,"sh-icon"),Fg(),$l(),Qi(29,"button",18),Vg("click",function(){return e.compactDatabase()}),Lg(30,9),vg(31,"sh-icon"),Fg(),$l()()(),Qi(32,"article")(33,"h2"),nC(34,10),$l(),Qi(35,"sh-form-field")(36,"input",19),cm("ngModelChange",function(S){return UC(e.backupFilePath,S)||(e.backupFilePath=S),S}),$l(),CD(),aT(37,ue,2,0,"sh-icon",20)(38,pe,2,0,"sh-icon",21)(39,he,2,1,"sh-icon",22),$l(),Qi(40,"div",23)(41,"button",18),Vg("click",function(){return e.resetDatabasePath()}),Lg(42,11),vg(43,"sh-icon"),Fg(),$l(),Qi(44,"button",18),Vg("click",function(){return e.saveDatabasePath()}),Lg(45,12),vg(46,"sh-icon"),Fg(),$l(),Qi(47,"button",18),Vg("click",function(){return e.saveAndRepairDatabasePath()}),Lg(48,13),vg(49,"sh-icon"),Fg(),$l(),Qi(50,"button",18),Vg("click",function(){return e.moveDatabasePath()}),Lg(51,14),vg(52,"sh-icon"),Fg(),$l()()()()),a&2&&(CE(8),jg(e.activeBackup()?.Backup?.Name),rC(8),CE(9),Yg("loading",e.isRepairing()),yg("disabled",!e.isValidatedPath()||e.pathHasChanged()),CE(3),Yg("loading",e.isDeleting()),yg("disabled",!e.isValidatedPath()||e.pathHasChanged()),CE(3),Yg("loading",e.isRestoring()),yg("disabled",e.pathHasChanged()),CE(3),Yg("loading",e.isCreatingBugReport()),yg("disabled",e.isCreatingBugReport()||!e.isValidatedPath()||e.pathHasChanged()),CE(3),Yg("loading",e.isCompacting()),yg("disabled",e.isCompacting()||!e.isValidatedPath()||e.pathHasChanged()),CE(6),NC(e.isValidatedPath()?"success":"error"),CE(),am("ngModel",e.backupFilePath),_D(),CE(),cT(e.isWaitingForValidation()?37:e.isValidatedPath()?38:39),CE(4),yg("disabled",!e.pathHasChanged()),CE(3),yg("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),CE(3),yg("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),CE(3),yg("disabled",!e.pathHasChanged()||e.isValidatedPath()||e.isWaitingForValidation()));},dependencies:[Bn,Ze,Rn,Jt,ee,v,Fe,N$1,at,_t],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"]})};export{N as default};
|