@duplicati/ngclient 0.0.14 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/assets/spk.woff2 +0 -0
  2. package/{chunk-7ROMUYYO.js → chunk-2VM3Z6G6.js} +1 -1
  3. package/chunk-3KWRGL6H.js +1 -0
  4. package/{chunk-BDBR5EDG.js → chunk-4UKPKNC6.js} +1 -1
  5. package/chunk-5FBRBL44.js +1 -0
  6. package/chunk-5L4ZOFYT.js +1 -0
  7. package/chunk-6T7HOYTW.js +1 -0
  8. package/chunk-AIL3DRSU.js +1 -0
  9. package/{chunk-QVTIOQU4.js → chunk-AM4UDAZB.js} +1 -1
  10. package/chunk-AN53EBZI.js +1 -0
  11. package/chunk-ASMWEBCB.js +1 -0
  12. package/{chunk-6PJU5W5X.js → chunk-BX543SH4.js} +1 -1
  13. package/{chunk-RH5CENQ7.js → chunk-C7JVFVNG.js} +1 -1
  14. package/chunk-CTPVCKDU.js +1 -0
  15. package/chunk-CZTXCP6Y.js +1 -0
  16. package/{chunk-ER25OIRY.js → chunk-DE7MHNNM.js} +1 -1
  17. package/{chunk-7YM6RN2G.js → chunk-DFNMN5CZ.js} +1 -1
  18. package/chunk-EYBBW4ID.js +1 -0
  19. package/chunk-FCPLQRRC.js +1 -0
  20. package/chunk-FKB7BVQE.js +8 -0
  21. package/{chunk-WQPTWFXA.js → chunk-GSP4D4JM.js} +1 -1
  22. package/{chunk-4OR2MBXM.js → chunk-IGECPMHY.js} +1 -1
  23. package/{chunk-ZBL4ZWSP.js → chunk-IPONHS64.js} +1 -1
  24. package/{chunk-KLPRJO2S.js → chunk-L2WWHQPN.js} +1 -1
  25. package/{chunk-SS4RWMEQ.js → chunk-LI2AEH4X.js} +1 -1
  26. package/{chunk-74EYKZJR.js → chunk-MMEIXMDW.js} +1 -1
  27. package/{chunk-RL7JYJ4S.js → chunk-NQ2MPIB6.js} +1 -1
  28. package/{chunk-ZUVMWAQY.js → chunk-PY26LA4W.js} +1 -1
  29. package/chunk-Q2QH4H5B.js +1 -0
  30. package/chunk-QD7BY4V5.js +1 -0
  31. package/chunk-QDXOKRRT.js +1 -0
  32. package/{chunk-3B6RZWP4.js → chunk-QX7KUJGE.js} +1 -1
  33. package/{chunk-ZUISIMKR.js → chunk-RIQNVCIL.js} +1 -1
  34. package/chunk-RNBIMN7E.js +1 -0
  35. package/chunk-RODVNO2L.js +1 -0
  36. package/{chunk-BRVLVIBB.js → chunk-SGVVLQ22.js} +1 -1
  37. package/{chunk-Q3B3QVNE.js → chunk-SHLX3F4G.js} +1 -1
  38. package/{chunk-OI46JH74.js → chunk-VLWUJXM4.js} +2 -2
  39. package/chunk-WIIXITKP.js +1 -0
  40. package/chunk-WNQNTT5I.js +1 -0
  41. package/{chunk-QROBYUJD.js → chunk-YPNP3GF5.js} +1 -1
  42. package/{chunk-XYN4OGS4.js → chunk-YV6J6EAD.js} +1 -1
  43. package/chunk-ZNDBPUVN.js +1 -0
  44. package/chunk-ZYFED5UB.js +1 -0
  45. package/index.html +2 -2
  46. package/main-QHMQQJS2.js +1 -0
  47. package/package.json +1 -1
  48. package/styles-EYLEETOZ.css +1 -0
  49. package/chunk-2LTGXEZS.js +0 -1
  50. package/chunk-2WAFR5D4.js +0 -1
  51. package/chunk-3DBUGAIF.js +0 -1
  52. package/chunk-3SP3MQEU.js +0 -1
  53. package/chunk-7YI4IDWY.js +0 -1
  54. package/chunk-A2PI66LB.js +0 -1
  55. package/chunk-AVWHS36O.js +0 -1
  56. package/chunk-B42N6RQ3.js +0 -1
  57. package/chunk-CWAAKGM6.js +0 -1
  58. package/chunk-ICCENBZO.js +0 -1
  59. package/chunk-MYQPVSUP.js +0 -1
  60. package/chunk-NGPWOMCW.js +0 -8
  61. package/chunk-NSHVJHI5.js +0 -1
  62. package/chunk-NVFX5EQI.js +0 -1
  63. package/chunk-RIVCLGIC.js +0 -1
  64. package/chunk-RK3NUMZK.js +0 -1
  65. package/chunk-S4UXVQU2.js +0 -1
  66. package/chunk-SWUZR64I.js +0 -1
  67. package/chunk-VJK4WSMT.js +0 -1
  68. package/chunk-VUB3FSIU.js +0 -1
  69. package/chunk-WH7DPJOS.js +0 -1
  70. package/main-2SNEI5DH.js +0 -1
  71. package/styles-GLYEHLO7.css +0 -1
package/assets/spk.woff2 CHANGED
Binary file
@@ -1 +1 @@
1
- import{b}from"./chunk-6PJU5W5X.js";import{a as u}from"./chunk-ZUVMWAQY.js";import{Bb as n,Cb as l,Hb as c,La as p,Mb as m,Nb as d,U as a,W as s,hb as t,ib as i,lc as f}from"./chunk-NGPWOMCW.js";import"./chunk-7CGTOI24.js";var r=class o{#e=a(u);licenses=b(this.#e.getApiV1Licenses());static \u0275fac=function(e){return new(e||o)};static \u0275cmp=s({type:o,selectors:[["app-libraries"]],standalone:!0,features:[c],decls:5,vars:3,template:function(e,C){e&1&&(t(0,"h3"),n(1,"Libraries"),i(),t(2,"pre"),n(3),m(4,"json"),i()),e&2&&(p(3),l(d(4,1,C.licenses())))},dependencies:[f],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}"],changeDetection:0})};export{r as default};
1
+ import{b}from"./chunk-BX543SH4.js";import{a as u}from"./chunk-PY26LA4W.js";import{Db as n,Eb as l,La as p,Mb as c,Rb as m,Sb as d,U as a,W as s,ib as t,jb as i,pc as f}from"./chunk-FKB7BVQE.js";import"./chunk-7CGTOI24.js";var r=class o{#e=a(u);licenses=b(this.#e.getApiV1Licenses());static \u0275fac=function(e){return new(e||o)};static \u0275cmp=s({type:o,selectors:[["app-libraries"]],standalone:!0,features:[c],decls:5,vars:3,template:function(e,C){e&1&&(t(0,"h3"),n(1,"Libraries"),i(),t(2,"pre"),n(3),m(4,"json"),i()),e&2&&(p(3),l(d(4,1,C.licenses())))},dependencies:[f],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}"],changeDetection:0})};export{r as default};
@@ -0,0 +1 @@
1
+ import{a as f}from"./chunk-4UKPKNC6.js";import"./chunk-AM4UDAZB.js";import{b as d,c as C,d as h,e as b,f as y,i as v,l as F,o as S,q as w}from"./chunk-DE7MHNNM.js";import{a as _,e as x,i as N}from"./chunk-EYBBW4ID.js";import{c as g}from"./chunk-IGECPMHY.js";import"./chunk-L2WWHQPN.js";import"./chunk-PY26LA4W.js";import{$a as l,Db as i,Mb as c,U as o,W as m,ib as e,jb as n,kb as p,pb as u}from"./chunk-FKB7BVQE.js";import"./chunk-7CGTOI24.js";var k=new S,r=class a{#e=o(g);#t=o(f);loginForm=k.group({pass:k.control("",C.required)});submit(){this.loginForm.value.pass&&this.#t.login(this.loginForm.value.pass).subscribe({next:()=>this.#e.navigate(["/"])})}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=m({type:a,selectors:[["app-login"]],standalone:!0,features:[c],decls:8,vars:1,consts:[[3,"submit","formGroup"],[1,"login-row"],["type","password","autocomplete","current-password","placeholder","Enter your password","tabindex","1","formControlName","pass"],["spk-button","","type","submit",1,"raised","primary"]],template:function(t,s){t&1&&(e(0,"form",0),u("submit",function(){return s.submit()}),e(1,"div",1)(2,"spk-form-field"),p(3,"input",2),n(),e(4,"button",3),i(5," Login "),e(6,"spk-icon"),i(7,"arrow-right"),n()()()()),t&2&&l("formGroup",s.loginForm)},dependencies:[w,y,d,h,b,v,F,N,_,x],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{width:100vw;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30)}.login-row[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}"],changeDetection:0})};export{r as default};
@@ -1 +1 @@
1
- import{a as c}from"./chunk-QVTIOQU4.js";import{c as h}from"./chunk-4OR2MBXM.js";import{a as u}from"./chunk-ZUVMWAQY.js";import{$b as a,A as t,L as i,O as l,Ra as n,U as s}from"./chunk-NGPWOMCW.js";var m=class r{#t=s(c);#i=s(h);#s=s(u);#e=n(this.#t.getItemParsed("token")??null);#r=n(this.#t.getItemParsed("tokenSetTime")??null);tokenSetTime=this.#r.asReadonly();token=this.#e.asReadonly();#o=a(()=>{if(!this.#e()){this.#t.clearAll(),this.#i.navigate(["/login"]);return}let e=Date.now();this.#t.setItemParsed("tokenSetTime",e),this.#t.setItemParsed("token",this.#e()),this.#r.set(this.#e()?e:null)},{allowSignalWrites:!0});login(e="helloworld"){return this.#s.postApiV1AuthLogin({requestBody:{Password:e,RememberMe:!0}}).pipe(t(1),i(o=>this.#e.set(o.AccessToken??null)))}refreshToken(){return this.#s.postApiV1AuthRefresh().pipe(t(1),i(e=>this.#e.set(e.AccessToken??null)))}logout(){this.#s.postApiV1AuthRefreshLogout().pipe(t(1),i(e=>{this.#e.set(null),this.#t.clearAll(),this.#i.navigate(["/login"])})).subscribe({error:e=>{this.#e.set(null),this.#t.clearAll(),this.#i.navigate(["/login"])}})}static \u0275fac=function(o){return new(o||r)};static \u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"})};export{m as a};
1
+ import{a as c}from"./chunk-AM4UDAZB.js";import{c as h}from"./chunk-IGECPMHY.js";import{a as u}from"./chunk-PY26LA4W.js";import{A as t,L as i,O as l,Ra as n,U as s,ec as a}from"./chunk-FKB7BVQE.js";var m=class r{#t=s(c);#i=s(h);#s=s(u);#e=n(this.#t.getItemParsed("token")??null);#r=n(this.#t.getItemParsed("tokenSetTime")??null);tokenSetTime=this.#r.asReadonly();token=this.#e.asReadonly();#o=a(()=>{if(!this.#e()){this.#t.clearAll(),this.#i.navigate(["/login"]);return}let e=Date.now();this.#t.setItemParsed("tokenSetTime",e),this.#t.setItemParsed("token",this.#e()),this.#r.set(this.#e()?e:null)},{allowSignalWrites:!0});login(e="helloworld"){return this.#s.postApiV1AuthLogin({requestBody:{Password:e,RememberMe:!0}}).pipe(t(1),i(o=>this.#e.set(o.AccessToken??null)))}refreshToken(){return this.#s.postApiV1AuthRefresh().pipe(t(1),i(e=>this.#e.set(e.AccessToken??null)))}logout(){this.#s.postApiV1AuthRefreshLogout().pipe(t(1),i(e=>{this.#e.set(null),this.#t.clearAll(),this.#i.navigate(["/login"])})).subscribe({error:e=>{this.#e.set(null),this.#t.clearAll(),this.#i.navigate(["/login"])}})}static \u0275fac=function(o){return new(o||r)};static \u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"})};export{m as a};
@@ -0,0 +1 @@
1
+ import{a as Qe,b as ke}from"./chunk-RNBIMN7E.js";import{a as fe}from"./chunk-AN53EBZI.js";import{a as Xe,b as xt}from"./chunk-DNHLTHLR.js";import{b as Ve}from"./chunk-BX543SH4.js";import{a as Ce,b as J,c as ge,d as Z,e as X,f as ee,g as xe,i as te,j as ye,k as Ct,l as ne,m as ie,n as oe,o as B,q as ae}from"./chunk-DE7MHNNM.js";import{a as gt}from"./chunk-GSP4D4JM.js";import{a as re,e as he,g as je,i as le,k as qe,n as Ke,o as se,r as Se}from"./chunk-EYBBW4ID.js";import{a as Y,c as L}from"./chunk-IGECPMHY.js";import{a as ft}from"./chunk-PY26LA4W.js";import{$a as m,A as pt,Ab as K,Bb as Q,Cb as de,D as Fe,Db as l,Eb as R,Fb as w,Hb as dt,La as s,Mb as W,O as De,Ob as Ne,Pb as ut,Qb as Le,Ra as k,Sa as q,U as S,Ub as ze,W as j,Za as u,_a as P,bb as mt,cc as H,ea as C,eb as _,fa as g,fb as D,gb as T,hb as N,ib as a,jb as o,kb as c,lb as F,mb as b,nb as Te,nc as Ue,ob as O,pb as x,qb as p,tb as ce,ub as y,vb as ct,wc as _t}from"./chunk-FKB7BVQE.js";import{a as me,b as $e,c as st}from"./chunk-7CGTOI24.js";var We=class t{fromString(i){if(!i)return null;let e=i.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(i,e){return`${i}${e}`}static \u0275fac=function(e){return new(e||t)};static \u0275prov=De({token:t,factory:t.\u0275fac,providedIn:"root"})};var we=new B,Ge={file:{customFields:{path:{type:"file-tree",name:"path",shortDescription:"File path",longDescription:"The path to store the backup",formElement:t=>we.control(t??"")}}},ssh:{customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"The server to connect to",formElement:t=>we.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:t=>we.control(t??"")},path:{type:"Path",name:"path",shortDescription:"File path on the server",longDescription:"File path on the server",formElement:t=>we.control(t??"")}},dynamicFields:["auth-username"]},s3:{customFields:{path:{type:"Path",name:"path",shortDescription:"File path on the server",longDescription:"File path on the server",formElement:t=>we.control(t??"")},bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:t=>we.control(t??"")}},dynamicFields:["use-ssl","s3-server-name","auth-username","auth-password"]},gcs:{oauthField:"authid",dynamicFields:["gcs-location","gcs-storage-class","authid"]},googledrive:{oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"File path on the server",longDescription:"File path on the server",formElement:t=>we.control(t??"")}},dynamicFields:["authid"]}};function Oe(t,i){let e={},n={};return i.searchParams.forEach((r,d)=>{Ge[t].dynamicFields?.includes(d)?n[d]=decodeURIComponent(r):e[d]=decodeURIComponent(r)}),{advanced:e,dynamic:n}}function Me(t){let i=t.map(([e,n])=>`${e}=${n?encodeURIComponent(n.toString()):""}`).join("&");return i?"?"+i:""}var Ee={file:{to:t=>{let i=Me([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.path}${i}`},from:(t,i,e)=>{let n=e.indexOf("file:///")===0,r=e.split(n?"///":"//")[1].substring(0,1)+i.hostname.substring(1);return me({destinationType:t,custom:{path:`${n?"/":""}${r}${i.pathname}`}},Oe(t,i))}},ssh:{to:t=>{let i=Me([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.server}${t.custom.port?":"+t.custom.port:""}${t.custom.path.startsWith("/")?t.custom.path:"/"+t.custom.path}${i}`},from:(t,i,e)=>me({destinationType:t,custom:{server:i.hostname,port:i.port,path:i.pathname}},Oe(t,i))},s3:{to:t=>{let i=Me([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.bucket}${t.custom.path}${i}`},from:(t,i,e)=>me({destinationType:t,custom:{path:i.pathname,bucket:i.hostname}},Oe(t,i))},gcs:{to:t=>{let i=t.dynamic["gcs-location"]??"";delete t.dynamic["gcs-location"];let e=Me([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${i}${e}`},from:(t,i,e)=>{let{advanced:n,dynamic:r}=Oe(t,i);return{destinationType:t,advanced:n,dynamic:$e(me({},r),{"gcs-location":i.hostname+i.pathname})}}},googledrive:{to:t=>{let i=t.custom.path,e=Me([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${i}${e}`},from:(t,i,e)=>{let n=e.replace("googledrive://","");return me({destinationType:t,custom:{path:n}},Oe(t,i))}},fallbackMapper:{to:t=>"",from:(t,i,e)=>me({destinationType:t},Oe(t,i))}};function Pe(t){let i=t.destinationType;return!i||!Ee.hasOwnProperty(i)?Ee.fallbackMapper.to(t)??"":Ee[i].to(t)??""}function yt(t){let i=URL.canParse(t),e=t.split("://")[0],n="http://"+t.split("://")[1],r=new URL(n);if(!Ee.hasOwnProperty(e))return Ee.fallbackMapper.from(e,r);if(!i)throw new Error("Invalid target path");return Ee[e].from(e,r,t)}var Dt=/[a-zA-Z0-9_\-\+\.]/,He=class t{generate(i,e=Dt){let n=this;return Array.apply(null,{length:i}).map(()=>{let r;for(;;)if(r=String.fromCharCode(n.#t()),e.test(r))return r},this).join("")}#t(){if(window.crypto&&window.crypto.getRandomValues){let i=new Uint8Array(1);return window.crypto.getRandomValues(i),i[0]}else if(window.msCrypto&&window.msCrypto.getRandomValues){let i=new Uint8Array(1);return window.msCrypto.getRandomValues(i),i[0]}else return Math.floor(Math.random()*256)}static \u0275fac=function(e){return new(e||t)};static \u0275prov=De({token:t,factory:t.\u0275fac,providedIn:"root"})};var Tt=["formRef"];function Nt(t,i){if(t&1&&(a(0,"option",13),l(1),o()),t&2){let e=i.$implicit;m("value",e.Key),s(),R(e.DisplayName)}}function Ot(t,i){t&1&&(a(0,"spk-icon"),l(1,"eye-slash"),o(),l(2," hide "))}function Et(t,i){t&1&&(a(0,"spk-icon"),l(1,"eye"),o(),l(2," show "))}function Pt(t,i){t&1&&(a(0,"spk-icon",22),l(1,"check"),o())}function It(t,i){t&1&&(a(0,"spk-icon"),l(1,"copy"),o())}function Vt(t,i){if(t&1){let e=O();a(0,"button",21),x("click",function(){C(e);let r=p(3);return g(r.copyPassword())}),u(1,Pt,2,0,"spk-icon",22)(2,It,2,0,"spk-icon"),l(3),o()}if(t&2){let e=p(3);s(),_(e.copiedPassword()?1:2),s(2),w(" ",e.copiedPassword()?"Copied":"Copy"," password ")}}function Gt(t,i){if(t&1){let e=O();a(0,"div",14)(1,"spk-form-field")(2,"label",15),l(3,"Create a password"),o(),c(4,"input",16),o(),a(5,"spk-form-field"),c(6,"input",17),o(),a(7,"div",18)(8,"button",19),x("click",function(){C(e);let r=p(2);return g(r.showPassword.set(!r.showPassword()))}),u(9,Ot,3,0)(10,Et,3,0),o(),a(11,"button",19),x("click",function(){C(e);let r=p(2);return g(r.generatePassword())}),a(12,"spk-icon"),l(13,"password"),o(),l(14," Generate password "),o(),u(15,Vt,4,2,"button",20),o()()}if(t&2){let e=p(2);s(4),m("type",e.showPassword()?"text":"password"),s(2),m("type",e.showPassword()?"text":"password"),s(3),_(e.showPassword()?9:10),s(6),_(e.showCopyPassword()?15:-1)}}function Mt(t,i){if(t&1&&(a(0,"spk-select",10)(1,"label",11),l(2,"Encryption"),o(),c(3,"input",12),T(4,Nt,2,2,"option",13,D),o(),u(6,Gt,16,4,"div",14)),t&2){let e=p();m("displayFn",e.displayFn()),s(4),N(e.encryptionOptions()),s(2),_(e.encryptionFieldSignal()!==""?6:-1)}}var Ie=new B,ht=(t={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>Ie.group({name:Ie.control(t.name,[ge.required]),description:Ie.control(t.description),encryption:Ie.control(t.encryption,[ge.required,xt()]),password:Ie.control(t.password,[Xe(i=>i?.value.encryption!=="",[ge.required])]),repeatPassword:Ie.control(t.repeatPassword,[Xe(i=>i?.value.encryption!=="",[ge.required])])}),tt={Key:"",DisplayName:"None"},et=class t{#t=S(L);#e=S(Y);#n=S(He);#i=S(z);#o=S(fe);formRef=q.required("formRef");generalForm=this.#i.generalForm;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=k(!1);copiedPassword=k(!1);showCopyPassword=k(!1);ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit()}async copyPassword(){let i=this.generalForm.controls.password.value;await this.#a(i??""),this.copiedPassword.set(!0)}async#a(i){try{await navigator.clipboard.writeText(i)}catch{try{let n=document.createElement("textarea");n.value=i,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}displayFn(){let i=this.#o.systemInfo()?.EncryptionModules??[];return e=>{let n=[tt,...i].find(r=>r.Key===e);return n?`${n.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let i=this.#n.generate(16);this.generalForm.controls.password.setValue(i),this.generalForm.controls.repeatPassword.setValue(i),this.showCopyPassword.set(!0)}next(){this.#t.navigate(["destination"],{relativeTo:this.#e.parent})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=j({type:t,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&K(n.formRef,Tt,5),e&2&&Q()},standalone:!0,features:[W],decls:23,vars:4,consts:[["formRef",""],["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],["for","backupName"],["type","text","tabindex","1","placeholder","Your backup name","formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder","Your backup description","formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],[3,"displayFn"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder","Encryption","formControlName","encryption"],[3,"value"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder","Password","formControlName","password",3,"type"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder","Repeat password","formControlName","repeatPassword",3,"type"],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]],template:function(e,n){if(e&1){let r=O();a(0,"form",1,0),x("submit",function(){return C(r),g(n.next())}),a(2,"h3",2),l(3,"General backup settings"),o(),a(4,"spk-form-field")(5,"label",3),l(6,"Backup name"),o(),c(7,"input",4),o(),a(8,"spk-form-field")(9,"label",5),l(10,"Backup description"),o(),c(11,"textarea",6),o(),u(12,Mt,7,2),a(13,"div",7)(14,"button",8),x("click",function(){return C(r),g(n.exit())}),a(15,"spk-icon"),l(16,"arrow-left"),o(),l(17," Exit "),o(),a(18,"div")(19,"button",9)(20,"spk-icon"),l(21,"arrow-right"),o(),l(22," Continue "),o()()()()}e&2&&(m("formGroup",n.generalForm),s(12),_(n.isNew()?12:-1),s(6),P("spk-tooltip-primary",n.generalForm.valid&&n.encryptionFieldSignal()===""||n.copiedPassword()?void 0:"Remember to copy the password"),s(),m("disabled",n.generalForm.invalid||n.encryptionFieldSignal()!==""&&n.showCopyPassword()&&!n.copiedPassword()))},dependencies:[ae,ee,ie,oe,J,Z,X,te,ne,le,se,he,re],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.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 At=["formRef"],Rt=(t,i)=>({option:t,index:i}),Bt=t=>({$implicit:t});function $t(t,i){if(t&1&&(a(0,"option",12),l(1),o()),t&2){let e=i.$implicit;m("value",e),s(),R(e)}}function Lt(t,i){if(t&1&&(a(0,"option",12),l(1),o()),t&2){let e=i.$implicit;m("value",e.value),s(),R(e.name)}}function zt(t,i){if(t&1){let e=O();a(0,"button",24,2),x("click",function(){let r=C(e).$implicit,d=p(2);return g(d.addNewOption(r))}),l(2),o()}if(t&2){let e=i.$implicit;s(2),R(e.Name)}}function Ut(t,i){t&1&&Te(0)}function jt(t,i){if(t&1&&u(0,Ut,1,0,"ng-container",25),t&2){let e=i.$implicit,n=i.$index;p();let r=de(39);m("ngTemplateOutlet",r)("ngTemplateOutletContext",Ne(5,Bt,ut(2,Rt,e,n)))}}function qt(t,i){if(t&1&&(a(0,"spk-icon",33),l(1," question "),o()),t&2){let e=p(2).$implicit;P("spk-tooltip-primary",e.option.longDescription)}}function Kt(t,i){t&1&&(a(0,"spk-icon",35),l(1,"link"),o())}function Qt(t,i){t&1&&(a(0,"spk-icon",35),l(1,"textbox"),o())}function Wt(t,i){if(t&1&&(a(0,"spk-form-field")(1,"label",32),l(2),u(3,qt,2,1,"spk-icon",33),o(),c(4,"input",34),u(5,Kt,2,0,"spk-icon",35)(6,Qt,2,0,"spk-icon",35),o()),t&2){let e,n=p().$implicit;s(),y("for","option-",n.formGroupName,"-",n.index,""),s(),w(" ",(e=n.option.shortDescription)!==null&&e!==void 0?e:n.option.name," "),s(),_(n.option.longDescription?3:-1),s(),y("id","option-",n.formGroupName,"-",n.index,""),m("formControlName",n.option.name),s(),_(n.option.type==="Path"?5:6)}}function Ht(t,i){if(t&1){let e=O();a(0,"spk-icon",38),x("click",function(){C(e);let r=p(2).$implicit;return g(r.option.showPassword=!r.option.showPassword)}),l(1," eye "),o()}}function Yt(t,i){if(t&1){let e=O();a(0,"spk-icon",38),x("click",function(){C(e);let r=p(2).$implicit;return g(r.option.showPassword=!r.option.showPassword)}),l(1," eye-slash "),o()}}function Jt(t,i){if(t&1&&(a(0,"spk-form-field")(1,"label",32),l(2),o(),c(3,"input",36),a(4,"spk-icon",35),l(5,"password"),o(),u(6,Ht,2,0,"spk-icon",37)(7,Yt,2,0,"spk-icon",37),o()),t&2){let e,n=p().$implicit;s(),y("for","option-",n.formGroupName,"-",n.index,""),s(),w(" ",(e=n.option.shortDescription)!==null&&e!==void 0?e:n.option.name," "),s(),y("id","option-",n.formGroupName,"-",n.index,""),m("type",n.option.showPassword?"text":"password")("formControlName",n.option.name),s(3),_(n.option.showPassword?6:7)}}function Zt(t,i){if(t&1&&(a(0,"spk-icon",33),l(1," question "),o()),t&2){let e=p(2).$implicit;P("spk-tooltip-primary",e.option.longDescription)}}function Xt(t,i){if(t&1&&(a(0,"option",12),l(1),o()),t&2){let e=i.$implicit;m("value",e),s(),R(e)}}function en(t,i){if(t&1&&(a(0,"spk-select")(1,"label",32),l(2),u(3,Zt,2,1,"spk-icon",33),o(),c(4,"input",39),F(5,11),T(6,Xt,2,2,"option",12,D),b(),o()),t&2){let e,n=p().$implicit;s(),y("for","option-",n.formGroupName,"-",n.index,""),s(),w(" ",(e=n.option.shortDescription)!==null&&e!==void 0?e:n.option.name," "),s(),_(n.option.longDescription?3:-1),s(),y("id","option-",n.formGroupName,"-",n.index,""),m("formControlName",n.option.name),s(2),N(n.option.options)}}function tn(t,i){if(t&1&&(a(0,"spk-icon",33),l(1," question "),o()),t&2){let e=p(2).$implicit;P("spk-tooltip-primary",e.option.longDescription)}}function nn(t,i){if(t&1&&(a(0,"option",12),l(1),o()),t&2){let e=i.$implicit;m("value",e),s(),R(e)}}function on(t,i){if(t&1&&(a(0,"div",28)(1,"label",32),l(2),u(3,tn,2,1,"spk-icon",33),o(),a(4,"div",40)(5,"spk-form-field"),c(6,"input",41),a(7,"spk-icon",35),l(8,"resize"),o()(),a(9,"spk-select"),c(10,"label")(11,"input",42),F(12,11),T(13,nn,2,2,"option",12,D),b(),o()()()),t&2){let e,n=p().$implicit,r=p(2);m("formGroupName",n.option.name),s(),y("for","option-",n.formGroupName,"-",n.index,""),s(),w(" ",(e=n.option.shortDescription)!==null&&e!==void 0?e:n.option.name," "),s(),_(n.option.longDescription?3:-1),s(3),y("id","option-",n.formGroupName,"-",n.index,""),s(7),N(r.sizeOptions())}}function an(t,i){if(t&1&&(a(0,"spk-icon",33),l(1," question "),o()),t&2){let e=p(2).$implicit;P("spk-tooltip-primary",e.option.longDescription)}}function rn(t,i){if(t&1&&(a(0,"spk-form-field")(1,"label",32),l(2),u(3,an,2,1,"spk-icon",33),o(),c(4,"input",43),a(5,"spk-icon",35),l(6,"numpad"),o()()),t&2){let e,n=p().$implicit;s(),y("for","option-",n.formGroupName,"-",n.index,""),s(),w(" ",(e=n.option.shortDescription)!==null&&e!==void 0?e:n.option.name," "),s(),_(n.option.longDescription?3:-1),s(),y("id","option-",n.formGroupName,"-",n.index,""),m("formControlName",n.option.name)}}function ln(t,i){if(t&1&&(a(0,"spk-icon",33),l(1," question "),o()),t&2){let e=p(2).$implicit;P("spk-tooltip-primary",e.option.longDescription)}}function sn(t,i){if(t&1&&(a(0,"spk-toggle",29)(1,"label",32),l(2),u(3,ln,2,1,"spk-icon",33),o(),c(4,"input",44),o()),t&2){let e,n=p().$implicit;s(),y("for","option-",n.formGroupName,"-",n.index,""),s(),w(" ",(e=n.option.shortDescription)!==null&&e!==void 0?e:n.option.name," "),s(),_(n.option.longDescription?3:-1),s(),y("id","option-",n.formGroupName,"-",n.index,""),m("formControlName",n.option.name)}}function pn(t,i){if(t&1&&(a(0,"spk-icon",33),l(1," question "),o()),t&2){let e=p(2).$implicit;P("spk-tooltip-primary",e.option.longDescription)}}function mn(t,i){t&1&&(a(0,"spk-option",46),l(1,"None"),o()),t&2&&m("value","None")}function cn(t,i){if(t&1&&(a(0,"spk-option",12),l(1),c(2,"spk-checkbox",47),o()),t&2){let e=p().$implicit;m("value",e),s(),w(" ",e," ")}}function dn(t,i){if(t&1&&u(0,mn,2,1,"spk-option",46)(1,cn,3,2,"spk-option",12),t&2){let e=i.$implicit;_(e==="None"?0:1)}}function un(t,i){if(t&1&&(a(0,"spk-select",30)(1,"label",32),l(2),u(3,pn,2,1,"spk-icon",33),o(),c(4,"input",45),F(5,11),T(6,dn,2,1,null,null,D),b(),o()),t&2){let e,n=p().$implicit;m("selectMultiple",!0),s(),y("for","option-",n.formGroupName,"-",n.index,""),s(),w(" ",(e=n.option.shortDescription)!==null&&e!==void 0?e:n.option.name," "),s(),_(n.option.longDescription?3:-1),s(),m("formControlName",n.option.name),s(2),N(n.option.options)}}function _n(t,i){if(t&1&&(a(0,"spk-icon",33),l(1," question "),o()),t&2){let e=p(2).$implicit;P("spk-tooltip-primary",e.option.longDescription)}}function fn(t,i){if(t&1&&(a(0,"spk-form-field")(1,"label",32),l(2),u(3,_n,2,1,"spk-icon",33),o(),c(4,"input",34)(5,"span",48),o()),t&2){let e,n=p().$implicit;s(),y("for","option-",n.formGroupName,"-",n.index,""),s(),w(" ",(e=n.option.shortDescription)!==null&&e!==void 0?e:n.option.name," "),s(),_(n.option.longDescription?3:-1),s(),y("id","option-",n.formGroupName,"-",n.index,""),m("formControlName",n.option.name)}}function Cn(t,i){if(t&1&&(F(0,26),a(1,"div",27),u(2,Wt,7,10,"spk-form-field")(3,Jt,8,10,"spk-form-field")(4,en,8,9,"spk-select")(5,on,15,9,"div",28)(6,rn,7,9,"spk-form-field")(7,sn,5,9,"spk-toggle",29)(8,un,8,7,"spk-select",30)(9,fn,6,9,"spk-form-field"),a(10,"button",31)(11,"spk-icon"),l(12,"x-circle"),o()()(),b()),t&2){let e=i.$implicit;s(2),_(e.option.type==="String"||e.option.type==="Path"?2:e.option.type==="Password"?3:e.option.type==="Enumeration"?4:e.option.type==="Size"?5:e.option.type==="Integer"?6:e.option.type==="Boolean"?7:e.option.type==="Flags"?8:e.option.type==="Timespan"?9:-1)}}function gn(t,i){if(t&1){let e=O();a(0,"form",4,0),x("submit",function(){C(e);let r=p();return g(r.submit())}),a(2,"h3",5),l(3,"Options"),o(),a(4,"div",6)(5,"div",7)(6,"spk-form-field")(7,"label",8),l(8,"Remote volume size"),o(),c(9,"input",9),o(),a(10,"spk-select"),c(11,"input",10),F(12,11),T(13,$t,2,2,"option",12,D),b(),o()(),a(15,"p"),l(16," The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. "),a(17,"a",13),l(18,"Read more"),o()()(),a(19,"spk-select",14)(20,"label",8),l(21,"Backup retention"),o(),c(22,"input",15),T(23,Lt,2,2,"option",12,D),o(),a(25,"app-toggle-card",16),F(26,17),l(27," Advanced options "),a(28,"spk-menu")(29,"button",18),l(30," Add advanced option "),a(31,"spk-icon"),l(32,"plus"),o()(),F(33,19),T(34,zt,3,1,"button",20,D),b(),o(),b(),T(36,jt,1,7,"ng-container",null,D),o(),u(38,Cn,13,1,"ng-template",null,1,ze),a(40,"div",21)(41,"button",22),x("click",function(){C(e);let r=p();return g(r.goBack())}),a(42,"spk-icon"),l(43,"arrow-left"),o(),l(44," Go back "),o(),a(45,"button",23)(46,"spk-icon"),l(47,"arrow-right"),o(),l(48," Submit "),o()()()}if(t&2){let e=p();m("formGroup",e.optionsForm),s(13),N(e.sizeOptions()),s(6),m("displayFn",e.retentionOptionDisplayFn()),s(4),N(e.rentationOptions()),s(2),m("disallowToggle",!0),s(9),N(e.nonSelectedAdvancedOptions()),s(2),N(e.selectedAdvancedOptions())}}var ue=new B,xn=["Bytes","KB","MB","GB","TB","PB"],yn=[{value:"",name:"Keep all backups"},{value:"time",name:"Delete backups that are older than"},{value:"versions",name:"Keep a specific number of backups"},{value:"smart",name:"Smart backup retention"},{value:"custom",name:"Custom backup retention"}],St=(t={remoteVolumeSize:50,size:"MB",backupRetention:"",advancedOptions:[]})=>ue.group({remoteVolumeSize:ue.group({size:ue.control(t.remoteVolumeSize),unit:ue.control(t.size)}),backupRetention:ue.control(t.backupRetention),advancedOptions:ue.group({})}),eo=(t,i)=>ue.group({name:ue.control(t),value:ue.control(i)}),nt=class t{#t=S(fe);#e=S(z);#n=S(L);#i=S(Y);formRef=q.required("formRef");optionsForm=this.#e.optionsForm;finishedLoading=this.#e.finishedLoading;selectedAdvancedOptions=this.#e.selectedAdvancedOptions;nonSelectedAdvancedOptions=this.#e.nonSelectedAdvancedOptions;sizeOptions=k(xn);rentationOptions=k(yn);sysinfoLoaded=this.#t.isLoaded;addNewOption(i){this.#e.addOptionToFormGroup(i)}retentionOptionDisplayFn(){let i=this.rentationOptions();return e=>{let n=i.find(r=>r.value===e);return n?n.name:""}}displayFn(){let i=this.#e.advancedOptions();return e=>{let n=i.find(r=>r.Name===e);return n?`${n.Name}`:""}}goBack(){this.#n.navigate(["schedule"],{relativeTo:this.#i.parent})}submit(){this.#e.submit()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=j({type:t,selectors:[["app-options"]],viewQuery:function(e,n){e&1&&K(n.formRef,At,5),e&2&&Q()},standalone:!0,features:[W],decls:1,vars:1,consts:[["formRef",""],["fieldTemplate",""],["option",""],[3,"formGroup"],[3,"submit","formGroup"],[1,"title-30"],[1,"remote-volume-wrap"],["formGroupName","remoteVolumeSize",1,"row-inputs"],["for","size"],["type","number","id","size","formControlName","size"],["type","text","placeholder","Select an option...","formControlName","unit"],["options",""],[3,"value"],["href","#",1,"spk-primary"],[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"],["formGroupName","advancedOptions"],[1,"form-wrap"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],["spk-button",""],[3,"for"],["spk-tooltip-right",""],["type","text",3,"id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["suffix","",1,"clickable"],["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"],["error",""]],template:function(e,n){e&1&&u(0,gn,49,3,"form",3),e&2&&_(n.finishedLoading()?0:-1)},dependencies:[ae,ee,ie,oe,J,xe,Ce,Z,X,te,ne,ye,Ue,qe,se,he,re,le,Se,je,Ke,ke],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap: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}.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}.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 hn=["formRef"];function Sn(t,i){if(t&1&&(a(0,"option",24),l(1),o()),t&2){let e=i.$implicit;m("value",e.key),s(),R(e.label)}}function kn(t,i){if(t&1){let e=O();a(0,"div",11)(1,"spk-form-field")(2,"label",12),l(3,"Next time"),o(),a(4,"input",13,1),x("focus",function(){C(e);let r=de(5);return g(r.showPicker())}),o(),a(6,"spk-icon",14),l(7,"clock"),o()(),a(8,"spk-form-field"),c(9,"label",15),a(10,"input",16,2),x("focus",function(){C(e);let r=de(11);return g(r.showPicker())}),o(),a(12,"spk-icon",14),l(13,"calendar"),o()()(),F(14,17),a(15,"div",18)(16,"spk-form-field")(17,"label",19),l(18,"Run again every"),o(),c(19,"input",20),o(),a(20,"spk-select",21),c(21,"input",22),F(22,23),T(23,Sn,2,2,"option",24,D),b(),o()(),a(25,"app-toggle-card",25),F(26,26),l(27,"Allowed days"),b(),a(28,"div",27)(29,"spk-toggle",6),l(30," Monday "),c(31,"input",28),o(),a(32,"spk-toggle",6),l(33," Tuesday "),c(34,"input",29),o(),a(35,"spk-toggle",6),l(36," Wednesday "),c(37,"input",30),o(),a(38,"spk-toggle",6),l(39," Thursday "),c(40,"input",31),o(),a(41,"spk-toggle",6),l(42," Friday "),c(43,"input",32),o(),a(44,"spk-toggle",6),l(45," Saturday "),c(46,"input",33),o(),a(47,"spk-toggle",6),l(48," Sunday "),c(49,"input",34),o()()(),b()}if(t&2){let e=p();s(20),m("displayFn",e.displayFn),s(3),N(e.unitOptions),s(2),m("disallowToggle",!0)}}var A=new B,kt=[{key:"s",label:"Seconds"},{key:"m",label:"Minutes"},{key:"h",label:"Hours"},{key:"D",label:"Days"},{key:"W",label:"Weeks"},{key:"M",label:"Months"},{key:"Y",label:"Years"}],vt=(t={autoRun:!1,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}}})=>A.group({autoRun:A.control(t.autoRun),nextTime:A.group({time:A.control(t.nextTime.time),date:A.control(t.nextTime.date)}),runAgain:A.group({repeatValue:A.control(t.runAgain.repeatValue),repeatUnit:A.control(t.runAgain.repeatUnit),allowedDays:A.group({mon:A.control(t.runAgain.allowedDays.mon),tue:A.control(t.runAgain.allowedDays.tue),wed:A.control(t.runAgain.allowedDays.wed),thu:A.control(t.runAgain.allowedDays.thu),fri:A.control(t.runAgain.allowedDays.fri),sat:A.control(t.runAgain.allowedDays.sat),sun:A.control(t.runAgain.allowedDays.sun)})})}),it=class t{#t=S(z);#e=S(L);#n=S(Y);formRef=q.required("formRef");scheduleForm=this.#t.scheduleForm;scheduleFormSignal=this.#t.scheduleFormSignal;unitOptions=kt;displayFn(i){let e=kt.find(n=>n.key===i);return e?`${e.label}`:""}goBack(){this.#e.navigate(["source-data"],{relativeTo:this.#n.parent})}next(){this.#e.navigate(["options"],{relativeTo:this.#n.parent})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=j({type:t,selectors:[["app-schedule"]],viewQuery:function(e,n){e&1&&K(n.formRef,hn,5),e&2&&Q()},standalone:!0,features:[W],decls:20,vars:2,consts:[["formRef",""],["timeRef",""],["dateRef",""],[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"],["options",""],[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(e,n){if(e&1){let r=O();a(0,"form",3,0),x("submit",function(){return C(r),g(n.next())}),a(2,"h3",4),l(3,"Schedule"),o(),a(4,"div",5)(5,"spk-toggle",6),l(6," Automatically run backups "),c(7,"input",7),o(),a(8,"p"),l(9,"If a date was missed, the job will run as soon as possible."),o()(),u(10,kn,50,2),a(11,"div",8)(12,"button",9),x("click",function(){return C(r),g(n.goBack())}),a(13,"spk-icon"),l(14,"arrow-left"),o(),l(15," Go back "),o(),a(16,"button",10)(17,"spk-icon"),l(18,"arrow-right"),o(),l(19," Continue "),o()()()}if(e&2){let r;m("formGroup",n.scheduleForm),s(10),_((r=n.scheduleFormSignal())!=null&&r.autoRun?-1:10)}},dependencies:[ae,ee,ie,oe,J,xe,Ce,Z,X,te,ne,ye,le,se,Se,re,he,ke],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var vn=["formRef"];function Fn(t,i){if(t&1&&(a(0,"option",21),l(1),o()),t&2){let e=i.$implicit;m("value",e),s(),R(e)}}function bn(t,i){if(t&1&&(a(0,"div",14)(1,"spk-form-field"),c(2,"input",18),o(),a(3,"spk-select"),c(4,"input",19),F(5,20),T(6,Fn,2,2,"option",21,D),b(),o()()),t&2){let e=p(2);s(6),N(e.sizeOptions())}}function wn(t,i){if(t&1){let e=O();a(0,"form",2,0),x("submit",function(){C(e);let r=p();return g(r.next())}),a(2,"h3",3),l(3,"Source Data"),o(),a(4,"app-file-tree",4)(5,"label",5),l(6,"Folder path"),o(),c(7,"input",6),o(),a(8,"app-toggle-card",7),F(9,8),l(10,"Exclude"),b(),a(11,"spk-toggle",9),l(12," Hidden files "),c(13,"input",10),o(),a(14,"spk-toggle",9),l(15," System files "),c(16,"input",11),o(),a(17,"spk-toggle",9),l(18," Temporary files "),c(19,"input",12),o(),a(20,"spk-toggle",13),x("click",function(){C(e);let r=p();return g(r.toggleFilesLargerThan())}),l(21," Files larger than "),o(),u(22,bn,8,0,"div",14),o(),a(23,"div",15)(24,"button",16),x("click",function(){C(e);let r=p();return g(r.goBack())}),a(25,"spk-icon"),l(26,"arrow-left"),o(),l(27," Go back "),o(),a(28,"button",17)(29,"spk-icon"),l(30,"arrow-right"),o(),l(31," Continue "),o()()()}if(t&2){let e=p();m("formGroup",e.sourceDataForm),s(4),m("multiSelect",!0)("startingPath",e.getPath()),s(4),m("isActive",!0),s(12),mt("active",e.filesLargerThan()),s(2),_(e.filesLargerThan()?22:-1)}}var _e=new B,Dn=["Bytes","KB","MB","GB","TB","PB"],Tn=["Contains","Does not contain","Is greater than","Is less than"];var Ft=(t={path:"",excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>_e.group({path:_e.control(t.path),excludes:_e.group({hidden:_e.control(t.excludes.hidden),system:_e.control(t.excludes.system),temporary:_e.control(t.excludes.temporary),filesLargerThan:_e.group({size:_e.control(null),unit:_e.control(null)})})}),ot=class t{#t=S(z);#e=S(L);#n=S(Y);formRef=q.required("formRef");sourceDataForm=this.#t.sourceDataForm;sourceDataFormSignal=this.#t.sourceDataFormSignal;finishedLoading=this.#t.finishedLoading;filesLargerThan=H(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=k(Dn);expressionOptions=k(Tn);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})}goBack(){this.#e.navigate(["destination"],{relativeTo:this.#n.parent})}next(){this.#e.navigate(["schedule"],{relativeTo:this.#n.parent})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=j({type:t,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&K(n.formRef,vn,5),e&2&&Q()},standalone:!0,features:[W],decls:1,vars:1,consts:[["formRef",""],[3,"formGroup"],[3,"submit","formGroup"],[1,"title-30"],[3,"multiSelect","startingPath"],["for","path"],["type","text","id","path","tabindex","4","placeholder","Path","formControlName","path"],["formGroupName","excludes",3,"isActive"],["title",""],[1,"raised","primary"],["type","checkbox","placeholder","Hidden files","formControlName","hidden"],["type","checkbox","placeholder","System files","formControlName","system"],["type","checkbox","placeholder","Temporary files","formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["type","number","formControlName","size"],["type","text","formControlName","unit","placeholder","Select an option..."],["options",""],[3,"value"]],template:function(e,n){e&1&&u(0,wn,32,7,"form",1),e&2&&_(n.finishedLoading()?0:-1)},dependencies:[ae,ee,ie,oe,J,xe,Ce,Z,X,te,ne,ye,le,re,he,se,Se,Qe,ke],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.5rem}.filter-inputs[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:flex-end}.filter-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.filter-inputs[_ngcontent-%COMP%] .filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var I=new B,z=class t{#t=S(L);#e=S(fe);#n=S(ft);#i=S(We);#o=S(gt);destinationOptions=this.#e.backendModules;isDraft=k(!1);backupId=k(null);isSubmitting=k(!1);loadingBackup=k(!1);loadingDefaults=k(!0);finishedLoading=k(!1);isNew=H(()=>this.backupId()==="new");backupDefaults=k(null);generalForm=ht();sourceDataForm=Ft();scheduleForm=vt();destinationForm=bt();optionsForm=St();selectedAdvancedFormPair=k([]);notSelectedAdvancedFormPair=k([]);destinationFormPair=k({oauthField:null,custom:[],dynamic:[],advanced:[]});sourceDataFormSignal=Ve(this.sourceDataForm.valueChanges);destinationFormSignal=Ve(this.destinationForm.valueChanges);encryptionFieldSignal=Ve(this.generalForm.controls.encryption.valueChanges);scheduleFormSignal=Ve(this.scheduleForm.valueChanges);advancedOptions=H(()=>this.#e.sysInfoSignal()?.Options??[]);encryptionOptions=H(()=>{let i=this.#e.sysInfoSignal()?.EncryptionModules??[];return[tt,...i]});selectedAdvancedOptions=k([]);nonSelectedAdvancedOptions=H(()=>this.advancedOptions().sort((i,e)=>i?.Name&&e?.Name?i?.Name.localeCompare(e?.Name):0).filter(i=>this.selectedAdvancedOptions()?.findIndex(e=>e.name===i.Name)===-1));init(i="new",e=!1){this.backupId.set(i),i!=="new"?this.getBackup(i,e):this.getDefaults()}submit(){this.isSubmitting.set(!0);let i=this.#m(),e=this.backupId();e==="new"||!e||this.isDraft()?this.#n.postApiV1Backups({requestBody:i}).pipe(Fe(()=>this.isSubmitting.set(!1))).subscribe({next:n=>{console.log("submitted res",n),this.exit()},error:n=>{console.error("submitted error",n)}}):this.#n.putApiV1BackupById({id:e,requestBody:i}).pipe(Fe(()=>this.isSubmitting.set(!1))).subscribe({next:n=>{console.log("submitted res",n),this.exit()},error:n=>{console.error("submitted error",n)}})}exit(){this.#u(),this.#t.navigate(["/"])}getDefaults(){this.loadingDefaults.set(!0),this.#n.getApiV1Backupdefaults().pipe(pt(1),Fe(()=>this.loadingDefaults.set(!1))).subscribe({next:i=>{this.#s(i.Schedule),this.#p(i.Backup),this.backupDefaults.set(i),this.finishedLoading.set(!0)}})}getBackup(i,e=!1){this.loadingBackup.set(!0);let n=r=>{console.log("hi 1"),this.#s(r.Schedule??null),r.Backup&&(this.#l(r.Backup),this.#r(r.Backup),this.#a(r.Backup),this.#p(r.Backup)),this.finishedLoading.set(!0)};if(e){this.isDraft.set(e);let r=this.#o.draftBackups().find(d=>d.id===i);if(!r){this.loadingBackup.set(!1),alert("Backup not found");return}n(r.data)}else console.log("hi"),this.#n.getApiV1BackupById({id:i}).pipe(Fe(()=>this.loadingBackup.set(!1))).subscribe({next:n})}#a(i){let e=i.Sources??"",n=i.Filters?.map(V=>`${V.Include?"":"-"}${V.Expression}`)??[],r=i.Settings?.find(V=>V.Name==="--exclude-files-attributes")?.Value??"",d=i.Settings?.find(V=>V.Name==="--skip-files-larger-than")??null,v=d?.Value.replace(/[0-9]/g,"")??null,U=d?.Value.replace(/[^0-9]/g,"")??null,pe={path:[...e,...n].join("\0"),excludes:{hiddenFiles:r.includes("hidden"),systemFiles:r.includes("system"),tempFiles:r.includes("temporary"),filesLargerThan:v&&U?{size:parseInt(U),unit:v.toUpperCase()}:null}};this.sourceDataForm.patchValue(pe)}#r(i){let e=i.TargetURL?yt(i.TargetURL):null;e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced})}#l(i){let e=i.Settings?.find(r=>r.Name==="encryption-module"),n=e?.Value&&e.Value.length?e.Value:"none";this.generalForm.patchValue({name:i.Name??"",description:i.Description??"",encryption:n})}#s(i){if(!i){this.scheduleForm.patchValue({autoRun:!0});return}let e=this.#i.fromString(i.Repeat)??null,r={nextTime:this.#d(i.Time),runAgain:{repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:i.AllowedDays?.includes("mon")??!1,tue:i.AllowedDays?.includes("tue")??!1,wed:i.AllowedDays?.includes("wed")??!1,thu:i.AllowedDays?.includes("thu")??!1,fri:i.AllowedDays?.includes("fri")??!1,sat:i.AllowedDays?.includes("sat")??!1,sun:i.AllowedDays?.includes("sun")??!1}}};this.scheduleForm.patchValue(r)}#p(i){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than"],n=this.advancedOptions();i.Settings?.forEach(r=>{if(r.Name==="encryption-module")return this.generalForm.controls.encryption.setValue(r.Value??"");if(!(r.Name&&e.includes(r.Name))){if(r.Name==="dblock-size"){let d=r.Value?.replace(/[^0-9]/g,""),v=r.Value?.replace(/[0-9]/g,"");return this.optionsForm.controls.remoteVolumeSize.setValue({size:d?parseInt(d):null,unit:v?v.toUpperCase():null})}if(r.Name&&r.Value){let d=n.find(v=>v.Name===r.Name);if(!d)return;this.addOptionToFormGroup(d,r.Value)}}})}hello(){return this.#m()}#m(){let i=this.generalForm.value,e=this.optionsForm.value,n=this.scheduleForm.value,r=this.sourceDataForm.value,v=this.destinationForm.value.destinations?.length?this.#c(this.destinationForm.controls.destinations):[],U=null;n.runAgain?.repeatUnit&&n.runAgain?.repeatValue&&(U=this.#i.toString(n.runAgain.repeatValue,n.runAgain.repeatUnit));let pe=n.runAgain?.allowedDays?Object.entries(n.runAgain?.allowedDays).filter(([h,E])=>E).map(([h,E])=>h):[],V=r.path?.split("\0")??[],Ae=i.encryption==="none"?{Name:"--no-encryption",Value:"True"}:{Name:"encryption-module",Value:i.encryption??null},Re=this.advancedOptions(),Be=Object.entries(e.advancedOptions??{}).filter(([h,E])=>h&&E).map(([h,E])=>{let $=Re.find(ve=>ve.Name===h);return $?.Type==="Size"?{Name:h,Value:`${E.size}${E.unit.toLowerCase()}`}:$?.Type==="Integer"?{Name:h,Value:E.toString()}:$?.Type==="Boolean"?{Name:h,Value:E.toString()}:{Name:h,Value:E}}),G=[Ae,...Be],f=Object.entries(r.excludes??{}).filter(([h,E])=>E&&h!=="filesLargerThan").map(([h])=>h),M=r.excludes?.filesLargerThan;return f.length&&G.push({Name:"--exclude-files-attributes",Value:f.join(",")}),M&&M.size!==null&&M.unit!==null&&G.push({Name:"--skip-files-larger-than",Value:`${M.size}${M.unit}`}),{Backup:{Name:i.name,Description:i.description,TargetURL:v[0]??null,Sources:V.filter(h=>!h.startsWith("-")),Settings:G,Filters:V.filter(h=>h.startsWith("-")).map((h,E)=>({Order:E,Include:!1,Expression:h.slice(1)}))},Schedule:n.autoRun?null:{Repeat:U,Time:n.nextTime?.date?new Date(`${n.nextTime.date}T${n.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:pe}}}#c(i){return i.controls.map(e=>{if(!e.controls.advanced)return Pe(e.value);let n=Object.keys(e.controls.advanced.controls).filter(r=>e.controls.advanced.controls[r].dirty);return Pe($e(me({},e.value),{advanced:n.reduce((r,d)=>(r[d]=e.controls.advanced.controls[d].value,r),{})}))})}#d(i){if(!i||i?.indexOf("T")===-1)return{time:i??"13:00"};let e=new Date(i),n={time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`};return i.indexOf("T")!==-1&&(n.date=e.toISOString().split("T")[0]),n}addOptionToFormGroup(i,e){let n=this.optionsForm.controls.advancedOptions,r=e??i.DefaultValue;if((i.Type==="String"||i.Type==="Password"||i.Type==="Enumeration"||i.Type==="Path")&&n.addControl(i.Name,I.control(r)),i.Type==="Size"){let d=r.replace(/[0-9]/g,""),v=r.replace(/[^0-9]/g,"");n.addControl(i.Name,I.group({size:I.control(v?parseInt(v):50),unit:I.control(d?d.toUpperCase():"MB")}))}i.Type==="Integer"&&n.addControl(i.Name,I.control(r?parseInt(r):0)),i.Type==="Boolean"&&n.addControl(i.Name,I.control(r==="true")),i.Type==="Flags"&&n.addControl(i.Name,I.control(r??"")),i.Type==="Timespan"&&n.addControl(i.Name,I.control(r,[ge.pattern(/([-+]?\d{1,3}[smhDWMY])+/)])),this.selectedAdvancedOptions.update(d=>(d.push({name:i.Name,type:i.Type,shortDescription:i.ShortDescription??void 0,longDescription:i.LongDescription??void 0,options:i.ValidValues}),d))}addDestinationFormGroup(i,e){let n=this.destinationOptions().find(G=>G.Key===i);if(!n||!n.Options)return;let r=Ge.hasOwnProperty(i)&&Ge[i],d=r&&r.customFields?r.customFields:{},v=r&&r.dynamicFields?r.dynamicFields:[],U=r&&r.advancedFields?r.advancedFields:[],pe=r&&r.oauthField?r.oauthField:null;this.destinationFormPair.set({oauthField:pe,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]);let V=I.group({}),Ae=I.group({}),Re=I.group({});if(d)for(i in d){let Be=d[i],{formElement:G}=Be,f=st(Be,["formElement"]);V.addControl(i,G(e?.custom[i])),this.destinationFormPair.update(M=>(M.custom.push(f),M))}for(let G=0;G<n.Options.length;G++){let f=n.Options[G];if(f.Deprecated)continue;let M=v.includes(f.Name),h=M?Ae:Re;this.destinationFormPair.update(ve=>(ve[M?"dynamic":"advanced"].push({name:f.Name,type:f.Type,shortDescription:f.ShortDescription??void 0,longDescription:f.LongDescription??void 0,options:f.ValidValues}),ve));let $=(M?e?.dynamic[f.Name]:e?.advanced[f.Name])??f.DefaultValue;if(f.Type==="String"||f.Type==="Password"||f.Type==="Enumeration"||f.Type==="Path"){h.addControl(f.Name,I.control($));continue}if(f.Type==="Size"){let ve=$.replace(/[0-9]/g,""),lt=$.replace(/[^0-9]/g,"");h.addControl(f.Name,I.group({size:I.control(lt?parseInt(lt):50),unit:I.control(ve?ve.toUpperCase():"MB")}))}if(f.Type==="Integer"){h.addControl(f.Name,I.control($?parseInt($):0));continue}if(f.Type==="Boolean"){h.addControl(f.Name,I.control($==="true"));continue}if(f.Type==="Flags"){h.addControl(f.Name,I.control($??""));continue}f.Type==="Timespan"&&h.addControl(f.Name,I.control($,[ge.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]))}this.destinationForm.controls.destinations.length!==0&&this.destinationForm.controls.destinations.removeAt(0),this.destinationFormPair.update(G=>({oauthField:G.oauthField,custom:G.custom,dynamic:G.dynamic.sort((f,M)=>v.indexOf(f.name)-v.indexOf(M.name)),advanced:G.advanced.sort((f,M)=>{let h=U.indexOf(f.name),E=U.indexOf(M.name);return h===-1&&E!==-1?1:h!==-1&&E===-1?-1:h-E})})),this.notSelectedAdvancedFormPair.set(this.destinationFormPair().advanced),this.destinationForm.controls.destinations.push(wt({key:n.Key,customGroup:V,dynamicGroup:Ae,advancedGroup:Re}))}#u(){this.generalForm.reset(),this.sourceDataForm.reset(),this.scheduleForm.reset(),this.destinationForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=De({token:t,factory:t.\u0275fac,providedIn:"root"})};var Nn=["formRef"],On=(t,i,e,n)=>({destination:t,destinationType:i,index:e,formGroupName:"custom",oauthField:n}),rt=t=>({$implicit:t}),En=(t,i,e,n)=>({destination:t,destinationType:i,index:e,formGroupName:"dynamic",oauthField:n}),Pn=(t,i,e,n)=>({destination:t,destinationType:i,index:e,formGroupName:"advanced",oauthField:n});function In(t,i){if(t&1){let e=O();a(0,"p",9),x("click",function(){C(e);let r=p(2);return g(r.removeDestinationFormGroup(r.destinationCount()-1))}),l(1," Wanna select another destination? "),a(2,"span",10),l(3,"Click here"),o()()}}function Vn(t,i){if(t&1){let e=O();a(0,"div",11)(1,"div",12),x("click",function(){C(e);let r=p(2);return g(r.addDestinationFormGroup("file"))}),a(2,"h3"),l(3,"File system"),o(),a(4,"p"),l(5,"Store backups on your local file system."),o()(),a(6,"div",12),x("click",function(){C(e);let r=p(2);return g(r.addDestinationFormGroup("gcs"))}),a(7,"h3"),l(8,"Google Cloud Storage"),o(),a(9,"p"),l(10,"Store backups in Google Cloud Storage."),o()(),a(11,"div",12),x("click",function(){C(e);let r=p(2);return g(r.addDestinationFormGroup("s3"))}),a(12,"h3"),l(13,"S3 compatible bucket"),o(),a(14,"p"),l(15,"Store backups in any S3 compatible bucket."),o()(),a(16,"div",12),x("click",function(){C(e);let r=p(2);return g(r.addDestinationFormGroup("ssh"))}),a(17,"h3"),l(18,"SSH"),o(),a(19,"p"),l(20,"Store backups in SSH."),o()(),a(21,"div",12),x("click",function(){C(e);let r=p(2);return g(r.addDestinationFormGroup("googledrive"))}),a(22,"h3"),l(23,"Google Drive"),o(),a(24,"p"),l(25,"Store backups in Google Drive."),o()()(),a(26,"p"),l(27,"More destinations are coming soon."),o()}}function Gn(t,i){t&1&&Te(0)}function Mn(t,i){if(t&1&&u(0,Gn,1,0,"ng-container",15),t&2){let e,n=i.$implicit,r=i.$index;p(2);let d=de(6),v=p(2);m("ngTemplateOutlet",d)("ngTemplateOutletContext",Ne(7,rt,Le(2,On,n,(e=v.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,r,v.destinationFormPair().oauthField)))}}function An(t,i){if(t&1&&(F(0),T(1,Mn,1,9,"ng-container",null,D),b()),t&2){let e=p(3);s(),N(e.destinationFormPair().custom)}}function Rn(t,i){t&1&&Te(0)}function Bn(t,i){if(t&1&&u(0,Rn,1,0,"ng-container",15),t&2){let e,n=i.$implicit,r=i.$index;p(2);let d=de(6),v=p(2);m("ngTemplateOutlet",d)("ngTemplateOutletContext",Ne(7,rt,Le(2,En,n,(e=v.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,r,v.destinationFormPair().oauthField)))}}function $n(t,i){if(t&1&&(F(0),T(1,Bn,1,9,"ng-container",null,D),b()),t&2){let e=p(3);s(),N(e.destinationFormPair().dynamic)}}function Ln(t,i){if(t&1){let e=O();a(0,"button",20),x("click",function(){let r=C(e).$implicit,d=p(4);return g(d.addAdvancedFormPair(r))}),l(1),o()}if(t&2){let e=i.$implicit;s(),w(" ",e.name," ")}}function zn(t,i){t&1&&Te(0)}function Un(t,i){if(t&1&&u(0,zn,1,0,"ng-container",15),t&2){let e,n=i.$implicit,r=i.$index;p(2);let d=de(6),v=p(2);m("ngTemplateOutlet",d)("ngTemplateOutletContext",Ne(7,rt,Le(2,Pn,n,(e=v.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,r,v.destinationFormPair().oauthField)))}}function jn(t,i){if(t&1&&(a(0,"app-toggle-card",14),F(1,16),l(2," Advanced options "),a(3,"spk-menu")(4,"button",17),l(5," Add advanced option "),a(6,"spk-icon"),l(7,"plus"),o()(),F(8,18),T(9,Ln,2,1,"button",19,D),b(),o(),b(),F(11),T(12,Un,1,9,"ng-container",null,D),b(),o()),t&2){let e=p(3);m("disallowToggle",!0),s(9),N(e.notSelectedAdvancedFormPair()),s(3),N(e.selectedAdvancedFormPair())}}function qn(t,i){if(t&1&&(a(0,"spk-icon",27),l(1," question "),o()),t&2){let e=p(2).$implicit;P("spk-tooltip-primary",e.destination.longDescription)}}function Kn(t,i){if(t&1&&(a(0,"app-file-tree",22)(1,"label",26),l(2),u(3,qn,2,1,"spk-icon",27),o(),c(4,"input",28),o()),t&2){let e,n=p().$implicit,r=p(3);m("startingPath",r.getFormFieldValue(n.index,n.formGroupName,n.destination.name)),s(),ct("for","destination-",n.formGroupName,"-",n.formGroupName,"-",n.index,""),s(),w(" ",(e=n.destination.shortDescription)!==null&&e!==void 0?e:n.destination.name," "),s(),_(n.destination.longDescription?3:-1),s(),y("id","destination-",n.formGroupName,"-",n.index,""),ce("formControlName",n.destination.name)}}function Qn(t,i){if(t&1&&(a(0,"spk-icon",27),l(1," question "),o()),t&2){let e=p(2).$implicit;P("spk-tooltip-primary",e.destination.longDescription)}}function Wn(t,i){t&1&&(a(0,"spk-icon",29),l(1,"link"),o())}function Hn(t,i){t&1&&(a(0,"spk-icon",29),l(1,"textbox"),o())}function Yn(t,i){if(t&1&&(a(0,"spk-form-field")(1,"label",26),l(2),u(3,Qn,2,1,"spk-icon",27),o(),c(4,"input",28),u(5,Wn,2,0,"spk-icon",29)(6,Hn,2,0,"spk-icon",29),o()),t&2){let e,n=p().$implicit;s(),y("for","destination-",n.formGroupName,"-",n.index,""),s(),w(" ",(e=n.destination.shortDescription)!==null&&e!==void 0?e:n.destination.name," "),s(),_(n.destination.longDescription?3:-1),s(),y("id","destination-",n.formGroupName,"-",n.index,""),ce("formControlName",n.destination.name),s(),_(n.destination.type==="Path"?5:6)}}function Jn(t,i){if(t&1){let e=O();a(0,"span",33),x("click",function(){C(e);let r=p(2).$implicit,d=p(3);return g(d.oauthStartTokenCreation(r.destinationType))}),l(1,"AuthID"),o()}}function Zn(t,i){t&1&&(a(0,"spk-icon",29),l(1,"password"),o())}function Xn(t,i){if(t&1){let e=O();a(0,"spk-icon",34),x("click",function(){C(e);let r=p(2).$implicit;return g(r.destination.showPassword=!r.destination.showPassword)}),l(1," eye "),o()}}function ei(t,i){if(t&1){let e=O();a(0,"spk-icon",34),x("click",function(){C(e);let r=p(2).$implicit;return g(r.destination.showPassword=!r.destination.showPassword)}),l(1," eye-slash "),o()}}function ti(t,i){if(t&1&&(a(0,"spk-form-field")(1,"label",26),l(2),o(),c(3,"input",30),u(4,Jn,2,0,"span",31)(5,Zn,2,0,"spk-icon",29)(6,Xn,2,0,"spk-icon",32)(7,ei,2,0,"spk-icon",32),o()),t&2){let e,n=p().$implicit;s(),y("for","destination-",n.formGroupName,"-",n.index,""),s(),dt(" ",(e=n.destination.shortDescription)!==null&&e!==void 0?e:n.destination.name," -- ",n.oauthField," ",n.destinationType," ",n.destination.name," "),s(),y("id","destination-",n.formGroupName,"-",n.index,""),ce("formControlName",n.destination.name),m("type",n.destination.showPassword?"text":"password"),s(),_(n.oauthField===n.destination.name?4:5),s(2),_(n.destination.showPassword?6:7)}}function ni(t,i){if(t&1&&(a(0,"spk-icon",27),l(1," question "),o()),t&2){let e=p(2).$implicit;P("spk-tooltip-primary",e.destination.longDescription)}}function ii(t,i){if(t&1&&(a(0,"option",37),l(1),o()),t&2){let e=i.$implicit;m("value",e),s(),R(e)}}function oi(t,i){if(t&1&&(a(0,"spk-select")(1,"label",26),l(2),u(3,ni,2,1,"spk-icon",27),o(),c(4,"input",35),F(5,36),T(6,ii,2,2,"option",37,D),b(),o()),t&2){let e,n=p().$implicit;s(),y("for","destination-",n.formGroupName,"-",n.index,""),s(),w(" ",(e=n.destination.shortDescription)!==null&&e!==void 0?e:n.destination.name," "),s(),_(n.destination.longDescription?3:-1),s(),y("id","destination-",n.formGroupName,"-",n.index,""),ce("formControlName",n.destination.name),s(2),N(n.destination.options)}}function ai(t,i){if(t&1&&(a(0,"spk-icon",27),l(1," question "),o()),t&2){let e=p(2).$implicit;P("spk-tooltip-primary",e.destination.longDescription)}}function ri(t,i){if(t&1&&(a(0,"option",37),l(1),o()),t&2){let e=i.$implicit;m("value",e),s(),R(e)}}function li(t,i){if(t&1&&(a(0,"div",23)(1,"label",26),l(2),u(3,ai,2,1,"spk-icon",27),o(),a(4,"div",38)(5,"spk-form-field"),c(6,"input",39),a(7,"spk-icon",29),l(8,"resize"),o()(),a(9,"spk-select"),c(10,"label")(11,"input",40),F(12,36),T(13,ri,2,2,"option",37,D),b(),o()()()),t&2){let e,n=p().$implicit,r=p(3);m("formGroupName",n.destination.name),s(),y("for","destination-",n.formGroupName,"-",n.index,""),s(),w(" ",(e=n.destination.shortDescription)!==null&&e!==void 0?e:n.destination.name," "),s(),_(n.destination.longDescription?3:-1),s(3),y("id","destination-",n.formGroupName,"-",n.index,""),s(7),N(r.sizeOptions())}}function si(t,i){if(t&1&&(a(0,"spk-icon",27),l(1," question "),o()),t&2){let e=p(2).$implicit;P("spk-tooltip-primary",e.destination.longDescription)}}function pi(t,i){if(t&1&&(a(0,"spk-form-field")(1,"label",26),l(2),u(3,si,2,1,"spk-icon",27),o(),c(4,"input",41),a(5,"spk-icon",29),l(6,"numpad"),o()()),t&2){let e,n=p().$implicit;s(),y("for","destination-",n.formGroupName,"-",n.index,""),s(),w(" ",(e=n.destination.shortDescription)!==null&&e!==void 0?e:n.destination.name," "),s(),_(n.destination.longDescription?3:-1),s(),y("id","destination-",n.formGroupName,"-",n.index,""),ce("formControlName",n.destination.name)}}function mi(t,i){if(t&1&&(a(0,"spk-icon",27),l(1," question "),o()),t&2){let e=p(2).$implicit;P("spk-tooltip-primary",e.destination.longDescription)}}function ci(t,i){if(t&1&&(a(0,"spk-toggle",24)(1,"label",26),l(2),u(3,mi,2,1,"spk-icon",27),o(),c(4,"input",42),o()),t&2){let e,n=p().$implicit;s(),y("for","destination-",n.formGroupName,"-",n.index,""),s(),w(" ",(e=n.destination.shortDescription)!==null&&e!==void 0?e:n.destination.name," "),s(),_(n.destination.longDescription?3:-1),s(),y("id","destination-",n.formGroupName,"-",n.index,""),ce("formControlName",n.destination.name)}}function di(t,i){if(t&1&&(a(0,"spk-icon",27),l(1," question "),o()),t&2){let e=p(2).$implicit;P("spk-tooltip-primary",e.destination.longDescription)}}function ui(t,i){t&1&&(a(0,"spk-option",44),l(1,"None"),o()),t&2&&m("value","None")}function _i(t,i){if(t&1&&(a(0,"spk-option",37),l(1),c(2,"spk-checkbox",45),o()),t&2){let e=p().$implicit;m("value",e),s(),w(" ",e," ")}}function fi(t,i){if(t&1&&u(0,ui,2,1,"spk-option",44)(1,_i,3,2,"spk-option",37),t&2){let e=i.$implicit;_(e==="None"?0:1)}}function Ci(t,i){if(t&1&&(a(0,"spk-select",25)(1,"label",26),l(2),u(3,di,2,1,"spk-icon",27),o(),c(4,"input",43),F(5,36),T(6,fi,2,1,null,null,D),b(),o()),t&2){let e,n=p().$implicit;m("selectMultiple",!0),s(),y("for","destination-",n.formGroupName,"-",n.index,""),s(),w(" ",(e=n.destination.shortDescription)!==null&&e!==void 0?e:n.destination.name," "),s(),_(n.destination.longDescription?3:-1),s(),ce("formControlName",n.destination.name),s(2),N(n.destination.options)}}function gi(t,i){if(t&1&&(a(0,"spk-icon",27),l(1," question "),o()),t&2){let e=p(2).$implicit;P("spk-tooltip-primary",e.destination.longDescription)}}function xi(t,i){if(t&1&&(a(0,"spk-form-field")(1,"label",26),l(2),u(3,gi,2,1,"spk-icon",27),o(),c(4,"input",28)(5,"span",46),o()),t&2){let e,n=p().$implicit;s(),y("for","destination-",n.formGroupName,"-",n.index,""),s(),w(" ",(e=n.destination.shortDescription)!==null&&e!==void 0?e:n.destination.name," "),s(),_(n.destination.longDescription?3:-1),s(),y("id","destination-",n.formGroupName,"-",n.index,""),ce("formControlName",n.destination.name)}}function yi(t,i){if(t&1&&(F(0,21),u(1,Kn,5,11,"app-file-tree",22)(2,Yn,7,10,"spk-form-field")(3,ti,8,14,"spk-form-field")(4,oi,8,9,"spk-select")(5,li,15,9,"div",23)(6,pi,7,9,"spk-form-field")(7,ci,5,9,"spk-toggle",24)(8,Ci,8,7,"spk-select",25)(9,xi,6,9,"spk-form-field"),b()),t&2){let e=i.$implicit;m("formGroupName",e.formGroupName),s(),_(e.destination.type==="file-tree"?1:e.destination.type==="String"||e.destination.type==="Path"?2:e.destination.type==="Password"?3:e.destination.type==="Enumeration"?4:e.destination.type==="Size"?5:e.destination.type==="Integer"?6:e.destination.type==="Boolean"?7:e.destination.type==="Flags"?8:e.destination.type==="Timespan"?9:-1)}}function hi(t,i){if(t&1&&(F(0,5)(1,13),u(2,An,3,0,"ng-container")(3,$n,3,0,"ng-container")(4,jn,14,1,"app-toggle-card",14)(5,yi,10,2,"ng-template",null,1,ze),b()()),t&2){let e=p(2);s(2),_(e.destinationFormPair().custom.length?2:-1),s(),_(e.destinationFormPair().dynamic.length?3:-1),s(),_(e.destinationFormPair().advanced.length?4:-1)}}function Si(t,i){if(t&1){let e=O();a(0,"form",3,0),x("submit",function(){C(e);let r=p();return g(r.next())}),a(2,"header")(3,"h3",4),l(4,"Backup destination"),o(),u(5,In,4,0,"p"),o(),u(6,Vn,28,0)(7,hi,7,3,"ng-container",5),a(8,"div",6)(9,"button",7),x("click",function(){C(e);let r=p();return g(r.goBack())}),a(10,"spk-icon"),l(11,"arrow-left"),o(),l(12," Go back "),o(),a(13,"button",8)(14,"spk-icon"),l(15,"arrow-right"),o(),l(16," Continue "),o()()()}if(t&2){let e,n=p();m("formGroup",n.destinationForm),s(5),_(n.destinationCount()>0?5:-1),s(),_(n.destinationCount()===0?6:-1),s(),_(!((e=n.destinationFormSignal())==null||e.destinations==null)&&e.destinations.length?7:-1)}}var ki=["Bytes","KB","MB","GB","TB","PB"],Ze=new B,bt=(t={destinations:[]})=>Ze.group({destinations:Ze.array(t.destinations)}),wt=({key:t,customGroup:i,dynamicGroup:e,advancedGroup:n})=>Ze.group({destinationType:Ze.control(t),custom:i,dynamic:e,advanced:n}),at=class t{#t=S(L);#e=S(Y);#n=S(fe);#i=S(_t);#o=S(z);formRef=q.required("formRef");sysIsLoaded=this.#n.isLoaded;finishedLoading=this.#o.finishedLoading;destinationForm=this.#o.destinationForm;destinationFormPair=this.#o.destinationFormPair;selectedAdvancedFormPair=this.#o.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#o.notSelectedAdvancedFormPair;destinationOptions=this.#o.destinationOptions;destinationFormSignal=this.#o.destinationFormSignal;destinationCount=H(()=>this.destinationFormSignal()?.destinations?.length??0);sizeOptions=k(ki);getFormFieldValue(i,e,n){return((this.destinationForm.controls.destinations.controls?.[i]).controls?.[e]).controls[n].value}addDestinationFormGroup(i){this.#o.addDestinationFormGroup(i)}addAdvancedFormPair(i){this.selectedAdvancedFormPair.update(e=>(e.push(i),e)),this.notSelectedAdvancedFormPair.update(e=>(e=e.filter(n=>n.name!==i.name),e))}targetUrl=H(()=>{let i=this.destinationFormSignal()?.destinations?.[0];return i?Pe(i):""});mapToTargetUrl(i){return Pe(i.value)}removeDestinationFormGroup(i){this.destinationForm.controls.destinations.removeAt(i)}displayFn(i){let e=this.destinationOptions().find(n=>n.Key===i);return e?`${e.DisplayName}`:""}goBack(){this.#t.navigate(["general"],{relativeTo:this.#e.parent})}next(){this.#t.navigate(["source-data"],{relativeTo:this.#e.parent})}#a=k("https://duplicati-oauth-handler.appspot.com/").asReadonly();#r=k(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#l=k(!1);#s=k(null);keyCreation(){}oauthStartTokenCreation(i){this.#l.set(!0);let e=450,n=600,r=this.#a()+"?type="+i+"&token="+this.#r(),d=screen.width/2-e/2,v=screen.height/2-n/2,U=window.open(r,"_blank","height="+n+",width="+e+",menubar=0,status=0,titlebar=0,toolbar=0,left="+d+",top="+v);U?.addEventListener("blur",pe=>{console.log("event blur",pe)}),U?.addEventListener("beforeunload",pe=>{console.log("event beforeunload",pe),this.#i.get(this.#a()+"fetch?callback=JSON_CALLBACK",{params:{token:this.#r()}}).pipe(Fe(()=>this.#l.set(!1))).subscribe({next:V=>{console.log("res",V),V?.authid&&this.#s.set(V.authid)}})})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=j({type:t,selectors:[["app-destination"]],viewQuery:function(e,n){e&1&&K(n.formRef,Nn,5),e&2&&Q()},standalone:!0,features:[W],decls:1,vars:1,consts:[["formRef",""],["fieldTemplate",""],[3,"formGroup"],[3,"submit","formGroup"],[1,"title-30"],["formArrayName","destinations"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile",3,"click"],["formGroupName","0"],[3,"disallowToggle"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["title",""],["spk-button","","type","button",1,"outlined","small"],["menu",""],["item","","type","button"],["item","","type","button",3,"click"],[3,"formGroupName"],[3,"startingPath"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],[3,"for"],["spk-tooltip-right",""],["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"],["options",""],[3,"value"],[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"],["error",""]],template:function(e,n){e&1&&u(0,Si,17,4,"form",2),e&2&&_(n.destinationOptions().length&&n.sysIsLoaded()&&n.finishedLoading()?0:-1)},dependencies:[ae,ee,ie,oe,J,xe,Ce,Z,X,te,ne,ye,Ct,Ue,le,se,qe,je,Ke,re,Se,ke,Qe],styles:["[_nghost-%COMP%]{display:block}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap: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)}"],changeDetection:0})};export{bt as a,wt as b,at as c,ht as d,tt as e,et as f,St as g,eo as h,nt as i,vt as j,it as k,Ft as l,ot as m,z as n};
@@ -0,0 +1 @@
1
+ import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-Q2QH4H5B.js")},{path:"destination",loadComponent:()=>import("./chunk-ASMWEBCB.js")},{path:"source-data",loadComponent:()=>import("./chunk-AIL3DRSU.js")},{path:"schedule",loadComponent:()=>import("./chunk-QDXOKRRT.js")},{path:"options",loadComponent:()=>import("./chunk-QD7BY4V5.js")}];export{o as default};
@@ -0,0 +1 @@
1
+ import{a,b}from"./chunk-C7JVFVNG.js";import"./chunk-SHLX3F4G.js";import"./chunk-RNBIMN7E.js";import"./chunk-BX543SH4.js";import"./chunk-DE7MHNNM.js";import"./chunk-EYBBW4ID.js";import"./chunk-IGECPMHY.js";import"./chunk-L2WWHQPN.js";import"./chunk-PY26LA4W.js";import"./chunk-FKB7BVQE.js";import"./chunk-7CGTOI24.js";export{a as createRestoreOptionsForm,b as default};
@@ -0,0 +1 @@
1
+ import{l as a,m as b}from"./chunk-5FBRBL44.js";import"./chunk-RNBIMN7E.js";import"./chunk-AN53EBZI.js";import"./chunk-DNHLTHLR.js";import"./chunk-BX543SH4.js";import"./chunk-DE7MHNNM.js";import"./chunk-GSP4D4JM.js";import"./chunk-EYBBW4ID.js";import"./chunk-IGECPMHY.js";import"./chunk-L2WWHQPN.js";import"./chunk-PY26LA4W.js";import"./chunk-FKB7BVQE.js";import"./chunk-7CGTOI24.js";export{a as createSourceDataForm,b as default};
@@ -1 +1 @@
1
- import{O as l,U as a,nc as s,oc as r,va as o}from"./chunk-NGPWOMCW.js";var n=class i{platformId=a(o);STORAGE_VERSION="v1";APP_NAME="duplicati";getItemParsed(t,e=!1){return r(this.platformId)?null:JSON.parse(localStorage.getItem(`${this.STORAGE_VERSION}:${e?"presist-duplicati":this.APP_NAME}:${t}`)??"null")}setItemParsed(t,e,m=!1){if(!r(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${m?"presist-duplicati":this.APP_NAME}:${t}`,JSON.stringify(e))}get length(){return s(this.platformId)?localStorage.length:0}getItem(t){return r(this.platformId)?null:localStorage.getItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${t}`)??null}setItem(t,e){if(!r(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${t}`,e)}removeItem(t){r(this.platformId)||localStorage.removeItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${t}`)}clearAllNotCurrentVersion(){if(!r(this.platformId))for(var t in localStorage)t.startsWith(this.STORAGE_VERSION)||localStorage.removeItem(t)}clearAll(){r(this.platformId)||localStorage.clear()}clear(){if(!r(this.platformId))for(var t in localStorage)t.includes(this.APP_NAME)&&!t.includes(`presist-${this.APP_NAME}`)&&localStorage.removeItem(t)}key(t){return r(this.platformId)?null:localStorage.key(t)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=l({token:i,factory:i.\u0275fac})};export{n as a};
1
+ import{O as l,U as a,rc as s,sc as r,va as o}from"./chunk-FKB7BVQE.js";var n=class i{platformId=a(o);STORAGE_VERSION="v1";APP_NAME="duplicati";getItemParsed(t,e=!1){return r(this.platformId)?null:JSON.parse(localStorage.getItem(`${this.STORAGE_VERSION}:${e?"presist-duplicati":this.APP_NAME}:${t}`)??"null")}setItemParsed(t,e,m=!1){if(!r(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${m?"presist-duplicati":this.APP_NAME}:${t}`,JSON.stringify(e))}get length(){return s(this.platformId)?localStorage.length:0}getItem(t){return r(this.platformId)?null:localStorage.getItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${t}`)??null}setItem(t,e){if(!r(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${t}`,e)}removeItem(t){r(this.platformId)||localStorage.removeItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${t}`)}clearAllNotCurrentVersion(){if(!r(this.platformId))for(var t in localStorage)t.startsWith(this.STORAGE_VERSION)||localStorage.removeItem(t)}clearAll(){r(this.platformId)||localStorage.clear()}clear(){if(!r(this.platformId))for(var t in localStorage)t.includes(this.APP_NAME)&&!t.includes(`presist-${this.APP_NAME}`)&&localStorage.removeItem(t)}key(t){return r(this.platformId)?null:localStorage.key(t)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=l({token:i,factory:i.\u0275fac})};export{n as a};
@@ -0,0 +1 @@
1
+ import{b as l}from"./chunk-BX543SH4.js";import{a}from"./chunk-PY26LA4W.js";import{D as i,O as r,Ra as s,U as n,cc as f}from"./chunk-FKB7BVQE.js";var m=class e{#e=n(a);isLoaded=s(!1);systemInfo=s(null);backendModules=f(()=>this.systemInfo()?.BackendModules??[]);sysInfoSignal=l(this.sysInfoObservable());preloadSystemInfo(o=!1){!o&&this.systemInfo()||this.sysInfoObservable().pipe(i(()=>this.isLoaded.set(!0))).subscribe({next:t=>{this.systemInfo.set(t)}})}sysInfoObservable(){return this.#e.getApiV1Systeminfo()}static \u0275fac=function(t){return new(t||e)};static \u0275prov=r({token:e,factory:e.\u0275fac,providedIn:"root"})};export{m as a};
@@ -0,0 +1 @@
1
+ import{a,b,c}from"./chunk-5FBRBL44.js";import"./chunk-RNBIMN7E.js";import"./chunk-AN53EBZI.js";import"./chunk-DNHLTHLR.js";import"./chunk-BX543SH4.js";import"./chunk-DE7MHNNM.js";import"./chunk-GSP4D4JM.js";import"./chunk-EYBBW4ID.js";import"./chunk-IGECPMHY.js";import"./chunk-L2WWHQPN.js";import"./chunk-PY26LA4W.js";import"./chunk-FKB7BVQE.js";import"./chunk-7CGTOI24.js";export{a as createDestinationForm,b as createDestinationFormGroup,c as default};
@@ -1 +1 @@
1
- import{$b as h,M as a,Ra as b,U as d,Zb as g,_b as y,ca as l,i as f,ja as v,ka as c}from"./chunk-NGPWOMCW.js";function p(s,e){!e?.injector&&l(p);let n=e?.injector??d(v),o=new f(1),i=h(()=>{let t;try{t=s()}catch(u){y(()=>o.error(u));return}y(()=>o.next(t))},{injector:n,manualCleanup:!0});return n.get(c).onDestroy(()=>{i.destroy(),o.complete()}),o.asObservable()}function m(s,e){let n=!e?.manualCleanup;n&&!e?.injector&&l(m);let o=n?e?.injector?.get(c)??d(c):null,i=w(e?.equal),t;e?.requireSync?t=b({kind:0},{equal:i}):t=b({kind:1,value:e?.initialValue},{equal:i});let u=s.subscribe({next:r=>t.set({kind:1,value:r}),error:r=>{if(e?.rejectErrors)throw r;t.set({kind:2,error:r})}});if(e?.requireSync&&t().kind===0)throw new a(601,!1);return o?.onDestroy(u.unsubscribe.bind(u)),g(()=>{let r=t();switch(r.kind){case 1:return r.value;case 2:throw r.error;case 0:throw new a(601,!1)}},{equal:e?.equal})}function w(s=Object.is){return(e,n)=>e.kind===1&&n.kind===1&&s(e.value,n.value)}export{p as a,m as b};
1
+ import{M as a,Ra as b,U as d,ca as l,cc as g,dc as y,ec as h,i as f,ja as v,ka as c}from"./chunk-FKB7BVQE.js";function p(s,e){!e?.injector&&l(p);let n=e?.injector??d(v),o=new f(1),i=h(()=>{let t;try{t=s()}catch(u){y(()=>o.error(u));return}y(()=>o.next(t))},{injector:n,manualCleanup:!0});return n.get(c).onDestroy(()=>{i.destroy(),o.complete()}),o.asObservable()}function m(s,e){let n=!e?.manualCleanup;n&&!e?.injector&&l(m);let o=n?e?.injector?.get(c)??d(c):null,i=w(e?.equal),t;e?.requireSync?t=b({kind:0},{equal:i}):t=b({kind:1,value:e?.initialValue},{equal:i});let u=s.subscribe({next:r=>t.set({kind:1,value:r}),error:r=>{if(e?.rejectErrors)throw r;t.set({kind:2,error:r})}});if(e?.requireSync&&t().kind===0)throw new a(601,!1);return o?.onDestroy(u.unsubscribe.bind(u)),g(()=>{let r=t();switch(r.kind){case 1:return r.value;case 2:throw r.error;case 0:throw new a(601,!1)}},{equal:e?.equal})}function w(s=Object.is){return(e,n)=>e.kind===1&&n.kind===1&&s(e.value,n.value)}export{p as a,m as b};
@@ -1 +1 @@
1
- import{a as be}from"./chunk-Q3B3QVNE.js";import{a as L,b as Ce}from"./chunk-MYQPVSUP.js";import{b as q}from"./chunk-6PJU5W5X.js";import{a as me,b as V,d as E,e as T,f as P,g as ce,h as ue,i as R,l as N,m as de,n as fe,o as I,q as B}from"./chunk-ER25OIRY.js";import{a as D,e as M,l as ge,m as he,o as Fe,r as Se}from"./chunk-3SP3MQEU.js";import{a as w,c as C}from"./chunk-4OR2MBXM.js";import{a as O}from"./chunk-ZUVMWAQY.js";import{A as Y,Bb as r,D as j,Eb as re,Gb as se,Hb as x,I as Z,J as ee,La as u,Mb as le,O as te,Ob as ae,Ra as d,U as p,W as k,Ya as $,Zb as pe,_a as c,c as K,db as J,ea as f,eb as ie,fa as g,fb as oe,gb as ne,hb as i,ib as n,jb as m,kb as h,kc as _,l as Q,lb as F,nb as y,ob as S,p as U,pb as W,v as X}from"./chunk-NGPWOMCW.js";function we(l,t){l&1&&m(0,"spk-progress-bar",3)}function Oe(l,t){if(l&1&&(i(0,"option",10),r(1),le(2,"date"),n()),l&2){let e=t.$implicit;c("value",e.Version),u(),re("",e.Version,": ",ae(2,3,e.Time,"d MMM y, h:mm"),"")}}function Ve(l,t){if(l&1&&(i(0,"app-file-tree",11)(1,"label",12),r(2,"Path"),n(),m(3,"input",13),n()),l&2){let e=W(2);c("rootPath",e.rootPath())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)}}function Ee(l,t){if(l&1&&(i(0,"spk-select",7),m(1,"input",8),h(2,9),oe(3,Oe,3,6,"option",10,ie),F(),n(),$(5,Ve,4,4,"app-file-tree",11)),l&2){let e=W();c("displayFn",e.displayFn()),u(3),ne(e.versionOptions()),u(2),J(e.rootPathLoaded()?5:-1)}}var A=new I,ke=()=>A.group({filesToRestore:A.control(""),selectedOption:A.control(null),passphrase:A.control(null)}),z=class l{#t=p(O);#e=p(b);#i=p(C);#o=p(w);#n=p(_);selectFilesForm=this.#e.selectFilesForm;selectFilesFormSignal=this.#e.selectFilesFormSignal;backupId=this.#e.backupId;versionOptionsLoading=this.#e.versionOptionsLoading;versionOptions=this.#e.versionOptions;backupSettings=pe(()=>{let t=this.backupId(),e=this.selectFilesFormSignal()?.selectedOption;if(typeof e!="number"||!t)return null;let s=this.versionOptions()?.find(a=>a.Version===e)?.Time??null;return s?{id:t,time:s}:null});rootPathLoaded=d(!1);rootPath=be([this.selectFilesFormSignal,this.backupId],K(Z([null,null]),ee(([t,e])=>{let o=t?.selectedOption,s=e;if(typeof o!="number"||!s)return Q("/");let a=this.versionOptions()?.find(G=>G.Version===o);return this.#t.getApiV1BackupByIdFiles({id:s,time:a?.Time??"",prefixOnly:!1,folderContents:!0}).pipe(U(G=>(this.rootPathLoaded.set(!0),G.Files[0].Path)))})));displayFn(){let t=this.versionOptions();return e=>{if(!e)return"";let o=t?.find(s=>s.Version?.toString()===e);return o?`${o.Version}: ${this.#n.transform(o.Time,"d MMM y, h:mm")}`:""}}next(){this.#i.navigate(["options"],{relativeTo:this.#o.parent})}exit(){this.#e.exit()}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=k({type:l,selectors:[["app-select-files"]],standalone:!0,features:[se([_]),x],decls:15,vars:2,consts:[["formRef",""],[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"displayFn"],["type","number","placeholder","Select an option...","formControlName","selectedOption"],["options",""],[3,"value"],[3,"rootPath","backupSettings","multiSelect","showFiles"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]],template:function(e,o){if(e&1){let s=y();i(0,"form",1,0),S("submit",function(){return f(s),g(o.next())}),i(2,"h3",2),r(3,"Select files"),n(),$(4,we,1,0,"spk-progress-bar",3)(5,Ee,6,2),i(6,"div",4)(7,"button",5),S("click",function(){return f(s),g(o.exit())}),i(8,"spk-icon"),r(9,"arrow-left"),n(),r(10," Exit "),n(),i(11,"button",6)(12,"spk-icon"),r(13,"arrow-right"),n(),r(14," Continue "),n()()()}e&2&&(c("formGroup",o.selectFilesForm),u(4),J(o.versionOptionsLoading()?4:5))},dependencies:[B,P,de,fe,V,ce,E,T,R,N,_,L,M,D,Fe,ge],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var b=class l{#t=p(C);#e=p(O);backupId=d(null);backup=d(null);selectFilesForm=ke();optionsForm=ye();optionsFormSignal=q(this.optionsForm.valueChanges);selectFilesFormSignal=q(this.selectFilesForm.valueChanges);versionOptionsLoading=d(!1);versionOptions=d([]);isSubmitting=d(!1);init(t){this.backupId.set(t),this.#i(t,!0)}submit(){this.isSubmitting.set(!0);let t=this.backupId(),e=this.optionsForm.value,o=this.selectFilesForm.value,s=this.versionOptions()?.find(a=>a.Version===o.selectedOption);this.#e.postApiV1BackupByIdRestore({id:t??"",requestBody:{paths:o.filesToRestore?.split("\0").map(a=>`${a}*`)??[],passphrase:o.passphrase??null,time:s?.Time,restore_path:e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!0}}).pipe(j(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.exit()},error:a=>{console.error("restore error",a)}})}exit(){this.#o(),this.#t.navigate(["/"])}getVersionOptions(){this.versionOptions()}#i(t,e=!1){this.versionOptionsLoading.set(!0),X([this.#e.getApiV1BackupById({id:t}),this.#e.getApiV1BackupByIdFilesets({id:t})]).pipe(Y(1),j(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([o,s])=>{this.versionOptions.set(s),this.backup.set(o),e&&this.selectFilesForm.controls.selectedOption.setValue(s[0].Version)}})}#o(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||l)};static \u0275prov=te({token:l,factory:l.\u0275fac,providedIn:"root"})};var v=new I,ye=()=>v.group({restoreFrom:v.control("orignal"),restoreFromPath:v.control(""),handleExisting:v.control("overwrite"),permissions:v.control(!1)}),H=class l{#t=p(b);#e=p(C);#i=p(w);optionsForm=this.#t.optionsForm;optionsFormSignal=this.#t.optionsFormSignal;goBack(){this.#e.navigate(["select-files"],{relativeTo:this.#i.parent})}submit(){this.#t.submit()}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=k({type:l,selectors:[["app-options"]],standalone:!0,features:[x],decls:41,vars:4,consts:[["formRef",""],[3,"submit","formGroup"],[1,"title-30"],[3,"disallowToggle"],["title",""],[1,"raised","primary"],["type","radio","name","restoreFrom","value","orignal","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","permissions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]],template:function(e,o){if(e&1){let s=y();i(0,"form",1,0),S("submit",function(){return f(s),g(o.submit())}),i(2,"h3",2),r(3,"Restore options"),n(),i(4,"app-toggle-card",3),h(5,4),r(6,"Where do you want to restore files from?"),F(),i(7,"spk-radio",5),r(8," Original location "),m(9,"input",6),n(),i(10,"spk-radio",5),r(11," Pick location "),m(12,"input",7),n(),i(13,"app-file-tree",8)(14,"label",9),r(15,"Path"),n(),m(16,"input",10),n()(),i(17,"app-toggle-card",3),h(18,4),r(19,"How do you want to handle existing files?"),F(),i(20,"spk-radio",5),r(21," Overwrite "),m(22,"input",11),n(),i(23,"spk-radio",5),r(24," Save different versions with timestamp in file name "),m(25,"input",12),n()(),i(26,"app-toggle-card"),h(27,4),r(28,"Permissions"),F(),i(29,"spk-toggle",13),r(30," Restore read/write permissions "),m(31,"input",14),n()(),i(32,"div",15)(33,"button",16),S("click",function(){return f(s),g(o.goBack())}),i(34,"spk-icon"),r(35,"arrow-left"),n(),r(36," Go back "),n(),i(37,"button",17)(38,"spk-icon"),r(39,"arrow-right"),n(),r(40," Submit "),n()()()}if(e&2){let s;c("formGroup",o.optionsForm),u(4),c("disallowToggle",!0),u(9),c("disabled",((s=o.optionsFormSignal())==null?null:s.restoreFrom)!=="pickLocation"),u(4),c("disallowToggle",!0)}},dependencies:[B,P,V,me,ue,E,T,R,N,Ce,L,Se,he,M,D],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};export{ye as a,H as b,ke as c,z as d,b as e};
1
+ import{a as be}from"./chunk-SHLX3F4G.js";import{a as L,b as Ce}from"./chunk-RNBIMN7E.js";import{b as q}from"./chunk-BX543SH4.js";import{a as me,b as V,d as E,e as T,f as P,g as ce,h as ue,i as R,l as N,m as de,n as fe,o as I,q as B}from"./chunk-DE7MHNNM.js";import{a as D,e as M,l as ge,m as he,o as Fe,r as Se}from"./chunk-EYBBW4ID.js";import{a as w,c as C}from"./chunk-IGECPMHY.js";import{a as O}from"./chunk-PY26LA4W.js";import{$a as c,A as Y,D as j,Db as r,Gb as re,I as Z,J as ee,La as u,Lb as se,Mb as x,O as te,Ra as d,Rb as le,Tb as ae,U as p,W as k,Za as $,c as K,cc as pe,ea as f,eb as J,fa as g,fb as ie,gb as oe,hb as ne,ib as i,jb as n,kb as m,l as Q,lb as h,mb as F,ob as y,oc as _,p as U,pb as S,qb as W,v as X}from"./chunk-FKB7BVQE.js";function we(l,t){l&1&&m(0,"spk-progress-bar",3)}function Oe(l,t){if(l&1&&(i(0,"option",10),r(1),le(2,"date"),n()),l&2){let e=t.$implicit;c("value",e.Version),u(),re("",e.Version,": ",ae(2,3,e.Time,"d MMM y, h:mm"),"")}}function Ve(l,t){if(l&1&&(i(0,"app-file-tree",11)(1,"label",12),r(2,"Path"),n(),m(3,"input",13),n()),l&2){let e=W(2);c("rootPath",e.rootPath())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)}}function Ee(l,t){if(l&1&&(i(0,"spk-select",7),m(1,"input",8),h(2,9),oe(3,Oe,3,6,"option",10,ie),F(),n(),$(5,Ve,4,4,"app-file-tree",11)),l&2){let e=W();c("displayFn",e.displayFn()),u(3),ne(e.versionOptions()),u(2),J(e.rootPathLoaded()?5:-1)}}var A=new I,ke=()=>A.group({filesToRestore:A.control(""),selectedOption:A.control(null),passphrase:A.control(null)}),z=class l{#t=p(O);#e=p(b);#i=p(C);#o=p(w);#n=p(_);selectFilesForm=this.#e.selectFilesForm;selectFilesFormSignal=this.#e.selectFilesFormSignal;backupId=this.#e.backupId;versionOptionsLoading=this.#e.versionOptionsLoading;versionOptions=this.#e.versionOptions;backupSettings=pe(()=>{let t=this.backupId(),e=this.selectFilesFormSignal()?.selectedOption;if(typeof e!="number"||!t)return null;let s=this.versionOptions()?.find(a=>a.Version===e)?.Time??null;return s?{id:t,time:s}:null});rootPathLoaded=d(!1);rootPath=be([this.selectFilesFormSignal,this.backupId],K(Z([null,null]),ee(([t,e])=>{let o=t?.selectedOption,s=e;if(typeof o!="number"||!s)return Q("/");let a=this.versionOptions()?.find(G=>G.Version===o);return this.#t.getApiV1BackupByIdFiles({id:s,time:a?.Time??"",prefixOnly:!1,folderContents:!0}).pipe(U(G=>(this.rootPathLoaded.set(!0),G.Files[0].Path)))})));displayFn(){let t=this.versionOptions();return e=>{if(!e)return"";let o=t?.find(s=>s.Version?.toString()===e);return o?`${o.Version}: ${this.#n.transform(o.Time,"d MMM y, h:mm")}`:""}}next(){this.#i.navigate(["options"],{relativeTo:this.#o.parent})}exit(){this.#e.exit()}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=k({type:l,selectors:[["app-select-files"]],standalone:!0,features:[se([_]),x],decls:15,vars:2,consts:[["formRef",""],[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"displayFn"],["type","number","placeholder","Select an option...","formControlName","selectedOption"],["options",""],[3,"value"],[3,"rootPath","backupSettings","multiSelect","showFiles"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]],template:function(e,o){if(e&1){let s=y();i(0,"form",1,0),S("submit",function(){return f(s),g(o.next())}),i(2,"h3",2),r(3,"Select files"),n(),$(4,we,1,0,"spk-progress-bar",3)(5,Ee,6,2),i(6,"div",4)(7,"button",5),S("click",function(){return f(s),g(o.exit())}),i(8,"spk-icon"),r(9,"arrow-left"),n(),r(10," Exit "),n(),i(11,"button",6)(12,"spk-icon"),r(13,"arrow-right"),n(),r(14," Continue "),n()()()}e&2&&(c("formGroup",o.selectFilesForm),u(4),J(o.versionOptionsLoading()?4:5))},dependencies:[B,P,de,fe,V,ce,E,T,R,N,_,L,M,D,Fe,ge],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var b=class l{#t=p(C);#e=p(O);backupId=d(null);backup=d(null);selectFilesForm=ke();optionsForm=ye();optionsFormSignal=q(this.optionsForm.valueChanges);selectFilesFormSignal=q(this.selectFilesForm.valueChanges);versionOptionsLoading=d(!1);versionOptions=d([]);isSubmitting=d(!1);init(t){this.backupId.set(t),this.#i(t,!0)}submit(){this.isSubmitting.set(!0);let t=this.backupId(),e=this.optionsForm.value,o=this.selectFilesForm.value,s=this.versionOptions()?.find(a=>a.Version===o.selectedOption);this.#e.postApiV1BackupByIdRestore({id:t??"",requestBody:{paths:o.filesToRestore?.split("\0").map(a=>`${a}*`)??[],passphrase:o.passphrase??null,time:s?.Time,restore_path:e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!0}}).pipe(j(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.exit()},error:a=>{console.error("restore error",a)}})}exit(){this.#o(),this.#t.navigate(["/"])}getVersionOptions(){this.versionOptions()}#i(t,e=!1){this.versionOptionsLoading.set(!0),X([this.#e.getApiV1BackupById({id:t}),this.#e.getApiV1BackupByIdFilesets({id:t})]).pipe(Y(1),j(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([o,s])=>{this.versionOptions.set(s),this.backup.set(o),e&&this.selectFilesForm.controls.selectedOption.setValue(s[0].Version)}})}#o(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||l)};static \u0275prov=te({token:l,factory:l.\u0275fac,providedIn:"root"})};var v=new I,ye=()=>v.group({restoreFrom:v.control("orignal"),restoreFromPath:v.control(""),handleExisting:v.control("overwrite"),permissions:v.control(!1)}),H=class l{#t=p(b);#e=p(C);#i=p(w);optionsForm=this.#t.optionsForm;optionsFormSignal=this.#t.optionsFormSignal;goBack(){this.#e.navigate(["select-files"],{relativeTo:this.#i.parent})}submit(){this.#t.submit()}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=k({type:l,selectors:[["app-options"]],standalone:!0,features:[x],decls:41,vars:4,consts:[["formRef",""],[3,"submit","formGroup"],[1,"title-30"],[3,"disallowToggle"],["title",""],[1,"raised","primary"],["type","radio","name","restoreFrom","value","orignal","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","permissions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]],template:function(e,o){if(e&1){let s=y();i(0,"form",1,0),S("submit",function(){return f(s),g(o.submit())}),i(2,"h3",2),r(3,"Restore options"),n(),i(4,"app-toggle-card",3),h(5,4),r(6,"Where do you want to restore files from?"),F(),i(7,"spk-radio",5),r(8," Original location "),m(9,"input",6),n(),i(10,"spk-radio",5),r(11," Pick location "),m(12,"input",7),n(),i(13,"app-file-tree",8)(14,"label",9),r(15,"Path"),n(),m(16,"input",10),n()(),i(17,"app-toggle-card",3),h(18,4),r(19,"How do you want to handle existing files?"),F(),i(20,"spk-radio",5),r(21," Overwrite "),m(22,"input",11),n(),i(23,"spk-radio",5),r(24," Save different versions with timestamp in file name "),m(25,"input",12),n()(),i(26,"app-toggle-card"),h(27,4),r(28,"Permissions"),F(),i(29,"spk-toggle",13),r(30," Restore read/write permissions "),m(31,"input",14),n()(),i(32,"div",15)(33,"button",16),S("click",function(){return f(s),g(o.goBack())}),i(34,"spk-icon"),r(35,"arrow-left"),n(),r(36," Go back "),n(),i(37,"button",17)(38,"spk-icon"),r(39,"arrow-right"),n(),r(40," Submit "),n()()()}if(e&2){let s;c("formGroup",o.optionsForm),u(4),c("disallowToggle",!0),u(9),c("disabled",((s=o.optionsFormSignal())==null?null:s.restoreFrom)!=="pickLocation"),u(4),c("disallowToggle",!0)}},dependencies:[B,P,V,me,ue,E,T,R,N,Ce,L,Se,he,M,D],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};export{ye as a,H as b,ke as c,z as d,b as e};
@@ -0,0 +1 @@
1
+ import{a as I,b as E,d as B,e as M,f as w,i as A,l as N,o as P,q as T}from"./chunk-DE7MHNNM.js";import{a as q}from"./chunk-GSP4D4JM.js";import{a as L,c as R,e as V,i as j,r as G,s as O}from"./chunk-EYBBW4ID.js";import{c as v,d as D}from"./chunk-IGECPMHY.js";import"./chunk-L2WWHQPN.js";import{a as x}from"./chunk-PY26LA4W.js";import{$a as g,D as h,Db as n,La as m,Mb as _,Nb as F,Ra as f,U as s,W as S,Za as b,bb as C,eb as y,ib as i,jb as e,kb as d,pb as u}from"./chunk-FKB7BVQE.js";import"./chunk-7CGTOI24.js";var z=()=>["/"];function H(c,t){c&1&&(i(0,"spk-form-field")(1,"label",13),n(2,"Passphrase"),e(),d(3,"input",14),e())}var p=new P,k=class c{#e=s(R);#t=s(x);#o=s(q);#r=s(v);isImporting=f(!1);isSecureFile=f(!1);importForm=p.group({config:p.control(""),cmdline:p.control(!1),importMetadata:p.control(!1),direct:p.control(!1),passphrase:p.control("")});selectedFile=f(null);onFileDropped(t){let r=t.target?.files?.item(0);if(r){let a=new FileReader;this.isSecureFile.set(r.type!=="application/json"),a.onload=this.#i.bind(this),a.readAsArrayBuffer(r)}}#i(t){let o=t.target?.result;this.importForm.patchValue({config:this.#n(o)})}#n(t){let o=new Uint8Array(t),r=o.byteLength,a="";for(let l=0;l<r;l++)a+=String.fromCharCode(o[l]);return btoa(a)}submit(){this.isImporting.set(!0),this.#t.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(h(()=>this.isImporting.set(!1))).subscribe({next:t=>{let o=this.#o.addDraftBackup(t.data);this.#r.navigate(["/backup-draft",o])},error:t=>{this.#e.error(t.message)}})}static \u0275fac=function(o){return new(o||c)};static \u0275cmp=S({type:c,selectors:[["app-import"]],standalone:!0,features:[_],decls:28,vars:6,consts:[[1,"actions"],["spk-button","",1,"outlined",3,"routerLink"],["spk-button","",1,"raised","primary",3,"click"],["autocomplete","off",3,"formGroup"],["spkDragDrop","",3,"fileDropped"],["for","file"],["type","file","accept",".json,.aes",3,"change"],["suffix",""],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","importMetadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","formControlName","passphrase"]],template:function(o,r){o&1&&(i(0,"header")(1,"h3"),n(2," Import backup configuration "),i(3,"div",0)(4,"button",1)(5,"spk-icon"),n(6,"arrow-left"),e(),n(7," Back "),e(),i(8,"button",2),u("click",function(){return r.submit()}),i(9,"spk-icon"),n(10,"download-simple"),e(),n(11," Import "),e()()()(),i(12,"form",3)(13,"spk-form-field",4),u("fileDropped",function(l){return r.onFileDropped(l)}),i(14,"label",5),n(15,"Select a configuration file"),e(),i(16,"input",6),u("change",function(l){return r.onFileDropped(l)}),e(),i(17,"spk-icon",7),n(18,"upload"),e()(),b(19,H,4,0,"spk-form-field"),i(20,"spk-toggle",8)(21,"label",9),n(22,"Import Metadata"),e(),d(23,"input",10),e(),i(24,"spk-toggle",8)(25,"label",11),n(26,"Save now"),e(),d(27,"input",12),e()()),o&2&&(m(4),g("routerLink",F(5,z)),m(4),C("loading",r.isImporting()),m(4),g("formGroup",r.importForm),m(7),y(r.isSecureFile()?19:-1))},dependencies:[T,w,E,I,B,M,A,N,D,O,j,L,V,G],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}"],changeDetection:0})};export{k as default};
@@ -0,0 +1 @@
1
+ import{a as d}from"./chunk-AN53EBZI.js";import"./chunk-BX543SH4.js";import"./chunk-PY26LA4W.js";import{Db as o,Eb as f,La as p,Mb as r,Rb as c,Sb as l,U as a,W as m,ib as t,jb as n,pc as y}from"./chunk-FKB7BVQE.js";import"./chunk-7CGTOI24.js";var s=class i{#e=a(d);systemInfo=this.#e.systemInfo;static \u0275fac=function(e){return new(e||i)};static \u0275cmp=m({type:i,selectors:[["app-system-info"]],standalone:!0,features:[r],decls:5,vars:3,template:function(e,S){e&1&&(t(0,"h3"),o(1,"System info"),n(),t(2,"pre"),o(3),c(4,"json"),n()),e&2&&(p(3),f(l(4,1,S.systemInfo())))},dependencies:[y],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}"],changeDetection:0})};export{s as default};
@@ -1 +1 @@
1
- import{Gb as p,M as j,Ma as o,N as f,O as ie,Oa as A,P as B,R as C,Ra as N,Rb as Ve,U as ye,Ua as u,X as U,Y as l,Zb as O,_b as m,ab as re,bc as se,da as ne,g as ge,ha as V,ja as Ce,k as me,ma as S,ob as g,p as _e,ra as b,v as ve}from"./chunk-NGPWOMCW.js";import{a as c,b as h}from"./chunk-7CGTOI24.js";var Oe=(()=>{class i{constructor(e,n){this._renderer=e,this._elementRef=n,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,n){this._renderer.setProperty(this._elementRef.nativeElement,e,n)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static{this.\u0275fac=function(n){return new(n||i)(o(A),o(b))}}static{this.\u0275dir=l({type:i})}}return i})(),I=(()=>{class i extends Oe{static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=V(i)))(r||i)}})()}static{this.\u0275dir=l({type:i,features:[u]})}}return i})(),D=new C(""),st={provide:D,useExisting:f(()=>ot),multi:!0},ot=(()=>{class i extends I{writeValue(e){this.setProperty("checked",e)}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=V(i)))(r||i)}})()}static{this.\u0275dir=l({type:i,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(n,r){n&1&&g("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()})},features:[p([st]),u]})}}return i})(),at={provide:D,useExisting:f(()=>xe),multi:!0};function lt(){let i=se()?se().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var ut=new C(""),xe=(()=>{class i extends Oe{constructor(e,n,r){super(e,n),this._compositionMode=r,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!lt())}writeValue(e){let n=e??"";this.setProperty("value",n)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static{this.\u0275fac=function(n){return new(n||i)(o(A),o(b),o(ut,8))}}static{this.\u0275dir=l({type:i,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(n,r){n&1&&g("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)})},features:[p([at]),u]})}}return i})();function _(i){return i==null||(typeof i=="string"||Array.isArray(i))&&i.length===0}function Pe(i){return i!=null&&typeof i.length=="number"}var K=new C(""),J=new C(""),ct=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,De=class{static min(t){return dt(t)}static max(t){return ht(t)}static required(t){return ft(t)}static requiredTrue(t){return pt(t)}static email(t){return gt(t)}static minLength(t){return mt(t)}static maxLength(t){return _t(t)}static pattern(t){return vt(t)}static nullValidator(t){return ke(t)}static compose(t){return Ue(t)}static composeAsync(t){return Le(t)}};function dt(i){return t=>{if(_(t.value)||_(i))return null;let e=parseFloat(t.value);return!isNaN(e)&&e<i?{min:{min:i,actual:t.value}}:null}}function ht(i){return t=>{if(_(t.value)||_(i))return null;let e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function ft(i){return _(i.value)?{required:!0}:null}function pt(i){return i.value===!0?null:{required:!0}}function gt(i){return _(i.value)||ct.test(i.value)?null:{email:!0}}function mt(i){return t=>_(t.value)||!Pe(t.value)?null:t.value.length<i?{minlength:{requiredLength:i,actualLength:t.value.length}}:null}function _t(i){return t=>Pe(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function vt(i){if(!i)return ke;let t,e;return typeof i=="string"?(e="",i.charAt(0)!=="^"&&(e+="^"),e+=i,i.charAt(i.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=i.toString(),t=i),n=>{if(_(n.value))return null;let r=n.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function ke(i){return null}function Ge(i){return i!=null}function Re(i){return Ve(i)?me(i):i}function Te(i){let t={};return i.forEach(e=>{t=e!=null?c(c({},t),e):t}),Object.keys(t).length===0?null:t}function je(i,t){return t.map(e=>e(i))}function yt(i){return!i.validate}function Be(i){return i.map(t=>yt(t)?t:e=>t.validate(e))}function Ue(i){if(!i)return null;let t=i.filter(Ge);return t.length==0?null:function(e){return Te(je(e,t))}}function He(i){return i!=null?Ue(Be(i)):null}function Le(i){if(!i)return null;let t=i.filter(Ge);return t.length==0?null:function(e){let n=je(e,t).map(Re);return ve(n).pipe(_e(Te))}}function $e(i){return i!=null?Le(Be(i)):null}function be(i,t){return i===null?[t]:Array.isArray(i)?[...i,t]:[i,t]}function We(i){return i._rawValidators}function qe(i){return i._rawAsyncValidators}function oe(i){return i?Array.isArray(i)?i:[i]:[]}function $(i,t){return Array.isArray(i)?i.includes(t):i===t}function Ae(i,t){let e=oe(t);return oe(i).forEach(r=>{$(e,r)||e.push(r)}),e}function Me(i,t){return oe(t).filter(e=>!$(i,e))}var W=class{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=He(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=$e(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},d=class extends W{get formDirective(){return null}get path(){return null}},F=class extends W{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},q=class{constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},Ct={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},mi=h(c({},Ct),{"[class.ng-submitted]":"isSubmitted"}),_i=(()=>{class i extends q{constructor(e){super(e)}static{this.\u0275fac=function(n){return new(n||i)(o(F,2))}}static{this.\u0275dir=l({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,r){n&2&&re("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},features:[u]})}}return i})(),vi=(()=>{class i extends q{constructor(e){super(e)}static{this.\u0275fac=function(n){return new(n||i)(o(d,10))}}static{this.\u0275dir=l({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(n,r){n&2&&re("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},features:[u]})}}return i})();var x="VALID",H="INVALID",M="PENDING",P="DISABLED",v=class{},z=class extends v{constructor(t,e){super(),this.value=t,this.source=e}},k=class extends v{constructor(t,e){super(),this.pristine=t,this.source=e}},G=class extends v{constructor(t,e){super(),this.touched=t,this.source=e}},E=class extends v{constructor(t,e){super(),this.status=t,this.source=e}},ae=class extends v{constructor(t){super(),this.source=t}},le=class extends v{constructor(t){super(),this.source=t}};function de(i){return(Q(i)?i.validators:i)||null}function Vt(i){return Array.isArray(i)?He(i):i||null}function he(i,t){return(Q(t)?t.asyncValidators:i)||null}function Dt(i){return Array.isArray(i)?$e(i):i||null}function Q(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}function ze(i,t,e){let n=i.controls;if(!(t?Object.keys(n):n).length)throw new j(1e3,"");if(!n[e])throw new j(1001,"")}function Ze(i,t,e){i._forEachChild((n,r)=>{if(e[r]===void 0)throw new j(1002,"")})}var w=class{constructor(t,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=null,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this._status=O(()=>this.statusReactive()),this.statusReactive=N(void 0),this._pristine=O(()=>this.pristineReactive()),this.pristineReactive=N(!0),this._touched=O(()=>this.touchedReactive()),this.touchedReactive=N(!1),this._events=new ge,this.events=this._events.asObservable(),this._onDisabledChange=[],this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return m(this.statusReactive)}set status(t){m(()=>this.statusReactive.set(t))}get valid(){return this.status===x}get invalid(){return this.status===H}get pending(){return this.status==M}get disabled(){return this.status===P}get enabled(){return this.status!==P}get pristine(){return m(this.pristineReactive)}set pristine(t){m(()=>this.pristineReactive.set(t))}get dirty(){return!this.pristine}get touched(){return m(this.touchedReactive)}set touched(t){m(()=>this.touchedReactive.set(t))}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(Ae(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Ae(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Me(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Me(t,this._rawAsyncValidators))}hasValidator(t){return $(this._rawValidators,t)}hasAsyncValidator(t){return $(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let e=this.touched===!1;this.touched=!0;let n=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched(h(c({},t),{sourceControl:n})),e&&t.emitEvent!==!1&&this._events.next(new G(!0,n))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t))}markAsUntouched(t={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:n})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,n),e&&t.emitEvent!==!1&&this._events.next(new G(!1,n))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let n=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty(h(c({},t),{sourceControl:n})),e&&t.emitEvent!==!1&&this._events.next(new k(!1,n))}markAsPristine(t={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,n),e&&t.emitEvent!==!1&&this._events.next(new k(!0,n))}markAsPending(t={}){this.status=M;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new E(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(h(c({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=P,this.errors=null,this._forEachChild(r=>{r.disable(h(c({},t),{onlySelf:!0}))}),this._updateValue();let n=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new z(this.value,n)),this._events.next(new E(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(h(c({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=x,this._forEachChild(n=>{n.enable(h(c({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(h(c({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(t,e){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===x||this.status===M)&&this._runAsyncValidator(n,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new z(this.value,e)),this._events.next(new E(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(h(c({},t),{sourceControl:e}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?P:x}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=M,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1};let n=Re(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((n,r)=>n&&n._find(r),this)}getError(t,e){let n=e?this.get(e):this;return n&&n.errors?n.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,n){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||n)&&this._events.next(new E(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,n)}_initObservables(){this.valueChanges=new S,this.statusChanges=new S}_calculateStatus(){return this._allControlsDisabled()?P:this.errors?H:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(M)?M:this._anyControlsHaveStatus(H)?H:x}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let n=!this._anyControlsDirty(),r=this.pristine!==n;this.pristine=n,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,e),r&&this._events.next(new k(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new G(this.touched,e)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,e)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){Q(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let e=this._parent&&this._parent.dirty;return!t&&!!e&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=Vt(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=Dt(this._rawAsyncValidators)}},Z=class extends w{constructor(t,e,n){super(de(e),he(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,n={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,n={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){Ze(this,!0,t),Object.keys(t).forEach(n=>{ze(this,!0,n),this.controls[n].setValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(n=>{let r=this.controls[n];r&&r.patchValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((n,r)=>{n.reset(t?t[r]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,n)=>(t[n]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,n)=>n._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let n=this.controls[e];n&&t(n,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,n]of Object.entries(this.controls))if(this.contains(e)&&t(n))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,n,r)=>((n.enabled||this.disabled)&&(e[r]=n.value),e))}_reduceChildren(t,e){let n=t;return this._forEachChild((r,s)=>{n=e(n,r,s)}),n}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var ue=class extends Z{};var ee=new C("CallSetDisabledState",{providedIn:"root",factory:()=>R}),R="always";function fe(i,t){return[...t.path,i]}function Ee(i,t,e=R){pe(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(i.disabled),At(i,t),Et(i,t),Mt(i,t),bt(i,t)}function Fe(i,t,e=!0){let n=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n)),Y(i,t),i&&(t._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function X(i,t){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function bt(i,t){if(t.valueAccessor.setDisabledState){let e=n=>{t.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(e),t._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}function pe(i,t){let e=We(i);t.validator!==null?i.setValidators(be(e,t.validator)):typeof e=="function"&&i.setValidators([e]);let n=qe(i);t.asyncValidator!==null?i.setAsyncValidators(be(n,t.asyncValidator)):typeof n=="function"&&i.setAsyncValidators([n]);let r=()=>i.updateValueAndValidity();X(t._rawValidators,r),X(t._rawAsyncValidators,r)}function Y(i,t){let e=!1;if(i!==null){if(t.validator!==null){let r=We(i);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.validator);s.length!==r.length&&(e=!0,i.setValidators(s))}}if(t.asyncValidator!==null){let r=qe(i);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.asyncValidator);s.length!==r.length&&(e=!0,i.setAsyncValidators(s))}}}let n=()=>{};return X(t._rawValidators,n),X(t._rawAsyncValidators,n),e}function At(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&Xe(i,t)})}function Mt(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&Xe(i,t),i.updateOn!=="submit"&&i.markAsTouched()})}function Xe(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function Et(i,t){let e=(n,r)=>{t.valueAccessor.writeValue(n),r&&t.viewToModelUpdate(n)};i.registerOnChange(e),t._registerOnDestroy(()=>{i._unregisterOnChange(e)})}function Ft(i,t){i==null,pe(i,t)}function wt(i,t){return Y(i,t)}function It(i,t){if(!i.hasOwnProperty("model"))return!1;let e=i.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function St(i){return Object.getPrototypeOf(i.constructor)===I}function Nt(i,t){i._syncPendingControls(),t.forEach(e=>{let n=e.control;n.updateOn==="submit"&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function Ot(i,t){if(!t)return null;Array.isArray(t);let e,n,r;return t.forEach(s=>{s.constructor===xe?e=s:St(s)?n=s:r=s}),r||n||e||null}function xt(i,t){let e=i.indexOf(t);e>-1&&i.splice(e,1)}function we(i,t){let e=i.indexOf(t);e>-1&&i.splice(e,1)}function Ie(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var L=class extends w{constructor(t=null,e,n){super(de(e),he(n,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Q(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Ie(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(n=>n(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){we(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){we(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){Ie(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}};var Pt=i=>i instanceof L,kt=(()=>{class i extends d{ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return fe(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=V(i)))(r||i)}})()}static{this.\u0275dir=l({type:i,features:[u]})}}return i})();var Ci=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=l({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]})}}return i})(),Gt={provide:D,useExisting:f(()=>Rt),multi:!0},Rt=(()=>{class i extends I{writeValue(e){let n=e??"";this.setProperty("value",n)}registerOnChange(e){this.onChange=n=>{e(n==""?null:parseFloat(n))}}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=V(i)))(r||i)}})()}static{this.\u0275dir=l({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(n,r){n&1&&g("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},features:[p([Gt]),u]})}}return i})(),Tt={provide:D,useExisting:f(()=>Bt),multi:!0};var jt=(()=>{class i{constructor(){this._accessors=[]}add(e,n){this._accessors.push([e,n])}remove(e){for(let n=this._accessors.length-1;n>=0;--n)if(this._accessors[n][1]===e){this._accessors.splice(n,1);return}}select(e){this._accessors.forEach(n=>{this._isSameGroup(n,e)&&n[1]!==e&&n[1].fireUncheck(e.value)})}_isSameGroup(e,n){return e[0].control?e[0]._parent===n._control._parent&&e[1].name===n.name:!1}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=ie({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),Bt=(()=>{class i extends I{constructor(e,n,r,s){super(e,n),this._registry=r,this._injector=s,this.setDisabledStateFired=!1,this.onChange=()=>{},this.callSetDisabledState=ye(ee,{optional:!0})??R}ngOnInit(){this._control=this._injector.get(F),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||this.callSetDisabledState==="whenDisabledForLegacyCode")&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}static{this.\u0275fac=function(n){return new(n||i)(o(A),o(b),o(jt),o(Ce))}}static{this.\u0275dir=l({type:i,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(n,r){n&1&&g("change",function(){return r.onChange()})("blur",function(){return r.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[p([Tt]),u]})}}return i})();var Ye=new C("");var Ut={provide:d,useExisting:f(()=>Ke)},Ke=(()=>{class i extends d{get submitted(){return m(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}constructor(e,n,r){super(),this.callSetDisabledState=r,this._submitted=O(()=>this._submittedReactive()),this._submittedReactive=N(!1),this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new S,this._setValidators(e),this._setAsyncValidators(n)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Y(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let n=this.form.get(e.path);return Ee(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){Fe(e.control||null,e,!1),xt(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,n){this.form.get(e.path).setValue(n)}onSubmit(e){return this._submittedReactive.set(!0),Nt(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new ae(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this._submittedReactive.set(!1),this.form._events.next(new le(this.form))}_updateDomValue(){this.directives.forEach(e=>{let n=e.control,r=this.form.get(e.path);n!==r&&(Fe(n||null,e),Pt(r)&&(Ee(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let n=this.form.get(e.path);Ft(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let n=this.form.get(e.path);n&&wt(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){pe(this.form,this),this._oldForm&&Y(this._oldForm,this)}_checkFormPresent(){this.form}static{this.\u0275fac=function(n){return new(n||i)(o(K,10),o(J,10),o(ee,8))}}static{this.\u0275dir=l({type:i,selectors:[["","formGroup",""]],hostBindings:function(n,r){n&1&&g("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[p([Ut]),u,ne]})}}return i})(),Ht={provide:d,useExisting:f(()=>Je)},Je=(()=>{class i extends kt{constructor(e,n,r){super(),this.name=null,this._parent=e,this._setValidators(n),this._setAsyncValidators(r)}_checkParentType(){et(this._parent)}static{this.\u0275fac=function(n){return new(n||i)(o(d,13),o(K,10),o(J,10))}}static{this.\u0275dir=l({type:i,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},features:[p([Ht]),u]})}}return i})(),Lt={provide:d,useExisting:f(()=>Qe)},Qe=(()=>{class i extends d{constructor(e,n,r){super(),this.name=null,this._parent=e,this._setValidators(n),this._setAsyncValidators(r)}ngOnInit(){this._checkParentType(),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return fe(this.name==null?this.name:this.name.toString(),this._parent)}_checkParentType(){et(this._parent)}static{this.\u0275fac=function(n){return new(n||i)(o(d,13),o(K,10),o(J,10))}}static{this.\u0275dir=l({type:i,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},features:[p([Lt]),u]})}}return i})();function et(i){return!(i instanceof Je)&&!(i instanceof Ke)&&!(i instanceof Qe)}var $t={provide:F,useExisting:f(()=>Wt)},Wt=(()=>{class i extends F{set isDisabled(e){}static{this._ngModelWarningSentOnce=!1}constructor(e,n,r,s,a){super(),this._ngModelWarningConfig=a,this._added=!1,this.name=null,this.update=new S,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=Ot(this,s)}ngOnChanges(e){this._added||this._setUpControl(),It(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return fe(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}static{this.\u0275fac=function(n){return new(n||i)(o(d,13),o(K,10),o(J,10),o(D,10),o(Ye,8))}}static{this.\u0275dir=l({type:i,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},features:[p([$t]),u,ne]})}}return i})(),qt={provide:D,useExisting:f(()=>it),multi:!0};function tt(i,t){return i==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${i}: ${t}`.slice(0,50))}function zt(i){return i.split(":")[0]}var it=(()=>{class i extends I{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;let n=this._getOptionId(e),r=tt(n,e);this.setProperty("value",r)}registerOnChange(e){this.onChange=n=>{this.value=this._getOptionValue(n),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n),e))return n;return null}_getOptionValue(e){let n=zt(e);return this._optionMap.has(n)?this._optionMap.get(n):e}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=V(i)))(r||i)}})()}static{this.\u0275dir=l({type:i,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(n,r){n&1&&g("change",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},features:[p([qt]),u]})}}return i})(),Vi=(()=>{class i{constructor(e,n,r){this._element=e,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(e){this._select!=null&&(this._select._optionMap.set(this.id,e),this._setElementValue(tt(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static{this.\u0275fac=function(n){return new(n||i)(o(b),o(A),o(it,9))}}static{this.\u0275dir=l({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}})}}return i})(),Zt={provide:D,useExisting:f(()=>nt),multi:!0};function Se(i,t){return i==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${i}: ${t}`.slice(0,50))}function Xt(i){return i.split(":")[0]}var nt=(()=>{class i extends I{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;let n;if(Array.isArray(e)){let r=e.map(s=>this._getOptionId(s));n=(s,a)=>{s._setSelected(r.indexOf(a.toString())>-1)}}else n=(r,s)=>{r._setSelected(!1)};this._optionMap.forEach(n)}registerOnChange(e){this.onChange=n=>{let r=[],s=n.selectedOptions;if(s!==void 0){let a=s;for(let y=0;y<a.length;y++){let T=a[y],te=this._getOptionValue(T.value);r.push(te)}}else{let a=n.options;for(let y=0;y<a.length;y++){let T=a[y];if(T.selected){let te=this._getOptionValue(T.value);r.push(te)}}}this.value=r,e(r)}}_registerOption(e){let n=(this._idCounter++).toString();return this._optionMap.set(n,e),n}_getOptionId(e){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n)._value,e))return n;return null}_getOptionValue(e){let n=Xt(e);return this._optionMap.has(n)?this._optionMap.get(n)._value:e}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=V(i)))(r||i)}})()}static{this.\u0275dir=l({type:i,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(n,r){n&1&&g("change",function(a){return r.onChange(a.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},features:[p([Zt]),u]})}}return i})(),Di=(()=>{class i{constructor(e,n,r){this._element=e,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){this._select!=null&&(this._value=e,this._setElementValue(Se(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(Se(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static{this.\u0275fac=function(n){return new(n||i)(o(b),o(A),o(nt,9))}}static{this.\u0275dir=l({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}})}}return i})();var rt=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=U({type:i})}static{this.\u0275inj=B({})}}return i})(),ce=class extends w{constructor(t,e,n){super(de(e),he(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,n={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:n.emitEvent})}removeAt(t,e={}){let n=this._adjustIndex(t);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,n={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){Ze(this,!1,t),t.forEach((n,r)=>{ze(this,!1,r),this.at(r).setValue(n,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(t.forEach((n,r)=>{this.at(r)&&this.at(r).patchValue(n,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((n,r)=>{n.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,n)=>n._syncPendingControls()?!0:e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,n)=>{t(e,n)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}};function Ne(i){return!!i&&(i.asyncValidators!==void 0||i.validators!==void 0||i.updateOn!==void 0)}var bi=(()=>{class i{constructor(){this.useNonNullable=!1}get nonNullable(){let e=new i;return e.useNonNullable=!0,e}group(e,n=null){let r=this._reduceControls(e),s={};return Ne(n)?s=n:n!==null&&(s.validators=n.validator,s.asyncValidators=n.asyncValidator),new Z(r,s)}record(e,n=null){let r=this._reduceControls(e);return new ue(r,n)}control(e,n,r){let s={};return this.useNonNullable?(Ne(n)?s=n:(s.validators=n,s.asyncValidators=r),new L(e,h(c({},s),{nonNullable:!0}))):new L(e,n,r)}array(e,n,r){let s=e.map(a=>this._createControl(a));return new ce(s,n,r)}_reduceControls(e){let n={};return Object.keys(e).forEach(r=>{n[r]=this._createControl(e[r])}),n}_createControl(e){if(e instanceof L)return e;if(e instanceof w)return e;if(Array.isArray(e)){let n=e[0],r=e.length>1?e[1]:null,s=e.length>2?e[2]:null;return this.control(n,r,s)}else return this.control(e)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=ie({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Ai=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:ee,useValue:e.callSetDisabledState??R}]}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=U({type:i})}static{this.\u0275inj=B({imports:[rt]})}}return i})(),Mi=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:Ye,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:ee,useValue:e.callSetDisabledState??R}]}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=U({type:i})}static{this.\u0275inj=B({imports:[rt]})}}return i})();export{ot as a,xe as b,De as c,_i as d,vi as e,Ci as f,Rt as g,Bt as h,Ke as i,Je as j,Qe as k,Wt as l,Vi as m,Di as n,bi as o,Ai as p,Mi as q};
1
+ import{Lb as p,M as j,Ma as o,N as f,O as ie,Oa as A,P as B,R as C,Ra as N,U as ye,Va as u,Wb as Ve,X as U,Y as l,bb as re,cc as O,da as ne,dc as m,g as ge,gc as se,ha as V,ja as Ce,k as me,ma as S,p as _e,pb as g,ra as b,v as ve}from"./chunk-FKB7BVQE.js";import{a as c,b as h}from"./chunk-7CGTOI24.js";var Oe=(()=>{class i{constructor(e,n){this._renderer=e,this._elementRef=n,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,n){this._renderer.setProperty(this._elementRef.nativeElement,e,n)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static{this.\u0275fac=function(n){return new(n||i)(o(A),o(b))}}static{this.\u0275dir=l({type:i})}}return i})(),I=(()=>{class i extends Oe{static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=V(i)))(r||i)}})()}static{this.\u0275dir=l({type:i,features:[u]})}}return i})(),D=new C(""),st={provide:D,useExisting:f(()=>ot),multi:!0},ot=(()=>{class i extends I{writeValue(e){this.setProperty("checked",e)}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=V(i)))(r||i)}})()}static{this.\u0275dir=l({type:i,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(n,r){n&1&&g("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()})},features:[p([st]),u]})}}return i})(),at={provide:D,useExisting:f(()=>xe),multi:!0};function lt(){let i=se()?se().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var ut=new C(""),xe=(()=>{class i extends Oe{constructor(e,n,r){super(e,n),this._compositionMode=r,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!lt())}writeValue(e){let n=e??"";this.setProperty("value",n)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static{this.\u0275fac=function(n){return new(n||i)(o(A),o(b),o(ut,8))}}static{this.\u0275dir=l({type:i,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(n,r){n&1&&g("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)})},features:[p([at]),u]})}}return i})();function _(i){return i==null||(typeof i=="string"||Array.isArray(i))&&i.length===0}function Pe(i){return i!=null&&typeof i.length=="number"}var K=new C(""),J=new C(""),ct=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,De=class{static min(t){return dt(t)}static max(t){return ht(t)}static required(t){return ft(t)}static requiredTrue(t){return pt(t)}static email(t){return gt(t)}static minLength(t){return mt(t)}static maxLength(t){return _t(t)}static pattern(t){return vt(t)}static nullValidator(t){return ke(t)}static compose(t){return Ue(t)}static composeAsync(t){return Le(t)}};function dt(i){return t=>{if(_(t.value)||_(i))return null;let e=parseFloat(t.value);return!isNaN(e)&&e<i?{min:{min:i,actual:t.value}}:null}}function ht(i){return t=>{if(_(t.value)||_(i))return null;let e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function ft(i){return _(i.value)?{required:!0}:null}function pt(i){return i.value===!0?null:{required:!0}}function gt(i){return _(i.value)||ct.test(i.value)?null:{email:!0}}function mt(i){return t=>_(t.value)||!Pe(t.value)?null:t.value.length<i?{minlength:{requiredLength:i,actualLength:t.value.length}}:null}function _t(i){return t=>Pe(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function vt(i){if(!i)return ke;let t,e;return typeof i=="string"?(e="",i.charAt(0)!=="^"&&(e+="^"),e+=i,i.charAt(i.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=i.toString(),t=i),n=>{if(_(n.value))return null;let r=n.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function ke(i){return null}function Ge(i){return i!=null}function Re(i){return Ve(i)?me(i):i}function Te(i){let t={};return i.forEach(e=>{t=e!=null?c(c({},t),e):t}),Object.keys(t).length===0?null:t}function je(i,t){return t.map(e=>e(i))}function yt(i){return!i.validate}function Be(i){return i.map(t=>yt(t)?t:e=>t.validate(e))}function Ue(i){if(!i)return null;let t=i.filter(Ge);return t.length==0?null:function(e){return Te(je(e,t))}}function He(i){return i!=null?Ue(Be(i)):null}function Le(i){if(!i)return null;let t=i.filter(Ge);return t.length==0?null:function(e){let n=je(e,t).map(Re);return ve(n).pipe(_e(Te))}}function $e(i){return i!=null?Le(Be(i)):null}function be(i,t){return i===null?[t]:Array.isArray(i)?[...i,t]:[i,t]}function We(i){return i._rawValidators}function qe(i){return i._rawAsyncValidators}function oe(i){return i?Array.isArray(i)?i:[i]:[]}function $(i,t){return Array.isArray(i)?i.includes(t):i===t}function Ae(i,t){let e=oe(t);return oe(i).forEach(r=>{$(e,r)||e.push(r)}),e}function Me(i,t){return oe(t).filter(e=>!$(i,e))}var W=class{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=He(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=$e(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},d=class extends W{get formDirective(){return null}get path(){return null}},F=class extends W{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},q=class{constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},Ct={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},mi=h(c({},Ct),{"[class.ng-submitted]":"isSubmitted"}),_i=(()=>{class i extends q{constructor(e){super(e)}static{this.\u0275fac=function(n){return new(n||i)(o(F,2))}}static{this.\u0275dir=l({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,r){n&2&&re("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},features:[u]})}}return i})(),vi=(()=>{class i extends q{constructor(e){super(e)}static{this.\u0275fac=function(n){return new(n||i)(o(d,10))}}static{this.\u0275dir=l({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(n,r){n&2&&re("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},features:[u]})}}return i})();var x="VALID",H="INVALID",M="PENDING",P="DISABLED",v=class{},z=class extends v{constructor(t,e){super(),this.value=t,this.source=e}},k=class extends v{constructor(t,e){super(),this.pristine=t,this.source=e}},G=class extends v{constructor(t,e){super(),this.touched=t,this.source=e}},E=class extends v{constructor(t,e){super(),this.status=t,this.source=e}},ae=class extends v{constructor(t){super(),this.source=t}},le=class extends v{constructor(t){super(),this.source=t}};function de(i){return(Q(i)?i.validators:i)||null}function Vt(i){return Array.isArray(i)?He(i):i||null}function he(i,t){return(Q(t)?t.asyncValidators:i)||null}function Dt(i){return Array.isArray(i)?$e(i):i||null}function Q(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}function ze(i,t,e){let n=i.controls;if(!(t?Object.keys(n):n).length)throw new j(1e3,"");if(!n[e])throw new j(1001,"")}function Ze(i,t,e){i._forEachChild((n,r)=>{if(e[r]===void 0)throw new j(1002,"")})}var w=class{constructor(t,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=null,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this._status=O(()=>this.statusReactive()),this.statusReactive=N(void 0),this._pristine=O(()=>this.pristineReactive()),this.pristineReactive=N(!0),this._touched=O(()=>this.touchedReactive()),this.touchedReactive=N(!1),this._events=new ge,this.events=this._events.asObservable(),this._onDisabledChange=[],this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return m(this.statusReactive)}set status(t){m(()=>this.statusReactive.set(t))}get valid(){return this.status===x}get invalid(){return this.status===H}get pending(){return this.status==M}get disabled(){return this.status===P}get enabled(){return this.status!==P}get pristine(){return m(this.pristineReactive)}set pristine(t){m(()=>this.pristineReactive.set(t))}get dirty(){return!this.pristine}get touched(){return m(this.touchedReactive)}set touched(t){m(()=>this.touchedReactive.set(t))}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(Ae(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Ae(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Me(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Me(t,this._rawAsyncValidators))}hasValidator(t){return $(this._rawValidators,t)}hasAsyncValidator(t){return $(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let e=this.touched===!1;this.touched=!0;let n=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched(h(c({},t),{sourceControl:n})),e&&t.emitEvent!==!1&&this._events.next(new G(!0,n))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t))}markAsUntouched(t={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:n})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,n),e&&t.emitEvent!==!1&&this._events.next(new G(!1,n))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let n=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty(h(c({},t),{sourceControl:n})),e&&t.emitEvent!==!1&&this._events.next(new k(!1,n))}markAsPristine(t={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,n),e&&t.emitEvent!==!1&&this._events.next(new k(!0,n))}markAsPending(t={}){this.status=M;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new E(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(h(c({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=P,this.errors=null,this._forEachChild(r=>{r.disable(h(c({},t),{onlySelf:!0}))}),this._updateValue();let n=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new z(this.value,n)),this._events.next(new E(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(h(c({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=x,this._forEachChild(n=>{n.enable(h(c({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(h(c({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(t,e){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===x||this.status===M)&&this._runAsyncValidator(n,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new z(this.value,e)),this._events.next(new E(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(h(c({},t),{sourceControl:e}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?P:x}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=M,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1};let n=Re(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((n,r)=>n&&n._find(r),this)}getError(t,e){let n=e?this.get(e):this;return n&&n.errors?n.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,n){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||n)&&this._events.next(new E(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,n)}_initObservables(){this.valueChanges=new S,this.statusChanges=new S}_calculateStatus(){return this._allControlsDisabled()?P:this.errors?H:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(M)?M:this._anyControlsHaveStatus(H)?H:x}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let n=!this._anyControlsDirty(),r=this.pristine!==n;this.pristine=n,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,e),r&&this._events.next(new k(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new G(this.touched,e)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,e)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){Q(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let e=this._parent&&this._parent.dirty;return!t&&!!e&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=Vt(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=Dt(this._rawAsyncValidators)}},Z=class extends w{constructor(t,e,n){super(de(e),he(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,n={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,n={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){Ze(this,!0,t),Object.keys(t).forEach(n=>{ze(this,!0,n),this.controls[n].setValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(n=>{let r=this.controls[n];r&&r.patchValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((n,r)=>{n.reset(t?t[r]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,n)=>(t[n]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,n)=>n._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let n=this.controls[e];n&&t(n,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,n]of Object.entries(this.controls))if(this.contains(e)&&t(n))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,n,r)=>((n.enabled||this.disabled)&&(e[r]=n.value),e))}_reduceChildren(t,e){let n=t;return this._forEachChild((r,s)=>{n=e(n,r,s)}),n}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var ue=class extends Z{};var ee=new C("CallSetDisabledState",{providedIn:"root",factory:()=>R}),R="always";function fe(i,t){return[...t.path,i]}function Ee(i,t,e=R){pe(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(i.disabled),At(i,t),Et(i,t),Mt(i,t),bt(i,t)}function Fe(i,t,e=!0){let n=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n)),Y(i,t),i&&(t._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function X(i,t){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function bt(i,t){if(t.valueAccessor.setDisabledState){let e=n=>{t.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(e),t._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}function pe(i,t){let e=We(i);t.validator!==null?i.setValidators(be(e,t.validator)):typeof e=="function"&&i.setValidators([e]);let n=qe(i);t.asyncValidator!==null?i.setAsyncValidators(be(n,t.asyncValidator)):typeof n=="function"&&i.setAsyncValidators([n]);let r=()=>i.updateValueAndValidity();X(t._rawValidators,r),X(t._rawAsyncValidators,r)}function Y(i,t){let e=!1;if(i!==null){if(t.validator!==null){let r=We(i);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.validator);s.length!==r.length&&(e=!0,i.setValidators(s))}}if(t.asyncValidator!==null){let r=qe(i);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.asyncValidator);s.length!==r.length&&(e=!0,i.setAsyncValidators(s))}}}let n=()=>{};return X(t._rawValidators,n),X(t._rawAsyncValidators,n),e}function At(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&Xe(i,t)})}function Mt(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&Xe(i,t),i.updateOn!=="submit"&&i.markAsTouched()})}function Xe(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function Et(i,t){let e=(n,r)=>{t.valueAccessor.writeValue(n),r&&t.viewToModelUpdate(n)};i.registerOnChange(e),t._registerOnDestroy(()=>{i._unregisterOnChange(e)})}function Ft(i,t){i==null,pe(i,t)}function wt(i,t){return Y(i,t)}function It(i,t){if(!i.hasOwnProperty("model"))return!1;let e=i.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function St(i){return Object.getPrototypeOf(i.constructor)===I}function Nt(i,t){i._syncPendingControls(),t.forEach(e=>{let n=e.control;n.updateOn==="submit"&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function Ot(i,t){if(!t)return null;Array.isArray(t);let e,n,r;return t.forEach(s=>{s.constructor===xe?e=s:St(s)?n=s:r=s}),r||n||e||null}function xt(i,t){let e=i.indexOf(t);e>-1&&i.splice(e,1)}function we(i,t){let e=i.indexOf(t);e>-1&&i.splice(e,1)}function Ie(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var L=class extends w{constructor(t=null,e,n){super(de(e),he(n,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Q(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Ie(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(n=>n(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){we(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){we(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){Ie(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}};var Pt=i=>i instanceof L,kt=(()=>{class i extends d{ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return fe(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=V(i)))(r||i)}})()}static{this.\u0275dir=l({type:i,features:[u]})}}return i})();var Ci=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=l({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]})}}return i})(),Gt={provide:D,useExisting:f(()=>Rt),multi:!0},Rt=(()=>{class i extends I{writeValue(e){let n=e??"";this.setProperty("value",n)}registerOnChange(e){this.onChange=n=>{e(n==""?null:parseFloat(n))}}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=V(i)))(r||i)}})()}static{this.\u0275dir=l({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(n,r){n&1&&g("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},features:[p([Gt]),u]})}}return i})(),Tt={provide:D,useExisting:f(()=>Bt),multi:!0};var jt=(()=>{class i{constructor(){this._accessors=[]}add(e,n){this._accessors.push([e,n])}remove(e){for(let n=this._accessors.length-1;n>=0;--n)if(this._accessors[n][1]===e){this._accessors.splice(n,1);return}}select(e){this._accessors.forEach(n=>{this._isSameGroup(n,e)&&n[1]!==e&&n[1].fireUncheck(e.value)})}_isSameGroup(e,n){return e[0].control?e[0]._parent===n._control._parent&&e[1].name===n.name:!1}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=ie({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),Bt=(()=>{class i extends I{constructor(e,n,r,s){super(e,n),this._registry=r,this._injector=s,this.setDisabledStateFired=!1,this.onChange=()=>{},this.callSetDisabledState=ye(ee,{optional:!0})??R}ngOnInit(){this._control=this._injector.get(F),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||this.callSetDisabledState==="whenDisabledForLegacyCode")&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}static{this.\u0275fac=function(n){return new(n||i)(o(A),o(b),o(jt),o(Ce))}}static{this.\u0275dir=l({type:i,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(n,r){n&1&&g("change",function(){return r.onChange()})("blur",function(){return r.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[p([Tt]),u]})}}return i})();var Ye=new C("");var Ut={provide:d,useExisting:f(()=>Ke)},Ke=(()=>{class i extends d{get submitted(){return m(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}constructor(e,n,r){super(),this.callSetDisabledState=r,this._submitted=O(()=>this._submittedReactive()),this._submittedReactive=N(!1),this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new S,this._setValidators(e),this._setAsyncValidators(n)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Y(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let n=this.form.get(e.path);return Ee(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){Fe(e.control||null,e,!1),xt(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,n){this.form.get(e.path).setValue(n)}onSubmit(e){return this._submittedReactive.set(!0),Nt(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new ae(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this._submittedReactive.set(!1),this.form._events.next(new le(this.form))}_updateDomValue(){this.directives.forEach(e=>{let n=e.control,r=this.form.get(e.path);n!==r&&(Fe(n||null,e),Pt(r)&&(Ee(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let n=this.form.get(e.path);Ft(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let n=this.form.get(e.path);n&&wt(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){pe(this.form,this),this._oldForm&&Y(this._oldForm,this)}_checkFormPresent(){this.form}static{this.\u0275fac=function(n){return new(n||i)(o(K,10),o(J,10),o(ee,8))}}static{this.\u0275dir=l({type:i,selectors:[["","formGroup",""]],hostBindings:function(n,r){n&1&&g("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[p([Ut]),u,ne]})}}return i})(),Ht={provide:d,useExisting:f(()=>Je)},Je=(()=>{class i extends kt{constructor(e,n,r){super(),this.name=null,this._parent=e,this._setValidators(n),this._setAsyncValidators(r)}_checkParentType(){et(this._parent)}static{this.\u0275fac=function(n){return new(n||i)(o(d,13),o(K,10),o(J,10))}}static{this.\u0275dir=l({type:i,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},features:[p([Ht]),u]})}}return i})(),Lt={provide:d,useExisting:f(()=>Qe)},Qe=(()=>{class i extends d{constructor(e,n,r){super(),this.name=null,this._parent=e,this._setValidators(n),this._setAsyncValidators(r)}ngOnInit(){this._checkParentType(),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return fe(this.name==null?this.name:this.name.toString(),this._parent)}_checkParentType(){et(this._parent)}static{this.\u0275fac=function(n){return new(n||i)(o(d,13),o(K,10),o(J,10))}}static{this.\u0275dir=l({type:i,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},features:[p([Lt]),u]})}}return i})();function et(i){return!(i instanceof Je)&&!(i instanceof Ke)&&!(i instanceof Qe)}var $t={provide:F,useExisting:f(()=>Wt)},Wt=(()=>{class i extends F{set isDisabled(e){}static{this._ngModelWarningSentOnce=!1}constructor(e,n,r,s,a){super(),this._ngModelWarningConfig=a,this._added=!1,this.name=null,this.update=new S,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=Ot(this,s)}ngOnChanges(e){this._added||this._setUpControl(),It(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return fe(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}static{this.\u0275fac=function(n){return new(n||i)(o(d,13),o(K,10),o(J,10),o(D,10),o(Ye,8))}}static{this.\u0275dir=l({type:i,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},features:[p([$t]),u,ne]})}}return i})(),qt={provide:D,useExisting:f(()=>it),multi:!0};function tt(i,t){return i==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${i}: ${t}`.slice(0,50))}function zt(i){return i.split(":")[0]}var it=(()=>{class i extends I{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;let n=this._getOptionId(e),r=tt(n,e);this.setProperty("value",r)}registerOnChange(e){this.onChange=n=>{this.value=this._getOptionValue(n),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n),e))return n;return null}_getOptionValue(e){let n=zt(e);return this._optionMap.has(n)?this._optionMap.get(n):e}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=V(i)))(r||i)}})()}static{this.\u0275dir=l({type:i,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(n,r){n&1&&g("change",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},features:[p([qt]),u]})}}return i})(),Vi=(()=>{class i{constructor(e,n,r){this._element=e,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(e){this._select!=null&&(this._select._optionMap.set(this.id,e),this._setElementValue(tt(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static{this.\u0275fac=function(n){return new(n||i)(o(b),o(A),o(it,9))}}static{this.\u0275dir=l({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}})}}return i})(),Zt={provide:D,useExisting:f(()=>nt),multi:!0};function Se(i,t){return i==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${i}: ${t}`.slice(0,50))}function Xt(i){return i.split(":")[0]}var nt=(()=>{class i extends I{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;let n;if(Array.isArray(e)){let r=e.map(s=>this._getOptionId(s));n=(s,a)=>{s._setSelected(r.indexOf(a.toString())>-1)}}else n=(r,s)=>{r._setSelected(!1)};this._optionMap.forEach(n)}registerOnChange(e){this.onChange=n=>{let r=[],s=n.selectedOptions;if(s!==void 0){let a=s;for(let y=0;y<a.length;y++){let T=a[y],te=this._getOptionValue(T.value);r.push(te)}}else{let a=n.options;for(let y=0;y<a.length;y++){let T=a[y];if(T.selected){let te=this._getOptionValue(T.value);r.push(te)}}}this.value=r,e(r)}}_registerOption(e){let n=(this._idCounter++).toString();return this._optionMap.set(n,e),n}_getOptionId(e){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n)._value,e))return n;return null}_getOptionValue(e){let n=Xt(e);return this._optionMap.has(n)?this._optionMap.get(n)._value:e}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=V(i)))(r||i)}})()}static{this.\u0275dir=l({type:i,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(n,r){n&1&&g("change",function(a){return r.onChange(a.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},features:[p([Zt]),u]})}}return i})(),Di=(()=>{class i{constructor(e,n,r){this._element=e,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){this._select!=null&&(this._value=e,this._setElementValue(Se(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(Se(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static{this.\u0275fac=function(n){return new(n||i)(o(b),o(A),o(nt,9))}}static{this.\u0275dir=l({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}})}}return i})();var rt=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=U({type:i})}static{this.\u0275inj=B({})}}return i})(),ce=class extends w{constructor(t,e,n){super(de(e),he(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,n={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:n.emitEvent})}removeAt(t,e={}){let n=this._adjustIndex(t);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,n={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){Ze(this,!1,t),t.forEach((n,r)=>{ze(this,!1,r),this.at(r).setValue(n,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(t.forEach((n,r)=>{this.at(r)&&this.at(r).patchValue(n,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((n,r)=>{n.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,n)=>n._syncPendingControls()?!0:e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,n)=>{t(e,n)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}};function Ne(i){return!!i&&(i.asyncValidators!==void 0||i.validators!==void 0||i.updateOn!==void 0)}var bi=(()=>{class i{constructor(){this.useNonNullable=!1}get nonNullable(){let e=new i;return e.useNonNullable=!0,e}group(e,n=null){let r=this._reduceControls(e),s={};return Ne(n)?s=n:n!==null&&(s.validators=n.validator,s.asyncValidators=n.asyncValidator),new Z(r,s)}record(e,n=null){let r=this._reduceControls(e);return new ue(r,n)}control(e,n,r){let s={};return this.useNonNullable?(Ne(n)?s=n:(s.validators=n,s.asyncValidators=r),new L(e,h(c({},s),{nonNullable:!0}))):new L(e,n,r)}array(e,n,r){let s=e.map(a=>this._createControl(a));return new ce(s,n,r)}_reduceControls(e){let n={};return Object.keys(e).forEach(r=>{n[r]=this._createControl(e[r])}),n}_createControl(e){if(e instanceof L)return e;if(e instanceof w)return e;if(Array.isArray(e)){let n=e[0],r=e.length>1?e[1]:null,s=e.length>2?e[2]:null;return this.control(n,r,s)}else return this.control(e)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=ie({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Ai=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:ee,useValue:e.callSetDisabledState??R}]}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=U({type:i})}static{this.\u0275inj=B({imports:[rt]})}}return i})(),Mi=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:Ye,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:ee,useValue:e.callSetDisabledState??R}]}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=U({type:i})}static{this.\u0275inj=B({imports:[rt]})}}return i})();export{ot as a,xe as b,De as c,_i as d,vi as e,Ci as f,Rt as g,Bt as h,Ke as i,Je as j,Qe as k,Wt as l,Vi as m,Di as n,bi as o,Ai as p,Mi as q};
@@ -1 +1 @@
1
- import{b as S}from"./chunk-6PJU5W5X.js";import{a as h}from"./chunk-ZUVMWAQY.js";import{Bb as p,Cb as d,Hb as f,La as n,Mb as u,Nb as C,U as s,W as l,eb as c,fb as m,gb as g,hb as i,ib as a,lc as v}from"./chunk-NGPWOMCW.js";import"./chunk-7CGTOI24.js";function L(t,o){if(t&1&&(i(0,"pre",0),p(1),u(2,"json"),a()),t&2){let e=o.$implicit;n(),d(C(2,1,e))}}var r=class t{#e=s(h);logs=S(this.#e.getApiV1LogdataLog());static \u0275fac=function(e){return new(e||t)};static \u0275cmp=l({type:t,selectors:[["app-logs"]],standalone:!0,features:[f],decls:4,vars:0,consts:[[2,"white-space","wrap"]],template:function(e,y){e&1&&(i(0,"h3"),p(1,"Logs"),a(),m(2,L,3,3,"pre",0,c)),e&2&&(n(2),g(y.logs()))},dependencies:[v],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}"],changeDetection:0})};export{r as default};
1
+ import{b as S}from"./chunk-BX543SH4.js";import{a as h}from"./chunk-PY26LA4W.js";import{Db as p,Eb as d,La as n,Mb as f,Rb as u,Sb as C,U as s,W as l,fb as c,gb as m,hb as g,ib as i,jb as a,pc as v}from"./chunk-FKB7BVQE.js";import"./chunk-7CGTOI24.js";function L(t,o){if(t&1&&(i(0,"pre",0),p(1),u(2,"json"),a()),t&2){let e=o.$implicit;n(),d(C(2,1,e))}}var r=class t{#e=s(h);logs=S(this.#e.getApiV1LogdataLog());static \u0275fac=function(e){return new(e||t)};static \u0275cmp=l({type:t,selectors:[["app-logs"]],standalone:!0,features:[f],decls:4,vars:0,consts:[[2,"white-space","wrap"]],template:function(e,y){e&1&&(i(0,"h3"),p(1,"Logs"),a(),m(2,L,3,3,"pre",0,c)),e&2&&(n(2),g(y.logs()))},dependencies:[v],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}"],changeDetection:0})};export{r as default};