@duplicati/ngclient 0.0.74 → 0.0.78
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/assets/spk.woff2 +0 -0
- package/chunk-2K3CR66C.js +1 -0
- package/chunk-3CRA7LUM.js +1 -0
- package/chunk-3LITUWIH.js +3 -0
- package/{chunk-MYVJZFYR.js → chunk-4OE5GJEY.js} +1 -1
- package/chunk-5K2CQFVP.js +1 -0
- package/chunk-6SIZVSDW.js +2 -0
- package/chunk-7KWOTSVE.js +1 -0
- package/{chunk-LJFKKI57.js → chunk-7P2RW65H.js} +1 -1
- package/chunk-7QPDYG2R.js +1 -0
- package/{chunk-77KHDJR7.js → chunk-7WKWA7QK.js} +1 -1
- package/chunk-AGD6LHBQ.js +1 -0
- package/chunk-BLF5NVEW.js +1 -0
- package/{chunk-CAGBL2MP.js → chunk-BRTUMDFG.js} +1 -1
- package/{chunk-FCPUMFVG.js → chunk-CS4VRCLU.js} +1 -1
- package/{chunk-VUVQIS7G.js → chunk-DVV65XF4.js} +1 -1
- package/{chunk-PRKOHXBN.js → chunk-EW42J6OZ.js} +1 -1
- package/chunk-F4G2WAF6.js +1 -0
- package/{chunk-L5ZZZJEY.js → chunk-F7KC3CMY.js} +1 -1
- package/{chunk-GJ6GRAEW.js → chunk-FOHDLUCC.js} +1 -1
- package/{chunk-VJQDP23H.js → chunk-G7YGQ54D.js} +1 -1
- package/{chunk-OT7JK3TS.js → chunk-HDBZ3ISU.js} +1 -1
- package/{chunk-43QTP63M.js → chunk-HXGHAEWC.js} +1 -1
- package/{chunk-BY56DZ7Y.js → chunk-HZOYOR46.js} +1 -1
- package/chunk-IKTCS2AI.js +1 -0
- package/chunk-ILPTEKIT.js +1 -0
- package/{chunk-RBVR4WTJ.js → chunk-IN72UOWN.js} +1 -1
- package/{chunk-ROIHQL5Y.js → chunk-IWSFC3I6.js} +1 -1
- package/chunk-JOBMLOGZ.js +1 -0
- package/{chunk-VKMKZKNR.js → chunk-JZOCG4KQ.js} +1 -1
- package/{chunk-KYQC46J2.js → chunk-KHIKPOXK.js} +1 -1
- package/{chunk-ANP5WEOJ.js → chunk-KPP5HW6S.js} +1 -1
- package/{chunk-C6ELLTE3.js → chunk-KRXCULQR.js} +1 -1
- package/{chunk-UJWW7PS7.js → chunk-LFQXDL42.js} +1 -1
- package/{chunk-6CRYB4HA.js → chunk-MHZPUJQF.js} +1 -1
- package/{chunk-2QQJM43S.js → chunk-N4ZZA3JQ.js} +1 -1
- package/{chunk-BEBLA2OU.js → chunk-NDQ5RFC6.js} +1 -1
- package/chunk-NVTD7IP4.js +1 -0
- package/{chunk-5KGMNBD7.js → chunk-O3XPW5NY.js} +1 -1
- package/chunk-OEWX26UE.js +1 -0
- package/{chunk-Z2E5LWHA.js → chunk-ONPMD5AY.js} +1 -1
- package/chunk-OYXHFCSL.js +1 -0
- package/{chunk-22GS6UCG.js → chunk-PTG2C2YJ.js} +1 -1
- package/chunk-Q4JQCY64.js +1 -0
- package/chunk-QDAWQNBQ.js +7 -0
- package/{chunk-AF7PONVK.js → chunk-QI7DMSHZ.js} +1 -1
- package/{chunk-MLT3FZMW.js → chunk-RBT353UU.js} +1 -1
- package/{chunk-4RXB65JX.js → chunk-SRMNNICE.js} +1 -1
- package/chunk-TL325ZMY.js +1 -0
- package/{chunk-KJ4O6F3R.js → chunk-TQE7OBBP.js} +1 -1
- package/{chunk-EHIW67S3.js → chunk-TRNWEHWA.js} +1 -1
- package/chunk-UNJ66CNQ.js +1 -0
- package/{chunk-GK7T43YY.js → chunk-US4WRUST.js} +1 -1
- package/{chunk-Y7LSDVD6.js → chunk-VFTEC7DW.js} +1 -1
- package/{chunk-X6RAHZJI.js → chunk-VKHZOVLO.js} +1 -1
- package/chunk-WF5PRSGZ.js +6 -0
- package/chunk-WX6WWOS5.js +1 -0
- package/{chunk-Z5NZYMJN.js → chunk-XFRVNXF6.js} +1 -1
- package/chunk-XKSLV5L6.js +1 -0
- package/chunk-XLU5TCBE.js +1 -0
- package/{chunk-GXX5QXLE.js → chunk-Z5FVTSXP.js} +1 -1
- package/{chunk-6TZWRTRA.js → chunk-ZOMDTRAX.js} +1 -1
- package/chunk-ZRPJ3QZT.js +1 -0
- package/chunk-ZYUKP5CS.js +1 -0
- package/index.html +2 -2
- package/main-WZFPMKCC.js +1 -0
- package/package.json +1 -1
- package/{styles-CDWBWJYO.css → styles-S3CXMNLR.css} +1 -1
- package/chunk-2R6YFVI3.js +0 -1
- package/chunk-3WKDD2IN.js +0 -1
- package/chunk-4KMNVH5V.js +0 -1
- package/chunk-56COR7JJ.js +0 -1
- package/chunk-65ULQ2PN.js +0 -1
- package/chunk-6JYRURGN.js +0 -1
- package/chunk-6LUM2XU4.js +0 -2
- package/chunk-73LQ5WSC.js +0 -1
- package/chunk-BZKHWYFG.js +0 -1
- package/chunk-D6FCW3QQ.js +0 -1
- package/chunk-ETEYALHD.js +0 -1
- package/chunk-FJPFD4BF.js +0 -3
- package/chunk-FLOZ6FQA.js +0 -1
- package/chunk-JZCJ723Q.js +0 -1
- package/chunk-MLTG5TKC.js +0 -1
- package/chunk-NQVULKI2.js +0 -1
- package/chunk-PHQYY3GW.js +0 -1
- package/chunk-Q3JJWGXW.js +0 -7
- package/chunk-RIRYVDWF.js +0 -1
- package/chunk-RNE5BRDO.js +0 -1
- package/chunk-SBFFXENC.js +0 -1
- package/chunk-TB27CACB.js +0 -1
- package/chunk-TS4YY2WO.js +0 -1
- package/chunk-WDE7EXR6.js +0 -1
- package/chunk-YOLNXRDT.js +0 -1
- package/chunk-Z43CKK5H.js +0 -6
- package/main-UH5FBFO3.js +0 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{a as We}from"./chunk-KHIKPOXK.js";import{a as Ue}from"./chunk-BRTUMDFG.js";import{a as Nt,b as Wt}from"./chunk-DNHLTHLR.js";import{b as H}from"./chunk-MHZPUJQF.js";import{a as pt}from"./chunk-PTG2C2YJ.js";import{a as nt}from"./chunk-XFRVNXF6.js";import{a as Re,b as se,c as Ee,d as le,e as ye,f as ct,g as Kt,h as Pe,i as Ge,k as mt,l as Ne,m as be,n as zt,o as Ae,p as ne,q as ut,r as Oe}from"./chunk-LFQXDL42.js";import{b as He}from"./chunk-TQE7OBBP.js";import{a as De,c as ae}from"./chunk-ZRPJ3QZT.js";import{a as pe,b as _t,d as Xt,e as Ht,g as Ve,i as dt,l as ce,n as Ft,o as jt,r as me,s as ue,x as Le,y as je}from"./chunk-3CRA7LUM.js";import{c as Bt}from"./chunk-6SIZVSDW.js";import{ia as lt}from"./chunk-JOBMLOGZ.js";import{$b as X,A as Et,Ab as I,Ac as at,Bb as v,Cb as a,Db as r,E as Ze,Eb as _,Fb as W,Gb as q,Hb as Ke,Ib as k,Mc as K,Ob as g,Oc as st,Pb as C,Qb as M,Ra as s,Rb as Je,S as we,Sb as et,Tb as xe,Ub as D,Vb as p,Y as $,Ya as fe,Yb as j,_b as Q,da as f,ea as S,eb as re,ec as Se,fc as Te,gc as he,hc as m,ia as wt,ic as Y,jc as V,kb as d,kc as Pt,l as Dt,mc as Gt,nc as bt,oc as Vt,p as Ye,pa as yt,qa as Rt,tb as c,tc as Lt,ua as O,uc as ze,vb as $e,vc as Ut,wc as tt,yb as F,zb as x}from"./chunk-QDAWQNBQ.js";import{a as N,c as Mt}from"./chunk-C6Q5SG76.js";var gt=class e{fromString(n){if(!n)return null;let t=n.match(/(\d+)([smhDWMY])/);return t&&{value:parseInt(t[1]),unit:t[2]}}toString(n,t){return`${n}${t}`}static \u0275fac=function(t){return new(t||e)};static \u0275prov=we({token:e,factory:e.\u0275fac,providedIn:"root"})};var ke=class e{#e=$(He);s3Providers=H(this.getS3Config("Providers"));s3Regions=H(this.getS3Config("Regions"));s3RegionHosts=H(this.getS3Config("RegionHosts"));s3StorageClasses=H(this.getS3Config("StorageClasses"));storjSatellites=H(this.getStorjConfig("Satellites"));storjAuthenticationMethods=H(this.getStorjConfig("AuthenticationMethods"));openstackProviders=H(this.getOpenstackConfig("Providers"));openstackVersions=H(this.getOpenstackConfig("Versions"));gcsLocations=H(this.getGcsConfig("Locations"));gcsStorageClasses=H(this.getGcsConfig("StorageClasses"));getS3Config(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":n}}).pipe(Ye(t=>this.#t(t)))}createS3IamUser(n,t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":n,"s3-password":t}})}createS3PolicyIAM(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:n}})}getStorjConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":n}}).pipe(Ye(t=>this.#t(t)))}getOpenstackConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":n}}).pipe(Ye(t=>this.#t(t)))}getGcsConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":n}}).pipe(Ye(t=>this.#t(t)))}#t(n){return(n.Result&&typeof n.Result=="object"&&Object.entries(n.Result).map(([t,o])=>({key:t,value:o})))??[]}static \u0275fac=function(t){return new(t||e)};static \u0275prov=we({token:e,factory:e.\u0275fac,providedIn:"root"})};function Be(e){return e==null?"":":"+e.toString()}function oe(e){return e==null?"":e.startsWith("/")?e:"/"+e}function R(e,n){let t={},o={};return n.searchParams.forEach((i,l)=>{ve.find(u=>u.key===e)?.dynamicFields?.includes(l)?o[l]=decodeURIComponent(i):t[l]=decodeURIComponent(i)}),{advanced:t,dynamic:o}}function G(e,n=!1){let t=e.map(([i,l])=>`${i}=${l?encodeURIComponent(l.toString()):""}`).join("&");return t?(n?"":"?")+t:""}function Ct(e){let n=e.destinationType,t=ve.find(o=>o.customKey===n||o.key===n);if(!t)throw new Error("Invalid destination type");return t?.mapper.to(e)??""}function At(e){let n=URL.canParse(e),t=e.split("://")[0],o=e.split("://")[1],i="http://"+o;if(o.startsWith("%")&&t==="file")return ve.find(u=>u.customKey===t||u.key===t)?.mapper.from(t,new URL("http://localhost"),e);let l=new URL(i);if(!n)throw new Error("Invalid target path");return ve.find(u=>u.customKey===t||u.key===t)?.mapper.from(t,l,e)}var T=new ne,ve=[{key:"file",displayName:"File system",description:"Store backups on your local file system.",customFields:{path:{type:"FolderTree",name:"path",shortDescription:"File path",longDescription:"The path to store the backup",formElement:e=>T.control(e??"")}},mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${e.custom.path}${n}`},from:(e,n,t)=>{let i=t.startsWith("file:///")?t.split("file:///")[1]:t.split("file://")[1],u=i.startsWith("%")?i:"/"+i;return N({destinationType:e,custom:{path:u}},R(e,n))}}},{key:"ssh",displayName:"SSH",description:"Store backups in SSH.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"The server to connect to",formElement:e=>T.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:e=>T.control(e??"",[Ee.required,Ee.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>T.control(e??"")}},dynamicFields:["auth-username"],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:"This is a path to a private key file locally on the machine",longDescription:"This is a path to a private key file locally on the machine"}],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Be(t)+oe(i)+n}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"s3",displayName:"S3 compatible bucket",description:"Store backups in any S3 compatible bucket.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>T.control(e??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:e=>e.get(ke).s3Providers},"use-ssl","auth-username","auth-password"],advancedFields:[{name:"s3-client",type:"Enumeration",options:["aws","minio"]},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(ke).s3StorageClasses}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+oe(t)+o}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},R(e,n))}},{key:"gcs",displayName:"Google Cloud Storage",description:"Store backups in Google Cloud Storage.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(ke).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(ke).gcsStorageClasses},"authid"],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${e.custom.path}${n}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"googledrive",displayName:"Google Drive",description:"Store backups in Google Drive.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>T.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"pcloud",displayName:"pCloud",description:"Store backups in pCloud.",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>O([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:"Server",longDescription:"Server",formElement:e=>T.control(e??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>T.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>{let o=n.pathname.replace(/^\//,"");return console.log("pathWithoutPrefixSlash",o),N({destinationType:e,custom:{server:n.hostname,path:o}},R(e,n))}}},{key:"azure",displayName:"Azure Blob Storage",description:"Store backups in Azure Blob Storage.",customFields:{path:{type:"String",name:"path",shortDescription:"Container name",longDescription:"Container name",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"onedrivev2",displayName:"OneDrive",description:"Store backups in OneDrive.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"od4b",displayName:"OneDrive Business",description:"Store backups in OneDrive Business.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>T.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>T.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Be(t)+oe(i)+n}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"mssp",displayName:"Microsoft SharePoint",description:"Store backups in Microsoft SharePoint.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>T.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>T.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Be(t)+oe(i)+n}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"sharepoint",displayName:"Microsoft SharePoint v2",description:"Store backups in Microsoft SharePoint.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"dropbox",displayName:"Dropbox",description:"Store backups in Dropbox.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"box",displayName:"Box.com",description:"Store backups in Box.com.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"jottacloud",displayName:"Jottacloud",description:"Store backups in Jottacloud.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"b2",displayName:"B2 Cloud Storage",description:"Store backups in B2 Cloud Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>T.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Application ID"},{name:"auth-password",shortDescription:"Application Key"}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+oe(t)+o}`},from:(e,n,t)=>N({destinationType:e,custom:{bucket:n.hostname,path:n.pathname}},R(e,n))}},{key:"e2",displayName:"IDrive e2",description:"Store backups in IDrive e2.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>T.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Access ID"},{name:"auth-password",shortDescription:"Access Secret"}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+oe(t)+o}`},from:(e,n,t)=>N({destinationType:e,custom:{bucket:n.hostname,path:n.pathname}},R(e,n))}},{key:"mega",displayName:"Mega.nz",description:"Store backups in Mega.nz.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"msgroup",displayName:"Microsoft Office 365 Group",description:"Store backups in Microsoft Office 365 Group.",oauthField:"authid",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:"Group email",longDescription:"Group email",formElement:e=>T.control(e??"",[Ee.email])},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"cloudfiles",displayName:"Rackspace CloudFiles",description:"Store backups in Rackspace CloudFiles.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>T.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>T.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Be(t)+oe(i)+n}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"rclone",displayName:"Rclone",description:"Store backups in Rclone.",dynamicFields:[{name:"rclone-local-repository",shortDescription:"Local repository",defaultValue:""},{name:"rclone-remote-repository",shortDescription:"Remote repository",defaultValue:""},{name:"rclone-remote-path",shortDescription:"Path on remote repository",defaultValue:""}],mapper:{to:e=>{let n=e.dynamic["rclone-remote-repository"],t=e.dynamic["rclone-remote-path"],o=Object.entries(e.dynamic).filter(([l])=>!["rclone-remote-repository","rclone-remote-path"].includes(l)),i=G([...Object.entries(e.advanced),...o]);return`${e.destinationType}://${n}/${t+i}`},from:(e,n,t)=>{let{advanced:o,dynamic:i}=R(e,n);return N({destinationType:e,dynamic:N({"rclone-remote-repository":n.hostname,"rclone-remote-path":n.pathname},i)},o)}}},{key:"openstack",displayName:"OpenStack Object Storage",description:"Store backups in OpenStack Object Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket",longDescription:"Bucket",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"openstack-authuri",shortDescription:"Auth URI",type:"Enumeration",loadOptions:e=>e.get(ke).openstackProviders},{name:"openstack-version",shortDescription:"Version",type:"Enumeration",loadOptions:e=>e.get(ke).openstackVersions},{name:"openstack-domain-name",shortDescription:"Domain name"},{name:"openstack-tenant-name",shortDescription:"Tenant name"},{name:"openstack-region",shortDescription:"Region"}],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{bucket:t}=e.custom;return`${e.destinationType}://${t+n}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},R(e,n))}},{key:"webdav",displayName:"WebDAV",description:"Store backups in WebDAV.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>T.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>T.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"},{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let{port:n,server:t,path:o}=e.custom,i=e.dynamic["use-ssl"],l=G([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([u])=>u!=="use-ssl")]);return`${e.destinationType}${i?"s":""}://${t+Be(n)+oe(o)+l}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"aftp",displayName:"FTP",description:"Store backups in FTP.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>T.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>T.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let{port:n,server:t,path:o}=e.custom,i=G([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([l])=>l!=="use-ssl")]);return`${e.destinationType}://${t+Be(n)+oe(o)+i}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"sia",displayName:"Sia Decentrilized Cloud",description:"Store backups in Sia Decentrilized Cloud.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>T.control(e??"")}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let n=e.custom.server,t=e.dynamic["sia-targetpath"],o=G([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([i])=>i!=="sia-targetpath")]);return`${e.destinationType}://${n+oe(t)+o}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.pathname}},R(e,n))}},{key:"cos",displayName:"Tencent COS",description:"Store backups in Tencent COS.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"cos-bucket",shortDescription:"Bucket",order:1},{name:"cos-region",shortDescription:"Region",order:2},{name:"cos-app-id",shortDescription:"COS App Id",order:3},{name:"cos-secret-id",shortDescription:"COS Secret Id",order:4},{name:"cos-secret-key",shortDescription:"COS Secret Key",order:5}],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([o])=>o!=="cos-targetpath")]);return`${e.destinationType}://${n+t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.pathname}},R(e,n))}},{key:"tahoe",displayName:"Tahoe LAFS",description:"Store backups in Tahoe LAFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>T.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>T.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")},username:{type:"String",name:"username",shortDescription:"Username",longDescription:"Username",formElement:e=>T.control(e??"")},password:{type:"Password",name:"password",shortDescription:"Password",longDescription:"Password",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"}],mapper:{to:e=>{let{port:n,server:t,path:o,username:i,password:l}=e.custom,u={"auth-username":i,"auth-password":l},h=e.dynamic["use-ssl"],P=G([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([A])=>A!=="use-ssl"),...Object.entries(u)]);return`${e.destinationType}${h?"s":""}://${t+Be(n)+oe(o)+P}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"cifs",displayName:"CIFS",description:"Store backups in CIFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>T.control(e??"")},share:{type:"String",name:"share",shortDescription:"Share Name",longDescription:"Share Name",formElement:e=>T.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:["transport","auth-username","auth-password","auth-domain"],mapper:{to:e=>{let{share:n,server:t,path:o,username:i,password:l}=e.custom,u={"auth-username":i,"auth-password":l},h=G([...Object.entries(e.advanced),...Object.entries(u)]);return`${e.destinationType}://${t+oe(n)+oe(o)+h}`},from:(e,n,t)=>{let o=n.pathname.split("/")[1],i=n.pathname.split("/").slice(2).join("/");return N({destinationType:e,custom:{server:n.hostname,share:o,path:i}},R(e,n))}}},{key:"storj",customKey:"storjAccessGrant",displayName:"Storj Access Grant",description:"Store backups in Storj Access Grant.",dynamicFields:[{name:"storj-shared-access",shortDescription:"Access Grant"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server"}],mapper:{to:e=>`storj://storj.io/config?storj-auth-method=Access%20grant&storj-satellite=us1.storj.io%3A7777&storj-api-key&storj-secret&${G([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>N({destinationType:e},R(e,n))}},{key:"storj",customKey:"storjApiKey",displayName:"Storj API Key",description:"Store backups in Storj API Key.",dynamicFields:[{name:"storj-satellite",shortDescription:"Satellite",type:"Enumeration",loadOptions:e=>e.get(ke).storjSatellites},{name:"storj-api-key",shortDescription:"API Key"},{name:"storj-secret",shortDescription:"Secret"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server"}],mapper:{to:e=>`storj://storj.io/config?storj-auth-method=API%20key&${G([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>N({destinationType:e},R(e,n))}}];var qt=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,ft=class e{generate(n,t=qt){let o;do o=this.generatePassword(n,t);while(this.calculatePasswordStrength(o)<5);return o}generatePassword(n,t=qt){let o=this;return Array.apply(null,{length:n}).map(()=>{let i;for(;;)if(i=String.fromCharCode(o.#e()),t.test(i))return i},this).join("")}calculatePasswordStrength(n){let t=1;return n.length>=8&&t++,n.match(/[a-z]/)&&n.match(/[A-Z]/)&&t++,n.match(/\d+/)&&t++,n.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&t++,Math.min(t,5)}#e(){if(window.crypto&&window.crypto.getRandomValues){let n=new Uint8Array(1);return window.crypto.getRandomValues(n),n[0]}else if(window.msCrypto&&window.msCrypto.getRandomValues){let n=new Uint8Array(1);return window.msCrypto.getRandomValues(n),n[0]}else return Math.floor(Math.random()*256)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=we({token:e,factory:e.\u0275fac,providedIn:"root"})};var an=["formRef"];function sn(e,n){if(e&1&&(a(0,"spk-option",27),m(1),r()),e&2){let t=n.$implicit;c("value",t.Key),s(),Y(t.DisplayName)}}function ln(e,n){if(e&1&&_(0,"spk-progress-bar",38),e&2){let t=p(3);$e("warn",t.calculatePasswordStrength()===1)("tertiary",t.calculatePasswordStrength()===2)("primary",t.calculatePasswordStrength()===4)("success",t.calculatePasswordStrength()===5),c("value",t.calculatePasswordStrength()*(100/5))}}function pn(e,n){e&1&&(a(0,"span",33),M(1,9),r())}function cn(e,n){e&1&&(g(0,7,1),_(1,"spk-icon"),C())}function mn(e,n){e&1&&(g(0,7,2),_(1,"spk-icon"),C())}function un(e,n){e&1&&(g(0,10,1),_(1,"spk-icon",40),C())}function _n(e,n){e&1&&(g(0,10,2),_(1,"spk-icon"),C())}function dn(e,n){if(e&1){let t=k();a(0,"button",39),D("click",function(){f(t);let i=p(3);return S(i.copyPassword())}),g(1,10),d(2,un,2,0)(3,_n,2,0),C(),r()}if(e&2){let t=p(3);s(2),F(t.copiedPassword()?2:3)}}function Fn(e,n){e&1&&(a(0,"spk-alert",37),M(1,11),r())}function gn(e,n){if(e&1){let t=k();a(0,"div",28)(1,"spk-form-field")(2,"label",29),g(3,6),_(4,"sup"),C(),r(),_(5,"input",30),r(),d(6,ln,1,9,"spk-progress-bar",31),a(7,"spk-form-field"),_(8,"input",32),d(9,pn,2,0,"span",33),r(),a(10,"div",34)(11,"button",35),D("click",function(){f(t);let i=p(2);return S(i.showPassword.set(!i.showPassword()))}),g(12,7),d(13,cn,2,0)(14,mn,2,0),C(),r(),a(15,"button",35),D("click",function(){f(t);let i=p(2);return S(i.generatePassword())}),g(16,8),_(17,"spk-icon"),C(),r(),d(18,dn,4,1,"button",36),r(),d(19,Fn,2,0,"spk-alert",37),r()}if(e&2){let t=p(2);s(5),c("type",t.showPassword()?"text":"password"),s(),F(t.generalForm.value.password?6:-1),s(2),c("type",t.showPassword()?"text":"password"),s(),F(t.generalForm.value.repeatPassword&&t.generalForm.value.repeatPassword!==t.generalForm.value.password?9:-1),s(4),F(t.showPassword()?13:14),s(5),F(t.showCopyPassword()?18:-1),s(),F(t.generalForm.value.password&&t.generalForm.value.password===t.generalForm.value.repeatPassword?19:-1)}}function Cn(e,n){if(e&1&&(a(0,"spk-select",24)(1,"label",25),M(2,5),r(),_(3,"input",26),I(4,sn,2,2,"spk-option",27,x),r(),d(6,gn,20,7,"div",28)),e&2){let t=p();c("displayFn",t.displayFn()),s(4),v(t.encryptionOptions()),s(2),F(t.encryptionFieldSignal()!==""?6:-1)}}function fn(e,n){if(e&1&&(a(0,"button",22),g(1,12),_(2,"spk-icon"),C(),r()),e&2){let t=p();c("disabled",t.generalForm.invalid)}}function Sn(e,n){if(e&1&&(a(0,"spk-tooltip",23)(1,"button",22),g(2,13),_(3,"spk-icon"),C(),r()()),e&2){let t=p();c("disabled",!(t.showCopyPassword()&&!t.copiedPassword())),s(),c("disabled",t.generalForm.invalid||t.showCopyPassword()&&!t.copiedPassword())}}var qe=new ne,Qt=(e={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>qe.group({name:qe.control(e.name,[Ee.required]),description:qe.control(e.description),encryption:qe.control(e.encryption,[Wt()]),password:qe.control(e.password,[Nt(n=>n?.value.encryption!=="",[Ee.required])]),repeatPassword:qe.control(e.repeatPassword,[Nt(n=>n?.value.encryption!=="",[Ee.required])])}),kt={Key:"",DisplayName:"None"},Ot=class e{#e=$(ae);#t=$(De);#o=$(ft);#i=$(_e);#n=$(pt);formRef=fe.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=O(!1);copiedPassword=O(!1);showCopyPassword=O(!1);encryptionEffect=st(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});calculatePasswordStrength=K(()=>{let t=this.generalFormSignal()?.password??"";return this.#o.calculatePasswordStrength(t)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit()}async copyPassword(){let n=this.generalForm.controls.password.value;await this.#r(n??""),this.copiedPassword.set(!0)}async#r(n){try{await navigator.clipboard.writeText(n)}catch{try{let o=document.createElement("textarea");o.value=n,document.body.appendChild(o),o.select(),document.execCommand("copy"),document.body.removeChild(o)}catch(o){console.error("Failed to copy text: ",o)}}}displayFn(){let n=this.#n.systemInfo()?.EncryptionModules??[];return t=>{let o=[kt,...n].find(i=>i.Key===t);return o?`${o.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let n=this.#o.generate(16);this.generalForm.controls.password.setValue(n),this.generalForm.controls.repeatPassword.setValue(n),this.showCopyPassword.set(!0)}next(){this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({type:e,selectors:[["app-general"]],viewQuery:function(t,o){t&1&&Se(o.formRef,an,5),t&2&&Te()},decls:20,vars:3,consts:()=>{let n;n=$localize`Your backup name`;let t;t=$localize`Your backup description`;let o;o=$localize`General backup settings`;let i;i=$localize` Backup name ${"\uFFFD#7\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#7\uFFFD"}:CLOSE_SUPERSCRIPT:`;let l;l=$localize`Backup description`;let u;u=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let h;h=$localize`Encryption`;let P;P=$localize`Encryption`;let A;A=$localize`Password`;let b;b=$localize`Repeat password`;let B;B=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let Z;Z=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_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_SPK_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,Z=xe(Z);let U;U=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let J;J=$localize`Passwords do not match`;let te;te=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,te=xe(te);let E;E=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let y;y=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let z;return z=$localize` Continue ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],o,i,l,u,P,B,Z,U,J,te,E,y,z,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],["for","backupName"],["type","text","tabindex","1","placeholder",n,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",t,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["message","Remember to copy the password",1,"primary",3,"disabled"],[3,"displayFn"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",h,"formControlName","encryption"],[3,"value"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",A,"formControlName","password",3,"type"],[1,"raised",3,"warn","tertiary","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",b,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(t,o){if(t&1){let i=k();a(0,"form",14,0),D("submit",function(){return f(i),S(o.next())}),a(2,"h3",15),M(3,1),r(),a(4,"spk-form-field")(5,"label",16),g(6,2),_(7,"sup"),C(),r(),_(8,"input",17),r(),a(9,"spk-form-field")(10,"label",18),M(11,3),r(),_(12,"textarea",19),r(),d(13,Cn,7,2),a(14,"div",20)(15,"button",21),D("click",function(){return f(i),S(o.exit())}),g(16,4),_(17,"spk-icon"),C(),r(),d(18,fn,3,1,"button",22)(19,Sn,4,2,"spk-tooltip",23),r()()}t&2&&(c("formGroup",o.generalForm),s(13),F(o.isNew()?13:-1),s(5),F(o.encryptionFieldSignal()===""?18:19))},dependencies:[Oe,Pe,se,le,ye,Ne,Ae,ce,ue,Ve,pe,me,jt,_t,je],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(--warn-500)}.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%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}"],changeDetection:0})};var Tn=["formRef"],hn=(e,n)=>({index:e,formView:n,formGroupName:"advancedOptions",destinationType:null,oauthField:null}),Dn=e=>({$implicit:e});function En(e,n){e&1&&(g(0,4,1),_(1,"spk-icon",16),C())}function yn(e,n){if(e&1&&(a(0,"spk-option",19),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),Y(t)}}function Pn(e,n){e&1&&(a(0,"p",16),M(1,10),r())}function Nn(e,n){if(e&1&&(a(0,"spk-option",19),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),Y(t.name)}}function An(e,n){if(e&1){let t=k();g(0,7,1),a(1,"button",32,2),D("click",function(){let i=f(t).$implicit,l=p();return S(l.addNewOption(i))}),r(),C()}if(e&2){let t=n.$implicit;s(),Je(t.name),et(0)}}function On(e,n){e&1&&Ke(0)}function kn(e,n){if(e&1&&d(0,On,1,0,"ng-container",33),e&2){let t=n.$implicit,o=n.$index;p();let i=he(38);c("ngTemplateOutlet",i)("ngTemplateOutletContext",ze(5,Dn,Ut(2,hn,o,t)))}}function $n(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function xn(e,n){if(e&1&&(a(0,"app-file-tree",36)(1,"label",42),m(2),d(3,$n,3,1,"spk-tooltip",43),r(),_(4,"input",44),r()),e&2){let t,o=p().$implicit,i=p();c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name))("accepts",o.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name)}}function In(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function vn(e,n){if(e&1&&(a(0,"app-file-tree",37)(1,"label",42),m(2),d(3,In,3,1,"spk-tooltip",43),r(),_(4,"input",44),r()),e&2){let t,o=p().$implicit,i=p();c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name)),s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name)}}function Mn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function wn(e,n){e&1&&(a(0,"spk-icon",45),m(1,"link"),r())}function Rn(e,n){e&1&&(a(0,"spk-icon",45),m(1,"textbox"),r())}function Gn(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",42),m(2),d(3,Mn,3,1,"spk-tooltip",43),r(),_(4,"input",44),d(5,wn,2,0,"spk-icon",45)(6,Rn,2,0,"spk-icon",45),r()),e&2){let t,o=p().$implicit;s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name),s(),F(o.formView.type==="Path"?5:6)}}function bn(e,n){if(e&1){let t=k();a(0,"span",49),D("click",function(){f(t);let i=p(2).$implicit,l=p();return S(l.oauthStartTokenCreation(i.formViewType))}),m(1,"AuthID"),r()}}function Vn(e,n){e&1&&(a(0,"spk-icon",45),m(1,"password"),r())}function Ln(e,n){if(e&1){let t=k();a(0,"spk-icon",50),D("click",function(){f(t);let i=p(2).$implicit;return S(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye "),r()}}function Un(e,n){if(e&1){let t=k();a(0,"spk-icon",50),D("click",function(){f(t);let i=p(2).$implicit;return S(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye-slash "),r()}}function Bn(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",42),m(2),r(),_(3,"input",46),d(4,bn,2,0,"span",47)(5,Vn,2,0,"spk-icon",45)(6,Ln,2,0,"spk-icon",48)(7,Un,2,0,"spk-icon",48),r()),e&2){let t,o=p().$implicit;s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name),c("type",o.formView.showPassword?"text":"password"),s(),F(o.oauthField===o.formView.name?4:5),s(2),F(o.formView.showPassword?6:7)}}function Kn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function zn(e,n){if(e&1&&(a(0,"spk-option",19),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),Y(t)}}function Xn(e,n){if(e&1&&(a(0,"spk-select")(1,"label",42),m(2),d(3,Kn,3,1,"spk-tooltip",43),r(),_(4,"input",51),I(5,zn,2,2,"spk-option",19,x),r()),e&2){let t,o=p().$implicit;s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name),s(),v(o.formView.options)}}function Hn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function jn(e,n){if(e&1&&(a(0,"spk-option",19),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),Y(t)}}function Wn(e,n){if(e&1&&(a(0,"div",38)(1,"label",42),m(2),d(3,Hn,3,1,"spk-tooltip",43),r(),a(4,"div",52)(5,"spk-form-field"),_(6,"input",53),a(7,"spk-icon",45),m(8,"resize"),r()(),a(9,"spk-select"),_(10,"label")(11,"input",54),I(12,jn,2,2,"spk-option",19,x),r()()()),e&2){let t,o=p().$implicit,i=p();c("formGroupName",o.formView.name),s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(3),Q("id","destination-",o.formGroupName,"-",o.index,""),s(6),v(i.sizeOptions())}}function qn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Qn(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",42),m(2),d(3,qn,3,1,"spk-tooltip",43),r(),_(4,"input",55),a(5,"spk-icon",45),m(6,"numpad"),r()()),e&2){let t,o=p().$implicit;s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name)}}function Yn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Zn(e,n){if(e&1&&(a(0,"spk-toggle",39)(1,"label",42),m(2),d(3,Yn,3,1,"spk-tooltip",43),r(),_(4,"input",56),r()),e&2){let t,o=p().$implicit;s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name)}}function Jn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function eo(e,n){e&1&&(a(0,"spk-option",58),m(1,"None"),r()),e&2&&c("value","None")}function to(e,n){if(e&1&&(a(0,"spk-option",19),m(1),_(2,"spk-checkbox",59),r()),e&2){let t=p().$implicit;c("value",t),s(),V(" ",t," ")}}function no(e,n){if(e&1&&d(0,eo,2,1,"spk-option",58)(1,to,3,2,"spk-option",19),e&2){let t=n.$implicit;F(t==="None"?0:1)}}function oo(e,n){if(e&1&&(a(0,"spk-select",40)(1,"label",42),m(2),d(3,Jn,3,1,"spk-tooltip",43),r(),_(4,"input",57),I(5,no,2,1,null,null,x),r()),e&2){let t,o=p().$implicit;c("selectMultiple",!0),s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),j("formControlName",o.formView.name),s(),v(o.formView.options)}}function io(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function ro(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",42),m(2),d(3,io,3,1,"spk-tooltip",43),r(),_(4,"input",44),r()),e&2){let t,o=p().$implicit;s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name)}}function ao(e,n){if(e&1){let t=k();a(0,"div",34),W(1,35),d(2,xn,5,14,"app-file-tree",36)(3,vn,5,10,"app-file-tree",37)(4,Gn,7,10,"spk-form-field")(5,Bn,8,11,"spk-form-field")(6,Xn,7,9,"spk-select")(7,Wn,14,9,"div",38)(8,Qn,7,9,"spk-form-field")(9,Zn,5,9,"spk-toggle",39)(10,oo,7,7,"spk-select",40)(11,ro,5,9,"spk-form-field"),q(),a(12,"button",41),D("click",function(){let i=f(t).$implicit,l=p();return S(l.removeFormView(i.formView,0))}),a(13,"spk-icon"),m(14,"x-circle"),r()()()}if(e&2){let t=n.$implicit;s(),c("formGroupName",t.formGroupName),s(),F(t.formView.type==="FileTree"?2:t.formView.type==="FolderTree"?3:t.formView.type==="String"||t.formView.type==="Path"?4:t.formView.type==="Password"?5:t.formView.type==="Enumeration"?6:t.formView.type==="Size"?7:t.formView.type==="Integer"?8:t.formView.type==="Boolean"?9:t.formView.type==="Flags"?10:t.formView.type==="Timespan"?11:-1)}}var Qe=new ne,Yt=["Bytes","KB","MB","GB","TB","PB"],so=[{value:"",name:$localize`Keep all backups`},{value:"time",name:$localize`Delete backups that are older than`},{value:"versions",name:$localize`Keep a specific number of backups`},{value:"smart",name:$localize`Smart backup retention`},{value:"custom",name:$localize`Custom backup retention`}],lo=1024*1024*1024*2,po=1024*1024*5,Zt=(e={remoteVolumeSize:50,size:"MB",backupRetention:"",advancedOptions:[]})=>Qe.group({remoteVolumeSize:Qe.group({size:Qe.control(e.remoteVolumeSize),unit:Qe.control(e.size)}),backupRetention:Qe.control(e.backupRetention),advancedOptions:Qe.group({})}),$t=class e{#e=$(_e);#t=$(ae);#o=$(De);formRef=fe.required("formRef");optionsForm=this.#e.optionsForm;selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;sizeOptions=O(Yt);retentionOptions=O(so);volumeSizeSignal=H(this.optionsForm.controls.remoteVolumeSize.get("size")?.valueChanges.pipe(Et(300))??Dt(null));volumeUnitSignal=H(this.optionsForm.controls.remoteVolumeSize.get("unit")?.valueChanges.pipe(Et(300))??Dt(null));exceededVolumeSize=K(()=>{let n=this.volumeSizeSignal()??this.optionsForm.controls.remoteVolumeSize.get("size")?.value,t=this.volumeUnitSignal()??this.optionsForm.controls.remoteVolumeSize.get("unit")?.value;if(n==null||t===null||t===void 0)return!1;let o=n*Math.pow(1024,Yt.indexOf(t));return o>lo||o<po});oauthStartTokenCreation(n){}getFormFieldValue(n,t,o){return this.optionsForm.controls.advancedOptions.controls[o].value}removeFormView(n,t){this.#e.removeOptionFromFormGroup(n)}addNewOption(n){this.#e.addOptionToFormGroup(n)}retentionOptionDisplayFn(){let n=this.retentionOptions();return t=>{let o=n.find(i=>i.value===t);return o?o.name:""}}displayFn(){let n=this.#e.advancedOptions();return t=>{let o=n.find(i=>i.name===t);return o?`${o.name}`:""}}goBack(){this.#t.navigate(["schedule"],{relativeTo:this.#o.parent})}submit(){this.#e.submit()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({type:e,selectors:[["app-advanced-options-settings"]],viewQuery:function(t,o){t&1&&Se(o.formRef,Tn,5),t&2&&Te()},decls:46,vars:7,consts:()=>{let n;n=$localize`Select an option...`;let t;t=$localize`Options`;let o;o=$localize` Remote volume size ${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/*9:1\uFFFD"}:CLOSE_BLOCK_IF:`;let i;i=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#18\uFFFD"}:START_LINK: Read more ${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-square-out${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#18\uFFFD"}:CLOSE_LINK:`;let l;l=$localize`Backup retention`;let u;u=$localize` Advanced options ${"\uFFFD#29\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#30\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#30\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#32\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*34:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1:${"\uFFFD0:1\uFFFD"}:INTERPOLATION:${"[\uFFFD/#30\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*34:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#32\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SPK_MENU:`,u=xe(u);let h;h=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#42\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let P;P=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#45\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `;let A;return A=$localize` The chosen size is outside the recommended range. This may cause performance issues, excessively large temporary files or other problems. `,[["formRef",""],["fieldTemplate",""],["option",""],t,o,i,l,u,h,P,A,[3,"submit","formGroup"],[1,"title-30"],[1,"remote-volume-wrap"],["formGroupName","remoteVolumeSize",1,"row-inputs"],["for","size"],[1,"warning"],["type","number","id","size","formControlName","size"],["type","text","placeholder",n,"formControlName","unit"],[3,"value"],["href","https://forum.duplicati.com/t/choosing-sizes-in-duplicati/17683","target","_blank",1,"spk-primary"],["suffix",""],[3,"displayFn"],["type","text","formControlName","backupRetention"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small"],["menu",""],["type","button"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["type","button",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["type","search",3,"id","formControlName"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["type","search","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],["type","text","id","text",3,"formControlName"],["deselect","",3,"value"],[1,"raised","primary"]]},template:function(t,o){if(t&1){let i=k();a(0,"form",11,0),D("submit",function(){return f(i),S(o.submit())}),a(2,"h3",12),M(3,3),r(),a(4,"div",13)(5,"div",14)(6,"spk-form-field")(7,"label",15),g(8,4),d(9,En,2,0,"spk-icon",16),C(),r(),_(10,"input",17),r(),a(11,"spk-select"),_(12,"input",18),I(13,yn,2,2,"spk-option",19,x),r()(),d(15,Pn,2,0,"p",16),a(16,"p"),g(17,5),a(18,"a",20),_(19,"spk-icon",21),r(),C(),r()(),a(20,"spk-select",22)(21,"label",15),M(22,6),r(),_(23,"input",23),I(24,Nn,2,2,"spk-option",19,x),r(),a(26,"app-toggle-card",24),W(27,25),g(28,7),a(29,"spk-menu")(30,"button",26),_(31,"spk-icon"),r(),W(32,27),I(33,An,3,1,"button",28,x),q(),r(),C(),q(),I(35,kn,1,7,"ng-container",null,x),r(),d(37,ao,15,2,"ng-template",null,1,at),a(39,"div",29)(40,"button",30),D("click",function(){return f(i),S(o.goBack())}),g(41,8),_(42,"spk-icon"),C(),r(),a(43,"button",31),g(44,9),_(45,"spk-icon"),C(),r()()()}t&2&&(c("formGroup",o.optionsForm),s(9),F(o.exceededVolumeSize()?9:-1),s(4),v(o.sizeOptions()),s(2),F(o.exceededVolumeSize()?15:-1),s(5),c("displayFn",o.retentionOptionDisplayFn()),s(4),v(o.retentionOptions()),s(2),c("disallowToggle",!0),s(7),v(o.nonSelectedOptions()),s(2),v(o.selectedOptions()),s(8),$e("loader",o.isSubmitting()))},dependencies:[Oe,Pe,se,Ge,Re,le,ye,Ne,Ae,be,lt,Ft,ue,Ve,pe,ce,Le,dt,me,je,We,Ue],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}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 40px;align-items:flex-end}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var co=["formRef"];function mo(e,n){if(e&1&&(a(0,"spk-option",38),m(1),r()),e&2){let t=n.$implicit;c("value",t.key),s(),Y(t.label)}}function uo(e,n){if(e&1){let t=k();a(0,"div",26)(1,"spk-form-field")(2,"label",27),M(3,8),r(),a(4,"input",28,1),D("focus",function(){f(t);let i=he(5);return S(i.showPicker())}),r(),a(6,"spk-icon",29),m(7,"clock"),r()(),a(8,"spk-form-field"),_(9,"label",30),a(10,"input",31,2),D("focus",function(){f(t);let i=he(11);return S(i.showPicker())}),r(),a(12,"spk-icon",29),m(13,"calendar"),r()()(),W(14,32),a(15,"div",33)(16,"spk-form-field")(17,"label",34),M(18,9),r(),_(19,"input",35),r(),a(20,"spk-select",36),_(21,"input",37),I(22,mo,2,2,"spk-option",38,x),r()(),a(24,"app-toggle-card",39),W(25,40),M(26,10),q(),a(27,"div",41)(28,"spk-toggle",21),g(29,11),_(30,"input",42),C(),r(),a(31,"spk-toggle",21),g(32,12),_(33,"input",43),C(),r(),a(34,"spk-toggle",21),g(35,13),_(36,"input",44),C(),r(),a(37,"spk-toggle",21),g(38,14),_(39,"input",45),C(),r(),a(40,"spk-toggle",21),g(41,15),_(42,"input",46),C(),r(),a(43,"spk-toggle",21),g(44,16),_(45,"input",47),C(),r(),a(46,"spk-toggle",21),g(47,17),_(48,"input",48),C(),r()()(),q()}if(e&2){let t=p();s(20),c("displayFn",t.displayFn),s(2),v(t.unitOptions),s(2),c("disallowToggle",!0)}}var ee=new ne,Jt=[{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`}],en=(e={autoRun:!0,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}})=>ee.group({autoRun:ee.control(e.autoRun),nextTime:ee.group({time:ee.control(e.nextTime.time),date:ee.control(e.nextTime.date)}),runAgain:ee.group({repeatValue:ee.control(e.runAgain.repeatValue),repeatUnit:ee.control(e.runAgain.repeatUnit),allowedDays:ee.group({mon:ee.control(e.runAgain.allowedDays.mon),tue:ee.control(e.runAgain.allowedDays.tue),wed:ee.control(e.runAgain.allowedDays.wed),thu:ee.control(e.runAgain.allowedDays.thu),fri:ee.control(e.runAgain.allowedDays.fri),sat:ee.control(e.runAgain.allowedDays.sat),sun:ee.control(e.runAgain.allowedDays.sun)})})}),xt=class e{#e=$(_e);#t=$(ae);#o=$(De);formRef=fe.required("formRef");scheduleForm=this.#e.scheduleForm;scheduleFormSignal=this.#e.scheduleFormSignal;unitOptions=Jt;displayFn(n){let t=Jt.find(o=>o.key===n);return t?`${t.label}`:""}goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#o.parent})}next(){this.#t.navigate(["options"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({type:e,selectors:[["app-schedule"]],viewQuery:function(t,o){t&1&&Se(o.formRef,co,5),t&2&&Te()},decls:18,vars:2,consts:()=>{let n;n=$localize`Schedule`;let t;t=$localize` Automatically run backups ${"\uFFFD#7\uFFFD\uFFFD/#7\uFFFD"}:TAG_INPUT:`;let o;o=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let l;l=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let u;u=$localize`Next time`;let h;h=$localize`Run again every`;let P;P=$localize`Allowed days`;let A;A=$localize` Monday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let b;b=$localize` Tuesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let B;B=$localize` Wednesday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let Z;Z=$localize` Thursday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let U;U=$localize` Friday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let J;J=$localize` Saturday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`;let te;return te=$localize` Sunday ${"\uFFFD#48\uFFFD\uFFFD/#48\uFFFD"}:TAG_INPUT:`,[["formRef",""],["timeRef",""],["dateRef",""],n,t,o,i,l,u,h,P,A,b,B,Z,U,J,te,[3,"submit","formGroup"],[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox","formControlName","autoRun"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["formGroupName","nextTime",1,"row-inputs"],["for","time"],["type","time","id","time","formControlName","time",3,"focus"],["suffix",""],["for","date"],["type","date","id","date","formControlName","date",3,"focus"],["formGroupName","runAgain"],[1,"row-inputs"],["for","repeatValue"],["type","number","id","repeatValue","formControlName","repeatValue"],[3,"displayFn"],["type","text","id","repeatUnit","formControlName","repeatUnit"],[3,"value"],["formGroupName","allowedDays",3,"disallowToggle"],["title",""],[1,"days-wrap"],["type","checkbox","formControlName","mon"],["type","checkbox","formControlName","tue"],["type","checkbox","formControlName","wed"],["type","checkbox","formControlName","thu"],["type","checkbox","formControlName","fri"],["type","checkbox","formControlName","sat"],["type","checkbox","formControlName","sun"]]},template:function(t,o){if(t&1){let i=k();a(0,"form",18,0),D("submit",function(){return f(i),S(o.next())}),a(2,"h3",19),M(3,3),r(),a(4,"div",20)(5,"spk-toggle",21),g(6,4),_(7,"input",22),C(),r(),a(8,"p"),M(9,5),r()(),d(10,uo,49,2),a(11,"div",23)(12,"button",24),D("click",function(){return f(i),S(o.goBack())}),g(13,6),_(14,"spk-icon"),C(),r(),a(15,"button",25),g(16,7),_(17,"spk-icon"),C(),r()()()}if(t&2){let i;c("formGroup",o.scheduleForm),s(10),F((i=o.scheduleFormSignal())!=null&&i.autoRun?10:-1)}},dependencies:[Oe,Pe,se,Ge,Re,le,ye,Ne,Ae,be,ce,ue,me,Le,pe,Ve,Ue],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}.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 _o(e,n){if(e&1&&(a(0,"spk-option",2),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),Y(t.key)}}function Fo(e,n){if(e&1&&(a(0,"spk-option",2),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),Y(t.key)}}function go(e,n){if(e&1){let t=k();a(0,"spk-select",0)(1,"input",5),D("ngModelChange",function(i){f(t);let l=p(2);return S(l.updateStateExpression(i))}),r(),I(2,Fo,2,2,"spk-option",2,x),r()}if(e&2){let t,o=p(2);c("hideClearButton",!0)("displayFn",o.displayFn),s(),c("ngModel",(t=o.pathState())==null?null:t.expression),s(),v(o.fileGroupOptions())}}function Co(e,n){if(e&1){let t=k();a(0,"spk-form-field")(1,"input",5),D("ngModelChange",function(i){f(t);let l=p(2);return S(l.updateStateExpression(i))}),r()()}if(e&2){let t,o=p(2);s(),c("ngModel",(t=o.pathState())==null?null:t.expression)}}function fo(e,n){if(e&1){let t=k();a(0,"spk-select",0)(1,"input",1),D("ngModelChange",function(i){f(t);let l=p();return S(l.updateStateType(i))}),r(),I(2,_o,2,2,"spk-option",2,x),r(),d(4,go,4,3,"spk-select",0)(5,Co,2,1,"spk-form-field"),a(6,"div",3),D("click",function(){f(t);let i=p();return S(i.removeFilter())}),a(7,"spk-icon",4),m(8,"x-circle"),r()()}if(e&2){let t,o,i=p();c("hideClearButton",!0)("displayFn",i.displayFn),s(),c("ngModel",(t=i.pathState())==null?null:t.type),s(),v(i.expressionOptions()),s(2),F(((o=i.pathState())==null?null:o.type)==="-FileGroup"||((o=i.pathState())==null?null:o.type)==="+FileGroup"?4:5)}}var tn=[{key:"Excludes folders where name contains",value:"-FolderNameIncludes"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileNameIncludes"},{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:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"}],So=[{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"}],St=class e{path=Rt.required();pathChange=yt();remove=yt();expressionOptions=O(tn);fileGroupOptions=O(So);pathState=O(null);typeState=K(()=>{let n=this.pathState();return n?n.type:null});pathEffect=st(()=>{let n=this.path(),t=n.slice(1),o=n.startsWith("-")?"-":"+";return t.startsWith("/")&&t.endsWith("/")?this.pathState.set({type:`${o}Folder`,path:t,expression:t}):t.startsWith("*")&&t.endsWith("*/")?this.pathState.set({type:`${o}FolderNameIncludes`,path:t,expression:t.slice(1,-2)}):t.startsWith("[.*")&&t.endsWith("[^\\/]*]")?this.pathState.set({type:`${o}FileNameIncludes`,path:t,expression:t.slice(3,-7)}):t.startsWith("{")&&t.endsWith("}")?this.pathState.set({type:`${o}FileGroup`,path:t,expression:t.slice(1,-1)}):t.startsWith("[")&&t.endsWith("]")?this.pathState.set({type:`${o}Regex`,path:t,expression:t.slice(1,-1)}):t.startsWith("*.")?this.pathState.set({type:`${o}Extension`,path:t,expression:t.slice(2)}):this.pathState.set({type:`${o}Expression`,path:t,expression:t})});updateStateType(n){this.pathState.update(t=>(t.type=n,t.path=this.#t(t),t)),this.#e()}updateStateExpression(n){this.pathState.update(t=>(t.expression=n,t.path=this.#t(t),t)),this.#e()}#e(){setTimeout(()=>this.pathChange.emit(this.pathState().path))}#t(n){let t=n.type.slice(0,1),o=n.type.slice(1);if(o==="Folder"){let i=n.expression.endsWith("/"),l=n.expression.startsWith("/");return i&&l?`${t}${n.expression}`:i?`${t}${n.expression}/`:l?`${t}/${n.expression}`:`${t}/${n.expression}/`}return o==="FolderNameIncludes"?`${t}*${n.expression}*/`:o==="FileNameIncludes"?`${t}[.*${n.expression}[^\\/]*]`:o==="FileGroup"?`${t}{${n.expression}}`:o==="Regex"?`${t}[${n.expression}]`:o==="Extension"?`${t}*.${n.expression}`:`${t}${n.expression}`}removeFilter(){this.remove.emit()}displayFn(n){let t=tn.find(o=>o.value===n);return t?t.key:""}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({type:e,selectors:[["app-filter"]],inputs:{path:[1,"path"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:1,vars:1,consts:()=>{let n;return n=$localize`Select an option...`,[[3,"hideClearButton","displayFn"],["type","text","placeholder",n,3,"ngModelChange","ngModel"],[3,"value"],[1,"filter-removal",3,"click"],[1,"spk-primary"],["type","text",3,"ngModelChange","ngModel"]]},template:function(t,o){t&1&&d(0,fo,9,4),t&2&&F(o.pathState()?0:-1)},dependencies:[ut,se,le,Kt,ue,me,pe,ce],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] spk-select[_ngcontent-%COMP%]{--miw: initial}[_nghost-%COMP%] .filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var To=["formRef"];function ho(e,n){if(e&1){let t=k();a(0,"app-filter",42),D("pathChange",function(i){let l=f(t).$index,u=p(2);return S(u.patchPathAt(i,l))})("remove",function(){let i=f(t).$index,l=p(2);return S(l.removePathAt(i))}),r()}if(e&2){let t=n.$implicit;c("path",t)}}function Do(e,n){if(e&1&&I(0,ho,1,1,"app-filter",41,x),e&2){let t=p();v(t.pathArray())}}function Eo(e,n){if(e&1&&(a(0,"spk-option",45),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),Y(t)}}function yo(e,n){if(e&1&&(a(0,"div",40)(1,"spk-form-field"),_(2,"input",43),r(),a(3,"spk-select"),_(4,"input",44),I(5,Eo,2,2,"spk-option",45,x),r()()),e&2){let t=p();s(5),v(t.sizeOptions())}}var Me=new ne,Po=["Bytes","KB","MB","GB","TB","PB"],nn=(e={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>Me.group({path:Me.control(e.path),excludes:Me.group({hidden:Me.control(e.excludes.hidden),system:Me.control(e.excludes.system),temporary:Me.control(e.excludes.temporary),filesLargerThan:Me.group({size:Me.control(null),unit:Me.control(null)})})}),It=class e{#e=$(_e);#t=$(ae);#o=$(De);formRef=fe.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new ct("");filesLargerThan=K(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=O(Po);pathSignal=H(this.sourceDataForm.controls.path.valueChanges);pathArray=K(()=>this.pathSignal()?.split("\0").filter(n=>n.startsWith("-")||n.startsWith("+"))??[]);addFilter(n="-*"){let t=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${t}\0${n}`)}patchPathAt(n,t){let i=this.sourceDataForm.controls.path.value.split("\0").filter(u=>!u.startsWith("-")&&!u.startsWith("+")).join("\0"),l=this.pathArray().map((u,h)=>h===t?`${n}`:`${u}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${l}`)}removePathAt(n){let o=this.sourceDataForm.controls.path.value.split("\0").filter(l=>!l.startsWith("-")&&!l.startsWith("+")).join("\0"),i=this.pathArray().filter((l,u)=>u!==n).join("\0");this.sourceDataForm.controls.path.setValue(`${o}\0${i}`)}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 n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${n}\0${this.newPathCtrl.value}`),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#o.parent})}next(){this.#t.navigate(["schedule"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({type:e,selectors:[["app-source-data"]],viewQuery:function(t,o){t&1&&Se(o.formRef,To,5),t&2&&Te()},decls:55,vars:12,consts:()=>{let n;n=$localize`Path`;let t;t=$localize`Add a direct path`;let o;o=$localize`Hidden files`;let i;i=$localize`System files`;let l;l=$localize`Temporary files`;let u;u=$localize`Source Data`;let h;h=$localize`Folder path`;let P;P=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let A;A=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let b;b=$localize`Source Data`;let B;B=$localize`Add Path`;let Z;Z=$localize`Add a path directly from your machine.`;let U;U=$localize`Filters`;let J;J=$localize`Customize your filters.`;let te;te=$localize`Add filter`;let E;E=$localize`Exclude`;let y;y=$localize`Choose if there’s any files you want to exclude.`;let z;z=$localize` Hidden files ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`;let w;w=$localize` System files ${"\uFFFD#48\uFFFD\uFFFD/#48\uFFFD"}:TAG_INPUT:`;let ie;ie=$localize` Temporary files ${"\uFFFD#51\uFFFD\uFFFD/#51\uFFFD"}:TAG_INPUT:`;let ge;ge=$localize` Files larger than `;let de;return de=$localize`Select an option...`,[["formRef",""],u,h,P,A,b,B,Z,U,J,te,E,y,z,w,ie,ge,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",n,"formControlName","path"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"row-inputs"],["type","text","placeholder",t,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",o,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",l,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[3,"path"],[3,"pathChange","remove","path"],["type","number","formControlName","size"],["type","text","formControlName","unit","placeholder",de],[3,"value"]]},template:function(t,o){if(t&1){let i=k();a(0,"form",17,0),D("submit",function(){return f(i),S(o.next())}),a(2,"div",18)(3,"h3",19),M(4,1),r(),a(5,"app-file-tree",20)(6,"label",21),M(7,2),r(),_(8,"input",22),r(),a(9,"div",23)(10,"button",24),D("click",function(){return f(i),S(o.goBack())}),g(11,3),_(12,"spk-icon"),C(),r(),a(13,"button",25),g(14,4),_(15,"spk-icon"),C(),r()()(),a(16,"div",26)(17,"h3",19),M(18,5),r(),a(19,"app-toggle-card",27),W(20,28),M(21,6),q(),a(22,"p",29),M(23,7),r(),a(24,"div",30)(25,"spk-form-field"),_(26,"input",31),r(),a(27,"button",32),D("click",function(){return f(i),S(o.addNewPath())}),a(28,"spk-icon"),m(29,"plus"),r()()()(),a(30,"app-toggle-card",27),W(31,28),M(32,8),q(),a(33,"p",29),M(34,9),r(),a(35,"button",33),D("click",function(){return f(i),S(o.addFilter())}),M(36,10),r(),d(37,Do,2,0),r(),a(38,"app-toggle-card",34),W(39,28),M(40,11),q(),a(41,"p",29),M(42,12),r(),a(43,"spk-toggle",35),g(44,13),_(45,"input",36),C(),r(),a(46,"spk-toggle",35),g(47,14),_(48,"input",37),C(),r(),a(49,"spk-toggle",35),g(50,15),_(51,"input",38),C(),r(),a(52,"spk-toggle",39),D("click",function(){return f(i),S(o.toggleFilesLargerThan())}),M(53,16),r(),d(54,yo,7,0,"div",40),r()()()}if(t&2){let i;c("formGroup",o.sourceDataForm),s(5),c("multiSelect",!0)("startingPath",o.getPath())("showFiles",!0),s(14),c("disallowToggle",!0),s(7),c("formControl",o.newPathCtrl),s(4),c("disallowToggle",!0),s(7),F((i=o.pathSignal())!=null&&i.length?37:-1),s(),c("disallowToggle",!0),s(14),$e("active",o.filesLargerThan()),s(2),F(o.filesLargerThan()?54:-1)}},dependencies:[ut,Pe,se,Ge,Re,le,ye,Oe,mt,Ne,Ae,be,ce,me,pe,Ve,ue,Le,We,Ue,St],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-level-40)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.5rem}"],changeDetection:0})};var Fe=new ne,_e=class e{#e=$(ae);#t=$(pt);#o=$(He);#i=$(gt);generalForm=Qt();sourceDataForm=nn();scheduleForm=en();destinationForm=on();optionsForm=Zt();isDraft=O(!1);backupId=O(null);isSubmitting=O(!1);finishedLoading=O(!1);backupDefaults=O(null);isNew=K(()=>this.backupId()==="new");selectedOptions=O([]);selectedAdvancedFormPair=O([]);destinationFormPair=O({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=K(()=>{let n=this.destinationFormPair()?.advanced??[],t=this.selectedAdvancedFormPair()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});selectedHttpOptions=O([]);notSelectedHttpOptions=K(()=>{let n=this.httpOptions(),t=this.selectedHttpOptions()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});sourceDataFormSignal=H(this.sourceDataForm.valueChanges);destinationFormSignal=H(this.destinationForm.valueChanges);generalFormSignal=H(this.generalForm.valueChanges);encryptionFieldSignal=H(this.generalForm.controls.encryption.valueChanges);scheduleFormSignal=H(this.scheduleForm.valueChanges);destinationOptions=K(()=>this.#t.backendModules()??[]);httpOptions=K(()=>this.#t.systemInfo()?.GenericModules?.find(n=>n.Key==="http-options")?.Options?.map(this.#n)??[]);advancedOptions=K(()=>this.#t.systemInfo()?.Options?.map(this.#n)??[]);#n(n){return{name:n.Name,type:n.Type,shortDescription:n.ShortDescription??void 0,longDescription:n.LongDescription??void 0,options:n.ValidValues}}encryptionOptions=K(()=>{let n=this.#t.systemInfo()?.EncryptionModules??[];return[kt,...n]});nonSelectedOptions=K(()=>this.advancedOptions().sort((n,t)=>n?.name&&t?.name?n?.name.localeCompare(t?.name):0).filter(n=>this.selectedOptions()?.findIndex(t=>t.name===n.name)===-1));addAdvancedFormPairByName(n,t,o){let i=this.notSelectedAdvancedFormPair().find(l=>l.name===n);i&&this.addAdvancedFormPair(i,t,o)}addHttpOptionByName(n,t,o){let i=this.notSelectedHttpOptions().find(l=>l.name===n);i&&this.addHttpOption(i,t,o)}addAdvancedFormPair(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,l=o??n.defaultValue;this.createFormField(i,n,l),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),n])}addHttpOption(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,l=o??n.defaultValue;this.createFormField(i,n,l),this.selectedHttpOptions.set([...this.selectedHttpOptions(),n])}removeAdvancedFormPair(n,t){this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced.removeControl(n.name),this.selectedAdvancedFormPair().findIndex(i=>i.name===n.name)!==-1?this.selectedAdvancedFormPair.update(i=>(i=i.filter(l=>l.name!==n.name),i)):this.selectedHttpOptions.update(i=>(i=i.filter(l=>l.name!==n.name),i))}removeHttpOption(n,t){this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced.removeControl(n.name),this.selectedHttpOptions.update(o=>(o=o.filter(i=>i.name!==n.name),o))}submit(){this.isSubmitting.set(!0);let n=this.#l(),t=this.backupId();t==="new"||!t||this.isDraft()?this.#o.postApiV1Backups({requestBody:n}).pipe(Ze(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{console.log("submitted res",o),this.exit()},error:o=>{console.error("submitted error",o)}}):this.#o.putApiV1BackupById({id:t,requestBody:n}).pipe(Ze(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{console.log("submitted res",o),this.exit()},error:o=>{console.error("submitted error",o)}})}exit(){this.#c(),this.#e.navigate(["/"])}updateFieldsFromTargetUrl(n){this.#r(),setTimeout(()=>{this.#s(n)})}#r(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.selectedHttpOptions.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(n){let t=n.Sources??"",o=n.Filters?.map(A=>`${A.Include?"":"-"}${A.Expression}`)??[],i=n.Settings?.find(A=>A.Name==="--exclude-files-attributes")?.Value??"",l=n.Settings?.find(A=>A.Name==="--skip-files-larger-than")??null,u=l?.Value.replace(/[0-9]/g,"")??null,h=l?.Value.replace(/[^0-9]/g,"")??null,P={path:[...t,...o].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:u&&h?{size:parseInt(h),unit:u.toUpperCase()}:null}};this.sourceDataForm.patchValue(P)}mapDestinationToForm(n){let t=n.TargetURL?At(n.TargetURL):null;t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}#s(n){let t=At(n);t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}mapGeneralToForm(n){let t=n.Settings?.find(l=>l.Name==="encryption-module"),o=t?.Value&&t.Value.length?t.Value:"",i={name:n.Name??"",description:n.Description??""};o&&o!==""&&(i.encryption=o),this.generalForm.patchValue(i)}mapScheduleToForm(n){if(!n){this.scheduleForm.patchValue({autoRun:!0});return}let t=this.#i.fromString(n.Repeat)??null,i={nextTime:this.#p(n.Time),runAgain:{repeatValue:t?.value??1,repeatUnit:t?.unit??"D",allowedDays:{mon:n.AllowedDays?.includes("mon")??!1,tue:n.AllowedDays?.includes("tue")??!1,wed:n.AllowedDays?.includes("wed")??!1,thu:n.AllowedDays?.includes("thu")??!1,fri:n.AllowedDays?.includes("fri")??!1,sat:n.AllowedDays?.includes("sat")??!1,sun:n.AllowedDays?.includes("sun")??!1}}};this.scheduleForm.patchValue(i)}mapOptionsToForms(n){let t=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than"],o=this.advancedOptions();n.Settings?.forEach(i=>{if(i.Name==="encryption-module")return this.generalForm.controls.encryption.setValue(i.Value??"");if(!(i.Name&&t.includes(i.Name))){if(i.Name==="dblock-size"){let l=i.Value?.replace(/[^0-9]/g,""),u=i.Value?.replace(/[0-9]/g,"");return this.optionsForm.controls.remoteVolumeSize.setValue({size:l?parseInt(l):null,unit:u?u.toUpperCase():null})}if(i.Name&&i.Value){let l=o.find(u=>u.name===i.Name);if(!l)return;this.addOptionToFormGroup(l,i.Value)}}})}getCurrentTargetUrl(){return this.#a(this.destinationForm.controls.destinations)}#l(){let n=this.generalForm.value,t=this.optionsForm.value,o=this.scheduleForm.value,i=this.sourceDataForm.value,u=this.destinationForm.value.destinations?.length?this.#a(this.destinationForm.controls.destinations):[],h=null;o.runAgain?.repeatUnit&&o.runAgain?.repeatValue&&(h=this.#i.toString(o.runAgain.repeatValue,o.runAgain.repeatUnit));let P=o.runAgain?.allowedDays?Object.entries(o.runAgain?.allowedDays).filter(([U,J])=>J).map(([U,J])=>U):[],A=i.path?.split("\0")??[],b=this.mapFormsToSettings(),B=Object.entries(i.excludes??{}).filter(([U,J])=>J&&U!=="filesLargerThan").map(([U])=>U),Z=i.excludes?.filesLargerThan;return B.length&&b.push({Name:"--exclude-files-attributes",Value:B.join(",")}),Z&&Z.size!==null&&Z.unit!==null&&b.push({Name:"--skip-files-larger-than",Value:`${Z.size}${Z.unit}`}),{Backup:{Name:n.name,Description:n.description,TargetURL:u[0]??null,Sources:A.filter(U=>!U.startsWith("-")),Settings:b,Filters:A.filter(U=>U.startsWith("-")).map((U,J)=>({Order:J,Include:!1,Expression:U.slice(1)}))},Schedule:o.autoRun?{Repeat:h,Time:o.nextTime?.date?new Date(`${o.nextTime.date}T${o.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:P}:null}}mapFormsToSettings(){let n=this.advancedOptions(),t=this.optionsForm.value,o=this.generalForm.value,i=[{Name:"--no-encryption",Value:"True"}];o.encryption!==""&&(i=[{Name:"encryption-module",Value:o.encryption??null},{Name:"passphrase",Value:o.password??null}]);let l=t.remoteVolumeSize?.size?{Name:"dblock-size",Value:`${t.remoteVolumeSize.size}${t.remoteVolumeSize.unit.toLowerCase()}`}:{Name:"dblock-size",Value:"50mb"},u=Object.entries(t.advancedOptions??{}).filter(([h,P])=>h&&P).map(([h,P])=>{let A=n.find(b=>b.name===h);return A?.type==="Size"?{Name:h,Value:`${P.size}${P.unit.toLowerCase()}`}:A?.type==="Integer"?{Name:h,Value:P.toString()}:A?.type==="Boolean"?{Name:h,Value:P.toString()}:{Name:h,Value:P}});return[...i,l,...u]}#a(n){return n.controls.map(t=>Ct(t.value))}#p(n){if(!n||n?.indexOf("T")===-1)return{time:n??"13:00"};let t=new Date(n),o={time:`${(""+t.getHours()).padStart(2,"0")}:${(""+t.getMinutes()).padStart(2,"0")}`};return n.indexOf("T")!==-1&&(o.date=t.toISOString().split("T")[0]),o}removeOptionFromFormGroup(n){let t=n.name;t&&(this.optionsForm.controls.advancedOptions.removeControl(t),this.selectedOptions.update(o=>(o=o.filter(i=>i.name!==t),o)))}addOptionToFormGroup(n,t){let o=this.optionsForm.controls.advancedOptions;this.createFormField(o,n,t??n.defaultValue),this.selectedOptions.update(i=>(i.push(n),i))}addFreeTextOption(n,t,o){let i=this.optionsForm.controls.advancedOptions,l=N({name:n,type:"String",defaultValue:t},o);this.createFormField(i,l,t),this.selectedOptions.update(u=>(u.push(l),u))}createFormField(n,t,o){if(t.type==="String"||t.type==="FileTree"||t.type==="FolderTree"||t.type==="Password"||t.type==="Enumeration"||t.type==="NonValidatedSelectableString"||t.type==="Path"){n.addControl(t.name,Fe.control(o));return}if(t.type==="Size"){let i=o.replace(/[0-9]/g,""),l=o.replace(/[^0-9]/g,"");n.addControl(t.name,Fe.group({size:Fe.control(l?parseInt(l):50),unit:Fe.control(i?i.toUpperCase():"MB")}));return}if(t.type==="Integer"){n.addControl(t.name,Fe.control(o?parseInt(o):0));return}if(t.type==="Boolean"){n.addControl(t.name,Fe.control(o==="true"||o==="True"));return}if(t.type==="Flags"){n.addControl(t.name,Fe.control(o??""));return}if(t.type==="Timespan"){n.addControl(t.name,Fe.control(o,[Ee.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(n,t,o=!1){let i=ve.find(E=>E.customKey===n||E.key===n),l=i?.key,u=this.destinationOptions().find(E=>E.Key===l),h=this.httpOptions();if(!u||!u.Options)return;let P=i&&i.oauthField?i.oauthField:null,A=i&&i.customFields?i.customFields:{},b=i&&i.dynamicFields?i.dynamicFields:[],B=i&&i.advancedFields?i.advancedFields:[],Z=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:P,custom:[],dynamic:[],advanced:[]});let U=Fe.group({}),J=Fe.group({}),te=Fe.group({});A&&Object.entries(A).forEach(([E,y],z)=>{let ge=y,{formElement:w}=ge,ie=Mt(ge,["formElement"]);U.addControl(E,w(t?.custom[E])),this.destinationFormPair.update(de=>(de.custom.push(N({order:900+z},ie)),de))});for(let E=0;E<u.Options.length;E++){let y=u.Options[E];if(y.Deprecated)continue;let z=b.find(w=>w===y.Name||w.name===y.Name);if(z){let w=z&&typeof z!="string",ie=w?z?.defaultValue??y.DefaultValue:y.DefaultValue,ge={name:y.Name,type:y.Type,shortDescription:y.ShortDescription??void 0,longDescription:y.LongDescription??void 0,options:y.ValidValues,order:900+E},de=w?N(N({},ge),z):ge,rt=t?.dynamic[y.Name]??ie??y.DefaultValue;this.createFormField(J,de,rt),this.destinationFormPair.update(Xe=>(Xe.dynamic.push(de),Xe))}else{if(Z.find(Ce=>Ce===y.Name))continue;let ie=B.find(Ce=>Ce===y.Name||Ce.name===y.Name),ge=ie&&typeof ie!="string",de=t?.advanced[y.Name],L=de??y.DefaultValue,rt={name:y.Name,type:y.Type,shortDescription:y.ShortDescription??void 0,longDescription:y.LongDescription??void 0,options:y.ValidValues,defaultValue:L,order:900+E},Xe=ge?N(N({},rt),ie):rt;o&&de&&(this.createFormField(te,Xe,L),this.selectedAdvancedFormPair.update(Ce=>(Ce.push(Xe),Ce))),this.destinationFormPair.update(Ce=>(Ce.advanced.push(Xe),Ce))}}for(let E=0;E<h.length;E++){let y=h[E],z=t?.advanced[y.name],w=z??y.defaultValue;o&&z&&(this.createFormField(te,y,w),this.selectedHttpOptions.update(ie=>(ie.push(y),ie)))}this.destinationFormPair.update(E=>({oauthField:E.oauthField,custom:E.custom.sort((y,z)=>y.order-z.order),dynamic:E.dynamic.sort((y,z)=>y.order-z.order),advanced:E.advanced.sort((y,z)=>y.order-z.order)})),this.destinationForm.controls.destinations.push(rn({key:i?.customKey??n,customGroup:U,dynamicGroup:J,advancedGroup:te}))}#c(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleForm.reset(),this.optionsForm.reset()}static \u0275fac=function(t){return new(t||e)};static \u0275prov=we({token:e,factory:e.\u0275fac,providedIn:"root"})};var No=["formRef"],Ao=(e,n,t,o)=>({index:e,formView:n,formGroupName:"custom",destinationType:t,oauthField:o}),ht=e=>({$implicit:e}),Oo=(e,n,t,o)=>({index:e,formView:n,formGroupName:"dynamic",destinationType:t,oauthField:o}),ko=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",destinationType:t,oauthField:o}),$o=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",asHttpOptions:!0,destinationType:t,oauthField:o}),xo=()=>({maxWidth:"700px",width:"100%"});function Io(e,n){e&1&&(g(0,2,2),_(1,"spk-icon"),C())}function vo(e,n){e&1&&M(0,2,3)}function Mo(e,n){if(e&1){let t=k();g(0,2,1),a(1,"button",18),D("click",function(){f(t);let i=p();return S(i.testDestination())}),d(2,Io,2,0)(3,vo,1,0),r(),C()}if(e&2){let t=p();s(),$e("success",t.successfulTest()),s(),F(t.successfulTest()?2:3)}}function wo(e,n){if(e&1){let t=k();a(0,"p",24),D("click",function(){f(t);let i=p();return S(i.removeDestinationFormGroup(i.destinationCount()-1))}),g(1,5),_(2,"span",25),C(),r()}}function Ro(e,n){if(e&1){let t=k();a(0,"div",30),D("click",function(){let i=f(t).$implicit,l=p(2);return S(l.addDestinationFormGroup(i.key))}),a(1,"h3"),m(2),r(),a(3,"p"),m(4),r()()}if(e&2){let t=n.$implicit;s(2),Y(t.displayName),s(2),Y(t.description)}}function Go(e,n){if(e&1){let t=k();a(0,"button",31),D("click",function(){let i=f(t).$implicit,l=p(2);return S(l.addDestinationFormGroup(i.key))}),m(1),r()}if(e&2){let t=n.$implicit;s(),V(" ",t.displayName," ")}}function bo(e,n){if(e&1&&(a(0,"div",26),I(1,Ro,5,2,"div",27,x),r(),a(3,"spk-menu")(4,"button",28),M(5,6),r(),W(6,17),I(7,Go,2,1,"button",29,x),q(),r()),e&2){let t=p();s(),v(t.destinationTypeOptionsFocused()),s(6),v(t.destinationTypeOptionsNotFocused())}}function Vo(e,n){e&1&&Ke(0)}function Lo(e,n){if(e&1&&d(0,Vo,1,0,"ng-container",36),e&2){let t,o=n.$implicit,i=n.$index;p();let l=he(29),u=p();c("ngTemplateOutlet",l)("ngTemplateOutletContext",ze(7,ht,tt(2,Ao,i,o,(t=u.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,u.destinationFormPair().oauthField)))}}function Uo(e,n){e&1&&Ke(0)}function Bo(e,n){if(e&1&&d(0,Uo,1,0,"ng-container",36),e&2){let t,o=n.$implicit,i=n.$index;p();let l=he(29),u=p();c("ngTemplateOutlet",l)("ngTemplateOutletContext",ze(7,ht,tt(2,Oo,i,o,(t=u.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,u.destinationFormPair().oauthField)))}}function Ko(e,n){if(e&1){let t=k();g(0,7,1),a(1,"button",31),D("click",function(){let i=f(t).$implicit,l=p(2);return S(l.addAdvancedFormPair(i,0))}),r(),C()}if(e&2){let t=n.$implicit;s(),Je(t.name),et(0)}}function zo(e,n){e&1&&Ke(0)}function Xo(e,n){if(e&1&&d(0,zo,1,0,"ng-container",36),e&2){let t,o=n.$implicit,i=n.$index;p();let l=he(29),u=p();c("ngTemplateOutlet",l)("ngTemplateOutletContext",ze(7,ht,tt(2,ko,i,o,(t=u.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,u.destinationFormPair().oauthField)))}}function Ho(e,n){if(e&1){let t=k();g(0,8,1),a(1,"button",31),D("click",function(){let i=f(t).$implicit,l=p(2);return S(l.addHttpOption(i,0))}),r(),C()}if(e&2){let t=n.$implicit;s(),Je(t.name),et(0)}}function jo(e,n){e&1&&Ke(0)}function Wo(e,n){if(e&1&&d(0,jo,1,0,"ng-container",36),e&2){let t,o=n.$implicit,i=n.$index;p();let l=he(29),u=p();c("ngTemplateOutlet",l)("ngTemplateOutletContext",ze(7,ht,tt(2,$o,i,o,(t=u.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,u.destinationFormPair().oauthField)))}}function qo(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Qo(e,n){if(e&1&&(a(0,"app-file-tree",39)(1,"label",46),m(2),d(3,qo,3,1,"spk-tooltip",47),r(),_(4,"input",48),r()),e&2){let t,o=p().$implicit,i=p(2);c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name))("accepts",o.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name)}}function Yo(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Zo(e,n){if(e&1&&(a(0,"app-file-tree",40)(1,"label",46),m(2),d(3,Yo,3,1,"spk-tooltip",47),r(),_(4,"input",48),r()),e&2){let t,o=p().$implicit,i=p(2);c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name)),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name)}}function Jo(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function ei(e,n){e&1&&(a(0,"spk-icon",50),m(1,"link"),r())}function ti(e,n){e&1&&(a(0,"spk-icon",50),m(1,"envelope"),r())}function ni(e,n){e&1&&(a(0,"spk-icon",50),m(1,"textbox"),r())}function oi(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",46),m(2),d(3,Jo,3,1,"spk-tooltip",47),r(),_(4,"input",49),d(5,ei,2,0,"spk-icon",50)(6,ti,2,0,"spk-icon",50)(7,ni,2,0,"spk-icon",50),r()),e&2){let t,o=p().$implicit;s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name),c("type",o.formView.type==="Email"?"email":"text"),s(),F(o.formView.type==="Path"?5:o.formView.type==="Email"?6:7)}}function ii(e,n){if(e&1){let t=k();a(0,"span",54),D("click",function(){f(t);let i=p(2).$implicit,l=p(2);return S(l.oauthStartTokenCreation(i.destinationType))}),m(1,"AuthID"),r()}}function ri(e,n){e&1&&(a(0,"spk-icon",50),m(1,"password"),r())}function ai(e,n){if(e&1){let t=k();a(0,"spk-icon",55),D("click",function(){f(t);let i=p(2).$implicit;return S(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye "),r()}}function si(e,n){if(e&1){let t=k();a(0,"spk-icon",55),D("click",function(){f(t);let i=p(2).$implicit;return S(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye-slash "),r()}}function li(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",46),m(2),r(),_(3,"input",51),d(4,ii,2,0,"span",52)(5,ri,2,0,"spk-icon",50)(6,ai,2,0,"spk-icon",53)(7,si,2,0,"spk-icon",53),r()),e&2){let t,o=p().$implicit;s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name),c("type",o.formView.showPassword?"text":"password"),s(),F(o.oauthField===o.formView.name?4:5),s(2),F(o.formView.showPassword?6:7)}}function pi(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function ci(e,n){if(e&1&&(a(0,"spk-option",56),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),Pt(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function mi(e,n){if(e&1&&I(0,ci,2,3,"spk-option",56,x),e&2){let t=p(2).$implicit,o=p(2);v(t.formView.loadOptions(o.injector)())}}function ui(e,n){if(e&1&&(a(0,"spk-option",56),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),Y(t)}}function _i(e,n){if(e&1&&I(0,ui,2,2,"spk-option",56,x),e&2){let t=p(2).$implicit;v(t.formView.options)}}function di(e,n){if(e&1&&(a(0,"spk-select",41)(1,"label",46),m(2),d(3,pi,3,1,"spk-tooltip",47),r(),_(4,"input",48),d(5,mi,2,0)(6,_i,2,0),r()),e&2){let t,o=p().$implicit;c("hideClearButton",!0),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name),s(),F(o.formView.loadOptions?5:-1),s(),F(o.formView.options?6:-1)}}function Fi(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function gi(e,n){if(e&1&&(a(0,"spk-option",56),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),Pt(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function Ci(e,n){if(e&1&&I(0,gi,2,3,"spk-option",56,x),e&2){let t=p(2).$implicit,o=p(2);v(t.formView.loadOptions(o.injector)())}}function fi(e,n){if(e&1&&(a(0,"spk-option",56),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),Y(t)}}function Si(e,n){if(e&1&&I(0,fi,2,2,"spk-option",56,x),e&2){let t=p(2).$implicit;v(t.formView.options)}}function Ti(e,n){if(e&1&&(a(0,"spk-select",42)(1,"label",46),m(2),d(3,Fi,3,1,"spk-tooltip",47),r(),_(4,"input",57),d(5,Ci,2,0)(6,Si,2,0),r()),e&2){let t,o=p().$implicit;c("isFreeText",!0),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name),s(),F(o.formView.loadOptions?5:-1),s(),F(o.formView.options?6:-1)}}function hi(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Di(e,n){if(e&1&&(a(0,"spk-option",56),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),Y(t)}}function Ei(e,n){if(e&1&&(a(0,"div",43)(1,"label",46),m(2),d(3,hi,3,1,"spk-tooltip",47),r(),a(4,"div",58)(5,"spk-form-field"),_(6,"input",59),a(7,"spk-icon",50),m(8,"resize"),r()(),a(9,"spk-select"),_(10,"label")(11,"input",60),I(12,Di,2,2,"spk-option",56,x),r()()()),e&2){let t,o=p().$implicit,i=p(2);c("formGroupName",o.formView.name),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(3),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(6),v(i.sizeOptions())}}function yi(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Pi(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",46),m(2),d(3,yi,3,1,"spk-tooltip",47),r(),_(4,"input",61),a(5,"spk-icon",50),m(6,"numpad"),r()()),e&2){let t,o=p().$implicit;s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name)}}function Ni(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Ai(e,n){if(e&1&&(a(0,"spk-toggle",44)(1,"label",46),m(2),d(3,Ni,3,1,"spk-tooltip",47),r(),_(4,"input",62),r()),e&2){let t,o=p().$implicit;s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name)}}function Oi(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function ki(e,n){e&1&&(a(0,"spk-option",64),m(1,"None"),r()),e&2&&c("value","None")}function $i(e,n){if(e&1&&(a(0,"spk-option",56),m(1),_(2,"spk-checkbox",65),r()),e&2){let t=p().$implicit;c("value",t),s(),V(" ",t," ")}}function xi(e,n){if(e&1&&d(0,ki,2,1,"spk-option",64)(1,$i,3,2,"spk-option",56),e&2){let t=n.$implicit;F(t==="None"?0:1)}}function Ii(e,n){if(e&1&&(a(0,"spk-select",45)(1,"label",46),m(2),d(3,Oi,3,1,"spk-tooltip",47),r(),_(4,"input",63),I(5,xi,2,1,null,null,x),r()),e&2){let t,o=p().$implicit;c("selectMultiple",!0),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),j("formControlName",o.formView.name),s(),v(o.formView.options)}}function vi(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Mi(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",46),m(2),d(3,vi,3,1,"spk-tooltip",47),r(),_(4,"input",48),r()),e&2){let t,o=p().$implicit;s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name)}}function wi(e,n){if(e&1){let t=k();a(0,"button",66),D("click",function(){f(t);let i=p().$implicit,l=p(2);return S(l.removeFormView(i.formView,0))}),a(1,"spk-icon"),m(2,"x-circle"),r()()}}function Ri(e,n){if(e&1&&(a(0,"div",37),W(1,38),d(2,Qo,5,16,"app-file-tree",39)(3,Zo,5,12,"app-file-tree",40)(4,oi,8,13,"spk-form-field")(5,li,8,13,"spk-form-field")(6,di,7,14,"spk-select",41)(7,Ti,7,14,"spk-select",42)(8,Ei,14,11,"div",43)(9,Pi,7,11,"spk-form-field")(10,Ai,5,11,"spk-toggle",44)(11,Ii,7,8,"spk-select",45)(12,Mi,5,11,"spk-form-field"),q(),d(13,wi,3,0,"button",28),r()),e&2){let t=n.$implicit;$e("single-field",t.formGroupName!=="advanced"),s(),c("formGroupName",t.formGroupName),s(),F(t.formView.type==="FileTree"?2:t.formView.type==="FolderTree"?3:t.formView.type==="String"||t.formView.type==="Path"||t.formView.type==="Email"?4:t.formView.type==="Password"?5:t.formView.type==="Enumeration"?6:t.formView.type==="NonValidatedSelectableString"?7:t.formView.type==="Size"?8:t.formView.type==="Integer"?9:t.formView.type==="Boolean"?10:t.formView.type==="Flags"?11:t.formView.type==="Timespan"?12:-1),s(11),F(t.formGroupName==="advanced"?13:-1)}}function Gi(e,n){if(e&1&&(W(0,19)(1,32),I(2,Lo,1,9,"ng-container",null,x),I(4,Bo,1,9,"ng-container",null,x),a(6,"app-toggle-card",33),W(7,34),g(8,7),a(9,"spk-menu")(10,"button",35),_(11,"spk-icon"),r(),W(12,17),I(13,Ko,2,1,"button",29,x),q(),r(),C(),q(),I(15,Xo,1,9,"ng-container",null,x),r(),a(17,"app-toggle-card",33),W(18,34),g(19,8),a(20,"spk-menu")(21,"button",35),_(22,"spk-icon"),r(),W(23,17),I(24,Ho,2,1,"button",29,x),q(),r(),C(),q(),I(26,Wo,1,9,"ng-container",null,x),r(),d(28,Ri,14,5,"ng-template",null,1,at),q()()),e&2){let t=p();s(2),v(t.destinationFormPair().custom),s(2),v(t.destinationFormPair().dynamic),s(2),c("disallowToggle",!0),s(4),c("disabled",t.notSelectedAdvancedFormPair().length===0),s(3),v(t.notSelectedAdvancedFormPair()),s(2),v(t.selectedAdvancedFormPair()),s(2),c("disallowToggle",!0),s(4),c("disabled",t.notSelectedHttpOptions().length===0),s(3),v(t.notSelectedHttpOptions()),s(2),v(t.selectedHttpOptions())}}function bi(e,n){if(e&1){let t=k();a(0,"spk-dialog",67),Vt("isOpenChange",function(i){f(t);let l=p();return bt(l.targetUrlDialogOpen,i)||(l.targetUrlDialogOpen=i),S(i)}),a(1,"header",68)(2,"h2"),M(3,9),r(),a(4,"spk-alert",69),M(5,10),r()(),a(6,"div",70)(7,"spk-form-field"),_(8,"textarea",71),r()(),a(9,"footer",72)(10,"button",21),D("click",function(){f(t);let i=p();return S(i.closeTargetUrlDialog(!1))}),m(11,"Cancel"),r(),a(12,"button",73),D("click",function(){f(t);let i=p();return S(i.closeTargetUrlDialog(!0))}),g(13,11),_(14,"spk-icon"),C(),r()()()}if(e&2){let t=p();Gt("isOpen",t.targetUrlDialogOpen),c("options",Lt(3,xo)),s(8),c("formControl",t.targetUrlCtrl)}}var Vi=["Bytes","KB","MB","GB","TB","PB"],Tt=new ne,on=(e={destinations:[]})=>Tt.group({destinations:Tt.array(e.destinations)}),rn=({key:e,customGroup:n,dynamicGroup:t,advancedGroup:o})=>Tt.group({destinationType:Tt.control(e),custom:n,dynamic:t,advanced:o}),vt=class e{#e=$(ae);#t=$(De);#o=$(Bt);#i=$(He);#n=$(_e);#r=$(Ht);injector=$(wt);formRef=fe.required("formRef");destinationForm=this.#n.destinationForm;destinationFormPair=this.#n.destinationFormPair;selectedAdvancedFormPair=this.#n.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#n.notSelectedAdvancedFormPair;selectedHttpOptions=this.#n.selectedHttpOptions;notSelectedHttpOptions=this.#n.notSelectedHttpOptions;destinationOptions=this.#n.destinationOptions;destinationFormSignal=this.#n.destinationFormSignal;destinationCount=K(()=>this.destinationFormSignal()?.destinations?.length??0);sizeOptions=O(Vi);successfulTest=O(!1);destinationTypeOptionsInFocus=O(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=O(ve.map(n=>({key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description})));destinationTypeOptionsFocused=K(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(i=>i.key===o))});destinationTypeOptionsNotFocused=K(()=>{let n=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(o=>!n.includes(o.key))});getFormFieldValue(n,t,o){return((this.destinationForm.controls.destinations.controls?.[n]).controls?.[t]).controls[o].value}addDestinationFormGroup(n){this.#n.addDestinationFormGroup(n)}addAdvancedFormPair(n,t){this.#n.addAdvancedFormPair(n,t)}removeFormView(n,t){this.#n.removeAdvancedFormPair(n,t)}addHttpOption(n,t){this.#n.addHttpOption(n,t)}targetUrl=K(()=>this.#n.getCurrentTargetUrl()[0]);targetUrlCtrl=new ct;targetUrlInitial=O(null);targetUrlDialogOpen=O(!1);openTargetUrlDialog(){let t=this.#n.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(t),this.targetUrlInitial.set(t),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl.value,o=this.targetUrlInitial();!n||t===o||this.#n.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(n=0){let o=this.#n.getCurrentTargetUrl()[n];o&&this.#i.postApiV1RemoteoperationTest({requestBody:{path:o}}).subscribe({next:()=>{this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3)},error:i=>{let l=i.error.error.Error;if(l==="missing-folder"&&this.#r.open(nt,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`},closed:u=>{u&&this.#i.postApiV1RemoteoperationCreate({requestBody:{path:o}}).subscribe()}}),l.startsWith("incorrect-cert:")){let u=l.split("incorrect-cert:")[1];this.#r.open(nt,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
|
|
2
|
+
If this is a self-signed certificate, you can choose to trust this certificate.
|
|
3
|
+
The server reported the certificate hash: ${u}`,confirmText:"Trust the certificate",cancelText:"Cancel"},closed:h=>{h&&this.#n.addHttpOptionByName("accept-specified-ssl-hash",u)}})}if(l.startsWith("incorrect-host-key:")){let u=l.split('incorrect-host-key:"')[1].split('",')[0],h=l.split('accepted-host-key:"')[1].split('",')[0];h?this.#r.open(nt,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
|
|
4
|
+
otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
|
|
5
|
+
Do you want to REPLACE your CURRENT host key ${h}
|
|
6
|
+
with the REPORTED host key: ${u}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:P=>{P&&this.#n.addAdvancedFormPairByName("ssh-fingerprint",n,u)}}):this.#r.open(nt,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${u}`,confirmText:"Approve",cancelText:"Cancel"},closed:P=>{P&&this.#n.addAdvancedFormPairByName("ssh-fingerprint",n,u)}})}}})}mapToTargetUrl(n){return Ct(n.value)}removeDestinationFormGroup(n){this.destinationForm.controls.destinations.removeAt(n)}displayFn(n){let t=this.destinationOptions().find(o=>o.Key===n);return t?`${t.DisplayName}`:""}goBack(){this.#e.navigate(["general"],{relativeTo:this.#t.parent})}next(){this.#e.navigate(["source-data"],{relativeTo:this.#t.parent})}#s=O("https://duplicati-oauth-handler.appspot.com/").asReadonly();#l=O(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#a=O(!1);#p=O(null);keyCreation(){}oauthStartTokenCreation(n){this.#a.set(!0);let t=450,o=600,i=this.#s()+"?type="+n+"&token="+this.#l(),l=screen.width/2-t/2,u=screen.height/2-o/2,h=window.open(i,"_blank","height="+o+",width="+t+",menubar=0,status=0,titlebar=0,toolbar=0,left="+l+",top="+u);h?.addEventListener("blur",P=>{console.log("event blur",P)}),h?.addEventListener("beforeunload",P=>{console.log("event beforeunload",P),this.#o.get(this.#s()+"fetch?callback=JSON_CALLBACK",{params:{token:this.#l()}}).pipe(Ze(()=>this.#a.set(!1))).subscribe({next:A=>{console.log("res",A),A?.authid&&this.#p.set(A.authid)}})})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({type:e,selectors:[["app-destination"]],viewQuery:function(t,o){t&1&&Se(o.formRef,No,5),t&2&&Te()},decls:24,vars:6,consts:()=>{let n;n=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"\uFFFD*6:1\uFFFD"}:START_BLOCK_IF_1:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON:${"\uFFFD*2:2\uFFFD"}:START_BLOCK_IF: Connected ${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*3:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*3:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:dots-three-vertical${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:link${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,n=xe(n);let t;t=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let o;o=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$localize` Want to select another destination? ${"\uFFFD#2\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPAN:`;let l;l=$localize`Other destinations`;let u;u=$localize` Advanced options ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#10\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#12\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*14:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*14:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_MENU:`,u=xe(u);let h;h=$localize` Http options ${"\uFFFD#20\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#21\uFFFD"}:START_TAG_BUTTON: Add http option ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#23\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*25:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*25:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#23\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SPK_MENU:`,h=xe(h);let P;P=$localize`Edit target URL`;let A;A=$localize` Be careful, this will overwrite everything you have in your destination. `;let b;return b=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["fieldTemplate",""],n,t,o,i,l,u,h,P,A,b,[3,"submit","formGroup"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"success"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],["formArrayName","destinations"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"isOpen","options"],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile"],["spk-button","","type","button",1,"outlined"],["item","","type","button"],[1,"tile",3,"click"],["item","","type","button",3,"click"],["formGroupName","0"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small",3,"disabled"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[3,"hideClearButton"],[3,"isFreeText"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],[3,"type","id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],[3,"value"],["type","search",3,"id","formControlName"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["type","search","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],["type","text","id","text",3,"formControlName"],["deselect","",3,"value"],[1,"raised","primary"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"warning"],["content",""],["id","targetUrl","autocomplete","off",3,"formControl"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,o){if(t&1){let i=k();a(0,"form",12,0),D("submit",function(){return f(i),S(o.next())}),a(2,"header")(3,"h3",13),g(4,2),a(5,"div",14),d(6,Mo,4,3,"button",15),a(7,"spk-menu")(8,"button",16),_(9,"spk-icon"),r(),W(10,17),a(11,"button",18),D("click",function(){return f(i),S(o.openTargetUrlDialog())}),_(12,"spk-icon"),r(),q(),r()(),C(),r(),d(13,wo,3,0,"p"),r(),d(14,bo,9,0)(15,Gi,30,4,"ng-container",19),a(16,"div",20)(17,"button",21),D("click",function(){return f(i),S(o.goBack())}),g(18,3),_(19,"spk-icon"),C(),r(),a(20,"button",22),g(21,4),_(22,"spk-icon"),C(),r()()(),d(23,bi,15,4,"spk-dialog",23)}if(t&2){let i;c("formGroup",o.destinationForm),s(6),F(o.destinationCount()>0?6:-1),s(7),F(o.destinationCount()>0?13:-1),s(),F(o.destinationCount()===0?14:-1),s(),F(!((i=o.destinationFormSignal())==null||i.destinations==null)&&i.destinations.length?15:-1),s(8),F(o.targetUrlDialogOpen()?23:-1)}},dependencies:[Oe,Pe,se,Ge,Re,le,ye,mt,Ne,Ae,be,zt,lt,ce,ue,Ft,dt,me,pe,Le,je,Xt,_t,Ue,We],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] spk-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 1fr;gap:.5rem;align-items:flex-end}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1);background-color:var(--base-level-20);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{Ct as a,ve as b,on as c,rn as d,vt as e,Qt as f,kt as g,Ot as h,Zt as i,$t as j,en as k,xt as l,nn as m,It as n,_e as o};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-C6Q5SG76.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-ILPTEKIT.js")},{path:"destination",loadComponent:()=>import("./chunk-Q4JQCY64.js")},{path:"source-data",loadComponent:()=>import("./chunk-5K2CQFVP.js")},{path:"schedule",loadComponent:()=>import("./chunk-BLF5NVEW.js")},{path:"options",loadComponent:()=>import("./chunk-XKSLV5L6.js")}];export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Cb as i,Db as o,Ib as u,Mc as b,
|
|
1
|
+
import{Cb as i,Db as o,Ib as u,Mc as b,Ra as n,Ub as x,Vb as l,da as f,ea as _,eb as T,hc as r,ic as m,kb as C,pa as g,qa as D,yb as s}from"./chunk-QDAWQNBQ.js";import{a as p}from"./chunk-C6Q5SG76.js";function v(e,a){if(e&1&&(i(0,"p"),r(1),o()),e&2){let t=l();n(),m(t._data().message)}}function y(e,a){if(e&1){let t=u();i(0,"button",5),x("click",function(){f(t);let d=l();return _(d.close("cancel"))}),r(1),o()}if(e&2){let t=l();n(),m(t._data().cancelText)}}function h(e,a){if(e&1){let t=u();i(0,"button",6),x("click",function(){f(t);let d=l();return _(d.close("confirm"))}),r(1),o()}if(e&2){let t=l();n(),m(t._data().confirmText)}}var w={title:$localize`Are you sure?`,confirmText:$localize`Confirm`,cancelText:$localize`Cancel`},k=class e{data=D();_data=b(()=>p(p({},w),this.data()));closed=g();close(a="confirm"){this.closed.emit(a==="confirm")}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=T({type:e,selectors:[["app-confirm-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:8,vars:4,consts:[["header",""],["content",""],["footer",""],["spk-button","",1,""],["spk-button","",1,"raised","primary"],["spk-button","",1,"",3,"click"],["spk-button","",1,"raised","primary",3,"click"]],template:function(t,c){t&1&&(i(0,"header",0)(1,"h3"),r(2),o()(),i(3,"div",1),C(4,v,2,1,"p"),o(),i(5,"footer",2),C(6,y,2,1,"button",3)(7,h,2,1,"button",4),o()),t&2&&(n(2),m(c._data().title),n(2),s(c._data().message?4:-1),n(2),s(c._data().cancelText?6:-1),n(),s(c._data().confirmText?-1:7))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{k as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as a,j as b}from"./chunk-WF5PRSGZ.js";import"./chunk-KHIKPOXK.js";import"./chunk-BRTUMDFG.js";import"./chunk-DNHLTHLR.js";import"./chunk-MHZPUJQF.js";import"./chunk-PTG2C2YJ.js";import"./chunk-XFRVNXF6.js";import"./chunk-LFQXDL42.js";import"./chunk-TQE7OBBP.js";import"./chunk-ZRPJ3QZT.js";import"./chunk-NVTD7IP4.js";import"./chunk-3CRA7LUM.js";import"./chunk-6SIZVSDW.js";import"./chunk-JOBMLOGZ.js";import"./chunk-QDAWQNBQ.js";import"./chunk-C6Q5SG76.js";export{a as createOptionsForm,b as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-FOHDLUCC.js";import"./chunk-JOBMLOGZ.js";import"./chunk-QDAWQNBQ.js";import"./chunk-C6Q5SG76.js";export{a as BytesPipe};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as S}from"./chunk-
|
|
1
|
+
import{a as S}from"./chunk-FOHDLUCC.js";import{b as B}from"./chunk-7KWOTSVE.js";import{a as z}from"./chunk-ZOMDTRAX.js";import{b as m,c as h}from"./chunk-TQE7OBBP.js";import{E as u,M as f,Mc as d,Oc as P,S as k,Y as o,l as p,p as g,ua as n}from"./chunk-QDAWQNBQ.js";import{a as l,b as a}from"./chunk-C6Q5SG76.js";var $={Backup_Begin:$localize`Starting backup …`,Backup_PreBackupVerify:$localize`Verifying backend data …`,Backup_PostBackupTest:$localize`Verifying remote data …`,Backup_PreviousBackupFinalize:$localize`Completing previous backup …`,Backup_ProcessingFiles:$localize`Processing files to backup …`,Backup_Finalize:$localize`Completing backup …`,Backup_WaitForUpload:$localize`Waiting for upload to finish …`,Backup_Delete:$localize`Deleting unwanted files …`,Backup_Compact:$localize`Compacting remote data …`,Backup_VerificationUpload:$localize`Uploading verification file …`,Backup_PostBackupVerify:$localize`Verifying backend data …`,Backup_Complete:$localize`Backup complete!`,Restore_Begin:$localize`Starting restore …`,Restore_RecreateDatabase:$localize`Rebuilding local database …`,Restore_PreRestoreVerify:$localize`Verifying remote data …`,Restore_CreateFileList:$localize`Building list of files to restore …`,Restore_CreateTargetFolders:$localize`Creating target folders …`,Restore_ScanForExistingFiles:$localize`Scanning existing files …`,Restore_ScanForLocalBlocks:$localize`Scanning for local blocks …`,Restore_PatchWithLocalBlocks:$localize`Patching files with local blocks …`,Restore_DownloadingRemoteFiles:$localize`Downloading files …`,Restore_PostRestoreVerify:$localize`Verifying restored files …`,Restore_Complete:$localize`Restore complete!`,Recreate_Running:$localize`Recreating database …`,Vacuum_Running:$localize`Vacuuming database …`,Repair_Running:$localize`Repairing database …`,Verify_Running:$localize`Verifying files …`,BugReport_Running:$localize`Creating bug report …`,Delete_Listing:$localize`Listing remote files …`,Delete_Deleting:$localize`Deleting remote files …`,"PurgeFiles_Begin,":$localize`Listing remote files for purge …`,"PurgeFiles_Process,":$localize`Purging files …`,"PurgeFiles_Compact,":$localize`Compacting remote data …`,"PurgeFiles_Complete,":$localize`Purging files complete!`,Error:$localize`Error!`},_=class r{#i=o(S);#a=o(h);#r=o(m);#o=o(z);#e=o(B);#t=n(!1);#l=n(null);statusData=this.#l.asReadonly();serverState=d(()=>{let e=this.#e.serverState();return e?(e.ProposedSchedule=e.ProposedSchedule?.map(i=>a(l({},i),{backup:i.Item1?this.#o.getBackupById(i.Item1):null})),e):null});isFetching=this.#t.asReadonly();connectionStatus=this.#e.connectionStatus;setConnectionMethod(e){this.#e.setConnectionMethod(e)}pollingInterval;#p=P(()=>{let e=this.#e.serverState();e?.ActiveTask&&this.pollingInterval===void 0?this.pollingInterval=setInterval(()=>{this.#n()},1e3):e?.ActiveTask||this.stopPollingProgress()});stopPollingProgress(){clearInterval(this.pollingInterval)}#n(){this.#t.set(!0),this.#a.getApiV1Progressstate().pipe(f(e=>{let i=e.TaskID??null;return i===null?p(e):this.#r.getApiV1TaskByTaskid({taskid:i}).pipe(g(t=>a(l({},e),{task:t??null})))}),u(()=>this.#t.set(!1))).subscribe({next:e=>{let i=e.TaskID??null,t=e.BackupID??null;i!==null&&t!==null&&(e.backup=this.#o.getBackupById(t)),this.#l.set(a(l({},e),{progress:this.#s(e),statusText:this.#c(e),actionText:e.backup?.Backup?.Name??$localize`Running task`}))},error:e=>{e.status===404&&this.stopPollingProgress()}})}#s(e){let i=-1;if(e.task&&e)if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=0;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,s=e.TotalFileCount-e.ProcessedFileCount,c=e.TotalFileSize-e.ProcessedFileSize-t;i=(e.ProcessedFileSize+t)/e.TotalFileSize,e.ProcessedFileCount===0?i=0:i>=.9&&(i=.9)}else e.Phase==="Backup_Finalize"||e.Phase==="Backup_WaitForUpload"?i=.9:e.Phase==="Backup_Delete"||e.Phase==="Backup_Compact"?i=.95:e.Phase==="Backup_VerificationUpload"||e.Phase==="Backup_PostBackupVerify"?i=.98:e.Phase==="Backup_Complete"||e.Phase==="Backup_WaitForUpload"?i=1:e.OverallProgress>0&&(i=e.OverallProgress);return i}#c(e){let i="Running \u2026";if(e.task&&e&&(i=e.Phase?$[e.Phase]:"Running \u2026",e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles"))if(e.StillCounting)i=`Counting (${e.TotalFileCount} files found, ${this.#i.transform(e.TotalFileSize)})`;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,s=e.TotalFileCount-e.ProcessedFileCount,c=e.TotalFileSize-e.ProcessedFileSize-t,R=e.BackendSpeed<0?"":` at ${this.#i.transform(e.BackendSpeed)}/s`;i=`${e.Phase==="Restore_DownloadingRemoteFiles"?"Restoring: ":""}${s} files (${this.#i.transform(c)}) to go ${R}`}return i}static \u0275fac=function(i){return new(i||r)};static \u0275prov=k({token:r,factory:r.\u0275fac,providedIn:"root"})};export{_ as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as o}from"./chunk-
|
|
1
|
+
import{b as o}from"./chunk-TQE7OBBP.js";import{C as a,E as i,O as r,S as u,Y as n,ua as s}from"./chunk-QDAWQNBQ.js";var l=class p{#s=n(o);#p=null;#t=s([]);#e=s([]);#a=s(!1);#i=s(!1);#r=s(null);backups=this.#e.asReadonly();backupsLoading=this.#a.asReadonly();startingBackup=this.#i.asReadonly();deletingBackup=this.#r.asReadonly();draftBackups=this.#t.asReadonly();addDraftBackup(t){let e=crypto.randomUUID();return this.#t.set([...this.#t(),{id:e,data:t}]),e}removeDraftBackupById(t){this.#t.set(this.#t().filter(e=>e.id!==t))}getBackupById(t){return this.#e().find(e=>e.Backup?.ID===t)??null}getBackups(t=!1){let e=this.#p,c=Date.now(),k=e&&c-e<15*60*1e3;!1||!t&&k&&this.#e().length||(this.#p=c,this.#a.set(!0),this.#s.getApiV1Backups().pipe(a(1),r(B=>this.#e.set(B)),i(()=>this.#a.set(!1))).subscribe())}startBackup(t){this.#i.set(!0),this.#s.postApiV1BackupByIdStart({id:t}).pipe(a(1),r(()=>this.getBackups()),i(()=>this.#i.set(!1))).subscribe()}deleteBackup(t){this.#r.set(t),this.#s.deleteApiV1BackupById({id:t}).pipe(a(1),r(()=>this.getBackups()),i(()=>this.#r.set(null))).subscribe()}static \u0275fac=function(e){return new(e||p)};static \u0275prov=u({token:p,factory:p.\u0275fac,providedIn:"root"})};export{l as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as Pr}from"./chunk-NVTD7IP4.js";import{j as vt,n as _e}from"./chunk-JOBMLOGZ.js";import{$ as je,B as ut,C as ee,Cc as gt,E as Pe,Eb as Mr,F as H,G as ct,Gc as Le,H as or,J as sr,Kc as ke,L as ar,M as x,N as ur,O as S,P as w,Qa as vr,Rc as xr,S as b,U as cr,Ub as Tr,V as P,Va as pt,W as lt,Wa as j,X as ht,Xa as mr,Y as g,Z as lr,a as er,aa as _,ac as Or,bb as yr,bc as Ur,c as tr,ca as Ne,cc as Er,db as Rr,e as it,eb as Sr,f as ot,g as V,ga as dt,gb as $e,h as M,ha as hr,ia as dr,j as k,ja as fr,jb as Cr,k as T,ka as pr,l as d,la as te,lb as wr,m as de,mb as br,n as rr,o as nr,ob as Ir,p as m,pb as Ar,q as xe,qa as gr,r as O,ra as ft,s as st,sb as Dr,t as ir,u as at,w as X,y as J,z as fe}from"./chunk-QDAWQNBQ.js";import{a as l,b as I}from"./chunk-C6Q5SG76.js";var p="primary",Te=Symbol("RouteTitle"),Ct=class{params;constructor(r){this.params=r||{}}has(r){return Object.prototype.hasOwnProperty.call(this.params,r)}get(r){if(this.has(r)){let e=this.params[r];return Array.isArray(e)?e[0]:e}return null}getAll(r){if(this.has(r)){let e=this.params[r];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function ae(t){return new Ct(t)}function Rn(t,r,e){let n=e.path.split("/");if(n.length>t.length||e.pathMatch==="full"&&(r.hasChildren()||n.length<t.length))return null;let i={};for(let o=0;o<n.length;o++){let s=n[o],u=t[o];if(s[0]===":")i[s.substring(1)]=u;else if(s!==u.path)return null}return{consumed:t.slice(0,n.length),posParams:i}}function Sn(t,r){if(t.length!==r.length)return!1;for(let e=0;e<t.length;++e)if(!L(t[e],r[e]))return!1;return!0}function L(t,r){let e=t?wt(t):void 0,n=r?wt(r):void 0;if(!e||!n||e.length!=n.length)return!1;let i;for(let o=0;o<e.length;o++)if(i=e[o],!Br(t[i],r[i]))return!1;return!0}function wt(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function Br(t,r){if(Array.isArray(t)&&Array.isArray(r)){if(t.length!==r.length)return!1;let e=[...t].sort(),n=[...r].sort();return e.every((i,o)=>n[o]===i)}else return t===r}function Vr(t){return t.length>0?t[t.length-1]:null}function W(t){return rr(t)?t:br(t)?T(Promise.resolve(t)):d(t)}var Cn={exact:Wr,subset:Gr},Hr={exact:wn,subset:bn,ignored:()=>!0};function jr(t,r,e){return Cn[e.paths](t.root,r.root,e.matrixParams)&&Hr[e.queryParams](t.queryParams,r.queryParams)&&!(e.fragment==="exact"&&t.fragment!==r.fragment)}function wn(t,r){return L(t,r)}function Wr(t,r,e){if(!Q(t.segments,r.segments)||!qe(t.segments,r.segments,e)||t.numberOfChildren!==r.numberOfChildren)return!1;for(let n in r.children)if(!t.children[n]||!Wr(t.children[n],r.children[n],e))return!1;return!0}function bn(t,r){return Object.keys(r).length<=Object.keys(t).length&&Object.keys(r).every(e=>Br(t[e],r[e]))}function Gr(t,r,e){return Qr(t,r,r.segments,e)}function Qr(t,r,e,n){if(t.segments.length>e.length){let i=t.segments.slice(0,e.length);return!(!Q(i,e)||r.hasChildren()||!qe(i,e,n))}else if(t.segments.length===e.length){if(!Q(t.segments,e)||!qe(t.segments,e,n))return!1;for(let i in r.children)if(!t.children[i]||!Gr(t.children[i],r.children[i],n))return!1;return!0}else{let i=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!Q(t.segments,i)||!qe(t.segments,i,n)||!t.children[p]?!1:Qr(t.children[p],r,o,n)}}function qe(t,r,e){return r.every((n,i)=>Hr[e](t[i].parameters,n.parameters))}var F=class{root;queryParams;fragment;_queryParamMap;constructor(r=new v([],{}),e={},n=null){this.root=r,this.queryParams=e,this.fragment=n}get queryParamMap(){return this._queryParamMap??=ae(this.queryParams),this._queryParamMap}toString(){return Dn.serialize(this)}},v=class{segments;children;parent=null;constructor(r,e){this.segments=r,this.children=e,Object.values(e).forEach(n=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Be(this)}},G=class{path;parameters;_parameterMap;constructor(r,e){this.path=r,this.parameters=e}get parameterMap(){return this._parameterMap??=ae(this.parameters),this._parameterMap}toString(){return Zr(this)}};function In(t,r){return Q(t,r)&&t.every((e,n)=>L(e.parameters,r[n].parameters))}function Q(t,r){return t.length!==r.length?!1:t.every((e,n)=>e.path===r[n].path)}function An(t,r){let e=[];return Object.entries(t.children).forEach(([n,i])=>{n===p&&(e=e.concat(r(i,n)))}),Object.entries(t.children).forEach(([n,i])=>{n!==p&&(e=e.concat(r(i,n)))}),e}var Qt=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=b({token:t,factory:()=>new Re,providedIn:"root"})}return t})(),Re=class{parse(r){let e=new It(r);return new F(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(r){let e=`/${pe(r.root,!0)}`,n=On(r.queryParams),i=typeof r.fragment=="string"?`#${Mn(r.fragment)}`:"";return`${e}${n}${i}`}},Dn=new Re;function Be(t){return t.segments.map(r=>Zr(r)).join("/")}function pe(t,r){if(!t.hasChildren())return Be(t);if(r){let e=t.children[p]?pe(t.children[p],!1):"",n=[];return Object.entries(t.children).forEach(([i,o])=>{i!==p&&n.push(`${i}:${pe(o,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}else{let e=An(t,(n,i)=>i===p?[pe(t.children[p],!1)]:[`${i}:${pe(n,!1)}`]);return Object.keys(t.children).length===1&&t.children[p]!=null?`${Be(t)}/${e[0]}`:`${Be(t)}/(${e.join("//")})`}}function Kr(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function ze(t){return Kr(t).replace(/%3B/gi,";")}function Mn(t){return encodeURI(t)}function bt(t){return Kr(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Ve(t){return decodeURIComponent(t)}function Nr(t){return Ve(t.replace(/\+/g,"%20"))}function Zr(t){return`${bt(t.path)}${Tn(t.parameters)}`}function Tn(t){return Object.entries(t).map(([r,e])=>`;${bt(r)}=${bt(e)}`).join("")}function On(t){let r=Object.entries(t).map(([e,n])=>Array.isArray(n)?n.map(i=>`${ze(e)}=${ze(i)}`).join("&"):`${ze(e)}=${ze(n)}`).filter(e=>e);return r.length?`?${r.join("&")}`:""}var Un=/^[^\/()?;#]+/;function mt(t){let r=t.match(Un);return r?r[0]:""}var En=/^[^\/()?;=#]+/;function xn(t){let r=t.match(En);return r?r[0]:""}var Pn=/^[^=?&#]+/;function jn(t){let r=t.match(Pn);return r?r[0]:""}var Nn=/^[^&#]+/;function $n(t){let r=t.match(Nn);return r?r[0]:""}var It=class{url;remaining;constructor(r){this.url=r,this.remaining=r}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new v([],{}):new v([],this.parseChildren())}parseQueryParams(){let r={};if(this.consumeOptional("?"))do this.parseQueryParam(r);while(this.consumeOptional("&"));return r}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let r=[];for(this.peekStartsWith("(")||r.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),r.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(r.length>0||Object.keys(e).length>0)&&(n[p]=new v(r,e)),n}parseSegment(){let r=mt(this.remaining);if(r===""&&this.peekStartsWith(";"))throw new w(4009,!1);return this.capture(r),new G(Ve(r),this.parseMatrixParams())}parseMatrixParams(){let r={};for(;this.consumeOptional(";");)this.parseParam(r);return r}parseParam(r){let e=xn(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){let i=mt(this.remaining);i&&(n=i,this.capture(n))}r[Ve(e)]=Ve(n)}parseQueryParam(r){let e=jn(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){let s=$n(this.remaining);s&&(n=s,this.capture(n))}let i=Nr(e),o=Nr(n);if(r.hasOwnProperty(i)){let s=r[i];Array.isArray(s)||(s=[s],r[i]=s),s.push(o)}else r[i]=o}parseParens(r){let e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let n=mt(this.remaining),i=this.remaining[n.length];if(i!=="/"&&i!==")"&&i!==";")throw new w(4010,!1);let o;n.indexOf(":")>-1?(o=n.slice(0,n.indexOf(":")),this.capture(o),this.capture(":")):r&&(o=p);let s=this.parseChildren();e[o]=Object.keys(s).length===1?s[p]:new v([],s),this.consumeOptional("//")}return e}peekStartsWith(r){return this.remaining.startsWith(r)}consumeOptional(r){return this.peekStartsWith(r)?(this.remaining=this.remaining.substring(r.length),!0):!1}capture(r){if(!this.consumeOptional(r))throw new w(4011,!1)}};function Yr(t){return t.segments.length>0?new v([],{[p]:t}):t}function Xr(t){let r={};for(let[n,i]of Object.entries(t.children)){let o=Xr(i);if(n===p&&o.segments.length===0&&o.hasChildren())for(let[s,u]of Object.entries(o.children))r[s]=u;else(o.segments.length>0||o.hasChildren())&&(r[n]=o)}let e=new v(t.segments,r);return Ln(e)}function Ln(t){if(t.numberOfChildren===1&&t.children[p]){let r=t.children[p];return new v(t.segments.concat(r.segments),r.children)}return t}function K(t){return t instanceof F}function kn(t,r,e=null,n=null){let i=Jr(t);return en(i,r,e,n)}function Jr(t){let r;function e(o){let s={};for(let a of o.children){let c=e(a);s[a.outlet]=c}let u=new v(o.url,s);return o===t&&(r=u),u}let n=e(t.root),i=Yr(n);return r??i}function en(t,r,e,n){let i=t;for(;i.parent;)i=i.parent;if(r.length===0)return yt(i,i,i,e,n);let o=_n(r);if(o.toRoot())return yt(i,i,new v([],{}),e,n);let s=zn(o,i,t),u=s.processChildren?ve(s.segmentGroup,s.index,o.commands):rn(s.segmentGroup,s.index,o.commands);return yt(i,s.segmentGroup,u,e,n)}function He(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function Se(t){return typeof t=="object"&&t!=null&&t.outlets}function yt(t,r,e,n,i){let o={};n&&Object.entries(n).forEach(([a,c])=>{o[a]=Array.isArray(c)?c.map(h=>`${h}`):`${c}`});let s;t===r?s=e:s=tn(t,r,e);let u=Yr(Xr(s));return new F(u,o,i)}function tn(t,r,e){let n={};return Object.entries(t.children).forEach(([i,o])=>{o===r?n[i]=e:n[i]=tn(o,r,e)}),new v(t.segments,n)}var We=class{isAbsolute;numberOfDoubleDots;commands;constructor(r,e,n){if(this.isAbsolute=r,this.numberOfDoubleDots=e,this.commands=n,r&&n.length>0&&He(n[0]))throw new w(4003,!1);let i=n.find(Se);if(i&&i!==Vr(n))throw new w(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function _n(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new We(!0,0,t);let r=0,e=!1,n=t.reduce((i,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let u={};return Object.entries(o.outlets).forEach(([a,c])=>{u[a]=typeof c=="string"?c.split("/"):c}),[...i,{outlets:u}]}if(o.segmentPath)return[...i,o.segmentPath]}return typeof o!="string"?[...i,o]:s===0?(o.split("/").forEach((u,a)=>{a==0&&u==="."||(a==0&&u===""?e=!0:u===".."?r++:u!=""&&i.push(u))}),i):[...i,o]},[]);return new We(e,r,n)}var ie=class{segmentGroup;processChildren;index;constructor(r,e,n){this.segmentGroup=r,this.processChildren=e,this.index=n}};function zn(t,r,e){if(t.isAbsolute)return new ie(r,!0,0);if(!e)return new ie(r,!1,NaN);if(e.parent===null)return new ie(e,!0,0);let n=He(t.commands[0])?0:1,i=e.segments.length-1+n;return Fn(e,i,t.numberOfDoubleDots)}function Fn(t,r,e){let n=t,i=r,o=e;for(;o>i;){if(o-=i,n=n.parent,!n)throw new w(4005,!1);i=n.segments.length}return new ie(n,!1,i-o)}function qn(t){return Se(t[0])?t[0].outlets:{[p]:t}}function rn(t,r,e){if(t??=new v([],{}),t.segments.length===0&&t.hasChildren())return ve(t,r,e);let n=Bn(t,r,e),i=e.slice(n.commandIndex);if(n.match&&n.pathIndex<t.segments.length){let o=new v(t.segments.slice(0,n.pathIndex),{});return o.children[p]=new v(t.segments.slice(n.pathIndex),t.children),ve(o,0,i)}else return n.match&&i.length===0?new v(t.segments,{}):n.match&&!t.hasChildren()?At(t,r,e):n.match?ve(t,0,i):At(t,r,e)}function ve(t,r,e){if(e.length===0)return new v(t.segments,{});{let n=qn(e),i={};if(Object.keys(n).some(o=>o!==p)&&t.children[p]&&t.numberOfChildren===1&&t.children[p].segments.length===0){let o=ve(t.children[p],r,e);return new v(t.segments,o.children)}return Object.entries(n).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(i[o]=rn(t.children[o],r,s))}),Object.entries(t.children).forEach(([o,s])=>{n[o]===void 0&&(i[o]=s)}),new v(t.segments,i)}}function Bn(t,r,e){let n=0,i=r,o={match:!1,pathIndex:0,commandIndex:0};for(;i<t.segments.length;){if(n>=e.length)return o;let s=t.segments[i],u=e[n];if(Se(u))break;let a=`${u}`,c=n<e.length-1?e[n+1]:null;if(i>0&&a===void 0)break;if(a&&c&&typeof c=="object"&&c.outlets===void 0){if(!Lr(a,c,s))return o;n+=2}else{if(!Lr(a,{},s))return o;n++}i++}return{match:!0,pathIndex:i,commandIndex:n}}function At(t,r,e){let n=t.segments.slice(0,r),i=0;for(;i<e.length;){let o=e[i];if(Se(o)){let a=Vn(o.outlets);return new v(n,a)}if(i===0&&He(e[0])){let a=t.segments[r];n.push(new G(a.path,$r(e[0]))),i++;continue}let s=Se(o)?o.outlets[p]:`${o}`,u=i<e.length-1?e[i+1]:null;s&&u&&He(u)?(n.push(new G(s,$r(u))),i+=2):(n.push(new G(s,{})),i++)}return new v(n,{})}function Vn(t){let r={};return Object.entries(t).forEach(([e,n])=>{typeof n=="string"&&(n=[n]),n!==null&&(r[e]=At(new v([],{}),0,n))}),r}function $r(t){let r={};return Object.entries(t).forEach(([e,n])=>r[e]=`${n}`),r}function Lr(t,r,e){return t==e.path&&L(r,e.parameters)}var me="imperative",R=function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t}(R||{}),U=class{id;url;constructor(r,e){this.id=r,this.url=e}},Ce=class extends U{type=R.NavigationStart;navigationTrigger;restoredState;constructor(r,e,n="imperative",i=null){super(r,e),this.navigationTrigger=n,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},q=class extends U{urlAfterRedirects;type=R.NavigationEnd;constructor(r,e,n){super(r,e),this.urlAfterRedirects=n}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},D=function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t}(D||{}),Dt=function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t}(Dt||{}),z=class extends U{reason;code;type=R.NavigationCancel;constructor(r,e,n,i){super(r,e),this.reason=n,this.code=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},Z=class extends U{reason;code;type=R.NavigationSkipped;constructor(r,e,n,i){super(r,e),this.reason=n,this.code=i}},we=class extends U{error;target;type=R.NavigationError;constructor(r,e,n,i){super(r,e),this.error=n,this.target=i}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},Ge=class extends U{urlAfterRedirects;state;type=R.RoutesRecognized;constructor(r,e,n,i){super(r,e),this.urlAfterRedirects=n,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Mt=class extends U{urlAfterRedirects;state;type=R.GuardsCheckStart;constructor(r,e,n,i){super(r,e),this.urlAfterRedirects=n,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Tt=class extends U{urlAfterRedirects;state;shouldActivate;type=R.GuardsCheckEnd;constructor(r,e,n,i,o){super(r,e),this.urlAfterRedirects=n,this.state=i,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},Ot=class extends U{urlAfterRedirects;state;type=R.ResolveStart;constructor(r,e,n,i){super(r,e),this.urlAfterRedirects=n,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Ut=class extends U{urlAfterRedirects;state;type=R.ResolveEnd;constructor(r,e,n,i){super(r,e),this.urlAfterRedirects=n,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Et=class{route;type=R.RouteConfigLoadStart;constructor(r){this.route=r}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},xt=class{route;type=R.RouteConfigLoadEnd;constructor(r){this.route=r}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},Pt=class{snapshot;type=R.ChildActivationStart;constructor(r){this.snapshot=r}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},jt=class{snapshot;type=R.ChildActivationEnd;constructor(r){this.snapshot=r}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Nt=class{snapshot;type=R.ActivationStart;constructor(r){this.snapshot=r}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},$t=class{snapshot;type=R.ActivationEnd;constructor(r){this.snapshot=r}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var be=class{},ue=class{url;navigationBehaviorOptions;constructor(r,e){this.url=r,this.navigationBehaviorOptions=e}};function Hn(t,r){return t.providers&&!t._injector&&(t._injector=Rr(t.providers,r,`Route: ${t.path}`)),t._injector??r}function N(t){return t.outlet||p}function Wn(t,r){let e=t.filter(n=>N(n)===r);return e.push(...t.filter(n=>N(n)!==r)),e}function Oe(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let r=t.parent;r;r=r.parent){let e=r.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}var Lt=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return Oe(this.route?.snapshot)??this.rootInjector}constructor(r){this.rootInjector=r,this.children=new et(this.rootInjector)}},et=(()=>{class t{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e}onChildOutletCreated(e,n){let i=this.getOrCreateContext(e);i.outlet=n,this.contexts.set(e,i)}onChildOutletDestroyed(e){let n=this.getContext(e);n&&(n.outlet=null,n.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let n=this.getContext(e);return n||(n=new Lt(this.rootInjector),this.contexts.set(e,n)),n}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(n){return new(n||t)(ht(je))};static \u0275prov=b({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Qe=class{_root;constructor(r){this._root=r}get root(){return this._root.value}parent(r){let e=this.pathFromRoot(r);return e.length>1?e[e.length-2]:null}children(r){let e=kt(r,this._root);return e?e.children.map(n=>n.value):[]}firstChild(r){let e=kt(r,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(r){let e=_t(r,this._root);return e.length<2?[]:e[e.length-2].children.map(i=>i.value).filter(i=>i!==r)}pathFromRoot(r){return _t(r,this._root).map(e=>e.value)}};function kt(t,r){if(t===r.value)return r;for(let e of r.children){let n=kt(t,e);if(n)return n}return null}function _t(t,r){if(t===r.value)return[r];for(let e of r.children){let n=_t(t,e);if(n.length)return n.unshift(r),n}return[]}var A=class{value;children;constructor(r,e){this.value=r,this.children=e}toString(){return`TreeNode(${this.value})`}};function ne(t){let r={};return t&&t.children.forEach(e=>r[e.value.outlet]=e),r}var Ke=class extends Qe{snapshot;constructor(r,e){super(r),this.snapshot=e,Kt(this,r)}toString(){return this.snapshot.toString()}};function nn(t){let r=Gn(t),e=new M([new G("",{})]),n=new M({}),i=new M({}),o=new M({}),s=new M(""),u=new Y(e,n,o,s,i,p,t,r.root);return u.snapshot=r.root,new Ke(new A(u,[]),r)}function Gn(t){let r={},e={},n={},i="",o=new oe([],r,n,i,e,p,t,null,{});return new Ye("",new A(o,[]))}var Y=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(r,e,n,i,o,s,u,a){this.urlSubject=r,this.paramsSubject=e,this.queryParamsSubject=n,this.fragmentSubject=i,this.dataSubject=o,this.outlet=s,this.component=u,this._futureSnapshot=a,this.title=this.dataSubject?.pipe(m(c=>c[Te]))??d(void 0),this.url=r,this.params=e,this.queryParams=n,this.fragment=i,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(m(r=>ae(r))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(m(r=>ae(r))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function Ze(t,r,e="emptyOnly"){let n,{routeConfig:i}=t;return r!==null&&(e==="always"||i?.path===""||!r.component&&!r.routeConfig?.loadComponent)?n={params:l(l({},r.params),t.params),data:l(l({},r.data),t.data),resolve:l(l(l(l({},t.data),r.data),i?.data),t._resolvedData)}:n={params:l({},t.params),data:l({},t.data),resolve:l(l({},t.data),t._resolvedData??{})},i&&sn(i)&&(n.resolve[Te]=i.title),n}var oe=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[Te]}constructor(r,e,n,i,o,s,u,a,c){this.url=r,this.params=e,this.queryParams=n,this.fragment=i,this.data=o,this.outlet=s,this.component=u,this.routeConfig=a,this._resolve=c}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=ae(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=ae(this.queryParams),this._queryParamMap}toString(){let r=this.url.map(n=>n.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${r}', path:'${e}')`}},Ye=class extends Qe{url;constructor(r,e){super(e),this.url=r,Kt(this,e)}toString(){return on(this._root)}};function Kt(t,r){r.value._routerState=t,r.children.forEach(e=>Kt(t,e))}function on(t){let r=t.children.length>0?` { ${t.children.map(on).join(", ")} } `:"";return`${t.value}${r}`}function Rt(t){if(t.snapshot){let r=t.snapshot,e=t._futureSnapshot;t.snapshot=e,L(r.queryParams,e.queryParams)||t.queryParamsSubject.next(e.queryParams),r.fragment!==e.fragment&&t.fragmentSubject.next(e.fragment),L(r.params,e.params)||t.paramsSubject.next(e.params),Sn(r.url,e.url)||t.urlSubject.next(e.url),L(r.data,e.data)||t.dataSubject.next(e.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function zt(t,r){let e=L(t.params,r.params)&&In(t.url,r.url),n=!t.parent!=!r.parent;return e&&!n&&(!t.parent||zt(t.parent,r.parent))}function sn(t){return typeof t.title=="string"||t.title===null}var Qn=new P(""),Kn=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=p;activateEvents=new te;deactivateEvents=new te;attachEvents=new te;detachEvents=new te;routerOutletData=gr(void 0);parentContexts=g(et);location=g(mr);changeDetector=g(Le);inputBinder=g(tt,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(e){if(e.name){let{firstChange:n,previousValue:i}=e.name;if(n)return;this.isTrackedInParentContexts(i)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(i)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new w(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new w(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new w(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,n){this.activated=e,this._activatedRoute=n,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,n){if(this.isActivated)throw new w(4013,!1);this._activatedRoute=e;let i=this.location,s=e.snapshot.component,u=this.parentContexts.getOrCreateContext(this.name).children,a=new Ft(e,u,i.injector,this.routerOutletData);this.activated=i.createComponent(s,{index:i.length,injector:a,environmentInjector:n}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(n){return new(n||t)};static \u0275dir=$e({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[Ne]})}return t})(),Ft=class t{route;childContexts;parent;outletData;__ngOutletInjector(r){return new t(this.route,this.childContexts,r,this.outletData)}constructor(r,e,n,i){this.route=r,this.childContexts=e,this.parent=n,this.outletData=i}get(r,e){return r===Y?this.route:r===et?this.childContexts:r===Qn?this.outletData:this.parent.get(r,e)}},tt=new P(""),kr=(()=>{class t{outletDataSubscriptions=new Map;bindActivatedRouteToOutletComponent(e){this.unsubscribeFromRouteData(e),this.subscribeToRouteData(e)}unsubscribeFromRouteData(e){this.outletDataSubscriptions.get(e)?.unsubscribe(),this.outletDataSubscriptions.delete(e)}subscribeToRouteData(e){let{activatedRoute:n}=e,i=xe([n.queryParams,n.params,n.data]).pipe(x(([o,s,u],a)=>(u=l(l(l({},o),s),u),a===0?d(u):Promise.resolve(u)))).subscribe(o=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==n||n.component===null){this.unsubscribeFromRouteData(e);return}let s=xr(n.component);if(!s){this.unsubscribeFromRouteData(e);return}for(let{templateName:u}of s.inputs)e.activatedComponentRef.setInput(u,o[u])});this.outletDataSubscriptions.set(e,i)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=b({token:t,factory:t.\u0275fac})}return t})();function Zn(t,r,e){let n=Ie(t,r._root,e?e._root:void 0);return new Ke(n,r)}function Ie(t,r,e){if(e&&t.shouldReuseRoute(r.value,e.value.snapshot)){let n=e.value;n._futureSnapshot=r.value;let i=Yn(t,r,e);return new A(n,i)}else{if(t.shouldAttach(r.value)){let o=t.retrieve(r.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=r.value,s.children=r.children.map(u=>Ie(t,u)),s}}let n=Xn(r.value),i=r.children.map(o=>Ie(t,o));return new A(n,i)}}function Yn(t,r,e){return r.children.map(n=>{for(let i of e.children)if(t.shouldReuseRoute(n.value,i.value.snapshot))return Ie(t,n,i);return Ie(t,n)})}function Xn(t){return new Y(new M(t.url),new M(t.params),new M(t.queryParams),new M(t.fragment),new M(t.data),t.outlet,t.component,t)}var Ae=class{redirectTo;navigationBehaviorOptions;constructor(r,e){this.redirectTo=r,this.navigationBehaviorOptions=e}},an="ngNavigationCancelingError";function Xe(t,r){let{redirectTo:e,navigationBehaviorOptions:n}=K(r)?{redirectTo:r,navigationBehaviorOptions:void 0}:r,i=un(!1,D.Redirect);return i.url=e,i.navigationBehaviorOptions=n,i}function un(t,r){let e=new Error(`NavigationCancelingError: ${t||""}`);return e[an]=!0,e.cancellationCode=r,e}function Jn(t){return cn(t)&&K(t.url)}function cn(t){return!!t&&t[an]}var ei=(t,r,e,n)=>m(i=>(new qt(r,i.targetRouterState,i.currentRouterState,e,n).activate(t),i)),qt=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(r,e,n,i,o){this.routeReuseStrategy=r,this.futureState=e,this.currState=n,this.forwardEvent=i,this.inputBindingEnabled=o}activate(r){let e=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,n,r),Rt(this.futureState.root),this.activateChildRoutes(e,n,r)}deactivateChildRoutes(r,e,n){let i=ne(e);r.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,i[s],n),delete i[s]}),Object.values(i).forEach(o=>{this.deactivateRouteAndItsChildren(o,n)})}deactivateRoutes(r,e,n){let i=r.value,o=e?e.value:null;if(i===o)if(i.component){let s=n.getContext(i.outlet);s&&this.deactivateChildRoutes(r,e,s.children)}else this.deactivateChildRoutes(r,e,n);else o&&this.deactivateRouteAndItsChildren(e,n)}deactivateRouteAndItsChildren(r,e){r.value.component&&this.routeReuseStrategy.shouldDetach(r.value.snapshot)?this.detachAndStoreRouteSubtree(r,e):this.deactivateRouteAndOutlet(r,e)}detachAndStoreRouteSubtree(r,e){let n=e.getContext(r.value.outlet),i=n&&r.value.component?n.children:e,o=ne(r);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);if(n&&n.outlet){let s=n.outlet.detach(),u=n.children.onOutletDeactivated();this.routeReuseStrategy.store(r.value.snapshot,{componentRef:s,route:r,contexts:u})}}deactivateRouteAndOutlet(r,e){let n=e.getContext(r.value.outlet),i=n&&r.value.component?n.children:e,o=ne(r);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);n&&(n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated()),n.attachRef=null,n.route=null)}activateChildRoutes(r,e,n){let i=ne(e);r.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],n),this.forwardEvent(new $t(o.value.snapshot))}),r.children.length&&this.forwardEvent(new jt(r.value.snapshot))}activateRoutes(r,e,n){let i=r.value,o=e?e.value:null;if(Rt(i),i===o)if(i.component){let s=n.getOrCreateContext(i.outlet);this.activateChildRoutes(r,e,s.children)}else this.activateChildRoutes(r,e,n);else if(i.component){let s=n.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){let u=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),s.children.onOutletReAttached(u.contexts),s.attachRef=u.componentRef,s.route=u.route.value,s.outlet&&s.outlet.attach(u.componentRef,u.route.value),Rt(u.route.value),this.activateChildRoutes(r,null,s.children)}else s.attachRef=null,s.route=i,s.outlet&&s.outlet.activateWith(i,s.injector),this.activateChildRoutes(r,null,s.children)}else this.activateChildRoutes(r,null,n)}},Je=class{path;route;constructor(r){this.path=r,this.route=this.path[this.path.length-1]}},se=class{component;route;constructor(r,e){this.component=r,this.route=e}};function ti(t,r,e){let n=t._root,i=r?r._root:null;return ge(n,i,e,[n.value])}function ri(t){let r=t.routeConfig?t.routeConfig.canActivateChild:null;return!r||r.length===0?null:{node:t,guards:r}}function le(t,r){let e=Symbol(),n=r.get(t,e);return n===e?typeof t=="function"&&!cr(t)?t:r.get(t):n}function ge(t,r,e,n,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=ne(r);return t.children.forEach(s=>{ni(s,o[s.value.outlet],e,n.concat([s.value]),i),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,u])=>ye(u,e.getContext(s),i)),i}function ni(t,r,e,n,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=t.value,s=r?r.value:null,u=e?e.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let a=ii(s,o,o.routeConfig.runGuardsAndResolvers);a?i.canActivateChecks.push(new Je(n)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?ge(t,r,u?u.children:null,n,i):ge(t,r,e,n,i),a&&u&&u.outlet&&u.outlet.isActivated&&i.canDeactivateChecks.push(new se(u.outlet.component,s))}else s&&ye(r,u,i),i.canActivateChecks.push(new Je(n)),o.component?ge(t,null,u?u.children:null,n,i):ge(t,null,e,n,i);return i}function ii(t,r,e){if(typeof e=="function")return e(t,r);switch(e){case"pathParamsChange":return!Q(t.url,r.url);case"pathParamsOrQueryParamsChange":return!Q(t.url,r.url)||!L(t.queryParams,r.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!zt(t,r)||!L(t.queryParams,r.queryParams);case"paramsChange":default:return!zt(t,r)}}function ye(t,r,e){let n=ne(t),i=t.value;Object.entries(n).forEach(([o,s])=>{i.component?r?ye(s,r.children.getContext(o),e):ye(s,null,e):ye(s,r,e)}),i.component?r&&r.outlet&&r.outlet.isActivated?e.canDeactivateChecks.push(new se(r.outlet.component,i)):e.canDeactivateChecks.push(new se(null,i)):e.canDeactivateChecks.push(new se(null,i))}function Ue(t){return typeof t=="function"}function oi(t){return typeof t=="boolean"}function si(t){return t&&Ue(t.canLoad)}function ai(t){return t&&Ue(t.canActivate)}function ui(t){return t&&Ue(t.canActivateChild)}function ci(t){return t&&Ue(t.canDeactivate)}function li(t){return t&&Ue(t.canMatch)}function ln(t){return t instanceof nr||t?.name==="EmptyError"}var Fe=Symbol("INITIAL_VALUE");function ce(){return x(t=>xe(t.map(r=>r.pipe(ee(1),ar(Fe)))).pipe(m(r=>{for(let e of r)if(e!==!0){if(e===Fe)return Fe;if(e===!1||hi(e))return e}return!0}),X(r=>r!==Fe),ee(1)))}function hi(t){return K(t)||t instanceof Ae}function di(t,r){return O(e=>{let{targetSnapshot:n,currentSnapshot:i,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return s.length===0&&o.length===0?d(I(l({},e),{guardsResult:!0})):fi(s,n,i,t).pipe(O(u=>u&&oi(u)?pi(n,o,t,r):d(u)),m(u=>I(l({},e),{guardsResult:u})))})}function fi(t,r,e,n){return T(t).pipe(O(i=>Ri(i.component,i.route,e,r,n)),H(i=>i!==!0,!0))}function pi(t,r,e,n){return T(r).pipe(fe(i=>ir(vi(i.route.parent,n),gi(i.route,n),yi(t,i.path,e),mi(t,i.route,e))),H(i=>i!==!0,!0))}function gi(t,r){return t!==null&&r&&r(new Nt(t)),d(!0)}function vi(t,r){return t!==null&&r&&r(new Pt(t)),d(!0)}function mi(t,r,e){let n=r.routeConfig?r.routeConfig.canActivate:null;if(!n||n.length===0)return d(!0);let i=n.map(o=>at(()=>{let s=Oe(r)??e,u=le(o,s),a=ai(u)?u.canActivate(r,t):_(s,()=>u(r,t));return W(a).pipe(H())}));return d(i).pipe(ce())}function yi(t,r,e){let n=r[r.length-1],o=r.slice(0,r.length-1).reverse().map(s=>ri(s)).filter(s=>s!==null).map(s=>at(()=>{let u=s.guards.map(a=>{let c=Oe(s.node)??e,h=le(a,c),f=ui(h)?h.canActivateChild(n,t):_(c,()=>h(n,t));return W(f).pipe(H())});return d(u).pipe(ce())}));return d(o).pipe(ce())}function Ri(t,r,e,n,i){let o=r&&r.routeConfig?r.routeConfig.canDeactivate:null;if(!o||o.length===0)return d(!0);let s=o.map(u=>{let a=Oe(r)??i,c=le(u,a),h=ci(c)?c.canDeactivate(t,r,e,n):_(a,()=>c(t,r,e,n));return W(h).pipe(H())});return d(s).pipe(ce())}function Si(t,r,e,n){let i=r.canLoad;if(i===void 0||i.length===0)return d(!0);let o=i.map(s=>{let u=le(s,t),a=si(u)?u.canLoad(r,e):_(t,()=>u(r,e));return W(a)});return d(o).pipe(ce(),hn(n))}function hn(t){return tr(S(r=>{if(typeof r!="boolean")throw Xe(t,r)}),m(r=>r===!0))}function Ci(t,r,e,n){let i=r.canMatch;if(!i||i.length===0)return d(!0);let o=i.map(s=>{let u=le(s,t),a=li(u)?u.canMatch(r,e):_(t,()=>u(r,e));return W(a)});return d(o).pipe(ce(),hn(n))}var De=class{segmentGroup;constructor(r){this.segmentGroup=r||null}},Me=class extends Error{urlTree;constructor(r){super(),this.urlTree=r}};function re(t){return de(new De(t))}function wi(t){return de(new w(4e3,!1))}function bi(t){return de(un(!1,D.GuardRejected))}var Bt=class{urlSerializer;urlTree;constructor(r,e){this.urlSerializer=r,this.urlTree=e}lineralizeSegments(r,e){let n=[],i=e.root;for(;;){if(n=n.concat(i.segments),i.numberOfChildren===0)return d(n);if(i.numberOfChildren>1||!i.children[p])return wi(`${r.redirectTo}`);i=i.children[p]}}applyRedirectCommands(r,e,n,i,o){if(typeof e!="string"){let u=e,{queryParams:a,fragment:c,routeConfig:h,url:f,outlet:y,params:$,data:C,title:B}=i,E=_(o,()=>u({params:$,data:C,queryParams:a,fragment:c,routeConfig:h,url:f,outlet:y,title:B}));if(E instanceof F)throw new Me(E);e=E}let s=this.applyRedirectCreateUrlTree(e,this.urlSerializer.parse(e),r,n);if(e[0]==="/")throw new Me(s);return s}applyRedirectCreateUrlTree(r,e,n,i){let o=this.createSegmentGroup(r,e.root,n,i);return new F(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(r,e){let n={};return Object.entries(r).forEach(([i,o])=>{if(typeof o=="string"&&o[0]===":"){let u=o.substring(1);n[i]=e[u]}else n[i]=o}),n}createSegmentGroup(r,e,n,i){let o=this.createSegments(r,e.segments,n,i),s={};return Object.entries(e.children).forEach(([u,a])=>{s[u]=this.createSegmentGroup(r,a,n,i)}),new v(o,s)}createSegments(r,e,n,i){return e.map(o=>o.path[0]===":"?this.findPosParam(r,o,i):this.findOrReturn(o,n))}findPosParam(r,e,n){let i=n[e.path.substring(1)];if(!i)throw new w(4001,!1);return i}findOrReturn(r,e){let n=0;for(let i of e){if(i.path===r.path)return e.splice(n),i;n++}return r}},Vt={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Ii(t,r,e,n,i){let o=dn(t,r,e);return o.matched?(n=Hn(r,n),Ci(n,r,e,i).pipe(m(s=>s===!0?o:l({},Vt)))):d(o)}function dn(t,r,e){if(r.path==="**")return Ai(e);if(r.path==="")return r.pathMatch==="full"&&(t.hasChildren()||e.length>0)?l({},Vt):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let i=(r.matcher||Rn)(e,t,r);if(!i)return l({},Vt);let o={};Object.entries(i.posParams??{}).forEach(([u,a])=>{o[u]=a.path});let s=i.consumed.length>0?l(l({},o),i.consumed[i.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:i.consumed,remainingSegments:e.slice(i.consumed.length),parameters:s,positionalParamSegments:i.posParams??{}}}function Ai(t){return{matched:!0,parameters:t.length>0?Vr(t).parameters:{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}function _r(t,r,e,n){return e.length>0&&Ti(t,e,n)?{segmentGroup:new v(r,Mi(n,new v(e,t.children))),slicedSegments:[]}:e.length===0&&Oi(t,e,n)?{segmentGroup:new v(t.segments,Di(t,e,n,t.children)),slicedSegments:e}:{segmentGroup:new v(t.segments,t.children),slicedSegments:e}}function Di(t,r,e,n){let i={};for(let o of e)if(rt(t,r,o)&&!n[N(o)]){let s=new v([],{});i[N(o)]=s}return l(l({},n),i)}function Mi(t,r){let e={};e[p]=r;for(let n of t)if(n.path===""&&N(n)!==p){let i=new v([],{});e[N(n)]=i}return e}function Ti(t,r,e){return e.some(n=>rt(t,r,n)&&N(n)!==p)}function Oi(t,r,e){return e.some(n=>rt(t,r,n))}function rt(t,r,e){return(t.hasChildren()||r.length>0)&&e.pathMatch==="full"?!1:e.path===""}function Ui(t,r,e){return r.length===0&&!t.children[e]}var Ht=class{};function Ei(t,r,e,n,i,o,s="emptyOnly"){return new Wt(t,r,e,n,i,s,o).recognize()}var xi=31,Wt=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(r,e,n,i,o,s,u){this.injector=r,this.configLoader=e,this.rootComponentType=n,this.config=i,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=u,this.applyRedirects=new Bt(this.urlSerializer,this.urlTree)}noMatchError(r){return new w(4002,`'${r.segmentGroup}'`)}recognize(){let r=_r(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(r).pipe(m(({children:e,rootSnapshot:n})=>{let i=new A(n,e),o=new Ye("",i),s=kn(n,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}}))}match(r){let e=new oe([],Object.freeze({}),Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),p,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,r,p,e).pipe(m(n=>({children:n,rootSnapshot:e})),J(n=>{if(n instanceof Me)return this.urlTree=n.urlTree,this.match(n.urlTree.root);throw n instanceof De?this.noMatchError(n):n}))}processSegmentGroup(r,e,n,i,o){return n.segments.length===0&&n.hasChildren()?this.processChildren(r,e,n,o):this.processSegment(r,e,n,n.segments,i,!0,o).pipe(m(s=>s instanceof A?[s]:[]))}processChildren(r,e,n,i){let o=[];for(let s of Object.keys(n.children))s==="primary"?o.unshift(s):o.push(s);return T(o).pipe(fe(s=>{let u=n.children[s],a=Wn(e,s);return this.processSegmentGroup(r,a,u,s,i)}),sr((s,u)=>(s.push(...u),s)),ut(null),or(),O(s=>{if(s===null)return re(n);let u=fn(s);return Pi(u),d(u)}))}processSegment(r,e,n,i,o,s,u){return T(e).pipe(fe(a=>this.processSegmentAgainstRoute(a._injector??r,e,a,n,i,o,s,u).pipe(J(c=>{if(c instanceof De)return d(null);throw c}))),H(a=>!!a),J(a=>{if(ln(a))return Ui(n,i,o)?d(new Ht):re(n);throw a}))}processSegmentAgainstRoute(r,e,n,i,o,s,u,a){return N(n)!==s&&(s===p||!rt(i,o,n))?re(i):n.redirectTo===void 0?this.matchSegmentAgainstRoute(r,i,n,o,s,a):this.allowRedirects&&u?this.expandSegmentAgainstRouteUsingRedirect(r,i,e,n,o,s,a):re(i)}expandSegmentAgainstRouteUsingRedirect(r,e,n,i,o,s,u){let{matched:a,parameters:c,consumedSegments:h,positionalParamSegments:f,remainingSegments:y}=dn(e,i,o);if(!a)return re(e);typeof i.redirectTo=="string"&&i.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>xi&&(this.allowRedirects=!1));let $=new oe(o,c,Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,zr(i),N(i),i.component??i._loadedComponent??null,i,Fr(i)),C=Ze($,u,this.paramsInheritanceStrategy);$.params=Object.freeze(C.params),$.data=Object.freeze(C.data);let B=this.applyRedirects.applyRedirectCommands(h,i.redirectTo,f,$,r);return this.applyRedirects.lineralizeSegments(i,B).pipe(O(E=>this.processSegment(r,n,e,E.concat(y),s,!1,u)))}matchSegmentAgainstRoute(r,e,n,i,o,s){let u=Ii(e,n,i,r,this.urlSerializer);return n.path==="**"&&(e.children={}),u.pipe(x(a=>a.matched?(r=n._injector??r,this.getChildConfig(r,n,i).pipe(x(({routes:c})=>{let h=n._loadedInjector??r,{parameters:f,consumedSegments:y,remainingSegments:$}=a,C=new oe(y,f,Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,zr(n),N(n),n.component??n._loadedComponent??null,n,Fr(n)),B=Ze(C,s,this.paramsInheritanceStrategy);C.params=Object.freeze(B.params),C.data=Object.freeze(B.data);let{segmentGroup:E,slicedSegments:he}=_r(e,y,$,c);if(he.length===0&&E.hasChildren())return this.processChildren(h,c,E,C).pipe(m(Ee=>new A(C,Ee)));if(c.length===0&&he.length===0)return d(new A(C,[]));let yn=N(n)===o;return this.processSegment(h,c,E,he,yn?p:o,!0,C).pipe(m(Ee=>new A(C,Ee instanceof A?[Ee]:[])))}))):re(e)))}getChildConfig(r,e,n){return e.children?d({routes:e.children,injector:r}):e.loadChildren?e._loadedRoutes!==void 0?d({routes:e._loadedRoutes,injector:e._loadedInjector}):Si(r,e,n,this.urlSerializer).pipe(O(i=>i?this.configLoader.loadChildren(r,e).pipe(S(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):bi(e))):d({routes:[],injector:r})}};function Pi(t){t.sort((r,e)=>r.value.outlet===p?-1:e.value.outlet===p?1:r.value.outlet.localeCompare(e.value.outlet))}function ji(t){let r=t.value.routeConfig;return r&&r.path===""}function fn(t){let r=[],e=new Set;for(let n of t){if(!ji(n)){r.push(n);continue}let i=r.find(o=>n.value.routeConfig===o.value.routeConfig);i!==void 0?(i.children.push(...n.children),e.add(i)):r.push(n)}for(let n of e){let i=fn(n.children);r.push(new A(n.value,i))}return r.filter(n=>!e.has(n))}function zr(t){return t.data||{}}function Fr(t){return t.resolve||{}}function Ni(t,r,e,n,i,o){return O(s=>Ei(t,r,e,n,s.extractedUrl,i,o).pipe(m(({state:u,tree:a})=>I(l({},s),{targetSnapshot:u,urlAfterRedirects:a}))))}function $i(t,r){return O(e=>{let{targetSnapshot:n,guards:{canActivateChecks:i}}=e;if(!i.length)return d(e);let o=new Set(i.map(a=>a.route)),s=new Set;for(let a of o)if(!s.has(a))for(let c of pn(a))s.add(c);let u=0;return T(s).pipe(fe(a=>o.has(a)?Li(a,n,t,r):(a.data=Ze(a,a.parent,t).resolve,d(void 0))),S(()=>u++),ct(1),O(a=>u===s.size?d(e):k))})}function pn(t){let r=t.children.map(e=>pn(e)).flat();return[t,...r]}function Li(t,r,e,n){let i=t.routeConfig,o=t._resolve;return i?.title!==void 0&&!sn(i)&&(o[Te]=i.title),ki(o,t,r,n).pipe(m(s=>(t._resolvedData=s,t.data=Ze(t,t.parent,e).resolve,null)))}function ki(t,r,e,n){let i=wt(t);if(i.length===0)return d({});let o={};return T(i).pipe(O(s=>_i(t[s],r,e,n).pipe(H(),S(u=>{if(u instanceof Ae)throw Xe(new Re,u);o[s]=u}))),ct(1),m(()=>o),J(s=>ln(s)?k:de(s)))}function _i(t,r,e,n){let i=Oe(r)??n,o=le(t,i),s=o.resolve?o.resolve(r,e):_(i,()=>o(r,e));return W(s)}function St(t){return x(r=>{let e=t(r);return e?T(e).pipe(m(()=>r)):d(r)})}var gn=(()=>{class t{buildTitle(e){let n,i=e.root;for(;i!==void 0;)n=this.getResolvedTitleForRoute(i)??n,i=i.children.find(o=>o.outlet===p);return n}getResolvedTitleForRoute(e){return e.data[Te]}static \u0275fac=function(n){return new(n||t)};static \u0275prov=b({token:t,factory:()=>g(zi),providedIn:"root"})}return t})(),zi=(()=>{class t extends gn{title;constructor(e){super(),this.title=e}updateTitle(e){let n=this.buildTitle(e);n!==void 0&&this.title.setTitle(n)}static \u0275fac=function(n){return new(n||t)(ht(Pr))};static \u0275prov=b({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Zt=new P("",{providedIn:"root",factory:()=>({})}),Fi=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Sr({type:t,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(n,i){n&1&&Mr(0,"router-outlet")},dependencies:[Kn],encapsulation:2})}return t})();function Yt(t){let r=t.children&&t.children.map(Yt),e=r?I(l({},t),{children:r}):l({},t);return!e.component&&!e.loadComponent&&(r||e.loadChildren)&&e.outlet&&e.outlet!==p&&(e.component=Fi),e}var Xt=new P(""),qi=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=g(gt);loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return d(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);let n=W(e.loadComponent()).pipe(m(vn),S(o=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=o}),Pe(()=>{this.componentLoaders.delete(e)})),i=new ot(n,()=>new V).pipe(it());return this.componentLoaders.set(e,i),i}loadChildren(e,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return d({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);let o=Bi(n,this.compiler,e,this.onLoadEndListener).pipe(Pe(()=>{this.childrenLoaders.delete(n)})),s=new ot(o,()=>new V).pipe(it());return this.childrenLoaders.set(n,s),s}static \u0275fac=function(n){return new(n||t)};static \u0275prov=b({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Bi(t,r,e,n){return W(t.loadChildren()).pipe(m(vn),O(i=>i instanceof yr||Array.isArray(i)?d(i):T(r.compileModuleAsync(i))),m(i=>{n&&n(t);let o,s,u=!1;return Array.isArray(i)?(s=i,u=!0):(o=i.create(e).injector,s=o.get(Xt,[],{optional:!0,self:!0}).flat()),{routes:s.map(Yt),injector:o}}))}function Vi(t){return t&&typeof t=="object"&&"default"in t}function vn(t){return Vi(t)?t.default:t}var Jt=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=b({token:t,factory:()=>g(Hi),providedIn:"root"})}return t})(),Hi=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,n){return e}static \u0275fac=function(n){return new(n||t)};static \u0275prov=b({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Wi=new P("");var Gi=new P(""),Qi=(()=>{class t{currentNavigation=null;currentTransition=null;lastSuccessfulNavigation=null;events=new V;transitionAbortSubject=new V;configLoader=g(qi);environmentInjector=g(je);destroyRef=g(fr);urlSerializer=g(Qt);rootContexts=g(et);location=g(_e);inputBindingEnabled=g(tt,{optional:!0})!==null;titleStrategy=g(gn);options=g(Zt,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=g(Jt);createViewTransition=g(Wi,{optional:!0});navigationErrorHandler=g(Gi,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>d(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=i=>this.events.next(new Et(i)),n=i=>this.events.next(new xt(i));this.configLoader.onLoadEndListener=n,this.configLoader.onLoadStartListener=e,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(e){let n=++this.navigationId;this.transitions?.next(I(l(l({},this.transitions.value),e),{id:n}))}setupNavigations(e,n,i){return this.transitions=new M({id:0,currentUrlTree:n,currentRawUrl:n,extractedUrl:this.urlHandlingStrategy.extract(n),urlAfterRedirects:this.urlHandlingStrategy.extract(n),rawUrl:n,extras:{},resolve:()=>{},reject:()=>{},promise:Promise.resolve(!0),source:me,restoredState:null,currentSnapshot:i.snapshot,targetSnapshot:null,currentRouterState:i,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(X(o=>o.id!==0),m(o=>I(l({},o),{extractedUrl:this.urlHandlingStrategy.extract(o.rawUrl)})),x(o=>{let s=!1,u=!1;return d(o).pipe(x(a=>{if(this.navigationId>o.id)return this.cancelNavigationTransition(o,"",D.SupersededByNewNavigation),k;this.currentTransition=o,this.currentNavigation={id:a.id,initialUrl:a.rawUrl,extractedUrl:a.extractedUrl,targetBrowserUrl:typeof a.extras.browserUrl=="string"?this.urlSerializer.parse(a.extras.browserUrl):a.extras.browserUrl,trigger:a.source,extras:a.extras,previousNavigation:this.lastSuccessfulNavigation?I(l({},this.lastSuccessfulNavigation),{previousNavigation:null}):null};let c=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),h=a.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!c&&h!=="reload"){let f="";return this.events.next(new Z(a.id,this.urlSerializer.serialize(a.rawUrl),f,Dt.IgnoredSameUrlNavigation)),a.resolve(!1),k}if(this.urlHandlingStrategy.shouldProcessUrl(a.rawUrl))return d(a).pipe(x(f=>{let y=this.transitions?.getValue();return this.events.next(new Ce(f.id,this.urlSerializer.serialize(f.extractedUrl),f.source,f.restoredState)),y!==this.transitions?.getValue()?k:Promise.resolve(f)}),Ni(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy),S(f=>{o.targetSnapshot=f.targetSnapshot,o.urlAfterRedirects=f.urlAfterRedirects,this.currentNavigation=I(l({},this.currentNavigation),{finalUrl:f.urlAfterRedirects});let y=new Ge(f.id,this.urlSerializer.serialize(f.extractedUrl),this.urlSerializer.serialize(f.urlAfterRedirects),f.targetSnapshot);this.events.next(y)}));if(c&&this.urlHandlingStrategy.shouldProcessUrl(a.currentRawUrl)){let{id:f,extractedUrl:y,source:$,restoredState:C,extras:B}=a,E=new Ce(f,this.urlSerializer.serialize(y),$,C);this.events.next(E);let he=nn(this.rootComponentType).snapshot;return this.currentTransition=o=I(l({},a),{targetSnapshot:he,urlAfterRedirects:y,extras:I(l({},B),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=y,d(o)}else{let f="";return this.events.next(new Z(a.id,this.urlSerializer.serialize(a.extractedUrl),f,Dt.IgnoredByUrlHandlingStrategy)),a.resolve(!1),k}}),S(a=>{let c=new Mt(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(c)}),m(a=>(this.currentTransition=o=I(l({},a),{guards:ti(a.targetSnapshot,a.currentSnapshot,this.rootContexts)}),o)),di(this.environmentInjector,a=>this.events.next(a)),S(a=>{if(o.guardsResult=a.guardsResult,a.guardsResult&&typeof a.guardsResult!="boolean")throw Xe(this.urlSerializer,a.guardsResult);let c=new Tt(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot,!!a.guardsResult);this.events.next(c)}),X(a=>a.guardsResult?!0:(this.cancelNavigationTransition(a,"",D.GuardRejected),!1)),St(a=>{if(a.guards.canActivateChecks.length)return d(a).pipe(S(c=>{let h=new Ot(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(h)}),x(c=>{let h=!1;return d(c).pipe($i(this.paramsInheritanceStrategy,this.environmentInjector),S({next:()=>h=!0,complete:()=>{h||this.cancelNavigationTransition(c,"",D.NoDataFromResolver)}}))}),S(c=>{let h=new Ut(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(h)}))}),St(a=>{let c=h=>{let f=[];h.routeConfig?.loadComponent&&!h.routeConfig._loadedComponent&&f.push(this.configLoader.loadComponent(h.routeConfig).pipe(S(y=>{h.component=y}),m(()=>{})));for(let y of h.children)f.push(...c(y));return f};return xe(c(a.targetSnapshot.root)).pipe(ut(null),ee(1))}),St(()=>this.afterPreactivation()),x(()=>{let{currentSnapshot:a,targetSnapshot:c}=o,h=this.createViewTransition?.(this.environmentInjector,a.root,c.root);return h?T(h).pipe(m(()=>o)):d(o)}),m(a=>{let c=Zn(e.routeReuseStrategy,a.targetSnapshot,a.currentRouterState);return this.currentTransition=o=I(l({},a),{targetRouterState:c}),this.currentNavigation.targetRouterState=c,o}),S(()=>{this.events.next(new be)}),ei(this.rootContexts,e.routeReuseStrategy,a=>this.events.next(a),this.inputBindingEnabled),ee(1),S({next:a=>{s=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new q(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects))),this.titleStrategy?.updateTitle(a.targetRouterState.snapshot),a.resolve(!0)},complete:()=>{s=!0}}),ur(this.transitionAbortSubject.pipe(S(a=>{throw a}))),Pe(()=>{!s&&!u&&this.cancelNavigationTransition(o,"",D.SupersededByNewNavigation),this.currentTransition?.id===o.id&&(this.currentNavigation=null,this.currentTransition=null)}),J(a=>{if(this.destroyed)return o.resolve(!1),k;if(u=!0,cn(a))this.events.next(new z(o.id,this.urlSerializer.serialize(o.extractedUrl),a.message,a.cancellationCode)),Jn(a)?this.events.next(new ue(a.url,a.navigationBehaviorOptions)):o.resolve(!1);else{let c=new we(o.id,this.urlSerializer.serialize(o.extractedUrl),a,o.targetSnapshot??void 0);try{let h=_(this.environmentInjector,()=>this.navigationErrorHandler?.(c));if(h instanceof Ae){let{message:f,cancellationCode:y}=Xe(this.urlSerializer,h);this.events.next(new z(o.id,this.urlSerializer.serialize(o.extractedUrl),f,y)),this.events.next(new ue(h.redirectTo,h.navigationBehaviorOptions))}else throw this.events.next(c),a}catch(h){this.options.resolveNavigationPromiseOnError?o.resolve(!1):o.reject(h)}}return k}))}))}cancelNavigationTransition(e,n,i){let o=new z(e.id,this.urlSerializer.serialize(e.extractedUrl),n,i);this.events.next(o),e.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),n=this.currentNavigation?.targetBrowserUrl??this.currentNavigation?.extractedUrl;return e.toString()!==n?.toString()&&!this.currentNavigation?.extras.skipLocationChange}static \u0275fac=function(n){return new(n||t)};static \u0275prov=b({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Ki(t){return t!==me}var Zi=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=b({token:t,factory:()=>g(Yi),providedIn:"root"})}return t})(),Gt=class{shouldDetach(r){return!1}store(r,e){}shouldAttach(r){return!1}retrieve(r){return null}shouldReuseRoute(r,e){return r.routeConfig===e.routeConfig}},Yi=(()=>{class t extends Gt{static \u0275fac=(()=>{let e;return function(i){return(e||(e=dt(t)))(i||t)}})();static \u0275prov=b({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),mn=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=b({token:t,factory:()=>g(Xi),providedIn:"root"})}return t})(),Xi=(()=>{class t extends mn{location=g(_e);urlSerializer=g(Qt);options=g(Zt,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";urlHandlingStrategy=g(Jt);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new F;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}currentPageId=0;lastSuccessfulId=-1;restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}routerState=nn(null);getRouterState(){return this.routerState}stateMemento=this.createStateMemento();createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(n=>{n.type==="popstate"&&e(n.url,n.state)})}handleRouterEvent(e,n){if(e instanceof Ce)this.stateMemento=this.createStateMemento();else if(e instanceof Z)this.rawUrlTree=n.initialUrl;else if(e instanceof Ge){if(this.urlUpdateStrategy==="eager"&&!n.extras.skipLocationChange){let i=this.urlHandlingStrategy.merge(n.finalUrl,n.initialUrl);this.setBrowserUrl(n.targetBrowserUrl??i,n)}}else e instanceof be?(this.currentUrlTree=n.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(n.finalUrl,n.initialUrl),this.routerState=n.targetRouterState,this.urlUpdateStrategy==="deferred"&&!n.extras.skipLocationChange&&this.setBrowserUrl(n.targetBrowserUrl??this.rawUrlTree,n)):e instanceof z&&(e.code===D.GuardRejected||e.code===D.NoDataFromResolver)?this.restoreHistory(n):e instanceof we?this.restoreHistory(n,!0):e instanceof q&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,n){let i=e instanceof F?this.urlSerializer.serialize(e):e;if(this.location.isCurrentPathEqualTo(i)||n.extras.replaceUrl){let o=this.browserPageId,s=l(l({},n.extras.state),this.generateNgRouterState(n.id,o));this.location.replaceState(i,"",s)}else{let o=l(l({},n.extras.state),this.generateNgRouterState(n.id,this.browserPageId+1));this.location.go(i,"",o)}}restoreHistory(e,n=!1){if(this.canceledNavigationResolution==="computed"){let i=this.browserPageId,o=this.currentPageId-i;o!==0?this.location.historyGo(o):this.currentUrlTree===e.finalUrl&&o===0&&(this.resetState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(n&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,n){return this.canceledNavigationResolution==="computed"?{navigationId:e,\u0275routerPageId:n}:{navigationId:e}}static \u0275fac=(()=>{let e;return function(i){return(e||(e=dt(t)))(i||t)}})();static \u0275prov=b({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Ji(t,r){t.events.pipe(X(e=>e instanceof q||e instanceof z||e instanceof we||e instanceof Z),m(e=>e instanceof q||e instanceof Z?0:(e instanceof z?e.code===D.Redirect||e.code===D.SupersededByNewNavigation:!1)?2:1),X(e=>e!==2),ee(1)).subscribe(()=>{r()})}var eo={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},to={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},nt=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=g(wr);stateManager=g(mn);options=g(Zt,{optional:!0})||{};pendingTasks=g(pr);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=g(Qi);urlSerializer=g(Qt);location=g(_e);urlHandlingStrategy=g(Jt);_events=new V;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=g(Zi);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=g(Xt,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!g(tt,{optional:!0});constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:e=>{this.console.warn(e)}}),this.subscribeToNavigationEvents()}eventsSubscription=new er;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(n=>{try{let i=this.navigationTransitions.currentTransition,o=this.navigationTransitions.currentNavigation;if(i!==null&&o!==null){if(this.stateManager.handleRouterEvent(n,o),n instanceof z&&n.code!==D.Redirect&&n.code!==D.SupersededByNewNavigation)this.navigated=!0;else if(n instanceof q)this.navigated=!0;else if(n instanceof ue){let s=n.navigationBehaviorOptions,u=this.urlHandlingStrategy.merge(n.url,i.currentRawUrl),a=l({browserUrl:i.extras.browserUrl,info:i.extras.info,skipLocationChange:i.extras.skipLocationChange,replaceUrl:i.extras.replaceUrl||this.urlUpdateStrategy==="eager"||Ki(i.source)},s);this.scheduleNavigation(u,me,null,a,{resolve:i.resolve,reject:i.reject,promise:i.promise})}}no(n)&&this._events.next(n)}catch(i){this.navigationTransitions.transitionAbortSubject.next(i)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),me,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,n)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(e,"popstate",n)},0)})}navigateToSyncWithBrowser(e,n,i){let o={replaceUrl:!0},s=i?.navigationId?i:null;if(i){let a=l({},i);delete a.navigationId,delete a.\u0275routerPageId,Object.keys(a).length!==0&&(o.state=a)}let u=this.parseUrl(e);this.scheduleNavigation(u,n,s,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(Yt),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,n={}){let{relativeTo:i,queryParams:o,fragment:s,queryParamsHandling:u,preserveFragment:a}=n,c=a?this.currentUrlTree.fragment:s,h=null;switch(u??this.options.defaultQueryParamsHandling){case"merge":h=l(l({},this.currentUrlTree.queryParams),o);break;case"preserve":h=this.currentUrlTree.queryParams;break;default:h=o||null}h!==null&&(h=this.removeEmptyProps(h));let f;try{let y=i?i.snapshot:this.routerState.snapshot.root;f=Jr(y)}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),f=this.currentUrlTree.root}return en(f,e,h,c??null)}navigateByUrl(e,n={skipLocationChange:!1}){let i=K(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(o,me,null,n)}navigate(e,n={skipLocationChange:!1}){return ro(e),this.navigateByUrl(this.createUrlTree(e,n),n)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.urlSerializer.parse("/")}}isActive(e,n){let i;if(n===!0?i=l({},eo):n===!1?i=l({},to):i=n,K(e))return jr(this.currentUrlTree,e,i);let o=this.parseUrl(e);return jr(this.currentUrlTree,o,i)}removeEmptyProps(e){return Object.entries(e).reduce((n,[i,o])=>(o!=null&&(n[i]=o),n),{})}scheduleNavigation(e,n,i,o,s){if(this.disposed)return Promise.resolve(!1);let u,a,c;s?(u=s.resolve,a=s.reject,c=s.promise):c=new Promise((f,y)=>{u=f,a=y});let h=this.pendingTasks.add();return Ji(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(h))}),this.navigationTransitions.handleNavigationRequest({source:n,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:u,reject:a,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(f=>Promise.reject(f))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=b({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function ro(t){for(let r=0;r<t.length;r++)if(t[r]==null)throw new w(4008,!1)}function no(t){return!(t instanceof be)&&!(t instanceof ue)}var qr=(()=>{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;href=null;target;queryParams;fragment;queryParamsHandling;state;info;relativeTo;isAnchorElement;subscription;onChanges=new V;constructor(e,n,i,o,s,u){this.router=e,this.route=n,this.tabIndexAttribute=i,this.renderer=o,this.el=s,this.locationStrategy=u;let a=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement=a==="a"||a==="area",this.isAnchorElement?this.subscription=e.events.subscribe(c=>{c instanceof q&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}preserveFragment=!1;skipLocationChange=!1;replaceUrl=!1;setTabIndexIfNotOnNativeEl(e){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}routerLinkInput=null;set routerLink(e){e==null?(this.routerLinkInput=null,this.setTabIndexIfNotOnNativeEl(null)):(K(e)?this.routerLinkInput=e:this.routerLinkInput=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0"))}onClick(e,n,i,o,s){let u=this.urlTree;if(u===null||this.isAnchorElement&&(e!==0||n||i||o||s||typeof this.target=="string"&&this.target!="_self"))return!0;let a={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(u,a),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){let e=this.urlTree;this.href=e!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(e)):null;let n=this.href===null?null:vr(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",n)}applyAttributeValue(e,n){let i=this.renderer,o=this.el.nativeElement;n!==null?i.setAttribute(o,e,n):i.removeAttribute(o,e)}get urlTree(){return this.routerLinkInput===null?null:K(this.routerLinkInput)?this.routerLinkInput:this.router.createUrlTree(this.routerLinkInput,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static \u0275fac=function(n){return new(n||t)(j(nt),j(Y),hr("tabindex"),j(pt),j(ft),j(vt))};static \u0275dir=$e({type:t,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(n,i){n&1&&Tr("click",function(s){return i.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),n&2&&Dr("target",i.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",ke],skipLocationChange:[2,"skipLocationChange","skipLocationChange",ke],replaceUrl:[2,"replaceUrl","replaceUrl",ke],routerLink:"routerLink"},features:[Cr,Ne]})}return t})(),Qo=(()=>{class t{router;element;renderer;cdr;link;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new te;constructor(e,n,i,o,s){this.router=e,this.element=n,this.renderer=i,this.cdr=o,this.link=s,this.routerEventsSubscription=e.events.subscribe(u=>{u instanceof q&&this.update()})}ngAfterContentInit(){d(this.links.changes,d(null)).pipe(st()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let e=[...this.links.toArray(),this.link].filter(n=>!!n).map(n=>n.onChanges);this.linkInputChangesSubscription=T(e).pipe(st()).subscribe(n=>{this._isActive!==this.isLinkActive(this.router)(n)&&this.update()})}set routerLinkActive(e){let n=Array.isArray(e)?e:e.split(" ");this.classes=n.filter(i=>!!i)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{let e=this.hasActiveLinks();this.classes.forEach(n=>{e?this.renderer.addClass(this.element.nativeElement,n):this.renderer.removeClass(this.element.nativeElement,n)}),e&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.isActiveChange.emit(e))})}isLinkActive(e){let n=io(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return i=>{let o=i.urlTree;return o?e.isActive(o,n):!1}}hasActiveLinks(){let e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}static \u0275fac=function(n){return new(n||t)(j(nt),j(ft),j(pt),j(Le),j(qr,8))};static \u0275dir=$e({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(n,i,o){if(n&1&&Or(o,qr,5),n&2){let s;Ur(s=Er())&&(i.links=s)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[Ne]})}return t})();function io(t){return!!t.paths}var oo=new P("");function Ko(t,...r){return lr([{provide:Xt,multi:!0,useValue:t},[],{provide:Y,useFactory:so,deps:[nt]},{provide:Ir,multi:!0,useFactory:uo},r.map(e=>e.\u0275providers)])}function so(t){return t.routerState.root}function ao(t,r){return{\u0275kind:t,\u0275providers:r}}function uo(){let t=g(dr);return r=>{let e=t.get(Ar);if(r!==e.components[0])return;let n=t.get(nt),i=t.get(co);t.get(lo)===1&&n.initialNavigation(),t.get(ho,null,lt.Optional)?.setUpPreloading(),t.get(oo,null,lt.Optional)?.init(),n.resetRootComponentType(e.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}var co=new P("",{factory:()=>new V}),lo=new P("",{providedIn:"root",factory:()=>1});var ho=new P("");function Zo(){return ao(8,[kr,{provide:tt,useExisting:kr}])}export{Y as a,Kn as b,nt as c,qr as d,Qo as e,Ko as f,Zo as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"./chunk-7QPDYG2R.js";import"./chunk-KHIKPOXK.js";import"./chunk-BRTUMDFG.js";import"./chunk-MHZPUJQF.js";import"./chunk-PTG2C2YJ.js";import"./chunk-LFQXDL42.js";import"./chunk-TQE7OBBP.js";import"./chunk-ZRPJ3QZT.js";import"./chunk-NVTD7IP4.js";import"./chunk-3CRA7LUM.js";import"./chunk-6SIZVSDW.js";import"./chunk-JOBMLOGZ.js";import"./chunk-QDAWQNBQ.js";import"./chunk-C6Q5SG76.js";export{a as createRestoreOptionsForm,b as default};
|