homebridge-config-ui-x 5.0.0-beta.54 → 5.0.0-beta.55

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 (136) hide show
  1. package/CHANGELOG.md +4 -1
  2. package/dist/bin/platforms/darwin.js +2 -2
  3. package/dist/bin/platforms/darwin.js.map +1 -1
  4. package/dist/modules/accessories/accessories.service.js +6 -6
  5. package/dist/modules/accessories/accessories.service.js.map +1 -1
  6. package/dist/modules/backup/backup.service.d.ts +1 -0
  7. package/dist/modules/backup/backup.service.js +40 -12
  8. package/dist/modules/backup/backup.service.js.map +1 -1
  9. package/dist/modules/config-editor/config-editor.service.js +56 -58
  10. package/dist/modules/config-editor/config-editor.service.js.map +1 -1
  11. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.d.ts +1 -1
  12. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js +6 -6
  13. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js.map +1 -1
  14. package/dist/modules/plugins/plugins.service.js +6 -0
  15. package/dist/modules/plugins/plugins.service.js.map +1 -1
  16. package/dist/modules/server/server.service.js +26 -6
  17. package/dist/modules/server/server.service.js.map +1 -1
  18. package/package.json +9 -9
  19. package/public/assets/hap-icons/co-sensor.svg +72 -0
  20. package/public/assets/hap-icons/co2-sensor.svg +72 -0
  21. package/public/{chunk-TWFE7WAV.js → chunk-3LVJVXOR.js} +1 -1
  22. package/public/{chunk-F2WFV5GW.js → chunk-3NYGPFUX.js} +1 -1
  23. package/public/chunk-3Q7XB2WT.js +1 -0
  24. package/public/{chunk-L4PJSJOC.js → chunk-4DC564T2.js} +1 -1
  25. package/public/chunk-4OGTUIG4.js +1 -0
  26. package/public/{chunk-M5LTG544.js → chunk-54KHHHVC.js} +1 -1
  27. package/public/{chunk-BEBVDUK5.js → chunk-5C5HO7YG.js} +1 -1
  28. package/public/{chunk-XCZREHWX.js → chunk-5E6U5Y4F.js} +1 -1
  29. package/public/{chunk-P5BH5BCJ.js → chunk-5R5SNIWB.js} +1 -1
  30. package/public/{chunk-OKJ2T4EM.js → chunk-624CM2T3.js} +1 -1
  31. package/public/chunk-65WTJRTP.js +1 -0
  32. package/public/{chunk-3JTVYTOV.js → chunk-6QX3MMJP.js} +1 -1
  33. package/public/{chunk-YIYI7U2L.js → chunk-7JNBJKZO.js} +1 -1
  34. package/public/{chunk-IRTFX6CU.js → chunk-AHTFOOTM.js} +1 -1
  35. package/public/chunk-AK2OL7BC.js +1 -0
  36. package/public/chunk-ALEJ35FB.js +1 -0
  37. package/public/{chunk-JE3LI7IZ.js → chunk-AR7DMLNC.js} +1 -1
  38. package/public/{chunk-TQSZOE62.js → chunk-B75F7CUZ.js} +1 -1
  39. package/public/chunk-BY7R34BA.js +1 -0
  40. package/public/chunk-CNL3SMTK.js +1 -0
  41. package/public/{chunk-M5YMSV5J.js → chunk-CP2SJFWV.js} +1 -1
  42. package/public/{chunk-KIPITWHI.js → chunk-DBJHYM6V.js} +1 -1
  43. package/public/{chunk-NG3SOGCM.js → chunk-DCBQXYKE.js} +1 -1
  44. package/public/{chunk-NSDMDB7X.js → chunk-DCNG2M5F.js} +1 -1
  45. package/public/{chunk-AKQE7OWM.js → chunk-DKYXLNGS.js} +1 -1
  46. package/public/chunk-DNDUU6MV.js +1 -0
  47. package/public/{chunk-PVRKV6LM.js → chunk-E7KALXAM.js} +1 -1
  48. package/public/{chunk-NCJAIFQO.js → chunk-ESHZ74WN.js} +1 -1
  49. package/public/{chunk-UQFNUGQM.js → chunk-FA7ICRJL.js} +1 -1
  50. package/public/{chunk-W6CTMNAG.js → chunk-FMKGRMAH.js} +1 -1
  51. package/public/{chunk-GHPAEKNM.js → chunk-GG52KGAI.js} +1 -1
  52. package/public/{chunk-KLDACGOZ.js → chunk-HBSDY26I.js} +1 -1
  53. package/public/{chunk-D6PHTILW.js → chunk-HEL4RGNB.js} +1 -1
  54. package/public/chunk-HFC26QPP.js +1 -0
  55. package/public/{chunk-Q7NLVQF3.js → chunk-J3AMOH5Y.js} +1 -1
  56. package/public/chunk-JSWQJ6V6.js +1 -0
  57. package/public/chunk-JZGZ5SYW.js +1 -0
  58. package/public/{chunk-MJUBX7V2.js → chunk-KDJYMZFG.js} +1 -1
  59. package/public/{chunk-UXXGHFQU.js → chunk-LL54UFJE.js} +1 -1
  60. package/public/{chunk-X2NTV4U7.js → chunk-LLHKFCES.js} +1 -1
  61. package/public/chunk-M26MCENI.js +1 -0
  62. package/public/chunk-MW6DM2X7.js +1 -0
  63. package/public/{chunk-6MIOQ7Y5.js → chunk-MY2S4HAC.js} +1 -1
  64. package/public/{chunk-DFISUNQT.js → chunk-MY6CGMNC.js} +1 -1
  65. package/public/{chunk-5BZGZWPU.js → chunk-N3KVODFS.js} +1 -1
  66. package/public/{chunk-QGDGNYSY.js → chunk-NAEAPYF6.js} +1 -1
  67. package/public/chunk-NAGTO24L.js +1 -0
  68. package/public/chunk-NKUJNNAM.js +1 -0
  69. package/public/{chunk-5NJQH2A3.js → chunk-NXJPK6JI.js} +1 -1
  70. package/public/{chunk-W7CPCAPT.js → chunk-NZOTW24P.js} +1 -1
  71. package/public/{chunk-IEBQX6HS.js → chunk-OMGG43SK.js} +1 -1
  72. package/public/{chunk-LRGJFKOV.js → chunk-OYCLVTQL.js} +1 -1
  73. package/public/{chunk-LSEE5MJ5.js → chunk-OZCC7YKF.js} +1 -1
  74. package/public/chunk-PE233UAD.js +1 -0
  75. package/public/{chunk-HQDY2QYB.js → chunk-PTXWCPV7.js} +1 -1
  76. package/public/chunk-Q4G2TRSH.js +1 -0
  77. package/public/chunk-QHZFT356.js +1 -0
  78. package/public/{chunk-GDNT2HPK.js → chunk-QI6ARLTK.js} +1 -1
  79. package/public/chunk-QNWPOWRO.js +7 -0
  80. package/public/chunk-R2PBAQ35.js +1 -0
  81. package/public/{chunk-V233CDAY.js → chunk-RBZHYCMS.js} +1 -1
  82. package/public/chunk-RPGE3RJH.js +1 -0
  83. package/public/chunk-RSWIVWAL.js +1 -0
  84. package/public/{chunk-X7HV5PS7.js → chunk-S5NGU6NT.js} +1 -1
  85. package/public/chunk-SFHKXQSB.js +1 -0
  86. package/public/{chunk-RWT5SL6D.js → chunk-SJ3UWAAJ.js} +1 -1
  87. package/public/{chunk-7HGOM4YX.js → chunk-T2GRE36D.js} +1 -1
  88. package/public/{chunk-GZMSZZVX.js → chunk-TR4NZKA2.js} +1 -1
  89. package/public/chunk-TR7NPBZA.js +1 -0
  90. package/public/{chunk-MS2EQS6S.js → chunk-TVD6GFRS.js} +1 -1
  91. package/public/chunk-TZQXMRKN.js +1 -0
  92. package/public/chunk-V2DJBKJO.js +1 -0
  93. package/public/{chunk-KD5YLOUW.js → chunk-VAECS3ST.js} +2 -2
  94. package/public/chunk-VFRL2KBN.js +1 -0
  95. package/public/chunk-VK24YDWN.js +1 -0
  96. package/public/{chunk-KJCIKCUI.js → chunk-VWW5OXYB.js} +1 -1
  97. package/public/{chunk-WNBSA3C7.js → chunk-VYV2IVDF.js} +1 -1
  98. package/public/{chunk-D5WEMCFU.js → chunk-VZOSCXVJ.js} +1 -1
  99. package/public/chunk-WQ2LJPDD.js +1 -0
  100. package/public/{chunk-NBOGF5S7.js → chunk-WVBOP2LW.js} +1 -1
  101. package/public/{chunk-6GWRWBF2.js → chunk-XW7GWYFD.js} +1 -1
  102. package/public/{chunk-R2MEYLU6.js → chunk-YQSLQ3BS.js} +1 -1
  103. package/public/{chunk-QGC43YCF.js → chunk-ZAWXBC3X.js} +1 -1
  104. package/public/index.html +2 -2
  105. package/public/{main-WAIZFTFV.js → main-CBCOTPKJ.js} +1 -1
  106. package/public/{polyfills-IVGADV35.js → polyfills-QPBMDKSH.js} +2 -2
  107. package/public/{styles-GAKWEL7A.css → styles-EYD3YW3P.css} +1 -1
  108. package/public/chunk-2DTLVEZT.js +0 -1
  109. package/public/chunk-2FUKJXA2.js +0 -1
  110. package/public/chunk-3R46QOCE.js +0 -1
  111. package/public/chunk-3TOJYAHV.js +0 -1
  112. package/public/chunk-4IP5DDXE.js +0 -1
  113. package/public/chunk-5CDZD4QO.js +0 -1
  114. package/public/chunk-6MX25OCF.js +0 -1
  115. package/public/chunk-7EVWOJST.js +0 -1
  116. package/public/chunk-CEHKV4IM.js +0 -1
  117. package/public/chunk-HMDNUXTY.js +0 -1
  118. package/public/chunk-JGMDXNMZ.js +0 -1
  119. package/public/chunk-KAI32HWM.js +0 -1
  120. package/public/chunk-KPIML2SI.js +0 -1
  121. package/public/chunk-LTRMT3PM.js +0 -1
  122. package/public/chunk-MKXFRTHP.js +0 -1
  123. package/public/chunk-O7E5GSDU.js +0 -1
  124. package/public/chunk-OAUVJEII.js +0 -1
  125. package/public/chunk-OIAU3DDH.js +0 -1
  126. package/public/chunk-OZD3PKS7.js +0 -1
  127. package/public/chunk-PTKIJR4Y.js +0 -1
  128. package/public/chunk-QNQ6DXDY.js +0 -1
  129. package/public/chunk-R5HVCC65.js +0 -1
  130. package/public/chunk-SQV4HVMS.js +0 -1
  131. package/public/chunk-UIW5IZLL.js +0 -1
  132. package/public/chunk-V7KKBEKT.js +0 -7
  133. package/public/chunk-V7N6TZL2.js +0 -1
  134. package/public/chunk-W7IALUEC.js +0 -1
  135. package/public/chunk-YJ3F3IFM.js +0 -1
  136. package/public/chunk-ZSRQVLRE.js +0 -1
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-MY6CGMNC.js";import"./chunk-GG52KGAI.js";import"./chunk-ZAWXBC3X.js";import"./chunk-DCNG2M5F.js";import"./chunk-TVD6GFRS.js";import"./chunk-5E6U5Y4F.js";import"./chunk-LLHKFCES.js";import"./chunk-BY7R34BA.js";import"./chunk-NXJPK6JI.js";import"./chunk-KDJYMZFG.js";import"./chunk-ESHZ74WN.js";import"./chunk-VAECS3ST.js";import"./chunk-5R5SNIWB.js";import"./chunk-QNWPOWRO.js";export{a as SetupWizardComponent};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-VWW5OXYB.js";import"./chunk-OZCC7YKF.js";import"./chunk-54KHHHVC.js";import"./chunk-FMKGRMAH.js";import"./chunk-NZOTW24P.js";import"./chunk-TVD6GFRS.js";import"./chunk-5E6U5Y4F.js";import"./chunk-BY7R34BA.js";import"./chunk-KDJYMZFG.js";import"./chunk-ESHZ74WN.js";import"./chunk-VAECS3ST.js";import"./chunk-5R5SNIWB.js";import"./chunk-QNWPOWRO.js";export{a as ConfigEditorComponent};
@@ -1 +1 @@
1
- import{d as i}from"./chunk-5CDZD4QO.js";import{c as s}from"./chunk-5NJQH2A3.js";import{h as o}from"./chunk-NCJAIFQO.js";import{a}from"./chunk-P5BH5BCJ.js";import{ga as e,ma as r}from"./chunk-V7KKBEKT.js";var v=(()=>{class t{$auth=r(s);$router=r(i);$translate=r(a);$toastr=r(o);constructor(){}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
+ import{d as i}from"./chunk-BY7R34BA.js";import{c as s}from"./chunk-NXJPK6JI.js";import{h as o}from"./chunk-ESHZ74WN.js";import{a}from"./chunk-5R5SNIWB.js";import{ga as e,ma as r}from"./chunk-QNWPOWRO.js";var v=(()=>{class t{$auth=r(s);$router=r(i);$translate=r(a);$toastr=r(o);constructor(){}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};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-5C5HO7YG.js";import"./chunk-HBSDY26I.js";import"./chunk-DKYXLNGS.js";import"./chunk-DCNG2M5F.js";import"./chunk-LLHKFCES.js";import"./chunk-NXJPK6JI.js";import"./chunk-KDJYMZFG.js";import"./chunk-ESHZ74WN.js";import"./chunk-VAECS3ST.js";import"./chunk-5R5SNIWB.js";import"./chunk-QNWPOWRO.js";export{a as TerminalComponent};
@@ -1 +1 @@
1
- import{a as ne}from"./chunk-5BZGZWPU.js";import{g as O,m as G,n as te}from"./chunk-MS2EQS6S.js";import{b as Z,c as M,d as x,e as F,f as z,g as N,j as w,m as q,o as R,p as L,q as j,w as ee,y as V,z as A}from"./chunk-XCZREHWX.js";import{b as ie}from"./chunk-5CDZD4QO.js";import{c as Q}from"./chunk-5NJQH2A3.js";import{a as ce}from"./chunk-MJUBX7V2.js";import{h as U,k}from"./chunk-NCJAIFQO.js";import{a as S,b as $}from"./chunk-P5BH5BCJ.js";import{Ac as s,Bc as l,Cc as Y,Jb as u,Kb as f,Pb as g,Rb as K,Sb as W,Tb as X,Ub as i,Vb as n,Wb as p,Zc as P,_b as D,bc as b,cc as v,g as de,gb as e,ma as c,mc as m,nc as d,oc as C,tb as E,ua as B,va as T,wc as I,zb as h}from"./chunk-V7KKBEKT.js";function ue(r,y){r&1&&(i(0,"ngb-alert",13)(1,"p",20),m(2),s(3,"translate"),n()()),r&2&&(f("dismissible",!1),e(2),d(l(3,2,"login.invalid_password")))}var re=(()=>{class r{$activeModal=c(G);$api=c(k);$toastr=c(U);$translate=c(S);formGroup=new N({password:new w("",[x.required])});invalidCredentials=!1;constructor(){}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(o){return new(o||r)};static \u0275cmp=E({type:r,selectors:[["ng-component"]],decls:34,vars:27,consts:[[1,"modal-content",2,"min-height","300px"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-key","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","password","autocomplete","current-password",1,"form-control","custom-input",3,"formControl","placeholder"],["type","error",1,"mt-3","mb-0",3,"dismissible"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click","disabled"],[1,"mb-0"]],template:function(o,a){o&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),m(3),s(4,"translate"),n(),i(5,"button",3),s(6,"translate"),b("click",function(){return a.$activeModal.dismiss("Dismiss")}),n()(),i(7,"div",4)(8,"div",5),p(9,"i",6),n(),i(10,"ul",7)(11,"li"),m(12),s(13,"translate"),n()(),i(14,"ul",8)(15,"li",9)(16,"label",10),m(17),s(18,"translate"),n(),i(19,"div",11),p(20,"input",12),s(21,"translate"),n()()(),h(22,ue,4,4,"ngb-alert",13),n(),i(23,"div",14)(24,"div",15)(25,"button",16),s(26,"translate"),b("click",function(){return a.$activeModal.dismiss("Dismiss")}),m(27),s(28,"translate"),n()(),p(29,"div",17),i(30,"div",18)(31,"button",19),b("click",function(){return a.disable2fa()}),m(32),s(33,"translate"),n()()()()),o&2&&(e(3),d(l(4,11,"users.setup_2fa_disable")),e(2),u("aria-label",l(6,13,"form.button_close")),e(7),d(l(13,15,"users.setup_2fa_disable_current_password")),e(5),d(l(18,17,"users.label_password")),e(3),f("formControl",a.formGroup.controls.password)("placeholder",l(21,19,"users.label_password")),e(2),g(a.invalidCredentials&&!a.formGroup.controls.password.value?22:-1),e(3),u("aria-label",l(26,21,"form.button_close")),e(2),C(" ",l(28,23,"form.button_close")," "),e(4),f("disabled",a.formGroup.invalid),e(),C(" ",l(33,25,"form.button_disable")," "))},dependencies:[V,M,F,A,R,$,O],encapsulation:2})}return r})();var ae=de(ce(),1);var fe=r=>({timeDiffError:r});function be(r,y){r&1&&(i(0,"li"),m(1),s(2,"translate"),n()),r&2&&(e(),d(l(2,1,"users.setup_2fa_scan_qr_code")))}function _e(r,y){if(r&1&&(i(0,"ngb-alert",8)(1,"p",16),m(2),s(3,"translate"),n(),i(4,"p",17),m(5),s(6,"translate"),n()()),r&2){let t=v();f("dismissible",!1),e(2),d(l(3,3,"users.setup_2fa_cannot_setup_2fa")),e(3),d(Y(6,5,"users.setup_2fa_server_time_out",I(8,fe,t.timeDiffError)))}}function ve(r,y){if(r&1&&(i(0,"ul",9)(1,"li",18)(2,"div",19),p(3,"app-qrcode",20),n()(),i(4,"li",21)(5,"label",22),m(6),s(7,"translate"),n(),i(8,"div",23),p(9,"input",24),n()()()),r&2){let t=v();e(3),f("data",t.otpString),e(3),d(l(7,3,"users.setup_2fa_enter_code")),e(3),f("formControl",t.formGroup.controls.code)}}function xe(r,y){if(r&1){let t=D();i(0,"button",25),s(1,"translate"),b("click",function(){B(t);let a=v();return T(a.$activeModal.dismiss("Dismiss"))}),m(2),s(3,"translate"),n()}r&2&&(u("aria-label",l(1,2,"form.button_close")),e(2),C(" ",l(3,4,"form.button_close")," "))}function we(r,y){if(r&1){let t=D();i(0,"button",25),s(1,"translate"),b("click",function(){B(t);let a=v();return T(a.$activeModal.dismiss("Dismiss"))}),m(2),s(3,"translate"),n()}r&2&&(u("aria-label",l(1,2,"form.button_close")),e(2),C(" ",l(3,4,"form.button_close")," "))}function Ce(r,y){if(r&1){let t=D();i(0,"button",26),b("click",function(){B(t);let a=v();return T(a.enable2fa())}),m(1),s(2,"translate"),n()}if(r&2){let t=v();f("disabled",t.formGroup.invalid),e(),C(" ",l(2,2,"form.button_enable")," ")}}var oe=(()=>{class r{$activeModal=c(G);$api=c(k);$toastr=c(U);$translate=c(S);user;timeDiffError=null;otpString;formGroup=new N({code:new w("",[x.required,x.minLength(6),x.maxLength(6)])});constructor(){}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 o=(0,ae.default)(t).diff(new Date,"millisecond");o<-5e3||o>5e3?this.timeDiffError=o: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(o){return new(o||r)};static \u0275cmp=E({type:r,selectors:[["ng-component"]],inputs:{user:"user"},decls:24,vars:15,consts:[[1,"modal-content","setup2fa"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-key","primary-text",2,"font-size","75px"],[1,"mb-3"],["type","error",1,"mb-0",3,"dismissible"],[1,"list-group","list-group-box","mb-0"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"disabled"],[1,"fw-bold","mb-1"],[1,"mb-0"],[1,"list-group-item","text-center"],[1,"text-center","w-100","d-flex","justify-content-center"],[1,"mx-auto",2,"width","175px","height","175px",3,"data"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["formControlName","username","type","text","placeholder","eg. 123456","autocomplete","one-time-code","autocapitalize","none","inputmode","numeric","pattern","[0-9]*",1,"form-control","custom-input",3,"formControl"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"]],template:function(o,a){o&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),m(3),s(4,"translate"),n(),i(5,"button",3),s(6,"translate"),b("click",function(){return a.$activeModal.dismiss("Dismiss")}),n()(),i(7,"div",4)(8,"div",5),p(9,"i",6),n(),i(10,"ul",7)(11,"li"),m(12),s(13,"translate"),n(),h(14,be,3,3,"li"),n(),h(15,_e,7,10,"ngb-alert",8)(16,ve,10,5,"ul",9),n(),i(17,"div",10)(18,"div",11),h(19,xe,4,6,"button",12),n(),i(20,"div",13),h(21,we,4,6,"button",12),n(),i(22,"div",14),h(23,Ce,3,4,"button",15),n()()()),o&2&&(e(3),d(l(4,9,"users.setup_2fa")),e(2),u("aria-label",l(6,11,"form.button_close")),e(7),d(l(13,13,"users.setup_2fa_warning")),e(2),g(a.timeDiffError?-1:14),e(),g(a.timeDiffError?15:-1),e(),g(a.timeDiffError?-1:16),e(3),g(a.timeDiffError?-1:19),e(2),g(a.timeDiffError?21:-1),e(2),g(a.timeDiffError?-1:23))},dependencies:[O,ne,V,M,F,ee,A,R,j,$],encapsulation:2})}return r})();var se=r=>({"is-invalid":r}),le=(()=>{class r{$activeModal=c(G);$api=c(k);$toastr=c(U);$translate=c(S);form=new N({username:new w("",[x.required]),name:new w("",[x.required]),password:new w("",[x.compose([x.required,x.minLength(4)])]),passwordConfirm:new w("",[x.required]),admin:new w(!0)},this.matchPassword);page={title:"users.title_add_user",save:"users.button_add_new_user",password:"users.label_password"};constructor(){}matchPassword(t){let o=t.get("password").value,a=t.get("passwordConfirm").value;if(o!==a)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:o=>{this.$toastr.error(o.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=E({type:r,selectors:[["ng-component"]],decls:58,vars:50,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-user-plus","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-username",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none",1,"form-control","custom-input"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","custom-input"],["for","form-pass",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","custom-input",3,"ngClass"],["for","form-pass-confirm",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","custom-input",3,"ngClass"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"text-end","grey-text"],["type","checkbox","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ms-3"],[1,"modal-footer","justify-content-between"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(o,a){o&1&&(i(0,"div",0)(1,"form",1),b("ngSubmit",function(){return a.onSubmit(a.form)}),i(2,"div",2)(3,"h5",3),m(4),s(5,"translate"),n(),i(6,"button",4),s(7,"translate"),b("click",function(){return a.$activeModal.dismiss("Dismiss")}),n()(),i(8,"div",5)(9,"div",6),p(10,"i",7),n(),i(11,"ul",8)(12,"li",9)(13,"label",10),m(14),s(15,"translate"),n(),i(16,"div",11),p(17,"input",12),s(18,"translate"),n()(),i(19,"li",9)(20,"label",13),m(21),s(22,"translate"),n(),i(23,"div",11),p(24,"input",14),s(25,"translate"),n()(),i(26,"li",9)(27,"label",15),m(28),s(29,"translate"),n(),i(30,"div",11),p(31,"input",16),s(32,"translate"),n()(),i(33,"li",9)(34,"label",17),m(35),s(36,"translate"),n(),i(37,"div",11),p(38,"input",18),s(39,"translate"),n()(),i(40,"li",19)(41,"span",20),m(42),s(43,"translate"),n(),i(44,"div",21),p(45,"input",22),s(46,"translate"),p(47,"label",23),n()()()(),i(48,"div",24)(49,"div",20)(50,"button",25),b("click",function(){return a.$activeModal.dismiss("Dismiss")}),m(51),s(52,"translate"),n()(),p(53,"div",26),i(54,"div",27)(55,"button",28),m(56),s(57,"translate"),n()()()()()),o&2&&(e(),f("formGroup",a.form),e(3),d(l(5,18,"users.title_add_user")),e(2),u("aria-label",l(7,20,"form.button_close")),e(8),d(l(15,22,"users.label_username")),e(3),u("aria-label",l(18,24,"users.label_username")),e(4),d(l(22,26,"users.label_full_name")),e(3),u("aria-label",l(25,28,"users.label_full_name")),e(4),d(l(29,30,a.page.password)),e(3),f("ngClass",I(46,se,a.form.controls.password.dirty&&a.form.controls.password.errors)),u("aria-label",l(32,32,a.page.password)),e(4),d(l(36,34,"users.label_confirm_password")),e(3),f("ngClass",I(48,se,a.form.controls.passwordConfirm.dirty&&a.form.controls.passwordConfirm.errors)),u("aria-label",l(39,36,"users.label_confirm_password")),e(4),d(l(43,38,"users.label_admin_user")),e(3),u("aria-label",l(46,40,"users.label_admin_user")),e(6),C(" ",l(52,42,"form.button_close")," "),e(4),f("disabled",!a.form.valid),e(),C(" ",l(57,44,"form.button_save")," "))},dependencies:[V,q,M,F,z,A,L,j,P,$],encapsulation:2})}return r})();var me=r=>({"is-invalid":r});function ge(r,y){if(r&1&&(i(0,"li",9)(1,"label",27),m(2),s(3,"translate"),n(),i(4,"div",11),p(5,"input",28),s(6,"translate"),n()()),r&2){let t=v();e(2),d(l(3,3,"users.label_confirm_password")),e(3),f("ngClass",I(7,me,t.form.controls.passwordConfirm.dirty&&t.form.controls.passwordConfirm.errors)),u("aria-label",l(6,5,"users.label_confirm_password"))}}var pe=(()=>{class r{$activeModal=c(G);$api=c(k);$auth=c(Q);$toastr=c(U);$translate=c(S);user;form=new N({username:new w("",[x.required]),name:new w("",[x.required]),password:new w(""),passwordConfirm:new w(""),admin:new w(!0)},this.matchPassword);page={title:"users.title_edit_user",save:"form.button_save",password:"users.label_new_password"};isCurrentUser=!1;constructor(){}ngOnInit(){this.isCurrentUser=this.$auth.user.username===this.user.username,this.form.patchValue(this.user)}matchPassword(t){let o=t.get("password").value,a=t.get("passwordConfirm").value;if(o!==a)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:o=>{console.error(o),this.$toastr.error(o.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=E({type:r,selectors:[["ng-component"]],inputs:{user:"user"},decls:52,vars:42,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-user-pen","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-username",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["formControlName","username","type","text","id","form-username","autocomplete","off","autocapitalize","none",1,"form-control","custom-input"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","custom-input"],["for","form-pass",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","custom-input",3,"ngClass"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"text-end","grey-text"],["type","checkbox","formControlName","admin","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ms-3"],[1,"modal-footer","justify-content-between"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","submit",1,"btn","btn-primary",3,"disabled"],["for","form-pass-confirm",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","custom-input",3,"ngClass"]],template:function(o,a){o&1&&(i(0,"div",0)(1,"form",1),b("ngSubmit",function(){return a.onSubmit(a.form)}),i(2,"div",2)(3,"h5",3),m(4),s(5,"translate"),n(),i(6,"button",4),s(7,"translate"),b("click",function(){return a.$activeModal.dismiss("Dismiss")}),n()(),i(8,"div",5)(9,"div",6),p(10,"i",7),n(),i(11,"ul",8)(12,"li",9)(13,"label",10),m(14),s(15,"translate"),n(),i(16,"div",11),p(17,"input",12),s(18,"translate"),n()(),i(19,"li",9)(20,"label",13),m(21),s(22,"translate"),n(),i(23,"div",11),p(24,"input",14),s(25,"translate"),n()(),i(26,"li",9)(27,"label",15),m(28),s(29,"translate"),n(),i(30,"div",11),p(31,"input",16),s(32,"translate"),n()(),h(33,ge,7,9,"li",9),i(34,"li",17)(35,"span",18),m(36),s(37,"translate"),n(),i(38,"div",19),p(39,"input",20),s(40,"translate"),p(41,"label",21),n()()()(),i(42,"div",22)(43,"div",18)(44,"button",23),b("click",function(){return a.$activeModal.dismiss("Dismiss")}),m(45),s(46,"translate"),n()(),p(47,"div",24),i(48,"div",25)(49,"button",26),m(50),s(51,"translate"),n()()()()()),o&2&&(e(),f("formGroup",a.form),e(3),d(l(5,16,"users.title_edit_user")),e(2),u("aria-label",l(7,18,"form.button_close")),e(8),d(l(15,20,"users.label_username")),e(3),u("aria-label",l(18,22,"users.label_username")),e(4),d(l(22,24,"users.label_full_name")),e(3),u("aria-label",l(25,26,"users.label_full_name")),e(4),d(l(29,28,a.page.password)),e(3),f("ngClass",I(40,me,a.form.controls.password.dirty&&a.form.controls.password.errors)),u("aria-label",l(32,30,a.page.password)),e(2),g(a.form.controls.password.value?33:-1),e(3),d(l(37,32,"users.label_admin_user")),e(3),u("aria-label",l(40,34,"users.label_admin_user")),e(6),C(" ",l(46,36,"form.button_close")," "),e(4),f("disabled",!a.form.valid),e(),C(" ",l(51,38,"form.button_save")," "))},dependencies:[V,q,M,Z,F,z,A,L,j,P,$],encapsulation:2})}return r})();function he(r,y){if(r&1){let t=D();i(0,"button",21),b("click",function(){B(t);let a=v().$implicit,_=v();return T(_.setup2fa(a))}),m(1),s(2,"translate"),n()}r&2&&(e(),d(l(2,1,"users.setup_2fa")))}function ye(r,y){if(r&1){let t=D();i(0,"button",17),b("click",function(){B(t);let a=v().$implicit,_=v();return T(_.disable2fa(a))}),m(1),s(2,"translate"),n()}r&2&&(e(),C(" ",l(2,1,"users.setup_2fa_disable")," "))}function Ee(r,y){if(r&1){let t=D();i(0,"div",7)(1,"div",8)(2,"div",9)(3,"div",10)(4,"span",11),p(5,"h4",12)(6,"h5",13),n()(),i(7,"div",14),h(8,he,3,3,"button",15)(9,ye,3,3,"button",16),i(10,"div")(11,"button",17),s(12,"translate"),b("click",function(){let a=B(t).$implicit,_=v();return T(_.openEditUser(a))}),p(13,"i",18),n(),i(14,"button",19),s(15,"translate"),b("click",function(){let a=B(t).$implicit,_=v();return T(_.deleteUser(a.id))}),p(16,"i",20),n()()()()()()}if(r&2){let t=y.$implicit,o=v();e(5),f("innerText",t.name),e(),f("innerText",t.username),e(2),g(o.$auth.user.username===t.username&&!t.otpActive?8:-1),e(),g(o.$auth.user.username===t.username&&t.otpActive?9:-1),e(2),u("aria-label",l(12,7,"form.button_edit")),e(3),f("disabled",o.$auth.user.username===t.username),u("aria-label",l(15,9,"form.button_delete"))}}var gt=(()=>{class r{$api=c(k);$auth=c(Q);$modal=c(te);$route=c(ie);$toastr=c(U);$translate=c(S);homebridgeUsers;constructor(){}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(le,{size:"lg",backdrop:"static"}).result.finally(()=>{this.reloadUsers()})}openEditUser(t){let o=this.$modal.open(pe,{size:"lg",backdrop:"static"});o.componentInstance.user=t,o.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:o=>{console.error(o),this.$toastr.error(o.error.message||this.$translate.instant("users.toast_failed_to_delete_user"),this.$translate.instant("toast.title_error"))}})}setup2fa(t){let o=this.$modal.open(oe,{size:"lg",backdrop:"static"});o.componentInstance.user=t,o.result.finally(()=>{this.reloadUsers()})}disable2fa(t){let o=this.$modal.open(re,{size:"lg",backdrop:"static"});o.componentInstance.user=t,o.result.finally(()=>{this.reloadUsers()})}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=E({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-end"],[1,"btn","btn-elegant","waves-effect","m-0",3,"click"],[1,"fas","fa-fw","fa-user-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"],[1,"btn","btn-primary","m-0"],[1,"btn","btn-elegant","m-0"],[1,"btn","btn-elegant","m-0",3,"click"],[1,"fas","fa-fw","fa-user-pen"],[1,"btn","btn-danger","m-0","ms-2",3,"click","disabled"],[1,"fas","fa-fw","fa-trash"],[1,"btn","btn-primary","m-0",3,"click"]],template:function(o,a){o&1&&(i(0,"div",0)(1,"div",1)(2,"h3",2),m(3),s(4,"translate"),n()(),i(5,"div",3)(6,"button",4),s(7,"translate"),b("click",function(){return a.openAddNewUser()}),p(8,"i",5),n()()(),i(9,"div",6),W(10,Ee,17,11,"div",7,K),n()),o&2&&(e(3),d(l(4,2,"users.title_users")),e(3),u("aria-label",l(7,4,"users.button_add_user")),e(4),X(a.homebridgeUsers))},dependencies:[$],encapsulation:2})}return r})();export{re as a,oe as b,le as c,pe as d,gt as e};
1
+ import{a as ne}from"./chunk-N3KVODFS.js";import{g as O,m as G,n as te}from"./chunk-TVD6GFRS.js";import{b as Z,c as M,d as x,e as F,f as z,g as N,j as w,m as q,o as R,p as L,q as j,w as ee,y as V,z as A}from"./chunk-5E6U5Y4F.js";import{b as ie}from"./chunk-BY7R34BA.js";import{c as Q}from"./chunk-NXJPK6JI.js";import{a as ce}from"./chunk-KDJYMZFG.js";import{h as U,k}from"./chunk-ESHZ74WN.js";import{a as S,b as $}from"./chunk-5R5SNIWB.js";import{Ac as s,Bc as l,Cc as Y,Jb as u,Kb as f,Pb as g,Rb as K,Sb as W,Tb as X,Ub as i,Vb as n,Wb as p,Zc as P,_b as D,bc as b,cc as v,g as de,gb as e,ma as c,mc as m,nc as d,oc as C,tb as E,ua as B,va as T,wc as I,zb as h}from"./chunk-QNWPOWRO.js";function ue(r,y){r&1&&(i(0,"ngb-alert",13)(1,"p",20),m(2),s(3,"translate"),n()()),r&2&&(f("dismissible",!1),e(2),d(l(3,2,"login.invalid_password")))}var re=(()=>{class r{$activeModal=c(G);$api=c(k);$toastr=c(U);$translate=c(S);formGroup=new N({password:new w("",[x.required])});invalidCredentials=!1;constructor(){}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(o){return new(o||r)};static \u0275cmp=E({type:r,selectors:[["ng-component"]],decls:34,vars:27,consts:[[1,"modal-content",2,"min-height","300px"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-key","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","password","autocomplete","current-password",1,"form-control","custom-input",3,"formControl","placeholder"],["type","error",1,"mt-3","mb-0",3,"dismissible"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click","disabled"],[1,"mb-0"]],template:function(o,a){o&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),m(3),s(4,"translate"),n(),i(5,"button",3),s(6,"translate"),b("click",function(){return a.$activeModal.dismiss("Dismiss")}),n()(),i(7,"div",4)(8,"div",5),p(9,"i",6),n(),i(10,"ul",7)(11,"li"),m(12),s(13,"translate"),n()(),i(14,"ul",8)(15,"li",9)(16,"label",10),m(17),s(18,"translate"),n(),i(19,"div",11),p(20,"input",12),s(21,"translate"),n()()(),h(22,ue,4,4,"ngb-alert",13),n(),i(23,"div",14)(24,"div",15)(25,"button",16),s(26,"translate"),b("click",function(){return a.$activeModal.dismiss("Dismiss")}),m(27),s(28,"translate"),n()(),p(29,"div",17),i(30,"div",18)(31,"button",19),b("click",function(){return a.disable2fa()}),m(32),s(33,"translate"),n()()()()),o&2&&(e(3),d(l(4,11,"users.setup_2fa_disable")),e(2),u("aria-label",l(6,13,"form.button_close")),e(7),d(l(13,15,"users.setup_2fa_disable_current_password")),e(5),d(l(18,17,"users.label_password")),e(3),f("formControl",a.formGroup.controls.password)("placeholder",l(21,19,"users.label_password")),e(2),g(a.invalidCredentials&&!a.formGroup.controls.password.value?22:-1),e(3),u("aria-label",l(26,21,"form.button_close")),e(2),C(" ",l(28,23,"form.button_close")," "),e(4),f("disabled",a.formGroup.invalid),e(),C(" ",l(33,25,"form.button_disable")," "))},dependencies:[V,M,F,A,R,$,O],encapsulation:2})}return r})();var ae=de(ce(),1);var fe=r=>({timeDiffError:r});function be(r,y){r&1&&(i(0,"li"),m(1),s(2,"translate"),n()),r&2&&(e(),d(l(2,1,"users.setup_2fa_scan_qr_code")))}function _e(r,y){if(r&1&&(i(0,"ngb-alert",8)(1,"p",16),m(2),s(3,"translate"),n(),i(4,"p",17),m(5),s(6,"translate"),n()()),r&2){let t=v();f("dismissible",!1),e(2),d(l(3,3,"users.setup_2fa_cannot_setup_2fa")),e(3),d(Y(6,5,"users.setup_2fa_server_time_out",I(8,fe,t.timeDiffError)))}}function ve(r,y){if(r&1&&(i(0,"ul",9)(1,"li",18)(2,"div",19),p(3,"app-qrcode",20),n()(),i(4,"li",21)(5,"label",22),m(6),s(7,"translate"),n(),i(8,"div",23),p(9,"input",24),n()()()),r&2){let t=v();e(3),f("data",t.otpString),e(3),d(l(7,3,"users.setup_2fa_enter_code")),e(3),f("formControl",t.formGroup.controls.code)}}function xe(r,y){if(r&1){let t=D();i(0,"button",25),s(1,"translate"),b("click",function(){B(t);let a=v();return T(a.$activeModal.dismiss("Dismiss"))}),m(2),s(3,"translate"),n()}r&2&&(u("aria-label",l(1,2,"form.button_close")),e(2),C(" ",l(3,4,"form.button_close")," "))}function we(r,y){if(r&1){let t=D();i(0,"button",25),s(1,"translate"),b("click",function(){B(t);let a=v();return T(a.$activeModal.dismiss("Dismiss"))}),m(2),s(3,"translate"),n()}r&2&&(u("aria-label",l(1,2,"form.button_close")),e(2),C(" ",l(3,4,"form.button_close")," "))}function Ce(r,y){if(r&1){let t=D();i(0,"button",26),b("click",function(){B(t);let a=v();return T(a.enable2fa())}),m(1),s(2,"translate"),n()}if(r&2){let t=v();f("disabled",t.formGroup.invalid),e(),C(" ",l(2,2,"form.button_enable")," ")}}var oe=(()=>{class r{$activeModal=c(G);$api=c(k);$toastr=c(U);$translate=c(S);user;timeDiffError=null;otpString;formGroup=new N({code:new w("",[x.required,x.minLength(6),x.maxLength(6)])});constructor(){}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 o=(0,ae.default)(t).diff(new Date,"millisecond");o<-5e3||o>5e3?this.timeDiffError=o: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(o){return new(o||r)};static \u0275cmp=E({type:r,selectors:[["ng-component"]],inputs:{user:"user"},decls:24,vars:15,consts:[[1,"modal-content","setup2fa"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-key","primary-text",2,"font-size","75px"],[1,"mb-3"],["type","error",1,"mb-0",3,"dismissible"],[1,"list-group","list-group-box","mb-0"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"disabled"],[1,"fw-bold","mb-1"],[1,"mb-0"],[1,"list-group-item","text-center"],[1,"text-center","w-100","d-flex","justify-content-center"],[1,"mx-auto",2,"width","175px","height","175px",3,"data"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["formControlName","username","type","text","placeholder","eg. 123456","autocomplete","one-time-code","autocapitalize","none","inputmode","numeric","pattern","[0-9]*",1,"form-control","custom-input",3,"formControl"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"]],template:function(o,a){o&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),m(3),s(4,"translate"),n(),i(5,"button",3),s(6,"translate"),b("click",function(){return a.$activeModal.dismiss("Dismiss")}),n()(),i(7,"div",4)(8,"div",5),p(9,"i",6),n(),i(10,"ul",7)(11,"li"),m(12),s(13,"translate"),n(),h(14,be,3,3,"li"),n(),h(15,_e,7,10,"ngb-alert",8)(16,ve,10,5,"ul",9),n(),i(17,"div",10)(18,"div",11),h(19,xe,4,6,"button",12),n(),i(20,"div",13),h(21,we,4,6,"button",12),n(),i(22,"div",14),h(23,Ce,3,4,"button",15),n()()()),o&2&&(e(3),d(l(4,9,"users.setup_2fa")),e(2),u("aria-label",l(6,11,"form.button_close")),e(7),d(l(13,13,"users.setup_2fa_warning")),e(2),g(a.timeDiffError?-1:14),e(),g(a.timeDiffError?15:-1),e(),g(a.timeDiffError?-1:16),e(3),g(a.timeDiffError?-1:19),e(2),g(a.timeDiffError?21:-1),e(2),g(a.timeDiffError?-1:23))},dependencies:[O,ne,V,M,F,ee,A,R,j,$],encapsulation:2})}return r})();var se=r=>({"is-invalid":r}),le=(()=>{class r{$activeModal=c(G);$api=c(k);$toastr=c(U);$translate=c(S);form=new N({username:new w("",[x.required]),name:new w("",[x.required]),password:new w("",[x.compose([x.required,x.minLength(4)])]),passwordConfirm:new w("",[x.required]),admin:new w(!0)},this.matchPassword);page={title:"users.title_add_user",save:"users.button_add_new_user",password:"users.label_password"};constructor(){}matchPassword(t){let o=t.get("password").value,a=t.get("passwordConfirm").value;if(o!==a)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:o=>{this.$toastr.error(o.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=E({type:r,selectors:[["ng-component"]],decls:58,vars:50,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-user-plus","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-username",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none",1,"form-control","custom-input"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","custom-input"],["for","form-pass",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","custom-input",3,"ngClass"],["for","form-pass-confirm",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","custom-input",3,"ngClass"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"text-end","grey-text"],["type","checkbox","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ms-3"],[1,"modal-footer","justify-content-between"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(o,a){o&1&&(i(0,"div",0)(1,"form",1),b("ngSubmit",function(){return a.onSubmit(a.form)}),i(2,"div",2)(3,"h5",3),m(4),s(5,"translate"),n(),i(6,"button",4),s(7,"translate"),b("click",function(){return a.$activeModal.dismiss("Dismiss")}),n()(),i(8,"div",5)(9,"div",6),p(10,"i",7),n(),i(11,"ul",8)(12,"li",9)(13,"label",10),m(14),s(15,"translate"),n(),i(16,"div",11),p(17,"input",12),s(18,"translate"),n()(),i(19,"li",9)(20,"label",13),m(21),s(22,"translate"),n(),i(23,"div",11),p(24,"input",14),s(25,"translate"),n()(),i(26,"li",9)(27,"label",15),m(28),s(29,"translate"),n(),i(30,"div",11),p(31,"input",16),s(32,"translate"),n()(),i(33,"li",9)(34,"label",17),m(35),s(36,"translate"),n(),i(37,"div",11),p(38,"input",18),s(39,"translate"),n()(),i(40,"li",19)(41,"span",20),m(42),s(43,"translate"),n(),i(44,"div",21),p(45,"input",22),s(46,"translate"),p(47,"label",23),n()()()(),i(48,"div",24)(49,"div",20)(50,"button",25),b("click",function(){return a.$activeModal.dismiss("Dismiss")}),m(51),s(52,"translate"),n()(),p(53,"div",26),i(54,"div",27)(55,"button",28),m(56),s(57,"translate"),n()()()()()),o&2&&(e(),f("formGroup",a.form),e(3),d(l(5,18,"users.title_add_user")),e(2),u("aria-label",l(7,20,"form.button_close")),e(8),d(l(15,22,"users.label_username")),e(3),u("aria-label",l(18,24,"users.label_username")),e(4),d(l(22,26,"users.label_full_name")),e(3),u("aria-label",l(25,28,"users.label_full_name")),e(4),d(l(29,30,a.page.password)),e(3),f("ngClass",I(46,se,a.form.controls.password.dirty&&a.form.controls.password.errors)),u("aria-label",l(32,32,a.page.password)),e(4),d(l(36,34,"users.label_confirm_password")),e(3),f("ngClass",I(48,se,a.form.controls.passwordConfirm.dirty&&a.form.controls.passwordConfirm.errors)),u("aria-label",l(39,36,"users.label_confirm_password")),e(4),d(l(43,38,"users.label_admin_user")),e(3),u("aria-label",l(46,40,"users.label_admin_user")),e(6),C(" ",l(52,42,"form.button_close")," "),e(4),f("disabled",!a.form.valid),e(),C(" ",l(57,44,"form.button_save")," "))},dependencies:[V,q,M,F,z,A,L,j,P,$],encapsulation:2})}return r})();var me=r=>({"is-invalid":r});function ge(r,y){if(r&1&&(i(0,"li",9)(1,"label",27),m(2),s(3,"translate"),n(),i(4,"div",11),p(5,"input",28),s(6,"translate"),n()()),r&2){let t=v();e(2),d(l(3,3,"users.label_confirm_password")),e(3),f("ngClass",I(7,me,t.form.controls.passwordConfirm.dirty&&t.form.controls.passwordConfirm.errors)),u("aria-label",l(6,5,"users.label_confirm_password"))}}var pe=(()=>{class r{$activeModal=c(G);$api=c(k);$auth=c(Q);$toastr=c(U);$translate=c(S);user;form=new N({username:new w("",[x.required]),name:new w("",[x.required]),password:new w(""),passwordConfirm:new w(""),admin:new w(!0)},this.matchPassword);page={title:"users.title_edit_user",save:"form.button_save",password:"users.label_new_password"};isCurrentUser=!1;constructor(){}ngOnInit(){this.isCurrentUser=this.$auth.user.username===this.user.username,this.form.patchValue(this.user)}matchPassword(t){let o=t.get("password").value,a=t.get("passwordConfirm").value;if(o!==a)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:o=>{console.error(o),this.$toastr.error(o.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=E({type:r,selectors:[["ng-component"]],inputs:{user:"user"},decls:52,vars:42,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-user-pen","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-username",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["formControlName","username","type","text","id","form-username","autocomplete","off","autocapitalize","none",1,"form-control","custom-input"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","custom-input"],["for","form-pass",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","custom-input",3,"ngClass"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"text-end","grey-text"],["type","checkbox","formControlName","admin","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ms-3"],[1,"modal-footer","justify-content-between"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","submit",1,"btn","btn-primary",3,"disabled"],["for","form-pass-confirm",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","custom-input",3,"ngClass"]],template:function(o,a){o&1&&(i(0,"div",0)(1,"form",1),b("ngSubmit",function(){return a.onSubmit(a.form)}),i(2,"div",2)(3,"h5",3),m(4),s(5,"translate"),n(),i(6,"button",4),s(7,"translate"),b("click",function(){return a.$activeModal.dismiss("Dismiss")}),n()(),i(8,"div",5)(9,"div",6),p(10,"i",7),n(),i(11,"ul",8)(12,"li",9)(13,"label",10),m(14),s(15,"translate"),n(),i(16,"div",11),p(17,"input",12),s(18,"translate"),n()(),i(19,"li",9)(20,"label",13),m(21),s(22,"translate"),n(),i(23,"div",11),p(24,"input",14),s(25,"translate"),n()(),i(26,"li",9)(27,"label",15),m(28),s(29,"translate"),n(),i(30,"div",11),p(31,"input",16),s(32,"translate"),n()(),h(33,ge,7,9,"li",9),i(34,"li",17)(35,"span",18),m(36),s(37,"translate"),n(),i(38,"div",19),p(39,"input",20),s(40,"translate"),p(41,"label",21),n()()()(),i(42,"div",22)(43,"div",18)(44,"button",23),b("click",function(){return a.$activeModal.dismiss("Dismiss")}),m(45),s(46,"translate"),n()(),p(47,"div",24),i(48,"div",25)(49,"button",26),m(50),s(51,"translate"),n()()()()()),o&2&&(e(),f("formGroup",a.form),e(3),d(l(5,16,"users.title_edit_user")),e(2),u("aria-label",l(7,18,"form.button_close")),e(8),d(l(15,20,"users.label_username")),e(3),u("aria-label",l(18,22,"users.label_username")),e(4),d(l(22,24,"users.label_full_name")),e(3),u("aria-label",l(25,26,"users.label_full_name")),e(4),d(l(29,28,a.page.password)),e(3),f("ngClass",I(40,me,a.form.controls.password.dirty&&a.form.controls.password.errors)),u("aria-label",l(32,30,a.page.password)),e(2),g(a.form.controls.password.value?33:-1),e(3),d(l(37,32,"users.label_admin_user")),e(3),u("aria-label",l(40,34,"users.label_admin_user")),e(6),C(" ",l(46,36,"form.button_close")," "),e(4),f("disabled",!a.form.valid),e(),C(" ",l(51,38,"form.button_save")," "))},dependencies:[V,q,M,Z,F,z,A,L,j,P,$],encapsulation:2})}return r})();function he(r,y){if(r&1){let t=D();i(0,"button",21),b("click",function(){B(t);let a=v().$implicit,_=v();return T(_.setup2fa(a))}),m(1),s(2,"translate"),n()}r&2&&(e(),d(l(2,1,"users.setup_2fa")))}function ye(r,y){if(r&1){let t=D();i(0,"button",17),b("click",function(){B(t);let a=v().$implicit,_=v();return T(_.disable2fa(a))}),m(1),s(2,"translate"),n()}r&2&&(e(),C(" ",l(2,1,"users.setup_2fa_disable")," "))}function Ee(r,y){if(r&1){let t=D();i(0,"div",7)(1,"div",8)(2,"div",9)(3,"div",10)(4,"span",11),p(5,"h4",12)(6,"h5",13),n()(),i(7,"div",14),h(8,he,3,3,"button",15)(9,ye,3,3,"button",16),i(10,"div")(11,"button",17),s(12,"translate"),b("click",function(){let a=B(t).$implicit,_=v();return T(_.openEditUser(a))}),p(13,"i",18),n(),i(14,"button",19),s(15,"translate"),b("click",function(){let a=B(t).$implicit,_=v();return T(_.deleteUser(a.id))}),p(16,"i",20),n()()()()()()}if(r&2){let t=y.$implicit,o=v();e(5),f("innerText",t.name),e(),f("innerText",t.username),e(2),g(o.$auth.user.username===t.username&&!t.otpActive?8:-1),e(),g(o.$auth.user.username===t.username&&t.otpActive?9:-1),e(2),u("aria-label",l(12,7,"form.button_edit")),e(3),f("disabled",o.$auth.user.username===t.username),u("aria-label",l(15,9,"form.button_delete"))}}var gt=(()=>{class r{$api=c(k);$auth=c(Q);$modal=c(te);$route=c(ie);$toastr=c(U);$translate=c(S);homebridgeUsers;constructor(){}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(le,{size:"lg",backdrop:"static"}).result.finally(()=>{this.reloadUsers()})}openEditUser(t){let o=this.$modal.open(pe,{size:"lg",backdrop:"static"});o.componentInstance.user=t,o.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:o=>{console.error(o),this.$toastr.error(o.error.message||this.$translate.instant("users.toast_failed_to_delete_user"),this.$translate.instant("toast.title_error"))}})}setup2fa(t){let o=this.$modal.open(oe,{size:"lg",backdrop:"static"});o.componentInstance.user=t,o.result.finally(()=>{this.reloadUsers()})}disable2fa(t){let o=this.$modal.open(re,{size:"lg",backdrop:"static"});o.componentInstance.user=t,o.result.finally(()=>{this.reloadUsers()})}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=E({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-end"],[1,"btn","btn-elegant","waves-effect","m-0",3,"click"],[1,"fas","fa-fw","fa-user-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"],[1,"btn","btn-primary","m-0"],[1,"btn","btn-elegant","m-0"],[1,"btn","btn-elegant","m-0",3,"click"],[1,"fas","fa-fw","fa-user-pen"],[1,"btn","btn-danger","m-0","ms-2",3,"click","disabled"],[1,"fas","fa-fw","fa-trash"],[1,"btn","btn-primary","m-0",3,"click"]],template:function(o,a){o&1&&(i(0,"div",0)(1,"div",1)(2,"h3",2),m(3),s(4,"translate"),n()(),i(5,"div",3)(6,"button",4),s(7,"translate"),b("click",function(){return a.openAddNewUser()}),p(8,"i",5),n()()(),i(9,"div",6),W(10,Ee,17,11,"div",7,K),n()),o&2&&(e(3),d(l(4,2,"users.title_users")),e(3),u("aria-label",l(7,4,"users.button_add_user")),e(4),X(a.homebridgeUsers))},dependencies:[$],encapsulation:2})}return r})();export{re as a,oe as b,le as c,pe as d,gt as e};
@@ -1 +1 @@
1
- import{c as N,d as w,e as T,f as O,g as q,j as x,m as G,p as Q,q as z,w as D,y as H,z as j}from"./chunk-XCZREHWX.js";import{d as W}from"./chunk-5CDZD4QO.js";import{c as K}from"./chunk-5NJQH2A3.js";import{b as J}from"./chunk-MJUBX7V2.js";import{j as U}from"./chunk-NCJAIFQO.js";import{b as A}from"./chunk-P5BH5BCJ.js";import{Ac as s,Bc as l,Kb as p,M as $,Pb as c,Ub as r,Vb as a,Wb as m,Zc as M,ad as R,bc as L,cc as I,gb as o,h as b,jc as v,kc as P,ma as g,mc as d,nc as C,oc as B,pb as h,tb as k,w as V,wc as f,zb as S}from"./chunk-V7KKBEKT.js";var X=["password"],Y=["username"],Z=["otp"],ee=e=>({background:e}),E=e=>({"is-invalid":e});function te(e,_){if(e&1&&(r(0,"div",10)(1,"span",11),m(2,"i",12),a(),m(3,"input",13,0),s(5,"translate"),a(),r(6,"div",14)(7,"span",11),m(8,"i",15),a(),m(9,"input",16,1),s(11,"translate"),a()),e&2){let t=I();o(3),p("placeholder",l(5,4,"users.label_username"))("ngClass",f(8,E,t.form.controls.username.dirty&&t.form.controls.username.errors)),o(6),p("placeholder",l(11,6,"users.label_password"))("ngClass",f(10,E,t.form.controls.password.dirty&&t.form.controls.password.errors))}}function ne(e,_){if(e&1&&(r(0,"p",7),d(1),s(2,"translate"),a(),r(3,"div",14)(4,"span",11),m(5,"i",17),a(),m(6,"input",18,2),s(8,"translate"),a()),e&2){let t=I();o(),C(l(2,3,"users.setup_2fa_enter_code")),o(5),p("placeholder",l(8,5,"login.label_2fa_code"))("ngClass",f(7,E,t.form.controls.otp.dirty&&t.form.controls.otp.errors))}}function ie(e,_){e&1&&(r(0,"p",8)(1,"small"),d(2),s(3,"translate"),a()()),e&2&&(o(2),C(l(3,1,"login.invalid_credentials")))}function oe(e,_){e&1&&(r(0,"p",8)(1,"small"),d(2),s(3,"translate"),a()()),e&2&&(o(2),C(l(3,1,"login.message_invalid_2fa_code")))}var Ce=(()=>{class e{$auth=g(K);$router=g(W);$settings=g(J);passwordInput=h("password");usernameInput=h("username");otpInput=h("otp");form;backgroundStyle;invalidCredentials=!1;invalid2faCode=!1;twoFactorCodeRequired=!1;inProgress=!1;targetRoute;constructor(){}ngOnInit(){this.form=new q({username:new x(""),password:new x("")}),this.form.valueChanges.pipe($(500)).subscribe(t=>{var n;let i=(n=this.passwordInput())==null?void 0:n.nativeElement.value;i&&i!==t.password&&this.form.controls.password.setValue(i)}),this.targetRoute=window.sessionStorage.getItem("target_route")||"",this.setBackground()}setBackground(){return b(this,null,function*(){if(this.$settings.settingsLoaded||(yield V(this.$settings.onSettingsLoaded)),this.$settings.env.customWallpaperHash){let t=this.$settings.env.customWallpaperHash?`${U.api.base}/auth/wallpaper/${this.$settings.env.customWallpaperHash}`:"/assets/snapshot.jpg";this.backgroundStyle=`url('${t}') center/cover`}})}onSubmit(){return b(this,null,function*(){var n,y,F;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 i=(y=this.usernameInput())==null?void 0:y.nativeElement.value;if(i&&i!==this.form.get("username").value&&this.form.controls.username.setValue(i),this.twoFactorCodeRequired){let u=(F=this.otpInput())==null?void 0:F.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 x("",[w.required,w.minLength(6),w.maxLength(6)])),this.twoFactorCodeRequired=!0,setTimeout(()=>{document.getElementById("form-ota").focus()},100)):this.invalidCredentials=!0}),this.inProgress=!1})}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=k({type:e,selectors:[["ng-component"]],viewQuery:function(i,n){i&1&&(v(n.passwordInput,X,5),v(n.usernameInput,Y,5),v(n.otpInput,Z,5)),i&2&&P(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","input-group","mb-3"],[1,"input-group-text","custom-input"],[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","custom-input","py-2",3,"placeholder","ngClass"],[1,"md-form","input-group","mb-4"],[1,"fas","fa-fw","fa-lock","prefix","grey-text"],["formControlName","password","type","password","id","form-pass","autocomplete","current-password","tabindex","2",1,"form-control","custom-input","py-2",3,"placeholder","ngClass"],[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","custom-input","py-2",3,"placeholder","ngClass"]],template:function(i,n){i&1&&(r(0,"div",3)(1,"div",4)(2,"form",5),L("ngSubmit",function(){return n.onSubmit()}),r(3,"p",6),d(4,"Homebridge"),a(),S(5,te,12,12)(6,ne,9,9),r(7,"div",7),S(8,ie,4,3,"p",8)(9,oe,4,3,"p",8),r(10,"button",9),d(11),s(12,"translate"),a()()()()()),i&2&&(p("ngStyle",f(10,ee,n.backgroundStyle)),o(2),p("formGroup",n.form),o(3),c(n.twoFactorCodeRequired?-1:5),o(),c(n.twoFactorCodeRequired?6:-1),o(2),c(n.invalidCredentials?8:-1),o(),c(n.invalid2faCode?9:-1),o(),p("disabled",n.form.invalid),o(),B(" ",l(12,8,"login.button_login")," "))},dependencies:[R,H,G,N,T,O,D,j,Q,z,M,A],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}@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
+ import{c as N,d as w,e as T,f as O,g as q,j as x,m as G,p as Q,q as z,w as D,y as H,z as j}from"./chunk-5E6U5Y4F.js";import{d as W}from"./chunk-BY7R34BA.js";import{c as K}from"./chunk-NXJPK6JI.js";import{b as J}from"./chunk-KDJYMZFG.js";import{j as U}from"./chunk-ESHZ74WN.js";import{b as A}from"./chunk-5R5SNIWB.js";import{Ac as s,Bc as l,Kb as p,M as $,Pb as c,Ub as r,Vb as a,Wb as m,Zc as M,ad as R,bc as L,cc as I,gb as o,h as b,jc as v,kc as P,ma as g,mc as d,nc as C,oc as B,pb as h,tb as k,w as V,wc as f,zb as S}from"./chunk-QNWPOWRO.js";var X=["password"],Y=["username"],Z=["otp"],ee=e=>({background:e}),E=e=>({"is-invalid":e});function te(e,_){if(e&1&&(r(0,"div",10)(1,"span",11),m(2,"i",12),a(),m(3,"input",13,0),s(5,"translate"),a(),r(6,"div",14)(7,"span",11),m(8,"i",15),a(),m(9,"input",16,1),s(11,"translate"),a()),e&2){let t=I();o(3),p("placeholder",l(5,4,"users.label_username"))("ngClass",f(8,E,t.form.controls.username.dirty&&t.form.controls.username.errors)),o(6),p("placeholder",l(11,6,"users.label_password"))("ngClass",f(10,E,t.form.controls.password.dirty&&t.form.controls.password.errors))}}function ne(e,_){if(e&1&&(r(0,"p",7),d(1),s(2,"translate"),a(),r(3,"div",14)(4,"span",11),m(5,"i",17),a(),m(6,"input",18,2),s(8,"translate"),a()),e&2){let t=I();o(),C(l(2,3,"users.setup_2fa_enter_code")),o(5),p("placeholder",l(8,5,"login.label_2fa_code"))("ngClass",f(7,E,t.form.controls.otp.dirty&&t.form.controls.otp.errors))}}function ie(e,_){e&1&&(r(0,"p",8)(1,"small"),d(2),s(3,"translate"),a()()),e&2&&(o(2),C(l(3,1,"login.invalid_credentials")))}function oe(e,_){e&1&&(r(0,"p",8)(1,"small"),d(2),s(3,"translate"),a()()),e&2&&(o(2),C(l(3,1,"login.message_invalid_2fa_code")))}var Ce=(()=>{class e{$auth=g(K);$router=g(W);$settings=g(J);passwordInput=h("password");usernameInput=h("username");otpInput=h("otp");form;backgroundStyle;invalidCredentials=!1;invalid2faCode=!1;twoFactorCodeRequired=!1;inProgress=!1;targetRoute;constructor(){}ngOnInit(){this.form=new q({username:new x(""),password:new x("")}),this.form.valueChanges.pipe($(500)).subscribe(t=>{var n;let i=(n=this.passwordInput())==null?void 0:n.nativeElement.value;i&&i!==t.password&&this.form.controls.password.setValue(i)}),this.targetRoute=window.sessionStorage.getItem("target_route")||"",this.setBackground()}setBackground(){return b(this,null,function*(){if(this.$settings.settingsLoaded||(yield V(this.$settings.onSettingsLoaded)),this.$settings.env.customWallpaperHash){let t=this.$settings.env.customWallpaperHash?`${U.api.base}/auth/wallpaper/${this.$settings.env.customWallpaperHash}`:"/assets/snapshot.jpg";this.backgroundStyle=`url('${t}') center/cover`}})}onSubmit(){return b(this,null,function*(){var n,y,F;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 i=(y=this.usernameInput())==null?void 0:y.nativeElement.value;if(i&&i!==this.form.get("username").value&&this.form.controls.username.setValue(i),this.twoFactorCodeRequired){let u=(F=this.otpInput())==null?void 0:F.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 x("",[w.required,w.minLength(6),w.maxLength(6)])),this.twoFactorCodeRequired=!0,setTimeout(()=>{document.getElementById("form-ota").focus()},100)):this.invalidCredentials=!0}),this.inProgress=!1})}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=k({type:e,selectors:[["ng-component"]],viewQuery:function(i,n){i&1&&(v(n.passwordInput,X,5),v(n.usernameInput,Y,5),v(n.otpInput,Z,5)),i&2&&P(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","input-group","mb-3"],[1,"input-group-text","custom-input"],[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","custom-input","py-2",3,"placeholder","ngClass"],[1,"md-form","input-group","mb-4"],[1,"fas","fa-fw","fa-lock","prefix","grey-text"],["formControlName","password","type","password","id","form-pass","autocomplete","current-password","tabindex","2",1,"form-control","custom-input","py-2",3,"placeholder","ngClass"],[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","custom-input","py-2",3,"placeholder","ngClass"]],template:function(i,n){i&1&&(r(0,"div",3)(1,"div",4)(2,"form",5),L("ngSubmit",function(){return n.onSubmit()}),r(3,"p",6),d(4,"Homebridge"),a(),S(5,te,12,12)(6,ne,9,9),r(7,"div",7),S(8,ie,4,3,"p",8)(9,oe,4,3,"p",8),r(10,"button",9),d(11),s(12,"translate"),a()()()()()),i&2&&(p("ngStyle",f(10,ee,n.backgroundStyle)),o(2),p("formGroup",n.form),o(3),c(n.twoFactorCodeRequired?-1:5),o(),c(n.twoFactorCodeRequired?6:-1),o(2),c(n.invalidCredentials?8:-1),o(),c(n.invalid2faCode?9:-1),o(),p("disabled",n.form.invalid),o(),B(" ",l(12,8,"login.button_login")," "))},dependencies:[R,H,G,N,T,O,D,j,Q,z,M,A],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}@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 +1 @@
1
- import{e as h}from"./chunk-V7KKBEKT.js";var P=h((Qn,Ee)=>{var tt="2.0.0",st=Number.MAX_SAFE_INTEGER||9007199254740991,nt=16,it=250,ot=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Ee.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:nt,MAX_SAFE_BUILD_LENGTH:it,MAX_SAFE_INTEGER:st,RELEASE_TYPES:ot,SEMVER_SPEC_VERSION:tt,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var v=h((ei,fe)=>{var lt=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};fe.exports=lt});var w=h((T,he)=>{var{MAX_SAFE_COMPONENT_LENGTH:W,MAX_SAFE_BUILD_LENGTH:at,MAX_LENGTH:ct}=P(),ut=v();T=he.exports={};var Et=T.re=[],ft=T.safeRe=[],l=T.src=[],ht=T.safeSrc=[],a=T.t={},pt=0,B="[a-zA-Z0-9-]",Rt=[["\\s",1],["\\d",ct],[B,at]],$t=t=>{for(let[e,r]of Rt)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},p=(t,e,r)=>{let s=$t(e),n=pt++;ut(t,n,e),a[t]=n,l[n]=e,ht[n]=s,Et[n]=new RegExp(e,r?"g":void 0),ft[n]=new RegExp(s,r?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*");p("NUMERICIDENTIFIERLOOSE","\\d+");p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${B}*`);p("MAINVERSION",`(${l[a.NUMERICIDENTIFIER]})\\.(${l[a.NUMERICIDENTIFIER]})\\.(${l[a.NUMERICIDENTIFIER]})`);p("MAINVERSIONLOOSE",`(${l[a.NUMERICIDENTIFIERLOOSE]})\\.(${l[a.NUMERICIDENTIFIERLOOSE]})\\.(${l[a.NUMERICIDENTIFIERLOOSE]})`);p("PRERELEASEIDENTIFIER",`(?:${l[a.NUMERICIDENTIFIER]}|${l[a.NONNUMERICIDENTIFIER]})`);p("PRERELEASEIDENTIFIERLOOSE",`(?:${l[a.NUMERICIDENTIFIERLOOSE]}|${l[a.NONNUMERICIDENTIFIER]})`);p("PRERELEASE",`(?:-(${l[a.PRERELEASEIDENTIFIER]}(?:\\.${l[a.PRERELEASEIDENTIFIER]})*))`);p("PRERELEASELOOSE",`(?:-?(${l[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[a.PRERELEASEIDENTIFIERLOOSE]})*))`);p("BUILDIDENTIFIER",`${B}+`);p("BUILD",`(?:\\+(${l[a.BUILDIDENTIFIER]}(?:\\.${l[a.BUILDIDENTIFIER]})*))`);p("FULLPLAIN",`v?${l[a.MAINVERSION]}${l[a.PRERELEASE]}?${l[a.BUILD]}?`);p("FULL",`^${l[a.FULLPLAIN]}$`);p("LOOSEPLAIN",`[v=\\s]*${l[a.MAINVERSIONLOOSE]}${l[a.PRERELEASELOOSE]}?${l[a.BUILD]}?`);p("LOOSE",`^${l[a.LOOSEPLAIN]}$`);p("GTLT","((?:<|>)?=?)");p("XRANGEIDENTIFIERLOOSE",`${l[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);p("XRANGEIDENTIFIER",`${l[a.NUMERICIDENTIFIER]}|x|X|\\*`);p("XRANGEPLAIN",`[v=\\s]*(${l[a.XRANGEIDENTIFIER]})(?:\\.(${l[a.XRANGEIDENTIFIER]})(?:\\.(${l[a.XRANGEIDENTIFIER]})(?:${l[a.PRERELEASE]})?${l[a.BUILD]}?)?)?`);p("XRANGEPLAINLOOSE",`[v=\\s]*(${l[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[a.XRANGEIDENTIFIERLOOSE]})(?:${l[a.PRERELEASELOOSE]})?${l[a.BUILD]}?)?)?`);p("XRANGE",`^${l[a.GTLT]}\\s*${l[a.XRANGEPLAIN]}$`);p("XRANGELOOSE",`^${l[a.GTLT]}\\s*${l[a.XRANGEPLAINLOOSE]}$`);p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${W}})(?:\\.(\\d{1,${W}}))?(?:\\.(\\d{1,${W}}))?`);p("COERCE",`${l[a.COERCEPLAIN]}(?:$|[^\\d])`);p("COERCEFULL",l[a.COERCEPLAIN]+`(?:${l[a.PRERELEASE]})?(?:${l[a.BUILD]})?(?:$|[^\\d])`);p("COERCERTL",l[a.COERCE],!0);p("COERCERTLFULL",l[a.COERCEFULL],!0);p("LONETILDE","(?:~>?)");p("TILDETRIM",`(\\s*)${l[a.LONETILDE]}\\s+`,!0);T.tildeTrimReplace="$1~";p("TILDE",`^${l[a.LONETILDE]}${l[a.XRANGEPLAIN]}$`);p("TILDELOOSE",`^${l[a.LONETILDE]}${l[a.XRANGEPLAINLOOSE]}$`);p("LONECARET","(?:\\^)");p("CARETTRIM",`(\\s*)${l[a.LONECARET]}\\s+`,!0);T.caretTrimReplace="$1^";p("CARET",`^${l[a.LONECARET]}${l[a.XRANGEPLAIN]}$`);p("CARETLOOSE",`^${l[a.LONECARET]}${l[a.XRANGEPLAINLOOSE]}$`);p("COMPARATORLOOSE",`^${l[a.GTLT]}\\s*(${l[a.LOOSEPLAIN]})$|^$`);p("COMPARATOR",`^${l[a.GTLT]}\\s*(${l[a.FULLPLAIN]})$|^$`);p("COMPARATORTRIM",`(\\s*)${l[a.GTLT]}\\s*(${l[a.LOOSEPLAIN]}|${l[a.XRANGEPLAIN]})`,!0);T.comparatorTrimReplace="$1$2$3";p("HYPHENRANGE",`^\\s*(${l[a.XRANGEPLAIN]})\\s+-\\s+(${l[a.XRANGEPLAIN]})\\s*$`);p("HYPHENRANGELOOSE",`^\\s*(${l[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[a.XRANGEPLAINLOOSE]})\\s*$`);p("STAR","(<|>)?=?\\s*\\*");p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var F=h((ri,pe)=>{var mt=Object.freeze({loose:!0}),It=Object.freeze({}),Lt=t=>t?typeof t!="object"?mt:t:It;pe.exports=Lt});var z=h((ti,me)=>{var Re=/^[0-9]+$/,$e=(t,e)=>{let r=Re.test(t),s=Re.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},Nt=(t,e)=>$e(e,t);me.exports={compareIdentifiers:$e,rcompareIdentifiers:Nt}});var L=h((si,Oe)=>{var j=v(),{MAX_LENGTH:Ie,MAX_SAFE_INTEGER:X}=P(),{safeRe:Le,safeSrc:Ne,t:U}=w(),Ot=F(),{compareIdentifiers:g}=z(),K=class t{constructor(e,r){if(r=Ot(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Ie)throw new TypeError(`version is longer than ${Ie} characters`);j("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?Le[U.LOOSE]:Le[U.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>X||this.major<0)throw new TypeError("Invalid major version");if(this.minor>X||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>X||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let i=+n;if(i>=0&&i<X)return i}return n}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(j("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),g(this.major,e.major)||g(this.minor,e.minor)||g(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let s=this.prerelease[r],n=e.prerelease[r];if(j("prerelease compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return g(s,n)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let s=this.build[r],n=e.build[r];if(j("build compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return g(s,n)}while(++r)}inc(e,r,s){if(e.startsWith("pre")){if(!r&&s===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let n=new RegExp(`^${this.options.loose?Ne[U.PRERELEASELOOSE]:Ne[U.PRERELEASE]}$`),i=`-${r}`.match(n);if(!i||i[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,s),this.inc("pre",r,s);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,s),this.inc("pre",r,s);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let n=Number(s)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(r===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(r){let i=[r,n];s===!1&&(i=[r]),g(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Oe.exports=K});var q=h((ni,de)=>{var Se=L(),St=(t,e,r=!1)=>{if(t instanceof Se)return t;try{return new Se(t,e)}catch(s){if(!r)return null;throw s}};de.exports=St});var Te=h((ii,Ae)=>{var dt=q(),At=(t,e)=>{let r=dt(t,e);return r?r.version:null};Ae.exports=At});var we=h((oi,qe)=>{var Tt=q(),qt=(t,e)=>{let r=Tt(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};qe.exports=qt});var ve=h((li,Pe)=>{var ge=L(),wt=(t,e,r,s,n)=>{typeof r=="string"&&(n=s,s=r,r=void 0);try{return new ge(t instanceof ge?t.version:t,r).inc(e,s,n).version}catch{return null}};Pe.exports=wt});var De=h((ai,Ce)=>{var xe=q(),gt=(t,e)=>{let r=xe(t,null,!0),s=xe(e,null,!0),n=r.compare(s);if(n===0)return null;let i=n>0,o=i?r:s,c=i?s:r,u=!!o.prerelease.length;if(!!c.prerelease.length&&!u){if(!c.patch&&!c.minor)return"major";if(c.compareMain(o)===0)return c.minor&&!c.patch?"minor":"patch"}let $=u?"pre":"";return r.major!==s.major?$+"major":r.minor!==s.minor?$+"minor":r.patch!==s.patch?$+"patch":"prerelease"};Ce.exports=gt});var ye=h((ci,Ge)=>{var Pt=L(),vt=(t,e)=>new Pt(t,e).major;Ge.exports=vt});var je=h((ui,Fe)=>{var xt=L(),Ct=(t,e)=>new xt(t,e).minor;Fe.exports=Ct});var Ue=h((Ei,Xe)=>{var Dt=L(),Gt=(t,e)=>new Dt(t,e).patch;Xe.exports=Gt});var _e=h((fi,Ve)=>{var yt=q(),Ft=(t,e)=>{let r=yt(t,e);return r&&r.prerelease.length?r.prerelease:null};Ve.exports=Ft});var d=h((hi,He)=>{var be=L(),jt=(t,e,r)=>new be(t,r).compare(new be(e,r));He.exports=jt});var Me=h((pi,ke)=>{var Xt=d(),Ut=(t,e,r)=>Xt(e,t,r);ke.exports=Ut});var We=h((Ri,Ye)=>{var Vt=d(),_t=(t,e)=>Vt(t,e,!0);Ye.exports=_t});var V=h(($i,ze)=>{var Be=L(),bt=(t,e,r)=>{let s=new Be(t,r),n=new Be(e,r);return s.compare(n)||s.compareBuild(n)};ze.exports=bt});var Ze=h((mi,Ke)=>{var Ht=V(),kt=(t,e)=>t.sort((r,s)=>Ht(r,s,e));Ke.exports=kt});var Qe=h((Ii,Je)=>{var Mt=V(),Yt=(t,e)=>t.sort((r,s)=>Mt(s,r,e));Je.exports=Yt});var x=h((Li,er)=>{var Wt=d(),Bt=(t,e,r)=>Wt(t,e,r)>0;er.exports=Bt});var _=h((Ni,rr)=>{var zt=d(),Kt=(t,e,r)=>zt(t,e,r)<0;rr.exports=Kt});var Z=h((Oi,tr)=>{var Zt=d(),Jt=(t,e,r)=>Zt(t,e,r)===0;tr.exports=Jt});var J=h((Si,sr)=>{var Qt=d(),es=(t,e,r)=>Qt(t,e,r)!==0;sr.exports=es});var b=h((di,nr)=>{var rs=d(),ts=(t,e,r)=>rs(t,e,r)>=0;nr.exports=ts});var H=h((Ai,ir)=>{var ss=d(),ns=(t,e,r)=>ss(t,e,r)<=0;ir.exports=ns});var Q=h((Ti,or)=>{var is=Z(),os=J(),ls=x(),as=b(),cs=_(),us=H(),Es=(t,e,r,s)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return is(t,r,s);case"!=":return os(t,r,s);case">":return ls(t,r,s);case">=":return as(t,r,s);case"<":return cs(t,r,s);case"<=":return us(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};or.exports=Es});var ar=h((qi,lr)=>{var fs=L(),hs=q(),{safeRe:k,t:M}=w(),ps=(t,e)=>{if(t instanceof fs)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?k[M.COERCEFULL]:k[M.COERCE]);else{let u=e.includePrerelease?k[M.COERCERTLFULL]:k[M.COERCERTL],R;for(;(R=u.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||R.index+R[0].length!==r.index+r[0].length)&&(r=R),u.lastIndex=R.index+R[1].length+R[2].length;u.lastIndex=-1}if(r===null)return null;let s=r[2],n=r[3]||"0",i=r[4]||"0",o=e.includePrerelease&&r[5]?`-${r[5]}`:"",c=e.includePrerelease&&r[6]?`+${r[6]}`:"";return hs(`${s}.${n}.${i}${o}${c}`,e)};lr.exports=ps});var ur=h((wi,cr)=>{var ee=class{constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(e,r)}return this}};cr.exports=ee});var A=h((gi,pr)=>{var Rs=/\s+/g,re=class t{constructor(e,r){if(r=ms(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof te)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(Rs," "),this.set=this.raw.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(n=>!fr(n[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&As(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let r=this.set[e];for(let s=0;s<r.length;s++)s>0&&(this.formatted+=" "),this.formatted+=r[s].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let s=((this.options.includePrerelease&&Ss)|(this.options.loose&&ds))+":"+e,n=Er.get(s);if(n)return n;let i=this.options.loose,o=i?S[N.HYPHENRANGELOOSE]:S[N.HYPHENRANGE];e=e.replace(o,Gs(this.options.includePrerelease)),m("hyphen replace",e),e=e.replace(S[N.COMPARATORTRIM],Ls),m("comparator trim",e),e=e.replace(S[N.TILDETRIM],Ns),m("tilde trim",e),e=e.replace(S[N.CARETTRIM],Os),m("caret trim",e);let c=e.split(" ").map(E=>Ts(E,this.options)).join(" ").split(/\s+/).map(E=>Ds(E,this.options));i&&(c=c.filter(E=>(m("loose invalid filter",E,this.options),!!E.match(S[N.COMPARATORLOOSE])))),m("range list",c);let u=new Map,R=c.map(E=>new te(E,this.options));for(let E of R){if(fr(E))return[E];u.set(E.value,E)}u.size>1&&u.has("")&&u.delete("");let $=[...u.values()];return Er.set(s,$),$}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(s=>hr(s,r)&&e.set.some(n=>hr(n,r)&&s.every(i=>n.every(o=>i.intersects(o,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Is(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(ys(this.set[r],e,this.options))return!0;return!1}};pr.exports=re;var $s=ur(),Er=new $s,ms=F(),te=C(),m=v(),Is=L(),{safeRe:S,t:N,comparatorTrimReplace:Ls,tildeTrimReplace:Ns,caretTrimReplace:Os}=w(),{FLAG_INCLUDE_PRERELEASE:Ss,FLAG_LOOSE:ds}=P(),fr=t=>t.value==="<0.0.0-0",As=t=>t.value==="",hr=(t,e)=>{let r=!0,s=t.slice(),n=s.pop();for(;r&&s.length;)r=s.every(i=>n.intersects(i,e)),n=s.pop();return r},Ts=(t,e)=>(m("comp",t,e),t=gs(t,e),m("caret",t),t=qs(t,e),m("tildes",t),t=vs(t,e),m("xrange",t),t=Cs(t,e),m("stars",t),t),O=t=>!t||t.toLowerCase()==="x"||t==="*",qs=(t,e)=>t.trim().split(/\s+/).map(r=>ws(r,e)).join(" "),ws=(t,e)=>{let r=e.loose?S[N.TILDELOOSE]:S[N.TILDE];return t.replace(r,(s,n,i,o,c)=>{m("tilde",t,s,n,i,o,c);let u;return O(n)?u="":O(i)?u=`>=${n}.0.0 <${+n+1}.0.0-0`:O(o)?u=`>=${n}.${i}.0 <${n}.${+i+1}.0-0`:c?(m("replaceTilde pr",c),u=`>=${n}.${i}.${o}-${c} <${n}.${+i+1}.0-0`):u=`>=${n}.${i}.${o} <${n}.${+i+1}.0-0`,m("tilde return",u),u})},gs=(t,e)=>t.trim().split(/\s+/).map(r=>Ps(r,e)).join(" "),Ps=(t,e)=>{m("caret",t,e);let r=e.loose?S[N.CARETLOOSE]:S[N.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(n,i,o,c,u)=>{m("caret",t,n,i,o,c,u);let R;return O(i)?R="":O(o)?R=`>=${i}.0.0${s} <${+i+1}.0.0-0`:O(c)?i==="0"?R=`>=${i}.${o}.0${s} <${i}.${+o+1}.0-0`:R=`>=${i}.${o}.0${s} <${+i+1}.0.0-0`:u?(m("replaceCaret pr",u),i==="0"?o==="0"?R=`>=${i}.${o}.${c}-${u} <${i}.${o}.${+c+1}-0`:R=`>=${i}.${o}.${c}-${u} <${i}.${+o+1}.0-0`:R=`>=${i}.${o}.${c}-${u} <${+i+1}.0.0-0`):(m("no pr"),i==="0"?o==="0"?R=`>=${i}.${o}.${c}${s} <${i}.${o}.${+c+1}-0`:R=`>=${i}.${o}.${c}${s} <${i}.${+o+1}.0-0`:R=`>=${i}.${o}.${c} <${+i+1}.0.0-0`),m("caret return",R),R})},vs=(t,e)=>(m("replaceXRanges",t,e),t.split(/\s+/).map(r=>xs(r,e)).join(" ")),xs=(t,e)=>{t=t.trim();let r=e.loose?S[N.XRANGELOOSE]:S[N.XRANGE];return t.replace(r,(s,n,i,o,c,u)=>{m("xRange",t,s,n,i,o,c,u);let R=O(i),$=R||O(o),E=$||O(c),I=E;return n==="="&&I&&(n=""),u=e.includePrerelease?"-0":"",R?n===">"||n==="<"?s="<0.0.0-0":s="*":n&&I?($&&(o=0),c=0,n===">"?(n=">=",$?(i=+i+1,o=0,c=0):(o=+o+1,c=0)):n==="<="&&(n="<",$?i=+i+1:o=+o+1),n==="<"&&(u="-0"),s=`${n+i}.${o}.${c}${u}`):$?s=`>=${i}.0.0${u} <${+i+1}.0.0-0`:E&&(s=`>=${i}.${o}.0${u} <${i}.${+o+1}.0-0`),m("xRange return",s),s})},Cs=(t,e)=>(m("replaceStars",t,e),t.trim().replace(S[N.STAR],"")),Ds=(t,e)=>(m("replaceGTE0",t,e),t.trim().replace(S[e.includePrerelease?N.GTE0PRE:N.GTE0],"")),Gs=t=>(e,r,s,n,i,o,c,u,R,$,E,I)=>(O(s)?r="":O(n)?r=`>=${s}.0.0${t?"-0":""}`:O(i)?r=`>=${s}.${n}.0${t?"-0":""}`:o?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,O(R)?u="":O($)?u=`<${+R+1}.0.0-0`:O(E)?u=`<${R}.${+$+1}.0-0`:I?u=`<=${R}.${$}.${E}-${I}`:t?u=`<${R}.${$}.${+E+1}-0`:u=`<=${u}`,`${r} ${u}`.trim()),ys=(t,e,r)=>{for(let s=0;s<t.length;s++)if(!t[s].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let s=0;s<t.length;s++)if(m(t[s].semver),t[s].semver!==te.ANY&&t[s].semver.prerelease.length>0){let n=t[s].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}});var C=h((Pi,Nr)=>{var D=Symbol("SemVer ANY"),ie=class t{static get ANY(){return D}constructor(e,r){if(r=Rr(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),ne("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===D?this.value="":this.value=this.operator+this.semver.version,ne("comp",this)}parse(e){let r=this.options.loose?$r[mr.COMPARATORLOOSE]:$r[mr.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new Ir(s[2],this.options.loose):this.semver=D}toString(){return this.value}test(e){if(ne("Comparator.test",e,this.options.loose),this.semver===D||e===D)return!0;if(typeof e=="string")try{e=new Ir(e,this.options)}catch{return!1}return se(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Lr(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new Lr(this.value,r).test(e.semver):(r=Rr(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||se(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||se(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Nr.exports=ie;var Rr=F(),{safeRe:$r,t:mr}=w(),se=Q(),ne=v(),Ir=L(),Lr=A()});var G=h((vi,Or)=>{var Fs=A(),js=(t,e,r)=>{try{e=new Fs(e,r)}catch{return!1}return e.test(t)};Or.exports=js});var dr=h((xi,Sr)=>{var Xs=A(),Us=(t,e)=>new Xs(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));Sr.exports=Us});var Tr=h((Ci,Ar)=>{var Vs=L(),_s=A(),bs=(t,e,r)=>{let s=null,n=null,i=null;try{i=new _s(e,r)}catch{return null}return t.forEach(o=>{i.test(o)&&(!s||n.compare(o)===-1)&&(s=o,n=new Vs(s,r))}),s};Ar.exports=bs});var wr=h((Di,qr)=>{var Hs=L(),ks=A(),Ms=(t,e,r)=>{let s=null,n=null,i=null;try{i=new ks(e,r)}catch{return null}return t.forEach(o=>{i.test(o)&&(!s||n.compare(o)===1)&&(s=o,n=new Hs(s,r))}),s};qr.exports=Ms});var vr=h((Gi,Pr)=>{var oe=L(),Ys=A(),gr=x(),Ws=(t,e)=>{t=new Ys(t,e);let r=new oe("0.0.0");if(t.test(r)||(r=new oe("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let n=t.set[s],i=null;n.forEach(o=>{let c=new oe(o.semver.version);switch(o.operator){case">":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!i||gr(c,i))&&(i=c);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),i&&(!r||gr(r,i))&&(r=i)}return r&&t.test(r)?r:null};Pr.exports=Ws});var Cr=h((yi,xr)=>{var Bs=A(),zs=(t,e)=>{try{return new Bs(t,e).range||"*"}catch{return null}};xr.exports=zs});var Y=h((Fi,Fr)=>{var Ks=L(),yr=C(),{ANY:Zs}=yr,Js=A(),Qs=G(),Dr=x(),Gr=_(),en=H(),rn=b(),tn=(t,e,r,s)=>{t=new Ks(t,s),e=new Js(e,s);let n,i,o,c,u;switch(r){case">":n=Dr,i=en,o=Gr,c=">",u=">=";break;case"<":n=Gr,i=rn,o=Dr,c="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Qs(t,e,s))return!1;for(let R=0;R<e.set.length;++R){let $=e.set[R],E=null,I=null;if($.forEach(f=>{f.semver===Zs&&(f=new yr(">=0.0.0")),E=E||f,I=I||f,n(f.semver,E.semver,s)?E=f:o(f.semver,I.semver,s)&&(I=f)}),E.operator===c||E.operator===u||(!I.operator||I.operator===c)&&i(t,I.semver))return!1;if(I.operator===u&&o(t,I.semver))return!1}return!0};Fr.exports=tn});var Xr=h((ji,jr)=>{var sn=Y(),nn=(t,e,r)=>sn(t,e,">",r);jr.exports=nn});var Vr=h((Xi,Ur)=>{var on=Y(),ln=(t,e,r)=>on(t,e,"<",r);Ur.exports=ln});var Hr=h((Ui,br)=>{var _r=A(),an=(t,e,r)=>(t=new _r(t,r),e=new _r(e,r),t.intersects(e,r));br.exports=an});var Mr=h((Vi,kr)=>{var cn=G(),un=d();kr.exports=(t,e,r)=>{let s=[],n=null,i=null,o=t.sort(($,E)=>un($,E,r));for(let $ of o)cn($,e,r)?(i=$,n||(n=$)):(i&&s.push([n,i]),i=null,n=null);n&&s.push([n,null]);let c=[];for(let[$,E]of s)$===E?c.push($):!E&&$===o[0]?c.push("*"):E?$===o[0]?c.push(`<=${E}`):c.push(`${$} - ${E}`):c.push(`>=${$}`);let u=c.join(" || "),R=typeof e.raw=="string"?e.raw:String(e);return u.length<R.length?u:e}});var Zr=h((_i,Kr)=>{var Yr=A(),ae=C(),{ANY:le}=ae,y=G(),ce=d(),En=(t,e,r={})=>{if(t===e)return!0;t=new Yr(t,r),e=new Yr(e,r);let s=!1;e:for(let n of t.set){for(let i of e.set){let o=hn(n,i,r);if(s=s||o!==null,o)continue e}if(s)return!1}return!0},fn=[new ae(">=0.0.0-0")],Wr=[new ae(">=0.0.0")],hn=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===le){if(e.length===1&&e[0].semver===le)return!0;r.includePrerelease?t=fn:t=Wr}if(e.length===1&&e[0].semver===le){if(r.includePrerelease)return!0;e=Wr}let s=new Set,n,i;for(let f of t)f.operator===">"||f.operator===">="?n=Br(n,f,r):f.operator==="<"||f.operator==="<="?i=zr(i,f,r):s.add(f.semver);if(s.size>1)return null;let o;if(n&&i){if(o=ce(n.semver,i.semver,r),o>0)return null;if(o===0&&(n.operator!==">="||i.operator!=="<="))return null}for(let f of s){if(n&&!y(f,String(n),r)||i&&!y(f,String(i),r))return null;for(let rt of e)if(!y(f,String(rt),r))return!1;return!0}let c,u,R,$,E=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1,I=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1;E&&E.prerelease.length===1&&i.operator==="<"&&E.prerelease[0]===0&&(E=!1);for(let f of e){if($=$||f.operator===">"||f.operator===">=",R=R||f.operator==="<"||f.operator==="<=",n){if(I&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===I.major&&f.semver.minor===I.minor&&f.semver.patch===I.patch&&(I=!1),f.operator===">"||f.operator===">="){if(c=Br(n,f,r),c===f&&c!==n)return!1}else if(n.operator===">="&&!y(n.semver,String(f),r))return!1}if(i){if(E&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===E.major&&f.semver.minor===E.minor&&f.semver.patch===E.patch&&(E=!1),f.operator==="<"||f.operator==="<="){if(u=zr(i,f,r),u===f&&u!==i)return!1}else if(i.operator==="<="&&!y(i.semver,String(f),r))return!1}if(!f.operator&&(i||n)&&o!==0)return!1}return!(n&&R&&!i&&o!==0||i&&$&&!n&&o!==0||I||E)},Br=(t,e,r)=>{if(!t)return e;let s=ce(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},zr=(t,e,r)=>{if(!t)return e;let s=ce(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};Kr.exports=En});var Jn=h((bi,et)=>{var ue=w(),Jr=P(),pn=L(),Qr=z(),Rn=q(),$n=Te(),mn=we(),In=ve(),Ln=De(),Nn=ye(),On=je(),Sn=Ue(),dn=_e(),An=d(),Tn=Me(),qn=We(),wn=V(),gn=Ze(),Pn=Qe(),vn=x(),xn=_(),Cn=Z(),Dn=J(),Gn=b(),yn=H(),Fn=Q(),jn=ar(),Xn=C(),Un=A(),Vn=G(),_n=dr(),bn=Tr(),Hn=wr(),kn=vr(),Mn=Cr(),Yn=Y(),Wn=Xr(),Bn=Vr(),zn=Hr(),Kn=Mr(),Zn=Zr();et.exports={parse:Rn,valid:$n,clean:mn,inc:In,diff:Ln,major:Nn,minor:On,patch:Sn,prerelease:dn,compare:An,rcompare:Tn,compareLoose:qn,compareBuild:wn,sort:gn,rsort:Pn,gt:vn,lt:xn,eq:Cn,neq:Dn,gte:Gn,lte:yn,cmp:Fn,coerce:jn,Comparator:Xn,Range:Un,satisfies:Vn,toComparators:_n,maxSatisfying:bn,minSatisfying:Hn,minVersion:kn,validRange:Mn,outside:Yn,gtr:Wn,ltr:Bn,intersects:zn,simplifyRange:Kn,subset:Zn,SemVer:pn,re:ue.re,src:ue.src,tokens:ue.t,SEMVER_SPEC_VERSION:Jr.SEMVER_SPEC_VERSION,RELEASE_TYPES:Jr.RELEASE_TYPES,compareIdentifiers:Qr.compareIdentifiers,rcompareIdentifiers:Qr.rcompareIdentifiers}});export{Jn as a};
1
+ import{e as h}from"./chunk-QNWPOWRO.js";var P=h((Qn,Ee)=>{var tt="2.0.0",st=Number.MAX_SAFE_INTEGER||9007199254740991,nt=16,it=250,ot=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Ee.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:nt,MAX_SAFE_BUILD_LENGTH:it,MAX_SAFE_INTEGER:st,RELEASE_TYPES:ot,SEMVER_SPEC_VERSION:tt,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var v=h((ei,fe)=>{var lt=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};fe.exports=lt});var w=h((T,he)=>{var{MAX_SAFE_COMPONENT_LENGTH:W,MAX_SAFE_BUILD_LENGTH:at,MAX_LENGTH:ct}=P(),ut=v();T=he.exports={};var Et=T.re=[],ft=T.safeRe=[],l=T.src=[],ht=T.safeSrc=[],a=T.t={},pt=0,B="[a-zA-Z0-9-]",Rt=[["\\s",1],["\\d",ct],[B,at]],$t=t=>{for(let[e,r]of Rt)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},p=(t,e,r)=>{let s=$t(e),n=pt++;ut(t,n,e),a[t]=n,l[n]=e,ht[n]=s,Et[n]=new RegExp(e,r?"g":void 0),ft[n]=new RegExp(s,r?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*");p("NUMERICIDENTIFIERLOOSE","\\d+");p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${B}*`);p("MAINVERSION",`(${l[a.NUMERICIDENTIFIER]})\\.(${l[a.NUMERICIDENTIFIER]})\\.(${l[a.NUMERICIDENTIFIER]})`);p("MAINVERSIONLOOSE",`(${l[a.NUMERICIDENTIFIERLOOSE]})\\.(${l[a.NUMERICIDENTIFIERLOOSE]})\\.(${l[a.NUMERICIDENTIFIERLOOSE]})`);p("PRERELEASEIDENTIFIER",`(?:${l[a.NUMERICIDENTIFIER]}|${l[a.NONNUMERICIDENTIFIER]})`);p("PRERELEASEIDENTIFIERLOOSE",`(?:${l[a.NUMERICIDENTIFIERLOOSE]}|${l[a.NONNUMERICIDENTIFIER]})`);p("PRERELEASE",`(?:-(${l[a.PRERELEASEIDENTIFIER]}(?:\\.${l[a.PRERELEASEIDENTIFIER]})*))`);p("PRERELEASELOOSE",`(?:-?(${l[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[a.PRERELEASEIDENTIFIERLOOSE]})*))`);p("BUILDIDENTIFIER",`${B}+`);p("BUILD",`(?:\\+(${l[a.BUILDIDENTIFIER]}(?:\\.${l[a.BUILDIDENTIFIER]})*))`);p("FULLPLAIN",`v?${l[a.MAINVERSION]}${l[a.PRERELEASE]}?${l[a.BUILD]}?`);p("FULL",`^${l[a.FULLPLAIN]}$`);p("LOOSEPLAIN",`[v=\\s]*${l[a.MAINVERSIONLOOSE]}${l[a.PRERELEASELOOSE]}?${l[a.BUILD]}?`);p("LOOSE",`^${l[a.LOOSEPLAIN]}$`);p("GTLT","((?:<|>)?=?)");p("XRANGEIDENTIFIERLOOSE",`${l[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);p("XRANGEIDENTIFIER",`${l[a.NUMERICIDENTIFIER]}|x|X|\\*`);p("XRANGEPLAIN",`[v=\\s]*(${l[a.XRANGEIDENTIFIER]})(?:\\.(${l[a.XRANGEIDENTIFIER]})(?:\\.(${l[a.XRANGEIDENTIFIER]})(?:${l[a.PRERELEASE]})?${l[a.BUILD]}?)?)?`);p("XRANGEPLAINLOOSE",`[v=\\s]*(${l[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[a.XRANGEIDENTIFIERLOOSE]})(?:${l[a.PRERELEASELOOSE]})?${l[a.BUILD]}?)?)?`);p("XRANGE",`^${l[a.GTLT]}\\s*${l[a.XRANGEPLAIN]}$`);p("XRANGELOOSE",`^${l[a.GTLT]}\\s*${l[a.XRANGEPLAINLOOSE]}$`);p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${W}})(?:\\.(\\d{1,${W}}))?(?:\\.(\\d{1,${W}}))?`);p("COERCE",`${l[a.COERCEPLAIN]}(?:$|[^\\d])`);p("COERCEFULL",l[a.COERCEPLAIN]+`(?:${l[a.PRERELEASE]})?(?:${l[a.BUILD]})?(?:$|[^\\d])`);p("COERCERTL",l[a.COERCE],!0);p("COERCERTLFULL",l[a.COERCEFULL],!0);p("LONETILDE","(?:~>?)");p("TILDETRIM",`(\\s*)${l[a.LONETILDE]}\\s+`,!0);T.tildeTrimReplace="$1~";p("TILDE",`^${l[a.LONETILDE]}${l[a.XRANGEPLAIN]}$`);p("TILDELOOSE",`^${l[a.LONETILDE]}${l[a.XRANGEPLAINLOOSE]}$`);p("LONECARET","(?:\\^)");p("CARETTRIM",`(\\s*)${l[a.LONECARET]}\\s+`,!0);T.caretTrimReplace="$1^";p("CARET",`^${l[a.LONECARET]}${l[a.XRANGEPLAIN]}$`);p("CARETLOOSE",`^${l[a.LONECARET]}${l[a.XRANGEPLAINLOOSE]}$`);p("COMPARATORLOOSE",`^${l[a.GTLT]}\\s*(${l[a.LOOSEPLAIN]})$|^$`);p("COMPARATOR",`^${l[a.GTLT]}\\s*(${l[a.FULLPLAIN]})$|^$`);p("COMPARATORTRIM",`(\\s*)${l[a.GTLT]}\\s*(${l[a.LOOSEPLAIN]}|${l[a.XRANGEPLAIN]})`,!0);T.comparatorTrimReplace="$1$2$3";p("HYPHENRANGE",`^\\s*(${l[a.XRANGEPLAIN]})\\s+-\\s+(${l[a.XRANGEPLAIN]})\\s*$`);p("HYPHENRANGELOOSE",`^\\s*(${l[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[a.XRANGEPLAINLOOSE]})\\s*$`);p("STAR","(<|>)?=?\\s*\\*");p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var F=h((ri,pe)=>{var mt=Object.freeze({loose:!0}),It=Object.freeze({}),Lt=t=>t?typeof t!="object"?mt:t:It;pe.exports=Lt});var z=h((ti,me)=>{var Re=/^[0-9]+$/,$e=(t,e)=>{let r=Re.test(t),s=Re.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},Nt=(t,e)=>$e(e,t);me.exports={compareIdentifiers:$e,rcompareIdentifiers:Nt}});var L=h((si,Oe)=>{var j=v(),{MAX_LENGTH:Ie,MAX_SAFE_INTEGER:X}=P(),{safeRe:Le,safeSrc:Ne,t:U}=w(),Ot=F(),{compareIdentifiers:g}=z(),K=class t{constructor(e,r){if(r=Ot(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Ie)throw new TypeError(`version is longer than ${Ie} characters`);j("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?Le[U.LOOSE]:Le[U.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>X||this.major<0)throw new TypeError("Invalid major version");if(this.minor>X||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>X||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let i=+n;if(i>=0&&i<X)return i}return n}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(j("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),g(this.major,e.major)||g(this.minor,e.minor)||g(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let s=this.prerelease[r],n=e.prerelease[r];if(j("prerelease compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return g(s,n)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let s=this.build[r],n=e.build[r];if(j("build compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return g(s,n)}while(++r)}inc(e,r,s){if(e.startsWith("pre")){if(!r&&s===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let n=new RegExp(`^${this.options.loose?Ne[U.PRERELEASELOOSE]:Ne[U.PRERELEASE]}$`),i=`-${r}`.match(n);if(!i||i[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,s),this.inc("pre",r,s);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,s),this.inc("pre",r,s);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let n=Number(s)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(r===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(r){let i=[r,n];s===!1&&(i=[r]),g(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Oe.exports=K});var q=h((ni,de)=>{var Se=L(),St=(t,e,r=!1)=>{if(t instanceof Se)return t;try{return new Se(t,e)}catch(s){if(!r)return null;throw s}};de.exports=St});var Te=h((ii,Ae)=>{var dt=q(),At=(t,e)=>{let r=dt(t,e);return r?r.version:null};Ae.exports=At});var we=h((oi,qe)=>{var Tt=q(),qt=(t,e)=>{let r=Tt(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};qe.exports=qt});var ve=h((li,Pe)=>{var ge=L(),wt=(t,e,r,s,n)=>{typeof r=="string"&&(n=s,s=r,r=void 0);try{return new ge(t instanceof ge?t.version:t,r).inc(e,s,n).version}catch{return null}};Pe.exports=wt});var De=h((ai,Ce)=>{var xe=q(),gt=(t,e)=>{let r=xe(t,null,!0),s=xe(e,null,!0),n=r.compare(s);if(n===0)return null;let i=n>0,o=i?r:s,c=i?s:r,u=!!o.prerelease.length;if(!!c.prerelease.length&&!u){if(!c.patch&&!c.minor)return"major";if(c.compareMain(o)===0)return c.minor&&!c.patch?"minor":"patch"}let $=u?"pre":"";return r.major!==s.major?$+"major":r.minor!==s.minor?$+"minor":r.patch!==s.patch?$+"patch":"prerelease"};Ce.exports=gt});var ye=h((ci,Ge)=>{var Pt=L(),vt=(t,e)=>new Pt(t,e).major;Ge.exports=vt});var je=h((ui,Fe)=>{var xt=L(),Ct=(t,e)=>new xt(t,e).minor;Fe.exports=Ct});var Ue=h((Ei,Xe)=>{var Dt=L(),Gt=(t,e)=>new Dt(t,e).patch;Xe.exports=Gt});var _e=h((fi,Ve)=>{var yt=q(),Ft=(t,e)=>{let r=yt(t,e);return r&&r.prerelease.length?r.prerelease:null};Ve.exports=Ft});var d=h((hi,He)=>{var be=L(),jt=(t,e,r)=>new be(t,r).compare(new be(e,r));He.exports=jt});var Me=h((pi,ke)=>{var Xt=d(),Ut=(t,e,r)=>Xt(e,t,r);ke.exports=Ut});var We=h((Ri,Ye)=>{var Vt=d(),_t=(t,e)=>Vt(t,e,!0);Ye.exports=_t});var V=h(($i,ze)=>{var Be=L(),bt=(t,e,r)=>{let s=new Be(t,r),n=new Be(e,r);return s.compare(n)||s.compareBuild(n)};ze.exports=bt});var Ze=h((mi,Ke)=>{var Ht=V(),kt=(t,e)=>t.sort((r,s)=>Ht(r,s,e));Ke.exports=kt});var Qe=h((Ii,Je)=>{var Mt=V(),Yt=(t,e)=>t.sort((r,s)=>Mt(s,r,e));Je.exports=Yt});var x=h((Li,er)=>{var Wt=d(),Bt=(t,e,r)=>Wt(t,e,r)>0;er.exports=Bt});var _=h((Ni,rr)=>{var zt=d(),Kt=(t,e,r)=>zt(t,e,r)<0;rr.exports=Kt});var Z=h((Oi,tr)=>{var Zt=d(),Jt=(t,e,r)=>Zt(t,e,r)===0;tr.exports=Jt});var J=h((Si,sr)=>{var Qt=d(),es=(t,e,r)=>Qt(t,e,r)!==0;sr.exports=es});var b=h((di,nr)=>{var rs=d(),ts=(t,e,r)=>rs(t,e,r)>=0;nr.exports=ts});var H=h((Ai,ir)=>{var ss=d(),ns=(t,e,r)=>ss(t,e,r)<=0;ir.exports=ns});var Q=h((Ti,or)=>{var is=Z(),os=J(),ls=x(),as=b(),cs=_(),us=H(),Es=(t,e,r,s)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return is(t,r,s);case"!=":return os(t,r,s);case">":return ls(t,r,s);case">=":return as(t,r,s);case"<":return cs(t,r,s);case"<=":return us(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};or.exports=Es});var ar=h((qi,lr)=>{var fs=L(),hs=q(),{safeRe:k,t:M}=w(),ps=(t,e)=>{if(t instanceof fs)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?k[M.COERCEFULL]:k[M.COERCE]);else{let u=e.includePrerelease?k[M.COERCERTLFULL]:k[M.COERCERTL],R;for(;(R=u.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||R.index+R[0].length!==r.index+r[0].length)&&(r=R),u.lastIndex=R.index+R[1].length+R[2].length;u.lastIndex=-1}if(r===null)return null;let s=r[2],n=r[3]||"0",i=r[4]||"0",o=e.includePrerelease&&r[5]?`-${r[5]}`:"",c=e.includePrerelease&&r[6]?`+${r[6]}`:"";return hs(`${s}.${n}.${i}${o}${c}`,e)};lr.exports=ps});var ur=h((wi,cr)=>{var ee=class{constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(e,r)}return this}};cr.exports=ee});var A=h((gi,pr)=>{var Rs=/\s+/g,re=class t{constructor(e,r){if(r=ms(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof te)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(Rs," "),this.set=this.raw.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(n=>!fr(n[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&As(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let r=this.set[e];for(let s=0;s<r.length;s++)s>0&&(this.formatted+=" "),this.formatted+=r[s].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let s=((this.options.includePrerelease&&Ss)|(this.options.loose&&ds))+":"+e,n=Er.get(s);if(n)return n;let i=this.options.loose,o=i?S[N.HYPHENRANGELOOSE]:S[N.HYPHENRANGE];e=e.replace(o,Gs(this.options.includePrerelease)),m("hyphen replace",e),e=e.replace(S[N.COMPARATORTRIM],Ls),m("comparator trim",e),e=e.replace(S[N.TILDETRIM],Ns),m("tilde trim",e),e=e.replace(S[N.CARETTRIM],Os),m("caret trim",e);let c=e.split(" ").map(E=>Ts(E,this.options)).join(" ").split(/\s+/).map(E=>Ds(E,this.options));i&&(c=c.filter(E=>(m("loose invalid filter",E,this.options),!!E.match(S[N.COMPARATORLOOSE])))),m("range list",c);let u=new Map,R=c.map(E=>new te(E,this.options));for(let E of R){if(fr(E))return[E];u.set(E.value,E)}u.size>1&&u.has("")&&u.delete("");let $=[...u.values()];return Er.set(s,$),$}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(s=>hr(s,r)&&e.set.some(n=>hr(n,r)&&s.every(i=>n.every(o=>i.intersects(o,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Is(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(ys(this.set[r],e,this.options))return!0;return!1}};pr.exports=re;var $s=ur(),Er=new $s,ms=F(),te=C(),m=v(),Is=L(),{safeRe:S,t:N,comparatorTrimReplace:Ls,tildeTrimReplace:Ns,caretTrimReplace:Os}=w(),{FLAG_INCLUDE_PRERELEASE:Ss,FLAG_LOOSE:ds}=P(),fr=t=>t.value==="<0.0.0-0",As=t=>t.value==="",hr=(t,e)=>{let r=!0,s=t.slice(),n=s.pop();for(;r&&s.length;)r=s.every(i=>n.intersects(i,e)),n=s.pop();return r},Ts=(t,e)=>(m("comp",t,e),t=gs(t,e),m("caret",t),t=qs(t,e),m("tildes",t),t=vs(t,e),m("xrange",t),t=Cs(t,e),m("stars",t),t),O=t=>!t||t.toLowerCase()==="x"||t==="*",qs=(t,e)=>t.trim().split(/\s+/).map(r=>ws(r,e)).join(" "),ws=(t,e)=>{let r=e.loose?S[N.TILDELOOSE]:S[N.TILDE];return t.replace(r,(s,n,i,o,c)=>{m("tilde",t,s,n,i,o,c);let u;return O(n)?u="":O(i)?u=`>=${n}.0.0 <${+n+1}.0.0-0`:O(o)?u=`>=${n}.${i}.0 <${n}.${+i+1}.0-0`:c?(m("replaceTilde pr",c),u=`>=${n}.${i}.${o}-${c} <${n}.${+i+1}.0-0`):u=`>=${n}.${i}.${o} <${n}.${+i+1}.0-0`,m("tilde return",u),u})},gs=(t,e)=>t.trim().split(/\s+/).map(r=>Ps(r,e)).join(" "),Ps=(t,e)=>{m("caret",t,e);let r=e.loose?S[N.CARETLOOSE]:S[N.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(n,i,o,c,u)=>{m("caret",t,n,i,o,c,u);let R;return O(i)?R="":O(o)?R=`>=${i}.0.0${s} <${+i+1}.0.0-0`:O(c)?i==="0"?R=`>=${i}.${o}.0${s} <${i}.${+o+1}.0-0`:R=`>=${i}.${o}.0${s} <${+i+1}.0.0-0`:u?(m("replaceCaret pr",u),i==="0"?o==="0"?R=`>=${i}.${o}.${c}-${u} <${i}.${o}.${+c+1}-0`:R=`>=${i}.${o}.${c}-${u} <${i}.${+o+1}.0-0`:R=`>=${i}.${o}.${c}-${u} <${+i+1}.0.0-0`):(m("no pr"),i==="0"?o==="0"?R=`>=${i}.${o}.${c}${s} <${i}.${o}.${+c+1}-0`:R=`>=${i}.${o}.${c}${s} <${i}.${+o+1}.0-0`:R=`>=${i}.${o}.${c} <${+i+1}.0.0-0`),m("caret return",R),R})},vs=(t,e)=>(m("replaceXRanges",t,e),t.split(/\s+/).map(r=>xs(r,e)).join(" ")),xs=(t,e)=>{t=t.trim();let r=e.loose?S[N.XRANGELOOSE]:S[N.XRANGE];return t.replace(r,(s,n,i,o,c,u)=>{m("xRange",t,s,n,i,o,c,u);let R=O(i),$=R||O(o),E=$||O(c),I=E;return n==="="&&I&&(n=""),u=e.includePrerelease?"-0":"",R?n===">"||n==="<"?s="<0.0.0-0":s="*":n&&I?($&&(o=0),c=0,n===">"?(n=">=",$?(i=+i+1,o=0,c=0):(o=+o+1,c=0)):n==="<="&&(n="<",$?i=+i+1:o=+o+1),n==="<"&&(u="-0"),s=`${n+i}.${o}.${c}${u}`):$?s=`>=${i}.0.0${u} <${+i+1}.0.0-0`:E&&(s=`>=${i}.${o}.0${u} <${i}.${+o+1}.0-0`),m("xRange return",s),s})},Cs=(t,e)=>(m("replaceStars",t,e),t.trim().replace(S[N.STAR],"")),Ds=(t,e)=>(m("replaceGTE0",t,e),t.trim().replace(S[e.includePrerelease?N.GTE0PRE:N.GTE0],"")),Gs=t=>(e,r,s,n,i,o,c,u,R,$,E,I)=>(O(s)?r="":O(n)?r=`>=${s}.0.0${t?"-0":""}`:O(i)?r=`>=${s}.${n}.0${t?"-0":""}`:o?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,O(R)?u="":O($)?u=`<${+R+1}.0.0-0`:O(E)?u=`<${R}.${+$+1}.0-0`:I?u=`<=${R}.${$}.${E}-${I}`:t?u=`<${R}.${$}.${+E+1}-0`:u=`<=${u}`,`${r} ${u}`.trim()),ys=(t,e,r)=>{for(let s=0;s<t.length;s++)if(!t[s].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let s=0;s<t.length;s++)if(m(t[s].semver),t[s].semver!==te.ANY&&t[s].semver.prerelease.length>0){let n=t[s].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}});var C=h((Pi,Nr)=>{var D=Symbol("SemVer ANY"),ie=class t{static get ANY(){return D}constructor(e,r){if(r=Rr(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),ne("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===D?this.value="":this.value=this.operator+this.semver.version,ne("comp",this)}parse(e){let r=this.options.loose?$r[mr.COMPARATORLOOSE]:$r[mr.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new Ir(s[2],this.options.loose):this.semver=D}toString(){return this.value}test(e){if(ne("Comparator.test",e,this.options.loose),this.semver===D||e===D)return!0;if(typeof e=="string")try{e=new Ir(e,this.options)}catch{return!1}return se(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Lr(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new Lr(this.value,r).test(e.semver):(r=Rr(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||se(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||se(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Nr.exports=ie;var Rr=F(),{safeRe:$r,t:mr}=w(),se=Q(),ne=v(),Ir=L(),Lr=A()});var G=h((vi,Or)=>{var Fs=A(),js=(t,e,r)=>{try{e=new Fs(e,r)}catch{return!1}return e.test(t)};Or.exports=js});var dr=h((xi,Sr)=>{var Xs=A(),Us=(t,e)=>new Xs(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));Sr.exports=Us});var Tr=h((Ci,Ar)=>{var Vs=L(),_s=A(),bs=(t,e,r)=>{let s=null,n=null,i=null;try{i=new _s(e,r)}catch{return null}return t.forEach(o=>{i.test(o)&&(!s||n.compare(o)===-1)&&(s=o,n=new Vs(s,r))}),s};Ar.exports=bs});var wr=h((Di,qr)=>{var Hs=L(),ks=A(),Ms=(t,e,r)=>{let s=null,n=null,i=null;try{i=new ks(e,r)}catch{return null}return t.forEach(o=>{i.test(o)&&(!s||n.compare(o)===1)&&(s=o,n=new Hs(s,r))}),s};qr.exports=Ms});var vr=h((Gi,Pr)=>{var oe=L(),Ys=A(),gr=x(),Ws=(t,e)=>{t=new Ys(t,e);let r=new oe("0.0.0");if(t.test(r)||(r=new oe("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let n=t.set[s],i=null;n.forEach(o=>{let c=new oe(o.semver.version);switch(o.operator){case">":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!i||gr(c,i))&&(i=c);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),i&&(!r||gr(r,i))&&(r=i)}return r&&t.test(r)?r:null};Pr.exports=Ws});var Cr=h((yi,xr)=>{var Bs=A(),zs=(t,e)=>{try{return new Bs(t,e).range||"*"}catch{return null}};xr.exports=zs});var Y=h((Fi,Fr)=>{var Ks=L(),yr=C(),{ANY:Zs}=yr,Js=A(),Qs=G(),Dr=x(),Gr=_(),en=H(),rn=b(),tn=(t,e,r,s)=>{t=new Ks(t,s),e=new Js(e,s);let n,i,o,c,u;switch(r){case">":n=Dr,i=en,o=Gr,c=">",u=">=";break;case"<":n=Gr,i=rn,o=Dr,c="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Qs(t,e,s))return!1;for(let R=0;R<e.set.length;++R){let $=e.set[R],E=null,I=null;if($.forEach(f=>{f.semver===Zs&&(f=new yr(">=0.0.0")),E=E||f,I=I||f,n(f.semver,E.semver,s)?E=f:o(f.semver,I.semver,s)&&(I=f)}),E.operator===c||E.operator===u||(!I.operator||I.operator===c)&&i(t,I.semver))return!1;if(I.operator===u&&o(t,I.semver))return!1}return!0};Fr.exports=tn});var Xr=h((ji,jr)=>{var sn=Y(),nn=(t,e,r)=>sn(t,e,">",r);jr.exports=nn});var Vr=h((Xi,Ur)=>{var on=Y(),ln=(t,e,r)=>on(t,e,"<",r);Ur.exports=ln});var Hr=h((Ui,br)=>{var _r=A(),an=(t,e,r)=>(t=new _r(t,r),e=new _r(e,r),t.intersects(e,r));br.exports=an});var Mr=h((Vi,kr)=>{var cn=G(),un=d();kr.exports=(t,e,r)=>{let s=[],n=null,i=null,o=t.sort(($,E)=>un($,E,r));for(let $ of o)cn($,e,r)?(i=$,n||(n=$)):(i&&s.push([n,i]),i=null,n=null);n&&s.push([n,null]);let c=[];for(let[$,E]of s)$===E?c.push($):!E&&$===o[0]?c.push("*"):E?$===o[0]?c.push(`<=${E}`):c.push(`${$} - ${E}`):c.push(`>=${$}`);let u=c.join(" || "),R=typeof e.raw=="string"?e.raw:String(e);return u.length<R.length?u:e}});var Zr=h((_i,Kr)=>{var Yr=A(),ae=C(),{ANY:le}=ae,y=G(),ce=d(),En=(t,e,r={})=>{if(t===e)return!0;t=new Yr(t,r),e=new Yr(e,r);let s=!1;e:for(let n of t.set){for(let i of e.set){let o=hn(n,i,r);if(s=s||o!==null,o)continue e}if(s)return!1}return!0},fn=[new ae(">=0.0.0-0")],Wr=[new ae(">=0.0.0")],hn=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===le){if(e.length===1&&e[0].semver===le)return!0;r.includePrerelease?t=fn:t=Wr}if(e.length===1&&e[0].semver===le){if(r.includePrerelease)return!0;e=Wr}let s=new Set,n,i;for(let f of t)f.operator===">"||f.operator===">="?n=Br(n,f,r):f.operator==="<"||f.operator==="<="?i=zr(i,f,r):s.add(f.semver);if(s.size>1)return null;let o;if(n&&i){if(o=ce(n.semver,i.semver,r),o>0)return null;if(o===0&&(n.operator!==">="||i.operator!=="<="))return null}for(let f of s){if(n&&!y(f,String(n),r)||i&&!y(f,String(i),r))return null;for(let rt of e)if(!y(f,String(rt),r))return!1;return!0}let c,u,R,$,E=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1,I=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1;E&&E.prerelease.length===1&&i.operator==="<"&&E.prerelease[0]===0&&(E=!1);for(let f of e){if($=$||f.operator===">"||f.operator===">=",R=R||f.operator==="<"||f.operator==="<=",n){if(I&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===I.major&&f.semver.minor===I.minor&&f.semver.patch===I.patch&&(I=!1),f.operator===">"||f.operator===">="){if(c=Br(n,f,r),c===f&&c!==n)return!1}else if(n.operator===">="&&!y(n.semver,String(f),r))return!1}if(i){if(E&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===E.major&&f.semver.minor===E.minor&&f.semver.patch===E.patch&&(E=!1),f.operator==="<"||f.operator==="<="){if(u=zr(i,f,r),u===f&&u!==i)return!1}else if(i.operator==="<="&&!y(i.semver,String(f),r))return!1}if(!f.operator&&(i||n)&&o!==0)return!1}return!(n&&R&&!i&&o!==0||i&&$&&!n&&o!==0||I||E)},Br=(t,e,r)=>{if(!t)return e;let s=ce(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},zr=(t,e,r)=>{if(!t)return e;let s=ce(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};Kr.exports=En});var Jn=h((bi,et)=>{var ue=w(),Jr=P(),pn=L(),Qr=z(),Rn=q(),$n=Te(),mn=we(),In=ve(),Ln=De(),Nn=ye(),On=je(),Sn=Ue(),dn=_e(),An=d(),Tn=Me(),qn=We(),wn=V(),gn=Ze(),Pn=Qe(),vn=x(),xn=_(),Cn=Z(),Dn=J(),Gn=b(),yn=H(),Fn=Q(),jn=ar(),Xn=C(),Un=A(),Vn=G(),_n=dr(),bn=Tr(),Hn=wr(),kn=vr(),Mn=Cr(),Yn=Y(),Wn=Xr(),Bn=Vr(),zn=Hr(),Kn=Mr(),Zn=Zr();et.exports={parse:Rn,valid:$n,clean:mn,inc:In,diff:Ln,major:Nn,minor:On,patch:Sn,prerelease:dn,compare:An,rcompare:Tn,compareLoose:qn,compareBuild:wn,sort:gn,rsort:Pn,gt:vn,lt:xn,eq:Cn,neq:Dn,gte:Gn,lte:yn,cmp:Fn,coerce:jn,Comparator:Xn,Range:Un,satisfies:Vn,toComparators:_n,maxSatisfying:bn,minSatisfying:Hn,minVersion:kn,validRange:Mn,outside:Yn,gtr:Wn,ltr:Bn,intersects:zn,simplifyRange:Kn,subset:Zn,SemVer:pn,re:ue.re,src:ue.src,tokens:ue.t,SEMVER_SPEC_VERSION:Jr.SEMVER_SPEC_VERSION,RELEASE_TYPES:Jr.RELEASE_TYPES,compareIdentifiers:Qr.compareIdentifiers,rcompareIdentifiers:Qr.rcompareIdentifiers}});export{Jn as a};
@@ -0,0 +1 @@
1
+ import{d as a}from"./chunk-CP2SJFWV.js";import"./chunk-GG52KGAI.js";import"./chunk-FA7ICRJL.js";import"./chunk-MY2S4HAC.js";import"./chunk-54KHHHVC.js";import"./chunk-FMKGRMAH.js";import"./chunk-3NYGPFUX.js";import"./chunk-NZOTW24P.js";import"./chunk-DBJHYM6V.js";import"./chunk-DKYXLNGS.js";import"./chunk-N3KVODFS.js";import"./chunk-ZAWXBC3X.js";import"./chunk-DCNG2M5F.js";import"./chunk-TR4NZKA2.js";import"./chunk-E7KALXAM.js";import"./chunk-TVD6GFRS.js";import"./chunk-5E6U5Y4F.js";import"./chunk-LLHKFCES.js";import"./chunk-BY7R34BA.js";import"./chunk-NXJPK6JI.js";import"./chunk-KDJYMZFG.js";import"./chunk-ESHZ74WN.js";import"./chunk-VAECS3ST.js";import"./chunk-5R5SNIWB.js";import"./chunk-QNWPOWRO.js";export{a as SettingsComponent};