@duplicati/ngclient 0.0.178 → 0.0.181

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 (151) hide show
  1. package/assets/dest-icons/dincloud.png +0 -0
  2. package/assets/dest-icons/dreamhost.png +0 -0
  3. package/assets/dest-icons/dunkel.png +0 -0
  4. package/assets/dest-icons/duplicati.png +0 -0
  5. package/assets/dest-icons/hosteurope.png +0 -0
  6. package/assets/dest-icons/ibmcos.png +0 -0
  7. package/assets/dest-icons/impossiblecloud.png +0 -0
  8. package/assets/dest-icons/infomaniak.png +0 -0
  9. package/assets/dest-icons/internxt.png +0 -0
  10. package/assets/dest-icons/polisystems.png +0 -0
  11. package/assets/dest-icons/rabata.png +0 -0
  12. package/assets/dest-icons/sakuracloud.png +0 -0
  13. package/assets/dest-icons/scaleway.png +0 -0
  14. package/assets/dest-icons/seagatelyve.png +0 -0
  15. package/assets/dest-icons/storadera.png +0 -0
  16. package/assets/dest-icons/wasabi.png +0 -0
  17. package/assets/sh.woff2 +0 -0
  18. package/chunk-2JD6CIZ4.js +1 -0
  19. package/chunk-2PAQOFN3.js +1 -0
  20. package/chunk-2QP2Y5QS.js +1 -0
  21. package/chunk-2XXH473G.js +1 -0
  22. package/chunk-3BGJPVDV.js +1 -0
  23. package/chunk-3U36LG4E.js +1 -0
  24. package/{chunk-66GTW6AR.js → chunk-44TUAFTV.js} +1 -1
  25. package/chunk-4BAHV6VO.js +1 -0
  26. package/{chunk-5HQJVUNE.js → chunk-4N3AWKEK.js} +1 -1
  27. package/chunk-4NN5ZM73.js +1 -0
  28. package/chunk-4QGMMHYT.js +1 -0
  29. package/chunk-4VEFX5WQ.js +2 -0
  30. package/{chunk-WILUKPQ3.js → chunk-5DJAX2HH.js} +1 -1
  31. package/{chunk-6KSFCVWH.js → chunk-5JYCHNFV.js} +1 -1
  32. package/chunk-5QAV2WXY.js +1 -0
  33. package/chunk-5QZIKR6A.js +1 -0
  34. package/chunk-5YSRDRTE.js +7 -0
  35. package/{chunk-UT542KNO.js → chunk-6AJQBDVV.js} +1 -1
  36. package/chunk-6ALGXRIS.js +1 -0
  37. package/chunk-6GC4UPHS.js +1 -0
  38. package/{chunk-6KLZAB4D.js → chunk-7XS6T6TX.js} +1 -1
  39. package/{chunk-GO4NSDR6.js → chunk-A4LPGPDU.js} +1 -1
  40. package/chunk-AABUGLWU.js +1 -0
  41. package/{chunk-T5LLH46J.js → chunk-AS6Z56AD.js} +1 -1
  42. package/{chunk-GH6EHG4Z.js → chunk-B2Y54P3R.js} +1 -1
  43. package/{chunk-BKANUILG.js → chunk-BGTK25UG.js} +1 -1
  44. package/{chunk-OWEK4OHZ.js → chunk-CR3C6XYB.js} +1 -1
  45. package/{chunk-5MXXIFJM.js → chunk-DI73L7JI.js} +1 -1
  46. package/{chunk-FBWFZMGL.js → chunk-DW332N2S.js} +1 -1
  47. package/{chunk-WHLIHNEE.js → chunk-EBQRGLJL.js} +1 -1
  48. package/{chunk-Y4IW22ZU.js → chunk-ETAHWUMY.js} +1 -1
  49. package/{chunk-U63HBLGG.js → chunk-FK7JFD5B.js} +1 -1
  50. package/{chunk-AJXTVI3H.js → chunk-FOQJA6X2.js} +1 -1
  51. package/chunk-FQYMMYS4.js +1 -0
  52. package/{chunk-6Y3RYZEE.js → chunk-FQZFKTPW.js} +1 -1
  53. package/chunk-H4TNKM4Y.js +1 -0
  54. package/chunk-HPNLQHW6.js +1 -0
  55. package/{chunk-EIZKIIDW.js → chunk-HSUSP2MR.js} +1 -1
  56. package/chunk-IW4RDAIN.js +2 -0
  57. package/{chunk-AJMSZFGR.js → chunk-JGQOVZKK.js} +1 -1
  58. package/{chunk-WLXOWWZB.js → chunk-JJJ5UALU.js} +1 -1
  59. package/{chunk-YQSTMC2K.js → chunk-JW4235US.js} +1 -1
  60. package/{chunk-SD4AWG7T.js → chunk-JWO4FPWJ.js} +1 -1
  61. package/{chunk-D7TCA6E7.js → chunk-KRXQDBGB.js} +1 -1
  62. package/chunk-KSMDO4WE.js +1 -0
  63. package/{chunk-JTQDY6AH.js → chunk-LDLSFKM4.js} +1 -1
  64. package/chunk-LFISHZZP.js +1 -0
  65. package/{chunk-M7SLT3MF.js → chunk-LMCAVLBO.js} +1 -1
  66. package/{chunk-PW55LN2T.js → chunk-LX37357J.js} +1 -1
  67. package/{chunk-AGPZBYW6.js → chunk-ME77WZZI.js} +1 -1
  68. package/{chunk-TJYZBTTS.js → chunk-MHRECQ5Y.js} +1 -1
  69. package/chunk-MRAKGZE6.js +1 -0
  70. package/{chunk-NEQW3H7F.js → chunk-MXH4QJKB.js} +1 -1
  71. package/{chunk-PJLZ7V22.js → chunk-NDPFWL4Y.js} +1 -1
  72. package/{chunk-PTSGXV6M.js → chunk-NJ2XZSM6.js} +1 -1
  73. package/{chunk-GMNCWLGX.js → chunk-O4OTZE5N.js} +1 -1
  74. package/chunk-OTPG7USH.js +1 -0
  75. package/{chunk-6CYY2QG6.js → chunk-PAMKTLG5.js} +1 -1
  76. package/chunk-PCFTQ4BE.js +1 -0
  77. package/{chunk-56FBKSBN.js → chunk-PKPBSTZA.js} +1 -1
  78. package/{chunk-G4FG3YUE.js → chunk-PUV7YKEQ.js} +1 -1
  79. package/chunk-QG566HCB.js +1 -0
  80. package/chunk-QHQQ5BDV.js +1 -0
  81. package/{chunk-FIBRO5I3.js → chunk-QPTSKQZ2.js} +2 -2
  82. package/{chunk-CGKL2MHM.js → chunk-QZRRXR3V.js} +1 -1
  83. package/{chunk-MIUFEQ3S.js → chunk-RXVG6AZW.js} +1 -1
  84. package/chunk-SBWCJMHH.js +1 -0
  85. package/chunk-SFR3XMV4.js +1 -0
  86. package/chunk-T2WO6CVD.js +4 -0
  87. package/{chunk-CHUTAXTB.js → chunk-T7WSF7RL.js} +1 -1
  88. package/chunk-TEGY2W63.js +1 -0
  89. package/{chunk-NEV6JB5M.js → chunk-TELPJYLN.js} +1 -1
  90. package/chunk-TT3S63BX.js +1 -0
  91. package/{chunk-JTZ2JEV4.js → chunk-TT4FAVLM.js} +1 -1
  92. package/{chunk-OC3JR7EH.js → chunk-VEWX3KXN.js} +1 -1
  93. package/{chunk-LF24JF3M.js → chunk-VHOAXFIJ.js} +1 -1
  94. package/chunk-VW35MTSI.js +1 -0
  95. package/{chunk-FXF5TO2Q.js → chunk-VYJNNEM5.js} +1 -1
  96. package/chunk-WIVARGP6.js +1 -0
  97. package/chunk-XADL5RYU.js +1 -0
  98. package/chunk-XKHIN6T2.js +2 -0
  99. package/{chunk-WA7KEG63.js → chunk-XZ35H3QB.js} +1 -1
  100. package/chunk-XZ37OAYY.js +1 -0
  101. package/chunk-YDDSLDHZ.js +1 -0
  102. package/chunk-YEYDDZIG.js +1 -0
  103. package/chunk-YV32N6PE.js +1 -0
  104. package/chunk-ZHTPSBYJ.js +1 -0
  105. package/{chunk-IH4WNUW5.js → chunk-ZXVCNNR6.js} +1 -1
  106. package/index.html +43 -1
  107. package/main-RYFYCW3E.js +1 -0
  108. package/package.json +1 -1
  109. package/assets/favicon.ico +0 -0
  110. package/chunk-27UON6YV.js +0 -2
  111. package/chunk-3CJTIOP4.js +0 -1
  112. package/chunk-4IUPBI2K.js +0 -1
  113. package/chunk-5UXRNNTT.js +0 -1
  114. package/chunk-6O5DBV6Y.js +0 -1
  115. package/chunk-76LEHUPM.js +0 -1
  116. package/chunk-7IQ5FSGI.js +0 -1
  117. package/chunk-AO4ZIHUL.js +0 -1
  118. package/chunk-AYN5EDSZ.js +0 -1
  119. package/chunk-B5LH4P4E.js +0 -1
  120. package/chunk-BGYXB4MY.js +0 -1
  121. package/chunk-BUO6CCKF.js +0 -1
  122. package/chunk-EBKB4YCL.js +0 -1
  123. package/chunk-F3RWB4I6.js +0 -1
  124. package/chunk-FCCYQZ63.js +0 -1
  125. package/chunk-H6UYYWCU.js +0 -1
  126. package/chunk-J5LEAYPL.js +0 -1
  127. package/chunk-KR56GPXG.js +0 -2
  128. package/chunk-LUQFHR44.js +0 -1
  129. package/chunk-N4ADMNNU.js +0 -1
  130. package/chunk-PCLJOXMF.js +0 -1
  131. package/chunk-PF2QQ2YW.js +0 -1
  132. package/chunk-PNECF7JS.js +0 -1
  133. package/chunk-PUOOECEB.js +0 -1
  134. package/chunk-QF5K4MHH.js +0 -1
  135. package/chunk-QWNOPLJC.js +0 -1
  136. package/chunk-QZJ7QZZ4.js +0 -1
  137. package/chunk-R6XDJFPE.js +0 -1
  138. package/chunk-RMOTUTEQ.js +0 -1
  139. package/chunk-RYXU2QDS.js +0 -1
  140. package/chunk-SS7TCWY5.js +0 -1
  141. package/chunk-TXPM764C.js +0 -1
  142. package/chunk-U4T4BSPF.js +0 -1
  143. package/chunk-VSLN6R7K.js +0 -1
  144. package/chunk-WNOXOC4X.js +0 -1
  145. package/chunk-WS7QWRRY.js +0 -1
  146. package/chunk-WWIKIIGV.js +0 -7
  147. package/chunk-WWIXPGSZ.js +0 -1
  148. package/chunk-XRXXVFJ4.js +0 -1
  149. package/chunk-XYHHESIX.js +0 -4
  150. package/chunk-XZZDJCRM.js +0 -1
  151. package/main-OOXK65IC.js +0 -1
@@ -1 +1 @@
1
- import{Mc as w,Nc as x,O as d,Oc as h,W as v,da as y,fa as l,i as m,la as b,na as D,oa as f}from"./chunk-XYHHESIX.js";import{a as p,b as g}from"./chunk-7CGTOI24.js";function E(o,e){let s=e?.injector??v(y),n=new m(1),i=D(()=>{let t;try{t=o()}catch(u){f(()=>n.error(u));return}f(()=>n.next(t))},{injector:s,manualCleanup:!0});return s.get(l).onDestroy(()=>{i.destroy(),n.complete()}),n.asObservable()}function U(o,e){let n=!e?.manualCleanup?e?.injector?.get(l)??v(l):null,i=k(e?.equal),t;e?.requireSync?t=b({kind:0},{equal:i}):t=b({kind:1,value:e?.initialValue},{equal:i});let u,a=o.subscribe({next:r=>t.set({kind:1,value:r}),error:r=>{t.set({kind:2,error:r}),u?.()},complete:()=>{u?.()}});if(e?.requireSync&&t().kind===0)throw new d(601,!1);return u=n?.onDestroy(a.unsubscribe.bind(a)),w(()=>{let r=t();switch(r.kind){case 1:return r.value;case 2:throw r.error;case 0:throw new d(601,!1)}},{equal:e?.equal})}function k(o=Object.is){return(e,s)=>e.kind===1&&s.kind===1&&o(e.value,s.value)}function T(o){return x(g(p({},o),{loader:void 0,stream:e=>{let s,n=()=>s?.unsubscribe();e.abortSignal.addEventListener("abort",n);let i=b({value:void 0}),t,u=new Promise(c=>t=c);function a(c){i.set(c),t?.(i),t=void 0}let r=o.stream??o.loader;if(r===void 0)throw new d(990,!1);return s=r(e).subscribe({next:c=>a({value:c}),error:c=>{a({error:h(c)}),e.abortSignal.removeEventListener("abort",n)},complete:()=>{t&&a({error:new d(991,!1)}),e.abortSignal.removeEventListener("abort",n)}}),u}}))}export{E as a,U as b,T as c};
1
+ import{Mc as w,Nc as x,O as d,Oc as h,W as v,da as y,fa as l,i as m,la as b,na as D,oa as f}from"./chunk-T2WO6CVD.js";import{a as g,b as p}from"./chunk-7CGTOI24.js";function N(o,e){let s=e?.injector??v(y),n=new m(1),i=D(()=>{let t;try{t=o()}catch(u){f(()=>n.error(u));return}f(()=>n.next(t))},{injector:s,manualCleanup:!0});return s.get(l).onDestroy(()=>{i.destroy(),n.complete()}),n.asObservable()}function E(o,e){let n=!e?.manualCleanup?e?.injector?.get(l)??v(l):null,i=j(e?.equal),t;e?.requireSync?t=b({kind:0},{equal:i}):t=b({kind:1,value:e?.initialValue},{equal:i});let u,a=o.subscribe({next:r=>t.set({kind:1,value:r}),error:r=>{t.set({kind:2,error:r}),u?.()},complete:()=>{u?.()}});if(e?.requireSync&&t().kind===0)throw new d(601,!1);return u=n?.onDestroy(a.unsubscribe.bind(a)),w(()=>{let r=t();switch(r.kind){case 1:return r.value;case 2:throw r.error;case 0:throw new d(601,!1)}},{equal:e?.equal})}function j(o=Object.is){return(e,s)=>e.kind===1&&s.kind===1&&o(e.value,s.value)}function U(o){return x(p(g({},o),{loader:void 0,stream:e=>{let s,n=()=>s?.unsubscribe();e.abortSignal.addEventListener("abort",n);let i=b({value:void 0}),t,u=new Promise(c=>t=c);function a(c){i.set(c),t?.(i),t=void 0}let r=o.stream??o.loader;if(r===void 0)throw new d(990,!1);return s=r(e).subscribe({next:c=>a({value:c}),error:c=>{a({error:h(c)}),e.abortSignal.removeEventListener("abort",n)},complete:()=>{t&&a({error:new d(991,!1)}),e.abortSignal.removeEventListener("abort",n)}}),u}}))}export{N as a,E as b,U as c};
@@ -1 +1 @@
1
- import{a as _e}from"./chunk-XRXXVFJ4.js";import"./chunk-6CYY2QG6.js";import"./chunk-AJXTVI3H.js";import"./chunk-LF24JF3M.js";import{a as se}from"./chunk-AO4ZIHUL.js";import"./chunk-SS7TCWY5.js";import"./chunk-6Q6SSTBK.js";import"./chunk-U63HBLGG.js";import"./chunk-4IUPBI2K.js";import"./chunk-AGPZBYW6.js";import{a as b}from"./chunk-WILUKPQ3.js";import"./chunk-NEV6JB5M.js";import"./chunk-CGKL2MHM.js";import"./chunk-QWNOPLJC.js";import"./chunk-5UXRNNTT.js";import{a as le,b as m}from"./chunk-FBWFZMGL.js";import{B as ae,H as ie,Y as ne,c as Q,e as Y,i as Z,s as x,u as ee,z as te}from"./chunk-RYXU2QDS.js";import{b as oe}from"./chunk-BKANUILG.js";import{b as q,e as j}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{Ab as i,B as G,Bb as c,C as g,D as L,E as p,Mc as E,Pa as _,Pb as u,Qb as h,Rb as A,Sb as H,Tb as J,Vb as T,W as F,cb as V,gc as C,ic as K,jc as D,la as s,na as P,oc as X,p as y,pc as z,qc as W,sb as w,tb as U,yb as d,zb as n}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";function re(r,t){r&1&&(n(0,"sh-icon",19),D(1,"spinner"),i())}function ce(r,t){r&1&&(n(0,"sh-icon",20),D(1,"check"),i())}function de(r,t){r&1&&(n(0,"sh-icon",21),D(1,"warning"),i()),r&2&&d("shTooltip","File not found")}function ue(r,t){let a=le(r).pipe(G(t),L());return m(a,{initialValue:r()})}var N=class r{#o=F(q);#s=F(se);#e=F(oe);#a=F(te);#t=s("");backupId=m(this.#o.params.pipe(y(t=>t.id)));activeBackup=E(()=>this.#s.backups().find(t=>t.Backup?.ID===this.backupId()));backupFilePath=s("");lastValidatedPath=s("");isValidatedPath=E(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=E(()=>this.backupFilePath()!==this.#t());isValidatingPath=s(!1);#i=ue(this.backupFilePath,500);#n=s(!1);isWaitingForValidation=E(()=>this.#i()!=this.backupFilePath()||this.isValidatingPath());backupFilePathEffect=P(()=>{let t=this.#i(),a=this.activeBackup(),e=this.#n();t!==""&&(this.isValidatingPath.set(!0),this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).pipe(g(1),p(()=>this.isValidatingPath.set(!1))).subscribe(()=>this.lastValidatedPath.set(t)))});isRestoring=s(!1);isRepairing=s(!1);isDeleting=s(!1);isSavingDbPath=s(!1);isSavingAndRepairing=s(!1);isMovingDb=s(!1);isCreatingBugReport=s(!1);createdReport=s(!1);activeBackupEffect=P(()=>{let t=this.activeBackup();if(!t)return;let a=t.Backup?.DBPath??"";this.backupFilePath.set(a),this.#t.set(a)});repairDatabase(){this.isRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(t=null){this.isValidatedPath()?this.#a.open(b,{data:{title:$localize`Confirm delete?`,message:$localize`Do you really want to delete the database for ${this.activeBackup()?.Backup?.Name}?`,confirmText:$localize`Delete database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doDeleteDatabase(t)}}):this.doDeleteDatabase(t)}doDeleteDatabase(t=null){this.isDeleting.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),p(()=>this.isDeleting.set(!1))).subscribe(()=>{this.lastValidatedPath.set(""),t?.()})}restoreDatabase(){this.isValidatedPath()?this.deleteDatabase(()=>{this.doRepairDatabase()}):this.doRepairDatabase()}doRepairDatabase(){this.isRestoring.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t())}saveDatabasePath(t=null){this.isValidatedPath()?this.#a.open(b,{data:{title:$localize`Confirm reassign?`,message:$localize`The target database path already exists and may belong to another backup. Are you sure you want to assign this backup to an existing database?`,confirmText:$localize`Assign existing database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doSaveDatabasePath(t)}}):this.doSaveDatabasePath(t)}doSaveDatabasePath(t=null){this.isSavingDbPath.set(!0);let a=this.backupFilePath();this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:a}}).pipe(p(()=>this.isSavingDbPath.set(!1))).subscribe(()=>{this.#t.set(a),t?.()})}saveAndRepairDatabasePath(){this.saveDatabasePath(()=>(this.isSavingAndRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isSavingAndRepairing.set(!1))).subscribe()))}moveDatabasePath(){this.isMovingDb.set(!0);let t=this.backupFilePath();this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:t}}).pipe(p(()=>this.isMovingDb.set(!1))).subscribe(()=>{this.#n.update(a=>!a),this.#t.set(t)})}createErrorReport(){this.isCreatingBugReport.set(!0),this.#e.postApiV1BackupByIdCreatereport({id:this.backupId()}).pipe(p(()=>this.isCreatingBugReport.set(!1))).subscribe({next:()=>{this.createdReport.set(!0),window.setTimeout(()=>this.createdReport.set(!1),3e3)}})}static \u0275fac=function(a){return new(a||r)};static \u0275cmp=V({type:r,selectors:[["app-database"]],decls:50,vars:21,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let a;a=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let o;o=$localize`Maintenance`;let S;S=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. The bug report button can be used to create a copy of the database with path information removed. This should only be used if a developer requests to investigate an issue with your database. `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Repair `;let I;I=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let M;M=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Recreate (delete and repair) `;let R;R=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:file-plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Create bug report database `;let B;B=$localize`Placement`;let O;O=$localize`${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON:backspace${"\uFFFD/#40\uFFFD"}:CLOSE_TAG_SH_ICON: Reset `;let $;$=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Save `;let v;v=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Save & Repair `;let k;return k=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON: Move existing database `,[t,a,e,o,S,f,I,M,R,B,O,$,v,k,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"actions","maintenance"],["shButton","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix","",1,"primary"],["prefix",""],["prefix","",3,"shTooltip"],[1,"actions","placement"]]},template:function(a,e){if(a&1&&(c(0,"app-status-bar"),n(1,"section")(2,"div",14)(3,"button",15),u(4,0),c(5,"sh-icon"),h(),i()(),n(6,"article")(7,"h1"),A(8,1),i(),n(9,"p"),A(10,2),i()(),n(11,"article")(12,"h2"),A(13,3),i(),n(14,"p"),A(15,4),i(),n(16,"div",16)(17,"button",17),T("click",function(){return e.repairDatabase()}),u(18,5),c(19,"sh-icon"),h(),i(),n(20,"button",17),T("click",function(){return e.deleteDatabase()}),u(21,6),c(22,"sh-icon"),h(),i(),n(23,"button",17),T("click",function(){return e.restoreDatabase()}),u(24,7),c(25,"sh-icon"),h(),i(),n(26,"button",17),T("click",function(){return e.createErrorReport()}),u(27,8),c(28,"sh-icon"),h(),i()()(),n(29,"article")(30,"h2"),A(31,9),i(),n(32,"sh-form-field")(33,"input",18),W("ngModelChange",function(S){return z(e.backupFilePath,S)||(e.backupFilePath=S),S}),i(),w(34,re,2,0,"sh-icon",19)(35,ce,2,0,"sh-icon",20)(36,de,2,1,"sh-icon",21),i(),n(37,"div",22)(38,"button",17),T("click",function(){return e.resetDatabasePath()}),u(39,10),c(40,"sh-icon"),h(),i(),n(41,"button",17),T("click",function(){return e.saveDatabasePath()}),u(42,11),c(43,"sh-icon"),h(),i(),n(44,"button",17),T("click",function(){return e.saveAndRepairDatabasePath()}),u(45,12),c(46,"sh-icon"),h(),i(),n(47,"button",17),T("click",function(){return e.moveDatabasePath()}),u(48,13),c(49,"sh-icon"),h(),i()()()()),a&2){let o;_(8),H((o=e.activeBackup())==null||o.Backup==null?null:o.Backup.Name),J(8),_(9),C("loader",e.isRepairing()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),_(3),C("loader",e.isDeleting()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),_(3),C("loader",e.isRestoring()),d("disabled",e.pathHasChanged()),_(3),C("loader",e.isCreatingBugReport()),d("disabled",e.isCreatingBugReport()||!e.isValidatedPath()||e.pathHasChanged()),_(6),K(e.isValidatedPath()?"success":"error"),_(),X("ngModel",e.backupFilePath),_(),U(e.isWaitingForValidation()?34:e.isValidatedPath()?35:36),_(4),d("disabled",!e.pathHasChanged()),_(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),_(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),_(3),d("disabled",!e.pathHasChanged()||e.isValidatedPath()||e.isWaitingForValidation())}},dependencies:[x,Q,Y,Z,_e,ae,ie,ee,ne,j],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{N as default};
1
+ import{a as _e}from"./chunk-YV32N6PE.js";import"./chunk-PAMKTLG5.js";import"./chunk-FOQJA6X2.js";import"./chunk-VHOAXFIJ.js";import{a as se}from"./chunk-4NN5ZM73.js";import"./chunk-6Q6SSTBK.js";import"./chunk-FK7JFD5B.js";import"./chunk-LFISHZZP.js";import"./chunk-ME77WZZI.js";import{a as b}from"./chunk-5DJAX2HH.js";import"./chunk-QZRRXR3V.js";import"./chunk-6ALGXRIS.js";import{a as le,b as m}from"./chunk-DW332N2S.js";import"./chunk-AABUGLWU.js";import"./chunk-TELPJYLN.js";import"./chunk-5QZIKR6A.js";import{B as ae,H as ie,Y as ne,c as Q,e as Y,i as Z,s as x,u as ee,z as te}from"./chunk-HPNLQHW6.js";import{c as oe}from"./chunk-BGTK25UG.js";import{b as q,e as j}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{Ab as i,B as G,Bb as c,C as g,D as L,E as p,Mc as E,Pa as _,Pb as u,Qb as h,Rb as A,Sb as H,Tb as J,Vb as T,W as F,cb as V,gc as C,ic as K,jc as D,la as s,na as P,oc as X,p as y,pc as z,qc as W,sb as w,tb as U,yb as d,zb as n}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";function re(r,t){r&1&&(n(0,"sh-icon",19),D(1,"spinner"),i())}function ce(r,t){r&1&&(n(0,"sh-icon",20),D(1,"check"),i())}function de(r,t){r&1&&(n(0,"sh-icon",21),D(1,"warning"),i()),r&2&&d("shTooltip","File not found")}function ue(r,t){let a=le(r).pipe(G(t),L());return m(a,{initialValue:r()})}var N=class r{#o=F(q);#s=F(se);#e=F(oe);#a=F(te);#t=s("");backupId=m(this.#o.params.pipe(y(t=>t.id)));activeBackup=E(()=>this.#s.backups().find(t=>t.Backup?.ID===this.backupId()));backupFilePath=s("");lastValidatedPath=s("");isValidatedPath=E(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=E(()=>this.backupFilePath()!==this.#t());isValidatingPath=s(!1);#i=ue(this.backupFilePath,500);#n=s(!1);isWaitingForValidation=E(()=>this.#i()!=this.backupFilePath()||this.isValidatingPath());backupFilePathEffect=P(()=>{let t=this.#i(),a=this.activeBackup(),e=this.#n();t!==""&&(this.isValidatingPath.set(!0),this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).pipe(g(1),p(()=>this.isValidatingPath.set(!1))).subscribe(()=>this.lastValidatedPath.set(t)))});isRestoring=s(!1);isRepairing=s(!1);isDeleting=s(!1);isSavingDbPath=s(!1);isSavingAndRepairing=s(!1);isMovingDb=s(!1);isCreatingBugReport=s(!1);createdReport=s(!1);activeBackupEffect=P(()=>{let t=this.activeBackup();if(!t)return;let a=t.Backup?.DBPath??"";this.backupFilePath.set(a),this.#t.set(a)});repairDatabase(){this.isRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(t=null){this.isValidatedPath()?this.#a.open(b,{data:{title:$localize`Confirm delete?`,message:$localize`Do you really want to delete the database for ${this.activeBackup()?.Backup?.Name}?`,confirmText:$localize`Delete database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doDeleteDatabase(t)}}):this.doDeleteDatabase(t)}doDeleteDatabase(t=null){this.isDeleting.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),p(()=>this.isDeleting.set(!1))).subscribe(()=>{this.lastValidatedPath.set(""),t?.()})}restoreDatabase(){this.isValidatedPath()?this.deleteDatabase(()=>{this.doRepairDatabase()}):this.doRepairDatabase()}doRepairDatabase(){this.isRestoring.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t())}saveDatabasePath(t=null){this.isValidatedPath()?this.#a.open(b,{data:{title:$localize`Confirm reassign?`,message:$localize`The target database path already exists and may belong to another backup. Are you sure you want to assign this backup to an existing database?`,confirmText:$localize`Assign existing database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doSaveDatabasePath(t)}}):this.doSaveDatabasePath(t)}doSaveDatabasePath(t=null){this.isSavingDbPath.set(!0);let a=this.backupFilePath();this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:a}}).pipe(p(()=>this.isSavingDbPath.set(!1))).subscribe(()=>{this.#t.set(a),t?.()})}saveAndRepairDatabasePath(){this.saveDatabasePath(()=>(this.isSavingAndRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isSavingAndRepairing.set(!1))).subscribe()))}moveDatabasePath(){this.isMovingDb.set(!0);let t=this.backupFilePath();this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:t}}).pipe(p(()=>this.isMovingDb.set(!1))).subscribe(()=>{this.#n.update(a=>!a),this.#t.set(t)})}createErrorReport(){this.isCreatingBugReport.set(!0),this.#e.postApiV1BackupByIdCreatereport({id:this.backupId()}).pipe(p(()=>this.isCreatingBugReport.set(!1))).subscribe({next:()=>{this.createdReport.set(!0),window.setTimeout(()=>this.createdReport.set(!1),3e3)}})}static \u0275fac=function(a){return new(a||r)};static \u0275cmp=V({type:r,selectors:[["app-database"]],decls:50,vars:21,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let a;a=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let o;o=$localize`Maintenance`;let S;S=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. The bug report button can be used to create a copy of the database with path information removed. This should only be used if a developer requests to investigate an issue with your database. `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Repair `;let I;I=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let M;M=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Recreate (delete and repair) `;let R;R=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:file-plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Create bug report database `;let B;B=$localize`Placement`;let O;O=$localize`${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON:backspace${"\uFFFD/#40\uFFFD"}:CLOSE_TAG_SH_ICON: Reset `;let $;$=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Save `;let v;v=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Save & Repair `;let k;return k=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON: Move existing database `,[t,a,e,o,S,f,I,M,R,B,O,$,v,k,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"actions","maintenance"],["shButton","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix","",1,"primary"],["prefix",""],["prefix","",3,"shTooltip"],[1,"actions","placement"]]},template:function(a,e){if(a&1&&(c(0,"app-status-bar"),n(1,"section")(2,"div",14)(3,"button",15),u(4,0),c(5,"sh-icon"),h(),i()(),n(6,"article")(7,"h1"),A(8,1),i(),n(9,"p"),A(10,2),i()(),n(11,"article")(12,"h2"),A(13,3),i(),n(14,"p"),A(15,4),i(),n(16,"div",16)(17,"button",17),T("click",function(){return e.repairDatabase()}),u(18,5),c(19,"sh-icon"),h(),i(),n(20,"button",17),T("click",function(){return e.deleteDatabase()}),u(21,6),c(22,"sh-icon"),h(),i(),n(23,"button",17),T("click",function(){return e.restoreDatabase()}),u(24,7),c(25,"sh-icon"),h(),i(),n(26,"button",17),T("click",function(){return e.createErrorReport()}),u(27,8),c(28,"sh-icon"),h(),i()()(),n(29,"article")(30,"h2"),A(31,9),i(),n(32,"sh-form-field")(33,"input",18),W("ngModelChange",function(S){return z(e.backupFilePath,S)||(e.backupFilePath=S),S}),i(),w(34,re,2,0,"sh-icon",19)(35,ce,2,0,"sh-icon",20)(36,de,2,1,"sh-icon",21),i(),n(37,"div",22)(38,"button",17),T("click",function(){return e.resetDatabasePath()}),u(39,10),c(40,"sh-icon"),h(),i(),n(41,"button",17),T("click",function(){return e.saveDatabasePath()}),u(42,11),c(43,"sh-icon"),h(),i(),n(44,"button",17),T("click",function(){return e.saveAndRepairDatabasePath()}),u(45,12),c(46,"sh-icon"),h(),i(),n(47,"button",17),T("click",function(){return e.moveDatabasePath()}),u(48,13),c(49,"sh-icon"),h(),i()()()()),a&2){let o;_(8),H((o=e.activeBackup())==null||o.Backup==null?null:o.Backup.Name),J(8),_(9),C("loader",e.isRepairing()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),_(3),C("loader",e.isDeleting()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),_(3),C("loader",e.isRestoring()),d("disabled",e.pathHasChanged()),_(3),C("loader",e.isCreatingBugReport()),d("disabled",e.isCreatingBugReport()||!e.isValidatedPath()||e.pathHasChanged()),_(6),K(e.isValidatedPath()?"success":"error"),_(),X("ngModel",e.backupFilePath),_(),U(e.isWaitingForValidation()?34:e.isValidatedPath()?35:36),_(4),d("disabled",!e.pathHasChanged()),_(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),_(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),_(3),d("disabled",!e.pathHasChanged()||e.isValidatedPath()||e.isWaitingForValidation())}},dependencies:[x,Q,Y,Z,_e,ae,ie,ee,ne,j],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{N as default};
@@ -1 +1 @@
1
- import{a as u}from"./chunk-6CYY2QG6.js";import{b as m}from"./chunk-BKANUILG.js";import{C as o,E as p,M as h,R as N,W as r,l as c,la as s,na as l,v as f,z as d}from"./chunk-XYHHESIX.js";var b=class a{#e=r(m);#o=r(u);serverState=this.#o.serverState;serverStateEffect=l(()=>{let t=this.#o.serverState();t?.LastNotificationUpdateID&&this.updateLastNotificationEventId(t?.LastNotificationUpdateID)});#s=-1;#a=s(!1);#t=s([]);#i=s([]);notifications=this.#t.asReadonly();init(){this.notifications().length===0&&this.getNotifications()}updateLastNotificationEventId(t){this.#s!==t&&(this.#s=t,this.getNotifications())}getNotifications(){this.#a.set(!0),this.#e.getApiV1Notifications().pipe(o(1),h(t=>this.#t.set(t)),p(()=>this.#a.set(!1))).subscribe()}getNofication(t){this.#e.getApiV1NotificationById({id:t}).pipe(o(1)).subscribe()}deleteNotification(t){let i=this.#t(),e=i[t];this.#i.set(i),i.splice(t,1),this.#t.set(i),this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(o(1)).subscribe({error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}deleteAllNotifications(){let t=this.#t();this.#i.set(t),this.#t.set([]);let i=t.map(e=>this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(d(()=>c(e))));f(i).pipe(o(1)).subscribe({next:e=>{let g=e.filter(n=>n!=null&&"ID"in n);this.#t.set(g),this.#i.set([])},error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}static \u0275fac=function(i){return new(i||a)};static \u0275prov=N({token:a,factory:a.\u0275fac,providedIn:"root"})};export{b as a};
1
+ import{a as u}from"./chunk-PAMKTLG5.js";import{c as m}from"./chunk-BGTK25UG.js";import{C as o,E as p,M as h,R as N,W as r,l as c,la as s,na as l,v as f,z as d}from"./chunk-T2WO6CVD.js";var b=class a{#e=r(m);#o=r(u);serverState=this.#o.serverState;serverStateEffect=l(()=>{let t=this.#o.serverState();t?.LastNotificationUpdateID&&this.updateLastNotificationEventId(t?.LastNotificationUpdateID)});#s=-1;#a=s(!1);#t=s([]);#i=s([]);notifications=this.#t.asReadonly();init(){this.notifications().length===0&&this.getNotifications()}updateLastNotificationEventId(t){this.#s!==t&&(this.#s=t,this.getNotifications())}getNotifications(){this.#a.set(!0),this.#e.getApiV1Notifications().pipe(o(1),h(t=>this.#t.set(t)),p(()=>this.#a.set(!1))).subscribe()}getNofication(t){this.#e.getApiV1NotificationById({id:t}).pipe(o(1)).subscribe()}deleteNotification(t){let i=this.#t(),e=i[t];this.#i.set(i),i.splice(t,1),this.#t.set(i),this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(o(1)).subscribe({error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}deleteAllNotifications(){let t=this.#t();this.#i.set(t),this.#t.set([]);let i=t.map(e=>this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(d(()=>c(e))));f(i).pipe(o(1)).subscribe({next:e=>{let g=e.filter(n=>n!=null&&"ID"in n);this.#t.set(g),this.#i.set([])},error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}static \u0275fac=function(i){return new(i||a)};static \u0275prov=N({token:a,factory:a.\u0275fac,providedIn:"root"})};export{b as a};
@@ -1 +1 @@
1
- import{qa as l}from"./chunk-RMOTUTEQ.js";import{W as p,fb as f}from"./chunk-XYHHESIX.js";var m=class o{decimalPipe=p(l);transform(t,e=!1,i=!1){if(i&&t===0)return e?"0 Bytes":"0B";if(!t||t===0||(typeof t=="string"&&(t=parseInt(t)),isNaN(t)))return"";let a=this.#t(),n=a?["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"]:["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],r=Math.floor(Math.log(t)/Math.log(a?1e3:1024));r=Math.min(r,n.length-1);let c=t/Math.pow(a?1e3:1024,r),s=this.decimalPipe.transform(c,"1.0-2");return s?`${s} ${e?n[r]:n[r].replace("Bytes","B")}`:""}#t(){if(navigator.userAgentData?.platform.toLowerCase().includes("mac"))return!0;let t=["mac","macintosh","os x","apple"],e=((navigator.userAgent||navigator.platform||navigator.vendor)??"").toLowerCase();return e?t.some(i=>e.includes(i)):!1}static \u0275fac=function(e){return new(e||o)};static \u0275pipe=f({name:"bytes",type:o,pure:!0})};export{m as a};
1
+ import{ka as l}from"./chunk-OTPG7USH.js";import{W as p,fb as f}from"./chunk-T2WO6CVD.js";var m=class o{decimalPipe=p(l);transform(t,e=!1,i=!1){if(i&&t===0)return e?"0 Bytes":"0B";if(!t||t===0||(typeof t=="string"&&(t=parseInt(t)),isNaN(t)))return"";let a=this.#t(),n=a?["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"]:["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],r=Math.floor(Math.log(t)/Math.log(a?1e3:1024));r=Math.min(r,n.length-1);let c=t/Math.pow(a?1e3:1024,r),s=this.decimalPipe.transform(c,"1.0-2");return s?`${s} ${e?n[r]:n[r].replace("Bytes","B")}`:""}#t(){if(navigator.userAgentData?.platform.toLowerCase().includes("mac"))return!0;let t=["mac","macintosh","os x","apple"],e=((navigator.userAgent||navigator.platform||navigator.vendor)??"").toLowerCase();return e?t.some(i=>e.includes(i)):!1}static \u0275fac=function(e){return new(e||o)};static \u0275pipe=f({name:"bytes",type:o,pure:!0})};export{m as a};
@@ -1 +1 @@
1
- import{a as s}from"./chunk-LF24JF3M.js";import{la as o}from"./chunk-RMOTUTEQ.js";import{W as e,fb as n}from"./chunk-XYHHESIX.js";var m=class i{#t=e(s);#r=e(o);convertTimestamp(t){let r=/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})Z$/.exec(t);if(r){let[a,p,f,c,d,u,h]=r;return`${p}-${f}-${c}T${d}:${u}:${h}Z`}return t}transform(t,r=!1,...a){return t?r?this.#r.transform(t,"short"):(this.#t.locale(),typeof t=="string"&&(t=this.convertTimestamp(t)),this.#t(t).fromNow()):"N/A"}static \u0275fac=function(r){return new(r||i)};static \u0275pipe=n({name:"relativeTime",type:i,pure:!0})};export{m as a};
1
+ import{a as s}from"./chunk-VHOAXFIJ.js";import{fa as o}from"./chunk-OTPG7USH.js";import{W as e,fb as n}from"./chunk-T2WO6CVD.js";var m=class i{#t=e(s);#r=e(o);convertTimestamp(t){let r=/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})Z$/.exec(t);if(r){let[a,p,f,c,d,u,h]=r;return`${p}-${f}-${c}T${d}:${u}:${h}Z`}return t}transform(t,r=!1,...a){return t?r?this.#r.transform(t,"short"):(this.#t.locale(),typeof t=="string"&&(t=this.convertTimestamp(t)),this.#t(t).fromNow()):"N/A"}static \u0275fac=function(r){return new(r||i)};static \u0275pipe=n({name:"relativeTime",type:i,pure:!0})};export{m as a};
@@ -0,0 +1 @@
1
+ import{a as _}from"./chunk-6ALGXRIS.js";import"./chunk-DW332N2S.js";import"./chunk-AABUGLWU.js";import"./chunk-TELPJYLN.js";import"./chunk-5QZIKR6A.js";import"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import{ia as l}from"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{Cb as n,Cc as g,Db as i,Dc as d,Pa as a,Rb as p,W as s,cb as S,jc as c,kc as m}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var o=class r{#e=s(_);serverSettings=this.#e.serverSettings;static \u0275fac=function(e){return new(e||r)};static \u0275cmp=S({type:r,selectors:[["app-server-settings"]],decls:6,vars:3,consts:()=>{let t;return t=$localize`System settings`,[t]},template:function(e,E){e&1&&(n(0,"h3"),p(1,0),i(),n(2,"code")(3,"pre"),c(4),g(5,"json"),i()()),e&2&&(a(4),m(d(5,1,E.serverSettings())))},dependencies:[l],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30)}code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:1rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{o as default};
@@ -1 +1 @@
1
- import{B as V,H as x,X as J,c as B,e as G,f as y,j as b,p as $,q as P,r as v,t as L,u as k,x as w}from"./chunk-RYXU2QDS.js";import{b as X}from"./chunk-BKANUILG.js";import{d as I,e as A}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{Ab as i,Bb as p,E as g,K as T,Pa as F,Pb as E,Qb as C,Rb as f,Ub as O,Vb as m,W as u,cb as R,gc as h,jc as N,la as c,sb as S,tb as D,xc as M,yb as _,zb as r}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";var j=()=>["/"];function H(l,e){l&1&&(r(0,"sh-form-field")(1,"label",11),f(2,2),i(),p(3,"input",12),i())}var a=new v,d=class l{#t=u(w);#e=u(X);#o=u(I);isRestoring=c(!1);isSecureFile=c(!1);importForm=a.group({config:a.control(""),cmdline:a.control(!1),importMetadata:a.control(!1),direct:a.control(!1),passphrase:a.control("")});selectedFile=c(null);onFileDropped(e){let t=e.target?.files?.item(0);if(t){let n=new FileReader;this.isSecureFile.set(t.type!=="application/json"),n.onload=this.#n.bind(this),n.readAsArrayBuffer(t)}}#n(e){let o=e.target?.result;this.importForm.patchValue({config:this.#i(o)})}#i(e){let o=new Uint8Array(e),t=o.byteLength,n="";for(let s=0;s<t;s++)n+=String.fromCharCode(o[s]);return btoa(n)}submit(){this.isRestoring.set(!0),this.#e.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(T(e=>{let t={Backup:e.data.Backup};return this.#e.postApiV1Backups({requestBody:t,temporary:!0})}),g(()=>this.isRestoring.set(!1))).subscribe({next:e=>{this.#o.navigate(["/restore-draft",e.ID])},error:e=>{this.#t.error(e.message)}})}static \u0275fac=function(o){return new(o||l)};static \u0275cmp=R({type:l,selectors:[["app-restore-from-config"]],decls:16,vars:7,consts:()=>{let e;e=$localize` Restore from config ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Restore ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,e=O(e);let o;o=$localize`Select a configuration file`;let t;return t=$localize`Passphrase`,[e,o,t,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["shDragDrop","",3,"fileDropped"],["for","file"],["type","file","accept",".json,.aes",3,"change"],["suffix",""],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(o,t){o&1&&(r(0,"header")(1,"h3"),E(2,0),r(3,"div",3)(4,"button",4),p(5,"sh-icon"),i(),r(6,"button",5),m("click",function(){return t.submit()}),p(7,"sh-icon"),i()(),C(),i()(),r(8,"form",6)(9,"sh-form-field",7),m("fileDropped",function(s){return t.onFileDropped(s)}),r(10,"label",8),f(11,1),i(),r(12,"input",9),m("change",function(s){return t.onFileDropped(s)}),i(),r(13,"sh-icon",10),N(14,"upload"),i()(),S(15,H,4,0,"sh-form-field"),i()),o&2&&(F(4),_("routerLink",M(6,j)),F(2),h("loader",t.isRestoring()),_("disabled",t.isRestoring()),F(2),_("formGroup",t.importForm),F(7),D(t.isSecureFile()?15:-1))},dependencies:[L,b,B,G,y,P,$,A,J,x,k,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}"],changeDetection:0})};export{d as default};
1
+ import{B as V,H as x,X as J,c as B,e as G,f as y,j as b,p as $,q as P,r as v,t as L,u as k,x as w}from"./chunk-HPNLQHW6.js";import{c as X}from"./chunk-BGTK25UG.js";import{d as I,e as A}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{Ab as i,Bb as p,E as g,K as T,Pa as F,Pb as E,Qb as C,Rb as f,Ub as O,Vb as m,W as u,cb as R,gc as h,jc as N,la as c,sb as S,tb as D,xc as M,yb as _,zb as r}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var j=()=>["/"];function H(l,e){l&1&&(r(0,"sh-form-field")(1,"label",11),f(2,2),i(),p(3,"input",12),i())}var a=new v,d=class l{#t=u(w);#e=u(X);#o=u(I);isRestoring=c(!1);isSecureFile=c(!1);importForm=a.group({config:a.control(""),cmdline:a.control(!1),importMetadata:a.control(!1),direct:a.control(!1),passphrase:a.control("")});selectedFile=c(null);onFileDropped(e){let t=e.target?.files?.item(0);if(t){let n=new FileReader;this.isSecureFile.set(t.type!=="application/json"),n.onload=this.#n.bind(this),n.readAsArrayBuffer(t)}}#n(e){let o=e.target?.result;this.importForm.patchValue({config:this.#i(o)})}#i(e){let o=new Uint8Array(e),t=o.byteLength,n="";for(let s=0;s<t;s++)n+=String.fromCharCode(o[s]);return btoa(n)}submit(){this.isRestoring.set(!0),this.#e.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(T(e=>{let t={Backup:e.data.Backup};return this.#e.postApiV1Backups({requestBody:t,temporary:!0})}),g(()=>this.isRestoring.set(!1))).subscribe({next:e=>{this.#o.navigate(["/restore-draft",e.ID])},error:e=>{this.#t.error(e.message)}})}static \u0275fac=function(o){return new(o||l)};static \u0275cmp=R({type:l,selectors:[["app-restore-from-config"]],decls:16,vars:7,consts:()=>{let e;e=$localize` Restore from config ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Restore ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,e=O(e);let o;o=$localize`Select a configuration file`;let t;return t=$localize`Passphrase`,[e,o,t,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["shDragDrop","",3,"fileDropped"],["for","file"],["type","file","accept",".json,.aes",3,"change"],["suffix",""],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(o,t){o&1&&(r(0,"header")(1,"h3"),E(2,0),r(3,"div",3)(4,"button",4),p(5,"sh-icon"),i(),r(6,"button",5),m("click",function(){return t.submit()}),p(7,"sh-icon"),i()(),C(),i()(),r(8,"form",6)(9,"sh-form-field",7),m("fileDropped",function(s){return t.onFileDropped(s)}),r(10,"label",8),f(11,1),i(),r(12,"input",9),m("change",function(s){return t.onFileDropped(s)}),i(),r(13,"sh-icon",10),N(14,"upload"),i()(),S(15,H,4,0,"sh-form-field"),i()),o&2&&(F(4),_("routerLink",M(6,j)),F(2),h("loader",t.isRestoring()),_("disabled",t.isRestoring()),F(2),_("formGroup",t.importForm),F(7),D(t.isSecureFile()?15:-1))},dependencies:[L,b,B,G,y,P,$,A,J,x,k,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}"],changeDetection:0})};export{d as default};
@@ -0,0 +1 @@
1
+ import{a as F}from"./chunk-ETAHWUMY.js";import{a as ee}from"./chunk-5DJAX2HH.js";import{B as Y,L as Q,w as K,x as W,z as q}from"./chunk-HPNLQHW6.js";import{a as H,c as Z}from"./chunk-BGTK25UG.js";import{b as U,d as j}from"./chunk-A4LPGPDU.js";import{$ as p,Ab as c,Bb as m,Fb as y,Gb as D,Ib as f,Ma as M,Mc as P,Pa as r,Pb as G,Qb as V,Rb as _,Rc as S,Vb as u,W as T,Xb as s,aa as I,cb as E,ic as z,jc as A,kc as x,la as v,lc as J,rc as X,sb as d,sc as B,tb as N,tc as g,wb as b,xb as k,yb as O,zb as a}from"./chunk-T2WO6CVD.js";function oe(n,t){if(n&1&&(a(0,"div",11),A(1),c()),n&2){s();let e=g(0);r(),J(" ",e.Message," ")}}function ae(n,t){if(n&1&&(a(0,"div"),G(1,1),m(2,"a",15),V(),c()),n&2){let e=s();r(2),O("href",e.downloadLink(),M)}}function re(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s(),l=g(0);return I(i.doRepair(l.BackupID))}),_(1,2),c()}}function le(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s(),l=g(0);return I(i.doDownloadBugreport(l))}),_(1,3),c()}}function ce(n,t){if(n&1&&m(0,"sh-progress-bar",17),n&2){let e,o=s(2);O("value",(e=o.serverState())==null?null:e.UpdateDownloadProgress)}}function _e(n,t){if(n&1){let e=f();a(0,"div",11),y(1),_(2,4),D(),a(3,"a",16),A(4),c(),d(5,ce,1,1,"sh-progress-bar",17),a(6,"button",14),u("click",function(){p(e);let i=s();return I(i.doShowUpdate())}),_(7,5),c()()}if(n&2){let e,o,i=s(),l=g(0);r(3),O("href",(e=i.serverState())==null?null:e.UpdateDownloadLink,M),r(),x(l.Message),r(),N(((o=i.serverState())==null?null:o.UpdaterState)==="Downloading"?5:-1)}}function se(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s(),l=g(0);return I(i.doShowLog(l.BackupID))}),_(1,6),c()}}function de(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s();return I(i.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),_(1,7),c()}}function Ne(n,t){if(n&1){let e=f();a(0,"button",14),u("click",function(){p(e);let i=s();return I(i.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),_(1,8),c()}}var Te={Error:"error",Warning:"warn",Information:"primary"},h=class n{#e=T(j);#a=T(U);#r=T(q);#t=T(W);#i=T(F);#n=T(Z);#o=v(null);serverState=this.#i.serverState;index=S.required();notification=S.required();downloadLink=P(()=>this.#o()||this.notification().DownloadLink||"");deleteNotificationByIndex(){this.#i.deleteNotification(this.index())}deleteAllNotifications(){this.#i.deleteAllNotifications()}getAlertType(t){return t&&Te[t]||"primary"}doShowLog(t){this.#n.getApiV1BackupByIdIsactive({id:t}).subscribe({next:e=>{this.#e.navigate(["/backup/"+t+"/log"])},error:e=>{if(e.status===404){let o={title:$localize`Error`,message:$localize`The backup is missing, has it been deleted?`,confirmText:$localize`OK`,cancelText:null};parseInt(t)+""!=t&&(o={title:$localize`Error`,message:$localize`The backup was temporary and does not exist anymore, so the log data is lost`,confirmText:$localize`OK`,cancelText:null}),this.#r.open(ee,{maxWidth:"550px",width:"100%",data:o})}else this.#t.error($localize`Failed to find backup: `+e.message)}})}doRepair(t){this.#n.postApiV1BackupByIdRepair({id:t}).subscribe({next:()=>{this.#t.success($localize`Backup repaired`),this.#e.navigate(["./"],{onSameUrlNavigation:"reload",relativeTo:this.#a})},error:e=>{this.#t.error($localize`Failed to repair backup: `+e.message)}})}doShowUpdate(){this.#e.navigate(["/about/changelog"])}doShowLink(t){window.open(t,"_blank")}doDownloadBugreport(t){let e=t.Action.slice(19);this.#n.postApiV1AuthIssuetokenByOperation({operation:"bugreport"}).subscribe({next:o=>{if(!o.Token){this.#t.error("Failed to get bug report URL: No token generated");return}let i=H.BASE||"",l=`${location.origin}${i}/api/v1/bugreport/${e}?token=${o.Token}`;t.DownloadLink=l,this.#o.set(l),this.triggerDownload(l)},error:o=>{this.#t.error(`Failed to get bug report URL: ${o.message}`)}})}triggerDownload(t){let e=document.createElement("a");e.href=t,e.download="",e.style.display="none",document.body.appendChild(e);try{e.click()}catch{}document.body.removeChild(e)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=E({type:n,selectors:[["app-notification"]],inputs:{index:[1,"index"],notification:[1,"notification"]},decls:16,vars:12,consts:()=>{let t;t=$localize`Dismiss`;let e;e=$localize` If the backup file was not downloaded automatically, ${"\uFFFD#2\uFFFD"}:START_LINK:right click and choose "Save as …"${"\uFFFD/#2\uFFFD"}:CLOSE_LINK:`;let o;o=$localize`Repair`;let i;i=$localize`Download`;let l;l=$localize`New update found:`;let L;L=$localize`Show Update`;let w;w=$localize`Show Log`;let R;R=$localize` Show Help `;let $;return $=$localize` Show Help `,[t,e,o,i,l,L,w,R,$,["ship-alert-title",""],["ship-alert-content","",1,"content"],[1,"message"],[1,"actions"],["shButton","",1,"small","outlined"],["shButton","",1,"small","outlined",3,"click"],["target","_blank",3,"href"],[3,"href"],[3,"value"]]},template:function(e,o){if(e&1){let i=f();X(0),a(1,"sh-alert")(2,"div",9),A(3),c(),a(4,"div",10),d(5,oe,2,1,"div",11),d(6,ae,3,1,"div"),a(7,"div",12),d(8,re,2,0,"button",13),d(9,le,2,0,"button",13),d(10,_e,8,3,"div",11),d(11,se,2,0,"button",13),d(12,de,2,0,"button",13),d(13,Ne,2,0,"button",13),a(14,"button",14),u("click",function(){return p(i),I(o.deleteNotificationByIndex())}),_(15,0),c()()()()}if(e&2){let i=B(o.notification());r(),z(o.getAlertType(i.Type)),r(2),x(i.Title),r(2),N(i.Action!=="update:new"&&i.Action!=="update:manual"?5:-1),r(),N(o.downloadLink()?6:-1),r(2),N(i.Message!=null&&i.Message.includes("please run repair")?8:-1),r(),N(i.Action!=null&&i.Action.startsWith("bug-report:created:")&&!o.downloadLink()?9:-1),r(),N(i.Action==="update:new"?10:-1),r(),N(i.Action==="backup:show-log"?11:-1),r(),N(i.Action==="config:issue:unencrypted-database"?12:-1),r(),N(i.Action==="config:issue:windows-folder-used"?13:-1)}},dependencies:[Q,Y,K],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-direction:column;gap:.5rem}.message[_ngcontent-%COMP%]{max-height:12.5rem;overflow:auto}"],changeDetection:0})};var Ce=(n,t)=>t.ID;function pe(n,t){if(n&1&&m(0,"app-notification",1),n&2){let e=t.$implicit,o=t.$index;O("index",o)("notification",e)}}function Ie(n,t){n&1&&(a(0,"div",2)(1,"p"),_(2,0),c()())}var te=class n{#e=T(F);notificationFilterPredicate=S();notifications=P(()=>{let t=this.notificationFilterPredicate()?.predicate,e=this.#e.notifications();return typeof t!="function"?e:e.filter(t)});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=E({type:n,selectors:[["app-notifications"]],inputs:{notificationFilterPredicate:[1,"notificationFilterPredicate"]},decls:3,vars:1,consts:()=>{let t;return t=$localize`No more notifications`,[t,[3,"index","notification"],[1,"notification-list"]]},template:function(e,o){e&1&&b(0,pe,1,2,"app-notification",1,Ce,!1,Ie,3,0,"div",2),e&2&&k(o.notifications())},dependencies:[h],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;justify-content:flex-end}.notification-list[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};export{h as a,te as b};
@@ -0,0 +1 @@
1
+ import{_ as pi,fa as Pt,va as fi}from"./chunk-OTPG7USH.js";import{a as Ft}from"./chunk-TT3S63BX.js";import{$ as w,$c as It,Ab as g,Bb as oe,Cb as A,Db as F,Eb as ye,Gc as ui,Hb as De,Ib as z,Lc as Tt,Mc as S,O as tt,Oa as ai,Pa as p,Q as X,Qc as se,R as we,Rc as m,S as Le,Sc as J,Tc as Nt,U as le,Ua as bt,Uc as H,Va as it,Vb as E,Vc as At,W as y,Wb as Se,Xa as de,Xb as f,Ya as D,Yb as T,Z as oi,Za as li,Zb as u,Zc as hi,_ as si,a as Jt,aa as x,bc as wt,cb as O,cc as ue,da as xe,db as He,dc as ie,ea as Oe,eb as R,ec as xt,fa as he,fc as G,g as ei,gb as U,gc as N,ha as pe,hb as fe,hc as Ot,ic as Z,jc as C,k as ti,kb as Mt,kc as Ne,la as v,lb as ci,lc as K,mc as nt,na as k,oa as ce,ob as Et,oc as Ue,p as ii,pa as Be,pc as ze,qa as Ce,qc as $e,rb as ge,rc as ot,sa as I,sb as b,sc as ne,tb as M,tc as L,ub as je,v as ni,vb as di,wa as ri,wb as Ve,wc as $,xb as Te,xc as st,yb as Q,yc as rt,zb as h,zc as Vt}from"./chunk-T2WO6CVD.js";import{a as P,b as j,c as Kt}from"./chunk-7CGTOI24.js";var bi=(()=>{class i{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,t){this._renderer=e,this._elementRef=t}setProperty(e,t){this._renderer.setProperty(this._elementRef.nativeElement,e,t)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(t){return new(t||i)(D(de),D(I))};static \u0275dir=R({type:i})}return i})(),Je=(()=>{class i extends bi{static \u0275fac=(()=>{let e;return function(n){return(e||(e=Ce(i)))(n||i)}})();static \u0275dir=R({type:i,features:[U]})}return i})(),ve=new le(""),Xi={provide:ve,useExisting:X(()=>Qi),multi:!0},Qi=(()=>{class i extends Je{writeValue(e){this.setProperty("checked",e)}static \u0275fac=(()=>{let e;return function(n){return(e||(e=Ce(i)))(n||i)}})();static \u0275dir=R({type:i,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(t,n){t&1&&E("change",function(r){return n.onChange(r.target.checked)})("blur",function(){return n.onTouched()})},standalone:!1,features:[$([Xi]),U]})}return i})(),Zi={provide:ve,useExisting:X(()=>Mi),multi:!0};function Ki(){let i=Ft()?Ft().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var Ji=new le(""),Mi=(()=>{class i extends bi{_compositionMode;_composing=!1;constructor(e,t,n){super(e,t),this._compositionMode=n,this._compositionMode==null&&(this._compositionMode=!Ki())}writeValue(e){let t=e??"";this.setProperty("value",t)}_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(t){return new(t||i)(D(de),D(I),D(Ji,8))};static \u0275dir=R({type:i,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(t,n){t&1&&E("input",function(r){return n._handleInput(r.target.value)})("blur",function(){return n.onTouched()})("compositionstart",function(){return n._compositionStart()})("compositionend",function(r){return n._compositionEnd(r.target.value)})},standalone:!1,features:[$([Zi]),U]})}return i})();function Bt(i){return i==null||Ht(i)===0}function Ht(i){return i==null?null:Array.isArray(i)||typeof i=="string"?i.length:i instanceof Set?i.size:null}var be=new le(""),Me=new le(""),en=/^(?=.{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])?)*$/,gi=class{static min(o){return tn(o)}static max(o){return nn(o)}static required(o){return on(o)}static requiredTrue(o){return sn(o)}static email(o){return rn(o)}static minLength(o){return an(o)}static maxLength(o){return ln(o)}static pattern(o){return cn(o)}static nullValidator(o){return Ei()}static compose(o){return Ni(o)}static composeAsync(o){return Ai(o)}};function tn(i){return o=>{if(o.value==null||i==null)return null;let e=parseFloat(o.value);return!isNaN(e)&&e<i?{min:{min:i,actual:o.value}}:null}}function nn(i){return o=>{if(o.value==null||i==null)return null;let e=parseFloat(o.value);return!isNaN(e)&&e>i?{max:{max:i,actual:o.value}}:null}}function on(i){return Bt(i.value)?{required:!0}:null}function sn(i){return i.value===!0?null:{required:!0}}function rn(i){return Bt(i.value)||en.test(i.value)?null:{email:!0}}function an(i){return o=>{let e=o.value?.length??Ht(o.value);return e===null||e===0?null:e<i?{minlength:{requiredLength:i,actualLength:e}}:null}}function ln(i){return o=>{let e=o.value?.length??Ht(o.value);return e!==null&&e>i?{maxlength:{requiredLength:i,actualLength:e}}:null}}function cn(i){if(!i)return Ei;let o,e;return typeof i=="string"?(e="",i.charAt(0)!=="^"&&(e+="^"),e+=i,i.charAt(i.length-1)!=="$"&&(e+="$"),o=new RegExp(e)):(e=i.toString(),o=i),t=>{if(Bt(t.value))return null;let n=t.value;return o.test(n)?null:{pattern:{requiredPattern:e,actualValue:n}}}}function Ei(i){return null}function wi(i){return i!=null}function xi(i){return ci(i)?ti(i):i}function Oi(i){let o={};return i.forEach(e=>{o=e!=null?P(P({},o),e):o}),Object.keys(o).length===0?null:o}function Vi(i,o){return o.map(e=>e(i))}function dn(i){return!i.validate}function Ti(i){return i.map(o=>dn(o)?o:e=>o.validate(e))}function Ni(i){if(!i)return null;let o=i.filter(wi);return o.length==0?null:function(e){return Oi(Vi(e,o))}}function jt(i){return i!=null?Ni(Ti(i)):null}function Ai(i){if(!i)return null;let o=i.filter(wi);return o.length==0?null:function(e){let t=Vi(e,o).map(xi);return ni(t).pipe(ii(Oi))}}function Ut(i){return i!=null?Ai(Ti(i)):null}function mi(i,o){return i===null?[o]:Array.isArray(i)?[...i,o]:[i,o]}function Ii(i){return i._rawValidators}function Fi(i){return i._rawAsyncValidators}function kt(i){return i?Array.isArray(i)?i:[i]:[]}function lt(i,o){return Array.isArray(i)?i.includes(o):i===o}function vi(i,o){let e=kt(o);return kt(i).forEach(n=>{lt(e,n)||e.push(n)}),e}function _i(i,o){return kt(o).filter(e=>!lt(i,e))}var ct=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(o){this._rawValidators=o||[],this._composedValidatorFn=jt(this._rawValidators)}_setAsyncValidators(o){this._rawAsyncValidators=o||[],this._composedAsyncValidatorFn=Ut(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(o){this._onDestroyCallbacks.push(o)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(o=>o()),this._onDestroyCallbacks=[]}reset(o=void 0){this.control&&this.control.reset(o)}hasError(o,e){return this.control?this.control.hasError(o,e):!1}getError(o,e){return this.control?this.control.getError(o,e):null}},W=class extends ct{name;get formDirective(){return null}get path(){return null}},re=class extends ct{_parent=null;name=null;valueAccessor=null},dt=class{_cd;constructor(o){this._cd=o}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}};var Dr=(()=>{class i extends dt{constructor(e){super(e)}static \u0275fac=function(t){return new(t||i)(D(re,2))};static \u0275dir=R({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,n){t&2&&N("ng-untouched",n.isUntouched)("ng-touched",n.isTouched)("ng-pristine",n.isPristine)("ng-dirty",n.isDirty)("ng-valid",n.isValid)("ng-invalid",n.isInvalid)("ng-pending",n.isPending)},standalone:!1,features:[U]})}return i})(),Sr=(()=>{class i extends dt{constructor(e){super(e)}static \u0275fac=function(t){return new(t||i)(D(W,10))};static \u0275dir=R({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["","formArray",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(t,n){t&2&&N("ng-untouched",n.isUntouched)("ng-touched",n.isTouched)("ng-pristine",n.isPristine)("ng-dirty",n.isDirty)("ng-valid",n.isValid)("ng-invalid",n.isInvalid)("ng-pending",n.isPending)("ng-submitted",n.isSubmitted)},standalone:!1,features:[U]})}return i})();var We="VALID",at="INVALID",Ae="PENDING",Ge="DISABLED",me=class{},ut=class extends me{value;source;constructor(o,e){super(),this.value=o,this.source=e}},Ye=class extends me{pristine;source;constructor(o,e){super(),this.pristine=o,this.source=e}},Xe=class extends me{touched;source;constructor(o,e){super(),this.touched=o,this.source=e}},Ie=class extends me{status;source;constructor(o,e){super(),this.status=o,this.source=e}},ht=class extends me{source;constructor(o){super(),this.source=o}},Ze=class extends me{source;constructor(o){super(),this.source=o}};function zt(i){return(mt(i)?i.validators:i)||null}function un(i){return Array.isArray(i)?jt(i):i||null}function $t(i,o){return(mt(o)?o.asyncValidators:i)||null}function hn(i){return Array.isArray(i)?Ut(i):i||null}function mt(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}function Pi(i,o,e){let t=i.controls;if(!(o?Object.keys(t):t).length)throw new tt(1e3,"");if(!t[e])throw new tt(1001,"")}function ki(i,o,e){i._forEachChild((t,n)=>{if(e[n]===void 0)throw new tt(1002,"")})}var Fe=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(o,e){this._assignValidators(o),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(o){this._rawValidators=this._composedValidatorFn=o}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(o){this._rawAsyncValidators=this._composedAsyncValidatorFn=o}get parent(){return this._parent}get status(){return ce(this.statusReactive)}set status(o){ce(()=>this.statusReactive.set(o))}_status=S(()=>this.statusReactive());statusReactive=v(void 0);get valid(){return this.status===We}get invalid(){return this.status===at}get pending(){return this.status==Ae}get disabled(){return this.status===Ge}get enabled(){return this.status!==Ge}errors;get pristine(){return ce(this.pristineReactive)}set pristine(o){ce(()=>this.pristineReactive.set(o))}_pristine=S(()=>this.pristineReactive());pristineReactive=v(!0);get dirty(){return!this.pristine}get touched(){return ce(this.touchedReactive)}set touched(o){ce(()=>this.touchedReactive.set(o))}_touched=S(()=>this.touchedReactive());touchedReactive=v(!1);get untouched(){return!this.touched}_events=new ei;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(o){this._assignValidators(o)}setAsyncValidators(o){this._assignAsyncValidators(o)}addValidators(o){this.setValidators(vi(o,this._rawValidators))}addAsyncValidators(o){this.setAsyncValidators(vi(o,this._rawAsyncValidators))}removeValidators(o){this.setValidators(_i(o,this._rawValidators))}removeAsyncValidators(o){this.setAsyncValidators(_i(o,this._rawAsyncValidators))}hasValidator(o){return lt(this._rawValidators,o)}hasAsyncValidator(o){return lt(this._rawAsyncValidators,o)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(o={}){let e=this.touched===!1;this.touched=!0;let t=o.sourceControl??this;this._parent&&!o.onlySelf&&this._parent.markAsTouched(j(P({},o),{sourceControl:t})),e&&o.emitEvent!==!1&&this._events.next(new Xe(!0,t))}markAllAsDirty(o={}){this.markAsDirty({onlySelf:!0,emitEvent:o.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(o))}markAllAsTouched(o={}){this.markAsTouched({onlySelf:!0,emitEvent:o.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(o))}markAsUntouched(o={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let t=o.sourceControl??this;this._forEachChild(n=>{n.markAsUntouched({onlySelf:!0,emitEvent:o.emitEvent,sourceControl:t})}),this._parent&&!o.onlySelf&&this._parent._updateTouched(o,t),e&&o.emitEvent!==!1&&this._events.next(new Xe(!1,t))}markAsDirty(o={}){let e=this.pristine===!0;this.pristine=!1;let t=o.sourceControl??this;this._parent&&!o.onlySelf&&this._parent.markAsDirty(j(P({},o),{sourceControl:t})),e&&o.emitEvent!==!1&&this._events.next(new Ye(!1,t))}markAsPristine(o={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let t=o.sourceControl??this;this._forEachChild(n=>{n.markAsPristine({onlySelf:!0,emitEvent:o.emitEvent})}),this._parent&&!o.onlySelf&&this._parent._updatePristine(o,t),e&&o.emitEvent!==!1&&this._events.next(new Ye(!0,t))}markAsPending(o={}){this.status=Ae;let e=o.sourceControl??this;o.emitEvent!==!1&&(this._events.next(new Ie(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!o.onlySelf&&this._parent.markAsPending(j(P({},o),{sourceControl:e}))}disable(o={}){let e=this._parentMarkedDirty(o.onlySelf);this.status=Ge,this.errors=null,this._forEachChild(n=>{n.disable(j(P({},o),{onlySelf:!0}))}),this._updateValue();let t=o.sourceControl??this;o.emitEvent!==!1&&(this._events.next(new ut(this.value,t)),this._events.next(new Ie(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(j(P({},o),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(n=>n(!0))}enable(o={}){let e=this._parentMarkedDirty(o.onlySelf);this.status=We,this._forEachChild(t=>{t.enable(j(P({},o),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:o.emitEvent}),this._updateAncestors(j(P({},o),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(t=>t(!1))}_updateAncestors(o,e){this._parent&&!o.onlySelf&&(this._parent.updateValueAndValidity(o),o.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(o){this._parent=o}getRawValue(){return this.value}updateValueAndValidity(o={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let t=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===We||this.status===Ae)&&this._runAsyncValidator(t,o.emitEvent)}let e=o.sourceControl??this;o.emitEvent!==!1&&(this._events.next(new ut(this.value,e)),this._events.next(new Ie(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!o.onlySelf&&this._parent.updateValueAndValidity(j(P({},o),{sourceControl:e}))}_updateTreeValidity(o={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(o)),this.updateValueAndValidity({onlySelf:!0,emitEvent:o.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Ge:We}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(o,e){if(this.asyncValidator){this.status=Ae,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:o!==!1};let t=xi(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(n=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(n,{emitEvent:e,shouldHaveEmitted:o})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let o=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,o}return!1}setErrors(o,e={}){this.errors=o,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(o){let e=o;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((t,n)=>t&&t._find(n),this)}getError(o,e){let t=e?this.get(e):this;return t&&t.errors?t.errors[o]:null}hasError(o,e){return!!this.getError(o,e)}get root(){let o=this;for(;o._parent;)o=o._parent;return o}_updateControlsErrors(o,e,t){this.status=this._calculateStatus(),o&&this.statusChanges.emit(this.status),(o||t)&&this._events.next(new Ie(this.status,e)),this._parent&&this._parent._updateControlsErrors(o,e,t)}_initObservables(){this.valueChanges=new pe,this.statusChanges=new pe}_calculateStatus(){return this._allControlsDisabled()?Ge:this.errors?at:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Ae)?Ae:this._anyControlsHaveStatus(at)?at:We}_anyControlsHaveStatus(o){return this._anyControls(e=>e.status===o)}_anyControlsDirty(){return this._anyControls(o=>o.dirty)}_anyControlsTouched(){return this._anyControls(o=>o.touched)}_updatePristine(o,e){let t=!this._anyControlsDirty(),n=this.pristine!==t;this.pristine=t,this._parent&&!o.onlySelf&&this._parent._updatePristine(o,e),n&&this._events.next(new Ye(this.pristine,e))}_updateTouched(o={},e){this.touched=this._anyControlsTouched(),this._events.next(new Xe(this.touched,e)),this._parent&&!o.onlySelf&&this._parent._updateTouched(o,e)}_onDisabledChange=[];_registerOnCollectionChange(o){this._onCollectionChange=o}_setUpdateStrategy(o){mt(o)&&o.updateOn!=null&&(this._updateOn=o.updateOn)}_parentMarkedDirty(o){let e=this._parent&&this._parent.dirty;return!o&&!!e&&!this._parent._anyControlsDirty()}_find(o){return null}_assignValidators(o){this._rawValidators=Array.isArray(o)?o.slice():o,this._composedValidatorFn=un(this._rawValidators)}_assignAsyncValidators(o){this._rawAsyncValidators=Array.isArray(o)?o.slice():o,this._composedAsyncValidatorFn=hn(this._rawAsyncValidators)}},Pe=class extends Fe{constructor(o,e,t){super(zt(e),$t(t,e)),this.controls=o,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(o,e){return this.controls[o]?this.controls[o]:(this.controls[o]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(o,e,t={}){this.registerControl(o,e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}removeControl(o,e={}){this.controls[o]&&this.controls[o]._registerOnCollectionChange(()=>{}),delete this.controls[o],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(o,e,t={}){this.controls[o]&&this.controls[o]._registerOnCollectionChange(()=>{}),delete this.controls[o],e&&this.registerControl(o,e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}contains(o){return this.controls.hasOwnProperty(o)&&this.controls[o].enabled}setValue(o,e={}){ki(this,!0,o),Object.keys(o).forEach(t=>{Pi(this,!0,t),this.controls[t].setValue(o[t],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(o,e={}){o!=null&&(Object.keys(o).forEach(t=>{let n=this.controls[t];n&&n.patchValue(o[t],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(o={},e={}){this._forEachChild((t,n)=>{t.reset(o?o[n]:null,j(P({},e),{onlySelf:!0}))}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new Ze(this))}getRawValue(){return this._reduceChildren({},(o,e,t)=>(o[t]=e.getRawValue(),o))}_syncPendingControls(){let o=this._reduceChildren(!1,(e,t)=>t._syncPendingControls()?!0:e);return o&&this.updateValueAndValidity({onlySelf:!0}),o}_forEachChild(o){Object.keys(this.controls).forEach(e=>{let t=this.controls[e];t&&o(t,e)})}_setUpControls(){this._forEachChild(o=>{o.setParent(this),o._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(o){for(let[e,t]of Object.entries(this.controls))if(this.contains(e)&&o(t))return!0;return!1}_reduceValue(){let o={};return this._reduceChildren(o,(e,t,n)=>((t.enabled||this.disabled)&&(e[n]=t.value),e))}_reduceChildren(o,e){let t=o;return this._forEachChild((n,s)=>{t=e(t,n,s)}),t}_allControlsDisabled(){for(let o of Object.keys(this.controls))if(this.controls[o].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(o){return this.controls.hasOwnProperty(o)?this.controls[o]:null}};var Rt=class extends Pe{};var Ee=new le("",{factory:()=>et}),et="always";function vt(i,o){return[...o.path,i]}function Ke(i,o,e=et){Wt(i,o),o.valueAccessor.writeValue(i.value),(i.disabled||e==="always")&&o.valueAccessor.setDisabledState?.(i.disabled),fn(i,o),mn(i,o),gn(i,o),pn(i,o)}function pt(i,o,e=!0){let t=()=>{};o.valueAccessor&&(o.valueAccessor.registerOnChange(t),o.valueAccessor.registerOnTouched(t)),gt(i,o),i&&(o._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function ft(i,o){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(o)})}function pn(i,o){if(o.valueAccessor.setDisabledState){let e=t=>{o.valueAccessor.setDisabledState(t)};i.registerOnDisabledChange(e),o._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}function Wt(i,o){let e=Ii(i);o.validator!==null?i.setValidators(mi(e,o.validator)):typeof e=="function"&&i.setValidators([e]);let t=Fi(i);o.asyncValidator!==null?i.setAsyncValidators(mi(t,o.asyncValidator)):typeof t=="function"&&i.setAsyncValidators([t]);let n=()=>i.updateValueAndValidity();ft(o._rawValidators,n),ft(o._rawAsyncValidators,n)}function gt(i,o){let e=!1;if(i!==null){if(o.validator!==null){let n=Ii(i);if(Array.isArray(n)&&n.length>0){let s=n.filter(r=>r!==o.validator);s.length!==n.length&&(e=!0,i.setValidators(s))}}if(o.asyncValidator!==null){let n=Fi(i);if(Array.isArray(n)&&n.length>0){let s=n.filter(r=>r!==o.asyncValidator);s.length!==n.length&&(e=!0,i.setAsyncValidators(s))}}}let t=()=>{};return ft(o._rawValidators,t),ft(o._rawAsyncValidators,t),e}function fn(i,o){o.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&Ri(i,o)})}function gn(i,o){o.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&Ri(i,o),i.updateOn!=="submit"&&i.markAsTouched()})}function Ri(i,o){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),o.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function mn(i,o){let e=(t,n)=>{o.valueAccessor.writeValue(t),n&&o.viewToModelUpdate(t)};i.registerOnChange(e),o._registerOnDestroy(()=>{i._unregisterOnChange(e)})}function Li(i,o){i==null,Wt(i,o)}function vn(i,o){return gt(i,o)}function Gt(i,o){if(!i.hasOwnProperty("model"))return!1;let e=i.model;return e.isFirstChange()?!0:!Object.is(o,e.currentValue)}function _n(i){return Object.getPrototypeOf(i.constructor)===Je}function Bi(i,o){i._syncPendingControls(),o.forEach(e=>{let t=e.control;t.updateOn==="submit"&&t._pendingChange&&(e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1)})}function qt(i,o){if(!o)return null;Array.isArray(o);let e,t,n;return o.forEach(s=>{s.constructor===Mi?e=s:_n(s)?t=s:n=s}),n||t||e||null}function Cn(i,o){let e=i.indexOf(o);e>-1&&i.splice(e,1)}var yn={provide:W,useExisting:X(()=>Dn)},qe=Promise.resolve(),Dn=(()=>{class i extends W{callSetDisabledState;get submitted(){return ce(this.submittedReactive)}_submitted=S(()=>this.submittedReactive());submittedReactive=v(!1);_directives=new Set;form;ngSubmit=new pe;options;constructor(e,t,n){super(),this.callSetDisabledState=n,this.form=new Pe({},jt(e),Ut(t))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){qe.then(()=>{let t=this._findContainer(e.path);e.control=t.registerControl(e.name,e.control),Ke(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){qe.then(()=>{let t=this._findContainer(e.path);t&&t.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){qe.then(()=>{let t=this._findContainer(e.path),n=new Pe({});Li(n,e),t.registerControl(e.name,n),n.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){qe.then(()=>{let t=this._findContainer(e.path);t&&t.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,t){qe.then(()=>{this.form.get(e.path).setValue(t)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),Bi(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new ht(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1)}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(t){return new(t||i)(D(be,10),D(Me,10),D(Ee,8))};static \u0275dir=R({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup","",3,"formArray",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,n){t&1&&E("submit",function(r){return n.onSubmit(r)})("reset",function(){return n.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[$([yn]),U]})}return i})();function Ci(i,o){let e=i.indexOf(o);e>-1&&i.splice(e,1)}function yi(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var Qe=class extends Fe{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(o=null,e,t){super(zt(e),$t(t,e)),this._applyFormState(o),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),mt(e)&&(e.nonNullable||e.initialValueIsDefault)&&(yi(o)?this.defaultValue=o.value:this.defaultValue=o)}setValue(o,e={}){this.value=this._pendingValue=o,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(t=>t(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(o,e={}){this.setValue(o,e)}reset(o=this.defaultValue,e={}){this._applyFormState(o),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),e.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=!1,e?.emitEvent!==!1&&this._events.next(new Ze(this))}_updateValue(){}_anyControls(o){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(o){this._onChange.push(o)}_unregisterOnChange(o){Ci(this._onChange,o)}registerOnDisabledChange(o){this._onDisabledChange.push(o)}_unregisterOnDisabledChange(o){Ci(this._onDisabledChange,o)}_forEachChild(o){}_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(o){yi(o)?(this.value=this._pendingValue=o.value,o.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=o}};var Sn=i=>i instanceof Qe,bn=(()=>{class i extends W{_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 vt(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(n){return(e||(e=Ce(i)))(n||i)}})();static \u0275dir=R({type:i,standalone:!1,features:[U]})}return i})();var Mn={provide:re,useExisting:X(()=>_t)},Di=Promise.resolve(),_t=(()=>{class i extends re{_changeDetectorRef;callSetDisabledState;control=new Qe;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new pe;constructor(e,t,n,s,r,a){super(),this._changeDetectorRef=r,this.callSetDisabledState=a,this._parent=e,this._setValidators(t),this._setAsyncValidators(n),this.valueAccessor=qt(this,s)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let t=e.name.previousValue;this.formDirective.removeControl({name:t,path:this._getPath(t)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),Gt(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(){Ke(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){Di.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let t=e.isDisabled.currentValue,n=t!==0&&hi(t);Di.then(()=>{n&&!this.control.disabled?this.control.disable():!n&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?vt(e,this._parent):[e]}static \u0275fac=function(t){return new(t||i)(D(W,9),D(be,10),D(Me,10),D(ve,10),D(At,8),D(Ee,8))};static \u0275dir=R({type:i,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:[$([Mn]),U,Be]})}return i})();var Mr=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=R({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return i})(),En={provide:ve,useExisting:X(()=>wn),multi:!0},wn=(()=>{class i extends Je{writeValue(e){let t=e??"";this.setProperty("value",t)}registerOnChange(e){this.onChange=t=>{e(t==""?null:parseFloat(t))}}static \u0275fac=(()=>{let e;return function(n){return(e||(e=Ce(i)))(n||i)}})();static \u0275dir=R({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,n){t&1&&E("input",function(r){return n.onChange(r.target.value)})("blur",function(){return n.onTouched()})},standalone:!1,features:[$([En]),U]})}return i})(),xn={provide:ve,useExisting:X(()=>Vn),multi:!0};var On=(()=>{class i{_accessors=[];add(e,t){this._accessors.push([e,t])}remove(e){for(let t=this._accessors.length-1;t>=0;--t)if(this._accessors[t][1]===e){this._accessors.splice(t,1);return}}select(e){this._accessors.forEach(t=>{this._isSameGroup(t,e)&&t[1]!==e&&t[1].fireUncheck(e.value)})}_isSameGroup(e,t){return e[0].control?e[0]._parent===t._control._parent&&e[1].name===t.name:!1}static \u0275fac=function(t){return new(t||i)};static \u0275prov=we({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Vn=(()=>{class i extends Je{_registry;_injector;_state;_control;_fn;setDisabledStateFired=!1;onChange=()=>{};name;formControlName;value;callSetDisabledState=y(Ee,{optional:!0})??et;constructor(e,t,n,s){super(e,t),this._registry=n,this._injector=s}ngOnInit(){this._control=this._injector.get(re),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(t){return new(t||i)(D(de),D(I),D(On),D(xe))};static \u0275dir=R({type:i,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(t,n){t&1&&E("change",function(){return n.onChange()})("blur",function(){return n.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},standalone:!1,features:[$([xn]),U]})}return i})(),Tn={provide:ve,useExisting:X(()=>Nn),multi:!0},Nn=(()=>{class i extends Je{writeValue(e){this.setProperty("value",parseFloat(e))}registerOnChange(e){this.onChange=t=>{e(t==""?null:parseFloat(t))}}static \u0275fac=(()=>{let e;return function(n){return(e||(e=Ce(i)))(n||i)}})();static \u0275dir=R({type:i,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(t,n){t&1&&E("change",function(r){return n.onChange(r.target.value)})("input",function(r){return n.onChange(r.target.value)})("blur",function(){return n.onTouched()})},standalone:!1,features:[$([Tn]),U]})}return i})(),Lt=class extends Fe{constructor(o,e,t){super(zt(e),$t(t,e)),this.controls=o,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(o){return this.controls[this._adjustIndex(o)]}push(o,e={}){Array.isArray(o)?o.forEach(t=>{this.controls.push(t),this._registerControl(t)}):(this.controls.push(o),this._registerControl(o)),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(o,e,t={}){this.controls.splice(o,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:t.emitEvent})}removeAt(o,e={}){let t=this._adjustIndex(o);t<0&&(t=0),this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(o,e,t={}){let n=this._adjustIndex(o);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),e&&(this.controls.splice(n,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(o,e={}){ki(this,!1,o),o.forEach((t,n)=>{Pi(this,!1,n),this.at(n).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(o,e={}){o!=null&&(o.forEach((t,n)=>{this.at(n)&&this.at(n).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(o=[],e={}){this._forEachChild((t,n)=>{t.reset(o[n],j(P({},e),{onlySelf:!0}))}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new Ze(this))}getRawValue(){return this.controls.map(o=>o.getRawValue())}clear(o={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:o.emitEvent}))}_adjustIndex(o){return o<0?o+this.length:o}_syncPendingControls(){let o=this.controls.reduce((e,t)=>t._syncPendingControls()?!0:e,!1);return o&&this.updateValueAndValidity({onlySelf:!0}),o}_forEachChild(o){this.controls.forEach((e,t)=>{o(e,t)})}_updateValue(){this.value=this.controls.filter(o=>o.enabled||this.disabled).map(o=>o.value)}_anyControls(o){return this.controls.some(e=>e.enabled&&o(e))}_setUpControls(){this._forEachChild(o=>this._registerControl(o))}_allControlsDisabled(){for(let o of this.controls)if(o.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(o){o.setParent(this),o._registerOnCollectionChange(this._onCollectionChange)}_find(o){return this.at(o)??null}};var Hi=(()=>{class i extends W{callSetDisabledState;get submitted(){return ce(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=S(()=>this._submittedReactive());_submittedReactive=v(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];constructor(e,t,n){super(),this.callSetDisabledState=n,this._setValidators(e),this._setAsyncValidators(t)}ngOnChanges(e){this.onChanges(e)}ngOnDestroy(){this.onDestroy()}onChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}onDestroy(){this.form&&(gt(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get path(){return[]}addControl(e){let t=this.form.get(e.path);return Ke(t,e,this.callSetDisabledState),t.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),t}getControl(e){return this.form.get(e.path)}removeControl(e){pt(e.control||null,e,!1),Cn(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}getFormArray(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}updateModel(e,t){this.form.get(e.path).setValue(t)}onReset(){this.resetForm()}resetForm(e=void 0,t={}){this.form.reset(e,t),this._submittedReactive.set(!1)}onSubmit(e){return this.submitted=!0,Bi(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new ht(this.control)),e?.target?.method==="dialog"}_updateDomValue(){this.directives.forEach(e=>{let t=e.control,n=this.form.get(e.path);t!==n&&(pt(t||null,e),Sn(n)&&(Ke(n,e,this.callSetDisabledState),e.control=n))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let t=this.form.get(e.path);Li(t,e),t.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let t=this.form.get(e.path);t&&vn(t,e)&&t.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){Wt(this.form,this),this._oldForm&&gt(this._oldForm,this)}_checkFormPresent(){this.form}static \u0275fac=function(t){return new(t||i)(D(be,10),D(Me,10),D(Ee,8))};static \u0275dir=R({type:i,features:[U,Be]})}return i})();var Yt=new le(""),An={provide:re,useExisting:X(()=>In)},In=(()=>{class i extends re{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new pe;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,t,n,s,r){super(),this._ngModelWarningConfig=s,this.callSetDisabledState=r,this._setValidators(e),this._setAsyncValidators(t),this.valueAccessor=qt(this,n)}ngOnChanges(e){if(this._isControlChanged(e)){let t=e.form.previousValue;t&&pt(t,this,!1),Ke(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}Gt(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&pt(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(t){return new(t||i)(D(be,10),D(Me,10),D(ve,10),D(Yt,8),D(Ee,8))};static \u0275dir=R({type:i,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[$([An]),U,Be]})}return i})(),Fn={provide:W,useExisting:X(()=>ji)},ji=(()=>{class i extends bn{name=null;constructor(e,t,n){super(),this._parent=e,this._setValidators(t),this._setAsyncValidators(n)}_checkParentType(){zi(this._parent)}static \u0275fac=function(t){return new(t||i)(D(W,13),D(be,10),D(Me,10))};static \u0275dir=R({type:i,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[$([Fn]),U]})}return i})(),Pn={provide:W,useExisting:X(()=>Ui)},Ui=(()=>{class i extends W{_parent;name=null;constructor(e,t,n){super(),this._parent=e,this._setValidators(t),this._setAsyncValidators(n)}ngOnInit(){zi(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 vt(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(t){return new(t||i)(D(W,13),D(be,10),D(Me,10))};static \u0275dir=R({type:i,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[$([Pn]),U]})}return i})();function zi(i){return!(i instanceof ji)&&!(i instanceof Hi)&&!(i instanceof Ui)}var kn={provide:re,useExisting:X(()=>Rn)},Rn=(()=>{class i extends re{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new pe;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,t,n,s,r){super(),this._ngModelWarningConfig=r,this._parent=e,this._setValidators(t),this._setAsyncValidators(n),this.valueAccessor=qt(this,s)}ngOnChanges(e){this._added||this._setUpControl(),Gt(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 vt(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(t){return new(t||i)(D(W,13),D(be,10),D(Me,10),D(ve,10),D(Yt,8))};static \u0275dir=R({type:i,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[$([kn]),U,Be]})}return i})();var Ln={provide:W,useExisting:X(()=>Bn)},Bn=(()=>{class i extends Hi{form=null;ngSubmit=new pe;get control(){return this.form}static \u0275fac=(()=>{let e;return function(n){return(e||(e=Ce(i)))(n||i)}})();static \u0275dir=R({type:i,selectors:[["","formGroup",""]],hostBindings:function(t,n){t&1&&E("submit",function(r){return n.onSubmit(r)})("reset",function(){return n.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[$([Ln]),U]})}return i})();var $i=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=He({type:i});static \u0275inj=Le({})}return i})();function Si(i){return!!i&&(i.asyncValidators!==void 0||i.validators!==void 0||i.updateOn!==void 0)}var Er=(()=>{class i{useNonNullable=!1;get nonNullable(){let e=new i;return e.useNonNullable=!0,e}group(e,t=null){let n=this._reduceControls(e),s={};return Si(t)?s=t:t!==null&&(s.validators=t.validator,s.asyncValidators=t.asyncValidator),new Pe(n,s)}record(e,t=null){let n=this._reduceControls(e);return new Rt(n,t)}control(e,t,n){let s={};return this.useNonNullable?(Si(t)?s=t:(s.validators=t,s.asyncValidators=n),new Qe(e,j(P({},s),{nonNullable:!0}))):new Qe(e,t,n)}array(e,t,n){let s=e.map(r=>this._createControl(r));return new Lt(s,t,n)}_reduceControls(e){let t={};return Object.keys(e).forEach(n=>{t[n]=this._createControl(e[n])}),t}_createControl(e){if(e instanceof Qe)return e;if(e instanceof Fe)return e;if(Array.isArray(e)){let t=e[0],n=e.length>1?e[1]:null,s=e.length>2?e[2]:null;return this.control(t,n,s)}else return this.control(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=we({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var wr=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:Ee,useValue:e.callSetDisabledState??et}]}}static \u0275fac=function(t){return new(t||i)};static \u0275mod=He({type:i});static \u0275inj=Le({imports:[$i]})}return i})(),xr=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:Yt,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Ee,useValue:e.callSetDisabledState??et}]}}static \u0275fac=function(t){return new(t||i)};static \u0275mod=He({type:i});static \u0275inj=Le({imports:[$i]})}return i})();var Y=["*"],Hn=[[["","icon",""]],[["sh-icon"]],[["","title",""]],"*",[["","content",""]],[["p"]]],jn=["[icon]","sh-icon","[title]","*","[content]","p"];function Un(i,o){i&1&&(h(0,"sh-icon",3),C(1,"info"),g())}function zn(i,o){i&1&&(h(0,"sh-icon",3),C(1,"info"),g())}function $n(i,o){i&1&&(h(0,"sh-icon",3),C(1,"warning"),g())}function Wn(i,o){i&1&&(h(0,"sh-icon",3),C(1,"warning-octagon"),g())}function Gn(i,o){i&1&&(h(0,"sh-icon",3),C(1,"check-circle"),g())}function qn(i,o){i&1&&(h(0,"sh-icon",3),C(1,"question"),g())}function Yn(i,o){if(i&1){let e=z();h(0,"sh-icon",7),E("click",function(){w(e);let n=f();return x(n.removeAlert())}),C(1,"plus"),g()}}var Xn=["dialogRef"];function Qn(i,o){if(i&1){let e=z();A(0,"div",5),Se("click",function(){w(e);let n=f(2);return x(n.isOpen.set(!1))}),F()}}function Zn(i,o){if(i&1&&(A(0,"dialog",2,0)(2,"div",3),u(3),F(),b(4,Qn,1,0,"div",4),F()),i&2){let e=f(),t=L(0);Z(t.class),G("width",t.width??"")("max-width",t.maxWidth??"")("max-height",t.maxHeight??"")("height",t.height??""),p(4),M(e.defaultOptionMerge().closeOnOutsideClick?4:-1)}}var Kn=["shButton",""];var Jn=["daysRef"];function eo(i,o){if(i&1&&C(0),i&2){let e=f();K(" - ",e.getMonthName(e.getLastVisibleMonth())," ")}}function to(i,o){if(i&1&&(h(0,"div"),C(1),g()),i&2){let e=o.$implicit;p(),Ne(e)}}function io(i,o){if(i&1){let e=z();h(0,"div",2,1),E("click",function(){let n=w(e).$implicit,s=xt(1),r=f(2);return x(r.setDate(n,s))}),C(2),g()}if(i&2){let e=o.$implicit,t=f().$implicit,n=f();Z(n.isDateSelected(e)),N("out-of-scope",!n.isCurrentMonth(e,t)),p(2),K(" ",e.getDate()," ")}}function no(i,o){if(i&1&&(h(0,"article",7),oe(1,"div",9),g()),i&2){let e=f(2);p(),Ot(e.selectedDateStylePosition())}}function oo(i,o){if(i&1&&(h(0,"div",5)(1,"nav",6),Ve(2,to,2,1,"div",null,je),g(),h(4,"div",7,0),Ve(6,io,3,5,"div",8,je),b(8,no,2,2,"article",7),g()()),i&2){let e=o.$implicit,t=f();p(2),Te(t.weekdays()),p(4),Te(t.getMonthDates(e)),p(2),M(t.asRange()?-1:8)}}var so=["triggerRef"],ro=["popoverRef"],ao=["popoverContentRef"],lo=[[["","trigger",""]],[["button"]],[["","shButton",""]],"*"],co=["[trigger]","button","[shButton]","*"];function uo(i,o){if(i&1){let e=z();A(0,"div",6,1)(2,"div",7),Se("click",function(n){w(e);let s=f();return x(s.eventClose(n))}),F(),A(3,"div",8,2),u(5,3),F()()}if(i&2){let e=f();ge("id",e.id()+"hello"),p(3),Ot(e.menuStyle()),G("position-anchor",e.id())}}var ho=[[["label"]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["","popoverContent",""]],[["textarea"]],[["","textSuffix",""]],[["","suffix",""]],[["","error",""]],[["","hint",""]]],po=["label","[prefix]","[textPrefix]","input","[popoverContent]","textarea","[textSuffix]","[suffix]","[error]","[hint]"],Wi=()=>({closeOnButton:!1,closeOnEsc:!0}),fo=[[["label"]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["","textSuffix",""]],[["","suffix",""]]],go=["label","[prefix]","[textPrefix]","input","[textSuffix]","[suffix]"];function mo(i,o){if(i&1&&(h(0,"div",3),C(1),g()),i&2){let e=f();p(),K(" ",e._maskedDate()," ")}}function vo(i,o){if(i&1){let e=z();h(0,"sh-datepicker",7),E("dateChange",function(n){w(e);let s=f();return x(s.onDateChange(n))}),g()}if(i&2){let e=f();Z(e.currentClass()),Q("date",e.internalDate())}}function _o(i,o){}var Co=[[["label"]],[["","boxPrefix",""]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["textarea"]],[["","textSuffix",""]],[["","suffix",""]],[["","boxSuffix",""]],[["","error",""]],[["","hint",""]]],yo=["label","[boxPrefix]","[prefix]","[textPrefix]","input","textarea","[textSuffix]","[suffix]","[boxSuffix]","[error]","[hint]"],Do=["input"],So=[[["label"]]],bo=["label"];function Mo(i,o){if(i&1&&(h(0,"div",3),C(1),g()),i&2){let e=f();p(),Ne(e.files()[0].name)}}function Eo(i,o){if(i&1&&(h(0,"div",3),C(1),g()),i&2){let e=f();p(),K("",e.files().length," files selected")}}function wo(i,o){if(i&1&&(h(0,"div",4),C(1),g()),i&2){let e=f();p(),Ne(e.filesOver()?e.overlayText():e.placeholder())}}var xo=["inputRef"],Oo=["optionsRef"],Vo=["*",[["","menu",""]]],To=["*","[menu]"];function No(i,o){i&1&&(h(0,"sh-icon",5),C(1,"caret-down"),g())}var Ao=[[["label"]],[["input","type","range"]]],Io=["label","input[type=range]"],Fo=["optionsWrap"],Po=[[["label"]],[["","prefix",""]],[["","boxPrefix",""]],[["input"]],[["textarea"]]],ko=["label","[prefix]","[boxPrefix]","input","textarea"],Ro=()=>({closeOnButton:!1,closeOnEsc:!1}),Gi=(i,o)=>({$implicit:i,last:o}),Xt=i=>({$implicit:i});function Lo(i,o){if(i&1&&C(0),i&2){let e=f();K(" ",e.inputValue()," ")}}function Bo(i,o){i&1&&De(0)}function Ho(i,o){if(i&1&&fe(0,Bo,1,0,"ng-container",13),i&2){let e=f(3),t=e.$implicit,n=e.$index,s=e.$count;f(2);let r=L(3);Q("ngTemplateOutlet",r)("ngTemplateOutletContext",Vt(2,Gi,t,n===s-1))}}function jo(i,o){if(i&1&&C(0),i&2){let e=f(3).$implicit,t=f(2);K(" ",t.getLabel(e)," ")}}function Uo(i,o){if(i&1){let e=z();h(0,"sh-chip",12),E("click",function(n){w(e);let s=f(2).$index,r=f(2);return x(r.removeSelectedOptionByIndex(n,s))}),b(1,Ho,1,5,"ng-container")(2,jo,1,1),h(3,"sh-icon"),C(4,"x-bold"),g()()}if(i&2){let e=f(4),t=L(3);Z(e.selectClasses()),p(),M(t?1:2)}}function zo(i,o){i&1&&De(0)}function $o(i,o){if(i&1&&fe(0,zo,1,0,"ng-container",13),i&2){let e=f(4),t=e.$implicit,n=e.$index,s=e.$count;f(2);let r=L(3);Q("ngTemplateOutlet",r)("ngTemplateOutletContext",Vt(2,Gi,t,n===s-1))}}function Wo(i,o){if(i&1&&C(0),i&2){let e=f(4),t=e.$implicit,n=e.$index,s=e.$count,r=f(2);K(" ",n===s-1?r.getLabel(t):r.getLabel(t)+","," ")}}function Go(i,o){if(i&1&&b(0,$o,1,5,"ng-container")(1,Wo,1,1),i&2){f(5);let e=L(3);M(e?0:1)}}function qo(i,o){if(i&1&&b(0,Go,2,1),i&2){f(4);let e=L(6);M(e?-1:0)}}function Yo(i,o){if(i&1&&b(0,Uo,5,3,"sh-chip",11)(1,qo,1,1),i&2){f(3);let e=L(5);M(e?0:1)}}function Xo(i,o){if(i&1&&b(0,Yo,2,1),i&2){let e=o.$implicit;M(e?0:-1)}}function Qo(i,o){if(i&1&&Ve(0,Xo,1,1,null,null,je),i&2){f();let e=L(2);Te(e)}}function Zo(i,o){i&1&&De(0)}function Ko(i,o){if(i&1&&fe(0,Zo,1,0,"ng-container",14),i&2){f(2);let e=L(0);Q("ngTemplateOutlet",e)}}function Jo(i,o){if(i&1&&C(0),i&2){let e=f(2);K(" ",e.placeholderText()??""," ")}}function es(i,o){if(i&1&&b(0,Ko,1,1,"ng-container")(1,Jo,1,1),i&2){f();let e=L(0);M(e?0:1)}}function ts(i,o){i&1&&(h(0,"sh-icon",6),C(1,"caret-down"),g())}function is(i,o){i&1&&oe(0,"sh-spinner",7)}function ns(i,o){i&1&&(h(0,"sh-icon",6),C(1,"list-magnifying-glass"),g())}function os(i,o){i&1&&(h(0,"sh-icon",6),C(1,"magnifying-glass"),g())}function ss(i,o){if(i&1){let e=z();h(0,"sh-icon",15),E("click",function(n){w(e);let s=f();return x(s.clear(n))}),C(1,"x-bold"),g()}}function rs(i,o){i&1&&(h(0,"sh-icon",6),C(1,"caret-down"),g())}function as(i,o){i&1&&(h(0,"sh-icon",6),C(1,"caret-up"),g())}function ls(i,o){if(i&1&&(h(0,"p",9),C(1),g()),i&2){let e=f(3);p(),Ne(e.freeTextTitle())}}function cs(i,o){i&1&&De(0)}function ds(i,o){if(i&1&&fe(0,cs,1,0,"ng-container",13),i&2){f(2);let e=L(0);f();let t=L(1);Q("ngTemplateOutlet",t)("ngTemplateOutletContext",rt(2,Xt,e))}}function us(i,o){i&1&&De(0)}function hs(i,o){if(i&1&&fe(0,us,1,0,"ng-container",13),i&2){f(2);let e=L(0);f();let t=L(4);Q("ngTemplateOutlet",t)("ngTemplateOutletContext",rt(2,Xt,e))}}function ps(i,o){if(i&1&&C(0),i&2){f(2);let e=L(1);K(" ",e," ")}}function fs(i,o){i&1&&oe(0,"sh-divider")}function gs(i,o){if(i&1){let e=z();b(0,ls,2,1,"p",9),h(1,"li",16),E("click",function(){w(e);let n=f(2);return x(n.toggleOptionByIndex(-1))}),b(2,ds,1,4,"ng-container")(3,hs,1,4,"ng-container")(4,ps,1,1),g(),b(5,fs,1,0,"sh-divider")}if(i&2){f();let e=L(0),t=f(),n=L(1),s=L(4);M(t.freeTextTitle()?0:-1),p(),N("selected",t.isSelected(-1))("focused",t.focusedOptionIndex()===-1),Q("id",t.getLabelAsSlug(e)),ge("aria-selected",t.isSelected(-1)),p(),M(n?2:s?3:4),p(3),M(t.freeTextTitle()&&t.filteredOptions().length>0?5:-1)}}function ms(i,o){if(i&1&&(ot(0)(1),b(2,gs,6,9)),i&2){let e=f(),t=ne(e.computedFreeTextOption());p();let n=ne(e.getValue(t));p(),M(n.length>0?2:-1)}}function vs(i,o){if(i&1&&(h(0,"p",9),C(1),g()),i&2){let e=f();p(),Ne(e.optionTitle())}}function _s(i,o){if(i&1&&oe(0,"sh-checkbox"),i&2){let e=f().$index,t=f();Z(t.selectClasses()),N("active",t.isSelected(e))}}function Cs(i,o){i&1&&De(0)}function ys(i,o){if(i&1&&fe(0,Cs,1,0,"ng-container",13),i&2){let e=f().$implicit;f();let t=L(4);Q("ngTemplateOutlet",t)("ngTemplateOutletContext",rt(2,Xt,e))}}function Ds(i,o){if(i&1&&C(0),i&2){let e=f().$implicit,t=f();K(" ",t.getLabel(e)," ")}}function Ss(i,o){if(i&1){let e=z();h(0,"li",16),E("click",function(){let n=w(e).$index,s=f();return x(s.toggleOptionByIndex(n))}),b(1,_s,1,4,"sh-checkbox",17),b(2,ys,1,4,"ng-container")(3,Ds,1,1),g()}if(i&2){let e=o.$implicit,t=o.$index,n=f(),s=L(4);N("selected",n.isSelected(t))("focused",t===n.focusedOptionIndex()),Q("id",n.getLabelAsSlug(e)),ge("aria-selected",n.isSelected(t)),p(),M(n.selectMultiple()?1:-1),p(),M(s?2:3)}}var bs=["dragImageElement"],Ms=[[["","sidenav",""]],[["","sidenav-closed-topbar",""]],"*"],Es=["[sidenav]","[sidenav-closed-topbar]","*"];function ws(i,o){i&1&&ye(0,"div",1,0)}function xs(i,o){if(i&1){let e=z();A(0,"div",7),Se("drop",function(n){w(e);let s=f();return x(s.drop(n))})("dragenter",function(){w(e);let n=f();return x(n.dragEnter())})("dragleave",function(){w(e);let n=f();return x(n.dragLeave())}),F()}}function Os(i,o){if(i&1){let e=z();A(0,"div",8),Se("dragstart",function(n){w(e);let s=f();return x(s.dragStart(n))})("dragend",function(n){w(e);let s=f();return x(s.dragEnd(n))})("drag",function(n){w(e);let s=f();return x(s.drag(n))})("touchstart",function(n){w(e);let s=f();return x(s.touchStart(n))})("touchmove",function(n){w(e);let s=f();return x(s.touchMove(n))})("touchend",function(n){w(e);let s=f();return x(s.touchEnd(n))})("touchcancel",function(n){w(e);let s=f();return x(s.touchCancel(n))}),F()}}var Vs=["thead"],Ts=["tbody"],Ns=[[["th"]],[["","thead",""]],"*",[["","table-no-rows",""]]],As=["th","[thead]","*","[table-no-rows]"];function Is(i,o){i&1&&oe(0,"sh-progress-bar",2)}function Fs(i,o){i&1&&(h(0,"div",3),u(1,3),g())}var Ps=[[["","title",""]],"*"],ks=["[title]","*"];function Rs(i,o){i&1&&C(0,"Title")}function Ls(i,o){i&1&&(h(0,"sh-icon",1),C(1,"caret-down"),g())}var Bs=["bold","thin","light","fill","duotone"],_e=(()=>{class i{#e=y(I);#i=y(de);ngAfterContentInit(){let e=this.#e.nativeElement.textContent?.trim();if(!e)return;let t=e.split("-").at(-1);t&&Bs.includes(t)&&this.#i.addClass(this.#e.nativeElement,t)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-icon"]],ngContentSelectors:Y,decls:1,vars:0,template:function(t,n){t&1&&(T(),u(0))},encapsulation:2,changeDetection:0})}}return i})();function Re(i=null){let o=i??y(I).nativeElement;if(!o)return v("");let e=v(o.className);if(typeof MutationObserver>"u")return e.asReadonly();let t=y(he),n=new MutationObserver(s=>{for(let r of s)if(r.type==="attributes"&&r.attributeName==="class"){let a=r.target;e.set(a.className)}});return n.observe(o,{attributes:!0,attributeFilter:["class"]}),t.onDestroy(()=>n.disconnect()),e.asReadonly()}var yt=new le("Ship UI Config"),Hs=["simple","outlined","flat","raised"],Kr=(()=>{class i{constructor(){this.#e=y(yt,{optional:!0}),this.variant=v(this.#e?.alertVariant??""),this._el=y(I),this.alertService=m(null),this.id=m(null),this.currentClasses=Re(),this.activeClass=S(()=>{let e=this.variant(),t=`${this.currentClasses()} sh-sheet`;return e?Hs.find(s=>this.currentClasses().includes(s))?t:`${t} ${e}`:t})}#e;removeAlert(){this.id()&&this.alertService()&&this.alertService()?.removeAlert(this.id())}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-alert"]],hostVars:2,hostBindings:function(t,n){t&2&&Z(n.activeClass())},inputs:{alertService:[1,"alertService"],id:[1,"id"]},ngContentSelectors:jn,decls:19,vars:4,consts:[["ref",""],[1,"alert"],[1,"icon"],[1,"state-icon"],[1,"title"],[1,"close-icon"],[1,"content"],[1,"close-icon",3,"click"]],template:function(t,n){if(t&1&&(T(Hn),h(0,"div",1)(1,"div",2,0),u(3),u(4,1),g(),h(5,"div",2),b(6,Un,2,0,"sh-icon",3)(7,zn,2,0,"sh-icon",3)(8,$n,2,0,"sh-icon",3)(9,Wn,2,0,"sh-icon",3)(10,Gn,2,0,"sh-icon",3)(11,qn,2,0,"sh-icon",3),g(),h(12,"div",4),u(13,2),u(14,3),g(),b(15,Yn,2,0,"sh-icon",5),h(16,"div",6),u(17,4),u(18,5),g()()),t&2){let s=xt(2);p(),G("display",s.children.length?"block":"none");let r=n.currentClasses();p(5),M(r.includes("primary")?6:r.includes("accent")?7:r.includes("warn")?8:r.includes("error")?9:r.includes("success")?10:11),p(9),M(n.id()?15:-1)}},dependencies:[_e],encapsulation:2,changeDetection:0})}}return i})();function Dt(){return Date.now().toString(36)+Math.random().toString(36).substring(2)}var Jr=(()=>{class i{constructor(){this.alertHistory=v([]),this.alertHistoryIsOpen=v(!1),this.alertHistoryIsHidden=v(!0)}error(e){this.addAlert({type:"error",title:e??"An error occured"})}success(e){this.addAlert({type:"success",title:e})}question(e){this.addAlert({type:"question",title:e})}warning(e){this.addAlert({type:"warn",title:e})}info(e){this.addAlert({type:"primary",title:e})}addAlert(e){let t=Dt();this.alertHistory.update(n=>[j(P({},e),{isOpen:!0,animateIn:!0,animateOut:!1,id:t}),...n]),setTimeout(()=>{this.alertHistory.update(n=>n.map(s=>j(P({},s),{animateIn:s.id===t?!1:s.animateIn})))},40),setTimeout(()=>{this.hideAlert(t)},2500)}removeAlert(e){this.alertHistory.update(t=>t.map(n=>j(P({},n),{animateOut:n.id===e?!1:n.animateOut}))),setTimeout(()=>{this.alertHistory.update(t=>t.filter(n=>n.id!==e))},300)}hideAlert(e){this.alertHistory.update(t=>t.map(n=>j(P({},n),{isOpen:n.id===e?!1:n.isOpen})))}setHidden(e){this.alertHistoryIsHidden.set(e)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=we({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),js={class:"default",width:void 0,maxWidth:void 0,height:void 0,maxHeight:void 0,closeOnButton:!0,closeOnEsc:!0,closeOnOutsideClick:!0},Us=(()=>{class i{constructor(){this.#e=y(Oe),this.#i=y(yt,{optional:!0}),this.dialogRef=J("dialogRef"),this.isOpen=H(!1),this.options=m(),this.closed=se(),this.defaultOptionMerge=S(()=>P(j(P({},js),{class:this.#i?.dialogType??"default"}),this.options())),this.abortController=null,this.isOpenEffect=k(()=>{let e=this.dialogRef()?.nativeElement;e&&(this.abortController&&this.abortController.abort(),this.abortController=new AbortController,this.isOpen()?(e.showModal(),e.addEventListener("close",()=>{this.isOpen.set(!1),this.closed.emit()},{signal:this.abortController?.signal}),this.#e.addEventListener("keydown",t=>{t.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&t.preventDefault(),t.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},{signal:this.abortController?.signal})):(e.close(),queueMicrotask(()=>this.closed.emit())))})}#e;#i;ngOnDestroy(){this.abortController?.abort()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-dialog"]],viewQuery:function(t,n){t&1&&ue(n.dialogRef,Xn,5),t&2&&ie()},inputs:{isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:Y,decls:2,vars:2,consts:[["dialogRef",""],["shDialog","",3,"class","width","max-width","max-height","height"],["shDialog",""],[1,"content"],[1,"closeable-overlay"],[1,"closeable-overlay",3,"click"]],template:function(t,n){t&1&&(T(),ot(0),b(1,Zn,5,11,"dialog",1)),t&2&&(ne(n.defaultOptionMerge()),p(),M(n.isOpen()?1:-1))},encapsulation:2,changeDetection:0})}}return i})(),ea=(()=>{class i{constructor(){this.#e=y(Oe),this.#i=this.#e.querySelector("body"),this.#t=y(Et),this.compRef=null,this.insertedCompRef=null,this.closedFieldSub=null,this.compClosedSub=null}#e;#i;#t;open(e,t){let n=this.#t.injector,s=this.#n(),r=!1,ee=t||{},{data:a,closed:l}=ee,c=Kt(ee,["data","closed"]);this.compRef&&this.#o(!0),this.insertedCompRef=It(e,{environmentInjector:n}),this.compRef=It(Us,{hostElement:s,environmentInjector:n,projectableNodes:[[this.insertedCompRef.location.nativeElement]]});let d=this.insertedCompRef.instance,_=d.data,V=d.closed;if(a){if(Mt(_))this.insertedCompRef.setInput("data",a);else if(!Mt(_))throw new Error("data is not an input signal on the passed component")}V instanceof Tt&&(this.closedFieldSub=V.subscribe(ae=>{this.#o(),!r&&(r=!0,l?.(ae),(this.compRef?.instance.closed).emit(ae))})),this.#t.attachView(this.insertedCompRef.hostView),this.#t.attachView(this.compRef.hostView),this.insertedCompRef.changeDetectorRef.detectChanges(),this.compRef.changeDetectorRef.detectChanges(),this.compRef.instance.isOpen.set(!0),this.compRef.setInput("options",c),this.compClosedSub=this.compRef.instance.closed.subscribe(()=>te());let B=this;function te(ae=void 0){B.#o(),!r&&(r=!0,V&&V instanceof Tt&&V.emit(ae),l?.(ae))}return{component:this.insertedCompRef.instance,close:te,closed:this.compRef.instance.closed}}#n(){let e=this.#e.createElement("sh-dialog-ref");return e.id="sh-dialog-ref",this.#e.getElementById("sh-dialog-ref")||this.#i?.append(e),this.#e.getElementById("sh-dialog-ref")}#o(e=!1){let t=this;e||queueMicrotask(()=>n());function n(){t.insertedCompRef&&(t.#t.detachView(t.insertedCompRef.hostView),t.closedFieldSub?.unsubscribe(),t.insertedCompRef.destroy()),t.compRef&&(t.#t.detachView(t.compRef.hostView),t.compClosedSub?.unsubscribe(),t.compRef.destroy())}}ngOnDestroy(){this.#o(!0)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=we({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var ta=(()=>{class i{constructor(){this.id="--"+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,12)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-button-group"]],hostVars:2,hostBindings:function(t,n){t&2&&G("--btng-id",n.id)},ngContentSelectors:Y,decls:1,vars:0,template:function(t,n){t&1&&(T(),u(0))},encapsulation:2,changeDetection:0})}}return i})(),ia=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["","shButton",""]],hostAttrs:[1,"sh-sheet-h"],attrs:Kn,ngContentSelectors:Y,decls:1,vars:0,template:function(t,n){t&1&&(T(),u(0))},encapsulation:2,changeDetection:0})}}return i})(),na=(()=>{class i{constructor(){this.#e=y(yt,{optional:!0}),this.class=v(this.#e?.cardType??"type-a")}#e;static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-card"]],hostVars:2,hostBindings:function(t,n){t&2&&Z(n.class())},ngContentSelectors:Y,decls:1,vars:0,template:function(t,n){t&1&&(T(),u(0))},encapsulation:2,changeDetection:0})}}return i})(),zs=(()=>{class i{constructor(){this.currentClassList=Re()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-checkbox"]],ngContentSelectors:Y,decls:7,vars:2,consts:[[1,"box","sh-sheet"],[1,"inherit","default-indicator"],[1,"inherit","indeterminate-indicator"],[1,"label"]],template:function(t,n){t&1&&(T(),h(0,"div",0)(1,"sh-icon",1),C(2,"check-bold"),g(),h(3,"sh-icon",2),C(4,"minus-bold"),g()(),h(5,"div",3),u(6),g()),t&2&&Z(n.currentClassList())},dependencies:[_e],encapsulation:2,changeDetection:0})}}return i})(),$s=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-chip"]],hostAttrs:[1,"sh-sheet"],ngContentSelectors:Y,decls:2,vars:0,template:function(t,n){t&1&&(T(),A(0,"div"),u(1),F())},encapsulation:2,changeDetection:0})}}return i})();var Ws=(()=>{class i{constructor(){this.#e=this.#r(new Date),this.date=H(null),this.endDate=H(null),this.asRange=m(!1),this.monthsToShow=m(1),this.disabled=m(!1),this.startOfWeek=m(1),this.weekdayLabels=m(["Su","Mo","Tu","We","Th","Fr","Sa"]),this.daysRef=J("daysRef"),this.currentDate=v(this.date()??this.#e),this.monthOffsets=S(()=>Array.from({length:this.monthsToShow()},(e,t)=>t)),this.selectedDateStylePosition=v(null),this.weekdays=S(()=>{let e=this.startOfWeek(),t=this.weekdayLabels();return t.slice(e).concat(t.slice(0,e))}),this.currentClasses=Re(),this.someEffect=k(()=>{let e=this.currentClasses();this.#n()}),this.#i=k(()=>{this.monthsToShow()>1||this.#t()})}#e;getLastVisibleMonth(){let e=this.monthsToShow()-1;return this.getOffsetDate(e)}getOffsetDate(e){let t=new Date(this.currentDate());return t.setMonth(t.getMonth()+e),t}getMonthDates(e){let t=this.getOffsetDate(e);return this.#o(t,this.startOfWeek())}#i;ngOnInit(){this.monthsToShow()!==1&&this.#t()}#t(){let e=this.date();e&&this.currentDate.set(e),this.#n()}#n(){setTimeout(()=>{let e=this.daysRef()?.nativeElement.querySelector(".sel");if(!e)return this.selectedDateStylePosition.update(t=>t?j(P({},t),{opacity:"0"}):null);this.setSelectedDateStylePosition(e)})}#o(e,t){let n=e.getUTCFullYear(),s=e.getUTCMonth(),r=new Date(Date.UTC(n,s)).getUTCDay(),a=32-new Date(Date.UTC(n,s,32)).getUTCDate(),l=[],c=r-t;c<0&&(c+=7);let d=new Date(Date.UTC(n,s,0)).getUTCDate();for(let V=c-1;V>=0;V--){let B=new Date(Date.UTC(n,s-1,d-V));l.push(B)}for(let V=1;V<=a;V++)l.push(new Date(Date.UTC(n,s,V)));let _=1;for(;l.length%7!==0;)l.push(new Date(Date.UTC(n,s+1,_++)));return l}nextMonth(){this.currentDate.update(e=>{let t=new Date(e);return t.setMonth(e.getMonth()+1),t}),this.#n()}previousMonth(){this.currentDate.update(e=>{let t=new Date(e);return t.setMonth(e.getMonth()-1),t}),this.#n()}setDate(e,t){let n=(s,r)=>{let a=r?.getUTCHours()??0,l=r?.getUTCMinutes()??0,c=r?.getUTCSeconds()??0,d=r?.getUTCMilliseconds()??0;return this.#r(new Date(Date.UTC(s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate(),a,l,c,d)))};if(!this.asRange())this.date.set(n(e,this.date())),this.endDate.set(null);else{let s=this.date(),r=this.endDate(),a=n(e,null);s?r?(this.date.set(a),this.endDate.set(null)):a<s?(this.date.set(a),this.endDate.set(null)):this.endDate.set(a):this.date.set(a)}this.asRange()||this.setSelectedDateStylePosition(t)}isDateSelected(e){let t=this.date(),n=this.endDate();if(t===null)return null;let s=_=>new Date(Date.UTC(_.getUTCFullYear(),_.getUTCMonth(),_.getUTCDate(),0,0,0,0)),r=_=>new Date(Date.UTC(_.getUTCFullYear(),_.getUTCMonth(),_.getUTCDate(),23,59,59,999)),a=s(e),l=s(t),c=n?r(n):null,d=[];if(this.asRange())if(c===null)a.getTime()===l.getTime()&&d.push("sel first last");else{if(a.getTime()===l.getTime()&&d.push("first"),a.getTime()===s(c).getTime()&&d.push("last"),a>=l&&a<=c){d.push("sel");let ee=a.getUTCDay(),ae=this.startOfWeek();ee===ae&&d.push("week-start");let St=(ae+6)%7;ee===St&&d.push("week-end")}let _=new Date(a);_.setUTCDate(a.getUTCDate()+1),new Date(a).setUTCDate(a.getUTCDate()-1);let B=a.getUTCDate()===1,te=_.getUTCMonth()!==a.getUTCMonth();B&&d.push("month-start"),te&&d.push("month-end")}else a.getTime()===l.getTime()&&d.push("sel");return d.join(" ")||null}setSelectedDateStylePosition(e){this.selectedDateStylePosition.set({transform:`translate(${e.offsetLeft}px, ${e.offsetTop}px)`,opacity:"1"})}getMonthName(e){return e.toLocaleString("default",{month:"long"})}getFullYear(e){return e.getFullYear()}isCurrentMonth(e,t){let n=this.getOffsetDate(t);return e.getMonth()===n.getMonth()}#r(e){let n=e.getTimezoneOffset()*60*1e3;return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())+n)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-datepicker"]],viewQuery:function(t,n){t&1&&ue(n.daysRef,Jn,5),t&2&&ie()},hostVars:6,hostBindings:function(t,n){t&2&&(Z("columns-"+n.monthsToShow()),N("as-range",n.asRange())("disabled",n.disabled()))},inputs:{date:[1,"date"],endDate:[1,"endDate"],asRange:[1,"asRange"],monthsToShow:[1,"monthsToShow"],disabled:[1,"disabled"],startOfWeek:[1,"startOfWeek"],weekdayLabels:[1,"weekdayLabels"]},outputs:{date:"dateChange",endDate:"endDateChange"},decls:14,vars:3,consts:[["daysRef",""],["elementRef",""],[3,"click"],[1,"title"],[1,"months-container"],[1,"month"],[1,"weekdays"],[1,"days"],[3,"out-of-scope","class"],[1,"sel-el"]],template:function(t,n){t&1&&(h(0,"header")(1,"button",2),E("click",function(){return n.previousMonth()}),h(2,"sh-icon"),C(3,"caret-left"),g()(),h(4,"div",3),C(5),b(6,eo,1,1),C(7),g(),h(8,"button",2),E("click",function(){return n.nextMonth()}),h(9,"sh-icon"),C(10,"caret-right"),g()()(),h(11,"section",4),Ve(12,oo,9,1,"div",5,di),g()),t&2&&(p(5),K(" ",n.getMonthName(n.currentDate())," "),p(),M(n.monthsToShow()>1?6:-1),p(),K(" ",n.getFullYear(n.currentDate())," "),p(5),Te(n.monthOffsets()))},dependencies:[_e],encapsulation:2,changeDetection:0})}}return i})(),Ct=4,Gs=["scroll","auto"],qs={width:void 0,height:void 0,closeOnButton:!0,closeOnEsc:!0},Qt=(()=>{class i{constructor(){this.#e=y(Oe),this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.asMultiLayer=m(!1),this.disableOpenByClick=m(!1),this.isOpen=H(!1),this.options=m(),this.closed=se(),this.defaultOptionMerge=S(()=>P(P({},qs),this.options())),this.triggerRef=J.required("triggerRef"),this.popoverRef=J("popoverRef"),this.popoverContentRef=J("popoverContentRef"),this.id=v("--"+Dt()),this.menuStyle=v(null),this.openAbort=null,this.openEffect=k(()=>{let e=this.isOpen();queueMicrotask(()=>{let t=this.popoverRef()?.nativeElement;if(!t){this.openAbort?.abort(),this.openAbort=null;return}e?(this.openAbort&&this.openAbort.abort(),this.openAbort=new AbortController,this.#e.addEventListener("keydown",n=>{n.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&n.preventDefault(),n.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},{signal:this.openAbort?.signal}),t.showPopover(),this.SUPPORTS_ANCHOR||setTimeout(()=>{this.#i(t).addEventListener("scroll",()=>this.#a(),{signal:this.openAbort?.signal}),window?.addEventListener("resize",()=>this.#a(),{signal:this.openAbort?.signal}),this.#a()})):(this.closed.emit(),this.openAbort?.abort(),this.openAbort=null)})})}#e;toggleIsOpen(e){this.disableOpenByClick()||(e.preventDefault(),e.stopPropagation(),this.isOpen.set(!this.isOpen()))}eventClose(e){this.isOpen()&&this.isOpen.set(!1)}#i(e){let t=e.parentElement;for(;t;){if(Gs.indexOf(window?.getComputedStyle(t).overflowY)>-1&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return this.#e.documentElement}#t(e,t){let n=e.left,s=e.bottom+Ct;return{left:n,top:s}}#n(e,t){let n=e.right+Ct,s=e.top;return{left:n,top:s}}#o(e,t){let n=e.right+Ct,s=e.bottom;return{left:n,top:s}}#r(e,t){let n=e.left,s=e.bottom-e.height-t.height-Ct;return{left:n,top:s}}#a(){let e=this.triggerRef()?.nativeElement.getBoundingClientRect(),t=this.popoverContentRef()?.nativeElement.getBoundingClientRect(),n=[this.#n,this.#o],s=[this.#t,this.#r],r=this.asMultiLayer()?n:s;for(let l=0;l<r.length;l++){let c=r[l](e,t),d=c.left+(t?.width||0)>window.innerWidth,_=c.top+(t?.height||0)>window.innerHeight;if(!d&&!_){this.menuStyle.set({left:c.left+"px",top:c.top+"px"});return}}let a=r[0](e,t);this.menuStyle.set({left:a.left+"px",top:a.top+"px"})}ngOnDestroy(){this.openAbort?.abort(),this.openAbort=null}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-popover"]],viewQuery:function(t,n){t&1&&ue(n.triggerRef,so,5)(n.popoverRef,ro,5)(n.popoverContentRef,ao,5),t&2&&ie(3)},hostVars:2,hostBindings:function(t,n){t&2&&N("multi-layer",n.asMultiLayer())},inputs:{asMultiLayer:[1,"asMultiLayer"],disableOpenByClick:[1,"disableOpenByClick"],isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:co,decls:8,vars:4,consts:[["triggerRef",""],["popoverRef",""],["popoverContentRef",""],[1,"trigger",3,"click"],[1,"trigger-wrapper"],[1,"trigger-anchor"],["popover","manual",1,"popover"],[1,"overlay",3,"click"],[1,"popover-content"]],template:function(t,n){if(t&1){let s=z();T(lo),A(0,"div",3,0),Se("click",function(a){return w(s),x(n.toggleIsOpen(a))}),A(2,"div",4),u(3),u(4,1),u(5,2),F(),ye(6,"div",5),F(),b(7,uo,6,5,"div",6)}t&2&&(ge("popovertarget",n.id()+"hello"),p(6),G("anchor-name",n.id()),p(),M(n.isOpen()?7:-1))},encapsulation:2,changeDetection:0})}}return i})(),Ys=(()=>{class i{constructor(){this.#e=y(I),this.isOpen=H(!1),this.closed=se()}#e;onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus(),this.#e.nativeElement.querySelector("textarea")&&this.#e.nativeElement.querySelector("textarea").focus()}close(){this.closed.emit()}ngOnInit(){let e=typeof CSS<"u"&&CSS.supports("field-sizing","content"),t=this.#e.nativeElement.querySelector("textarea");if(!e&&t!==null){let a=function(){r.style.height="auto",r.style.height=r.scrollHeight+"px"},l=function(){setTimeout(a,0)};var n=a,s=l;let r=this.#e.nativeElement.querySelector("textarea");r&&(r.addEventListener("change",a),r.addEventListener("cut",l),r.addEventListener("paste",l),r.addEventListener("drop",l),r.addEventListener("keydown",l),r.focus(),r.select(),a())}}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-form-field-popover"]],hostBindings:function(t,n){t&1&&E("click",function(){return n.onClick()})},inputs:{isOpen:[1,"isOpen"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:po,decls:18,vars:3,consts:[[1,"input-wrap"],[1,"prefix"],[1,"prefix-space"],[3,"isOpenChange","closed","isOpen","options"],[1,"suffix-space"],[1,"helpers"],[1,"error-wrap"],[1,"hint"]],template:function(t,n){t&1&&(T(ho),u(0),h(1,"div",0)(2,"div",1),u(3,1),u(4,2),g(),oe(5,"div",2),h(6,"sh-popover",3),$e("isOpenChange",function(r){return ze(n.isOpen,r)||(n.isOpen=r),r}),E("closed",function(){return n.close()}),u(7,3,["trigger",""]),u(8,4),g(),u(9,5),u(10,6),oe(11,"div",4),u(12,7),g(),h(13,"div",5)(14,"div",6),u(15,8),g(),h(16,"div",7),u(17,9),g()()),t&2&&(p(6),Ue("isOpen",n.isOpen),Q("options",st(2,Wi)))},dependencies:[Qt],encapsulation:2,changeDetection:0})}}return i})();function Xs(i){let o=y(I).nativeElement,e=y(he),t=v([]),n=()=>{t.set(Array.from(o.querySelectorAll(i)))};if(n(),typeof MutationObserver>"u")return t.asReadonly();let s=new MutationObserver(r=>{r.some(l=>l.type==="childList")&&n()});return s.observe(o,{childList:!0}),e.onDestroy(()=>s.disconnect()),t.asReadonly()}var oa=(()=>{class i{constructor(){this.ngModels=Nt(_t),this.#e=y(Pt),this.#i=v(null),this.masking=m("mediumDate"),this.closed=se(),this._maskedDate=S(()=>{let e=this.internalDate(),t=this.masking();return t?e?this.#e.transform(e,t):null:e}),this.internalDate=v(null),this.isOpen=H(!1),this.currentClass=Re(),this.#t=Xs("#input-wrap input"),this.#n=k(()=>{let e=this.#t();if(!e.length)return;let t=e[0];t&&(this.#o(t),t.addEventListener("inputValueChanged",n=>{this.internalDate.set(n.detail.value?this.#r(new Date(n.detail.value)):null)}),t.addEventListener("focus",()=>{this.isOpen.set(!0),t.blur()}),this.#i.set(t),t.autocomplete="off",typeof t.value=="string"&&this.internalDate.set(t.value?this.#r(new Date(t.value)):null))})}#e;#i;#t;onDateChange(e){this.internalDate.set(e);let t=this.#i();t&&(t.value=e?e.toString():"",t.dispatchEvent(new Event("input")))}close(){this.closed.emit(this.internalDate())}#n;#o(e){return Object.defineProperty(e,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(t){Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,t);let s=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:t}});return this.dispatchEvent(s),t}}),e}#r(e){let n=e.getTimezoneOffset()*60*1e3;return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())+n)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-datepicker-input"]],contentQueries:function(t,n,s){t&1&&wt(s,n.ngModels,_t,5),t&2&&ie()},inputs:{masking:[1,"masking"],isOpen:[1,"isOpen"]},outputs:{closed:"closed",isOpen:"isOpenChange"},features:[$([Pt])],ngContentSelectors:go,decls:15,vars:3,consts:[["defaultIndicator",""],[3,"closed","isOpenChange","isOpen"],["id","input-wrap","ngProjectAs","input",5,["input"],1,"input"],[1,"masked-value"],["suffix","",1,"default-indicator"],["popoverContent",""],[3,"date","class"],[3,"dateChange","date"]],template:function(t,n){if(t&1){let s=z();T(fo),h(0,"sh-form-field-popover",1),E("closed",function(){return w(s),x(n.close())}),$e("isOpenChange",function(a){return w(s),ze(n.isOpen,a)||(n.isOpen=a),x(a)}),u(1,0,["ngProjectAs","label",5,["label"]]),u(2,1,["ngProjectAs","[prefix]",5,["","prefix",""]]),u(3,2,["ngProjectAs","[textPrefix]",5,["","textPrefix",""]]),h(4,"div",2),b(5,mo,2,1,"div",3),u(6,3),g(),u(7,4,["ngProjectAs","[textSuffix]",5,["","textSuffix",""]]),u(8,5,["ngProjectAs","[suffix]",5,["","suffix",""]]),h(9,"sh-icon",4),C(10,"calendar"),g(),h(11,"div",5),b(12,vo,1,3,"sh-datepicker",6),g()(),fe(13,_o,0,0,"ng-template",null,0,ui)}t&2&&(Ue("isOpen",n.isOpen),p(5),M(n.masking()?5:-1),p(7),M(n.isOpen()?12:-1))},dependencies:[Ws,Ys,_e],encapsulation:2,changeDetection:0})}}return i})();var Qs=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-divider"]],ngContentSelectors:Y,decls:1,vars:0,template:function(t,n){t&1&&(T(),u(0))},encapsulation:2,changeDetection:0})}}return i})();var Zt=(()=>{class i{#e=y(I);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus(),this.#e.nativeElement.querySelector("textarea")&&this.#e.nativeElement.querySelector("textarea").focus()}constructor(){bt(()=>{let e=typeof CSS<"u"&&CSS.supports("field-sizing","content"),t=this.#e.nativeElement.querySelector("textarea");if(!e&&t!==null){let r=function(){t.style.height="auto",t.style.height=t.scrollHeight+"px"},a=function(){setTimeout(r,0)};var n=r,s=a;t.addEventListener("change",r),t.addEventListener("cut",a),t.addEventListener("paste",a),t.addEventListener("drop",a),t.addEventListener("keydown",a),t.focus(),t.select(),r()}})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-form-field"]],hostBindings:function(t,n){t&1&&E("click",function(){return n.onClick()})},ngContentSelectors:yo,decls:17,vars:0,consts:[[1,"input-wrap"],[1,"prefix"],[1,"suffix"],[1,"helpers"],[1,"error-wrap"],[1,"hint"]],template:function(t,n){t&1&&(T(Co),u(0),A(1,"div",0)(2,"div",1),u(3,1),u(4,2),u(5,3),F(),u(6,4),u(7,5),A(8,"div",2),u(9,6),u(10,7),u(11,8),F()(),A(12,"div",3)(13,"div",4),u(14,9),F(),A(15,"div",5),u(16,10),F()())},encapsulation:2,changeDetection:0})}}return i})(),sa=(()=>{class i{constructor(){this._el=y(I),this.inputRef=J.required("input"),this.filesOver=v(!1),this.multiple=m(),this.accept=m(null),this.placeholder=H("Click or drag files here"),this.overlayText=m("Drop files here"),this.files=H([]),this.fileUploadClasses=S(()=>this._el.nativeElement.classList.toString()),this.inputEffect=k(()=>{let e=this.inputRef().nativeElement;e&&(e.placeholder&&this.placeholder.set(e.placeholder),e.addEventListener("dragover",t=>{t.preventDefault(),this.filesOver.set(!0)}),e.addEventListener("dragleave",t=>{t.preventDefault(),this.filesOver.set(!1)}),e.addEventListener("drop",t=>{t.preventDefault(),this.filesOver.set(!1);let n=t.dataTransfer?.files;n&&n.length>0&&(this.handleFileUpload(Array.from(n)),e.files=n)}),e.addEventListener("change",t=>{t.preventDefault(),this.handleFileUpload(Array.from(t.target.files))}))})}handleFileUpload(e){this.multiple()?this.files.update(t=>[...t,...e]):this.files.set(e)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-file-upload"]],viewQuery:function(t,n){t&1&&ue(n.inputRef,Do,5),t&2&&ie()},inputs:{multiple:[1,"multiple"],accept:[1,"accept"],placeholder:[1,"placeholder"],overlayText:[1,"overlayText"],files:[1,"files"]},outputs:{placeholder:"placeholderChange",files:"filesChange"},ngContentSelectors:bo,decls:12,vars:7,consts:[["inputWrap",""],["input",""],["ngProjectAs","input",5,["input"],1,"input"],[1,"files-text"],[1,"placeholder"],["type","file"],[1,"bg-overlay"],["suffix",""]],template:function(t,n){t&1&&(T(So),h(0,"sh-form-field"),u(1,0,["ngProjectAs","label",5,["label"]]),h(2,"div",2,0),b(4,Mo,2,1,"div",3)(5,Eo,2,1,"div",3)(6,wo,2,1,"div",4),oe(7,"input",5,1)(9,"div",6),g(),h(10,"sh-icon",7),C(11,"upload-simple"),g()()),t&2&&(Z(n.fileUploadClasses()),p(4),M(n.files().length===1?4:n.files().length>1?5:6),p(3),ge("multiple",n.multiple())("accept",n.accept()),p(2),N("files-over",n.filesOver()))},dependencies:[Zt,_e],encapsulation:2,changeDetection:0})}}return i})(),ra=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-list"]],ngContentSelectors:Y,decls:1,vars:0,template:function(t,n){t&1&&(T(),u(0))},encapsulation:2,changeDetection:0})}}return i})();function Zs(i,o){let e=v(null),t=o.map(l=>l.toUpperCase()),n=y(xe),s=n.get(he);if(fi(n.get(ri))||typeof MutationObserver>"u")return e.asReadonly();if(t.find(l=>i.nativeElement.querySelector(l)))return e.set(new I(i.nativeElement.querySelector(o[0]))),e.asReadonly();let a=new MutationObserver(l=>{for(let c of l)if(c.addedNodes){for(let d of Array.from(c.addedNodes))if(d.nodeType===Node.ELEMENT_NODE&&t.includes(d.nodeName)){e.set(new I(d)),a.disconnect();return}}});return a.observe(i.nativeElement,{childList:!0,subtree:!0}),s.onDestroy(()=>a.disconnect()),e.asReadonly()}function qi(i,o){let e=y(xe),t=e.get(he),n=v([]),s=null,r=null,a=(c,d)=>{r&&r.disconnect();let _=Array.from(c.nativeElement.querySelectorAll(d.join(",")));n.set(_),typeof MutationObserver<"u"&&(r=new MutationObserver(V=>{queueMicrotask(()=>{let B=Array.from(c.nativeElement.querySelectorAll(d.join(",")));n.set(B)})}),r.observe(c.nativeElement,{childList:!0,subtree:!0})),t.onDestroy(()=>l())};s=k(()=>{let c=typeof i=="function"&&i[Jt]?i():i,d=typeof o=="function"?o():o;c&&d?.length>0?a(c,d):(n.set([]),r&&(r.disconnect(),r=null))},{injector:e});function l(){s&&s.destroy(),r&&r.disconnect()}return{signal:n.asReadonly(),destroy:l}}function Ks(i,o=["input","textarea"]){let e=i||Zs(y(I),o),t=v(void 0),n=y(xe),s=n.get(he),r=v(null);k(l=>{let c=e();if(!c)return;let d=c.nativeElement;d&&(Js(d),r.set(d),t.set(d.value??""),l(()=>{r.set(null)}))},{injector:n});let a=null;return k(()=>{let l=r();if(!l)return;a&&(a(),a=null);let c=_=>{t.set(_.detail.value)},d=_=>{t.set(_.target.value)};l.addEventListener("input",d),l.addEventListener("inputValueChanged",c),t.set(l.value),a=()=>{l.removeEventListener("input",d),l.removeEventListener("inputValueChanged",c)},s.onDestroy(()=>{a&&a()})},{injector:n}),k(()=>{let l=r();if(!l)return;let c=t();c&&(l.value=c,l.dispatchEvent(new Event("input")))},{injector:n}),t}function Js(i){return Object.defineProperty(i,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(i),"value").get.call(this)},set(o){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(i),"value").set.call(this,o);let t=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:o}});return this.dispatchEvent(t),o}}),i}var aa=(()=>{class i{constructor(){this.#e=y(Oe),this.#i=y(de),this.asMultiLayer=m(!1),this.openIndicator=m(!1),this.disabled=m(!1),this.customOptionElementSelectors=m(["button"]),this.keepClickedOptionActive=m(!1),this.closeOnClick=m(!0),this.isOpen=H(!1),this.closed=se(),this.searchable=m(!1),this.activeOptionIndex=v(-1),this.inputRef=J("inputRef"),this.optionsRef=J("optionsRef"),this.options=qi(this.optionsRef,this.customOptionElementSelectors),this.optionsEl=S(()=>this.options.signal().filter(e=>!e.disabled)),this.inputValue=Ks(this.inputRef),this.abortController=null,this.optionsEffect=k(()=>{if(this.abortController!==null&&(this.abortController.abort(),this.abortController=null),!this.isOpen())return;this.abortController=new AbortController,this.searchable()||this.#e.documentElement.addEventListener("keydown",this.keyDownEventListener,{signal:this.abortController.signal});let t=this.inputRef()?.nativeElement;t&&(queueMicrotask(()=>t.focus()),t.addEventListener("keydown",this.keyDownEventListener,{signal:this.abortController.signal}),this.closeOnClick()||this.optionsRef()?.nativeElement?.addEventListener("click",s=>{let r=s.target,a=this.activeElements();if(!a.length){let c=this.optionsEl();this.activeElements.set(c),a=c}let l=a.findIndex(c=>c===r);l>-1&&(this.activeOptionIndex.set(l),t.focus())}))}),this.keyDownEventListener=e=>{let t=this.activeOptionIndex();e.key==="ArrowDown"?(e.preventDefault(),this.activeOptionIndex.set(this.nextActiveIndex(t))):e.key==="ArrowUp"?(e.preventDefault(),this.activeOptionIndex.set(this.prevActiveIndex(t))):e.key==="Enter"?(e.preventDefault(),t>-1&&(this.activeElements()[t].click(),queueMicrotask(()=>this.close("active")))):e.key==="Tab"&&(e.preventDefault(),this.close("closed"))},this._lastElementList=[],this.activeElements=v([]),this.lastInputValue="",this.inputValueEffect=k(()=>{if(!this.searchable())return;let t=(this.inputValue()??"").toLowerCase();if(this.#n(),!t||t===""){let s=this.optionsEl();this.activeElements.set(s),this._lastElementList=s;for(let r=0;r<s.length;r++)this.#i.removeStyle(s[r],"order");return}if(!t||t==="")return;let n=this._lastElementList.length&&t.length>this.lastInputValue.length?this._lastElementList:this.optionsEl();this.lastInputValue=t;for(let s=0;s<n.length;s++){let r=n[s],a=r.textContent?.toLowerCase()||"",l=this.#t(a,t);r.value=l}n=n.filter(s=>s.value>0).sort((s,r)=>r.value-s.value);for(let s=0;s<n.length;s++)this.#i.setStyle(n[s],"order",s);this.activeElements.set(n),this._lastElementList=n}),this.activeOptionIndexEffect=k(()=>{let e=this.activeElements(),t=this.activeOptionIndex();for(let n=0;n<e.length;n++)e[n].classList.remove("active");t>-1&&(e[t].scrollIntoView({block:"center"}),e[t].classList.add("active"))})}#e;#i;toggleIsOpen(e){e.preventDefault(),e.stopPropagation(),!this.disabled()&&(this.isOpen.set(!this.isOpen()),this.searchable()&&this.isOpen()&&setTimeout(()=>this.inputRef()?.nativeElement.focus()))}#t(e,t){if(!t)return 0;let n=0,s=-1,r=0,a=!0;for(let l=0;l<t.length;l++){let c=t[l];if(e.length>s+1&&e[s+1]===c)n+=l===0?100:150,s++,r++;else{let d=e.indexOf(c,s+1);if(l>0&&(a=!1),d===-1)return 0;n+=100,s=d,r++}}return a&&t.length===r&&(n+=1e3),n+=r*20,n}nextActiveIndex(e){let t=this.activeElements();if(!t.length){let s=this.optionsEl();this.activeElements.set(s),t=s}if(e===-1||e===t.length-1)return 0;let n=e+1;return t[n].disabled?this.nextActiveIndex(n):n}prevActiveIndex(e){let t=this.activeElements();if(!t.length){let s=this.optionsEl();this.activeElements.set(s),t=s}if(e===0||e===-1)return t.length-1;let n=e-1;return t[n].disabled?this.prevActiveIndex(n):n}close(e="closed",t){this.inputValue.set(""),this.closeOnClick()&&((!this.keepClickedOptionActive()||e==="closed")&&this.#n(),this.isOpen.set(!1),this.closed.emit(e==="active"))}#n(){this.activeOptionIndex.set(-1);let e=this.optionsEl();for(let t=0;t<e.length;t++)e[t].classList.remove("active")}ngOnDestroy(){this.abortController&&(this.abortController.abort(),this.abortController=null)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-menu"]],viewQuery:function(t,n){t&1&&ue(n.inputRef,xo,5)(n.optionsRef,Oo,5),t&2&&ie(2)},hostVars:6,hostBindings:function(t,n){t&2&&N("disabled",n.disabled())("has-search",n.searchable())("multi-layer",n.asMultiLayer())},inputs:{asMultiLayer:[1,"asMultiLayer"],openIndicator:[1,"openIndicator"],disabled:[1,"disabled"],customOptionElementSelectors:[1,"customOptionElementSelectors"],keepClickedOptionActive:[1,"keepClickedOptionActive"],closeOnClick:[1,"closeOnClick"],isOpen:[1,"isOpen"],searchable:[1,"searchable"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:To,decls:12,vars:12,consts:[["formFieldWrapper",""],["inputRef",""],["optionsRef",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","asMultiLayer","options"],["trigger","",3,"click"],[1,"open-indicator"],[1,"form-field-wrap"],[1,"small","stretch"],["type","text","placeholder","Search"],[1,"options",3,"click"]],template:function(t,n){if(t&1){let s=z();T(Vo),h(0,"sh-popover",3,0),$e("isOpenChange",function(a){return w(s),ze(n.isOpen,a)||(n.isOpen=a),x(a)}),E("closed",function(){return w(s),x(n.close("fromPopover"))}),h(2,"div",4),E("click",function(a){return w(s),x(n.toggleIsOpen(a))}),u(3),b(4,No,2,0,"sh-icon",5),g(),h(5,"div",6)(6,"sh-form-field",7),oe(7,"input",8,1),g()(),h(9,"div",9,2),E("click",function(){return w(s),x(n.close("active"))}),u(11,1),g()()}t&2&&(Ue("isOpen",n.isOpen),Q("disableOpenByClick",!0)("asMultiLayer",n.asMultiLayer())("options",st(11,Wi)),p(2),N("is-open",n.isOpen()),p(2),M(n.openIndicator()?4:-1),p(2),N("hidden",n.searchable()===!1),p(3),N("searching",n.searchable()&&n.inputValue()!==""))},dependencies:[Qt,Zt,_e],encapsulation:2,changeDetection:0})}}return i})(),er=(()=>{class i{constructor(){this.value=m(void 0)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-progress-bar"]],inputs:{value:[1,"value"]},decls:1,vars:2,consts:[[1,"progress-bar"]],template:function(t,n){t&1&&ye(0,"div",0),t&2&&G("width",n.value(),"%")},encapsulation:2,changeDetection:0})}}return i})(),la=(()=>{class i{constructor(){this.currentClassList=Re()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-radio"]],ngContentSelectors:Y,decls:2,vars:2,consts:[[1,"radio","sh-sheet"]],template:function(t,n){t&1&&(T(),ye(0,"div",0),u(1)),t&2&&Z(n.currentClassList())},encapsulation:2,changeDetection:0})}}return i})(),ca=(()=>{class i{constructor(){this.#e=y(I),this.#i=null,this.#t=null,this.#n=0,this.unit=m(""),this.value=H(this.#n),this.inputState=v({min:0,max:100,step:1}),this.valuePercentage=S(()=>{let{min:e,max:t}=this.inputState(),n=this.value()??e;if(isNaN(n))return 0;let s=t-e;if(s===0)return 0;let r=(n-e)/s*100;return Math.max(0,Math.min(100,r))}),this.trackFilledPercentage=S(()=>this.valuePercentage()),this.thumbPositionPercentage=S(()=>this.valuePercentage()),this.syncModelToInputEffect=k(()=>{let e=this.value();if(this.#t){let t=parseFloat(this.#t.value);(isNaN(t)||String(t)!==String(e))&&(this.#t.value=String(e))}})}#e;#i;#t;#n;get hasInputElement(){return!!this.#t}ngAfterViewInit(){this.#t=this.#e.nativeElement.querySelector('input[type="range"]'),this.#t?(this.#s(this.#t),this.#t.oninput=()=>{this.setNewInputValue(this.#t.value)},this.#t.addEventListener("inputValueChanged",e=>{this.setNewInputValue(e.detail.value)}),queueMicrotask(()=>this.#o(!0)),this.#r()):console.error('ShipRangeSlider: No <input type="range"> element found projected inside.')}setNewInputValue(e){let t=parseFloat(e??"0");if(!isNaN(t)){let{min:n,max:s}=this.inputState();this.value.set(Math.max(n,Math.min(s,t)))}}trackEvent(e){if(!this.#t||this.#t.readOnly||this.#t.disabled){e.preventDefault(),e.stopPropagation();return}if(e.target===this.#t||e.target?.closest(".thumb, .min-indicator, .max-indicator"))return;let n=e.currentTarget.getBoundingClientRect(),s=e.clientX-n.left,r=n.width,{min:a,max:l,step:c}=this.inputState(),d=l-a;if(r>0&&d!==0&&c>0){let V=(s/r*d+a-a)/c,B=a+Math.round(V)*c,te=this.#a(c);B=parseFloat(B.toFixed(te));let ee=Math.max(a,Math.min(l,B));this.value.set(ee)}}#o(e=!1){if(!this.#t)return;let t=parseFloat(this.#t.min??"0")??0,n=parseFloat(this.#t.max??"100")??100,s=this.#t.step,r=1;if(s&&s.toLowerCase()!=="any"){let l=parseFloat(s);!isNaN(l)&&l>0&&(r=l)}this.inputState.set({min:t,max:n,step:r});let a=parseFloat(this.#t.value??String(t))??t;if(e&&this.value()!==this.#n){let l=this.value(),c=Math.max(t,Math.min(n,l));a!==c&&(this.#t.value=String(c)),l!==c&&this.value.set(c)}else{let l=Math.max(t,Math.min(n,a));this.value()!==l&&this.value.set(l)}}#r(){if(!this.#t||typeof MutationObserver>"u")return;let e=["min","max","step","value","readonly","disabled"];this.#i=new MutationObserver(t=>{let n=!1;for(let s of t)if(s.type==="attributes"&&e.includes(s.attributeName??"")){n=!0;break}n&&this.#o(!1)}),this.#i.observe(this.#t,{attributes:!0,attributeFilter:e})}#a(e){if(isNaN(e)||Math.floor(e)===e)return 0;let n=e.toString().split(".")[1];return n?n.length:0}#s(e){Object.defineProperty(e,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").get.call(this)},set(t){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").set.call(this,t);let s=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:t}});return this.dispatchEvent(s),t}})}ngOnDestroy(){this.#i&&this.#i.disconnect(),this.#t&&(this.#t.oninput=null)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-range-slider"]],hostVars:2,hostBindings:function(t,n){t&2&&N("has-input",n.hasInputElement)},inputs:{unit:[1,"unit"],value:[1,"value"]},outputs:{value:"valueChange"},ngContentSelectors:Io,decls:15,vars:10,consts:[[1,"label"],[1,"input-wrap"],[1,"min-indicator"],[1,"track-wrap",3,"click"],[1,"track"],[1,"track-filled"],[1,"thumb-wrap"],[1,"thumb"],[1,"value-indicator"],[1,"max-indicator"]],template:function(t,n){t&1&&(T(Ao),A(0,"div",0),u(1),F(),A(2,"div",1)(3,"div",2),C(4),F(),A(5,"div",3),Se("click",function(r){return n.trackEvent(r)}),u(6,1),A(7,"div",4),ye(8,"div",5),F(),A(9,"div",6)(10,"div",7)(11,"div",8),C(12),F()()()(),A(13,"div",9),C(14),F()()),t&2&&(p(4),nt("",n.inputState().min,"",n.unit()),p(4),G("width",n.trackFilledPercentage(),"%"),p(),G("left",n.thumbPositionPercentage(),"%"),p(3),nt("",n.value(),"",n.unit()),p(2),nt("",n.inputState().max,"",n.unit()))},encapsulation:2,changeDetection:0})}}return i})(),tr=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-spinner"]],decls:0,vars:0,template:function(t,n){},encapsulation:2,changeDetection:0})}}return i})(),da=(()=>{class i{constructor(){this.#e=y(I),this.value=m(),this.label=m(),this.asFreeText=m(!1),this.optionTitle=m(null),this.freeTextTitle=m(null),this.freeTextPlaceholder=m("Type to create a new option"),this.validateFreeText=m(),this.placeholder=m(),this.readonly=H(!1),this.disabled=H(!1),this.lazySearch=m(!1),this.inlineSearch=m(!1),this.asText=m(!1),this.isClearable=m(!0),this.selectMultiple=m(!1),this.optionTemplate=m(null),this.selectedOptionTemplate=m(null),this.placeholderTemplate=m(null),this.freeTextOptionTemplate=m(null),this.isOpen=H(!1),this.isLoading=H(!1),this.options=H([]),this.selectedOptions=H([]),this.cleared=se(),this.onAddNewFreeTextOption=se(),this.computedFreeTextOption=S(()=>{let e=this.inputValue(),t=this.value(),n=t?{}:e;return t&&typeof n=="object"&&(n[t]=e),n}),this.#i=v(null),this.inlineTemplate=Nt(it),this.optionsWrapRef=J.required("optionsWrap"),this.inputRefInput=v(null),this.#t=typeof MutationObserver<"u"&&new MutationObserver(e=>{for(var t of e)t&&(t.target.nodeName==="INPUT"||t.target.nodeName==="TEXTAREA")&&(this.inputRefInput.set(new I(t.target)),this.#t.disconnect())}),this.inputValue=v(""),this.prevInputValue=v(null),this.focusedOptionIndex=v(-1),this._isClearable=S(()=>this.selectMultiple()||this.isClearable()),this.selectClasses=S(()=>this.#e.nativeElement.classList.toString()),this.stretch=S(()=>this.selectClasses().includes("stretch")),this.small=S(()=>this.selectClasses().includes("small")),this.placeholderText=S(()=>{let e=this.placeholder(),t=this.inputRefEl();return e||t?.placeholder||null}),this.selectedOptionValues=S(()=>{let e=this.selectedOptions(),t=this.value();return t?e.map(n=>this.#s(n,t)):e}),this.filteredOptions=S(()=>{let e=this.options()||[],t=this.label(),n=this.value(),s=this.inlineSearch(),r=this.inputValue().toLowerCase(),a=this.#c(r);if(e.length<=0)return[];if(!s||r==="")return e;let c=e.filter(d=>{let _=t?(this.#s(d,t)??"").toString().toLowerCase():(d??"").toString().toLowerCase(),V=((n?this.#s(d,n):d)??"").toString().toLowerCase(),B=a.test(_),te=a.test(V);return B||te}).map(d=>{let _=t?(this.#s(d,t)??"").toString().toLowerCase():(d??"").toString().toLowerCase(),V=((n?this.#s(d,n):d)??"").toString().toLowerCase(),B=this.#n(_,r),te=this.#n(V,r);return{item:d,score:Math.max(B,te)}});return c.sort((d,_)=>_.score-d.score),c.map(d=>d.item)}),this.#o=Dt(),this.inputRefEl=S(()=>{let e=this.inputRefInput();if(e===null)return;let t=e?e.nativeElement:null;return t?(t.autocomplete="off",t.setAttribute("role","combobox"),t.setAttribute("id",`combobox-${this.#o}`),t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-owns","optionsWrapId"),this.#l(t),t.addEventListener("focus",()=>{this.readonly()||this.open()}),t.addEventListener("input",n=>{let s=n.target.value,r=this.inputValue();s!==r&&(this.focusedOptionIndex.set(this.asFreeText()?-1:0),this.inputValue.set(s),this.updateInputElValue())}),t.addEventListener("inputValueChanged",n=>{let s=n.detail.value,r=this.inputValue();if(s!==r){if(s===""){this.clear();return}this.setSelectedOptionsFromValue(s),this.setInputValueFromOptions(this.selectedOptions()),this.#a()}}),t):(console.warn("<sh-select> input element not found are you missing to pass an <input> or <textarea> element to select component?"),null)}),this.focusEffect=k(()=>{let e=this.inputRefEl();if(!e)return;let t=this.getLabelAsSlug(this.filteredOptions()[this.focusedOptionIndex()]);t?e.setAttribute("aria-activedescendant",t):e.removeAttribute("aria-activedescendant")}),this.openAbortController=null,this.isOpenEffect=k(()=>{if(this.isOpen()){this.openAbortController||(this.openAbortController=new AbortController);let t=this.inputRefEl(),s=this.asFreeText()?-1:0;if(!t)return;t.setAttribute("aria-expanded",this.isOpen().toString()),t.addEventListener("keydown",r=>{if((r.key==="Escape"||r.key==="Tab")&&(r.preventDefault(),this.close()),r.key==="Enter"&&(r.preventDefault(),this.toggleOptionByIndex(this.focusedOptionIndex(),void 0,!0)),r.key==="ArrowDown"){r.preventDefault();let a=this.focusedOptionIndex()+1;this.focusedOptionIndex.set(a>this.filteredOptions().length-1?s:a)}if(r.key==="ArrowUp"){r.preventDefault();let a=this.focusedOptionIndex()-1;this.focusedOptionIndex.set(a<s?this.filteredOptions().length-1:a)}},{signal:this.openAbortController?.signal})}else{let t=this.inputRefEl();if(!t)return;t.setAttribute("aria-expanded",this.isOpen().toString()),this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null)}}),this._inputValue="",this.inputValueEffect=k(()=>{let e=this.inputValue();this._inputValue=e}),this.inputRefElEffect=k(()=>{let e=this.inputRefEl();e&&e.value!==this._inputValue&&(this.disabled.set(e.disabled),this.setSelectedOptionsFromValue(e.value),this.setInputValueFromOptions(this.selectedOptions()))}),this.selectedLabels=S(()=>{let e=this.selectedOptions();return this.label()?e.map(n=>this.getLabel(n)).join(", "):e.join(", ")}),this.inputState=S(()=>(this.selectedOptions().length>0||this.asFreeText()&&this.inputValue().length>0)&&!this.isOpen()?"selected":this.isLoading()?"loading":this.isOpen()&&(this.lazySearch()||this.inlineSearch())?"open-searching":this.isOpen()?"open":this.inlineSearch()||this.lazySearch()?"searching":"closed"),this.hasSearch=S(()=>this.inlineSearch()||this.lazySearch()),this.#r=k(()=>{if(this.selectMultiple()&&this.hasSearch())return;let e=this.selectedOptions(),t=this.value(),n=e.map(s=>t?this.#s(s,t):s).join(",");this.inputValue.set(n)})}#e;#i;#t;#n(e,t){if(!t)return 0;let n=0,s=-1,r=0,a=!0;for(let l=0;l<t.length;l++){let c=t[l];if(e.length>s+1&&e[s+1]===c)n+=l===0?100:150,s++,r++;else{let d=e.indexOf(c,s+1);if(l>0&&(a=!1),d===-1)return 0;n+=100,s=d,r++}}return a&&t.length===r&&(n+=1e3),n+=r*20,n}#o;#r;ngOnInit(){this.setInitInput()}setInitInput(){let e=this.#e.nativeElement.querySelector("input");if(e){this.inputRefInput.set(new I(e));return}let t=this.#e.nativeElement.querySelector("textarea");if(t){this.inputRefInput.set(new I(t));return}typeof MutationObserver<"u"&&this.#t.observe(this.#e.nativeElement,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}setSelectedOptionsFromValue(e){let t=this.options()||[],n=this.value(),s=this.selectMultiple(),r=e.toString().split(",");if(r.length===0){this.selectedOptions.set([]);return}let a=s?r:[r[0]],l=t.filter(c=>{let d=n?this.#s(c,n)?.toString():c?.toString();return d&&a.includes(d)});this.selectedOptions.set(s?l:[l[0]])}setInputValueFromOptions(e){let t=this.value();if(e.length===0){this.inputValue.set(""),this.updateInputElValue();return}let n=e.map(s=>t?this.#s(s,t):s).join(",");n!==this.inputValue()&&(this.inputValue.set(n),this.updateInputElValue())}getValue(e){let t=this.value();return t?this.#s(e,t):e}getLabel(e){let t=this.label();return t?this.#s(e,t):e}getLabelAsSlug(e){let t=this.getLabel(e);return!t||typeof t!="string"?"":t.replaceAll(" ","-")}toggleOptionByIndex(e,t,n=!1){let s=this.filteredOptions()[e];if(this.asFreeText()&&e===-1){let _=this.computedFreeTextOption(),V=this.getValue(_);if(!(this.validateFreeText()??(ee=>!0))(V))return;this.options.update(ee=>ee.findIndex(St=>this.getValue(St)===V)>-1?ee:(this.onAddNewFreeTextOption.emit(V),[_,...ee])),e=0,s=_}else if(!s){this.close();return}t&&t.stopPropagation();let r=this.selectMultiple(),a=this._isClearable(),l=this.value(),c=this.selectedOptionValues(),d=l?this.#s(s,l):s;this.prevInputValue.set(null),this.#i.set(null),this.selectedOptions.update(_=>{let V=c.indexOf(d);if(V>-1){let B=[..._.slice(0,V),..._.slice(V+1)];return a||B.length>0?B:_}else return this.focusedOptionIndex.set(e),r?[..._,s]:[s]}),r?this.inputRefEl()?.focus():this.isOpen.set(!1),this.setInputValueFromOptions(this.selectedOptions()),r&&this.hasSearch()&&(this.inputValue.set(""),this.updateInputElValue())}removeSelectedOptionByIndex(e,t){e.stopPropagation(),this.selectedOptions.update(n=>[...n.slice(0,t),...n.slice(t+1)]),this.setInputValueFromOptions(this.selectedOptions())}isSelected(e){let t=this.value(),n=this.filteredOptions()[e],s=t?this.#s(n,t):n;return this.selectedOptionValues().indexOf(s)>-1}open(){this.isOpen()||(this.isOpen.set(!0),this.hasSearch()?(this.prevInputValue.set(this.inputValue()??""),this.inputValue.set(""),this.updateInputElValue()):this.#i.set(this.selectedOptions()),this.selectMultiple()||this.#a())}#a(){let e=this.selectedOptionValues()[0],t=this.value();if(e){let n=this.filteredOptions().findIndex(s=>t?this.#s(s,t)===e:s===e);this.focusedOptionIndex.set(n)}else this.focusedOptionIndex.set(-1)}close(){this.isOpen.set(!1);let e=this.prevInputValue(),t=this.#i();if(this.asFreeText()){this.updateInputElValue();return}this.hasSearch()&&e&&(this.inputValue.set(e),this.setInputValueFromOptions(this.selectedOptions())),!this.hasSearch()&&t!==null&&this.setInputValueFromOptions(t),this.selectMultiple()&&this.setInputValueFromOptions(this.selectedOptions())}clear(e){e?.stopPropagation(),this.inputValue.set(""),this.selectedOptions.set([]),this.isOpen.set(!1),this.prevInputValue.set(null),this.cleared.emit(),this.updateInputElValue()}updateInputElValue(){let e=this.inputRefEl(),t=this.inputValue();e&&(e.value=t,e.dispatchEvent(new Event("input")))}#s(e,t){return t.split(".").reduce((n,s)=>n?.[s],e)}#l(e){Object.defineProperty(e,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").get.call(this)},set(t){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").set.call(this,t);let s=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:t}});return this.dispatchEvent(s),t}})}#c(e){let t=(e??"").toLowerCase(),n="^";for(let s of t)n+=".*"+this.#d(s);return n+=".*$",new RegExp(n,"i")}#d(e){return e.replace(/[-\/\\^$+?.()|[\]{}]/g,"\\$&")}ngOnDestroy(){this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null),typeof MutationObserver<"u"&&this.#t.disconnect()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-select"]],contentQueries:function(t,n,s){t&1&&wt(s,n.inlineTemplate,it,5),t&2&&ie()},viewQuery:function(t,n){t&1&&ue(n.optionsWrapRef,Fo,5),t&2&&ie()},hostVars:2,hostBindings:function(t,n){t&2&&N("multiple",n.selectMultiple())},inputs:{value:[1,"value"],label:[1,"label"],asFreeText:[1,"asFreeText"],optionTitle:[1,"optionTitle"],freeTextTitle:[1,"freeTextTitle"],freeTextPlaceholder:[1,"freeTextPlaceholder"],validateFreeText:[1,"validateFreeText"],placeholder:[1,"placeholder"],readonly:[1,"readonly"],disabled:[1,"disabled"],lazySearch:[1,"lazySearch"],inlineSearch:[1,"inlineSearch"],asText:[1,"asText"],isClearable:[1,"isClearable"],selectMultiple:[1,"selectMultiple"],optionTemplate:[1,"optionTemplate"],selectedOptionTemplate:[1,"selectedOptionTemplate"],placeholderTemplate:[1,"placeholderTemplate"],freeTextOptionTemplate:[1,"freeTextOptionTemplate"],isOpen:[1,"isOpen"],isLoading:[1,"isLoading"],options:[1,"options"],selectedOptions:[1,"selectedOptions"]},outputs:{readonly:"readonlyChange",disabled:"disabledChange",isOpen:"isOpenChange",isLoading:"isLoadingChange",options:"optionsChange",selectedOptions:"selectedOptionsChange",cleared:"cleared",onAddNewFreeTextOption:"onAddNewFreeTextOption"},ngContentSelectors:ko,decls:33,vars:25,consts:[["formFieldWrapper",""],["optionsWrap",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","options"],["trigger","",3,"click"],["ngProjectAs","input",5,["input"],1,"input"],[1,"selected-value"],["suffix",""],["suffix","",1,"primary"],["id","optionsWrapId","role","listbox",1,"ship-options"],["title",""],[1,"option",3,"id","selected","focused"],[1,"small",3,"class"],[1,"small",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],["suffix","",3,"click"],[1,"option",3,"click","id"],[3,"class","active"]],template:function(t,n){if(t&1){let s=z();T(Po),ot(0)(1)(2)(3)(4)(5)(6),h(7,"sh-popover",2,0),$e("isOpenChange",function(a){return w(s),ze(n.isOpen,a)||(n.isOpen=a),x(a)}),E("closed",function(){return w(s),x(n.close())}),h(9,"sh-form-field",3),E("click",function(){return w(s),x(n.open())}),u(10,0,["ngProjectAs","label",5,["label"]]),u(11,1,["ngProjectAs","[prefix]",5,["","prefix",""]]),u(12,2,["ngProjectAs","[boxPrefix]",5,["","boxPrefix",""]]),h(13,"div",4)(14,"div",5),b(15,Lo,1,1)(16,Qo,2,0)(17,es,2,1),u(18,3),u(19,4),g()(),b(20,ts,2,0,"sh-icon",6)(21,is,1,0,"sh-spinner",7)(22,ns,2,0,"sh-icon",6)(23,os,2,0,"sh-icon",6)(24,ss,2,0,"sh-icon",6)(25,rs,2,0,"sh-icon",6)(26,as,2,0,"sh-icon",6),g(),h(27,"div",8,1),b(29,ms,3,3),b(30,vs,2,1,"p",9),Ve(31,Ss,4,8,"li",10,je),g()()}if(t&2){ne(n.placeholderTemplate());let s=n.optionTemplate();p(),ne(n.freeTextOptionTemplate());let r=n.selectedOptionTemplate(),a=n.inlineTemplate();p();let l=ne(n.selectedOptions()),c=n.inputState();p(),ne(r||s||a),p(),ne(s||a),p();let d=ne(!n.asText()&&n.selectMultiple());p();let _=ne(n.isOpen()&&n.hasSearch()&&(d||n.inputValue().length>-1));p(),Ue("isOpen",n.isOpen),Q("disableOpenByClick",!0)("options",st(24,Ro)),p(2),N("stretch",n.stretch())("small",n.small())("readonly",n.readonly()||n.disabled()),p(4),N("show-search-text",_),p(),N("is-selected",c==="selected"),p(),M(n.asFreeText()&&n.inputValue().length>0&&!n.isOpen()?15:l.length>0?16:_?-1:17),p(5),M(c==="closed"?20:c==="loading"?21:c==="open-searching"?22:c==="searching"?23:c==="selected"&&n._isClearable()?24:c==="selected"&&!n._isClearable()?25:26),p(9),M(n.asFreeText()?29:-1),p(),M(n.optionTitle()&&n.filteredOptions().length>0?30:-1),p(),Te(n.filteredOptions())}},dependencies:[pi,Qt,Zt,_e,zs,tr,$s,Qs],encapsulation:2,changeDetection:0})}}return i})();function ir(i){let o=y(I),e=y(he),t=v(!1),n=typeof MutationObserver<"u"&&new MutationObserver(s=>{s.forEach(r=>{r.type==="attributes"&&r.attributeName==="class"&&t.set(o.nativeElement.classList.contains(i))})});return si(o.nativeElement,()=>{n&&n.observe(o.nativeElement,{attributes:!0}),t.set(o.nativeElement.classList.contains(i))}),e.onDestroy(()=>{n&&n.disconnect()}),t}var ua=(()=>{class i{constructor(){this.#e=y(Oe),this.#i=y(I),this.openWidth=280,this.openWidthTreshold=this.openWidth*.5,this.disableDrag=m(!1),this.isOpen=H(!1),this.isOverlay=ir("overlay"),this.#t=this.#i.nativeElement.parentElement,this.#n=this.#t.getBoundingClientRect&&this.#t.getBoundingClientRect(),this.dragImageElement=J.required("dragImageElement"),this.dragIsEnding=v(!1),this.dragIsOnScreen=v(!0),this.isDragging=v(!1),this.dragPositionX=v(0),this.dragActualPositionX=S(()=>{let e=this.dragPositionX(),t=280,n=100,s=.008,r=t/2,a=r-n/2,l=r+n/2;if(e>l){let c=e-l,_=(t-l)*(1-Math.exp(-s*c));return l+_}else if(e<a){let c=a-e,_=a*(1-Math.exp(-s*c));return a-_}return e}),this.draggingStyle=S(()=>!this.isOverlay()||this.disableDrag()?null:this.isDragging()?`translateX(${this.dragActualPositionX()}px)`:this.isOpen()?`translateX(${this.openWidth}px)`:"translateX(0px)"),this.draggingEffect=k(()=>{this.disableDrag()||(this.isDragging()?this.#e.body.classList.add("dragging"):this.#e.body.classList.remove("dragging"))})}#e;#i;#t;#n;drop(e){e.stopPropagation(),this.#o(e.clientX-this.#n.left)}#o(e){this.isDragging.set(!1),e>=this.openWidthTreshold?this.isOpen.set(!0):this.isOpen.set(!1)}dragEnd(e){e.clientX-this.#n.left<0&&this.#o(0),e.clientX-this.#n.left>this.openWidthTreshold&&this.#o(this.openWidthTreshold)}dragEnter(){this.dragIsOnScreen.set(!0)}dragLeave(){this.dragIsOnScreen.set(!1)}dragStart(e){e.stopPropagation(),this.#n=this.#t.getBoundingClientRect(),this.isDragging.set(!0)}drag(e){e.stopPropagation(),this.isDragging()&&(e.clientX!==0||e.clientY!==0)&&this.dragPositionX.set(e.clientX-this.#n.left)}touchStart(e){e.stopPropagation(),this.isDragging.set(!0),this.#n=this.#t.getBoundingClientRect(),this.dragPositionX.set(0)}touchMove(e){e.stopPropagation(),this.isDragging()&&this.dragPositionX.set(e.touches[0].clientX-this.#n.left)}touchEnd(e){e.stopPropagation(),this.#o(e.changedTouches[0].clientX-this.#n.left)}touchCancel(e){e.stopPropagation(),this.isDragging.set(!1)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-sidenav"]],viewQuery:function(t,n){t&1&&ue(n.dragImageElement,bs,5),t&2&&ie()},hostVars:6,hostBindings:function(t,n){t&2&&N("open",n.isOpen())("closed",!n.isOpen())("is-dragging",n.isDragging())},inputs:{disableDrag:[1,"disableDrag"],isOpen:[1,"isOpen"]},outputs:{isOpen:"isOpenChange"},ngContentSelectors:Es,decls:10,vars:5,consts:[["dragImageElement",""],[1,"drag-image"],[1,"dropping-surface"],[1,"sidenav"],[1,"main-wrap"],["draggable","true",1,"dragable"],[1,"closed-topbar"],[1,"dropping-surface",3,"drop","dragenter","dragleave"],["draggable","true",1,"dragable",3,"dragstart","dragend","drag","touchstart","touchmove","touchend","touchcancel"]],template:function(t,n){t&1&&(T(Ms),b(0,ws,2,0,"div",1),b(1,xs,1,0,"div",2),A(2,"div",3),u(3),F(),A(4,"div",4),b(5,Os,1,0,"div",5),A(6,"div",6),u(7,1),F(),A(8,"main"),u(9,2),F()()),t&2&&(M(n.isOverlay()&&!n.disableDrag()?0:-1),p(),M(n.isOverlay()&&n.isDragging()?1:-1),p(3),G("transform",!n.disableDrag()&&n.draggingStyle()),p(),M(n.isOverlay()&&!n.disableDrag()?5:-1))},encapsulation:2,changeDetection:0})}}return i})();var ha=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-stepper"]],ngContentSelectors:Y,decls:1,vars:0,template:function(t,n){t&1&&(T(),u(0))},encapsulation:2,changeDetection:0})}}return i})();var pa=(()=>{class i{constructor(){this.#e=y(nr),this.shSort=m(),this.sortAsc=S(()=>{let e=this.#e.sortByColumn(),t=this.shSort();return!e||!t?!1:e===t}),this.sortDesc=S(()=>{let e=this.#e.sortByColumn(),t=this.shSort();return!e||!t?!1:e===`-${t}`})}#e;toggleSort(){let e=this.shSort();e&&this.#e.toggleSort(e)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275dir=R({type:i,selectors:[["","shSort",""]],hostAttrs:[1,"sortable"],hostVars:4,hostBindings:function(t,n){t&1&&E("mousedown",function(){return n.toggleSort()}),t&2&&N("sort-asc",n.sortAsc())("sort-desc",n.sortDesc())},inputs:{shSort:[1,"shSort"]}})}}return i})();var ke=1.5,nr=(()=>{class i{constructor(){this.#e=y(I),this.#i=y(yt,{optional:!0}),this.loading=m(!1),this.data=m([]),this.dataChange=se(),this.sortByColumn=H(null),this.currentClass=Re(),this.thead=J("thead"),this.tbody=J("tbody"),this.columns=qi(this.thead,["tr:first-child th"]),this.stickyHeaderHeight=S(()=>{let e=this.currentClass();return this.thead()?.nativeElement?.clientHeight??0}),this.bodyEffect=k(()=>{let e=this.tbody()?.nativeElement,t=this.thead()?.nativeElement;if(!e||!t)return;let n=this.stickyHeaderHeight();queueMicrotask(()=>{let s=t.querySelectorAll("tr.sticky").length>0,r=e.querySelectorAll("tr.sticky");if(r.length>0&&s)for(let l=0;l<r.length;l++)r[l].style.top=`${n}px`})}),this.class=v(this.#i?.tableType??"default"),this.resizing=v(!1),this.sizeTrigger=v(!0),this.#t=null,this.#n=v(!1),this.scrollXState=v(-1),this.scrollYState=v(-1),this.canScrollX=v(!1),this.canScrollY=v(!1),this.columnSizes=S(()=>{this.sizeTrigger();let e=this.columns.signal();return e.reduce((t,n,s)=>{let r=n,a=r.getAttribute("size"),l=s===e.length-1;return a?`${t} ${a}`:r.classList.contains("sticky")||r.classList.contains("sticky-end")?`${t} min-content`:l?`${t} 1fr`:`${t} 1fr`},"")}),this.e=k(()=>{let e=this.sortByColumn();if(e===null)return this.#n()||(this.#t=this.data(),this.#n.set(!0)),this.dataChange.emit(structuredClone(this.#t));let t=e.startsWith("-")?e.slice(1):e,n=e.startsWith("-"),s=this.data().sort((r,a)=>{let l=r[t],c=a[t],d=0;return typeof l=="number"&&typeof c=="number"&&(d=l-c),l instanceof Date&&c instanceof Date&&(d=l.getTime()-c.getTime()),typeof l=="string"&&typeof c=="string"&&(d=l.localeCompare(c,void 0,{sensitivity:"base"})),n?-d:d});this.dataChange.emit(s)})}#e;#i;#t;#n;updateColumnSizes(){this.sizeTrigger.set(!this.sizeTrigger())}onScroll(){this.#o()}onResize(e){this.#o()}ngAfterViewInit(){queueMicrotask(()=>this.#o())}toggleSort(e){let t=this.sortByColumn(),n=t===e?`-${e}`:t===`-${e}`?null:e;this.sortByColumn.set(n)}#o(){let e=this.#e.nativeElement,t=-1,n=-1,s=e.scrollWidth>e.clientWidth+ke;if(s){let a=e.scrollLeft<=ke;e.scrollWidth-(e.scrollLeft+e.clientWidth)<ke?t=1:a||(t=0)}this.scrollXState.set(t),this.canScrollX.set(s);let r=e.scrollHeight>e.clientHeight+ke;if(r){let a=e.scrollTop<=ke;e.scrollHeight-(e.scrollTop+e.clientHeight)<ke?n=1:a||(n=0)}this.scrollYState.set(n),this.canScrollY.set(r)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-table"]],viewQuery:function(t,n){t&1&&ue(n.thead,Vs,5)(n.tbody,Ts,5),t&2&&ie(2)},hostVars:18,hostBindings:function(t,n){t&1&&E("scroll",function(){return n.onScroll()})("resize",function(r){return n.onResize(r)},ai),t&2&&(Z(n.class()),G("grid-template-columns",n.columnSizes()),N("resizing",n.resizing())("can-scroll-x",n.canScrollX())("can-scroll-y",n.canScrollY())("scrolled-x",n.scrollXState()>=0)("scrolled-x-end",n.scrollXState()===1)("scrolled-y",n.scrollYState()>=0)("scrolled-y-end",n.scrollYState()===1))},inputs:{loading:[1,"loading"],data:[1,"data"],sortByColumn:[1,"sortByColumn"]},outputs:{dataChange:"dataChange",sortByColumn:"sortByColumnChange"},ngContentSelectors:As,decls:9,vars:2,consts:[["thead",""],["tbody",""],[1,"indeterminate","primary"],[1,"no-rows"]],template:function(t,n){t&1&&(T(Ns),b(0,Is,1,0,"sh-progress-bar",2),h(1,"thead",null,0),u(3),u(4,1),g(),h(5,"tbody",null,1),u(7,2),g(),b(8,Fs,2,0,"div",3)),t&2&&(M(n.loading()?0:-1),p(8),M(n.loading()?-1:8))},dependencies:[er],encapsulation:2,changeDetection:0})}}return i})(),fa=(()=>{class i{constructor(){this.id="--"+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,12)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-tabs"]],hostVars:2,hostBindings:function(t,n){t&2&&G("--tabs-id",n.id)},ngContentSelectors:Y,decls:1,vars:0,template:function(t,n){t&1&&(T(),u(0))},encapsulation:2,changeDetection:0})}}return i})(),ga=(()=>{class i{constructor(){this.isActive=H(!1),this.disallowToggle=m(!1)}ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-toggle-card"]],hostVars:2,hostBindings:function(t,n){t&2&&N("active",n.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:ks,decls:7,vars:1,consts:[[3,"click"],[1,"toggle-icon"],[1,"collapsable"],[1,"content"]],template:function(t,n){t&1&&(T(Ps),h(0,"h3",0),E("click",function(){return n.disallowToggle()||n.toggle()}),u(1,0,null,Rs,1,0),b(3,Ls,2,0,"sh-icon",1),g(),h(4,"div",2)(5,"div",3),u(6,1),g()()),t&2&&(p(3),M(n.disallowToggle()?-1:3))},dependencies:[_e],encapsulation:2,changeDetection:0})}}return i})(),ma=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-toggle"]],ngContentSelectors:Y,decls:3,vars:0,consts:[[1,"box"],[1,"knob"]],template:function(t,n){t&1&&(T(),A(0,"div",0),ye(1,"div",1),F(),u(2))},encapsulation:2,changeDetection:0})}}return i})();var va=(()=>{class i{constructor(){this.filesOver=v(!1),this.filesDropped=se()}onDragOver(e){e.preventDefault(),e.stopPropagation(),this.filesOver.set(!0)}onDragLeave(e){e.preventDefault(),e.stopPropagation(),this.filesOver.set(!1)}ondrop(e){e.preventDefault(),e.stopPropagation(),this.filesOver.set(!1);let t=e.dataTransfer?.files;t&&t.length>0&&this.filesDropped.emit(t)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275dir=R({type:i,selectors:[["","shDragDrop",""]],hostVars:2,hostBindings:function(t,n){t&1&&E("dragover",function(r){return n.onDragOver(r)})("dragleave",function(r){return n.onDragLeave(r)})("drop",function(r){return n.ondrop(r)}),t&2&&N("filesover",n.filesOver())},outputs:{filesDropped:"filesDropped"}})}}return i})();var or=(()=>{class i{constructor(){this.positionAnchorName=m.required(),this.anchorEl=m.required(),this.isOpen=m(!1),this.#e=y(I),this.#i=y(de),this.#t=null,this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc"),this.isBelow=v(!1),this.openEffect=k(()=>{this.isOpen()?setTimeout(()=>{this.#e.nativeElement.showPopover(),this.calculateTooltipPosition()}):this.#e.nativeElement.hidePopover()}),this.calculateTooltipPosition=()=>{if(!this.anchorEl())return;let e=this.anchorEl().nativeElement.getBoundingClientRect(),t=this.#e.nativeElement,n=t.getBoundingClientRect();if(n.width===0&&n.height===0)return;let s=e.top-n.height<0;if(this.isBelow.set(s),!this.SUPPORTS_ANCHOR){let r=t.getBoundingClientRect(),a=e.top-r.height,l=e.left+e.width/2-r.width/2;s&&(a=e.top+e.height),l+r.width>window?.innerWidth&&(l=e.right-r.width/2),l<0&&(l=-(r.width/2)),this.#i.setStyle(t,"left",`${l}px`),this.#i.setStyle(t,"top",`${a}px`),this.#i.setStyle(t,"position","fixed")}}}#e;#i;#t;ngAfterViewInit(){this.#t=new AbortController;let e={signal:this.#t.signal,capture:!0};window?.addEventListener("scroll",this.calculateTooltipPosition,e),window?.addEventListener("resize",this.calculateTooltipPosition,{signal:this.#t.signal}),setTimeout(()=>this.calculateTooltipPosition())}ngOnDestroy(){this.#t?.abort()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["ship-tooltip-wrapper"]],hostAttrs:["role","tooltip"],hostVars:5,hostBindings:function(t,n){t&2&&(ge("popover","manual"),G("position-anchor",n.positionAnchorName()),N("below",n.isBelow()))},inputs:{positionAnchorName:[1,"positionAnchorName"],anchorEl:[1,"anchorEl"],isOpen:[1,"isOpen"]},ngContentSelectors:Y,decls:2,vars:0,consts:[[1,"tooltip-content"]],template:function(t,n){t&1&&(T(),A(0,"div",0),u(1),F())},encapsulation:2})}}return i})(),q=null,_a=(()=>{class i{constructor(){this.shTooltip=m.required(),this.#e=y(I),this.#i=y(li),this.#t=y(oi),this.#n=y(de),this.#o=null,this.DEBOUNCE_DELAY=500,this.anchorName=`--${Dt()}`,this.isOpen=v(!1)}#e;#i;#t;#n;#o;onMouseEnter(){q?.component.anchorName!==this.anchorName&&this.cleanupTooltip(),this.cancelCleanupTimer(),queueMicrotask(()=>this.showTooltip())}onMouseLeave(){this.startCleanupTimer()}ngOnDestroy(){this.cancelCleanupTimer(),this.cleanupTooltip()}startCleanupTimer(){this.cancelCleanupTimer(),this.debounceTimer=setTimeout(()=>{this.cleanupTooltip()},this.DEBOUNCE_DELAY)}cancelCleanupTimer(){this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}showTooltip(){if(q?.wrapperComponentRef||!this.shTooltip())return;let e,t=this.shTooltip();if(typeof t=="string")e=[[this.#n.createText(t)]];else if(t instanceof it)this.#o=t.createEmbeddedView({}),this.#o.detectChanges(),e=[this.#o.rootNodes];else return;q={wrapperComponentRef:this.#i.createComponent(or,{environmentInjector:this.#t,projectableNodes:e}),component:this},q.wrapperComponentRef.setInput("positionAnchorName",this.anchorName),q.wrapperComponentRef.setInput("anchorEl",this.#e),q.wrapperComponentRef?.setInput("isOpen",this.isOpen),q.wrapperComponentRef.changeDetectorRef.detectChanges(),q.wrapperComponentRef.location.nativeElement.addEventListener("mouseenter",()=>{this.cancelCleanupTimer()}),q.wrapperComponentRef.location.nativeElement.addEventListener("mouseleave",()=>{this.startCleanupTimer()}),setTimeout(()=>{this.isOpen.set(!0)})}cleanupTooltip(){q?.wrapperComponentRef&&(q.component.cancelCleanupTimer(),q.wrapperComponentRef.destroy(),q.component.isOpen.set(!1),q=null),this.#o&&(this.#o.destroy(),this.#o=null)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275dir=R({type:i,selectors:[["","shTooltip",""]],hostAttrs:[1,"tooltip"],hostVars:4,hostBindings:function(t,n){t&1&&E("mouseenter",function(){return n.onMouseEnter()})("mouseleave",function(){return n.onMouseLeave()}),t&2&&(G("anchor-name",n.anchorName),N("active",n.isOpen()))},inputs:{shTooltip:[1,"shTooltip"]}})}}return i})();export{ve as a,Qi as b,Mi as c,gi as d,Dr as e,Sr as f,Dn as g,Qe as h,_t as i,Mr as j,wn as k,Vn as l,Nn as m,In as n,ji as o,Rn as p,Bn as q,Er as r,wr as s,xr as t,_e as u,yt as v,Kr as w,Jr as x,Us as y,ea as z,ta as A,ia as B,na as C,zs as D,$s as E,oa as F,Qs as G,Zt as H,sa as I,ra as J,aa as K,er as L,la as M,ca as N,tr as O,da as P,ua as Q,ha as R,pa as S,nr as T,fa as U,ga as V,ma as W,va as X,_a as Y};
@@ -1,2 +1,2 @@
1
- import{B as U,T as z,u as w}from"./chunk-RYXU2QDS.js";import{b as J}from"./chunk-BKANUILG.js";import"./chunk-FIBRO5I3.js";import{la as y}from"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{$ as S,Ab as a,Bb as $,Cc as A,E as F,Ec as k,Ib as M,Pa as _,Pb as B,Qb as v,Rb as r,Vb as N,W as G,Xb as g,aa as u,cb as h,fc as I,gc as x,jc as d,kc as m,la as l,na as b,sb as O,tb as T,ub as E,wb as C,xb as f,yb as L,zb as i}from"./chunk-XYHHESIX.js";import{a as P,b as D}from"./chunk-7CGTOI24.js";function X(o,e){if(o&1&&(i(0,"li"),d(1),a()),o&2){let t=e.$implicit;_(),m(t)}}function V(o,e){if(o&1&&(i(0,"tr")(1,"td",12)(2,"code")(3,"ol",13),C(4,X,2,1,"li",null,E),a()()()()),o&2){let t=g().$implicit,n=g();_(),I("grid-column","1 / -1")("height","auto"),_(3),f(n.breakIntoLines(t.Exception))}}function j(o,e){if(o&1){let t=M();i(0,"tr",9),N("click",function(){let s=S(t).$index,c=g();return u(c.toggleRow(s))}),i(1,"td"),d(2),A(3,"date"),a(),i(4,"td",10),d(5),a(),i(6,"td"),d(7),a(),i(8,"td")(9,"button",11)(10,"sh-icon"),d(11,"caret-down"),a()()()(),O(12,V,6,4,"tr")}if(o&2){let t=e.$implicit,n=e.$index,s=g();_(2),m(t.Timestamp?k(3,6,t.Timestamp*1e3,"medium"):"-"),_(3),m(t.BackupID>=0?t.BackupID:"-"),_(2),m(t.Message),_(2),x("rotated-icon",n===s.openRowIndex()),_(3),T(n===s.openRowIndex()?12:-1)}}function K(o,e){o&1&&r(0,4,1)}function q(o,e){o&1&&r(0,4,2)}var H=["BackupID","Timestamp","Message","actions"],R=class o{#e=G(J);displayedColumns=l(H);openRowIndex=l(null);noMoreItems=l(!1);logsIsLoading=l(!1);logs=l([]);pagination=l({offsetTime:void 0,pagesize:10});paginationEffect=b(()=>{let e=this.pagination();this.getLogs()});ngOnInit(){this.getLogs()}getLogs(){this.logsIsLoading.set(!0);let e=this.pagination();this.#e.getApiV1LogdataLog({pagesize:e.pagesize,offset:e.offsetTime}).pipe(F(()=>this.logsIsLoading.set(!1))).subscribe({next:t=>{t.length===0&&this.noMoreItems.set(!0),this.logs.update(n=>[...n,...t])}})}toggleRow(e){this.openRowIndex.set(e===this.openRowIndex()?null:e)}breakIntoLines(e){return e?e.split(`
1
+ import{B as U,T as z,u as w}from"./chunk-HPNLQHW6.js";import{c as J}from"./chunk-BGTK25UG.js";import"./chunk-QPTSKQZ2.js";import{fa as y}from"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{$ as S,Ab as a,Bb as $,Cc as A,E as F,Ec as k,Ib as M,Pa as _,Pb as B,Qb as v,Rb as r,Vb as N,W as G,Xb as g,aa as u,cb as h,fc as I,gc as x,jc as d,kc as m,la as l,na as b,sb as O,tb as T,ub as E,wb as C,xb as f,yb as L,zb as i}from"./chunk-T2WO6CVD.js";import{a as P,b as D}from"./chunk-7CGTOI24.js";function X(o,e){if(o&1&&(i(0,"li"),d(1),a()),o&2){let t=e.$implicit;_(),m(t)}}function V(o,e){if(o&1&&(i(0,"tr")(1,"td",12)(2,"code")(3,"ol",13),C(4,X,2,1,"li",null,E),a()()()()),o&2){let t=g().$implicit,n=g();_(),I("grid-column","1 / -1")("height","auto"),_(3),f(n.breakIntoLines(t.Exception))}}function j(o,e){if(o&1){let t=M();i(0,"tr",9),N("click",function(){let s=S(t).$index,c=g();return u(c.toggleRow(s))}),i(1,"td"),d(2),A(3,"date"),a(),i(4,"td",10),d(5),a(),i(6,"td"),d(7),a(),i(8,"td")(9,"button",11)(10,"sh-icon"),d(11,"caret-down"),a()()()(),O(12,V,6,4,"tr")}if(o&2){let t=e.$implicit,n=e.$index,s=g();_(2),m(t.Timestamp?k(3,6,t.Timestamp*1e3,"medium"):"-"),_(3),m(t.BackupID>=0?t.BackupID:"-"),_(2),m(t.Message),_(2),x("rotated-icon",n===s.openRowIndex()),_(3),T(n===s.openRowIndex()?12:-1)}}function K(o,e){o&1&&r(0,4,1)}function q(o,e){o&1&&r(0,4,2)}var H=["BackupID","Timestamp","Message","actions"],R=class o{#e=G(J);displayedColumns=l(H);openRowIndex=l(null);noMoreItems=l(!1);logsIsLoading=l(!1);logs=l([]);pagination=l({offsetTime:void 0,pagesize:10});paginationEffect=b(()=>{let e=this.pagination();this.getLogs()});ngOnInit(){this.getLogs()}getLogs(){this.logsIsLoading.set(!0);let e=this.pagination();this.#e.getApiV1LogdataLog({pagesize:e.pagesize,offset:e.offsetTime}).pipe(F(()=>this.logsIsLoading.set(!1))).subscribe({next:t=>{t.length===0&&this.noMoreItems.set(!0),this.logs.update(n=>[...n,...t])}})}toggleRow(e){this.openRowIndex.set(e===this.openRowIndex()?null:e)}breakIntoLines(e){return e?e.split(`
2
2
  `):[]}loadMore(){let e=this.logs().at(-1)?.Timestamp;this.pagination.update(t=>D(P({},t),{offsetTime:e}))}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=h({type:o,selectors:[["app-logs-stored"]],decls:18,vars:6,consts:()=>{let e;e=$localize`Timestamp`;let t;t=$localize`Backup ID`;let n;n=$localize`Message`;let s;s=$localize`No data available`;let c;return c=$localize`${"\uFFFD*16:1\uFFFD"}:START_BLOCK_IF: No more items ${"\uFFFD/*16:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*17:2\uFFFD"}:START_BLOCK_ELSE: Load more ${"\uFFFD/*17:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,[e,t,n,s,c,[1,"type-b",3,"data","loading"],["thead",""],["table-no-rows",""],["shButton","",1,"primary","raised",3,"click","disabled"],[3,"click"],[1,"id"],["shButton","","type","button",1,"outlined","small"],[2,"white-space","pre-wrap"],[1,"line-numbers-ol"]]},template:function(t,n){if(t&1){let s=M();i(0,"sh-table",5)(1,"tr",6)(2,"th"),r(3,0),a(),i(4,"th"),r(5,1),a(),i(6,"th"),r(7,2),a(),$(8,"th"),a(),C(9,j,13,9,null,null,E),i(11,"div",7),r(12,3),a()(),i(13,"footer")(14,"button",8),N("click",function(){return S(s),u(n.loadMore())}),B(15,4),O(16,K,1,0)(17,q,1,0),v(),a()()}if(t&2){let s=n.logs();I("grid-template-columns","1fr 1fr 1fr auto"),L("data",s)("loading",n.logsIsLoading()),_(9),f(s),_(5),L("disabled",n.logsIsLoading()||n.noMoreItems()),_(2),T(n.noMoreItems()?16:17)}},dependencies:[z,w,U,y],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}sh-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}sh-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 0 0}"],changeDetection:0})};export{R as default};