@duplicati/ngclient 0.0.192 → 0.0.193
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-2XK5TFRS.js +1 -0
- package/{chunk-TVPL74LA.js → chunk-2YEG7JK3.js} +1 -1
- package/{chunk-4VEFX5WQ.js → chunk-3SHOBVX6.js} +1 -1
- package/{chunk-XVMWHVXW.js → chunk-4CELGWVJ.js} +1 -1
- package/{chunk-FVYGOV5T.js → chunk-7BMCHZU3.js} +1 -1
- package/{chunk-EBG66QHZ.js → chunk-ATPBBNLG.js} +1 -1
- package/{chunk-S4JEJMGL.js → chunk-BOZ44QUT.js} +1 -1
- package/{chunk-IW4RDAIN.js → chunk-DGKNUD3G.js} +1 -1
- package/{chunk-EA7ODJNP.js → chunk-ECRDYEF2.js} +1 -1
- package/{chunk-MRY5WXEL.js → chunk-G22PSFMM.js} +1 -1
- package/{chunk-XFILSHZ3.js → chunk-LSXNHFLE.js} +1 -1
- package/{chunk-2QP2Y5QS.js → chunk-OCQNG4JU.js} +1 -1
- package/{chunk-OKRHMEJ3.js → chunk-PEHM5KSY.js} +1 -1
- package/{chunk-NL2ZZ3VX.js → chunk-S3K2SIX7.js} +1 -1
- package/{chunk-OHUPKPB3.js → chunk-VTKKVX26.js} +1 -1
- package/{chunk-VQP7COG3.js → chunk-W3543UFN.js} +1 -1
- package/{chunk-TAV6KZ24.js → chunk-XFDHZX44.js} +1 -1
- package/{chunk-PWXOEZ7N.js → chunk-XR7KQQO4.js} +1 -1
- package/index.html +1 -1
- package/{main-EZXC37KQ.js → main-P5KAOOPB.js} +1 -1
- package/package.json +1 -1
- package/chunk-WHF2HNKB.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as P,r as O}from"./chunk-HPNLQHW6.js";import{c as B}from"./chunk-BGTK25UG.js";import{E as L,Mc as w,R as I,W as N,la as b,p as f}from"./chunk-T2WO6CVD.js";import{a,b as D}from"./chunk-7CGTOI24.js";var y=class{constructor(t){this.loader=t}_data=b(void 0);_isLoading=!1;_loaded=!1;load(){return!this._loaded&&!this._isLoading&&(this._isLoading=!0,this.loader().pipe(L(()=>this._isLoading=!1)).subscribe(t=>{this._data.set(t),this._loaded=!0})),this._data.asReadonly()}value(){return this._data.asReadonly()}isLoading(){return this._isLoading}isLoaded(){return this._loaded}reset(){this._data.set(void 0),this._loaded=!1}};var d=class e{#e=N(B);#o=new y(()=>this.getS3Config("Providers"));#n=new y(()=>this.getS3Config("Regions"));#r=new y(()=>this.getS3Config("RegionHosts"));#s=new y(()=>this.getS3Config("StorageClasses"));#i=w(()=>{let t=this.#o.value()(),o=this.#r.value()(),r=[...t??[],...o?.map(n=>({key:`Amazon ${n.key}`,value:n.value}))??[]];return Array.from(new Map(r.map(n=>[n.value,n])).values())});#a=new y(()=>this.getStorjConfig("Satellites"));#l=new y(()=>this.getStorjConfig("AuthenticationMethods"));#c=new y(()=>this.getOpenstackConfig("Providers"));#p=new y(()=>this.getOpenstackConfig("Versions"));#u=new y(()=>this.getGcsConfig("Locations"));#m=new y(()=>this.getGcsConfig("StorageClasses"));getS3AllProviders(){return this.#o.load(),this.#r.load(),this.#i}getS3ProvidersFiltered(t){return w(()=>this.getS3AllProviders()().filter(t))}getS3Providers(){return this.#o.load()}getS3Regions(){return this.#n.load()}getS3RegionHosts(){return this.#r.load()}getS3StorageClasses(){return this.#s.load()}getStorjSatellites(){return this.#a.load()}getStorjAuthenticationMethods(){return this.#l.load()}getOpenstackProviders(){return this.#c.load()}getOpenstackVersions(){return this.#p.load()}getGcsLocations(){return this.#u.load()}getGcsStorageClasses(){return this.#m.load()}getS3Config(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":t}}).pipe(f(o=>this.#t(o)))}createS3IamUser(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":t,"s3-password":o}})}createS3PolicyIAM(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:t}})}getStorjConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":t}}).pipe(f(o=>this.#t(o)))}getOpenstackConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":t}}).pipe(f(o=>this.#t(o)))}getGcsConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":t}}).pipe(f(o=>this.#t(o)))}#t(t){return(t.Result&&typeof t.Result=="object"&&Object.entries(t.Result).map(([o,r])=>({key:o,value:r})))??[]}getDuplicatiStorageBackups(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"duplicati-list-backups",requestBody:{action:"ListBackups",url:t}}).pipe(f(o=>this.#t(o)),f(o=>o.find(r=>r.key==="folders")?.value),f(o=>JSON.parse(o)))}getFilenApiKey(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"filen-get-api-key",requestBody:{"filen-operation":"GetApiKey","backup-id":o??"",url:t}}).pipe(f(r=>this.#t(r)),f(r=>r.find(n=>n.key==="api-key")?.value))}static \u0275fac=function(o){return new(o||e)};static \u0275prov=I({token:e,factory:e.\u0275fac,providedIn:"root"})};var s=new O,p={type:"error",message:$localize`Using a leading slash is most likely wrong, and will result in objects being created with a leading slash in the name.`},U={description:$localize`Unknown destination type`,icon:"assets/dest-icons/file-system.png",isDefaultEntry:!0,customFields:{path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path`,formElement:e=>s.control(e??"")}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let n=o.startsWith(`${e}:///`)?o.split(`${e}:///`)[1]:o.split(`${e}://`)[1];return a({destinationType:e,custom:{path:n.split("?")[0]}},l(e,t))}}},v={key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,icon:"assets/dest-icons/s3compat.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3AllProviders(),isMandatory:!0,formElement:e=>s.control(e??"")},{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0},{name:"use-ssl"}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>b([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}]),validate:e=>({type:"warning",message:$localize`Invalid client selected`})}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},F=[{key:"file",displayName:$localize`File system`,description:$localize`Store backups on your local file system.`,icon:"assets/dest-icons/file-system.png",searchTerms:"local disk harddrive localdisk filesystem unc server share drive",sortOrder:100,customFields:{path:{type:"FolderTree",name:"path",doubleSlash:p,shortDescription:$localize`File path`,longDescription:$localize`The path to store the backup`,formElement:e=>s.control(e??""),isMandatory:!0}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let r=o.startsWith("file:///"),n=decodeURIComponent(r?o.split("file:///")[1]:o.split("file://")[1]),u=n.slice(1).startsWith(":\\")||n.slice(1).startsWith(":/")||n.startsWith("\\\\")?n:"/"+n;return a({destinationType:e,custom:{path:u.split("?")[0]}},l(e,t))}}},{key:"duplicati",displayName:$localize`Duplicati Storage`,description:$localize`Store backups with Duplicati Storage.`,icon:"assets/dest-icons/duplicati.png",searchTerms:"duplicati internal built-in",sortOrder:-2,dynamicFields:[{name:"duplicati-backup-id",type:"DuplicatiBackupId",isMandatory:!0,shortDescription:$localize`Unique Backup ID`,longDescription:$localize`A unique identifier for the backup job. It is recommended to not change this value.`}],mapper:{to:e=>c(e,null,null,null),from:(e,t,o)=>a({destinationType:e},l(e,t)),default:e=>e&&e.length>0?`duplicati://?duplicati-backup-id=${encodeURIComponent(e)}`:"duplicati://"}},{key:"ssh",displayName:$localize`SSH`,description:$localize`Store backups with SSH.`,icon:"assets/dest-icons/ssh.png",searchTerms:"sftp scp secure shell",sortOrder:80,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`The server to connect to`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`The port to connect to`,formElement:e=>s.control(e??"",[P.required,P.max(65535)])},path:{type:"Path",name:"path",shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:!0}],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:$localize`This is a path to a private key file locally on the machine`,longDescription:$localize`This is a path to a private key file locally on the machine`},{type:"FreeText",name:"ssh-key",shortDescription:$localize`SSH private key`,longDescription:$localize`An SSH private key. Supported formats are OpenSSL, OpenSSH, PuTTY, and PEM.`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,icon:"assets/dest-icons/s3compat.png",searchTerms:"spaces cloud digitalocean cloudian minio linode bunnycdn oracle cloudflare alibaba huawei tencent baidu jd ucloud qiniu aliyun tcloud tencent ",sortOrder:90,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3AllProviders(),isMandatory:!0,formElement:e=>s.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>b([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"s3",customKey:"s3-aws",displayName:$localize`Amazon S3`,description:$localize`Store backups in Amazon S3.`,icon:"assets/dest-icons/aws.png",searchTerms:"amazon aws",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3ProvidersFiltered(t=>t.value.endsWith(".amazonaws.com")),isMandatory:!0,formElement:e=>s.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>b([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return e.dynamic["s3-server-name"]?.endsWith(".amazonaws.com")&&(e.destinationType="s3"),c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))},default:e=>"s3-aws://?use-ssl=true",intercept:e=>e.searchParams.get("s3-server-name")?.endsWith(".amazonaws.com")??!1}},{key:"gcs",displayName:$localize`Google Cloud Storage`,description:$localize`Store backups in Google Cloud Storage.`,icon:"assets/dest-icons/google-cloud.png",oauthField:"authid",searchTerms:"gcp googlecloud",sortOrder:70,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0,longDescription:$localize`An OAuth token with access to the Google Cloud Storage. Not required if service account JSON is provided.`}],advancedFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getGcsLocations()},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getGcsStorageClasses()},{name:"gcs-service-account-file",type:"FileTree",accepts:".json,",shortDescription:$localize`Service account JSON file`,longDescription:$localize`Pick the path to a file with service account JSON.`},{name:"gcs-service-account-json",type:"FreeText",shortDescription:$localize`Service account JSON`,longDescription:$localize`Paste the service account JSON here.`}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"googledrive",displayName:$localize`Google Drive`,description:$localize`Store backups in Google Drive.`,icon:"assets/dest-icons/google-drive.png",oauthField:"authid",searchTerms:"gdrive",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"pcloud",displayName:$localize`pCloud`,description:$localize`Store backups in pCloud.`,icon:"assets/dest-icons/pcloud.png",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>b([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",oauthVersion:2,isMandatory:!0}],mapper:{to:e=>{let{server:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return a({destinationType:e,custom:{server:r,path:n}},l(e,t))}}},{key:"azure",displayName:$localize`Azure Blob Storage`,description:$localize`Store backups in Azure Blob Storage.`,icon:"assets/dest-icons/azure.png",searchTerms:"microsoft ms",sortOrder:60,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Container name`,longDescription:$localize`Container name`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"onedrivev2",displayName:$localize`OneDrive`,description:$localize`Store backups in OneDrive.`,icon:"assets/dest-icons/one-drive.png",oauthField:"authid",searchTerms:"micorsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"od4b",displayName:$localize`OneDrive Business`,description:$localize`Store backups in OneDrive Business.`,icon:"assets/dest-icons/one-drive.png",searchTerms:"microsoft ms",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"mssp",displayName:$localize`Microsoft SharePoint`,description:$localize`Store backups in Microsoft SharePoint.`,icon:"assets/dest-icons/sharepoint.png",searchTerms:"microsoft ms",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"sharepoint",displayName:$localize`Microsoft SharePoint v2`,description:$localize`Store backups in Microsoft SharePoint.`,icon:"assets/dest-icons/sharepoint.png",oauthField:"authid",searchTerms:"microsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"site-id",isMandatory:!0},{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"dropbox",displayName:$localize`Dropbox`,description:$localize`Store backups in Dropbox.`,icon:"assets/dest-icons/dropbox.png",oauthField:"authid",searchTerms:"dbx",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"box",displayName:$localize`Box.com`,description:$localize`Store backups in Box.com.`,icon:"assets/dest-icons/box-com.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"jottacloud",displayName:$localize`Jottacloud`,description:$localize`Store backups in Jottacloud.`,icon:"assets/dest-icons/jottacloud.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"b2",displayName:$localize`B2 Cloud Storage`,description:$localize`Store backups in B2 Cloud Storage.`,icon:"assets/dest-icons/backblaze.png",searchTerms:"backblaze",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0,validate:e=>{function t(o){if(!o)return!1;let r=o.length;return!(r<6||r>63||!/^[a-zA-Z0-9.-]+$/.test(o)||!/^[a-zA-Z0-9]/.test(o)||!/[a-zA-Z0-9]$/.test(o)||/^\d{1,3}(\.\d{1,3}){3}$/.test(o)||/(\.\.)|(\.-)|(-\.)/.test(o)||o.toLowerCase().startsWith("b2-"))}return t(e)?null:{type:"error",message:$localize`Invalid bucket name.`}}},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Application ID`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Application Key`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"e2",displayName:$localize`IDrive e2`,description:$localize`Store backups in IDrive e2.`,icon:"assets/dest-icons/idrive-e2.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Access ID`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access Secret`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{bucket:r,path:n}},l(e,t))}}},{key:"mega",displayName:$localize`Mega.nz`,description:$localize`Store backups in Mega.nz.`,icon:"assets/dest-icons/mega-nz.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let t=e.custom.path;return c(e,null,null,t)},from:(e,t,o)=>a({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"msgroup",displayName:$localize`Microsoft Office 365 Group`,description:$localize`Store backups in Microsoft Office 365 Group.`,icon:"assets/dest-icons/office-365.png",oauthField:"authid",searchTerms:"ms",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:$localize`Group email`,longDescription:$localize`Group email`,formElement:e=>s.control(e??"",[P.email]),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"cloudfiles",displayName:$localize`Rackspace CloudFiles`,description:$localize`Store backups in Rackspace CloudFiles.`,icon:"assets/dest-icons/rackspace.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"rclone",displayName:$localize`Rclone`,description:$localize`Store backups in Rclone.`,icon:"assets/dest-icons/rclone.png",searchTerms:"rcl",dynamicFields:[{name:"rclone-local-repository",shortDescription:$localize`Local repository`,defaultValue:""},{name:"rclone-remote-repository",shortDescription:$localize`Remote repository`,defaultValue:""},{name:"rclone-remote-path",type:"Path",shortDescription:$localize`Path on remote repository`,defaultValue:""}],mapper:{to:e=>{let t=e.dynamic["rclone-remote-repository"],o=e.dynamic["rclone-remote-path"],r=Object.entries(e.dynamic).filter(([n])=>!["rclone-remote-repository","rclone-remote-path"].includes(n));return M(e.destinationType??"rclone",t,null,o,[...Object.entries(e.advanced??{}),...r])},from:(e,t,o)=>{let{advanced:r,dynamic:n}=l(e,t),{bucket:i,path:u}=m(t);return a({destinationType:e,dynamic:a({"rclone-remote-repository":i,"rclone-remote-path":u},n)},r)}}},{key:"openstack",displayName:$localize`OpenStack Object Storage`,description:$localize`Store backups in OpenStack Object Storage.`,icon:"assets/dest-icons/open-stack.png",searchTerms:"swift",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket`,longDescription:$localize`Bucket`,formElement:e=>s.control(e??""),isMandatory:!0}},dynamicFields:[{name:"openstack-authuri",shortDescription:$localize`Auth URI`,type:"Enumeration",loadOptions:e=>e.get(d).getOpenstackProviders(),isMandatory:!0},{name:"openstack-version",shortDescription:$localize`Version`,type:"Enumeration",loadOptions:e=>e.get(d).getOpenstackVersions()},{name:"openstack-domain-name",type:"Hostname",shortDescription:$localize`Domain name`},{name:"openstack-tenant-name",shortDescription:$localize`Tenant name`},{name:"openstack-region",shortDescription:$localize`Region`}],mapper:{to:e=>{let{bucket:t}=e.custom;return c(e,t,null,null)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"webdav",displayName:$localize`WebDAV`,description:$localize`Store backups in WebDAV.`,icon:"assets/dest-icons/webdav.png",searchTerms:"web dav",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`},{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"aftp",displayName:$localize`Alternative FTP`,description:$localize`Store backups in FTP.`,icon:"assets/dest-icons/ftp.png",searchTerms:"alt file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"ftp",displayName:$localize`FTP`,description:$localize`Store backups in FTP.`,icon:"assets/dest-icons/ftp.png",searchTerms:"file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"sia",displayName:$localize`Sia Decentrilized Cloud`,description:$localize`Store backups in Sia Decentrilized Cloud.`,icon:"assets/dest-icons/sia-cloud.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let t=e.custom.server,o=e.dynamic["sia-targetpath"],r=[...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([n])=>n!=="sia-targetpath")];return M(e.destinationType??"sia",t,null,o,r)},from:(e,t,o)=>a({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"cos",displayName:$localize`Tencent COS`,description:$localize`Store backups in Tencent COS.`,icon:"assets/dest-icons/tencent-cloud.png",customFields:{bucket:{name:"bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"cos-region",shortDescription:$localize`Region`},{name:"cos-app-id",shortDescription:$localize`COS App Id`,isMandatory:!0},{name:"cos-secret-id",shortDescription:$localize`COS Secret Id`,isMandatory:!0},{name:"cos-secret-key",shortDescription:$localize`COS Secret Key`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=D(a({},e),{advanced:D(a({},e.advanced),{"cos-bucket":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),n=r.advanced["cos-bucket"];return delete r.advanced["cos-bucket"],a({destinationType:e,custom:{path:g(t),bucket:n}},r)}}},{key:"tahoe",displayName:$localize`Tahoe LAFS`,description:$localize`Store backups in Tahoe LAFS.`,icon:"assets/dest-icons/tahoelafs.png",searchTerms:"least authority file system",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"smb",displayName:$localize`Windows Share (SMB)`,description:$localize`Store backups on SMB storage.`,icon:"assets/dest-icons/smb.png",searchTerms:"cifs samba",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},share:{type:"Hostname",name:"share",shortDescription:$localize`Share Name`,longDescription:$localize`Share Name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:["transport",{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0},"auth-domain"],mapper:{to:e=>{let{share:t,server:o,path:r}=e.custom;return c(e,o,null,E(t,r))},from:(e,t,o)=>{let{server:r,path:n}=m(t),i=n.split("/")[0],u=n.split("/").slice(1).join("/");return a({destinationType:e,custom:{server:r,share:i,path:u}},l(e,t))}}},{key:"cifs",displayName:$localize`CIFS (deprecated)`,description:$localize`Same as SMB backend, but with a different name. Use SMB instead.`,icon:"assets/dest-icons/smb.png",sortOrder:-1,mapper:U.mapper},{key:"filen",displayName:$localize`Filen.io`,description:$localize`Store backups in Filen.io.`,icon:"assets/dest-icons/filen.png",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filen`,longDescription:$localize`Path on Filen`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0},{name:"two-factor-code",type:"Filen2FACode"}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"filejump",displayName:$localize`Filejump`,description:$localize`Store backups in Filejump.`,icon:"assets/dest-icons/file-jump.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filejump`,longDescription:$localize`Path on Filejump`,formElement:e=>s.control(e??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:$localize`API Token`,longDescription:$localize`Filejump API Token`,formElement:e=>s.control(e??""),isMandatory:!0}],mapper:{to:e=>{let{path:t}=e.custom;return c(e,null,null,t)},from:(e,t,o)=>a({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"storj",customKey:"storjAccessGrant",displayName:$localize`Storj Access Grant`,description:$localize`Store backups in Storj Access Grant.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-shared-access",shortDescription:$localize`Access Grant`,isMandatory:!0},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p},{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getStorjSatellites(),isMandatory:!0}],mapper:{to:e=>{let t={"storj-auth-method":"Acccess grant"};return`storj://storj.io/config${V([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l(e,t);return delete r.advanced["storj-auth-method"],a({destinationType:e},r)},intercept:e=>e.protocol!=="storj:"?!1:!!(e.searchParams.get("storj-shared-access")||e.searchParams.get("storj-auth-method")==="Acccess grant"),default:()=>"storj://?storj-shared-access=&storj-auth-method=Acccess+grant"}},{key:"storj",customKey:"storjApiKey",displayName:$localize`Storj API Key`,description:$localize`Store backups in Storj API Key.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getStorjSatellites(),isMandatory:!0},{name:"storj-api-key",shortDescription:$localize`API Key`,isMandatory:!0},{name:"storj-secret",shortDescription:$localize`Secret`,isMandatory:!0},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p}],mapper:{to:e=>{let t={"storj-auth-method":"API key"};return`storj://storj.io/config${V([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l("storjApiKey",t);return delete r.advanced["storj-auth-method"],a({destinationType:e},r)},intercept:e=>e.protocol!=="storj:"?!1:!!(e.searchParams.get("storj-api-key")||e.searchParams.get("storj-secret")||e.searchParams.get("storj-auth-method")==="API key"),default:()=>"storj://?storj-api-key=&storj-secret=&storj-auth-method=API+key"}},{key:"aliyunoss",displayName:$localize`Aliyun OSS`,description:$localize`Store backups in Aliyun OSS`,icon:"assets/dest-icons/aliyun.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in bucket`,longDescription:$localize`Path in bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"oss-endpoint",isMandatory:!0},{name:"oss-access-key-id",isMandatory:!0},{name:"oss-access-key-secret",isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=D(a({},e),{advanced:D(a({},e.advanced),{"oss-bucket-name":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),n=r.advanced["oss-bucket-name"];return delete r.advanced["oss-bucket-name"],a({destinationType:e,custom:{path:g(t),bucket:n}},r)}}},h("rabata","Rabata.io",null,"assets/dest-icons/rabata.png",[".rabata.io"]),h("wasabi","Wasabi Hot Storage",null,"assets/dest-icons/wasabi.png",[".wasabisys.com"]),h("impossiblecloud","Impossible Cloud",null,"assets/dest-icons/impossiblecloud.png",[".impossibleapi.net"]),h("scaleway","Scaleway",null,"assets/dest-icons/scaleway.png",[".scw.cloud"]),h("hosteurope","Hosteurope",null,"assets/dest-icons/hosteurope.png",[".hosteurope.de"]),h("dunkel","Dunkel",null,"assets/dest-icons/dunkel.png",[".dunkel.de"]),h("dreamhost","DreamHost",null,"assets/dest-icons/dreamhost.png",[".dreamhost.com"]),h("dincloud","dinCloud",null,"assets/dest-icons/dincloud.png",[".dincloud.com"]),h("polisystems","Poli Systems",null,"assets/dest-icons/polisystems.png",[".polisystems.ch"]),h("ibmcos","IBM COS",null,"assets/dest-icons/ibmcos.png",[".softlayer.net"]),h("storadera","Storadera",null,"assets/dest-icons/storadera.png",[".storadera.com"]),h("infomaniak","Infomaniak",null,"assets/dest-icons/infomaniak.png",[".infomaniak.com",".infomaniak.cloud"]),h("sakuracloud","\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9",null,"assets/dest-icons/sakuracloud.png",[".sakurastorage.jp"]),h("seagatelyve","Seagate Lyve",null,"assets/dest-icons/seagatelyve.png",[".lyvecloud.seagate.com"]),h("internxt","Internxt",null,"assets/dest-icons/internxt.png",[".internxt.com"])],ge={".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"};var x=new O,$=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+.-]*:\/\/(?:[^@\/?#]*@)?([^:\/?#]+)/);return o?o[1]:""}};function c(e,t,o,r){return M(e.destinationType??"file",t,o,r,[...Object.entries(e.advanced),...Object.entries(e.dynamic)])}function M(e,t,o,r,n){let i=V(n),u=encodeURIComponent(R(t)),k=u==""?"":u+H(o),S=r??"",A=S.slice(1).startsWith(":\\")&&e=="file"?"file:///":`${e}://`,z=E(k,W(S));return`${A}${z}${i}`}function T(e){return e==null||e===""?"":e.startsWith("/")?e.substring(1):e}function E(...e){if(e.length===0)return"";if(e.length===1)return e[0]??"";let t="";for(let o of e)o==null||o===""||(t+=t.endsWith("/")||t==""?o:"/"+o);return t}function W(e){return e.split("/").map(encodeURIComponent).join("/")}function g(e){if(e==null||e==="")return"";if(typeof e=="string")try{e=new $(e)}catch{return""}return decodeURIComponent(e.exactHostname??"")+decodeURIComponent(e.pathname=="/"?"":e.pathname??"")}function R(e){return e==null||e===""?"":e.endsWith("/")?e.substring(0,e.length-1):e}function H(e){return e==null||e===""?"":":"+e.toString()}function _(e){try{let o=new $(e),r=F.find(n=>n.mapper.intercept?.(o));if(r)return r}catch{}let t=e.split("://")[0];return C(t)}function C(e){return F.find(o=>o.key===e||o.customKey===e)??F.find(o=>`${o.key}s`===e)??null??a({key:e,displayName:e},U)}function ve(e){return F.filter(t=>t.key===e||t.customKey===e)}function m(e){return{bucket:decodeURIComponent(e.exactHostname),server:decodeURIComponent(e.hostname),port:e.port,path:T(decodeURIComponent(e.pathname))}}function l(e,t){let o={},r={},n=C(e);return t.searchParams.forEach((i,u)=>{n?.dynamicFields?.some(S=>S===u||S?.name===u)?r[u]=decodeURIComponent(i):o[u]=decodeURIComponent(i)}),{advanced:o,dynamic:r}}function V(e,t=!1){let o=e.map(([n,i])=>`${n}=${i?encodeURIComponent(i.toString()):""}`).join("&");return o?(t?"":"?")+o:""}function Fe(e){let t=e.destinationType??"";return C(t)?.mapper.to(e)??""}function Pe(e){let t=e.split("://")[0],o=e.split("://")[1],r=t==="file"?"http://dummy":o==""||o.startsWith("?")?`${t}://`+o:"http://"+o;if(!o)return null;if(o.startsWith("%")&&t==="file")return C(t).mapper.from(t,new $("http://localhost"),e);let n=_(e),i="";`${n.key}s`===t&&(i+=r.indexOf("?")===-1?"?":"&",i+="use-ssl=true",e=n.key+e.substring(t.length)),t==="file"&&o.indexOf("?")!==-1&&(i+=i.indexOf("?")===-1?"?":"&",i+=o.split("?")[1]??"");try{let u=new $(r+i);if(u.host==="undefined")return null;let k=o.split("?")[0].split("/")[0],S=u.host!=""&&!isNaN(Number(u.host.replaceAll(".",""))),G=k.split("."),A=G.length===4&&G.every(z=>z.length&&z.length<=3&&!isNaN(Number(z))&&parseInt(z)<=255);return S&&!A?null:n.mapper.from(n.key,u,e)}catch(u){return console.error("Error while parsing target path",e,r+i,u),null}}function j(e){return typeof e!="string"||!e.trim()?[]:e.split(`
|
|
1
|
+
import{d as P,r as O}from"./chunk-HPNLQHW6.js";import{c as B}from"./chunk-BGTK25UG.js";import{E as L,Mc as w,R as I,W as N,la as b,p as f}from"./chunk-T2WO6CVD.js";import{a,b as D}from"./chunk-7CGTOI24.js";var y=class{constructor(t){this.loader=t}_data=b(void 0);_isLoading=!1;_loaded=!1;load(){return!this._loaded&&!this._isLoading&&(this._isLoading=!0,this.loader().pipe(L(()=>this._isLoading=!1)).subscribe(t=>{this._data.set(t),this._loaded=!0})),this._data.asReadonly()}value(){return this._data.asReadonly()}isLoading(){return this._isLoading}isLoaded(){return this._loaded}reset(){this._data.set(void 0),this._loaded=!1}};var d=class e{#e=N(B);#o=new y(()=>this.getS3Config("Providers"));#n=new y(()=>this.getS3Config("Regions"));#r=new y(()=>this.getS3Config("RegionHosts"));#s=new y(()=>this.getS3Config("StorageClasses"));#i=w(()=>{let t=this.#o.value()(),o=this.#r.value()(),r=[...t??[],...o?.map(n=>({key:`Amazon ${n.key}`,value:n.value}))??[]];return Array.from(new Map(r.map(n=>[n.value,n])).values())});#a=new y(()=>this.getStorjConfig("Satellites"));#l=new y(()=>this.getStorjConfig("AuthenticationMethods"));#c=new y(()=>this.getOpenstackConfig("Providers"));#p=new y(()=>this.getOpenstackConfig("Versions"));#u=new y(()=>this.getGcsConfig("Locations"));#m=new y(()=>this.getGcsConfig("StorageClasses"));getS3AllProviders(){return this.#o.load(),this.#r.load(),this.#i}getS3ProvidersFiltered(t){return w(()=>this.getS3AllProviders()().filter(t))}getS3Providers(){return this.#o.load()}getS3Regions(){return this.#n.load()}getS3RegionHosts(){return this.#r.load()}getS3StorageClasses(){return this.#s.load()}getStorjSatellites(){return this.#a.load()}getStorjAuthenticationMethods(){return this.#l.load()}getOpenstackProviders(){return this.#c.load()}getOpenstackVersions(){return this.#p.load()}getGcsLocations(){return this.#u.load()}getGcsStorageClasses(){return this.#m.load()}getS3Config(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":t}}).pipe(f(o=>this.#t(o)))}createS3IamUser(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":t,"s3-password":o}})}createS3PolicyIAM(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:t}})}getStorjConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":t}}).pipe(f(o=>this.#t(o)))}getOpenstackConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":t}}).pipe(f(o=>this.#t(o)))}getGcsConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":t}}).pipe(f(o=>this.#t(o)))}#t(t){return(t.Result&&typeof t.Result=="object"&&Object.entries(t.Result).map(([o,r])=>({key:o,value:r})))??[]}getDuplicatiStorageBackups(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"duplicati-list-backups",requestBody:{action:"ListBackups",url:t}}).pipe(f(o=>this.#t(o)),f(o=>o.find(r=>r.key==="folders")?.value),f(o=>JSON.parse(o)))}getFilenApiKey(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"filen-get-api-key",requestBody:{"filen-operation":"GetApiKey","backup-id":o??"",url:t}}).pipe(f(r=>this.#t(r)),f(r=>r.find(n=>n.key==="api-key")?.value))}static \u0275fac=function(o){return new(o||e)};static \u0275prov=I({token:e,factory:e.\u0275fac,providedIn:"root"})};var s=new O,p={type:"error",message:$localize`Using a leading slash is most likely wrong, and will result in objects being created with a leading slash in the name.`},U={description:$localize`Unknown destination type`,icon:"assets/dest-icons/file-system.png",isDefaultEntry:!0,customFields:{path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path`,formElement:e=>s.control(e??"")}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let n=o.startsWith(`${e}:///`)?o.split(`${e}:///`)[1]:o.split(`${e}://`)[1];return a({destinationType:e,custom:{path:n.split("?")[0]}},l(e,t))}}},v={key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,icon:"assets/dest-icons/s3compat.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3AllProviders(),isMandatory:!0,formElement:e=>s.control(e??"")},{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0},{name:"use-ssl"}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>b([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}]),validate:e=>({type:"warning",message:$localize`Invalid client selected`})}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},F=[{key:"file",displayName:$localize`File system`,description:$localize`Store backups on your local file system.`,icon:"assets/dest-icons/file-system.png",searchTerms:"local disk harddrive localdisk filesystem unc server share drive",sortOrder:100,customFields:{path:{type:"FolderTree",name:"path",doubleSlash:p,shortDescription:$localize`File path`,longDescription:$localize`The path to store the backup`,formElement:e=>s.control(e??""),isMandatory:!0}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let r=o.startsWith("file:///"),n=decodeURIComponent(r?o.split("file:///")[1]:o.split("file://")[1]),u=n.slice(1).startsWith(":\\")||n.slice(1).startsWith(":/")||n.startsWith("\\\\")?n:"/"+n;return a({destinationType:e,custom:{path:u.split("?")[0]}},l(e,t))}}},{key:"duplicati",displayName:$localize`Duplicati Storage`,description:$localize`Store backups with Duplicati Storage.`,icon:"assets/dest-icons/duplicati.png",searchTerms:"duplicati internal built-in",sortOrder:-2,dynamicFields:[{name:"duplicati-backup-id",type:"DuplicatiBackupId",isMandatory:!0,shortDescription:$localize`Unique Backup ID`,longDescription:$localize`A unique identifier for the backup job. It is recommended to not change this value.`}],mapper:{to:e=>c(e,null,null,null),from:(e,t,o)=>a({destinationType:e},l(e,t)),default:e=>e&&e.length>0?`duplicati://?duplicati-backup-id=${encodeURIComponent(e)}`:"duplicati://"}},{key:"ssh",displayName:$localize`SSH`,description:$localize`Store backups with SSH.`,icon:"assets/dest-icons/ssh.png",searchTerms:"sftp scp secure shell",sortOrder:80,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`The server to connect to`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`The port to connect to`,formElement:e=>s.control(e??"",[P.required,P.max(65535)])},path:{type:"Path",name:"path",shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:!0}],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:$localize`This is a path to a private key file locally on the machine`,longDescription:$localize`This is a path to a private key file locally on the machine`},{type:"FreeText",name:"ssh-key",shortDescription:$localize`SSH private key`,longDescription:$localize`An SSH private key. Supported formats are OpenSSL, OpenSSH, PuTTY, and PEM.`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,icon:"assets/dest-icons/s3compat.png",searchTerms:"spaces cloud digitalocean cloudian minio linode bunnycdn oracle cloudflare alibaba huawei tencent baidu jd ucloud qiniu aliyun tcloud tencent ",sortOrder:90,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3AllProviders(),isMandatory:!0,formElement:e=>s.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>b([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"s3",customKey:"s3-aws",displayName:$localize`Amazon S3`,description:$localize`Store backups in Amazon S3.`,icon:"assets/dest-icons/aws.png",searchTerms:"amazon aws",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3ProvidersFiltered(t=>t.value.endsWith(".amazonaws.com")),isMandatory:!0,formElement:e=>s.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>b([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return e.dynamic["s3-server-name"]?.endsWith(".amazonaws.com")&&(e.destinationType="s3"),c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))},default:e=>"s3-aws://?use-ssl=true",intercept:e=>e.searchParams.get("s3-server-name")?.endsWith(".amazonaws.com")??!1}},{key:"gcs",displayName:$localize`Google Cloud Storage`,description:$localize`Store backups in Google Cloud Storage.`,icon:"assets/dest-icons/google-cloud.png",oauthField:"authid",searchTerms:"gcp googlecloud",sortOrder:70,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0,longDescription:$localize`An OAuth token with access to the Google Cloud Storage. Not required if service account JSON is provided.`}],advancedFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getGcsLocations()},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getGcsStorageClasses()},{name:"gcs-service-account-file",type:"FileTree",accepts:".json,",shortDescription:$localize`Service account JSON file`,longDescription:$localize`Pick the path to a file with service account JSON.`},{name:"gcs-service-account-json",type:"FreeText",shortDescription:$localize`Service account JSON`,longDescription:$localize`Paste the service account JSON here.`}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"googledrive",displayName:$localize`Google Drive`,description:$localize`Store backups in Google Drive.`,icon:"assets/dest-icons/google-drive.png",oauthField:"authid",searchTerms:"gdrive",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"pcloud",displayName:$localize`pCloud`,description:$localize`Store backups in pCloud.`,icon:"assets/dest-icons/pcloud.png",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>b([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",oauthVersion:2,isMandatory:!0}],mapper:{to:e=>{let{server:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return a({destinationType:e,custom:{server:r,path:n}},l(e,t))}}},{key:"azure",displayName:$localize`Azure Blob Storage`,description:$localize`Store backups in Azure Blob Storage.`,icon:"assets/dest-icons/azure.png",searchTerms:"microsoft ms",sortOrder:60,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Container name`,longDescription:$localize`Container name`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"onedrivev2",displayName:$localize`OneDrive`,description:$localize`Store backups in OneDrive.`,icon:"assets/dest-icons/one-drive.png",oauthField:"authid",searchTerms:"micorsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"od4b",displayName:$localize`OneDrive Business`,description:$localize`Store backups in OneDrive Business.`,icon:"assets/dest-icons/one-drive.png",searchTerms:"microsoft ms",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"mssp",displayName:$localize`Microsoft SharePoint`,description:$localize`Store backups in Microsoft SharePoint.`,icon:"assets/dest-icons/sharepoint.png",searchTerms:"microsoft ms",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"sharepoint",displayName:$localize`Microsoft SharePoint v2`,description:$localize`Store backups in Microsoft SharePoint.`,icon:"assets/dest-icons/sharepoint.png",oauthField:"authid",searchTerms:"microsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"site-id",isMandatory:!0},{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"dropbox",displayName:$localize`Dropbox`,description:$localize`Store backups in Dropbox.`,icon:"assets/dest-icons/dropbox.png",oauthField:"authid",searchTerms:"dbx",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"box",displayName:$localize`Box.com`,description:$localize`Store backups in Box.com.`,icon:"assets/dest-icons/box-com.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"jottacloud",displayName:$localize`Jottacloud`,description:$localize`Store backups in Jottacloud.`,icon:"assets/dest-icons/jottacloud.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"b2",displayName:$localize`B2 Cloud Storage`,description:$localize`Store backups in B2 Cloud Storage.`,icon:"assets/dest-icons/backblaze.png",searchTerms:"backblaze",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0,validate:e=>{function t(o){if(!o)return!1;let r=o.length;return!(r<6||r>63||!/^[a-zA-Z0-9.-]+$/.test(o)||!/^[a-zA-Z0-9]/.test(o)||!/[a-zA-Z0-9]$/.test(o)||/^\d{1,3}(\.\d{1,3}){3}$/.test(o)||/(\.\.)|(\.-)|(-\.)/.test(o)||o.toLowerCase().startsWith("b2-"))}return t(e)?null:{type:"error",message:$localize`Invalid bucket name.`}}},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Application ID`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Application Key`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"e2",displayName:$localize`IDrive e2`,description:$localize`Store backups in IDrive e2.`,icon:"assets/dest-icons/idrive-e2.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Access ID`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access Secret`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{bucket:r,path:n}},l(e,t))}}},{key:"mega",displayName:$localize`Mega.nz`,description:$localize`Store backups in Mega.nz.`,icon:"assets/dest-icons/mega-nz.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let t=e.custom.path;return c(e,null,null,t)},from:(e,t,o)=>a({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"msgroup",displayName:$localize`Microsoft Office 365 Group`,description:$localize`Store backups in Microsoft Office 365 Group.`,icon:"assets/dest-icons/office-365.png",oauthField:"authid",searchTerms:"ms",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:$localize`Group email`,longDescription:$localize`Group email`,formElement:e=>s.control(e??"",[P.email]),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"cloudfiles",displayName:$localize`Rackspace CloudFiles`,description:$localize`Store backups in Rackspace CloudFiles.`,icon:"assets/dest-icons/rackspace.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"rclone",displayName:$localize`Rclone`,description:$localize`Store backups in Rclone.`,icon:"assets/dest-icons/rclone.png",searchTerms:"rcl",dynamicFields:[{name:"rclone-local-repository",shortDescription:$localize`Local repository`,defaultValue:""},{name:"rclone-remote-repository",shortDescription:$localize`Remote repository`,defaultValue:""},{name:"rclone-remote-path",type:"Path",shortDescription:$localize`Path on remote repository`,defaultValue:""}],mapper:{to:e=>{let t=e.dynamic["rclone-remote-repository"],o=e.dynamic["rclone-remote-path"],r=Object.entries(e.dynamic).filter(([n])=>!["rclone-remote-repository","rclone-remote-path"].includes(n));return M(e.destinationType??"rclone",t,null,o,[...Object.entries(e.advanced??{}),...r])},from:(e,t,o)=>{let{advanced:r,dynamic:n}=l(e,t),{bucket:i,path:u}=m(t);return{destinationType:e,dynamic:a({"rclone-remote-repository":i,"rclone-remote-path":u},n),advanced:a({},r)}}}},{key:"openstack",displayName:$localize`OpenStack Object Storage`,description:$localize`Store backups in OpenStack Object Storage.`,icon:"assets/dest-icons/open-stack.png",searchTerms:"swift",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket`,longDescription:$localize`Bucket`,formElement:e=>s.control(e??""),isMandatory:!0}},dynamicFields:[{name:"openstack-authuri",shortDescription:$localize`Auth URI`,type:"Enumeration",loadOptions:e=>e.get(d).getOpenstackProviders(),isMandatory:!0},{name:"openstack-version",shortDescription:$localize`Version`,type:"Enumeration",loadOptions:e=>e.get(d).getOpenstackVersions()},{name:"openstack-domain-name",type:"Hostname",shortDescription:$localize`Domain name`},{name:"openstack-tenant-name",shortDescription:$localize`Tenant name`},{name:"openstack-region",shortDescription:$localize`Region`}],mapper:{to:e=>{let{bucket:t}=e.custom;return c(e,t,null,null)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"webdav",displayName:$localize`WebDAV`,description:$localize`Store backups in WebDAV.`,icon:"assets/dest-icons/webdav.png",searchTerms:"web dav",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`},{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"aftp",displayName:$localize`Alternative FTP`,description:$localize`Store backups in FTP.`,icon:"assets/dest-icons/ftp.png",searchTerms:"alt file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"ftp",displayName:$localize`FTP`,description:$localize`Store backups in FTP.`,icon:"assets/dest-icons/ftp.png",searchTerms:"file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"sia",displayName:$localize`Sia Decentrilized Cloud`,description:$localize`Store backups in Sia Decentrilized Cloud.`,icon:"assets/dest-icons/sia-cloud.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let t=e.custom.server,o=e.dynamic["sia-targetpath"],r=[...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([n])=>n!=="sia-targetpath")];return M(e.destinationType??"sia",t,null,o,r)},from:(e,t,o)=>a({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"cos",displayName:$localize`Tencent COS`,description:$localize`Store backups in Tencent COS.`,icon:"assets/dest-icons/tencent-cloud.png",customFields:{bucket:{name:"bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"cos-region",shortDescription:$localize`Region`},{name:"cos-app-id",shortDescription:$localize`COS App Id`,isMandatory:!0},{name:"cos-secret-id",shortDescription:$localize`COS Secret Id`,isMandatory:!0},{name:"cos-secret-key",shortDescription:$localize`COS Secret Key`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=D(a({},e),{advanced:D(a({},e.advanced),{"cos-bucket":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),n=r.advanced["cos-bucket"];return delete r.advanced["cos-bucket"],a({destinationType:e,custom:{path:g(t),bucket:n}},r)}}},{key:"tahoe",displayName:$localize`Tahoe LAFS`,description:$localize`Store backups in Tahoe LAFS.`,icon:"assets/dest-icons/tahoelafs.png",searchTerms:"least authority file system",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"smb",displayName:$localize`Windows Share (SMB)`,description:$localize`Store backups on SMB storage.`,icon:"assets/dest-icons/smb.png",searchTerms:"cifs samba",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},share:{type:"Hostname",name:"share",shortDescription:$localize`Share Name`,longDescription:$localize`Share Name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:["transport",{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0},"auth-domain"],mapper:{to:e=>{let{share:t,server:o,path:r}=e.custom;return c(e,o,null,E(t,r))},from:(e,t,o)=>{let{server:r,path:n}=m(t),i=n.split("/")[0],u=n.split("/").slice(1).join("/");return a({destinationType:e,custom:{server:r,share:i,path:u}},l(e,t))}}},{key:"cifs",displayName:$localize`CIFS (deprecated)`,description:$localize`Same as SMB backend, but with a different name. Use SMB instead.`,icon:"assets/dest-icons/smb.png",sortOrder:-1,mapper:U.mapper},{key:"filen",displayName:$localize`Filen.io`,description:$localize`Store backups in Filen.io.`,icon:"assets/dest-icons/filen.png",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filen`,longDescription:$localize`Path on Filen`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0},{name:"two-factor-code",type:"Filen2FACode"}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"filejump",displayName:$localize`Filejump`,description:$localize`Store backups in Filejump.`,icon:"assets/dest-icons/file-jump.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filejump`,longDescription:$localize`Path on Filejump`,formElement:e=>s.control(e??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:$localize`API Token`,longDescription:$localize`Filejump API Token`,formElement:e=>s.control(e??""),isMandatory:!0}],mapper:{to:e=>{let{path:t}=e.custom;return c(e,null,null,t)},from:(e,t,o)=>a({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"storj",customKey:"storjAccessGrant",displayName:$localize`Storj Access Grant`,description:$localize`Store backups in Storj Access Grant.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-shared-access",shortDescription:$localize`Access Grant`,isMandatory:!0},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p},{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getStorjSatellites(),isMandatory:!0}],mapper:{to:e=>{let t={"storj-auth-method":"Acccess grant"};return`storj://storj.io/config${V([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l(e,t);return delete r.advanced["storj-auth-method"],a({destinationType:e},r)},intercept:e=>e.protocol!=="storj:"?!1:!!(e.searchParams.get("storj-shared-access")||e.searchParams.get("storj-auth-method")==="Acccess grant"),default:()=>"storj://?storj-shared-access=&storj-auth-method=Acccess+grant"}},{key:"storj",customKey:"storjApiKey",displayName:$localize`Storj API Key`,description:$localize`Store backups in Storj API Key.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getStorjSatellites(),isMandatory:!0},{name:"storj-api-key",shortDescription:$localize`API Key`,isMandatory:!0},{name:"storj-secret",shortDescription:$localize`Secret`,isMandatory:!0},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p}],mapper:{to:e=>{let t={"storj-auth-method":"API key"};return`storj://storj.io/config${V([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l("storjApiKey",t);return delete r.advanced["storj-auth-method"],a({destinationType:e},r)},intercept:e=>e.protocol!=="storj:"?!1:!!(e.searchParams.get("storj-api-key")||e.searchParams.get("storj-secret")||e.searchParams.get("storj-auth-method")==="API key"),default:()=>"storj://?storj-api-key=&storj-secret=&storj-auth-method=API+key"}},{key:"aliyunoss",displayName:$localize`Aliyun OSS`,description:$localize`Store backups in Aliyun OSS`,icon:"assets/dest-icons/aliyun.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in bucket`,longDescription:$localize`Path in bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"oss-endpoint",isMandatory:!0},{name:"oss-access-key-id",isMandatory:!0},{name:"oss-access-key-secret",isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=D(a({},e),{advanced:D(a({},e.advanced),{"oss-bucket-name":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),n=r.advanced["oss-bucket-name"];return delete r.advanced["oss-bucket-name"],a({destinationType:e,custom:{path:g(t),bucket:n}},r)}}},h("rabata","Rabata.io",null,"assets/dest-icons/rabata.png",[".rabata.io"]),h("wasabi","Wasabi Hot Storage",null,"assets/dest-icons/wasabi.png",[".wasabisys.com"]),h("impossiblecloud","Impossible Cloud",null,"assets/dest-icons/impossiblecloud.png",[".impossibleapi.net"]),h("scaleway","Scaleway",null,"assets/dest-icons/scaleway.png",[".scw.cloud"]),h("hosteurope","Hosteurope",null,"assets/dest-icons/hosteurope.png",[".hosteurope.de"]),h("dunkel","Dunkel",null,"assets/dest-icons/dunkel.png",[".dunkel.de"]),h("dreamhost","DreamHost",null,"assets/dest-icons/dreamhost.png",[".dreamhost.com"]),h("dincloud","dinCloud",null,"assets/dest-icons/dincloud.png",[".dincloud.com"]),h("polisystems","Poli Systems",null,"assets/dest-icons/polisystems.png",[".polisystems.ch"]),h("ibmcos","IBM COS",null,"assets/dest-icons/ibmcos.png",[".softlayer.net"]),h("storadera","Storadera",null,"assets/dest-icons/storadera.png",[".storadera.com"]),h("infomaniak","Infomaniak",null,"assets/dest-icons/infomaniak.png",[".infomaniak.com",".infomaniak.cloud"]),h("sakuracloud","\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9",null,"assets/dest-icons/sakuracloud.png",[".sakurastorage.jp"]),h("seagatelyve","Seagate Lyve",null,"assets/dest-icons/seagatelyve.png",[".lyvecloud.seagate.com"]),h("internxt","Internxt",null,"assets/dest-icons/internxt.png",[".internxt.com"])],ge={".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"};var x=new O,$=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+.-]*:\/\/(?:[^@\/?#]*@)?([^:\/?#]+)/);return o?o[1]:""}};function c(e,t,o,r){return M(e.destinationType??"file",t,o,r,[...Object.entries(e.advanced),...Object.entries(e.dynamic)])}function M(e,t,o,r,n){let i=V(n),u=encodeURIComponent(R(t)),k=u==""?"":u+H(o),S=r??"",A=S.slice(1).startsWith(":\\")&&e=="file"?"file:///":`${e}://`,z=E(k,W(S));return`${A}${z}${i}`}function T(e){return e==null||e===""?"":e.startsWith("/")?e.substring(1):e}function E(...e){if(e.length===0)return"";if(e.length===1)return e[0]??"";let t="";for(let o of e)o==null||o===""||(t+=t.endsWith("/")||t==""?o:"/"+o);return t}function W(e){return e.split("/").map(encodeURIComponent).join("/")}function g(e){if(e==null||e==="")return"";if(typeof e=="string")try{e=new $(e)}catch{return""}return decodeURIComponent(e.exactHostname??"")+decodeURIComponent(e.pathname=="/"?"":e.pathname??"")}function R(e){return e==null||e===""?"":e.endsWith("/")?e.substring(0,e.length-1):e}function H(e){return e==null||e===""?"":":"+e.toString()}function _(e){try{let o=new $(e),r=F.find(n=>n.mapper.intercept?.(o));if(r)return r}catch{}let t=e.split("://")[0];return C(t)}function C(e){return F.find(o=>o.key===e||o.customKey===e)??F.find(o=>`${o.key}s`===e)??null??a({key:e,displayName:e},U)}function ve(e){return F.filter(t=>t.key===e||t.customKey===e)}function m(e){return{bucket:decodeURIComponent(e.exactHostname),server:decodeURIComponent(e.hostname),port:e.port,path:T(decodeURIComponent(e.pathname))}}function l(e,t){let o={},r={},n=C(e);return t.searchParams.forEach((i,u)=>{n?.dynamicFields?.some(S=>S===u||S?.name===u)?r[u]=decodeURIComponent(i):o[u]=decodeURIComponent(i)}),{advanced:o,dynamic:r}}function V(e,t=!1){let o=e.map(([n,i])=>`${n}=${i?encodeURIComponent(i.toString()):""}`).join("&");return o?(t?"":"?")+o:""}function Fe(e){let t=e.destinationType??"";return C(t)?.mapper.to(e)??""}function Pe(e){let t=e.split("://")[0],o=e.split("://")[1],r=t==="file"?"http://dummy":o==""||o.startsWith("?")?`${t}://`+o:"http://"+o;if(!o)return null;if(o.startsWith("%")&&t==="file")return C(t).mapper.from(t,new $("http://localhost"),e);let n=_(e),i="";`${n.key}s`===t&&(i+=r.indexOf("?")===-1?"?":"&",i+="use-ssl=true",e=n.key+e.substring(t.length)),t==="file"&&o.indexOf("?")!==-1&&(i+=i.indexOf("?")===-1?"?":"&",i+=o.split("?")[1]??"");try{let u=new $(r+i);if(u.host==="undefined")return null;let k=o.split("?")[0].split("/")[0],S=u.host!=""&&!isNaN(Number(u.host.replaceAll(".",""))),G=k.split("."),A=G.length===4&&G.every(z=>z.length&&z.length<=3&&!isNaN(Number(z))&&parseInt(z)<=255);return S&&!A?null:n.mapper.from(n.key,u,e)}catch(u){return console.error("Error while parsing target path",e,r+i,u),null}}function j(e){return typeof e!="string"||!e.trim()?[]:e.split(`
|
|
2
2
|
`).map(t=>t.trim()).filter(t=>t).map(t=>{let[o,...r]=t.split("="),n=r.join("=").trim();return o.trim()?[o.trim(),n]:null}).filter(t=>t!==null)}function Oe(e){return j(e).map(([t,o])=>({Name:t,Value:o}))}function Me(e){return Object.fromEntries(j(e))}function Ve(e){if(!e)return!1;let t=e.length;return!(t<3||t>63||!/^[a-z0-9.-]+$/.test(e)||!/^[a-z0-9]/.test(e)||!/[a-z0-9]$/.test(e)||/^\d{1,3}(\.\d{1,3}){3}$/.test(e)||/(\.\.)|(\.-)|(-\.)/.test(e))}function Ce(e){if(!e||e.length>253)return!1;let t=e.split(".");for(let o of t)if(!o||o.length>63||!/^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?$/.test(o))return!1;return!0}function h(e,t,o,r,n){return D(a({},v),{customKey:`s3-${e}`,icon:r??v.icon,displayName:$localize`${t} (S3)`,description:o??$localize`Store backups in ${t} storage.`,dynamicFields:[...(v.dynamicFields??[]).filter(i=>i?.name!=="s3-server-name"),{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the ${t} endpoint`,type:"NonValidatedSelectableString",loadOptions:i=>i.get(d).getS3ProvidersFiltered(u=>n.some(k=>u.value.endsWith(k))),isMandatory:!0,formElement:i=>x.control(i??"")}],mapper:D(a({},v.mapper),{to:i=>{let{bucket:u,path:k}=i.custom;return n.some(S=>i.dynamic["s3-server-name"]?.endsWith(S))&&(i.destinationType="s3"),c(i,u,null,k)},default:i=>`s3-${e}://?use-ssl=true`,intercept:i=>n.some(u=>i.searchParams.get("s3-server-name")?.endsWith(u))??!1})})}export{d as a,_ as b,C as c,ve as d,Fe as e,Pe as f,Oe as g,Me as h,Ve as i,Ce as j,ge as k};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as _e}from"./chunk-
|
|
1
|
+
import{a as _e}from"./chunk-3SHOBVX6.js";import{a as le}from"./chunk-AS6Z56AD.js";import"./chunk-DGKNUD3G.js";import{j as ae}from"./chunk-ZAFP5TX6.js";import"./chunk-O4OTZE5N.js";import{a as ie,b as oe,c as se}from"./chunk-WIVARGP6.js";import"./chunk-MHRECQ5Y.js";import"./chunk-6Q6SSTBK.js";import"./chunk-5DJAX2HH.js";import"./chunk-UE5VHUV6.js";import"./chunk-DW332N2S.js";import"./chunk-NNCQNVQC.js";import"./chunk-TELPJYLN.js";import"./chunk-DAODMGAD.js";import{B as ee,H as ne,P as te,c as H,e as q,i as Y,k as j,s as Q,u as Z}from"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import{b as W,d as V}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{$ as N,Ab as o,Bb as m,Ib as h,Mc as J,Pa as c,Pb as S,Qb as C,Rb as r,Sc as X,Vb as I,W as g,Xb as p,aa as P,cb as z,cc as v,dc as x,gc as K,la as B,oc as u,pc as d,qc as T,sb as E,tb as f,xc as U,yb as O,zb as t}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var re=["formRef"],ce=()=>["--skip-files-larger-than","dblock-size","encryption-module","no-encryption","--no-encryption","compression-module","--exclude-files-attributes","keep-time","keep-versions","retention-policy"];function pe(a,l){a&1&&(S(0,1,1),m(1,"sh-icon",20),C())}function ue(a,l){a&1&&(t(0,"p",21),r(1,6),o())}function de(a,l){a&1&&(t(0,"p"),r(1,7),o())}function Te(a,l){if(a&1){let n=h();t(0,"p"),r(1,8),o(),t(2,"app-timespan",18),T("ngModelChange",function(s){N(n);let i=p();return d(i.optionsFields.backupRetentionTime,s)||(i.optionsFields.backupRetentionTime=s),P(s)}),t(3,"label",30),r(4,9),o()()}if(a&2){let n=p();c(2),O("customId","backupRetentionTime"),u("ngModel",n.optionsFields.backupRetentionTime)}}function Se(a,l){if(a&1){let n=h();t(0,"p"),r(1,10),o(),t(2,"sh-form-field")(3,"label",31),r(4,11),o(),t(5,"input",32),T("ngModelChange",function(s){N(n);let i=p();return d(i.optionsFields.backupRetentionVersions,s)||(i.optionsFields.backupRetentionVersions=s),P(s)}),o()()}if(a&2){let n=p();c(5),u("ngModel",n.optionsFields.backupRetentionVersions)}}function Ce(a,l){a&1&&(t(0,"p"),r(1,12),o())}function Oe(a,l){if(a&1){let n=h();t(0,"p"),r(1,13),o(),t(2,"sh-form-field")(3,"p"),r(4,14),o(),t(5,"label",33),r(6,15),o(),t(7,"input",34),T("ngModelChange",function(s){N(n);let i=p();return d(i.optionsFields.backupRetentionCustom,s)||(i.optionsFields.backupRetentionCustom=s),P(s)}),o()()}if(a&2){let n=p();c(7),u("ngModel",n.optionsFields.backupRetentionCustom)}}var me=[{value:"all",name:$localize`Keep all backups`},{value:"time",name:$localize`Delete backups that are older than`},{value:"versions",name:$localize`Keep a specific number of backups`},{value:"smart",name:$localize`Smart backup retention`},{value:"custom",name:$localize`Custom backup retention`}],ge=1024*1024*1024*2,Ne=1024*1024*5,F=class a{#e=g(ae);#n=g(V);#t=g(W);formRef=X.required("formRef");isSubmitting=this.#e.isSubmitting;settings=this.#e.settings;optionsFields=this.#e.optionsFields;applicationOptions=this.#e.applicationOptions;retentionOptions=B(me);exceededVolumeSize=J(()=>{let{size:l,unit:n}=oe(this.optionsFields.remoteVolumeSize());if(l==null||n===null||n===void 0)return!1;let e=l*Math.pow(1024,ie.findIndex(s=>s.value===n));return e>ge||e<Ne});goBack(){this.#n.navigate(["schedule"],{relativeTo:this.#t.parent})}submit(){this.#e.submit()}static \u0275fac=function(n){return new(n||a)};static \u0275cmp=z({type:a,selectors:[["app-advanced-options-settings"]],viewQuery:function(n,e){n&1&&v(e.formRef,re,5),n&2&&x()},decls:30,vars:16,consts:()=>{let l;l=$localize`Options`;let n;n=$localize` Remote volume size ${"\uFFFD*7:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*7:1\uFFFD"}:CLOSE_BLOCK_IF:`;let e;e=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#11\uFFFD"}:START_LINK: Read more ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-square-out${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#11\uFFFD"}:CLOSE_LINK:`;let s;s=$localize`Backup retention`;let i;i=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let M;M=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `;let R;R=$localize` The chosen size is outside the recommended range. This may cause performance issues, excessively large temporary files or other problems. `;let A;A=$localize`Nothing will be deleted. The backup size will grow with each change.`;let b;b=$localize`If at least one newer backup is found, all backups older than this date are deleted.`;let y;y=$localize`Time to keep versions`;let $;$=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let k;k=$localize`Number of versions`;let L;L=$localize` Over time backups will be deleted automatically. There will remain one backup for each of the last 7 days, each of the last 4 weeks, each of the last 12 months. There will always be at least one remaining backup. `;let w;w=$localize` Enter a retention strategy manually. Placeholders are D/W/Y for days/weeks/years and U for unlimited. The syntax is: 7D:1D,4W:1W,36M:1M. This example keeps one backup for each of the next 7 days, one for each of the next 4 weeks, and one for each of the next 36 months. This can also be written as 1W:1D,1M:1W,3Y:1M. `;let G;G=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let D;return D=$localize`Retention expression`,[l,n,e,s,i,M,R,A,b,y,$,k,L,w,G,D,[1,"title-30"],[1,"remote-volume-wrap"],[3,"ngModelChange","customId","ngModel"],["for","size"],[1,"warning"],[1,"warn"],["href","https://forum.duplicati.com/t/choosing-sizes-in-duplicati/17683","target","_blank",1,"sh-primary"],["suffix",""],["value","value","label","name",3,"options","inlineSearch","isClearable"],["type","text",3,"ngModelChange","ngModel"],[3,"optionsChange","options","applicationOptions","hasFreeTextSettings","hiddenOptions"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click"],["for","backupRetentionTime"],["for","backupRetentionVersions"],["type","number","id","backupRetentionVersions",3,"ngModelChange","ngModel"],["for","backupRetentionCustom"],["type","text","id","backupRetentionCustom",3,"ngModelChange","ngModel"]]},template:function(n,e){n&1&&(t(0,"section")(1,"h3",16),r(2,0),o(),t(3,"div",17)(4,"app-size",18),T("ngModelChange",function(i){return d(e.optionsFields.remoteVolumeSize,i)||(e.optionsFields.remoteVolumeSize=i),i}),t(5,"label",19),S(6,1),E(7,pe,2,0,"sh-icon",20),C(),o()(),E(8,ue,2,0,"p",21),t(9,"p"),S(10,2),t(11,"a",22),m(12,"sh-icon",23),o(),C(),o()(),t(13,"sh-select",24)(14,"label",19),r(15,3),o(),t(16,"input",25),T("ngModelChange",function(i){return d(e.optionsFields.backupRetention,i)||(e.optionsFields.backupRetention=i),i}),o()(),E(17,de,2,0,"p")(18,Te,5,2)(19,Se,6,1)(20,Ce,2,0,"p")(21,Oe,8,1),t(22,"app-options-list",26),T("optionsChange",function(i){return d(e.settings,i)||(e.settings=i),i}),o(),t(23,"div",27)(24,"button",28),I("click",function(){return e.goBack()}),S(25,4),m(26,"sh-icon"),C(),o(),t(27,"button",29),I("click",function(){return e.submit()}),S(28,5),m(29,"sh-icon"),C(),o()()()),n&2&&(c(4),O("customId","size"),u("ngModel",e.optionsFields.remoteVolumeSize),c(3),f(e.exceededVolumeSize()?7:-1),c(),f(e.exceededVolumeSize()?8:-1),c(5),O("options",e.retentionOptions())("inlineSearch",!0)("isClearable",!1),c(3),u("ngModel",e.optionsFields.backupRetention),c(),f(e.optionsFields.backupRetention()==="all"?17:e.optionsFields.backupRetention()==="time"?18:e.optionsFields.backupRetention()==="versions"?19:e.optionsFields.backupRetention()==="smart"?20:e.optionsFields.backupRetention()==="custom"?21:-1),c(5),u("options",e.settings),O("applicationOptions",e.applicationOptions())("hasFreeTextSettings",!0)("hiddenOptions",U(15,ce)),c(5),K("loader",e.isSubmitting()))},dependencies:[Q,H,j,q,Y,_e,se,le,ee,Z,te,ne],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:37.5rem;padding:2.5rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{F as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Gt}from"./chunk-AS6Z56AD.js";import{a as yt,b as Re,c as Ot,d as Ft,e as At,f as wt,h as Mt,i as Lt,j as Pt}from"./chunk-
|
|
1
|
+
import{a as Gt}from"./chunk-AS6Z56AD.js";import{a as yt,b as Re,c as Ot,d as Ft,e as At,f as wt,h as Mt,i as Lt,j as Pt}from"./chunk-DGKNUD3G.js";import{j as $t}from"./chunk-ZAFP5TX6.js";import{c as vt,d as Vt}from"./chunk-WIVARGP6.js";import{a as Dt}from"./chunk-KETMZS6P.js";import{a as U}from"./chunk-5DJAX2HH.js";import{a as xt}from"./chunk-UE5VHUV6.js";import{a as Et,b as It}from"./chunk-DW332N2S.js";import{a as ue}from"./chunk-TELPJYLN.js";import{B as Ce,C as pt,E as mt,H as Pe,K as Ct,L as ut,O as gt,P as Tt,V as ft,W as St,Y as Nt,a as st,c as se,e as de,i as ce,k as dt,s as pe,t as ct,u as me,z as Le}from"./chunk-HPNLQHW6.js";import{c as ht}from"./chunk-BGTK25UG.js";import{e as _t}from"./chunk-A4LPGPDU.js";import{_ as rt}from"./chunk-OTPG7USH.js";import{$ as f,Ab as d,Ac as Me,Bb as R,D as He,E as $e,Fb as xe,Gb as fe,Gc as oe,Hb as P,Ib as E,K as je,M as qe,Ma as Qe,Mc as $,Pa as r,Pb as H,Qb as j,Qc as ot,R as Ie,Rb as _e,Rc as ae,Sc as at,Ub as Ye,Uc as lt,Vb as h,W as w,Xb as l,Yb as De,Zb as ye,aa as S,cb as Z,cc as Ze,da as We,dc as et,ec as y,f as Ee,fc as tt,gc as Oe,hb as x,jc as m,kc as nt,l as Je,la as k,lc as A,mc as Se,na as Te,oc as Fe,p as Xe,pc as Ae,qc as we,rc as X,sb as u,sc as M,tb as g,tc as p,ub as te,uc as Ge,wb as ne,wc as it,xb as ie,xc as be,yb as c,yc as v,zb as s,zc as B}from"./chunk-T2WO6CVD.js";import{a as z,b as he}from"./chunk-7CGTOI24.js";var bt=class n{#e=w(ht);#t=w(Le);#n=w(ue);testDestination(t,e,o,i,a){return this.#n.hasV2TestOperations()?this.testDestinationv2(t,e,o,i,a):this.testDestinationv1(t,e,o,i,a)}testDestinationv2(t,e,o,i,a){return new Ee(_=>{this.#e.postApiV2DestinationTest({requestBody:{DestinationUrl:t,BackupId:e=="new"?null:e,AutoCreate:!1,Options:null}}).subscribe({next:C=>{if(C.Success){this.emitSuccessV2(_,t,o,C);return}this.handleGenericError(_,t,o,C.Error??"Unknown error",a)},error:C=>{let N=C?.error?.body??C?.error?.requestBody;if(N?.Data?.FolderExists===!1||N?.StatusCode==="missing-folder"){i?this.handleMissingFolder(_,t,o):this.handleGenericError(_,t,o,$localize`The remote destination folder does not exist.`,a);return}if(N?.Data?.HostCertificate){this.handleMissingCertificate(_,t,o,N.Data?.HostCertificate);return}if(N?.Data?.ReportedHostKey){this.handleIncorrectKey(_,t,o,N.Data.ReportedHostKey,N.Data.AcceptedHostKey??null);return}this.handleGenericError(_,t,o,C?.message??"Unknown error",a)}})})}testDestinationv1(t,e,o,i,a){return new Ee(_=>{this.#e.postApiV1RemoteoperationTest({requestBody:{path:t,backupId:e=="new"?null:e}}).subscribe({next:C=>{_.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:o}),_.complete()},error:C=>{this.handleDestinationErrorv1(C.message,t,o,i,a).subscribe(N=>{_.next(N)})}})})}handleMissingFolder(t,e,o){this.#t.open(U,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`,confirmText:$localize`Create folder`,cancelText:$localize`Cancel`},closed:i=>{if(!i){this.reportNoAction(t,e,o,$localize`The remote folder does not exist.`);return}this.#n.hasV2TestOperations()?this.#e.postApiV2DestinationTest({requestBody:{DestinationUrl:e,AutoCreate:!0,Options:null}}).subscribe({next:a=>{if(a.Success){this.emitSuccessV2(t,e,o,a);return}else this.handleFolderCreateFailure(t,e,o,a.Error??$localize`Unknown error`)},error:a=>{this.handleFolderCreateFailure(t,e,o,a.message??$localize`Unknown error`)}}):this.#e.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe({next:()=>{this.handleFolderCreated(t,e,o)},error:a=>{this.handleFolderCreateFailure(t,e,o,a.message??$localize`Unknown error`)}})}})}handleFolderCreateFailure(t,e,o,i){this.#t.open(U,{data:{title:$localize`Error creating folder`,message:$localize`The remote destination folder could not be created. ${i}`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:o}),t.complete()}})}emitSuccessV2(t,e,o,i){t.next({action:"success",targetUrl:e,testAgain:!1,destinationIndex:o,anyFilesFound:!i.Data?.FolderIsEmpty,containsBackup:i.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:i.Data?.FolderContainsEncryptedBackupFiles??void 0}),t.complete()}handleFolderCreated(t,e,o){this.#t.open(U,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"test-again",targetUrl:e,testAgain:!0,destinationIndex:o}),t.complete()}})}reportNoAction(t,e,o,i){t.next({action:"generic-error",targetUrl:e,errorMessage:i,testAgain:!1,destinationIndex:o}),t.complete()}handleMissingCertificate(t,e,o,i){this.#t.open(U,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
|
|
2
2
|
If this is a self-signed certificate, you can choose to trust this certificate.
|
|
3
3
|
The server reported the certificate hash: ${i}`,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:a=>{if(!a){this.reportNoAction(t,e,o,$localize`The server certificate is not trusted.`);return}t.next({action:"trust-cert",targetUrl:e,testAgain:!0,certData:i,destinationIndex:o}),t.complete()}})}handleIncorrectKey(t,e,o,i,a){a?this.#t.open(U,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
|
|
4
4
|
otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as Me}from"./chunk-
|
|
1
|
+
import{a as Me}from"./chunk-3SHOBVX6.js";import"./chunk-AS6Z56AD.js";import"./chunk-DGKNUD3G.js";import{a as ge}from"./chunk-KDJCL6HE.js";import{j as F}from"./chunk-ZAFP5TX6.js";import{a as Ee}from"./chunk-O4OTZE5N.js";import"./chunk-WIVARGP6.js";import"./chunk-MHRECQ5Y.js";import{a as Ne}from"./chunk-WUL6NS6B.js";import"./chunk-FOQJA6X2.js";import"./chunk-VHOAXFIJ.js";import"./chunk-LP4W35DJ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-FK7JFD5B.js";import"./chunk-KETMZS6P.js";import"./chunk-ME77WZZI.js";import"./chunk-5DJAX2HH.js";import"./chunk-G4VDCGMW.js";import"./chunk-UE5VHUV6.js";import{b as A}from"./chunk-DW332N2S.js";import"./chunk-NNCQNVQC.js";import"./chunk-TELPJYLN.js";import"./chunk-DAODMGAD.js";import{B as me,G as _e,H as de,L as ce,P as Ce,c as Q,e as Y,f as Z,j as ee,n as te,o as ne,p as oe,q as ie,r as ae,s as re,t as se,u as le}from"./chunk-HPNLQHW6.js";import{b as pe,c as ue}from"./chunk-BGTK25UG.js";import{b as j,d as H,e as q}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{$ as E,Ab as n,Bb as r,Fb as S,Gb as T,Ib as y,Pa as m,Pb as f,Qb as O,Rb as c,Sb as v,Tb as U,Vb as x,W as p,Xb as g,aa as M,cb as R,gc as w,la as L,na as D,oc as K,pc as J,qc as X,sb as $,tb as b,ub as B,vc as V,wb as G,wc as z,xb as k,xc as W,yb as u,zb as a}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var Se=()=>["backup"];function Te(s,t){s&1&&r(0,"sh-progress-bar",11)}function fe(s,t){if(s&1&&(a(0,"sh-form-field"),r(1,"input",30),n()),s&2){let e=t.$implicit,l=t.$index;m(),u("id",V("filter-",l))("formControl",e)}}function Oe(s,t){if(s&1){let e=y();a(0,"form",12)(1,"sh-select",13)(2,"label",14),c(3,1),n(),r(4,"input",15),n(),a(5,"sh-form-field")(6,"label",16),c(7,2),n(),r(8,"textarea",17),n(),a(9,"sh-form-field")(10,"label",18),c(11,3),n(),r(12,"textarea",19),n()(),a(13,"sh-divider"),c(14,4),n(),a(15,"form",12)(16,"sh-form-field")(17,"label",20),c(18,5),n(),r(19,"input",21),n(),a(20,"sh-form-field")(21,"label",22),c(22,6),n(),r(23,"input",23),n(),a(24,"app-toggle-card",24),S(25,25),c(26,7),T(),S(27,26),G(28,fe,2,3,"sh-form-field",null,B),T(),n()(),a(30,"app-options-list",27),X("optionsChange",function(i){E(e);let C=g();return J(C.settings,i)||(C.settings=i),M(i)}),n(),a(31,"div",28)(32,"button",29),x("click",function(){E(e);let i=g();return M(i.submit())}),f(33,8),r(34,"sh-icon"),O(),n()()}if(s&2){let e=g();u("formGroup",e.baseCmdForm),m(),u("options",e.commandOptions()??W(10,Se))("inlineSearch",!0),m(14),u("formGroup",e.standardFields),m(9),u("disallowToggle",!0),m(4),k(e.standardFields.controls.filters.controls),m(2),K("options",e.settings),u("hasFreeTextSettings",!0),m(2),w("loader",e.isSubmitting()),m(2),v(e.baseCmdForm.value.command),U(33)}}var _=new ae,P=class s{#e=p(F);#t=p(ue);#n=p(H);#o=p(j);#i=p(pe);#a=p(Ne);#r=A(this.#o.params);commandOptions=A(this.#i.getApiV1Commandline());isSubmitting=L(!1);optionsFields=this.#e.optionsFields;standardFields=_.group({"backup-id":_.control(""),"backup-name":_.control(""),dbpath:_.control(""),filters:_.array([])});baseCmdForm=_.group({command:_.control("backup"),targetUrl:_.control(""),arguments:_.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#l=D(()=>{let t=this.#r()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#t.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.#e.mapGeneralToForm(e.Backup),this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup,!0)),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),t.Filters&&t.Filters.length&&t.Filters.map(e=>{this.standardFields.controls.filters.push(_.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.#a.resumeDialogCheck(()=>this.#s())}#s(){this.isSubmitting.set(!0);let t=this.baseCmdForm.value,e=t.targetUrl??"",l=t.arguments?.split(`
|
|
2
2
|
`).filter(o=>o.length>0)??[],i=this.standardFields.value,C=i.filters??[],N=[t.command,e,...l,`--backup-name=${i["backup-name"]}`,`--dbpath=${i.dbpath}`,`--backup-id=${i["backup-id"]}`,...C.filter(o=>o).map(o=>o.startsWith("-")?`--exclude=${o?.slice(1)}`:`--include=${o}`),...this.#e.mapFormsToSettings(["backup-id","backup-name","dbpath"]).map(o=>`${o.Name.startsWith("--")?"":"--"}${o.Name}=${o.Value}`),"--disable-module=console-password-input"];this.#t.postApiV1Commandline({requestBody:N}).subscribe(o=>{o.Status==="OK"&&this.#n.navigate(["backup",this.backupId(),"commandline",o.ID])})}mapBaseCmdToForm(t){let e=t.TargetURL??null;e&&this.baseCmdForm.patchValue({targetUrl:e??"",arguments:t.Sources?.join(`
|
|
3
3
|
`)??""})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=R({type:s,selectors:[["app-commandline"]],features:[z([F])],decls:8,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`Command`;let l;l=$localize`TargetUrl`;let i;i=$localize`Commandline Arguments`;let C;C=$localize`Advanced options`;let N;N=$localize`Backup ID`;let o;o=$localize`Backup Name`;let I;I=$localize`Filters`;let h;return h=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Run "${"\uFFFD0\uFFFD"}:INTERPOLATION:" command now `,[t,e,l,i,C,N,o,I,h,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"indeterminate","primary"],[3,"formGroup"],["placeholder","Select a command...",3,"options","inlineSearch"],["for","command"],["type","text","id","command","formControlName","command"],["for","targetUrl"],["id","targetUrl","autocomplete","off","formControlName","targetUrl"],["for","arguments"],["id","arguments","autocomplete","off","formControlName","arguments"],["for","backup-id"],["id","backup-id","formControlName","backup-id"],["for","backup-name"],["id","backup-name","formControlName","backup-name"],[3,"disallowToggle"],["title",""],["content","","formGroupName","filters"],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","",1,"raised","primary",3,"click"],[3,"id","formControl"]]},template:function(e,l){e&1&&(r(0,"app-status-bar"),a(1,"section")(2,"div",9)(3,"button",10),f(4,0),r(5,"sh-icon"),O(),n()(),$(6,Te,1,0,"sh-progress-bar",11)(7,Oe,35,11),n()),e&2&&(m(6),b(l.finishedLoading()?7:6))},dependencies:[re,ee,Q,Y,Z,ge,Me,Ee,se,te,ie,oe,ne,q,de,me,_e,Ce,ce,le],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;max-width:40rem;padding:2.5rem;gap:1.25rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};export{P as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-3SHOBVX6.js";import"./chunk-AS6Z56AD.js";import"./chunk-DGKNUD3G.js";import"./chunk-WIVARGP6.js";import"./chunk-5DJAX2HH.js";import"./chunk-TELPJYLN.js";import"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";export{a as OptionsListComponent};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as Pt}from"./chunk-HVFZUJ2H.js";import{a as ht}from"./chunk-KDJCL6HE.js";import{a as Ot}from"./chunk-VEWX3KXN.js";import"./chunk-WUL6NS6B.js";import"./chunk-FOQJA6X2.js";import"./chunk-VHOAXFIJ.js";import"./chunk-LP4W35DJ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-FK7JFD5B.js";import{a as te}from"./chunk-KETMZS6P.js";import"./chunk-ME77WZZI.js";import{a as le}from"./chunk-5DJAX2HH.js";import"./chunk-G4VDCGMW.js";import{a as x}from"./chunk-UE5VHUV6.js";import"./chunk-DW332N2S.js";import"./chunk-NNCQNVQC.js";import{a as Mt}from"./chunk-TELPJYLN.js";import{a as Tt,c as ct}from"./chunk-DAODMGAD.js";import{B as w,E as Ct,G as gt,H as ee,L as ut,M as pt,N as Et,P as Nt,W as mt,Y as ft,c as q,e as K,i as j,m as St,s as Q,t as Y,u as b,w as Z,z as dt}from"./chunk-HPNLQHW6.js";import{c as It}from"./chunk-BGTK25UG.js";import"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{$ as p,Ab as o,Bb as m,E as G,Ib as M,Ma as nt,Mc as v,Pa as l,Pb as P,Qb as h,Rb as _,Sb as B,Sc as rt,Tb as H,Ub as J,Vb as d,W as R,Xb as c,a as Ze,aa as E,b as et,c as tt,cb as D,cc as at,dc as lt,gc as I,hb as se,ib as it,jc as $,kc as W,la as S,lc as ae,na as k,oc as A,pb as ot,pc as y,qb as st,qc as L,sb as C,tb as g,uc as _t,xc as X,yb as N,zb as s}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var At=["formRef"],yt=()=>[import("./chunk-2QP2Y5QS.js").then(i=>i.OptionsListComponent)];function Lt(i,t){i&1&&(s(0,"sh-alert",3),_(1,1),o())}function vt(i,t){if(i&1){let e=M();s(0,"app-options-list",5),L("optionsChange",function(a){p(e);let T=c();return y(T.settings,a)||(T.settings=a),E(a)}),o()}if(i&2){let e=c();A("options",e.settings),N("hasFreeTextSettings",!0)}}var V=class i{#e=R(x);#n=R(It);formRef=rt.required("formRef");settings=S([]);isSubmitting=S(!1);isLoadingOptions=S(!0);saved=S(!1);lastRecievedServerSettings=S({});serverSettingsEffect=k(()=>{let t=this.#e.serverSettings();if(t===void 0)return;this.lastRecievedServerSettings.set(t),this.isLoadingOptions.set(!0);let e=Object.entries(t);e.forEach(([n,a],T)=>{if(n.startsWith("--")){let f=n.substring(2);this.settings.update(u=>(u.some(O=>O.Name===f||O.Name===n)||u.push({Name:n,Value:a}),u))}T===e.length-1&&this.isLoadingOptions.set(!1)})});submit(){this.isSubmitting.set(!0);let t=this.settings(),e=this.lastRecievedServerSettings(),n=t.map(u=>u.Name?.startsWith("--")?u.Name:`--${u.Name}`),T=Object.keys(e).filter(u=>u.startsWith("--")).filter(u=>!n.includes(u)),f=t.reduce((u,O)=>{let F=O.Name?.startsWith("--")?O.Name:`--${O.Name}`;return u[F]=O.Value,u},{});T.forEach(u=>{f[u]=null}),this.#n.patchApiV1Serversettings({requestBody:f}).pipe(G(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#e.refreshServerSettings(),this.saved.set(!0),setTimeout(()=>{this.saved.set(!1)},3e3)}})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,n){e&1&&at(n.formRef,At,5),e&2&<()},decls:8,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: Save settings `;let e;return e=$localize`Settings saved`,[t,e,[1,"actions"],[1,"success"],["shButton","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings"]]},template:function(e,n){e&1&&(s(0,"div",2),C(1,Lt,2,0,"sh-alert",3),s(2,"button",4),d("click",function(){return n.submit()}),P(3,0),m(4,"sh-icon"),h(),o()(),it(5,vt,1,2),ot(6,5,yt)),e&2&&(l(),g(n.saved()?1:-1),l(),I("loader",n.isSubmitting()),l(4),st(!n.isLoadingOptions()))},dependencies:[Y,w,b,Z],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40.625rem;justify-self:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end;margin-bottom:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}"],changeDetection:0})};function bt(i,t){if(i&1){let e=M();s(0,"sh-form-field",12)(1,"input",13),L("ngModelChange",function(a){p(e);let T=c(2);return y(T.registerUrl,a)||(T.registerUrl=a),E(a)}),o()(),s(2,"button",14),d("click",function(){p(e);let a=c(2);return E(a.register())}),_(3,0),o()}if(i&2){let e=c(2);l(),A("ngModel",e.registerUrl)}}function wt(i,t){if(i&1&&(s(0,"div",9)(1,"label"),_(2,1),o(),s(3,"a",15),$(4),o()()),i&2){let e=c(2);l(3),N("href",_t(e.claimUrl()),nt),l(),W(e.claimUrl())}}function xt(i,t){i&1&&(s(0,"div",9)(1,"label"),_(2,2),o()())}function kt(i,t){if(i&1){let e=M();s(0,"button",14),d("click",function(){p(e);let a=c(2);return E(a.cancel())}),_(1,3),o()}}function Jt(i,t){if(i&1){let e=M();s(0,"button",14),d("click",function(){p(e);let a=c(2);return E(a.disable())}),_(1,4),o()}}function Xt(i,t){if(i&1){let e=M();s(0,"button",14),d("click",function(){p(e);let a=c(2);return E(a.enable())}),_(1,5),o(),s(2,"button",16),d("click",function(){p(e);let a=c(2);return E(a.delete())}),_(3,6),o()}}function Vt(i,t){i&1&&(P(0,7,1),m(1,"sh-icon"),h())}function zt(i,t){i&1&&(P(0,7,2),m(1,"sh-icon"),h())}function Ut(i,t){if(i&1){let e=M();s(0,"sh-chip",17),d("click",function(){p(e);let a=c(2);return E(a.copyReportingUrl())}),P(1,7),C(2,Vt,2,0,"sh-icon")(3,zt,2,0,"sh-icon"),h(),o()}if(i&2){let e=c(2);l(2),g(e.copiedReportingUrl()===!0?2:3)}}function Bt(i,t){if(i&1&&(s(0,"div",8),C(1,bt,4,1),C(2,wt,5,3,"div",9),C(3,xt,3,0,"div",9),C(4,kt,2,0,"button",10),C(5,Jt,2,0,"button",10),C(6,Xt,4,0),C(7,Ut,4,1,"sh-chip",11),o()),i&2){let e=c();l(),g(e.state()==="inactive"?1:-1),l(),g(e.state()==="registered"?2:-1),l(),g(e.state()==="registering"?3:-1),l(),g(e.state()==="registering"||e.state()==="registeringfaulted"||e.state()==="registered"?4:-1),l(),g(e.state()==="connected"||e.state()==="connecting"?5:-1),l(),g(e.state()==="disabled"?6:-1),l(),g(e.additionalReportingUrl()!==""?7:-1)}}var ne=class i{#e=R(te);#n=R(x);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;additionalReportingUrl=v(()=>{let t=this.#n.serverSettings();return this.#e.state()==="inactive"?"":t&&t["additional-report-url"]||""});copiedReportingUrl=S(!1);ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let t=this.additionalReportingUrl();t&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(t))}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let t;t=$localize`Register on console`;let e;e=$localize`Machine is now registered, open this link to add it to your account:`;let n;n=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let T;T=$localize`Disable console connection`;let f;f=$localize`Enable console connection`;let u;u=$localize` Delete console connection setup `;let O;return O=$localize` Reporting configured by server ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,O=J(O),[t,e,n,a,T,f,u,O,[1,"field-row"],[1,"field-col"],["type","button","shButton","",1,"raised"],[1,"reporting-url","primary","simple"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","sh-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","shButton","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","shButton","",1,"raised","error",3,"click"],[1,"reporting-url","primary","simple",3,"click"]]},template:function(e,n){e&1&&C(0,Bt,8,7,"div",8),e&2&&g(n.state()!=="unknown"?0:-1)},dependencies:[Q,q,K,j,ee,w,Ct,b],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}"],changeDetection:0})};function Gt(...i){let t=S(...i);return Object.defineProperty(t,"value",{get:t.asReadonly(),set:t.set.bind(t)})}var ie=()=>({standalone:!0});function Ht(i,t){if(i&1&&(s(0,"label"),P(1,35),m(2,"sh-icon",79),h(),o()),i&2){let e=c(3);l(2),N("shTooltip",e.remoteControlTooltip())}}function Wt(i,t){if(i&1&&(s(0,"label"),P(1,36),m(2,"sh-icon",79),h(),o()),i&2){let e=c(3);l(2),N("shTooltip",e.remoteControlTooltip())}}function qt(i,t){if(i&1&&(s(0,"label"),P(1,37),m(2,"sh-icon",79),h(),o()),i&2){let e=c(3);l(2),N("shTooltip",e.connectionStatusIndicatorTooltip())}}function Kt(i,t){if(i&1&&(s(0,"label"),P(1,38),m(2,"sh-icon",79),h(),o()),i&2){let e=c(3);l(2),N("shTooltip",e.connectionStatusIndicatorTooltip())}}function jt(i,t){if(i&1){let e=M();s(0,"section")(1,"div",55)(2,"h3"),_(3,33),o(),s(4,"p"),_(5,34),o()(),s(6,"div",78)(7,"sh-toggle",67),d("click",function(){p(e);let a=c(2);return E(a.toggleConsoleControl())}),C(8,Ht,3,1,"label")(9,Wt,3,1,"label"),o(),s(10,"sh-toggle",67),d("click",function(){p(e);let a=c(2);return E(a.saveHideConsoleConnectionStatus())}),C(11,qt,3,1,"label")(12,Kt,3,1,"label"),o()()()}if(i&2){let e=c(2);l(7),I("active",!e.consoleControlDisabled()),l(),g(e.consoleControlDisabled()?8:9),l(2),I("active",!e.hideConsoleConnectionStatus()),l(),g(e.hideConsoleConnectionStatus()?11:12)}}function Qt(i,t){if(i&1&&(s(0,"section")(1,"div",55)(2,"h3"),_(3,32),o(),s(4,"p"),$(5),o()(),s(6,"div",56),m(7,"app-remote-control"),o()(),C(8,jt,13,6,"section")),i&2){let e=c();l(5),W(e.remoteControlStatus()),l(3),g(e.remoteControlState()!="inactive"?8:-1)}}function Yt(i,t){i&1&&(s(0,"sh-icon",84),$(1,"check"),o())}function Zt(i,t){i&1&&(s(0,"sh-icon",85),$(1,"prohibit"),o())}function en(i,t){if(i&1){let e=M();s(0,"button",89),d("click",function(){p(e);let a=c(2);return E(a.updatePassphrase())}),_(1,42),o()}if(i&2){let e=c(2);I("loader",e.isUpdating())}}function tn(i,t){if(i&1){let e=M();s(0,"button",90),d("click",function(){p(e);let a=c(2);return E(a.updatePassphrase())}),_(1,43),o()}if(i&2){let e=c(2);I("loader",e.isUpdating()),N("disabled",!0)}}function nn(i,t){if(i&1){let e=M();s(0,"sh-form-field")(1,"label",80),_(2,39),o(),s(3,"input",81),L("ngModelChange",function(a){p(e);let T=c();return y(T.passphrase,a)||(T.passphrase=a),E(a)}),o()(),s(4,"sh-form-field")(5,"label",82),_(6,40),o(),s(7,"input",83),L("ngModelChange",function(a){p(e);let T=c();return y(T.repeatPassphrase,a)||(T.repeatPassphrase=a),E(a)}),o(),C(8,Yt,2,0,"sh-icon",84)(9,Zt,2,0,"sh-icon",85),o(),s(10,"div",61)(11,"button",86),d("click",function(){p(e);let a=c();return E(a.cancelPasswordChange())}),_(12,41),o(),C(13,en,2,2,"button",87)(14,tn,2,3,"button",88),o()}if(i&2){let e=c();l(3),A("ngModel",e.passphrase),l(4),N("disabled",e.passphrase().length===0),A("ngModel",e.repeatPassphrase),l(),g(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?8:9),l(3),I("loader",e.isUpdating()),l(2),g(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?13:14)}}function on(i,t){i&1&&(s(0,"sh-icon",91),$(1,"check"),o())}function sn(i,t){if(i&1){let e=M();s(0,"div",61)(1,"button",86),d("click",function(){p(e);let a=c();return E(a.openPassphraseForm())}),_(2,44),o(),C(3,on,2,0,"sh-icon",91),o()}if(i&2){let e=c();l(3),g(e.passwordUpdated()?3:-1)}}function an(i,t){i&1&&(P(0,11,1),m(1,"span"),h())}function ln(i,t){i&1&&(P(0,11,2),m(1,"span"),h())}function _n(i,t){if(i&1){let e=M();s(0,"sh-form-field")(1,"label",92),_(2,45),o(),s(3,"textarea",93),L("ngModelChange",function(a){p(e);let T=c();return y(T.allowedHostnames,a)||(T.allowedHostnames=a),E(a)}),o()(),s(4,"sh-alert",94),_(5,46),o(),s(6,"button",89),d("click",function(){p(e);let a=c();return E(a.updateAllowedHostnames())}),_(7,47),o()}if(i&2){let e=c();l(3),A("ngModel",e.allowedHostnames),l(3),I("loader",e.updatingAllowedHosts())}}function rn(i,t){if(i&1){let e=M();s(0,"section")(1,"div",55)(2,"h3"),_(3,48),o(),s(4,"p"),_(5,49),o()(),s(6,"div",56)(7,"sh-select",95)(8,"input",63),d("ngModelChange",function(a){p(e);let T=c();return E(T.updatePowerMode(a))}),o()()()()}if(i&2){let e=c();l(7),N("options",e.powerModeOptions())("isClearable",!1),l(),N("ngModel",e.powerModeCtrl())("ngModelOptions",X(4,ie))}}function Tn(i,t){if(i&1&&(s(0,"p"),_(1,50),o()),i&2){let e,n=c();l(),B((e=n.sysinfo())==null?null:e.ServerVersionName),H(1)}}function cn(i,t){i&1&&m(0,"sh-progress-bar",68)}function Sn(i,t){if(i&1&&$(0),i&2){let e=t.$implicit;ae(" ",e.label," ")}}function dn(i,t){if(i&1&&$(0),i&2){let e=t.$implicit;ae(" ",e.label," ")}}function Cn(i,t){if(i&1){let e=M();s(0,"section")(1,"div",55)(2,"h3"),_(3,51),o(),s(4,"p"),P(5,52),m(6,"a",96)(7,"br")(8,"br"),h(),o()(),s(9,"div",56)(10,"sh-select",97)(11,"input",63),d("ngModelChange",function(a){p(e);let T=c();return E(T.updateUsageStatistics(a))}),o(),se(12,dn,1,1,"ng-template"),o()()()}if(i&2){let e=c();l(10),N("options",e.usageStatisticsOptions())("isLoading",e.updatingUsageStatistics()),l(),N("ngModel",e.usageStatistics())("ngModelOptions",X(4,ie))}}function gn(i,t,e){let n=Gt(i),a=n[Ze];e?.equal&&(a.equal=e.equal);let T;return n.set=f=>{clearTimeout(T),T=setTimeout(()=>et(a,f),t)},n.update=f=>{clearTimeout(T),T=setTimeout(()=>tt(a,f),t)},n}var un=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],$t=[{value:"none",label:$localize`System default ($value)`},{value:"information",label:$localize`Usage statistics, warnings, errors, and crashes`},{value:"warning",label:$localize`Warnings, errors and crashes`},{value:"error",label:$localize`Errors and crashes`},{value:"crash",label:$localize`Crashes only`},{value:"disabled",label:$localize`None / disabled`}],_e=class i{#e=R(dt);#n=R(Pt);#i=R(Mt);#t=R(x);#s=R(te);#T=R(ct);#a=R(Tt);#l=this.#a.getItem("locale")??"en-US";sysinfo=this.#i.systemInfo;isDarkMode=this.#n.isDarkMode;editAs=S("list");previousLang=this.#l;langCtrl=S(this.#l);powerModeCtrl=S("");usageStatistics=S("");updatingUsageStatistics=S(!1);remoteControlStatus=this.#s.status;remoteControlState=this.#s.state;updatingChannel=S(!1);updateChannel=S("");isUsingRelay=this.#T.relayIsEnabled;defaultClient=S(this.#c());usageStatisticsDisabled=v(()=>(this.#i.systemInfo()?.DefaultUsageReportLevel??"").toLowerCase()==="disabled");#S=k(()=>{let t=this.#i.systemInfo()?.DefaultUsageReportLevel??"",e=$t;e[0].label=$localize`System default (${t})`,this.usageStatisticsOptions.set(e)});remoteControlTooltip=S($localize`Disabling console control will disable remote access to this machine from the console, but will keep the
|
|
1
|
+
import{a as Pt}from"./chunk-HVFZUJ2H.js";import{a as ht}from"./chunk-KDJCL6HE.js";import{a as Ot}from"./chunk-VEWX3KXN.js";import"./chunk-WUL6NS6B.js";import"./chunk-FOQJA6X2.js";import"./chunk-VHOAXFIJ.js";import"./chunk-LP4W35DJ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-FK7JFD5B.js";import{a as te}from"./chunk-KETMZS6P.js";import"./chunk-ME77WZZI.js";import{a as le}from"./chunk-5DJAX2HH.js";import"./chunk-G4VDCGMW.js";import{a as x}from"./chunk-UE5VHUV6.js";import"./chunk-DW332N2S.js";import"./chunk-NNCQNVQC.js";import{a as Mt}from"./chunk-TELPJYLN.js";import{a as Tt,c as ct}from"./chunk-DAODMGAD.js";import{B as w,E as Ct,G as gt,H as ee,L as ut,M as pt,N as Et,P as Nt,W as mt,Y as ft,c as q,e as K,i as j,m as St,s as Q,t as Y,u as b,w as Z,z as dt}from"./chunk-HPNLQHW6.js";import{c as It}from"./chunk-BGTK25UG.js";import"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{$ as p,Ab as o,Bb as m,E as G,Ib as M,Ma as nt,Mc as v,Pa as l,Pb as P,Qb as h,Rb as _,Sb as B,Sc as rt,Tb as H,Ub as J,Vb as d,W as R,Xb as c,a as Ze,aa as E,b as et,c as tt,cb as D,cc as at,dc as lt,gc as I,hb as se,ib as it,jc as $,kc as W,la as S,lc as ae,na as k,oc as A,pb as ot,pc as y,qb as st,qc as L,sb as C,tb as g,uc as _t,xc as X,yb as N,zb as s}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var At=["formRef"],yt=()=>[import("./chunk-OCQNG4JU.js").then(i=>i.OptionsListComponent)];function Lt(i,t){i&1&&(s(0,"sh-alert",3),_(1,1),o())}function vt(i,t){if(i&1){let e=M();s(0,"app-options-list",5),L("optionsChange",function(a){p(e);let T=c();return y(T.settings,a)||(T.settings=a),E(a)}),o()}if(i&2){let e=c();A("options",e.settings),N("hasFreeTextSettings",!0)}}var V=class i{#e=R(x);#n=R(It);formRef=rt.required("formRef");settings=S([]);isSubmitting=S(!1);isLoadingOptions=S(!0);saved=S(!1);lastRecievedServerSettings=S({});serverSettingsEffect=k(()=>{let t=this.#e.serverSettings();if(t===void 0)return;this.lastRecievedServerSettings.set(t),this.isLoadingOptions.set(!0);let e=Object.entries(t);e.forEach(([n,a],T)=>{if(n.startsWith("--")){let f=n.substring(2);this.settings.update(u=>(u.some(O=>O.Name===f||O.Name===n)||u.push({Name:n,Value:a}),u))}T===e.length-1&&this.isLoadingOptions.set(!1)})});submit(){this.isSubmitting.set(!0);let t=this.settings(),e=this.lastRecievedServerSettings(),n=t.map(u=>u.Name?.startsWith("--")?u.Name:`--${u.Name}`),T=Object.keys(e).filter(u=>u.startsWith("--")).filter(u=>!n.includes(u)),f=t.reduce((u,O)=>{let F=O.Name?.startsWith("--")?O.Name:`--${O.Name}`;return u[F]=O.Value,u},{});T.forEach(u=>{f[u]=null}),this.#n.patchApiV1Serversettings({requestBody:f}).pipe(G(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#e.refreshServerSettings(),this.saved.set(!0),setTimeout(()=>{this.saved.set(!1)},3e3)}})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,n){e&1&&at(n.formRef,At,5),e&2&<()},decls:8,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: Save settings `;let e;return e=$localize`Settings saved`,[t,e,[1,"actions"],[1,"success"],["shButton","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings"]]},template:function(e,n){e&1&&(s(0,"div",2),C(1,Lt,2,0,"sh-alert",3),s(2,"button",4),d("click",function(){return n.submit()}),P(3,0),m(4,"sh-icon"),h(),o()(),it(5,vt,1,2),ot(6,5,yt)),e&2&&(l(),g(n.saved()?1:-1),l(),I("loader",n.isSubmitting()),l(4),st(!n.isLoadingOptions()))},dependencies:[Y,w,b,Z],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40.625rem;justify-self:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end;margin-bottom:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}"],changeDetection:0})};function bt(i,t){if(i&1){let e=M();s(0,"sh-form-field",12)(1,"input",13),L("ngModelChange",function(a){p(e);let T=c(2);return y(T.registerUrl,a)||(T.registerUrl=a),E(a)}),o()(),s(2,"button",14),d("click",function(){p(e);let a=c(2);return E(a.register())}),_(3,0),o()}if(i&2){let e=c(2);l(),A("ngModel",e.registerUrl)}}function wt(i,t){if(i&1&&(s(0,"div",9)(1,"label"),_(2,1),o(),s(3,"a",15),$(4),o()()),i&2){let e=c(2);l(3),N("href",_t(e.claimUrl()),nt),l(),W(e.claimUrl())}}function xt(i,t){i&1&&(s(0,"div",9)(1,"label"),_(2,2),o()())}function kt(i,t){if(i&1){let e=M();s(0,"button",14),d("click",function(){p(e);let a=c(2);return E(a.cancel())}),_(1,3),o()}}function Jt(i,t){if(i&1){let e=M();s(0,"button",14),d("click",function(){p(e);let a=c(2);return E(a.disable())}),_(1,4),o()}}function Xt(i,t){if(i&1){let e=M();s(0,"button",14),d("click",function(){p(e);let a=c(2);return E(a.enable())}),_(1,5),o(),s(2,"button",16),d("click",function(){p(e);let a=c(2);return E(a.delete())}),_(3,6),o()}}function Vt(i,t){i&1&&(P(0,7,1),m(1,"sh-icon"),h())}function zt(i,t){i&1&&(P(0,7,2),m(1,"sh-icon"),h())}function Ut(i,t){if(i&1){let e=M();s(0,"sh-chip",17),d("click",function(){p(e);let a=c(2);return E(a.copyReportingUrl())}),P(1,7),C(2,Vt,2,0,"sh-icon")(3,zt,2,0,"sh-icon"),h(),o()}if(i&2){let e=c(2);l(2),g(e.copiedReportingUrl()===!0?2:3)}}function Bt(i,t){if(i&1&&(s(0,"div",8),C(1,bt,4,1),C(2,wt,5,3,"div",9),C(3,xt,3,0,"div",9),C(4,kt,2,0,"button",10),C(5,Jt,2,0,"button",10),C(6,Xt,4,0),C(7,Ut,4,1,"sh-chip",11),o()),i&2){let e=c();l(),g(e.state()==="inactive"?1:-1),l(),g(e.state()==="registered"?2:-1),l(),g(e.state()==="registering"?3:-1),l(),g(e.state()==="registering"||e.state()==="registeringfaulted"||e.state()==="registered"?4:-1),l(),g(e.state()==="connected"||e.state()==="connecting"?5:-1),l(),g(e.state()==="disabled"?6:-1),l(),g(e.additionalReportingUrl()!==""?7:-1)}}var ne=class i{#e=R(te);#n=R(x);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;additionalReportingUrl=v(()=>{let t=this.#n.serverSettings();return this.#e.state()==="inactive"?"":t&&t["additional-report-url"]||""});copiedReportingUrl=S(!1);ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let t=this.additionalReportingUrl();t&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(t))}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let t;t=$localize`Register on console`;let e;e=$localize`Machine is now registered, open this link to add it to your account:`;let n;n=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let T;T=$localize`Disable console connection`;let f;f=$localize`Enable console connection`;let u;u=$localize` Delete console connection setup `;let O;return O=$localize` Reporting configured by server ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,O=J(O),[t,e,n,a,T,f,u,O,[1,"field-row"],[1,"field-col"],["type","button","shButton","",1,"raised"],[1,"reporting-url","primary","simple"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","sh-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","shButton","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","shButton","",1,"raised","error",3,"click"],[1,"reporting-url","primary","simple",3,"click"]]},template:function(e,n){e&1&&C(0,Bt,8,7,"div",8),e&2&&g(n.state()!=="unknown"?0:-1)},dependencies:[Q,q,K,j,ee,w,Ct,b],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}"],changeDetection:0})};function Gt(...i){let t=S(...i);return Object.defineProperty(t,"value",{get:t.asReadonly(),set:t.set.bind(t)})}var ie=()=>({standalone:!0});function Ht(i,t){if(i&1&&(s(0,"label"),P(1,35),m(2,"sh-icon",79),h(),o()),i&2){let e=c(3);l(2),N("shTooltip",e.remoteControlTooltip())}}function Wt(i,t){if(i&1&&(s(0,"label"),P(1,36),m(2,"sh-icon",79),h(),o()),i&2){let e=c(3);l(2),N("shTooltip",e.remoteControlTooltip())}}function qt(i,t){if(i&1&&(s(0,"label"),P(1,37),m(2,"sh-icon",79),h(),o()),i&2){let e=c(3);l(2),N("shTooltip",e.connectionStatusIndicatorTooltip())}}function Kt(i,t){if(i&1&&(s(0,"label"),P(1,38),m(2,"sh-icon",79),h(),o()),i&2){let e=c(3);l(2),N("shTooltip",e.connectionStatusIndicatorTooltip())}}function jt(i,t){if(i&1){let e=M();s(0,"section")(1,"div",55)(2,"h3"),_(3,33),o(),s(4,"p"),_(5,34),o()(),s(6,"div",78)(7,"sh-toggle",67),d("click",function(){p(e);let a=c(2);return E(a.toggleConsoleControl())}),C(8,Ht,3,1,"label")(9,Wt,3,1,"label"),o(),s(10,"sh-toggle",67),d("click",function(){p(e);let a=c(2);return E(a.saveHideConsoleConnectionStatus())}),C(11,qt,3,1,"label")(12,Kt,3,1,"label"),o()()()}if(i&2){let e=c(2);l(7),I("active",!e.consoleControlDisabled()),l(),g(e.consoleControlDisabled()?8:9),l(2),I("active",!e.hideConsoleConnectionStatus()),l(),g(e.hideConsoleConnectionStatus()?11:12)}}function Qt(i,t){if(i&1&&(s(0,"section")(1,"div",55)(2,"h3"),_(3,32),o(),s(4,"p"),$(5),o()(),s(6,"div",56),m(7,"app-remote-control"),o()(),C(8,jt,13,6,"section")),i&2){let e=c();l(5),W(e.remoteControlStatus()),l(3),g(e.remoteControlState()!="inactive"?8:-1)}}function Yt(i,t){i&1&&(s(0,"sh-icon",84),$(1,"check"),o())}function Zt(i,t){i&1&&(s(0,"sh-icon",85),$(1,"prohibit"),o())}function en(i,t){if(i&1){let e=M();s(0,"button",89),d("click",function(){p(e);let a=c(2);return E(a.updatePassphrase())}),_(1,42),o()}if(i&2){let e=c(2);I("loader",e.isUpdating())}}function tn(i,t){if(i&1){let e=M();s(0,"button",90),d("click",function(){p(e);let a=c(2);return E(a.updatePassphrase())}),_(1,43),o()}if(i&2){let e=c(2);I("loader",e.isUpdating()),N("disabled",!0)}}function nn(i,t){if(i&1){let e=M();s(0,"sh-form-field")(1,"label",80),_(2,39),o(),s(3,"input",81),L("ngModelChange",function(a){p(e);let T=c();return y(T.passphrase,a)||(T.passphrase=a),E(a)}),o()(),s(4,"sh-form-field")(5,"label",82),_(6,40),o(),s(7,"input",83),L("ngModelChange",function(a){p(e);let T=c();return y(T.repeatPassphrase,a)||(T.repeatPassphrase=a),E(a)}),o(),C(8,Yt,2,0,"sh-icon",84)(9,Zt,2,0,"sh-icon",85),o(),s(10,"div",61)(11,"button",86),d("click",function(){p(e);let a=c();return E(a.cancelPasswordChange())}),_(12,41),o(),C(13,en,2,2,"button",87)(14,tn,2,3,"button",88),o()}if(i&2){let e=c();l(3),A("ngModel",e.passphrase),l(4),N("disabled",e.passphrase().length===0),A("ngModel",e.repeatPassphrase),l(),g(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?8:9),l(3),I("loader",e.isUpdating()),l(2),g(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?13:14)}}function on(i,t){i&1&&(s(0,"sh-icon",91),$(1,"check"),o())}function sn(i,t){if(i&1){let e=M();s(0,"div",61)(1,"button",86),d("click",function(){p(e);let a=c();return E(a.openPassphraseForm())}),_(2,44),o(),C(3,on,2,0,"sh-icon",91),o()}if(i&2){let e=c();l(3),g(e.passwordUpdated()?3:-1)}}function an(i,t){i&1&&(P(0,11,1),m(1,"span"),h())}function ln(i,t){i&1&&(P(0,11,2),m(1,"span"),h())}function _n(i,t){if(i&1){let e=M();s(0,"sh-form-field")(1,"label",92),_(2,45),o(),s(3,"textarea",93),L("ngModelChange",function(a){p(e);let T=c();return y(T.allowedHostnames,a)||(T.allowedHostnames=a),E(a)}),o()(),s(4,"sh-alert",94),_(5,46),o(),s(6,"button",89),d("click",function(){p(e);let a=c();return E(a.updateAllowedHostnames())}),_(7,47),o()}if(i&2){let e=c();l(3),A("ngModel",e.allowedHostnames),l(3),I("loader",e.updatingAllowedHosts())}}function rn(i,t){if(i&1){let e=M();s(0,"section")(1,"div",55)(2,"h3"),_(3,48),o(),s(4,"p"),_(5,49),o()(),s(6,"div",56)(7,"sh-select",95)(8,"input",63),d("ngModelChange",function(a){p(e);let T=c();return E(T.updatePowerMode(a))}),o()()()()}if(i&2){let e=c();l(7),N("options",e.powerModeOptions())("isClearable",!1),l(),N("ngModel",e.powerModeCtrl())("ngModelOptions",X(4,ie))}}function Tn(i,t){if(i&1&&(s(0,"p"),_(1,50),o()),i&2){let e,n=c();l(),B((e=n.sysinfo())==null?null:e.ServerVersionName),H(1)}}function cn(i,t){i&1&&m(0,"sh-progress-bar",68)}function Sn(i,t){if(i&1&&$(0),i&2){let e=t.$implicit;ae(" ",e.label," ")}}function dn(i,t){if(i&1&&$(0),i&2){let e=t.$implicit;ae(" ",e.label," ")}}function Cn(i,t){if(i&1){let e=M();s(0,"section")(1,"div",55)(2,"h3"),_(3,51),o(),s(4,"p"),P(5,52),m(6,"a",96)(7,"br")(8,"br"),h(),o()(),s(9,"div",56)(10,"sh-select",97)(11,"input",63),d("ngModelChange",function(a){p(e);let T=c();return E(T.updateUsageStatistics(a))}),o(),se(12,dn,1,1,"ng-template"),o()()()}if(i&2){let e=c();l(10),N("options",e.usageStatisticsOptions())("isLoading",e.updatingUsageStatistics()),l(),N("ngModel",e.usageStatistics())("ngModelOptions",X(4,ie))}}function gn(i,t,e){let n=Gt(i),a=n[Ze];e?.equal&&(a.equal=e.equal);let T;return n.set=f=>{clearTimeout(T),T=setTimeout(()=>et(a,f),t)},n.update=f=>{clearTimeout(T),T=setTimeout(()=>tt(a,f),t)},n}var un=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],$t=[{value:"none",label:$localize`System default ($value)`},{value:"information",label:$localize`Usage statistics, warnings, errors, and crashes`},{value:"warning",label:$localize`Warnings, errors and crashes`},{value:"error",label:$localize`Errors and crashes`},{value:"crash",label:$localize`Crashes only`},{value:"disabled",label:$localize`None / disabled`}],_e=class i{#e=R(dt);#n=R(Pt);#i=R(Mt);#t=R(x);#s=R(te);#T=R(ct);#a=R(Tt);#l=this.#a.getItem("locale")??"en-US";sysinfo=this.#i.systemInfo;isDarkMode=this.#n.isDarkMode;editAs=S("list");previousLang=this.#l;langCtrl=S(this.#l);powerModeCtrl=S("");usageStatistics=S("");updatingUsageStatistics=S(!1);remoteControlStatus=this.#s.status;remoteControlState=this.#s.state;updatingChannel=S(!1);updateChannel=S("");isUsingRelay=this.#T.relayIsEnabled;defaultClient=S(this.#c());usageStatisticsDisabled=v(()=>(this.#i.systemInfo()?.DefaultUsageReportLevel??"").toLowerCase()==="disabled");#S=k(()=>{let t=this.#i.systemInfo()?.DefaultUsageReportLevel??"",e=$t;e[0].label=$localize`System default (${t})`,this.usageStatisticsOptions.set(e)});remoteControlTooltip=S($localize`Disabling console control will disable remote access to this machine from the console, but will keep the
|
|
2
2
|
registration intact and allow pushing settings from the console.`);connectionStatusIndicatorTooltip=S($localize`Hides the connection status indicator in the status bar. Useful if you are not using the remote console.`);setNewChannel(t){let e=this.updateChannel();this.updateChannel.set(t),this.#t.setUpdateChannel(t).pipe(G(()=>this.updatingChannel.set(!1))).subscribe()}allowRemoteAccess=S(!1);allowedHostnames=S("");loadedAllowedHostnames=S("");updatingRemoteAccess=S(!1);updatingAllowedHosts=S(!1);updatingConsoleControl=S(!1);consoleControlDisabled=S(!1);hideConsoleConnectionStatus=this.#t.isConsoleConnectionStatusHidden;updateRemoteAccess(){let e=!this.allowRemoteAccess();this.allowRemoteAccess.set(e),this.#t.setRemoteAccessInterface(e?"any":"loopback").pipe(G(()=>this.updatingRemoteAccess.set(!1))).subscribe()}updateAllowedHostnames(){let t=this.allowedHostnames();this.updatingAllowedHosts.set(!0),this.#t.setRemoteAccessAllowedHostnames(t).pipe(G(()=>this.updatingAllowedHosts.set(!1))).subscribe()}toggleConsoleControl(){let e=!this.consoleControlDisabled();this.updatingConsoleControl.set(!0),this.#t.setDisableConsoleControl(e).pipe(G(()=>this.updatingConsoleControl.set(!1))).subscribe()}updatingDisableTrayIconLogin=S(!1);disableTrayIconLogin=S(!1);saveDisableTrayIconLogin(){let e=!this.disableTrayIconLogin();this.updatingDisableTrayIconLogin.set(!0),this.#t.setDisableTrayIconLogin(e).pipe(G(()=>this.updatingDisableTrayIconLogin.set(!1))).subscribe()}updatingHideConsoleConnectionStatus=S(!1);saveHideConsoleConnectionStatus(){let e=!this.hideConsoleConnectionStatus();this.updatingHideConsoleConnectionStatus.set(!0),this.#t.setHideConsoleConnectionStatus(e).pipe(G(()=>this.updatingHideConsoleConnectionStatus.set(!1))).subscribe()}showPassphraseForm=S(!1);isUpdating=S(!1);passphrase=S("");repeatPassphrase=S("");passwordUpdated=S(!1);updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#t.setRemoteAccessPassword(this.passphrase()).pipe(G(()=>this.isUpdating.set(!1))).subscribe({next:()=>{this.showPassphraseForm.set(!1),this.passwordUpdated.set(!0),setTimeout(()=>{this.passwordUpdated.set(!1)},3e3)}}))}openPassphraseForm(){this.showPassphraseForm.set(!0)}cancelPasswordChange(){this.showPassphraseForm.set(!1)}languageOptions=S(Ot);powerModeOptions=v(()=>{let t=this.#i.systemInfo();return!t?.PowerModeProviders||t.PowerModeProviders.filter(e=>e!==""&&e!=="None").length==0?[]:t.PowerModeProviders.map(e=>({value:e==""?"default":e,label:e===""?$localize`Default`:e}))});usageStatisticsOptions=S($t);timeTypeOptions=S(un);timeType=S("none");timeValue=gn(0,300);timeRange=v(()=>this.timeType()==="h"?[1,24]:[1,60]);updateLocale(t){!t||t===""||t===this.previousLang||(this.#a.setItem("locale",t),window.location.reload())}updateTimeValue(t){this.timeValue.set(t),this.#_()}updateTimeType(t){this.timeType()==="none"&&this.timeValue.set(1),this.timeType.set(t),this.#_()}#o;#_(){this.#o&&clearTimeout(this.#o),this.#o=setTimeout(()=>{let t=this.timeValue(),e=this.timeType(),n=e==="none"||t===0?"":`${t}${e}`;n!==this.#t.serverSettings()?.["startup-delay"]&&this.#t.setStartupDelay(n).subscribe()},1e3)}updateUsageStatistics(t){let e=this.usageStatistics();!t||t===""||t===e||(this.usageStatistics.set(t),this.updatingUsageStatistics.set(!0),this.#t.setUsageReporterLevel(t).subscribe())}updatePowerMode(t){this.powerModeCtrl()!==t&&(t==="default"&&(t=""),this.#t.setPowerModeProvider(t).subscribe())}serverSettingsEffect=k(()=>{let t=this.#t.serverSettings();if(t===void 0)return;let e=t["startup-delay"],n=e.slice(-1),a=e.slice(0,-1),T=["s","m","h"];this.disableTrayIconLogin.set(t["disable-tray-icon-login"]!=="False"),this.updateChannel.set(t["update-channel"]),this.allowRemoteAccess.set(t["server-listen-interface"]==="any"),this.allowedHostnames.set(t["allowed-hostnames"]),this.loadedAllowedHostnames.set(t["allowed-hostnames"]),this.consoleControlDisabled.set(t["disable-console-control"]==="True"),this.usageStatistics.set(t["usage-reporter-level"]===""?"none":t["usage-reporter-level"]),this.timeType.set(e==""?"none":T.includes(n)?n:"none"),this.timeValue.set(e==""?0:parseInt(a));let f=t["power-mode-provider"]===""||t["power-mode-provider"]==null?"default":t["power-mode-provider"];this.powerModeCtrl.set(f)});setDarkMode(){this.#n.setDarkMode()}setLightMode(){this.#n.setLightMode()}changeDefaultClientTo(t){this.defaultClient()!==t&&(t==="ngax"?this.#e.open(le,{data:{title:$localize`Use legacy UI by default`,message:$localize`Are you sure you want to use the legacy user interface by default? This is not recommended unless you have a specific reason.`,confirmText:$localize`Use legacy UI by default`,cancelText:$localize`Cancel`},closed:e=>{e&&(window.location.href="/ngax",this.#r(t))}}):this.#r(t))}openLegacyUI(){this.#e.open(le,{data:{title:$localize`Open legacy UI`,message:$localize`Are you sure you want to open the legacy user interface? This is not recommended unless you have a specific reason.`,confirmText:$localize`Open legacy UI`,cancelText:$localize`Cancel`},closed:t=>{t&&window.open("/ngax","_blank")}})}#r(t){var e=new Date;e.setTime(e.getTime()+2160*60*60*1e3),document.cookie="default-client="+t+"; expires="+e.toUTCString()+"; path=/",this.defaultClient.set(t)}#c(){let t=document.cookie.split(";");for(let e=0;e<t.length;e++){let n=t[e].trim();if(n.startsWith("default-client="))return n.substring(15)}return"ngclient"}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-settings"]],decls:128,vars:44,consts:()=>{let t;t=$localize`Settings`;let e;e=$localize`Configure your backup settings.`;let n;n=$localize`Color theme`;let a;a=$localize`Customize your application theme`;let T;T=$localize`Passwords`;let f;f=$localize`Change server passphrase`;let u;u=$localize`Language`;let O;O=$localize`Select a language for the platform`;let F;F=$localize`Use legacy interface`;let re;re=$localize`Use the old user interface, not recommended unless you have a specific reason.`;let Te;Te=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:arrow-square-right${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Open legacy UI `;let z;z=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*50:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPAN:Default is legacy UI${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPAN:${"\uFFFD/*50:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*51:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPAN:Default is current UI${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPAN:${"\uFFFD/*51:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,z=J(z);let ce;ce=$localize`Allow remote access (requires restart)`;let Se;Se=$localize` By allowing remote access, the server listens to requests from any machine on your network. If you enable this option, make sure you are always using the computer on a secure firewall protected network. `;let de;de=$localize`Allow remote access`;let Ce;Ce=$localize`Prevent tray icon automatic log-in`;let ge;ge=$localize` By default, the tray icon will open the user interface with a token that unlocks the user interface. This ensures that you can access the user interface from the tray icon, while requiring others to enter a password. If you prefer having to type in the password, even when accessing the user interface from the tray icon, enable this option. `;let ue;ue=$localize`Prevent tray icon automatic log-in`;let pe;pe=$localize`Update channel`;let Ee;Ee=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let Ne;Ne=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let me;me=$localize`Stable`;let fe;fe=$localize`Official stable release.`;let Ie;Ie=$localize`Beta`;let Me;Me=$localize` Try out the new features that we are working on. Test a backup and restore before using this in production environments. `;let Pe;Pe=$localize` Experimental `;let he;he=$localize`Early previews of new features. Not for use with important data.`;let Oe;Oe=$localize`Canary`;let Re;Re=$localize`Builds for developers and testers only. Not for use with important data.`;let Fe;Fe=$localize`Pause after startup or hibernation`;let Ge;Ge=$localize` Duplicati will run when started, but will remain in paused state for the duration. Duplicati will occupy minimal system resources and no backups will be run. `;let $e;$e=$localize`Advanced options`;let Ae;Ae=$localize`Connect to console`;let ye;ye=$localize`Configure console control`;let Le;Le=$localize` You can control various settings for the remote console connection. If you are not using the console, you can also hide the connection status indicator. `;let ve;ve=$localize` Remote control disabled ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let De;De=$localize` Remote control enabled ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let be;be=$localize` Console connection status is hidden ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let we;we=$localize` Console connection status is visible ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let xe;xe=$localize`Enter new password`;let ke;ke=$localize`Repeat password`;let oe;oe=$localize`Password have to be filled and have to match`;let Je;Je=$localize`Passphrase`;let Xe;Xe=$localize`Repeat passphrase`;let Ve;Ve=$localize`Cancel`;let ze;ze=$localize` Update passphrase `;let Ue;Ue=$localize` Update passphrase `;let Be;Be=$localize`Change password`;let He;He=$localize`Allowed hostnames`;let We;We=$localize` To prevent various DNS based attacks, Duplicati limits the allowed hostnames to the ones listed here. Direct IP access and localhost is always allowed. Multiple hostnames can be supplied with a semicolon separator. If any of the allowed hostnames is an asterisk (*), all hostnames are allowed and this feature is disabled. If the field is empty, only IP address and localhost access is allowed. `;let qe;qe=$localize` Update allowed hostnames `;let Ke;Ke=$localize`Power mode provider`;let je;je=$localize` The power mode provider monitors the system for when it enters a low power state and pauses Duplicati. When the system resumes, Duplicati will resume as well. Choosing the None option disables detection of low power states and Duplicati will run all the time. `;let Qe;Qe=$localize`Installed version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ye;Ye=$localize`Usage statistics`;let U;return U=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#6\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#6\uFFFD"}:CLOSE_LINK:${"[\uFFFD#7\uFFFD\uFFFD/#7\uFFFD|\uFFFD#8\uFFFD\uFFFD/#8\uFFFD]"}:LINE_BREAK:${"[\uFFFD#7\uFFFD\uFFFD/#7\uFFFD|\uFFFD#8\uFFFD\uFFFD/#8\uFFFD]"}:LINE_BREAK: All usage reports are sent anonymously and do not contain any personal information. They contain information about hardware and operating system, the type of backend, backup duration, overall size of source data and similar data. They do not contain paths, filenames, usernames, passwords or similar sensitive information. `,U=J(U),[t,e,n,a,T,f,u,O,F,re,Te,z,ce,Se,de,Ce,ge,ue,pe,Ee,Ne,me,fe,Ie,Me,Pe,he,Oe,Re,Fe,Ge,$e,Ae,ye,Le,ve,De,be,we,Je,Xe,Ve,ze,Ue,Be,He,We,qe,Ke,je,Qe,Ye,U,[1,"content"],[1,"title"],[1,"left"],[1,"right"],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[1,"right","passphrase-form"],[1,"actions"],["value","value","label","label",3,"options","isClearable","inlineSearch"],["type","text",3,"ngModelChange","ngModel","ngModelOptions"],[1,"right","buttons"],["shButton","",1,"primary",3,"click"],[1,"right","remote-access-form"],[1,"primary","raised",3,"click"],[1,"indeterminate","primary"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"primary","raised"],[1,"field-row"],[1,"raised","primary",3,"unit"],["type","range",3,"ngModelChange","min","max","disabled","ngModel","ngModelOptions"],["label","label","value","value",3,"options","isClearable"],["type","text",3,"ngModelChange","ngModel"],[1,"advanced-settings"],[1,"right","multiple"],["suffix","",3,"shTooltip"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",xe,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",ke,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loader"],["shButton","","shTooltip",oe,1,"raised","primary",3,"loader","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",oe,1,"raised","primary",3,"click","disabled"],[1,"sh-success"],["for","allowedHostnames"],["type","text","id","allowedHostnames",3,"ngModelChange","ngModel"],["type","primary"],["value","value","label","label",3,"options","isClearable"],["href","#"],["label","label","value","value",3,"options","isLoading"]]},template:function(e,n){if(e&1&&(m(0,"app-status-bar"),s(1,"div",53)(2,"header")(3,"div",54)(4,"h2"),_(5,0),o(),s(6,"p"),_(7,1),o()()(),C(8,Qt,9,2),s(9,"section")(10,"div",55)(11,"h3"),_(12,2),o(),s(13,"p"),_(14,3),o()(),s(15,"div",56)(16,"div",57)(17,"img",58),d("click",function(){return n.setLightMode()}),o(),s(18,"img",59),d("click",function(){return n.setDarkMode()}),o()()()(),s(19,"section")(20,"div",55)(21,"h3"),_(22,4),o(),s(23,"p"),_(24,5),o()(),s(25,"div",60),C(26,nn,15,7)(27,sn,4,1,"div",61),o()(),s(28,"section")(29,"div",55)(30,"h3"),_(31,6),o(),s(32,"p"),_(33,7),o()(),s(34,"div",56)(35,"sh-select",62)(36,"input",63),d("ngModelChange",function(T){return n.updateLocale(T)}),o()()()(),s(37,"section")(38,"div",55)(39,"h3"),_(40,8),o(),s(41,"p"),_(42,9),o()(),s(43,"div",64)(44,"button",65),d("click",function(){return n.openLegacyUI()}),P(45,10),m(46,"sh-icon"),h(),o(),s(47,"button",65),d("click",function(){return n.changeDefaultClientTo(n.defaultClient()==="ngclient"?"ngax":"ngclient")}),P(48,11),m(49,"sh-icon"),C(50,an,2,0,"span")(51,ln,2,0,"span"),h(),o()()(),s(52,"section")(53,"div",55)(54,"h3"),_(55,12),o(),s(56,"p"),_(57,13),o()(),s(58,"div",66)(59,"sh-toggle",67),d("click",function(){return n.updateRemoteAccess()}),s(60,"label"),_(61,14),o()(),C(62,_n,8,3),o()(),s(63,"section")(64,"div",55)(65,"h3"),_(66,15),o(),s(67,"p"),_(68,16),o()(),s(69,"div",56)(70,"sh-toggle",67),d("click",function(){return n.saveDisableTrayIconLogin()}),s(71,"label"),_(72,17),o()()()(),C(73,rn,9,5,"section"),s(74,"section")(75,"div",55)(76,"h3"),_(77,18),o(),C(78,Tn,2,1,"p"),C(79,cn,1,0,"sh-progress-bar",68),o(),s(80,"div",69)(81,"div",70),d("click",function(){return n.setNewChannel("")}),s(82,"sh-radio",71),_(83,19),o(),s(84,"p"),_(85,20),o()(),s(86,"div",70),d("click",function(){return n.setNewChannel("stable")}),s(87,"sh-radio",71),_(88,21),o(),s(89,"p"),_(90,22),o()(),s(91,"div",70),d("click",function(){return n.setNewChannel("beta")}),s(92,"sh-radio",71),_(93,23),o(),s(94,"p"),_(95,24),o()(),s(96,"div",70),d("click",function(){return n.setNewChannel("experimental")}),s(97,"sh-radio",71),_(98,25),o(),s(99,"p"),_(100,26),o()(),s(101,"div",70),d("click",function(){return n.setNewChannel("canary")}),s(102,"sh-radio",71),_(103,27),o(),s(104,"p"),_(105,28),o()()()(),s(106,"section")(107,"div",55)(108,"h3"),_(109,29),o(),s(110,"p"),_(111,30),o()(),s(112,"div",56)(113,"div",72)(114,"sh-range-slider",73)(115,"input",74),L("ngModelChange",function(T){return y(n.timeValue,T)||(n.timeValue=T),T}),d("ngModelChange",function(T){return n.updateTimeValue(T)}),o()(),s(116,"sh-select",75)(117,"input",76),d("ngModelChange",function(T){return n.updateTimeType(T)}),o(),se(118,Sn,1,1,"ng-template"),o()()()(),C(119,Cn,13,5,"section"),o(),m(120,"sh-divider"),s(121,"div",53)(122,"section")(123,"div",77)(124,"h3"),_(125,31),o(),m(126,"app-advanced-options-settings"),o()()(),m(127,"sh-divider")),e&2){let a,T,f;l(8),g(n.isUsingRelay()?-1:8),l(9),I("active",!n.isDarkMode()),l(),I("active",n.isDarkMode()),l(8),g(n.showPassphraseForm()?26:27),l(9),N("options",n.languageOptions())("isClearable",!1)("inlineSearch",!0),l(),N("ngModel",n.langCtrl())("ngModelOptions",X(42,ie)),l(14),g(n.defaultClient()==="ngax"?50:51),l(9),I("active",n.allowRemoteAccess()),l(3),g(n.allowRemoteAccess()?62:-1),l(8),I("active",n.disableTrayIconLogin()),l(3),g(n.powerModeOptions().length>0?73:-1),l(5),g((a=n.sysinfo())!=null&&a.ServerVersion?78:-1),l(),g(n.updatingChannel()?79:-1),l(3),I("active",n.updateChannel()===""),l(),B((T=n.sysinfo())==null?null:T.DefaultUpdateChannel),H(83),l(2),B((f=n.sysinfo())==null?null:f.ServerVersionType),H(85),l(2),I("active",n.updateChannel()==="stable"),l(5),I("active",n.updateChannel()==="beta"),l(5),I("active",n.updateChannel()==="experimental"),l(5),I("active",n.updateChannel()==="canary"),l(12),N("unit",n.timeType()==="none"?"s":n.timeType()),l(),N("min",n.timeRange()[0])("max",n.timeRange()[1])("disabled",n.timeType()==="none"),A("ngModel",n.timeValue),N("ngModelOptions",X(43,ie)),l(),N("options",n.timeTypeOptions())("isClearable",!1),l(),N("ngModel",n.timeType()),l(2),g(n.usageStatisticsDisabled()?-1:119)}},dependencies:[Q,q,St,K,j,Y,ht,ne,V,w,pt,Et,ut,mt,ft,ee,b,gt,Z,Nt],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem 2rem}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem 0;background:var(--base-1);border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}section[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:2rem 0;border-top:1px solid var(--base-4)}section[_ngcontent-%COMP%]:first-of-type{border-top:0}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;align-items:flex-start}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] sh-button-group[_ngcontent-%COMP%]{margin-top:.25rem}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;width:50%}.passphrase-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:1rem}.passphrase-form[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.remote-access-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:15rem;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-8)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] sh-radio[_ngcontent-%COMP%]{color:var(--base-8);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-9)}.field-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.advanced-settings[_ngcontent-%COMP%]{grid-column:1/-1;display:grid;grid-template-columns:auto 1fr;gap:1rem}.right.buttons[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem}.right.multiple[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"],changeDetection:0})};export{gn as debounceSignal,_e as default};
|