@duplicati/ngclient 0.0.124 → 0.0.131

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 (212) hide show
  1. package/assets/spk.woff2 +0 -0
  2. package/chunk-3IRKJXHE.js +6 -0
  3. package/chunk-3KIPRGE2.js +1 -0
  4. package/chunk-3PYBMCOB.js +1 -0
  5. package/chunk-4D2NUH5S.js +1 -0
  6. package/chunk-5PEBIF7G.js +1 -0
  7. package/chunk-5ZODA7EN.js +1 -0
  8. package/{chunk-XUPWJEL7.js → chunk-76QLZQIX.js} +1 -1
  9. package/chunk-7LEXBIXG.js +1 -0
  10. package/{chunk-VZBWK3XF.js → chunk-ABF3SFY5.js} +1 -1
  11. package/chunk-AGU2PEL5.js +1 -0
  12. package/{chunk-6EWRKJSC.js → chunk-B5FKLIHW.js} +1 -1
  13. package/chunk-BISTLAYK.js +1 -0
  14. package/chunk-CPQOWCF6.js +2 -0
  15. package/chunk-CTRHZCKS.js +1 -0
  16. package/chunk-CYLI6ZJ3.js +1 -0
  17. package/chunk-D6CQCWWK.js +1 -0
  18. package/chunk-DDV32SDB.js +1 -0
  19. package/chunk-DM2VSIZA.js +1 -0
  20. package/chunk-E4Z6XEMU.js +1 -0
  21. package/chunk-EKZRKTLM.js +1 -0
  22. package/chunk-EUDKD2JW.js +1 -0
  23. package/{chunk-OQPUBCLB.js → chunk-F74MXVWD.js} +1 -1
  24. package/chunk-FLMFEFKM.js +1 -0
  25. package/chunk-FO4W6SOP.js +1 -0
  26. package/chunk-FPLBURO5.js +1 -0
  27. package/chunk-FWVOVJCG.js +2 -0
  28. package/chunk-FWZV4DTQ.js +2 -0
  29. package/chunk-GGT3NXAX.js +1 -0
  30. package/chunk-GU7U3EFF.js +1 -0
  31. package/chunk-GW37Y5Z7.js +1 -0
  32. package/{chunk-S75WBVE3.js → chunk-HWCTRSCV.js} +1 -1
  33. package/chunk-IAE5MH6W.js +1 -0
  34. package/{chunk-DLJSVAM2.js → chunk-JWFYA3TO.js} +1 -1
  35. package/{chunk-4V45XF67.js → chunk-K5AQUIEE.js} +1 -1
  36. package/{chunk-KPH4ZAFT.js → chunk-K5P3KNHL.js} +1 -1
  37. package/chunk-K6EZTPNQ.js +7 -0
  38. package/chunk-KA4H3PM5.js +1 -0
  39. package/chunk-KQAO2YHR.js +1 -0
  40. package/chunk-KU6D4KVX.js +1 -0
  41. package/{chunk-GQGMGFDX.js → chunk-KV7SEZ24.js} +1 -1
  42. package/chunk-LPSXYSH2.js +1 -0
  43. package/{chunk-QUOBR5MG.js → chunk-LQ2PCH6Q.js} +1 -1
  44. package/chunk-LXOONGVP.js +1 -0
  45. package/chunk-LZGUK3CQ.js +2 -0
  46. package/chunk-MHALSLG3.js +1 -0
  47. package/chunk-MXNLMTFY.js +1 -0
  48. package/{chunk-HIW2CN45.js → chunk-N334RUEQ.js} +1 -1
  49. package/chunk-OMZ3W4RW.js +1 -0
  50. package/{chunk-6DNRCK5D.js → chunk-P45GAY6A.js} +1 -1
  51. package/chunk-P4ZYFRD3.js +1 -0
  52. package/chunk-Q3ILJYED.js +1 -0
  53. package/{chunk-ED7PHXLX.js → chunk-Q5QHAGHB.js} +1 -1
  54. package/chunk-R3TWV35H.js +4 -0
  55. package/chunk-R43ZLOB3.js +1 -0
  56. package/chunk-RFBJR3ZC.js +1 -0
  57. package/chunk-RVLLX2SW.js +1 -0
  58. package/chunk-RZWJA6W3.js +3 -0
  59. package/chunk-TOP2X7ZJ.js +1 -0
  60. package/chunk-TUOSYDUU.js +1 -0
  61. package/chunk-U4OAPG74.js +2 -0
  62. package/chunk-UFZFKKK7.js +1 -0
  63. package/chunk-UHRBTTCA.js +1 -0
  64. package/chunk-UIC4BWTY.js +1 -0
  65. package/chunk-UUG7G5LZ.js +1 -0
  66. package/chunk-UVLJAD66.js +1 -0
  67. package/chunk-UYWLCW5G.js +1 -0
  68. package/chunk-VKD4Y3YQ.js +1 -0
  69. package/chunk-VNYGRDVP.js +1 -0
  70. package/chunk-W2XSKJJ5.js +1 -0
  71. package/chunk-WIDMAJIO.js +1 -0
  72. package/{chunk-M5RL4LRX.js → chunk-WIJ3HW7I.js} +1 -1
  73. package/chunk-WWHML7QK.js +56 -0
  74. package/chunk-WY2KPAVB.js +1 -0
  75. package/chunk-XD26KCAE.js +1 -0
  76. package/chunk-XHQO75TB.js +1 -0
  77. package/chunk-XOZRQBBW.js +1 -0
  78. package/chunk-YBFTPRR5.js +1 -0
  79. package/chunk-YFRT24NZ.js +1 -0
  80. package/chunk-YXIITZFM.js +1 -0
  81. package/{chunk-TCEYGZ6D.js → chunk-Z24H5QI5.js} +2 -2
  82. package/chunk-Z2VKXGKY.js +1 -0
  83. package/chunk-ZE5QAS4M.js +1 -0
  84. package/index.html +2 -2
  85. package/locale/messages.cs.json +4 -2
  86. package/locale/messages.da.json +5 -2
  87. package/locale/messages.de.json +48 -8
  88. package/locale/messages.en_GB.json +4 -2
  89. package/locale/messages.es.json +4 -2
  90. package/locale/messages.fi.json +7 -2
  91. package/locale/messages.fr.json +7 -2
  92. package/locale/messages.hu.json +6 -2
  93. package/locale/messages.it.json +32 -21
  94. package/locale/messages.ja_JP.json +8 -2
  95. package/locale/messages.nl_NL.json +53 -21
  96. package/locale/messages.pl.json +9 -2
  97. package/locale/messages.pt.json +8 -2
  98. package/locale/messages.pt_BR.json +10 -3
  99. package/locale/messages.ru.json +8 -2
  100. package/locale/messages.sr_RS.json +9 -2
  101. package/locale/messages.sv_SE.json +9 -2
  102. package/locale/messages.zh_CN.json +376 -48
  103. package/locale/messages.zh_TW.json +9 -2
  104. package/main-JMFOP3Z7.js +1 -0
  105. package/package.json +1 -1
  106. package/polyfills-COBLRUJG.js +1 -0
  107. package/{styles-P2AEFLUS.css → styles-ORRIWQJ5.css} +1 -1
  108. package/chunk-25II37TZ.js +0 -1
  109. package/chunk-2CXHZS6X.js +0 -1
  110. package/chunk-3UPH6V5C.js +0 -1
  111. package/chunk-43BIRTPL.js +0 -1
  112. package/chunk-4DR45FFH.js +0 -2
  113. package/chunk-4KE2I7OA.js +0 -7
  114. package/chunk-5C7A7QU6.js +0 -1
  115. package/chunk-65U4B3NQ.js +0 -2
  116. package/chunk-65ZYAFPI.js +0 -1
  117. package/chunk-6LCXRM3A.js +0 -1
  118. package/chunk-6V7W7EKR.js +0 -1
  119. package/chunk-7733YRW4.js +0 -1
  120. package/chunk-7BATQNXR.js +0 -1
  121. package/chunk-7CGTOI24.js +0 -1
  122. package/chunk-7V4TPS4B.js +0 -1
  123. package/chunk-ABANCAM5.js +0 -1
  124. package/chunk-BLKMQJR5.js +0 -1
  125. package/chunk-BTZEFBCF.js +0 -1
  126. package/chunk-CZDE5P4F.js +0 -1
  127. package/chunk-DYTQQHMA.js +0 -1
  128. package/chunk-EBXJGPRA.js +0 -1
  129. package/chunk-EPDVUHOD.js +0 -1
  130. package/chunk-ERHGJIOQ.js +0 -2
  131. package/chunk-ESAGJOZZ.js +0 -1
  132. package/chunk-FP6LM56A.js +0 -1
  133. package/chunk-FQ55IACT.js +0 -1
  134. package/chunk-FSKPPAVO.js +0 -1
  135. package/chunk-FWQNZX5S.js +0 -1
  136. package/chunk-GUKBMCIX.js +0 -1
  137. package/chunk-IVGY6D4N.js +0 -56
  138. package/chunk-J52HAQJB.js +0 -1
  139. package/chunk-KAFLAM3J.js +0 -1
  140. package/chunk-LUKUBN2Z.js +0 -1
  141. package/chunk-N5FH4YAX.js +0 -2
  142. package/chunk-O7TLFEOP.js +0 -1
  143. package/chunk-OAWADV5X.js +0 -1
  144. package/chunk-ONV552SH.js +0 -1
  145. package/chunk-PDODLSPH.js +0 -1
  146. package/chunk-PSVKQSIF.js +0 -1
  147. package/chunk-QMFHJSCY.js +0 -1
  148. package/chunk-QXUYK52Y.js +0 -1
  149. package/chunk-RODUXVVT.js +0 -1
  150. package/chunk-S5G6POQS.js +0 -1
  151. package/chunk-SIHNMW2E.js +0 -1
  152. package/chunk-SPAJFGWZ.js +0 -1
  153. package/chunk-SX2OA5DO.js +0 -1
  154. package/chunk-T5WAKBP3.js +0 -1
  155. package/chunk-T7QZL5YJ.js +0 -2
  156. package/chunk-TH7CWIA2.js +0 -1
  157. package/chunk-U4XTHU5I.js +0 -1
  158. package/chunk-U7YVVKGQ.js +0 -1
  159. package/chunk-UEYPJIJG.js +0 -1
  160. package/chunk-UI4M5G5W.js +0 -1
  161. package/chunk-URJQR7VG.js +0 -1
  162. package/chunk-V7XW25LT.js +0 -1
  163. package/chunk-VPTXHYYV.js +0 -6
  164. package/chunk-VTTBYFSH.js +0 -1
  165. package/chunk-VYAA7G37.js +0 -1
  166. package/chunk-W66AXGSW.js +0 -1
  167. package/chunk-WOTGLW6Y.js +0 -4
  168. package/chunk-WRKRV6RQ.js +0 -1
  169. package/chunk-XATCN7MB.js +0 -1
  170. package/chunk-XHPURHO2.js +0 -1
  171. package/chunk-YUZKJZ22.js +0 -1
  172. package/chunk-YZDNOP4R.js +0 -1
  173. package/chunk-Z2TE5POZ.js +0 -1
  174. package/chunk-ZMLGDPCK.js +0 -3
  175. package/locale/angular/cs.mjs +0 -21
  176. package/locale/angular/da.mjs +0 -17
  177. package/locale/angular/de.mjs +0 -17
  178. package/locale/angular/en-GB.mjs +0 -17
  179. package/locale/angular/es.mjs +0 -19
  180. package/locale/angular/extra/cs.mjs +0 -11
  181. package/locale/angular/extra/da.mjs +0 -11
  182. package/locale/angular/extra/de.mjs +0 -11
  183. package/locale/angular/extra/en-GB.mjs +0 -11
  184. package/locale/angular/extra/es.mjs +0 -11
  185. package/locale/angular/extra/fi.mjs +0 -11
  186. package/locale/angular/extra/fr.mjs +0 -11
  187. package/locale/angular/extra/hu.mjs +0 -11
  188. package/locale/angular/extra/it.mjs +0 -11
  189. package/locale/angular/extra/ja.mjs +0 -11
  190. package/locale/angular/extra/nl.mjs +0 -11
  191. package/locale/angular/extra/pl.mjs +0 -11
  192. package/locale/angular/extra/pt.mjs +0 -11
  193. package/locale/angular/extra/ru.mjs +0 -11
  194. package/locale/angular/extra/sr.mjs +0 -11
  195. package/locale/angular/extra/sv.mjs +0 -11
  196. package/locale/angular/extra/zh-Hans.mjs +0 -11
  197. package/locale/angular/extra/zh-Hant.mjs +0 -11
  198. package/locale/angular/fi.mjs +0 -17
  199. package/locale/angular/fr.mjs +0 -19
  200. package/locale/angular/hu.mjs +0 -17
  201. package/locale/angular/it.mjs +0 -19
  202. package/locale/angular/ja.mjs +0 -15
  203. package/locale/angular/nl.mjs +0 -17
  204. package/locale/angular/pl.mjs +0 -21
  205. package/locale/angular/pt.mjs +0 -19
  206. package/locale/angular/ru.mjs +0 -21
  207. package/locale/angular/sr.mjs +0 -19
  208. package/locale/angular/sv.mjs +0 -17
  209. package/locale/angular/zh-Hans.mjs +0 -15
  210. package/locale/angular/zh-Hant.mjs +0 -15
  211. package/main-JBXUJPKQ.js +0 -1
  212. package/polyfills-6QHLTIIN.js +0 -1
package/assets/spk.woff2 CHANGED
Binary file
@@ -0,0 +1,6 @@
1
+ import{a as jt,b as qt}from"./chunk-KA4H3PM5.js";import{a as dt}from"./chunk-FLMFEFKM.js";import{a as ze}from"./chunk-WIJ3HW7I.js";import{a as _t,b as Dt,c as pt}from"./chunk-N334RUEQ.js";import{a as Wt,b as ht,c as Ht}from"./chunk-K5AQUIEE.js";import{a as he}from"./chunk-WY2KPAVB.js";import{a as Q}from"./chunk-3PYBMCOB.js";import{a as Ie}from"./chunk-FPLBURO5.js";import{a as zt,b as ve,c as ee,d as Le,e as te,f as be,g as st,h as ge,i as Ge,j as Ue,m as lt,n as Ve,o as ct,p as Xt,q as Be,r as fe,s as Te,t as Ke}from"./chunk-3KIPRGE2.js";import{b as Fe,d as se}from"./chunk-7LEXBIXG.js";import{A as Re,C as at,a as J,b as it,d as Bt,e as $e,g as Ce,l as le,o as Kt,p as ot,t as ce}from"./chunk-MHALSLG3.js";import{h as rt}from"./chunk-FWVOVJCG.js";import{ea as Vt}from"./chunk-VKD4Y3YQ.js";import{Ab as et,Bb as $,F as We,Gc as w,Hb as E,Hc as Me,Ib as D,Jb as N,Kb as ft,Lb as Tt,Lc as Et,Mb as ye,Mc as xe,Nb as T,Nc as we,Oa as l,Ob as _,Pb as Rt,Qb as It,S as Pe,Sb as vt,Tb as Lt,Ub as bt,Wb as Ne,X as A,Xb as Oe,Yb as re,_a as Z,_b as me,ba as u,bc as d,ca as m,cc as ke,db as ne,dc as B,ec as St,f as Je,fa as wt,gc as L,hc as b,ic as G,jc as He,kc as De,la as S,lc as x,ob as $t,oc as Gt,pb as g,qb as f,qc as Ut,rb as ie,rc as je,sb as oe,sc as tt,tb as ae,ub as p,uc as nt,vb as s,wb as r,xb as F,yb as z,zb as X,zc as qe}from"./chunk-K6EZTPNQ.js";import{a as K,b as ue,c as xt}from"./chunk-EUDKD2JW.js";var nn=["fileInput"],on=[[["label"]]],an=["label"],ut=class o{customId=xe();content=S("");readonly=S(!1);placeholder=xe("Drop a file here or use the browse button");fileInputRef;onFileSelected(t){let e=t.target;e.files&&e.files.length>0&&this.readFile(e.files[0])}onFileDrop(t){t.preventDefault(),t.dataTransfer?.files&&t.dataTransfer.files.length>0&&this.readFile(t.dataTransfer.files[0])}onDragOver(t){t.preventDefault()}readFile(t){let e=new FileReader;e.onload=()=>{this.content.set(e.result)},e.readAsText(t)}triggerBrowse(){return this.fileInputRef.nativeElement.click(),!1}onChange=()=>{};onTouched=()=>{};onChangeEffect=Me(()=>{this.onChange(this.content())});writeValue(t){this.content.set(t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.readonly.set(t)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,n){if(e&1&&vt(nn,5),e&2){let i;Lt(i=bt())&&(n.fileInputRef=i.first)}},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[Ut([{provide:zt,useExisting:o,multi:!0}])],ngContentSelectors:an,decls:9,vars:3,consts:()=>{let t;return t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:upload${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["fileInput",""],t,[1,"browse-btn"],["spk-button","","type","button",1,"small","outlined",3,"click"],[1,"textarea-container","textarea-wrap",3,"drop","dragover"],["rows","10",3,"ngModelChange","placeholder","ngModel","disabled"],["type","file",1,"hidden",3,"change"]]},template:function(e,n){if(e&1){let i=$();Rt(on),It(0,0,["ngProjectAs","label",5,["label"]]),s(1,"div",2)(2,"button",3),T("click",function(){return u(i),m(n.triggerBrowse())}),E(3,1),F(4,"spk-icon"),D(),r()(),s(5,"div",4),T("drop",function(c){return u(i),m(n.onFileDrop(c))})("dragover",function(c){return u(i),m(n.onDragOver(c))}),s(6,"textarea",5),G("ngModelChange",function(c){return u(i),b(n.content,c)||(n.content=c),m(c)}),r()(),s(7,"input",6,0),T("change",function(c){return u(i),m(n.onFileSelected(c))}),r()}e&2&&(l(6),p("placeholder",n.placeholder()),L("ngModel",n.content),p("disabled",n.readonly()))},dependencies:[Te,ee,te,ge,J,Ce],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label browsebtn" "input input";grid-template-columns:8fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .browse-btn[_ngcontent-%COMP%]{grid-area:browsebtn}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%]{grid-area:input;width:100%;border:none;font:var(--code-20)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%;color:var(--base-8);background-color:var(--base-1);border:1px solid var(--base-4);border-radius:var(--shape-3);padding:.5rem;resize:vertical;box-shadow:var(--box-shadow-10)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%] .dark[_ngcontent-%COMP%]{background-color:var(--base-2)}[_nghost-%COMP%] .hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};var mt=class o{#n=A(rt);#t=A($e);#e=A(Ie);testDestination(t,e,n){return this.#e.hasV2TestOperations()?this.testDestinationv2(t,e,n):this.testDestinationv1(t,e,n)}testDestinationv2(t,e,n){return new Je(i=>{this.#n.postApiV2DestinationTest({requestBody:{DestinationUrl:t,AutoCreate:!1,Options:null}}).subscribe({next:a=>{if(a.Success){this.emitSuccessV2(i,t,e,a);return}this.handleGenericError(i,t,e,a.Error??"Unknown error")},error:a=>{let c=a?.error?.body;if(c?.Data?.FolderExists===!1||c?.StatusCode==="missing-folder"){n?this.handleMissingFolder(i,t,e):this.handleGenericError(i,t,e,$localize`The remote destination folder does not exist.`);return}if(c?.Data?.HostCertificate){this.handleMissingCertificate(i,t,e,c.Data?.HostCertificate);return}if(c?.Data?.ReportedHostKey){this.handleIncorrectKey(i,t,e,c.Data.ReportedHostKey,c.Data.AcceptedHostKey??null);return}this.handleGenericError(i,t,e,a?.message??"Unknown error")}})})}testDestinationv1(t,e,n){return new Je(i=>{this.#n.postApiV1RemoteoperationTest({requestBody:{path:t}}).subscribe({next:a=>{i.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:e}),i.complete()},error:a=>{this.handleDestinationErrorv1(a.message,t,e,n).subscribe(c=>{i.next(c)})}})})}handleMissingFolder(t,e,n){this.#t.open(Q,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`,confirmText:$localize`Create folder`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.#e.hasV2TestOperations()?this.#n.postApiV2DestinationTest({requestBody:{DestinationUrl:e,AutoCreate:!0,Options:null}}).subscribe({next:a=>{if(a.Success){this.emitSuccessV2(t,e,n,a);return}else this.handleFolderCreateFailure(t,e,n,a.Error??$localize`Unknown error`)},error:a=>{this.handleFolderCreateFailure(t,e,n,a.message??$localize`Unknown error`)}}):this.#n.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe({next:()=>{this.handleFolderCreated(t,e,n)},error:a=>{this.handleFolderCreateFailure(t,e,n,a.message??$localize`Unknown error`)}}))}})}handleFolderCreateFailure(t,e,n,i){this.#t.open(Q,{data:{title:$localize`Error creating folder`,message:$localize`The remote destination folder could not be created. ${i}`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:n}),t.complete()}})}emitSuccessV2(t,e,n,i){t.next({action:"success",targetUrl:e,testAgain:!1,destinationIndex:n,anyFilesFound:!i.Data?.FolderIsEmpty,containsBackup:i.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:i.Data?.FolderContainsEncryptedBackupFiles??void 0}),t.complete()}handleFolderCreated(t,e,n){this.#t.open(Q,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"test-again",targetUrl:e,testAgain:!0,destinationIndex:n}),t.complete()}})}reportNoAction(t,e,n){t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:n}),t.complete()}handleMissingCertificate(t,e,n,i){this.#t.open(Q,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
2
+ If this is a self-signed certificate, you can choose to trust this certificate.
3
+ The server reported the certificate hash: ${i}`,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:a=>{if(!a){this.reportNoAction(t,e,n);return}t.next({action:"trust-cert",targetUrl:e,testAgain:!0,certData:i,destinationIndex:n}),t.complete()}})}handleIncorrectKey(t,e,n,i,a){a?this.#t.open(Q,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
4
+ otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
5
+ Do you want to REPLACE your CURRENT host key ${a}
6
+ with the REPORTED host key: ${i}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:c=>{if(!c){this.reportNoAction(t,e,n);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:n}),t.complete()}}):this.#t.open(Q,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${i}`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:c=>{if(!c){this.reportNoAction(t,e,n);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:n}),t.complete()}})}handleGenericError(t,e,n,i){this.#t.open(Q,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:i,cancelText:$localize`OK`},closed:a=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:n}),t.complete()}})}handleDestinationErrorv1(t,e,n,i){return new Je(a=>{if(t==="missing-folder"){i?this.handleMissingFolder(a,e,n):this.handleGenericError(a,e,n,$localize`The remote destination folder does not exist.`);return}if(t.startsWith("incorrect-cert:")){let c=t.split("incorrect-cert:")[1];this.handleMissingCertificate(a,e,n,c);return}if(t.startsWith("incorrect-host-key:")){let c=t.split('incorrect-host-key:"')[1].split('",')[0],h=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(a,e,n,c,h);return}this.handleGenericError(a,e,n,t)})}static \u0275fac=function(e){return new(e||o)};static \u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"})};var Ft=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=Pe({token:o,factory:o.\u0275fac,providedIn:"root"})};var rn=["formRef"];function sn(o,t){o&1&&(s(0,"spk-alert",17),E(1,5),F(2,"spk-icon",26),D(),r())}function ln(o,t){if(o&1&&d(0),o&2){let e=t.$implicit;B(" ",e.DisplayName," ")}}function cn(o,t){if(o&1&&F(0,"spk-progress-bar",40),o&2){let e=_(3);me("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),p("value",e.calculatePasswordStrength()*(100/5))}}function _n(o,t){o&1&&(s(0,"span",35),N(1,10),r())}function pn(o,t){o&1&&(E(0,8,1),F(1,"spk-icon"),D())}function dn(o,t){o&1&&(E(0,8,2),F(1,"spk-icon"),D())}function un(o,t){o&1&&(E(0,11,1),F(1,"spk-icon",42),D())}function mn(o,t){o&1&&(E(0,11,2),F(1,"spk-icon"),D())}function Fn(o,t){if(o&1){let e=$();s(0,"button",41),T("click",function(){u(e);let i=_(3);return m(i.copyPassword())}),E(1,11),g(2,un,2,0)(3,mn,2,0),D(),r()}if(o&2){let e=_(3);l(2),f(e.copiedPassword()?2:3)}}function Cn(o,t){o&1&&(s(0,"spk-alert",39),N(1,12),r())}function gn(o,t){if(o&1){let e=$();s(0,"div",30)(1,"spk-form-field")(2,"label",31),E(3,7),F(4,"sup"),D(),r(),F(5,"input",32),r(),g(6,cn,1,9,"spk-progress-bar",33),s(7,"spk-form-field"),F(8,"input",34),g(9,_n,2,0,"span",35),r(),s(10,"div",36)(11,"button",37),T("click",function(){u(e);let i=_(2);return m(i.showPassword.set(!i.showPassword()))}),E(12,8),g(13,pn,2,0)(14,dn,2,0),D(),r(),s(15,"button",37),T("click",function(){u(e);let i=_(2);return m(i.generatePassword())}),E(16,9),F(17,"spk-icon"),D(),r(),g(18,Fn,4,1,"button",38),r(),g(19,Cn,2,0,"spk-alert",39),r()}if(o&2){let e=_(2);l(5),p("type",e.showPassword()?"text":"password"),l(),f(e.generalForm.value.password?6:-1),l(2),p("type",e.showPassword()?"text":"password"),l(),f(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),l(4),f(e.showPassword()?13:14),l(5),f(e.showCopyPassword()?18:-1),l(),f(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function fn(o,t){if(o&1&&(s(0,"spk-select",27)(1,"label",28),N(2,6),r(),F(3,"input",29),ne(4,ln,1,1,"ng-template"),r(),g(5,gn,20,7,"div",30)),o&2){let e=_();p("options",e.encryptionOptions())("isClearable",!1),l(5),f(e.encryptionFieldSignal()!==""?5:-1)}}function Tn(o,t){if(o&1&&(s(0,"button",24),E(1,13),F(2,"spk-icon"),D(),r()),o&2){let e=_();p("disabled",e.nameAndDescriptionValid()===!1)}}function Sn(o,t){if(o&1&&(s(0,"button",25),E(1,14),F(2,"spk-icon"),D(),r()),o&2){let e=_();p("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var Xe=new fe,Qt=(o={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>Xe.group({name:Xe.control(o.name,[Le.required]),description:Xe.control(o.description),encryption:Xe.control(o.encryption,[Ht()]),password:Xe.control(o.password,[ht(t=>t?.value.encryption!=="",[Le.required])]),repeatPassword:Xe.control(o.repeatPassword,[ht(t=>t?.value.encryption!=="",[Le.required])])}),Pt={Key:"",DisplayName:"None"},At=class o{#n=A(se);#t=A(Fe);#e=A(Wt);#i=A(_e);#o=A(Ie);formRef=we.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=S(!1);copiedPassword=S(!1);showCopyPassword=S(!1);encryptionEffect=Me(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=w(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=w(()=>{let e=this.generalFormSignal()?.password??"";return this.#e.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.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)}}}displayFn(){let t=this.#o.systemInfo()?.EncryptionModules??[];return e=>{let n=[Pt,...t].find(i=>i.Key===e);return n?`${n.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let t=this.#e.generate(16);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#i.isNew()||this.#i.submit(!0),this.#n.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&&Ne(n.formRef,rn,5),e&2&&Oe()},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 h;h=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let y;y=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Encrypted backup `;let I;I=$localize`Encryption`;let R;R=$localize`Encryption`;let V;V=$localize`Password`;let O;O=$localize`Repeat password`;let U;U=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let W;W=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,W=ye(W);let k;k=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let C;C=$localize`Passwords do not match`;let v;v=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,v=ye(v);let H;H=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let j;j=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let q;return q=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],i,a,c,h,y,R,U,W,k,C,v,H,j,q,["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","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["spk-button","","type","submit","spkTooltip",n,1,"raised","primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",I,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",V,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",O,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(e,n){if(e&1){let i=$();s(0,"form",15,0),T("submit",function(){return u(i),m(n.next())}),s(2,"h3",16),N(3,1),r(),g(4,sn,3,0,"spk-alert",17),s(5,"spk-form-field")(6,"label",18),E(7,2),F(8,"sup"),D(),r(),F(9,"input",19),r(),s(10,"spk-form-field")(11,"label",20),N(12,3),r(),F(13,"textarea",21),r(),g(14,fn,6,3),s(15,"div",22)(16,"button",23),T("click",function(){return u(i),m(n.exit())}),E(17,4),F(18,"spk-icon"),D(),r(),g(19,Tn,3,1,"button",24)(20,Sn,3,1,"button",25),r()()}if(e&2){let i;p("formGroup",n.generalForm),l(4),f(!n.isNew()&&((i=n.generalFormSignal())==null?null:i.encryption)!==""?4:-1),l(10),f(n.isNew()?14:-1),l(5),f(n.encryptionFieldSignal()===""||!n.isNew()?19:20)}},dependencies:[Ke,Ge,ee,te,be,Ve,Be,le,ce,Ce,J,ot,it,at],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-500)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}"],changeDetection:0})};function En(o,t){if(o&1){let e=$();s(0,"div",24)(1,"spk-form-field")(2,"label",25),N(3,7),r(),s(4,"input",26,0),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.nextTime().time,i)||(a.scheduleFields.nextTime().time=i),m(i)}),T("focus",function(){u(e);let i=re(5);return m(i.showPicker())}),r(),s(6,"spk-icon",27),d(7,"clock"),r()(),s(8,"spk-form-field"),F(9,"label",28),s(10,"input",29,1),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.nextTime().date,i)||(a.scheduleFields.nextTime().date=i),m(i)}),T("focus",function(){u(e);let i=re(11);return m(i.showPicker())}),r(),s(12,"spk-icon",27),d(13,"calendar"),r()()(),s(14,"div",24)(15,"spk-form-field")(16,"label",30),N(17,8),r(),s(18,"input",31),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().repeatValue,i)||(a.scheduleFields.runAgain().repeatValue=i),m(i)}),r()(),s(19,"spk-select",32)(20,"input",33),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().repeatUnit,i)||(a.scheduleFields.runAgain().repeatUnit=i),m(i)}),r()()(),s(21,"app-toggle-card",34),z(22,35),N(23,9),X(),s(24,"div",36)(25,"spk-toggle",19),E(26,10),s(27,"input",20),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.mon,i)||(a.scheduleFields.runAgain().allowedDays.mon=i),m(i)}),r(),D(),r(),s(28,"spk-toggle",19),E(29,11),s(30,"input",20),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.tue,i)||(a.scheduleFields.runAgain().allowedDays.tue=i),m(i)}),r(),D(),r(),s(31,"spk-toggle",19),E(32,12),s(33,"input",20),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.wed,i)||(a.scheduleFields.runAgain().allowedDays.wed=i),m(i)}),r(),D(),r(),s(34,"spk-toggle",19),E(35,13),s(36,"input",20),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.thu,i)||(a.scheduleFields.runAgain().allowedDays.thu=i),m(i)}),r(),D(),r(),s(37,"spk-toggle",19),E(38,14),s(39,"input",20),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.fri,i)||(a.scheduleFields.runAgain().allowedDays.fri=i),m(i)}),r(),D(),r(),s(40,"spk-toggle",19),E(41,15),s(42,"input",20),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.sat,i)||(a.scheduleFields.runAgain().allowedDays.sat=i),m(i)}),r(),D(),r(),s(43,"spk-toggle",19),E(44,16),s(45,"input",20),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.sun,i)||(a.scheduleFields.runAgain().allowedDays.sun=i),m(i)}),r(),D(),r()()()}if(o&2){let e=_();l(4),L("ngModel",e.scheduleFields.nextTime().time),l(6),L("ngModel",e.scheduleFields.nextTime().date),l(8),L("ngModel",e.scheduleFields.runAgain().repeatValue),l(),p("options",e.unitOptions)("isClearable",!1),l(),L("ngModel",e.scheduleFields.runAgain().repeatUnit),l(),p("disallowToggle",!0),l(6),L("ngModel",e.scheduleFields.runAgain().allowedDays.mon),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.tue),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.wed),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.thu),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.fri),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.sat),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var Dn=[{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`}],Ae={autoRun:!0,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}},yt=class o{#n=A(_e);#t=A(se);#e=A(Fe);unitOptions=Dn;scheduleFields=this.#n.scheduleFields;goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#e.parent})}next(){this.#n.isNew()||this.#n.submit(!0),this.#t.navigate(["options"],{relativeTo:this.#e.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-schedule"]],decls:16,vars:2,consts:()=>{let t;t=$localize`Schedule`;let e;e=$localize` Automatically run backups ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let n;n=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let a;a=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let c;c=$localize`Next time`;let h;h=$localize`Run again every`;let y;y=$localize`Allowed days`;let I;I=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let R;R=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let V;V=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let O;O=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let U;U=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let W;W=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let k;return k=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],t,e,n,i,a,c,h,y,I,R,V,O,U,W,k,[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","",1,"raised","primary",3,"click"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","focus","ngModel"],["suffix",""],["for","date"],["type","date","id","date",3,"ngModelChange","focus","ngModel"],["for","repeatValue"],["type","number","id","repeatValue",3,"ngModelChange","ngModel"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit",3,"ngModelChange","ngModel"],[3,"disallowToggle"],["title",""],[1,"days-wrap"]]},template:function(e,n){e&1&&(s(0,"h3",17),N(1,2),r(),s(2,"div",18)(3,"spk-toggle",19),E(4,3),s(5,"input",20),G("ngModelChange",function(a){return b(n.scheduleFields.autoRun,a)||(n.scheduleFields.autoRun=a),a}),r(),D(),r(),s(6,"p"),N(7,4),r()(),g(8,En,46,14),s(9,"div",21)(10,"button",22),T("click",function(){return n.goBack()}),E(11,5),F(12,"spk-icon"),D(),r(),s(13,"button",23),T("click",function(){return n.next()}),E(14,6),F(15,"spk-icon"),D(),r()()),e&2&&(l(5),L("ngModel",n.scheduleFields.autoRun),l(3),f(n.scheduleFields.autoRun()?8:-1))},dependencies:[Te,ee,Ue,ve,te,ge,le,Re,J,Ce,ce,ze],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;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 hn(o,t){if(o&1&&(z(0,4),d(1),X()),o&2){let e,n=_();l(),ke((e=n.currentExpressionOption())==null?null:e.startsWith)}}function An(o,t){if(o&1&&(z(0,5),d(1),X()),o&2){let e,n=_();l(),ke((e=n.currentExpressionOption())==null?null:e.endsWith)}}var Pn=[{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:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],Ct=class o{path=xe.required();osType=xe();pathChange=Et();remove=Et();internalPath=S("");pathType=S("-Expression");currentExpressionOption=w(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});expressionOptions=w(()=>{let e=this.osType()==="Windows"?"\\":"/";return Pn.map(n=>n.value==="-Folder"||n.value==="+Folder"?ue(K({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?ue(K({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?ue(K({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?ue(K({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?ue(K({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?ue(K({},n),{startsWith:"*.",endsWith:""}):ue(K({},n),{startsWith:"",endsWith:""}))});pathEffect=Me(()=>{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:9,vars:6,consts:()=>{let t;return t=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"expression-input"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""],[1,"filter-removal",3,"click"],[1,"spk-primary"]]},template:function(e,n){if(e&1&&(s(0,"spk-select",0)(1,"input",1),G("ngModelChange",function(a){return b(n.pathType,a)||(n.pathType=a),a}),T("ngModelChange",function(){return n.updateFilter()}),r()(),s(2,"spk-form-field",2)(3,"input",3),G("ngModelChange",function(a){return b(n.internalPath,a)||(n.internalPath=a),a}),T("ngModelChange",function(){return n.updateFilter()}),r(),g(4,hn,2,1,"ng-container",4),g(5,An,2,1,"ng-container",5),r(),s(6,"div",6),T("click",function(){return n.removeFilter()}),s(7,"spk-icon",7),d(8,"x-circle"),r()()),e&2){let i,a;p("options",n.expressionOptions())("isClearable",!1),l(),L("ngModel",n.pathType),l(2),L("ngModel",n.internalPath),l(),f(!((i=n.currentExpressionOption())==null||i.startsWith==null)&&i.startsWith.length?4:-1),l(),f(!((a=n.currentExpressionOption())==null||a.endsWith==null)&&a.endsWith.length?5:-1)}},dependencies:[Te,ee,te,ge,ce,le,J],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 yn=["formRef"],Yt=()=>({standalone:!0});function Nn(o,t){if(o&1){let e=$();s(0,"spk-form-field",42)(1,"input",43),G("ngModelChange",function(i){u(e);let a=_(2);return b(a.editingPath,i)||(a.editingPath=i),m(i)}),r()(),s(2,"button",44),T("click",function(){u(e);let i=_(2);return m(i.updatePath())}),s(3,"spk-icon"),d(4,"floppy-disk"),r()(),s(5,"button",44),T("click",function(){u(e);let i=_(2);return m(i.cancelEditPath())}),s(6,"spk-icon"),d(7,"x-bold"),r()()}if(o&2){let e=_(2);l(),L("ngModel",e.editingPath),p("ngModelOptions",je(2,Yt))}}function On(o,t){if(o&1){let e=$();s(0,"spk-form-field",42),F(1,"input",45),r(),s(2,"button",44),T("click",function(){u(e);let i=_().$implicit,a=_();return m(a.editPath(i))}),s(3,"spk-icon"),d(4,"pen"),r()(),s(5,"button",44),T("click",function(){u(e);let i=_().$implicit,a=_();return m(a.removePath(i))}),s(6,"spk-icon"),d(7,"trash-simple"),r()()}if(o&2){let e=_().$implicit;$t("readonly",!0),l(),p("ngModel",e)("ngModelOptions",je(3,Yt))}}function kn(o,t){if(o&1&&(s(0,"div",30),g(1,Nn,8,3)(2,On,8,4),r()),o&2){let e=t.$implicit,n=_();l(),f(n.oldPath()===e?1:2)}}function Mn(o,t){if(o&1){let e=$();s(0,"app-new-filter",47),T("pathChange",function(i){let a=u(e).$index,c=_(2);return m(c.patchPathAt(i,a))})("remove",function(){let i=u(e).$index,a=_(2);return m(a.removePathAt(i))}),r()}if(o&2){let e=t.$implicit,n=_(2);p("path",e)("osType",n.osType()??"")}}function xn(o,t){if(o&1&&oe(0,Mn,1,2,"app-new-filter",46,ie),o&2){let e=_();ae(e.pathArray())}}function wn(o,t){if(o&1&&(s(0,"div",41)(1,"spk-form-field"),F(2,"input",48),r(),s(3,"spk-select",49),F(4,"input",50),r()()),o&2){let e=_();l(3),p("options",e.sizeOptions())("isClearable",!1)}}var pe=new fe,$n=["Bytes","KB","MB","GB","TB","PB"],Zt=(o={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>pe.group({path:pe.control(o.path),excludes:pe.group({hidden:pe.control(o.excludes.hidden),system:pe.control(o.excludes.system),temporary:pe.control(o.excludes.temporary),filesLargerThan:pe.group({size:pe.control(null),unit:pe.control(null)})})}),Nt=class o{#n=A(_e);#t=A(se);#e=A(Fe);formRef=we.required("formRef");sourceDataForm=this.#n.sourceDataForm;sourceDataFormSignal=this.#n.sourceDataFormSignal;newPathCtrl=new st("");filesLargerThan=w(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=S($n);osType=this.#n.osType;pathSignal=he(this.sourceDataForm.controls.path.valueChanges);pathArray=w(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=w(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=S(null);editingPath=S(null);addingNewPath=S(!1);editPath(t){this.oldPath.set(t),this.editingPath.set(t)}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 e=this.sourceDataForm.controls.path.value??"",n=e.indexOf(t);if(n===-1)return;let i=n===0?t:"\0"+t,a=e.replace(i,"");this.sourceDataForm.controls.path.setValue(a)}addFilter(t="-*"){let e=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${e}\0${t}`)}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,h)=>h===e?`${t}`:`${c}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${a}`)}removePathAt(t){let n=this.sourceDataForm.controls.path.value.split("\0").filter(a=>!a.startsWith("-")&&!a.startsWith("+")).join("\0"),i=this.pathArray().filter((a,c)=>c!==t).join("\0");this.sourceDataForm.controls.path.setValue(`${n}\0${i}`)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let t=this.sourceDataForm.controls.path.value,e=this.newPathCtrl.value;this.sourceDataForm.controls.path.setValue(`${t}\0${e}`),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#e.parent})}next(){this.#n.isNew()||this.#n.submit(!0),this.#t.navigate(["schedule"],{relativeTo:this.#e.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&Ne(n.formRef,yn,5),e&2&&Oe()},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 h;h=$localize`Folder path`;let y;y=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let I;I=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let R;R=$localize`Paths`;let V;V=$localize`Add a path directly from your machine.`;let O;O=$localize`Filters`;let U;U=$localize`Customize your filters.`;let W;W=$localize`Add filter`;let k;k=$localize`Exclude`;let C;C=$localize`Choose if there’s any files you want to exclude.`;let v;v=$localize` Hidden files ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let H;H=$localize` System files ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let j;j=$localize` Temporary files ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let q;q=$localize` Files larger than `;let P;P=$localize`Edit path`;let de;return de=$localize`Select an option...`,[["formRef",""],c,h,y,I,R,V,O,U,W,k,C,v,H,j,q,[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"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"paths"],[1,"path"],[1,"row-inputs"],["type","text","placeholder",e,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",n,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",a,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[1,"small"],["type","text","placeholder",P,3,"ngModelChange","ngModel","ngModelOptions"],["spk-button","","type","button",1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],["type","number","formControlName","size"],[3,"options","isClearable"],["type","text","formControlName","unit","placeholder",de]]},template:function(e,n){if(e&1){let i=$();s(0,"form",16,0),T("submit",function(){return u(i),m(n.next())}),s(2,"div",17)(3,"h3",18),N(4,1),r(),s(5,"app-file-tree",19)(6,"label",20),N(7,2),r(),F(8,"input",21),r(),s(9,"div",22)(10,"button",23),T("click",function(){return u(i),m(n.goBack())}),E(11,3),F(12,"spk-icon"),D(),r(),s(13,"button",24),E(14,4),F(15,"spk-icon"),D(),r()()(),s(16,"div",25)(17,"app-toggle-card",26),z(18,27),N(19,5),X(),s(20,"p",28),N(21,6),r(),s(22,"div",29),oe(23,kn,3,1,"div",30,ie),s(25,"div",31)(26,"spk-form-field"),F(27,"input",32),r(),s(28,"button",33),T("click",function(){return u(i),m(n.addNewPath())}),s(29,"spk-icon"),d(30,"plus"),r()()()()(),s(31,"app-toggle-card",26),z(32,27),N(33,7),X(),s(34,"p",28),N(35,8),r(),s(36,"button",34),T("click",function(){return u(i),m(n.addFilter())}),N(37,9),r(),g(38,xn,2,0),r(),s(39,"app-toggle-card",35),z(40,27),N(41,10),X(),s(42,"p",28),N(43,11),r(),s(44,"spk-toggle",36),E(45,12),F(46,"input",37),D(),r(),s(47,"spk-toggle",36),E(48,13),F(49,"input",38),D(),r(),s(50,"spk-toggle",36),E(51,14),F(52,"input",39),D(),r(),s(53,"spk-toggle",40),T("click",function(){return u(i),m(n.toggleFilesLargerThan())}),N(54,15),r(),g(55,wn,5,2,"div",41),r()()()}if(e&2){let i;p("formGroup",n.sourceDataForm),l(5),p("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0),l(12),p("disallowToggle",!0),l(6),ae(n.nonFilterPaths()),l(4),p("formControl",n.newPathCtrl),l(4),p("disallowToggle",!0),l(7),f((i=n.pathSignal())!=null&&i.length?38:-1),l(),p("disallowToggle",!0),l(14),me("active",n.filesLargerThan()),l(2),f(n.filesLargerThan()?55:-1)}},dependencies:[Te,Ge,ee,Ue,ve,te,be,ge,Ke,lt,Ve,Be,ct,le,J,Ce,Re,ce,Ct,dt,ze],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}spk-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}.path[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr min-content min-content;gap:.25rem}"],changeDetection:0})};var Jt="1W:1D,4W:1W,12M:1M",Ee=new fe,_e=class o{#n=A(se);#t=A(Ie);#e=A($e);#i=A(rt);#o=A(Ft);generalForm=Qt();sourceDataForm=Zt();scheduleFields={autoRun:S(Ae.autoRun),nextTime:S(Ae.nextTime),runAgain:S(Ae.runAgain)};destinationForm=en();settings=S([]);optionsFields={remoteVolumeSize:S("50MB"),backupRetention:S("all"),backupRetentionTime:S(""),backupRetentionVersions:S(0),backupRetentionCustom:S("")};oauthServiceLink=w(()=>this.#t.systemInfo()?.DefaultOAuthURL??"https://duplicati-oauth-handler.appspot.com/");oauthServiceLinkNew=w(()=>this.#t.systemInfo()?.DefaultOAuthURLv2??"https://oauth-service.duplicati.com/");isDraft=S(!1);backupId=S(null);backupName=w(()=>this.generalFormSignal()?.name??"");isSubmitting=S(!1);finishedLoading=S(!1);backupDefaults=S(null);applicationOptions=S(null);isNew=w(()=>this.backupId()==="new");osType=w(()=>this.#t.systemInfo()?.OSType);selectedOptions=S([]);selectedAdvancedFormPair=S([]);destinationFormPair=S({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=w(()=>{let t=this.destinationFormPair()?.advanced??[],e=this.selectedAdvancedFormPair()??[];return t.filter(n=>e.findIndex(i=>i.name===n.name)===-1)});sourceDataFormSignal=he(this.sourceDataForm.valueChanges);destinationFormSignal=he(this.destinationForm.valueChanges);generalFormSignal=he(this.generalForm.valueChanges);encryptionFieldSignal=he(this.generalForm.controls.encryption.valueChanges);destinationOptions=w(()=>this.#t.backendModules()??[]);advancedOptions=w(()=>this.#t.systemInfo()?.Options?.map(this.#a)??[]);#a(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=w(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[Pt,...t]});nonSelectedOptions=w(()=>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));addOrUpdateAdvancedFormPairByName(t,e,n){let i=this.selectedAdvancedFormPair().find(a=>a.name===t);if(i)this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.controls[i.name].setValue(n);else{let a=this.notSelectedAdvancedFormPair().find(c=>c.name===t);if(!a)return;this.addAdvancedFormPair(a,e,n)}}addAdvancedFormPairByName(t,e,n){let i=this.notSelectedAdvancedFormPair().find(a=>a.name===t);i&&this.addAdvancedFormPair(i,e,n)}addAdvancedFormPair(t,e,n){let i=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,a=n??t.defaultValue;this.createFormField(i,t,a),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),t])}removeAdvancedFormPair(t,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(t.name),this.selectedAdvancedFormPair().findIndex(i=>i.name===t.name)!==-1&&this.selectedAdvancedFormPair.update(i=>(i=i.filter(a=>a.name!==t.name),i))}submit(t=!1){this.isSubmitting.set(!0);let e=this.#_(),n=this.backupId();n==="new"||!n||this.isDraft()?this.#i.postApiV1Backups({requestBody:e}).pipe(We(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{t||this.exit(!1)},error:i=>{}}):this.#i.putApiV1BackupById({id:n,requestBody:e}).pipe(We(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{t||this.exit(!1)},error:i=>{}})}exit(t){if(!t){this.#c(),this.#n.navigate(["/"]);return}this.#e.open(Q,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#c(),this.#n.navigate(["/"]))}})}updateFieldsFromTargetUrl(t){this.#r(),setTimeout(()=>{this.#s(t)})}#r(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(h=>`${h.Include?"":"-"}${h.Expression}`)??[],i=t.Settings?.find(h=>h.Name==="--exclude-files-attributes")?.Value??"",a=t.Settings?.find(h=>h.Name==="--skip-files-larger-than")??null,c={path:[...e,...n].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:a?.Value?.toUpperCase()??null}};this.sourceDataForm.patchValue(c)}mapDestinationToForm(t){let e=t.TargetURL?Dt(t.TargetURL):null;e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}#s(t){let e=Dt(t);e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}mapGeneralToForm(t){let e=t.Settings?.find(c=>c.Name==="encryption-module"),n=t.Settings?.find(c=>c.Name==="passphrase")?.Value??"",i=e?.Value&&e.Value.length?e.Value:"",a={name:t.Name??"",description:t.Description??""};i&&i!==""&&(a.encryption=i),n&&n!==""&&(a.password=n,a.repeatPassword=n),this.generalForm.patchValue(a)}mapScheduleToForm(t){if(!t){this.scheduleFields.autoRun.set(!1);return}let e=this.#o.fromString(t.Repeat)??null,n=this.#p(t.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>K(K({},i),n)),this.scheduleFields.runAgain.set({repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:t.AllowedDays?.includes("mon")??!1,tue:t.AllowedDays?.includes("tue")??!1,wed:t.AllowedDays?.includes("wed")??!1,thu:t.AllowedDays?.includes("thu")??!1,fri:t.AllowedDays?.includes("fri")??!1,sat:t.AllowedDays?.includes("sat")??!1,sun:t.AllowedDays?.includes("sun")??!1}})}mapOptionsToForms(t){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],n=t.Settings?.filter(c=>!e.includes(c.Name)),i=t.Settings?.filter(c=>e.includes(c.Name));this.settings.set(n??[]),n?.forEach(c=>{if(c.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(c.Value??"")});var a="all";i?.forEach(c=>{if(c.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(c.Value??"50MB"),c.Name==="keep-time"&&(c.Value??"")!=="")return a="time",this.optionsFields.backupRetentionTime.set(c.Value??"");if(c.Name==="keep-versions"&&(c.Value??"")!=="")return a="versions",this.optionsFields.backupRetentionVersions.set(c.Value?parseInt(c.Value):null);if(c.Name==="retention-policy"&&(c.Value??"")!=="")if(c.Value===Jt)a="smart";else return a="custom",this.optionsFields.backupRetentionCustom.set(c.Value??"")}),this.optionsFields.backupRetention.set(a)}getCurrentTargetUrl(){return this.#l(this.destinationForm.controls.destinations)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#_(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,a=this.destinationForm.value.destinations?.length?this.#l(this.destinationForm.controls.destinations):[],c=null;e.runAgain?.repeatUnit&&e.runAgain?.repeatValue&&(c=this.#o.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let h=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([O,U])=>U).map(([O,U])=>O):[],y=n.path?.split("\0")??[],I=this.mapFormsToSettings(),R=Object.entries(n.excludes??{}).filter(([O,U])=>U&&O!=="filesLargerThan").map(([O])=>O),V=n.excludes?.filesLargerThan;return R.length&&I.push({Name:"--exclude-files-attributes",Value:R.join(",")}),V&&V.size!==null&&V.unit!==null&&I.push({Name:"--skip-files-larger-than",Value:`${V.size}${V.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:a[0]??null,Sources:y.filter(O=>!O.startsWith("-")),Settings:I,Filters:y.filter(O=>O.startsWith("-")).map((O,U)=>({Order:U,Include:!1,Expression:O.slice(1)}))},Schedule:e.autoRun?{Repeat:c,Time:e.nextTime?.date?new Date(`${e.nextTime.date}T${e.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:h}:null}}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"],i=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&(i=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let a=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":a.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":a.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":a.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":a.push({Name:"retention-policy",Value:Jt});break}let c=[...t,...n],h=this.settings().filter(y=>!c.includes(y.Name)).map(y=>{let I=y.Value;return typeof y.Value=="number"&&(I=y.Value.toString()),typeof y.Value=="boolean"&&(I=y.Value?"True":"False"),{Name:`--${y.Name}`,Value:I}});return[...i,...a,...h]}#l(t){return t.controls.map(e=>_t(e.value))}#p(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]}}createFormField(t,e,n){if(e.type==="Integer"){t.addControl(e.name,Ee.control(n?parseInt(n):0));return}if(e.type==="Boolean"){t.addControl(e.name,Ee.control(n==="true"||n==="True"));return}if(e.type==="Flags"){t.addControl(e.name,Ee.control(n??""));return}if(e.type==="Timespan"||e.type==="DateTime"){t.addControl(e.name,Ee.control(n,[Le.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}t.addControl(e.name,Ee.control(n))}addDestinationFormGroup(t,e,n=!1){let i=pt.find(k=>k.customKey===t||k.key===t),a=i?.key,c=this.destinationOptions().find(k=>k.Key===a);if(!c||!c.Options)return;let h=i&&i.oauthField?i.oauthField:null,y=i&&i.customFields?i.customFields:{},I=i&&i.dynamicFields?i.dynamicFields:[],R=i&&i.advancedFields?i.advancedFields:[],V=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:h,custom:[],dynamic:[],advanced:[]});let O=Ee.group({}),U=Ee.group({}),W=Ee.group({});y&&Object.entries(y).forEach(([k,C],v)=>{let q=C,{formElement:H}=q,j=xt(q,["formElement"]);O.addControl(k,H(e?.custom[k])),this.destinationFormPair.update(P=>(P.custom.push(K({order:900+v},j)),P))});for(let k=0;k<c.Options.length;k++){let C=c.Options[k];if(C.Deprecated)continue;let v=I.find(H=>H===C.Name||C.Aliases?.includes(H.name)||H.name===C.Name);if(v){let H=C.Aliases?.indexOf(v.name)??-1,j=C.Aliases&&H>-1?C.Aliases[H]:C.Name,q=v&&typeof v!="string",P=q?v?.defaultValue??C.DefaultValue:C.DefaultValue,de={name:j,type:C.Type,shortDescription:C.ShortDescription??void 0,longDescription:C.LongDescription??void 0,options:C.ValidValues,order:900+k},M=q?K(K({},de),v):de,Y=e?.dynamic[j]??P??C.DefaultValue;this.createFormField(U,M,Y),this.destinationFormPair.update(Mt=>(Mt.dynamic.push(M),Mt))}else{if(V.find(Y=>Y===C.Name))continue;let j=R.find(Y=>Y===C.Name||Y.name===C.Name),q=j&&typeof j!="string",P=e?.advanced[C.Name],de=P??C.DefaultValue,M={name:C.Name,type:C.Type,shortDescription:C.ShortDescription??void 0,longDescription:C.LongDescription??void 0,options:C.ValidValues,defaultValue:de,order:900+k},Ze=q?K(K({},M),j):M;n&&P&&(this.createFormField(W,Ze,de),this.selectedAdvancedFormPair.update(Y=>(Y.push(Ze),Y))),this.destinationFormPair.update(Y=>(Y.advanced.push(Ze),Y))}}this.destinationFormPair.update(k=>({oauthField:k.oauthField,custom:k.custom.sort((C,v)=>C.order-v.order),dynamic:k.dynamic.sort((C,v)=>C.order-v.order),advanced:k.advanced.sort((C,v)=>C.order-v.order)})),this.destinationForm.controls.destinations.push(tn({key:i?.customKey??t,customGroup:O,dynamicGroup:U,advancedGroup:W}))}#c(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(Ae.autoRun),this.scheduleFields.nextTime.set(Ae.nextTime),this.scheduleFields.runAgain.set(Ae.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([])}static \u0275fac=function(e){return new(e||o)};static \u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"})};var Rn=["formRef"],In=(o,t,e,n)=>({index:o,formView:t,formGroupName:"custom",destinationType:e,oauthField:n}),kt=o=>({$implicit:o}),vn=(o,t,e,n)=>({index:o,formView:t,formGroupName:"dynamic",destinationType:e,oauthField:n}),Ln=(o,t,e,n)=>({index:o,formView:t,formGroupName:"advanced",destinationType:e,oauthField:n}),bn=()=>({maxWidth:"700px",width:"100%"});function Gn(o,t){o&1&&(E(0,5,2),F(1,"spk-icon"),D())}function Un(o,t){o&1&&N(0,5,3)}function Vn(o,t){if(o&1){let e=$();E(0,5,1),s(1,"button",20),T("click",function(){u(e);let i=_();return m(i.testDestination())}),g(2,Gn,2,0)(3,Un,1,0),r(),D()}if(o&2){let e=_();l(),me("loader",e.testLoading())("success",e.successfulTest()),l(),f(e.successfulTest()?2:3)}}function Bn(o,t){if(o&1){let e=$();s(0,"p",26),T("click",function(){u(e);let i=_();return m(i.removeDestinationFormGroup(i.destinationCount()-1))}),E(1,8),F(2,"strong")(3,"br")(4,"span",27),D(),r()}if(o&2){let e,n=_();l(4),ft((e=n.selectedDestinationType())==null?null:e.displayName),Tt(1)}}function Kn(o,t){if(o&1){let e=$();s(0,"div",33),T("click",function(){let i=u(e).$implicit,a=_(2);return m(a.addDestinationFormGroup(i.key))}),s(1,"h3"),d(2),r(),s(3,"p"),d(4),r()()}if(o&2){let e=t.$implicit;l(2),ke(e.displayName),l(2),ke(e.description)}}function zn(o,t){if(o&1){let e=$();s(0,"button",34,1),T("click",function(){let i=u(e).$implicit,a=_(2);return m(a.addDestinationFormGroup(i.key))}),d(2),r()}if(o&2){let e=t.$implicit;l(2),B(" ",e.displayName," ")}}function Xn(o,t){if(o&1&&(s(0,"div",28),oe(1,Kn,5,2,"div",29,ie),r(),s(3,"spk-menu",30)(4,"button",31),N(5,9),r(),z(6,19),oe(7,zn,3,1,"button",32,ie),X(),r()),o&2){let e=_();l(),ae(e.destinationTypeOptionsFocused()),l(2),p("searchable",!0),l(4),ae(e.destinationTypeOptionsNotFocused())}}function Wn(o,t){o&1&&et(0)}function Hn(o,t){if(o&1&&ne(0,Wn,1,0,"ng-container",39),o&2){let e,n=t.$implicit,i=t.$index;_();let a=re(18),c=_();p("ngTemplateOutlet",a)("ngTemplateOutletContext",tt(7,kt,nt(2,In,i,n,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function jn(o,t){o&1&&et(0)}function qn(o,t){if(o&1&&ne(0,jn,1,0,"ng-container",39),o&2){let e,n=t.$implicit,i=t.$index;_();let a=re(18),c=_();p("ngTemplateOutlet",a)("ngTemplateOutletContext",tt(7,kt,nt(2,vn,i,n,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function Qn(o,t){if(o&1){let e=$();E(0,10,1),s(1,"button",34,1),T("click",function(){let i=u(e).$implicit,a=_(2);return m(a.addAdvancedFormPair(i,0))}),r(),D()}if(o&2){let e=t.$implicit;l(),ft(e.name),Tt(0)}}function Yn(o,t){o&1&&et(0)}function Zn(o,t){if(o&1&&ne(0,Yn,1,0,"ng-container",39),o&2){let e,n=t.$implicit,i=t.$index;_();let a=re(18),c=_();p("ngTemplateOutlet",a)("ngTemplateOutletContext",tt(7,kt,nt(2,Ln,i,n,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function Jn(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function ei(o,t){if(o&1&&(s(0,"app-file-tree",42)(1,"label",47),d(2),g(3,Jn,2,1,"spk-icon",48),r(),F(4,"input",49),r()),o&2){let e=_().$implicit,n=x(2),i=x(3),a=_(2);p("startingPath",a.getFormFieldValue(0,e.formGroupName,e.formView.name))("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),p("for",i),l(),B(" ",n," "),l(),f(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function ti(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function ni(o,t){if(o&1&&(s(0,"app-file-tree",43)(1,"label",47),d(2),g(3,ti,2,1,"spk-icon",48),r(),F(4,"input",49),r()),o&2){let e=_().$implicit,n=x(2),i=x(3),a=_(2);p("hideShortcuts",!0)("startingPath",a.getFormFieldValue(0,e.formGroupName,e.formView.name)),l(),p("for",i),l(),B(" ",n," "),l(),f(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function ii(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function oi(o,t){if(o&1&&(s(0,"spk-icon",53),d(1," link "),r()),o&2){_();let e=x(5),n=x(6);me("error",e&&n==="error")("warn",e&&n==="warning"),p("spkTooltip",e)}}function ai(o,t){o&1&&(s(0,"spk-icon",52),d(1,"envelope"),r())}function ri(o,t){o&1&&(s(0,"spk-icon",52),d(1,"textbox"),r())}function si(o,t){if(o&1&&(s(0,"spk-form-field")(1,"label",47),d(2),g(3,ii,2,1,"spk-icon",48),r(),F(4,"input",50),He(5)(6),g(7,oi,2,5,"spk-icon",51)(8,ai,2,0,"spk-icon",52)(9,ri,2,0,"spk-icon",52),r()),o&2){let e=_().$implicit,n=x(2),i=x(3),a=_(2);l(),p("for",i),l(),B(" ",n," "),l(),f(e.formView.longDescription?3:-1),l(),p("type",e.formView.type==="Email"?"email":"text")("id",i)("formControlName",e.formView.name);let c=a.getFormFieldValue(0,e.formGroupName,e.formView.name),h=a.hasDoubleLeadingSlashes(c);l(),De(h&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),l(),De(e.formView.doubleSlash==null?null:e.formView.doubleSlash.type),l(),f(e.formView.type==="Path"?7:e.formView.type==="Email"?8:9)}}function li(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function ci(o,t){if(o&1){let e=$();s(0,"span",57),T("click",function(){u(e);let i=_(2).$implicit,a=_(2);return m(a.oauthStartTokenCreation(i.destinationType,i))}),d(1," AuthID "),r()}}function _i(o,t){o&1&&(s(0,"spk-icon",52),d(1,"password"),r())}function pi(o,t){if(o&1){let e=$();s(0,"spk-icon",58),T("click",function(){u(e);let i=_(2).$implicit;return m(i.formView.showPassword=!i.formView.showPassword)}),d(1," eye "),r()}}function di(o,t){if(o&1){let e=$();s(0,"spk-icon",58),T("click",function(){u(e);let i=_(2).$implicit;return m(i.formView.showPassword=!i.formView.showPassword)}),d(1," eye-slash "),r()}}function ui(o,t){if(o&1&&(s(0,"spk-form-field")(1,"label",47),d(2),g(3,li,2,1,"spk-icon",48),r(),F(4,"input",54),g(5,ci,2,0,"span",55)(6,_i,2,0,"spk-icon",52),g(7,pi,2,0,"spk-icon",56)(8,di,2,0,"spk-icon",56),r()),o&2){let e=_().$implicit,n=x(2),i=x(3);l(),p("for",i),l(),B(" ",n," "),l(),f(e.formView.longDescription?3:-1),l(),p("type",e.formView.showPassword?"text":"password")("id",i)("formControlName",e.formView.name),l(),f(e.oauthField===e.formView.name?5:6),l(2),f(e.formView.showPassword?7:8)}}function mi(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=_(3).$implicit;p("spkTooltip",e.formView.longDescription)}}function Fi(o,t){if(o&1&&d(0),o&2){let e=_().$implicit;St(" ",e==null?null:e.key," (",e==null?null:e.value,") ")}}function Ci(o,t){if(o&1&&d(0),o&2){let e=_().$implicit;B(" ",e," ")}}function gi(o,t){if(o&1&&g(0,Fi,1,2)(1,Ci,1,1),o&2){let e=_(3).$implicit;f(e.formView.loadOptions?0:1)}}function fi(o,t){if(o&1&&(s(0,"spk-select",59)(1,"label",47),d(2),g(3,mi,2,1,"spk-icon",48),r(),F(4,"input",49),r(),ne(5,gi,2,1,"ng-template",null,3,qe)),o&2){let e=re(6);_();let n=x(0),i=_().$implicit,a=x(2),c=x(3);p("options",n)("isClearable",!1)("optionTemplate",e),l(),p("for",c),l(),B(" ",a," "),l(),f(i.formView.longDescription?3:-1),l(),p("id",c)("formControlName",i.formView.name)}}function Ti(o,t){if(o&1&&(He(0),g(1,fi,7,8)),o&2){let e=_().$implicit,n=De(e.formView.loadOptions?e.formView.loadOptions(_(2).injector)():e.formView.options);l(),f(n?1:-1)}}function Si(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=_(3).$implicit;p("spkTooltip",e.formView.longDescription)}}function Ei(o,t){if(o&1&&d(0),o&2){let e=t.$implicit;St(" ",e.key," ",e.value?"("+e.value+")":""," ")}}function Di(o,t){if(o&1&&(s(0,"spk-select",61)(1,"label",47),d(2),g(3,Si,2,1,"spk-icon",48),r(),F(4,"input",49),r(),ne(5,Ei,1,2,"ng-template",null,4,qe)),o&2){let e=re(6);_();let n=x(0),i=_().$implicit,a=x(2),c=x(3);p("options",n)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),l(),p("for",c),l(),B(" ",a," "),l(),f(i.formView.longDescription?3:-1),l(),p("id",c)("formControlName",i.formView.name)}}function hi(o,t){o&1&&F(0,"spk-progress-bar",60)}function Ai(o,t){if(o&1&&(He(0),g(1,Di,7,9)(2,hi,1,0,"spk-progress-bar",60)),o&2){let e=_().$implicit,n=De(e.formView.loadOptions?e.formView.loadOptions(_(2).injector)():e.formView.options);l(),f(n?1:2)}}function Pi(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function yi(o,t){if(o&1&&(s(0,"app-size",44)(1,"label",47),d(2),g(3,Pi,2,1,"spk-icon",48),r()()),o&2){let e=_().$implicit,n=x(2),i=x(3);p("inputType",e.Name)("formControlName",e.formView.name)("customId",i),l(),p("for",i),l(),B(" ",n," "),l(),f(e.formView.longDescription?3:-1)}}function Ni(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Oi(o,t){if(o&1&&(s(0,"spk-form-field")(1,"label",47),d(2),g(3,Ni,2,1,"spk-icon",48),r(),F(4,"input",62),s(5,"spk-icon",52),d(6,"numpad"),r()()),o&2){let e=_().$implicit,n=x(2),i=x(3);l(),p("for",i),l(),B(" ",n," "),l(),f(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function ki(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Mi(o,t){if(o&1&&(s(0,"spk-toggle",45)(1,"label",47),d(2),g(3,ki,2,1,"spk-icon",48),r(),F(4,"input",63),r()),o&2){let e=_().$implicit,n=x(2),i=x(3);l(),p("for",i),l(),B(" ",n," "),l(),f(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function xi(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function wi(o,t){if(o&1&&d(0),o&2){let e=t.$implicit;B(" ",e," ")}}function $i(o,t){if(o&1&&(s(0,"spk-select",64)(1,"label",47),d(2),g(3,xi,2,1,"spk-icon",48),r(),F(4,"input",65),r(),ne(5,wi,1,1,"ng-template",null,4,qe)),o&2){let e=re(6),n=_().$implicit,i=x(2);p("options",n.formView.options)("selectMultiple",!0)("optionTemplate",e),l(),p("for",Gt("destination-",n.formGroupName,"-",n.index)),l(),B(" ",i," "),l(),f(n.formView.longDescription?3:-1),l(),p("formControlName",n.formView.name)}}function Ri(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Ii(o,t){if(o&1&&(s(0,"app-timespan",44)(1,"label",47),d(2),g(3,Ri,2,1,"spk-icon",48),r()()),o&2){let e=_().$implicit,n=x(2),i=x(3);p("inputType",e.formView.name)("formControlName",e.formView.name)("customId",i),l(),p("for",i),l(),B(" ",n," "),l(),f(e.formView.longDescription?3:-1)}}function vi(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Li(o,t){if(o&1&&(s(0,"app-file-drop-textarea",46)(1,"label"),d(2),g(3,vi,2,1,"spk-icon",48),r()()),o&2){let e=_().$implicit,n=x(3);p("formControlName",e.formView.name)("customId",n)("placeholder",e.formView.longDescription),l(2),B(" ",e.formView.shortDescription??e.formView.name," "),l(),f(e.formView.longDescription?3:-1)}}function bi(o,t){if(o&1){let e=$();s(0,"button",66),T("click",function(){u(e);let i=_().$implicit,a=_(2);return m(a.removeFormView(i.formView,0))}),s(1,"spk-icon"),d(2,"x-circle"),r()()}}function Gi(o,t){if(o&1&&(s(0,"div",40),z(1,41),He(2)(3),g(4,ei,5,11,"app-file-tree",42)(5,ni,5,7,"app-file-tree",43)(6,si,10,9,"spk-form-field")(7,ui,9,8,"spk-form-field")(8,Ti,2,2)(9,Ai,3,2)(10,yi,4,6,"app-size",44)(11,Oi,7,5,"spk-form-field")(12,Mi,5,5,"spk-toggle",45)(13,$i,7,9)(14,Ii,4,6,"app-timespan",44)(15,Li,4,5,"app-file-drop-textarea",46),X(),g(16,bi,3,0,"button",31),r()),o&2){let e=t.$implicit;me("single-field",e.formGroupName!=="advanced"),l(),p("formGroupName",e.formGroupName),l(),De(e.formView.shortDescription??e.formView.name),l(),De("destination-"+e.formGroupName+"-"+e.index+"-"+(e.asHttpOptions?"http":"other")),l(),f(e.formView.type==="FileTree"?4:e.formView.type==="FolderTree"?5:e.formView.type==="String"||e.formView.type==="Path"||e.formView.type==="Email"?6:e.formView.type==="Password"?7:e.formView.type==="Enumeration"?8:e.formView.type==="NonValidatedSelectableString"?9:e.formView.type==="Size"?10:e.formView.type==="Integer"?11:e.formView.type==="Boolean"?12:e.formView.type==="Flags"?13:e.formView.type==="Timespan"||e.formView.type==="DateTime"?14:e.formView.type==="FreeText"?15:-1),l(12),f(e.formGroupName==="advanced"?16:-1)}}function Ui(o,t){if(o&1&&(z(0,21)(1,35),oe(2,Hn,1,9,"ng-container",null,ie),oe(4,qn,1,9,"ng-container",null,ie),s(6,"app-toggle-card",36),z(7,37),E(8,10),s(9,"spk-menu",30)(10,"button",38),F(11,"spk-icon"),r(),z(12,19),oe(13,Qn,3,1,"button",32,ie),X(),r(),D(),X(),oe(15,Zn,1,9,"ng-container",null,ie),r(),ne(17,Gi,17,7,"ng-template",null,2,qe),X()()),o&2){let e=_();l(2),ae(e.destinationFormPair().custom),l(2),ae(e.destinationFormPair().dynamic),l(2),p("disallowToggle",!0),l(3),p("searchable",!0),l(),p("disabled",e.notSelectedAdvancedFormPair().length===0),l(3),ae(e.notSelectedAdvancedFormPair()),l(2),ae(e.selectedAdvancedFormPair())}}function Vi(o,t){if(o&1){let e=$();s(0,"spk-dialog",67),G("isOpenChange",function(i){u(e);let a=_();return b(a.targetUrlDialogOpen,i)||(a.targetUrlDialogOpen=i),m(i)}),s(1,"header",68)(2,"h2"),N(3,11),r(),s(4,"spk-alert",69),N(5,12),r()(),s(6,"div",70)(7,"spk-form-field"),F(8,"textarea",71),r()(),s(9,"footer",72)(10,"button",23),T("click",function(){u(e);let i=_();return m(i.closeTargetUrlDialog(!1))}),d(11,"Cancel"),r(),s(12,"button",73),T("click",function(){u(e);let i=_();return m(i.closeTargetUrlDialog(!0))}),E(13,13),F(14,"spk-icon"),D(),r()()()}if(o&2){let e=_();L("isOpen",e.targetUrlDialogOpen),p("options",je(3,bn)),l(8),p("formControl",e.targetUrlCtrl)}}var gt=new fe,en=(o={destinations:[]})=>gt.group({destinations:gt.array(o.destinations)}),tn=({key:o,customGroup:t,dynamicGroup:e,advancedGroup:n})=>gt.group({destinationType:gt.control(o),custom:t,dynamic:e,advanced:n}),Ot=class o{#n=A(se);#t=A(Fe);#e=A(_e);#i=A($e);#o=A(mt);injector=A(wt);formRef=we.required("formRef");destinationForm=this.#e.destinationForm;destinationFormPair=this.#e.destinationFormPair;selectedAdvancedFormPair=this.#e.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#e.notSelectedAdvancedFormPair;destinationOptions=this.#e.destinationOptions;destinationFormSignal=this.#e.destinationFormSignal;destinationCount=w(()=>this.destinationFormSignal()?.destinations?.length??0);successfulTest=S(!1);testLoading=S(!1);destinationTypeOptionsInFocus=S(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=S(pt.map(t=>({key:t.customKey??t.key,customKey:t.customKey??null,displayName:t.displayName,description:t.description})));destinationTypeOptionsFocused=w(()=>{let t=this.destinationTypeOptionsInFocus(),e=this.destinationTypeOptions();return t.map(n=>e.find(i=>i.key===n))});selectedDestinationType=w(()=>{let t=this.destinationFormSignal();return this.destinationTypeOptions().find(n=>t?.destinations?.[0]?.destinationType===n.key)});destinationTypeOptionsNotFocused=w(()=>{let t=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(n=>!t.includes(n.key))});getFormFieldValue(t,e,n){return((this.destinationForm.controls.destinations.controls?.[t]).controls?.[e]).controls[n].value}hasDoubleLeadingSlashes(t){return t.startsWith("//")}getFormControl(t,e,n){return((this.destinationForm.controls.destinations.controls?.[t]).controls?.[e]).controls[n]}addDestinationFormGroup(t){this.#e.addDestinationFormGroup(t)}addAdvancedFormPair(t,e){this.#e.addAdvancedFormPair(t,e)}removeFormView(t,e){this.#e.removeAdvancedFormPair(t,e)}targetUrl=w(()=>this.#e.getCurrentTargetUrl()[0]);targetUrlCtrl=new st;targetUrlInitial=S(null);targetUrlDialogOpen=S(!1);openTargetUrlDialog(){let e=this.#e.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(e),this.targetUrlInitial.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(t=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl.value,n=this.targetUrlInitial();!t||e===n||this.#e.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(t=0){let n=this.#e.getCurrentTargetUrl()[t];n&&(this.testLoading.set(!0),this.#o.testDestination(n,t,!0).pipe(We(()=>this.testLoading.set(!1))).subscribe({next:i=>{if(i.action==="success"){this.#e.isNew()&&(i.containsBackup===!0?this.#i.open(Q,{data:{title:$localize`Folder contains backup`,message:$localize`The remote destination already contains a backup. You must use a different folder for each backup.`,confirmText:$localize`OK`,cancelText:void 0}}):i.anyFilesFound===!0&&this.#i.open(Q,{data:{title:$localize`Folder is not empty`,message:$localize`The remote destination is not empty. It is recommended to use an empty folder for the backup.`,confirmText:$localize`OK`,cancelText:void 0}})),this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3);return}if(i.action==="generic-error"){this.successfulTest.set(!1);return}i.action==="trust-cert"&&this.#e.addOrUpdateAdvancedFormPairByName("accept-specified-ssl-hash",i.destinationIndex,i.certData),i.action==="approve-host-key"&&this.#e.addOrUpdateAdvancedFormPairByName("ssh-fingerprint",i.destinationIndex,i.reportedHostKey),i.testAgain&&this.testDestination(i.destinationIndex)}}))}mapToTargetUrl(t){return _t(t.value)}removeDestinationFormGroup(t){this.destinationForm.controls.destinations.removeAt(t)}displayFn(t){let e=this.destinationOptions().find(n=>n.Key===t);return e?`${e.DisplayName}`:""}goBack(){this.#n.navigate(["general"],{relativeTo:this.#t.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#n.navigate(["source-data"],{relativeTo:this.#t.parent})}#a=S(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#r=S(!1);#s=S(null);keyCreation(){}oauthStartTokenCreation(t,e){let n=this.getFormControl(e.index,e.formGroupName,e.formView.name),i=t=="pcloud"?this.#e.oauthServiceLinkNew:this.#e.oauthServiceLink;this.#r.set(!0);let a=this.#a(),c=450,h=600,y=i+"?type="+t+"&token="+a,I=screen.width/2-c/2,R=screen.height/2-h/2,V=window.open(y,"_blank","height="+h+",width="+c+",menubar=0,status=0,titlebar=0,toolbar=0,left="+I+",top="+R);return window.addEventListener("message",O=>{let U=O.data.startsWith("authid:"),W=U?O.data.replace("authid:",""):null;U&&(n.setValue(W),this.#r.set(!1),V?.close())}),!1}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-destination"]],viewQuery:function(e,n){e&1&&Ne(n.formRef,Rn,5),e&2&&Oe()},decls:24,vars:6,consts:()=>{let t;t=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"\uFFFD*6:1\uFFFD"}:START_BLOCK_IF_1:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON:${"\uFFFD*2:2\uFFFD"}:START_BLOCK_IF: Connected ${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*3:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*3:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:dots-three-vertical${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:link${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,t=ye(t);let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let n;n=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$localize` Current destination type ${"\uFFFD#2\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:.${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:LINE_BREAK: Want to select another? ${"\uFFFD#4\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPAN:`;let a;a=$localize`Other destinations`;let c;c=$localize` Advanced options ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#10\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#12\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*14:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*14:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_MENU:`,c=ye(c);let h;h=$localize`Edit target URL`;let y;y=$localize` Be careful, this will overwrite everything you have in your destination. `;let I;return I=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],["fieldTemplate",""],["enumOptionTemplate",""],["optionTemplate",""],t,e,n,i,a,c,h,y,I,[3,"submit","formGroup"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"loader","success"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],["formArrayName","destinations"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"isOpen","options"],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["spk-button","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],["formGroupName","0"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small",3,"disabled"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","startingPath"],[3,"inputType","formControlName","customId"],[1,"primary","raised"],[3,"formControlName","customId","placeholder"],[3,"for"],[1,"primary",3,"spkTooltip"],["type","text",3,"id","formControlName"],[3,"type","id","formControlName"],["prefix","",3,"error","warn","spkTooltip"],["prefix",""],["prefix","",3,"spkTooltip"],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"formControlName"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"warning"],["content",""],["id","targetUrl","autocomplete","off",3,"formControl"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,n){if(e&1){let i=$();s(0,"form",14,0),T("submit",function(){return u(i),m(n.next())}),s(2,"header")(3,"h3",15),E(4,5),s(5,"div",16),g(6,Vn,4,5,"button",17),s(7,"spk-menu")(8,"button",18),F(9,"spk-icon"),r(),z(10,19),s(11,"button",20),T("click",function(){return u(i),m(n.openTargetUrlDialog())}),F(12,"spk-icon"),r(),X(),r()(),D(),r(),g(13,Bn,5,1,"p"),r(),g(14,Xn,9,1),g(15,Ui,19,3,"ng-container",21),s(16,"div",22)(17,"button",23),T("click",function(){return u(i),m(n.goBack())}),E(18,6),F(19,"spk-icon"),D(),r(),s(20,"button",24),E(21,7),F(22,"spk-icon"),D(),r()()(),g(23,Vi,15,4,"spk-dialog",25)}if(e&2){let i;p("formGroup",n.destinationForm),l(6),f(n.destinationCount()>0?6:-1),l(7),f(n.destinationCount()>0?13:-1),l(),f(n.destinationCount()===0?14:-1),l(),f(!((i=n.destinationFormSignal())==null||i.destinations==null)&&i.destinations.length?15:-1),l(8),f(n.targetUrlDialogOpen()?23:-1)}},dependencies:[Ke,Ge,ee,Ue,ve,te,be,lt,Ve,Be,ct,Xt,Vt,le,Kt,J,Re,Bt,it,ce,at,ot,qt,ze,dt,ut,jt],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] spk-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}label[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 1fr;gap:.5rem;align-items:flex-end}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{mt as a,en as b,tn as c,Ot as d,Qt as e,Pt as f,At as g,Ae as h,yt as i,Zt as j,Nt as k,_e as l};
@@ -0,0 +1 @@
1
+ import{a as re}from"./chunk-VKD4Y3YQ.js";import{$a as L,Fc as m,Gc as O,Nb as V,Q as j,R as h,Rc as Me,S as ne,Sa as H,T as B,Ta as o,V as y,Vc as Ee,X as De,_b as ie,ab as l,cb as u,fa as be,fb as C,i as ve,ib as Ae,la as I,m as ye,oa as S,pa as D,qc as f,r as Ce,ra as U,x as Ve}from"./chunk-K6EZTPNQ.js";import{a as d,b as g}from"./chunk-EUDKD2JW.js";var ke=(()=>{class n{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,i){this._renderer=e,this._elementRef=i}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(i){return new(i||n)(o(H),o(U))};static \u0275dir=l({type:n})}return n})(),G=(()=>{class n extends ke{static \u0275fac=(()=>{let e;return function(r){return(e||(e=D(n)))(r||n)}})();static \u0275dir=l({type:n,features:[u]})}return n})(),v=new y(""),rt={provide:v,useExisting:h(()=>st),multi:!0},st=(()=>{class n extends G{writeValue(e){this.setProperty("checked",e)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=D(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(i,r){i&1&&V("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[f([rt]),u]})}return n})(),ot={provide:v,useExisting:h(()=>Re),multi:!0};function at(){let n=re()?re().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var lt=new y(""),Re=(()=>{class n extends ke{_compositionMode;_composing=!1;constructor(e,i,r){super(e,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!at())}writeValue(e){let i=e??"";this.setProperty("value",i)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(i){return new(i||n)(o(H),o(U),o(lt,8))};static \u0275dir=l({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&V("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)})},standalone:!1,features:[f([ot]),u]})}return n})();function de(n){return n==null||ce(n)===0}function ce(n){return n==null?null:Array.isArray(n)||typeof n=="string"?n.length:n instanceof Set?n.size:null}var E=new y(""),F=new y(""),ut=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Fe=class{static min(t){return dt(t)}static max(t){return ct(t)}static required(t){return ht(t)}static requiredTrue(t){return ft(t)}static email(t){return gt(t)}static minLength(t){return pt(t)}static maxLength(t){return mt(t)}static pattern(t){return _t(t)}static nullValidator(t){return Ge()}static compose(t){return Le(t)}static composeAsync(t){return We(t)}};function dt(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function ct(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function ht(n){return de(n.value)?{required:!0}:null}function ft(n){return n.value===!0?null:{required:!0}}function gt(n){return de(n.value)||ut.test(n.value)?null:{email:!0}}function pt(n){return t=>{let e=t.value?.length??ce(t.value);return e===null||e===0?null:e<n?{minlength:{requiredLength:n,actualLength:e}}:null}}function mt(n){return t=>{let e=t.value?.length??ce(t.value);return e!==null&&e>n?{maxlength:{requiredLength:n,actualLength:e}}:null}}function _t(n){if(!n)return Ge;let t,e;return typeof n=="string"?(e="",n.charAt(0)!=="^"&&(e+="^"),e+=n,n.charAt(n.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(de(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function Ge(n){return null}function Te(n){return n!=null}function je(n){return Ae(n)?ye(n):n}function Be(n){let t={};return n.forEach(e=>{t=e!=null?d(d({},t),e):t}),Object.keys(t).length===0?null:t}function Ue(n,t){return t.map(e=>e(n))}function vt(n){return!n.validate}function He(n){return n.map(t=>vt(t)?t:e=>t.validate(e))}function Le(n){if(!n)return null;let t=n.filter(Te);return t.length==0?null:function(e){return Be(Ue(e,t))}}function $e(n){return n!=null?Le(He(n)):null}function We(n){if(!n)return null;let t=n.filter(Te);return t.length==0?null:function(e){let i=Ue(e,t).map(je);return Ve(i).pipe(Ce(Be))}}function qe(n){return n!=null?We(He(n)):null}function we(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function ze(n){return n._rawValidators}function Ze(n){return n._rawAsyncValidators}function se(n){return n?Array.isArray(n)?n:[n]:[]}function W(n,t){return Array.isArray(n)?n.includes(t):n===t}function Ie(n,t){let e=se(t);return se(n).forEach(r=>{W(e,r)||e.push(r)}),e}function Se(n,t){return se(t).filter(e=>!W(n,e))}var q=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=$e(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=qe(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},c=class extends q{name;get formDirective(){return null}get path(){return null}},p=class extends q{_parent=null;name=null;valueAccessor=null},z=class{_cd;constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},yt={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},gn=g(d({},yt),{"[class.ng-submitted]":"isSubmitted"}),pn=(()=>{class n extends z{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(o(p,2))};static \u0275dir=l({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&ie("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[u]})}return n})(),mn=(()=>{class n extends z{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(o(c,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&ie("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},standalone:!1,features:[u]})}return n})();var N="VALID",$="INVALID",b="PENDING",x="DISABLED",_=class{},Z=class extends _{value;source;constructor(t,e){super(),this.value=t,this.source=e}},P=class extends _{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e}},k=class extends _{touched;source;constructor(t,e){super(),this.touched=t,this.source=e}},A=class extends _{status;source;constructor(t,e){super(),this.status=t,this.source=e}},oe=class extends _{source;constructor(t){super(),this.source=t}},ae=class extends _{source;constructor(t){super(),this.source=t}};function he(n){return(ee(n)?n.validators:n)||null}function Ct(n){return Array.isArray(n)?$e(n):n||null}function fe(n,t){return(ee(t)?t.asyncValidators:n)||null}function Vt(n){return Array.isArray(n)?qe(n):n||null}function ee(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function Xe(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new j(1e3,"");if(!i[e])throw new j(1001,"")}function Ye(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new j(1002,"")})}var M=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(t,e){this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return m(this.statusReactive)}set status(t){m(()=>this.statusReactive.set(t))}_status=O(()=>this.statusReactive());statusReactive=I(void 0);get valid(){return this.status===N}get invalid(){return this.status===$}get pending(){return this.status==b}get disabled(){return this.status===x}get enabled(){return this.status!==x}errors;get pristine(){return m(this.pristineReactive)}set pristine(t){m(()=>this.pristineReactive.set(t))}_pristine=O(()=>this.pristineReactive());pristineReactive=I(!0);get dirty(){return!this.pristine}get touched(){return m(this.touchedReactive)}set touched(t){m(()=>this.touchedReactive.set(t))}_touched=O(()=>this.touchedReactive());touchedReactive=I(!1);get untouched(){return!this.touched}_events=new ve;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(Ie(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Ie(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Se(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Se(t,this._rawAsyncValidators))}hasValidator(t){return W(this._rawValidators,t)}hasAsyncValidator(t){return W(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let e=this.touched===!1;this.touched=!0;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched(g(d({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new k(!0,i))}markAllAsDirty(t={}){this.markAsDirty({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(t))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t))}markAsUntouched(t={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:i})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,i),e&&t.emitEvent!==!1&&this._events.next(new k(!1,i))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty(g(d({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new P(!1,i))}markAsPristine(t={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,i),e&&t.emitEvent!==!1&&this._events.next(new P(!0,i))}markAsPending(t={}){this.status=b;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new A(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(g(d({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=x,this.errors=null,this._forEachChild(r=>{r.disable(g(d({},t),{onlySelf:!0}))}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Z(this.value,i)),this._events.next(new A(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(g(d({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=N,this._forEachChild(i=>{i.enable(g(d({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(g(d({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t,e){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===N||this.status===b)&&this._runAsyncValidator(i,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Z(this.value,e)),this._events.next(new A(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(g(d({},t),{sourceControl:e}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?x:N}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=b,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:t!==!1};let i=je(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new A(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i)}_initObservables(){this.valueChanges=new C,this.statusChanges=new C}_calculateStatus(){return this._allControlsDisabled()?x:this.errors?$:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(b)?b:this._anyControlsHaveStatus($)?$:N}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,e),r&&this._events.next(new P(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new k(this.touched,e)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,e)}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){ee(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let e=this._parent&&this._parent.dirty;return!t&&!!e&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=Ct(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=Vt(this._rawAsyncValidators)}},X=class extends M{constructor(t,e,i){super(he(e),fe(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){Ye(this,!0,t),Object.keys(t).forEach(i=>{Xe(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(i=>{let r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t?t[r]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>i._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,s)=>{i=e(i,r,s)}),i}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var le=class extends X{};var w=new y("",{providedIn:"root",factory:()=>T}),T="always";function te(n,t){return[...t.path,n]}function Y(n,t,e=T){ge(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),bt(n,t),Mt(n,t),At(n,t),Dt(n,t)}function K(n,t,e=!0){let i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),Q(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function J(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function Dt(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}function ge(n,t){let e=ze(n);t.validator!==null?n.setValidators(we(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=Ze(n);t.asyncValidator!==null?n.setAsyncValidators(we(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();J(t._rawValidators,r),J(t._rawAsyncValidators,r)}function Q(n,t){let e=!1;if(n!==null){if(t.validator!==null){let r=ze(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.validator);s.length!==r.length&&(e=!0,n.setValidators(s))}}if(t.asyncValidator!==null){let r=Ze(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.asyncValidator);s.length!==r.length&&(e=!0,n.setAsyncValidators(s))}}}let i=()=>{};return J(t._rawValidators,i),J(t._rawAsyncValidators,i),e}function bt(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&Ke(n,t)})}function At(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&Ke(n,t),n.updateOn!=="submit"&&n.markAsTouched()})}function Ke(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function Mt(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}function Et(n,t){n==null,ge(n,t)}function Ft(n,t){return Q(n,t)}function pe(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function wt(n){return Object.getPrototypeOf(n.constructor)===G}function It(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function me(n,t){if(!t)return null;Array.isArray(t);let e,i,r;return t.forEach(s=>{s.constructor===Re?e=s:wt(s)?i=s:r=s}),r||i||e||null}function St(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function Oe(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function Ne(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var R=class extends M{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(t=null,e,i){super(he(e),fe(i,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),ee(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Ne(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){Oe(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Oe(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){Ne(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}};var Ot=n=>n instanceof R,Nt=(()=>{class n extends c{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return te(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let e;return function(r){return(e||(e=D(n)))(r||n)}})();static \u0275dir=l({type:n,standalone:!1,features:[u]})}return n})();var xt={provide:p,useExisting:h(()=>Pt)},xe=Promise.resolve(),Pt=(()=>{class n extends p{_changeDetectorRef;callSetDisabledState;control=new R;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new C;constructor(e,i,r,s,a,it){super(),this._changeDetectorRef=a,this.callSetDisabledState=it,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=me(this,s)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),pe(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){Y(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){xe.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&Ee(i);xe.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?te(e,this._parent):[e]}static \u0275fac=function(i){return new(i||n)(o(c,9),o(E,10),o(F,10),o(v,10),o(Me,8),o(w,8))};static \u0275dir=l({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[f([xt]),u,S]})}return n})();var vn=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return n})(),kt={provide:v,useExisting:h(()=>Rt),multi:!0},Rt=(()=>{class n extends G{writeValue(e){let i=e??"";this.setProperty("value",i)}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let e;return function(r){return(e||(e=D(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,r){i&1&&V("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[f([kt]),u]})}return n})(),Gt={provide:v,useExisting:h(()=>jt),multi:!0};var Tt=(()=>{class n{_accessors=[];add(e,i){this._accessors.push([e,i])}remove(e){for(let i=this._accessors.length-1;i>=0;--i)if(this._accessors[i][1]===e){this._accessors.splice(i,1);return}}select(e){this._accessors.forEach(i=>{this._isSameGroup(i,e)&&i[1]!==e&&i[1].fireUncheck(e.value)})}_isSameGroup(e,i){return e[0].control?e[0]._parent===i._control._parent&&e[1].name===i.name:!1}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ne({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),jt=(()=>{class n extends G{_registry;_injector;_state;_control;_fn;setDisabledStateFired=!1;onChange=()=>{};name;formControlName;value;callSetDisabledState=De(w,{optional:!0})??T;constructor(e,i,r,s){super(e,i),this._registry=r,this._injector=s}ngOnInit(){this._control=this._injector.get(p),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||this.callSetDisabledState==="whenDisabledForLegacyCode")&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}static \u0275fac=function(i){return new(i||n)(o(H),o(U),o(Tt),o(be))};static \u0275dir=l({type:n,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(i,r){i&1&&V("change",function(){return r.onChange()})("blur",function(){return r.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},standalone:!1,features:[f([Gt]),u]})}return n})(),Bt={provide:v,useExisting:h(()=>Ut),multi:!0},Ut=(()=>{class n extends G{writeValue(e){this.setProperty("value",parseFloat(e))}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let e;return function(r){return(e||(e=D(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(i,r){i&1&&V("change",function(a){return r.onChange(a.target.value)})("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[f([Bt]),u]})}return n})(),_e=new y(""),Ht={provide:p,useExisting:h(()=>Lt)},Lt=(()=>{class n extends p{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new C;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,s,a){super(),this._ngModelWarningConfig=s,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=me(this,r)}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&K(i,this,!1),Y(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}pe(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&K(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}static \u0275fac=function(i){return new(i||n)(o(E,10),o(F,10),o(v,10),o(_e,8),o(w,8))};static \u0275dir=l({type:n,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[f([Ht]),u,S]})}return n})(),$t={provide:c,useExisting:h(()=>Je)},Je=(()=>{class n extends c{callSetDisabledState;get submitted(){return m(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=O(()=>this._submittedReactive());_submittedReactive=I(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new C;constructor(e,i,r){super(),this.callSetDisabledState=r,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Q(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let i=this.form.get(e.path);return Y(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){K(e.control||null,e,!1),St(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this._submittedReactive.set(!0),It(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new oe(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0,i={}){this.form.reset(e,i),this._submittedReactive.set(!1),i?.emitEvent!==!1&&this.form._events.next(new ae(this.form))}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(K(i||null,e),Ot(r)&&(Y(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);Et(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let i=this.form.get(e.path);i&&Ft(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){ge(this.form,this),this._oldForm&&Q(this._oldForm,this)}static \u0275fac=function(i){return new(i||n)(o(E,10),o(F,10),o(w,8))};static \u0275dir=l({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&V("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[f([$t]),u,S]})}return n})(),Wt={provide:c,useExisting:h(()=>Qe)},Qe=(()=>{class n extends Nt{name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}_checkParentType(){tt(this._parent)}static \u0275fac=function(i){return new(i||n)(o(c,13),o(E,10),o(F,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[f([Wt]),u]})}return n})(),qt={provide:c,useExisting:h(()=>et)},et=(()=>{class n extends c{_parent;name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}ngOnInit(){tt(this._parent),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective?.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return te(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(i){return new(i||n)(o(c,13),o(E,10),o(F,10))};static \u0275dir=l({type:n,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[f([qt]),u]})}return n})();function tt(n){return!(n instanceof Qe)&&!(n instanceof Je)&&!(n instanceof et)}var zt={provide:p,useExisting:h(()=>Zt)},Zt=(()=>{class n extends p{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new C;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,s,a){super(),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=me(this,s)}ngOnChanges(e){this._added||this._setUpControl(),pe(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return te(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(i){return new(i||n)(o(c,13),o(E,10),o(F,10),o(v,10),o(_e,8))};static \u0275dir=l({type:n,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[f([zt]),u,S]})}return n})();var nt=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=L({type:n});static \u0275inj=B({})}return n})(),ue=class extends M{constructor(t,e,i){super(he(e),fe(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){Ye(this,!1,t),t.forEach((i,r)=>{Xe(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>i._syncPendingControls()?!0:e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}};function Pe(n){return!!n&&(n.asyncValidators!==void 0||n.validators!==void 0||n.updateOn!==void 0)}var yn=(()=>{class n{useNonNullable=!1;get nonNullable(){let e=new n;return e.useNonNullable=!0,e}group(e,i=null){let r=this._reduceControls(e),s={};return Pe(i)?s=i:i!==null&&(s.validators=i.validator,s.asyncValidators=i.asyncValidator),new X(r,s)}record(e,i=null){let r=this._reduceControls(e);return new le(r,i)}control(e,i,r){let s={};return this.useNonNullable?(Pe(i)?s=i:(s.validators=i,s.asyncValidators=r),new R(e,g(d({},s),{nonNullable:!0}))):new R(e,i,r)}array(e,i,r){let s=e.map(a=>this._createControl(a));return new ue(s,i,r)}_reduceControls(e){let i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){if(e instanceof R)return e;if(e instanceof M)return e;if(Array.isArray(e)){let i=e[0],r=e.length>1?e[1]:null,s=e.length>2?e[2]:null;return this.control(i,r,s)}else return this.control(e)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ne({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Cn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:w,useValue:e.callSetDisabledState??T}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=L({type:n});static \u0275inj=B({imports:[nt]})}return n})(),Vn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:_e,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:w,useValue:e.callSetDisabledState??T}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=L({type:n});static \u0275inj=B({imports:[nt]})}return n})();export{v as a,st as b,Re as c,Fe as d,pn as e,mn as f,R as g,Pt as h,vn as i,Rt as j,jt as k,Ut as l,Lt as m,Je as n,Qe as o,et as p,Zt as q,yn as r,Cn as s,Vn as t};
@@ -0,0 +1 @@
1
+ import{Bb as u,Gc as D,Lc as T,Mc as b,Nb as x,Oa as n,Ob as l,_a as g,ba as C,bc as r,ca as _,cc as m,pb as s,qb as d,vb as i,wb as o}from"./chunk-K6EZTPNQ.js";import{a as f}from"./chunk-EUDKD2JW.js";function v(e,a){if(e&1&&(i(0,"p"),r(1),o()),e&2){let t=l();n(),m(t._data().message)}}function y(e,a){if(e&1){let t=u();i(0,"button",5),x("click",function(){C(t);let p=l();return _(p.close("cancel"))}),r(1),o()}if(e&2){let t=l();n(),m(t._data().cancelText)}}function h(e,a){if(e&1){let t=u();i(0,"button",6),x("click",function(){C(t);let p=l();return _(p.close("confirm"))}),r(1),o()}if(e&2){let t=l();n(),m(t._data().confirmText)}}var w={title:$localize`Are you sure?`,confirmText:void 0,cancelText:$localize`Cancel`},k=class e{data=b();_data=D(()=>f(f({},w),this.data()));closed=T();close(a="confirm"){this.closed.emit(a==="confirm")}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=g({type:e,selectors:[["app-confirm-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:8,vars:4,consts:[["header",""],["content",""],["footer",""],["spk-button","",1,""],["spk-button","",1,"raised","primary"],["spk-button","",1,"",3,"click"],["spk-button","",1,"raised","primary",3,"click"]],template:function(t,c){t&1&&(i(0,"header",0)(1,"h3"),r(2),o()(),i(3,"div",1),s(4,v,2,1,"p"),o(),i(5,"footer",2),s(6,y,2,1,"button",3),s(7,h,2,1,"button",4),o()),t&2&&(n(2),m(c._data().title),n(2),d(c._data().message?4:-1),n(2),d(c._data().cancelText?6:-1),n(),d(c._data().confirmText?7:-1))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{k as a};
@@ -0,0 +1 @@
1
+ import{a as $}from"./chunk-XD26KCAE.js";import{a as z}from"./chunk-KQAO2YHR.js";import{a as _}from"./chunk-3PYBMCOB.js";import{a as R}from"./chunk-FPLBURO5.js";import{a as B}from"./chunk-JWFYA3TO.js";import{e as S}from"./chunk-MHALSLG3.js";import{h as P}from"./chunk-FWVOVJCG.js";import{F as u,Gc as c,Hc as f,N as d,S as m,X as s,la as n,n as k,r as h}from"./chunk-K6EZTPNQ.js";import{a as l,b as r}from"./chunk-EUDKD2JW.js";var T={Backup_Begin:$localize`Starting backup …`,Backup_PreBackupVerify:$localize`Verifying backend data …`,Backup_PostBackupTest:$localize`Verifying remote data …`,Backup_PreviousBackupFinalize:$localize`Completing previous backup …`,Backup_ProcessingFiles:$localize`Processing files to backup …`,Backup_Finalize:$localize`Completing backup …`,Backup_WaitForUpload:$localize`Waiting for upload to finish …`,Backup_Delete:$localize`Deleting unwanted files …`,Backup_Compact:$localize`Compacting remote data …`,Backup_VerificationUpload:$localize`Uploading verification file …`,Backup_PostBackupVerify:$localize`Verifying backend data …`,Backup_Complete:$localize`Backup complete!`,Restore_Begin:$localize`Starting restore …`,Restore_RecreateDatabase:$localize`Rebuilding local database …`,Restore_PreRestoreVerify:$localize`Verifying remote data …`,Restore_CreateFileList:$localize`Building list of files to restore …`,Restore_CreateTargetFolders:$localize`Creating target folders …`,Restore_ScanForExistingFiles:$localize`Scanning existing files …`,Restore_ScanForLocalBlocks:$localize`Scanning for local blocks …`,Restore_PatchWithLocalBlocks:$localize`Patching files with local blocks …`,Restore_DownloadingRemoteFiles:$localize`Downloading files …`,Restore_PostRestoreVerify:$localize`Verifying restored files …`,Restore_Complete:$localize`Restore complete!`,Recreate_Running:$localize`Recreating database …`,Vacuum_Running:$localize`Vacuuming database …`,Repair_Running:$localize`Repairing database …`,Verify_Running:$localize`Verifying files …`,BugReport_Running:$localize`Creating bug report …`,Delete_Listing:$localize`Listing remote files …`,Delete_Deleting:$localize`Deleting remote files …`,"PurgeFiles_Begin,":$localize`Listing remote files for purge …`,"PurgeFiles_Process,":$localize`Purging files …`,"PurgeFiles_Compact,":$localize`Compacting remote data …`,"PurgeFiles_Complete,":$localize`Purging files complete!`,Error:$localize`Error!`},b=class p{#i=s(B);#t=s(P);#o=s($);#e=s(z);#c=s(S);#p=s(R);#s=n(!1);#l=n(null);statusData=this.#l.asReadonly();lastState=null;serverState=c(()=>{let e=this.#e.serverState();return e?(e.ProposedSchedule=e.ProposedSchedule?.map(i=>r(l({},i),{backup:i.Item1?this.#o.getBackupById(i.Item1):null})),this.lastState=e,e):this.lastState});hasProgressOnWebsocket=c(()=>this.#p.hasProgressSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");clientIsRunning=c(()=>this.serverState()?.ProgramState==="Running");isResuming=n(!1);isFetching=this.#s.asReadonly();connectionStatus=this.#e.connectionStatus;pollingInterval;#f=f(()=>{let e=this.#e.serverState();e?.ActiveTask||this.#o.getBackups(!0),this.hasProgressOnWebsocket()&&(this.#e.subscribe("progress"),this.#e.subscribe("taskqueue")),e?.ActiveTask&&this.pollingInterval===void 0?this.startPollingProgress():e?.ActiveTask||this.stopPollingProgress()});#k=f(()=>{let e=this.#e.progressState(),i=this.#e.taskQueueState();if(e){let t=i?.find(o=>o.ID===e.TaskID)??null;this.#a(r(l({},e),{task:t}))}});setConnectionMethod(e){this.#e.setConnectionMethod(e)}startPollingProgress(){this.hasProgressOnWebsocket()?this.#e.subscribe("progress"):this.pollingInterval=setInterval(()=>{this.#r()},1e3)}stopPollingProgress(){clearInterval(this.pollingInterval)}fetchProgressState(){this.#r()}pauseResume(){return this.isResuming.set(!0),this.#t.postApiV1ServerstateResume().pipe(u(()=>this.isResuming.set(!1)))}resumeDialogCheck(e){if(!this.clientIsRunning()){this.#c.open(_,{data:{title:$localize`Server paused`,message:$localize`Server is currently paused. Do you want to resume now?`,confirmText:$localize`Resume`,cancelText:$localize`No, I'll resume later`},closed:i=>{i&&this.pauseResume().subscribe({next:()=>{e()}})}});return}e()}#r(){this.#s.set(!0),this.#t.getApiV1Progressstate().pipe(d(e=>{let i=e.TaskID??null;return i===null?k(e):this.#t.getApiV1TaskByTaskid({taskid:i}).pipe(h(t=>r(l({},e),{task:t??null})))}),u(()=>this.#s.set(!1))).subscribe({next:e=>{this.#a(e),e.task?.Status==="Completed"&&this.stopPollingProgress()},error:e=>{e.status===404&&this.stopPollingProgress()}})}#a(e){let i=e.TaskID??null,t=e.BackupID??null;i!==null&&t!==null&&(e.backup=this.#o.getBackupById(t)),this.#l.set(r(l({},e),{progress:this.#g(e),statusText:this.#u(e),actionText:e.backup?.Backup?.Name??$localize`Running task`}))}#g(e){let i=-1;if(e.task&&e)if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=0;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,o=e.TotalFileCount-e.ProcessedFileCount,a=e.TotalFileSize-e.ProcessedFileSize-t;i=(e.ProcessedFileSize+t)/e.TotalFileSize,e.ProcessedFileCount===0?i=0:i>=.9&&(i=.9)}else e.Phase==="Backup_Finalize"||e.Phase==="Backup_WaitForUpload"?i=.9:e.Phase==="Backup_Delete"||e.Phase==="Backup_Compact"?i=.95:e.Phase==="Backup_VerificationUpload"||e.Phase==="Backup_PostBackupVerify"?i=.98:e.Phase==="Backup_Complete"?i=1:e.OverallProgress>0&&(i=e.OverallProgress);return i}#n(e){let i=(e.ActiveTransfers??[]).map(o=>o.BackendSpeed).reduce((o,a)=>(o??0)+(a??0),0)??-1,t=i<=0?e.BackendSpeed:i;return(t??-1)<0?"":` at ${this.#i.transform(t)}/s`}#u(e){let i="Running \u2026";if(e.task&&e){if(i=e.Phase?T[e.Phase]:"Running \u2026",e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=`Counting (${e.TotalFileCount} files found, ${this.#i.transform(e.TotalFileSize)})`;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,o=e.TotalFileCount-e.ProcessedFileCount,a=e.TotalFileSize-e.ProcessedFileSize-t,F=e.Phase==="Restore_DownloadingRemoteFiles"?"Restoring: ":"",g=this.#n(e);e.Phase==="Backup_ProcessingFiles"&&o===0?i=`Completing upload ${g}`:e.BackendIsBlocking??!1?i=`Waiting for transfers ${g}`:i=`${F}${o} files (${this.#i.transform(a)}) to go ${g}`}else if(e.Phase==="Backup_WaitForUpload"){let t=this.#n(e);t!==""&&(i=`Waiting for upload to finish ${t}`)}}return i}static \u0275fac=function(i){return new(i||p)};static \u0275prov=m({token:p,factory:p.\u0275fac,providedIn:"root"})};export{b as a};
@@ -0,0 +1 @@
1
+ import"./chunk-EUDKD2JW.js";var o=[{path:"",loadComponent:()=>import("./chunk-VNYGRDVP.js"),children:[{path:"",redirectTo:"stored",pathMatch:"full"},{path:"stored",loadComponent:()=>import("./chunk-U4OAPG74.js")},{path:"live",loadComponent:()=>import("./chunk-AGU2PEL5.js")}]}],t=o;export{t as default};
@@ -0,0 +1 @@
1
+ import{j as a,k as b}from"./chunk-3IRKJXHE.js";import"./chunk-KA4H3PM5.js";import"./chunk-FLMFEFKM.js";import"./chunk-WIJ3HW7I.js";import"./chunk-N334RUEQ.js";import"./chunk-K5AQUIEE.js";import"./chunk-WY2KPAVB.js";import"./chunk-3PYBMCOB.js";import"./chunk-RHW5QVAY.js";import"./chunk-FPLBURO5.js";import"./chunk-3KIPRGE2.js";import"./chunk-7LEXBIXG.js";import"./chunk-P4ZYFRD3.js";import"./chunk-MHALSLG3.js";import"./chunk-FWVOVJCG.js";import"./chunk-VKD4Y3YQ.js";import"./chunk-WIDMAJIO.js";import"./chunk-K6EZTPNQ.js";import"./chunk-EUDKD2JW.js";export{a as createSourceDataForm,b as default};
@@ -1 +1 @@
1
- import{h as u}from"./chunk-N5FH4YAX.js";import{F as s,Qc as r,Rc as g,T as n,Z as o,va as l}from"./chunk-4KE2I7OA.js";var h=[{value:"Disabled",label:$localize`Disabled`},{value:"Verbose",label:$localize`Verbose`},{value:"ExplicitOnly",label:$localize`Explicit only`},{value:"Profiling",label:$localize`Profiling`},{value:"Retry",label:$localize`Retry`},{value:"Information",label:$localize`Information`},{value:"DryRun",label:$localize`Dry run`},{value:"Warning",label:$localize`Warning`},{value:"Error",label:$localize`Error`}],c=class a{#l=o(u);#e=l([]);LOG_LEVELS=h;logLevel=l("Disabled");logLevelByLabel=r(()=>h.find(e=>e.value===this.logLevel())?.label);whenFilter=l(null);backupIdFilter=l(null);id=l(0);logs=r(()=>this.whenFilter()&&this.backupIdFilter()?this.#e().filter(e=>e.BackupID===this.backupIdFilter()&&new Date(e.When).getTime()>=this.whenFilter()&&e.BackupID===this.backupIdFilter()):this.#e());timerInterval;logsLoading=l(!1);isPolling=l(!1);pagination=l({offset:0,pagesize:100});logLevelEffect=g(()=>{this.logLevel()==="Disabled"?this.timerInterval=void 0:this.isPolling()?(this.#e.set([]),this.id.set(0),queueMicrotask(()=>this.loadLogs()),this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=setInterval(()=>{this.loadLogs()},3e3)):(this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=void 0)});setWhenFilter(e){this.whenFilter.set(e)}setBackupIdFilter(e){this.backupIdFilter.set(e)}loadLogs(){this.logsLoading.set(!0),this.#l.getApiV1LogdataPoll({id:this.id(),level:this.logLevel(),pagesize:this.pagination().pagesize}).pipe(s(()=>this.logsLoading.set(!1))).subscribe({next:e=>{let t=e.reverse(),i=this.#t(t);i>0&&this.id.set(i),this.#e.set([...t,...this.#e()])}})}updateLogLevel(e){this.logLevel.set(e)}#t(e){return e.reduce((t,i)=>Math.max(t,i.ID),0)}destroy(){this.logLevel.set("Disabled"),this.timerInterval&&clearInterval(this.timerInterval)}static \u0275fac=function(t){return new(t||a)};static \u0275prov=n({token:a,factory:a.\u0275fac,providedIn:"root"})};export{c as a};
1
+ import{h as u}from"./chunk-FWVOVJCG.js";import{F as s,Gc as r,Hc as g,S as n,X as o,la as l}from"./chunk-K6EZTPNQ.js";var h=[{value:"Disabled",label:$localize`Disabled`},{value:"Verbose",label:$localize`Verbose`},{value:"ExplicitOnly",label:$localize`Explicit only`},{value:"Profiling",label:$localize`Profiling`},{value:"Retry",label:$localize`Retry`},{value:"Information",label:$localize`Information`},{value:"DryRun",label:$localize`Dry run`},{value:"Warning",label:$localize`Warning`},{value:"Error",label:$localize`Error`}],c=class a{#l=o(u);#e=l([]);LOG_LEVELS=h;logLevel=l("Disabled");logLevelByLabel=r(()=>h.find(e=>e.value===this.logLevel())?.label);whenFilter=l(null);backupIdFilter=l(null);id=l(0);logs=r(()=>this.whenFilter()&&this.backupIdFilter()?this.#e().filter(e=>e.BackupID===this.backupIdFilter()&&new Date(e.When).getTime()>=this.whenFilter()&&e.BackupID===this.backupIdFilter()):this.#e());timerInterval;logsLoading=l(!1);isPolling=l(!1);pagination=l({offset:0,pagesize:100});logLevelEffect=g(()=>{this.logLevel()==="Disabled"?this.timerInterval=void 0:this.isPolling()?(this.#e.set([]),this.id.set(0),queueMicrotask(()=>this.loadLogs()),this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=setInterval(()=>{this.loadLogs()},3e3)):(this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=void 0)});setWhenFilter(e){this.whenFilter.set(e)}setBackupIdFilter(e){this.backupIdFilter.set(e)}loadLogs(){this.logsLoading.set(!0),this.#l.getApiV1LogdataPoll({id:this.id(),level:this.logLevel(),pagesize:this.pagination().pagesize}).pipe(s(()=>this.logsLoading.set(!1))).subscribe({next:e=>{let t=e.reverse(),i=this.#t(t);i>0&&this.id.set(i),this.#e.set([...t,...this.#e()])}})}updateLogLevel(e){this.logLevel.set(e)}#t(e){return e.reduce((t,i)=>Math.max(t,i.ID),0)}destroy(){this.logLevel.set("Disabled"),this.timerInterval&&clearInterval(this.timerInterval)}static \u0275fac=function(t){return new(t||a)};static \u0275prov=n({token:a,factory:a.\u0275fac,providedIn:"root"})};export{c as a};
@@ -0,0 +1 @@
1
+ import{b as qr}from"./chunk-P4ZYFRD3.js";import{h as Fr,k as Ye}from"./chunk-VKD4Y3YQ.js";import{$ as F,Ac as Lr,B as Z,C as ie,D as Ot,E as oe,F as Ve,Fc as jr,G,H as Mt,I as dr,K as fr,Kc as kr,M as pr,Ma as wr,Mc as $r,N as D,Nb as Ur,O as Dt,P as y,Q as S,Rb as Pr,Rc as Qe,S as C,Sa as Pt,Ta as P,Tb as xr,U as gr,Ua as br,Ub as _r,V as N,Vc as Ke,W as We,X as d,Xa as Ir,Y as vr,Yc as zr,Za as xt,_ as se,_a as Ar,ab as Ce,d as sr,e as ar,f as ur,fa as mr,fb as X,g as At,h as Tt,ha as Rr,hb as Tr,i as $,ib as Er,j as M,ja as Ge,kb as Or,l as z,la as yr,lb as Mr,m as I,ma as Sr,n as h,o as ye,oa as Se,ob as Dr,p as cr,pa as Nt,q as lr,qa as Cr,r as g,ra as Ut,s as Be,t as A,u as Et,v as hr,w as He,xb as Nr,z as W}from"./chunk-K6EZTPNQ.js";import{a as l,b as O}from"./chunk-EUDKD2JW.js";var f="primary",Le=Symbol("RouteTitle"),$t=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 te(t){return new $t(t)}function Yr(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 Ln(t,n){if(t.length!==n.length)return!1;for(let e=0;e<t.length;++e)if(!L(t[e],n[e]))return!1;return!0}function L(t,n){let e=t?zt(t):void 0,r=n?zt(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],!Zr(t[i],n[i]))return!1;return!0}function zt(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function Zr(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 Xr(t){return t.length>0?t[t.length-1]:null}function H(t){return cr(t)?t:Er(t)?I(Promise.resolve(t)):h(t)}var jn={exact:en,subset:tn},Jr={exact:kn,subset:$n,ignored:()=>!0};function Br(t,n,e){return jn[e.paths](t.root,n.root,e.matrixParams)&&Jr[e.queryParams](t.queryParams,n.queryParams)&&!(e.fragment==="exact"&&t.fragment!==n.fragment)}function kn(t,n){return L(t,n)}function en(t,n,e){if(!J(t.segments,n.segments)||!Je(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(let r in n.children)if(!t.children[r]||!en(t.children[r],n.children[r],e))return!1;return!0}function $n(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>Zr(t[e],n[e]))}function tn(t,n,e){return rn(t,n,n.segments,e)}function rn(t,n,e,r){if(t.segments.length>e.length){let i=t.segments.slice(0,e.length);return!(!J(i,e)||n.hasChildren()||!Je(i,e,r))}else if(t.segments.length===e.length){if(!J(t.segments,e)||!Je(t.segments,e,r))return!1;for(let i in n.children)if(!t.children[i]||!tn(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!J(t.segments,i)||!Je(t.segments,i,r)||!t.children[f]?!1:rn(t.children[f],n,o,r)}}function Je(t,n,e){return n.every((r,i)=>Jr[e](t[i].parameters,r.parameters))}var k=class{root;queryParams;fragment;_queryParamMap;constructor(n=new p([],{}),e={},r=null){this.root=n,this.queryParams=e,this.fragment=r}get queryParamMap(){return this._queryParamMap??=te(this.queryParams),this._queryParamMap}toString(){return qn.serialize(this)}},p=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 et(this)}},Q=class{path;parameters;_parameterMap;constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap??=te(this.parameters),this._parameterMap}toString(){return on(this)}};function zn(t,n){return J(t,n)&&t.every((e,r)=>L(e.parameters,n[r].parameters))}function J(t,n){return t.length!==n.length?!1:t.every((e,r)=>e.path===n[r].path)}function Fn(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 je=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:()=>new re,providedIn:"root"})}return t})(),re=class{parse(n){let e=new qt(n);return new k(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){let e=`/${we(n.root,!0)}`,r=Vn(n.queryParams),i=typeof n.fragment=="string"?`#${Bn(n.fragment)}`:"";return`${e}${r}${i}`}},qn=new re;function et(t){return t.segments.map(n=>on(n)).join("/")}function we(t,n){if(!t.hasChildren())return et(t);if(n){let e=t.children[f]?we(t.children[f],!1):"",r=[];return Object.entries(t.children).forEach(([i,o])=>{i!==f&&r.push(`${i}:${we(o,!1)}`)}),r.length>0?`${e}(${r.join("//")})`:e}else{let e=Fn(t,(r,i)=>i===f?[we(t.children[f],!1)]:[`${i}:${we(r,!1)}`]);return Object.keys(t.children).length===1&&t.children[f]!=null?`${et(t)}/${e[0]}`:`${et(t)}/(${e.join("//")})`}}function nn(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Ze(t){return nn(t).replace(/%3B/gi,";")}function Bn(t){return encodeURI(t)}function Ft(t){return nn(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function tt(t){return decodeURIComponent(t)}function Hr(t){return tt(t.replace(/\+/g,"%20"))}function on(t){return`${Ft(t.path)}${Hn(t.parameters)}`}function Hn(t){return Object.entries(t).map(([n,e])=>`;${Ft(n)}=${Ft(e)}`).join("")}function Vn(t){let n=Object.entries(t).map(([e,r])=>Array.isArray(r)?r.map(i=>`${Ze(e)}=${Ze(i)}`).join("&"):`${Ze(e)}=${Ze(r)}`).filter(e=>e);return n.length?`?${n.join("&")}`:""}var Wn=/^[^\/()?;#]+/;function _t(t){let n=t.match(Wn);return n?n[0]:""}var Gn=/^[^\/()?;=#]+/;function Qn(t){let n=t.match(Gn);return n?n[0]:""}var Kn=/^[^=?&#]+/;function Yn(t){let n=t.match(Kn);return n?n[0]:""}var Zn=/^[^&#]+/;function Xn(t){let n=t.match(Zn);return n?n[0]:""}var qt=class{url;remaining;constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new p([],{}):new p([],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 p(n,e)),r}parseSegment(){let n=_t(this.remaining);if(n===""&&this.peekStartsWith(";"))throw new S(4009,!1);return this.capture(n),new Q(tt(n),this.parseMatrixParams())}parseMatrixParams(){let n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){let e=Qn(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let i=_t(this.remaining);i&&(r=i,this.capture(r))}n[tt(e)]=tt(r)}parseQueryParam(n){let e=Yn(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let s=Xn(this.remaining);s&&(r=s,this.capture(r))}let i=Hr(e),o=Hr(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=_t(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]=Object.keys(s).length===1?s[f]:new p([],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 sn(t){return t.segments.length>0?new p([],{[f]:t}):t}function an(t){let n={};for(let[r,i]of Object.entries(t.children)){let o=an(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 p(t.segments,n);return Jn(e)}function Jn(t){if(t.numberOfChildren===1&&t.children[f]){let n=t.children[f];return new p(t.segments.concat(n.segments),n.children)}return t}function K(t){return t instanceof k}function un(t,n,e=null,r=null){let i=cn(t);return ln(i,n,e,r)}function cn(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 p(o.url,s);return o===t&&(n=a),a}let r=e(t.root),i=sn(r);return n??i}function ln(t,n,e,r){let i=t;for(;i.parent;)i=i.parent;if(n.length===0)return Lt(i,i,i,e,r);let o=ei(n);if(o.toRoot())return Lt(i,i,new p([],{}),e,r);let s=ti(o,i,t),a=s.processChildren?Ie(s.segmentGroup,s.index,o.commands):dn(s.segmentGroup,s.index,o.commands);return Lt(i,s.segmentGroup,a,e,r)}function rt(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function Ee(t){return typeof t=="object"&&t!=null&&t.outlets}function Lt(t,n,e,r,i){let o={};r&&Object.entries(r).forEach(([u,c])=>{o[u]=Array.isArray(c)?c.map(v=>`${v}`):`${c}`});let s;t===n?s=e:s=hn(t,n,e);let a=sn(an(s));return new k(a,o,i)}function hn(t,n,e){let r={};return Object.entries(t.children).forEach(([i,o])=>{o===n?r[i]=e:r[i]=hn(o,n,e)}),new p(t.segments,r)}var nt=class{isAbsolute;numberOfDoubleDots;commands;constructor(n,e,r){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=r,n&&r.length>0&&rt(r[0]))throw new S(4003,!1);let i=r.find(Ee);if(i&&i!==Xr(r))throw new S(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function ei(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new nt(!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 nt(e,n,r)}var ce=class{segmentGroup;processChildren;index;constructor(n,e,r){this.segmentGroup=n,this.processChildren=e,this.index=r}};function ti(t,n,e){if(t.isAbsolute)return new ce(n,!0,0);if(!e)return new ce(n,!1,NaN);if(e.parent===null)return new ce(e,!0,0);let r=rt(t.commands[0])?0:1,i=e.segments.length-1+r;return ri(e,i,t.numberOfDoubleDots)}function ri(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 ce(r,!1,i-o)}function ni(t){return Ee(t[0])?t[0].outlets:{[f]:t}}function dn(t,n,e){if(t??=new p([],{}),t.segments.length===0&&t.hasChildren())return Ie(t,n,e);let r=ii(t,n,e),i=e.slice(r.commandIndex);if(r.match&&r.pathIndex<t.segments.length){let o=new p(t.segments.slice(0,r.pathIndex),{});return o.children[f]=new p(t.segments.slice(r.pathIndex),t.children),Ie(o,0,i)}else return r.match&&i.length===0?new p(t.segments,{}):r.match&&!t.hasChildren()?Bt(t,n,e):r.match?Ie(t,0,i):Bt(t,n,e)}function Ie(t,n,e){if(e.length===0)return new p(t.segments,{});{let r=ni(e),i={};if(Object.keys(r).some(o=>o!==f)&&t.children[f]&&t.numberOfChildren===1&&t.children[f].segments.length===0){let o=Ie(t.children[f],n,e);return new p(t.segments,o.children)}return Object.entries(r).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(i[o]=dn(t.children[o],n,s))}),Object.entries(t.children).forEach(([o,s])=>{r[o]===void 0&&(i[o]=s)}),new p(t.segments,i)}}function ii(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(Ee(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(!Wr(u,c,s))return o;r+=2}else{if(!Wr(u,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}function Bt(t,n,e){let r=t.segments.slice(0,n),i=0;for(;i<e.length;){let o=e[i];if(Ee(o)){let u=oi(o.outlets);return new p(r,u)}if(i===0&&rt(e[0])){let u=t.segments[n];r.push(new Q(u.path,Vr(e[0]))),i++;continue}let s=Ee(o)?o.outlets[f]:`${o}`,a=i<e.length-1?e[i+1]:null;s&&a&&rt(a)?(r.push(new Q(s,Vr(a))),i+=2):(r.push(new Q(s,{})),i++)}return new p(r,{})}function oi(t){let n={};return Object.entries(t).forEach(([e,r])=>{typeof r=="string"&&(r=[r]),r!==null&&(n[e]=Bt(new p([],{}),0,r))}),n}function Vr(t){let n={};return Object.entries(t).forEach(([e,r])=>n[e]=`${r}`),n}function Wr(t,n,e){return t==e.path&&L(n,e.parameters)}var Ae="imperative",m=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}(m||{}),E=class{id;url;constructor(n,e){this.id=n,this.url=e}},ne=class extends E{type=m.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}')`}},_=class extends E{urlAfterRedirects;type=m.NavigationEnd;constructor(n,e,r){super(n,e),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},w=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}(w||{}),Oe=function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t}(Oe||{}),j=class extends E{reason;code;type=m.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=m.NavigationSkipped;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}},he=class extends E{error;target;type=m.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})`}},Me=class extends E{urlAfterRedirects;state;type=m.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})`}},it=class extends E{urlAfterRedirects;state;type=m.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})`}},ot=class extends E{urlAfterRedirects;state;shouldActivate;type=m.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})`}},st=class extends E{urlAfterRedirects;state;type=m.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})`}},at=class extends E{urlAfterRedirects;state;type=m.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})`}},ut=class{route;type=m.RouteConfigLoadStart;constructor(n){this.route=n}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},ct=class{route;type=m.RouteConfigLoadEnd;constructor(n){this.route=n}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},lt=class{snapshot;type=m.ChildActivationStart;constructor(n){this.snapshot=n}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},ht=class{snapshot;type=m.ChildActivationEnd;constructor(n){this.snapshot=n}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},dt=class{snapshot;type=m.ActivationStart;constructor(n){this.snapshot=n}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},ft=class{snapshot;type=m.ActivationEnd;constructor(n){this.snapshot=n}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var De=class{},de=class{url;navigationBehaviorOptions;constructor(n,e){this.url=n,this.navigationBehaviorOptions=e}};function si(t){return!(t instanceof De)&&!(t instanceof de)}function ai(t,n){return t.providers&&!t._injector&&(t._injector=xt(t.providers,n,`Route: ${t.path}`)),t._injector??n}function x(t){return t.outlet||f}function ui(t,n){let e=t.filter(r=>x(r)===n);return e.push(...t.filter(r=>x(r)!==n)),e}function ke(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 pt=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return ke(this.route?.snapshot)??this.rootInjector}constructor(n){this.rootInjector=n,this.children=new ge(this.rootInjector)}},ge=(()=>{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 pt(this.rootInjector),this.contexts.set(e,r)),r}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(r){return new(r||t)(We(se))};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),gt=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=Ht(n,this._root);return e?e.children.map(r=>r.value):[]}firstChild(n){let e=Ht(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){let e=Vt(n,this._root);return e.length<2?[]:e[e.length-2].children.map(i=>i.value).filter(i=>i!==n)}pathFromRoot(n){return Vt(n,this._root).map(e=>e.value)}};function Ht(t,n){if(t===n.value)return n;for(let e of n.children){let r=Ht(t,e);if(r)return r}return null}function Vt(t,n){if(t===n.value)return[n];for(let e of n.children){let r=Vt(t,e);if(r.length)return r.unshift(n),r}return[]}var T=class{value;children;constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}};function ue(t){let n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}var Ne=class extends gt{snapshot;constructor(n,e){super(n),this.snapshot=e,Jt(this,n)}toString(){return this.snapshot.toString()}};function fn(t){let n=ci(t),e=new M([new Q("",{})]),r=new M({}),i=new M({}),o=new M({}),s=new M(""),a=new B(e,r,o,s,i,f,t,n.root);return a.snapshot=n.root,new Ne(new T(a,[]),n)}function ci(t){let n={},e={},r={},i="",o=new ee([],n,r,i,e,f,t,null,{});return new Ue("",new T(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(g(c=>c[Le]))??h(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(g(n=>te(n))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(g(n=>te(n))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function vt(t,n,e="emptyOnly"){let r,{routeConfig:i}=t;return n!==null&&(e==="always"||i?.path===""||!n.component&&!n.routeConfig?.loadComponent)?r={params:l(l({},n.params),t.params),data:l(l({},n.data),t.data),resolve:l(l(l(l({},t.data),n.data),i?.data),t._resolvedData)}:r={params:l({},t.params),data:l({},t.data),resolve:l(l({},t.data),t._resolvedData??{})},i&&gn(i)&&(r.resolve[Le]=i.title),r}var ee=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[Le]}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??=te(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=te(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}')`}},Ue=class extends gt{url;constructor(n,e){super(e),this.url=n,Jt(this,e)}toString(){return pn(this._root)}};function Jt(t,n){n.value._routerState=t,n.children.forEach(e=>Jt(t,e))}function pn(t){let n=t.children.length>0?` { ${t.children.map(pn).join(", ")} } `:"";return`${t.value}${n}`}function jt(t){if(t.snapshot){let n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,L(n.queryParams,e.queryParams)||t.queryParamsSubject.next(e.queryParams),n.fragment!==e.fragment&&t.fragmentSubject.next(e.fragment),L(n.params,e.params)||t.paramsSubject.next(e.params),Ln(n.url,e.url)||t.urlSubject.next(e.url),L(n.data,e.data)||t.dataSubject.next(e.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function Wt(t,n){let e=L(t.params,n.params)&&zn(t.url,n.url),r=!t.parent!=!n.parent;return e&&!r&&(!t.parent||Wt(t.parent,n.parent))}function gn(t){return typeof t.title=="string"||t.title===null}var vn=new N(""),er=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=f;activateEvents=new X;deactivateEvents=new X;attachEvents=new X;detachEvents=new X;routerOutletData=$r(void 0);parentContexts=d(ge);location=d(br);changeDetector=d(Qe);inputBinder=d($e,{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 Gt(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=Ce({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[Se]})}return t})(),Gt=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===ge?this.childContexts:n===vn?this.outletData:this.parent.get(n,e)}},$e=new N(""),tr=(()=>{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=Be([r.queryParams,r.params,r.data]).pipe(D(([o,s,a],u)=>(a=l(l(l({},o),s),a),u===0?h(a):Promise.resolve(a)))).subscribe(o=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==r||r.component===null){this.unsubscribeFromRouteData(e);return}let s=zr(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=C({token:t,factory:t.\u0275fac})}return t})(),rr=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Ar({type:t,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(r,i){r&1&&Nr(0,"router-outlet")},dependencies:[er],encapsulation:2})}return t})();function nr(t){let n=t.children&&t.children.map(nr),e=n?O(l({},t),{children:n}):l({},t);return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==f&&(e.component=rr),e}function li(t,n,e){let r=Pe(t,n._root,e?e._root:void 0);return new Ne(r,n)}function Pe(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){let r=e.value;r._futureSnapshot=n.value;let i=hi(t,n,e);return new T(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=>Pe(t,a)),s}}let r=di(n.value),i=n.children.map(o=>Pe(t,o));return new T(r,i)}}function hi(t,n,e){return n.children.map(r=>{for(let i of e.children)if(t.shouldReuseRoute(r.value,i.value.snapshot))return Pe(t,r,i);return Pe(t,r)})}function di(t){return new B(new M(t.url),new M(t.params),new M(t.queryParams),new M(t.fragment),new M(t.data),t.outlet,t.component,t)}var fe=class{redirectTo;navigationBehaviorOptions;constructor(n,e){this.redirectTo=n,this.navigationBehaviorOptions=e}},mn="ngNavigationCancelingError";function mt(t,n){let{redirectTo:e,navigationBehaviorOptions:r}=K(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,i=Rn(!1,w.Redirect);return i.url=e,i.navigationBehaviorOptions=r,i}function Rn(t,n){let e=new Error(`NavigationCancelingError: ${t||""}`);return e[mn]=!0,e.cancellationCode=n,e}function fi(t){return yn(t)&&K(t.url)}function yn(t){return!!t&&t[mn]}var pi=(t,n,e,r)=>g(i=>(new Qt(n,i.targetRouterState,i.currentRouterState,e,r).activate(t),i)),Qt=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),jt(this.futureState.root),this.activateChildRoutes(e,r,n)}deactivateChildRoutes(n,e,r){let i=ue(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=ue(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=ue(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=ue(e);n.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],r),this.forwardEvent(new ft(o.value.snapshot))}),n.children.length&&this.forwardEvent(new ht(n.value.snapshot))}activateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(jt(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),jt(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)}},Rt=class{path;route;constructor(n){this.path=n,this.route=this.path[this.path.length-1]}},le=class{component;route;constructor(n,e){this.component=n,this.route=e}};function gi(t,n,e){let r=t._root,i=n?n._root:null;return be(r,i,e,[r.value])}function vi(t){let n=t.routeConfig?t.routeConfig.canActivateChild:null;return!n||n.length===0?null:{node:t,guards:n}}function ve(t,n){let e=Symbol(),r=n.get(t,e);return r===e?typeof t=="function"&&!gr(t)?t:n.get(t):r}function be(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=ue(n);return t.children.forEach(s=>{mi(s,o[s.value.outlet],e,r.concat([s.value]),i),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>Te(a,e.getContext(s),i)),i}function mi(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=Ri(s,o,o.routeConfig.runGuardsAndResolvers);u?i.canActivateChecks.push(new Rt(r)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?be(t,n,a?a.children:null,r,i):be(t,n,e,r,i),u&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new le(a.outlet.component,s))}else s&&Te(n,a,i),i.canActivateChecks.push(new Rt(r)),o.component?be(t,null,a?a.children:null,r,i):be(t,null,e,r,i);return i}function Ri(t,n,e){if(typeof e=="function")return e(t,n);switch(e){case"pathParamsChange":return!J(t.url,n.url);case"pathParamsOrQueryParamsChange":return!J(t.url,n.url)||!L(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Wt(t,n)||!L(t.queryParams,n.queryParams);case"paramsChange":default:return!Wt(t,n)}}function Te(t,n,e){let r=ue(t),i=t.value;Object.entries(r).forEach(([o,s])=>{i.component?n?Te(s,n.children.getContext(o),e):Te(s,null,e):Te(s,n,e)}),i.component?n&&n.outlet&&n.outlet.isActivated?e.canDeactivateChecks.push(new le(n.outlet.component,i)):e.canDeactivateChecks.push(new le(null,i)):e.canDeactivateChecks.push(new le(null,i))}function ze(t){return typeof t=="function"}function yi(t){return typeof t=="boolean"}function Si(t){return t&&ze(t.canLoad)}function Ci(t){return t&&ze(t.canActivate)}function wi(t){return t&&ze(t.canActivateChild)}function bi(t){return t&&ze(t.canDeactivate)}function Ii(t){return t&&ze(t.canMatch)}function Sn(t){return t instanceof lr||t?.name==="EmptyError"}var Xe=Symbol("INITIAL_VALUE");function pe(){return D(t=>Be(t.map(n=>n.pipe(oe(1),pr(Xe)))).pipe(g(n=>{for(let e of n)if(e!==!0){if(e===Xe)return Xe;if(e===!1||Ai(e))return e}return!0}),W(n=>n!==Xe),oe(1)))}function Ai(t){return K(t)||t instanceof fe}function Ti(t,n){return A(e=>{let{targetSnapshot:r,currentSnapshot:i,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return s.length===0&&o.length===0?h(O(l({},e),{guardsResult:!0})):Ei(s,r,i,t).pipe(A(a=>a&&yi(a)?Oi(r,o,t,n):h(a)),g(a=>O(l({},e),{guardsResult:a})))})}function Ei(t,n,e,r){return I(t).pipe(A(i=>Pi(i.component,i.route,e,n,r)),G(i=>i!==!0,!0))}function Oi(t,n,e,r){return I(n).pipe(ie(i=>hr(Di(i.route.parent,r),Mi(i.route,r),Ui(t,i.path,e),Ni(t,i.route,e))),G(i=>i!==!0,!0))}function Mi(t,n){return t!==null&&n&&n(new dt(t)),h(!0)}function Di(t,n){return t!==null&&n&&n(new lt(t)),h(!0)}function Ni(t,n,e){let r=n.routeConfig?n.routeConfig.canActivate:null;if(!r||r.length===0)return h(!0);let i=r.map(o=>He(()=>{let s=ke(n)??e,a=ve(o,s),u=Ci(a)?a.canActivate(n,t):F(s,()=>a(n,t));return H(u).pipe(G())}));return h(i).pipe(pe())}function Ui(t,n,e){let r=n[n.length-1],o=n.slice(0,n.length-1).reverse().map(s=>vi(s)).filter(s=>s!==null).map(s=>He(()=>{let a=s.guards.map(u=>{let c=ke(s.node)??e,v=ve(u,c),R=wi(v)?v.canActivateChild(r,t):F(c,()=>v(r,t));return H(R).pipe(G())});return h(a).pipe(pe())}));return h(o).pipe(pe())}function Pi(t,n,e,r,i){let o=n&&n.routeConfig?n.routeConfig.canDeactivate:null;if(!o||o.length===0)return h(!0);let s=o.map(a=>{let u=ke(n)??i,c=ve(a,u),v=bi(c)?c.canDeactivate(t,n,e,r):F(u,()=>c(t,n,e,r));return H(v).pipe(G())});return h(s).pipe(pe())}function xi(t,n,e,r){let i=n.canLoad;if(i===void 0||i.length===0)return h(!0);let o=i.map(s=>{let a=ve(s,t),u=Si(a)?a.canLoad(n,e):F(t,()=>a(n,e));return H(u)});return h(o).pipe(pe(),Cn(r))}function Cn(t){return ar(y(n=>{if(typeof n!="boolean")throw mt(t,n)}),g(n=>n===!0))}function _i(t,n,e,r){let i=n.canMatch;if(!i||i.length===0)return h(!0);let o=i.map(s=>{let a=ve(s,t),u=Ii(a)?a.canMatch(n,e):F(t,()=>a(n,e));return H(u)});return h(o).pipe(pe(),Cn(r))}var xe=class{segmentGroup;constructor(n){this.segmentGroup=n||null}},_e=class extends Error{urlTree;constructor(n){super(),this.urlTree=n}};function ae(t){return ye(new xe(t))}function Li(t){return ye(new S(4e3,!1))}function ji(t){return ye(Rn(!1,w.GuardRejected))}var Kt=class{urlSerializer;urlTree;constructor(n,e){this.urlSerializer=n,this.urlTree=e}lineralizeSegments(n,e){let r=[],i=e.root;for(;;){if(r=r.concat(i.segments),i.numberOfChildren===0)return h(r);if(i.numberOfChildren>1||!i.children[f])return Li(`${n.redirectTo}`);i=i.children[f]}}applyRedirectCommands(n,e,r,i,o){return ki(e,i,o).pipe(g(s=>{if(s instanceof k)throw new _e(s);let a=this.applyRedirectCreateUrlTree(s,this.urlSerializer.parse(s),n,r);if(s[0]==="/")throw new _e(a);return a}))}applyRedirectCreateUrlTree(n,e,r,i){let o=this.createSegmentGroup(n,e.root,r,i);return new k(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 p(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 ki(t,n,e){if(typeof t=="string")return h(t);let r=t,{queryParams:i,fragment:o,routeConfig:s,url:a,outlet:u,params:c,data:v,title:R}=n;return H(F(e,()=>r({params:c,data:v,queryParams:i,fragment:o,routeConfig:s,url:a,outlet:u,title:R})))}var Yt={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function $i(t,n,e,r,i){let o=wn(t,n,e);return o.matched?(r=ai(n,r),_i(r,n,e,i).pipe(g(s=>s===!0?o:l({},Yt)))):h(o)}function wn(t,n,e){if(n.path==="**")return zi(e);if(n.path==="")return n.pathMatch==="full"&&(t.hasChildren()||e.length>0)?l({},Yt):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let i=(n.matcher||Yr)(e,t,n);if(!i)return l({},Yt);let o={};Object.entries(i.posParams??{}).forEach(([a,u])=>{o[a]=u.path});let s=i.consumed.length>0?l(l({},o),i.consumed[i.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:i.consumed,remainingSegments:e.slice(i.consumed.length),parameters:s,positionalParamSegments:i.posParams??{}}}function zi(t){return{matched:!0,parameters:t.length>0?Xr(t).parameters:{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}function Gr(t,n,e,r){return e.length>0&&Bi(t,e,r)?{segmentGroup:new p(n,qi(r,new p(e,t.children))),slicedSegments:[]}:e.length===0&&Hi(t,e,r)?{segmentGroup:new p(t.segments,Fi(t,e,r,t.children)),slicedSegments:e}:{segmentGroup:new p(t.segments,t.children),slicedSegments:e}}function Fi(t,n,e,r){let i={};for(let o of e)if(St(t,n,o)&&!r[x(o)]){let s=new p([],{});i[x(o)]=s}return l(l({},r),i)}function qi(t,n){let e={};e[f]=n;for(let r of t)if(r.path===""&&x(r)!==f){let i=new p([],{});e[x(r)]=i}return e}function Bi(t,n,e){return e.some(r=>St(t,n,r)&&x(r)!==f)}function Hi(t,n,e){return e.some(r=>St(t,n,r))}function St(t,n,e){return(t.hasChildren()||n.length>0)&&e.pathMatch==="full"?!1:e.path===""}function Vi(t,n,e){return n.length===0&&!t.children[e]}var Zt=class{};function Wi(t,n,e,r,i,o,s="emptyOnly"){return new Xt(t,n,e,r,i,s,o).recognize()}var Gi=31,Xt=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(n,e,r,i,o,s,a){this.injector=n,this.configLoader=e,this.rootComponentType=r,this.config=i,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new Kt(this.urlSerializer,this.urlTree)}noMatchError(n){return new S(4002,`'${n.segmentGroup}'`)}recognize(){let n=Gr(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(n).pipe(g(({children:e,rootSnapshot:r})=>{let i=new T(r,e),o=new Ue("",i),s=un(r,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}}))}match(n){let e=new ee([],Object.freeze({}),Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),f,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,n,f,e).pipe(g(r=>({children:r,rootSnapshot:e})),Z(r=>{if(r instanceof _e)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof xe?this.noMatchError(r):r}))}processSegmentGroup(n,e,r,i,o){return r.segments.length===0&&r.hasChildren()?this.processChildren(n,e,r,o):this.processSegment(n,e,r,r.segments,i,!0,o).pipe(g(s=>s instanceof T?[s]:[]))}processChildren(n,e,r,i){let o=[];for(let s of Object.keys(r.children))s==="primary"?o.unshift(s):o.push(s);return I(o).pipe(ie(s=>{let a=r.children[s],u=ui(e,s);return this.processSegmentGroup(n,u,a,s,i)}),fr((s,a)=>(s.push(...a),s)),Ot(null),dr(),A(s=>{if(s===null)return ae(r);let a=bn(s);return Qi(a),h(a)}))}processSegment(n,e,r,i,o,s,a){return I(e).pipe(ie(u=>this.processSegmentAgainstRoute(u._injector??n,e,u,r,i,o,s,a).pipe(Z(c=>{if(c instanceof xe)return h(null);throw c}))),G(u=>!!u),Z(u=>{if(Sn(u))return Vi(r,i,o)?h(new Zt):ae(r);throw u}))}processSegmentAgainstRoute(n,e,r,i,o,s,a,u){return x(r)!==s&&(s===f||!St(i,o,r))?ae(i):r.redirectTo===void 0?this.matchSegmentAgainstRoute(n,i,r,o,s,u):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(n,i,e,r,o,s,u):ae(i)}expandSegmentAgainstRouteUsingRedirect(n,e,r,i,o,s,a){let{matched:u,parameters:c,consumedSegments:v,positionalParamSegments:R,remainingSegments:U}=wn(e,i,o);if(!u)return ae(e);typeof i.redirectTo=="string"&&i.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>Gi&&(this.allowRedirects=!1));let V=new ee(o,c,Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Qr(i),x(i),i.component??i._loadedComponent??null,i,Kr(i)),b=vt(V,a,this.paramsInheritanceStrategy);return V.params=Object.freeze(b.params),V.data=Object.freeze(b.data),this.applyRedirects.applyRedirectCommands(v,i.redirectTo,R,V,n).pipe(D(Y=>this.applyRedirects.lineralizeSegments(i,Y)),A(Y=>this.processSegment(n,r,e,Y.concat(U),s,!1,a)))}matchSegmentAgainstRoute(n,e,r,i,o,s){let a=$i(e,r,i,n,this.urlSerializer);return r.path==="**"&&(e.children={}),a.pipe(D(u=>u.matched?(n=r._injector??n,this.getChildConfig(n,r,i).pipe(D(({routes:c})=>{let v=r._loadedInjector??n,{parameters:R,consumedSegments:U,remainingSegments:V}=u,b=new ee(U,R,Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Qr(r),x(r),r.component??r._loadedComponent??null,r,Kr(r)),bt=vt(b,s,this.paramsInheritanceStrategy);b.params=Object.freeze(bt.params),b.data=Object.freeze(bt.data);let{segmentGroup:Y,slicedSegments:It}=Gr(e,U,V,c);if(It.length===0&&Y.hasChildren())return this.processChildren(v,c,Y,b).pipe(g(qe=>new T(b,qe)));if(c.length===0&&It.length===0)return h(new T(b,[]));let xn=x(r)===o;return this.processSegment(v,c,Y,It,xn?f:o,!0,b).pipe(g(qe=>new T(b,qe instanceof T?[qe]:[])))}))):ae(e)))}getChildConfig(n,e,r){return e.children?h({routes:e.children,injector:n}):e.loadChildren?e._loadedRoutes!==void 0?h({routes:e._loadedRoutes,injector:e._loadedInjector}):xi(n,e,r,this.urlSerializer).pipe(A(i=>i?this.configLoader.loadChildren(n,e).pipe(y(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):ji(e))):h({routes:[],injector:n})}};function Qi(t){t.sort((n,e)=>n.value.outlet===f?-1:e.value.outlet===f?1:n.value.outlet.localeCompare(e.value.outlet))}function Ki(t){let n=t.value.routeConfig;return n&&n.path===""}function bn(t){let n=[],e=new Set;for(let r of t){if(!Ki(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=bn(r.children);n.push(new T(r.value,i))}return n.filter(r=>!e.has(r))}function Qr(t){return t.data||{}}function Kr(t){return t.resolve||{}}function Yi(t,n,e,r,i,o){return A(s=>Wi(t,n,e,r,s.extractedUrl,i,o).pipe(g(({state:a,tree:u})=>O(l({},s),{targetSnapshot:a,urlAfterRedirects:u}))))}function Zi(t,n){return A(e=>{let{targetSnapshot:r,guards:{canActivateChecks:i}}=e;if(!i.length)return h(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 In(u))s.add(c);let a=0;return I(s).pipe(ie(u=>o.has(u)?Xi(u,r,t,n):(u.data=vt(u,u.parent,t).resolve,h(void 0))),y(()=>a++),Mt(1),A(u=>a===s.size?h(e):z))})}function In(t){let n=t.children.map(e=>In(e)).flat();return[t,...n]}function Xi(t,n,e,r){let i=t.routeConfig,o=t._resolve;return i?.title!==void 0&&!gn(i)&&(o[Le]=i.title),He(()=>(t.data=vt(t,t.parent,e).resolve,Ji(o,t,n,r).pipe(g(s=>(t._resolvedData=s,t.data=l(l({},t.data),s),null)))))}function Ji(t,n,e,r){let i=zt(t);if(i.length===0)return h({});let o={};return I(i).pipe(A(s=>eo(t[s],n,e,r).pipe(G(),y(a=>{if(a instanceof fe)throw mt(new re,a);o[s]=a}))),Mt(1),g(()=>o),Z(s=>Sn(s)?z:ye(s)))}function eo(t,n,e,r){let i=ke(n)??r,o=ve(t,i),s=o.resolve?o.resolve(n,e):F(i,()=>o(n,e));return H(s)}function kt(t){return D(n=>{let e=t(n);return e?I(e).pipe(g(()=>n)):h(n)})}var ir=(()=>{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[Le]}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:()=>d(An),providedIn:"root"})}return t})(),An=(()=>{class t extends ir{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)(We(qr))};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),me=new N("",{providedIn:"root",factory:()=>({})}),Fe=new N(""),Tn=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=d(Lr);loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return h(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);let r=H(e.loadComponent()).pipe(g(On),y(o=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=o}),Ve(()=>{this.componentLoaders.delete(e)})),i=new Tt(r,()=>new $).pipe(At());return this.componentLoaders.set(e,i),i}loadChildren(e,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return h({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let o=En(r,this.compiler,e,this.onLoadEndListener).pipe(Ve(()=>{this.childrenLoaders.delete(r)})),s=new Tt(o,()=>new $).pipe(At());return this.childrenLoaders.set(r,s),s}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function En(t,n,e,r){return H(t.loadChildren()).pipe(g(On),A(i=>i instanceof Ir||Array.isArray(i)?h(i):I(n.compileModuleAsync(i))),g(i=>{r&&r(t);let o,s,a=!1;return Array.isArray(i)?(s=i,a=!0):(o=i.create(e).injector,s=o.get(Fe,[],{optional:!0,self:!0}).flat()),{routes:s.map(nr),injector:o}}))}function to(t){return t&&typeof t=="object"&&"default"in t}function On(t){return to(t)?t.default:t}var Ct=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:()=>d(ro),providedIn:"root"})}return t})(),ro=(()=>{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=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Mn=new N("");var Dn=new N(""),Nn=(()=>{class t{currentNavigation=null;currentTransition=null;lastSuccessfulNavigation=null;events=new $;transitionAbortWithErrorSubject=new $;configLoader=d(Tn);environmentInjector=d(se);destroyRef=d(Rr);urlSerializer=d(je);rootContexts=d(ge);location=d(Ye);inputBindingEnabled=d($e,{optional:!0})!==null;titleStrategy=d(ir);options=d(me,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=d(Ct);createViewTransition=d(Mn,{optional:!0});navigationErrorHandler=d(Dn,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>h(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=i=>this.events.next(new ut(i)),r=i=>this.events.next(new ct(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;this.transitions?.next(O(l({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,abortController:new AbortController,id:r}))}setupNavigations(e){return this.transitions=new M(null),this.transitions.pipe(W(r=>r!==null),D(r=>{let i=!1;return h(r).pipe(D(o=>{if(this.navigationId>r.id)return this.cancelNavigationTransition(r,"",w.SupersededByNewNavigation),z;this.currentTransition=r,this.currentNavigation={id:o.id,initialUrl:o.rawUrl,extractedUrl:o.extractedUrl,targetBrowserUrl:typeof o.extras.browserUrl=="string"?this.urlSerializer.parse(o.extras.browserUrl):o.extras.browserUrl,trigger:o.source,extras:o.extras,previousNavigation:this.lastSuccessfulNavigation?O(l({},this.lastSuccessfulNavigation),{previousNavigation:null}):null,abort:()=>o.abortController.abort()};let s=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),a=o.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!s&&a!=="reload"){let u="";return this.events.next(new q(o.id,this.urlSerializer.serialize(o.rawUrl),u,Oe.IgnoredSameUrlNavigation)),o.resolve(!1),z}if(this.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return h(o).pipe(D(u=>(this.events.next(new ne(u.id,this.urlSerializer.serialize(u.extractedUrl),u.source,u.restoredState)),u.id!==this.navigationId?z:Promise.resolve(u))),Yi(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy),y(u=>{r.targetSnapshot=u.targetSnapshot,r.urlAfterRedirects=u.urlAfterRedirects,this.currentNavigation=O(l({},this.currentNavigation),{finalUrl:u.urlAfterRedirects});let c=new Me(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(c)}));if(s&&this.urlHandlingStrategy.shouldProcessUrl(o.currentRawUrl)){let{id:u,extractedUrl:c,source:v,restoredState:R,extras:U}=o,V=new ne(u,this.urlSerializer.serialize(c),v,R);this.events.next(V);let b=fn(this.rootComponentType).snapshot;return this.currentTransition=r=O(l({},o),{targetSnapshot:b,urlAfterRedirects:c,extras:O(l({},U),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=c,h(r)}else{let u="";return this.events.next(new q(o.id,this.urlSerializer.serialize(o.extractedUrl),u,Oe.IgnoredByUrlHandlingStrategy)),o.resolve(!1),z}}),y(o=>{let s=new it(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(s)}),g(o=>(this.currentTransition=r=O(l({},o),{guards:gi(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),r)),Ti(this.environmentInjector,o=>this.events.next(o)),y(o=>{if(r.guardsResult=o.guardsResult,o.guardsResult&&typeof o.guardsResult!="boolean")throw mt(this.urlSerializer,o.guardsResult);let s=new ot(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(s)}),W(o=>o.guardsResult?!0:(this.cancelNavigationTransition(o,"",w.GuardRejected),!1)),kt(o=>{if(o.guards.canActivateChecks.length!==0)return h(o).pipe(y(s=>{let a=new st(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),D(s=>{let a=!1;return h(s).pipe(Zi(this.paramsInheritanceStrategy,this.environmentInjector),y({next:()=>a=!0,complete:()=>{a||this.cancelNavigationTransition(s,"",w.NoDataFromResolver)}}))}),y(s=>{let a=new at(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}))}),kt(o=>{let s=a=>{let u=[];a.routeConfig?.loadComponent&&!a.routeConfig._loadedComponent&&u.push(this.configLoader.loadComponent(a.routeConfig).pipe(y(c=>{a.component=c}),g(()=>{})));for(let c of a.children)u.push(...s(c));return u};return Be(s(o.targetSnapshot.root)).pipe(Ot(null),oe(1))}),kt(()=>this.afterPreactivation()),D(()=>{let{currentSnapshot:o,targetSnapshot:s}=r,a=this.createViewTransition?.(this.environmentInjector,o.root,s.root);return a?I(a).pipe(g(()=>r)):h(r)}),g(o=>{let s=li(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return this.currentTransition=r=O(l({},o),{targetRouterState:s}),this.currentNavigation.targetRouterState=s,r}),y(()=>{this.events.next(new De)}),pi(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o),this.inputBindingEnabled),oe(1),Dt(new ur(o=>{let s=r.abortController.signal,a=()=>o.next();return s.addEventListener("abort",a),()=>s.removeEventListener("abort",a)}).pipe(W(()=>!i&&!r.targetRouterState),y(()=>{this.cancelNavigationTransition(r,r.abortController.signal.reason+"",w.Aborted)}))),y({next:o=>{i=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new _(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects))),this.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{i=!0}}),Dt(this.transitionAbortWithErrorSubject.pipe(y(o=>{throw o}))),Ve(()=>{i||this.cancelNavigationTransition(r,"",w.SupersededByNewNavigation),this.currentTransition?.id===r.id&&(this.currentNavigation=null,this.currentTransition=null)}),Z(o=>{if(this.destroyed)return r.resolve(!1),z;if(i=!0,yn(o))this.events.next(new j(r.id,this.urlSerializer.serialize(r.extractedUrl),o.message,o.cancellationCode)),fi(o)?this.events.next(new de(o.url,o.navigationBehaviorOptions)):r.resolve(!1);else{let s=new he(r.id,this.urlSerializer.serialize(r.extractedUrl),o,r.targetSnapshot??void 0);try{let a=F(this.environmentInjector,()=>this.navigationErrorHandler?.(s));if(a instanceof fe){let{message:u,cancellationCode:c}=mt(this.urlSerializer,a);this.events.next(new j(r.id,this.urlSerializer.serialize(r.extractedUrl),u,c)),this.events.next(new de(a.redirectTo,a.navigationBehaviorOptions))}else throw this.events.next(s),o}catch(a){this.options.resolveNavigationPromiseOnError?r.resolve(!1):r.reject(a)}}return z}))}))}cancelNavigationTransition(e,r,i){let o=new j(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=this.currentNavigation?.targetBrowserUrl??this.currentNavigation?.extractedUrl;return e.toString()!==r?.toString()&&!this.currentNavigation?.extras.skipLocationChange}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function no(t){return t!==Ae}var Un=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:()=>d(io),providedIn:"root"})}return t})(),yt=class{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}},io=(()=>{class t extends yt{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Nt(t)))(i||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Pn=(()=>{class t{urlSerializer=d(je);options=d(me,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=d(Ye);urlHandlingStrategy=d(Ct);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new k;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 k?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=fn(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=C({token:t,factory:()=>d(oo),providedIn:"root"})}return t})(),oo=(()=>{class t extends Pn{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 ne?this.updateStateMemento():e instanceof q?this.commitTransition(r):e instanceof Me?this.urlUpdateStrategy==="eager"&&(r.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof De?(this.commitTransition(r),this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof j&&e.code!==w.SupersededByNewNavigation&&e.code!==w.Redirect?this.restoreHistory(r):e instanceof he?this.restoreHistory(r,!0):e instanceof _&&(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=l(l({},s),this.generateNgRouterState(i,a));this.location.replaceState(e,"",u)}else{let a=l(l({},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=Nt(t)))(i||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function or(t,n){t.events.pipe(W(e=>e instanceof _||e instanceof j||e instanceof he||e instanceof q),g(e=>e instanceof _||e instanceof q?0:(e instanceof j?e.code===w.Redirect||e.code===w.SupersededByNewNavigation:!1)?2:1),W(e=>e!==2),oe(1)).subscribe(()=>{n()})}var so={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},ao={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},Re=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=d(Tr);stateManager=d(Pn);options=d(me,{optional:!0})||{};pendingTasks=d(Sr);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=d(Nn);urlSerializer=d(je);location=d(Ye);urlHandlingStrategy=d(Ct);injector=d(se);_events=new $;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=d(Un);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=d(Fe,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!d($e,{optional:!0});constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:e=>{this.console.warn(e)}}),this.subscribeToNavigationEvents()}eventsSubscription=new sr;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(r=>{try{let i=this.navigationTransitions.currentTransition,o=this.navigationTransitions.currentNavigation;if(i!==null&&o!==null){if(this.stateManager.handleRouterEvent(r,o),r instanceof j&&r.code!==w.Redirect&&r.code!==w.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof _)this.navigated=!0;else if(r instanceof de){let s=r.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(r.url,i.currentRawUrl),u=l({browserUrl:i.extras.browserUrl,info:i.extras.info,skipLocationChange:i.extras.skipLocationChange,replaceUrl:i.extras.replaceUrl||this.urlUpdateStrategy==="eager"||no(i.source)},s);this.scheduleNavigation(a,Ae,null,u,{resolve:i.resolve,reject:i.reject,promise:i.promise})}}si(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),Ae,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=l({},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.injector.get(Ge)(u)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(nr),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,v=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":v=l(l({},this.currentUrlTree.queryParams),o);break;case"preserve":v=this.currentUrlTree.queryParams;break;default:v=o||null}v!==null&&(v=this.removeEmptyProps(v));let R;try{let U=i?i.snapshot:this.routerState.snapshot.root;R=cn(U)}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),R=this.currentUrlTree.root}return ln(R,e,v,c??null)}navigateByUrl(e,r={skipLocationChange:!1}){let i=K(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(o,Ae,null,r)}navigate(e,r={skipLocationChange:!1}){return uo(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.urlSerializer.parse("/")}}isActive(e,r){let i;if(r===!0?i=l({},so):r===!1?i=l({},ao):i=r,K(e))return Br(this.currentUrlTree,e,i);let o=this.parseUrl(e);return Br(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((R,U)=>{a=R,u=U});let v=this.pendingTasks.add();return or(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(v))}),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(R=>Promise.reject(R))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function uo(t){for(let n=0;n<t.length;n++)if(t[n]==null)throw new S(4008,!1)}var wt=(()=>{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;reactiveHref=yr(null);get href(){return jr(this.reactiveHref)}set href(e){this.reactiveHref.set(e)}target;queryParams;fragment;queryParamsHandling;state;info;relativeTo;isAnchorElement;subscription;onChanges=new $;applicationErrorHandler=d(Ge);options=d(me,{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(d(new kr("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 _&&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)(P(Re),P(B),Cr("tabindex"),P(Pt),P(Ut),P(Fr))};static \u0275dir=Ce({type:t,selectors:[["","routerLink",""]],hostVars:2,hostBindings:function(r,i){r&1&&Ur("click",function(s){return i.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),r&2&&Dr("href",i.reactiveHref(),wr)("target",i.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",Ke],skipLocationChange:[2,"skipLocationChange","skipLocationChange",Ke],replaceUrl:[2,"replaceUrl","replaceUrl",Ke],routerLink:"routerLink"},features:[Se]})}return t})(),lo=(()=>{class t{router;element;renderer;cdr;link;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new X;constructor(e,r,i,o,s){this.router=e,this.element=r,this.renderer=i,this.cdr=o,this.link=s,this.routerEventsSubscription=e.events.subscribe(a=>{a instanceof _&&this.update()})}ngAfterContentInit(){h(this.links.changes,h(null)).pipe(Et()).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(Et()).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=ho(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)(P(Re),P(Ut),P(Pt),P(Qe),P(wt,8))};static \u0275dir=Ce({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(r,i,o){if(r&1&&Pr(o,wt,5),r&2){let s;xr(s=_r())&&(i.links=s)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[Se]})}return t})();function ho(t){return!!t.paths}var fo=new N("");function po(t,...n){return vr([{provide:Fe,multi:!0,useValue:t},[],{provide:B,useFactory:go,deps:[Re]},{provide:Or,multi:!0,useFactory:mo},n.map(e=>e.\u0275providers)])}function go(t){return t.routerState.root}function vo(t,n){return{\u0275kind:t,\u0275providers:n}}function mo(){let t=d(mr);return n=>{let e=t.get(Mr);if(n!==e.components[0])return;let r=t.get(Re),i=t.get(Ro);t.get(yo)===1&&r.initialNavigation(),t.get(So,null,{optional:!0})?.setUpPreloading(),t.get(fo,null,{optional:!0})?.init(),r.resetRootComponentType(e.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}var Ro=new N("",{factory:()=>new $}),yo=new N("",{providedIn:"root",factory:()=>1});var So=new N("");function Co(){return vo(8,[tr,{provide:$e,useExisting:tr}])}export{_ as a,B as b,er as c,Re as d,wt as e,lo as f,po as g,Co as h};
@@ -1 +1 @@
1
- import{a}from"./chunk-FQ55IACT.js";import{Rc as r,T as s,Z as i,va as e}from"./chunk-4KE2I7OA.js";var o=class t{#t=i(a);#a=this.#t.getItemParsed("darkTheme",!0);#e=e(!1);#s=e(window?.innerWidth<=768);#i=e(!1);isDarkMode=this.#e.asReadonly();isMobile=this.#s.asReadonly();isNavOpen=this.#i.asReadonly();constructor(){window.matchMedia("(prefers-color-scheme:dark)").matches&&this.#a&&this.setDarkMode(),r(()=>{this.#e()?document.body.classList.add("dark"):document.body.classList.remove("dark")})}ngOnInit(){window.addEventListener("resize",this.#r)}toggleNav(){this.#i.set(!this.isNavOpen())}toggleBodyClass(){this.#t.setItemParsed("darkTheme",!this.isDarkMode(),!0),this.#e.set(!this.isDarkMode())}setDarkMode(){this.#t.setItemParsed("darkTheme",!0,!0),this.#e.set(!0)}setLightMode(){this.#t.setItemParsed("darkTheme",!1,!0),this.#e.set(!1)}#r(){this.#s.set(window.innerWidth<=768)}ngOnDestroy(){window.removeEventListener("resize",this.#r)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})};export{o as a};
1
+ import{a}from"./chunk-UVLJAD66.js";import{Hc as r,S as s,X as i,la as e}from"./chunk-K6EZTPNQ.js";var o=class t{#t=i(a);#a=this.#t.getItemParsed("darkTheme",!0);#e=e(!1);#s=e(window?.innerWidth<=768);#i=e(!1);isDarkMode=this.#e.asReadonly();isMobile=this.#s.asReadonly();isNavOpen=this.#i.asReadonly();constructor(){window.matchMedia("(prefers-color-scheme:dark)").matches&&this.#a&&this.setDarkMode(),r(()=>{this.#e()?document.body.classList.add("dark"):document.body.classList.remove("dark")})}ngOnInit(){window.addEventListener("resize",this.#r)}toggleNav(){this.#i.set(!this.isNavOpen())}toggleBodyClass(){this.#t.setItemParsed("darkTheme",!this.isDarkMode(),!0),this.#e.set(!this.isDarkMode())}setDarkMode(){this.#t.setItemParsed("darkTheme",!0,!0),this.#e.set(!0)}setLightMode(){this.#t.setItemParsed("darkTheme",!1,!0),this.#e.set(!1)}#r(){this.#s.set(window.innerWidth<=768)}ngOnDestroy(){window.removeEventListener("resize",this.#r)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})};export{o as a};