@duplicati/ngclient 0.0.175 → 0.0.177
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-27UON6YV.js +2 -0
- package/{chunk-YDYZVJL7.js → chunk-5HQJVUNE.js} +1 -1
- package/{chunk-GYBOVOX2.js → chunk-5MXXIFJM.js} +1 -1
- package/chunk-5UXRNNTT.js +1 -0
- package/{chunk-AARZFLQF.js → chunk-6O5DBV6Y.js} +1 -1
- package/chunk-7IQ5FSGI.js +1 -0
- package/chunk-AJMSZFGR.js +1 -0
- package/{chunk-JAHB3EP2.js → chunk-EBKB4YCL.js} +1 -1
- package/chunk-F3RWB4I6.js +1 -0
- package/chunk-G4FG3YUE.js +1 -0
- package/{chunk-DLKU6DC7.js → chunk-H6UYYWCU.js} +1 -1
- package/chunk-J5LEAYPL.js +1 -0
- package/{chunk-4TZSDNPN.js → chunk-JTQDY6AH.js} +1 -1
- package/chunk-JTZ2JEV4.js +1 -0
- package/{chunk-PD4KFJ3B.js → chunk-KR56GPXG.js} +1 -1
- package/{chunk-CQHV3YBT.js → chunk-M7SLT3MF.js} +1 -1
- package/{chunk-QUNTZXIA.js → chunk-N4ADMNNU.js} +1 -1
- package/{chunk-UAHCA2OX.js → chunk-NEQW3H7F.js} +1 -1
- package/chunk-OC3JR7EH.js +2 -0
- package/{chunk-ZY7F7R4C.js → chunk-PCLJOXMF.js} +1 -1
- package/{chunk-3C2MID43.js → chunk-PJLZ7V22.js} +1 -1
- package/{chunk-MDPEVWF6.js → chunk-PNECF7JS.js} +1 -1
- package/{chunk-MSYXUT3B.js → chunk-PUOOECEB.js} +1 -1
- package/chunk-PW55LN2T.js +1 -0
- package/{chunk-MMOME6E7.js → chunk-QZJ7QZZ4.js} +1 -1
- package/{chunk-Q6TF3LRP.js → chunk-R6XDJFPE.js} +1 -1
- package/chunk-TXPM764C.js +1 -0
- package/{chunk-SNHYMIA2.js → chunk-U4T4BSPF.js} +1 -1
- package/chunk-WHLIHNEE.js +1 -0
- package/{chunk-AVM5IYXU.js → chunk-WNOXOC4X.js} +1 -1
- package/{chunk-V7UVMFDO.js → chunk-WS7QWRRY.js} +1 -1
- package/chunk-WWIKIIGV.js +7 -0
- package/chunk-WWIXPGSZ.js +1 -0
- package/chunk-XRXXVFJ4.js +1 -0
- package/{chunk-MIBJ3WCS.js → chunk-XZZDJCRM.js} +1 -1
- package/chunk-YQSTMC2K.js +1 -0
- package/index.html +1 -1
- package/locale/messages.de.json +12 -8
- package/locale/messages.en_GB.json +23 -0
- package/locale/messages.it.json +12 -8
- package/locale/messages.nl_NL.json +11 -7
- package/locale/messages.pl.json +0 -1
- package/locale/messages.pt_BR.json +1 -0
- package/locale/messages.zh-Hans.json +2 -12
- package/locale/messages.zh_CN.json +1 -4
- package/{main-GDV5KSOQ.js → main-OOXK65IC.js} +1 -1
- package/package.json +1 -1
- package/chunk-2AXRVJXN.js +0 -1
- package/chunk-4LHT2BIC.js +0 -1
- package/chunk-7Z3BXDXF.js +0 -1
- package/chunk-A5BWJRDE.js +0 -1
- package/chunk-FG47IA35.js +0 -1
- package/chunk-FNZ6QKJI.js +0 -1
- package/chunk-KK7TLGME.js +0 -2
- package/chunk-LTH24AZB.js +0 -1
- package/chunk-MFGT2RTI.js +0 -1
- package/chunk-MG6GVW3L.js +0 -7
- package/chunk-NNEWZCWG.js +0 -1
- package/chunk-NXRFZLMT.js +0 -2
- package/chunk-NZE46NN5.js +0 -1
- package/chunk-RHSRAHP5.js +0 -1
- package/chunk-TZ6RGGOS.js +0 -1
- package/chunk-WLZPN7LT.js +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as b,r as L}from"./chunk-RYXU2QDS.js";import{b as N}from"./chunk-BKANUILG.js";import{E,Mc as U,R as A,W as w,la as k,p as S}from"./chunk-XYHHESIX.js";import{a as s,b as D}from"./chunk-7CGTOI24.js";var h=class{constructor(t){this.loader=t}_data=k(void 0);_isLoading=!1;_loaded=!1;load(){return!this._loaded&&!this._isLoading&&(this._isLoading=!0,this.loader().pipe(E(()=>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 g=class e{#e=w(N);#o=new h(()=>this.getS3Config("Providers"));#n=new h(()=>this.getS3Config("Regions"));#r=new h(()=>this.getS3Config("RegionHosts"));#i=new h(()=>this.getS3Config("StorageClasses"));#s=U(()=>{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 h(()=>this.getStorjConfig("Satellites"));#l=new h(()=>this.getStorjConfig("AuthenticationMethods"));#c=new h(()=>this.getOpenstackConfig("Providers"));#p=new h(()=>this.getOpenstackConfig("Versions"));#u=new h(()=>this.getGcsConfig("Locations"));#m=new h(()=>this.getGcsConfig("StorageClasses"));getS3AllProviders(){return this.#o.load(),this.#r.load(),this.#s}getS3Providers(){return this.#o.load()}getS3Regions(){return this.#n.load()}getS3RegionHosts(){return this.#r.load()}getS3StorageClasses(){return this.#i.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(S(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(S(o=>this.#t(o)))}getOpenstackConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":t}}).pipe(S(o=>this.#t(o)))}getGcsConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":t}}).pipe(S(o=>this.#t(o)))}#t(t){return(t.Result&&typeof t.Result=="object"&&Object.entries(t.Result).map(([o,r])=>({key:o,value:r})))??[]}static \u0275fac=function(o){return new(o||e)};static \u0275prov=A({token:e,factory:e.\u0275fac,providedIn:"root"})};var i=new L,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.`},G={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=>i.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 s({destinationType:e,custom:{path:n.split("?")[0]}},l(e,t))}}},C=[{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=>i.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 s({destinationType:e,custom:{path:u.split("?")[0]}},l(e,t))}}},{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=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`The port to connect to`,formElement:e=>i.control(e??"",[b.required,b.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=>i.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:a}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:a}},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:"amazon aws spaces cloud mycloudyplace impossible scaleway hosteurope dunkel dreamhost dincloud poli systems ibm cos storadera wasabi infomaniak infomaniak \u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9 seagate lyve digitalocean backblaze b2 cloudian minio linode bunnycdn microsoft azure google storage ibm 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=>i.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>i.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(g).getS3AllProviders(),isMandatory:!0,formElement:e=>i.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>k([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).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 s({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{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=>i.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>i.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(g).getGcsLocations()},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).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 s({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=>i.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>s({destinationType:e,custom:{path:d(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:()=>k([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>i.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 s({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=>i.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)=>s({destinationType:e,custom:{path:d(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=>i.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>s({destinationType:e,custom:{path:d(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=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>i.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.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:a}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:a}},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=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>i.control(e??"")},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.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:a}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:a}},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=>i.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)=>s({destinationType:e,custom:{path:d(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=>i.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>s({destinationType:e,custom:{path:d(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=>i.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>s({destinationType:e,custom:{path:d(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=>i.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>s({destinationType:e,custom:{path:d(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:"BucketnameB2",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>i.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>i.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 s({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=>i.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=>i.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 s({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=>i.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)=>s({destinationType:e,custom:{path:d(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=>i.control(e??"",[b.email]),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>s({destinationType:e,custom:{path:d(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=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>i.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.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:a}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:a}},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 F(e.destinationType??"rclone",t,null,o,[...Object.entries(e.advanced??{}),...r])},from:(e,t,o)=>{let{advanced:r,dynamic:n}=l(e,t),{bucket:a,path:u}=m(t);return s({destinationType:e,dynamic:s({"rclone-remote-repository":a,"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=>i.control(e??""),isMandatory:!0}},dynamicFields:[{name:"openstack-authuri",shortDescription:$localize`Auth URI`,type:"Enumeration",loadOptions:e=>e.get(g).getOpenstackProviders(),isMandatory:!0},{name:"openstack-version",shortDescription:$localize`Version`,type:"Enumeration",loadOptions:e=>e.get(g).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 s({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=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>i.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.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:a}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:a}},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=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>i.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=>i.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:a}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:a}},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=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>i.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=>i.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:a}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:a}},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=>i.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 F(e.destinationType??"sia",t,null,o,r)},from:(e,t,o)=>s({destinationType:e,custom:{path:d(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=>i.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.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(s({},e),{advanced:D(s({},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"],s({destinationType:e,custom:{path:d(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=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>i.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.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:a}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:a}},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=>i.control(e??""),isMandatory:!0},share:{type:"Hostname",name:"share",shortDescription:$localize`Share Name`,longDescription:$localize`Share Name`,formElement:e=>i.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.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,V(t,r))},from:(e,t,o)=>{let{server:r,path:n}=m(t),a=n.split("/")[0],u=n.split("/").slice(1).join("/");return s({destinationType:e,custom:{server:r,share:a,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:G.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=>i.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>s({destinationType:e,custom:{path:d(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=>i.control(e??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:$localize`API Token`,longDescription:$localize`Filejump API Token`,formElement:e=>i.control(e??""),isMandatory:!0}],mapper:{to:e=>{let{path:t}=e.custom;return c(e,null,null,t)},from:(e,t,o)=>s({destinationType:e,custom:{path:d(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:"Enumeration",loadOptions:e=>e.get(g).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"],s({destinationType:e},r)}}},{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:"Enumeration",loadOptions:e=>e.get(g).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(e,t);return delete r.advanced["storj-auth-method"],s({destinationType:e},r)}}},{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=>i.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in bucket`,longDescription:$localize`Path in bucket`,formElement:e=>i.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(s({},e),{advanced:D(s({},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"],s({destinationType:e,custom:{path:d(t),bucket:n}},r)}}}],pe={".amazonaws.com":"Amazon S3",".mycloudyplace.com":"MyCloudyPlace S3",".impossibleapi.net":"Impossible Cloud S3",".scw.cloud":"Scaleway S3",".hosteurope.de":"Hosteurope S3",".dunkel.de":"Dunkel S3",".dreamhost.com":"DreamHost S3",".dincloud.com":"dinCloud S3",".polisystems.ch":"Poli Systems S3",".softlayer.net":"IBM COS (S3)",".storadera.com":"Storadera S3",".wasabisys.com":"Wasabi S3",".infomaniak.com":"Infomaniak S3",".infomaniak.cloud":"Infomaniak S3",".sakurastorage.jp":"\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9 S3",".lyvecloud.seagate.com":"Seagate Lyve S3",".digitaloceanspaces.com":"DigitalOcean S3",".backblazeb2.com":"Backblaze B2 S3",".cloudian.com":"Cloudian S3",".min.io":"MinIO S3",".linodeobjects.com":"Linode S3",".bunnycdn.com":"BunnyCDN S3",".azure.com":"Microsoft Azure S3",".googleapis.com":"Google Cloud Storage S3",".ibm.com":"IBM Cloud S3",".oracle.com":"Oracle Cloud S3",".cloudflare.com":"Cloudflare S3",".alibaba.com":"Alibaba Cloud S3",".huawei.com":"Huawei Cloud S3",".tencent.com":"Tencent Cloud S3",".baidu.com":"Baidu Cloud S3",".jd.com":"JD Cloud S3",".ucloud.cn":"UCloud S3",".qiniu.com":"Qiniu Cloud S3",".aliyuncs.com":"Aliyun S3",".tcloud.com":"TCloud S3",".tencentcloudapi.com":"Tencent Cloud S3"};var z=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 F(e.destinationType??"file",t,o,r,[...Object.entries(e.advanced),...Object.entries(e.dynamic)])}function F(e,t,o,r,n){let a=v(n),u=encodeURIComponent(x(t)),$=u==""?"":u+T(o),y=r??"",M=y.slice(1).startsWith(":\\")&&e=="file"?"file:///":`${e}://`,f=V($,j(y));return`${M}${f}${a}`}function B(e){return e==null||e===""?"":e.startsWith("/")?e.substring(1):e}function V(...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 j(e){return e.split("/").map(encodeURIComponent).join("/")}function d(e){if(e==null||e==="")return"";if(typeof e=="string")try{e=new z(e)}catch{return""}return decodeURIComponent(e.exactHostname??"")+decodeURIComponent(e.pathname=="/"?"":e.pathname??"")}function x(e){return e==null||e===""?"":e.endsWith("/")?e.substring(0,e.length-1):e}function T(e){return e==null||e===""?"":":"+e.toString()}function P(e){return C.find(o=>o.key===e||o.customKey===e)??C.find(o=>`${o.key}s`===e)??null??s({key:e,displayName:e},G)}function m(e){return{bucket:decodeURIComponent(e.exactHostname),server:decodeURIComponent(e.hostname),port:e.port,path:B(decodeURIComponent(e.pathname))}}function l(e,t){let o={},r={},n=P(e);return t.searchParams.forEach((a,u)=>{n?.dynamicFields?.some(y=>y===u||y?.name===u)?r[u]=decodeURIComponent(a):o[u]=decodeURIComponent(a)}),{advanced:o,dynamic:r}}function v(e,t=!1){let o=e.map(([n,a])=>`${n}=${a?encodeURIComponent(a.toString()):""}`).join("&");return o?(t?"":"?")+o:""}function he(e){let t=e.destinationType??"";return P(t)?.mapper.to(e)??""}function ge(e){let t=e.split("://")[0],o=e.split("://")[1],r=t==="file"?"http://dummy":o==""||o.startsWith("?")?`${t}://`:"http://"+o;if(!o)return null;if(o.startsWith("%")&&t==="file")return P(t).mapper.from(t,new z("http://localhost"),e);let n=P(t),a="";`${n.key}s`===t&&(a+=r.indexOf("?")===-1?"?":"&",a+="use-ssl=true",e=n.key+e.substring(t.length)),t==="file"&&o.indexOf("?")!==-1&&(a+=a.indexOf("?")===-1?"?":"&",a+=o.split("?")[1]??"");try{let u=new z(r+a);if(u.host==="undefined")return null;let $=o.split("?")[0].split("/")[0],y=!isNaN(Number(u.host.replaceAll(".",""))),O=$.split("."),M=O.length===4&&O.every(f=>f.length&&f.length<=3&&!isNaN(Number(f))&&parseInt(f)<=255);return y&&!M?null:n.mapper.from(n.key,u,e)}catch(u){return console.error("Error while parsing target path",e,r+a,u),null}}function I(e){return typeof e!="string"||!e.trim()?[]:e.split(`
|
|
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 ye(e){return I(e).map(([t,o])=>({Name:t,Value:o}))}function fe(e){return Object.fromEntries(I(e))}export{P as a,he as b,ge as c,ye as d,fe as e,pe as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Ue}from"./chunk-PD4KFJ3B.js";import{a as Ye}from"./chunk-GMNCWLGX.js";import{d as se}from"./chunk-B5LH4P4E.js";import{a as Xe}from"./chunk-SS7TCWY5.js";import{a as Je}from"./chunk-U63HBLGG.js";import{a as L}from"./chunk-WILUKPQ3.js";import{a as U}from"./chunk-NEV6JB5M.js";import{b as _e}from"./chunk-FBWFZMGL.js";import{B as X,H as we,L as Be,M as xe,P as Ve,V as We,W as ze,b as ve,c as G,e as k,f as w,i as Ae,j as B,l as Ge,p as x,q as V,r as W,s as ke,t as z,u as J,z as ne}from"./chunk-RYXU2QDS.js";import{b as Y}from"./chunk-BKANUILG.js";import{b as h,d as R}from"./chunk-GO4NSDR6.js";import{la as oe}from"./chunk-RMOTUTEQ.js";import{$ as N,Ab as l,Bb as c,C as j,Cc as ae,Dc as $e,E as O,Ec as De,Fb as D,Gb as v,H as Ce,Ib as q,K as Ne,L as Z,Mc as le,Pa as d,Pb as S,Qb as g,R as fe,Rb as E,Sb as Re,Tb as Pe,Vb as C,W as _,Xb as A,aa as f,cb as y,g as Ee,gc as Ie,hb as he,jc as K,la as p,lc as Le,m as me,mc as Me,na as M,oc as ee,pc as te,qc as ie,sb as b,tb as $,v as re,w as Fe,wc as ye,xc as be,yb as T,z as Oe,zb as r}from"./chunk-XYHHESIX.js";var He=new W,Ke=()=>He.group({passphrase:He.control("")}),pe=class a{#t=_(Y);#e=_(P);#n=_(R);#o=_(h);encryptionForm=this.#e.encryptionForm;creatingTemporaryBackup=p(!1);settings=p([]);next(){let i=this.#e.destinationTargetUrl();if(!i)throw new Error("No target URL");this.creatingTemporaryBackup.set(!0);let e=this.encryptionForm.value?.passphrase??null,t=[];e?t.push({Name:"--passphrase",Value:e}):t.push({Name:"--no-encryption",Value:"true"}),this.settings().forEach(o=>{let n=o.Name?.trim();n&&n!=="--"&&(n.startsWith("--")||(n=`--${n}`),t.push({Name:n,Value:o.Value??""}))}),this.#t.postApiV1Backups({requestBody:{Backup:{TargetURL:i,Settings:t}},temporary:!0}).pipe(O(()=>this.creatingTemporaryBackup.set(!1))).subscribe({next:o=>{let n=o.ID;this.#n.navigate([`/restore-draft/${n}`])},error:o=>{console.error(o)}})}back(){this.#e.isFileRestore()?this.#n.navigate(["destination"],{relativeTo:this.#o.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=y({type:a,selectors:[["app-restore-encryption"]],decls:16,vars:3,consts:()=>{let i;i=$localize`Enter backup passphrase if defined.`;let e;e=$localize`Password`;let t;t=$localize`Advanced options`;let o;o=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let n;return n=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `,[e,t,o,n,[3,"submit","formGroup"],["for","password"],["type","password","id","password","placeholder",i,"formControlName","passphrase"],["title",""],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"]]},template:function(e,t){e&1&&(r(0,"form",4),C("submit",function(){return t.next()}),r(1,"sh-form-field")(2,"label",5),E(3,0),l(),c(4,"input",6),l(),r(5,"sh-toggle-card"),D(6,7),E(7,1),v(),r(8,"app-options-list",8),ie("optionsChange",function(n){return te(t.settings,n)||(t.settings=n),n}),l()(),r(9,"div",9)(10,"button",10),C("click",function(){return t.back()}),S(11,2),c(12,"sh-icon"),g(),l(),r(13,"button",11),S(14,3),c(15,"sh-icon"),g(),l()()()),e&2&&(T("formGroup",t.encryptionForm),d(8),ee("options",t.settings),T("hasFreeTextSettings",!0))},dependencies:[z,B,G,k,w,V,x,we,J,X,We,Ue],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var et=()=>({standalone:!0});function tt(a,i){a&1&&c(0,"sh-progress-bar",8)}function it(a,i){if(a&1&&(K(0),ae(1,"bytes")),a&2){let e=A().$implicit;Le(" (",$e(1,1,e.FileSizes),") ")}}function ot(a,i){a&1&&(r(0,"span",16),E(1,4),l())}function nt(a,i){if(a&1&&(r(0,"div",15),K(1),ae(2,"date"),b(3,it,2,3),b(4,ot,2,0,"span",16),l()),a&2){let e=i.$implicit;d(),Me(" ",e.Version,": ",De(2,4,e.Time,"medium")," "),d(2),$(e.FileSizes?3:-1),d(),$(e.IsFullBackup===!1?4:-1)}}function st(a,i){a&1&&c(0,"sh-progress-bar",8)}function rt(a,i){if(a&1&&(r(0,"app-file-tree",14)(1,"label",17),E(2,5),l(),c(3,"input",18),l()),a&2){let e=A(2);T("rootPaths",e.rootPaths())("initialNodes",e.initialNodes())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)}}function at(a,i){if(a&1){let e=q();r(0,"sh-select",12),C("cleared",function(){N(e);let o=A();return f(o.abortLoading())}),r(1,"input",13),ie("ngModelChange",function(o){N(e);let n=A();return te(n.selectOption,o)||(n.selectOption=o),f(o)}),l(),he(2,nt,5,7,"ng-template"),l(),b(3,st,1,0,"sh-progress-bar",8),b(4,rt,4,5,"app-file-tree",14)}if(a&2){let e=A();T("options",e.versionOptions())("isClearable",!1),d(),ee("ngModel",e.selectOption),T("ngModelOptions",be(6,et)),d(2),$(e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),d(),$(e.showFileTree()?4:-1)}}var ue=new W,Qe=()=>ue.group({filesToRestore:ue.control(""),passphrase:ue.control(null)}),de=class a{#t=_(Y);#e=_(P);#n=_(Xe);#o=_(U);#i=_(R);#s=_(h);#l=_(oe);#a=null;#_=null;#r=p([]);selectFilesForm=this.#e.selectFilesForm;selectFilesFormSignal=this.#e.selectFilesFormSignal;selectOption=this.#e.selectOption;backupId=this.#e.backupId;versionOptionsLoading=this.#e.versionOptionsLoading;versionOptions=this.#e.versionOptions;isFileRestore=this.#e.isFileRestore;needsDatabaseRepair=le(()=>this.#e.backup()?.Backup?.IsTemporary??!0);showFileTree=p(!1);backupSettings=p(null);rootPaths=p([]);initialNodes=p([]);loadingRootPath=p(!1);isRepairing=le(()=>this.#r().length>0);loadedVersions=p({});loadingEffect=M(()=>{if(this.versionOptionsLoading())return;let e=this.versionOptions();if(e&&e?.length>0){let t=e[0].Version;this.selectOption.set(t.toString())}});backupSettingsEffect=M(()=>{let i=this.backupId(),e=this.selectOption(),t=this.isRepairing(),o=this.loadedVersions();if(!e||!i)return;let s=this.versionOptions()?.find(Q=>Q.Version===parseInt(e))?.Time??null;if(!s)return;let u=`${i}+${s}`,F=o[u];if(this.needsDatabaseRepair()&&(!F||t))return;let I={id:i+"",time:s};this.backupSettings.set(I),this.getRootPath(I)});repairEffect=M(()=>{if(!this.needsDatabaseRepair())return;let i=this.selectOption(),e=this.versionOptions();if(i){let t=e.find(s=>s.Version===parseInt(i));if(t===void 0)return;let o=this.backupId(),n=`${o}+${t.Time}`;if(this.#_===n||(this.#_=n,this.#r().includes(n)))return;this.#r.update(s=>[...s,n]),this.#t.postApiV1BackupByIdRepairupdate({id:o,requestBody:{only_paths:!0,time:t.Time}}).pipe(Z(this.abortLoading$),O(()=>{this.#_=null})).subscribe(s=>{let u=s.ID;this.#n.waitForTaskToComplete(u).pipe(j(1)).subscribe(()=>{this.#r.update(F=>F.filter(I=>I!==n)),this.loadedVersions.update(F=>(F[n]=!0,F))})})}});getRootPath(i){let e={id:i.id+"",time:i.time,prefixOnly:!0,folderContents:!1},t=i.id+"";this.isRepairing()||this.#a===t||(this.#a=t,this.loadingRootPath.set(!0),this.showFileTree.set(!1),this.#o.hasV2ListOperations()?this.#t.postApiV2BackupListFolder({requestBody:{BackupId:i.id,Time:i.time,Paths:null,PageSize:0,Page:0}}).pipe(Z(this.abortLoading$),O(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1),this.#a=null})).subscribe({next:o=>{let n=(o.Data??[]).map(s=>s.Path??"");n.length>0?(this.initialNodes.set([]),this.rootPaths.set(n)):(this.initialNodes.set([]),this.rootPaths.set(["/"]))}}):this.#t.getApiV1BackupByIdFiles(e).pipe(Z(this.abortLoading$),O(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1)})).subscribe({next:o=>{let n=o.Files.map(s=>s.Path??"");n.length>0?(this.initialNodes.set([]),this.rootPaths.set(n)):(this.initialNodes.set([]),this.rootPaths.set(["/"]))}}))}abortLoading$=new Ee;abortLoading(){this.showFileTree.set(!1),this.loadingRootPath.set(!1),this.abortLoading$.next(!0)}displayFn(){let i=this.versionOptions();return e=>{if(!e)return"";let t=i?.find(o=>typeof o.Version=="number"&&o.Version.toString()===e);return t?`${t.Version}: ${this.#l.transform(t.Time,"medium")}`:""}}next(){this.#i.navigate(["options"],{relativeTo:this.#s.parent})}back(){this.#e.isFileRestore()?this.#i.navigate(["encryption"],{relativeTo:this.#s.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=y({type:a,selectors:[["app-select-files"]],features:[ye([oe])],decls:13,vars:3,consts:()=>{let i;i=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let t;t=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let o;o=$localize`Select an option...`;let n;n=$localize`(partial)`;let s;return s=$localize`Path`,[["formRef",""],i,e,t,n,s,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["value","Version",3,"cleared","options","isClearable"],["type","text","placeholder",o,3,"ngModelChange","ngModel","ngModelOptions"],[3,"rootPaths","initialNodes","backupSettings","multiSelect","showFiles"],[1,"custom-option"],[1,"partial"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]]},template:function(e,t){if(e&1){let o=q();r(0,"form",6,0),C("submit",function(){return N(o),f(t.next())}),r(2,"h3",7),E(3,1),l(),b(4,tt,1,0,"sh-progress-bar",8)(5,at,5,7),r(6,"div",9)(7,"button",10),C("click",function(){return N(o),f(t.back())}),S(8,2),c(9,"sh-icon"),g(),l(),r(10,"button",11),S(11,3),c(12,"sh-icon"),g(),l()()()}e&2&&(T("formGroup",t.selectFilesForm),d(4),$(t.versionOptionsLoading()?4:5),d(5),Re(t.isFileRestore()?"Back":"Exit"),Pe(8))},dependencies:[ke,B,G,k,w,Ae,z,V,x,se,X,J,Ve,Be,oe,Je],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.partial[_ngcontent-%COMP%]{color:var(--base-9);font-style:italic}"],changeDetection:0})};var P=class a{#t=_(R);#e=_(h);#n=_(U);#o=_(ne);#i=_(Y);backupId=p(null);backup=p(null);destinationTargetUrl=p(null);selectFilesForm=Qe();optionsForm=Ze();encryptionForm=Ke();optionsFormSignal=_e(this.optionsForm.valueChanges);selectFilesFormSignal=_e(this.selectFilesForm.valueChanges);selectOption=p(null);versionOptionsLoading=p(!1);versionOptions=p([]);isSubmitting=p(!1);isFileRestore=p(!1);isFullWidthPage=p(!1);#s=p("");#l=p(null);#a=null;testSignal=this.#s.asReadonly();testErrorMessage=this.#l.asReadonly();#_=M(()=>{let i=this.destinationTargetUrl(),e=this.#s(),t=this.#a;this.#a=i,!(e==="testing"||t===null||t===i)&&(this.#s.set(""),this.#l.set(null))});init(i,e=!1){this.backupId.set(i),this.isFileRestore.set(e),e&&this.#t.navigate(["/restore-from-files/destination"]),e||this.getBackup()}setTestState(i,e){this.#s.set(i),this.#l.set(e??null)}updateTargetUrl(i){this.destinationTargetUrl.set(i)}submit(){this.isSubmitting.set(!0);let i=this.backupId();this.backup()?.Backup?.IsTemporary??!1?this.#i.postApiV1BackupByIdCopytotemp({id:this.backupId()??""}).subscribe({next:t=>{this.#r(t.ID??"")},error:t=>this.showErrorDialog($localize`An error occurred while copying the backup to a temporary location: ${t.message}`)}):this.#r(i??"")}showErrorDialog(i){this.#o.open(L,{data:{title:$localize`Error occured`,message:i,confirmText:$localize`OK`,cancelText:void 0},closed:e=>{}})}#r(i){let e=this.optionsForm.value,t=this.selectFilesForm.value,o=this.selectOption(),n=this.versionOptions()?.find(s=>s.Version===(o&&parseInt(o)));this.#i.postApiV1BackupByIdRestore({id:i??"",requestBody:{paths:t.filesToRestore?.split("\0").map(s=>s.endsWith("/")||s.endsWith("\\")?`${s}*`:s)??[],passphrase:t.passphrase??null,time:n?.Time,restore_path:e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!e.includeMetadata}}).pipe(O(()=>this.isSubmitting.set(!1))).subscribe({next:s=>{this.#t.navigate([`./${s.ID}`,"progress"],{relativeTo:this.#e})},error:s=>{console.error("restore error",s)}})}exit(){this.#o.open(L,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.#p(),this.#t.navigate(["/"]))}})}getVersionOptions(){this.versionOptions()}loadFilesetsWithRetryv2(i,e=2){return this.#i.postApiV2BackupListFilesets({requestBody:{BackupId:i}}).pipe(Oe(t=>{let o=t?.error?.body?.StatusCode??t?.error?.requestBody?.StatusCode;return o==="EncryptedStorageNoPassphrase"||o==="FolderMissing"||o==="EmptyRemoteFolder"||e===0?me(()=>t):Fe(1e3).pipe(Ne(()=>this.loadFilesetsWithRetryv2(i,e-1)))}))}getBackup(){let i=this.backupId();this.versionOptionsLoading.set(!0),this.#n.hasV2ListOperations()?re([this.#i.getApiV1BackupById({id:i}),this.loadFilesetsWithRetryv2(i)]).pipe(j(1),O(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([e,t])=>{if(t.Error)throw new Error(t.Error);if(!(e.Backup?.IsTemporary??!0)&&e?.Backup?.DBPathExists===!1){this.#o.open(L,{data:{title:$localize`Missing Local Database`,message:$localize`The local database for this backup is missing. Please repair or recreate the local database before restoring.`,confirmText:$localize`OK`,cancelText:void 0},closed:n=>{this.#t.navigate(["/backup",i,"database"])}});return}this.versionOptions.set((t.Data??[]).map(n=>({Version:n.Version??-1,IsFullBackup:n.IsFullBackup??void 0,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(e)},error:e=>{let t=e?.error?.body?.StatusCode??e?.error?.requestBody?.StatusCode,o=t==="EncryptedStorageNoPassphrase",n=t==="FolderMissing",s=t==="EmptyRemoteFolder",u=$localize`An error occurred while loading the backup filesets: ${e.message}`;o&&(u=$localize`The remote storage is encrypted. Please enter the passphrase to access the backup.`),n&&(u=$localize`The backup storage folder was not found.`),s&&(u=$localize`The backup storage folder does not contain any filesets.`),this.#o.open(L,{data:{title:$localize`Failed to load backup filesets`,message:u,confirmText:$localize`OK`,cancelText:void 0},closed:F=>{this.#t.navigate([o?"/restore-from-files/encryption":"/restore-from-files/destination"])}})}}):re([this.#i.getApiV1BackupById({id:i}),this.#i.getApiV1BackupByIdFilesets({id:i}).pipe(Ce(3))]).pipe(j(1),O(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([e,t])=>{this.versionOptions.set(t.map(o=>({Version:o.Version??-1,IsFullBackup:(o.IsFullBackup??1)==1,Time:o.Time??"<missing>",FileCount:o.FileCount??void 0,FileSizes:o.FileSizes??void 0}))),this.backup.set(e)}})}#p(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||a)};static \u0275prov=fe({token:a,factory:a.\u0275fac,providedIn:"root"})};var H=new W,Ze=()=>H.group({restoreFrom:H.control("original"),restoreFromPath:H.control(""),handleExisting:H.control("saveTimestamp"),permissions:H.control(!1),includeMetadata:H.control(!0)}),Se=class a{#t=_(P);#e=_(R);#n=_(h);#o=_(U);#i=_(ne);optionsForm=this.#t.optionsForm;optionsFormSignal=this.#t.optionsFormSignal;isSubmitting=this.#t.isSubmitting;goBack(){this.#e.navigate(["select-files"],{relativeTo:this.#n.parent})}submit(){let i=this.#t.selectFilesFormSignal()?.filesToRestore??[];if(i.length>0&&this.optionsFormSignal()?.restoreFrom=="original"&&(i[0].includes("/")?"/":"\\")!==this.#o.systemInfo()?.DirectorySeparator){this.#i.open(L,{data:{title:$localize`Confirm target folder`,message:$localize`This backup was created on another operating system. Restoring files without specifying a destination folder can cause files to be restored in unexpected places. Are you sure you want to continue without choosing a destination folder?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:t=>{t&&this.#t.submit()}});return}this.#t.submit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=y({type:a,selectors:[["app-advanced-options-settings"]],decls:42,vars:7,consts:()=>{let i;i=$localize`Restore options`;let e;e=$localize`Where do you want to restore files to?`;let t;t=$localize` Original location ${"\uFFFD#9\uFFFD\uFFFD/#9\uFFFD"}:TAG_INPUT:`;let o;o=$localize` Pick location ${"\uFFFD#12\uFFFD\uFFFD/#12\uFFFD"}:TAG_INPUT:`;let n;n=$localize`How do you want to handle existing files?`;let s;s=$localize` Overwrite ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let u;u=$localize` Save different versions with timestamp in file name ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let F;F=$localize`Metadata settings`;let I;I=$localize` Restore file metadata ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let Q;Q=$localize` Restore read/write permissions ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let ge;ge=$localize`${"\uFFFD#38\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let Te;return Te=$localize`${"\uFFFD#41\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#41\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `,[["formRef",""],i,e,t,o,n,s,u,F,I,Q,ge,Te,[3,"submit","formGroup"],[1,"title-30"],[3,"disallowToggle"],["title",""],[1,"raised","primary"],["type","radio","name","restoreFrom","value","original","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled","enableCreateFolder"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","includeMetadata"],["type","checkbox","formControlName","permissions"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"]]},template:function(e,t){if(e&1){let o=q();r(0,"form",13,0),C("submit",function(){return N(o),f(t.submit())}),r(2,"h3",14),E(3,1),l(),r(4,"app-toggle-card",15),D(5,16),E(6,2),v(),r(7,"sh-radio",17),S(8,3),c(9,"input",18),g(),l(),r(10,"sh-radio",17),S(11,4),c(12,"input",19),g(),l(),r(13,"app-file-tree",20)(14,"label",21),K(15,"Path"),l(),c(16,"input",22),l()(),r(17,"app-toggle-card",15),D(18,16),E(19,5),v(),r(20,"sh-radio",17),S(21,6),c(22,"input",23),g(),l(),r(23,"sh-radio",17),S(24,7),c(25,"input",24),g(),l()(),r(26,"app-toggle-card"),D(27,16),E(28,8),v(),r(29,"sh-toggle",25),S(30,9),c(31,"input",26),g(),l(),r(32,"sh-toggle",25),S(33,10),c(34,"input",27),g(),l()(),r(35,"div",28)(36,"button",29),C("click",function(){return N(o),f(t.goBack())}),S(37,11),c(38,"sh-icon"),g(),l(),r(39,"button",30),S(40,12),c(41,"sh-icon"),g(),l()()()}if(e&2){let o;T("formGroup",t.optionsForm),d(4),T("disallowToggle",!0),d(9),T("disabled",((o=t.optionsFormSignal())==null?null:o.restoreFrom)!=="pickLocation")("enableCreateFolder",!0),d(4),T("disallowToggle",!0),d(22),Ie("loader",t.isSubmitting())}},dependencies:[z,B,G,ve,Ge,k,w,V,x,Ye,se,ze,xe,X,J],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};export{Ze as a,Se as b,Ke as c,pe as d,Qe as e,de as f,P as g};
|
|
1
|
+
import{a as Ue}from"./chunk-KR56GPXG.js";import{a as Ye}from"./chunk-GMNCWLGX.js";import{d as se}from"./chunk-B5LH4P4E.js";import{a as Xe}from"./chunk-SS7TCWY5.js";import{a as Je}from"./chunk-U63HBLGG.js";import{a as L}from"./chunk-WILUKPQ3.js";import{a as U}from"./chunk-NEV6JB5M.js";import{b as _e}from"./chunk-FBWFZMGL.js";import{B as X,H as we,L as Be,M as xe,P as Ve,V as We,W as ze,b as ve,c as G,e as k,f as w,i as Ae,j as B,l as Ge,p as x,q as V,r as W,s as ke,t as z,u as J,z as ne}from"./chunk-RYXU2QDS.js";import{b as Y}from"./chunk-BKANUILG.js";import{b as h,d as R}from"./chunk-GO4NSDR6.js";import{la as oe}from"./chunk-RMOTUTEQ.js";import{$ as N,Ab as l,Bb as c,C as j,Cc as ae,Dc as $e,E as O,Ec as De,Fb as D,Gb as v,H as Ce,Ib as q,K as Ne,L as Z,Mc as le,Pa as d,Pb as S,Qb as g,R as fe,Rb as E,Sb as Re,Tb as Pe,Vb as C,W as _,Xb as A,aa as f,cb as y,g as Ee,gc as Ie,hb as he,jc as K,la as p,lc as Le,m as me,mc as Me,na as M,oc as ee,pc as te,qc as ie,sb as b,tb as $,v as re,w as Fe,wc as ye,xc as be,yb as T,z as Oe,zb as r}from"./chunk-XYHHESIX.js";var He=new W,Ke=()=>He.group({passphrase:He.control("")}),pe=class a{#t=_(Y);#e=_(P);#n=_(R);#o=_(h);encryptionForm=this.#e.encryptionForm;creatingTemporaryBackup=p(!1);settings=p([]);next(){let i=this.#e.destinationTargetUrl();if(!i)throw new Error("No target URL");this.creatingTemporaryBackup.set(!0);let e=this.encryptionForm.value?.passphrase??null,t=[];e?t.push({Name:"--passphrase",Value:e}):t.push({Name:"--no-encryption",Value:"true"}),this.settings().forEach(o=>{let n=o.Name?.trim();n&&n!=="--"&&(n.startsWith("--")||(n=`--${n}`),t.push({Name:n,Value:o.Value??""}))}),this.#t.postApiV1Backups({requestBody:{Backup:{TargetURL:i,Settings:t}},temporary:!0}).pipe(O(()=>this.creatingTemporaryBackup.set(!1))).subscribe({next:o=>{let n=o.ID;this.#n.navigate([`/restore-draft/${n}`])},error:o=>{console.error(o)}})}back(){this.#e.isFileRestore()?this.#n.navigate(["destination"],{relativeTo:this.#o.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=y({type:a,selectors:[["app-restore-encryption"]],decls:16,vars:3,consts:()=>{let i;i=$localize`Enter backup passphrase if defined.`;let e;e=$localize`Password`;let t;t=$localize`Advanced options`;let o;o=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let n;return n=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `,[e,t,o,n,[3,"submit","formGroup"],["for","password"],["type","password","id","password","placeholder",i,"formControlName","passphrase"],["title",""],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"]]},template:function(e,t){e&1&&(r(0,"form",4),C("submit",function(){return t.next()}),r(1,"sh-form-field")(2,"label",5),E(3,0),l(),c(4,"input",6),l(),r(5,"sh-toggle-card"),D(6,7),E(7,1),v(),r(8,"app-options-list",8),ie("optionsChange",function(n){return te(t.settings,n)||(t.settings=n),n}),l()(),r(9,"div",9)(10,"button",10),C("click",function(){return t.back()}),S(11,2),c(12,"sh-icon"),g(),l(),r(13,"button",11),S(14,3),c(15,"sh-icon"),g(),l()()()),e&2&&(T("formGroup",t.encryptionForm),d(8),ee("options",t.settings),T("hasFreeTextSettings",!0))},dependencies:[z,B,G,k,w,V,x,we,J,X,We,Ue],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var et=()=>({standalone:!0});function tt(a,i){a&1&&c(0,"sh-progress-bar",8)}function it(a,i){if(a&1&&(K(0),ae(1,"bytes")),a&2){let e=A().$implicit;Le(" (",$e(1,1,e.FileSizes),") ")}}function ot(a,i){a&1&&(r(0,"span",16),E(1,4),l())}function nt(a,i){if(a&1&&(r(0,"div",15),K(1),ae(2,"date"),b(3,it,2,3),b(4,ot,2,0,"span",16),l()),a&2){let e=i.$implicit;d(),Me(" ",e.Version,": ",De(2,4,e.Time,"medium")," "),d(2),$(e.FileSizes?3:-1),d(),$(e.IsFullBackup===!1?4:-1)}}function st(a,i){a&1&&c(0,"sh-progress-bar",8)}function rt(a,i){if(a&1&&(r(0,"app-file-tree",14)(1,"label",17),E(2,5),l(),c(3,"input",18),l()),a&2){let e=A(2);T("rootPaths",e.rootPaths())("initialNodes",e.initialNodes())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)}}function at(a,i){if(a&1){let e=q();r(0,"sh-select",12),C("cleared",function(){N(e);let o=A();return f(o.abortLoading())}),r(1,"input",13),ie("ngModelChange",function(o){N(e);let n=A();return te(n.selectOption,o)||(n.selectOption=o),f(o)}),l(),he(2,nt,5,7,"ng-template"),l(),b(3,st,1,0,"sh-progress-bar",8),b(4,rt,4,5,"app-file-tree",14)}if(a&2){let e=A();T("options",e.versionOptions())("isClearable",!1),d(),ee("ngModel",e.selectOption),T("ngModelOptions",be(6,et)),d(2),$(e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),d(),$(e.showFileTree()?4:-1)}}var ue=new W,Qe=()=>ue.group({filesToRestore:ue.control(""),passphrase:ue.control(null)}),de=class a{#t=_(Y);#e=_(P);#n=_(Xe);#o=_(U);#i=_(R);#s=_(h);#l=_(oe);#a=null;#_=null;#r=p([]);selectFilesForm=this.#e.selectFilesForm;selectFilesFormSignal=this.#e.selectFilesFormSignal;selectOption=this.#e.selectOption;backupId=this.#e.backupId;versionOptionsLoading=this.#e.versionOptionsLoading;versionOptions=this.#e.versionOptions;isFileRestore=this.#e.isFileRestore;needsDatabaseRepair=le(()=>this.#e.backup()?.Backup?.IsTemporary??!0);showFileTree=p(!1);backupSettings=p(null);rootPaths=p([]);initialNodes=p([]);loadingRootPath=p(!1);isRepairing=le(()=>this.#r().length>0);loadedVersions=p({});loadingEffect=M(()=>{if(this.versionOptionsLoading())return;let e=this.versionOptions();if(e&&e?.length>0){let t=e[0].Version;this.selectOption.set(t.toString())}});backupSettingsEffect=M(()=>{let i=this.backupId(),e=this.selectOption(),t=this.isRepairing(),o=this.loadedVersions();if(!e||!i)return;let s=this.versionOptions()?.find(Q=>Q.Version===parseInt(e))?.Time??null;if(!s)return;let u=`${i}+${s}`,F=o[u];if(this.needsDatabaseRepair()&&(!F||t))return;let I={id:i+"",time:s};this.backupSettings.set(I),this.getRootPath(I)});repairEffect=M(()=>{if(!this.needsDatabaseRepair())return;let i=this.selectOption(),e=this.versionOptions();if(i){let t=e.find(s=>s.Version===parseInt(i));if(t===void 0)return;let o=this.backupId(),n=`${o}+${t.Time}`;if(this.#_===n||(this.#_=n,this.#r().includes(n)))return;this.#r.update(s=>[...s,n]),this.#t.postApiV1BackupByIdRepairupdate({id:o,requestBody:{only_paths:!0,time:t.Time}}).pipe(Z(this.abortLoading$),O(()=>{this.#_=null})).subscribe(s=>{let u=s.ID;this.#n.waitForTaskToComplete(u).pipe(j(1)).subscribe(()=>{this.#r.update(F=>F.filter(I=>I!==n)),this.loadedVersions.update(F=>(F[n]=!0,F))})})}});getRootPath(i){let e={id:i.id+"",time:i.time,prefixOnly:!0,folderContents:!1},t=i.id+"";this.isRepairing()||this.#a===t||(this.#a=t,this.loadingRootPath.set(!0),this.showFileTree.set(!1),this.#o.hasV2ListOperations()?this.#t.postApiV2BackupListFolder({requestBody:{BackupId:i.id,Time:i.time,Paths:null,PageSize:0,Page:0}}).pipe(Z(this.abortLoading$),O(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1),this.#a=null})).subscribe({next:o=>{let n=(o.Data??[]).map(s=>s.Path??"");n.length>0?(this.initialNodes.set([]),this.rootPaths.set(n)):(this.initialNodes.set([]),this.rootPaths.set(["/"]))}}):this.#t.getApiV1BackupByIdFiles(e).pipe(Z(this.abortLoading$),O(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1)})).subscribe({next:o=>{let n=o.Files.map(s=>s.Path??"");n.length>0?(this.initialNodes.set([]),this.rootPaths.set(n)):(this.initialNodes.set([]),this.rootPaths.set(["/"]))}}))}abortLoading$=new Ee;abortLoading(){this.showFileTree.set(!1),this.loadingRootPath.set(!1),this.abortLoading$.next(!0)}displayFn(){let i=this.versionOptions();return e=>{if(!e)return"";let t=i?.find(o=>typeof o.Version=="number"&&o.Version.toString()===e);return t?`${t.Version}: ${this.#l.transform(t.Time,"medium")}`:""}}next(){this.#i.navigate(["options"],{relativeTo:this.#s.parent})}back(){this.#e.isFileRestore()?this.#i.navigate(["encryption"],{relativeTo:this.#s.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=y({type:a,selectors:[["app-select-files"]],features:[ye([oe])],decls:13,vars:3,consts:()=>{let i;i=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let t;t=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let o;o=$localize`Select an option...`;let n;n=$localize`(partial)`;let s;return s=$localize`Path`,[["formRef",""],i,e,t,n,s,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["value","Version",3,"cleared","options","isClearable"],["type","text","placeholder",o,3,"ngModelChange","ngModel","ngModelOptions"],[3,"rootPaths","initialNodes","backupSettings","multiSelect","showFiles"],[1,"custom-option"],[1,"partial"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]]},template:function(e,t){if(e&1){let o=q();r(0,"form",6,0),C("submit",function(){return N(o),f(t.next())}),r(2,"h3",7),E(3,1),l(),b(4,tt,1,0,"sh-progress-bar",8)(5,at,5,7),r(6,"div",9)(7,"button",10),C("click",function(){return N(o),f(t.back())}),S(8,2),c(9,"sh-icon"),g(),l(),r(10,"button",11),S(11,3),c(12,"sh-icon"),g(),l()()()}e&2&&(T("formGroup",t.selectFilesForm),d(4),$(t.versionOptionsLoading()?4:5),d(5),Re(t.isFileRestore()?"Back":"Exit"),Pe(8))},dependencies:[ke,B,G,k,w,Ae,z,V,x,se,X,J,Ve,Be,oe,Je],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.partial[_ngcontent-%COMP%]{color:var(--base-9);font-style:italic}"],changeDetection:0})};var P=class a{#t=_(R);#e=_(h);#n=_(U);#o=_(ne);#i=_(Y);backupId=p(null);backup=p(null);destinationTargetUrl=p(null);selectFilesForm=Qe();optionsForm=Ze();encryptionForm=Ke();optionsFormSignal=_e(this.optionsForm.valueChanges);selectFilesFormSignal=_e(this.selectFilesForm.valueChanges);selectOption=p(null);versionOptionsLoading=p(!1);versionOptions=p([]);isSubmitting=p(!1);isFileRestore=p(!1);isFullWidthPage=p(!1);#s=p("");#l=p(null);#a=null;testSignal=this.#s.asReadonly();testErrorMessage=this.#l.asReadonly();#_=M(()=>{let i=this.destinationTargetUrl(),e=this.#s(),t=this.#a;this.#a=i,!(e==="testing"||t===null||t===i)&&(this.#s.set(""),this.#l.set(null))});init(i,e=!1){this.backupId.set(i),this.isFileRestore.set(e),e&&this.#t.navigate(["/restore-from-files/destination"]),e||this.getBackup()}setTestState(i,e){this.#s.set(i),this.#l.set(e??null)}updateTargetUrl(i){this.destinationTargetUrl.set(i)}submit(){this.isSubmitting.set(!0);let i=this.backupId();this.backup()?.Backup?.IsTemporary??!1?this.#i.postApiV1BackupByIdCopytotemp({id:this.backupId()??""}).subscribe({next:t=>{this.#r(t.ID??"")},error:t=>this.showErrorDialog($localize`An error occurred while copying the backup to a temporary location: ${t.message}`)}):this.#r(i??"")}showErrorDialog(i){this.#o.open(L,{data:{title:$localize`Error occured`,message:i,confirmText:$localize`OK`,cancelText:void 0},closed:e=>{}})}#r(i){let e=this.optionsForm.value,t=this.selectFilesForm.value,o=this.selectOption(),n=this.versionOptions()?.find(s=>s.Version===(o&&parseInt(o)));this.#i.postApiV1BackupByIdRestore({id:i??"",requestBody:{paths:t.filesToRestore?.split("\0").map(s=>s.endsWith("/")||s.endsWith("\\")?`${s}*`:s)??[],passphrase:t.passphrase??null,time:n?.Time,restore_path:e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!e.includeMetadata}}).pipe(O(()=>this.isSubmitting.set(!1))).subscribe({next:s=>{this.#t.navigate([`./${s.ID}`,"progress"],{relativeTo:this.#e})},error:s=>{console.error("restore error",s)}})}exit(){this.#o.open(L,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.#p(),this.#t.navigate(["/"]))}})}getVersionOptions(){this.versionOptions()}loadFilesetsWithRetryv2(i,e=2){return this.#i.postApiV2BackupListFilesets({requestBody:{BackupId:i}}).pipe(Oe(t=>{let o=t?.error?.body?.StatusCode??t?.error?.requestBody?.StatusCode;return o==="EncryptedStorageNoPassphrase"||o==="FolderMissing"||o==="EmptyRemoteFolder"||e===0?me(()=>t):Fe(1e3).pipe(Ne(()=>this.loadFilesetsWithRetryv2(i,e-1)))}))}getBackup(){let i=this.backupId();this.versionOptionsLoading.set(!0),this.#n.hasV2ListOperations()?re([this.#i.getApiV1BackupById({id:i}),this.loadFilesetsWithRetryv2(i)]).pipe(j(1),O(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([e,t])=>{if(t.Error)throw new Error(t.Error);if(!(e.Backup?.IsTemporary??!0)&&e?.Backup?.DBPathExists===!1){this.#o.open(L,{data:{title:$localize`Missing Local Database`,message:$localize`The local database for this backup is missing. Please repair or recreate the local database before restoring.`,confirmText:$localize`OK`,cancelText:void 0},closed:n=>{this.#t.navigate(["/backup",i,"database"])}});return}this.versionOptions.set((t.Data??[]).map(n=>({Version:n.Version??-1,IsFullBackup:n.IsFullBackup??void 0,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(e)},error:e=>{let t=e?.error?.body?.StatusCode??e?.error?.requestBody?.StatusCode,o=t==="EncryptedStorageNoPassphrase",n=t==="FolderMissing",s=t==="EmptyRemoteFolder",u=$localize`An error occurred while loading the backup filesets: ${e.message}`;o&&(u=$localize`The remote storage is encrypted. Please enter the passphrase to access the backup.`),n&&(u=$localize`The backup storage folder was not found.`),s&&(u=$localize`The backup storage folder does not contain any filesets.`),this.#o.open(L,{data:{title:$localize`Failed to load backup filesets`,message:u,confirmText:$localize`OK`,cancelText:void 0},closed:F=>{this.#t.navigate([o?"/restore-from-files/encryption":"/restore-from-files/destination"])}})}}):re([this.#i.getApiV1BackupById({id:i}),this.#i.getApiV1BackupByIdFilesets({id:i}).pipe(Ce(3))]).pipe(j(1),O(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([e,t])=>{this.versionOptions.set(t.map(o=>({Version:o.Version??-1,IsFullBackup:(o.IsFullBackup??1)==1,Time:o.Time??"<missing>",FileCount:o.FileCount??void 0,FileSizes:o.FileSizes??void 0}))),this.backup.set(e)}})}#p(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||a)};static \u0275prov=fe({token:a,factory:a.\u0275fac,providedIn:"root"})};var H=new W,Ze=()=>H.group({restoreFrom:H.control("original"),restoreFromPath:H.control(""),handleExisting:H.control("saveTimestamp"),permissions:H.control(!1),includeMetadata:H.control(!0)}),Se=class a{#t=_(P);#e=_(R);#n=_(h);#o=_(U);#i=_(ne);optionsForm=this.#t.optionsForm;optionsFormSignal=this.#t.optionsFormSignal;isSubmitting=this.#t.isSubmitting;goBack(){this.#e.navigate(["select-files"],{relativeTo:this.#n.parent})}submit(){let i=this.#t.selectFilesFormSignal()?.filesToRestore??[];if(i.length>0&&this.optionsFormSignal()?.restoreFrom=="original"&&(i[0].includes("/")?"/":"\\")!==this.#o.systemInfo()?.DirectorySeparator){this.#i.open(L,{data:{title:$localize`Confirm target folder`,message:$localize`This backup was created on another operating system. Restoring files without specifying a destination folder can cause files to be restored in unexpected places. Are you sure you want to continue without choosing a destination folder?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:t=>{t&&this.#t.submit()}});return}this.#t.submit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=y({type:a,selectors:[["app-advanced-options-settings"]],decls:42,vars:7,consts:()=>{let i;i=$localize`Restore options`;let e;e=$localize`Where do you want to restore files to?`;let t;t=$localize` Original location ${"\uFFFD#9\uFFFD\uFFFD/#9\uFFFD"}:TAG_INPUT:`;let o;o=$localize` Pick location ${"\uFFFD#12\uFFFD\uFFFD/#12\uFFFD"}:TAG_INPUT:`;let n;n=$localize`How do you want to handle existing files?`;let s;s=$localize` Overwrite ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let u;u=$localize` Save different versions with timestamp in file name ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let F;F=$localize`Metadata settings`;let I;I=$localize` Restore file metadata ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let Q;Q=$localize` Restore read/write permissions ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let ge;ge=$localize`${"\uFFFD#38\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let Te;return Te=$localize`${"\uFFFD#41\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#41\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `,[["formRef",""],i,e,t,o,n,s,u,F,I,Q,ge,Te,[3,"submit","formGroup"],[1,"title-30"],[3,"disallowToggle"],["title",""],[1,"raised","primary"],["type","radio","name","restoreFrom","value","original","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled","enableCreateFolder"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","includeMetadata"],["type","checkbox","formControlName","permissions"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"]]},template:function(e,t){if(e&1){let o=q();r(0,"form",13,0),C("submit",function(){return N(o),f(t.submit())}),r(2,"h3",14),E(3,1),l(),r(4,"app-toggle-card",15),D(5,16),E(6,2),v(),r(7,"sh-radio",17),S(8,3),c(9,"input",18),g(),l(),r(10,"sh-radio",17),S(11,4),c(12,"input",19),g(),l(),r(13,"app-file-tree",20)(14,"label",21),K(15,"Path"),l(),c(16,"input",22),l()(),r(17,"app-toggle-card",15),D(18,16),E(19,5),v(),r(20,"sh-radio",17),S(21,6),c(22,"input",23),g(),l(),r(23,"sh-radio",17),S(24,7),c(25,"input",24),g(),l()(),r(26,"app-toggle-card"),D(27,16),E(28,8),v(),r(29,"sh-toggle",25),S(30,9),c(31,"input",26),g(),l(),r(32,"sh-toggle",25),S(33,10),c(34,"input",27),g(),l()(),r(35,"div",28)(36,"button",29),C("click",function(){return N(o),f(t.goBack())}),S(37,11),c(38,"sh-icon"),g(),l(),r(39,"button",30),S(40,12),c(41,"sh-icon"),g(),l()()()}if(e&2){let o;T("formGroup",t.optionsForm),d(4),T("disallowToggle",!0),d(9),T("disabled",((o=t.optionsFormSignal())==null?null:o.restoreFrom)!=="pickLocation")("enableCreateFolder",!0),d(4),T("disallowToggle",!0),d(22),Ie("loader",t.isSubmitting())}},dependencies:[z,B,G,ve,Ge,k,w,V,x,Ye,se,ze,xe,X,J],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};export{Ze as a,Se as b,Ke as c,pe as d,Qe as e,de as f,P as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as C}from"./chunk-
|
|
1
|
+
import{g as C}from"./chunk-5HQJVUNE.js";import"./chunk-KR56GPXG.js";import"./chunk-T5LLH46J.js";import"./chunk-27UON6YV.js";import{a as k}from"./chunk-XRXXVFJ4.js";import{j as w}from"./chunk-7IQ5FSGI.js";import"./chunk-GMNCWLGX.js";import"./chunk-B5LH4P4E.js";import"./chunk-TJYZBTTS.js";import"./chunk-6CYY2QG6.js";import"./chunk-AJXTVI3H.js";import"./chunk-LF24JF3M.js";import"./chunk-AO4ZIHUL.js";import"./chunk-SS7TCWY5.js";import"./chunk-6Q6SSTBK.js";import"./chunk-U63HBLGG.js";import"./chunk-4IUPBI2K.js";import"./chunk-AGPZBYW6.js";import"./chunk-WILUKPQ3.js";import"./chunk-NEV6JB5M.js";import"./chunk-CGKL2MHM.js";import"./chunk-QWNOPLJC.js";import"./chunk-5UXRNNTT.js";import{b as u}from"./chunk-FBWFZMGL.js";import{M as W,R as y}from"./chunk-RYXU2QDS.js";import"./chunk-BKANUILG.js";import{a as A,b as $,c as M,d as I,e as G,f as v}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{Ab as n,Bb as s,Pa as r,Pb as F,Qb as l,W as c,Xb as O,cb as D,gc as L,la as f,na as P,sb as E,tb as g,wc as N,xc as R,yb as _,yc as p,zb as o}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";var b=()=>["/restore-from-files/destination"],x=()=>["/restore-from-files/encryption"],H=()=>["/restore-from-files/select-files"],J=()=>["/restore-from-files/options"],X=t=>["/restore",t,"select-files"],z=t=>["/restore",t,"options"];function B(t,i){t&1&&(o(0,"div",7),F(1,0),s(2,"sh-radio"),l(),n(),o(3,"div",7),F(4,1),s(5,"sh-radio"),l(),n(),o(6,"div",8),F(7,2),s(8,"sh-radio"),l(),n(),o(9,"div",8),F(10,3),s(11,"sh-radio"),l(),n()),t&2&&(_("routerLink",R(4,b)),r(3),_("routerLink",R(5,x)),r(3),_("routerLink",R(6,H)),r(3),_("routerLink",R(7,J)))}function U(t,i){if(t&1&&(o(0,"div",7),F(1,4),s(2,"sh-radio"),l(),n(),o(3,"div",7),F(4,5),s(5,"sh-radio"),l(),n()),t&2){let e=O(2);_("routerLink",p(2,X,e.backupId())),r(3),_("routerLink",p(4,z,e.backupId()))}}function j(t,i){if(t&1&&(o(0,"sh-stepper",6),E(1,B,12,8)(2,U,6,6),n()),t&2){let e=O();r(),g(e.isFileRestore()?1:2)}}var h=class t{#e=c($);#i=c(I);#t=c(C);#o=u(this.#e.params);#n=u(this.#e.url);#s=u(this.#e.children[0].url);backupId=this.#t.backupId;isFileRestore=this.#t.isFileRestore;isProgressPage=f(!1);paramsChanged=P(()=>{let i=this.#s(),e=this.#o()?.id,a=!!this.#n()?.find(S=>S.path==="restore-from-files"),T=!!i?.find(S=>S.path==="progress");this.isProgressPage.set(T),this.#t.init(e,a)});ngOnInit(){this.#i.events.subscribe(i=>{if(i instanceof A){let e=i.urlAfterRedirects;this.isProgressPage.set(e.includes("progress"))}})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=D({type:t,selectors:[["app-restore-flow"]],hostVars:2,hostBindings:function(e,a){e&2&&L("full-width",a.isProgressPage())},features:[N([C,w])],decls:4,vars:1,consts:()=>{let i;i=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_RADIO: Destination `;let e;e=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_RADIO: Encryption `;let a;a=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SH_RADIO: Select files `;let T;T=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `;let S;S=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_RADIO: Select files `;let m;return m=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `,[i,e,a,T,S,m,[1,"primary"],["step","","routerLinkActive","active",3,"routerLink"],["step","","routerLinkActive","active",1,"inactive",3,"routerLink"]]},template:function(e,a){e&1&&(s(0,"app-status-bar"),E(1,j,3,1,"sh-stepper",6),o(2,"section"),s(3,"router-outlet"),n()),e&2&&(r(),g(a.isProgressPage()?-1:1))},dependencies:[y,W,k,M,G,v],styles:["[_nghost-%COMP%]{display:block}.full-width[_nghost-%COMP%] section[_ngcontent-%COMP%]{max-width:62.5rem}sh-stepper[_ngcontent-%COMP%]{max-width:31.25rem;margin:2.5rem auto}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}.inactive[_ngcontent-%COMP%]{pointer-events:none;opacity:.5}"],changeDetection:0})};export{h as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as v}from"./chunk-FBWFZMGL.js";import{b as p}from"./chunk-BKANUILG.js";import{M as S,Mc as s,R as a,W as c,la as u}from"./chunk-XYHHESIX.js";import{a as o,b as g}from"./chunk-7CGTOI24.js";var d="shown-welcome-page-v1",n="hide-console-connection-status",l=class t{#e=c(p);#r=v(this.#e.getApiV1Serversettings());#t=u(void 0);serverSettings=s(()=>this.#t()||this.#r());isConsoleConnectionStatusHidden=s(()=>{let e=this.serverSettings();return e?e[n]==="True":!1});refreshServerSettings(){this.#e.getApiV1Serversettings().subscribe({next:e=>{this.#t.set(e)}})}patchServerSettings(e){return this.#e.patchApiV1Serversettings({requestBody:e})}patchServerSetting(e,r){let i={};return i[e]=r,this.patchServerSettings(i)}setShownWelcomePage(){return this.patchServerSetting(d,"true")}setHideConsoleConnectionStatus(e){return this.patchServerSetting(n,e?"True":"False").pipe(S(()=>this.#t.set(g(o({},this.serverSettings()),{[n]:e?"True":"False"}))))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=a({token:t,factory:t.\u0275fac,providedIn:"root"})};export{l as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as q}from"./chunk-4IUPBI2K.js";import{a as H}from"./chunk-AGPZBYW6.js";import"./chunk-WILUKPQ3.js";import"./chunk-NEV6JB5M.js";import{a as Q}from"./chunk-
|
|
1
|
+
import{a as q}from"./chunk-4IUPBI2K.js";import{a as H}from"./chunk-AGPZBYW6.js";import"./chunk-WILUKPQ3.js";import"./chunk-NEV6JB5M.js";import{a as Q}from"./chunk-5UXRNNTT.js";import"./chunk-FBWFZMGL.js";import{B as X,C as z,H as K,L as j,c as B,e as U,i as G,s as W,u as V,w as J}from"./chunk-RYXU2QDS.js";import"./chunk-BKANUILG.js";import{d as A,e as I}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{$ as m,Ab as l,Bb as T,Bc as $,Ib as f,Mc as O,Pa as a,Pb as S,Qb as P,Rb as p,Rc as v,Ub as D,Vb as h,W as E,Xb as s,aa as F,cb as b,ic as x,jc as d,la as N,na as M,oc as w,pc as L,qc as k,sb as c,tb as _,yb as y,zb as r}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";var Y=(t,n,e,i,o)=>({"loading-state":t,"ready-to-add-link":n,"is-connected":e,"failed-to-connect":i,"is-registered":o});function Z(t,n){t&1&&p(0,0,1)}function ee(t,n){t&1&&p(0,0,2)}function te(t,n){if(t&1){let e=f();r(0,"button",10),h("click",function(){m(e);let o=s(2);return F(o.cancel())}),d(1,"Cancel registration"),l()}}function ne(t,n){if(t&1&&(r(0,"div",7)(1,"p"),S(2,0),c(3,Z,1,0)(4,ee,1,0),P(),l(),T(5,"sh-progress-bar",8),c(6,te,2,0,"button",9),l()),t&2){let e=s();a(3),_(e.state()==="unknown"?3:4),a(3),_((e.registeringCounter()??0)>=5&&e.state()==="registering"?6:-1)}}function ie(t,n){if(t&1){let e=f();r(0,"sh-form-field")(1,"label",11),p(2,1),l(),r(3,"input",12),k("ngModelChange",function(o){m(e);let C=s();return L(C.customRegisterUrl,o)||(C.customRegisterUrl=o),F(o)}),l()(),r(4,"div",13)(5,"button",14),d(6,"Go back"),l(),r(7,"button",15),h("click",function(){m(e);let o=s();return F(o.registerViaCustomUrl())}),p(8,2),l()()}if(t&2){let e=s();a(3),w("ngModel",e.customRegisterUrl),a(4),y("disabled",!e.customRegisterUrlValid())}}function oe(t,n){if(t&1){let e=f();r(0,"p"),p(1,3),l(),T(2,"sh-progress-bar",8),r(3,"button",10),h("click",function(){m(e);let o=s(2);return F(o.retryWhenFaulted())}),d(4,"Cancel"),l()}}function re(t,n){if(t&1){let e=f();r(0,"p"),p(1,4),l(),r(2,"button",10),h("click",function(){m(e);let o=s(2);return F(o.retryWhenFaulted())}),d(3,"Retry"),l()}}function le(t,n){if(t&1&&c(0,oe,5,0)(1,re,4,0),t&2){let e=s();_(e.claimUrl()!==null?0:1)}}function ae(t,n){t&1&&(S(0,5,1),T(1,"p"),P())}function se(t,n){t&1&&(S(0,5,2),T(1,"p"),P())}function ce(t,n){if(t&1){let e=f();r(0,"sh-alert",16),S(1,5),c(2,ae,2,0,"p")(3,se,2,0,"p"),P(),l(),r(4,"button",10),h("click",function(){m(e);let o=s();return F(o.retryWhenFaulted())}),d(5," Retry "),r(6,"sh-icon"),d(7,"arrow-arc-left"),l()()}if(t&2){let e=s();a(2),_(e.typeParam()==="link"?2:3)}}function _e(t,n){t&1&&(r(0,"h3"),d(1,"Successfully connected"),l(),r(2,"p"),d(3,"We're going to redirect you to the home page"),l())}var R=class t{#t=E(A);#i=E(H);#e=E(q);#n=E(Q);isOldOpen=N(!1);typeParam=v.required();state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;customRegisterUrl=this.#e.customRegisterUrl;additionalReportingUrl=O(()=>{let n=this.#n.serverSettings();return this.#e.state()==="inactive"?"":n&&n["additional-report-url"]||""});copiedReportingUrl=N(!1);customRegisterUrlValid=O(()=>{let n=this.customRegisterUrl(),e=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/;return!(n.length===0||!e.test(n))});registeringCounter=N(null);didTry=!1;triedFinishConnection=!1;stateEffect=M(()=>{let n=this.#e.registerUrl(),e=this.state(),i=this.typeParam(),o=this.registeringCounter();e==="inactive"&&i==="logon"&&n!==""&&(this.didTry||(this.#e.beginRemoteRegistration(),this.didTry=!0)),e==="registered"&&this.claimUrl()!==null&&(this.triedFinishConnection||(this.triedFinishConnection=!0,this.#o())),e==="registering"?(o===null&&this.registeringCounter.set(0),setTimeout(()=>{this.registeringCounter.set((o??0)+1)},1e3)):this.registeringCounter.set(null),(e==="connected"||e==="disabled"||e==="connecting")&&this.#n.setShownWelcomePage().subscribe(()=>{this.#t.navigate([""])})});ngOnInit(){this.#e.refreshRemoteControlStatus()}#o(){let n=this.#e.claimUrl();this.#i.open(`${n}?closeAfterConnection=true`,"_blank")}registerViaCustomUrl(){this.#e.beginRemoteRegistration(!0)}retryWhenFaulted(){this.#e.cancelRemoteRegistration(),this.customRegisterUrl.set(""),this.didTry=!1,this.triedFinishConnection=!1,this.typeParam()==="logon"&&this.#t.navigate(["/welcome/select"])}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let n=this.additionalReportingUrl();n&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(n))}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=b({type:t,selectors:[["app-connect"]],inputs:{typeParam:[1,"typeParam"]},decls:6,vars:13,consts:()=>{let n;n=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Loading... ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE: Connecting to console ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let e;e=$localize`Paste registration URL here`;let i;i=$localize` Connect machine to console `;let o;o=$localize`We're now connecting you to the console`;let C;C=$localize`Something failed during registration we're missing claimUrl, please try again`;let u;return u=$localize` Failed to register ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: Check if the connection link are correct, alternatively it could be your internet connection or the service might be down ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: There might be a problem with your internet connection or the service might be down, please try again later ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,u=D(u),[n,e,i,o,C,u,[1,"main-card","type-b"],[1,"loader-content"],[1,"primary","indeterminate"],["shButton",""],["shButton","",3,"click"],["for","remoteControlRegisterUrl"],["type","text","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],[1,"nav-buttons"],["type","button","shButton","","routerLink","/welcome",1,"raised"],["type","button","shButton","",1,"raised","primary",3,"click","disabled"],[1,"error"]]},template:function(e,i){if(e&1&&(r(0,"sh-card",6),c(1,ne,7,2,"div",7),c(2,ie,9,2),c(3,le,2,1),c(4,ce,8,1),c(5,_e,4,0),l()),e&2){let o=i.state()==="unknown"||i.typeParam()!=="link"&&i.state()==="inactive"||i.state()==="registering",C=i.typeParam()==="link"&&i.state()==="inactive",u=i.state()==="connected"||i.state()==="disabled"||i.state()==="connecting",g=i.state()==="registeringfaulted";x($(7,Y,o,C,u,g,i.state()==="registered")),a(),_(o?1:-1),a(),_(C?2:-1),a(),_(i.state()==="registered"?3:-1),a(),_(g?4:-1),a(),_(u?5:-1)}},dependencies:[I,W,B,U,G,K,X,j,z,J,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:100%;width:100%;flex:1 0;overflow:hidden;padding:2rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{padding:1rem}}.main-card[_ngcontent-%COMP%]{width:100%;height:100%;max-width:31.25rem;max-height:min-content;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1rem;padding:2rem}.main-card.failed-to-connect[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}.main-card.failed-to-connect[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.main-card.is-registered[_ngcontent-%COMP%], .main-card.is-connected[_ngcontent-%COMP%]{align-items:center}.loader-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;width:100%}.loader-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{--pb-b: var(--base-3);border:1px solid var(--pb-b)}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}.state[_ngcontent-%COMP%]{position:fixed;top:1rem;right:1rem;margin:0;color:var(--base-7);font-size:.75rem}.old[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative;gap:.5rem;padding:1rem;border:1px solid var(--base-4);background:var(--base-1);position:fixed;top:0;right:0;bottom:0;width:35rem;transform:translate(100%)}.old.open[_ngcontent-%COMP%]{transform:translate(0)}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:.5rem;cursor:pointer;position:absolute;background-color:var(--base-1);border:1px solid var(--base-4);border-width:.0625rem 0 .0625rem .0625rem;width:2rem;height:2.5rem;border-radius:var(--shape-2) 0 0 var(--shape-2);top:3.75rem;left:-2rem;-webkit-user-select:none;user-select:none}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.nav-buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;flex-direction:row}"],changeDetection:0})};export{R as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as St}from"./chunk-GMNCWLGX.js";import{b as Oe,c as gt,d as Et}from"./chunk-B5LH4P4E.js";import{a as pt,b as Ve,c as Ct}from"./chunk-TJYZBTTS.js";import{a as dt}from"./chunk-WILUKPQ3.js";import{a as Re}from"./chunk-NEV6JB5M.js";import{a as ct}from"./chunk-5UXRNNTT.js";import{b as le}from"./chunk-FBWFZMGL.js";import{B as ae,F as st,H as Q,L as lt,P as se,V as rt,W as Me,Y as _t,b as Fe,c as j,d as he,e as q,f as Ne,h as et,i as ie,j as fe,k as tt,n as nt,o as it,p as Pe,q as Ae,r as De,s as oe,t as ye,u as Y,w as ot,z as at}from"./chunk-RYXU2QDS.js";import{b as ut}from"./chunk-BKANUILG.js";import{b as ne,d as z}from"./chunk-GO4NSDR6.js";import{$ as g,Ab as l,Bb as T,E as $e,Fb as b,Gb as v,Ib as $,Mc as L,Pa as r,Pb as S,Qb as m,Qc as ke,R as Ce,Rb as f,Rc as Be,Sc as Te,Ub as be,Vb as h,W as y,Xb as u,aa as E,cb as H,cc as ge,dc as Ee,gc as Se,hb as qe,jc as G,kb as Ye,kc as ve,la as p,lc as Ze,na as te,oc as R,pc as O,qc as w,rb as Qe,sb as A,tb as D,ub as Ge,wb as Ue,xb as xe,xc as me,yb as F,zb as s}from"./chunk-XYHHESIX.js";import{a as J,b as X}from"./chunk-7CGTOI24.js";var we=class o{fromString(t){if(!t)return null;let e=t.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(t,e){return`${t}${e}`}static \u0275fac=function(e){return new(e||o)};static \u0275prov=Ce({token:o,factory:o.\u0275fac,providedIn:"root"})};function ce(o){if(Ye(o))return o();if(Array.isArray(o))return o.map(t=>ce(t));if(typeof o=="object"&&o!==null){let t={};for(let e in o)o.hasOwnProperty(e)&&(t[e]=ce(o[e]));return t}return o}function Nt(o,t){if(o&1){let e=$();s(0,"div",26)(1,"sh-form-field")(2,"label",27),f(3,7),l(),s(4,"input",28,0),w("ngModelChange",function(i){g(e);let a=u(2);return O(a.scheduleFields.nextTime.time,i)||(a.scheduleFields.nextTime.time=i),E(i)}),l(),s(6,"sh-icon",29),G(7,"clock"),l()(),s(8,"sh-datepicker-input",30)(9,"label",31),G(10,"\xA0"),l(),s(11,"input",32,1),w("ngModelChange",function(i){g(e);let a=u(2);return O(a.scheduleFields.nextTime.date,i)||(a.scheduleFields.nextTime.date=i),E(i)}),l(),s(13,"sh-icon",29),G(14,"calendar"),l()()(),s(15,"div",26)(16,"sh-form-field")(17,"label",33),f(18,8),l(),s(19,"input",34),w("ngModelChange",function(i){g(e);let a=u(2);return O(a.scheduleFields.runAgain.repeatValue,i)||(a.scheduleFields.runAgain.repeatValue=i),E(i)}),l()(),s(20,"sh-select",35)(21,"input",36),w("ngModelChange",function(i){g(e);let a=u(2);return O(a.scheduleFields.runAgain.repeatUnit,i)||(a.scheduleFields.runAgain.repeatUnit=i),E(i)}),l()()(),s(22,"sh-toggle-card",37),b(23,38),f(24,9),v(),s(25,"div",39)(26,"sh-toggle",24),S(27,10),s(28,"input",25),w("ngModelChange",function(i){g(e);let a=u(2);return O(a.scheduleFields.runAgain.allowedDays.mon,i)||(a.scheduleFields.runAgain.allowedDays.mon=i),E(i)}),l(),m(),l(),s(29,"sh-toggle",24),S(30,11),s(31,"input",25),w("ngModelChange",function(i){g(e);let a=u(2);return O(a.scheduleFields.runAgain.allowedDays.tue,i)||(a.scheduleFields.runAgain.allowedDays.tue=i),E(i)}),l(),m(),l(),s(32,"sh-toggle",24),S(33,12),s(34,"input",25),w("ngModelChange",function(i){g(e);let a=u(2);return O(a.scheduleFields.runAgain.allowedDays.wed,i)||(a.scheduleFields.runAgain.allowedDays.wed=i),E(i)}),l(),m(),l(),s(35,"sh-toggle",24),S(36,13),s(37,"input",25),w("ngModelChange",function(i){g(e);let a=u(2);return O(a.scheduleFields.runAgain.allowedDays.thu,i)||(a.scheduleFields.runAgain.allowedDays.thu=i),E(i)}),l(),m(),l(),s(38,"sh-toggle",24),S(39,14),s(40,"input",25),w("ngModelChange",function(i){g(e);let a=u(2);return O(a.scheduleFields.runAgain.allowedDays.fri,i)||(a.scheduleFields.runAgain.allowedDays.fri=i),E(i)}),l(),m(),l(),s(41,"sh-toggle",24),S(42,15),s(43,"input",25),w("ngModelChange",function(i){g(e);let a=u(2);return O(a.scheduleFields.runAgain.allowedDays.sat,i)||(a.scheduleFields.runAgain.allowedDays.sat=i),E(i)}),l(),m(),l(),s(44,"sh-toggle",24),S(45,16),s(46,"input",25),w("ngModelChange",function(i){g(e);let a=u(2);return O(a.scheduleFields.runAgain.allowedDays.sun,i)||(a.scheduleFields.runAgain.allowedDays.sun=i),E(i)}),l(),m(),l()()()}if(o&2){let e=u(2);r(4),R("ngModel",e.scheduleFields.nextTime.time),r(7),R("ngModel",e.scheduleFields.nextTime.date),r(8),R("ngModel",e.scheduleFields.runAgain.repeatValue),r(),F("options",e.unitOptions)("isClearable",!1),r(),R("ngModel",e.scheduleFields.runAgain.repeatUnit),r(),F("disallowToggle",!0),r(6),R("ngModel",e.scheduleFields.runAgain.allowedDays.mon),r(3),R("ngModel",e.scheduleFields.runAgain.allowedDays.tue),r(3),R("ngModel",e.scheduleFields.runAgain.allowedDays.wed),r(3),R("ngModel",e.scheduleFields.runAgain.allowedDays.thu),r(3),R("ngModel",e.scheduleFields.runAgain.allowedDays.fri),r(3),R("ngModel",e.scheduleFields.runAgain.allowedDays.sat),r(3),R("ngModel",e.scheduleFields.runAgain.allowedDays.sun)}}function ft(o,t){if(o&1){let e=$();s(0,"div",23)(1,"sh-toggle",24),S(2,5),s(3,"input",25),w("ngModelChange",function(i){g(e);let a=u();return O(a.scheduleFields.autoRun,i)||(a.scheduleFields.autoRun=i),E(i)}),l(),m(),l(),s(4,"p"),f(5,6),l()(),A(6,Nt,47,14)}if(o&2){let e=u();r(3),R("ngModel",e.scheduleFields.autoRun),r(3),D(e.scheduleFields.autoRun()?6:-1)}}var Pt=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],Ie=[{key:$localize`Daily 13:00`,value:"daily",data:{autoRun:!0,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!0,tue:!0,wed:!0,thu:!0,fri:!0,sat:!0,sun:!0}}}},{key:$localize`Weekdays 13:00`,value:"weekdays",data:{autoRun:!0,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!0,tue:!0,wed:!0,thu:!0,fri:!0,sat:!1,sun:!1}}}},{key:$localize`Weekly monday 13:00`,value:"weekly",data:{autoRun:!0,nextTime:{time:"13:00:00",date:At().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"W",allowedDays:{mon:!0,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}}},{key:$localize`Don't run automatically`,value:"disabled",data:{autoRun:!1,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!0,tue:!0,wed:!0,thu:!0,fri:!0,sat:!0,sun:!0}}}},{key:$localize`Custom`,value:"custom",data:{autoRun:!0,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!0,tue:!0,wed:!0,thu:!0,fri:!0,sat:!0,sun:!0}}}}];function mt(o){if(!o.autoRun)return null;let t=[o.runAgain.allowedDays.mon?"Monday":null,o.runAgain.allowedDays.tue?"Tuesday":null,o.runAgain.allowedDays.wed?"Wednesday":null,o.runAgain.allowedDays.thu?"Thursday":null,o.runAgain.allowedDays.fri?"Friday":null,o.runAgain.allowedDays.sat?"Saturday":null,o.runAgain.allowedDays.sun?"Sunday":null].filter(c=>c!==null),e=o.nextTime.time.split(":"),n=new Date(o.nextTime.date);n.setHours(parseInt(e[0])),n.setMinutes(parseInt(e[1]));let i=o.runAgain.repeatValue,a=o.runAgain.repeatUnit;return{Time:n.toISOString(),Repeat:`${i}${a}`,AllowedDays:t}}function At(){let o=new Date,t=o.getDay(),e=t===1?7:(8-t)%7;return o.setDate(o.getDate()+e),o.setHours(12,0,0,0),o}var Xe=()=>({autoRun:p(!0),nextTime:{time:p("13:00"),date:p(new Date().toISOString().split("T")[0])},runAgain:{repeatValue:p(1),repeatUnit:p("D"),allowedDays:{mon:p(!0),tue:p(!0),wed:p(!0),thu:p(!0),fri:p(!0),sat:p(!0),sun:p(!0)}}}),Ke=class o{#e=y(Z);#t=y(z);#i=y(ne);unitOptions=Pt;scheduleFields=this.#e.scheduleFields;scheduleType=this.#e.scheduleType;scheduleOptions=Ie;updateScheduleType(t){let e=Ie.find(n=>n.value===t);if(e&&e?.value!=="custom"){this.scheduleType.set(e.value);let n=e.data;this.scheduleFields.autoRun.set(n.autoRun??!1),this.scheduleFields.nextTime.time.set(n.nextTime?.time??"13:00"),this.scheduleFields.nextTime.date.set(n.nextTime?.date??new Date().toISOString().split("T")[0]),this.scheduleFields.runAgain.repeatValue.set(n.runAgain?.repeatValue??1),this.scheduleFields.runAgain.repeatUnit.set(n.runAgain?.repeatUnit??"D"),this.scheduleFields.runAgain.allowedDays.mon.set(n.runAgain?.allowedDays?.mon??!0),this.scheduleFields.runAgain.allowedDays.tue.set(n.runAgain?.allowedDays?.tue??!0),this.scheduleFields.runAgain.allowedDays.wed.set(n.runAgain?.allowedDays?.wed??!0),this.scheduleFields.runAgain.allowedDays.thu.set(n.runAgain?.allowedDays?.thu??!0),this.scheduleFields.runAgain.allowedDays.fri.set(n.runAgain?.allowedDays?.fri??!0),this.scheduleFields.runAgain.allowedDays.sat.set(n.runAgain?.allowedDays?.sat??!0),this.scheduleFields.runAgain.allowedDays.sun.set(n.runAgain?.allowedDays?.sun??!0)}else this.scheduleType.set("custom")}goBack(){this.#t.navigate(["source"],{relativeTo:this.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["options"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=H({type:o,selectors:[["app-schedule"]],decls:12,vars:4,consts:()=>{let t;t=$localize`Select an option...`;let e;e=$localize`Schedule`;let n;n=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let i;i=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let a;a=$localize` Automatically run backups ${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:TAG_INPUT:`;let c;c=$localize`If a date was missed, the job will run as soon as possible.`;let C;C=$localize`Next time`;let _;_=$localize`Run again every`;let d;d=$localize`Allowed days`;let I;I=$localize` Monday ${"\uFFFD#28\uFFFD\uFFFD/#28\uFFFD"}:TAG_INPUT:`;let U;U=$localize` Tuesday ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let B;B=$localize` Wednesday ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let V;V=$localize` Thursday ${"\uFFFD#37\uFFFD\uFFFD/#37\uFFFD"}:TAG_INPUT:`;let x;x=$localize` Friday ${"\uFFFD#40\uFFFD\uFFFD/#40\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Saturday ${"\uFFFD#43\uFFFD\uFFFD/#43\uFFFD"}:TAG_INPUT:`;let W;return W=$localize` Sunday ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],e,n,i,a,c,C,_,d,I,U,B,V,x,K,W,[1,"title-30"],["label","key","value","value",3,"isClearable","options"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","ngModel"],["suffix",""],[1,"primary","sharp"],["for","date"],["type","date","id","date",3,"ngModelChange","ngModel"],["for","repeatValue"],["type","number","id","repeatValue",3,"ngModelChange","ngModel"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit",3,"ngModelChange","ngModel"],[3,"disallowToggle"],["title",""],[1,"days-wrap"]]},template:function(e,n){e&1&&(s(0,"h3",17),f(1,2),l(),s(2,"sh-select",18)(3,"input",19),h("ngModelChange",function(a){return n.updateScheduleType(a)}),l()(),A(4,ft,7,2),s(5,"div",20)(6,"button",21),h("click",function(){return n.goBack()}),S(7,3),T(8,"sh-icon"),m(),l(),s(9,"button",22),h("click",function(){return n.next()}),S(10,4),T(11,"sh-icon"),m(),l()()),e&2&&(r(2),F("isClearable",!1)("options",n.scheduleOptions),r(),F("ngModel",n.scheduleType()),r(),D(n.scheduleType()==="custom"?4:-1))},dependencies:[oe,j,tt,Fe,q,ie,Q,Me,Y,ae,se,rt,st],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem;padding:2.5rem 2.5rem 1.5rem;display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function Dt(o,t){if(o&1){let e=$();s(0,"sh-select",2)(1,"input",6),w("ngModelChange",function(i){g(e);let a=u();return O(a.internalPath,i)||(a.internalPath=i),E(i)}),h("ngModelChange",function(){g(e);let i=u();return E(i.updateFilter())}),l()()}if(o&2){let e=u();F("options",e.fileGroupOptions())("isClearable",!1)("selectMultiple",!0),r(),R("ngModel",e.internalPath)}}function yt(o,t){if(o&1&&(b(0,7),G(1),v()),o&2){let e,n=u(2);r(),ve((e=n.currentExpressionOption())==null?null:e.startsWith)}}function Mt(o,t){if(o&1&&(b(0,8),G(1),v()),o&2){let e,n=u(2);r(),ve((e=n.currentExpressionOption())==null?null:e.endsWith)}}function Rt(o,t){if(o&1){let e=$();s(0,"sh-form-field",3)(1,"input",6),w("ngModelChange",function(i){g(e);let a=u();return O(a.internalPath,i)||(a.internalPath=i),E(i)}),h("ngModelChange",function(){g(e);let i=u();return E(i.updateFilter())}),l(),A(2,yt,2,1,"ng-container",7),A(3,Mt,2,1,"ng-container",8),l()}if(o&2){let e,n,i=u();r(),R("ngModel",i.internalPath),r(),D(!((e=i.currentExpressionOption())==null||e.startsWith==null)&&e.startsWith.length?2:-1),r(),D(!((n=i.currentExpressionOption())==null||n.endsWith==null)&&n.endsWith.length?3:-1)}}var Ot=[{key:"Applications",value:"Applications"},{key:"CacheFiles",value:"Cache Files"},{key:"TemporaryFiles",value:"Temporary Files"},{key:"OperatingSystem",value:"Operating System"},{key:"SystemFiles",value:"System Files"},{key:"DefaultExcludes",value:"Standard Excludes"}],wt=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Exclude file groups",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],Le=class o{path=Be.required();osType=Be();pathChange=ke();remove=ke();internalPath=p("");pathType=p("-Expression");currentExpressionOption=L(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});fileGroupOptions=p(Ot);expressionOptions=L(()=>{let e=this.osType()==="Windows"?"\\":"/";return wt.map(n=>n.value==="-Folder"||n.value==="+Folder"?X(J({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?X(J({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?X(J({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?X(J({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?X(J({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?X(J({},n),{startsWith:"*.",endsWith:""}):X(J({},n),{startsWith:"",endsWith:""}))});pathEffect=te(()=>{let t=this.path(),e=t.slice(1),n=t.startsWith("-")?"-":"+",i=this.osType()==="Windows",a=i?"\\":"/";e.startsWith("%")&&e.endsWith(a)||i&&e.slice(2).startsWith(a)&&e.endsWith(a)||e.startsWith(a)&&e.endsWith(a)?(this.pathType.set(`${n}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${a}`)?(this.pathType.set(`${n}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${a}]*]`)?(this.pathType.set(`${n}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${n}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${n}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${n}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${n}Expression`),this.internalPath.set(e))});updateFilter(){let t=this.internalPath(),e=this.currentExpressionOption();t!==""&&this.pathChange.emit(`${e?.value.slice(0,1)}${e?.startsWith??""}${t}${e?.endsWith??""}`)}removeFilter(){this.remove.emit()}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=H({type:o,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:7,vars:4,consts:()=>{let t;return t=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],["value","key","label","value",1,"expression-input",3,"options","isClearable","selectMultiple"],[1,"expression-input"],[1,"filter-removal",3,"click"],[1,"sh-primary"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""]]},template:function(e,n){if(e&1&&(s(0,"sh-select",0)(1,"input",1),w("ngModelChange",function(a){return O(n.pathType,a)||(n.pathType=a),a}),h("ngModelChange",function(){return n.updateFilter()}),l()(),A(2,Dt,2,4,"sh-select",2)(3,Rt,4,3,"sh-form-field",3),s(4,"div",4),h("click",function(){return n.removeFilter()}),s(5,"sh-icon",5),G(6,"x-circle"),l()()),e&2){let i;F("options",n.expressionOptions())("isClearable",!1),r(),R("ngModel",n.pathType),r(),D(((i=n.currentExpressionOption())==null?null:i.value)=="-FileGroup"||((i=n.currentExpressionOption())==null?null:i.value)=="+FileGroup"?2:3)}},dependencies:[oe,j,q,ie,se,Q,Y],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}.expression-input[_ngcontent-%COMP%]{--ff-suffix-bg: var(--base-2)}.filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var It=["formRef"],ze=()=>({standalone:!0});function Lt(o,t){if(o&1){let e=$();s(0,"sh-form-field",41)(1,"input",42),w("ngModelChange",function(i){g(e);let a=u(2);return O(a.editingPath,i)||(a.editingPath=i),E(i)}),l()(),s(2,"button",43),h("click",function(){g(e);let i=u(2);return E(i.updatePath())}),s(3,"sh-icon"),G(4,"floppy-disk"),l()(),s(5,"button",43),h("click",function(){g(e);let i=u(2);return E(i.cancelEditPath())}),s(6,"sh-icon"),G(7,"x-bold"),l()()}if(o&2){let e=u(2);r(),R("ngModel",e.editingPath),F("ngModelOptions",me(2,ze))}}function $t(o,t){if(o&1){let e=$();s(0,"sh-form-field",41),T(1,"input",44),l(),s(2,"button",43),h("click",function(){g(e);let i=u().$implicit,a=u();return E(a.editPath(i))}),s(3,"sh-icon"),G(4,"pen"),l()(),s(5,"button",43),h("click",function(){g(e);let i=u().$implicit,a=u();return E(a.removePath(i))}),s(6,"sh-icon"),G(7,"trash-simple"),l()()}if(o&2){let e=u().$implicit;Qe("readonly",!0),r(),F("ngModel",e)("ngModelOptions",me(3,ze))}}function Gt(o,t){if(o&1&&(s(0,"div",30),A(1,Lt,8,3)(2,$t,8,4),l()),o&2){let e=t.$implicit,n=u();r(),D(n.oldPath()===e?1:2)}}function Ut(o,t){if(o&1){let e=$();s(0,"app-new-filter",46),h("pathChange",function(i){let a=g(e).$index,c=u(2);return E(c.patchPathAt(i,a))})("remove",function(){let i=g(e).$index,a=u(2);return E(a.removePathAt(i))}),l()}if(o&2){let e=t.$implicit,n=u(2);F("path",e)("osType",n.osType()??"")}}function xt(o,t){if(o&1&&Ue(0,Ut,1,2,"app-new-filter",45,Ge),o&2){let e=u();xe(e.pathArray())}}function bt(o,t){if(o&1){let e=$();s(0,"div",31)(1,"app-size",47),h("ngModelChange",function(i){g(e);let a=u();return E(a.updateFilesLargerThan(i))}),l()()}if(o&2){let e=u();r(),F("ngModel",e.filesLargerThan())("ngModelOptions",me(2,ze))}}var k=new De,Tt=(o={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>k.group({path:k.control(o.path),excludes:k.group({hidden:k.control(o.excludes.hidden),system:k.control(o.excludes.system),temporary:k.control(o.excludes.temporary),filesLargerThan:k.group({size:k.control(null),unit:k.control(null)})})}),He=class o{#e=y(Z);#t=y(z);#i=y(ne);formRef=Te.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new et("");filesLargerThan=L(()=>{let t=this.sourceDataFormSignal()?.excludes?.filesLargerThan??{};return t.size!==null&&t.unit!==null?`${t.size}${t.unit}`:null});osType=this.#e.osType;pathSignal=le(this.sourceDataForm.controls.path.valueChanges);pathArray=L(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=L(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=p(null);editingPath=p(null);addingNewPath=p(!1);editPath(t){this.oldPath.set(t),this.editingPath.set(t)}updateFilesLargerThan(t){let{size:e,unit:n}=Oe(t);this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:e,unit:n})}updatePath(){let t=this.oldPath(),e=this.editingPath();if(!t||!e||e===t){this.oldPath.set(null),this.editingPath.set(null);return}let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(n?.replace(t,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(t){let n=(this.sourceDataForm.controls.path.value??"").split("\0"),i=n.indexOf(t);if(i===-1)return;n.splice(i,1);let a=n.filter(c=>c&&c!=="").join("\0");this.sourceDataForm.controls.path.setValue(a)}addFilter(t="-*"){let n=[this.sourceDataForm.controls.path.value,t].filter(i=>i&&i!=="").join("\0");this.sourceDataForm.controls.path.setValue(n)}patchPathAt(t,e){let i=this.sourceDataForm.controls.path.value.split("\0").filter(C=>!C.startsWith("-")&&!C.startsWith("+")).join("\0"),a=this.pathArray().map((C,_)=>_===e?`${t}`:`${C}`).join("\0"),c=[i,a].filter(C=>C&&C!=="").join("\0");this.sourceDataForm.controls.path.setValue(c)}removePathAt(t){let n=this.sourceDataForm.controls.path.value.split("\0").filter(c=>!c.startsWith("-")&&!c.startsWith("+")).join("\0"),i=this.pathArray().filter((c,C)=>C!==t).join("\0"),a=[n,i].filter(c=>c&&c!=="").join("\0");this.sourceDataForm.controls.path.setValue(a)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let t=this.sourceDataForm.controls.path.value,e=this.newPathCtrl.value,n=t?.split("\0")||[];e&&!n.includes(e)&&n.push(e);let i=n.filter(a=>a&&a!=="").join("\0");this.sourceDataForm.controls.path.setValue(i),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["schedule"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=H({type:o,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&ge(n.formRef,It,5),e&2&&Ee()},decls:56,vars:12,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Add a direct path`;let n;n=$localize`Hidden files`;let i;i=$localize`System files`;let a;a=$localize`Temporary files`;let c;c=$localize`Source Data`;let C;C=$localize`Folder path`;let _;_=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let d;d=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let I;I=$localize`Paths`;let U;U=$localize`Add a path directly from your machine.`;let B;B=$localize`Filters`;let V;V=$localize`Customize your filters.`;let x;x=$localize`Add filter`;let K;K=$localize`Exclude`;let W;W=$localize`Choose if there’s any files you want to exclude.`;let N;N=$localize` Files with the Hidden attribute ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let re;re=$localize` Files with the System attribute ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let _e;_e=$localize` Files with the Temporary attribute ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let ue;ue=$localize` Files larger than `;let P;return P=$localize`Edit path`,[["formRef",""],c,C,_,d,I,U,B,V,x,K,W,N,re,_e,ue,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,"formControlName","path"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"paths"],[1,"path"],[1,"row-inputs"],["type","text","placeholder",e,3,"formControl"],["shButton","","type","button",1,"raised","primary",3,"click"],["type","button","shButton","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",n,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",a,"formControlName","temporary"],[1,"raised","primary",3,"click"],[1,"small"],["type","text","placeholder",P,3,"ngModelChange","ngModel","ngModelOptions"],["shButton","","type","button",1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],[3,"ngModelChange","ngModel","ngModelOptions"]]},template:function(e,n){if(e&1){let i=$();s(0,"form",16,0),h("submit",function(){return g(i),E(n.next())}),s(2,"div",17)(3,"h3",18),f(4,1),l(),s(5,"app-file-tree",19)(6,"label",20),f(7,2),l(),T(8,"input",21),l(),s(9,"div",22)(10,"button",23),h("click",function(){return g(i),E(n.goBack())}),S(11,3),T(12,"sh-icon"),m(),l(),s(13,"button",24),S(14,4),T(15,"sh-icon"),m(),l()()(),s(16,"div",25)(17,"app-toggle-card",26),b(18,27),f(19,5),v(),s(20,"p",28),f(21,6),l(),s(22,"div",29),Ue(23,Gt,3,1,"div",30,Ge),s(25,"div",31)(26,"sh-form-field"),T(27,"input",32),l(),s(28,"button",33),h("click",function(){return g(i),E(n.addNewPath())}),s(29,"sh-icon"),G(30,"plus"),l()()()()(),s(31,"app-toggle-card",26),b(32,27),f(33,7),v(),s(34,"p",28),f(35,8),l(),s(36,"button",34),h("click",function(){return g(i),E(n.addFilter())}),f(37,9),l(),A(38,xt,2,0),l(),s(39,"app-toggle-card",35),b(40,27),f(41,10),v(),s(42,"p",28),f(43,11),l(),s(44,"sh-toggle",36),S(45,12),T(46,"input",37),m(),l(),s(47,"sh-toggle",36),S(48,13),T(49,"input",38),m(),l(),s(50,"sh-toggle",36),S(51,14),T(52,"input",39),m(),l(),s(53,"sh-toggle",40),h("click",function(){return g(i),E(n.toggleFilesLargerThan())}),f(54,15),l(),A(55,bt,2,3,"div",31),l()()()}if(e&2){let i;F("formGroup",n.sourceDataForm),r(5),F("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0),r(12),F("disallowToggle",!0),r(6),xe(n.nonFilterPaths()),r(4),F("formControl",n.newPathCtrl),r(4),F("disallowToggle",!0),r(7),D((i=n.pathSignal())!=null&&i.length?38:-1),r(),F("disallowToggle",!0),r(14),Se("active",n.filesLargerThan()),r(2),D(n.filesLargerThan()?55:-1)}},dependencies:[oe,fe,j,Fe,q,Ne,ie,ye,nt,Ae,Pe,it,Q,Y,ae,Me,Le,Et,St,gt],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-4)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}sh-divider[_ngcontent-%COMP%]{margin:.75rem 0}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.25rem}.paths[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;overflow:auto}.path[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr min-content min-content;gap:.25rem}"],changeDetection:0})};var Ft="1W:1D,4W:1W,12M:1M",Z=class o{#e=y(z);#t=y(Re);#i=y(at);#n=y(ut);#r=y(ct);#a=y(we);generalForm=ht();sourceDataForm=Tt();scheduleFields=Xe();scheduleType=p("daily");settings=p([]);optionsFields={remoteVolumeSize:p("50MB"),backupRetention:p("all"),backupRetentionTime:p(""),backupRetentionVersions:p(0),backupRetentionCustom:p("")};targetUrlModel=p(null);backupMetadata=p(null);isDraft=p(!1);backupId=p(null);backupName=L(()=>this.generalFormSignal()?.name??"");isSubmitting=p(!1);finishedLoading=p(!1);backupDefaults=p(null);applicationOptions=p(null);isNew=L(()=>this.backupId()==="new");osType=L(()=>this.#t.systemInfo()?.OSType);selectedOptions=p([]);sourceDataFormSignal=le(this.sourceDataForm.valueChanges);generalFormSignal=le(this.generalForm.valueChanges);encryptionFieldSignal=le(this.generalForm.controls.encryption.valueChanges);advancedOptions=L(()=>this.#t.systemInfo()?.Options?.map(this.#u)??[]);#o=p("");#s=p(null);#l=null;testSignal=this.#o.asReadonly();testErrorMessage=this.#s.asReadonly();#p=te(()=>{let t=this.targetUrlModel(),e=this.#o(),n=this.#l;this.#l=t,!(e==="testing"||n===null||n===t)&&(this.#o.set(""),this.#s.set(null))});setTestState(t,e){this.#o.set(t),this.#s.set(e??null)}#u(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=L(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[pe,...t]});nonSelectedOptions=L(()=>this.advancedOptions().sort((t,e)=>t?.name&&e?.name?t?.name.localeCompare(e?.name):0).filter(t=>this.selectedOptions()?.findIndex(e=>e.name===t.name)===-1));submit(t=!1){this.isSubmitting.set(!0);let e=this.#d(),n=this.backupId();this.isDraft()&&e.Backup&&(e.Backup.Metadata=this.backupMetadata()),n==="new"||!n||this.isDraft()?this.#n.postApiV1Backups({requestBody:e}).pipe($e(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{t||this.exit(!1)},error:()=>{}}):this.#n.putApiV1BackupById({id:n,requestBody:e}).pipe($e(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{t||this.exit(!1)},error:()=>{}})}exit(t){if(!t){this.#_(),this.#e.navigate(["/"]);return}this.#i.open(dt,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#_(),this.#e.navigate(["/"]))}})}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(C=>`${C.Include?"":"-"}${C.Expression}`)??[],i=t.Settings?.find(C=>C.Name==="--exclude-files-attributes")?.Value?.toLowerCase()?.split(",")??[],a=t.Settings?.find(C=>C.Name==="--skip-files-larger-than")?.Value?.toUpperCase()??null,c={path:[...e,...n].join("\0"),excludes:{hidden:i.includes("hidden"),system:i.includes("system"),temporary:i.includes("temporary"),filesLargerThan:a===null?void 0:Oe(a)}};this.sourceDataForm.patchValue(c)}mapDestinationToForm(t){this.targetUrlModel.set(t.TargetURL??"")}mapGeneralToForm(t){let e=t.Name??"",n=t.Description??"",i=t.Settings?.find(d=>d.Name==="encryption-module"),a=t.Settings?.find(d=>d.Name==="passphrase")?.Value??"",c=i?.Value&&i.Value.length?i.Value:"",C=t.Settings?.find(d=>d.Name==="compression-module")?.Value??"",_={name:t.Name??"",description:t.Description??""};e&&e!==""&&(_.name=e),n&&n!==""&&(_.description=n),c&&c!==""&&(_.encryption=c),a&&a!==""&&(_.password=a,_.repeatPassword=a),C&&C!==""&&(_.compression=C),this.generalForm.patchValue(_)}mapScheduleToForm(t){if(!t){this.scheduleType.set("disabled"),this.scheduleFields.autoRun.set(!1);return}let e=this.#a.fromString(t.Repeat)??null,n=this.#c(t.Time);this.scheduleFields.autoRun.set(!0),n.date&&this.scheduleFields.nextTime.date.set(n.date),this.scheduleFields.nextTime.time.set(n.time),this.scheduleFields.runAgain.repeatUnit.set(e?.unit??"D"),this.scheduleFields.runAgain.repeatValue.set(e?.value??1),this.scheduleFields.runAgain.allowedDays.mon.set(t.AllowedDays?.includes("mon")??!1),this.scheduleFields.runAgain.allowedDays.tue.set(t.AllowedDays?.includes("tue")??!1),this.scheduleFields.runAgain.allowedDays.wed.set(t.AllowedDays?.includes("wed")??!1),this.scheduleFields.runAgain.allowedDays.thu.set(t.AllowedDays?.includes("thu")??!1),this.scheduleFields.runAgain.allowedDays.fri.set(t.AllowedDays?.includes("fri")??!1),this.scheduleFields.runAgain.allowedDays.sat.set(t.AllowedDays?.includes("sat")??!1),this.scheduleFields.runAgain.allowedDays.sun.set(t.AllowedDays?.includes("sun")??!1);let i=ce(this.scheduleFields),a=Ie.find(c=>JSON.stringify(c.data)===JSON.stringify(i));a?this.scheduleType.set(a.value):this.scheduleType.set("custom")}mapOptionsToForms(t,e=!1){let n=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],i=(t.Settings??[]).map(_=>_);if(e){let _=this.#r.serverSettings()??{};Object.keys(_).filter(d=>d.startsWith("--")).forEach(d=>{i.find(U=>U.Name===d)||i.push({Name:d,Value:_[d],Filter:null})})}let a=i.filter(_=>!n.includes(_.Name)),c=i.filter(_=>n.includes(_.Name));this.settings.set(a??[]),a?.forEach(_=>{if(_.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(_.Value??"")});var C="all";c?.forEach(_=>{if(_.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(_.Value??"50MB"),_.Name==="keep-time"&&(_.Value??"")!=="")return C="time",this.optionsFields.backupRetentionTime.set(_.Value??"");if(_.Name==="keep-versions"&&(_.Value??"")!=="")return C="versions",this.optionsFields.backupRetentionVersions.set(_.Value?parseInt(_.Value):null);if(_.Name==="retention-policy"&&(_.Value??"")!=="")if(_.Value===Ft)C="smart";else return C="custom",this.optionsFields.backupRetentionCustom.set(_.Value??"")}),this.optionsFields.backupRetention.set(C)}storeMetadata(t,e){this.backupMetadata.set(e?t.Metadata??null:null)}getScheduleFormValue(){let t=ce(this.scheduleFields);return mt(t)}#d(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,i=this.targetUrlModel(),a=n.path?.split("\0")??[],c=this.mapFormsToSettings(),C=Object.entries(n.excludes??{}).filter(([d,I])=>I&&d!=="filesLargerThan").map(([d])=>d),_=n.excludes?.filesLargerThan;return C.length&&c.push({Name:"--exclude-files-attributes",Value:C.join(",")}),_&&_.size!==null&&_.unit!==null&&c.push({Name:"--skip-files-larger-than",Value:`${_.size}${_.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:i??null,Sources:a.filter(d=>!(d.startsWith("-")||d.startsWith("+"))),Settings:c,Filters:a.filter(d=>d.startsWith("-")||d.startsWith("+")).map((d,I)=>({Order:I,Include:d.startsWith("+"),Expression:d.slice(1)}))},Schedule:e}}mapFormsToSettings(t=[]){let e=this.generalForm.value,n=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy","dblock-size","compression-module"],i=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&e.encryption!==pe.Key&&(i=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let a=[{Name:"compression-module",Value:e.compression}];e.compression===""&&(a=[]);let c=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":c.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":c.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":c.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":c.push({Name:"retention-policy",Value:Ft});break}let C=[...t,...n],_=this.settings().filter(d=>!C.includes(d.Name)).map(d=>{let I=d.Value;return typeof d.Value=="number"&&(I=d.Value.toString()),typeof d.Value=="boolean"&&(I=d.Value?"True":"False"),{Name:d.Name?.startsWith("--")?d.Name:`--${d.Name}`,Value:I}});return[...i,...a,...c,..._]}#c(t){if(!t||t?.indexOf("T")===-1)return{time:t??"13:00"};let e=new Date(t);return{time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`,date:e.toISOString().split("T")[0]}}setTargetUrl(t,e=!1){e&&(this.#l=null),this.targetUrlModel.set(t)}#_(){this.generalForm.reset(),this.sourceDataForm.reset(),this.scheduleFields=Xe(),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([]),this.targetUrlModel.set(null)}static \u0275fac=function(e){return new(e||o)};static \u0275prov=Ce({token:o,factory:o.\u0275fac,providedIn:"root"})};var vt=["formRef"];function kt(o,t){o&1&&(s(0,"sh-alert",17),S(1,5),T(2,"sh-icon",26),m(),l())}function Bt(o,t){if(o&1&&G(0),o&2){let e=t.$implicit;Ze(" ",e.DisplayName," ")}}function Vt(o,t){if(o&1&&T(0,"sh-progress-bar",40),o&2){let e=u(3);Se("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),F("value",e.calculatePasswordStrength()*(100/5))}}function Kt(o,t){o&1&&(s(0,"span",35),f(1,10),l())}function Wt(o,t){o&1&&(S(0,8,1),T(1,"sh-icon"),m())}function Jt(o,t){o&1&&(S(0,8,2),T(1,"sh-icon"),m())}function Xt(o,t){o&1&&(S(0,11,1),T(1,"sh-icon",42),m())}function Ht(o,t){o&1&&(S(0,11,2),T(1,"sh-icon"),m())}function zt(o,t){if(o&1){let e=$();s(0,"button",41),h("click",function(){g(e);let i=u(3);return E(i.copyPassword())}),S(1,11),A(2,Xt,2,0)(3,Ht,2,0),m(),l()}if(o&2){let e=u(3);r(2),D(e.copiedPassword()?2:3)}}function jt(o,t){o&1&&(s(0,"sh-alert",39),f(1,12),l())}function qt(o,t){if(o&1){let e=$();s(0,"div",30)(1,"sh-form-field")(2,"label",31),S(3,7),T(4,"sup"),m(),l(),T(5,"input",32),l(),A(6,Vt,1,9,"sh-progress-bar",33),s(7,"sh-form-field"),T(8,"input",34),A(9,Kt,2,0,"span",35),l(),s(10,"div",36)(11,"button",37),h("click",function(){g(e);let i=u(2);return E(i.showPassword.set(!i.showPassword()))}),S(12,8),A(13,Wt,2,0)(14,Jt,2,0),m(),l(),s(15,"button",37),h("click",function(){g(e);let i=u(2);return E(i.generatePassword())}),S(16,9),T(17,"sh-icon"),m(),l(),A(18,zt,4,1,"button",38),l(),A(19,jt,2,0,"sh-alert",39),l()}if(o&2){let e=u(2);r(5),F("type",e.showPassword()?"text":"password"),r(),D(e.generalForm.value.password?6:-1),r(2),F("type",e.showPassword()?"text":"password"),r(),D(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),r(4),D(e.showPassword()?13:14),r(5),D(e.showCopyPassword()?18:-1),r(),D(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function Yt(o,t){if(o&1&&(s(0,"sh-select",27)(1,"label",28),f(2,6),l(),T(3,"input",29),qe(4,Bt,1,1,"ng-template"),l(),A(5,qt,20,7,"div",30)),o&2){let e=u();F("options",e.encryptionOptions())("isClearable",!1),r(5),D(e.encryptionFieldSignal()!==e.noneOptionKey?5:-1)}}function Qt(o,t){if(o&1&&(s(0,"button",24),S(1,13),T(2,"sh-icon"),m(),l()),o&2){let e=u();F("disabled",e.nameAndDescriptionValid()===!1)}}function Zt(o,t){if(o&1&&(s(0,"button",25),S(1,14),T(2,"sh-icon"),m(),l()),o&2){let e=u();F("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var ee=new De,ht=(o={name:"",description:"",encryption:"",password:"",repeatPassword:"",compression:""})=>ee.group({name:ee.control(o.name,[he.required]),description:ee.control(o.description),encryption:ee.control(o.encryption,[Ct()]),password:ee.control(o.password,[Ve(t=>t?.value.encryption!=="",[he.required])]),repeatPassword:ee.control(o.repeatPassword,[Ve(t=>t?.value.encryption!=="",[he.required])]),compression:ee.control(o.compression)}),pe={Key:"-",DisplayName:"None"},je=class o{#e=y(z);#t=y(ne);#i=y(pt);#n=y(Z);#r=y(Re);formRef=Te.required("formRef");generalForm=this.#n.generalForm;generalFormSignal=this.#n.generalFormSignal;encryptionFieldSignal=this.#n.encryptionFieldSignal;encryptionOptions=this.#n.encryptionOptions;isNew=this.#n.isNew;showPassword=p(!1);copiedPassword=p(!1);showCopyPassword=p(!1);noneOptionKey=pe.Key;encryptionEffect=te(()=>{this.encryptionFieldSignal()===pe.Key&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=L(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=L(()=>{let e=this.generalFormSignal()?.password??"";return this.#i.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#n.exit(!0)}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#a(t??""),this.copiedPassword.set(!0)}async#a(t){try{await navigator.clipboard.writeText(t)}catch{try{let n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let t=this.#i.generate(16);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#n.isNew()||this.#n.submit(!0),this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=H({type:o,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&ge(n.formRef,vt,5),e&2&&Ee()},decls:21,vars:4,consts:()=>{let t;t=$localize`Your backup name`;let e;e=$localize`Your backup description`;let n;n=$localize`Remember to copy the password`;let i;i=$localize`General backup settings`;let a;a=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let c;c=$localize`Backup description`;let C;C=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Exit `;let _;_=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Encrypted backup `;let d;d=$localize`Encryption`;let I;I=$localize`Encryption`;let U;U=$localize`Password`;let B;B=$localize`Repeat password`;let V;V=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let x;x=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,x=be(x);let K;K=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let W;W=$localize`Passwords do not match`;let N;N=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,N=be(N);let re;re=$localize` Tip: Be sure to save your password. If you lose it, you will lose access to your backups. `;let _e;_e=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ue;return ue=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],i,a,c,C,_,I,V,x,K,W,N,re,_e,ue,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],[1,"primary"],["for","backupName"],["type","text","tabindex","1","placeholder",t,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","shButton","",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],["shButton","","type","submit","shTooltip",n,1,"raised","primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",d,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",U,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",B,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,n){if(e&1){let i=$();s(0,"form",15,0),h("submit",function(){return g(i),E(n.next())}),s(2,"h3",16),f(3,1),l(),A(4,kt,3,0,"sh-alert",17),s(5,"sh-form-field")(6,"label",18),S(7,2),T(8,"sup"),m(),l(),T(9,"input",19),l(),s(10,"sh-form-field")(11,"label",20),f(12,3),l(),T(13,"textarea",21),l(),A(14,Yt,6,3),s(15,"div",22)(16,"button",23),h("click",function(){return g(i),E(n.exit())}),S(17,4),T(18,"sh-icon"),m(),l(),A(19,Qt,3,1,"button",24)(20,Zt,3,1,"button",25),l()()}if(e&2){let i;F("formGroup",n.generalForm),r(4),D(!n.isNew()&&((i=n.generalFormSignal())==null?null:i.encryption)!==""?4:-1),r(10),D(n.isNew()?14:-1),r(5),D(n.encryptionFieldSignal()===n.noneOptionKey||!n.isNew()?19:20)}},dependencies:[ye,fe,j,q,Ne,Ae,Pe,Q,se,ae,Y,lt,ot,_t],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-8)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}"],changeDetection:0})};export{ht as a,pe as b,je as c,Ie as d,mt as e,Xe as f,Ke as g,Tt as h,He as i,Z as j};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Xe}from"./chunk-XRXXVFJ4.js";import{a as ee}from"./chunk-D7TCA6E7.js";import"./chunk-6CYY2QG6.js";import"./chunk-AJXTVI3H.js";import"./chunk-LF24JF3M.js";import{a as Ke}from"./chunk-AO4ZIHUL.js";import"./chunk-SS7TCWY5.js";import"./chunk-6Q6SSTBK.js";import{a as Z}from"./chunk-U63HBLGG.js";import"./chunk-4IUPBI2K.js";import"./chunk-AGPZBYW6.js";import"./chunk-WILUKPQ3.js";import"./chunk-NEV6JB5M.js";import"./chunk-CGKL2MHM.js";import"./chunk-QWNOPLJC.js";import"./chunk-5UXRNNTT.js";import{b as Je,c as ce}from"./chunk-FBWFZMGL.js";import{B as se,E as Be,G as be,L as Fe,U as ke,V as Ue,u as H}from"./chunk-RYXU2QDS.js";import{b as de}from"./chunk-BKANUILG.js";import{b as ye,e as xe}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import{la as V,oa as re}from"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{$ as D,Ab as i,Bb as s,Cc as u,Dc as L,Ec as S,Fb as G,Fc as h,Gb as P,Ib as U,Mc as ve,Pa as a,Pb as N,Qb as m,Rb as l,Rc as le,Sb as d,Tb as c,Ub as R,Vb as I,W as x,Xb as C,aa as M,cb as X,gc as $,jc as E,kc as K,la as A,lc as f,mc as Ie,nc as $e,p as J,rc as fe,sb as g,sc as he,tb as T,tc as w,ub as B,wb as b,xb as k,yb as z,zb as o}from"./chunk-XYHHESIX.js";import{a as _e}from"./chunk-7CGTOI24.js";function Ve(n,t){n&1&&s(0,"sh-progress-bar",32)}function He(n,t){n&1&&s(0,"div",35)}function je(n,t){n&1&&s(0,"div",35)}function We(n,t){n&1&&s(0,"div",36)}function qe(n,t){n&1&&s(0,"div",37)}function Qe(n,t){if(n&1&&(o(0,"details",46)(1,"summary"),N(2,15),s(3,"sh-icon"),o(4,"div",47),s(5,"sh-icon",40),i(),m(),i(),o(6,"div",48)(7,"p"),l(8,16),u(9,"date"),i(),o(10,"p"),l(11,17),u(12,"date"),i(),o(13,"p"),l(14,18),u(15,"durationFormat"),i(),o(16,"p"),l(17,19),i(),s(18,"sh-divider"),o(19,"p"),l(20,20),i(),o(21,"p"),l(22,21),i()()(),o(23,"details",46)(24,"summary"),N(25,22),s(26,"sh-icon"),o(27,"div",47),s(28,"sh-icon",40),i(),m(),i(),o(29,"div",48)(30,"p"),l(31,23),u(32,"date"),i(),o(33,"p"),l(34,24),u(35,"date"),i(),o(36,"p"),l(37,25),u(38,"durationFormat"),i(),s(39,"sh-divider"),o(40,"p"),l(41,26),u(42,"bytes"),i(),o(43,"p"),l(44,27),u(45,"bytes"),i(),o(46,"p"),l(47,28),u(48,"bytes"),i(),s(49,"sh-divider"),o(50,"p"),l(51,29),i(),o(52,"p"),l(53,30),i()()()),n&2){let e=C(2).$implicit;a(9),d(S(9,17,e.data==null||e.data.TestResults==null?null:e.data.TestResults.BeginTime,"medium")),c(8),a(3),d(S(12,20,e.data==null||e.data.TestResults==null?null:e.data.TestResults.EndTime,"medium")),c(11),a(3),d(L(15,23,e.data==null||e.data.TestResults==null?null:e.data.TestResults.Duration)),c(14),a(2),d(e.data==null||e.data.TestResults==null?null:e.data.TestResults.VerificationsActualLength),c(17),a(3),d(e.data==null||e.data.TestResults==null?null:e.data.TestResults.WarningsActualLength),c(20),a(2),d(e.data==null||e.data.TestResults==null?null:e.data.TestResults.ErrorsActualLength),c(22),a(10),d(S(32,25,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.BeginTime,"medium")),c(31),a(3),d(S(35,28,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.EndTime,"medium")),c(34),a(3),d(L(38,31,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.Duration)),c(37),a(4),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileCount)(h(42,33,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileSize,!0,!0)),c(41),a(3),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileCount)(h(45,37,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileSize,!0,!0)),c(44),a(3),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileCount)(h(48,41,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileSize,!0,!0)),c(47),a(3),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.WarningsActualLength),c(51),a(2),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.ErrorsActualLength),c(53)}}function Ye(n,t){if(n&1&&(o(0,"code"),E(1),u(2,"json"),i()),n&2){let e=t.$implicit;a(),K(L(2,1,e))}}function Ze(n,t){if(n&1&&(o(0,"details",46)(1,"summary"),N(2,31),s(3,"sh-icon"),o(4,"div",47),s(5,"sh-icon",40),i(),m(),i(),o(6,"div",48),b(7,Ye,3,3,"code",null,B),i()()),n&2){let e=C(2).$implicit;a(5),d(e.data.VerificationsActualLength),c(2),a(2),k(e.data.Verifications)}}function en(n,t){if(n&1&&(o(0,"code"),E(1),u(2,"json"),i()),n&2){let e=t.$implicit;a(),K(L(2,1,e))}}function nn(n,t){n&1&&(o(0,"p"),E(1,"No errors"),i())}function tn(n,t){if(n&1&&(o(0,"code"),E(1),u(2,"json"),i()),n&2){let e=t.$implicit;a(),K(L(2,1,e))}}function on(n,t){if(n&1&&(o(0,"section",41)(1,"sh-toggle-card",42),G(2,43),o(3,"h3"),l(4,0),i(),P(),G(5,44),o(6,"p"),l(7,1),u(8,"date"),i(),o(9,"p"),l(10,2),u(11,"date"),i(),o(12,"p"),l(13,3),u(14,"durationFormat"),i(),P(),i(),o(15,"sh-toggle-card",42),G(16,43),o(17,"h3"),l(18,4),i(),P(),G(19,44),o(20,"p"),l(21,5),u(22,"bytes"),i(),o(23,"p"),l(24,6),u(25,"bytes"),i(),o(26,"p"),l(27,7),u(28,"bytes"),i(),o(29,"p"),l(30,8),u(31,"bytes"),i(),o(32,"p"),l(33,9),i(),o(34,"p"),l(35,10),i(),o(36,"p"),l(37,11),i(),P(),i(),o(38,"div",45),s(39,"sh-divider"),g(40,Qe,54,45),g(41,Ze,9,1,"details",46),o(42,"details",46)(43,"summary"),N(44,12),s(45,"sh-icon"),o(46,"div",47),s(47,"sh-icon",40),i(),m(),i(),o(48,"div",48),b(49,en,3,3,"code",null,B),i()(),o(51,"details",46)(52,"summary"),N(53,13),s(54,"sh-icon"),o(55,"div",47),s(56,"sh-icon",40),i(),m(),i(),o(57,"div",48),g(58,nn,2,0,"p"),b(59,tn,3,3,"code",null,B),i()(),s(61,"sh-divider"),o(62,"details")(63,"summary"),N(64,14),s(65,"sh-icon"),o(66,"div",47),s(67,"sh-icon",40),i(),m(),i(),o(68,"code")(69,"button",49),E(70,"Copy"),i(),E(71),u(72,"json"),i()()()()),n&2){let e=C().$implicit;a(),z("disallowToggle",!0),a(7),d(S(8,22,e.data==null?null:e.data.BeginTime,"medium")),c(7),a(3),d(S(11,25,e.data==null?null:e.data.EndTime,"medium")),c(10),a(3),d(L(14,28,e.data==null?null:e.data.Duration)),c(13),a(),z("disallowToggle",!0),a(7),d(e.data==null?null:e.data.ExaminedFiles)(h(22,30,e.data==null?null:e.data.SizeOfExaminedFiles,!0,!0)),c(21),a(3),d(e.data==null?null:e.data.OpenedFiles)(h(25,34,e.data==null?null:e.data.SizeOfOpenedFiles,!0,!0)),c(24),a(3),d(e.data==null?null:e.data.AddedFiles)(h(28,38,e.data==null?null:e.data.SizeOfAddedFiles,!0,!0)),c(27),a(3),d(e.data==null?null:e.data.ModifiedFiles)(h(31,42,e.data==null?null:e.data.SizeOfModifiedFiles,!0,!0)),c(30),a(2),d(e.data==null?null:e.data.DeletedFiles),c(33),a(2),d(e.data==null?null:e.data.TooLargeFiles),c(35),a(2),d(e.data==null?null:e.data.FilesWithError),c(37),a(3),T(e.data!=null&&e.data.TestResults?40:-1),a(),T((e.data==null?null:e.data.MainOperation)==="Test"?41:-1),a(6),d(e.data==null?null:e.data.WarningsActualLength),c(44),a(2),k(e.data==null?null:e.data.Warnings),a(7),d(e.data==null?null:e.data.ErrorsActualLength),c(53),a(2),T((e.data==null||e.data.Errors==null?null:e.data.Errors.length)===0?58:-1),a(),k(e.data==null?null:e.data.Errors),a(12),f(" ",L(72,46,e.data)," ")}}function an(n,t){if(n&1){let e=U();o(0,"article",33)(1,"header",34),I("click",function(){let r=D(e).$implicit,p=C();return M(p.toggleOpenEntry(r.id))}),g(2,He,1,0,"div",35)(3,je,1,0,"div",35)(4,We,1,0,"div",36)(5,qe,1,0,"div",37),o(6,"h3"),E(7),u(8,"date"),i(),o(9,"p"),E(10),i(),s(11,"div",38),o(12,"div",39)(13,"sh-icon",40),E(14,"caret-down"),i()()(),g(15,on,73,48,"section",41),i()}if(n&2){let e=t.$implicit,_=C(),r=(e.data==null?null:e.data.ParsedResult)||"Unknown";a(2),T(r=="Fatal"?2:r=="Error"?3:r=="Warning"?4:5),a(5),K(S(8,7,e.timestamp,"medium")),a(3),Ie(" ",e.data==null?null:e.data.MainOperation," ",_.getLocalizedSummary(e)," "),a(3),$("open",e.id===_.openEntry()),a(2),T(e.id===_.openEntry()?15:-1)}}var ue=class n{#e=x(de);#n=new Z;#t=new ee;backupId=le.required();openEntry=A(null);pagination=A({offset:0,pagesize:100});resource=ce({params:()=>_e({id:this.backupId()},this.pagination()),stream:({params:t})=>this.#e.getApiV1BackupByIdLog({id:t.id,pagesize:100}).pipe(J(e=>e.map(_=>({id:_.ID,operationId:_.OperationID,timestamp:_.Timestamp*1e3,type:_.Type,data:JSON.parse(_.Message),exception:JSON.stringify(_.Exception)==="{}"?null:_.Exception}))))});getLocalizedSummary(t){let e=t.data?.ErrorsActualLength??0,_=t.data?.WarningsActualLength??0,r=[];if(t.data?.MainOperation=="Backup"){if(t.data?.Duration){let p=this.#t.transform(t.data?.Duration,!0);p.startsWith("0h ")&&(p=p.slice(3)),p.startsWith("0m ")&&(p=p.slice(3)),r.push($localize`took ${p}`)}t.data?.BackendStatistics?.BytesUploaded&&r.push($localize`uploaded ${this.#n.transform(t.data?.BackendStatistics?.BytesUploaded)}`),t.data?.BackendStatistics?.KnownFileSize&&r.push($localize`backup size ${this.#n.transform(t.data?.BackendStatistics?.KnownFileSize)}`)}return e!==0&&r.push($localize`:@@errorCount:${e} error${e===1?"":"s"}`),_!==0&&r.push($localize`:@@warningCount:${_} warning${_===1?"":"s"}`),r.length===0?"":`(${r.join(", ")})`}toggleOpenEntry(t){if(this.openEntry()===t){this.openEntry.set(null);return}this.openEntry.set(t)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,selectors:[["app-general-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let t;t=$localize`Time`;let e;e=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let _;_=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let r;r=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let p;p=$localize`Source files`;let v;v=$localize` Evaluated: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let y;y=$localize`Opened: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let j;j=$localize`Added: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let W;W=$localize` Modified: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let q;q=$localize`Deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Q;Q=$localize`Too large: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Y;Y=$localize`Files with error: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let O;O=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SH_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#46\uFFFD"}:START_TAG_DIV:${"\uFFFD#47\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_DIV:`,O=R(O);let ne;ne=$localize`${"\uFFFD#54\uFFFD"}:START_TAG_SH_ICON:warning${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SH_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#55\uFFFD"}:START_TAG_DIV:${"\uFFFD#56\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#55\uFFFD"}:CLOSE_TAG_DIV:`,ne=R(ne);let te;te=$localize`${"\uFFFD#65\uFFFD"}:START_TAG_SH_ICON:notepad${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SH_ICON: Complete log ${"\uFFFD#66\uFFFD"}:START_TAG_DIV:${"\uFFFD#67\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#66\uFFFD"}:CLOSE_TAG_DIV:`,te=R(te);let ie;ie=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:circle-half-tilt${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Test phase ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ie=R(ie);let Ce;Ce=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ge;ge=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Te;Te=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Oe;Oe=$localize`Verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Le;Le=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ne;Ne=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let oe;oe=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SH_ICON:file-archive${"[\uFFFD/#26\uFFFD|\uFFFD/#28\uFFFD]"}:CLOSE_TAG_SH_ICON: Compact phase ${"\uFFFD#27\uFFFD"}:START_TAG_DIV:${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#26\uFFFD|\uFFFD/#28\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_DIV:`,oe=R(oe);let me;me=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Se;Se=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ge;Ge=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Pe;Pe=$localize` Deleted files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ae;Ae=$localize` Downloaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Re;Re=$localize` Uploaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let De;De=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Me;Me=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ae;return ae=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Verifications ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ae=R(ae),[t,e,_,r,p,v,y,j,W,q,Q,Y,O,ne,te,ie,Ce,ge,Te,Oe,Le,Ne,oe,me,Se,Ge,Pe,Ae,Re,De,Me,ae,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"status","error"],[1,"status","warn"],[1,"status"],[1,"spacer"],[1,"action"],[1,"toggle-indicator"],[1,"log-content"],[3,"disallowToggle"],["title",""],["content",""],[1,"extra-info"],["name","details"],[1,"actions"],[1,"content"],["shButton","",1,"small"]]},template:function(e,_){e&1&&(g(0,Ve,1,0,"sh-progress-bar",32),b(1,an,16,10,"article",33,B)),e&2&&(T(_.resource.isLoading()?0:-1),a(),k(_.resource.value()))},dependencies:[Ue,be,Fe,se,H,Z,V,ee,re],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column;cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-4);background-color:var(--base-1);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-2)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%]{display:flex;flex-direction:column}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;gap:.5rem;padding:.75rem;border-radius:var(--shape-2);background-color:var(--base-2)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:focus{outline:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:hover{background-color:var(--base-3)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]::marker{font-size:0}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex:1 0;gap:.5rem;-webkit-user-select:none;user-select:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:2rem;transition:transform 125ms linear}details[open][_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:.75rem 1rem 0;display:flex;flex-direction:column;gap:.75rem}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{margin-top:.75rem;position:relative}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:.75rem;right:.75rem}.extra-info[_ngcontent-%COMP%]{grid-column:1/-1;display:flex;flex-direction:column;gap:1rem}.extra-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.extra-info[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-2)}.log-content[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:1fr 1fr;gap:1rem}.status[_ngcontent-%COMP%]{display:block;width:1rem;height:1rem;background-color:var(--success-8);border-radius:50%}.status.error[_ngcontent-%COMP%]{background-color:var(--error-8)}.status.warn[_ngcontent-%COMP%]{background-color:var(--warn-8)}"],changeDetection:0})};function _n(n,t){n&1&&s(0,"sh-progress-bar",1)}function ln(n,t){n&1&&(N(0,0,1),s(1,"sh-icon"),m())}function rn(n,t){n&1&&(N(0,0,2),s(1,"sh-icon"),m())}function sn(n,t){if(n&1){let e=U();o(0,"section",6)(1,"button",7),I("click",function(){D(e);let r=C(),p=r.$implicit,v=r.$index,y=C();return M(y.copyToClipboard(p.data,v))}),N(2,0),g(3,ln,2,0)(4,rn,2,0),m(),i(),o(5,"code"),E(6),u(7,"json"),i()()}if(n&2){let e=C(),_=e.$implicit,r=e.$index,p=C();a(),$("success",p.copiedFromIndex()===r),a(2),T(p.copiedFromIndex()===r?3:4),a(3),K(L(7,4,_.data))}}function Fn(n,t){if(n&1){let e=U();o(0,"article",2)(1,"header",3),I("click",function(){let r=D(e).$implicit,p=C();return M(p.toggleOpenEntry(r.id))}),o(2,"h3"),E(3),u(4,"date"),i(),o(5,"div",4)(6,"sh-icon",5),E(7,"caret-down"),i()()(),g(8,sn,8,6,"section",6),i()}if(n&2){let e=t.$implicit,_=C();a(3),$e("",S(4,6,e.timestamp,"medium"),": ",e.operation," ",e.path),a(3),$("open",e.id===_.openEntry()),a(2),T(e.id===_.openEntry()?8:-1)}}var pe=class n{#e=x(de);backupId=le.required();openEntry=A(null);pagination=A({offset:0,pagesize:100});copiedFromIndex=A(null);resource=ce({params:()=>_e({id:this.backupId()},this.pagination()),stream:({params:t})=>this.#e.getApiV1BackupByIdRemotelog({id:t.id,pagesize:100}).pipe(J(e=>e.map((_,r)=>({id:_.ID,operationId:_.OperationID,timestamp:_.Timestamp*1e3,operation:_.Operation,path:_.Path,data:typeof _.Data=="string"?JSON.parse(_.Data):null}))))});toggleOpenEntry(t){if(this.openEntry()===t){this.openEntry.set(null);return}this.openEntry.set(t)}copyToClipboard(t,e){let _=JSON.stringify(t,null,2);navigator.clipboard.writeText(_),this.copiedFromIndex.set(e),setTimeout(()=>{this.copiedFromIndex.set(null)},3e3)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,selectors:[["app-remote-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let t;return t=$localize`${"\uFFFD*3: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: Copied ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4: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: Copy to clipboard ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=R(t),[t,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"actions"],[1,"toggle-indicator"],[1,"log-content"],["shButton","",1,"small",3,"click"]]},template:function(e,_){e&1&&(g(0,_n,1,0,"sh-progress-bar",1),b(1,Fn,9,9,"article",2,B)),e&2&&(T(_.resource.isLoading()?0:-1),a(),k(_.resource.value()))},dependencies:[Fe,H,re,V],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-4);background-color:var(--base-1);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-2)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0;-webkit-user-select:none;user-select:none}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}.log-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem;position:relative}.log-content[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:2rem;right:2rem;background:transparent}code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-2)}"],changeDetection:0})};function dn(n,t){if(n&1&&(E(0," - "),G(1),l(2,6),P(),E(3),u(4,"durationFormat")),n&2){C(2);let e=w(6);a(3),f(" ",L(4,1,e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration)," ")}}function cn(n,t){n&1&&(G(0),l(1,7),P())}function un(n,t){if(n&1&&(E(0),u(1,"bytes")),n&2){C(2);let e=w(6);f(" ",L(1,1,e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function pn(n,t){n&1&&(G(0),l(1,8),P())}function En(n,t){if(n&1&&(E(0),u(1,"bytes")),n&2){C(2);let e=w(6);f(" ",L(1,1,e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function Cn(n,t){n&1&&(G(0),l(1,9),P())}function gn(n,t){if(n&1&&(o(0,"sh-chip",19),l(1,10),i()),n&2){C(2);let e=w(6);a(),d(e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount),c(1)}}function Tn(n,t){n&1&&(o(0,"sh-chip",20),l(1,11),i())}function On(n,t){if(n&1&&(o(0,"div",14)(1,"div",18)(2,"h3"),E(3),o(4,"sh-icon"),E(5,"database"),i()(),o(6,"p")(7,"span"),l(8,3),i(),E(9),u(10,"date"),g(11,dn,5,3)(12,cn,2,0,"ng-container"),i(),o(13,"p")(14,"span"),l(15,4),i(),g(16,un,2,3)(17,pn,2,0,"ng-container"),i(),o(18,"p")(19,"span"),l(20,5),i(),g(21,En,2,3)(22,Cn,2,0,"ng-container"),i()(),g(23,gn,2,1,"sh-chip",19)(24,Tn,2,0,"sh-chip",20),i()),n&2){let e=C(),_=w(6);a(3),f(" ",_.Backup.Name??e.MISSING_BACKUP_NAME," "),a(6),f(" ",S(10,6,_.Backup.Metadata==null?null:_.Backup.Metadata.LastBackupDate,"short")," "),a(2),T(_.Backup.Metadata!=null&&_.Backup.Metadata.LastBackupDuration?11:12),a(5),T(_.Backup.Metadata!=null&&_.Backup.Metadata.SourceFilesSize?16:17),a(5),T(_.Backup.Metadata!=null&&_.Backup.Metadata.TargetFilesSize?21:22),a(2),T(_.Backup.Metadata!=null&&_.Backup.Metadata.BackupListCount?23:24)}}function Ln(n,t){if(n&1&&s(0,"app-general-log",17),n&2){let e=C();z("backupId",e.backupId())}}function Nn(n,t){if(n&1&&s(0,"app-remote-log",17),n&2){let e=C();z("backupId",e.backupId())}}var Ee=class n{#e=x(ye);#n=x(Ke);MISSING_BACKUP_NAME=$localize`Backup name missing`;activeTab=A("general");backupId=Je(this.#e.params.pipe(J(t=>t.id)));backup=ve(()=>{let t=this.backupId();return t?this.#n.getBackupById(t):null});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,selectors:[["app-log"]],decls:15,vars:8,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`General`;let _;_=$localize` Destination `;let r;r=$localize`Last successful backup:`;let p;p=$localize`Source:`;let v;v=$localize`Destination:`;let y;y=$localize`took`;let j;j=$localize`N/A`;let W;W=$localize`N/A`;let q;q=$localize`N/A`;let Q;Q=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION: Version`;let Y;return Y=$localize`No version yet`,[t,e,_,r,p,v,y,j,W,q,Q,Y,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"backup"],[1,"primary"],["tab","",3,"click"],[3,"backupId"],[1,"text"],[1,"simple","success"],[1,"simple"]]},template:function(e,_){if(e&1){let r=U();s(0,"app-status-bar"),o(1,"section")(2,"div",12)(3,"button",13),N(4,0),s(5,"sh-icon"),m(),i()(),fe(6),g(7,On,25,9,"div",14),o(8,"sh-tabs",15)(9,"button",16),I("click",function(){return D(r),M(_.activeTab.set("general"))}),l(10,1),i(),o(11,"button",16),I("click",function(){return D(r),M(_.activeTab.set("destination"))}),l(12,2),i()(),g(13,Ln,1,1,"app-general-log",17),g(14,Nn,1,1,"app-remote-log",17),i()}if(e&2){a(6);let r=he(_.backup());a(),T(r?7:-1),a(2),$("active",_.activeTab()==="general"),a(2),$("active",_.activeTab()==="destination"),a(2),T(_.activeTab()==="general"?13:-1),a(),T(_.activeTab()==="destination"?14:-1)}},dependencies:[ke,ue,pe,xe,Xe,H,se,Be,Z,ee,V],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 1.5rem;gap:1rem}sh-tabs[_ngcontent-%COMP%]{margin-bottom:1rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}"],changeDetection:0})};export{Ee as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as a,i as b}from"./chunk-
|
|
1
|
+
import{h as a,i as b}from"./chunk-7IQ5FSGI.js";import"./chunk-GMNCWLGX.js";import"./chunk-B5LH4P4E.js";import"./chunk-TJYZBTTS.js";import"./chunk-6Q6SSTBK.js";import"./chunk-WILUKPQ3.js";import"./chunk-NEV6JB5M.js";import"./chunk-5UXRNNTT.js";import"./chunk-FBWFZMGL.js";import"./chunk-RYXU2QDS.js";import"./chunk-BKANUILG.js";import"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";export{a as createSourceDataForm,b as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as ne,f as _n}from"./chunk-27UON6YV.js";import{a as an}from"./chunk-XRXXVFJ4.js";import{a as on}from"./chunk-6CYY2QG6.js";import"./chunk-AJXTVI3H.js";import"./chunk-LF24JF3M.js";import{a as tn}from"./chunk-AO4ZIHUL.js";import"./chunk-SS7TCWY5.js";import"./chunk-6Q6SSTBK.js";import"./chunk-U63HBLGG.js";import"./chunk-4IUPBI2K.js";import"./chunk-AGPZBYW6.js";import"./chunk-WILUKPQ3.js";import"./chunk-NEV6JB5M.js";import{a as nn}from"./chunk-CGKL2MHM.js";import"./chunk-QWNOPLJC.js";import"./chunk-5UXRNNTT.js";import"./chunk-FBWFZMGL.js";import{A as Ue,B as ee,C as Ke,E as je,G as We,K as qe,L as Qe,S as Ye,T as Ze,u as Z}from"./chunk-RYXU2QDS.js";import{b as en}from"./chunk-BKANUILG.js";import{e as Y}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{$ as I,Ab as t,Bb as T,Cc as M,Dc as G,E as j,Ec as A,Fb as O,Gb as m,Gc as Q,Hb as f,Ib as H,Ma as W,Pa as a,Pb as c,Qb as s,Rb as C,Sb as h,Tb as L,Ub as q,Vb as $,W as v,Xb as r,aa as P,cb as be,ec as V,gc as R,hb as N,ib as ve,jc as u,la as X,lc as S,na as Be,oc as we,pb as Xe,pc as ze,qb as Je,qc as Ve,sb as g,tb as p,ub as J,wb as w,xb as z,xc as U,yb as E,yc as D,zb as o}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";var rn=()=>[Y,import("./chunk-3CJTIOP4.js").then(e=>e.NgTemplateOutlet),ee,Z,je,Ze,Ye,import("./chunk-PF2QQ2YW.js").then(e=>e.DurationFormatPipe),import("./chunk-AYN5EDSZ.js").then(e=>e.BytesPipe),import("./chunk-BUO6CCKF.js").then(e=>e.RelativeTimePipe)],cn=()=>["/add-backup"],sn=()=>["/restore"],ln=e=>({$implicit:e}),un=()=>["/backup/new"],Fn=e=>["/backup",e],Cn=e=>["/restore",e],Tn=e=>["/backup",e,"export"],En=e=>["/backup",e,"delete"],dn=e=>["/backup",e,"database"],gn=e=>["/backup",e,"commandline"],pn=e=>["/backup",e,"log"];function Sn(e,i){e&1&&C(0,11,1)}function On(e,i){e&1&&C(0,11,2)}function mn(e,i){if(e&1&&C(0,11,3),e&2){let n=r(2);h(n.timeType()),L(0)}}function Nn(e,i){if(e&1){let n=H();o(0,"button",54),$("click",function(){let F=I(n).$implicit,d=r(3);return P(d.sortByColumn.set(F.value))}),C(1,15),t()}if(e&2){let n=i.$implicit,_=r(3);R("active",_.orderBy()===n.value),a(),h(n.label),L(1)}}function Mn(e,i){if(e&1&&(o(0,"sh-menu",55)(1,"button",56),c(2,14),T(3,"strong")(4,"sh-icon"),s(),t(),O(5,57),w(6,Nn,2,3,"button",58,J),m(),t()),e&2){let n=r(2);a(4),h(n.orderBy()),L(2),a(2),z(n.sortOrderOptions())}}function In(e,i){if(e&1){let n=H();o(0,"div",52)(1,"sh-button-group",53)(2,"button",54),$("click",function(){I(n);let F=r();return P(F.viewMode.set("list"))}),c(3,9),T(4,"sh-icon"),s(),t(),o(5,"button",54),$("click",function(){I(n);let F=r();return P(F.viewMode.set("details"))}),c(6,10),T(7,"sh-icon"),s(),t()(),o(8,"sh-menu",55)(9,"button",56),c(10,11),o(11,"strong"),g(12,Sn,1,0)(13,On,1,0)(14,mn,1,1),t(),T(15,"sh-icon"),s(),t(),O(16,57),o(17,"button",54),$("click",function(){I(n);let F=r();return P(F.setTimeType("relative"))}),C(18,12),t(),o(19,"button",54),$("click",function(){I(n);let F=r();return P(F.setTimeType("actual"))}),C(20,13),t(),m(),t(),g(21,Mn,8,1,"sh-menu",55),t()}if(e&2){let n=r();a(2),R("active",n.viewMode()==="list"),a(3),R("active",n.viewMode()==="details"),a(7),p(n.timeType()=="relative"?12:n.timeType()=="actual"?13:14),a(9),p(n.viewMode()==="list"?21:-1)}}function Pn(e,i){if(e&1&&(o(0,"p")(1,"span"),C(2,21),t(),u(3),M(4,"relativeTime"),t()),e&2){let n=r().$implicit,_=r(4);a(3),S(" ",A(4,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function fn(e,i){if(e&1&&(u(0),M(1,"durationFormat")),e&2){let n=r().$implicit,_=r(4);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function Dn(e,i){e&1&&(O(0),u(1,"-"),m())}function $n(e,i){if(e&1&&(u(0),M(1,"bytes")),e&2){let n=r().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Rn(e,i){e&1&&(O(0),u(1,"-"),m())}function An(e,i){if(e&1&&(u(0),M(1,"bytes")),e&2){let n=r().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function hn(e,i){e&1&&(O(0),u(1,"-"),m())}function Ln(e,i){e&1&&(o(0,"sh-chip",67),C(1,22),t())}function Hn(e,i){e&1&&f(0)}function Gn(e,i){if(e&1&&(o(0,"div",63)(1,"div",48)(2,"h3"),u(3),o(4,"sh-chip"),T(5,"img",64),u(6),t()(),o(7,"p")(8,"span"),C(9,16),t(),u(10),M(11,"relativeTime"),t(),g(12,Pn,5,4,"p"),o(13,"p")(14,"span"),C(15,17),t(),g(16,fn,2,4)(17,Dn,2,0,"ng-container"),t(),o(18,"p")(19,"span"),C(20,18),t(),g(21,$n,2,3)(22,Rn,2,0,"ng-container"),t(),o(23,"p")(24,"span"),C(25,19),t(),g(26,An,2,3)(27,hn,2,0,"ng-container"),t()(),o(28,"div",65)(29,"sh-chip",66),C(30,20),t(),g(31,Ln,2,0,"sh-chip",67),t(),o(32,"div",52),N(33,Hn,1,0,"ng-container",68),t()()),e&2){let n=i.$implicit,_=r(4),F=V(33);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),E("src",_.getBackendIcon(n.Backup.TargetURL),W),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(4),S(" ",A(11,13,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupFinished,_.timeType()==="actual")," "),a(2),p(!(n==null||n.Schedule==null)&&n.Schedule.Time?12:-1),a(4),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?16:17),a(5),p(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?21:22),a(5),p(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?26:27);let d=_.getBackupVersionCount(n);a(4),h(d)(d),L(30),a(),p(n.Backup.ExternalID?31:-1),a(2),E("ngTemplateOutlet",F)("ngTemplateOutletContext",D(16,ln,n))}}function xn(e,i){if(e&1&&w(0,Gn,34,18,"div",63,J),e&2){let n=r(3);z(n.backups())}}function kn(e,i){e&1&&(o(0,"div",62),c(1,23),o(2,"button",69),T(3,"sh-icon"),t(),s(),t()),e&2&&(a(2),E("routerLink",U(1,un)))}function yn(e,i){if(e&1&&(o(0,"div",61),g(1,xn,2,0)(2,kn,4,2,"div",62),t()),e&2){let n=r(2);R("fallback",n.backups().length===0),a(),p(n.backups().length?1:2)}}function Bn(e,i){e&1&&(c(0,24,1),f(1),s())}function bn(e,i){e&1&&(c(0,25,1),f(1),s())}function vn(e,i){e&1&&(c(0,26,1),f(1),s())}function Xn(e,i){e&1&&(c(0,27,1),f(1),s())}function Jn(e,i){e&1&&(c(0,28,1),f(1),s())}function wn(e,i){e&1&&(c(0,29,1),f(1),s())}function zn(e,i){e&1&&(c(0,30,1),f(1),s())}function Vn(e,i){if(e&1&&(u(0),M(1,"relativeTime")),e&2){let n=r().$implicit,_=r(3);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,_.timeType()==="actual")," ")}}function Un(e,i){e&1&&(O(0),u(1,"-"),m())}function Kn(e,i){if(e&1&&(u(0),M(1,"relativeTime")),e&2){let n=r().$implicit,_=r(3);S(" ",A(1,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function jn(e,i){e&1&&(O(0),u(1,"-"),m())}function Wn(e,i){if(e&1&&(u(0),M(1,"durationFormat")),e&2){let n=r().$implicit,_=r(3);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function qn(e,i){e&1&&(O(0),u(1,"-"),m())}function Qn(e,i){if(e&1&&(u(0),M(1,"bytes")),e&2){let n=r().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Yn(e,i){e&1&&(O(0),u(1,"-"),m())}function Zn(e,i){if(e&1&&(u(0),M(1,"bytes")),e&2){let n=r().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function et(e,i){e&1&&(O(0),u(1,"-"),m())}function nt(e,i){e&1&&f(0)}function tt(e,i){if(e&1&&(o(0,"tr")(1,"td"),u(2),t(),o(3,"td")(4,"sh-chip",80),T(5,"img",64),u(6),t()(),o(7,"td"),g(8,Vn,2,4)(9,Un,2,0,"ng-container"),t(),o(10,"td"),g(11,Kn,2,4)(12,jn,2,0,"ng-container"),t(),o(13,"td"),g(14,Wn,2,4)(15,qn,2,0,"ng-container"),t(),o(16,"td"),g(17,Qn,2,3)(18,Yn,2,0,"ng-container"),t(),o(19,"td"),g(20,Zn,2,3)(21,et,2,0,"ng-container"),t(),o(22,"td")(23,"span"),C(24,33),t()(),o(25,"td"),N(26,nt,1,0,"ng-container",68),t()()),e&2){let n=i.$implicit,_=r(3),F=V(33);a(2),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(3),E("src",_.getBackendIcon(n.Backup.TargetURL),W),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(2),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDate?8:9),a(3),p(!(n==null||n.Schedule==null)&&n.Schedule.Time?11:12),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?14:15),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?17:18),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?20:21);let d=_.getBackupVersionCount(n);a(4),h(d)(d),L(24),a(2),E("ngTemplateOutlet",F)("ngTemplateOutletContext",D(12,ln,n))}}function it(e,i){if(e&1){let n=H();o(0,"sh-table",70),Ve("sortByColumnChange",function(F){I(n);let d=r(2);return ze(d.sortByColumn,F)||(d.sortByColumn=F),P(F)}),o(1,"tr",71)(2,"th",72),c(3,24),N(4,Bn,2,0,"ng-container",73),s(),t(),o(5,"th",74),c(6,25),N(7,bn,2,0,"ng-container",73),s(),t(),o(8,"th",75),c(9,26),N(10,vn,2,0,"ng-container",73),s(),t(),o(11,"th",76),c(12,27),N(13,Xn,2,0,"ng-container",73),s(),t(),o(14,"th",77),c(15,28),N(16,Jn,2,0,"ng-container",73),s(),t(),o(17,"th",78),c(18,29),N(19,wn,2,0,"ng-container",73),s(),t(),o(20,"th",79),c(21,30),N(22,zn,2,0,"ng-container",73),s(),t(),o(23,"th"),C(24,31),t(),o(25,"th"),C(26,32),t()(),w(27,tt,27,14,"tr",null,J),t()}if(e&2){let n=r(2),_=V(35);E("data",n.backups())("loading",n.backupsLoading()),we("sortByColumn",n.sortByColumn),a(4),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(5),z(n.backups())}}function ot(e,i){if(e&1&&g(0,yn,3,3,"div",59)(1,it,29,10,"sh-table",60),e&2){let n=r();p(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1)}}function _t(e,i){e&1&&(o(0,"div",81),T(1,"sh-progress-bar",82),o(2,"div",48)(3,"h3"),C(4,34),t()()())}function at(e,i){e&1&&C(0,35,1)}function lt(e,i){e&1&&(o(0,"sh-icon"),u(1,"check"),t())}function rt(e,i){e&1&&(o(0,"sh-icon"),u(1,"dots-three-vertical"),t())}function ct(e,i){if(e&1){let n=H();o(0,"button",83),$("click",function(){let F=I(n).$implicit,d=r();return P(d.startBackup(F.Backup.ID))}),c(1,35),T(2,"sh-icon"),g(3,at,1,0),s(),t(),o(4,"button",84)(5,"sh-icon"),u(6,"pencil-simple"),t()(),o(7,"sh-menu")(8,"button",49),g(9,lt,2,0,"sh-icon")(10,rt,2,0,"sh-icon"),t(),O(11,57),o(12,"h3",85),u(13,"Operations"),t(),o(14,"button",86),c(15,36),T(16,"sh-icon"),s(),t(),o(17,"button",86),c(18,37),T(19,"sh-icon"),s(),t(),o(20,"button",86),c(21,38),T(22,"sh-icon"),s(),t(),T(23,"sh-divider"),o(24,"h3",85),C(25,39),t(),o(26,"button",86),c(27,40),T(28,"sh-icon"),s(),t(),o(29,"button",54),$("click",function(){let F=I(n).$implicit,d=r();return P(d.verifyFiles(F.Backup.ID))}),c(30,41),T(31,"sh-icon"),s(),t(),o(32,"button",54),$("click",function(){let F=I(n).$implicit,d=r();return P(d.compressBackup(F.Backup.ID))}),c(33,42),T(34,"sh-icon"),s(),t(),o(35,"button",86),c(36,43),T(37,"sh-icon"),s(),t(),T(38,"sh-divider"),o(39,"h3",85),C(40,44),t(),o(41,"button",86),c(42,45),T(43,"sh-icon"),s(),t(),m(),t()}if(e&2){let n=i.$implicit,_=r();R("loader",_.startingBackup()===n.Backup.ID),a(3),p(_.viewMode()==="list"?3:-1),a(),E("routerLink",D(15,Fn,n.Backup.ID)),a(4),R("loader",_.loadingId()===n.Backup.ID)("success",_.successId()===n.Backup.ID),a(),p(_.successId()===n.Backup.ID?9:10),a(5),E("routerLink",D(17,Cn,n.Backup.ID)),a(3),E("routerLink",D(19,Tn,n.Backup.ID)),a(3),E("routerLink",D(21,En,n.Backup.ID)),a(6),E("routerLink",D(23,dn,n.Backup.ID)),a(9),E("routerLink",D(25,gn,n.Backup.ID)),a(6),E("routerLink",D(27,pn,n.Backup.ID))}}function st(e,i){e&1&&(o(0,"sh-icon",87),u(1,"funnel-simple"),t(),o(2,"sh-icon",88),u(3,"sort-ascending"),t(),o(4,"sh-icon",89),u(5,"sort-descending"),t())}var ut={file:{Display:$localize`Local`,Icon:null}},te=class e{#n=v(en);#t=v(on);#e=v(tn);MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;timeType=this.#e.timeType;viewMode=nn("viewMode","list");sortByColumn=X(this.#e.orderBy());loadingId=X(null);successId=X(null);sortEffect=Be(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}setOrderBy(i){this.#e.setOrderBy(i)}setTimeType(i){this.#e.setTimeType(i)}startBackup(i){this.#t.resumeDialogCheck(()=>this.#e.startBackup(i))}getBackendIcon(i){if(!i)return"";let n=i.split("://")[0];return ne(n).icon??"database"}getBackendType(i){if(!i)return"";let n=i.split("://")[0],_=ne(n);if(!_)return"";let F=ut[_.key];if(F?.Display)return F.Display;if(_.key==="s3"){let d="http://null?"+i.split("?")[1],x=new URL(d).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[k,y]of Object.entries(_n))if(x.endsWith(k))return y}return _.displayName}getBackupVersionCount(i){return parseInt(i?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdVerify({id:i}).pipe(j(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdCompact({id:i}).pipe(j(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=be({type:e,selectors:[["app-home"]],decls:36,vars:6,consts:()=>{let i;i=$localize`Backups`;let n;n=$localize`Keep your data safe at your chosen destination.`;let _;_=$localize` Create ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let F;F=$localize`Restores`;let d;d=$localize`Recover your files from any backup set.`;let K;K=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let x;x=$localize`My backups`;let k;k=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let y;y=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let ie;ie=$localize` Time: ${"\uFFFD#11\uFFFD"}:START_TAG_STRONG:${"\uFFFD*12:1\uFFFD"}:START_BLOCK_IF: Relative ${"\uFFFD/*12:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*13:2\uFFFD"}:START_BLOCK_ELSE_IF: Actual ${"\uFFFD/*13:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*14:3\uFFFD"}:START_BLOCK_ELSE: ${"\uFFFD0:3\uFFFD"}:INTERPOLATION: ${"\uFFFD/*14:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let oe;oe=$localize`Relative time`;let _e;_e=$localize`Actual time`;let ae;ae=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let le;le=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let re;re=$localize`Last successful backup:`;let ce;ce=$localize`Duration:`;let se;se=$localize`Source:`;let ue;ue=$localize`Destination:`;let B;B=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,B=q(B,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Fe;Fe=$localize` ${B}:ICU@@6502601490918455200: `;let Ce;Ce=$localize`Next scheduled run:`;let Te;Te=$localize`Externally managed`;let Ee;Ee=$localize` No backups found ${"\uFFFD#2\uFFFD"}:START_TAG_BUTTON: Click to create one now ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_BUTTON:`;let de;de=$localize` Backup ${"\uFFFD*4:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*4:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let ge;ge=$localize` Type ${"\uFFFD*7:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*7:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let pe;pe=$localize` Last backup ${"\uFFFD*10:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*10:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Se;Se=$localize` Next run ${"\uFFFD*13:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*13:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Oe;Oe=$localize` Duration ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let me;me=$localize` Source ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ne;Ne=$localize` Destination ${"\uFFFD*22:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*22:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Me;Me=$localize`Version`;let Ie;Ie=$localize`Actions`;let b;b=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,b=q(b,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Pe;Pe=$localize` ${b}:ICU@@3521773141017690117: `;let fe;fe=$localize`Loading backups...`;let De;De=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let $e;$e=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let Re;Re=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let Ae;Ae=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let he;he=$localize`Advanced`;let Le;Le=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let He;He=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let Ge;Ge=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Compress now `;let xe;xe=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let ke;ke=$localize`Reporting`;let ye;return ye=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Log `,[["actions",""],["sortIcons",""],i,n,_,F,d,K,x,k,y,ie,oe,_e,ae,le,re,ce,se,ue,Fe,Ce,Te,Ee,de,ge,pe,Se,Oe,me,Ne,Me,Ie,Pe,fe,De,$e,Re,Ae,he,Le,He,Ge,xe,ke,ye,[1,"type-a","actionable",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","shButton",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small","type-b"],["type","button",3,"click"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups",3,"fallback"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backups"],[1,"no-backups"],[1,"backup"],["alt","",1,"provider-icon",3,"src"],[1,"tags"],[1,"simple","success"],[1,"simple","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["shButton","",1,"primary","raised",3,"routerLink"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["thead",""],["shSort","name"],[4,"ngTemplateOutlet"],["shSort","type"],["shSort","lastrun"],["shSort","nextrun"],["shSort","duration"],["shSort","sourcesize"],["shSort","destinationsize"],[1,"small"],[1,"loading-list"],[1,"indeterminate","primary"],["shButton","",3,"click"],["type","button","shButton","",3,"routerLink"],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,_){n&1&&(T(0,"app-status-bar"),o(1,"section")(2,"header")(3,"sh-card",46),T(4,"img",47),o(5,"div",48)(6,"h3"),C(7,2),t(),o(8,"p"),C(9,3),t()(),o(10,"button",49),c(11,4),T(12,"sh-icon"),s(),t()(),o(13,"sh-card",46),T(14,"img",50),o(15,"div",48)(16,"h3"),C(17,5),t(),o(18,"p"),C(19,6),t()(),o(20,"button",49),c(21,7),T(22,"sh-icon"),s(),t()()(),o(23,"div",51)(24,"h2"),O(25),C(26,8),m(),g(27,In,22,6,"div",52),t(),ve(28,ot,2,1)(29,_t,5,0),Xe(30,28,rn,null,29),t()(),N(32,ct,44,29,"ng-template",null,0,Q)(34,st,6,0,"ng-template",null,1,Q)),n&2&&(a(3),E("routerLink",U(4,cn)),a(10),E("routerLink",U(5,sn)),a(14),p(_.backups().length>0?27:-1),a(3),Je(!_.backupsLoading()))},dependencies:[Y,an,Ke,ee,Z,We,qe,Qe,Ue],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}sh-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}sh-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}sh-menu[_ngcontent-%COMP%]{color:red}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backups.fallback[_ngcontent-%COMP%]{justify-content:center;align-items:center;padding:4rem;border:1px solid var(--base-4);background:var(--base-2);border-radius:var(--shape-2);width:calc(100% - 4rem);margin:0 auto}.no-backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.backup[_ngcontent-%COMP%] .tags[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:.5rem}.provider-icon[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) sh-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] sh-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] sh-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}"],changeDetection:0})};export{te as default};
|