@duplicati/ngclient 0.0.172 → 0.0.174

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 (146) hide show
  1. package/{chunk-XTYBRFP6.js → chunk-25DBPKN6.js} +1 -1
  2. package/chunk-262ZXUG6.js +2 -0
  3. package/chunk-2ICSZKZG.js +1 -0
  4. package/chunk-3CJTIOP4.js +1 -0
  5. package/{chunk-DU5QSRYH.js → chunk-3JUUD7DI.js} +1 -1
  6. package/chunk-4WH4HUUV.js +1 -0
  7. package/{chunk-I5AKUAZF.js → chunk-4Y6Y4CDL.js} +1 -1
  8. package/chunk-56FBKSBN.js +1 -0
  9. package/chunk-5PCGCIX3.js +1 -0
  10. package/chunk-6CK3Q22R.js +1 -0
  11. package/{chunk-47AUYCMN.js → chunk-6FL3SK75.js} +1 -1
  12. package/{chunk-CCM2D4BF.js → chunk-6KLZAB4D.js} +1 -1
  13. package/{chunk-ZV7VPSMZ.js → chunk-6KSFCVWH.js} +1 -1
  14. package/chunk-6TMGVMHJ.js +1 -0
  15. package/chunk-7CGTOI24.js +1 -0
  16. package/{chunk-4PMLRVX5.js → chunk-7MMXN2DH.js} +1 -1
  17. package/chunk-7TAHV52M.js +1 -0
  18. package/chunk-AA6WAAN2.js +1 -0
  19. package/chunk-AEAAMLWV.js +1 -0
  20. package/{chunk-L4GZJLYK.js → chunk-AGPZBYW6.js} +1 -1
  21. package/{chunk-D2DI6ZER.js → chunk-AJXTVI3H.js} +1 -1
  22. package/chunk-AYN5EDSZ.js +1 -0
  23. package/{chunk-KBGIIJMM.js → chunk-BKANUILG.js} +1 -1
  24. package/chunk-BUO6CCKF.js +1 -0
  25. package/chunk-C7IZTEYJ.js +1 -0
  26. package/chunk-CGG7XWW2.js +1 -0
  27. package/{chunk-T6C2OUI5.js → chunk-CGKL2MHM.js} +1 -1
  28. package/{chunk-FCZXIW2B.js → chunk-CHUTAXTB.js} +1 -1
  29. package/chunk-CRO4IG3E.js +1 -0
  30. package/{chunk-AFUSUOJX.js → chunk-CXKDYRDJ.js} +1 -1
  31. package/{chunk-PDBKO5D5.js → chunk-D7TCA6E7.js} +1 -1
  32. package/chunk-DJRFN4KK.js +1 -0
  33. package/{chunk-PJAWWLYW.js → chunk-DTKWQFAK.js} +1 -1
  34. package/{chunk-X5FW56GT.js → chunk-EG6HQDBF.js} +1 -1
  35. package/chunk-ENWZTNAT.js +1 -0
  36. package/{chunk-W4QCGFNO.js → chunk-EWA2R7BT.js} +1 -1
  37. package/chunk-F2W6D4CD.js +1 -0
  38. package/chunk-F4FNPZVZ.js +1 -0
  39. package/chunk-F72THCQ7.js +2 -0
  40. package/{chunk-I2RHQQ3J.js → chunk-FBWFZMGL.js} +1 -1
  41. package/{chunk-4L4YRYBK.js → chunk-FCU2VKGV.js} +1 -1
  42. package/chunk-FIBRO5I3.js +2 -0
  43. package/chunk-FXF5TO2Q.js +2 -0
  44. package/{chunk-GS5QK7LF.js → chunk-GMNCWLGX.js} +1 -1
  45. package/chunk-GO4NSDR6.js +1 -0
  46. package/chunk-HCDAB4DC.js +1 -0
  47. package/chunk-HLHTRPKF.js +1 -0
  48. package/chunk-HQINXCW3.js +1 -0
  49. package/{chunk-XY6KVQXK.js → chunk-IH4WNUW5.js} +1 -1
  50. package/{chunk-HJRYTTGO.js → chunk-INXCIKUQ.js} +1 -1
  51. package/chunk-IUKASMIE.js +2 -0
  52. package/chunk-KJKCHREZ.js +1 -0
  53. package/{chunk-LJQN4G2O.js → chunk-L4FZSDG5.js} +1 -1
  54. package/chunk-L63XTN4Q.js +1 -0
  55. package/{chunk-M77IE672.js → chunk-LF24JF3M.js} +1 -1
  56. package/chunk-LUQFHR44.js +1 -0
  57. package/chunk-MN7DCJNE.js +1 -0
  58. package/{chunk-XE5OMGTJ.js → chunk-NEV6JB5M.js} +1 -1
  59. package/chunk-NQHKAZPY.js +1 -0
  60. package/chunk-NXRFZLMT.js +2 -0
  61. package/chunk-O4RGYUZV.js +1 -0
  62. package/{chunk-RKMVTPJD.js → chunk-ON2XDVR2.js} +1 -1
  63. package/{chunk-MZMEFIHU.js → chunk-OWEK4OHZ.js} +1 -1
  64. package/chunk-PF2QQ2YW.js +1 -0
  65. package/{chunk-TJ3WIU6Q.js → chunk-QWNOPLJC.js} +1 -1
  66. package/chunk-RMOTUTEQ.js +1 -0
  67. package/chunk-RYXU2QDS.js +1 -0
  68. package/{chunk-UTONS2P4.js → chunk-SD4AWG7T.js} +1 -1
  69. package/{chunk-CSY4BFC4.js → chunk-SGUIYI7M.js} +1 -1
  70. package/chunk-T5LLH46J.js +1 -0
  71. package/chunk-TGIQ4T6L.js +1 -0
  72. package/{chunk-BTVYI2KD.js → chunk-TJYZBTTS.js} +1 -1
  73. package/chunk-TTRWYCMU.js +1 -0
  74. package/chunk-TWKF3RAH.js +1 -0
  75. package/chunk-U3FKLHQB.js +1 -0
  76. package/{chunk-RECKKS2S.js → chunk-U63HBLGG.js} +1 -1
  77. package/chunk-W57PSM7O.js +2 -0
  78. package/chunk-WILUKPQ3.js +1 -0
  79. package/{chunk-FVVMRBPU.js → chunk-WJCV4TPS.js} +1 -1
  80. package/{chunk-N6SGM2XM.js → chunk-WYAWO5P3.js} +2 -2
  81. package/{chunk-66KMXCBD.js → chunk-XPW2U645.js} +1 -1
  82. package/chunk-XQN4YWSA.js +3 -0
  83. package/chunk-XYHHESIX.js +4 -0
  84. package/{chunk-646U6U3M.js → chunk-YAPF7WXQ.js} +1 -1
  85. package/chunk-ZG53MWIX.js +1 -0
  86. package/{chunk-PG2PHQWA.js → chunk-ZG7PE3JF.js} +1 -1
  87. package/chunk-ZT73LBZD.js +1 -0
  88. package/chunk-ZZLGO36S.js +1 -0
  89. package/index.html +2 -2
  90. package/{main-X4XGDJTL.js → main-TXK3N3TI.js} +1 -1
  91. package/package.json +1 -1
  92. package/styles-CY5DE4O7.css +1 -0
  93. package/chunk-3L2HST7Q.js +0 -1
  94. package/chunk-3T4NJWLA.js +0 -1
  95. package/chunk-4BGVLUYV.js +0 -2
  96. package/chunk-4FD362Y4.js +0 -1
  97. package/chunk-4MEL5WTX.js +0 -1
  98. package/chunk-5BMTCVLS.js +0 -1
  99. package/chunk-5H3KA3BL.js +0 -1
  100. package/chunk-5K64UNNB.js +0 -2
  101. package/chunk-5PLFBSYN.js +0 -1
  102. package/chunk-5SNEZYDF.js +0 -1
  103. package/chunk-6DB3NZXR.js +0 -1
  104. package/chunk-7KUVROHU.js +0 -1
  105. package/chunk-7WIBNC6L.js +0 -1
  106. package/chunk-ABJWT6DQ.js +0 -1
  107. package/chunk-AGFUNVOJ.js +0 -1
  108. package/chunk-CBL5TPIR.js +0 -1
  109. package/chunk-DY7VFO2O.js +0 -1
  110. package/chunk-ES5NR2JV.js +0 -3
  111. package/chunk-EUDKD2JW.js +0 -1
  112. package/chunk-F2QQDU4N.js +0 -1
  113. package/chunk-FAM42SZT.js +0 -4
  114. package/chunk-HFDNVEKY.js +0 -2
  115. package/chunk-HJ5IWG4Y.js +0 -1
  116. package/chunk-I6BGE5RS.js +0 -1
  117. package/chunk-IZQG3EV6.js +0 -1
  118. package/chunk-L7A3FH7R.js +0 -1
  119. package/chunk-LEYS7OLH.js +0 -1
  120. package/chunk-LEZL7BSL.js +0 -1
  121. package/chunk-LFRGO2IP.js +0 -1
  122. package/chunk-LFVCKT5O.js +0 -1
  123. package/chunk-MP7JKTLP.js +0 -1
  124. package/chunk-NHRDYV7W.js +0 -1
  125. package/chunk-NOHHRZSK.js +0 -2
  126. package/chunk-OLOFMEQN.js +0 -1
  127. package/chunk-PD5WNPQM.js +0 -1
  128. package/chunk-RNNVKT2R.js +0 -1
  129. package/chunk-S5O366BO.js +0 -2
  130. package/chunk-TZP7VKPA.js +0 -1
  131. package/chunk-UCP4VAJ4.js +0 -1
  132. package/chunk-UNGFQSCM.js +0 -1
  133. package/chunk-UPGTBICK.js +0 -2
  134. package/chunk-VKR5DJQG.js +0 -1
  135. package/chunk-VO42K6TQ.js +0 -1
  136. package/chunk-VOYMNW22.js +0 -1
  137. package/chunk-W2UO5LKI.js +0 -2
  138. package/chunk-WEFZF25L.js +0 -1
  139. package/chunk-XDECUOQ5.js +0 -1
  140. package/chunk-Y7PF5UJZ.js +0 -1
  141. package/chunk-YRYV3RWO.js +0 -1
  142. package/chunk-ZOO7P75U.js +0 -1
  143. package/chunk-ZTCP7QD2.js +0 -1
  144. package/styles-XWAP6FKR.css +0 -1
  145. /package/{chunk-FPPZ4BUR.js → chunk-QF5K4MHH.js} +0 -0
  146. /package/{polyfills-S663R3NQ.js → polyfills-7RKI4BGK.js} +0 -0
@@ -1 +1 @@
1
- import{a as m}from"./chunk-F2QQDU4N.js";import{a as u}from"./chunk-XE5OMGTJ.js";import{b as g}from"./chunk-KBGIIJMM.js";import{z as a}from"./chunk-LFRGO2IP.js";import{Rc as l,Sc as c,V as n,_ as r,oa as s}from"./chunk-FAM42SZT.js";var f=class o{#s=r(a);#e=r(g);#r=r(u);repeatRegisterTimer=null;state=s("unknown");claimUrl=s(null);registerUrl=s("");customRegisterUrl=s("");status=l(()=>{let e=this.state();return e==="connecting"?$localize`Console connection is enabled but not connected`:e==="connected"?$localize`Connected to console`:e==="registering"?$localize`Registering machine...`:e==="registeringfaulted"?$localize`Registration failed`:e==="registered"?$localize`Registered, waiting for accept`:e==="disabled"?$localize`Console connection is configured but not enabled`:e==="unknown"?$localize`...loading...`:$localize`Console connection is not set up`});sysInfoEffect=c(()=>{let e=this.#r.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"")});#t(e){e.RegistrationUrl&&this.claimUrl.set(e.RegistrationUrl),e.IsConnected?this.state.set("connected"):e.IsEnabled?this.state.set("connecting"):e.CanEnable?this.state.set("disabled"):e.IsRegisteringFaulted?this.state.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");let t=this.state();this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),t==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:i=>this.#t(i),error:i=>this.#i(i)})},5e3)),(t==="connecting"||t==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.getApiV1RemotecontrolStatus().subscribe({next:i=>this.#t(i),error:i=>this.#i(i)})},5e3)),e.IsRegistering&&e.CanEnable&&this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:i=>this.#t(i)})}#i(e){this.#e.getApiV1RemotecontrolStatus().subscribe({next:t=>{console.log("next",t),this.#t(t)}})}refreshRemoteControlStatus(){this.#e.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}beginRemoteRegistration(e=!1){this.state.set("registering"),this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:e?this.customRegisterUrl():this.registerUrl()}}).subscribe({next:t=>this.#t(t),error:t=>this.#i(t)})}cancelRemoteRegistration(){this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}enableRemoteControl(){this.#e.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}disableRemoteControl(){this.#e.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}deleteRemoteControl(){let e=this;this.#s.open(m,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete the console registration?`,confirmText:$localize`Delete registration`,cancelText:$localize`Cancel`},closed:t=>{t&&e.#e.deleteApiV1RemotecontrolRegistration().subscribe({next:i=>e.#t(i),error:i=>e.#i(i)})}})}static \u0275fac=function(t){return new(t||o)};static \u0275prov=n({token:o,factory:o.\u0275fac,providedIn:"root"})};export{f as a};
1
+ import{a as m}from"./chunk-WILUKPQ3.js";import{a as u}from"./chunk-NEV6JB5M.js";import{b as g}from"./chunk-BKANUILG.js";import{z as a}from"./chunk-RYXU2QDS.js";import{Mc as c,R as n,W as r,la as s,na as l}from"./chunk-XYHHESIX.js";var f=class o{#s=r(a);#e=r(g);#r=r(u);repeatRegisterTimer=null;state=s("unknown");claimUrl=s(null);registerUrl=s("");customRegisterUrl=s("");status=c(()=>{let e=this.state();return e==="connecting"?$localize`Console connection is enabled but not connected`:e==="connected"?$localize`Connected to console`:e==="registering"?$localize`Registering machine...`:e==="registeringfaulted"?$localize`Registration failed`:e==="registered"?$localize`Registered, waiting for accept`:e==="disabled"?$localize`Console connection is configured but not enabled`:e==="unknown"?$localize`...loading...`:$localize`Console connection is not set up`});sysInfoEffect=l(()=>{let e=this.#r.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"")});#t(e){e.RegistrationUrl&&this.claimUrl.set(e.RegistrationUrl),e.IsConnected?this.state.set("connected"):e.IsEnabled?this.state.set("connecting"):e.CanEnable?this.state.set("disabled"):e.IsRegisteringFaulted?this.state.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");let t=this.state();this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),t==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:i=>this.#t(i),error:i=>this.#i(i)})},5e3)),(t==="connecting"||t==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.getApiV1RemotecontrolStatus().subscribe({next:i=>this.#t(i),error:i=>this.#i(i)})},5e3)),e.IsRegistering&&e.CanEnable&&this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:i=>this.#t(i)})}#i(e){this.#e.getApiV1RemotecontrolStatus().subscribe({next:t=>{console.log("next",t),this.#t(t)}})}refreshRemoteControlStatus(){this.#e.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}beginRemoteRegistration(e=!1){this.state.set("registering"),this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:e?this.customRegisterUrl():this.registerUrl()}}).subscribe({next:t=>this.#t(t),error:t=>this.#i(t)})}cancelRemoteRegistration(){this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}enableRemoteControl(){this.#e.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}disableRemoteControl(){this.#e.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}deleteRemoteControl(){let e=this;this.#s.open(m,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete the console registration?`,confirmText:$localize`Delete registration`,cancelText:$localize`Cancel`},closed:t=>{t&&e.#e.deleteApiV1RemotecontrolRegistration().subscribe({next:i=>e.#t(i),error:i=>e.#i(i)})}})}static \u0275fac=function(t){return new(t||o)};static \u0275prov=n({token:o,factory:o.\u0275fac,providedIn:"root"})};export{f as a};
@@ -0,0 +1 @@
1
+ import{a as St}from"./chunk-GMNCWLGX.js";import{b as Oe,c as gt,d as Et}from"./chunk-ZT73LBZD.js";import{a as pt,b as Ve,c as Ct}from"./chunk-TJYZBTTS.js";import{a as ct}from"./chunk-L4FZSDG5.js";import{b as re}from"./chunk-FBWFZMGL.js";import{a as dt}from"./chunk-WILUKPQ3.js";import{a as Re}from"./chunk-NEV6JB5M.js";import{b as ut}from"./chunk-BKANUILG.js";import{B as se,F as st,H as Z,L as lt,P as le,V as rt,W as Me,Y as _t,b as Fe,c as q,d as he,e as Y,f as Ne,h as et,i as oe,j as fe,k as tt,n as nt,o as it,p as Pe,q as Ae,r as De,s as ae,t as ye,u as Q,w as ot,z as at}from"./chunk-RYXU2QDS.js";import{b as ie,d as j}from"./chunk-GO4NSDR6.js";import{$ as g,Ab as l,Bb as T,E as $e,Fb as v,Gb as k,Ib as $,Mc as L,Pa as r,Pb as S,Qb as m,Qc as ke,R as Ce,Rb as N,Rc as Be,Sc as Te,Ub as be,Vb as h,W as y,Xb as u,aa as E,cb as z,cc as ge,dc as Ee,gc as Se,hb as qe,jc as G,kb as Ye,kc as ve,la as p,lc as Ze,na as ne,oc as R,pc as O,qc as w,rb as Qe,sb as A,tb as D,ub as Ge,wb as Ue,xb as xe,xc as me,yb as F,zb as s}from"./chunk-XYHHESIX.js";import{a as X,b as H}from"./chunk-7CGTOI24.js";var we=class o{fromString(t){if(!t)return null;let e=t.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(t,e){return`${t}${e}`}static \u0275fac=function(e){return new(e||o)};static \u0275prov=Ce({token:o,factory:o.\u0275fac,providedIn:"root"})};function ce(o){if(Ye(o))return o();if(Array.isArray(o))return o.map(t=>ce(t));if(typeof o=="object"&&o!==null){let t={};for(let e in o)o.hasOwnProperty(e)&&(t[e]=ce(o[e]));return t}return o}function Nt(o,t){if(o&1){let e=$();s(0,"div",27)(1,"sh-form-field")(2,"label",28),N(3,8),l(),s(4,"input",29,0),w("ngModelChange",function(i){g(e);let a=u(2);return O(a.scheduleFields.nextTime.time,i)||(a.scheduleFields.nextTime.time=i),E(i)}),l(),s(6,"sh-icon",30),G(7,"clock"),l()(),s(8,"sh-datepicker-input",31)(9,"label",32),G(10,"\xA0"),l(),s(11,"input",33,1),w("ngModelChange",function(i){g(e);let a=u(2);return O(a.scheduleFields.nextTime.date,i)||(a.scheduleFields.nextTime.date=i),E(i)}),l(),s(13,"sh-icon",30),G(14,"calendar"),l()()(),s(15,"div",27)(16,"sh-form-field")(17,"label",34),N(18,9),l(),s(19,"input",35),w("ngModelChange",function(i){g(e);let a=u(2);return O(a.scheduleFields.runAgain.repeatValue,i)||(a.scheduleFields.runAgain.repeatValue=i),E(i)}),l()(),s(20,"sh-select",36)(21,"input",37),w("ngModelChange",function(i){g(e);let a=u(2);return O(a.scheduleFields.runAgain.repeatUnit,i)||(a.scheduleFields.runAgain.repeatUnit=i),E(i)}),l()()(),s(22,"sh-toggle-card",38),v(23,39),N(24,10),k(),s(25,"div",40)(26,"sh-toggle",25),S(27,11),s(28,"input",26),w("ngModelChange",function(i){g(e);let a=u(2);return O(a.scheduleFields.runAgain.allowedDays.mon,i)||(a.scheduleFields.runAgain.allowedDays.mon=i),E(i)}),l(),m(),l(),s(29,"sh-toggle",25),S(30,12),s(31,"input",26),w("ngModelChange",function(i){g(e);let a=u(2);return O(a.scheduleFields.runAgain.allowedDays.tue,i)||(a.scheduleFields.runAgain.allowedDays.tue=i),E(i)}),l(),m(),l(),s(32,"sh-toggle",25),S(33,13),s(34,"input",26),w("ngModelChange",function(i){g(e);let a=u(2);return O(a.scheduleFields.runAgain.allowedDays.wed,i)||(a.scheduleFields.runAgain.allowedDays.wed=i),E(i)}),l(),m(),l(),s(35,"sh-toggle",25),S(36,14),s(37,"input",26),w("ngModelChange",function(i){g(e);let a=u(2);return O(a.scheduleFields.runAgain.allowedDays.thu,i)||(a.scheduleFields.runAgain.allowedDays.thu=i),E(i)}),l(),m(),l(),s(38,"sh-toggle",25),S(39,15),s(40,"input",26),w("ngModelChange",function(i){g(e);let a=u(2);return O(a.scheduleFields.runAgain.allowedDays.fri,i)||(a.scheduleFields.runAgain.allowedDays.fri=i),E(i)}),l(),m(),l(),s(41,"sh-toggle",25),S(42,16),s(43,"input",26),w("ngModelChange",function(i){g(e);let a=u(2);return O(a.scheduleFields.runAgain.allowedDays.sat,i)||(a.scheduleFields.runAgain.allowedDays.sat=i),E(i)}),l(),m(),l(),s(44,"sh-toggle",25),S(45,17),s(46,"input",26),w("ngModelChange",function(i){g(e);let a=u(2);return O(a.scheduleFields.runAgain.allowedDays.sun,i)||(a.scheduleFields.runAgain.allowedDays.sun=i),E(i)}),l(),m(),l()()()}if(o&2){let e=u(2);r(4),R("ngModel",e.scheduleFields.nextTime.time),r(7),R("ngModel",e.scheduleFields.nextTime.date),r(8),R("ngModel",e.scheduleFields.runAgain.repeatValue),r(),F("options",e.unitOptions)("isClearable",!1),r(),R("ngModel",e.scheduleFields.runAgain.repeatUnit),r(),F("disallowToggle",!0),r(6),R("ngModel",e.scheduleFields.runAgain.allowedDays.mon),r(3),R("ngModel",e.scheduleFields.runAgain.allowedDays.tue),r(3),R("ngModel",e.scheduleFields.runAgain.allowedDays.wed),r(3),R("ngModel",e.scheduleFields.runAgain.allowedDays.thu),r(3),R("ngModel",e.scheduleFields.runAgain.allowedDays.fri),r(3),R("ngModel",e.scheduleFields.runAgain.allowedDays.sat),r(3),R("ngModel",e.scheduleFields.runAgain.allowedDays.sun)}}function ft(o,t){if(o&1){let e=$();s(0,"div",24)(1,"sh-toggle",25),S(2,6),s(3,"input",26),w("ngModelChange",function(i){g(e);let a=u();return O(a.scheduleFields.autoRun,i)||(a.scheduleFields.autoRun=i),E(i)}),l(),m(),l(),s(4,"p"),N(5,7),l()(),A(6,Nt,47,14)}if(o&2){let e=u();r(3),R("ngModel",e.scheduleFields.autoRun),r(3),D(e.scheduleFields.autoRun()?6:-1)}}var Pt=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],Ie=[{key:$localize`Daily 13:00`,value:"daily",data:{autoRun:!0,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!0,tue:!0,wed:!0,thu:!0,fri:!0,sat:!0,sun:!0}}}},{key:$localize`Weekdays 13:00`,value:"weekdays",data:{autoRun:!0,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!0,tue:!0,wed:!0,thu:!0,fri:!0,sat:!1,sun:!1}}}},{key:$localize`Weekly monday 13:00`,value:"weekly",data:{autoRun:!0,nextTime:{time:"13:00:00",date:At().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"W",allowedDays:{mon:!0,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}}},{key:$localize`Manual`,value:"manual",data:{autoRun:!0,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!0,tue:!0,wed:!0,thu:!0,fri:!0,sat:!0,sun:!0}}}}];function mt(o){if(!o.autoRun)return null;let t=[o.runAgain.allowedDays.mon?"Monday":null,o.runAgain.allowedDays.tue?"Tuesday":null,o.runAgain.allowedDays.wed?"Wednesday":null,o.runAgain.allowedDays.thu?"Thursday":null,o.runAgain.allowedDays.fri?"Friday":null,o.runAgain.allowedDays.sat?"Saturday":null,o.runAgain.allowedDays.sun?"Sunday":null].filter(c=>c!==null),e=o.nextTime.time.split(":"),n=new Date(o.nextTime.date);n.setHours(parseInt(e[0])),n.setMinutes(parseInt(e[1]));let i=o.runAgain.repeatValue,a=o.runAgain.repeatUnit;return{Time:n.toISOString(),Repeat:`${i}${a}`,AllowedDays:t}}function At(){let o=new Date,t=o.getDay(),e=t===1?7:(8-t)%7;return o.setDate(o.getDate()+e),o.setHours(12,0,0,0),o}var Xe=()=>({autoRun:p(!0),nextTime:{time:p("13:00"),date:p(new Date().toISOString().split("T")[0])},runAgain:{repeatValue:p(1),repeatUnit:p("D"),allowedDays:{mon:p(!0),tue:p(!0),wed:p(!0),thu:p(!0),fri:p(!0),sat:p(!0),sun:p(!0)}}}),Ke=class o{#e=y(ee);#t=y(j);#i=y(ie);unitOptions=Pt;scheduleFields=this.#e.scheduleFields;scheduleType=this.#e.scheduleType;scheduleOptions=Ie;updateScheduleType(t){let e=Ie.find(n=>n.value===t);if(e&&e?.value!=="manual"){this.scheduleType.set(e.value);let n=e.data;this.scheduleFields.autoRun.set(n.autoRun??!1),this.scheduleFields.nextTime.time.set(n.nextTime?.time??"13:00"),this.scheduleFields.nextTime.date.set(n.nextTime?.date??new Date().toISOString().split("T")[0]),this.scheduleFields.runAgain.repeatValue.set(n.runAgain?.repeatValue??1),this.scheduleFields.runAgain.repeatUnit.set(n.runAgain?.repeatUnit??"D"),this.scheduleFields.runAgain.allowedDays.mon.set(n.runAgain?.allowedDays?.mon??!0),this.scheduleFields.runAgain.allowedDays.tue.set(n.runAgain?.allowedDays?.tue??!0),this.scheduleFields.runAgain.allowedDays.wed.set(n.runAgain?.allowedDays?.wed??!0),this.scheduleFields.runAgain.allowedDays.thu.set(n.runAgain?.allowedDays?.thu??!0),this.scheduleFields.runAgain.allowedDays.fri.set(n.runAgain?.allowedDays?.fri??!0),this.scheduleFields.runAgain.allowedDays.sat.set(n.runAgain?.allowedDays?.sat??!0),this.scheduleFields.runAgain.allowedDays.sun.set(n.runAgain?.allowedDays?.sun??!0)}else this.scheduleType.set("manual")}goBack(){this.#t.navigate(["source"],{relativeTo:this.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["options"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=z({type:o,selectors:[["app-schedule"]],decls:13,vars:4,consts:()=>{let t;t=$localize`Select an option...`;let e;e=$localize`Schedule`;let n;n=$localize`${"\uFFFD#4\uFFFD\uFFFD/#4\uFFFD"}:TAG_INPUT:`;let i;i=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let a;a=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let c;c=$localize` Automatically run backups ${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:TAG_INPUT:`;let C;C=$localize`If a date was missed, the job will run as soon as possible.`;let _;_=$localize`Next time`;let d;d=$localize`Run again every`;let I;I=$localize`Allowed days`;let U;U=$localize` Monday ${"\uFFFD#28\uFFFD\uFFFD/#28\uFFFD"}:TAG_INPUT:`;let V;V=$localize` Tuesday ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Wednesday ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let x;x=$localize` Thursday ${"\uFFFD#37\uFFFD\uFFFD/#37\uFFFD"}:TAG_INPUT:`;let W;W=$localize` Friday ${"\uFFFD#40\uFFFD\uFFFD/#40\uFFFD"}:TAG_INPUT:`;let J;J=$localize` Saturday ${"\uFFFD#43\uFFFD\uFFFD/#43\uFFFD"}:TAG_INPUT:`;let b;return b=$localize` Sunday ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],e,n,i,a,c,C,_,d,I,U,V,K,x,W,J,b,[1,"title-30"],["label","key","value","value",3,"isClearable","options"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","ngModel"],["suffix",""],[1,"primary","sharp"],["for","date"],["type","date","id","date",3,"ngModelChange","ngModel"],["for","repeatValue"],["type","number","id","repeatValue",3,"ngModelChange","ngModel"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit",3,"ngModelChange","ngModel"],[3,"disallowToggle"],["title",""],[1,"days-wrap"]]},template:function(e,n){e&1&&(s(0,"h3",18),N(1,2),l(),s(2,"sh-select",19),S(3,3),s(4,"input",20),h("ngModelChange",function(a){return n.updateScheduleType(a)}),l(),m(),l(),A(5,ft,7,2),s(6,"div",21)(7,"button",22),h("click",function(){return n.goBack()}),S(8,4),T(9,"sh-icon"),m(),l(),s(10,"button",23),h("click",function(){return n.next()}),S(11,5),T(12,"sh-icon"),m(),l()()),e&2&&(r(2),F("isClearable",!1)("options",n.scheduleOptions),r(2),F("ngModel",n.scheduleType()),r(),D(n.scheduleType()==="manual"?5:-1))},dependencies:[ae,q,tt,Fe,Y,oe,Z,Me,Q,se,le,rt,st],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem;padding:2.5rem 2.5rem 1.5rem;display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function Dt(o,t){if(o&1){let e=$();s(0,"sh-select",2)(1,"input",6),w("ngModelChange",function(i){g(e);let a=u();return O(a.internalPath,i)||(a.internalPath=i),E(i)}),h("ngModelChange",function(){g(e);let i=u();return E(i.updateFilter())}),l()()}if(o&2){let e=u();F("options",e.fileGroupOptions())("isClearable",!1)("selectMultiple",!0),r(),R("ngModel",e.internalPath)}}function yt(o,t){if(o&1&&(v(0,7),G(1),k()),o&2){let e,n=u(2);r(),ve((e=n.currentExpressionOption())==null?null:e.startsWith)}}function Mt(o,t){if(o&1&&(v(0,8),G(1),k()),o&2){let e,n=u(2);r(),ve((e=n.currentExpressionOption())==null?null:e.endsWith)}}function Rt(o,t){if(o&1){let e=$();s(0,"sh-form-field",3)(1,"input",6),w("ngModelChange",function(i){g(e);let a=u();return O(a.internalPath,i)||(a.internalPath=i),E(i)}),h("ngModelChange",function(){g(e);let i=u();return E(i.updateFilter())}),l(),A(2,yt,2,1,"ng-container",7),A(3,Mt,2,1,"ng-container",8),l()}if(o&2){let e,n,i=u();r(),R("ngModel",i.internalPath),r(),D(!((e=i.currentExpressionOption())==null||e.startsWith==null)&&e.startsWith.length?2:-1),r(),D(!((n=i.currentExpressionOption())==null||n.endsWith==null)&&n.endsWith.length?3:-1)}}var Ot=[{key:"Applications",value:"Applications"},{key:"CacheFiles",value:"Cache Files"},{key:"TemporaryFiles",value:"Temporary Files"},{key:"OperatingSystem",value:"Operating System"},{key:"SystemFiles",value:"System Files"},{key:"DefaultExcludes",value:"Standard Excludes"}],wt=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Exclude file groups",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],Le=class o{path=Be.required();osType=Be();pathChange=ke();remove=ke();internalPath=p("");pathType=p("-Expression");currentExpressionOption=L(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});fileGroupOptions=p(Ot);expressionOptions=L(()=>{let e=this.osType()==="Windows"?"\\":"/";return wt.map(n=>n.value==="-Folder"||n.value==="+Folder"?H(X({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?H(X({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?H(X({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?H(X({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?H(X({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?H(X({},n),{startsWith:"*.",endsWith:""}):H(X({},n),{startsWith:"",endsWith:""}))});pathEffect=ne(()=>{let t=this.path(),e=t.slice(1),n=t.startsWith("-")?"-":"+",i=this.osType()==="Windows",a=i?"\\":"/";e.startsWith("%")&&e.endsWith(a)||i&&e.slice(2).startsWith(a)&&e.endsWith(a)||e.startsWith(a)&&e.endsWith(a)?(this.pathType.set(`${n}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${a}`)?(this.pathType.set(`${n}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${a}]*]`)?(this.pathType.set(`${n}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${n}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${n}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${n}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${n}Expression`),this.internalPath.set(e))});updateFilter(){let t=this.internalPath(),e=this.currentExpressionOption();t!==""&&this.pathChange.emit(`${e?.value.slice(0,1)}${e?.startsWith??""}${t}${e?.endsWith??""}`)}removeFilter(){this.remove.emit()}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=z({type:o,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:7,vars:4,consts:()=>{let t;return t=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],["value","key","label","value",1,"expression-input",3,"options","isClearable","selectMultiple"],[1,"expression-input"],[1,"filter-removal",3,"click"],[1,"sh-primary"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""]]},template:function(e,n){if(e&1&&(s(0,"sh-select",0)(1,"input",1),w("ngModelChange",function(a){return O(n.pathType,a)||(n.pathType=a),a}),h("ngModelChange",function(){return n.updateFilter()}),l()(),A(2,Dt,2,4,"sh-select",2)(3,Rt,4,3,"sh-form-field",3),s(4,"div",4),h("click",function(){return n.removeFilter()}),s(5,"sh-icon",5),G(6,"x-circle"),l()()),e&2){let i;F("options",n.expressionOptions())("isClearable",!1),r(),R("ngModel",n.pathType),r(),D(((i=n.currentExpressionOption())==null?null:i.value)=="-FileGroup"||((i=n.currentExpressionOption())==null?null:i.value)=="+FileGroup"?2:3)}},dependencies:[ae,q,Y,oe,le,Z,Q],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}.expression-input[_ngcontent-%COMP%]{--ff-suffix-bg: var(--base-2)}.filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var It=["formRef"],ze=()=>({standalone:!0});function Lt(o,t){if(o&1){let e=$();s(0,"sh-form-field",41)(1,"input",42),w("ngModelChange",function(i){g(e);let a=u(2);return O(a.editingPath,i)||(a.editingPath=i),E(i)}),l()(),s(2,"button",43),h("click",function(){g(e);let i=u(2);return E(i.updatePath())}),s(3,"sh-icon"),G(4,"floppy-disk"),l()(),s(5,"button",43),h("click",function(){g(e);let i=u(2);return E(i.cancelEditPath())}),s(6,"sh-icon"),G(7,"x-bold"),l()()}if(o&2){let e=u(2);r(),R("ngModel",e.editingPath),F("ngModelOptions",me(2,ze))}}function $t(o,t){if(o&1){let e=$();s(0,"sh-form-field",41),T(1,"input",44),l(),s(2,"button",43),h("click",function(){g(e);let i=u().$implicit,a=u();return E(a.editPath(i))}),s(3,"sh-icon"),G(4,"pen"),l()(),s(5,"button",43),h("click",function(){g(e);let i=u().$implicit,a=u();return E(a.removePath(i))}),s(6,"sh-icon"),G(7,"trash-simple"),l()()}if(o&2){let e=u().$implicit;Qe("readonly",!0),r(),F("ngModel",e)("ngModelOptions",me(3,ze))}}function Gt(o,t){if(o&1&&(s(0,"div",30),A(1,Lt,8,3)(2,$t,8,4),l()),o&2){let e=t.$implicit,n=u();r(),D(n.oldPath()===e?1:2)}}function Ut(o,t){if(o&1){let e=$();s(0,"app-new-filter",46),h("pathChange",function(i){let a=g(e).$index,c=u(2);return E(c.patchPathAt(i,a))})("remove",function(){let i=g(e).$index,a=u(2);return E(a.removePathAt(i))}),l()}if(o&2){let e=t.$implicit,n=u(2);F("path",e)("osType",n.osType()??"")}}function xt(o,t){if(o&1&&Ue(0,Ut,1,2,"app-new-filter",45,Ge),o&2){let e=u();xe(e.pathArray())}}function bt(o,t){if(o&1){let e=$();s(0,"div",31)(1,"app-size",47),h("ngModelChange",function(i){g(e);let a=u();return E(a.updateFilesLargerThan(i))}),l()()}if(o&2){let e=u();r(),F("ngModel",e.filesLargerThan())("ngModelOptions",me(2,ze))}}var B=new De,Tt=(o={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>B.group({path:B.control(o.path),excludes:B.group({hidden:B.control(o.excludes.hidden),system:B.control(o.excludes.system),temporary:B.control(o.excludes.temporary),filesLargerThan:B.group({size:B.control(null),unit:B.control(null)})})}),He=class o{#e=y(ee);#t=y(j);#i=y(ie);formRef=Te.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new et("");filesLargerThan=L(()=>{let t=this.sourceDataFormSignal()?.excludes?.filesLargerThan??{};return t.size!==null&&t.unit!==null?`${t.size}${t.unit}`:null});osType=this.#e.osType;pathSignal=re(this.sourceDataForm.controls.path.valueChanges);pathArray=L(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=L(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=p(null);editingPath=p(null);addingNewPath=p(!1);editPath(t){this.oldPath.set(t),this.editingPath.set(t)}updateFilesLargerThan(t){let{size:e,unit:n}=Oe(t);this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:e,unit:n})}updatePath(){let t=this.oldPath(),e=this.editingPath();if(!t||!e||e===t){this.oldPath.set(null),this.editingPath.set(null);return}let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(n?.replace(t,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(t){let n=(this.sourceDataForm.controls.path.value??"").split("\0"),i=n.indexOf(t);if(i===-1)return;n.splice(i,1);let a=n.filter(c=>c&&c!=="").join("\0");this.sourceDataForm.controls.path.setValue(a)}addFilter(t="-*"){let n=[this.sourceDataForm.controls.path.value,t].filter(i=>i&&i!=="").join("\0");this.sourceDataForm.controls.path.setValue(n)}patchPathAt(t,e){let i=this.sourceDataForm.controls.path.value.split("\0").filter(C=>!C.startsWith("-")&&!C.startsWith("+")).join("\0"),a=this.pathArray().map((C,_)=>_===e?`${t}`:`${C}`).join("\0"),c=[i,a].filter(C=>C&&C!=="").join("\0");this.sourceDataForm.controls.path.setValue(c)}removePathAt(t){let n=this.sourceDataForm.controls.path.value.split("\0").filter(c=>!c.startsWith("-")&&!c.startsWith("+")).join("\0"),i=this.pathArray().filter((c,C)=>C!==t).join("\0"),a=[n,i].filter(c=>c&&c!=="").join("\0");this.sourceDataForm.controls.path.setValue(a)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let t=this.sourceDataForm.controls.path.value,e=this.newPathCtrl.value,n=t?.split("\0")||[];e&&!n.includes(e)&&n.push(e);let i=n.filter(a=>a&&a!=="").join("\0");this.sourceDataForm.controls.path.setValue(i),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["schedule"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=z({type:o,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&ge(n.formRef,It,5),e&2&&Ee()},decls:56,vars:12,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Add a direct path`;let n;n=$localize`Hidden files`;let i;i=$localize`System files`;let a;a=$localize`Temporary files`;let c;c=$localize`Source Data`;let C;C=$localize`Folder path`;let _;_=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let d;d=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let I;I=$localize`Paths`;let U;U=$localize`Add a path directly from your machine.`;let V;V=$localize`Filters`;let K;K=$localize`Customize your filters.`;let x;x=$localize`Add filter`;let W;W=$localize`Exclude`;let J;J=$localize`Choose if there’s any files you want to exclude.`;let b;b=$localize` Files with the Hidden attribute ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let f;f=$localize` Files with the System attribute ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let _e;_e=$localize` Files with the Temporary attribute ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let ue;ue=$localize` Files larger than `;let P;return P=$localize`Edit path`,[["formRef",""],c,C,_,d,I,U,V,K,x,W,J,b,f,_e,ue,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,"formControlName","path"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"paths"],[1,"path"],[1,"row-inputs"],["type","text","placeholder",e,3,"formControl"],["shButton","","type","button",1,"raised","primary",3,"click"],["type","button","shButton","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",n,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",a,"formControlName","temporary"],[1,"raised","primary",3,"click"],[1,"small"],["type","text","placeholder",P,3,"ngModelChange","ngModel","ngModelOptions"],["shButton","","type","button",1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],[3,"ngModelChange","ngModel","ngModelOptions"]]},template:function(e,n){if(e&1){let i=$();s(0,"form",16,0),h("submit",function(){return g(i),E(n.next())}),s(2,"div",17)(3,"h3",18),N(4,1),l(),s(5,"app-file-tree",19)(6,"label",20),N(7,2),l(),T(8,"input",21),l(),s(9,"div",22)(10,"button",23),h("click",function(){return g(i),E(n.goBack())}),S(11,3),T(12,"sh-icon"),m(),l(),s(13,"button",24),S(14,4),T(15,"sh-icon"),m(),l()()(),s(16,"div",25)(17,"app-toggle-card",26),v(18,27),N(19,5),k(),s(20,"p",28),N(21,6),l(),s(22,"div",29),Ue(23,Gt,3,1,"div",30,Ge),s(25,"div",31)(26,"sh-form-field"),T(27,"input",32),l(),s(28,"button",33),h("click",function(){return g(i),E(n.addNewPath())}),s(29,"sh-icon"),G(30,"plus"),l()()()()(),s(31,"app-toggle-card",26),v(32,27),N(33,7),k(),s(34,"p",28),N(35,8),l(),s(36,"button",34),h("click",function(){return g(i),E(n.addFilter())}),N(37,9),l(),A(38,xt,2,0),l(),s(39,"app-toggle-card",35),v(40,27),N(41,10),k(),s(42,"p",28),N(43,11),l(),s(44,"sh-toggle",36),S(45,12),T(46,"input",37),m(),l(),s(47,"sh-toggle",36),S(48,13),T(49,"input",38),m(),l(),s(50,"sh-toggle",36),S(51,14),T(52,"input",39),m(),l(),s(53,"sh-toggle",40),h("click",function(){return g(i),E(n.toggleFilesLargerThan())}),N(54,15),l(),A(55,bt,2,3,"div",31),l()()()}if(e&2){let i;F("formGroup",n.sourceDataForm),r(5),F("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0),r(12),F("disallowToggle",!0),r(6),xe(n.nonFilterPaths()),r(4),F("formControl",n.newPathCtrl),r(4),F("disallowToggle",!0),r(7),D((i=n.pathSignal())!=null&&i.length?38:-1),r(),F("disallowToggle",!0),r(14),Se("active",n.filesLargerThan()),r(2),D(n.filesLargerThan()?55:-1)}},dependencies:[ae,fe,q,Fe,Y,Ne,oe,ye,nt,Ae,Pe,it,Z,Q,se,Me,Le,Et,St,gt],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-4)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}sh-divider[_ngcontent-%COMP%]{margin:.75rem 0}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.25rem}.paths[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;overflow:auto}.path[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr min-content min-content;gap:.25rem}"],changeDetection:0})};var Ft="1W:1D,4W:1W,12M:1M",ee=class o{#e=y(j);#t=y(Re);#i=y(at);#n=y(ut);#r=y(ct);#a=y(we);generalForm=ht();sourceDataForm=Tt();scheduleFields=Xe();scheduleType=p("daily");settings=p([]);optionsFields={remoteVolumeSize:p("50MB"),backupRetention:p("all"),backupRetentionTime:p(""),backupRetentionVersions:p(0),backupRetentionCustom:p("")};targetUrlModel=p(null);backupMetadata=p(null);isDraft=p(!1);backupId=p(null);backupName=L(()=>this.generalFormSignal()?.name??"");isSubmitting=p(!1);finishedLoading=p(!1);backupDefaults=p(null);applicationOptions=p(null);isNew=L(()=>this.backupId()==="new");osType=L(()=>this.#t.systemInfo()?.OSType);selectedOptions=p([]);sourceDataFormSignal=re(this.sourceDataForm.valueChanges);generalFormSignal=re(this.generalForm.valueChanges);encryptionFieldSignal=re(this.generalForm.controls.encryption.valueChanges);advancedOptions=L(()=>this.#t.systemInfo()?.Options?.map(this.#u)??[]);#o=p("");#s=p(null);#l=null;testSignal=this.#o.asReadonly();testErrorMessage=this.#s.asReadonly();#p=ne(()=>{let t=this.targetUrlModel(),e=this.#o(),n=this.#l;this.#l=t,!(e==="testing"||n===null||n===t)&&(this.#o.set(""),this.#s.set(null))});setTestState(t,e){this.#o.set(t),this.#s.set(e??null)}#u(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=L(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[pe,...t]});nonSelectedOptions=L(()=>this.advancedOptions().sort((t,e)=>t?.name&&e?.name?t?.name.localeCompare(e?.name):0).filter(t=>this.selectedOptions()?.findIndex(e=>e.name===t.name)===-1));submit(t=!1){this.isSubmitting.set(!0);let e=this.#d(),n=this.backupId();this.isDraft()&&e.Backup&&(e.Backup.Metadata=this.backupMetadata()),n==="new"||!n||this.isDraft()?this.#n.postApiV1Backups({requestBody:e}).pipe($e(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{t||this.exit(!1)},error:()=>{}}):this.#n.putApiV1BackupById({id:n,requestBody:e}).pipe($e(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{t||this.exit(!1)},error:()=>{}})}exit(t){if(!t){this.#_(),this.#e.navigate(["/"]);return}this.#i.open(dt,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#_(),this.#e.navigate(["/"]))}})}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(C=>`${C.Include?"":"-"}${C.Expression}`)??[],i=t.Settings?.find(C=>C.Name==="--exclude-files-attributes")?.Value?.toLowerCase()?.split(",")??[],a=t.Settings?.find(C=>C.Name==="--skip-files-larger-than")?.Value?.toUpperCase()??null,c={path:[...e,...n].join("\0"),excludes:{hidden:i.includes("hidden"),system:i.includes("system"),temporary:i.includes("temporary"),filesLargerThan:a===null?void 0:Oe(a)}};this.sourceDataForm.patchValue(c)}mapDestinationToForm(t){this.targetUrlModel.set(t.TargetURL??"")}mapGeneralToForm(t){let e=t.Name??"",n=t.Description??"",i=t.Settings?.find(d=>d.Name==="encryption-module"),a=t.Settings?.find(d=>d.Name==="passphrase")?.Value??"",c=i?.Value&&i.Value.length?i.Value:"",C=t.Settings?.find(d=>d.Name==="compression-module")?.Value??"",_={name:t.Name??"",description:t.Description??""};e&&e!==""&&(_.name=e),n&&n!==""&&(_.description=n),c&&c!==""&&(_.encryption=c),a&&a!==""&&(_.password=a,_.repeatPassword=a),C&&C!==""&&(_.compression=C),this.generalForm.patchValue(_)}mapScheduleToForm(t){if(!t){this.scheduleType.set("manual"),this.scheduleFields.autoRun.set(!1);return}let e=this.#a.fromString(t.Repeat)??null,n=this.#c(t.Time);this.scheduleFields.autoRun.set(!0),n.date&&this.scheduleFields.nextTime.date.set(n.date),this.scheduleFields.nextTime.time.set(n.time),this.scheduleFields.runAgain.repeatUnit.set(e?.unit??"D"),this.scheduleFields.runAgain.repeatValue.set(e?.value??1),this.scheduleFields.runAgain.allowedDays.mon.set(t.AllowedDays?.includes("mon")??!1),this.scheduleFields.runAgain.allowedDays.tue.set(t.AllowedDays?.includes("tue")??!1),this.scheduleFields.runAgain.allowedDays.wed.set(t.AllowedDays?.includes("wed")??!1),this.scheduleFields.runAgain.allowedDays.thu.set(t.AllowedDays?.includes("thu")??!1),this.scheduleFields.runAgain.allowedDays.fri.set(t.AllowedDays?.includes("fri")??!1),this.scheduleFields.runAgain.allowedDays.sat.set(t.AllowedDays?.includes("sat")??!1),this.scheduleFields.runAgain.allowedDays.sun.set(t.AllowedDays?.includes("sun")??!1);let i=ce(this.scheduleFields),a=Ie.find(c=>JSON.stringify(c.data)===JSON.stringify(i));a?this.scheduleType.set(a.value):this.scheduleType.set("manual")}mapOptionsToForms(t,e=!1){let n=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],i=(t.Settings??[]).map(_=>_);if(e){let _=this.#r.serverSettings()??{};Object.keys(_).filter(d=>d.startsWith("--")).forEach(d=>{i.find(U=>U.Name===d)||i.push({Name:d,Value:_[d],Filter:null})})}let a=i.filter(_=>!n.includes(_.Name)),c=i.filter(_=>n.includes(_.Name));this.settings.set(a??[]),a?.forEach(_=>{if(_.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(_.Value??"")});var C="all";c?.forEach(_=>{if(_.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(_.Value??"50MB"),_.Name==="keep-time"&&(_.Value??"")!=="")return C="time",this.optionsFields.backupRetentionTime.set(_.Value??"");if(_.Name==="keep-versions"&&(_.Value??"")!=="")return C="versions",this.optionsFields.backupRetentionVersions.set(_.Value?parseInt(_.Value):null);if(_.Name==="retention-policy"&&(_.Value??"")!=="")if(_.Value===Ft)C="smart";else return C="custom",this.optionsFields.backupRetentionCustom.set(_.Value??"")}),this.optionsFields.backupRetention.set(C)}storeMetadata(t,e){this.backupMetadata.set(e?t.Metadata??null:null)}getScheduleFormValue(){let t=ce(this.scheduleFields);return mt(t)}#d(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,i=this.targetUrlModel(),a=n.path?.split("\0")??[],c=this.mapFormsToSettings(),C=Object.entries(n.excludes??{}).filter(([d,I])=>I&&d!=="filesLargerThan").map(([d])=>d),_=n.excludes?.filesLargerThan;return C.length&&c.push({Name:"--exclude-files-attributes",Value:C.join(",")}),_&&_.size!==null&&_.unit!==null&&c.push({Name:"--skip-files-larger-than",Value:`${_.size}${_.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:i??null,Sources:a.filter(d=>!(d.startsWith("-")||d.startsWith("+"))),Settings:c,Filters:a.filter(d=>d.startsWith("-")||d.startsWith("+")).map((d,I)=>({Order:I,Include:d.startsWith("+"),Expression:d.slice(1)}))},Schedule:e}}mapFormsToSettings(t=[]){let e=this.generalForm.value,n=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy","dblock-size","compression-module"],i=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&e.encryption!==pe.Key&&(i=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let a=[{Name:"compression-module",Value:e.compression}];e.compression===""&&(a=[]);let c=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":c.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":c.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":c.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":c.push({Name:"retention-policy",Value:Ft});break}let C=[...t,...n],_=this.settings().filter(d=>!C.includes(d.Name)).map(d=>{let I=d.Value;return typeof d.Value=="number"&&(I=d.Value.toString()),typeof d.Value=="boolean"&&(I=d.Value?"True":"False"),{Name:d.Name?.startsWith("--")?d.Name:`--${d.Name}`,Value:I}});return[...i,...a,...c,..._]}#c(t){if(!t||t?.indexOf("T")===-1)return{time:t??"13:00"};let e=new Date(t);return{time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`,date:e.toISOString().split("T")[0]}}setTargetUrl(t,e=!1){e&&(this.#l=null),this.targetUrlModel.set(t)}#_(){this.generalForm.reset(),this.sourceDataForm.reset(),this.scheduleFields=Xe(),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([]),this.targetUrlModel.set(null)}static \u0275fac=function(e){return new(e||o)};static \u0275prov=Ce({token:o,factory:o.\u0275fac,providedIn:"root"})};var vt=["formRef"];function kt(o,t){o&1&&(s(0,"sh-alert",17),S(1,5),T(2,"sh-icon",26),m(),l())}function Bt(o,t){if(o&1&&G(0),o&2){let e=t.$implicit;Ze(" ",e.DisplayName," ")}}function Vt(o,t){if(o&1&&T(0,"sh-progress-bar",40),o&2){let e=u(3);Se("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),F("value",e.calculatePasswordStrength()*(100/5))}}function Kt(o,t){o&1&&(s(0,"span",35),N(1,10),l())}function Wt(o,t){o&1&&(S(0,8,1),T(1,"sh-icon"),m())}function Jt(o,t){o&1&&(S(0,8,2),T(1,"sh-icon"),m())}function Xt(o,t){o&1&&(S(0,11,1),T(1,"sh-icon",42),m())}function Ht(o,t){o&1&&(S(0,11,2),T(1,"sh-icon"),m())}function zt(o,t){if(o&1){let e=$();s(0,"button",41),h("click",function(){g(e);let i=u(3);return E(i.copyPassword())}),S(1,11),A(2,Xt,2,0)(3,Ht,2,0),m(),l()}if(o&2){let e=u(3);r(2),D(e.copiedPassword()?2:3)}}function jt(o,t){o&1&&(s(0,"sh-alert",39),N(1,12),l())}function qt(o,t){if(o&1){let e=$();s(0,"div",30)(1,"sh-form-field")(2,"label",31),S(3,7),T(4,"sup"),m(),l(),T(5,"input",32),l(),A(6,Vt,1,9,"sh-progress-bar",33),s(7,"sh-form-field"),T(8,"input",34),A(9,Kt,2,0,"span",35),l(),s(10,"div",36)(11,"button",37),h("click",function(){g(e);let i=u(2);return E(i.showPassword.set(!i.showPassword()))}),S(12,8),A(13,Wt,2,0)(14,Jt,2,0),m(),l(),s(15,"button",37),h("click",function(){g(e);let i=u(2);return E(i.generatePassword())}),S(16,9),T(17,"sh-icon"),m(),l(),A(18,zt,4,1,"button",38),l(),A(19,jt,2,0,"sh-alert",39),l()}if(o&2){let e=u(2);r(5),F("type",e.showPassword()?"text":"password"),r(),D(e.generalForm.value.password?6:-1),r(2),F("type",e.showPassword()?"text":"password"),r(),D(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),r(4),D(e.showPassword()?13:14),r(5),D(e.showCopyPassword()?18:-1),r(),D(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function Yt(o,t){if(o&1&&(s(0,"sh-select",27)(1,"label",28),N(2,6),l(),T(3,"input",29),qe(4,Bt,1,1,"ng-template"),l(),A(5,qt,20,7,"div",30)),o&2){let e=u();F("options",e.encryptionOptions())("isClearable",!1),r(5),D(e.encryptionFieldSignal()!==e.noneOptionKey?5:-1)}}function Qt(o,t){if(o&1&&(s(0,"button",24),S(1,13),T(2,"sh-icon"),m(),l()),o&2){let e=u();F("disabled",e.nameAndDescriptionValid()===!1)}}function Zt(o,t){if(o&1&&(s(0,"button",25),S(1,14),T(2,"sh-icon"),m(),l()),o&2){let e=u();F("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var te=new De,ht=(o={name:"",description:"",encryption:"",password:"",repeatPassword:"",compression:""})=>te.group({name:te.control(o.name,[he.required]),description:te.control(o.description),encryption:te.control(o.encryption,[Ct()]),password:te.control(o.password,[Ve(t=>t?.value.encryption!=="",[he.required])]),repeatPassword:te.control(o.repeatPassword,[Ve(t=>t?.value.encryption!=="",[he.required])]),compression:te.control(o.compression)}),pe={Key:"-",DisplayName:"None"},je=class o{#e=y(j);#t=y(ie);#i=y(pt);#n=y(ee);#r=y(Re);formRef=Te.required("formRef");generalForm=this.#n.generalForm;generalFormSignal=this.#n.generalFormSignal;encryptionFieldSignal=this.#n.encryptionFieldSignal;encryptionOptions=this.#n.encryptionOptions;isNew=this.#n.isNew;showPassword=p(!1);copiedPassword=p(!1);showCopyPassword=p(!1);noneOptionKey=pe.Key;encryptionEffect=ne(()=>{this.encryptionFieldSignal()===pe.Key&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=L(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=L(()=>{let e=this.generalFormSignal()?.password??"";return this.#i.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#n.exit(!0)}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#a(t??""),this.copiedPassword.set(!0)}async#a(t){try{await navigator.clipboard.writeText(t)}catch{try{let n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let t=this.#i.generate(16);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#n.isNew()||this.#n.submit(!0),this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=z({type:o,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&ge(n.formRef,vt,5),e&2&&Ee()},decls:21,vars:4,consts:()=>{let t;t=$localize`Your backup name`;let e;e=$localize`Your backup description`;let n;n=$localize`Remember to copy the password`;let i;i=$localize`General backup settings`;let a;a=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let c;c=$localize`Backup description`;let C;C=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Exit `;let _;_=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Encrypted backup `;let d;d=$localize`Encryption`;let I;I=$localize`Encryption`;let U;U=$localize`Password`;let V;V=$localize`Repeat password`;let K;K=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let x;x=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,x=be(x);let W;W=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let J;J=$localize`Passwords do not match`;let b;b=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,b=be(b);let f;f=$localize` Tip: Be sure to save your password. If you lose it, you will lose access to your backups. `;let _e;_e=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ue;return ue=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],i,a,c,C,_,I,K,x,W,J,b,f,_e,ue,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],[1,"primary"],["for","backupName"],["type","text","tabindex","1","placeholder",t,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","shButton","",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],["shButton","","type","submit","shTooltip",n,1,"raised","primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",d,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",U,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",V,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,n){if(e&1){let i=$();s(0,"form",15,0),h("submit",function(){return g(i),E(n.next())}),s(2,"h3",16),N(3,1),l(),A(4,kt,3,0,"sh-alert",17),s(5,"sh-form-field")(6,"label",18),S(7,2),T(8,"sup"),m(),l(),T(9,"input",19),l(),s(10,"sh-form-field")(11,"label",20),N(12,3),l(),T(13,"textarea",21),l(),A(14,Yt,6,3),s(15,"div",22)(16,"button",23),h("click",function(){return g(i),E(n.exit())}),S(17,4),T(18,"sh-icon"),m(),l(),A(19,Qt,3,1,"button",24)(20,Zt,3,1,"button",25),l()()}if(e&2){let i;F("formGroup",n.generalForm),r(4),D(!n.isNew()&&((i=n.generalFormSignal())==null?null:i.encryption)!==""?4:-1),r(10),D(n.isNew()?14:-1),r(5),D(n.encryptionFieldSignal()===n.noneOptionKey||!n.isNew()?19:20)}},dependencies:[ye,fe,q,Y,Ne,Ae,Pe,Z,le,se,Q,lt,ot,_t],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-8)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}"],changeDetection:0})};export{ht as a,pe as b,je as c,Ie as d,mt as e,Xe as f,Ke as g,Tt as h,He as i,ee as j};
@@ -0,0 +1 @@
1
+ import{a as H}from"./chunk-EWA2R7BT.js";import{a as j}from"./chunk-AGPZBYW6.js";import{a as q}from"./chunk-L4FZSDG5.js";import"./chunk-FBWFZMGL.js";import"./chunk-WILUKPQ3.js";import"./chunk-NEV6JB5M.js";import"./chunk-BKANUILG.js";import{B as J,C as X,H as z,L as K,c as I,e as B,i as U,s as G,u as W,w as V}from"./chunk-RYXU2QDS.js";import{d as A}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{$ as m,Ab as l,Bb as T,Bc as $,Ib as f,Mc as O,Pa as a,Pb as S,Qb as N,Rb as p,Rc as v,Ub as D,Vb as h,W as E,Xb as s,aa as F,cb as b,ic as x,jc as g,la as P,na as M,oc as L,pc as w,qc as k,sb as c,tb as _,yb as y,zb as r}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";var Q=(t,n,e,i,o)=>({"loading-state":t,"ready-to-add-link":n,"is-connected":e,"failed-to-connect":i,"is-registered":o});function Y(t,n){t&1&&p(0,0,1)}function Z(t,n){t&1&&p(0,0,2)}function ee(t,n){if(t&1){let e=f();r(0,"button",10),h("click",function(){m(e);let o=s(2);return F(o.cancel())}),g(1,"Cancel registration"),l()}}function te(t,n){if(t&1&&(r(0,"div",7)(1,"p"),S(2,0),c(3,Y,1,0)(4,Z,1,0),N(),l(),T(5,"sh-progress-bar",8),c(6,ee,2,0,"button",9),l()),t&2){let e=s();a(3),_(e.state()==="unknown"?3:4),a(3),_((e.registeringCounter()??0)>=5&&e.state()==="registering"?6:-1)}}function ne(t,n){if(t&1){let e=f();r(0,"sh-form-field")(1,"label",11),p(2,1),l(),r(3,"input",12),k("ngModelChange",function(o){m(e);let d=s();return w(d.customRegisterUrl,o)||(d.customRegisterUrl=o),F(o)}),l()(),r(4,"button",13),h("click",function(){m(e);let o=s();return F(o.registerViaCustomUrl())}),p(5,2),l()}if(t&2){let e=s();a(3),L("ngModel",e.customRegisterUrl),a(),y("disabled",!e.customRegisterUrlValid())}}function ie(t,n){if(t&1){let e=f();r(0,"p"),p(1,3),l(),T(2,"sh-progress-bar",8),r(3,"button",10),h("click",function(){m(e);let o=s(2);return F(o.retryWhenFaulted())}),g(4,"Cancel"),l()}}function oe(t,n){if(t&1){let e=f();r(0,"p"),p(1,4),l(),r(2,"button",10),h("click",function(){m(e);let o=s(2);return F(o.retryWhenFaulted())}),g(3,"Retry"),l()}}function re(t,n){if(t&1&&c(0,ie,5,0)(1,oe,4,0),t&2){let e=s();_(e.claimUrl()!==null?0:1)}}function le(t,n){t&1&&(S(0,5,1),T(1,"p"),N())}function ae(t,n){t&1&&(S(0,5,2),T(1,"p"),N())}function se(t,n){if(t&1){let e=f();r(0,"sh-alert",14),S(1,5),c(2,le,2,0,"p")(3,ae,2,0,"p"),N(),l(),r(4,"button",10),h("click",function(){m(e);let o=s();return F(o.retryWhenFaulted())}),g(5," Retry "),r(6,"sh-icon"),g(7,"arrow-arc-left"),l()()}if(t&2){let e=s();a(2),_(e.typeParam()==="link"?2:3)}}function ce(t,n){t&1&&(r(0,"h3"),g(1,"Successfully connected"),l(),r(2,"p"),g(3,"We're going to redirect you to the home page"),l())}var R=class t{#t=E(A);#n=E(j);#e=E(H);#i=E(q);isOldOpen=P(!1);typeParam=v.required();state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;customRegisterUrl=this.#e.customRegisterUrl;additionalReportingUrl=O(()=>{let n=this.#i.serverSettings();return this.#e.state()==="inactive"?"":n&&n["additional-report-url"]||""});copiedReportingUrl=P(!1);customRegisterUrlValid=O(()=>{let n=this.customRegisterUrl(),e=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/;return!(n.length===0||!e.test(n))});registeringCounter=P(null);didTry=!1;triedFinishConnection=!1;stateEffect=M(()=>{let n=this.#e.registerUrl(),e=this.state(),i=this.typeParam(),o=this.registeringCounter();e==="inactive"&&i==="logon"&&n!==""&&(this.didTry||(this.#e.beginRemoteRegistration(),this.didTry=!0)),e==="registered"&&this.claimUrl()!==null&&(this.triedFinishConnection||(this.triedFinishConnection=!0,this.#o())),e==="registering"?(o===null&&this.registeringCounter.set(0),setTimeout(()=>{this.registeringCounter.set((o??0)+1)},1e3)):this.registeringCounter.set(null),(e==="connected"||e==="disabled"||e==="connecting")&&this.#t.navigate([""])});ngOnInit(){this.#e.refreshRemoteControlStatus()}#o(){let n=this.#e.claimUrl();this.#n.open(`${n}?closeAfterConnection=true`,"_blank")}registerViaCustomUrl(){this.#e.beginRemoteRegistration(!0)}retryWhenFaulted(){this.#e.cancelRemoteRegistration(),this.customRegisterUrl.set(""),this.didTry=!1,this.triedFinishConnection=!1,this.typeParam()==="logon"&&this.#t.navigate(["/welcome/select"])}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let n=this.additionalReportingUrl();n&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(n))}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=b({type:t,selectors:[["app-connect"]],inputs:{typeParam:[1,"typeParam"]},decls:6,vars:13,consts:()=>{let n;n=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Loading... ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE: Connecting to console ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let e;e=$localize`Paste registration URL here`;let i;i=$localize` Connect machine to console `;let o;o=$localize`We're now connecting you to the console`;let d;d=$localize`Something failed during registration we're missing claimUrl, please try again`;let u;return u=$localize` Failed to register ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: Check if the connection link are correct, alternatively it could be your internet connection or the service might be down ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: There might be a problem with your internet connection or the service might be down, please try again later ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,u=D(u),[n,e,i,o,d,u,[1,"main-card","type-b"],[1,"loader-content"],[1,"primary","indeterminate"],["shButton",""],["shButton","",3,"click"],["for","remoteControlRegisterUrl"],["type","text","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","shButton","",1,"raised","primary",3,"click","disabled"],[1,"error"]]},template:function(e,i){if(e&1&&(r(0,"sh-card",6),c(1,te,7,2,"div",7),c(2,ne,6,2),c(3,re,2,1),c(4,se,8,1),c(5,ce,4,0),l()),e&2){let o=i.state()==="unknown"||i.typeParam()!=="link"&&i.state()==="inactive"||i.state()==="registering",d=i.typeParam()==="link"&&i.state()==="inactive",u=i.state()==="connected"||i.state()==="disabled"||i.state()==="connecting",C=i.state()==="registeringfaulted";x($(7,Q,o,d,u,C,i.state()==="registered")),a(),_(o?1:-1),a(),_(d?2:-1),a(),_(i.state()==="registered"?3:-1),a(),_(C?4:-1),a(),_(u?5:-1)}},dependencies:[G,I,B,U,z,J,K,X,V,W],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:100%;width:100%;flex:1 0;overflow:hidden;padding:2rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{padding:1rem}}.main-card[_ngcontent-%COMP%]{width:100%;height:100%;max-width:31.25rem;max-height:min-content;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1rem;padding:2rem}.main-card.failed-to-connect[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}.main-card.failed-to-connect[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.main-card.is-registered[_ngcontent-%COMP%], .main-card.is-connected[_ngcontent-%COMP%]{align-items:center}.loader-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;width:100%}.loader-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{--pb-b: var(--base-3);border:1px solid var(--pb-b)}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}.state[_ngcontent-%COMP%]{position:fixed;top:1rem;right:1rem;margin:0;color:var(--base-7);font-size:.75rem}.old[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative;gap:.5rem;padding:1rem;border:1px solid var(--base-4);background:var(--base-1);position:fixed;top:0;right:0;bottom:0;width:35rem;transform:translate(100%)}.old.open[_ngcontent-%COMP%]{transform:translate(0)}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:.5rem;cursor:pointer;position:absolute;background-color:var(--base-1);border:1px solid var(--base-4);border-width:.0625rem 0 .0625rem .0625rem;width:2rem;height:2.5rem;border-radius:var(--shape-2) 0 0 var(--shape-2);top:3.75rem;left:-2rem;-webkit-user-select:none;user-select:none}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}"],changeDetection:0})};export{R as default};
@@ -0,0 +1,2 @@
1
+ import{b as j}from"./chunk-FBWFZMGL.js";import{b as z}from"./chunk-BKANUILG.js";import{B as X,u as U,y as W}from"./chunk-RYXU2QDS.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{$ as p,Ab as r,Bb as u,Ib as C,Ma as R,Pa as a,Pb as A,Qb as y,Rb as w,Vb as S,W as b,Xb as f,aa as _,cb as v,jc as s,kc as I,la as g,lc as h,mc as B,na as F,oc as $,p as E,pc as k,qc as G,sb as M,tb as N,ub as P,uc as V,wb as D,xb as x,xc as J,yb as m,zb as o}from"./chunk-XYHHESIX.js";import{a as T,b as O}from"./chunk-7CGTOI24.js";var q=()=>({maxWidth:"700px",width:"100%"});function H(l,t){if(l&1&&(o(0,"a",9)(1,"sh-icon"),s(2,"link"),r()()),l&2){let e=f().$implicit;m("href",V(e.Url),R)}}function K(l,t){if(l&1){let e=C();o(0,"div",2)(1,"h4"),s(2),M(3,H,3,2,"a",9),r(),o(4,"p"),s(5),u(6,"br"),o(7,"i"),s(8),r()(),o(9,"div",10)(10,"button",11),S("click",function(){let n=p(e).$implicit,c=f();return _(c.openLicense(n))}),A(11,1),u(12,"sh-icon"),y(),r()()()}if(l&2){let e=t.$implicit;a(2),B(" ",e.Title," - ",e.data==null?null:e.data.license," "),a(),N(e.Url?3:-1),a(2),h(" ",e.data==null?null:e.data.description," "),a(3),I(e.data==null?null:e.data.notes)}}var L=class l{#e=b(z);licenses=j(this.#e.getApiV1Licenses().pipe(E(t=>t.map(e=>O(T({},e),{data:e.Jsondata?JSON.parse(e.Jsondata):null})))));dialogIsOpen=g(!1);dialogLicense=g(null);#t=F(()=>{this.dialogLicense()&&this.dialogIsOpen.set(!0)});openLicense(t){this.dialogLicense.set(t)}closeLicense(){this.dialogIsOpen.set(!1),this.dialogLicense.set(null)}breakIntoLines(t){let e=t.split(`
2
+ `),i="";for(let n=0;n<e.length;n++)i+=`<li>${e[n]}</li>`;return i}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=v({type:l,selectors:[["app-libraries"]],decls:14,vars:5,consts:()=>{let t;t=$localize`Libraries`;let e;return e=$localize` Details ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-square-in${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`,[t,e,[1,"license"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"license-dialog"],["footer",""],["shButton","","type","button",3,"click"],[3,"href"],[1,"actions"],["shButton","",3,"click"]]},template:function(e,i){if(e&1){let n=C();o(0,"h3"),w(1,0),r(),D(2,K,13,5,"div",2,P),o(4,"sh-dialog",3),G("isOpenChange",function(d){return p(n),k(i.dialogIsOpen,d)||(i.dialogIsOpen=d),_(d)}),o(5,"header",4)(6,"h3"),s(7),r()(),o(8,"div",5)(9,"div",6),s(10),r()(),o(11,"footer",7)(12,"button",8),S("click",function(){return p(n),i.dialogLicense.set(null),_(i.dialogIsOpen.set(!1))}),s(13,"Close"),r()()()}if(e&2){let n,c;a(2),x(i.licenses()),a(2),$("isOpen",i.dialogIsOpen),m("options",J(4,q)),a(3),I((n=i.dialogLicense())==null?null:n.Title);let d=((c=i.dialogLicense())==null?null:c.License)??"";a(3),h(" ",d," ")}},dependencies:[U,X,W],styles:["[_nghost-%COMP%]{display:block;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}h4[_ngcontent-%COMP%]{font:var(--paragraph-10)}a[_ngcontent-%COMP%]{text-decoration:none}.license[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}.license[_ngcontent-%COMP%]:first-of-type{border-top:1px solid var(--base-4)}.license[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;align-items:center}.license-dialog[_ngcontent-%COMP%]{background-color:var(--base-1);color:var(--base-12);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;max-height:31.25rem;white-space:pre;border:1px solid var(--base-4)}"],changeDetection:0})};export{L as default};
@@ -1 +1 @@
1
- import{Qc as f,Rc as D,S as d,Sc as w,Tc as x,Uc as h,_ as v,ia as y,k as m,ka as l,oa as b}from"./chunk-FAM42SZT.js";import{a as p,b as g}from"./chunk-EUDKD2JW.js";function E(o,e){let s=e?.injector??v(y),n=new m(1),i=w(()=>{let t;try{t=o()}catch(u){f(()=>n.error(u));return}f(()=>n.next(t))},{injector:s,manualCleanup:!0});return s.get(l).onDestroy(()=>{i.destroy(),n.complete()}),n.asObservable()}function U(o,e){let n=!e?.manualCleanup?e?.injector?.get(l)??v(l):null,i=k(e?.equal),t;e?.requireSync?t=b({kind:0},{equal:i}):t=b({kind:1,value:e?.initialValue},{equal:i});let u,a=o.subscribe({next:r=>t.set({kind:1,value:r}),error:r=>{t.set({kind:2,error:r}),u?.()},complete:()=>{u?.()}});if(e?.requireSync&&t().kind===0)throw new d(601,!1);return u=n?.onDestroy(a.unsubscribe.bind(a)),D(()=>{let r=t();switch(r.kind){case 1:return r.value;case 2:throw r.error;case 0:throw new d(601,!1)}},{equal:e?.equal})}function k(o=Object.is){return(e,s)=>e.kind===1&&s.kind===1&&o(e.value,s.value)}function T(o){return x(g(p({},o),{loader:void 0,stream:e=>{let s,n=()=>s?.unsubscribe();e.abortSignal.addEventListener("abort",n);let i=b({value:void 0}),t,u=new Promise(c=>t=c);function a(c){i.set(c),t?.(i),t=void 0}let r=o.stream??o.loader;if(r===void 0)throw new d(990,!1);return s=r(e).subscribe({next:c=>a({value:c}),error:c=>{a({error:h(c)}),e.abortSignal.removeEventListener("abort",n)},complete:()=>{t&&a({error:new d(991,!1)}),e.abortSignal.removeEventListener("abort",n)}}),u}}))}export{E as a,U as b,T as c};
1
+ import{Mc as w,Nc as x,O as d,Oc as h,W as v,da as y,fa as l,i as m,la as b,na as D,oa as f}from"./chunk-XYHHESIX.js";import{a as p,b as g}from"./chunk-7CGTOI24.js";function E(o,e){let s=e?.injector??v(y),n=new m(1),i=D(()=>{let t;try{t=o()}catch(u){f(()=>n.error(u));return}f(()=>n.next(t))},{injector:s,manualCleanup:!0});return s.get(l).onDestroy(()=>{i.destroy(),n.complete()}),n.asObservable()}function U(o,e){let n=!e?.manualCleanup?e?.injector?.get(l)??v(l):null,i=k(e?.equal),t;e?.requireSync?t=b({kind:0},{equal:i}):t=b({kind:1,value:e?.initialValue},{equal:i});let u,a=o.subscribe({next:r=>t.set({kind:1,value:r}),error:r=>{t.set({kind:2,error:r}),u?.()},complete:()=>{u?.()}});if(e?.requireSync&&t().kind===0)throw new d(601,!1);return u=n?.onDestroy(a.unsubscribe.bind(a)),w(()=>{let r=t();switch(r.kind){case 1:return r.value;case 2:throw r.error;case 0:throw new d(601,!1)}},{equal:e?.equal})}function k(o=Object.is){return(e,s)=>e.kind===1&&s.kind===1&&o(e.value,s.value)}function T(o){return x(g(p({},o),{loader:void 0,stream:e=>{let s,n=()=>s?.unsubscribe();e.abortSignal.addEventListener("abort",n);let i=b({value:void 0}),t,u=new Promise(c=>t=c);function a(c){i.set(c),t?.(i),t=void 0}let r=o.stream??o.loader;if(r===void 0)throw new d(990,!1);return s=r(e).subscribe({next:c=>a({value:c}),error:c=>{a({error:h(c)}),e.abortSignal.removeEventListener("abort",n)},complete:()=>{t&&a({error:new d(991,!1)}),e.abortSignal.removeEventListener("abort",n)}}),u}}))}export{E as a,U as b,T as c};
@@ -1 +1 @@
1
- import{a as _e}from"./chunk-XDECUOQ5.js";import"./chunk-DU5QSRYH.js";import"./chunk-D2DI6ZER.js";import"./chunk-M77IE672.js";import{a as se}from"./chunk-I5AKUAZF.js";import"./chunk-PJAWWLYW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-RECKKS2S.js";import"./chunk-W4QCGFNO.js";import"./chunk-L4GZJLYK.js";import{a as le,b as m}from"./chunk-I2RHQQ3J.js";import{a as b}from"./chunk-F2QQDU4N.js";import"./chunk-XE5OMGTJ.js";import"./chunk-T6C2OUI5.js";import"./chunk-TJ3WIU6Q.js";import{b as oe}from"./chunk-KBGIIJMM.js";import{B as ae,H as ie,Y as ne,c as Q,e as Y,i as Z,s as x,u as ee,z as te}from"./chunk-LFRGO2IP.js";import{b as q,e as j}from"./chunk-LEZL7BSL.js";import"./chunk-4MEL5WTX.js";import"./chunk-5K64UNNB.js";import"./chunk-6DB3NZXR.js";import"./chunk-FPPZ4BUR.js";import{Cb as d,D as G,Db as n,Eb as i,F as g,Fb as c,G as L,H as p,Ra as _,Rc as E,Sc as P,Tb as u,Ub as h,Vb as A,Wb as H,Xb as J,Zb as T,_ as F,bb as V,kc as C,mc as K,nc as D,oa as s,r as y,sc as X,tc as z,uc as W,wb as w,xb as U}from"./chunk-FAM42SZT.js";import"./chunk-EUDKD2JW.js";function re(r,t){r&1&&(n(0,"sh-icon",19),D(1,"spinner"),i())}function ce(r,t){r&1&&(n(0,"sh-icon",20),D(1,"check"),i())}function de(r,t){r&1&&(n(0,"sh-icon",21),D(1,"warning"),i()),r&2&&d("shTooltip","File not found")}function ue(r,t){let a=le(r).pipe(G(t),L());return m(a,{initialValue:r()})}var N=class r{#o=F(q);#s=F(se);#e=F(oe);#a=F(te);#t=s("");backupId=m(this.#o.params.pipe(y(t=>t.id)));activeBackup=E(()=>this.#s.backups().find(t=>t.Backup?.ID===this.backupId()));backupFilePath=s("");lastValidatedPath=s("");isValidatedPath=E(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=E(()=>this.backupFilePath()!==this.#t());isValidatingPath=s(!1);#i=ue(this.backupFilePath,500);#n=s(!1);isWaitingForValidation=E(()=>this.#i()!=this.backupFilePath()||this.isValidatingPath());backupFilePathEffect=P(()=>{let t=this.#i(),a=this.activeBackup(),e=this.#n();t!==""&&(this.isValidatingPath.set(!0),this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).pipe(g(1),p(()=>this.isValidatingPath.set(!1))).subscribe(()=>this.lastValidatedPath.set(t)))});isRestoring=s(!1);isRepairing=s(!1);isDeleting=s(!1);isSavingDbPath=s(!1);isSavingAndRepairing=s(!1);isMovingDb=s(!1);isCreatingBugReport=s(!1);createdReport=s(!1);activeBackupEffect=P(()=>{let t=this.activeBackup();if(!t)return;let a=t.Backup?.DBPath??"";this.backupFilePath.set(a),this.#t.set(a)});repairDatabase(){this.isRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(t=null){this.isValidatedPath()?this.#a.open(b,{data:{title:$localize`Confirm delete?`,message:$localize`Do you really want to delete the database for ${this.activeBackup()?.Backup?.Name}?`,confirmText:$localize`Delete database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doDeleteDatabase(t)}}):this.doDeleteDatabase(t)}doDeleteDatabase(t=null){this.isDeleting.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),p(()=>this.isDeleting.set(!1))).subscribe(()=>{this.lastValidatedPath.set(""),t?.()})}restoreDatabase(){this.isValidatedPath()?this.deleteDatabase(()=>{this.doRepairDatabase()}):this.doRepairDatabase()}doRepairDatabase(){this.isRestoring.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t())}saveDatabasePath(t=null){this.isValidatedPath()?this.#a.open(b,{data:{title:$localize`Confirm reassign?`,message:$localize`The target database path already exists and may belong to another backup. Are you sure you want to assign this backup to an existing database?`,confirmText:$localize`Assign existing database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doSaveDatabasePath(t)}}):this.doSaveDatabasePath(t)}doSaveDatabasePath(t=null){this.isSavingDbPath.set(!0);let a=this.backupFilePath();this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:a}}).pipe(p(()=>this.isSavingDbPath.set(!1))).subscribe(()=>{this.#t.set(a),t?.()})}saveAndRepairDatabasePath(){this.saveDatabasePath(()=>(this.isSavingAndRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isSavingAndRepairing.set(!1))).subscribe()))}moveDatabasePath(){this.isMovingDb.set(!0);let t=this.backupFilePath();this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:t}}).pipe(p(()=>this.isMovingDb.set(!1))).subscribe(()=>{this.#n.update(a=>!a),this.#t.set(t)})}createErrorReport(){this.isCreatingBugReport.set(!0),this.#e.postApiV1BackupByIdCreatereport({id:this.backupId()}).pipe(p(()=>this.isCreatingBugReport.set(!1))).subscribe({next:()=>{this.createdReport.set(!0),window.setTimeout(()=>this.createdReport.set(!1),3e3)}})}static \u0275fac=function(a){return new(a||r)};static \u0275cmp=V({type:r,selectors:[["app-database"]],decls:50,vars:21,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let a;a=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let o;o=$localize`Maintenance`;let S;S=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. The bug report button can be used to create a copy of the database with path information removed. This should only be used if a developer requests to investigate an issue with your database. `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Repair `;let I;I=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let M;M=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Recreate (delete and repair) `;let R;R=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:file-plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Create bug report database `;let B;B=$localize`Placement`;let O;O=$localize`${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON:backspace${"\uFFFD/#40\uFFFD"}:CLOSE_TAG_SH_ICON: Reset `;let $;$=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Save `;let v;v=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Save & Repair `;let k;return k=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON: Move existing database `,[t,a,e,o,S,f,I,M,R,B,O,$,v,k,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"actions","maintenance"],["shButton","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix","",1,"primary"],["prefix",""],["prefix","",3,"shTooltip"],[1,"actions","placement"]]},template:function(a,e){if(a&1&&(c(0,"app-status-bar"),n(1,"section")(2,"div",14)(3,"button",15),u(4,0),c(5,"sh-icon"),h(),i()(),n(6,"article")(7,"h1"),A(8,1),i(),n(9,"p"),A(10,2),i()(),n(11,"article")(12,"h2"),A(13,3),i(),n(14,"p"),A(15,4),i(),n(16,"div",16)(17,"button",17),T("click",function(){return e.repairDatabase()}),u(18,5),c(19,"sh-icon"),h(),i(),n(20,"button",17),T("click",function(){return e.deleteDatabase()}),u(21,6),c(22,"sh-icon"),h(),i(),n(23,"button",17),T("click",function(){return e.restoreDatabase()}),u(24,7),c(25,"sh-icon"),h(),i(),n(26,"button",17),T("click",function(){return e.createErrorReport()}),u(27,8),c(28,"sh-icon"),h(),i()()(),n(29,"article")(30,"h2"),A(31,9),i(),n(32,"sh-form-field")(33,"input",18),W("ngModelChange",function(S){return z(e.backupFilePath,S)||(e.backupFilePath=S),S}),i(),w(34,re,2,0,"sh-icon",19)(35,ce,2,0,"sh-icon",20)(36,de,2,1,"sh-icon",21),i(),n(37,"div",22)(38,"button",17),T("click",function(){return e.resetDatabasePath()}),u(39,10),c(40,"sh-icon"),h(),i(),n(41,"button",17),T("click",function(){return e.saveDatabasePath()}),u(42,11),c(43,"sh-icon"),h(),i(),n(44,"button",17),T("click",function(){return e.saveAndRepairDatabasePath()}),u(45,12),c(46,"sh-icon"),h(),i(),n(47,"button",17),T("click",function(){return e.moveDatabasePath()}),u(48,13),c(49,"sh-icon"),h(),i()()()()),a&2){let o;_(8),H((o=e.activeBackup())==null||o.Backup==null?null:o.Backup.Name),J(8),_(9),C("loader",e.isRepairing()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),_(3),C("loader",e.isDeleting()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),_(3),C("loader",e.isRestoring()),d("disabled",e.pathHasChanged()),_(3),C("loader",e.isCreatingBugReport()),d("disabled",e.isCreatingBugReport()||!e.isValidatedPath()||e.pathHasChanged()),_(6),K(e.isValidatedPath()?"success":"error"),_(),X("ngModel",e.backupFilePath),_(),U(e.isWaitingForValidation()?34:e.isValidatedPath()?35:36),_(4),d("disabled",!e.pathHasChanged()),_(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),_(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),_(3),d("disabled",!e.pathHasChanged()||e.isValidatedPath()||e.isWaitingForValidation())}},dependencies:[x,Q,Y,Z,_e,ae,ie,ee,ne,j],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{N as default};
1
+ import{a as _e}from"./chunk-5PCGCIX3.js";import"./chunk-3JUUD7DI.js";import"./chunk-AJXTVI3H.js";import"./chunk-LF24JF3M.js";import{a as se}from"./chunk-4Y6Y4CDL.js";import"./chunk-DTKWQFAK.js";import"./chunk-6Q6SSTBK.js";import"./chunk-U63HBLGG.js";import"./chunk-EWA2R7BT.js";import"./chunk-AGPZBYW6.js";import{a as le,b as m}from"./chunk-FBWFZMGL.js";import{a as b}from"./chunk-WILUKPQ3.js";import"./chunk-NEV6JB5M.js";import"./chunk-CGKL2MHM.js";import"./chunk-QWNOPLJC.js";import{b as oe}from"./chunk-BKANUILG.js";import{B as ae,H as ie,Y as ne,c as Q,e as Y,i as Z,s as x,u as ee,z as te}from"./chunk-RYXU2QDS.js";import{b as q,e as j}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{Ab as i,B as G,Bb as c,C as g,D as L,E as p,Mc as E,Pa as _,Pb as u,Qb as h,Rb as A,Sb as H,Tb as J,Vb as T,W as F,cb as V,gc as C,ic as K,jc as D,la as s,na as P,oc as X,p as y,pc as z,qc as W,sb as w,tb as U,yb as d,zb as n}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";function re(r,t){r&1&&(n(0,"sh-icon",19),D(1,"spinner"),i())}function ce(r,t){r&1&&(n(0,"sh-icon",20),D(1,"check"),i())}function de(r,t){r&1&&(n(0,"sh-icon",21),D(1,"warning"),i()),r&2&&d("shTooltip","File not found")}function ue(r,t){let a=le(r).pipe(G(t),L());return m(a,{initialValue:r()})}var N=class r{#o=F(q);#s=F(se);#e=F(oe);#a=F(te);#t=s("");backupId=m(this.#o.params.pipe(y(t=>t.id)));activeBackup=E(()=>this.#s.backups().find(t=>t.Backup?.ID===this.backupId()));backupFilePath=s("");lastValidatedPath=s("");isValidatedPath=E(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=E(()=>this.backupFilePath()!==this.#t());isValidatingPath=s(!1);#i=ue(this.backupFilePath,500);#n=s(!1);isWaitingForValidation=E(()=>this.#i()!=this.backupFilePath()||this.isValidatingPath());backupFilePathEffect=P(()=>{let t=this.#i(),a=this.activeBackup(),e=this.#n();t!==""&&(this.isValidatingPath.set(!0),this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).pipe(g(1),p(()=>this.isValidatingPath.set(!1))).subscribe(()=>this.lastValidatedPath.set(t)))});isRestoring=s(!1);isRepairing=s(!1);isDeleting=s(!1);isSavingDbPath=s(!1);isSavingAndRepairing=s(!1);isMovingDb=s(!1);isCreatingBugReport=s(!1);createdReport=s(!1);activeBackupEffect=P(()=>{let t=this.activeBackup();if(!t)return;let a=t.Backup?.DBPath??"";this.backupFilePath.set(a),this.#t.set(a)});repairDatabase(){this.isRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(t=null){this.isValidatedPath()?this.#a.open(b,{data:{title:$localize`Confirm delete?`,message:$localize`Do you really want to delete the database for ${this.activeBackup()?.Backup?.Name}?`,confirmText:$localize`Delete database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doDeleteDatabase(t)}}):this.doDeleteDatabase(t)}doDeleteDatabase(t=null){this.isDeleting.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),p(()=>this.isDeleting.set(!1))).subscribe(()=>{this.lastValidatedPath.set(""),t?.()})}restoreDatabase(){this.isValidatedPath()?this.deleteDatabase(()=>{this.doRepairDatabase()}):this.doRepairDatabase()}doRepairDatabase(){this.isRestoring.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t())}saveDatabasePath(t=null){this.isValidatedPath()?this.#a.open(b,{data:{title:$localize`Confirm reassign?`,message:$localize`The target database path already exists and may belong to another backup. Are you sure you want to assign this backup to an existing database?`,confirmText:$localize`Assign existing database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doSaveDatabasePath(t)}}):this.doSaveDatabasePath(t)}doSaveDatabasePath(t=null){this.isSavingDbPath.set(!0);let a=this.backupFilePath();this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:a}}).pipe(p(()=>this.isSavingDbPath.set(!1))).subscribe(()=>{this.#t.set(a),t?.()})}saveAndRepairDatabasePath(){this.saveDatabasePath(()=>(this.isSavingAndRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isSavingAndRepairing.set(!1))).subscribe()))}moveDatabasePath(){this.isMovingDb.set(!0);let t=this.backupFilePath();this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:t}}).pipe(p(()=>this.isMovingDb.set(!1))).subscribe(()=>{this.#n.update(a=>!a),this.#t.set(t)})}createErrorReport(){this.isCreatingBugReport.set(!0),this.#e.postApiV1BackupByIdCreatereport({id:this.backupId()}).pipe(p(()=>this.isCreatingBugReport.set(!1))).subscribe({next:()=>{this.createdReport.set(!0),window.setTimeout(()=>this.createdReport.set(!1),3e3)}})}static \u0275fac=function(a){return new(a||r)};static \u0275cmp=V({type:r,selectors:[["app-database"]],decls:50,vars:21,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let a;a=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let o;o=$localize`Maintenance`;let S;S=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. The bug report button can be used to create a copy of the database with path information removed. This should only be used if a developer requests to investigate an issue with your database. `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Repair `;let I;I=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let M;M=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Recreate (delete and repair) `;let R;R=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:file-plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Create bug report database `;let B;B=$localize`Placement`;let O;O=$localize`${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON:backspace${"\uFFFD/#40\uFFFD"}:CLOSE_TAG_SH_ICON: Reset `;let $;$=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Save `;let v;v=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Save & Repair `;let k;return k=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON: Move existing database `,[t,a,e,o,S,f,I,M,R,B,O,$,v,k,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"actions","maintenance"],["shButton","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix","",1,"primary"],["prefix",""],["prefix","",3,"shTooltip"],[1,"actions","placement"]]},template:function(a,e){if(a&1&&(c(0,"app-status-bar"),n(1,"section")(2,"div",14)(3,"button",15),u(4,0),c(5,"sh-icon"),h(),i()(),n(6,"article")(7,"h1"),A(8,1),i(),n(9,"p"),A(10,2),i()(),n(11,"article")(12,"h2"),A(13,3),i(),n(14,"p"),A(15,4),i(),n(16,"div",16)(17,"button",17),T("click",function(){return e.repairDatabase()}),u(18,5),c(19,"sh-icon"),h(),i(),n(20,"button",17),T("click",function(){return e.deleteDatabase()}),u(21,6),c(22,"sh-icon"),h(),i(),n(23,"button",17),T("click",function(){return e.restoreDatabase()}),u(24,7),c(25,"sh-icon"),h(),i(),n(26,"button",17),T("click",function(){return e.createErrorReport()}),u(27,8),c(28,"sh-icon"),h(),i()()(),n(29,"article")(30,"h2"),A(31,9),i(),n(32,"sh-form-field")(33,"input",18),W("ngModelChange",function(S){return z(e.backupFilePath,S)||(e.backupFilePath=S),S}),i(),w(34,re,2,0,"sh-icon",19)(35,ce,2,0,"sh-icon",20)(36,de,2,1,"sh-icon",21),i(),n(37,"div",22)(38,"button",17),T("click",function(){return e.resetDatabasePath()}),u(39,10),c(40,"sh-icon"),h(),i(),n(41,"button",17),T("click",function(){return e.saveDatabasePath()}),u(42,11),c(43,"sh-icon"),h(),i(),n(44,"button",17),T("click",function(){return e.saveAndRepairDatabasePath()}),u(45,12),c(46,"sh-icon"),h(),i(),n(47,"button",17),T("click",function(){return e.moveDatabasePath()}),u(48,13),c(49,"sh-icon"),h(),i()()()()),a&2){let o;_(8),H((o=e.activeBackup())==null||o.Backup==null?null:o.Backup.Name),J(8),_(9),C("loader",e.isRepairing()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),_(3),C("loader",e.isDeleting()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),_(3),C("loader",e.isRestoring()),d("disabled",e.pathHasChanged()),_(3),C("loader",e.isCreatingBugReport()),d("disabled",e.isCreatingBugReport()||!e.isValidatedPath()||e.pathHasChanged()),_(6),K(e.isValidatedPath()?"success":"error"),_(),X("ngModel",e.backupFilePath),_(),U(e.isWaitingForValidation()?34:e.isValidatedPath()?35:36),_(4),d("disabled",!e.pathHasChanged()),_(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),_(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),_(3),d("disabled",!e.pathHasChanged()||e.isValidatedPath()||e.isWaitingForValidation())}},dependencies:[x,Q,Y,Z,_e,ae,ie,ee,ne,j],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{N as default};
@@ -0,0 +1,2 @@
1
+ import{a as ge,b as Te}from"./chunk-QF5K4MHH.js";import{A as ae,E as ce,K as de,O as D,R as w,Sa as me,U as O,V as I,W as y,X as le,Z as Q,_ as ue,ea as he,f as q,fa as fe,ia as pe,l as Z,ma as ye,p as L,x as ie}from"./chunk-XYHHESIX.js";import{a as Y}from"./chunk-7CGTOI24.js";var v=class t{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(r){r?typeof r=="string"?this.lazyInit=()=>{this.headers=new Map,r.split(`
2
+ `).forEach(e=>{let n=e.indexOf(":");if(n>0){let o=e.slice(0,n),s=e.slice(n+1).trim();this.addHeaderEntry(o,s)}})}:typeof Headers<"u"&&r instanceof Headers?(this.headers=new Map,r.forEach((e,n)=>{this.addHeaderEntry(n,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(r).forEach(([e,n])=>{this.setHeaderEntries(e,n)})}:this.headers=new Map}has(r){return this.init(),this.headers.has(r.toLowerCase())}get(r){this.init();let e=this.headers.get(r.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(r){return this.init(),this.headers.get(r.toLowerCase())||null}append(r,e){return this.clone({name:r,value:e,op:"a"})}set(r,e){return this.clone({name:r,value:e,op:"s"})}delete(r,e){return this.clone({name:r,value:e,op:"d"})}maybeSetNormalizedName(r,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,r)}init(){this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(r=>this.applyUpdate(r)),this.lazyUpdate=null))}copyFrom(r){r.init(),Array.from(r.headers.keys()).forEach(e=>{this.headers.set(e,r.headers.get(e)),this.normalizedNames.set(e,r.normalizedNames.get(e))})}clone(r){let e=new t;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([r]),e}applyUpdate(r){let e=r.name.toLowerCase();switch(r.op){case"a":case"s":let n=r.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(r.name,e);let o=(r.op==="a"?this.headers.get(e):void 0)||[];o.push(...n),this.headers.set(e,o);break;case"d":let s=r.value;if(!s)this.headers.delete(e),this.normalizedNames.delete(e);else{let i=this.headers.get(e);if(!i)return;i=i.filter(l=>s.indexOf(l)===-1),i.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,i)}break}}addHeaderEntry(r,e){let n=r.toLowerCase();this.maybeSetNormalizedName(r,n),this.headers.has(n)?this.headers.get(n).push(e):this.headers.set(n,[e])}setHeaderEntries(r,e){let n=(Array.isArray(e)?e:[e]).map(s=>s.toString()),o=r.toLowerCase();this.headers.set(o,n),this.maybeSetNormalizedName(r,o)}forEach(r){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>r(this.normalizedNames.get(e),this.headers.get(e)))}};var X=class{map=new Map;set(r,e){return this.map.set(r,e),this}get(r){return this.map.has(r)||this.map.set(r,r.defaultValue()),this.map.get(r)}delete(r){return this.map.delete(r),this}has(r){return this.map.has(r)}keys(){return this.map.keys()}},J=class{encodeKey(r){return ve(r)}encodeValue(r){return ve(r)}decodeKey(r){return decodeURIComponent(r)}decodeValue(r){return decodeURIComponent(r)}};function xe(t,r){let e=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(o=>{let s=o.indexOf("="),[i,l]=s==-1?[r.decodeKey(o),""]:[r.decodeKey(o.slice(0,s)),r.decodeValue(o.slice(s+1))],a=e.get(i)||[];a.push(l),e.set(i,a)}),e}var Fe=/%(\d[a-f0-9])/gi,je={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function ve(t){return encodeURIComponent(t).replace(Fe,(r,e)=>je[e]??r)}function B(t){return`${t}`}var R=class t{map;encoder;updates=null;cloneFrom=null;constructor(r={}){if(this.encoder=r.encoder||new J,r.fromString){if(r.fromObject)throw new D(2805,!1);this.map=xe(r.fromString,this.encoder)}else r.fromObject?(this.map=new Map,Object.keys(r.fromObject).forEach(e=>{let n=r.fromObject[e],o=Array.isArray(n)?n.map(B):[B(n)];this.map.set(e,o)})):this.map=null}has(r){return this.init(),this.map.has(r)}get(r){this.init();let e=this.map.get(r);return e?e[0]:null}getAll(r){return this.init(),this.map.get(r)||null}keys(){return this.init(),Array.from(this.map.keys())}append(r,e){return this.clone({param:r,value:e,op:"a"})}appendAll(r){let e=[];return Object.keys(r).forEach(n=>{let o=r[n];Array.isArray(o)?o.forEach(s=>{e.push({param:n,value:s,op:"a"})}):e.push({param:n,value:o,op:"a"})}),this.clone(e)}set(r,e){return this.clone({param:r,value:e,op:"s"})}delete(r,e){return this.clone({param:r,value:e,op:"d"})}toString(){return this.init(),this.keys().map(r=>{let e=this.encoder.encodeKey(r);return this.map.get(r).map(n=>e+"="+this.encoder.encodeValue(n)).join("&")}).filter(r=>r!=="").join("&")}clone(r){let e=new t({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(r),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(r=>this.map.set(r,this.cloneFrom.map.get(r))),this.updates.forEach(r=>{switch(r.op){case"a":case"s":let e=(r.op==="a"?this.map.get(r.param):void 0)||[];e.push(B(r.value)),this.map.set(r.param,e);break;case"d":if(r.value!==void 0){let n=this.map.get(r.param)||[],o=n.indexOf(B(r.value));o!==-1&&n.splice(o,1),n.length>0?this.map.set(r.param,n):this.map.delete(r.param)}else{this.map.delete(r.param);break}}}),this.cloneFrom=this.updates=null)}};function Ce(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function Ee(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function we(t){return typeof Blob<"u"&&t instanceof Blob}function Re(t){return typeof FormData<"u"&&t instanceof FormData}function Le(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}var U="Content-Type",V="Accept",be="text/plain",Pe="application/json",Me=`${Pe}, ${be}, */*`,x=class t{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;referrerPolicy;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(r,e,n,o){this.url=e,this.method=r.toUpperCase();let s;if(Ce(this.method)||o?(this.body=n!==void 0?n:null,s=o):s=n,s){if(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,this.keepalive=!!s.keepalive,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.context&&(this.context=s.context),s.params&&(this.params=s.params),s.priority&&(this.priority=s.priority),s.cache&&(this.cache=s.cache),s.credentials&&(this.credentials=s.credentials),typeof s.timeout=="number"){if(s.timeout<1||!Number.isInteger(s.timeout))throw new D(2822,"");this.timeout=s.timeout}s.mode&&(this.mode=s.mode),s.redirect&&(this.redirect=s.redirect),s.integrity&&(this.integrity=s.integrity),s.referrer&&(this.referrer=s.referrer),s.referrerPolicy&&(this.referrerPolicy=s.referrerPolicy),this.transferCache=s.transferCache}if(this.headers??=new v,this.context??=new X,!this.params)this.params=new R,this.urlWithParams=e;else{let i=this.params.toString();if(i.length===0)this.urlWithParams=e;else{let l=e.indexOf("?"),a=l===-1?"?":l<e.length-1?"&":"";this.urlWithParams=e+a+i}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||Ee(this.body)||we(this.body)||Re(this.body)||Le(this.body)?this.body:this.body instanceof R?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||Re(this.body)?null:we(this.body)?this.body.type||null:Ee(this.body)?null:typeof this.body=="string"?be:this.body instanceof R?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?Pe:null}clone(r={}){let e=r.method||this.method,n=r.url||this.url,o=r.responseType||this.responseType,s=r.keepalive??this.keepalive,i=r.priority||this.priority,l=r.cache||this.cache,a=r.mode||this.mode,f=r.redirect||this.redirect,m=r.credentials||this.credentials,g=r.referrer||this.referrer,A=r.integrity||this.integrity,k=r.referrerPolicy||this.referrerPolicy,_=r.transferCache??this.transferCache,h=r.timeout??this.timeout,c=r.body!==void 0?r.body:this.body,d=r.withCredentials??this.withCredentials,p=r.reportProgress??this.reportProgress,P=r.headers||this.headers,u=r.params||this.params,M=r.context??this.context;return r.setHeaders!==void 0&&(P=Object.keys(r.setHeaders).reduce((N,E)=>N.set(E,r.setHeaders[E]),P)),r.setParams&&(u=Object.keys(r.setParams).reduce((N,E)=>N.set(E,r.setParams[E]),u)),new t(e,n,c,{params:u,headers:P,context:M,reportProgress:p,responseType:o,withCredentials:d,transferCache:_,keepalive:s,cache:l,priority:i,timeout:h,mode:a,redirect:f,credentials:m,referrer:g,integrity:A,referrerPolicy:k})}},b=(function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t})(b||{}),F=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(r,e=200,n="OK"){this.headers=r.headers||new v,this.status=r.status!==void 0?r.status:e,this.statusText=r.statusText||n,this.url=r.url||null,this.redirected=r.redirected,this.responseType=r.responseType,this.ok=this.status>=200&&this.status<300}},S=class t extends F{constructor(r={}){super(r)}type=b.ResponseHeader;clone(r={}){return new t({headers:r.headers||this.headers,status:r.status!==void 0?r.status:this.status,statusText:r.statusText||this.statusText,url:r.url||this.url||void 0})}},j=class t extends F{body;constructor(r={}){super(r),this.body=r.body!==void 0?r.body:null}type=b.Response;clone(r={}){return new t({body:r.body!==void 0?r.body:this.body,headers:r.headers||this.headers,status:r.status!==void 0?r.status:this.status,statusText:r.statusText||this.statusText,url:r.url||this.url||void 0,redirected:r.redirected??this.redirected,responseType:r.responseType??this.responseType})}},T=class extends F{name="HttpErrorResponse";message;error;ok=!1;constructor(r){super(r,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${r.url||"(unknown url)"}`:this.message=`Http failure response for ${r.url||"(unknown url)"}: ${r.status} ${r.statusText}`,this.error=r.error||null}},Ne=200,Ue=204;var Se=/^\)\]\}',?\n/,De=new O(""),z=(()=>{class t{fetchImpl=y(ee,{optional:!0})?.fetch??((...e)=>globalThis.fetch(...e));ngZone=y(pe);destroyRef=y(fe);handle(e){return new q(n=>{let o=new AbortController;this.doRequest(e,o.signal,n).then(re,i=>n.error(new T({error:i})));let s;return e.timeout&&(s=this.ngZone.runOutsideAngular(()=>setTimeout(()=>{o.signal.aborted||o.abort(new DOMException("signal timed out","TimeoutError"))},e.timeout))),()=>{s!==void 0&&clearTimeout(s),o.abort()}})}async doRequest(e,n,o){let s=this.createRequestInit(e),i;try{let h=this.ngZone.runOutsideAngular(()=>this.fetchImpl(e.urlWithParams,Y({signal:n},s)));Be(h),o.next({type:b.Sent}),i=await h}catch(h){o.error(new T({error:h,status:h.status??0,statusText:h.statusText,url:e.urlWithParams,headers:h.headers}));return}let l=new v(i.headers),a=i.statusText,f=i.url||e.urlWithParams,m=i.status,g=null;if(e.reportProgress&&o.next(new S({headers:l,status:m,statusText:a,url:f})),i.body){let h=i.headers.get("content-length"),c=[],d=i.body.getReader(),p=0,P,u,M=typeof Zone<"u"&&Zone.current,N=!1;if(await this.ngZone.runOutsideAngular(async()=>{for(;;){if(this.destroyRef.destroyed){await d.cancel(),N=!0;break}let{done:C,value:K}=await d.read();if(C)break;if(c.push(K),p+=K.length,e.reportProgress){u=e.responseType==="text"?(u??"")+(P??=new TextDecoder).decode(K,{stream:!0}):void 0;let se=()=>o.next({type:b.DownloadProgress,total:h?+h:void 0,loaded:p,partialText:u});M?M.run(se):se()}}}),N){o.complete();return}let E=this.concatChunks(c,p);try{let C=i.headers.get(U)??"";g=this.parseBody(e,E,C,m)}catch(C){o.error(new T({error:C,headers:new v(i.headers),status:i.status,statusText:i.statusText,url:i.url||e.urlWithParams}));return}}m===0&&(m=g?Ne:0);let A=m>=200&&m<300,k=i.redirected,_=i.type;A?(o.next(new j({body:g,headers:l,status:m,statusText:a,url:f,redirected:k,responseType:_})),o.complete()):o.error(new T({error:g,headers:l,status:m,statusText:a,url:f,redirected:k,responseType:_}))}parseBody(e,n,o,s){switch(e.responseType){case"json":let i=new TextDecoder().decode(n).replace(Se,"");if(i==="")return null;try{return JSON.parse(i)}catch(l){if(s<200||s>=300)return i;throw l}case"text":return new TextDecoder().decode(n);case"blob":return new Blob([n],{type:o});case"arraybuffer":return n.buffer}}createRequestInit(e){let n={},o;if(o=e.credentials,e.withCredentials&&(o="include"),e.headers.forEach((s,i)=>n[s]=i.join(",")),e.headers.has(V)||(n[V]=Me),!e.headers.has(U)){let s=e.detectContentTypeHeader();s!==null&&(n[U]=s)}return{body:e.serializeBody(),method:e.method,headers:n,credentials:o,keepalive:e.keepalive,cache:e.cache,priority:e.priority,mode:e.mode,redirect:e.redirect,referrer:e.referrer,integrity:e.integrity,referrerPolicy:e.referrerPolicy}}concatChunks(e,n){let o=new Uint8Array(n),s=0;for(let i of e)o.set(i,s),s+=i.length;return o}static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:t.\u0275fac})}return t})(),ee=class{};function re(){}function Be(t){t.then(re,re)}var ze=/^\)\]\}',?\n/;var te=(()=>{class t{xhrFactory;tracingService=y(me,{optional:!0});constructor(e){this.xhrFactory=e}maybePropagateTrace(e){return this.tracingService?.propagate?this.tracingService.propagate(e):e}handle(e){if(e.method==="JSONP")throw new D(-2800,!1);let n=this.xhrFactory;return Z(null).pipe(de(()=>new q(s=>{let i=n.build();if(i.open(e.method,e.urlWithParams),e.withCredentials&&(i.withCredentials=!0),e.headers.forEach((c,d)=>i.setRequestHeader(c,d.join(","))),e.headers.has(V)||i.setRequestHeader(V,Me),!e.headers.has(U)){let c=e.detectContentTypeHeader();c!==null&&i.setRequestHeader(U,c)}if(e.timeout&&(i.timeout=e.timeout),e.responseType){let c=e.responseType.toLowerCase();i.responseType=c!=="json"?c:"text"}let l=e.serializeBody(),a=null,f=()=>{if(a!==null)return a;let c=i.statusText||"OK",d=new v(i.getAllResponseHeaders()),p=i.responseURL||e.url;return a=new S({headers:d,status:i.status,statusText:c,url:p}),a},m=this.maybePropagateTrace(()=>{let{headers:c,status:d,statusText:p,url:P}=f(),u=null;d!==Ue&&(u=typeof i.response>"u"?i.responseText:i.response),d===0&&(d=u?Ne:0);let M=d>=200&&d<300;if(e.responseType==="json"&&typeof u=="string"){let N=u;u=u.replace(ze,"");try{u=u!==""?JSON.parse(u):null}catch(E){u=N,M&&(M=!1,u={error:E,text:u})}}M?(s.next(new j({body:u,headers:c,status:d,statusText:p,url:P||void 0})),s.complete()):s.error(new T({error:u,headers:c,status:d,statusText:p,url:P||void 0}))}),g=this.maybePropagateTrace(c=>{let{url:d}=f(),p=new T({error:c,status:i.status||0,statusText:i.statusText||"Unknown Error",url:d||void 0});s.error(p)}),A=g;e.timeout&&(A=this.maybePropagateTrace(c=>{let{url:d}=f(),p=new T({error:new DOMException("Request timed out","TimeoutError"),status:i.status||0,statusText:i.statusText||"Request timeout",url:d||void 0});s.error(p)}));let k=!1,_=this.maybePropagateTrace(c=>{k||(s.next(f()),k=!0);let d={type:b.DownloadProgress,loaded:c.loaded};c.lengthComputable&&(d.total=c.total),e.responseType==="text"&&i.responseText&&(d.partialText=i.responseText),s.next(d)}),h=this.maybePropagateTrace(c=>{let d={type:b.UploadProgress,loaded:c.loaded};c.lengthComputable&&(d.total=c.total),s.next(d)});return i.addEventListener("load",m),i.addEventListener("error",g),i.addEventListener("timeout",A),i.addEventListener("abort",g),e.reportProgress&&(i.addEventListener("progress",_),l!==null&&i.upload&&i.upload.addEventListener("progress",h)),i.send(l),s.next({type:b.Sent}),()=>{i.removeEventListener("error",g),i.removeEventListener("abort",g),i.removeEventListener("load",m),i.removeEventListener("timeout",A),e.reportProgress&&(i.removeEventListener("progress",_),l!==null&&i.upload&&i.upload.removeEventListener("progress",h)),i.readyState!==i.DONE&&i.abort()}})))}static \u0275fac=function(n){return new(n||t)(I(Te))};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Xe(t,r){return r(t)}function Je(t,r,e){return(n,o)=>ue(e,()=>r(n,s=>t(s,o)))}var ne=new O("",{factory:()=>[]}),Oe=new O(""),Ie=new O("",{providedIn:"root",factory:()=>!0});var G=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:function(n){let o=null;return n?o=new(n||t):o=I(te),o},providedIn:"root"})}return t})();var $=(()=>{class t{backend;injector;chain=null;pendingTasks=y(ye);contributeToStability=y(Ie);constructor(e,n){this.backend=e,this.injector=n}handle(e){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(ne),...this.injector.get(Oe,[])]));this.chain=n.reduceRight((o,s)=>Je(o,s,this.injector),Xe)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(e,o=>this.backend.handle(o)).pipe(ce(n))}else return this.chain(e,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||t)(I(G),I(Q))};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),oe=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:function(n){let o=null;return n?o=new(n||t):o=I($),o},providedIn:"root"})}return t})();function H(t,r){return{body:r,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials,credentials:t.credentials,transferCache:t.transferCache,timeout:t.timeout,keepalive:t.keepalive,priority:t.priority,cache:t.cache,mode:t.mode,redirect:t.redirect,integrity:t.integrity,referrer:t.referrer,referrerPolicy:t.referrerPolicy}}var Ae=(()=>{class t{handler;constructor(e){this.handler=e}request(e,n,o={}){let s;if(e instanceof x)s=e;else{let a;o.headers instanceof v?a=o.headers:a=new v(o.headers);let f;o.params&&(o.params instanceof R?f=o.params:f=new R({fromObject:o.params})),s=new x(e,n,o.body!==void 0?o.body:null,{headers:a,context:o.context,params:f,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache,keepalive:o.keepalive,priority:o.priority,cache:o.cache,mode:o.mode,redirect:o.redirect,credentials:o.credentials,referrer:o.referrer,referrerPolicy:o.referrerPolicy,integrity:o.integrity,timeout:o.timeout})}let i=Z(s).pipe(ae(a=>this.handler.handle(a)));if(e instanceof x||o.observe==="events")return i;let l=i.pipe(ie(a=>a instanceof j));switch(o.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return l.pipe(L(a=>{if(a.body!==null&&!(a.body instanceof ArrayBuffer))throw new D(2806,!1);return a.body}));case"blob":return l.pipe(L(a=>{if(a.body!==null&&!(a.body instanceof Blob))throw new D(2807,!1);return a.body}));case"text":return l.pipe(L(a=>{if(a.body!==null&&typeof a.body!="string")throw new D(2808,!1);return a.body}));case"json":default:return l.pipe(L(a=>a.body))}case"response":return l;default:throw new D(2809,!1)}}delete(e,n={}){return this.request("DELETE",e,n)}get(e,n={}){return this.request("GET",e,n)}head(e,n={}){return this.request("HEAD",e,n)}jsonp(e,n){return this.request("JSONP",e,{params:new R().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,n={}){return this.request("OPTIONS",e,n)}patch(e,n,o={}){return this.request("PATCH",e,H(o,n))}post(e,n,o={}){return this.request("POST",e,H(o,n))}put(e,n,o={}){return this.request("PUT",e,H(o,n))}static \u0275fac=function(n){return new(n||t)(I(oe))};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Ve=new O("",{factory:()=>!0}),$e="XSRF-TOKEN",Ge=new O("",{providedIn:"root",factory:()=>$e}),We="X-XSRF-TOKEN",Ke=new O("",{providedIn:"root",factory:()=>We}),Ye=(()=>{class t{cookieName=y(Ge);doc=y(he);lastCookieString="";lastToken=null;parseCount=0;getToken(){let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=ge(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ke=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=w({token:t,factory:function(n){let o=null;return n?o=new(n||t):o=I(Ye),o},providedIn:"root"})}return t})();function qe(t,r){let e=t.url.toLowerCase();if(!y(Ve)||t.method==="GET"||t.method==="HEAD"||e.startsWith("http://")||e.startsWith("https://"))return r(t);let n=y(ke).getToken(),o=y(Ke);return n!=null&&!t.headers.has(o)&&(t=t.clone({headers:t.headers.set(o,n)})),r(t)}var W=(function(t){return t[t.Interceptors=0]="Interceptors",t[t.LegacyInterceptors=1]="LegacyInterceptors",t[t.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",t[t.NoXsrfProtection=3]="NoXsrfProtection",t[t.JsonpSupport=4]="JsonpSupport",t[t.RequestsMadeViaParent=5]="RequestsMadeViaParent",t[t.Fetch=6]="Fetch",t})(W||{});function _e(t,r){return{\u0275kind:t,\u0275providers:r}}function Ze(...t){let r=[Ae,$,{provide:oe,useExisting:$},{provide:G,useFactory:()=>y(De,{optional:!0})??y(te)},{provide:ne,useValue:qe,multi:!0}];for(let e of t)r.push(...e.\u0275providers);return le(r)}function Qe(t){return _e(W.Interceptors,t.map(r=>({provide:ne,useValue:r,multi:!0})))}function He(){return _e(W.Fetch,[z,{provide:De,useExisting:z},{provide:G,useExisting:z}])}export{v as a,j as b,T as c,Ae as d,Ze as e,Qe as f,He as g};
@@ -0,0 +1,2 @@
1
+ import{a as V}from"./chunk-SD4AWG7T.js";import{B as A,J as D,T as F,u as k}from"./chunk-RYXU2QDS.js";import{la as $}from"./chunk-RMOTUTEQ.js";import{$ as I,Ab as i,Bb as P,Cc as R,Ec as y,Ib as N,Pa as l,Rb as m,Rc as u,Vb as G,W as O,Xb as d,aa as h,cb as x,fc as w,gc as v,jc as s,kc as L,la as T,lc as _,na as C,sb as g,tb as p,ub as S,wb as f,xb as E,yb as M,zb as o}from"./chunk-XYHHESIX.js";function B(n,t){n&1&&(o(0,"div",4),m(1,0),i())}function J(n,t){if(n&1&&(o(0,"li"),s(1),i()),n&2){let e=t.$implicit;l(),L(e)}}function U(n,t){if(n&1&&(o(0,"code")(1,"ol",15),f(2,J,2,1,"li",null,S),i()()),n&2){let e=d(2).$implicit,a=d(2);l(2),E(a.breakIntoLines(e.Exception))}}function X(n,t){if(n&1&&(o(0,"li"),s(1),i()),n&2){let e=t.$implicit;l(),L(e)}}function j(n,t){if(n&1&&(o(0,"code")(1,"ol",15),f(2,X,2,1,"li",null,S),i()()),n&2){let e=d(2).$implicit,a=d(2);l(2),E(a.breakIntoLines(e.Message))}}function z(n,t){if(n&1&&(o(0,"tr")(1,"td",12)(2,"sh-list",13)(3,"div",14),s(4),i(),o(5,"div",14),s(6),i(),o(7,"div",14),s(8),i(),o(9,"div",14),s(10),i(),o(11,"div",14),s(12),i()(),g(13,U,4,0,"code"),g(14,j,4,0,"code"),i()()),n&2){let e=d().$implicit;l(4),_("ID: ",e.ID),l(2),_("Type: ",e.Type),l(2),_("Tag: ",e.Tag),l(2),_("TaskID: ",e.TaskID),l(2),_("MessageID: ",e.MessageID),l(),p(e.Exception?13:-1),l(),p(e.Message?14:-1)}}function W(n,t){if(n&1){let e=N();o(0,"tr",10),G("click",function(){let r=I(e).$index,c=d(2);return h(c.toggleRow(r))}),o(1,"td"),s(2),R(3,"date"),i(),o(4,"td"),s(5),i(),o(6,"td",8)(7,"button",11)(8,"sh-icon"),s(9,"caret-down"),i()()()(),g(10,z,15,7,"tr")}if(n&2){let e=t.$implicit,a=t.$index,r=d(2);l(2),L(y(3,5,e.When,"medium")),l(3),L(r.subStringMessage(e.Message)),l(2),v("rotated-icon",a===r.openRowIndex()),l(3),p(a===r.openRowIndex()?10:-1)}}function H(n,t){if(n&1&&(o(0,"sh-table",6)(1,"tr",7)(2,"th"),m(3,1),i(),o(4,"th"),m(5,2),i(),P(6,"th",8),i(),f(7,W,11,8,null,null,S),o(9,"div",9),m(10,3),i()()),n&2){let e=d();w("grid-template-columns","auto 1fr auto"),v("type-b",e.asSimpleList()),M("data",e.logs())("loading",e.logsLoading()),l(7),E(e.logs())}}var b=class n{#e=O(V);whenFilter=u();backupIdFilter=u();asSimpleList=u();polling=u();logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;logs=this.#e.logs;logsLoading=this.#e.logsLoading;pollingEffect=C(()=>{let t=this.polling()??!1;this.#e.isPolling.set(t)});openRowIndex=T(null);whenEffect=C(()=>{let t=this.whenFilter()??null;this.#e.setWhenFilter(t),this.#e.logLevel.set(t?"Verbose":"Disabled")});backupIdEffect=C(()=>{let t=this.backupIdFilter()??null;this.#e.setBackupIdFilter(t),this.#e.logLevel.set(t?"Verbose":"Disabled")});toggleRow(t){this.openRowIndex.set(t===this.openRowIndex()?null:t)}breakIntoLines(t){return t?t.split(`
2
+ `):[]}subStringMessage(t){return t?t.substring(0,80)+"...":""}ngOnDestroy(){this.#e.destroy()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=x({type:n,selectors:[["app-logs-live"]],hostVars:2,hostBindings:function(e,a){e&2&&v("simple-list",a.asSimpleList())},inputs:{whenFilter:[1,"whenFilter"],backupIdFilter:[1,"backupIdFilter"],asSimpleList:[1,"asSimpleList"],polling:[1,"polling"]},decls:2,vars:1,consts:()=>{let t;t=$localize`Live logs are disabled`;let e;e=$localize`When`;let a;a=$localize`Message`;let r;return r=$localize`No data available`,[t,e,a,r,[1,"live-view-disabled"],[3,"type-b","data","loading","grid-template-columns"],[3,"data","loading"],["thead",""],[1,"sticky-end"],["table-no-rows",""],[3,"click"],["shButton","","type","button",1,"outlined","small"],[1,"expanded-cell"],[1,"primary"],["item",""],[1,"line-numbers-ol"]]},template:function(e,a){e&1&&g(0,B,2,0,"div",4)(1,H,11,6,"sh-table",5),e&2&&p(a.logLevel()==="Disabled"?0:1)},dependencies:[F,k,D,A,$],styles:["[_nghost-%COMP%]{display:block;padding:0 2rem}.simple-list[_nghost-%COMP%] sh-table[_ngcontent-%COMP%]{--table-td-bg: var(--base-2);height:100%}.live-view-disabled[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:18.75rem;width:100%;background-color:var(--base-2);border:1px solid var(--base-3);border-radius:var(--shape-2);font:var(--paragraph-20)}.expanded-cell[_ngcontent-%COMP%]{height:auto;grid-column:1/-1;white-space:pre-wrap;display:flex;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}sh-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}sh-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre;max-width:100%}"],changeDetection:0})};export{b as a};
@@ -1 +1 @@
1
- import{u as _}from"./chunk-LFRGO2IP.js";import{Db as o,Eb as n,Ra as r,Xc as C,Zb as m,_c as u,ac as f,bb as g,bc as a,kc as h,nc as s,wb as d,xb as p}from"./chunk-FAM42SZT.js";var v=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],M=["[title]","[description]","[action]","*"];function P(e,c){e&1&&s(0,"Title")}function T(e,c){e&1&&(o(0,"sh-icon"),s(1,"caret-down"),n())}var l=class e{isActive=u(!1);disallowToggle=C(!1);ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=g({type:e,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(t,i){t&2&&h("active",i.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:M,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(t,i){t&1&&(f(v),o(0,"header")(1,"div",0)(2,"h3",1),m("click",function(){return i.disallowToggle()||i.toggle()}),a(3,0,null,P,1,0),d(5,T,2,0,"sh-icon"),n(),a(6,1),n(),o(7,"div",2),a(8,2),n()(),o(9,"div",3),a(10,3),n()),t&2&&(r(5),p(i.disallowToggle()?-1:5))},dependencies:[_],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;border-radius:var(--shape-3);background-color:var(--base-2)}.active[_nghost-%COMP%] .content[_ngcontent-%COMP%]{max-height:1000px;transition:max-height 1s linear;padding:0 1rem 1rem}.active[_nghost-%COMP%] sh-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}[_nghost-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;font:var(--paragraph-10);cursor:pointer;-webkit-user-select:none;user-select:none}[_nghost-%COMP%] sh-icon[_ngcontent-%COMP%]{transform:rotate(0);transform-origin:center;transition:transform .2s ease}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1 0}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]:empty{display:none}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0 1rem;overflow:hidden;max-height:0;transition:max-height .25s linear,padding .25s linear}.content[_ngcontent-%COMP%]:empty{display:none}"],changeDetection:0})};export{l as a};
1
+ import{u as _}from"./chunk-RYXU2QDS.js";import{Ab as n,Pa as r,Rc as C,Uc as u,Vb as m,Yb as f,Zb as a,cb as g,gc as h,jc as s,sb as d,tb as p,zb as o}from"./chunk-XYHHESIX.js";var v=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],M=["[title]","[description]","[action]","*"];function P(e,c){e&1&&s(0,"Title")}function T(e,c){e&1&&(o(0,"sh-icon"),s(1,"caret-down"),n())}var l=class e{isActive=u(!1);disallowToggle=C(!1);ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=g({type:e,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(t,i){t&2&&h("active",i.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:M,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(t,i){t&1&&(f(v),o(0,"header")(1,"div",0)(2,"h3",1),m("click",function(){return i.disallowToggle()||i.toggle()}),a(3,0,null,P,1,0),d(5,T,2,0,"sh-icon"),n(),a(6,1),n(),o(7,"div",2),a(8,2),n()(),o(9,"div",3),a(10,3),n()),t&2&&(r(5),p(i.disallowToggle()?-1:5))},dependencies:[_],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;border-radius:var(--shape-3);background-color:var(--base-2)}.active[_nghost-%COMP%] .content[_ngcontent-%COMP%]{max-height:1000px;transition:max-height 1s linear;padding:0 1rem 1rem}.active[_nghost-%COMP%] sh-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}[_nghost-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;font:var(--paragraph-10);cursor:pointer;-webkit-user-select:none;user-select:none}[_nghost-%COMP%] sh-icon[_ngcontent-%COMP%]{transform:rotate(0);transform-origin:center;transition:transform .2s ease}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1 0}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]:empty{display:none}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0 1rem;overflow:hidden;max-height:0;transition:max-height .25s linear,padding .25s linear}.content[_ngcontent-%COMP%]:empty{display:none}"],changeDetection:0})};export{l as a};
@@ -0,0 +1 @@
1
+ import{b as $r}from"./chunk-56FBKSBN.js";import{h as jr,k as Je}from"./chunk-RMOTUTEQ.js";import{$a as Cr,$b as Nr,A as be,Bb as Er,C as ce,E as dr,F as V,G as Ot,Hc as Ur,J as hr,K as x,L as We,M as A,Na as Rr,O as S,P as fr,Pc as _r,R as m,Rc as Lr,T as pr,U as T,V as H,Vb as Or,Vc as Ye,W as h,X as Dt,Xa as Pt,Ya as j,Z as ee,Za as Sr,Zc as Xe,_ as P,_b as Dr,ac as Pr,ad as xr,bb as Ze,cb as wr,d as or,da as gr,e as sr,eb as Te,f as ar,fa as vr,g as J,ga as mr,h as O,ha as te,j as z,jb as br,k as I,ka as Qe,l as p,la as Ie,lb as Ir,m as ur,n as Mt,nb as Ar,o as cr,oa as G,ob as Tr,p as R,pa as Ae,q as Et,qa as Ke,r as L,ra as yr,rb as Mr,s as Ce,sa as Nt,t as lr,u as Ge,x as F,z as we}from"./chunk-XYHHESIX.js";import{a as d,b as N}from"./chunk-7CGTOI24.js";var f="primary",ke=Symbol("RouteTitle"),jt=class{params;constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e[0]:e}return null}getAll(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function oe(t){return new jt(t)}function Wr(t,n,e){let r=e.path.split("/");if(r.length>t.length||e.pathMatch==="full"&&(n.hasChildren()||r.length<t.length))return null;let i={};for(let o=0;o<r.length;o++){let s=r[o],a=t[o];if(s[0]===":")i[s.substring(1)]=a;else if(s!==a.path)return null}return{consumed:t.slice(0,r.length),posParams:i}}function ot(t){return new Promise((n,e)=>{t.pipe(V()).subscribe({next:r=>n(r),error:r=>e(r)})})}function Fn(t,n){if(t.length!==n.length)return!1;for(let e=0;e<t.length;++e)if(!$(t[e],n[e]))return!1;return!0}function $(t,n){let e=t?$t(t):void 0,r=n?$t(n):void 0;if(!e||!r||e.length!=r.length)return!1;let i;for(let o=0;o<e.length;o++)if(i=e[o],!Qr(t[i],n[i]))return!1;return!0}function $t(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function Qr(t,n){if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return!1;let e=[...t].sort(),r=[...n].sort();return e.every((i,o)=>r[o]===i)}else return t===n}function Kr(t){return t.length>0?t[t.length-1]:null}function ae(t){return Mt(t)?t:Ir(t)?I(Promise.resolve(t)):p(t)}function Zr(t){return Mt(t)?ot(t):Promise.resolve(t)}var qn={exact:Xr,subset:Jr},Yr={exact:Bn,subset:Vn,ignored:()=>!0};function kr(t,n,e){return qn[e.paths](t.root,n.root,e.matrixParams)&&Yr[e.queryParams](t.queryParams,n.queryParams)&&!(e.fragment==="exact"&&t.fragment!==n.fragment)}function Bn(t,n){return $(t,n)}function Xr(t,n,e){if(!ne(t.segments,n.segments)||!rt(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(let r in n.children)if(!t.children[r]||!Xr(t.children[r],n.children[r],e))return!1;return!0}function Vn(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>Qr(t[e],n[e]))}function Jr(t,n,e){return en(t,n,n.segments,e)}function en(t,n,e,r){if(t.segments.length>e.length){let i=t.segments.slice(0,e.length);return!(!ne(i,e)||n.hasChildren()||!rt(i,e,r))}else if(t.segments.length===e.length){if(!ne(t.segments,e)||!rt(t.segments,e,r))return!1;for(let i in n.children)if(!t.children[i]||!Jr(t.children[i],n.children[i],r))return!1;return!0}else{let i=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!ne(t.segments,i)||!rt(t.segments,i,r)||!t.children[f]?!1:en(t.children[f],n,o,r)}}function rt(t,n,e){return n.every((r,i)=>Yr[e](t[i].parameters,r.parameters))}var _=class{root;queryParams;fragment;_queryParamMap;constructor(n=new g([],{}),e={},r=null){this.root=n,this.queryParams=e,this.fragment=r}get queryParamMap(){return this._queryParamMap??=oe(this.queryParams),this._queryParamMap}toString(){return Wn.serialize(this)}},g=class{segments;children;parent=null;constructor(n,e){this.segments=n,this.children=e,Object.values(e).forEach(r=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return nt(this)}},W=class{path;parameters;_parameterMap;constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap??=oe(this.parameters),this._parameterMap}toString(){return rn(this)}};function Hn(t,n){return ne(t,n)&&t.every((e,r)=>$(e.parameters,n[r].parameters))}function ne(t,n){return t.length!==n.length?!1:t.every((e,r)=>e.path===n[r].path)}function Gn(t,n){let e=[];return Object.entries(t.children).forEach(([r,i])=>{r===f&&(e=e.concat(n(i,r)))}),Object.entries(t.children).forEach(([r,i])=>{r!==f&&(e=e.concat(n(i,r)))}),e}var ze=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:()=>new Q,providedIn:"root"})}return t})(),Q=class{parse(n){let e=new zt(n);return new _(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){let e=`/${Me(n.root,!0)}`,r=Zn(n.queryParams),i=typeof n.fragment=="string"?`#${Qn(n.fragment)}`:"";return`${e}${r}${i}`}},Wn=new Q;function nt(t){return t.segments.map(n=>rn(n)).join("/")}function Me(t,n){if(!t.hasChildren())return nt(t);if(n){let e=t.children[f]?Me(t.children[f],!1):"",r=[];return Object.entries(t.children).forEach(([i,o])=>{i!==f&&r.push(`${i}:${Me(o,!1)}`)}),r.length>0?`${e}(${r.join("//")})`:e}else{let e=Gn(t,(r,i)=>i===f?[Me(t.children[f],!1)]:[`${i}:${Me(r,!1)}`]);return Object.keys(t.children).length===1&&t.children[f]!=null?`${nt(t)}/${e[0]}`:`${nt(t)}/(${e.join("//")})`}}function tn(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function et(t){return tn(t).replace(/%3B/gi,";")}function Qn(t){return encodeURI(t)}function kt(t){return tn(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function it(t){return decodeURIComponent(t)}function zr(t){return it(t.replace(/\+/g,"%20"))}function rn(t){return`${kt(t.path)}${Kn(t.parameters)}`}function Kn(t){return Object.entries(t).map(([n,e])=>`;${kt(n)}=${kt(e)}`).join("")}function Zn(t){let n=Object.entries(t).map(([e,r])=>Array.isArray(r)?r.map(i=>`${et(e)}=${et(i)}`).join("&"):`${et(e)}=${et(r)}`).filter(e=>e);return n.length?`?${n.join("&")}`:""}var Yn=/^[^\/()?;#]+/;function Ut(t){let n=t.match(Yn);return n?n[0]:""}var Xn=/^[^\/()?;=#]+/;function Jn(t){let n=t.match(Xn);return n?n[0]:""}var ei=/^[^=?&#]+/;function ti(t){let n=t.match(ei);return n?n[0]:""}var ri=/^[^&#]+/;function ni(t){let n=t.match(ri);return n?n[0]:""}var zt=class{url;remaining;constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new g([],{}):new g([],this.parseChildren())}parseQueryParams(){let n={};if(this.consumeOptional("?"))do this.parseQueryParam(n);while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(n.length>0||Object.keys(e).length>0)&&(r[f]=new g(n,e)),r}parseSegment(){let n=Ut(this.remaining);if(n===""&&this.peekStartsWith(";"))throw new S(4009,!1);return this.capture(n),new W(it(n),this.parseMatrixParams())}parseMatrixParams(){let n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){let e=Jn(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let i=Ut(this.remaining);i&&(r=i,this.capture(r))}n[it(e)]=it(r)}parseQueryParam(n){let e=ti(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let s=ni(this.remaining);s&&(r=s,this.capture(r))}let i=zr(e),o=zr(r);if(n.hasOwnProperty(i)){let s=n[i];Array.isArray(s)||(s=[s],n[i]=s),s.push(o)}else n[i]=o}parseParens(n){let e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let r=Ut(this.remaining),i=this.remaining[r.length];if(i!=="/"&&i!==")"&&i!==";")throw new S(4010,!1);let o;r.indexOf(":")>-1?(o=r.slice(0,r.indexOf(":")),this.capture(o),this.capture(":")):n&&(o=f);let s=this.parseChildren();e[o??f]=Object.keys(s).length===1&&s[f]?s[f]:new g([],s),this.consumeOptional("//")}return e}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return this.peekStartsWith(n)?(this.remaining=this.remaining.substring(n.length),!0):!1}capture(n){if(!this.consumeOptional(n))throw new S(4011,!1)}};function nn(t){return t.segments.length>0?new g([],{[f]:t}):t}function on(t){let n={};for(let[r,i]of Object.entries(t.children)){let o=on(i);if(r===f&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))n[s]=a;else(o.segments.length>0||o.hasChildren())&&(n[r]=o)}let e=new g(t.segments,n);return ii(e)}function ii(t){if(t.numberOfChildren===1&&t.children[f]){let n=t.children[f];return new g(t.segments.concat(n.segments),n.children)}return t}function K(t){return t instanceof _}function sn(t,n,e=null,r=null,i=new Q){let o=an(t);return un(o,n,e,r,i)}function an(t){let n;function e(o){let s={};for(let u of o.children){let c=e(u);s[u.outlet]=c}let a=new g(o.url,s);return o===t&&(n=a),a}let r=e(t.root),i=nn(r);return n??i}function un(t,n,e,r,i){let o=t;for(;o.parent;)o=o.parent;if(n.length===0)return _t(o,o,o,e,r,i);let s=oi(n);if(s.toRoot())return _t(o,o,new g([],{}),e,r,i);let a=si(s,o,t),u=a.processChildren?Oe(a.segmentGroup,a.index,s.commands):ln(a.segmentGroup,a.index,s.commands);return _t(o,a.segmentGroup,u,e,r,i)}function st(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function Pe(t){return typeof t=="object"&&t!=null&&t.outlets}function Fr(t,n,e){t||="\u0275";let r=new _;return r.queryParams={[t]:n},e.parse(e.serialize(r)).queryParams[t]}function _t(t,n,e,r,i,o){let s={};for(let[c,l]of Object.entries(r??{}))s[c]=Array.isArray(l)?l.map(v=>Fr(c,v,o)):Fr(c,l,o);let a;t===n?a=e:a=cn(t,n,e);let u=nn(on(a));return new _(u,s,i)}function cn(t,n,e){let r={};return Object.entries(t.children).forEach(([i,o])=>{o===n?r[i]=e:r[i]=cn(o,n,e)}),new g(t.segments,r)}var at=class{isAbsolute;numberOfDoubleDots;commands;constructor(n,e,r){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=r,n&&r.length>0&&st(r[0]))throw new S(4003,!1);let i=r.find(Pe);if(i&&i!==Kr(r))throw new S(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function oi(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new at(!0,0,t);let n=0,e=!1,r=t.reduce((i,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([u,c])=>{a[u]=typeof c=="string"?c.split("/"):c}),[...i,{outlets:a}]}if(o.segmentPath)return[...i,o.segmentPath]}return typeof o!="string"?[...i,o]:s===0?(o.split("/").forEach((a,u)=>{u==0&&a==="."||(u==0&&a===""?e=!0:a===".."?n++:a!=""&&i.push(a))}),i):[...i,o]},[]);return new at(e,n,r)}var de=class{segmentGroup;processChildren;index;constructor(n,e,r){this.segmentGroup=n,this.processChildren=e,this.index=r}};function si(t,n,e){if(t.isAbsolute)return new de(n,!0,0);if(!e)return new de(n,!1,NaN);if(e.parent===null)return new de(e,!0,0);let r=st(t.commands[0])?0:1,i=e.segments.length-1+r;return ai(e,i,t.numberOfDoubleDots)}function ai(t,n,e){let r=t,i=n,o=e;for(;o>i;){if(o-=i,r=r.parent,!r)throw new S(4005,!1);i=r.segments.length}return new de(r,!1,i-o)}function ui(t){return Pe(t[0])?t[0].outlets:{[f]:t}}function ln(t,n,e){if(t??=new g([],{}),t.segments.length===0&&t.hasChildren())return Oe(t,n,e);let r=ci(t,n,e),i=e.slice(r.commandIndex);if(r.match&&r.pathIndex<t.segments.length){let o=new g(t.segments.slice(0,r.pathIndex),{});return o.children[f]=new g(t.segments.slice(r.pathIndex),t.children),Oe(o,0,i)}else return r.match&&i.length===0?new g(t.segments,{}):r.match&&!t.hasChildren()?Ft(t,n,e):r.match?Oe(t,0,i):Ft(t,n,e)}function Oe(t,n,e){if(e.length===0)return new g(t.segments,{});{let r=ui(e),i={};if(Object.keys(r).some(o=>o!==f)&&t.children[f]&&t.numberOfChildren===1&&t.children[f].segments.length===0){let o=Oe(t.children[f],n,e);return new g(t.segments,o.children)}return Object.entries(r).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(i[o]=ln(t.children[o],n,s))}),Object.entries(t.children).forEach(([o,s])=>{r[o]===void 0&&(i[o]=s)}),new g(t.segments,i)}}function ci(t,n,e){let r=0,i=n,o={match:!1,pathIndex:0,commandIndex:0};for(;i<t.segments.length;){if(r>=e.length)return o;let s=t.segments[i],a=e[r];if(Pe(a))break;let u=`${a}`,c=r<e.length-1?e[r+1]:null;if(i>0&&u===void 0)break;if(u&&c&&typeof c=="object"&&c.outlets===void 0){if(!Br(u,c,s))return o;r+=2}else{if(!Br(u,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}function Ft(t,n,e){let r=t.segments.slice(0,n),i=0;for(;i<e.length;){let o=e[i];if(Pe(o)){let u=li(o.outlets);return new g(r,u)}if(i===0&&st(e[0])){let u=t.segments[n];r.push(new W(u.path,qr(e[0]))),i++;continue}let s=Pe(o)?o.outlets[f]:`${o}`,a=i<e.length-1?e[i+1]:null;s&&a&&st(a)?(r.push(new W(s,qr(a))),i+=2):(r.push(new W(s,{})),i++)}return new g(r,{})}function li(t){let n={};return Object.entries(t).forEach(([e,r])=>{typeof r=="string"&&(r=[r]),r!==null&&(n[e]=Ft(new g([],{}),0,r))}),n}function qr(t){let n={};return Object.entries(t).forEach(([e,r])=>n[e]=`${r}`),n}function Br(t,n,e){return t==e.path&&$(n,e.parameters)}var De="imperative",y=(function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t})(y||{}),E=class{id;url;constructor(n,e){this.id=n,this.url=e}},se=class extends E{type=y.NavigationStart;navigationTrigger;restoredState;constructor(n,e,r="imperative",i=null){super(n,e),this.navigationTrigger=r,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},D=class extends E{urlAfterRedirects;type=y.NavigationEnd;constructor(n,e,r){super(n,e),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},b=(function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t[t.Aborted=4]="Aborted",t})(b||{}),Ue=(function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t})(Ue||{}),k=class extends E{reason;code;type=y.NavigationCancel;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},q=class extends E{reason;code;type=y.NavigationSkipped;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}},fe=class extends E{error;target;type=y.NavigationError;constructor(n,e,r,i){super(n,e),this.error=r,this.target=i}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},_e=class extends E{urlAfterRedirects;state;type=y.RoutesRecognized;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ut=class extends E{urlAfterRedirects;state;type=y.GuardsCheckStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ct=class extends E{urlAfterRedirects;state;shouldActivate;type=y.GuardsCheckEnd;constructor(n,e,r,i,o){super(n,e),this.urlAfterRedirects=r,this.state=i,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},lt=class extends E{urlAfterRedirects;state;type=y.ResolveStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},dt=class extends E{urlAfterRedirects;state;type=y.ResolveEnd;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ht=class{route;type=y.RouteConfigLoadStart;constructor(n){this.route=n}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},ft=class{route;type=y.RouteConfigLoadEnd;constructor(n){this.route=n}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},pt=class{snapshot;type=y.ChildActivationStart;constructor(n){this.snapshot=n}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},gt=class{snapshot;type=y.ChildActivationEnd;constructor(n){this.snapshot=n}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},vt=class{snapshot;type=y.ActivationStart;constructor(n){this.snapshot=n}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},mt=class{snapshot;type=y.ActivationEnd;constructor(n){this.snapshot=n}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var Le=class{},pe=class{url;navigationBehaviorOptions;constructor(n,e){this.url=n,this.navigationBehaviorOptions=e}};function di(t){return!(t instanceof Le)&&!(t instanceof pe)}function hi(t,n){return t.providers&&!t._injector&&(t._injector=Ze(t.providers,n,`Route: ${t.path}`)),t._injector??n}function U(t){return t.outlet||f}function fi(t,n){let e=t.filter(r=>U(r)===n);return e.push(...t.filter(r=>U(r)!==n)),e}function me(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let n=t.parent;n;n=n.parent){let e=n.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}var yt=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return me(this.route?.snapshot)??this.rootInjector}constructor(n){this.rootInjector=n,this.children=new ye(this.rootInjector)}},ye=(()=>{class t{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e}onChildOutletCreated(e,r){let i=this.getOrCreateContext(e);i.outlet=r,this.contexts.set(e,i)}onChildOutletDestroyed(e){let r=this.getContext(e);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let r=this.getContext(e);return r||(r=new yt(this.rootInjector),this.contexts.set(e,r)),r}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(r){return new(r||t)(H(ee))};static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Rt=class{_root;constructor(n){this._root=n}get root(){return this._root.value}parent(n){let e=this.pathFromRoot(n);return e.length>1?e[e.length-2]:null}children(n){let e=qt(n,this._root);return e?e.children.map(r=>r.value):[]}firstChild(n){let e=qt(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){let e=Bt(n,this._root);return e.length<2?[]:e[e.length-2].children.map(i=>i.value).filter(i=>i!==n)}pathFromRoot(n){return Bt(n,this._root).map(e=>e.value)}};function qt(t,n){if(t===n.value)return n;for(let e of n.children){let r=qt(t,e);if(r)return r}return null}function Bt(t,n){if(t===n.value)return[n];for(let e of n.children){let r=Bt(t,e);if(r.length)return r.unshift(n),r}return[]}var M=class{value;children;constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}};function le(t){let n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}var xe=class extends Rt{snapshot;constructor(n,e){super(n),this.snapshot=e,Kt(this,n)}toString(){return this.snapshot.toString()}};function dn(t){let n=pi(t),e=new O([new W("",{})]),r=new O({}),i=new O({}),o=new O({}),s=new O(""),a=new B(e,r,o,s,i,f,t,n.root);return a.snapshot=n.root,new xe(new M(a,[]),n)}function pi(t){let n={},e={},r={},o=new ie([],n,r,"",e,f,t,null,{});return new je("",new M(o,[]))}var B=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(n,e,r,i,o,s,a,u){this.urlSubject=n,this.paramsSubject=e,this.queryParamsSubject=r,this.fragmentSubject=i,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=u,this.title=this.dataSubject?.pipe(R(c=>c[ke]))??p(void 0),this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(R(n=>oe(n))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(R(n=>oe(n))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function St(t,n,e="emptyOnly"){let r,{routeConfig:i}=t;return n!==null&&(e==="always"||i?.path===""||!n.component&&!n.routeConfig?.loadComponent)?r={params:d(d({},n.params),t.params),data:d(d({},n.data),t.data),resolve:d(d(d(d({},t.data),n.data),i?.data),t._resolvedData)}:r={params:d({},t.params),data:d({},t.data),resolve:d(d({},t.data),t._resolvedData??{})},i&&fn(i)&&(r.resolve[ke]=i.title),r}var ie=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[ke]}constructor(n,e,r,i,o,s,a,u,c){this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this.routeConfig=u,this._resolve=c}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=oe(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=oe(this.queryParams),this._queryParamMap}toString(){let n=this.url.map(r=>r.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${n}', path:'${e}')`}},je=class extends Rt{url;constructor(n,e){super(e),this.url=n,Kt(this,e)}toString(){return hn(this._root)}};function Kt(t,n){n.value._routerState=t,n.children.forEach(e=>Kt(t,e))}function hn(t){let n=t.children.length>0?` { ${t.children.map(hn).join(", ")} } `:"";return`${t.value}${n}`}function Lt(t){if(t.snapshot){let n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,$(n.queryParams,e.queryParams)||t.queryParamsSubject.next(e.queryParams),n.fragment!==e.fragment&&t.fragmentSubject.next(e.fragment),$(n.params,e.params)||t.paramsSubject.next(e.params),Fn(n.url,e.url)||t.urlSubject.next(e.url),$(n.data,e.data)||t.dataSubject.next(e.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function Vt(t,n){let e=$(t.params,n.params)&&Hn(t.url,n.url),r=!t.parent!=!n.parent;return e&&!r&&(!t.parent||Vt(t.parent,n.parent))}function fn(t){return typeof t.title=="string"||t.title===null}var pn=new T(""),Zt=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=f;activateEvents=new te;deactivateEvents=new te;attachEvents=new te;detachEvents=new te;routerOutletData=Lr();parentContexts=h(ye);location=h(Sr);changeDetector=h(Ye);inputBinder=h(Fe,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(e){if(e.name){let{firstChange:r,previousValue:i}=e.name;if(r)return;this.isTrackedInParentContexts(i)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(i)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new S(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new S(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new S(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,r){this.activated=e,this._activatedRoute=r,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,r){if(this.isActivated)throw new S(4013,!1);this._activatedRoute=e;let i=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,u=new Ht(e,a,i.injector,this.routerOutletData);this.activated=i.createComponent(s,{index:i.length,injector:u,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Te({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[Ae]})}return t})(),Ht=class{route;childContexts;parent;outletData;constructor(n,e,r,i){this.route=n,this.childContexts=e,this.parent=r,this.outletData=i}get(n,e){return n===B?this.route:n===ye?this.childContexts:n===pn?this.outletData:this.parent.get(n,e)}},Fe=new T(""),Yt=(()=>{class t{outletDataSubscriptions=new Map;bindActivatedRouteToOutletComponent(e){this.unsubscribeFromRouteData(e),this.subscribeToRouteData(e)}unsubscribeFromRouteData(e){this.outletDataSubscriptions.get(e)?.unsubscribe(),this.outletDataSubscriptions.delete(e)}subscribeToRouteData(e){let{activatedRoute:r}=e,i=Et([r.queryParams,r.params,r.data]).pipe(x(([o,s,a],u)=>(a=d(d(d({},o),s),a),u===0?p(a):Promise.resolve(a)))).subscribe(o=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==r||r.component===null){this.unsubscribeFromRouteData(e);return}let s=xr(r.component);if(!s){this.unsubscribeFromRouteData(e);return}for(let{templateName:a}of s.inputs)e.activatedComponentRef.setInput(a,o[a])});this.outletDataSubscriptions.set(e,i)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:t.\u0275fac})}return t})(),Xt=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=wr({type:t,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(r,i){r&1&&Er(0,"router-outlet")},dependencies:[Zt],encapsulation:2})}return t})();function Jt(t){let n=t.children&&t.children.map(Jt),e=n?N(d({},t),{children:n}):d({},t);return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==f&&(e.component=Xt),e}function gi(t,n,e){let r=$e(t,n._root,e?e._root:void 0);return new xe(r,n)}function $e(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){let r=e.value;r._futureSnapshot=n.value;let i=vi(t,n,e);return new M(r,i)}else{if(t.shouldAttach(n.value)){let o=t.retrieve(n.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=n.value,s.children=n.children.map(a=>$e(t,a)),s}}let r=mi(n.value),i=n.children.map(o=>$e(t,o));return new M(r,i)}}function vi(t,n,e){return n.children.map(r=>{for(let i of e.children)if(t.shouldReuseRoute(r.value,i.value.snapshot))return $e(t,r,i);return $e(t,r)})}function mi(t){return new B(new O(t.url),new O(t.params),new O(t.queryParams),new O(t.fragment),new O(t.data),t.outlet,t.component,t)}var ge=class{redirectTo;navigationBehaviorOptions;constructor(n,e){this.redirectTo=n,this.navigationBehaviorOptions=e}},gn="ngNavigationCancelingError";function Ct(t,n){let{redirectTo:e,navigationBehaviorOptions:r}=K(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,i=vn(!1,b.Redirect);return i.url=e,i.navigationBehaviorOptions=r,i}function vn(t,n){let e=new Error(`NavigationCancelingError: ${t||""}`);return e[gn]=!0,e.cancellationCode=n,e}function yi(t){return mn(t)&&K(t.url)}function mn(t){return!!t&&t[gn]}var Ri=(t,n,e,r)=>R(i=>(new Gt(n,i.targetRouterState,i.currentRouterState,e,r).activate(t),i)),Gt=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(n,e,r,i,o){this.routeReuseStrategy=n,this.futureState=e,this.currState=r,this.forwardEvent=i,this.inputBindingEnabled=o}activate(n){let e=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,r,n),Lt(this.futureState.root),this.activateChildRoutes(e,r,n)}deactivateChildRoutes(n,e,r){let i=le(e);n.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,i[s],r),delete i[s]}),Object.values(i).forEach(o=>{this.deactivateRouteAndItsChildren(o,r)})}deactivateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(i===o)if(i.component){let s=r.getContext(i.outlet);s&&this.deactivateChildRoutes(n,e,s.children)}else this.deactivateChildRoutes(n,e,r);else o&&this.deactivateRouteAndItsChildren(e,r)}deactivateRouteAndItsChildren(n,e){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,e):this.deactivateRouteAndOutlet(n,e)}detachAndStoreRouteSubtree(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=le(n);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);if(r&&r.outlet){let s=r.outlet.detach(),a=r.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:s,route:n,contexts:a})}}deactivateRouteAndOutlet(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=le(n);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null)}activateChildRoutes(n,e,r){let i=le(e);n.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],r),this.forwardEvent(new mt(o.value.snapshot))}),n.children.length&&this.forwardEvent(new gt(n.value.snapshot))}activateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(Lt(i),i===o)if(i.component){let s=r.getOrCreateContext(i.outlet);this.activateChildRoutes(n,e,s.children)}else this.activateChildRoutes(n,e,r);else if(i.component){let s=r.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){let a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),Lt(a.route.value),this.activateChildRoutes(n,null,s.children)}else s.attachRef=null,s.route=i,s.outlet&&s.outlet.activateWith(i,s.injector),this.activateChildRoutes(n,null,s.children)}else this.activateChildRoutes(n,null,r)}},wt=class{path;route;constructor(n){this.path=n,this.route=this.path[this.path.length-1]}},he=class{component;route;constructor(n,e){this.component=n,this.route=e}};function Si(t,n,e){let r=t._root,i=n?n._root:null;return Ee(r,i,e,[r.value])}function Ci(t){let n=t.routeConfig?t.routeConfig.canActivateChild:null;return!n||n.length===0?null:{node:t,guards:n}}function Re(t,n){let e=Symbol(),r=n.get(t,e);return r===e?typeof t=="function"&&!pr(t)?t:n.get(t):r}function Ee(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=le(n);return t.children.forEach(s=>{wi(s,o[s.value.outlet],e,r.concat([s.value]),i),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>Ne(a,e.getContext(s),i)),i}function wi(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=t.value,s=n?n.value:null,a=e?e.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let u=bi(s,o,o.routeConfig.runGuardsAndResolvers);u?i.canActivateChecks.push(new wt(r)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?Ee(t,n,a?a.children:null,r,i):Ee(t,n,e,r,i),u&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new he(a.outlet.component,s))}else s&&Ne(n,a,i),i.canActivateChecks.push(new wt(r)),o.component?Ee(t,null,a?a.children:null,r,i):Ee(t,null,e,r,i);return i}function bi(t,n,e){if(typeof e=="function")return e(t,n);switch(e){case"pathParamsChange":return!ne(t.url,n.url);case"pathParamsOrQueryParamsChange":return!ne(t.url,n.url)||!$(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Vt(t,n)||!$(t.queryParams,n.queryParams);case"paramsChange":default:return!Vt(t,n)}}function Ne(t,n,e){let r=le(t),i=t.value;Object.entries(r).forEach(([o,s])=>{i.component?n?Ne(s,n.children.getContext(o),e):Ne(s,null,e):Ne(s,n,e)}),i.component?n&&n.outlet&&n.outlet.isActivated?e.canDeactivateChecks.push(new he(n.outlet.component,i)):e.canDeactivateChecks.push(new he(null,i)):e.canDeactivateChecks.push(new he(null,i))}function qe(t){return typeof t=="function"}function Ii(t){return typeof t=="boolean"}function Ai(t){return t&&qe(t.canLoad)}function Ti(t){return t&&qe(t.canActivate)}function Mi(t){return t&&qe(t.canActivateChild)}function Ei(t){return t&&qe(t.canDeactivate)}function Oi(t){return t&&qe(t.canMatch)}function yn(t){return t instanceof cr||t?.name==="EmptyError"}var tt=Symbol("INITIAL_VALUE");function ve(){return x(t=>Et(t.map(n=>n.pipe(ce(1),hr(tt)))).pipe(R(n=>{for(let e of n)if(e!==!0){if(e===tt)return tt;if(e===!1||Di(e))return e}return!0}),F(n=>n!==tt),ce(1)))}function Di(t){return K(t)||t instanceof ge}function Rn(t){return t.aborted?p(void 0).pipe(ce(1)):new ar(n=>{let e=()=>{n.next(),n.complete()};return t.addEventListener("abort",e),()=>t.removeEventListener("abort",e)})}function Sn(t){return We(Rn(t))}function Ni(t,n){return L(e=>{let{targetSnapshot:r,currentSnapshot:i,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return s.length===0&&o.length===0?p(N(d({},e),{guardsResult:!0})):Pi(s,r,i,t).pipe(L(a=>a&&Ii(a)?Ui(r,o,t,n):p(a)),R(a=>N(d({},e),{guardsResult:a})))})}function Pi(t,n,e,r){return I(t).pipe(L(i=>$i(i.component,i.route,e,n,r)),V(i=>i!==!0,!0))}function Ui(t,n,e,r){return I(n).pipe(be(i=>lr(Li(i.route.parent,r),_i(i.route,r),ji(t,i.path,e),xi(t,i.route,e))),V(i=>i!==!0,!0))}function _i(t,n){return t!==null&&n&&n(new vt(t)),p(!0)}function Li(t,n){return t!==null&&n&&n(new pt(t)),p(!0)}function xi(t,n,e){let r=n.routeConfig?n.routeConfig.canActivate:null;if(!r||r.length===0)return p(!0);let i=r.map(o=>Ge(()=>{let s=me(n)??e,a=Re(o,s),u=Ti(a)?a.canActivate(n,t):P(s,()=>a(n,t));return ae(u).pipe(V())}));return p(i).pipe(ve())}function ji(t,n,e){let r=n[n.length-1],o=n.slice(0,n.length-1).reverse().map(s=>Ci(s)).filter(s=>s!==null).map(s=>Ge(()=>{let a=s.guards.map(u=>{let c=me(s.node)??e,l=Re(u,c),v=Mi(l)?l.canActivateChild(r,t):P(c,()=>l(r,t));return ae(v).pipe(V())});return p(a).pipe(ve())}));return p(o).pipe(ve())}function $i(t,n,e,r,i){let o=n&&n.routeConfig?n.routeConfig.canDeactivate:null;if(!o||o.length===0)return p(!0);let s=o.map(a=>{let u=me(n)??i,c=Re(a,u),l=Ei(c)?c.canDeactivate(t,n,e,r):P(u,()=>c(t,n,e,r));return ae(l).pipe(V())});return p(s).pipe(ve())}function ki(t,n,e,r,i){let o=n.canLoad;if(o===void 0||o.length===0)return p(!0);let s=o.map(a=>{let u=Re(a,t),c=Ai(u)?u.canLoad(n,e):P(t,()=>u(n,e)),l=ae(c);return i?l.pipe(Sn(i)):l});return p(s).pipe(ve(),Cn(r))}function Cn(t){return sr(A(n=>{if(typeof n!="boolean")throw Ct(t,n)}),R(n=>n===!0))}function zi(t,n,e,r,i){let o=n.canMatch;if(!o||o.length===0)return p(!0);let s=o.map(a=>{let u=Re(a,t),c=Oi(u)?u.canMatch(n,e):P(t,()=>u(n,e)),l=ae(c);return i?l.pipe(Sn(i)):l});return p(s).pipe(ve(),Cn(r))}var re=class wn extends Error{segmentGroup;constructor(n){super(),this.segmentGroup=n||null,Object.setPrototypeOf(this,wn.prototype)}},Wt=class bn extends Error{urlTree;constructor(n){super(),this.urlTree=n,Object.setPrototypeOf(this,bn.prototype)}};function Fi(t){throw new S(4e3,!1)}function qi(t){throw vn(!1,b.GuardRejected)}var Bi=class{urlSerializer;urlTree;constructor(n,e){this.urlSerializer=n,this.urlTree=e}async lineralizeSegments(n,e){let r=[],i=e.root;for(;;){if(r=r.concat(i.segments),i.numberOfChildren===0)return r;if(i.numberOfChildren>1||!i.children[f])throw Fi(`${n.redirectTo}`);i=i.children[f]}}async applyRedirectCommands(n,e,r,i,o){let s=await Vi(e,i,o);if(s instanceof _)throw new Wt(s);let a=this.applyRedirectCreateUrlTree(s,this.urlSerializer.parse(s),n,r);if(s[0]==="/")throw new Wt(a);return a}applyRedirectCreateUrlTree(n,e,r,i){let o=this.createSegmentGroup(n,e.root,r,i);return new _(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(n,e){let r={};return Object.entries(n).forEach(([i,o])=>{if(typeof o=="string"&&o[0]===":"){let a=o.substring(1);r[i]=e[a]}else r[i]=o}),r}createSegmentGroup(n,e,r,i){let o=this.createSegments(n,e.segments,r,i),s={};return Object.entries(e.children).forEach(([a,u])=>{s[a]=this.createSegmentGroup(n,u,r,i)}),new g(o,s)}createSegments(n,e,r,i){return e.map(o=>o.path[0]===":"?this.findPosParam(n,o,i):this.findOrReturn(o,r))}findPosParam(n,e,r){let i=r[e.path.substring(1)];if(!i)throw new S(4001,!1);return i}findOrReturn(n,e){let r=0;for(let i of e){if(i.path===n.path)return e.splice(r),i;r++}return n}};function Vi(t,n,e){if(typeof t=="string")return Promise.resolve(t);let r=t,{queryParams:i,fragment:o,routeConfig:s,url:a,outlet:u,params:c,data:l,title:v}=n;return ot(ae(P(e,()=>r({params:c,data:l,queryParams:i,fragment:o,routeConfig:s,url:a,outlet:u,title:v}))))}var Qt={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Hi(t,n,e,r,i,o){let s=In(t,n,e);return s.matched?(r=hi(n,r),zi(r,n,e,i,o).pipe(R(a=>a===!0?s:d({},Qt)))):p(s)}function In(t,n,e){if(n.path==="**")return Gi(e);if(n.path==="")return n.pathMatch==="full"&&(t.hasChildren()||e.length>0)?d({},Qt):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let i=(n.matcher||Wr)(e,t,n);if(!i)return d({},Qt);let o={};Object.entries(i.posParams??{}).forEach(([a,u])=>{o[a]=u.path});let s=i.consumed.length>0?d(d({},o),i.consumed[i.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:i.consumed,remainingSegments:e.slice(i.consumed.length),parameters:s,positionalParamSegments:i.posParams??{}}}function Gi(t){return{matched:!0,parameters:t.length>0?Kr(t).parameters:{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}function Vr(t,n,e,r){return e.length>0&&Ki(t,e,r)?{segmentGroup:new g(n,Qi(r,new g(e,t.children))),slicedSegments:[]}:e.length===0&&Zi(t,e,r)?{segmentGroup:new g(t.segments,Wi(t,e,r,t.children)),slicedSegments:e}:{segmentGroup:new g(t.segments,t.children),slicedSegments:e}}function Wi(t,n,e,r){let i={};for(let o of e)if(It(t,n,o)&&!r[U(o)]){let s=new g([],{});i[U(o)]=s}return d(d({},r),i)}function Qi(t,n){let e={};e[f]=n;for(let r of t)if(r.path===""&&U(r)!==f){let i=new g([],{});e[U(r)]=i}return e}function Ki(t,n,e){return e.some(r=>It(t,n,r)&&U(r)!==f)}function Zi(t,n,e){return e.some(r=>It(t,n,r))}function It(t,n,e){return(t.hasChildren()||n.length>0)&&e.pathMatch==="full"?!1:e.path===""}function Yi(t,n,e){return n.length===0&&!t.children[e]}var Xi=class{};async function Ji(t,n,e,r,i,o,s="emptyOnly",a){return new to(t,n,e,r,i,s,o,a).recognize()}var eo=31,to=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;abortSignal;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(n,e,r,i,o,s,a,u){this.injector=n,this.configLoader=e,this.rootComponentType=r,this.config=i,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.abortSignal=u,this.applyRedirects=new Bi(this.urlSerializer,this.urlTree)}noMatchError(n){return new S(4002,`'${n.segmentGroup}'`)}async recognize(){let n=Vr(this.urlTree.root,[],[],this.config).segmentGroup,{children:e,rootSnapshot:r}=await this.match(n),i=new M(r,e),o=new je("",i),s=sn(r,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}}async match(n){let e=new ie([],Object.freeze({}),Object.freeze(d({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),f,this.rootComponentType,null,{});try{return{children:await this.processSegmentGroup(this.injector,this.config,n,f,e),rootSnapshot:e}}catch(r){if(r instanceof Wt)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof re?this.noMatchError(r):r}}async processSegmentGroup(n,e,r,i,o){if(r.segments.length===0&&r.hasChildren())return this.processChildren(n,e,r,o);let s=await this.processSegment(n,e,r,r.segments,i,!0,o);return s instanceof M?[s]:[]}async processChildren(n,e,r,i){let o=[];for(let u of Object.keys(r.children))u==="primary"?o.unshift(u):o.push(u);let s=[];for(let u of o){let c=r.children[u],l=fi(e,u),v=await this.processSegmentGroup(n,l,c,u,i);s.push(...v)}let a=An(s);return ro(a),a}async processSegment(n,e,r,i,o,s,a){for(let u of e)try{return await this.processSegmentAgainstRoute(u._injector??n,e,u,r,i,o,s,a)}catch(c){if(c instanceof re||yn(c))continue;throw c}if(Yi(r,i,o))return new Xi;throw new re(r)}async processSegmentAgainstRoute(n,e,r,i,o,s,a,u){if(U(r)!==s&&(s===f||!It(i,o,r)))throw new re(i);if(r.redirectTo===void 0)return this.matchSegmentAgainstRoute(n,i,r,o,s,u);if(this.allowRedirects&&a)return this.expandSegmentAgainstRouteUsingRedirect(n,i,e,r,o,s,u);throw new re(i)}async expandSegmentAgainstRouteUsingRedirect(n,e,r,i,o,s,a){let{matched:u,parameters:c,consumedSegments:l,positionalParamSegments:v,remainingSegments:C}=In(e,i,o);if(!u)throw new re(e);typeof i.redirectTo=="string"&&i.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>eo&&(this.allowRedirects=!1));let w=new ie(o,c,Object.freeze(d({},this.urlTree.queryParams)),this.urlTree.fragment,Hr(i),U(i),i.component??i._loadedComponent??null,i,Gr(i)),Z=St(w,a,this.paramsInheritanceStrategy);if(w.params=Object.freeze(Z.params),w.data=Object.freeze(Z.data),this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let Y=await this.applyRedirects.applyRedirectCommands(l,i.redirectTo,v,w,n),X=await this.applyRedirects.lineralizeSegments(i,Y);return this.processSegment(n,r,e,X.concat(C),s,!1,a)}async matchSegmentAgainstRoute(n,e,r,i,o,s){if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let a=await ot(Hi(e,r,i,n,this.urlSerializer,this.abortSignal));if(r.path==="**"&&(e.children={}),!a?.matched)throw new re(e);n=r._injector??n;let{routes:u}=await this.getChildConfig(n,r,i),c=r._loadedInjector??n,{parameters:l,consumedSegments:v,remainingSegments:C}=a,w=new ie(v,l,Object.freeze(d({},this.urlTree.queryParams)),this.urlTree.fragment,Hr(r),U(r),r.component??r._loadedComponent??null,r,Gr(r)),Z=St(w,s,this.paramsInheritanceStrategy);w.params=Object.freeze(Z.params),w.data=Object.freeze(Z.data);let{segmentGroup:Y,slicedSegments:X}=Vr(e,v,C,u);if(X.length===0&&Y.hasChildren()){let kn=await this.processChildren(c,u,Y,w);return new M(w,kn)}if(u.length===0&&X.length===0)return new M(w,[]);let He=U(r)===o,ir=await this.processSegment(c,u,Y,X,He?f:o,!0,w);return new M(w,ir instanceof M?[ir]:[])}async getChildConfig(n,e,r){if(e.children)return{routes:e.children,injector:n};if(e.loadChildren){if(e._loadedRoutes!==void 0)return{routes:e._loadedRoutes,injector:e._loadedInjector};if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);if(await ot(ki(n,e,r,this.urlSerializer,this.abortSignal))){let o=await this.configLoader.loadChildren(n,e);return e._loadedRoutes=o.routes,e._loadedInjector=o.injector,o}throw qi(e)}return{routes:[],injector:n}}};function ro(t){t.sort((n,e)=>n.value.outlet===f?-1:e.value.outlet===f?1:n.value.outlet.localeCompare(e.value.outlet))}function no(t){let n=t.value.routeConfig;return n&&n.path===""}function An(t){let n=[],e=new Set;for(let r of t){if(!no(r)){n.push(r);continue}let i=n.find(o=>r.value.routeConfig===o.value.routeConfig);i!==void 0?(i.children.push(...r.children),e.add(i)):n.push(r)}for(let r of e){let i=An(r.children);n.push(new M(r.value,i))}return n.filter(r=>!e.has(r))}function Hr(t){return t.data||{}}function Gr(t){return t.resolve||{}}var io=new T("",{factory:()=>Ji});function oo(t,n,e,r,i,o,s){let a=t.get(io);return L(u=>p(u).pipe(x(c=>a(t,n,e,r,c.extractedUrl,i,o,s)),R(({state:c,tree:l})=>N(d({},u),{targetSnapshot:c,urlAfterRedirects:l}))))}function so(t,n){return L(e=>{let{targetSnapshot:r,guards:{canActivateChecks:i}}=e;if(!i.length)return p(e);let o=new Set(i.map(u=>u.route)),s=new Set;for(let u of o)if(!s.has(u))for(let c of Tn(u))s.add(c);let a=0;return I(s).pipe(be(u=>o.has(u)?ao(u,r,t,n):(u.data=St(u,u.parent,t).resolve,p(void 0))),A(()=>a++),Ot(1),L(u=>a===s.size?p(e):z))})}function Tn(t){let n=t.children.map(e=>Tn(e)).flat();return[t,...n]}function ao(t,n,e,r){let i=t.routeConfig,o=t._resolve;return i?.title!==void 0&&!fn(i)&&(o[ke]=i.title),Ge(()=>(t.data=St(t,t.parent,e).resolve,uo(o,t,n,r).pipe(R(s=>(t._resolvedData=s,t.data=d(d({},t.data),s),null)))))}function uo(t,n,e,r){let i=$t(t);if(i.length===0)return p({});let o={};return I(i).pipe(L(s=>co(t[s],n,e,r).pipe(V(),A(a=>{if(a instanceof ge)throw Ct(new Q,a);o[s]=a}))),Ot(1),R(()=>o),we(s=>yn(s)?z:ur(s)))}function co(t,n,e,r){let i=me(n)??r,o=Re(t,i),s=o.resolve?o.resolve(n,e):P(i,()=>o(n,e));return ae(s)}function xt(t){return x(n=>{let e=t(n);return e?I(e).pipe(R(()=>n)):p(n)})}var er=(()=>{class t{buildTitle(e){let r,i=e.root;for(;i!==void 0;)r=this.getResolvedTitleForRoute(i)??r,i=i.children.find(o=>o.outlet===f);return r}getResolvedTitleForRoute(e){return e.data[ke]}static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:()=>h(Mn),providedIn:"root"})}return t})(),Mn=(()=>{class t extends er{title;constructor(e){super(),this.title=e}updateTitle(e){let r=this.buildTitle(e);r!==void 0&&this.title.setTitle(r)}static \u0275fac=function(r){return new(r||t)(H($r))};static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Se=new T("",{factory:()=>({})}),Be=new T(""),tr=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=h(Ur);async loadComponent(e,r){if(this.componentLoaders.get(r))return this.componentLoaders.get(r);if(r._loadedComponent)return Promise.resolve(r._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(r);let i=(async()=>{try{let o=await Zr(P(e,()=>r.loadComponent())),s=await Dn(On(o));return this.onLoadEndListener&&this.onLoadEndListener(r),r._loadedComponent=s,s}finally{this.componentLoaders.delete(r)}})();return this.componentLoaders.set(r,i),i}loadChildren(e,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return Promise.resolve({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let i=(async()=>{try{let o=await En(r,this.compiler,e,this.onLoadEndListener);return r._loadedRoutes=o.routes,r._loadedInjector=o.injector,o}finally{this.childrenLoaders.delete(r)}})();return this.childrenLoaders.set(r,i),i}static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();async function En(t,n,e,r){let i=await Zr(P(e,()=>t.loadChildren())),o=await Dn(On(i)),s;o instanceof Cr||Array.isArray(o)?s=o:s=await n.compileModuleAsync(o),r&&r(t);let a,u,c=!1;return Array.isArray(s)?(u=s,c=!0):(a=s.create(e).injector,u=a.get(Be,[],{optional:!0,self:!0}).flat()),{routes:u.map(Jt),injector:a}}function lo(t){return t&&typeof t=="object"&&"default"in t}function On(t){return lo(t)?t.default:t}async function Dn(t){return t}var At=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:()=>h(ho),providedIn:"root"})}return t})(),ho=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,r){return e}static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Nn=new T("");var fo=()=>{},Pn=new T(""),Un=(()=>{class t{currentNavigation=Ie(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=Ie(null);events=new J;transitionAbortWithErrorSubject=new J;configLoader=h(tr);environmentInjector=h(ee);destroyRef=h(vr);urlSerializer=h(ze);rootContexts=h(ye);location=h(Je);inputBindingEnabled=h(Fe,{optional:!0})!==null;titleStrategy=h(er);options=h(Se,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=h(At);createViewTransition=h(Nn,{optional:!0});navigationErrorHandler=h(Pn,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>p(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=i=>this.events.next(new ht(i)),r=i=>this.events.next(new ft(i));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=e,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(e){let r=++this.navigationId;G(()=>{this.transitions?.next(N(d({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,id:r}))})}setupNavigations(e){return this.transitions=new O(null),this.transitions.pipe(F(r=>r!==null),x(r=>{let i=!1,o=new AbortController;return p(r).pipe(x(s=>{if(this.navigationId>r.id)return this.cancelNavigationTransition(r,"",b.SupersededByNewNavigation),z;this.currentTransition=r;let a=this.lastSuccessfulNavigation();this.currentNavigation.set({id:s.id,initialUrl:s.rawUrl,extractedUrl:s.extractedUrl,targetBrowserUrl:typeof s.extras.browserUrl=="string"?this.urlSerializer.parse(s.extras.browserUrl):s.extras.browserUrl,trigger:s.source,extras:s.extras,previousNavigation:a?N(d({},a),{previousNavigation:null}):null,abort:()=>o.abort()});let u=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),c=s.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!u&&c!=="reload")return this.events.next(new q(s.id,this.urlSerializer.serialize(s.rawUrl),"",Ue.IgnoredSameUrlNavigation)),s.resolve(!1),z;if(this.urlHandlingStrategy.shouldProcessUrl(s.rawUrl))return p(s).pipe(x(l=>(this.events.next(new se(l.id,this.urlSerializer.serialize(l.extractedUrl),l.source,l.restoredState)),l.id!==this.navigationId?z:Promise.resolve(l))),oo(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy,o.signal),A(l=>{r.targetSnapshot=l.targetSnapshot,r.urlAfterRedirects=l.urlAfterRedirects,this.currentNavigation.update(C=>(C.finalUrl=l.urlAfterRedirects,C));let v=new _e(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(v)}));if(u&&this.urlHandlingStrategy.shouldProcessUrl(s.currentRawUrl)){let{id:l,extractedUrl:v,source:C,restoredState:w,extras:Z}=s,Y=new se(l,this.urlSerializer.serialize(v),C,w);this.events.next(Y);let X=dn(this.rootComponentType).snapshot;return this.currentTransition=r=N(d({},s),{targetSnapshot:X,urlAfterRedirects:v,extras:N(d({},Z),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(He=>(He.finalUrl=v,He)),p(r)}else return this.events.next(new q(s.id,this.urlSerializer.serialize(s.extractedUrl),"",Ue.IgnoredByUrlHandlingStrategy)),s.resolve(!1),z}),A(s=>{let a=new ut(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),R(s=>(this.currentTransition=r=N(d({},s),{guards:Si(s.targetSnapshot,s.currentSnapshot,this.rootContexts)}),r)),Ni(this.environmentInjector,s=>this.events.next(s)),A(s=>{if(r.guardsResult=s.guardsResult,s.guardsResult&&typeof s.guardsResult!="boolean")throw Ct(this.urlSerializer,s.guardsResult);let a=new ct(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot,!!s.guardsResult);this.events.next(a)}),F(s=>s.guardsResult?!0:(this.cancelNavigationTransition(s,"",b.GuardRejected),!1)),xt(s=>{if(s.guards.canActivateChecks.length!==0)return p(s).pipe(A(a=>{let u=new lt(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(u)}),x(a=>{let u=!1;return p(a).pipe(so(this.paramsInheritanceStrategy,this.environmentInjector),A({next:()=>u=!0,complete:()=>{u||this.cancelNavigationTransition(a,"",b.NoDataFromResolver)}}))}),A(a=>{let u=new dt(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(u)}))}),xt(s=>{let a=c=>{let l=[];if(c.routeConfig?._loadedComponent)c.component=c.routeConfig?._loadedComponent;else if(c.routeConfig?.loadComponent){let v=me(c)??this.environmentInjector;l.push(this.configLoader.loadComponent(v,c.routeConfig).then(C=>{c.component=C}))}for(let v of c.children)l.push(...a(v));return l},u=a(s.targetSnapshot.root);return u.length===0?p(s):I(Promise.all(u).then(()=>s))}),xt(()=>this.afterPreactivation()),x(()=>{let{currentSnapshot:s,targetSnapshot:a}=r,u=this.createViewTransition?.(this.environmentInjector,s.root,a.root);return u?I(u).pipe(R(()=>r)):p(r)}),R(s=>{let a=gi(e.routeReuseStrategy,s.targetSnapshot,s.currentRouterState);return this.currentTransition=r=N(d({},s),{targetRouterState:a}),this.currentNavigation.update(u=>(u.targetRouterState=a,u)),r}),A(()=>{this.events.next(new Le)}),Ri(this.rootContexts,e.routeReuseStrategy,s=>this.events.next(s),this.inputBindingEnabled),ce(1),We(Rn(o.signal).pipe(F(()=>!i&&!r.targetRouterState),A(()=>{this.cancelNavigationTransition(r,o.signal.reason+"",b.Aborted)}))),A({next:s=>{i=!0,this.currentNavigation.update(a=>(a.abort=fo,a)),this.lastSuccessfulNavigation.set(G(this.currentNavigation)),this.events.next(new D(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects))),this.titleStrategy?.updateTitle(s.targetRouterState.snapshot),s.resolve(!0)},complete:()=>{i=!0}}),We(this.transitionAbortWithErrorSubject.pipe(A(s=>{throw s}))),dr(()=>{o.abort(),i||this.cancelNavigationTransition(r,"",b.SupersededByNewNavigation),this.currentTransition?.id===r.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),we(s=>{if(this.destroyed)return r.resolve(!1),z;if(i=!0,mn(s))this.events.next(new k(r.id,this.urlSerializer.serialize(r.extractedUrl),s.message,s.cancellationCode)),yi(s)?this.events.next(new pe(s.url,s.navigationBehaviorOptions)):r.resolve(!1);else{let a=new fe(r.id,this.urlSerializer.serialize(r.extractedUrl),s,r.targetSnapshot??void 0);try{let u=P(this.environmentInjector,()=>this.navigationErrorHandler?.(a));if(u instanceof ge){let{message:c,cancellationCode:l}=Ct(this.urlSerializer,u);this.events.next(new k(r.id,this.urlSerializer.serialize(r.extractedUrl),c,l)),this.events.next(new pe(u.redirectTo,u.navigationBehaviorOptions))}else throw this.events.next(a),s}catch(u){this.options.resolveNavigationPromiseOnError?r.resolve(!1):r.reject(u)}}return z}))}))}cancelNavigationTransition(e,r,i){let o=new k(e.id,this.urlSerializer.serialize(e.extractedUrl),r,i);this.events.next(o),e.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=G(this.currentNavigation),i=r?.targetBrowserUrl??r?.extractedUrl;return e.toString()!==i?.toString()&&!r?.extras.skipLocationChange}static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function po(t){return t!==De}var _n=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:()=>h(go),providedIn:"root"})}return t})(),bt=class{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}},go=(()=>{class t extends bt{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ke(t)))(i||t)}})();static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),rr=(()=>{class t{urlSerializer=h(ze);options=h(Se,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=h(Je);urlHandlingStrategy=h(At);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new _;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:e,initialUrl:r,targetBrowserUrl:i}){let o=e!==void 0?this.urlHandlingStrategy.merge(e,r):r,s=i??o;return s instanceof _?this.urlSerializer.serialize(s):s}commitTransition({targetRouterState:e,finalUrl:r,initialUrl:i}){r&&e?(this.currentUrlTree=r,this.rawUrlTree=this.urlHandlingStrategy.merge(r,i),this.routerState=e):this.rawUrlTree=i}routerState=dn(null);getRouterState(){return this.routerState}stateMemento=this.createStateMemento();updateStateMemento(){this.stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}resetInternalState({finalUrl:e}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e??this.rawUrlTree)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:()=>h(Ln),providedIn:"root"})}return t})(),Ln=(()=>{class t extends rr{currentPageId=0;lastSuccessfulId=-1;restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(r=>{r.type==="popstate"&&setTimeout(()=>{e(r.url,r.state,"popstate")})})}handleRouterEvent(e,r){e instanceof se?this.updateStateMemento():e instanceof q?this.commitTransition(r):e instanceof _e?this.urlUpdateStrategy==="eager"&&(r.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof Le?(this.commitTransition(r),this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof k&&e.code!==b.SupersededByNewNavigation&&e.code!==b.Redirect?this.restoreHistory(r):e instanceof fe?this.restoreHistory(r,!0):e instanceof D&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,{extras:r,id:i}){let{replaceUrl:o,state:s}=r;if(this.location.isCurrentPathEqualTo(e)||o){let a=this.browserPageId,u=d(d({},s),this.generateNgRouterState(i,a));this.location.replaceState(e,"",u)}else{let a=d(d({},s),this.generateNgRouterState(i,this.browserPageId+1));this.location.go(e,"",a)}}restoreHistory(e,r=!1){if(this.canceledNavigationResolution==="computed"){let i=this.browserPageId,o=this.currentPageId-i;o!==0?this.location.historyGo(o):this.getCurrentUrlTree()===e.finalUrl&&o===0&&(this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,r){return this.canceledNavigationResolution==="computed"?{navigationId:e,\u0275routerPageId:r}:{navigationId:e}}static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ke(t)))(i||t)}})();static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function nr(t,n){t.events.pipe(F(e=>e instanceof D||e instanceof k||e instanceof fe||e instanceof q),R(e=>e instanceof D||e instanceof q?0:(e instanceof k?e.code===b.Redirect||e.code===b.SupersededByNewNavigation:!1)?2:1),F(e=>e!==2),ce(1)).subscribe(()=>{n()})}var vo={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},mo={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},ue=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=h(br);stateManager=h(rr);options=h(Se,{optional:!0})||{};pendingTasks=h(mr);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=h(Un);urlSerializer=h(ze);location=h(Je);urlHandlingStrategy=h(At);injector=h(ee);_events=new J;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=h(_n);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=h(Be,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!h(Fe,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:e=>{this.console.warn(e)}}),this.subscribeToNavigationEvents()}eventsSubscription=new or;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(r=>{try{let i=this.navigationTransitions.currentTransition,o=G(this.navigationTransitions.currentNavigation);if(i!==null&&o!==null){if(this.stateManager.handleRouterEvent(r,o),r instanceof k&&r.code!==b.Redirect&&r.code!==b.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof D)this.navigated=!0;else if(r instanceof pe){let s=r.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(r.url,i.currentRawUrl),u=d({browserUrl:i.extras.browserUrl,info:i.extras.info,skipLocationChange:i.extras.skipLocationChange,replaceUrl:i.extras.replaceUrl||this.urlUpdateStrategy==="eager"||po(i.source)},s);this.scheduleNavigation(a,De,null,u,{resolve:i.resolve,reject:i.reject,promise:i.promise})}}di(r)&&this._events.next(r)}catch(i){this.navigationTransitions.transitionAbortWithErrorSubject.next(i)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),De,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,r,i)=>{this.navigateToSyncWithBrowser(e,i,r)})}navigateToSyncWithBrowser(e,r,i){let o={replaceUrl:!0},s=i?.navigationId?i:null;if(i){let u=d({},i);delete u.navigationId,delete u.\u0275routerPageId,Object.keys(u).length!==0&&(o.state=u)}let a=this.parseUrl(e);this.scheduleNavigation(a,r,s,o).catch(u=>{this.disposed||this.injector.get(Qe)(u)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return G(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(Jt),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,r={}){let{relativeTo:i,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:u}=r,c=u?this.currentUrlTree.fragment:s,l=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":l=d(d({},this.currentUrlTree.queryParams),o);break;case"preserve":l=this.currentUrlTree.queryParams;break;default:l=o||null}l!==null&&(l=this.removeEmptyProps(l));let v;try{let C=i?i.snapshot:this.routerState.snapshot.root;v=an(C)}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),v=this.currentUrlTree.root}return un(v,e,l,c??null,this.urlSerializer)}navigateByUrl(e,r={skipLocationChange:!1}){let i=K(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(o,De,null,r)}navigate(e,r={skipLocationChange:!1}){return yo(e),this.navigateByUrl(this.createUrlTree(e,r),r)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.console.warn(fr(4018,!1)),this.urlSerializer.parse("/")}}isActive(e,r){let i;if(r===!0?i=d({},vo):r===!1?i=d({},mo):i=r,K(e))return kr(this.currentUrlTree,e,i);let o=this.parseUrl(e);return kr(this.currentUrlTree,o,i)}removeEmptyProps(e){return Object.entries(e).reduce((r,[i,o])=>(o!=null&&(r[i]=o),r),{})}scheduleNavigation(e,r,i,o,s){if(this.disposed)return Promise.resolve(!1);let a,u,c;s?(a=s.resolve,u=s.reject,c=s.promise):c=new Promise((v,C)=>{a=v,u=C});let l=this.pendingTasks.add();return nr(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(l))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:u,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(v=>Promise.reject(v))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function yo(t){for(let n=0;n<t.length;n++)if(t[n]==null)throw new S(4008,!1)}var Tt=(()=>{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;reactiveHref=Ie(null);get href(){return G(this.reactiveHref)}set href(e){this.reactiveHref.set(e)}target;queryParams;fragment;queryParamsHandling;state;info;relativeTo;isAnchorElement;subscription;onChanges=new J;applicationErrorHandler=h(Qe);options=h(Se,{optional:!0});constructor(e,r,i,o,s,a){this.router=e,this.route=r,this.tabIndexAttribute=i,this.renderer=o,this.el=s,this.locationStrategy=a,this.reactiveHref.set(h(new _r("href"),{optional:!0}));let u=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement=u==="a"||u==="area"||!!(typeof customElements=="object"&&customElements.get(u)?.observedAttributes?.includes?.("href")),this.isAnchorElement?this.setTabIndexIfNotOnNativeEl("0"):this.subscribeToNavigationEventsIfNecessary()}subscribeToNavigationEventsIfNecessary(){if(this.subscription!==void 0||!this.isAnchorElement)return;let e=this.preserveFragment,r=i=>i==="merge"||i==="preserve";e||=r(this.queryParamsHandling),e||=!this.queryParamsHandling&&!r(this.options?.defaultQueryParamsHandling),e&&(this.subscription=this.router.events.subscribe(i=>{i instanceof D&&this.updateHref()}))}preserveFragment=!1;skipLocationChange=!1;replaceUrl=!1;setTabIndexIfNotOnNativeEl(e){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&(this.updateHref(),this.subscribeToNavigationEventsIfNecessary()),this.onChanges.next(this)}routerLinkInput=null;set routerLink(e){e==null?(this.routerLinkInput=null,this.setTabIndexIfNotOnNativeEl(null)):(K(e)?this.routerLinkInput=e:this.routerLinkInput=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0"))}onClick(e,r,i,o,s){let a=this.urlTree;if(a===null||this.isAnchorElement&&(e!==0||r||i||o||s||typeof this.target=="string"&&this.target!="_self"))return!0;let u={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(a,u)?.catch(c=>{this.applicationErrorHandler(c)}),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){let e=this.urlTree;this.reactiveHref.set(e!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(e))??"":null)}applyAttributeValue(e,r){let i=this.renderer,o=this.el.nativeElement;r!==null?i.setAttribute(o,e,r):i.removeAttribute(o,e)}get urlTree(){return this.routerLinkInput===null?null:K(this.routerLinkInput)?this.routerLinkInput:this.router.createUrlTree(this.routerLinkInput,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static \u0275fac=function(r){return new(r||t)(j(ue),j(B),yr("tabindex"),j(Pt),j(Nt),j(jr))};static \u0275dir=Te({type:t,selectors:[["","routerLink",""]],hostVars:2,hostBindings:function(r,i){r&1&&Or("click",function(s){return i.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),r&2&&Mr("href",i.reactiveHref(),Rr)("target",i.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",Xe],skipLocationChange:[2,"skipLocationChange","skipLocationChange",Xe],replaceUrl:[2,"replaceUrl","replaceUrl",Xe],routerLink:"routerLink"},features:[Ae]})}return t})(),So=(()=>{class t{router;element;renderer;cdr;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new te;link=h(Tt,{optional:!0});constructor(e,r,i,o){this.router=e,this.element=r,this.renderer=i,this.cdr=o,this.routerEventsSubscription=e.events.subscribe(s=>{s instanceof D&&this.update()})}ngAfterContentInit(){p(this.links.changes,p(null)).pipe(Ce()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let e=[...this.links.toArray(),this.link].filter(r=>!!r).map(r=>r.onChanges);this.linkInputChangesSubscription=I(e).pipe(Ce()).subscribe(r=>{this._isActive!==this.isLinkActive(this.router)(r)&&this.update()})}set routerLinkActive(e){let r=Array.isArray(e)?e:e.split(" ");this.classes=r.filter(i=>!!i)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{let e=this.hasActiveLinks();this.classes.forEach(r=>{e?this.renderer.addClass(this.element.nativeElement,r):this.renderer.removeClass(this.element.nativeElement,r)}),e&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.isActiveChange.emit(e))})}isLinkActive(e){let r=Co(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return i=>{let o=i.urlTree;return o?e.isActive(o,r):!1}}hasActiveLinks(){let e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}static \u0275fac=function(r){return new(r||t)(j(ue),j(Nt),j(Pt),j(Ye))};static \u0275dir=Te({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(r,i,o){if(r&1&&Dr(o,Tt,5),r&2){let s;Nr(s=Pr())&&(i.links=s)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[Ae]})}return t})();function Co(t){return!!t.paths}var Ve=class{},wo=(()=>{class t{preload(e,r){return r().pipe(we(()=>p(null)))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var xn=(()=>{class t{router;injector;preloadingStrategy;loader;subscription;constructor(e,r,i,o){this.router=e,this.injector=r,this.preloadingStrategy=i,this.loader=o}setUpPreloading(){this.subscription=this.router.events.pipe(F(e=>e instanceof D),be(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,r){let i=[];for(let o of r){o.providers&&!o._injector&&(o._injector=Ze(o.providers,e,`Route: ${o.path}`));let s=o._injector??e,a=o._loadedInjector??s;(o.loadChildren&&!o._loadedRoutes&&o.canLoad===void 0||o.loadComponent&&!o._loadedComponent)&&i.push(this.preloadConfig(s,o)),(o.children||o._loadedRoutes)&&i.push(this.processRoutes(a,o.children??o._loadedRoutes))}return I(i).pipe(Ce())}preloadConfig(e,r){return this.preloadingStrategy.preload(r,()=>{let i;r.loadChildren&&r.canLoad===void 0?i=I(this.loader.loadChildren(e,r)):i=p(null);let o=i.pipe(L(s=>s===null?p(void 0):(r._loadedRoutes=s.routes,r._loadedInjector=s.injector,this.processRoutes(s.injector??e,s.routes))));if(r.loadComponent&&!r._loadedComponent){let s=this.loader.loadComponent(e,r);return I([o,s]).pipe(Ce())}else return o})}static \u0275fac=function(r){return new(r||t)(H(ue),H(ee),H(Ve),H(tr))};static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),bo=new T("");function Io(t,...n){return Dt([{provide:Be,multi:!0,useValue:t},[],{provide:B,useFactory:Ao},{provide:Ar,multi:!0,useFactory:To},n.map(e=>e.\u0275providers)])}function Ao(){return h(ue).routerState.root}function jn(t,n){return{\u0275kind:t,\u0275providers:n}}function To(){let t=h(gr);return n=>{let e=t.get(Tr);if(n!==e.components[0])return;let r=t.get(ue),i=t.get(Mo);t.get(Eo)===1&&r.initialNavigation(),t.get($n,null,{optional:!0})?.setUpPreloading(),t.get(bo,null,{optional:!0})?.init(),r.resetRootComponentType(e.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}var Mo=new T("",{factory:()=>new J}),Eo=new T("",{factory:()=>1});var $n=new T("");function Oo(t){return jn(0,[{provide:$n,useExisting:xn},{provide:Ve,useExisting:t}])}function Do(){return jn(8,[Yt,{provide:Fe,useExisting:Yt}])}export{D as a,B as b,Zt as c,ue as d,Tt as e,So as f,wo as g,Io as h,Oo as i,Do as j};
@@ -0,0 +1 @@
1
+ import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-AEAAMLWV.js")},{path:"destination",loadComponent:()=>import("./chunk-L63XTN4Q.js")},{path:"source-data",loadComponent:()=>import("./chunk-CGG7XWW2.js")},{path:"schedule",loadComponent:()=>import("./chunk-DJRFN4KK.js")},{path:"options",loadComponent:()=>import("./chunk-U3FKLHQB.js")}];export{o as default};
@@ -0,0 +1 @@
1
+ import{a as le}from"./chunk-4Y6Y4CDL.js";import"./chunk-DTKWQFAK.js";import"./chunk-6Q6SSTBK.js";import{a as ae}from"./chunk-U63HBLGG.js";import{c as re}from"./chunk-FBWFZMGL.js";import{a as _e}from"./chunk-WILUKPQ3.js";import"./chunk-NEV6JB5M.js";import"./chunk-CGKL2MHM.js";import"./chunk-QWNOPLJC.js";import{b as oe}from"./chunk-BKANUILG.js";import{B as ie,D as ne,b as H,e as Q,i as Y,s as Z,u as ee,z as te}from"./chunk-RYXU2QDS.js";import{d as j,e as q}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{$ as p,Ab as o,Cc as z,E as K,Fc as V,Ib as g,Mc as M,Pa as r,Rb as c,Rc as W,Sb as A,Tb as L,Ub as F,Vb as $,W as u,Xb as C,aa as P,cb as y,gc as x,jc as E,l as k,la as T,oc as S,p as U,pc as D,qc as h,rc as G,sb as m,sc as w,tb as f,tc as v,xc as J,yb as N,yc as X,z as I,zb as n}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";var ce=l=>["/backup",l,"export"],se=()=>["/"];function Ee(l,_){if(l&1){let t=g();n(0,"section")(1,"h4"),c(2,4),o(),n(3,"p"),c(4,5),o(),n(5,"sh-checkbox",11),E(6," Delete local database "),n(7,"input",12),h("ngModelChange",function(e){p(t);let a=C();return D(a.deleteLocalDb,e)||(a.deleteLocalDb=e),P(e)}),o()()()}if(l&2){let t=C();r(7),S("ngModel",t.deleteLocalDb)}}function ue(l,_){if(l&1){let t=g();n(0,"section")(1,"h4"),c(2,6),o(),n(3,"p"),c(4,7),z(5,"bytes"),o(),n(6,"sh-checkbox",11),E(7," Delete remote files "),n(8,"input",12),h("ngModelChange",function(e){p(t);let a=C();return D(a.deleteRemoteFiles,e)||(a.deleteRemoteFiles=e),P(e)}),o()()()}if(l&2){let t=C(),i=v(0),e=(i==null||i.Backup==null||i.Backup.Metadata==null?null:i.Backup.Metadata.TargetFilesSize)??0;r(5),A(t.fileCount())(t.fileCount())(V(5,4,e,!0,!0)),L(4),r(3),S("ngModel",t.deleteRemoteFiles)}}var B=class l{#t=u(oe);#i=u(te);#e=u(le);#n=u(j);id=W.required();backup=M(()=>this.#e.getBackupById(this.id()));noLocalDbResource=re({params:()=>({dbPath:this.backup()?.Backup?.DBPath}),stream:({params:_})=>this.#t.postApiV1FilesystemValidate({requestBody:{path:_.dbPath}}).pipe(U(()=>!0),I(()=>k(!1)))});fileCount=M(()=>parseInt(this.backup()?.Backup?.Metadata?.TargetFilesCount??"0",10));deleteLocalDb=T(!1);deleteRemoteFiles=T(!1);isDeleting=T(!1);deleteBackup(){let _=this.id(),t=this.deleteLocalDb(),i=this.deleteRemoteFiles();this.isDeleting.set(!0),this.#i.open(_e,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete this backup?`,confirmText:$localize`Delete backup`,cancelText:$localize`Cancel`},closed:e=>{e&&this.#e.deleteBackup({id:_,deleteLocalDb:t,deleteRemoteFiles:i}).pipe(K(()=>this.isDeleting.set(!1))).subscribe({next:()=>{this.#n.navigate(["/"])}})}})}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=y({type:l,selectors:[["app-delete-backup"]],inputs:{id:[1,"id"]},decls:19,vars:11,consts:()=>{let _;_=$localize`Delete backup: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;t=$localize`Export configuration`;let i;i=$localize`If you want to use the backup later, you can export the configuration before deleting it.`;let e;e=$localize`Cancel`;let a;a=$localize`Delete local database`;let b;b=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. When deleting a backup, you can also delete the local database without affecting the ability to restore the remote files. If you are using the local database for backups from the commandline, you should keep the database. `;let R;R=$localize`Delete remote files`;let d;d=$localize`{VAR_PLURAL, plural, =1 {1 file} other {{INTERPOLATION} files}}`,d=F(d,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let O;return O=$localize` Delete ${d}:ICU@@2159106180826349718: (${"\uFFFD2\uFFFD"}:INTERPOLATION_1:) from the remote storage? `,[_,t,i,e,a,b,R,O,["shButton","",3,"routerLink"],[1,"actions"],["shButton","",1,"raised","error",3,"click"],[1,"primary","raised"],["type","checkbox",3,"ngModelChange","ngModel"]]},template:function(t,i){if(t&1){let e=g();G(0),n(1,"h3"),c(2,0),o(),m(3,Ee,8,1,"section"),n(4,"section")(5,"h4"),c(6,1),o(),n(7,"p"),c(8,2),o(),n(9,"button",8),E(10," Export configuration "),n(11,"sh-icon"),E(12,"caret-right"),o()()(),m(13,ue,9,8,"section"),n(14,"div",9)(15,"button",8),c(16,3),o(),n(17,"button",10),$("click",function(){return p(e),P(i.deleteBackup())}),E(18,"Delete backup"),o()()}if(t&2){let e=w(i.backup()),a=i.noLocalDbResource.value();r(2),A(e==null||e.Backup==null?null:e.Backup.Name),L(2),r(),f(a?3:-1),r(6),N("routerLink",X(8,ce,i.id())),r(4),f(a?13:-1),r(2),N("routerLink",J(10,se)),r(2),x("loader",i.isDeleting())}},dependencies:[ne,ie,ee,Z,H,Q,Y,q,ae],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:2.5rem;max-width:43.75rem}section[_ngcontent-%COMP%]{padding:2rem 0;display:flex;align-items:flex-start;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}h4[_ngcontent-%COMP%]{font:var(--paragraph-20);margin-bottom:.5rem}p[_ngcontent-%COMP%]{margin-bottom:1rem}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;padding:2rem 0}"],changeDetection:0})};export{B as default};