homebridge-config-ui-x 5.0.0-beta.22 → 5.0.0-beta.24

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 (195) hide show
  1. package/CHANGELOG.md +32 -1
  2. package/dist/modules/plugins/plugins.service.js +6 -3
  3. package/dist/modules/plugins/plugins.service.js.map +1 -1
  4. package/package.json +5 -4
  5. package/public/3rdpartylicenses.txt +5 -5
  6. package/public/assets/hap-icons/airpurifier.svg +49 -16
  7. package/public/assets/hap-icons/airquality.svg +24 -13
  8. package/public/assets/hap-icons/contactsensor-closed.svg +35 -2
  9. package/public/assets/hap-icons/contactsensor-open.svg +80 -2
  10. package/public/assets/hap-icons/door-closed.svg +32 -2
  11. package/public/assets/hap-icons/door-open.svg +48 -2
  12. package/public/assets/hap-icons/fan-off.svg +24 -13
  13. package/public/assets/hap-icons/fan-on.svg +24 -13
  14. package/public/assets/hap-icons/garagedoor.svg +24 -13
  15. package/public/assets/hap-icons/humidity.svg +24 -13
  16. package/public/assets/hap-icons/irrigation-system.svg +47 -18
  17. package/public/assets/hap-icons/leaksensor.svg +52 -2
  18. package/public/assets/hap-icons/light.svg +47 -28
  19. package/public/assets/hap-icons/lightbulb.svg +24 -13
  20. package/public/assets/hap-icons/lock-locked.svg +24 -13
  21. package/public/assets/hap-icons/lock-unlocked.svg +24 -13
  22. package/public/assets/hap-icons/motionsensor.svg +100 -2
  23. package/public/assets/hap-icons/occupancysensor.svg +97 -2
  24. package/public/assets/hap-icons/outlet.svg +24 -13
  25. package/public/assets/hap-icons/securitysystem-active.svg +102 -2
  26. package/public/assets/hap-icons/securitysystem-off.svg +68 -2
  27. package/public/assets/hap-icons/smokesensor.svg +42 -9
  28. package/public/assets/hap-icons/speaker.svg +29 -13
  29. package/public/assets/hap-icons/statelessprogrammableswitch.svg +51 -2
  30. package/public/assets/hap-icons/switch.svg +24 -13
  31. package/public/assets/hap-icons/television.svg +15 -4
  32. package/public/assets/hap-icons/temperature.svg +24 -13
  33. package/public/assets/hap-icons/unknown.svg +24 -13
  34. package/public/assets/hap-icons/valve-generic.svg +26 -15
  35. package/public/assets/hap-icons/valve-irrigation.svg +36 -20
  36. package/public/assets/hap-icons/valve-showerhead.svg +51 -12
  37. package/public/assets/hap-icons/valve-waterfaucet.svg +20 -6
  38. package/public/assets/hap-icons/window-closed.svg +85 -2
  39. package/public/assets/hap-icons/window-open.svg +136 -2
  40. package/public/assets/hap-icons/windowcovering-closed.svg +45 -49
  41. package/public/assets/hap-icons/windowcovering-open.svg +40 -44
  42. package/public/assets/homebridge-color-round.svg +36 -1
  43. package/public/assets/homebridge-logo.svg +11 -1
  44. package/public/assets/mask-icon.svg +5 -1
  45. package/public/chunk-23BZOS52.js +1 -0
  46. package/public/{chunk-HGKURYNB.js → chunk-2AEDCPAZ.js} +5 -5
  47. package/public/{chunk-6MDI4RNQ.js → chunk-2DMDQOK2.js} +1 -1
  48. package/public/{chunk-3VDXR5B2.js → chunk-2U34OGZ2.js} +1 -1
  49. package/public/chunk-34534FR6.js +1 -0
  50. package/public/chunk-3EOLD2RC.js +1 -0
  51. package/public/chunk-3NLYPA3O.js +1 -0
  52. package/public/{chunk-EXVHFPLG.js → chunk-4MKTUK3C.js} +1 -1
  53. package/public/chunk-4VIMFDES.js +1 -0
  54. package/public/{chunk-MMPQXC6H.js → chunk-5SBO5IQQ.js} +1 -1
  55. package/public/{chunk-UZZFYFXN.js → chunk-5TMMPP6L.js} +1 -1
  56. package/public/{chunk-BZVO3JIQ.js → chunk-67EN4M44.js} +1 -1
  57. package/public/chunk-7VE3PNKY.js +1 -0
  58. package/public/chunk-A2XZOBXK.js +1 -0
  59. package/public/{chunk-HBGENGOA.js → chunk-ACRDELJP.js} +1 -1
  60. package/public/{chunk-KFM3IHPE.js → chunk-AGHJJT2B.js} +1 -1
  61. package/public/chunk-AUNYWYZK.js +1 -0
  62. package/public/chunk-AWFGX4UH.js +1 -0
  63. package/public/chunk-BPUJQP7S.js +1 -0
  64. package/public/chunk-BXNSSZQU.js +20 -0
  65. package/public/chunk-CE76KHI4.js +1 -0
  66. package/public/{chunk-P5WCYSBI.js → chunk-CEFSEL4J.js} +1 -1
  67. package/public/chunk-CGB55TWP.js +1 -0
  68. package/public/chunk-CO6C42ID.js +1 -0
  69. package/public/chunk-CWAROVXL.js +1 -0
  70. package/public/chunk-CWLESZWI.js +1 -0
  71. package/public/chunk-DGZPMACM.js +1 -0
  72. package/public/chunk-DTCZUF5X.js +1 -0
  73. package/public/chunk-E4NNL36U.js +1 -0
  74. package/public/{chunk-HMOW3VNR.js → chunk-EBVMWV7Q.js} +1 -1
  75. package/public/chunk-EPTTTCYA.js +1 -0
  76. package/public/chunk-FN54I3N2.js +1 -0
  77. package/public/{chunk-RUC7TPCB.js → chunk-FR2SRQ6O.js} +20 -20
  78. package/public/chunk-FVYSS7A6.js +1 -0
  79. package/public/{chunk-LY2KRV55.js → chunk-GCSRDNWU.js} +1 -1
  80. package/public/chunk-GHS7224B.js +1 -0
  81. package/public/chunk-GPATGB7A.js +1 -0
  82. package/public/{chunk-PFCIYPDO.js → chunk-HGVWDZM7.js} +8 -8
  83. package/public/chunk-I7RBEGVL.js +1 -0
  84. package/public/{chunk-T6FYP7FJ.js → chunk-IF47NAUS.js} +1 -1
  85. package/public/chunk-IXX3QR3W.js +1 -0
  86. package/public/{chunk-CK234OHO.js → chunk-JHGDWS5G.js} +1 -1
  87. package/public/chunk-JK2TIEOZ.js +1 -0
  88. package/public/chunk-JRE4YLKQ.js +1 -0
  89. package/public/chunk-K7SACHXO.js +1 -0
  90. package/public/chunk-L7XNUEKD.js +1 -0
  91. package/public/{chunk-2QRN7P6W.js → chunk-LAZONQ56.js} +1 -1
  92. package/public/{chunk-F4QKTMKG.js → chunk-LJNOSMWT.js} +1 -1
  93. package/public/chunk-LN2VCCLR.js +1 -0
  94. package/public/{chunk-KJTNT2RS.js → chunk-MEQQHR4J.js} +1 -1
  95. package/public/chunk-NHJLTSH3.js +7 -0
  96. package/public/chunk-NIQ3CMM3.js +1 -0
  97. package/public/chunk-NMCUOQS6.js +1 -0
  98. package/public/chunk-NSKRVV2Q.js +1 -0
  99. package/public/chunk-O57GSOID.js +1 -0
  100. package/public/chunk-OIPTRAIJ.js +1 -0
  101. package/public/chunk-OXB2TK4Y.js +1 -0
  102. package/public/chunk-P24MYBIN.js +1 -0
  103. package/public/chunk-PAPJD32S.js +1 -0
  104. package/public/{chunk-44XAYR34.js → chunk-PH3WWITU.js} +1 -1
  105. package/public/chunk-PZ34U5OV.js +1 -0
  106. package/public/chunk-Q4VBD4HY.js +1 -0
  107. package/public/chunk-QRHPGHWR.js +5 -0
  108. package/public/chunk-S562WX6B.js +1 -0
  109. package/public/chunk-SAUJHLW4.js +1 -0
  110. package/public/chunk-SQIPIZV2.js +1 -0
  111. package/public/chunk-USZR6IOE.js +1 -0
  112. package/public/{chunk-Z4CHNCHA.js → chunk-UUOIJNVA.js} +1 -1
  113. package/public/chunk-WAV54USB.js +1 -0
  114. package/public/chunk-WLWKH3SS.js +1 -0
  115. package/public/chunk-WREHLPR6.js +1 -0
  116. package/public/chunk-WXDRU7AD.js +5 -0
  117. package/public/chunk-X34UWQ4G.js +1 -0
  118. package/public/chunk-XVCYUDXV.js +1 -0
  119. package/public/{chunk-4J45MC2M.js → chunk-YMEOGTJF.js} +1 -1
  120. package/public/chunk-YNSIFZ5S.js +1 -0
  121. package/public/{chunk-CATV74VT.js → chunk-YVIUWSSI.js} +1 -1
  122. package/public/{chunk-QHHRJOCD.js → chunk-YXTLNUTK.js} +1 -1
  123. package/public/chunk-Z3THJJ67.js +1 -0
  124. package/public/{chunk-2JYMQLNI.js → chunk-Z4RRWRCY.js} +1 -1
  125. package/public/chunk-ZPJB4ZAQ.js +1 -0
  126. package/public/index.html +2 -2
  127. package/public/main-67JW6AVL.js +1 -0
  128. package/public/media/fa-brands-400-Q3XCMWHQ.woff2 +0 -0
  129. package/public/media/{fa-brands-400-KOKGDU7E.ttf → fa-brands-400-R2XQZCET.ttf} +0 -0
  130. package/public/media/fa-regular-400-QSNYFYRT.woff2 +0 -0
  131. package/public/media/{fa-regular-400-IPMAEX5Y.ttf → fa-regular-400-XUOPSR7E.ttf} +0 -0
  132. package/public/media/fa-solid-900-5ZUYHGA7.woff2 +0 -0
  133. package/public/media/{fa-solid-900-SRFFQLRM.ttf → fa-solid-900-PJNKLK6W.ttf} +0 -0
  134. package/public/styles-LM2DJG4C.css +1 -0
  135. package/public/chunk-2G26F2OY.js +0 -1
  136. package/public/chunk-2HOZ3Y6C.js +0 -1
  137. package/public/chunk-2Q3ZJBWD.js +0 -1
  138. package/public/chunk-4XUM4AAX.js +0 -1
  139. package/public/chunk-5U265P7U.js +0 -1
  140. package/public/chunk-66TZYBOD.js +0 -1
  141. package/public/chunk-75MRNSXS.js +0 -5
  142. package/public/chunk-76R6FK4N.js +0 -1
  143. package/public/chunk-77MKNJZD.js +0 -1
  144. package/public/chunk-7TYZZBWX.js +0 -1
  145. package/public/chunk-7YINJGU5.js +0 -1
  146. package/public/chunk-A5DGQCNW.js +0 -1
  147. package/public/chunk-A5ZYGUPQ.js +0 -1
  148. package/public/chunk-A7JPIFDI.js +0 -1
  149. package/public/chunk-AOMI4P34.js +0 -1
  150. package/public/chunk-AWR7QC6L.js +0 -1
  151. package/public/chunk-BGVO4RUG.js +0 -1
  152. package/public/chunk-BPBMT7G5.js +0 -1
  153. package/public/chunk-CCREQ443.js +0 -1
  154. package/public/chunk-DQ6WFEV3.js +0 -1
  155. package/public/chunk-EFBNPDVN.js +0 -1
  156. package/public/chunk-EH7W2CXP.js +0 -1
  157. package/public/chunk-F37DFFAF.js +0 -1
  158. package/public/chunk-F5SS6TN7.js +0 -5
  159. package/public/chunk-G4YIZM2X.js +0 -20
  160. package/public/chunk-GG777Z5B.js +0 -1
  161. package/public/chunk-GGXW7MGP.js +0 -1
  162. package/public/chunk-GZ4RCRCW.js +0 -1
  163. package/public/chunk-H3E4T6KH.js +0 -1
  164. package/public/chunk-HCPQDE4Y.js +0 -1
  165. package/public/chunk-HH7AWBSM.js +0 -1
  166. package/public/chunk-HMGLHQQM.js +0 -1
  167. package/public/chunk-IQ2VQFLN.js +0 -1
  168. package/public/chunk-JN3IG5XN.js +0 -1
  169. package/public/chunk-JXLK34BL.js +0 -1
  170. package/public/chunk-KDJPDALB.js +0 -7
  171. package/public/chunk-LAYV53FZ.js +0 -1
  172. package/public/chunk-LRBNS4GA.js +0 -1
  173. package/public/chunk-NBLWBPNU.js +0 -1
  174. package/public/chunk-NHYJBJ7V.js +0 -1
  175. package/public/chunk-NIGZKKLM.js +0 -1
  176. package/public/chunk-NSDKR2DD.js +0 -1
  177. package/public/chunk-OAKLLAD6.js +0 -1
  178. package/public/chunk-OZTQT47N.js +0 -1
  179. package/public/chunk-Q5X32EHZ.js +0 -1
  180. package/public/chunk-QCBEADHI.js +0 -1
  181. package/public/chunk-R5PFZZHR.js +0 -1
  182. package/public/chunk-RSUIRNXB.js +0 -1
  183. package/public/chunk-SHFHQWOE.js +0 -1
  184. package/public/chunk-SZQRABYM.js +0 -1
  185. package/public/chunk-TC25IMJX.js +0 -1
  186. package/public/chunk-VQ5OLP5R.js +0 -1
  187. package/public/chunk-W463PPSI.js +0 -1
  188. package/public/chunk-W5XD4G3A.js +0 -1
  189. package/public/chunk-XIOY5AEA.js +0 -1
  190. package/public/chunk-ZXAV3M77.js +0 -1
  191. package/public/main-JEWXJ5EM.js +0 -1
  192. package/public/media/fa-brands-400-6PJPV6JM.woff2 +0 -0
  193. package/public/media/fa-regular-400-OHB6J4OK.woff2 +0 -0
  194. package/public/media/fa-solid-900-ABTK6BNK.woff2 +0 -0
  195. package/public/styles-EG5MFQEM.css +0 -1
@@ -1 +0,0 @@
1
- import{a as j}from"./chunk-G4YIZM2X.js";import"./chunk-KFM3IHPE.js";import"./chunk-PFCIYPDO.js";import{c as y}from"./chunk-MMPQXC6H.js";import"./chunk-BZVO3JIQ.js";import{q as h}from"./chunk-F5SS6TN7.js";import{y as M,z as v}from"./chunk-Z4CHNCHA.js";import{d as C,g as a}from"./chunk-HMOW3VNR.js";import"./chunk-4J45MC2M.js";import{b as l,j as g}from"./chunk-OAKLLAD6.js";import"./chunk-QHHRJOCD.js";import{a as d,c as u}from"./chunk-H3E4T6KH.js";import{h as s,ha as c,ia as i,md as p,na as e,vb as n,w as f}from"./chunk-KDJPDALB.js";var m=(()=>{class o{$api=e(l);$router=e(C);$toastr=e(g);$translate=e(d);resolve(){return s(this,null,function*(){try{let r=yield f(this.$api.get("/config-editor"));return JSON.stringify(r,null,4)}catch(r){console.error(r),this.$toastr.error(r.message,this.$translate.instant("toast.title_error")),this.$router.navigate(["/"])}})}static \u0275fac=function(t){return new(t||o)};static \u0275prov=c({token:o,factory:o.\u0275fac})}return o})();var $=[{path:"",loadComponent:()=>import("./chunk-76R6FK4N.js").then(o=>o.ConfigEditorComponent),resolve:{config:m}}],R=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=n({type:o});static \u0275inj=i({imports:[a.forChild($),a]})}return o})();var Q=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=n({type:o});static \u0275inj=i({providers:[m],imports:[p,M,v,y,h,u.forChild(),R,j]})}return o})();export{Q as ConfigEditorModule};
@@ -1 +0,0 @@
1
- import"./chunk-JN3IG5XN.js";import"./chunk-75MRNSXS.js";import"./chunk-T6FYP7FJ.js";import"./chunk-F4QKTMKG.js";import"./chunk-LY2KRV55.js";import{g as i}from"./chunk-HMOW3VNR.js";import"./chunk-3VDXR5B2.js";import"./chunk-4J45MC2M.js";import"./chunk-OAKLLAD6.js";import"./chunk-QHHRJOCD.js";import{c as m}from"./chunk-H3E4T6KH.js";import{ia as t,md as n,vb as r}from"./chunk-KDJPDALB.js";var u=[{path:"",loadComponent:()=>import("./chunk-JXLK34BL.js").then(o=>o.TerminalComponent)}],a=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[i.forChild(u),i]})}return o})();var T=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[n,a,m.forChild()]})}return o})();export{T as TerminalModule};
@@ -1 +0,0 @@
1
- import{a as f,b as l}from"./chunk-AWR7QC6L.js";import{a as d}from"./chunk-DQ6WFEV3.js";import{f as p}from"./chunk-4XUM4AAX.js";import"./chunk-6MDI4RNQ.js";import"./chunk-BZVO3JIQ.js";import{q as c}from"./chunk-F5SS6TN7.js";import{y as n}from"./chunk-Z4CHNCHA.js";import"./chunk-LY2KRV55.js";import{g as i}from"./chunk-HMOW3VNR.js";import"./chunk-3VDXR5B2.js";import"./chunk-4J45MC2M.js";import"./chunk-OAKLLAD6.js";import"./chunk-QHHRJOCD.js";import{c as s}from"./chunk-H3E4T6KH.js";import{ia as r,md as m,vb as e}from"./chunk-KDJPDALB.js";var g=[{path:"",loadComponent:()=>import("./chunk-QCBEADHI.js").then(o=>o.AccessoriesComponent)}],u=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=e({type:o});static \u0275inj=r({imports:[i.forChild(g),i]})}return o})();var H=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=e({type:o});static \u0275inj=r({imports:[m,n,c,p,s.forChild(),d,u,l,f]})}return o})();export{H as AccessoriesModule};
@@ -1 +0,0 @@
1
- import{a as N,b as U}from"./chunk-F4QKTMKG.js";import{m as H}from"./chunk-F5SS6TN7.js";import{a as D}from"./chunk-LY2KRV55.js";import{d as V}from"./chunk-HMOW3VNR.js";import{b as E,j as z}from"./chunk-OAKLLAD6.js";import{c as I,d as w}from"./chunk-QHHRJOCD.js";import{a as P,b as A}from"./chunk-H3E4T6KH.js";import{$b as R,Bb as f,Bc as l,Cc as d,Dc as F,Lb as S,Mb as b,Rb as c,Wb as a,Xb as o,Yb as u,cc as x,dc as p,g as $,h as k,ib as i,na as _,nc as s,oc as h,pc as v,ub as y,xa as C,xc as B,ya as g}from"./chunk-KDJPDALB.js";var M=$(N(),1),W=$(U(),1);var j=t=>({maxBackupSizeText:t});function q(t,m){if(t&1&&(a(0,"div"),u(1,"input",11),o()),t&2){let e=p(2);i(),b("value",e.selectedBackup.fileName)}}function O(t,m){if(t&1){let e=R();a(0,"div",10)(1,"input",12),x("change",function(n){C(e);let T=p(2);return g(T.handleRestoreFileInput(n.target.files))}),o(),a(2,"label",13),s(3),l(4,"translate"),o()()}if(t&2){let e=p(2);i(3),v(" ",d(4,1,(e.selectedFile==null?null:e.selectedFile.name)||"backup.label_choose_backup_file_to_restore")," ")}}function G(t,m){if(t&1&&(a(0,"div",5)(1,"div",8),u(2,"i",9),o(),a(3,"p"),s(4),l(5,"translate"),o(),a(6,"ul")(7,"li"),s(8),l(9,"translate"),o(),a(10,"li"),s(11),l(12,"translate"),o(),a(13,"li"),s(14),l(15,"translate"),o()(),f(16,q,2,1,"div")(17,O,5,3,"div",10),o()),t&2){let e=p();i(4),h(d(5,6,"backup.restore_help_one")),i(4),h(d(9,8,"backup.restore_help_two")),i(3),h(F(12,10,"backup.restore_max_size",B(15,j,e.maxFileSizeText))),i(3),h(d(15,13,"backup.restore_warning")),i(2),c(e.selectedBackup?16:-1),i(),c(e.selectedBackup?-1:17)}}function J(t,m){t&1&&u(0,"i",19)}function K(t,m){if(t&1&&(a(0,"span"),s(1),o()),t&2){let e=p(3);i(),v("",e.uploadPercent,"% - ")}}function L(t,m){t&1&&(a(0,"span"),s(1," Extracting Archive"),o())}function Q(t,m){t&1&&(a(0,"span"),s(1),l(2,"translate"),o()),t&2&&(i(),v(" ",d(2,1,"backup.label_uploading"),""))}function X(t,m){if(t&1&&(a(0,"span"),f(1,J,1,0,"i",19)(2,K,2,1,"span")(3,L,2,0,"span")(4,Q,3,3,"span"),o()),t&2){let e=p(2);i(),c(!e.uploadPercent||e.uploadPercent===100?1:-1),i(),c(e.uploadPercent&&e.uploadPercent!==100?2:-1),i(),c(e.uploadPercent===100?3:-1),i(),c(e.uploadPercent!==100?4:-1)}}function Y(t,m){t&1&&(a(0,"span"),s(1),l(2,"translate"),o()),t&2&&(i(),h(d(2,1,"form.button_restore")))}function Z(t,m){if(t&1){let e=R();a(0,"div",7)(1,"div",14)(2,"button",15),l(3,"translate"),x("click",function(){C(e);let n=p();return g(n.$activeModal.dismiss("Dismiss"))}),s(4),l(5,"translate"),o()(),u(6,"div",16),a(7,"div",17)(8,"button",18),x("click",function(){C(e);let n=p();return g(n.onRestoreBackupClick())}),f(9,X,5,4,"span")(10,Y,3,3,"span"),o()()()}if(t&2){let e=p();i(2),b("disabled",e.clicked),S("aria-label",d(3,6,"form.button_close")),i(2),v(" ",d(5,8,"form.button_close")," "),i(4),b("disabled",!e.selectedBackup&&!e.selectedFile||e.clicked),i(),c(e.clicked?9:-1),i(),c(e.clicked?-1:10)}}function ee(t,m){if(t&1){let e=R();a(0,"div",7),u(1,"div",14),a(2,"div",16)(3,"button",20),x("click",function(){C(e);let n=p();return g(n.postBackupRestart())}),s(4),l(5,"translate"),o()(),u(6,"div",17),o()}t&2&&(i(4),v(" ",d(5,1,"menu.hbrestart.title")," "))}var me=(()=>{class t{$activeModal=_(H);$api=_(E);$route=_(V);$toastr=_(z);$translate=_(P);$ws=_(D);setupWizardRestore=!1;selectedBackup=null;clicked=!1;maxFileSizeText=globalThis.backup.maxBackupSizeText;selectedFile;restoreInProgress=!1;restoreStarted=!1;restoreFailed=!1;restoreArchiveType="homebridge";uploadPercent=0;term=new M.Terminal;termTarget;fitAddon=new W.FitAddon;io;ngOnInit(){return k(this,null,function*(){this.io=this.$ws.connectToNamespace("backup"),this.termTarget=document.getElementById("plugin-log-output"),this.term.open(this.termTarget),this.fitAddon.fit(),this.io.socket.on("stdout",e=>{this.term.write(e)}),this.setupWizardRestore&&(this.restoreStarted=!0,this.restoreInProgress=!0,this.startRestore())})}onRestoreBackupClick(){this.selectedBackup?this.restoreScheduledBackup():this.restoreArchiveType==="homebridge"?this.uploadHomebridgeArchive():this.restoreArchiveType==="hbfx"&&this.uploadHbfxArchive()}uploadHomebridgeArchive(){this.term.reset(),this.clicked=!0;let e=new FormData;e.append("restoreArchive",this.selectedFile,this.selectedFile.name),this.$api.post("/backup/restore",e).subscribe({next:()=>{this.restoreStarted=!0,this.restoreInProgress=!0,setTimeout(()=>{this.startRestore()},500),this.clicked=!1},error:r=>{var n;console.error(r),this.$toastr.error(((n=r.error)==null?void 0:n.message)||this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error")),this.clicked=!1}})}restoreScheduledBackup(){return k(this,null,function*(){this.term.reset(),this.clicked=!0,this.$api.post(`/backup/scheduled-backups/${this.selectedBackup.id}/restore`,{}).subscribe({next:()=>{this.restoreStarted=!0,this.restoreInProgress=!0,setTimeout(()=>{this.startRestore()},500),this.clicked=!1},error:e=>{var r;console.error(e),this.$toastr.error(((r=e.error)==null?void 0:r.message)||this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error")),this.clicked=!1}})})}startRestore(){return k(this,null,function*(){this.io.request("do-restore").subscribe({next:()=>{this.restoreInProgress=!1,this.$toastr.success(this.$translate.instant("backup.backup_restored"),this.$translate.instant("toast.title_success")),this.setupWizardRestore&&this.postBackupRestart()},error:e=>{this.restoreFailed=!0,console.error(e),this.$toastr.error(this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error"))}})})}uploadHbfxArchive(){this.term.reset(),this.clicked=!0;let e=new FormData;e.append("restoreArchive",this.selectedFile,this.selectedFile.name),this.$api.post("/backup/restore/hbfx",e,{reportProgress:!0,observe:"events"}).subscribe({next:r=>{r.type===I.UploadProgress?this.uploadPercent=Math.round(100*r.loaded/r.total):r instanceof w&&(this.restoreStarted=!0,this.restoreInProgress=!0,setTimeout(()=>{this.startHbfxRestore()},500),this.clicked=!1)},error:r=>{var n;this.clicked=!1,console.error(r),this.$toastr.error(((n=r.error)==null?void 0:n.message)||this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error"))}})}startHbfxRestore(){return k(this,null,function*(){this.io.request("do-restore-hbfx").subscribe({next:()=>{this.restoreInProgress=!1,this.$toastr.success(this.$translate.instant("backup.backup_restored"),this.$translate.instant("toast.title_success"))},error:e=>{this.restoreFailed=!0,console.error(e),this.$toastr.error(this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error"))}})})}handleRestoreFileInput(e){e.length?(this.selectedFile=e[0],this.selectedFile.name.endsWith(".hbfx")?this.restoreArchiveType="hbfx":this.restoreArchiveType="homebridge"):delete this.selectedFile}postBackupRestart(){this.$api.put("/backup/restart",{}).subscribe({next:()=>{this.$activeModal.close(!0),this.$route.navigate(["/"])},error:()=>{}})}ngOnDestroy(){this.io.end()}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=y({type:t,selectors:[["ng-component"]],inputs:{setupWizardRestore:"setupWizardRestore",selectedBackup:"selectedBackup"},decls:13,vars:11,consts:[[1,"modal-content","hb-backup-modal"],[1,"modal-header"],[1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"click","disabled"],["aria-hidden","true"],[1,"modal-body"],["id","plugin-log-output",1,"modal-body",3,"hidden"],[1,"modal-footer","justify-content-between"],[1,"text-center","mt-2","mb-3"],[1,"fas","fa-fw","fa-hard-drive","primary-text",2,"font-size","75px"],[1,"custom-file"],["type","text","disabled","",1,"form-control","custom-input",3,"value"],["type","file","id","restoreFileUpload","accept","application/gzip, .gz, .hbfx",1,"custom-file-input",3,"change"],["for","restoreFileUpload",1,"custom-file-label"],[1,"text-left"],["type","button","data-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],[1,"text-center"],[1,"text-right"],["type","button","data-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"],[1,"fa","fa-fw","fa-circle-notch","fa-spin"],["type","button","data-dismiss","modal",1,"btn","btn-primary",3,"click"]],template:function(r,n){r&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),s(3),l(4,"translate"),o(),a(5,"button",3),l(6,"translate"),x("click",function(){return n.$activeModal.dismiss("Dismiss")}),a(7,"span",4),s(8,"\xD7"),o()()(),f(9,G,18,17,"div",5),u(10,"div",6),f(11,Z,11,10,"div",7)(12,ee,7,3,"div",7),o()),r&2&&(i(3),h(d(4,7,"form.button_restore")),i(2),b("disabled",n.restoreInProgress),S("aria-label",d(6,9,"form.button_close")),i(4),c(!n.restoreStarted&&!n.setupWizardRestore?9:-1),i(),b("hidden",!n.restoreStarted),i(),c(!n.restoreStarted||n.restoreFailed===!0?11:-1),i(),c(!n.restoreInProgress&&n.restoreStarted?12:-1))},dependencies:[A],encapsulation:2})}return t})();export{me as a};
@@ -1 +0,0 @@
1
- import{c as Q,d as x,e as z,f as D,g as H,j as w,m as j,p as A,q as W,w as U,y as J,z as K}from"./chunk-Z4CHNCHA.js";import{d as G}from"./chunk-HMOW3VNR.js";import{c as q}from"./chunk-3VDXR5B2.js";import{b as T}from"./chunk-4J45MC2M.js";import{a as P}from"./chunk-OAKLLAD6.js";import{b as O}from"./chunk-H3E4T6KH.js";import{Bb as S,Bc as l,Cc as p,M as k,Mb as m,Rb as c,Wb as a,Xb as r,Yb as h,ad as R,cc as $,dc as I,gd as N,h as y,ib as i,kc as C,lc as L,na as g,nc as s,oc as d,pc as B,rb as v,ub as M,w as V,xc as f}from"./chunk-KDJPDALB.js";var X=["password"],Y=["username"],Z=["otp"],ee=e=>({background:e}),F=e=>({"is-invalid":e});function te(e,_){if(e&1&&(a(0,"div")(1,"div",10),h(2,"i",11)(3,"input",12,0),a(5,"label",13),s(6),l(7,"translate"),r()(),a(8,"div",10),h(9,"i",14)(10,"input",15,1),a(12,"label",16),s(13),l(14,"translate"),r()()()),e&2){let t=I();i(3),m("ngClass",f(8,F,t.form.controls.username.dirty&&t.form.controls.username.errors)),i(3),d(p(7,4,"login.label_username")),i(4),m("ngClass",f(10,F,t.form.controls.password.dirty&&t.form.controls.password.errors)),i(3),d(p(14,6,"login.label_password"))}}function ne(e,_){if(e&1&&(a(0,"div")(1,"p",7),s(2),l(3,"translate"),r(),a(4,"div",10),h(5,"i",17)(6,"input",18,2),a(8,"label",19),s(9),l(10,"translate"),r()()()),e&2){let t=I();i(2),d(p(3,3,"users.setup_2fa_enter_code")),i(4),m("ngClass",f(7,F,t.form.controls.otp.dirty&&t.form.controls.otp.errors)),i(3),d(p(10,5,"login.label_2fa_code"))}}function ie(e,_){e&1&&(a(0,"p",8)(1,"small"),s(2),l(3,"translate"),r()()),e&2&&(i(2),d(p(3,1,"login.invalid_credentials")))}function oe(e,_){e&1&&(a(0,"p",8)(1,"small"),s(2),l(3,"translate"),r()()),e&2&&(i(2),d(p(3,1,"login.message_invalid_2fa_code")))}var Ce=(()=>{class e{$auth=g(q);$router=g(G);$settings=g(T);passwordInput=v("password");usernameInput=v("username");otpInput=v("otp");form;backgroundStyle;invalidCredentials=!1;invalid2faCode=!1;twoFactorCodeRequired=!1;inProgress=!1;targetRoute;ngOnInit(){this.form=new H({username:new w(""),password:new w("")}),this.form.valueChanges.pipe(k(500)).subscribe(t=>{var n;let o=(n=this.passwordInput())==null?void 0:n.nativeElement.value;o&&o!==t.password&&this.form.controls.password.setValue(o)}),this.targetRoute=window.sessionStorage.getItem("target_route")||"",this.setBackground()}setBackground(){return y(this,null,function*(){if(this.$settings.settingsLoaded||(yield V(this.$settings.onSettingsLoaded)),this.$settings.env.customWallpaperHash){let t=this.$settings.env.customWallpaperHash?`${P.api.base}/auth/wallpaper/${this.$settings.env.customWallpaperHash}`:"/assets/snapshot.jpg";this.backgroundStyle=`url('${t}') center/cover`}})}onSubmit(){return y(this,null,function*(){var n,b,E;this.invalidCredentials=!1,this.invalid2faCode=!1,this.inProgress=!0;let t=(n=this.passwordInput())==null?void 0:n.nativeElement.value;t&&t!==this.form.get("password").value&&this.form.controls.password.setValue(t);let o=(b=this.usernameInput())==null?void 0:b.nativeElement.value;if(o&&o!==this.form.get("username").value&&this.form.controls.username.setValue(o),this.twoFactorCodeRequired){let u=(E=this.otpInput())==null?void 0:E.nativeElement.value;u&&u!==this.form.get("otp").value&&this.form.controls.username.setValue(u)}yield this.$auth.login(this.form.getRawValue()).then(()=>{this.$router.navigateByUrl(this.targetRoute),window.sessionStorage.removeItem("target_route")}).catch(u=>{u.status===412?(this.form.controls.otp?(this.form.controls.otp.setErrors(["Invalid Code"]),this.invalid2faCode=!0):this.form.addControl("otp",new w("",[x.required,x.minLength(6),x.maxLength(6)])),this.twoFactorCodeRequired=!0,setTimeout(()=>{document.getElementById("form-ota").focus()},100)):this.invalidCredentials=!0}),this.inProgress=!1})}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],viewQuery:function(o,n){o&1&&(C(n.passwordInput,X,5),C(n.usernameInput,Y,5),C(n.otpInput,Z,5)),o&2&&L(3)},decls:13,vars:12,consts:[["username",""],["password",""],["otp",""],[1,"login-container","d-flex","align-items-center","justify-content-center",3,"ngStyle"],[1,"card","card-body","mx-2","login-card"],["novalidate","",3,"ngSubmit","formGroup"],[1,"h4","text-center","mb-4"],[1,"text-center"],[1,"red-text"],["tabindex","3","type","submit",1,"btn","btn-primary",3,"disabled"],[1,"md-form"],[1,"fas","fa-fw","fa-user","prefix","grey-text"],["formControlName","username","type","text","id","form-username","autofocus","","autocomplete","username","autocapitalize","none","tabindex","1",1,"form-control","px-0",3,"ngClass"],["for","form-username"],[1,"fas","fa-fw","fa-lock","prefix","grey-text"],["formControlName","password","type","password","id","form-pass","autocomplete","current-password","tabindex","2",1,"form-control","px-0",3,"ngClass"],["for","form-pass"],[1,"fas","fa-fw","fa-key","prefix","grey-text"],["formControlName","otp","type","text","id","form-ota","autocomplete","one-time-code","autocapitalize","none","inputmode","numeric","pattern","[0-9]*","tabindex","1",1,"form-control","px-0",3,"ngClass"],["for","form-ota"]],template:function(o,n){o&1&&(a(0,"div",3)(1,"div",4)(2,"form",5),$("ngSubmit",function(){return n.onSubmit()}),a(3,"p",6),s(4,"Homebridge"),r(),S(5,te,15,12,"div")(6,ne,11,9,"div"),a(7,"div",7),S(8,ie,4,3,"p",8)(9,oe,4,3,"p",8),a(10,"button",9),s(11),l(12,"translate"),r()()()()()),o&2&&(m("ngStyle",f(10,ee,n.backgroundStyle)),i(2),m("formGroup",n.form),i(3),c(n.twoFactorCodeRequired?-1:5),i(),c(n.twoFactorCodeRequired?6:-1),i(2),c(n.invalidCredentials?8:-1),i(),c(n.invalid2faCode?9:-1),i(),m("disabled",n.form.invalid),i(),B(" ",p(12,8,"login.button_login")," "))},dependencies:[N,J,j,Q,z,D,U,K,A,W,R,O],styles:[".login-container[_ngcontent-%COMP%]{background-color:#f4f4f4;background-size:cover;position:absolute;top:0;bottom:0;right:0;left:0}.login-card[_ngcontent-%COMP%]{max-width:500px;background-color:#ffffffe6}.login-card[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{background-color:inherit!important}@media screen and (min-height: 800px){.login-card[_ngcontent-%COMP%]{margin-bottom:12em}}.login-logo[_ngcontent-%COMP%]{position:absolute;top:-35%;z-index:2000;max-width:450px}@media screen and (max-width: 450px){.login-logo[_ngcontent-%COMP%]{max-width:320px;top:-25%}}@media screen and (max-width: 320px){.login-logo[_ngcontent-%COMP%]{max-width:280px}}@media screen and (max-height: 450px){.login-logo[_ngcontent-%COMP%]{display:none}}"]})}return e})();export{Ce as a};
@@ -1 +0,0 @@
1
- import{a}from"./chunk-W5XD4G3A.js";import"./chunk-LY2KRV55.js";import"./chunk-HMOW3VNR.js";import"./chunk-3VDXR5B2.js";import"./chunk-4J45MC2M.js";import"./chunk-OAKLLAD6.js";import"./chunk-QHHRJOCD.js";import"./chunk-H3E4T6KH.js";import"./chunk-KDJPDALB.js";export{a as RestartComponent};
@@ -1 +0,0 @@
1
- import{T as te,c as X,d as Y,e as Z,f as ee}from"./chunk-4XUM4AAX.js";import{a as U}from"./chunk-BZVO3JIQ.js";import{m as J,n as K,o as Q}from"./chunk-F5SS6TN7.js";import{c as W,e as R,f as H,i as j,l as G,m as z,y as q}from"./chunk-Z4CHNCHA.js";import{c as F}from"./chunk-3VDXR5B2.js";import{b as L}from"./chunk-4J45MC2M.js";import{b as T}from"./chunk-H3E4T6KH.js";import{$b as A,Bb as y,Bc as s,Cc as l,Lb as x,Mb as c,Wb as r,Xb as a,Yb as _,Zb as E,_b as B,ad as P,bd as V,cc as v,cd as N,dc as p,dd as O,ib as n,na as f,nc as d,oc as u,pc as w,sc as M,tc as S,ub as C,uc as k,wc as $,xa as b,xc as D,ya as h}from"./chunk-KDJPDALB.js";var re=()=>({standalone:!0}),ne=(()=>{class t{$activeModal=f(J);roomName;static \u0275fac=function(o){return new(o||t)};static \u0275cmp=C({type:t,selectors:[["ng-component"]],inputs:{roomName:"roomName"},decls:30,vars:21,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],["role","alert",1,"alert"],[1,"md-form"],["type","text","id","form-name","autofocus","",1,"form-control","px-0",3,"ngModelChange","keyup.enter","ngModel","ngModelOptions"],["for","form-name"],[1,"fas","fa-fw","fa-home"],[1,"modal-footer","justify-content-between"],[1,"text-left"],["type","button","data-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-right"],["type","button","data-dismiss","modal",1,"btn","btn-primary",3,"click"]],template:function(o,i){o&1&&(r(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),d(4),s(5,"translate"),a(),r(6,"button",3),s(7,"translate"),v("click",function(){return i.$activeModal.dismiss("Dismiss")}),r(8,"span",4),d(9,"\xD7"),a()()(),r(10,"div",5)(11,"div",6),d(12),s(13,"translate"),a(),r(14,"div",7)(15,"input",8),k("ngModelChange",function(I){return S(i.roomName,I)||(i.roomName=I),I}),v("keyup.enter",function(){return i.$activeModal.close(i.roomName)}),a(),r(16,"label",9),_(17,"i",10),d(18),s(19,"translate"),a()()(),r(20,"div",11)(21,"div",12)(22,"button",13),v("click",function(){return i.$activeModal.dismiss("Dismiss")}),d(23),s(24,"translate"),a()(),_(25,"div",14),r(26,"div",15)(27,"button",16),v("click",function(){return i.$activeModal.close(i.roomName)}),d(28),s(29,"translate"),a()()()()()),o&2&&(n(4),u(l(5,8,"accessories.button_add_room")),n(2),x("aria-label",l(7,10,"form.button_close")),n(6),u(l(13,12,"accessories.rooms_not_appear_in_homekit")),n(3),M("ngModel",i.roomName),c("ngModelOptions",$(20,re)),n(3),w(" ",l(19,14,"accessories.room_name")," "),n(5),w(" ",l(24,16,"form.button_close")," "),n(5),w(" ",l(29,18,"form.button_save")," "))},dependencies:[q,z,W,R,H,G,j,T],encapsulation:2})}return t})();var oe=(()=>{class t{constructor(){}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=C({type:t,selectors:[["app-drag-here-placeholder"]],decls:5,vars:3,consts:[[1,"accessory-box"],[1,"fas","fa-fw","fa-arrow-alt-circle-down","accessory-icon"],[1,"accessory-label"]],template:function(o,i){o&1&&(r(0,"div",0),_(1,"i",1),r(2,"div",2),d(3),s(4,"translate"),a()()),o&2&&(n(3),u(l(4,1,"accessories.control.drag_here")))},dependencies:[T],styles:[".accessory-box[_ngcontent-%COMP%]{opacity:.2}"]})}return t})();var ae=t=>({"cursor-move":t});function se(t,g){if(t&1&&(r(0,"div",19)(1,"div",20)(2,"h5",21),d(3),s(4,"translate"),a()()()),t&2){let e=p().$implicit,o=p(2);n(2),c("ngClass",D(4,ae,!o.isMobile)),n(),w(" ",e.name==="Default Room"?l(4,2,"accessories.control.default_room"):e.name," ")}}function le(t,g){if(t&1&&(E(0),_(1,"app-accessory-tile",26),B()),t&2){let e=p().$implicit;n(),c("service",e)}}function ce(t,g){if(t&1&&(r(0,"div",25),y(1,le,2,1,"ng-container",0),a()),t&2){let e=g.$implicit,o=p(4);c("ngSwitch",e.type),n(),c("ngIf",!o.hideHidden||!e.hidden)}}function de(t,g){if(t&1){let e=A();r(0,"div",22),k("dragulaModelChange",function(i){b(e);let m=p().$implicit;return S(m.services,i)||(m.services=i),h(i)}),y(1,ce,2,2,"div",23),_(2,"div",24)(3,"div",24)(4,"div",24)(5,"div",24)(6,"div",24)(7,"div",24)(8,"div",24)(9,"div",24)(10,"div",24)(11,"div",24)(12,"div",24)(13,"div",24)(14,"div",24)(15,"div",24)(16,"div",24),a()}if(t&2){let e=p().$implicit;c("dragula","services-bag"),M("dragulaModel",e.services),n(),c("ngForOf",e.services)}}function pe(t,g){if(t&1){let e=A();r(0,"div",27),k("dragulaModelChange",function(i){b(e);let m=p().$implicit;return S(m.services,i)||(m.services=i),h(i)}),_(1,"app-drag-here-placeholder",28),a()}if(t&2){let e=p().$implicit;c("dragula","services-bag"),M("dragulaModel",e.services)}}function me(t,g){if(t&1&&(r(0,"div"),y(1,se,5,6,"div",15),r(2,"div",16),y(3,de,17,3,"div",17)(4,pe,2,2,"div",18),a()()),t&2){let e=g.$implicit,o=p(2);n(),c("ngIf",!o.isMobile||e.services.length),n(2),c("ngIf",e.services.length),n(),c("ngIf",!e.services.length&&!o.isMobile)}}function _e(t,g){if(t&1){let e=A();r(0,"div")(1,"div",1)(2,"div",2)(3,"h3",3),d(4),s(5,"translate"),a()(),r(6,"div",4)(7,"div",5)(8,"button",6),s(9,"translate"),s(10,"translate"),v("click",function(){b(e);let i=p();return h(i.addRoom())}),_(11,"i",7),a()(),r(12,"div",5)(13,"button",6),s(14,"translate"),s(15,"translate"),s(16,"translate"),s(17,"translate"),v("click",function(){b(e);let i=p();return h(i.hideHidden=!i.hideHidden)}),_(18,"i",8),a()(),r(19,"div",5)(20,"button",9),s(21,"translate"),s(22,"translate"),v("click",function(){b(e);let i=p();return h(i.toggleLayoutLock())}),_(23,"i",10),a(),r(24,"button",11),s(25,"translate"),s(26,"translate"),v("click",function(){b(e);let i=p();return h(i.toggleLayoutLock())}),_(27,"i",12),a()()()(),r(28,"div",13),k("dragulaModelChange",function(i){b(e);let m=p();return S(m.$accessories.rooms,i)||(m.$accessories.rooms=i),h(i)}),y(29,me,5,3,"div",14),a()()}if(t&2){let e=p();n(4),u(l(5,17,"accessories.title_accessories")),n(4),c("hidden",e.isMobile)("ngbTooltip",l(9,19,"accessories.button_add_room")),x("aria-label",l(10,21,"accessories.button_add_room")),n(5),c("hidden",e.isMobile)("ngbTooltip",e.hideHidden?l(14,23,"accessories.button_hidden_show"):l(15,25,"accessories.button_hidden_hide")),x("aria-label",e.hideHidden?l(16,27,"accessories.button_hidden_show"):l(17,29,"accessories.button_hidden_hide")),n(5),c("ngClass",e.hideHidden?"fa-eye-slash":"fa-eye"),n(2),c("disabled",!e.isMobile)("ngbTooltip",l(21,31,"form.button_unlock")),x("aria-label",l(22,33,"form.button_unlock")),n(4),c("disabled",e.isMobile)("ngbTooltip",l(25,35,"form.button_lock")),x("aria-label",l(26,37,"form.button_lock")),n(4),c("dragula","rooms-bag"),M("dragulaModel",e.$accessories.rooms),n(),c("ngForOf",e.$accessories.rooms)}}function ue(t,g){t&1&&(r(0,"p",37),d(1),s(2,"translate"),a()),t&2&&(n(),u(l(2,1,"accessories.settings_link")))}function ge(t,g){if(t&1&&(r(0,"div")(1,"div",19)(2,"div",29)(3,"h3",30),d(4),s(5,"translate"),a()(),r(6,"div",31)(7,"div",32)(8,"h4",33),d(9),s(10,"translate"),a(),r(11,"div")(12,"p"),d(13),s(14,"translate"),a(),r(15,"p",34)(16,"span"),d(17),s(18,"translate"),a(),r(19,"a",35),d(20," https://github.com/homebridge/homebridge-config-ui-x/wiki/Enabling-Accessory-Control "),a(),r(21,"span"),d(22),s(23,"translate"),a()(),y(24,ue,3,3,"p",36),a()()()()()),t&2){let e=p();n(4),u(l(5,6,"accessories.title_accessories")),n(5),u(l(10,8,"accessories.control_disabled")),n(4),u(l(14,10,"accessories.message_must_use_insecure_mode")),n(4),u(l(18,12,"accessories.message_please_see")),n(5),u(l(23,14,"accessories.message_for_more_information")),n(2),c("ngIf",e.$auth.user.admin)}}var We=(()=>{class t{$auth=f(F);dragulaService=f(Y);$modal=f(K);$settings=f(L);$md=f(U);$accessories=f(X);isMobile=!1;hideHidden=!0;orderSubscription;constructor(){let e=this.dragulaService;this.isMobile=this.$md.detect.mobile(),e.createGroup("rooms-bag",{moves:(o,i,m)=>!this.isMobile&&m.classList.contains("drag-handle")}),e.createGroup("services-bag",{moves:o=>!this.isMobile&&!o.classList.contains("no-drag")}),this.orderSubscription=e.drop().subscribe(()=>{setTimeout(()=>{this.$accessories.saveLayout()})}),window.localStorage.getItem("accessories-layout-locked")&&(this.isMobile=!0)}ngOnInit(){this.$accessories.start()}addRoom(){this.$modal.open(ne,{size:"lg",backdrop:"static"}).result.then(e=>{!e||!e.length||this.$accessories.rooms.find(o=>o.name===e)||(this.$accessories.rooms.push({name:e,services:[]}),this.isMobile&&this.toggleLayoutLock())}).catch(()=>{})}toggleLayoutLock(){this.isMobile=!this.isMobile,this.isMobile?window.localStorage.setItem("accessories-layout-locked","yes"):window.localStorage.removeItem("accessories-layout-locked")}ngOnDestroy(){this.$accessories.stop(),this.orderSubscription.unsubscribe(),this.dragulaService.destroy("rooms-bag"),this.dragulaService.destroy("services-bag")}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=C({type:t,selectors:[["app-accessories"]],decls:2,vars:2,consts:[[4,"ngIf"],[1,"row","mb-3"],[1,"col-sm-6"],[1,"primary-text","m-0"],[1,"col-sm-6","text-right","d-none","d-sm-block"],["role","group",1,"btn-group"],["type","button","container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","status-button","my-0",3,"click","hidden","ngbTooltip"],[1,"fas","fa-fw","fa-folder-plus"],[1,"fas","fa-fw",3,"ngClass"],["type","button","container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","status-button","my-0",3,"click","disabled","ngbTooltip"],[1,"fas","fa-fw","fa-unlock"],["type","button","container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","status-button","my-0","mr-0",3,"click","disabled","ngbTooltip"],[1,"fas","fa-fw","fa-lock"],[3,"dragulaModelChange","dragula","dragulaModel"],[4,"ngFor","ngForOf"],["class","row",4,"ngIf"],[1,"row","mb-4"],["class","col-md-12 d-flex flex-wrap justify-content-between noselect services-bag",3,"dragula","dragulaModel","dragulaModelChange",4,"ngIf"],["class","col-md-12 d-flex flex-wrap noselect",3,"dragula","dragulaModel","dragulaModelChange",4,"ngIf"],[1,"row"],[1,"col-md-12"],[1,"primary-text","drag-handle","room-title","m-0",3,"ngClass"],[1,"col-md-12","d-flex","flex-wrap","justify-content-between","noselect","services-bag",3,"dragulaModelChange","dragula","dragulaModel"],["class","accessory-item accessory-tab",3,"ngSwitch",4,"ngFor","ngForOf"],[1,"accessory-box","invisible","py-0","my-0",2,"height","0 !important"],[1,"accessory-item","accessory-tab",3,"ngSwitch"],[3,"service"],[1,"col-md-12","d-flex","flex-wrap","noselect",3,"dragulaModelChange","dragula","dragulaModel"],[1,"no-drag"],[1,"col-12"],[1,"primary-text","m-0","mb-3"],[1,"col-12","text-center"],["role","alert",1,"alert","alert-warning","p-4"],[1,"primary-text","mb-3","mt-0"],[1,"mb-0"],["target","_blank","rel","noopener noreferrer","href","https://github.com/homebridge/homebridge-config-ui-x/wiki/Enabling-Accessory-Control"],["class","mt-3 mb-0",4,"ngIf"],[1,"mt-3","mb-0"]],template:function(o,i){o&1&&y(0,_e,30,39,"div",0)(1,ge,25,16,"div",0),o&2&&(c("ngIf",i.$settings.env.enableAccessories),n(),c("ngIf",!i.$settings.env.enableAccessories))},dependencies:[N,Q,P,ee,Z,V,O,te,oe,T],styles:[".room-title[_ngcontent-%COMP%]{margin-left:10px}@media (max-width: 575px){.room-title[_ngcontent-%COMP%]{margin-left:7px}}.services-bag[_ngcontent-%COMP%]{min-height:170px}@media (max-width: 575px){.services-bag[_ngcontent-%COMP%]{min-height:initial}}.cursor-move[_ngcontent-%COMP%]{cursor:move}.gu-transit[_ngcontent-%COMP%] .manage-accessory-button[_ngcontent-%COMP%]{display:none}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return t})();export{ne as a,We as b};
@@ -1 +0,0 @@
1
- import{a}from"./chunk-2HOZ3Y6C.js";import"./chunk-F5SS6TN7.js";import"./chunk-Z4CHNCHA.js";import"./chunk-HMOW3VNR.js";import"./chunk-4J45MC2M.js";import"./chunk-OAKLLAD6.js";import"./chunk-QHHRJOCD.js";import"./chunk-H3E4T6KH.js";import"./chunk-KDJPDALB.js";export{a as PowerOptionsComponent};
@@ -1 +0,0 @@
1
- import"./chunk-HMGLHQQM.js";import"./chunk-2JYMQLNI.js";import"./chunk-T6FYP7FJ.js";import"./chunk-F4QKTMKG.js";import"./chunk-EFBNPDVN.js";import{q as s}from"./chunk-F5SS6TN7.js";import"./chunk-Z4CHNCHA.js";import"./chunk-LY2KRV55.js";import{g as i}from"./chunk-HMOW3VNR.js";import"./chunk-3VDXR5B2.js";import"./chunk-4J45MC2M.js";import"./chunk-OAKLLAD6.js";import"./chunk-QHHRJOCD.js";import{c as n}from"./chunk-H3E4T6KH.js";import{ia as t,md as m,vb as r}from"./chunk-KDJPDALB.js";var f=[{path:"",loadComponent:()=>import("./chunk-ZXAV3M77.js").then(o=>o.LogsComponent)}],p=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[i.forChild(f),i]})}return o})();var h=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[m,p,s,n.forChild()]})}return o})();export{h as LogsModule};
@@ -1 +0,0 @@
1
- import{g as a}from"./chunk-IQ2VQFLN.js";import"./chunk-A5ZYGUPQ.js";import"./chunk-RUC7TPCB.js";import"./chunk-PFCIYPDO.js";import"./chunk-MMPQXC6H.js";import"./chunk-6MDI4RNQ.js";import"./chunk-2JYMQLNI.js";import"./chunk-T6FYP7FJ.js";import"./chunk-P5WCYSBI.js";import"./chunk-F4QKTMKG.js";import"./chunk-CK234OHO.js";import"./chunk-BZVO3JIQ.js";import"./chunk-EFBNPDVN.js";import"./chunk-F5SS6TN7.js";import"./chunk-Z4CHNCHA.js";import"./chunk-LY2KRV55.js";import"./chunk-HMOW3VNR.js";import"./chunk-3VDXR5B2.js";import"./chunk-4J45MC2M.js";import"./chunk-OAKLLAD6.js";import"./chunk-QHHRJOCD.js";import"./chunk-H3E4T6KH.js";import"./chunk-KDJPDALB.js";export{a as SettingsComponent};
@@ -1 +0,0 @@
1
- import{A as N,B as x,C as D,D as W,E as I,F as j,G as O,H as V,I as q,J as B,K as G,L as R,M as U,N as z,O as E,P as J,Q as K,R as P,S as Q,T as X,b as f,c as a,g as C,h as s,i as d,j as c,k as u,l,m as g,n as M,o as y,p as h,q as v,r as S,s as b,t as w,u as A,v as F,w as k,x as T,y as H,z as L}from"./chunk-4XUM4AAX.js";import{b as Y}from"./chunk-6MDI4RNQ.js";import{q as p}from"./chunk-F5SS6TN7.js";import{y as t,z as i}from"./chunk-Z4CHNCHA.js";import{c as n}from"./chunk-H3E4T6KH.js";import{ia as m,md as e,vb as r}from"./chunk-KDJPDALB.js";var Cm=(()=>{class o{static \u0275fac=function(Z){return new(Z||o)};static \u0275mod=r({type:o});static \u0275inj=m({providers:[a],imports:[e,t,i,n.forChild(),C,p,Y,X,f,B,q,R,D,h,v,U,T,k,H,L,S,N,x,c,Q,P,K,J,y,M,G,g,V,O,I,W,F,j,E,z,A,d,s,b,w,l,u]})}return o})();export{Cm as a};
@@ -1 +0,0 @@
1
- import{m as k}from"./chunk-F5SS6TN7.js";import{b as g}from"./chunk-H3E4T6KH.js";import{Bb as x,Bc as m,Cc as r,Lb as d,Qb as p,Rb as I,Wb as i,Xb as a,Yb as f,cc as s,dc as B,ib as t,na as v,nc as o,oc as u,pc as b,ub as _}from"./chunk-KDJPDALB.js";function y(n,M){if(n&1&&f(0,"i",14),n&2){let c=B();p("fas fa-fw ",c.faIconClass," mb-4")}}var L=(()=>{class n{$activeModal=v(k);title;message;confirmButtonLabel;confirmButtonClass;faIconClass;static \u0275fac=function(l){return new(l||n)};static \u0275cmp=_({type:n,selectors:[["ng-component"]],inputs:{title:"title",message:"message",confirmButtonLabel:"confirmButtonLabel",confirmButtonClass:"confirmButtonClass",faIconClass:"faIconClass"},decls:22,vars:16,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body","w-100","text-center"],[2,"font-size","75px",3,"class"],[1,"w-100","text-center"],[1,"modal-footer","justify-content-between"],[1,"text-left"],["type","button","data-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-right"],["type","button","data-dismiss","modal",3,"click"],[2,"font-size","75px"]],template:function(l,e){l&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),o(3),a(),i(4,"button",3),m(5,"translate"),s("click",function(){return e.$activeModal.dismiss("Dismiss")}),i(6,"span",4),o(7,"\xD7"),a()()(),i(8,"div",5),x(9,y,1,3,"i",6),i(10,"p",7),o(11),a()(),i(12,"div",8)(13,"div",9)(14,"button",10),m(15,"translate"),s("click",function(){return e.$activeModal.dismiss("Dismiss")}),o(16),m(17,"translate"),a()(),f(18,"div",11),i(19,"div",12)(20,"button",13),s("click",function(){return e.$activeModal.close()}),o(21),a()()()()),l&2&&(t(3),u(e.title),t(),d("aria-label",r(5,10,"form.button_close")),t(5),I(e.faIconClass?9:-1),t(2),u(e.message),t(3),d("aria-label",r(15,12,"form.button_close")),t(2),b(" ",r(17,14,"form.button_close")," "),t(4),p("btn ",e.confirmButtonClass||"btn-primary",""),t(),b(" ",e.confirmButtonLabel," "))},dependencies:[g],encapsulation:2})}return n})();export{L as a};
@@ -1 +0,0 @@
1
- import"./chunk-RSUIRNXB.js";import"./chunk-W463PPSI.js";import"./chunk-LY2KRV55.js";import{g as n}from"./chunk-HMOW3VNR.js";import"./chunk-3VDXR5B2.js";import"./chunk-4J45MC2M.js";import"./chunk-OAKLLAD6.js";import"./chunk-QHHRJOCD.js";import{c as m}from"./chunk-H3E4T6KH.js";import{ia as t,md as i,vb as r}from"./chunk-KDJPDALB.js";var d=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"restart-server",loadComponent:()=>import("./chunk-HH7AWBSM.js").then(o=>o.RestartLinuxComponent)},{path:"shutdown-server",loadComponent:()=>import("./chunk-5U265P7U.js").then(o=>o.ShutdownLinuxComponent)}],u=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[n.forChild(d),n]})}return o})();var g=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[i,m.forChild(),u]})}return o})();export{g as LinuxModule};
@@ -1 +0,0 @@
1
- import{a as R}from"./chunk-2QRN7P6W.js";import"./chunk-TC25IMJX.js";import{c as g}from"./chunk-MMPQXC6H.js";import"./chunk-BZVO3JIQ.js";import{q as C}from"./chunk-F5SS6TN7.js";import{y as S,z as v}from"./chunk-Z4CHNCHA.js";import"./chunk-LY2KRV55.js";import{d as h,g as n}from"./chunk-HMOW3VNR.js";import"./chunk-3VDXR5B2.js";import"./chunk-4J45MC2M.js";import{b as f,j as M}from"./chunk-OAKLLAD6.js";import"./chunk-QHHRJOCD.js";import{a as u,c as d}from"./chunk-H3E4T6KH.js";import{h as p,ha as c,ia as i,md as l,na as e,vb as a,w as s}from"./chunk-KDJPDALB.js";var m=(()=>{class t{$api=e(f);$router=e(h);$toastr=e(M);$translate=e(u);resolve(){return p(this,null,function*(){try{return yield s(this.$api.get("/platform-tools/docker/startup-script"))}catch(r){console.error(r),this.$toastr.error(r.message,this.$translate.instant("toast.title_error")),this.$router.navigate(["/"])}})}static \u0275fac=function(o){return new(o||t)};static \u0275prov=c({token:t,factory:t.\u0275fac})}return t})();var j=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"startup-script",loadComponent:()=>import("./chunk-2Q3ZJBWD.js").then(t=>t.StartupScriptComponent),resolve:{startupScript:m}},{path:"restart-container",loadComponent:()=>import("./chunk-LAYV53FZ.js").then(t=>t.ContainerRestartComponent)}],$=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275mod=a({type:t});static \u0275inj=i({imports:[n.forChild(j),n]})}return t})();var Q=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275mod=a({type:t});static \u0275inj=i({providers:[m],imports:[l,S,v,g,C,d.forChild(),$,R]})}return t})();export{Q as DockerModule};
@@ -1,5 +0,0 @@
1
- import{a as hn}from"./chunk-Z4CHNCHA.js";import{$b as li,Aa as nn,Bb as st,Ca as ie,Da as Mt,E as L,Ec as dn,F as qi,Fa as T,Ga as re,H as Re,Hc as ze,I as Jt,J as wt,Ja as J,Kb as ii,Lb as Ne,Mb as Ct,Nc as Nt,O as $e,Ob as W,Pb as _e,Q as Yi,Ra as fe,Rb as ni,S as Zi,Sa as Tt,Sb as oi,Sc as le,Ta as ot,Ub as si,Vb as ri,Wb as Le,Xb as We,Yb as ai,Zb as sn,_b as rn,a as yt,aa as qt,ac as ae,b as Qt,ba as k,ca as it,cc as me,da as Ot,dc as ge,ec as Rt,fc as St,ga as Yt,gc as xe,ha as K,hc as an,hd as un,ia as I,ib as je,ic as ve,jc as ye,k as bt,ka as en,lb as It,mc as ln,n as X,na as u,nc as ci,o as Ki,oc as di,p as Qi,pb as ei,r as tt,ta as Zt,ub as Se,va as tn,vb as C,vc as ui,wa as nt,wb as H,x as Ce,xa as Dt,ya as Et,yb as on,z as Ji,zb as ti,zc as cn}from"./chunk-KDJPDALB.js";function xt(t){t||(tn(xt),t=u(Mt));let e=new bt(s=>t.onDestroy(s.next.bind(s)));return s=>s.pipe(k(e))}var R="top",U="bottom",B="right",N="left",Ft="auto",be=[R,U,B,N],ce="start",Fe="end",pn="clippingParents",kt="viewport",Xe="popper",fn="reference",hi=be.reduce(function(t,e){return t.concat([e+"-"+ce,e+"-"+Fe])},[]),Bt=[].concat(be,[Ft]).reduce(function(t,e){return t.concat([e,e+"-"+ce,e+"-"+Fe])},[]),uo="beforeRead",ho="read",po="afterRead",fo="beforeMain",_o="main",mo="afterMain",go="beforeWrite",vo="write",yo="afterWrite",_n=[uo,ho,po,fo,_o,mo,go,vo,yo];function P(t){return t?(t.nodeName||"").toLowerCase():null}function O(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function q(t){var e=O(t).Element;return t instanceof e||t instanceof Element}function x(t){var e=O(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Ke(t){if(typeof ShadowRoot>"u")return!1;var e=O(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function bo(t){var e=t.state;Object.keys(e.elements).forEach(function(s){var i=e.styles[s]||{},n=e.attributes[s]||{},o=e.elements[s];!x(o)||!P(o)||(Object.assign(o.style,i),Object.keys(n).forEach(function(a){var r=n[a];r===!1?o.removeAttribute(a):o.setAttribute(a,r===!0?"":r)}))})}function wo(t){var e=t.state,s={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,s.popper),e.styles=s,e.elements.arrow&&Object.assign(e.elements.arrow.style,s.arrow),function(){Object.keys(e.elements).forEach(function(i){var n=e.elements[i],o=e.attributes[i]||{},a=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:s[i]),r=a.reduce(function(l,d){return l[d]="",l},{});!x(n)||!P(n)||(Object.assign(n.style,r),Object.keys(o).forEach(function(l){n.removeAttribute(l)}))})}}var mn={name:"applyStyles",enabled:!0,phase:"write",fn:bo,effect:wo,requires:["computeStyles"]};function A(t){return t.split("-")[0]}var ne=Math.max,ke=Math.min,de=Math.round;function Qe(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function rt(){return!/^((?!chrome|android).)*safari/i.test(Qe())}function Y(t,e,s){e===void 0&&(e=!1),s===void 0&&(s=!1);var i=t.getBoundingClientRect(),n=1,o=1;e&&x(t)&&(n=t.offsetWidth>0&&de(i.width)/t.offsetWidth||1,o=t.offsetHeight>0&&de(i.height)/t.offsetHeight||1);var a=q(t)?O(t):window,r=a.visualViewport,l=!rt()&&s,d=(i.left+(l&&r?r.offsetLeft:0))/n,c=(i.top+(l&&r?r.offsetTop:0))/o,f=i.width/n,p=i.height/o;return{width:f,height:p,top:c,right:d+f,bottom:c+p,left:d,x:d,y:c}}function Be(t){var e=Y(t),s=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-s)<=1&&(s=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:s,height:i}}function at(t,e){var s=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(s&&Ke(s)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function z(t){return O(t).getComputedStyle(t)}function pi(t){return["table","td","th"].indexOf(P(t))>=0}function V(t){return((q(t)?t.ownerDocument:t.document)||window.document).documentElement}function ue(t){return P(t)==="html"?t:t.assignedSlot||t.parentNode||(Ke(t)?t.host:null)||V(t)}function gn(t){return!x(t)||z(t).position==="fixed"?null:t.offsetParent}function Oo(t){var e=/firefox/i.test(Qe()),s=/Trident/i.test(Qe());if(s&&x(t)){var i=z(t);if(i.position==="fixed")return null}var n=ue(t);for(Ke(n)&&(n=n.host);x(n)&&["html","body"].indexOf(P(n))<0;){var o=z(n);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return n;n=n.parentNode}return null}function oe(t){for(var e=O(t),s=gn(t);s&&pi(s)&&z(s).position==="static";)s=gn(s);return s&&(P(s)==="html"||P(s)==="body"&&z(s).position==="static")?e:s||Oo(t)||e}function Pe(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Ae(t,e,s){return ne(t,ke(e,s))}function vn(t,e,s){var i=Ae(t,e,s);return i>s?s:i}function lt(){return{top:0,right:0,bottom:0,left:0}}function ct(t){return Object.assign({},lt(),t)}function dt(t,e){return e.reduce(function(s,i){return s[i]=t,s},{})}var Do=function(e,s){return e=typeof e=="function"?e(Object.assign({},s.rects,{placement:s.placement})):e,ct(typeof e!="number"?e:dt(e,be))};function Eo(t){var e,s=t.state,i=t.name,n=t.options,o=s.elements.arrow,a=s.modifiersData.popperOffsets,r=A(s.placement),l=Pe(r),d=[N,B].indexOf(r)>=0,c=d?"height":"width";if(!(!o||!a)){var f=Do(n.padding,s),p=Be(o),h=l==="y"?R:N,m=l==="y"?U:B,v=s.rects.reference[c]+s.rects.reference[l]-a[l]-s.rects.popper[c],g=a[l]-s.rects.reference[l],w=oe(o),E=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,M=v/2-g/2,_=f[h],y=E-p[c]-f[m],b=E/2-p[c]/2+M,D=Ae(_,b,y),G=l;s.modifiersData[i]=(e={},e[G]=D,e.centerOffset=D-b,e)}}function Mo(t){var e=t.state,s=t.options,i=s.element,n=i===void 0?"[data-popper-arrow]":i;n!=null&&(typeof n=="string"&&(n=e.elements.popper.querySelector(n),!n)||at(e.elements.popper,n)&&(e.elements.arrow=n))}var fi={name:"arrow",enabled:!0,phase:"main",fn:Eo,effect:Mo,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Z(t){return t.split("-")[1]}var To={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Io(t,e){var s=t.x,i=t.y,n=e.devicePixelRatio||1;return{x:de(s*n)/n||0,y:de(i*n)/n||0}}function yn(t){var e,s=t.popper,i=t.popperRect,n=t.placement,o=t.variation,a=t.offsets,r=t.position,l=t.gpuAcceleration,d=t.adaptive,c=t.roundOffsets,f=t.isFixed,p=a.x,h=p===void 0?0:p,m=a.y,v=m===void 0?0:m,g=typeof c=="function"?c({x:h,y:v}):{x:h,y:v};h=g.x,v=g.y;var w=a.hasOwnProperty("x"),E=a.hasOwnProperty("y"),M=N,_=R,y=window;if(d){var b=oe(s),D="clientHeight",G="clientWidth";if(b===O(s)&&(b=V(s),z(b).position!=="static"&&r==="absolute"&&(D="scrollHeight",G="scrollWidth")),b=b,n===R||(n===N||n===B)&&o===Fe){_=U;var F=f&&b===y&&y.visualViewport?y.visualViewport.height:b[D];v-=F-i.height,v*=l?1:-1}if(n===N||(n===R||n===U)&&o===Fe){M=B;var S=f&&b===y&&y.visualViewport?y.visualViewport.width:b[G];h-=S-i.width,h*=l?1:-1}}var $=Object.assign({position:r},d&&To),ee=c===!0?Io({x:h,y:v},O(s)):{x:h,y:v};if(h=ee.x,v=ee.y,l){var j;return Object.assign({},$,(j={},j[_]=E?"0":"",j[M]=w?"0":"",j.transform=(y.devicePixelRatio||1)<=1?"translate("+h+"px, "+v+"px)":"translate3d("+h+"px, "+v+"px, 0)",j))}return Object.assign({},$,(e={},e[_]=E?v+"px":"",e[M]=w?h+"px":"",e.transform="",e))}function Co(t){var e=t.state,s=t.options,i=s.gpuAcceleration,n=i===void 0?!0:i,o=s.adaptive,a=o===void 0?!0:o,r=s.roundOffsets,l=r===void 0?!0:r,d={placement:A(e.placement),variation:Z(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:n,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,yn(Object.assign({},d,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,yn(Object.assign({},d,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var bn={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Co,data:{}};var Pt={passive:!0};function Ro(t){var e=t.state,s=t.instance,i=t.options,n=i.scroll,o=n===void 0?!0:n,a=i.resize,r=a===void 0?!0:a,l=O(e.elements.popper),d=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&d.forEach(function(c){c.addEventListener("scroll",s.update,Pt)}),r&&l.addEventListener("resize",s.update,Pt),function(){o&&d.forEach(function(c){c.removeEventListener("scroll",s.update,Pt)}),r&&l.removeEventListener("resize",s.update,Pt)}}var wn={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ro,data:{}};var So={left:"right",right:"left",bottom:"top",top:"bottom"};function Je(t){return t.replace(/left|right|bottom|top/g,function(e){return So[e]})}var No={start:"end",end:"start"};function At(t){return t.replace(/start|end/g,function(e){return No[e]})}function Ge(t){var e=O(t),s=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:s,scrollTop:i}}function He(t){return Y(V(t)).left+Ge(t).scrollLeft}function _i(t,e){var s=O(t),i=V(t),n=s.visualViewport,o=i.clientWidth,a=i.clientHeight,r=0,l=0;if(n){o=n.width,a=n.height;var d=rt();(d||!d&&e==="fixed")&&(r=n.offsetLeft,l=n.offsetTop)}return{width:o,height:a,x:r+He(t),y:l}}function mi(t){var e,s=V(t),i=Ge(t),n=(e=t.ownerDocument)==null?void 0:e.body,o=ne(s.scrollWidth,s.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),a=ne(s.scrollHeight,s.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),r=-i.scrollLeft+He(t),l=-i.scrollTop;return z(n||s).direction==="rtl"&&(r+=ne(s.clientWidth,n?n.clientWidth:0)-o),{width:o,height:a,x:r,y:l}}function Ue(t){var e=z(t),s=e.overflow,i=e.overflowX,n=e.overflowY;return/auto|scroll|overlay|hidden/.test(s+n+i)}function Gt(t){return["html","body","#document"].indexOf(P(t))>=0?t.ownerDocument.body:x(t)&&Ue(t)?t:Gt(ue(t))}function we(t,e){var s;e===void 0&&(e=[]);var i=Gt(t),n=i===((s=t.ownerDocument)==null?void 0:s.body),o=O(i),a=n?[o].concat(o.visualViewport||[],Ue(i)?i:[]):i,r=e.concat(a);return n?r:r.concat(we(ue(a)))}function qe(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function xo(t,e){var s=Y(t,!1,e==="fixed");return s.top=s.top+t.clientTop,s.left=s.left+t.clientLeft,s.bottom=s.top+t.clientHeight,s.right=s.left+t.clientWidth,s.width=t.clientWidth,s.height=t.clientHeight,s.x=s.left,s.y=s.top,s}function On(t,e,s){return e===kt?qe(_i(t,s)):q(e)?xo(e,s):qe(mi(V(t)))}function Fo(t){var e=we(ue(t)),s=["absolute","fixed"].indexOf(z(t).position)>=0,i=s&&x(t)?oe(t):t;return q(i)?e.filter(function(n){return q(n)&&at(n,i)&&P(n)!=="body"}):[]}function gi(t,e,s,i){var n=e==="clippingParents"?Fo(t):[].concat(e),o=[].concat(n,[s]),a=o[0],r=o.reduce(function(l,d){var c=On(t,d,i);return l.top=ne(c.top,l.top),l.right=ke(c.right,l.right),l.bottom=ke(c.bottom,l.bottom),l.left=ne(c.left,l.left),l},On(t,a,i));return r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}function ut(t){var e=t.reference,s=t.element,i=t.placement,n=i?A(i):null,o=i?Z(i):null,a=e.x+e.width/2-s.width/2,r=e.y+e.height/2-s.height/2,l;switch(n){case R:l={x:a,y:e.y-s.height};break;case U:l={x:a,y:e.y+e.height};break;case B:l={x:e.x+e.width,y:r};break;case N:l={x:e.x-s.width,y:r};break;default:l={x:e.x,y:e.y}}var d=n?Pe(n):null;if(d!=null){var c=d==="y"?"height":"width";switch(o){case ce:l[d]=l[d]-(e[c]/2-s[c]/2);break;case Fe:l[d]=l[d]+(e[c]/2-s[c]/2);break;default:}}return l}function Oe(t,e){e===void 0&&(e={});var s=e,i=s.placement,n=i===void 0?t.placement:i,o=s.strategy,a=o===void 0?t.strategy:o,r=s.boundary,l=r===void 0?pn:r,d=s.rootBoundary,c=d===void 0?kt:d,f=s.elementContext,p=f===void 0?Xe:f,h=s.altBoundary,m=h===void 0?!1:h,v=s.padding,g=v===void 0?0:v,w=ct(typeof g!="number"?g:dt(g,be)),E=p===Xe?fn:Xe,M=t.rects.popper,_=t.elements[m?E:p],y=gi(q(_)?_:_.contextElement||V(t.elements.popper),l,c,a),b=Y(t.elements.reference),D=ut({reference:b,element:M,strategy:"absolute",placement:n}),G=qe(Object.assign({},M,D)),F=p===Xe?G:b,S={top:y.top-F.top+w.top,bottom:F.bottom-y.bottom+w.bottom,left:y.left-F.left+w.left,right:F.right-y.right+w.right},$=t.modifiersData.offset;if(p===Xe&&$){var ee=$[n];Object.keys(S).forEach(function(j){var De=[B,U].indexOf(j)>=0?1:-1,Ee=[R,U].indexOf(j)>=0?"y":"x";S[j]+=ee[Ee]*De})}return S}function vi(t,e){e===void 0&&(e={});var s=e,i=s.placement,n=s.boundary,o=s.rootBoundary,a=s.padding,r=s.flipVariations,l=s.allowedAutoPlacements,d=l===void 0?Bt:l,c=Z(i),f=c?r?hi:hi.filter(function(m){return Z(m)===c}):be,p=f.filter(function(m){return d.indexOf(m)>=0});p.length===0&&(p=f);var h=p.reduce(function(m,v){return m[v]=Oe(t,{placement:v,boundary:n,rootBoundary:o,padding:a})[A(v)],m},{});return Object.keys(h).sort(function(m,v){return h[m]-h[v]})}function ko(t){if(A(t)===Ft)return[];var e=Je(t);return[At(t),e,At(e)]}function Bo(t){var e=t.state,s=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var n=s.mainAxis,o=n===void 0?!0:n,a=s.altAxis,r=a===void 0?!0:a,l=s.fallbackPlacements,d=s.padding,c=s.boundary,f=s.rootBoundary,p=s.altBoundary,h=s.flipVariations,m=h===void 0?!0:h,v=s.allowedAutoPlacements,g=e.options.placement,w=A(g),E=w===g,M=l||(E||!m?[Je(g)]:ko(g)),_=[g].concat(M).reduce(function(Ve,pe){return Ve.concat(A(pe)===Ft?vi(e,{placement:pe,boundary:c,rootBoundary:f,padding:d,flipVariations:m,allowedAutoPlacements:v}):pe)},[]),y=e.rects.reference,b=e.rects.popper,D=new Map,G=!0,F=_[0],S=0;S<_.length;S++){var $=_[S],ee=A($),j=Z($)===ce,De=[R,U].indexOf(ee)>=0,Ee=De?"width":"height",Q=Oe(e,{placement:$,boundary:c,rootBoundary:f,altBoundary:p,padding:d}),te=De?j?B:N:j?U:R;y[Ee]>b[Ee]&&(te=Je(te));var ft=Je(te),Me=[];if(o&&Me.push(Q[ee]<=0),r&&Me.push(Q[te]<=0,Q[ft]<=0),Me.every(function(Ve){return Ve})){F=$,G=!1;break}D.set($,Me)}if(G)for(var _t=m?3:1,Wt=function(pe){var et=_.find(function(gt){var Te=D.get(gt);if(Te)return Te.slice(0,pe).every(function(zt){return zt})});if(et)return F=et,"break"},Ze=_t;Ze>0;Ze--){var mt=Wt(Ze);if(mt==="break")break}e.placement!==F&&(e.modifiersData[i]._skip=!0,e.placement=F,e.reset=!0)}}var yi={name:"flip",enabled:!0,phase:"main",fn:Bo,requiresIfExists:["offset"],data:{_skip:!1}};function Po(t,e,s){var i=A(t),n=[N,R].indexOf(i)>=0?-1:1,o=typeof s=="function"?s(Object.assign({},e,{placement:t})):s,a=o[0],r=o[1];return a=a||0,r=(r||0)*n,[N,B].indexOf(i)>=0?{x:r,y:a}:{x:a,y:r}}function Ao(t){var e=t.state,s=t.options,i=t.name,n=s.offset,o=n===void 0?[0,0]:n,a=Bt.reduce(function(c,f){return c[f]=Po(f,e.rects,o),c},{}),r=a[e.placement],l=r.x,d=r.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=d),e.modifiersData[i]=a}var bi={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Ao};function Go(t){var e=t.state,s=t.name;e.modifiersData[s]=ut({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var Dn={name:"popperOffsets",enabled:!0,phase:"read",fn:Go,data:{}};function wi(t){return t==="x"?"y":"x"}function Ho(t){var e=t.state,s=t.options,i=t.name,n=s.mainAxis,o=n===void 0?!0:n,a=s.altAxis,r=a===void 0?!1:a,l=s.boundary,d=s.rootBoundary,c=s.altBoundary,f=s.padding,p=s.tether,h=p===void 0?!0:p,m=s.tetherOffset,v=m===void 0?0:m,g=Oe(e,{boundary:l,rootBoundary:d,padding:f,altBoundary:c}),w=A(e.placement),E=Z(e.placement),M=!E,_=Pe(w),y=wi(_),b=e.modifiersData.popperOffsets,D=e.rects.reference,G=e.rects.popper,F=typeof v=="function"?v(Object.assign({},e.rects,{placement:e.placement})):v,S=typeof F=="number"?{mainAxis:F,altAxis:F}:Object.assign({mainAxis:0,altAxis:0},F),$=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,ee={x:0,y:0};if(b){if(o){var j,De=_==="y"?R:N,Ee=_==="y"?U:B,Q=_==="y"?"height":"width",te=b[_],ft=te+g[De],Me=te-g[Ee],_t=h?-G[Q]/2:0,Wt=E===ce?D[Q]:G[Q],Ze=E===ce?-G[Q]:-D[Q],mt=e.elements.arrow,Ve=h&&mt?Be(mt):{width:0,height:0},pe=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:lt(),et=pe[De],gt=pe[Ee],Te=Ae(0,D[Q],Ve[Q]),zt=M?D[Q]/2-_t-Te-et-S.mainAxis:Wt-Te-et-S.mainAxis,oo=M?-D[Q]/2+_t+Te+gt+S.mainAxis:Ze+Te+gt+S.mainAxis,Xt=e.elements.arrow&&oe(e.elements.arrow),so=Xt?_==="y"?Xt.clientTop||0:Xt.clientLeft||0:0,Hi=(j=$==null?void 0:$[_])!=null?j:0,ro=te+zt-Hi-so,ao=te+oo-Hi,Ui=Ae(h?ke(ft,ro):ft,te,h?ne(Me,ao):Me);b[_]=Ui,ee[_]=Ui-te}if(r){var Vi,lo=_==="x"?R:N,co=_==="x"?U:B,Ie=b[y],vt=y==="y"?"height":"width",$i=Ie+g[lo],ji=Ie-g[co],Kt=[R,N].indexOf(w)!==-1,Li=(Vi=$==null?void 0:$[y])!=null?Vi:0,Wi=Kt?$i:Ie-D[vt]-G[vt]-Li+S.altAxis,zi=Kt?Ie+D[vt]+G[vt]-Li-S.altAxis:ji,Xi=h&&Kt?vn(Wi,Ie,zi):Ae(h?Wi:$i,Ie,h?zi:ji);b[y]=Xi,ee[y]=Xi-Ie}e.modifiersData[i]=ee}}var Oi={name:"preventOverflow",enabled:!0,phase:"main",fn:Ho,requiresIfExists:["offset"]};function Di(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Ei(t){return t===O(t)||!x(t)?Ge(t):Di(t)}function Uo(t){var e=t.getBoundingClientRect(),s=de(e.width)/t.offsetWidth||1,i=de(e.height)/t.offsetHeight||1;return s!==1||i!==1}function Mi(t,e,s){s===void 0&&(s=!1);var i=x(e),n=x(e)&&Uo(e),o=V(e),a=Y(t,n,s),r={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!s)&&((P(e)!=="body"||Ue(o))&&(r=Ei(e)),x(e)?(l=Y(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=He(o))),{x:a.left+r.scrollLeft-l.x,y:a.top+r.scrollTop-l.y,width:a.width,height:a.height}}function Vo(t){var e=new Map,s=new Set,i=[];t.forEach(function(o){e.set(o.name,o)});function n(o){s.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(r){if(!s.has(r)){var l=e.get(r);l&&n(l)}}),i.push(o)}return t.forEach(function(o){s.has(o.name)||n(o)}),i}function Ti(t){var e=Vo(t);return _n.reduce(function(s,i){return s.concat(e.filter(function(n){return n.phase===i}))},[])}function Ii(t){var e;return function(){return e||(e=new Promise(function(s){Promise.resolve().then(function(){e=void 0,s(t())})})),e}}function Ci(t){var e=t.reduce(function(s,i){var n=s[i.name];return s[i.name]=n?Object.assign({},n,i,{options:Object.assign({},n.options,i.options),data:Object.assign({},n.data,i.data)}):i,s},{});return Object.keys(e).map(function(s){return e[s]})}var En={placement:"bottom",modifiers:[],strategy:"absolute"};function Mn(){for(var t=arguments.length,e=new Array(t),s=0;s<t;s++)e[s]=arguments[s];return!e.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function Tn(t){t===void 0&&(t={});var e=t,s=e.defaultModifiers,i=s===void 0?[]:s,n=e.defaultOptions,o=n===void 0?En:n;return function(r,l,d){d===void 0&&(d=o);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},En,o),modifiersData:{},elements:{reference:r,popper:l},attributes:{},styles:{}},f=[],p=!1,h={state:c,setOptions:function(w){var E=typeof w=="function"?w(c.options):w;v(),c.options=Object.assign({},o,c.options,E),c.scrollParents={reference:q(r)?we(r):r.contextElement?we(r.contextElement):[],popper:we(l)};var M=Ti(Ci([].concat(i,c.options.modifiers)));return c.orderedModifiers=M.filter(function(_){return _.enabled}),m(),h.update()},forceUpdate:function(){if(!p){var w=c.elements,E=w.reference,M=w.popper;if(Mn(E,M)){c.rects={reference:Mi(E,oe(M),c.options.strategy==="fixed"),popper:Be(M)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(S){return c.modifiersData[S.name]=Object.assign({},S.data)});for(var _=0;_<c.orderedModifiers.length;_++){if(c.reset===!0){c.reset=!1,_=-1;continue}var y=c.orderedModifiers[_],b=y.fn,D=y.options,G=D===void 0?{}:D,F=y.name;typeof b=="function"&&(c=b({state:c,options:G,name:F,instance:h})||c)}}}},update:Ii(function(){return new Promise(function(g){h.forceUpdate(),g(c)})}),destroy:function(){v(),p=!0}};if(!Mn(r,l))return h;h.setOptions(d).then(function(g){!p&&d.onFirstUpdate&&d.onFirstUpdate(g)});function m(){c.orderedModifiers.forEach(function(g){var w=g.name,E=g.options,M=E===void 0?{}:E,_=g.effect;if(typeof _=="function"){var y=_({state:c,name:w,instance:h,options:M}),b=function(){};f.push(y||b)}})}function v(){f.forEach(function(g){return g()}),f=[]}return h}}var $o=[wn,Dn,bn,mn],Ri=Tn({defaultModifiers:$o});var Fi=["*"];function jo(t,e){if(t&1){let s=li();Le(0,"button",1),me("click",function(){Dt(s);let n=ge();return Et(n.close())}),We()}}var Lo=["dialog"];function Wo(t,e){if(t&1&&(Le(0,"span"),ci(1),We()),t&2){let s=ge().$implicit,i=ge();_e(i.highlightClass),je(),di(s)}}function zo(t,e){if(t&1&&(sn(0),ci(1),rn()),t&2){let s=ge().$implicit;je(),di(s)}}function Xo(t,e){if(t&1&&st(0,Wo,2,4,"span",0)(1,zo,2,1,"ng-container"),t&2){let s=e.$index;ni(s%2!==0?0:1)}}var Ko=(t,e,s)=>({result:t,term:e,formatter:s});function Qo(t,e){if(t&1&&ai(0,"ngb-highlight",2),t&2){let s=e.result,i=e.term,n=e.formatter;Ct("result",n(s))("term",i)}}function Jo(t,e){}function qo(t,e){if(t&1){let s=li();Le(0,"button",3),me("mouseenter",function(){let n=Dt(s).$index,o=ge();return Et(o.markActive(n))})("click",function(){let n=Dt(s).$implicit,o=ge();return Et(o.select(n))}),st(1,Jo,0,0,"ng-template",4),We()}if(t&2){let s=e.$implicit,i=e.$index,n=ge(),o=ln(1);W("active",i===n.activeIdx),Ct("id",n.id+"-"+i),je(),Ct("ngTemplateOutlet",n.resultTemplate||o)("ngTemplateOutletContext",cn(5,Ko,s,n.term,n.formatter))}}var Fn={animation:!0,transitionTimerDelayMs:5},pt=(()=>{let e=class e{constructor(){this.animation=Fn.animation}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Yo=(()=>{let e=class e{constructor(){this._ngbConfig=u(pt),this.closeOthers=!1,this.destroyOnHide=!0}get animation(){var i;return(i=this._animation)!=null?i:this._ngbConfig.animation}set animation(i){this._animation=i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function Zo(t){let{transitionDelay:e,transitionDuration:s}=window.getComputedStyle(t),i=parseFloat(e),n=parseFloat(s);return(i+n)*1e3}function ht(t){return t!=null?`${t}`:""}function Lt(t){return typeof t=="string"}function Vt(t){return t!=null}function es(t){return t&&t.then}function ts(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function is(t,e){return!e||typeof t.closest>"u"?null:t.closest(e)}function ki(t){return(t||document.body).getBoundingClientRect()}function ns(t){return e=>new bt(s=>{let i=a=>t.run(()=>s.next(a)),n=a=>t.run(()=>s.error(a)),o=()=>t.run(()=>s.complete());return e.subscribe({next:i,error:n,complete:o})})}function In(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function kn(t=document){let e=t==null?void 0:t.activeElement;return e?e.shadowRoot?kn(e.shadowRoot):e:null}var os=()=>{},{transitionTimerDelayMs:ss}=Fn,Ht=new Map,se=(t,e,s,i)=>{let n=i.context||{},o=Ht.get(e);if(o)switch(i.runningTransition){case"continue":return Qi;case"stop":t.run(()=>o.transition$.complete()),n=Object.assign(o.context,n),Ht.delete(e)}let a=s(e,i.animation,n)||os;if(!i.animation||window.getComputedStyle(e).transitionProperty==="none")return t.run(()=>a()),tt(void 0).pipe(ns(t));let r=new X,l=new X,d=r.pipe(Zi(!0));Ht.set(e,{transition$:r,complete:()=>{l.next(),l.complete()},context:n});let c=Zo(e);return t.runOutsideAngular(()=>{let f=L(e,"transitionend").pipe(k(d),Re(({target:h})=>h===e)),p=qi(c+ss).pipe(k(d));Jt(p,f,l).pipe(k(d)).subscribe(()=>{Ht.delete(e),t.run(()=>{a(),r.next(),r.complete()})})}),r.asObservable()};function rs(t,e){if(typeof navigator>"u")return"0px";let{classList:s}=t,i=s.contains("show");i||s.add("show"),t.style[e]="";let n=t.getBoundingClientRect()[e]+"px";return i||s.remove("show"),n}var as=(t,e,s)=>{let{direction:i,maxSize:n,dimension:o}=s,{classList:a}=t;function r(){a.add("collapse"),i==="show"?a.add("show"):a.remove("show")}if(!e){r();return}return n||(n=rs(t,o),s.maxSize=n,t.style[o]=i!=="show"?n:"0px",a.remove("collapse","collapsing","show"),ki(t),a.add("collapsing")),t.style[o]=i==="show"?n:"0px",()=>{r(),a.remove("collapsing"),t.style[o]=""}},ls=(()=>{let e=class e{constructor(){this._ngbConfig=u(pt),this.horizontal=!1}get animation(){var i;return(i=this._animation)!=null?i:this._ngbConfig.animation}set animation(i){this._animation=i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Cn=(()=>{let e=class e{constructor(){this._config=u(ls),this._element=u(J),this._zone=u(re),this.animation=this._config.animation,this._afterInit=!1,this._isCollapsed=!1,this.ngbCollapseChange=new T,this.horizontal=this._config.horizontal,this.shown=new T,this.hidden=new T}set collapsed(i){this._isCollapsed!==i&&(this._isCollapsed=i,this._afterInit&&this._runTransitionWithEvents(i,this.animation))}ngOnInit(){this._runTransition(this._isCollapsed,!1),this._afterInit=!0}toggle(i=this._isCollapsed){this.collapsed=!i,this.ngbCollapseChange.next(this._isCollapsed)}_runTransition(i,n){return se(this._zone,this._element.nativeElement,as,{animation:n,runningTransition:"stop",context:{direction:i?"hide":"show",dimension:this.horizontal?"width":"height"}})}_runTransitionWithEvents(i,n){this._runTransition(i,n).subscribe(()=>{i?this.hidden.emit():this.shown.emit()})}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=H({type:e,selectors:[["","ngbCollapse",""]],hostVars:2,hostBindings:function(n,o){n&2&&W("collapse-horizontal",o.horizontal)},inputs:{animation:"animation",collapsed:[0,"ngbCollapse","collapsed"],horizontal:"horizontal"},outputs:{ngbCollapseChange:"ngbCollapseChange",shown:"shown",hidden:"hidden"},exportAs:["ngbCollapse"]});let t=e;return t})(),cs=0,Jd=(()=>{let e=class e{constructor(){this._vcr=u(ei),this._element=u(J).nativeElement,this._item=u(Ye),this._viewRef=null}ngAfterContentChecked(){this._bodyTpl&&(this._item._shouldBeInDOM?this._createViewIfNotExists():this._destroyViewIfExists())}ngOnDestroy(){this._destroyViewIfExists()}_destroyViewIfExists(){var i;(i=this._viewRef)==null||i.destroy(),this._viewRef=null}_createViewIfNotExists(){if(!this._viewRef){this._viewRef=this._vcr.createEmbeddedView(this._bodyTpl),this._viewRef.detectChanges();for(let i of this._viewRef.rootNodes)this._element.appendChild(i)}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=H({type:e,selectors:[["","ngbAccordionBody",""]],contentQueries:function(n,o,a){if(n&1&&xe(a,It,7),n&2){let r;ve(r=ye())&&(o._bodyTpl=r.first)}},hostAttrs:[1,"accordion-body"]});let t=e;return t})(),ds=(()=>{let e=class e{constructor(){this.item=u(Ye),this.ngbCollapse=u(Cn)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=H({type:e,selectors:[["","ngbAccordionCollapse",""]],hostAttrs:["role","region",1,"accordion-collapse"],hostVars:2,hostBindings:function(n,o){n&2&&(ae("id",o.item.collapseId),Ne("aria-labelledby",o.item.toggleId))},exportAs:["ngbAccordionCollapse"],features:[ti([Cn])]});let t=e;return t})(),us=(()=>{let e=class e{constructor(){this.item=u(Ye),this.accordion=u(Bn)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=H({type:e,selectors:[["","ngbAccordionToggle",""]],hostVars:5,hostBindings:function(n,o){n&1&&me("click",function(){return!o.item.disabled&&o.accordion.toggle(o.item.id)}),n&2&&(ae("id",o.item.toggleId),Ne("aria-controls",o.item.collapseId)("aria-expanded",!o.item.collapsed),W("collapsed",o.item.collapsed))}});let t=e;return t})(),qd=(()=>{let e=class e{constructor(){this.item=u(Ye)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=H({type:e,selectors:[["button","ngbAccordionButton",""]],hostAttrs:["type","button",1,"accordion-button"],hostVars:1,hostBindings:function(n,o){n&2&&ae("disabled",o.item.disabled)},features:[ti([us])]});let t=e;return t})(),Yd=(()=>{let e=class e{constructor(){this.item=u(Ye)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=H({type:e,selectors:[["","ngbAccordionHeader",""]],hostAttrs:["role","heading",1,"accordion-header"],hostVars:2,hostBindings:function(n,o){n&2&&W("collapsed",o.item.collapsed)}});let t=e;return t})(),Ye=(()=>{let e=class e{constructor(){this._accordion=u(Bn),this._cd=u(ze),this._destroyRef=u(Mt),this._collapsed=!0,this._id=`ngb-accordion-item-${cs++}`,this._collapseAnimationRunning=!1,this.disabled=!1,this.show=new T,this.shown=new T,this.hide=new T,this.hidden=new T}set id(i){Lt(i)&&i!==""&&(this._id=i)}set destroyOnHide(i){this._destroyOnHide=i}get destroyOnHide(){return this._destroyOnHide===void 0?this._accordion.destroyOnHide:this._destroyOnHide}set collapsed(i){i?this.collapse():this.expand()}get collapsed(){return this._collapsed}get id(){return`${this._id}`}get toggleId(){return`${this.id}-toggle`}get collapseId(){return`${this.id}-collapse`}get _shouldBeInDOM(){return!this.collapsed||this._collapseAnimationRunning||!this.destroyOnHide}ngAfterContentInit(){let{ngbCollapse:i}=this._collapse;i.animation=!1,i.collapsed=this.collapsed,i.animation=this._accordion.animation,i.hidden.pipe(xt(this._destroyRef)).subscribe(()=>{this._collapseAnimationRunning=!1,this.hidden.emit(),this._accordion.hidden.emit(this.id)}),i.shown.pipe(xt(this._destroyRef)).subscribe(()=>{this.shown.emit(),this._accordion.shown.emit(this.id)})}toggle(){this.collapsed=!this.collapsed}expand(){if(this.collapsed){if(!this._accordion._ensureCanExpand(this))return;this._collapsed=!1,this._cd.markForCheck(),this._cd.detectChanges(),this.show.emit(),this._accordion.show.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!1}}collapse(){this.collapsed||(this._collapsed=!0,this._collapseAnimationRunning=!0,this._cd.markForCheck(),this.hide.emit(),this._accordion.hide.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!0)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=H({type:e,selectors:[["","ngbAccordionItem",""]],contentQueries:function(n,o,a){if(n&1&&xe(a,ds,7),n&2){let r;ve(r=ye())&&(o._collapse=r.first)}},hostAttrs:[1,"accordion-item"],hostVars:1,hostBindings:function(n,o){n&2&&ae("id",o.id)},inputs:{id:[0,"ngbAccordionItem","id"],destroyOnHide:"destroyOnHide",disabled:"disabled",collapsed:"collapsed"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordionItem"]});let t=e;return t})(),Bn=(()=>{let e=class e{constructor(){this._config=u(Yo),this._anItemWasAlreadyExpandedDuringInitialisation=!1,this.animation=this._config.animation,this.closeOthers=this._config.closeOthers,this.destroyOnHide=this._config.destroyOnHide,this.show=new T,this.shown=new T,this.hide=new T,this.hidden=new T}toggle(i){var n;(n=this._getItem(i))==null||n.toggle()}expand(i){var n;(n=this._getItem(i))==null||n.expand()}expandAll(){this._items&&(this.closeOthers?this._items.find(i=>!i.collapsed)||this._items.first.expand():this._items.forEach(i=>i.expand()))}collapse(i){var n;(n=this._getItem(i))==null||n.collapse()}collapseAll(){var i;(i=this._items)==null||i.forEach(n=>n.collapse())}isExpanded(i){let n=this._getItem(i);return n?!n.collapsed:!1}_ensureCanExpand(i){var n;return this.closeOthers?this._items?((n=this._items.find(o=>!o.collapsed&&i!==o))==null||n.collapse(),!0):this._anItemWasAlreadyExpandedDuringInitialisation?!1:(this._anItemWasAlreadyExpandedDuringInitialisation=!0,!0):!0}_getItem(i){var n;return(n=this._items)==null?void 0:n.find(o=>o.id===i)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=H({type:e,selectors:[["","ngbAccordion",""]],contentQueries:function(n,o,a){if(n&1&&xe(a,Ye,4),n&2){let r;ve(r=ye())&&(o._items=r)}},hostAttrs:[1,"accordion"],inputs:{animation:"animation",closeOthers:"closeOthers",destroyOnHide:"destroyOnHide"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordion"]});let t=e;return t})();var Pn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=C({type:e}),e.\u0275inj=I({});let t=e;return t})(),hs=(()=>{let e=class e{constructor(){this._ngbConfig=u(pt),this.dismissible=!0,this.type="warning"}get animation(){var i;return(i=this._animation)!=null?i:this._ngbConfig.animation}set animation(i){this._animation=i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),ps=({classList:t})=>{t.remove("show")},Zd=(()=>{let e=class e{constructor(){this._config=u(hs),this._elementRef=u(J),this._zone=u(re),this.animation=this._config.animation,this.dismissible=this._config.dismissible,this.type=this._config.type,this.closed=new T}close(){let i=se(this._zone,this._elementRef.nativeElement,ps,{animation:this.animation,runningTransition:"continue"});return i.subscribe(()=>this.closed.emit()),i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=Se({type:e,selectors:[["ngb-alert"]],hostAttrs:["role","alert"],hostVars:6,hostBindings:function(n,o){n&2&&(_e("alert show"+(o.type?" alert-"+o.type:"")),W("fade",o.animation)("alert-dismissible",o.dismissible))},inputs:{animation:"animation",dismissible:"dismissible",type:"type"},outputs:{closed:"closed"},exportAs:["ngbAlert"],ngContentSelectors:Fi,decls:2,vars:1,consts:()=>{let i;return i=$localize`:@@ngb.alert.close:Close`,[["type","button","aria-label",i,1,"btn-close"],["type","button","aria-label",i,1,"btn-close",3,"click"]]},template:function(n,o){n&1&&(Rt(),St(0),st(1,jo,1,0,"button",0)),n&2&&(je(),ni(o.dismissible?1:-1))},styles:[`ngb-alert{display:block}
2
- `],encapsulation:2,changeDetection:0});let t=e;return t})(),An=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=C({type:e}),e.\u0275inj=I({});let t=e;return t})();var Gn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=C({type:e}),e.\u0275inj=I({});let t=e;return t})(),Hn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=C({type:e}),e.\u0275inj=I({});let t=e;return t})();var Ut=(t,e)=>e?e.some(s=>s.contains(t)):!1,Rn=(t,e)=>!e||is(t,e)!=null,fs=(()=>{let t=()=>/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2,e=()=>/Android/.test(navigator.userAgent);return typeof navigator<"u"?!!navigator.userAgent&&(t()||e()):!1})(),_s=t=>fs?()=>setTimeout(()=>t(),100):t;function Bi(t,e,s,i,n,o,a,r){s&&t.runOutsideAngular(_s(()=>{let l=p=>{let h=p.target;return p.button===2||Ut(h,a)?!1:s==="inside"?Ut(h,o)&&Rn(h,r):s==="outside"?!Ut(h,o):Rn(h,r)||!Ut(h,o)},d=L(e,"keydown").pipe(k(n),Re(p=>p.key==="Escape"),it(p=>p.preventDefault())),c=L(e,"mousedown").pipe(Ce(l),k(n)),f=L(e,"mouseup").pipe(Ot(c),Re(([p,h])=>h),Yi(0),k(n));Jt([d.pipe(Ce(p=>0)),f.pipe(Ce(p=>1))]).subscribe(p=>t.run(()=>i(p)))}))}var Un=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function Vn(t){let e=Array.from(t.querySelectorAll(Un)).filter(s=>s.tabIndex!==-1);return[e[0],e[e.length-1]]}var ms=(t,e,s,i=!1)=>{t.runOutsideAngular(()=>{let n=L(e,"focusin").pipe(k(s),Ce(o=>o.target));L(e,"keydown").pipe(k(s),Re(o=>o.key==="Tab"),Ot(n)).subscribe(([o,a])=>{let[r,l]=Vn(e);(a===r||a===e)&&o.shiftKey&&(l.focus(),o.preventDefault()),a===l&&!o.shiftKey&&(r.focus(),o.preventDefault())}),i&&L(e,"click").pipe(k(s),Ot(n),Ce(o=>o[1])).subscribe(o=>o.focus())})},gs=(()=>{let e=class e{constructor(){this._element=u(le).documentElement}isRTL(){return(this._element.getAttribute("dir")||"").toLowerCase()==="rtl"}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),vs=/\s+/,ys=/ +/gi,bs={top:["top"],bottom:["bottom"],start:["left","right"],left:["left"],end:["right","left"],right:["right"],"top-start":["top-start","top-end"],"top-left":["top-start"],"top-end":["top-end","top-start"],"top-right":["top-end"],"bottom-start":["bottom-start","bottom-end"],"bottom-left":["bottom-start"],"bottom-end":["bottom-end","bottom-start"],"bottom-right":["bottom-end"],"start-top":["left-start","right-start"],"left-top":["left-start"],"start-bottom":["left-end","right-end"],"left-bottom":["left-end"],"end-top":["right-start","left-start"],"right-top":["right-start"],"end-bottom":["right-end","left-end"],"right-bottom":["right-end"]};function ws(t,e){let[s,i]=bs[t];return e&&i||s}var Os=/^left/,Ds=/^right/,Es=/^start/,Ms=/^end/;function Ts(t,e){let[s,i]=e.split("-"),n=s.replace(Os,"start").replace(Ds,"end"),o=[n];if(i){let a=i;(s==="left"||s==="right")&&(a=a.replace(Es,"top").replace(Ms,"bottom")),o.push(`${n}-${a}`)}return t&&(o=o.map(a=>`${t}-${a}`)),o.join(" ")}function Sn({placement:t,baseClass:e},s){let i=Array.isArray(t)?t:t.split(vs),n=["top","bottom","start","end","top-start","top-end","bottom-start","bottom-end","start-top","start-bottom","end-top","end-bottom"],o=i.findIndex(d=>d==="auto");o>=0&&n.forEach(function(d){i.find(c=>c.search("^"+d)!==-1)==null&&i.splice(o++,1,d)});let a=i.map(d=>ws(d,s.isRTL()));return{placement:a.shift(),modifiers:[{name:"bootstrapClasses",enabled:!!e,phase:"write",fn({state:d}){let c=new RegExp(e+"(-[a-z]+)*","gi"),f=d.elements.popper,p=d.placement,h=f.className;h=h.replace(c,""),h+=` ${Ts(e,p)}`,h=h.trim().replace(ys," "),f.className=h}},yi,Oi,fi,{enabled:!0,name:"flip",options:{fallbackPlacements:a}},{enabled:!0,name:"preventOverflow",phase:"main",fn:function(){}}]}}function Nn(t){return t}function Pi(){let t=u(gs),e=null;return{createPopper(s){if(!e){let n=(s.updatePopperOptions||Nn)(Sn(s,t));e=Ri(s.hostElement,s.targetElement,n)}},update(){e&&e.update()},setOptions(s){if(e){let n=(s.updatePopperOptions||Nn)(Sn(s,t));e.setOptions(n)}},destroy(){e&&(e.destroy(),e=null)}}}function Ai(t){return e=>(e.modifiers.push(bi,{name:"offset",options:{offset:()=>t}}),e)}var eu=new Date(1882,10,12),tu=new Date(2174,10,25);var iu=1e3*60*60*24;var Gi=1080,Is=24*Gi,Cs=12*Gi+793,nu=29*Is+Cs,ou=11*Gi+204;var $n=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=C({type:e}),e.\u0275inj=I({});let t=e;return t})(),Rs=(()=>{let e=class e{constructor(){this.autoClose=!0,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=i=>i,this.container=null}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),jn=(()=>{let e=class e{constructor(){this._disabled=!1,this.nativeElement=u(J).nativeElement,this.tabindex=0}set disabled(i){this._disabled=i===""||i===!0}get disabled(){return this._disabled}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=H({type:e,selectors:[["","ngbDropdownItem",""]],hostAttrs:[1,"dropdown-item"],hostVars:3,hostBindings:function(n,o){n&2&&(ae("tabIndex",o.disabled?-1:o.tabindex),W("disabled",o.disabled))},inputs:{tabindex:"tabindex",disabled:"disabled"}});let t=e;return t})(),su=(()=>{let e=class e{constructor(){this.item=u(jn)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=H({type:e,selectors:[["button","ngbDropdownItem",""]],hostVars:1,hostBindings:function(n,o){n&2&&ae("disabled",o.item.disabled)}});let t=e;return t})(),Ss=(()=>{let e=class e{constructor(){this.dropdown=u(Ln),this.nativeElement=u(J).nativeElement}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=H({type:e,selectors:[["","ngbDropdownMenu",""]],contentQueries:function(n,o,a){if(n&1&&xe(a,jn,4),n&2){let r;ve(r=ye())&&(o.menuItems=r)}},hostAttrs:[1,"dropdown-menu"],hostVars:2,hostBindings:function(n,o){n&1&&me("keydown.ArrowUp",function(r){return o.dropdown.onKeyDown(r)})("keydown.ArrowDown",function(r){return o.dropdown.onKeyDown(r)})("keydown.Home",function(r){return o.dropdown.onKeyDown(r)})("keydown.End",function(r){return o.dropdown.onKeyDown(r)})("keydown.Enter",function(r){return o.dropdown.onKeyDown(r)})("keydown.Space",function(r){return o.dropdown.onKeyDown(r)})("keydown.Tab",function(r){return o.dropdown.onKeyDown(r)})("keydown.Shift.Tab",function(r){return o.dropdown.onKeyDown(r)}),n&2&&W("show",o.dropdown.isOpen())}});let t=e;return t})(),Si=(()=>{let e=class e{constructor(){this.dropdown=u(Ln),this.nativeElement=u(J).nativeElement}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=H({type:e,selectors:[["","ngbDropdownAnchor",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:3,hostBindings:function(n,o){n&2&&(Ne("aria-expanded",o.dropdown.isOpen()),W("show",o.dropdown.isOpen()))}});let t=e;return t})(),ru=(()=>{let e=class e extends Si{};e.\u0275fac=(()=>{let i;return function(o){return(i||(i=nn(e)))(o||e)}})(),e.\u0275dir=H({type:e,selectors:[["","ngbDropdownToggle",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:3,hostBindings:function(n,o){n&1&&me("click",function(){return o.dropdown.toggle()})("keydown.ArrowUp",function(r){return o.dropdown.onKeyDown(r)})("keydown.ArrowDown",function(r){return o.dropdown.onKeyDown(r)})("keydown.Home",function(r){return o.dropdown.onKeyDown(r)})("keydown.End",function(r){return o.dropdown.onKeyDown(r)})("keydown.Tab",function(r){return o.dropdown.onKeyDown(r)})("keydown.Shift.Tab",function(r){return o.dropdown.onKeyDown(r)}),n&2&&(Ne("aria-expanded",o.dropdown.isOpen()),W("show",o.dropdown.isOpen()))},features:[ui([{provide:Si,useExisting:Yt(()=>e)}]),on]});let t=e;return t})(),Ln=(()=>{let e=class e{constructor(){this._changeDetector=u(ze),this._config=u(Rs),this._document=u(le),this._injector=u(ie),this._ngZone=u(re),this._nativeElement=u(J).nativeElement,this._destroyCloseHandlers$=new X,this._bodyContainer=null,this._positioning=Pi(),this.autoClose=this._config.autoClose,this._open=!1,this.placement=this._config.placement,this.popperOptions=this._config.popperOptions,this.container=this._config.container,this.openChange=new T}ngOnInit(){this.display||(this.display=this._nativeElement.closest(".navbar")?"static":"dynamic")}ngAfterContentInit(){ot(()=>{this._applyPlacementClasses(),this._open&&this._setCloseHandlers()},{phase:fe.Write,injector:this._injector})}ngOnChanges(i){if(i.container&&this._open&&this._applyContainer(this.container),i.placement&&!i.placement.firstChange&&(this._positioning.setOptions({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement}),this._applyPlacementClasses()),i.dropdownClass){let{currentValue:n,previousValue:o}=i.dropdownClass;this._applyCustomDropdownClass(n,o)}i.autoClose&&this._open&&(this.autoClose=i.autoClose.currentValue,this._setCloseHandlers())}isOpen(){return this._open}open(){this._open||(this._open=!0,this._applyContainer(this.container),this.openChange.emit(!0),this._setCloseHandlers(),this._anchor&&(this._anchor.nativeElement.focus(),this.display==="dynamic"&&this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,updatePopperOptions:i=>this.popperOptions(Ai([0,2])(i))}),this._applyPlacementClasses(),this._afterRenderRef=Tt(()=>{this._positionMenu()},{phase:fe.Write,injector:this._injector})})))}_setCloseHandlers(){this._destroyCloseHandlers$.next(),Bi(this._ngZone,this._document,this.autoClose,i=>{this.close(),i===0&&this._anchor.nativeElement.focus()},this._destroyCloseHandlers$,this._menu?[this._menu.nativeElement]:[],this._anchor?[this._anchor.nativeElement]:[],".dropdown-item,.dropdown-divider")}close(){var i;this._open&&(this._open=!1,this._resetContainer(),this._positioning.destroy(),(i=this._afterRenderRef)==null||i.destroy(),this._destroyCloseHandlers$.next(),this.openChange.emit(!1),this._changeDetector.markForCheck())}toggle(){this.isOpen()?this.close():this.open()}ngOnDestroy(){this.close()}onKeyDown(i){let{key:n}=i,o=this._getMenuElements(),a=-1,r=null,l=this._isEventFromToggle(i);if(!l&&o.length&&o.forEach((d,c)=>{d.contains(i.target)&&(r=d),d===kn(this._document)&&(a=c)}),n===" "||n==="Enter"){r&&(this.autoClose===!0||this.autoClose==="inside")&&L(r,"click").pipe($e(1)).subscribe(()=>this.close());return}if(n==="Tab"){if(i.target&&this.isOpen()&&this.autoClose)if(this._anchor.nativeElement===i.target){this.container==="body"&&!i.shiftKey?(this._menu.nativeElement.setAttribute("tabindex","0"),this._menu.nativeElement.focus(),this._menu.nativeElement.removeAttribute("tabindex")):i.shiftKey&&this.close();return}else if(this.container==="body"){let d=this._menu.nativeElement.querySelectorAll(Un);i.shiftKey&&i.target===d[0]?(this._anchor.nativeElement.focus(),i.preventDefault()):!i.shiftKey&&i.target===d[d.length-1]&&(this._anchor.nativeElement.focus(),this.close())}else L(i.target,"focusout").pipe($e(1)).subscribe(({relatedTarget:d})=>{this._nativeElement.contains(d)||this.close()});return}if(l||r){if(this.open(),o.length){switch(n){case"ArrowDown":a=Math.min(a+1,o.length-1);break;case"ArrowUp":if(this._isDropup()&&a===-1){a=o.length-1;break}a=Math.max(a-1,0);break;case"Home":a=0;break;case"End":a=o.length-1;break}o[a].focus()}i.preventDefault()}}_isDropup(){return this._nativeElement.classList.contains("dropup")}_isEventFromToggle(i){return this._anchor.nativeElement.contains(i.target)}_getMenuElements(){return this._menu?this._menu.menuItems.filter(({disabled:i})=>!i).map(({nativeElement:i})=>i):[]}_positionMenu(){let i=this._menu;this.isOpen()&&i&&(this.display==="dynamic"?(this._positioning.update(),this._applyPlacementClasses()):this._applyPlacementClasses(this._getFirstPlacement(this.placement)))}_getFirstPlacement(i){return Array.isArray(i)?i[0]:i.split(" ")[0]}_resetContainer(){this._menu&&this._nativeElement.appendChild(this._menu.nativeElement),this._bodyContainer&&(this._document.body.removeChild(this._bodyContainer),this._bodyContainer=null)}_applyContainer(i=null){if(this._resetContainer(),i==="body"){let n=this._menu.nativeElement,o=this._bodyContainer=this._bodyContainer||this._document.createElement("div");o.style.position="absolute",n.style.position="static",o.style.zIndex="1055",o.appendChild(n),this._document.body.appendChild(o)}this._applyCustomDropdownClass(this.dropdownClass)}_applyCustomDropdownClass(i,n){let o=this.container==="body"?this._bodyContainer:this._nativeElement;o&&(n&&o.classList.remove(n),i&&o.classList.add(i))}_applyPlacementClasses(i){if(this._menu){i||(i=this._getFirstPlacement(this.placement)),this._nativeElement.classList.remove("dropup","dropdown"),this.display==="static"?this._menu.nativeElement.setAttribute("data-bs-popper","static"):this._menu.nativeElement.removeAttribute("data-bs-popper");let n=i.search("^top")!==-1?"dropup":"dropdown";this._nativeElement.classList.add(n),this._bodyContainer&&(this._bodyContainer.classList.remove("dropup","dropdown"),this._bodyContainer.classList.add(n))}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=H({type:e,selectors:[["","ngbDropdown",""]],contentQueries:function(n,o,a){if(n&1&&(xe(a,Ss,5),xe(a,Si,5)),n&2){let r;ve(r=ye())&&(o._menu=r.first),ve(r=ye())&&(o._anchor=r.first)}},hostVars:2,hostBindings:function(n,o){n&2&&W("show",o.isOpen())},inputs:{autoClose:"autoClose",dropdownClass:"dropdownClass",_open:[0,"open","_open"],placement:"placement",popperOptions:"popperOptions",container:"container",display:"display"},outputs:{openChange:"openChange"},exportAs:["ngbDropdown"],features:[nt]});let t=e;return t})();var Wn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=C({type:e}),e.\u0275inj=I({});let t=e;return t})(),Ns=(()=>{let e=class e{constructor(){this._ngbConfig=u(pt),this.backdrop=!0,this.fullscreen=!1,this.keyboard=!0}get animation(){var i;return(i=this._animation)!=null?i:this._ngbConfig.animation}set animation(i){this._animation=i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),he=class{constructor(e,s,i){this.nodes=e,this.viewRef=s,this.componentRef=i}},$t=class{constructor(e){this._componentType=e,this._windowRef=null,this._contentRef=null,this._document=u(le),this._applicationRef=u(ii),this._injector=u(ie),this._viewContainerRef=u(ei),this._ngZone=u(re)}open(e,s,i=!1){this._windowRef||(this._contentRef=this._getContentRef(e,s),this._windowRef=this._viewContainerRef.createComponent(this._componentType,{injector:this._injector,projectableNodes:this._contentRef.nodes}));let{nativeElement:n}=this._windowRef.location,o=new X;ot(()=>{o.next(),o.complete()},{injector:this._injector,phase:fe.MixedReadWrite});let a=o.pipe(Ji(()=>se(this._ngZone,n,({classList:r})=>r.add("show"),{animation:i,runningTransition:"continue"})));return{windowRef:this._windowRef,transition$:a}}close(e=!1){return this._windowRef?se(this._ngZone,this._windowRef.location.nativeElement,({classList:s})=>s.remove("show"),{animation:e,runningTransition:"stop"}).pipe(it(()=>{var s,i,n;(s=this._windowRef)==null||s.destroy(),(n=(i=this._contentRef)==null?void 0:i.viewRef)==null||n.destroy(),this._windowRef=null,this._contentRef=null})):tt(void 0)}_getContentRef(e,s){if(e)if(e instanceof It){let i=e.createEmbeddedView(s);return this._applicationRef.attachView(i),new he([i.rootNodes],i)}else return new he([[this._document.createTextNode(`${e}`)]]);else return new he([])}},xs=(()=>{let e=class e{constructor(){this._document=u(le)}hide(){let i=Math.abs(window.innerWidth-this._document.documentElement.clientWidth),n=this._document.body,o=n.style,{overflow:a,paddingRight:r}=o;if(i>0){let l=parseFloat(window.getComputedStyle(n).paddingRight);o.paddingRight=`${l+i}px`}return o.overflow="hidden",()=>{i>0&&(o.paddingRight=r),o.overflow=a}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Fs=(()=>{let e=class e{constructor(){this._nativeElement=u(J).nativeElement,this._zone=u(re),this._injector=u(ie)}ngOnInit(){ot(()=>se(this._zone,this._nativeElement,(i,n)=>{n&&ki(i),i.classList.add("show")},{animation:this.animation,runningTransition:"continue"}),{injector:this._injector,phase:fe.MixedReadWrite})}hide(){return se(this._zone,this._nativeElement,({classList:i})=>i.remove("show"),{animation:this.animation,runningTransition:"stop"})}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=Se({type:e,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1055"],hostVars:6,hostBindings:function(n,o){n&2&&(_e("modal-backdrop"+(o.backdropClass?" "+o.backdropClass:"")),W("show",!o.animation)("fade",o.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},decls:0,vars:0,template:function(n,o){},encapsulation:2});let t=e;return t})(),jt=class{update(e){}close(e){}dismiss(e){}},ks=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","fullscreen","keyboard","scrollable","size","windowClass","modalDialogClass"],Bs=["animation","backdropClass"],Ni=class{_applyWindowOptions(e,s){ks.forEach(i=>{Vt(s[i])&&(e[i]=s[i])})}_applyBackdropOptions(e,s){Bs.forEach(i=>{Vt(s[i])&&(e[i]=s[i])})}update(e){this._applyWindowOptions(this._windowCmptRef.instance,e),this._backdropCmptRef&&this._backdropCmptRef.instance&&this._applyBackdropOptions(this._backdropCmptRef.instance,e)}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(k(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(k(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}constructor(e,s,i,n){this._windowCmptRef=e,this._contentRef=s,this._backdropCmptRef=i,this._beforeDismiss=n,this._closed=new X,this._dismissed=new X,this._hidden=new X,e.instance.dismissEvent.subscribe(o=>{this.dismiss(o)}),this.result=new Promise((o,a)=>{this._resolve=o,this._reject=a}),this.result.then(null,()=>{})}close(e){this._windowCmptRef&&(this._closed.next(e),this._resolve(e),this._removeModalElements())}_dismiss(e){this._dismissed.next(e),this._reject(e),this._removeModalElements()}dismiss(e){if(this._windowCmptRef)if(!this._beforeDismiss)this._dismiss(e);else{let s=this._beforeDismiss();es(s)?s.then(i=>{i!==!1&&this._dismiss(e)},()=>{}):s!==!1&&this._dismiss(e)}}_removeModalElements(){let e=this._windowCmptRef.instance.hide(),s=this._backdropCmptRef?this._backdropCmptRef.instance.hide():tt(void 0);e.subscribe(()=>{var n,o;let{nativeElement:i}=this._windowCmptRef.location;i.parentNode.removeChild(i),this._windowCmptRef.destroy(),(o=(n=this._contentRef)==null?void 0:n.viewRef)==null||o.destroy(),this._windowCmptRef=null,this._contentRef=null}),s.subscribe(()=>{if(this._backdropCmptRef){let{nativeElement:i}=this._backdropCmptRef.location;i.parentNode.removeChild(i),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),wt(e,s).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}},xi=function(t){return t[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC",t}(xi||{}),Ps=(()=>{let e=class e{constructor(){this._document=u(le),this._elRef=u(J),this._zone=u(re),this._injector=u(ie),this._closed$=new X,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new T,this.shown=new X,this.hidden=new X}get fullscreenClass(){return this.fullscreen===!0?" modal-fullscreen":Lt(this.fullscreen)?` modal-fullscreen-${this.fullscreen}-down`:""}dismiss(i){this.dismissEvent.emit(i)}ngOnInit(){this._elWithFocus=this._document.activeElement,ot(()=>this._show(),{injector:this._injector,phase:fe.MixedReadWrite})}ngOnDestroy(){this._disableEventHandling()}hide(){let{nativeElement:i}=this._elRef,n={animation:this.animation,runningTransition:"stop"},o=se(this._zone,i,()=>i.classList.remove("show"),n),a=se(this._zone,this._dialogEl.nativeElement,()=>{},n),r=wt(o,a);return r.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),r}_show(){let i={animation:this.animation,runningTransition:"continue"},n=se(this._zone,this._elRef.nativeElement,(a,r)=>{r&&ki(a),a.classList.add("show")},i),o=se(this._zone,this._dialogEl.nativeElement,()=>{},i);wt(n,o).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){let{nativeElement:i}=this._elRef;this._zone.runOutsideAngular(()=>{L(i,"keydown").pipe(k(this._closed$),Re(o=>o.key==="Escape")).subscribe(o=>{this.keyboard?requestAnimationFrame(()=>{o.defaultPrevented||this._zone.run(()=>this.dismiss(xi.ESC))}):this.backdrop==="static"&&this._bumpBackdrop()});let n=!1;L(this._dialogEl.nativeElement,"mousedown").pipe(k(this._closed$),it(()=>n=!1),qt(()=>L(i,"mouseup").pipe(k(this._closed$),$e(1))),Re(({target:o})=>i===o)).subscribe(()=>{n=!0}),L(i,"click").pipe(k(this._closed$)).subscribe(({target:o})=>{i===o&&(this.backdrop==="static"?this._bumpBackdrop():this.backdrop===!0&&!n&&this._zone.run(()=>this.dismiss(xi.BACKDROP_CLICK))),n=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){let{nativeElement:i}=this._elRef;if(!i.contains(document.activeElement)){let n=i.querySelector("[ngbAutofocus]"),o=Vn(i)[0];(n||o||i).focus()}}_restoreFocus(){let i=this._document.body,n=this._elWithFocus,o;n&&n.focus&&i.contains(n)?o=n:o=i,this._zone.runOutsideAngular(()=>{setTimeout(()=>o.focus()),this._elWithFocus=null})}_bumpBackdrop(){this.backdrop==="static"&&se(this._zone,this._elRef.nativeElement,({classList:i})=>(i.add("modal-static"),()=>i.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=Se({type:e,selectors:[["ngb-modal-window"]],viewQuery:function(n,o){if(n&1&&an(Lo,7),n&2){let a;ve(a=ye())&&(o._dialogEl=a.first)}},hostAttrs:["role","dialog","tabindex","-1"],hostVars:7,hostBindings:function(n,o){n&2&&(Ne("aria-modal",!0)("aria-labelledby",o.ariaLabelledBy)("aria-describedby",o.ariaDescribedBy),_e("modal d-block"+(o.windowClass?" "+o.windowClass:"")),W("fade",o.animation))},inputs:{animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",backdrop:"backdrop",centered:"centered",fullscreen:"fullscreen",keyboard:"keyboard",scrollable:"scrollable",size:"size",windowClass:"windowClass",modalDialogClass:"modalDialogClass"},outputs:{dismissEvent:"dismiss"},ngContentSelectors:Fi,decls:4,vars:2,consts:[["dialog",""],["role","document"],[1,"modal-content"]],template:function(n,o){n&1&&(Rt(),Le(0,"div",1,0)(2,"div",2),St(3),We()()),n&2&&_e("modal-dialog"+(o.size?" modal-"+o.size:"")+(o.centered?" modal-dialog-centered":"")+o.fullscreenClass+(o.scrollable?" modal-dialog-scrollable":"")+(o.modalDialogClass?" "+o.modalDialogClass:""))},styles:[`ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}
3
- `],encapsulation:2});let t=e;return t})(),As=(()=>{let e=class e{constructor(){this._applicationRef=u(ii),this._injector=u(ie),this._environmentInjector=u(Zt),this._document=u(le),this._scrollBar=u(xs),this._activeWindowCmptHasChanged=new X,this._ariaHiddenValues=new Map,this._scrollBarRestoreFn=null,this._modalRefs=[],this._windowCmpts=[],this._activeInstances=new T;let i=u(re);this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){let n=this._windowCmpts[this._windowCmpts.length-1];ms(i,n.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(n.location.nativeElement)}})}_restoreScrollBar(){let i=this._scrollBarRestoreFn;i&&(this._scrollBarRestoreFn=null,i())}_hideScrollBar(){this._scrollBarRestoreFn||(this._scrollBarRestoreFn=this._scrollBar.hide())}open(i,n,o){let a=o.container instanceof HTMLElement?o.container:Vt(o.container)?this._document.querySelector(o.container):this._document.body;if(!a)throw new Error(`The specified modal container "${o.container||"body"}" was not found in the DOM.`);this._hideScrollBar();let r=new jt;i=o.injector||i;let l=i.get(Zt,null)||this._environmentInjector,d=this._getContentRef(i,l,n,r,o),c=o.backdrop!==!1?this._attachBackdrop(a):void 0,f=this._attachWindowComponent(a,d.nodes),p=new Ni(f,d,c,o.beforeDismiss);return this._registerModalRef(p),this._registerWindowCmpt(f),p.hidden.pipe($e(1)).subscribe(()=>Promise.resolve(!0).then(()=>{this._modalRefs.length||(this._document.body.classList.remove("modal-open"),this._restoreScrollBar(),this._revertAriaHidden())})),r.close=h=>{p.close(h)},r.dismiss=h=>{p.dismiss(h)},r.update=h=>{p.update(h)},p.update(o),this._modalRefs.length===1&&this._document.body.classList.add("modal-open"),c&&c.instance&&c.changeDetectorRef.detectChanges(),f.changeDetectorRef.detectChanges(),p}get activeInstances(){return this._activeInstances}dismissAll(i){this._modalRefs.forEach(n=>n.dismiss(i))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(i){let n=Nt(Fs,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector});return this._applicationRef.attachView(n.hostView),i.appendChild(n.location.nativeElement),n}_attachWindowComponent(i,n){let o=Nt(Ps,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector,projectableNodes:n});return this._applicationRef.attachView(o.hostView),i.appendChild(o.location.nativeElement),o}_getContentRef(i,n,o,a,r){return o?o instanceof It?this._createFromTemplateRef(o,a):Lt(o)?this._createFromString(o):this._createFromComponent(i,n,o,a,r):new he([])}_createFromTemplateRef(i,n){let o={$implicit:n,close(r){n.close(r)},dismiss(r){n.dismiss(r)}},a=i.createEmbeddedView(o);return this._applicationRef.attachView(a),new he([a.rootNodes],a)}_createFromString(i){let n=this._document.createTextNode(`${i}`);return new he([[n]])}_createFromComponent(i,n,o,a,r){let l=ie.create({providers:[{provide:jt,useValue:a}],parent:i}),d=Nt(o,{environmentInjector:n,elementInjector:l}),c=d.location.nativeElement;return r.scrollable&&c.classList.add("component-host-scrollable"),this._applicationRef.attachView(d.hostView),new he([[c]],d.hostView,d)}_setAriaHidden(i){let n=i.parentElement;n&&i!==this._document.body&&(Array.from(n.children).forEach(o=>{o!==i&&o.nodeName!=="SCRIPT"&&(this._ariaHiddenValues.set(o,o.getAttribute("aria-hidden")),o.setAttribute("aria-hidden","true"))}),this._setAriaHidden(n))}_revertAriaHidden(){this._ariaHiddenValues.forEach((i,n)=>{i?n.setAttribute("aria-hidden",i):n.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(i){let n=()=>{let o=this._modalRefs.indexOf(i);o>-1&&(this._modalRefs.splice(o,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(i),this._activeInstances.emit(this._modalRefs),i.result.then(n,n)}_registerWindowCmpt(i){this._windowCmpts.push(i),this._activeWindowCmptHasChanged.next(),i.onDestroy(()=>{let n=this._windowCmpts.indexOf(i);n>-1&&(this._windowCmpts.splice(n,1),this._activeWindowCmptHasChanged.next())})}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Gs=(()=>{let e=class e{constructor(){this._injector=u(ie),this._modalStack=u(As),this._config=u(Ns)}open(i,n={}){let o=yt(Qt(yt({},this._config),{animation:this._config.animation}),n);return this._modalStack.open(this._injector,i,o)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(i){this._modalStack.dismissAll(i)}hasOpenModals(){return this._modalStack.hasOpenModals()}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),zn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=C({type:e}),e.\u0275inj=I({providers:[Gs]});let t=e;return t})();var Xn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=C({type:e}),e.\u0275inj=I({});let t=e;return t})();var Kn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=C({type:e}),e.\u0275inj=I({});let t=e;return t})(),Hs={hover:["mouseenter","mouseleave"],focus:["focusin","focusout"]};function Us(t){let e=(t||"").trim();if(e.length===0)return[];let s=e.split(/\s+/).map(n=>n.split(":")).map(n=>Hs[n[0]]||n),i=s.filter(n=>n.includes("manual"));if(i.length>1)throw"Triggers parse error: only one manual trigger is allowed";if(i.length===1&&s.length>1)throw"Triggers parse error: manual trigger can't be mixed with other triggers";return i.length?[]:s}function Vs(t,e,s,i,n,o=0,a=0){let r=Us(e);if(r.length===0)return()=>{};let l=new Set,d=[],c;function f(h,m){t.addEventListener(h,m),d.push(()=>t.removeEventListener(h,m))}function p(h,m){clearTimeout(c),m>0?c=setTimeout(h,m):h()}for(let[h,m]of r)m?(f(h,()=>{l.add(h),p(()=>l.size>0&&i(),o)}),f(m,()=>{l.delete(h),p(()=>l.size===0&&n(),a)})):f(h,()=>s()?p(n,a):p(i,o));return()=>d.forEach(h=>h())}var Qn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=C({type:e}),e.\u0275inj=I({});let t=e;return t})();var Jn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=C({type:e}),e.\u0275inj=I({});let t=e;return t})();var qn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=C({type:e}),e.\u0275inj=I({});let t=e;return t})();var Yn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=C({type:e}),e.\u0275inj=I({});let t=e;return t})();var Zn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=C({type:e}),e.\u0275inj=I({});let t=e;return t})();var eo=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=C({type:e}),e.\u0275inj=I({});let t=e;return t})(),$s=(()=>{let e=class e{constructor(){this._ngbConfig=u(pt),this.autoClose=!0,this.placement="auto",this.popperOptions=i=>i,this.triggers="hover focus",this.disableTooltip=!1,this.openDelay=0,this.closeDelay=0}get animation(){var i;return(i=this._animation)!=null?i:this._ngbConfig.animation}set animation(i){this._animation=i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),js=0,Ls=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=Se({type:e,selectors:[["ngb-tooltip-window"]],hostAttrs:["role","tooltip"],hostVars:5,hostBindings:function(n,o){n&2&&(ae("id",o.id),_e("tooltip"+(o.tooltipClass?" "+o.tooltipClass:"")),W("fade",o.animation))},inputs:{animation:"animation",id:"id",tooltipClass:"tooltipClass"},ngContentSelectors:Fi,decls:3,vars:0,consts:[["data-popper-arrow","",1,"tooltip-arrow"],[1,"tooltip-inner"]],template:function(n,o){n&1&&(Rt(),ai(0,"div",0),Le(1,"div",1),St(2),We())},styles:[`ngb-tooltip-window{pointer-events:none;position:absolute}ngb-tooltip-window .tooltip-inner{pointer-events:auto}ngb-tooltip-window.bs-tooltip-top,ngb-tooltip-window.bs-tooltip-bottom{padding-left:0;padding-right:0}ngb-tooltip-window.bs-tooltip-start,ngb-tooltip-window.bs-tooltip-end{padding-top:0;padding-bottom:0}
4
- `],encapsulation:2,changeDetection:0});let t=e;return t})(),au=(()=>{let e=class e{constructor(){this._config=u($s),this.animation=this._config.animation,this.autoClose=this._config.autoClose,this.placement=this._config.placement,this.popperOptions=this._config.popperOptions,this.triggers=this._config.triggers,this.container=this._config.container,this.disableTooltip=this._config.disableTooltip,this.tooltipClass=this._config.tooltipClass,this.openDelay=this._config.openDelay,this.closeDelay=this._config.closeDelay,this.shown=new T,this.hidden=new T,this._nativeElement=u(J).nativeElement,this._ngZone=u(re),this._document=u(le),this._changeDetector=u(ze),this._injector=u(ie),this._ngbTooltipWindowId=`ngb-tooltip-${js++}`,this._popupService=new $t(Ls),this._windowRef=null,this._positioning=Pi()}set ngbTooltip(i){this._ngbTooltip=i,!i&&this._windowRef&&this.close()}get ngbTooltip(){return this._ngbTooltip}open(i){if(!this._windowRef&&this._ngbTooltip&&!this.disableTooltip){let{windowRef:n,transition$:o}=this._popupService.open(this._ngbTooltip,i!=null?i:this.tooltipContext,this.animation);this._windowRef=n,this._windowRef.setInput("animation",this.animation),this._windowRef.setInput("tooltipClass",this.tooltipClass),this._windowRef.setInput("id",this._ngbTooltipWindowId),this._getPositionTargetElement().setAttribute("aria-describedby",this._ngbTooltipWindowId),this.container==="body"&&this._document.body.appendChild(this._windowRef.location.nativeElement),this._windowRef.changeDetectorRef.detectChanges(),this._windowRef.changeDetectorRef.markForCheck(),this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._getPositionTargetElement(),targetElement:this._windowRef.location.nativeElement,placement:this.placement,baseClass:"bs-tooltip",updatePopperOptions:a=>this.popperOptions(Ai([0,6])(a))}),Promise.resolve().then(()=>{this._positioning.update()}),this._afterRenderRef=Tt(()=>{this._positioning.update()},{phase:fe.MixedReadWrite,injector:this._injector})}),Bi(this._ngZone,this._document,this.autoClose,()=>this.close(),this.hidden,[this._windowRef.location.nativeElement],[this._nativeElement]),o.subscribe(()=>this.shown.emit())}}close(i=this.animation){this._windowRef!=null&&(this._getPositionTargetElement().removeAttribute("aria-describedby"),this._popupService.close(i).subscribe(()=>{var n;this._windowRef=null,this._positioning.destroy(),(n=this._afterRenderRef)==null||n.destroy(),this.hidden.emit(),this._changeDetector.markForCheck()}))}toggle(){this._windowRef?this.close():this.open()}isOpen(){return this._windowRef!=null}ngOnInit(){this._unregisterListenersFn=Vs(this._nativeElement,this.triggers,this.isOpen.bind(this),this.open.bind(this),this.close.bind(this),+this.openDelay,+this.closeDelay)}ngOnChanges({tooltipClass:i}){i&&this.isOpen()&&this._windowRef.setInput("tooltipClass",i.currentValue)}ngOnDestroy(){var i;this.close(!1),(i=this._unregisterListenersFn)==null||i.call(this)}_getPositionTargetElement(){return(Lt(this.positionTarget)?this._document.querySelector(this.positionTarget):this.positionTarget)||this._nativeElement}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=H({type:e,selectors:[["","ngbTooltip",""]],inputs:{animation:"animation",autoClose:"autoClose",placement:"placement",popperOptions:"popperOptions",triggers:"triggers",positionTarget:"positionTarget",container:"container",disableTooltip:"disableTooltip",tooltipClass:"tooltipClass",tooltipContext:"tooltipContext",openDelay:"openDelay",closeDelay:"closeDelay",ngbTooltip:"ngbTooltip"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbTooltip"],features:[nt]});let t=e;return t})(),to=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=C({type:e}),e.\u0275inj=I({});let t=e;return t})(),Ws=(()=>{let e=class e{constructor(){this.highlightClass="ngb-highlight",this.accentSensitive=!0}ngOnChanges(i){!this.accentSensitive&&!String.prototype.normalize&&(console.warn("The `accentSensitive` input in `ngb-highlight` cannot be set to `false` in a browser that does not implement the `String.normalize` function. You will have to include a polyfill in your application to use this feature in the current browser."),this.accentSensitive=!0);let n=ht(this.result),o=Array.isArray(this.term)?this.term:[this.term],a=c=>this.accentSensitive?c:In(c),r=o.map(c=>ts(a(ht(c)))).filter(c=>c),l=this.accentSensitive?n:In(n),d=r.length?l.split(new RegExp(`(${r.join("|")})`,"gmi")):[n];if(this.accentSensitive)this.parts=d;else{let c=0;this.parts=d.map(f=>n.substring(c,c+=f.length))}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=Se({type:e,selectors:[["ngb-highlight"]],inputs:{highlightClass:"highlightClass",result:"result",term:"term",accentSensitive:"accentSensitive"},features:[nt],decls:2,vars:0,consts:[[3,"class"]],template:function(n,o){n&1&&si(0,Xo,2,1,null,null,oi),n&2&&ri(o.parts)},styles:[`.ngb-highlight{font-weight:700}
5
- `],encapsulation:2,changeDetection:0});let t=e;return t})(),zs=new en("live announcer delay",{providedIn:"root",factory:()=>100});function xn(t,e=!1){let s=t.body.querySelector("#ngb-live");return s==null&&e&&(s=t.createElement("div"),s.setAttribute("id","ngb-live"),s.setAttribute("aria-live","polite"),s.setAttribute("aria-atomic","true"),s.classList.add("visually-hidden"),t.body.appendChild(s)),s}var Xs=(()=>{let e=class e{constructor(){this._document=u(le),this._delay=u(zs)}ngOnDestroy(){let i=xn(this._document);i&&i.parentElement.removeChild(i)}say(i){let n=xn(this._document,!0),o=this._delay;if(n!=null){n.textContent="";let a=()=>n.textContent=i;o===null?a():setTimeout(a,o)}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Ks=(()=>{let e=class e{constructor(){this.editable=!0,this.focusFirst=!0,this.selectOnExact=!1,this.showHint=!1,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=i=>i}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Qs=(()=>{let e=class e{constructor(){this.activeIdx=0,this.focusFirst=!0,this.formatter=ht,this.selectEvent=new T,this.activeChangeEvent=new T}hasActive(){return this.activeIdx>-1&&this.activeIdx<this.results.length}getActive(){return this.results[this.activeIdx]}markActive(i){this.activeIdx=i,this._activeChanged()}next(){this.activeIdx===this.results.length-1?this.activeIdx=this.focusFirst?(this.activeIdx+1)%this.results.length:-1:this.activeIdx++,this._activeChanged()}prev(){this.activeIdx<0?this.activeIdx=this.results.length-1:this.activeIdx===0?this.activeIdx=this.focusFirst?this.results.length-1:-1:this.activeIdx--,this._activeChanged()}resetActive(){this.activeIdx=this.focusFirst?0:-1,this._activeChanged()}select(i){this.selectEvent.emit(i)}ngOnInit(){this.resetActive()}_activeChanged(){this.activeChangeEvent.emit(this.activeIdx>=0?this.id+"-"+this.activeIdx:void 0)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=Se({type:e,selectors:[["ngb-typeahead-window"]],hostAttrs:["role","listbox"],hostVars:3,hostBindings:function(n,o){n&1&&me("mousedown",function(r){return r.preventDefault()}),n&2&&(ae("id",o.id),_e("dropdown-menu show"+(o.popupClass?" "+o.popupClass:"")))},inputs:{id:"id",focusFirst:"focusFirst",results:"results",term:"term",formatter:"formatter",resultTemplate:"resultTemplate",popupClass:"popupClass"},outputs:{selectEvent:"select",activeChangeEvent:"activeChange"},exportAs:["ngbTypeaheadWindow"],decls:4,vars:0,consts:[["rt",""],["type","button","role","option",1,"dropdown-item",3,"id","active"],[3,"result","term"],["type","button","role","option",1,"dropdown-item",3,"mouseenter","click","id"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(n,o){n&1&&(st(0,Qo,1,2,"ng-template",null,0,dn),si(2,qo,2,9,"button",1,oi)),n&2&&(je(2),ri(o.results))},dependencies:[Ws,un],encapsulation:2});let t=e;return t})(),Js=0,lu=(()=>{let e=class e{constructor(){this._nativeElement=u(J).nativeElement,this._config=u(Ks),this._live=u(Xs),this._document=u(le),this._ngZone=u(re),this._changeDetector=u(ze),this._injector=u(ie),this._popupService=new $t(Qs),this._positioning=Pi(),this._subscription=null,this._closed$=new X,this._inputValueBackup=null,this._inputValueForSelectOnExact=null,this._valueChanges$=L(this._nativeElement,"input").pipe(Ce(i=>i.target.value)),this._resubscribeTypeahead$=new Ki(null),this._windowRef=null,this.autocomplete="off",this.container=this._config.container,this.editable=this._config.editable,this.focusFirst=this._config.focusFirst,this.selectOnExact=this._config.selectOnExact,this.showHint=this._config.showHint,this.placement=this._config.placement,this.popperOptions=this._config.popperOptions,this.selectItem=new T,this.activeDescendant=null,this.popupId=`ngb-typeahead-${Js++}`,this._onTouched=()=>{},this._onChange=i=>{}}ngOnInit(){this._subscribeToUserInput()}ngOnChanges({ngbTypeahead:i}){i&&!i.firstChange&&(this._unsubscribeFromUserInput(),this._subscribeToUserInput())}ngOnDestroy(){this._closePopup(),this._unsubscribeFromUserInput()}registerOnChange(i){this._onChange=i}registerOnTouched(i){this._onTouched=i}writeValue(i){this._writeInputValue(this._formatItemForInput(i)),this.showHint&&(this._inputValueBackup=i)}setDisabledState(i){this._nativeElement.disabled=i}dismissPopup(){this.isPopupOpen()&&(this._resubscribeTypeahead$.next(null),this._closePopup(),this.showHint&&this._inputValueBackup!==null&&this._writeInputValue(this._inputValueBackup),this._changeDetector.markForCheck())}isPopupOpen(){return this._windowRef!=null}handleBlur(){this._resubscribeTypeahead$.next(null),this._onTouched()}handleKeyDown(i){if(this.isPopupOpen())switch(i.key){case"ArrowDown":i.preventDefault(),this._windowRef.instance.next(),this._showHint();break;case"ArrowUp":i.preventDefault(),this._windowRef.instance.prev(),this._showHint();break;case"Enter":case"Tab":{let n=this._windowRef.instance.getActive();Vt(n)&&(i.preventDefault(),i.stopPropagation(),this._selectResult(n)),this._closePopup();break}}}_openPopup(){if(!this.isPopupOpen()){this._inputValueBackup=this._nativeElement.value;let{windowRef:i}=this._popupService.open();this._windowRef=i,this._windowRef.setInput("id",this.popupId),this._windowRef.setInput("popupClass",this.popupClass),this._windowRef.instance.selectEvent.subscribe(n=>this._selectResultClosePopup(n)),this._windowRef.instance.activeChangeEvent.subscribe(n=>this.activeDescendant=n),this.container==="body"&&(this._windowRef.location.nativeElement.style.zIndex="1055",this._document.body.appendChild(this._windowRef.location.nativeElement)),this._changeDetector.markForCheck(),this._ngZone.runOutsideAngular(()=>{this._windowRef&&(this._positioning.createPopper({hostElement:this._nativeElement,targetElement:this._windowRef.location.nativeElement,placement:this.placement,updatePopperOptions:n=>this.popperOptions(Ai([0,2])(n))}),this._afterRenderRef=Tt(()=>{this._positioning.update()},{phase:fe.MixedReadWrite,injector:this._injector}))}),Bi(this._ngZone,this._document,"outside",()=>this.dismissPopup(),this._closed$,[this._nativeElement,this._windowRef.location.nativeElement])}}_closePopup(){this._popupService.close().subscribe(()=>{var i;this._positioning.destroy(),(i=this._afterRenderRef)==null||i.destroy(),this._closed$.next(),this._windowRef=null,this.activeDescendant=null})}_selectResult(i){let n=!1;this.selectItem.emit({item:i,preventDefault:()=>{n=!0}}),this._resubscribeTypeahead$.next(null),n||(this.writeValue(i),this._onChange(i))}_selectResultClosePopup(i){this._selectResult(i),this._closePopup()}_showHint(){var i;if(this.showHint&&((i=this._windowRef)!=null&&i.instance.hasActive())&&this._inputValueBackup!=null){let n=this._inputValueBackup.toLowerCase(),o=this._formatItemForInput(this._windowRef.instance.getActive());n===o.substring(0,this._inputValueBackup.length).toLowerCase()?(this._writeInputValue(this._inputValueBackup+o.substring(this._inputValueBackup.length)),this._nativeElement.setSelectionRange.apply(this._nativeElement,[this._inputValueBackup.length,o.length])):this._writeInputValue(o)}}_formatItemForInput(i){return i!=null&&this.inputFormatter?this.inputFormatter(i):ht(i)}_writeInputValue(i){this._nativeElement.value=ht(i)}_subscribeToUserInput(){let i=this._valueChanges$.pipe(it(n=>{this._inputValueBackup=this.showHint?n:null,this._inputValueForSelectOnExact=this.selectOnExact?n:null,this._onChange(this.editable?n:void 0)}),this.ngbTypeahead?this.ngbTypeahead:()=>tt([]));this._subscription=this._resubscribeTypeahead$.pipe(qt(()=>i)).subscribe(n=>{!n||n.length===0?this._closePopup():this.selectOnExact&&n.length===1&&this._formatItemForInput(n[0])===this._inputValueForSelectOnExact?(this._selectResult(n[0]),this._closePopup()):(this._openPopup(),this._windowRef.setInput("focusFirst",this.focusFirst),this._windowRef.setInput("results",n),this._windowRef.setInput("term",this._nativeElement.value),this.resultFormatter&&this._windowRef.setInput("formatter",this.resultFormatter),this.resultTemplate&&this._windowRef.setInput("resultTemplate",this.resultTemplate),this._windowRef.instance.resetActive(),this._windowRef.changeDetectorRef.detectChanges(),this._showHint());let o=n?n.length:0;this._live.say(o===0?"No results available":`${o} result${o===1?"":"s"} available`)})}_unsubscribeFromUserInput(){this._subscription&&this._subscription.unsubscribe(),this._subscription=null}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=H({type:e,selectors:[["input","ngbTypeahead",""]],hostAttrs:["autocapitalize","off","autocorrect","off","role","combobox"],hostVars:7,hostBindings:function(n,o){n&1&&me("blur",function(){return o.handleBlur()})("keydown",function(r){return o.handleKeyDown(r)}),n&2&&(ae("autocomplete",o.autocomplete),Ne("aria-autocomplete",o.showHint?"both":"list")("aria-activedescendant",o.activeDescendant)("aria-owns",o.isPopupOpen()?o.popupId:null)("aria-expanded",o.isPopupOpen()),W("open",o.isPopupOpen()))},inputs:{autocomplete:"autocomplete",container:"container",editable:"editable",focusFirst:"focusFirst",inputFormatter:"inputFormatter",ngbTypeahead:"ngbTypeahead",resultFormatter:"resultFormatter",resultTemplate:"resultTemplate",selectOnExact:"selectOnExact",showHint:"showHint",placement:"placement",popperOptions:"popperOptions",popupClass:"popupClass"},outputs:{selectItem:"selectItem"},exportAs:["ngbTypeahead"],features:[ui([{provide:hn,useExisting:Yt(()=>e),multi:!0}]),nt]});let t=e;return t})(),io=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=C({type:e}),e.\u0275inj=I({});let t=e;return t})();var no=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=C({type:e}),e.\u0275inj=I({});let t=e;return t})(),qs=[Pn,An,Gn,Hn,$n,Wn,zn,Xn,no,Kn,Qn,Jn,qn,Yn,Zn,eo,to,io],cu=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=C({type:e}),e.\u0275inj=I({imports:[qs,Pn,An,Gn,Hn,$n,Wn,zn,Xn,no,Kn,Qn,Jn,qn,Yn,Zn,eo,to,io]});let t=e;return t})();export{Jd as a,ds as b,qd as c,Yd as d,Ye as e,Bn as f,Zd as g,jn as h,su as i,Ss as j,ru as k,Ln as l,jt as m,Gs as n,au as o,lu as p,cu as q};
@@ -1,20 +0,0 @@
1
- import{a as ee}from"./chunk-KFM3IHPE.js";import{a as Q,b as ne}from"./chunk-PFCIYPDO.js";import{a as X,b as Z}from"./chunk-MMPQXC6H.js";import{a as G}from"./chunk-BZVO3JIQ.js";import{m as U,n as W,o as Y}from"./chunk-F5SS6TN7.js";import{c as q,e as z,l as J,y as K}from"./chunk-Z4CHNCHA.js";import{b as F}from"./chunk-HMOW3VNR.js";import{b as N}from"./chunk-4J45MC2M.js";import{b as k,j as V}from"./chunk-OAKLLAD6.js";import{a as T,b as M}from"./chunk-H3E4T6KH.js";import{$b as C,Bb as w,Bc as l,Cc as c,Dc as O,Lb as y,Mb as v,Rb as g,Tb as I,Ub as H,Vb as j,Wb as r,Xb as a,Yb as _,cc as h,dc as d,g as oe,h as S,ib as n,kd as L,na as m,nc as b,ob as D,oc as x,pc as $,sc as P,tc as R,ub as E,uc as B,w as A,xa as p,ya as f}from"./chunk-KDJPDALB.js";function ae(o,u){o&1&&(r(0,"div",6),_(1,"i",14),a())}function se(o,u){if(o&1){let e=C();r(0,"tr")(1,"td",15),b(2),l(3,"date"),a(),r(4,"td",16)(5,"a",17),h("click",function(){let t=p(e).$implicit,s=d(2);return f(s.restore(t.id))}),b(6),l(7,"translate"),_(8,"i",18),a()()()}if(o&2){let e=u.$implicit;n(2),x(O(3,2,e.timestamp,"medium")),n(4),$(" ",c(7,5,"config.restore.copy_to_editor")," ")}}function le(o,u){if(o&1&&(r(0,"table",7)(1,"tbody"),H(2,se,9,7,"tr",null,I),a()()),o&2){let e=d();n(2),j(e.backupList)}}function de(o,u){o&1&&(r(0,"div")(1,"h3",11),b(2),l(3,"translate"),a()()),o&2&&(n(2),x(c(3,1,"config.restore.no_backups")))}function ce(o,u){if(o&1){let e=C();r(0,"button",19),l(1,"translate"),h("click",function(){p(e);let t=d();return f(t.deleteAllBackups())}),b(2),l(3,"translate"),a()}o&2&&(y("aria-label",c(1,2,"form.button_remove")),n(2),$(" ",c(3,4,"form.button_remove")," "))}var te=(()=>{class o{$activeModal=m(U);$api=m(k);$toastr=m(V);$translate=m(T);loading=!0;backupList=[];ngOnInit(){this.$api.get("/config-editor/backups").subscribe({next:e=>{this.loading=!1,this.backupList=e},error:e=>{this.loading=!1,console.error(e),this.$toastr.error(e.error.message||e.message,this.$translate.instant("toast.title_error"))}})}restore(e){return this.$activeModal.close(e)}deleteAllBackups(){return this.$api.delete("/config-editor/backups").subscribe({next:()=>{this.$activeModal.dismiss(),this.$toastr.success(this.$translate.instant("config.restore.toast_backups_deleted"),this.$translate.instant("toast.title_success"))},error:e=>{console.error(e),this.$toastr.error(e.error.message||e.message,this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=E({type:o,selectors:[["ng-component"]],decls:22,vars:16,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"text-center","primary-text"],[1,"table","table-borderless","table-hover","table-sm"],[1,"modal-footer","justify-content-between"],[1,"text-left"],["type","button","data-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-right"],["type","button",1,"btn","btn-danger","mr-auto"],[1,"fa","fa-fw","fa-cog","fa-spin",2,"font-size","75px"],[1,"w-100"],["nowrap",""],[1,"card-link",3,"click"],[1,"fas","fa-fw","fa-arrow-right"],["type","button",1,"btn","btn-danger","mr-auto",3,"click"]],template:function(i,t){i&1&&(r(0,"div",0)(1,"div",1)(2,"h5",2),b(3),l(4,"translate"),a(),r(5,"button",3),l(6,"translate"),h("click",function(){return t.$activeModal.dismiss("Dismiss")}),r(7,"span",4),b(8,"\xD7"),a()()(),r(9,"div",5),w(10,ae,2,0,"div",6)(11,le,4,0,"table",7)(12,de,4,3,"div"),a(),r(13,"div",8)(14,"div",9)(15,"button",10),l(16,"translate"),h("click",function(){return t.$activeModal.dismiss("Dismiss")}),b(17),l(18,"translate"),a()(),_(19,"div",11),r(20,"div",12),w(21,ce,4,6,"button",13),a()()()),i&2&&(n(3),x(c(4,8,"config.restore.title_restore_homebridge_backup")),n(2),y("aria-label",c(6,10,"form.button_close")),n(5),g(t.loading?10:-1),n(),g(!t.loading&&t.backupList&&t.backupList.length?11:-1),n(),g(!t.loading&&(!t.backupList||!t.backupList.length)?12:-1),n(3),y("aria-label",c(16,12,"form.button_close")),n(2),$(" ",c(18,14,"form.button_close")," "),n(4),g(!t.loading&&t.backupList.length?21:-1))},dependencies:[L,M],encapsulation:2})}return o})();var ie=oe(ne(),1);function me(o,u){if(o&1){let e=C();r(0,"button",13),l(1,"translate"),l(2,"translate"),h("click",function(){p(e);let t=d();return f(t.onExportConfig())}),_(3,"i",14),a()}o&2&&(v("ngbTooltip",c(1,2,"form.button_download")),y("aria-label",c(2,4,"form.button_download")))}function pe(o,u){if(o&1){let e=C();r(0,"button",15),l(1,"translate"),l(2,"translate"),h("click",function(){p(e);let t=d();return f(t.onCancelRestore())}),_(3,"i",16),a()}if(o&2){let e=d();v("disabled",e.saveInProgress)("ngbTooltip",c(1,3,"form.button_cancel")),y("aria-label",c(2,5,"form.button_cancel"))}}function fe(o,u){if(o&1){let e=C();r(0,"button",13),l(1,"translate"),l(2,"translate"),h("click",function(){p(e);let t=d();return f(t.onRestore())}),_(3,"i",17),a()}o&2&&(v("ngbTooltip",c(1,2,"form.button_restore")),y("aria-label",c(2,4,"form.button_restore")))}function ge(o,u){o&1&&_(0,"i",8)}function ue(o,u){o&1&&_(0,"i",9)}function he(o,u){if(o&1){let e=C();r(0,"ngx-monaco-editor",18),h("onInit",function(t){p(e);let s=d();return f(s.onEditorInit(t))})("keydown.control.s",function(t){p(e);let s=d();return t.preventDefault(),f(s.onSave())})("keydown.meta.s",function(t){p(e);let s=d();return t.preventDefault(),f(s.onSave())}),a()}if(o&2){let e=d();v("options",e.editorOptions)("model",e.monacoEditorModel)}}function be(o,u){if(o&1){let e=C();r(0,"ngx-monaco-diff-editor",19),h("onInit",function(t){p(e);let s=d();return f(s.onInitDiffEditor(t))})("keydown.control.s",function(t){p(e);let s=d();return t.preventDefault(),f(s.onSave())})("keydown.meta.s",function(t){p(e);let s=d();return t.preventDefault(),f(s.onSave())}),a()}if(o&2){let e=d();v("options",e.editorOptions)("originalModel",e.monacoEditorModel)("modifiedModel",e.monacoEditorModel)}}function _e(o,u){if(o&1){let e=C();r(0,"textarea",20),B("ngModelChange",function(t){p(e);let s=d();return R(s.homebridgeConfig,t)||(s.homebridgeConfig=t),f(t)}),b(1," "),a()}if(o&2){let e=d();P("ngModel",e.homebridgeConfig)}}var qe=(()=>{class o{$api=m(k);$md=m(G);$modal=m(W);$monacoEditor=m(ee);$route=m(F);$renderer=m(D);$settings=m(N);$toastr=m(V);$translate=m(T);homebridgeConfig;originalConfig;saveInProgress;isMobile=!1;monacoEditor;editorOptions;monacoEditorModel;editorDecorations=[];lastHeight;visualViewPortEventCallback;constructor(){this.isMobile=this.$md.detect.mobile()}ngOnInit(){this.editorOptions={language:"json",theme:this.$settings.actualLightingMode==="dark"?"vs-dark":"vs-light",automaticLayout:!0};let e=document.querySelector(".content");this.$renderer.setStyle(e,"height","100%"),this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.$route.data.subscribe(i=>{this.homebridgeConfig=i.config}),this.monacoEditorModel={value:"{}",language:"json",uri:window.monaco?window.monaco.Uri.parse("a://homebridge/config.json"):void 0},window.monaco?this.setMonacoEditorModel():this.$monacoEditor.readyEvent.subscribe({next:()=>{this.setMonacoEditorModel()}})}onEditorInit(e){window.editor=e,this.monacoEditor=e,this.monacoEditor.getModel().setValue(this.homebridgeConfig)}onInitDiffEditor(e){this.monacoEditor=e.modifiedEditor,e.getModel().original.setValue(this.originalConfig),e.getModel().modified.setValue(this.homebridgeConfig),window.editor=e}onSave(){return S(this,null,function*(){if(!this.saveInProgress){this.monacoEditor&&(this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[])),this.saveInProgress=!0;try{if(!this.isMobile){yield this.monacoEditor.getAction("editor.action.formatDocument").run();let i=window.monaco.editor.getModelMarkers({owner:"json"});for(let t of i)if(t.message==="Duplicate object key"){this.saveInProgress=!1,this.$toastr.error(this.$translate.instant("config.config_invalid_json"),this.$translate.instant("toast.title_error"));return}this.homebridgeConfig=this.monacoEditor.getModel().getValue()}let e=this.parseConfigFromEditor();this.homebridgeConfig=JSON.stringify(e,null,4),typeof e.bridge!="object"?this.$toastr.error(this.$translate.instant("config.config_bridge_missing"),this.$translate.instant("toast.title_error")):/^(?:[0-9A-F]{2}:){5}[0-9A-F]{2}$/i.test(e.bridge.username)?e.accessories&&!Array.isArray(e.accessories)?this.$toastr.error(this.$translate.instant("config.config_accessory_must_be_array"),this.$translate.instant("toast.title_error")):e.platforms&&!Array.isArray(e.platforms)?this.$toastr.error(this.$translate.instant("config.config_platform_must_be_array"),this.$translate.instant("toast.title_error")):e.platforms&&Array.isArray(e.platforms)&&!this.validateSection(e.platforms,"platform")||e.accessories&&Array.isArray(e.accessories)&&!this.validateSection(e.accessories,"accessory")||e.plugins&&Array.isArray(e.plugins)&&!this.validatePlugins(e.plugins,"plugins")||e.disabledPlugins&&Array.isArray(e.disabledPlugins)&&!this.validatePlugins(e.disabledPlugins,"disabledPlugins")||(yield this.saveConfig(e),this.originalConfig=""):this.$toastr.error(this.$translate.instant("config.config_username_error"),this.$translate.instant("toast.title_error"))}catch(e){console.error(e),this.$toastr.error(this.$translate.instant("config.config_invalid_json"),this.$translate.instant("toast.title_error"))}this.saveInProgress=!1}})}parseConfigFromEditor(){try{return JSON.parse(this.homebridgeConfig)}catch{let i=ie.default.parse(this.homebridgeConfig);return this.homebridgeConfig=JSON.stringify(i,null,4),this.monacoEditor&&this.monacoEditor.getModel().setValue(this.homebridgeConfig),i}}saveConfig(e){return S(this,null,function*(){try{let i=yield A(this.$api.post("/config-editor",e));this.homebridgeConfig=JSON.stringify(i,null,4),this.$modal.open(Q,{size:"lg",backdrop:"static"})}catch(i){console.error(i),this.$toastr.error(this.$translate.instant("config.failed_to_save_config"),this.$translate.instant("toast.title_error"))}})}onRestore(){this.$modal.open(te,{size:"lg",backdrop:"static"}).result.then(e=>{this.originalConfig||(this.originalConfig=this.homebridgeConfig),this.$api.get(`/config-editor/backups/${e}`).subscribe({next:i=>{this.$toastr.info(this.$translate.instant("config.restore.confirm"),this.$translate.instant("config.title_backup_loaded")),this.homebridgeConfig=JSON.stringify(i,null,4),this.monacoEditor&&window.editor.modifiedEditor&&(this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[]),this.monacoEditor.executeEdits("beautifier",[{identifier:"delete",range:new monaco.Range(1,1,this.monacoEditor.getModel().getLineCount()+10,1),text:"",forceMoveMarkers:!0}]),this.monacoEditor.executeEdits("beautifier",[{identifier:"insert",range:new monaco.Range(1,1,1,1),text:this.homebridgeConfig,forceMoveMarkers:!0}]))},error:i=>{console.error(i),this.$toastr.error(i.error.message||this.$translate.instant("backup.load_error"),this.$translate.instant("toast.title_error"))}})}).catch(()=>{})}onExportConfig(){let e=`data:text/json;charset=utf-8,${encodeURIComponent(this.homebridgeConfig)}`,i=document.createElement("a");i.setAttribute("href",e),i.setAttribute("download","config.json"),document.body.appendChild(i),i.click(),i.remove()}onCancelRestore(){this.homebridgeConfig=this.originalConfig,this.originalConfig=""}validateSection(e,i){for(let t of e){if(typeof t!="object"||Array.isArray(t))return this.$toastr.error(this.$translate.instant("config.error_blocks_objects",{type:i}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(t),!1;if(!t[i])return this.$toastr.error(this.$translate.instant("config.error_blocks_type",{type:i}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(t),!1;if(typeof t[i]!="string")return this.$toastr.error(this.$translate.instant("config.error_string_type",{type:i}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(t),!1}return!0}validatePlugins(e,i){for(let t of e)if(typeof t!="string")return this.$toastr.error(this.$translate.instant("config.error_string_array",{key:i}),this.$translate.instant("toast.title_error")),!1;return!0}highlightOffendingArrayItem(e){this.monacoEditor&&(e=JSON.stringify(e,null,4).split(`
2
- `).map(i=>` ${i}`).join(`
3
- `),setTimeout(()=>{let i=this.monacoEditor.getModel().findMatches(e);if(i.length){let t=i[0].range,s=new monaco.Range(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn);this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[{range:s,options:{isWholeLine:!0,linesDecorationsClassName:"hb-monaco-editor-line-error"}}])}},200))}setMonacoEditorModel(){if(window.monaco.languages.json.jsonDefaults.diagnosticsOptions.schemas.some(i=>i.uri==="http://homebridge/config.json"))return;let e=monaco.Uri.parse("a://homebridge/config.json");window.monaco.languages.json.jsonDefaults.setDiagnosticsOptions({allowComments:!1,validate:!0,schemas:[{uri:"http://homebridge/config.json",fileMatch:[e.toString()],schema:{type:"object",required:["bridge"],properties:{bridge:{type:"object",required:["name","username","port","pin"],properties:{name:{type:"string",description:`The Homebridge instance name.
4
- This should be unique if you are running multiple instances of Homebridge.`,default:"Homebridge"},username:{type:"string",description:`Homebridge username must be 6 pairs of colon-separated hexadecimal characters (A-F 0-9).
5
- You should change this pin if you need to re-pair your instance with HomeKit.
6
- Example: 0E:89:49:64:91:86`,default:"0E:89:49:64:91:86",pattern:"^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$"},port:{type:"number",description:`The port Homebridge listens on.
7
- If running more than one instance of Homebridge on the same server make sure each instance is given a unique port.`,default:51173,minimum:1025,maximum:65534},pin:{type:"string",description:`The Homebridge instance pin.
8
- This is used when pairing Homebridge to HomeKit.
9
- Example: 630-27-655`,default:"630-27-655",pattern:"^([0-9]{3}-[0-9]{2}-[0-9]{3})$"},manufacturer:{type:"string",description:"The bridge manufacturer to be displayed in HomeKit"},firmwareRevision:{type:"string",description:"The bridge firmware version to be displayed in HomeKit"},model:{type:"string",description:"The bridge model to be displayed in HomeKit"},bind:{description:`A string or an array of strings with the name(s) of the network interface(s) Homebridge should bind to.
10
-
11
- Requires Homebridge v1.3 or later.`,type:["string","array"],items:{type:"string",description:"Network Interface name that Homebridge should bind to."}}},default:{name:"Homebridge",username:"0E:89:49:64:91:86",port:51173,pin:"6302-7655"}},mdns:{type:"object",properties:{interface:{type:"string",description:`The interface or IP address of the interface you want Homebridge to listen on. This is useful if your server has multiple interfaces.
12
-
13
- Depreciated as of Homebridge v1.3.0 - use bridge.bind instead.`},legacyAdvertiser:{type:"boolean",description:"Set to `false` to use the new mdns library, ciao."}},default:{legacyAdvertiser:!1}},plugins:{type:"array",description:"An array of plugins that should be selectively enabled. Remove this array to enable all plugins.",items:{type:"string",description:`The full plugin npm package name.
14
- Example: homebridge-dummy`},default:["homebridge-config-ui-x"]},disabledPlugins:{type:"array",description:`An array of plugins that should be disabled.
15
-
16
- Requires Homebridge v1.3 or later.`,items:{type:"string",description:`The full plugin npm package name.
17
- Example: homebridge-dummy`},default:[]},ports:{type:"object",description:"The range of ports that should be used for certain accessories like cameras and TVs",required:["start","end"],properties:{start:{type:"number",default:52100,minimum:1025,maximum:65534},end:{type:"number",default:52150,minimum:1025,maximum:65534}},default:{start:52100,end:52150}},platforms:{type:"array",description:`Any plugin that exposes a platform should have it's config entered in this array.
18
- Separate each plugin config block using a comma.`,items:{type:"object",required:["platform"],anyOf:[{type:"object",required:["platform"],properties:{platform:{type:"string",description:"This is used by Homebridge to identify which plugin this platform belongs to.",not:{enum:["config"]}},name:{type:"string",description:"The name of the platform."}}},{type:"object",properties:{platform:{type:"string",description:`Homebridge UI platform name must be set to "config".
19
- Do Not Change!`,oneOf:[{enum:"config"}]},name:{type:"string",description:"The name used in the Homebridge log."}}}]}},accessories:{type:"array",description:`Any plugin that exposes an accessory should have it's config entered in this array.
20
- Separate each plugin config block using a comma.`,items:{type:"object",required:["accessory","name"],properties:{accessory:{type:"string",description:"This is used by Homebridge to identify which plugin this accessory belongs to."},name:{type:"string",description:"The name of the accessory."}}}}}}}]}),this.monacoEditorModel.uri=monaco.Uri.parse("a://homebridge/config.json")}visualViewPortChanged(){this.lastHeight<window.visualViewport.height&&document.activeElement.blur(),window.visualViewport.height<window.innerHeight?(this.$md.enableTouchMove(),this.lastHeight=window.visualViewport.height):window.visualViewport.height===window.innerHeight&&(this.$md.disableTouchMove(),this.lastHeight=window.visualViewport.height)}ngOnDestroy(){let e=document.querySelector(".content");this.$renderer.removeStyle(e,"height"),window.visualViewport&&(window.visualViewport.removeEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.enableTouchMove()),this.monacoEditor&&this.monacoEditor.dispose()}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=E({type:o,selectors:[["ng-component"]],decls:18,vars:18,consts:[[1,"flex-column","d-flex","align-items-stretch","h-100"],[1,"row"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-right"],["container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","waves-effect","my-0",3,"ngbTooltip"],["container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-danger","waves-effect","my-0",3,"disabled","ngbTooltip"],["container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","waves-effect","my-0","mr-0",3,"click","disabled","ngbTooltip"],[1,"fas","fa-fw","fa-floppy-disk"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],[1,"flex-grow-1","h-100","w-100","mt-3","mb-0",3,"options","model"],[1,"flex-grow-1","h-100","w-100","mt-3","mb-0",3,"options","originalModel","modifiedModel"],["wrap","off","autocomplete","off","autocorrect","off","autocapitalize","off","spellcheck","false",1,"hb-plain-text-editor","align-self-end","h-100","w-100","my-3",3,"ngModel"],["container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","waves-effect","my-0",3,"click","ngbTooltip"],[1,"fas","fa-fw","fa-download"],["container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-danger","waves-effect","my-0",3,"click","disabled","ngbTooltip"],[1,"fas","fa-fw","fa-times"],[1,"fas","fa-fw","fa-history"],[1,"flex-grow-1","h-100","w-100","mt-3","mb-0",3,"onInit","keydown.control.s","keydown.meta.s","options","model"],[1,"flex-grow-1","h-100","w-100","mt-3","mb-0",3,"onInit","keydown.control.s","keydown.meta.s","options","originalModel","modifiedModel"],["wrap","off","autocomplete","off","autocorrect","off","autocapitalize","off","spellcheck","false",1,"hb-plain-text-editor","align-self-end","h-100","w-100","my-3",3,"ngModelChange","ngModel"]],template:function(i,t){i&1&&(r(0,"div",0)(1,"div",1)(2,"div",2)(3,"h3",3),b(4),l(5,"translate"),a()(),r(6,"div",4),w(7,me,4,6,"button",5)(8,pe,4,7,"button",6)(9,fe,4,6,"button",5),r(10,"button",7),l(11,"translate"),l(12,"translate"),h("click",function(){return t.onSave()}),w(13,ge,1,0,"i",8)(14,ue,1,0,"i",9),a()()(),w(15,he,1,2,"ngx-monaco-editor",10)(16,be,1,3,"ngx-monaco-diff-editor",11)(17,_e,2,1,"textarea",12),a()),i&2&&(n(4),x(c(5,12,"menu.config_json_editor")),n(3),g(t.originalConfig?-1:7),n(),g(t.originalConfig?8:-1),n(),g(t.originalConfig?-1:9),n(),v("disabled",t.saveInProgress)("ngbTooltip",c(11,14,"form.button_save")),y("aria-label",c(12,16,"form.button_save")),n(3),g(t.saveInProgress?-1:13),n(),g(t.saveInProgress?14:-1),n(),g(!t.isMobile&&!t.originalConfig?15:-1),n(),g(!t.isMobile&&t.originalConfig?16:-1),n(),g(t.isMobile?17:-1))},dependencies:[Y,X,Z,K,q,z,J,M],encapsulation:2})}return o})();export{qe as a};
@@ -1 +0,0 @@
1
- import{d as s}from"./chunk-HMOW3VNR.js";import{c as i}from"./chunk-3VDXR5B2.js";import{j as o}from"./chunk-OAKLLAD6.js";import{a}from"./chunk-H3E4T6KH.js";import{ha as e,na as r}from"./chunk-KDJPDALB.js";var v=(()=>{class t{$auth=r(i);$router=r(s);$translate=r(a);$toastr=r(o);canActivate(){return this.$auth.user&&this.$auth.user.admin?!0:(this.$toastr.error(this.$translate.instant("toast.no_auth"),this.$translate.instant("toast.title_error")),this.$router.navigate(["/"]),!1)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=e({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{v as a};
@@ -1 +0,0 @@
1
- import{a as se}from"./chunk-P5WCYSBI.js";import{g as re,m as A,n as ae}from"./chunk-F5SS6TN7.js";import{b as P,c as T,d as C,e as D,f as z,g as F,j as x,m as R,o as Q,p as L,q as O,w as ne,y as I,z as M}from"./chunk-Z4CHNCHA.js";import{b as ie}from"./chunk-HMOW3VNR.js";import{c as j}from"./chunk-3VDXR5B2.js";import{a as ve}from"./chunk-4J45MC2M.js";import{b as S,j as U}from"./chunk-OAKLLAD6.js";import{a as $,b as E}from"./chunk-H3E4T6KH.js";import{$b as G,Bb as B,Bc as s,Cc as o,Dc as te,Lb as f,Mb as u,Rb as g,Tb as W,Ub as X,Vb as Y,Wb as i,Xb as l,Yb as m,ad as q,cc as _,dc as h,g as be,ib as e,kc as Z,lc as ee,na as d,nc as p,oc as v,pc as c,rb as K,ub as y,xa as N,xc as w,ya as V}from"./chunk-KDJPDALB.js";function Ce(r,k){r&1&&(i(0,"p",8)(1,"small"),p(2),s(3,"translate"),l()()),r&2&&(e(2),v(o(3,1,"login.invalid_credentials")))}var oe=(()=>{class r{$activeModal=d(A);$api=d(S);$toastr=d(U);$translate=d($);formGroup=new F({password:new x("",[C.required])});invalidCredentials=!1;disable2fa(){this.invalidCredentials=!1,this.$api.post("/users/otp/deactivate",this.formGroup.value).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.setup_2fa_disable_success"),this.$translate.instant("toast.title_success"))},error:()=>{this.formGroup.setValue({password:""}),this.invalidCredentials=!0}})}static \u0275fac=function(a){return new(a||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],decls:28,vars:24,consts:[[1,"modal-content",2,"min-height","300px"],[1,"modal-header"],[1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"form-group"],["type","password","autocomplete","current-password",1,"form-control",3,"formControl","placeholder"],[1,"red-text"],[1,"modal-footer","justify-content-between"],[1,"text-left"],["type","button","data-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-right"],["type","button","data-dismiss","modal",1,"btn","btn-danger",3,"click","disabled"]],template:function(a,n){a&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),p(3),s(4,"translate"),l(),i(5,"button",3),s(6,"translate"),_("click",function(){return n.$activeModal.dismiss("Dismiss")}),i(7,"span",4),p(8,"\xD7"),l()()(),i(9,"div",5)(10,"p"),p(11),s(12,"translate"),l(),i(13,"div",6),m(14,"input",7),s(15,"translate"),l(),B(16,Ce,4,3,"p",8),l(),i(17,"div",9)(18,"div",10)(19,"button",11),s(20,"translate"),_("click",function(){return n.$activeModal.dismiss("Dismiss")}),p(21),s(22,"translate"),l()(),m(23,"div",12),i(24,"div",13)(25,"button",14),_("click",function(){return n.disable2fa()}),p(26),s(27,"translate"),l()()()()),a&2&&(e(3),v(o(4,10,"users.setup_2fa_disable")),e(2),f("aria-label",o(6,12,"form.button_close")),e(6),v(o(12,14,"users.setup_2fa_disable_current_password")),e(3),u("formControl",n.formGroup.controls.password)("placeholder",o(15,16,"users.label_password")),e(2),g(n.invalidCredentials?16:-1),e(3),f("aria-label",o(20,18,"form.button_close")),e(2),c(" ",o(22,20,"form.button_close")," "),e(4),u("disabled",n.formGroup.invalid),e(),c(" ",o(27,22,"form.button_disable")," "))},dependencies:[I,T,D,M,Q,E],encapsulation:2})}return r})();var le=be(ve(),1);var xe=["qrcode"],he=r=>({timeDiffError:r});function we(r,k){if(r&1&&(i(0,"div",6)(1,"h3"),p(2),s(3,"translate"),l(),i(4,"p"),p(5),s(6,"translate"),l()()),r&2){let t=h();e(2),v(o(3,2,"users.setup_2fa_cannot_setup_2fa")),e(3),v(te(6,4,"users.setup_2fa_server_time_out",w(7,he,t.timeDiffError)))}}function ge(r,k){r&1&&(i(0,"div")(1,"p"),p(2),s(3,"translate"),l()()),r&2&&(e(2),v(o(3,1,"users.setup_2fa_scan_qr_code")))}function ye(r,k){if(r&1&&(i(0,"div",10)(1,"p"),p(2),s(3,"translate"),l(),i(4,"div",16),m(5,"input",17),l()()),r&2){let t=h();e(2),v(o(3,2,"users.setup_2fa_enter_code")),e(3),u("formControl",t.formGroup.controls.code)}}function Se(r,k){if(r&1){let t=G();i(0,"button",18),_("click",function(){N(t);let n=h();return V(n.enable2fa())}),p(1),s(2,"translate"),l()}if(r&2){let t=h();u("disabled",t.formGroup.invalid),e(),c(" ",o(2,2,"form.button_enable")," ")}}var pe=(()=>{class r{$activeModal=d(A);$api=d(S);$toastr=d(U);$translate=d($);user;qrcodeElement=K("qrcode");timeDiffError=null;otpString;formGroup=new F({code:new x("",[C.required,C.minLength(6),C.maxLength(6)])});ngOnInit(){this.$api.post("/users/otp/setup",{}).subscribe({next:t=>{this.checkTimeDiff(t.timestamp),this.timeDiffError||(this.otpString=t.otpauth)},error:t=>{this.$activeModal.dismiss(),console.error(t),this.$toastr.error(this.$translate.instant("users.setup_2fa_enable_error"),this.$translate.instant("toast.title_error"))}})}checkTimeDiff(t){let a=(0,le.default)(t).diff(new Date,"millisecond");if(a<-5e3||a>5e3){this.timeDiffError=a;return}this.timeDiffError=null}enable2fa(){this.$api.post("/users/otp/activate",this.formGroup.value).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("users.setup_2fa_enabled_success"),this.$translate.instant("toast.title_success")),this.$activeModal.close()},error:t=>{console.error(t),this.$toastr.error(this.$translate.instant("users.setup_2fa_activate_error"),this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(a){return new(a||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],viewQuery:function(a,n){a&1&&Z(n.qrcodeElement,xe,5),a&2&&ee()},inputs:{user:"user"},decls:27,vars:21,consts:[[1,"modal-content","setup2fa"],[1,"modal-header"],[1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"text-center"],["type","warning",3,"dismissible"],[1,"text-center","w-100","d-flex","justify-content-center"],[1,"mx-auto","my-2",2,"width","180px","height","180px",3,"data"],[1,"mt-4"],[1,"modal-footer","justify-content-between"],[1,"text-left"],["type","button","data-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-right"],["type","button","data-dismiss","modal",1,"btn","btn-primary",3,"disabled"],[1,"form-group"],["type","text","placeholder","eg. 123456","autocomplete","one-time-code","autocapitalize","none","inputmode","numeric","pattern","[0-9]*",1,"form-control",3,"formControl"],["type","button","data-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"]],template:function(a,n){a&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),p(3),s(4,"translate"),l(),i(5,"button",3),s(6,"translate"),_("click",function(){return n.$activeModal.dismiss("Dismiss")}),i(7,"span",4),p(8,"\xD7"),l()()(),i(9,"div",5),B(10,we,7,9,"div",6),i(11,"ngb-alert",7),p(12),s(13,"translate"),l(),B(14,ge,4,3,"div"),i(15,"div",8),m(16,"app-qrcode",9),l(),B(17,ye,6,4,"div",10),l(),i(18,"div",11)(19,"div",12)(20,"button",13),s(21,"translate"),_("click",function(){return n.$activeModal.dismiss("Dismiss")}),p(22),s(23,"translate"),l()(),m(24,"div",6),i(25,"div",14),B(26,Se,3,4,"button",15),l()()()),a&2&&(e(3),v(o(4,11,"users.setup_2fa")),e(2),f("aria-label",o(6,13,"form.button_close")),e(5),g(n.timeDiffError?10:-1),e(),u("dismissible",!1),e(),c(" ",o(13,15,"users.setup_2fa_warning")," "),e(2),g(n.timeDiffError?-1:14),e(2),u("data",n.otpString),e(),g(n.timeDiffError?-1:17),e(3),f("aria-label",o(21,17,"form.button_close")),e(2),c(" ",o(23,19,"form.button_close")," "),e(4),g(n.timeDiffError?-1:26))},dependencies:[re,se,I,T,D,ne,M,Q,E],encapsulation:2})}return r})();var me=r=>({active:r}),de=r=>({"is-invalid":r}),ce=(()=>{class r{$activeModal=d(A);$api=d(S);$toastr=d(U);$translate=d($);form=new F({username:new x("",[C.required]),name:new x("",[C.required]),password:new x("",[C.compose([C.required,C.minLength(4)])]),passwordConfirm:new x("",[C.required]),admin:new x(!0)},this.matchPassword);page={title:"users.title_add_user",save:"users.button_add_new_user",password:"users.label_password"};matchPassword(t){let a=t.get("password").value,n=t.get("passwordConfirm").value;if(a!==n)t.get("passwordConfirm").setErrors({matchPassword:!0});else return null}onSubmit({value:t}){this.$api.post("/users",t).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.toast_added_new_user"),this.$translate.instant("toast.title_success"))},error:a=>{this.$toastr.error(a.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(a){return new(a||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],decls:59,vars:57,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[1,"modal-header"],[1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"container","px-1"],[1,"md-form"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none",1,"form-control","px-0"],["for","form-username",3,"ngClass"],[1,"fas","fa-fw","fa-user-shield"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","px-0"],["for","form-name",3,"ngClass"],[1,"fas","fa-fw","fa-user"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","px-0",3,"ngClass"],["for","form-pass"],[1,"fas","fa-fw","fa-lock"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","px-0",3,"ngClass"],["for","form-pass-confirm"],[1,"form-group","row","align-items-center"],[1,"col-6","col-form-label","grey-text"],[1,"fas","fa-fw","fa-user-secret"],[1,"col-6","text-right"],["type","checkbox","formControlName","admin","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ml-3",2,"min-width","50px"],[1,"modal-footer","justify-content-between"],[1,"text-left"],["type","button","data-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-right"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(a,n){a&1&&(i(0,"div",0)(1,"form",1),_("ngSubmit",function(){return n.onSubmit(n.form)}),i(2,"div",2)(3,"h5",3),p(4),s(5,"translate"),l(),i(6,"button",4),s(7,"translate"),_("click",function(){return n.$activeModal.dismiss("Dismiss")}),i(8,"span",5),p(9,"\xD7"),l()()(),i(10,"div",6)(11,"div",7)(12,"div",8),m(13,"input",9),s(14,"translate"),i(15,"label",10),m(16,"i",11),p(17),s(18,"translate"),l()(),i(19,"div",8),m(20,"input",12),s(21,"translate"),i(22,"label",13),m(23,"i",14),p(24),s(25,"translate"),l()(),i(26,"div",8),m(27,"input",15),s(28,"translate"),i(29,"label",16),m(30,"i",17),p(31),s(32,"translate"),l()(),i(33,"div",8),m(34,"input",18),s(35,"translate"),i(36,"label",19),m(37,"i",17),p(38),s(39,"translate"),l()(),i(40,"div",20)(41,"label",21),m(42,"i",22),p(43),s(44,"translate"),l(),i(45,"div",23),m(46,"input",24),s(47,"translate"),m(48,"label",25),l()()()(),i(49,"div",26)(50,"div",27)(51,"button",28),_("click",function(){return n.$activeModal.dismiss("Dismiss")}),p(52),s(53,"translate"),l()(),m(54,"div",29),i(55,"div",30)(56,"button",31),p(57),s(58,"translate"),l()()()()()),a&2&&(e(),u("formGroup",n.form),e(3),v(o(5,21,"users.title_add_user")),e(2),f("aria-label",o(7,23,"form.button_close")),e(7),f("disabled",n.page.title==="users.title_edit_user"?!0:null)("aria-label",o(14,25,"users.label_username")),e(2),u("ngClass",w(49,me,n.page.title==="users.title_edit_user")),e(2),c(" ",o(18,27,"users.label_username")," "),e(3),f("aria-label",o(21,29,"users.label_full_name")),e(2),u("ngClass",w(51,me,n.page.title==="users.title_edit_user")),e(2),c(" ",o(25,31,"users.label_full_name")," "),e(3),u("ngClass",w(53,de,n.form.controls.password.dirty&&n.form.controls.password.errors)),f("aria-label",o(28,33,n.page.password)),e(4),c(" ",o(32,35,n.page.password)," "),e(3),u("ngClass",w(55,de,n.form.controls.passwordConfirm.dirty&&n.form.controls.passwordConfirm.errors)),f("aria-label",o(35,37,"users.label_confirm_password")),e(4),c(" ",o(39,39,"users.label_confirm_password")," "),e(5),c(" ",o(44,41,"users.label_admin_user")," "),e(3),f("aria-label",o(47,43,"users.label_admin_user")),e(6),c(" ",o(53,45,"form.button_close")," "),e(4),u("disabled",!n.form.valid),e(),c(" ",o(58,47,"form.button_save")," "))},dependencies:[I,R,T,P,D,z,M,L,O,q,E],encapsulation:2})}return r})();var ue=r=>({active:r}),fe=r=>({"is-invalid":r}),_e=(()=>{class r{$activeModal=d(A);$api=d(S);$auth=d(j);$toastr=d(U);$translate=d($);user;form=new F({username:new x("",[C.required]),name:new x("",[C.required]),password:new x(""),passwordConfirm:new x(""),admin:new x(!0)},this.matchPassword);page={title:"users.title_edit_user",save:"form.button_save",password:"users.label_new_password"};isCurrentUser=!1;ngOnInit(){this.isCurrentUser=this.$auth.user.username===this.user.username,this.form.patchValue(this.user)}matchPassword(t){let a=t.get("password").value,n=t.get("passwordConfirm").value;if(a!==n)t.get("passwordConfirm").setErrors({matchPassword:!0});else return null}onSubmit({value:t}){this.$api.patch(`/users/${this.user.id}`,t).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.toast_updated_user"),this.$translate.instant("toast.title_success")),this.isCurrentUser&&t.username!==this.$auth.user.username&&this.$auth.logout()},error:a=>{console.error(a),this.$toastr.error(a.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(a){return new(a||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],inputs:{user:"user"},decls:59,vars:56,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[1,"modal-header"],[1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"container","px-1"],[1,"md-form"],["formControlName","username","type","text","id","form-username","autocomplete","off","autocapitalize","none",1,"form-control","px-0"],["for","form-username",3,"ngClass"],[1,"fas","fa-fw","fa-user-shield"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","px-0"],["for","form-name",3,"ngClass"],[1,"fas","fa-fw","fa-user"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","px-0",3,"ngClass"],["for","form-pass"],[1,"fas","fa-fw","fa-lock"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","px-0",3,"ngClass"],["for","form-pass-confirm"],[1,"form-group","row","align-items-center"],[1,"col-6","col-form-label","grey-text"],[1,"fas","fa-fw","fa-user-secret"],[1,"col-6","text-right"],["type","checkbox","formControlName","admin","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ml-3",2,"min-width","50px"],[1,"modal-footer","justify-content-between"],[1,"text-left"],["type","button","data-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-right"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(a,n){a&1&&(i(0,"div",0)(1,"form",1),_("ngSubmit",function(){return n.onSubmit(n.form)}),i(2,"div",2)(3,"h5",3),p(4),s(5,"translate"),l(),i(6,"button",4),s(7,"translate"),_("click",function(){return n.$activeModal.dismiss("Dismiss")}),i(8,"span",5),p(9,"\xD7"),l()()(),i(10,"div",6)(11,"div",7)(12,"div",8),m(13,"input",9),s(14,"translate"),i(15,"label",10),m(16,"i",11),p(17),s(18,"translate"),l()(),i(19,"div",8),m(20,"input",12),s(21,"translate"),i(22,"label",13),m(23,"i",14),p(24),s(25,"translate"),l()(),i(26,"div",8),m(27,"input",15),s(28,"translate"),i(29,"label",16),m(30,"i",17),p(31),s(32,"translate"),l()(),i(33,"div",8),m(34,"input",18),s(35,"translate"),i(36,"label",19),m(37,"i",17),p(38),s(39,"translate"),l()(),i(40,"div",20)(41,"label",21),m(42,"i",22),p(43),s(44,"translate"),l(),i(45,"div",23),m(46,"input",24),s(47,"translate"),m(48,"label",25),l()()()(),i(49,"div",26)(50,"div",27)(51,"button",28),_("click",function(){return n.$activeModal.dismiss("Dismiss")}),p(52),s(53,"translate"),l()(),m(54,"div",29),i(55,"div",30)(56,"button",31),p(57),s(58,"translate"),l()()()()()),a&2&&(e(),u("formGroup",n.form),e(3),v(o(5,20,"users.title_edit_user")),e(2),f("aria-label",o(7,22,"form.button_close")),e(7),f("aria-label",o(14,24,"users.label_username")),e(2),u("ngClass",w(48,ue,n.page.title==="users.title_edit_user")),e(2),c(" ",o(18,26,"users.label_username")," "),e(3),f("aria-label",o(21,28,"users.label_full_name")),e(2),u("ngClass",w(50,ue,n.page.title==="users.title_edit_user")),e(2),c(" ",o(25,30,"users.label_full_name")," "),e(3),u("ngClass",w(52,fe,n.form.controls.password.dirty&&n.form.controls.password.errors)),f("aria-label",o(28,32,n.page.password)),e(4),c(" ",o(32,34,n.page.password)," "),e(3),u("ngClass",w(54,fe,n.form.controls.passwordConfirm.dirty&&n.form.controls.passwordConfirm.errors)),f("aria-label",o(35,36,"users.label_confirm_password")),e(4),c(" ",o(39,38,"users.label_confirm_password")," "),e(5),c(" ",o(44,40,"users.label_admin_user")," "),e(3),f("aria-label",o(47,42,"users.label_admin_user")),e(6),c(" ",o(53,44,"form.button_close")," "),e(4),u("disabled",!n.form.valid),e(),c(" ",o(58,46,"form.button_save")," "))},dependencies:[I,R,T,P,D,z,M,L,O,q,E],encapsulation:2})}return r})();function $e(r,k){if(r&1){let t=G();i(0,"button",19),_("click",function(){N(t);let n=h().$implicit,b=h();return V(b.deleteUser(n.id))}),p(1),s(2,"translate"),l()}r&2&&(e(),c(" ",o(2,1,"form.button_delete")," "))}function Ee(r,k){if(r&1){let t=G();i(0,"button",20),_("click",function(){N(t);let n=h().$implicit,b=h();return V(b.setup2fa(n))}),p(1),s(2,"translate"),l()}r&2&&(e(),v(o(2,1,"users.setup_2fa")))}function Ue(r,k){if(r&1){let t=G();i(0,"button",18),_("click",function(){N(t);let n=h().$implicit,b=h();return V(b.disable2fa(n))}),p(1),s(2,"translate"),l()}r&2&&(e(),c(" ",o(2,1,"users.setup_2fa_disable")," "))}function ke(r,k){if(r&1){let t=G();i(0,"div",7)(1,"div",8)(2,"div",9)(3,"div",10)(4,"span",11),m(5,"h4",12)(6,"h5",13),l()(),i(7,"div",14),B(8,$e,3,3,"button",15)(9,Ee,3,3,"button",16)(10,Ue,3,3,"button",17),i(11,"button",18),_("click",function(){let n=N(t).$implicit,b=h();return V(b.openEditUser(n))}),p(12),s(13,"translate"),l()()()()()}if(r&2){let t=k.$implicit,a=h();e(5),u("innerText",t.name),e(),u("innerText",t.username),e(2),g(a.$auth.user.username!==t.username?8:-1),e(),g(a.$auth.user.username===t.username&&!t.otpActive?9:-1),e(),g(a.$auth.user.username===t.username&&t.otpActive?10:-1),e(2),v(o(13,6,"form.button_edit"))}}var $t=(()=>{class r{$api=d(S);$auth=d(j);$modal=d(ae);$route=d(ie);$toastr=d(U);$translate=d($);homebridgeUsers;ngOnInit(){this.$route.data.subscribe(t=>{this.homebridgeUsers=t.homebridgeUsers})}reloadUsers(){return this.$api.get("/users").subscribe(t=>{this.homebridgeUsers=t})}openAddNewUser(){this.$modal.open(ce,{size:"lg",backdrop:"static"}).result.finally(()=>{this.reloadUsers()})}openEditUser(t){let a=this.$modal.open(_e,{size:"lg",backdrop:"static"});a.componentInstance.user=t,a.result.finally(()=>{this.reloadUsers()})}deleteUser(t){this.$api.delete(`/users/${t}`).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("users.toast_user_deleted"),this.$translate.instant("toast.title_success")),this.reloadUsers()},error:a=>{console.error(a),this.$toastr.error(a.error.message||this.$translate.instant("users.toast_failed_to_delete_user"),this.$translate.instant("toast.title_error"))}})}setup2fa(t){let a=this.$modal.open(pe,{size:"lg",backdrop:"static"});a.componentInstance.user=t,a.result.finally(()=>{this.reloadUsers()})}disable2fa(t){let a=this.$modal.open(oe,{size:"lg",backdrop:"static"});a.componentInstance.user=t,a.result.finally(()=>{this.reloadUsers()})}static \u0275fac=function(a){return new(a||r)};static \u0275cmp=y({type:r,selectors:[["app-users"]],decls:12,vars:6,consts:[[1,"row","mb-3"],[1,"col-9"],[1,"primary-text","m-0"],[1,"col-3","text-right"],[1,"btn","btn-elegant","waves-effect","m-0",3,"click"],[1,"fas","fa-fw","fa-plus"],[1,"row"],[1,"col-md-6","mb-4"],[1,"card","card-body"],[1,"d-flex","flex-column"],[1,"d-flex","flex-row","mb-3"],[1,"me-auto","my-0"],[3,"innerText"],[1,"small","text-truncate","primary-text",3,"innerText"],[1,"d-flex","flex-row","justify-content-between",2,"gap","10px"],[1,"btn","btn-elegant","btn-sml","m-0"],[1,"btn","btn-primary","mt-0","m-0"],[1,"btn","btn-primary","m-0"],[1,"btn","btn-primary","m-0",3,"click"],[1,"btn","btn-elegant","btn-sml","m-0",3,"click"],[1,"btn","btn-primary","mt-0","m-0",3,"click"]],template:function(a,n){a&1&&(i(0,"div",0)(1,"div",1)(2,"h3",2),p(3),s(4,"translate"),l()(),i(5,"div",3)(6,"button",4),s(7,"translate"),_("click",function(){return n.openAddNewUser()}),m(8,"i",5),l()()(),i(9,"div",6),X(10,ke,14,8,"div",7,W),l()),a&2&&(e(3),v(o(4,2,"users.title_users")),e(3),f("aria-label",o(7,4,"users.button_add_user")),e(4),Y(n.homebridgeUsers))},dependencies:[E],encapsulation:2})}return r})();export{oe as a,pe as b,ce as c,_e as d,$t as e};
@@ -1 +0,0 @@
1
- import{f as a}from"./chunk-HGKURYNB.js";import"./chunk-75MRNSXS.js";import"./chunk-4XUM4AAX.js";import"./chunk-HBGENGOA.js";import"./chunk-44XAYR34.js";import"./chunk-RUC7TPCB.js";import"./chunk-PFCIYPDO.js";import"./chunk-MMPQXC6H.js";import"./chunk-6MDI4RNQ.js";import"./chunk-2JYMQLNI.js";import"./chunk-T6FYP7FJ.js";import"./chunk-P5WCYSBI.js";import"./chunk-F4QKTMKG.js";import"./chunk-OZTQT47N.js";import"./chunk-CK234OHO.js";import"./chunk-BZVO3JIQ.js";import"./chunk-EFBNPDVN.js";import"./chunk-F5SS6TN7.js";import"./chunk-Z4CHNCHA.js";import"./chunk-LY2KRV55.js";import"./chunk-HMOW3VNR.js";import"./chunk-3VDXR5B2.js";import"./chunk-4J45MC2M.js";import"./chunk-OAKLLAD6.js";import"./chunk-QHHRJOCD.js";import"./chunk-H3E4T6KH.js";import"./chunk-KDJPDALB.js";export{a as StatusComponent};
@@ -1 +0,0 @@
1
- import{Aa as y,B as V,C as F,D as q,Fa as f,Hc as Z,L as J,O as C,Z as P,a as _,aa as R,ha as h,ia as X,jb as M,ka as v,ma as o,r as L,t as c,vb as z,x as I,xb as W}from"./chunk-KDJPDALB.js";var d=class{},Q=(()=>{class n extends d{getTranslation(e){return L({})}static \u0275fac=(()=>{let e;return function(s){return(e||(e=y(n)))(s||n)}})();static \u0275prov=h({token:n,factory:n.\u0275fac})}return n})(),m=class{},Y=(()=>{class n{handle(e){return e.key}static \u0275fac=function(t){return new(t||n)};static \u0275prov=h({token:n,factory:n.\u0275fac})}return n})();function E(n,r){if(n===r)return!0;if(n===null||r===null)return!1;if(n!==n&&r!==r)return!0;let e=typeof n,t=typeof r,s,i,a;if(e==t&&e=="object")if(Array.isArray(n)){if(!Array.isArray(r))return!1;if((s=n.length)==r.length){for(i=0;i<s;i++)if(!E(n[i],r[i]))return!1;return!0}}else{if(Array.isArray(r))return!1;a=Object.create(null);for(i in n){if(!E(n[i],r[i]))return!1;a[i]=!0}for(i in r)if(!(i in a)&&typeof r[i]<"u")return!1;return!0}return!1}function u(n){return typeof n<"u"&&n!==null}function D(n){return S(n)&&!H(n)}function S(n){return typeof n=="object"}function H(n){return Array.isArray(n)}function $(n){return typeof n=="string"}function ne(n){return typeof n=="function"}function N(n,r){let e=Object.assign({},n);return S(n)?(S(n)&&S(r)&&Object.keys(r).forEach(t=>{D(r[t])?t in n?e[t]=N(n[t],r[t]):Object.assign(e,{[t]:r[t]}):Object.assign(e,{[t]:r[t]})}),e):N({},r)}function K(n,r){let e=r.split(".");r="";do r+=e.shift(),u(n)&&u(n[r])&&(D(n[r])||H(n[r])||!e.length)?(n=n[r],r=""):e.length?r+=".":n=void 0;while(e.length);return n}function se(n,r,e){let t=r.split("."),s=n;for(let i=0;i<t.length;i++){let a=t[i];i===t.length-1?s[a]=e:((!s[a]||!D(s[a]))&&(s[a]={}),s=s[a])}}var g=class{},k=(()=>{class n extends g{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(e,t){if($(e))return this.interpolateString(e,t);if(ne(e))return this.interpolateFunction(e,t)}interpolateFunction(e,t){return e(t)}interpolateString(e,t){return t?e.replace(this.templateMatcher,(s,i)=>{let a=K(t,i);return u(a)?a:s}):e}static \u0275fac=(()=>{let e;return function(s){return(e||(e=y(n)))(s||n)}})();static \u0275prov=h({token:n,factory:n.\u0275fac})}return n})(),p=class{},ee=(()=>{class n extends p{compile(e,t){return e}compileTranslations(e,t){return e}static \u0275fac=(()=>{let e;return function(s){return(e||(e=y(n)))(s||n)}})();static \u0275prov=h({token:n,factory:n.\u0275fac})}return n})(),j=class{defaultLang;currentLang=this.defaultLang;translations={};langs=[];onTranslationChange=new f;onLangChange=new f;onDefaultLangChange=new f},x=new v("ISOALTE_TRANSLATE_SERVICE"),O=new v("USE_DEFAULT_LANG"),U=new v("DEFAULT_LANGUAGE"),B=new v("USE_EXTEND"),b=n=>c(n)?n:L(n),G=(()=>{class n{store;currentLoader;compiler;parser;missingTranslationHandler;useDefaultLang;isolate;extend;loadingTranslations;pending=!1;_onTranslationChange=new f;_onLangChange=new f;_onDefaultLangChange=new f;_defaultLang;_currentLang;_langs=[];_translations={};_translationRequests={};lastUseLanguage=null;get onTranslationChange(){return this.isolate?this._onTranslationChange:this.store.onTranslationChange}get onLangChange(){return this.isolate?this._onLangChange:this.store.onLangChange}get onDefaultLangChange(){return this.isolate?this._onDefaultLangChange:this.store.onDefaultLangChange}get defaultLang(){return this.isolate?this._defaultLang:this.store.defaultLang}set defaultLang(e){this.isolate?this._defaultLang=e:this.store.defaultLang=e}get currentLang(){return this.isolate?this._currentLang:this.store.currentLang}set currentLang(e){this.isolate?this._currentLang=e:this.store.currentLang=e}get langs(){return this.isolate?this._langs:this.store.langs}set langs(e){this.isolate?this._langs=e:this.store.langs=e}get translations(){return this.isolate?this._translations:this.store.translations}set translations(e){this.isolate?this._translations=e:this.store.translations=e}constructor(e,t,s,i,a,A=!0,l=!1,T=!1,w){this.store=e,this.currentLoader=t,this.compiler=s,this.parser=i,this.missingTranslationHandler=a,this.useDefaultLang=A,this.isolate=l,this.extend=T,w&&this.setDefaultLang(w)}setDefaultLang(e){if(e===this.defaultLang)return;let t=this.retrieveTranslations(e);typeof t<"u"?(this.defaultLang==null&&(this.defaultLang=e),t.pipe(C(1)).subscribe(()=>{this.changeDefaultLang(e)})):this.changeDefaultLang(e)}getDefaultLang(){return this.defaultLang}use(e){if(this.lastUseLanguage=e,e===this.currentLang)return L(this.translations[e]);this.currentLang||(this.currentLang=e);let t=this.retrieveTranslations(e);return c(t)?(t.pipe(C(1)).subscribe(()=>{this.changeLang(e)}),t):(this.changeLang(e),L(this.translations[e]))}changeLang(e){e===this.lastUseLanguage&&(this.currentLang=e,this.onLangChange.emit({lang:e,translations:this.translations[e]}),this.defaultLang==null&&this.changeDefaultLang(e))}retrieveTranslations(e){if(typeof this.translations[e]>"u"||this.extend)return this._translationRequests[e]=this._translationRequests[e]||this.loadAndCompileTranslations(e),this._translationRequests[e]}getTranslation(e){return this.loadAndCompileTranslations(e)}loadAndCompileTranslations(e){this.pending=!0;let t=this.currentLoader.getTranslation(e).pipe(P(1),C(1));return this.loadingTranslations=t.pipe(I(s=>this.compiler.compileTranslations(s,e)),P(1),C(1)),this.loadingTranslations.subscribe({next:s=>{this.translations[e]=this.extend&&this.translations[e]?_(_({},s),this.translations[e]):s,this.updateLangs(),this.pending=!1},error:s=>{this.pending=!1}}),t}setTranslation(e,t,s=!1){let i=this.compiler.compileTranslations(t,e);(s||this.extend)&&this.translations[e]?this.translations[e]=N(this.translations[e],i):this.translations[e]=i,this.updateLangs(),this.onTranslationChange.emit({lang:e,translations:this.translations[e]})}getLangs(){return this.langs}addLangs(e){e.forEach(t=>{this.langs.indexOf(t)===-1&&this.langs.push(t)})}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResultForKey(e,t,s){let i;if(e&&(i=this.runInterpolation(K(e,t),s)),i===void 0&&this.defaultLang!=null&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(i=this.runInterpolation(K(this.translations[this.defaultLang],t),s)),i===void 0){let a={key:t,translateService:this};typeof s<"u"&&(a.interpolateParams=s),i=this.missingTranslationHandler.handle(a)}return i!==void 0?i:t}runInterpolation(e,t){if(H(e))return e.map(s=>this.runInterpolation(s,t));if(D(e)){let s={};for(let i in e)s[i]=this.runInterpolation(e[i],t);return s}else return this.parser.interpolate(e,t)}getParsedResult(e,t,s){if(t instanceof Array){let i={},a=!1;for(let l of t)i[l]=this.getParsedResultForKey(e,l,s),a=a||c(i[l]);if(!a)return i;let A=t.map(l=>b(i[l]));return q(A).pipe(I(l=>{let T={};return l.forEach((w,te)=>{T[t[te]]=w}),T}))}return this.getParsedResultForKey(e,t,s)}get(e,t){if(!u(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return this.pending?this.loadingTranslations.pipe(J(s=>b(this.getParsedResult(s,e,t)))):b(this.getParsedResult(this.translations[this.currentLang],e,t))}getStreamOnTranslationChange(e,t){if(!u(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return V(F(()=>this.get(e,t)),this.onTranslationChange.pipe(R(s=>{let i=this.getParsedResult(s.translations,e,t);return b(i)})))}stream(e,t){if(!u(e)||!e.length)throw new Error('Parameter "key" required');return V(F(()=>this.get(e,t)),this.onLangChange.pipe(R(s=>{let i=this.getParsedResult(s.translations,e,t);return b(i)})))}instant(e,t){if(!u(e)||e.length===0)throw new Error('Parameter "key" is required and cannot be empty');let s=this.getParsedResult(this.translations[this.currentLang],e,t);return c(s)?Array.isArray(e)?e.reduce((i,a)=>(i[a]=a,i),{}):e:s}set(e,t,s=this.currentLang){se(this.translations[s],e,$(t)?this.compiler.compile(t,s):this.compiler.compileTranslations(t,s)),this.updateLangs(),this.onTranslationChange.emit({lang:s,translations:this.translations[s]})}changeDefaultLang(e){this.defaultLang=e,this.onDefaultLangChange.emit({lang:e,translations:this.translations[e]})}reloadLang(e){return this.resetLang(e),this.loadAndCompileTranslations(e)}resetLang(e){delete this._translationRequests[e],delete this.translations[e]}getBrowserLang(){if(typeof window>"u"||!window.navigator)return;let e=this.getBrowserCultureLang();return e?e.split(/[-_]/)[0]:void 0}getBrowserCultureLang(){if(!(typeof window>"u"||typeof window.navigator>"u"))return window.navigator.languages?window.navigator.languages[0]:window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage}static \u0275fac=function(t){return new(t||n)(o(j),o(d),o(p),o(g),o(m),o(O),o(x),o(B),o(U))};static \u0275prov=h({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Ce=(()=>{class n{translate;_ref;value="";lastKey=null;lastParams=[];onTranslationChange;onLangChange;onDefaultLangChange;constructor(e,t){this.translate=e,this._ref=t}updateValue(e,t,s){let i=a=>{this.value=a!==void 0?a:e,this.lastKey=e,this._ref.markForCheck()};if(s){let a=this.translate.getParsedResult(s,e,t);c(a)?a.subscribe(i):i(a)}this.translate.get(e,t).subscribe(i)}transform(e,...t){if(!e||!e.length)return e;if(E(e,this.lastKey)&&E(t,this.lastParams))return this.value;let s;if(u(t[0])&&t.length)if($(t[0])&&t[0].length){let i=t[0].replace(/(')?([a-zA-Z0-9_]+)(')?(\s)?:/g,'"$2":').replace(/:(\s)?(')(.*?)(')/g,':"$3"');try{s=JSON.parse(i)}catch(a){throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${t[0]}`)}}else D(t[0])&&(s=t[0]);return this.lastKey=e,this.lastParams=t,this.updateValue(e,s),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(i=>{this.lastKey&&i.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(e,s,i.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(i=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,s,i.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,s))})),this.value}_dispose(){typeof this.onTranslationChange<"u"&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),typeof this.onLangChange<"u"&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),typeof this.onDefaultLangChange<"u"&&(this.onDefaultLangChange.unsubscribe(),this.onDefaultLangChange=void 0)}ngOnDestroy(){this._dispose()}static \u0275fac=function(t){return new(t||n)(M(G,16),M(Z,16))};static \u0275pipe=W({name:"translate",type:n,pure:!1});static \u0275prov=h({token:n,factory:n.\u0275fac})}return n})();var ve=(()=>{class n{static forRoot(e={}){return{ngModule:n,providers:[e.loader||{provide:d,useClass:Q},e.compiler||{provide:p,useClass:ee},e.parser||{provide:g,useClass:k},e.missingTranslationHandler||{provide:m,useClass:Y},j,{provide:x,useValue:e.isolate},{provide:O,useValue:e.useDefaultLang},{provide:B,useValue:e.extend},{provide:U,useValue:e.defaultLanguage},G]}}static forChild(e={}){return{ngModule:n,providers:[e.loader||{provide:d,useClass:Q},e.compiler||{provide:p,useClass:ee},e.parser||{provide:g,useClass:k},e.missingTranslationHandler||{provide:m,useClass:Y},{provide:x,useValue:e.isolate},{provide:O,useValue:e.useDefaultLang},{provide:B,useValue:e.extend},{provide:U,useValue:e.defaultLanguage},G]}}static \u0275fac=function(t){return new(t||n)};static \u0275mod=z({type:n});static \u0275inj=X({})}return n})();export{G as a,Ce as b,ve as c};
@@ -1 +0,0 @@
1
- import{a}from"./chunk-XIOY5AEA.js";import"./chunk-NIGZKKLM.js";import"./chunk-44XAYR34.js";import"./chunk-RUC7TPCB.js";import"./chunk-PFCIYPDO.js";import"./chunk-MMPQXC6H.js";import"./chunk-6MDI4RNQ.js";import"./chunk-2JYMQLNI.js";import"./chunk-T6FYP7FJ.js";import"./chunk-P5WCYSBI.js";import"./chunk-F4QKTMKG.js";import"./chunk-OZTQT47N.js";import"./chunk-CK234OHO.js";import"./chunk-BZVO3JIQ.js";import"./chunk-EFBNPDVN.js";import"./chunk-F5SS6TN7.js";import"./chunk-Z4CHNCHA.js";import"./chunk-LY2KRV55.js";import"./chunk-HMOW3VNR.js";import"./chunk-3VDXR5B2.js";import"./chunk-4J45MC2M.js";import"./chunk-OAKLLAD6.js";import"./chunk-QHHRJOCD.js";import"./chunk-H3E4T6KH.js";import"./chunk-KDJPDALB.js";export{a as PluginsComponent};
@@ -1 +0,0 @@
1
- import{a}from"./chunk-RSUIRNXB.js";import"./chunk-LY2KRV55.js";import"./chunk-HMOW3VNR.js";import"./chunk-3VDXR5B2.js";import"./chunk-4J45MC2M.js";import"./chunk-OAKLLAD6.js";import"./chunk-QHHRJOCD.js";import"./chunk-H3E4T6KH.js";import"./chunk-KDJPDALB.js";export{a as RestartLinuxComponent};